diff --git a/wikilibrasV2/.gitignore b/wikilibrasV2/.gitignore new file mode 100755 index 0000000..39255c8 --- /dev/null +++ b/wikilibrasV2/.gitignore @@ -0,0 +1,26 @@ +.* +!*.gitignore +!*.gitempty +*~ +*.bak +*.conf +*.coverage +*.db +*.ini +*.log +*.noseids +*.pem +*.pyc +*.sql +*.swl +*.swm +*.swn +*.swo +*.swp +*.wsgi +.DS_Store +settings_local.py +env/ +tmp/ +uploads/ +videos/ diff --git a/wikilibrasV2/LICENSE b/wikilibrasV2/LICENSE new file mode 100755 index 0000000..05ca2e1 --- /dev/null +++ b/wikilibrasV2/LICENSE @@ -0,0 +1,674 @@ + GNU GENERAL PUBLIC LICENSE + Version 3, 29 June 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU General Public License is a free, copyleft license for +software and other kinds of works. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +the GNU General Public License is intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. We, the Free Software Foundation, use the +GNU General Public License for most of our software; it applies also to +any other work released this way by its authors. You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + To protect your rights, we need to prevent others from denying you +these rights or asking you to surrender the rights. Therefore, you have +certain responsibilities if you distribute copies of the software, or if +you modify it: responsibilities to respect the freedom of others. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must pass on to the recipients the same +freedoms that you received. You must make sure that they, too, receive +or can get the source code. And you must show them these terms so they +know their rights. + + Developers that use the GNU GPL protect your rights with two steps: +(1) assert copyright on the software, and (2) offer you this License +giving you legal permission to copy, distribute and/or modify it. + + For the developers' and authors' protection, the GPL clearly explains +that there is no warranty for this free software. For both users' and +authors' sake, the GPL requires that modified versions be marked as +changed, so that their problems will not be attributed erroneously to +authors of previous versions. + + Some devices are designed to deny users access to install or run +modified versions of the software inside them, although the manufacturer +can do so. This is fundamentally incompatible with the aim of +protecting users' freedom to change the software. The systematic +pattern of such abuse occurs in the area of products for individuals to +use, which is precisely where it is most unacceptable. Therefore, we +have designed this version of the GPL to prohibit the practice for those +products. If such problems arise substantially in other domains, we +stand ready to extend this provision to those domains in future versions +of the GPL, as needed to protect the freedom of users. + + Finally, every program is threatened constantly by software patents. +States should not allow patents to restrict development and use of +software on general-purpose computers, but in those that do, we wish to +avoid the special danger that patents applied to a free program could +make it effectively proprietary. To prevent this, the GPL assures that +patents cannot be used to render the program non-free. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Use with the GNU Affero General Public License. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU Affero General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the special requirements of the GNU Affero General Public License, +section 13, concerning interaction through a network will apply to the +combination as such. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + wikilibrasV2 + Copyright (C) 2017 WikiLibras + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If the program does terminal interaction, make it output a short +notice like this when it starts in an interactive mode: + + wikilibrasV2 Copyright (C) 2017 WikiLibras + This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, your program's commands +might be different; for a GUI interface, you would use an "about box". + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU GPL, see +. + + The GNU General Public License does not permit incorporating your program +into proprietary programs. If your program is a subroutine library, you +may consider it more useful to permit linking proprietary applications with +the library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. But first, please read +. diff --git a/wikilibrasV2/Makefile b/wikilibrasV2/Makefile new file mode 100755 index 0000000..af918a6 --- /dev/null +++ b/wikilibrasV2/Makefile @@ -0,0 +1,86 @@ +PROJECT_NAME = wikilibras +VLIBRAS_WIKILIBRAS_ENV := /etc/profile.d/lavid/vlibras/wikilibras_env.sh +PROJECT_DIR := $(CURDIR) +SED_REPLACE_ALL = sed -i "s/$(1)/$(2)/g" "$(3)" +SED_REPLACE_ALL_PATH = sed -i "s\#$(1)\#$(2)\#g" "$(3)" + +-include ${VLIBRAS_WIKILIBRAS_ENV} + +ifndef LOCALHOST + ifndef NETWORK_INTERFACE + NETWORK_INTERFACE := $(shell ip route | grep "default" | awk '{print $$5; exit}') + endif + ifdef NETWORK_INTERFACE + LOCALHOST ?= $(shell ip route get 1 | awk '{print $$7; exit}') + endif +endif + +ifndef LOCALHOST + LOCALHOST ?= 127.0.0.1 +endif + +install: uninstall config env + +env: + @ ( \ + virtualenv ./env/; \ + . ./env/bin/activate; \ + pip install -U pip; \ + pip install -U uwsgi; \ + pip install -U ndg-httpsclient; \ + pip install -r requirements.txt; \ + ) + +create_project update_project: + @ echo "http://${LOCALHOST}/${PROJECT_NAME}-backend/$@" +ifdef PYBOSSA_API_KEY + @ curl "http://${LOCALHOST}/${PROJECT_NAME}-backend/$@" && echo "" +endif + +config: + @ cp settings_local.py.tmpl settings_local.py + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},settings_local.py) + @ $(call SED_REPLACE_ALL,localhost,${LOCALHOST},settings_local.py) +ifdef PYBOSSA_API_KEY + @ $(call SED_REPLACE_ALL,my-api-key,${PYBOSSA_API_KEY},settings_local.py) +endif + @ cp ./contrib/${PROJECT_NAME}.wsgi.tmpl ./contrib/${PROJECT_NAME}.wsgi + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},./contrib/${PROJECT_NAME}.wsgi) + @ cp ./contrib/apache/${PROJECT_NAME}.conf.tmpl ./contrib/apache/${PROJECT_NAME}.conf + @ $(call SED_REPLACE_ALL,ServerName localhost,ServerName ${LOCALHOST},./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL,user1,$$USER,./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL,group1,$$USER,./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},./contrib/apache/${PROJECT_NAME}.conf) + @ sudo cp -u "/etc/apache2/sites-available/pybossa.conf" /etc/apache2/sites-available/wikilibras.conf + @ if grep -q "WSGIScriptAlias /${PROJECT_NAME}" "/etc/apache2/sites-available/wikilibras.conf"; \ + then \ + echo "\33[33;1mA previous WSGI daemon definition for '${PROJECT_NAME}' in: /etc/apache2/sites-available/wikilibras.conf\33[0m"; \ + else \ + sudo sed -i -e "/Header/,/VirtualHost>/d" /etc/apache2/sites-available/wikilibras.conf; \ + sudo sed -n -e '/WSGIDaemonProcess/,/VirtualHost>/p' ./contrib/apache/${PROJECT_NAME}.conf | \ + sudo tee -a /etc/apache2/sites-available/wikilibras.conf > /dev/null; \ + fi + +apache: + @ sudo a2dissite pybossa.conf + @ sudo a2ensite wikilibras.conf + @ sudo apachectl configtest + @ sudo service apache2 start + @ sudo service apache2 reload + +clean: + @ find . -regextype posix-awk -regex "(.*.log|.*.pyc)" -type f -print -delete + +uninstall: + @ rm -rf ./env/ + $(MAKE) clean + @ rm -f ./settings_local.py + @ rm -f ./contrib/${PROJECT_NAME}.wsgi + @ sudo rm -f /etc/apache2/sites-available/wikilibras.conf + @ sudo rm -f /etc/apache2/sites-enabled/wikilibras.conf + +run: + @ ( \ + . ./env/bin/activate; \ + python main.py; \ + ) diff --git a/wikilibrasV2/Makefile.old b/wikilibrasV2/Makefile.old new file mode 100755 index 0000000..af918a6 --- /dev/null +++ b/wikilibrasV2/Makefile.old @@ -0,0 +1,86 @@ +PROJECT_NAME = wikilibras +VLIBRAS_WIKILIBRAS_ENV := /etc/profile.d/lavid/vlibras/wikilibras_env.sh +PROJECT_DIR := $(CURDIR) +SED_REPLACE_ALL = sed -i "s/$(1)/$(2)/g" "$(3)" +SED_REPLACE_ALL_PATH = sed -i "s\#$(1)\#$(2)\#g" "$(3)" + +-include ${VLIBRAS_WIKILIBRAS_ENV} + +ifndef LOCALHOST + ifndef NETWORK_INTERFACE + NETWORK_INTERFACE := $(shell ip route | grep "default" | awk '{print $$5; exit}') + endif + ifdef NETWORK_INTERFACE + LOCALHOST ?= $(shell ip route get 1 | awk '{print $$7; exit}') + endif +endif + +ifndef LOCALHOST + LOCALHOST ?= 127.0.0.1 +endif + +install: uninstall config env + +env: + @ ( \ + virtualenv ./env/; \ + . ./env/bin/activate; \ + pip install -U pip; \ + pip install -U uwsgi; \ + pip install -U ndg-httpsclient; \ + pip install -r requirements.txt; \ + ) + +create_project update_project: + @ echo "http://${LOCALHOST}/${PROJECT_NAME}-backend/$@" +ifdef PYBOSSA_API_KEY + @ curl "http://${LOCALHOST}/${PROJECT_NAME}-backend/$@" && echo "" +endif + +config: + @ cp settings_local.py.tmpl settings_local.py + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},settings_local.py) + @ $(call SED_REPLACE_ALL,localhost,${LOCALHOST},settings_local.py) +ifdef PYBOSSA_API_KEY + @ $(call SED_REPLACE_ALL,my-api-key,${PYBOSSA_API_KEY},settings_local.py) +endif + @ cp ./contrib/${PROJECT_NAME}.wsgi.tmpl ./contrib/${PROJECT_NAME}.wsgi + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},./contrib/${PROJECT_NAME}.wsgi) + @ cp ./contrib/apache/${PROJECT_NAME}.conf.tmpl ./contrib/apache/${PROJECT_NAME}.conf + @ $(call SED_REPLACE_ALL,ServerName localhost,ServerName ${LOCALHOST},./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL,user1,$$USER,./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL,group1,$$USER,./contrib/apache/${PROJECT_NAME}.conf) + @ $(call SED_REPLACE_ALL_PATH,,${PROJECT_DIR},./contrib/apache/${PROJECT_NAME}.conf) + @ sudo cp -u "/etc/apache2/sites-available/pybossa.conf" /etc/apache2/sites-available/wikilibras.conf + @ if grep -q "WSGIScriptAlias /${PROJECT_NAME}" "/etc/apache2/sites-available/wikilibras.conf"; \ + then \ + echo "\33[33;1mA previous WSGI daemon definition for '${PROJECT_NAME}' in: /etc/apache2/sites-available/wikilibras.conf\33[0m"; \ + else \ + sudo sed -i -e "/Header/,/VirtualHost>/d" /etc/apache2/sites-available/wikilibras.conf; \ + sudo sed -n -e '/WSGIDaemonProcess/,/VirtualHost>/p' ./contrib/apache/${PROJECT_NAME}.conf | \ + sudo tee -a /etc/apache2/sites-available/wikilibras.conf > /dev/null; \ + fi + +apache: + @ sudo a2dissite pybossa.conf + @ sudo a2ensite wikilibras.conf + @ sudo apachectl configtest + @ sudo service apache2 start + @ sudo service apache2 reload + +clean: + @ find . -regextype posix-awk -regex "(.*.log|.*.pyc)" -type f -print -delete + +uninstall: + @ rm -rf ./env/ + $(MAKE) clean + @ rm -f ./settings_local.py + @ rm -f ./contrib/${PROJECT_NAME}.wsgi + @ sudo rm -f /etc/apache2/sites-available/wikilibras.conf + @ sudo rm -f /etc/apache2/sites-enabled/wikilibras.conf + +run: + @ ( \ + . ./env/bin/activate; \ + python main.py; \ + ) diff --git a/wikilibrasV2/contrib/apache/wikilibras.conf.tmpl b/wikilibrasV2/contrib/apache/wikilibras.conf.tmpl new file mode 100755 index 0000000..c82d0fa --- /dev/null +++ b/wikilibrasV2/contrib/apache/wikilibras.conf.tmpl @@ -0,0 +1,28 @@ + + ServerName localhost + + WSGIDaemonProcess wikilibras user=user1 group=group1 threads=5 + WSGIScriptAlias /wikilibras-backend /contrib/wikilibras.wsgi + + > + WSGIProcessGroup wikilibras + WSGIApplicationGroup %{GLOBAL} + Order deny,allow + Allow from all + Require all granted + + + Alias /wikilibras /view + /view> + Order deny,allow + Allow from all + Require all granted + + + Header set Access-Control-Allow-Origin "*" + + ServerAdmin webmaster@localhost + + ErrorLog ${APACHE_LOG_DIR}/error.log + CustomLog ${APACHE_LOG_DIR}/access.log combined + diff --git a/wikilibrasV2/contrib/wikilibras.wsgi.tmpl b/wikilibrasV2/contrib/wikilibras.wsgi.tmpl new file mode 100755 index 0000000..74b13b5 --- /dev/null +++ b/wikilibrasV2/contrib/wikilibras.wsgi.tmpl @@ -0,0 +1,11 @@ +# Check the official documentation http://flask.pocoo.org/docs/deploying/mod_wsgi/ +# Activate the virtual env (we assume that virtualenv is in the env folder) +activate_this = '/env/bin/activate_this.py' +execfile(activate_this, dict(__file__=activate_this)) +import logging, sys +sys.stdout = sys.stderr +logging.basicConfig(stream=sys.stderr) +sys.path.insert(0,'') + +# Run the web-app +from main import app as application diff --git a/wikilibrasV2/main.py b/wikilibrasV2/main.py new file mode 100755 index 0000000..d2cb20a --- /dev/null +++ b/wikilibrasV2/main.py @@ -0,0 +1,75 @@ +# -*- coding: utf-8 -*- +from flask import Flask, send_from_directory +from flask.ext.cors import CORS +from jinja2 import Environment, PackageLoader +from wikilibras import Wikilibras +import os +import pyutil + +app = Flask(__name__) +controller = None + +@app.route("/update_project") +def update_project(): + try: + return controller.update_project() + except: + pyutil.print_stack_trace() + raise + +@app.route("/create_project") +def create_project(): + try: + return controller.create_project() + except: + pyutil.print_stack_trace() + raise + +@app.route("/finish_task", methods=["POST"]) +def finish_task(): + try: + return controller.finish_task() + except: + pyutil.print_stack_trace() + raise + +def read_settings(app): + here = os.path.abspath(__file__) + config_path = os.path.join(os.path.dirname(here), 'settings_local.py') + if os.path.exists(config_path): + app.config.from_pyfile(config_path) + + if app.config['APACHE_HOST']: + app.config['HOST_ENDPOINT'] = "http://" + app.config['SERVER_HOST'] + app.config['APACHE_HOST_ENDPOINT'] + app.config['HOST_STATIC_FILES_ENDPOINT'] = "http://" + app.config['SERVER_HOST'] + app.config['APACHE_STATIC_FILES_ENDPOINT'] + else: + app.config['HOST_ENDPOINT'] = "http://" + app.config['SERVER_HOST'] + ":" + str(app.config['SERVER_PORT']) + app.config['HOST_STATIC_FILES_ENDPOINT'] = app.config['HOST_ENDPOINT'] + +def setup_controller(): + global controller + read_settings(app) + env = Environment(loader=PackageLoader('main', 'view/templates')) + controller = Wikilibras(app.config, env) + +def setup_static_files_service(app): + if not app.config['APACHE_HOST']: + CORS(app) + @app.route("/") + def send_static_files(path): + root_dir = os.path.abspath(os.path.dirname(__file__)) + file_dir = os.path.join(root_dir, "view") + return send_from_directory(file_dir, path) + +def run(): + app.run(host=app.config['SERVER_HOST'], port=app.config['SERVER_PORT']) + +setup_controller() +setup_static_files_service(app) + +if __name__ == '__main__': + try: + run() + except: + pyutil.print_stack_trace() + raise diff --git a/wikilibrasV2/pyutil.py b/wikilibrasV2/pyutil.py new file mode 100755 index 0000000..d8598d1 --- /dev/null +++ b/wikilibrasV2/pyutil.py @@ -0,0 +1,68 @@ +# -*- coding: UTF-8 -*- + +import datetime +import logging +import os +import shutil +import sys + +# @def funcao para obter data e hora atual do sistema +# @param string formato de data e hora +# @return string retorna data e hora do sistema no momento da chamada +def getTimeStamp(date_fmt="%Y-%m-%d %H:%M:%S.%f"): + if ("%f" in date_fmt): + # [:-3] remove 3 casas decimais dos milisegundos (ms) + return datetime.datetime.now().strftime(date_fmt)[:-3] + else: + return datetime.datetime.now().strftime(date_fmt) + +# @def funcao para gravar log dos eventos em arquivo +# @param string mensagem a ser salva +# @param int indice do tipo de log 0: apenas print, 1: debug, 2: info, 3: warn, 4: error, 5: critical +# @param string caminho completo do arquivo de logs +# @param string formato de tempo utilizado +# @return none +def log(msg="", log_level=2, log_file="events.log"): + dict_level = { + 0: ["Print", None, None], + 1: ["DEBUG", logging.DEBUG, logging.debug], + 2: ["INFO", logging.INFO, logging.info], + 3: ["WARNING", logging.WARN, logging.warn], + 4: ["ERROR", logging.ERROR, logging.error], + 5: ["CRITICAL", logging.CRITICAL, logging.critical] + } + # log_format = "[%(asctime)s.%(msecs).03d] %(levelname)s: : %(message)s" + log_format = "[%(asctime)s.%(msecs).03d] %(levelname)s: %(message)s" + date_fmt = "%Y-%m-%d %H:%M:%S" + logging.basicConfig(filename=log_file, datefmt=date_fmt, format=log_format, level=dict_level[log_level][1]) + logging.Formatter(fmt="%(asctime)s", datefmt=date_fmt) + log_level %= len(dict_level) + write_mode = dict_level[log_level][2] + print("[%s] %s: %s" % (getTimeStamp(), dict_level[log_level][0], msg)) + if (write_mode != None): + write_mode(msg) + return + +# @def funcao para exibir excecao +# @param string deve ser passado: "__file__" para identificar em qual modulo ocorreu a excecao +# @return int retorna 1 +def print_stack_trace(): + error = "\n File name: %s\n Function name: %s\n Line code: %s\n Type exception: %s\n Message: %s" % ( + os.path.basename(sys.exc_info()[2].tb_frame.f_code.co_filename), + sys.exc_info()[2].tb_frame.f_code.co_name, + sys.exc_info()[2].tb_lineno, + sys.exc_info()[0].__name__, + sys.exc_info()[1] + ) + log(error, 4) + return 1 + +def get_date_now(): + return datetime.datetime.now().strftime('%Y-%m-%dT%H:%M:%S') + +def is_int(string): + try: + int(string) + return True + except ValueError: + return False diff --git a/wikilibrasV2/requirements.txt b/wikilibrasV2/requirements.txt new file mode 100755 index 0000000..241ea2a --- /dev/null +++ b/wikilibrasV2/requirements.txt @@ -0,0 +1,4 @@ +Flask==0.9 +pybossa-client +flask-cors +requests >= 1.2 diff --git a/wikilibrasV2/settings_local.py.tmpl b/wikilibrasV2/settings_local.py.tmpl new file mode 100755 index 0000000..4e3cc75 --- /dev/null +++ b/wikilibrasV2/settings_local.py.tmpl @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- + +# WikiLibras Server Configuration +SERVER_HOST = "localhost" +SERVER_PORT = 8003 +AGREEMENT_NUMBER = 2 +API_HOST = "http://localhost:201" +API_DB_HOST = "http://localhost:200" +HOMEPAGE_URL = "http://localhost" + +# Apache Configuration +APACHE_HOST = True +APACHE_HOST_ENDPOINT = "/wikilibras-backend" +APACHE_STATIC_FILES_ENDPOINT = "/wikilibras" + +# PyBossa Configuration +PYBOSSA_APP_NAME = "WikiLibras" +PYBOSSA_APP_SHORT_NAME = "wikilibras" +PYBOSSA_APP_DESCRIPTION = "Esse projeto possibilitará que voluntários contribuam na expansão de um dicionário de LIBRAS, desenvolvido para promover o inclusão e acessibilidade nos meios digitais atravé do VLIBRAS." +PYBOSSA_ENDPOINT = "http://localhost/pybossa" +PYBOSSA_API_KEY = "my-api-key" \ No newline at end of file diff --git a/wikilibrasV2/view/conf/selection-workflow-json b/wikilibrasV2/view/conf/selection-workflow-json new file mode 100755 index 0000000..4754d70 --- /dev/null +++ b/wikilibrasV2/view/conf/selection-workflow-json @@ -0,0 +1,39 @@ +{ + "facial" : { + "expressao" : ["passo-1"], + "transicao" : ["passo-1"], + "duracao" : ["passo-1"] + }, + "hand" : { + "movimento" : { + "pontual" : { + "articulacao" : ["passo-1", "passo-2"], + "configuracao" : ["passo-1", "passo-2"], + "orientacao" : ["passo-1"] + }, + "retilineo" : { + "articulacao-retilineo": ["passo-1", "passo-2", "passo-3", "passo-4"], + "configuracao-retilineo": ["passo-1", "passo-2", "passo-3", "passo-4"], + "orientacao-retilineo": ["passo-1", "passo-2"] + }, + "circular" : { + "articulacao" : ["passo-1", "passo-2"], + "configuracao" : ["passo-1", "passo-2"], + "orientacao" : ["passo-1"], + "plano": ["passo-1"], + "raio" : ["passo-1"], + "velocidade" : ["passo-1"], + "sentido_inverso" : ["passo-1"] + }, + "semicircular" : { + "articulacao" : ["passo-1", "passo-2"], + "configuracao" : ["passo-1", "passo-2"], + "orientacao" : ["passo-1"], + "plano": ["passo-1"], + "raio" : ["passo-1"], + "velocidade" : ["passo-1"], + "sentido_inverso" : ["passo-1"] + } + } + } +} \ No newline at end of file diff --git a/wikilibrasV2/view/css/articulation.css b/wikilibrasV2/view/css/articulation.css new file mode 100755 index 0000000..7c963e5 --- /dev/null +++ b/wikilibrasV2/view/css/articulation.css @@ -0,0 +1,110 @@ +.gray-background { + background-repeat: no-repeat; + background-size: 67% 95%, 100% 100%; + min-width: 285px; + min-height: 361px +} + +.selection-panel-body[mainConfig=right-hand] .gray-front-avatar { + background-image: url(../img/pa/gray-front-avatar.png), url(../img/pa/default-base.png); + background-position: 105px 15px, 0 0; +} + +.selection-panel-body[mainConfig=left-hand] .gray-front-avatar { + background-image: url(../img/pa/gray-front-avatar.png), url(../img/pa/default-base.png); + background-position: 2px 15px, 0 0; +} + +.gray-side-avatar { + background-image: url(../img/pa/gray-side-avatar.png), url(../img/pa/default-base.png); + background-position: center 15px, 0 0; +} + +.module-x-y { + display: none +} + +.module-x-y.active { + display: block +} + +.grid { + position: relative +} + +.grid .grid-selectors { + width: 315px; + height: 361px; + margin: 5%; + margin-left: 3%; + z-index: 10 +} + +.selection-panel-body[mainConfig=right-hand] .grid .grid-selectors .grid-row { + height: 10%; + padding-top: 4%; + text-align: justify; + z-index: 20 +} + +.selection-panel-body[mainConfig=left-hand] .grid .grid-selectors .grid-row { + height: 10%; + padding-top: 4%; + margin-left: 13%; + text-align: justify; + z-index: 20 +} + +.grid .grid-selectors .grid-row .ball-selector { + background-color: #A0D0E8; + border-radius: 50%; + z-index: 100; + width: 10px; + height: 10px; + display: inline-block; + margin-right: 3.3%; + float: left; +} + +.grid .grid-selectors .grid-row .ball-selector .point-selector { + margin-left: -.5px; + margin-top: -7.5px +} + +.grid .avatar-base { + position: absolute; + width: 100%; + height: 100%; + z-index: 0; + top: 0; + left: 0 +} + +.grid .grid-selectors .grid-row .ball-selector.active, +.grid .grid-selectors .grid-row .ball-selector:hover { + box-shadow: 0 0 10px #fff +} + +.grid .grid-selectors .grid-row .ball-selector:hover { + cursor: pointer +} + +.actions .btn { + margin-top: 15px +} + +.selection-panel-body[mainConfig=right-hand] .module-z .grid-selectors .grid-row, +.selection-panel-body[mainConfig=left-hand] .module-z .grid-selectors .grid-row { + margin-right: 58%; + padding-top: 0%; + height: 8% +} + +.module-z .grid-selectors .grid-row .ball-selector { + float: right; + margin-right: 15% +} + +.module-z .grid-selectors .grid-row .ball-selector:nth-last-of-type(1) { + margin-right: 15% +} \ No newline at end of file diff --git a/wikilibrasV2/view/css/main.css b/wikilibrasV2/view/css/main.css new file mode 100755 index 0000000..249fa7c --- /dev/null +++ b/wikilibrasV2/view/css/main.css @@ -0,0 +1,571 @@ +@import url("articulation.css"); +@import url("submit-sign.css"); +@import url("teached-signs.css"); +@import url("ranking.css"); +@import url("tutorial.css"); + +/* Main */ +body nav.navbar:first-child { + display: none; +} + +.navbar-wl .navbar-nav { + padding-left: 60px; +} + +footer { + display: none; +} + +@font-face { + font-family: 'Titillium Web'; + src: url('../fonts/titilliumweb/TitilliumWeb-SemiBold.ttf') format('truetype'); +} + +h1, h2, h3, h4, h5, h6, h7, h8 { + color: #4e7ebf; + font-family: 'Titillium Web', sans-serif; +} + +body { + background: -webkit-linear-gradient(left, #92bbe5, #ddeeff, #92bbe5); + background: -o-linear-gradient(right, #92bbe5, #ddeeff, #92bbe5); + background: -moz-linear-gradient(right, #92bbe5, #ddeeff, #92bbe5); + background: linear-gradient(to right, #92bbe5, #ddeeff, #92bbe5); +} + +/* Nav-bar */ +.wl-logo { + position: fixed; + top: 8px; + z-index: 9999; +} + +.wl-logo img { + width: 80px; + height: 80px; +} + +.navbar-wl { + z-index: 9998; + position: fixed; + top: 0; + width: 100%; + margin: 0; + left: 0; + background-color: rgba(43, 40, 41, 0.95); + opacity: 0.95; +} + +.navbar-wl .navbar-collapse.in .nav { + padding-top: 35px; +} + +.navbar-default .navbar-nav>li>a { + color: #ffffff; +} + +@media screen and (max-width: 768px) { + .navbar-default .navbar-nav .open .dropdown-menu>li>a { + color: #ffffff; + } +} + +.col-centered { + display: block; + float: none; + margin: 0px auto; +} + +.btn-default { + background-color: #8a76e7; + border-radius: 5px; + border-bottom-color: #6958b4; + border-bottom-width: 3px; + border-bottom-style: solid; + font-weight: bold; +} + +.btn-default.disabled { + border-bottom-color: #697284; + border-bottom-width: 3px; + border-bottom-style: solid; +} + +.icon_container { + cursor: default; + padding: 0px; + z-index: 1000; +} + +.icon_container:hover { + cursor: pointer; +} + +#main-container { + padding-top: 42px; +} + +#main-container .modal { + top: 80px; +} + +#main-container .tutorial-info { + margin-top: 0px; +} + + +.sub-main-container { + display: none; +} + +#teach-container { + display: block; +} + +#initial-screen { + display: none; + padding-top: 40px; +} + +#configuration-screen { + display: none; +} + +#render-screen { + display: none; +} + +#thanks-screen { + display: none; +} + +.video-body-main { + height: 100%; + width: 100%; +} + +.video-border { + border-style: solid; + border-color: #b1cdeb; + border-radius: 5px; + border-width: 5px; +} + +/* Reference Video */ +#maximize-icon-container { + display: none; +} + +#ref-video-container { + padding: 0px 10px 0px 0px; +} + +#ref-video-panel { + display: inline-block; + padding: 0px 0px 50px 0px; +} + +.ref-video { + background-color: #000000; +} + +#initial-screen .ref-video { + max-height: 350px; +} + +#configuration-screen .ref-video { + max-height: 250px; +} + +/* Avatar Container */ +#avatar-facial { + display: none; +} + +#avatar-right-hand { + display: none; +} + +#avatar-left-hand { + display: none; +} + +#avatar-body-face { + position: absolute; + left: 277px; + z-index: 1000; +} + +#avatar-body-right-hand { + position: absolute; + top: 270px; + left: 115px; + z-index: 1000; + left: 115px; +} + +#avatar-body-left-hand { + position: absolute; + top: 270px; + left: 427px; + z-index: 1000; + left: 427px; +} + +#facial-edit { + top: 110px; + left: 410px; +} + +#right-hand-edit { + top: 465px; + left: 140px; +} + +#left-hand-edit { + top: 465px; + left: 470px; +} + +.edit-container { + position: relative; + float: left; + width: 0px; + z-index: 1000; +} + +#avatar-container .check-icon { + display: none; + padding-bottom: 10px; +} + +#avatar-container { + overflow: hidden; +} + +.avatar-container-zoom-in { + height: 610px; +} + +.avatar-img { + height: 100%; + -webkit-transition: width 1.5s ease-in-out, height 1.5s ease-in-out; + -moz-transition: width 1.5s ease-in-out, height 1.5s ease-in-out; + -o-transition: width 1.5s ease-in-out, height 1.5s ease-in-out; + -ms-transition: width 1.5s ease-in-out, height 1.5s ease-in-out; + transition: width 1.5s ease-in-out, height 1.5s ease-in-out; + -webkit-transition: width 1.5s ease-in-out, height 1.5s ease-in-out; +} + +.avatar-img-zoom-in { + position: relative; + height: 150%; + left: -35px; +} + +.avatar-img-zoom-out { + display: block; + position: relative; + height: 100%; + left: 0px; + margin-left: 103px; +} + +.avatar-facial-img-zoom-in { + position: relative; + height: 110%; + left: -35px; +} + +.avatar-right-hand-img-zoom-in { + position: relative; + height: 115%; + left: -27px; +} + +.avatar-left-hand-img-zoom-in { + position: relative; + height: 115%; + left: -27px; +} + +/* Configuration Panel */ +#configuration-menu { + background-color: #556575; + border-style: solid; + border-color: #9cbfe3; + border-radius: 6px; + border-width: 2px; + padding: 10px 10px 5px 5px; +} + +.configuration-menu-label { + color: #FFFFFF; + font-family: 'Titillium Web', sans-serif; + font-size: 14px; +} + +/* Selection Panel */ +#selection-panel { + display: none; +} + +#facial-selection { + display: none; +} + +#ready-button { + position: relative; + top: -80px; +} + +.panel-header { + padding: 5px 0px 10px 3px; +} + +.selection-panel-body { + position: relative; + border-radius: 5px; + overflow-y: initial !important; + width: 360px; + overflow-y: scroll; + max-height: 100%; + padding: 8px; + background-color: rgba(79, 98, 117, 0.1); + margin-bottom: 10px; +} + +.selection-panel-inner-body { + height: 430px; + overflow-y: auto; + padding: 5px; +} + +.x { + position: absolute; + right: 0px; + top: -15px; + width: 35px; + height: 35px; + border-radius: 100%; + content: ""; + z-index: 1000; +} + +.x::before, .x::after { + position: absolute; + top: 14px; + left: 7px; + width: 20px; + height: 5px; + content: ""; + background-color: #ffffff; +} + +.x::before { + -ms-transform: rotate(-45deg); + -webkit-transform: rotate(-45deg); + transform: rotate(-45deg); +} + +.x::after { + -ms-transform: rotate(45deg); + -webkit-transform: rotate(45deg); + transform: rotate(45deg); +} + +ul.rig { + list-style: none; + text-align: center; + margin-left: -15%; +} + +ul.rig li { + display: inline-block; + list-style-type: circle; + margin: 1%; + vertical-align: middle; +} + +ul.rig.columns-2 li { + width: 45%; + font-size: 17px; +} + +ul.rig.columns-3 li { + width: 30%; +} + +ul.rig.columns-4 li { + width: 20%; +} + +.selection-panel-body[mainconfig=right-hand] ul.rig.columns-1 li, + .selection-panel-body[mainconfig=left-hand] ul.rig.columns-1 li { + width: 60%; +} + +.box-panel-option, .video-panel-option { + max-width: 100%; + border-radius: 5px; + border: 3px solid #80A8D2; + box-sizing: border-box; + -moz-box-sizing: border-box; + -webkit-box-sizing: border-box; + background-color: #c1c9d0; + cursor: pointer; +} + +.box-panel-option:hover, .box-panel-option[select=true], + .video-panel-option[select=true], .video-panel-option-hover { + border-color: #9678b0; +} + +.box-panel-option { + border-color: #80A8D2; +} + +/* Facial Expression Configuration */ +#facial-expression { + display: none; +} + +#facial-expression-velocity { + display: none; +} + +#facial-expression-duration { + display: none; +} + +.single-column-option-container .video-panel-option { + height: 100px; +} + +.single-column-option-container { + padding-bottom: 20px; +} + +.single-column-option { + display: inline-block; + vertical-align: middle; + padding-right: 25px; +} + +/* Sub-Configuration Panel */ +.subconfiguration-options { + overflow-x: scroll; + white-space: nowrap; +} + +.subconfiguration-options-container { + height: 45px; + overflow: hidden; +} + +.subconfiguration-panel { + display: none; + padding: 10px; + margin-top: 10px; + margin-bottom: 10px; + background-color: #c1d5e8; + border: solid 3px rgba(128, 168, 210, 0.75); + border-radius: 5px; +} + +.subconfiguration-options .icon_container[active=false] { + display: none; +} + +.subconfiguration-options .icon_container[active=true] { + display: inline-block; +} + +.subconfiguration-options .icon_container { + display: inline-block; + padding-left: 8px; + padding-right: 8px; +} + +.arrow { + padding-top: 5px; +} + +.arrow[name=right-arrow] { + padding-left: 10px; +} + +/* Hand Configuration */ +.rectilinear-point-label { + font-weight: bold; + color: #000000; +} + +/* Render Screen */ +#render-avatar { + display: none; +} + +#render-main { + height: 542px; +} + +#render-screen .col-sm-12 { + padding-left: 0px; +} + +#render-loading { + display: none; +} + +#loading-container { + position: relative; + height: 407px; +} + +#render-loading img { + width: 100px; + height: 100px; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + margin: auto; +} + +#render-ref video { + height: 407px; +} + +#approval-msg { + display: none; + margin: 0px; + padding-left: 14px; +} + +/* Thanks Screen */ +#thanks-screen h3 { + margin-bottom: 0px; +} + +#thanks-screen img { + width: 100%; +} + +#thanks-screen a { + text-decoration: underline; +} + +#completed-all-task-msg { + display: none; +} + +#completed-task-msg h6 { + margin: 0px 0px 60px 0px; +} + +#completed-all-task-msg h6 { + margin: 0px 0px 10px 0px; +} diff --git a/wikilibrasV2/view/css/ranking.css b/wikilibrasV2/view/css/ranking.css new file mode 100755 index 0000000..7029c16 --- /dev/null +++ b/wikilibrasV2/view/css/ranking.css @@ -0,0 +1,121 @@ +@font-face { + font-family: 'Roboto'; + src: url('../fonts/roboto/Roboto-Light.ttf') format('truetype'); +} + +#ranking-container { + background-color: #ffffff; + border-radius: 5px; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; + padding-right: 0px; + overflow: hidden; + font-family: 'Roboto'; +} + +#ranking-info-container { + padding-left: 0px; +} + +#ranking-info-container .title { + color: #000000; + font-size: 50px; +} + +#ranking-info-container .avatar-info { + text-align: center; + padding-top: 30px; +} + +#ranking-info-container .avatar-container { + display: none; +} + +#ranking-info-container .avatar-info img { + width: 100%; +} + +#ranking-info-container .achievement-info { + color: #028c12; +} + +#ranking-info-container .progress-container { + padding-left: 100px; + margin-top: 10px; +} + +#ranking-info-container .achievements-container { + position: relative; + padding: 10px 0px 0px 0px; + word-wrap: break-word; +} + +#ranking-info-container .progress-label { + position: absolute; + left: 0px; +} + +#ranking-info-container .done-tasks { + color: #84DC76; +} + +#ranking-info-container .total-tasks { + color: #f0ad4e; +} + +#ranking-info-container .tooltip-inner { + font-size: 16px; + max-width: 220px; +} + +#leaderboard-container { + background-color: #fefcfc; + padding: 0px; + min-height: 560px; +} + +#leaderboard-container table { + margin-bottom: 0px; +} + +#leaderboard-container .table-striped>tbody>tr:nth-of-type(odd) { + background-color: #f1f2f2; +} + +#leaderboard-container .table-striped>tbody>tr:hover { + background-color: #e0e0e0; +} + +#leaderboard-container .table-striped>tbody>tr.highlight { + background-color: #fbefa3; +} + +#leaderboard-container .table-striped>tbody>tr.highlight:hover { + background-color: #f7e783; +} + +#leaderboard-container th { + text-align: center; + border: 0px; + padding-bottom: 15px; +} + +#leaderboard-container td { + text-align: center; + border: 0px; +} + +#leaderboard-container td:nth-of-type(1), #leaderboard-container td:nth-of-type(2) + { + width: 75px; +} + +#leaderboard-container td:nth-of-type(2), #leaderboard-container th:nth-of-type(2), + #leaderboard-container td:nth-of-type(3), #leaderboard-container th:nth-of-type(3) + { + text-align: left; +} + +#leaderboard-container th:nth-of-type(3) img { + padding-left: 20px; +} \ No newline at end of file diff --git a/wikilibrasV2/view/css/submit-sign.css b/wikilibrasV2/view/css/submit-sign.css new file mode 100755 index 0000000..962e664 --- /dev/null +++ b/wikilibrasV2/view/css/submit-sign.css @@ -0,0 +1,38 @@ +.submit-sign-form { + background-color: #556575; + color: #FFFFFF; + padding: 30px; + border-radius: 6px; + margin-bottom: 20px; +} + +.submit-sign-form .btn { + margin-left: 7px; +} + +#upload-progress-container { + display: none; + padding-top: 15px; +} + +#upload-progress { + margin-bottom: 0px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, .1); +} + +#submit-sign-container h2 { + margin-top: 0px; +} + +#upload-success-msg { + display: none; +} + +.radio-inline .wl-national-sign-radio { + margin-top: 12px; +} + +#input-state-container, #input-city-container { + display: none; +} diff --git a/wikilibrasV2/view/css/teached-signs.css b/wikilibrasV2/view/css/teached-signs.css new file mode 100755 index 0000000..ef6ff7b --- /dev/null +++ b/wikilibrasV2/view/css/teached-signs.css @@ -0,0 +1,32 @@ +#teached-signs-container .teached-signs-msg[type=one] { + display: none; +} + +#teached-signs-container .teached-signs-msg[type=more] { + display: none; +} + +#teached-signs-container .col-btn { + padding-right: 5px; + margin-bottom: 10px; +} + +#teached-signs-container .modal-xlg { + width: 100%; +} + +#teached-signs-container .modal-content { + background: none; + border: none; + box-shadow: none; +} + +#teached-sign-name { + color: #ffffff; + font-weight: bold; +} + +#teached-sign-video-container video { + height: 100%; + width: 100%; +} \ No newline at end of file diff --git a/wikilibrasV2/view/css/tutorial.css b/wikilibrasV2/view/css/tutorial.css new file mode 100755 index 0000000..3376321 --- /dev/null +++ b/wikilibrasV2/view/css/tutorial.css @@ -0,0 +1,3 @@ +#tutorial-container .modal-title { + color: #34495e; +} \ No newline at end of file diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Black.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Black.ttf new file mode 100755 index 0000000..fbde625 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Black.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-BlackItalic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-BlackItalic.ttf new file mode 100755 index 0000000..60f7782 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-BlackItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Bold.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Bold.ttf new file mode 100755 index 0000000..a355c27 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Bold.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-BoldItalic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-BoldItalic.ttf new file mode 100755 index 0000000..3c9a7a3 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-BoldItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Italic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Italic.ttf new file mode 100755 index 0000000..ff6046d Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Italic.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Light.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Light.ttf new file mode 100755 index 0000000..94c6bcc Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Light.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-LightItalic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-LightItalic.ttf new file mode 100755 index 0000000..04cc002 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-LightItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Medium.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Medium.ttf new file mode 100755 index 0000000..39c63d7 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Medium.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-MediumItalic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-MediumItalic.ttf new file mode 100755 index 0000000..dc743f0 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-MediumItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Regular.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Regular.ttf new file mode 100755 index 0000000..8c082c8 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Regular.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-Thin.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-Thin.ttf new file mode 100755 index 0000000..d695550 Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-Thin.ttf differ diff --git a/wikilibrasV2/view/fonts/roboto/Roboto-ThinItalic.ttf b/wikilibrasV2/view/fonts/roboto/Roboto-ThinItalic.ttf new file mode 100755 index 0000000..07172ff Binary files /dev/null and b/wikilibrasV2/view/fonts/roboto/Roboto-ThinItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Black.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Black.ttf new file mode 100755 index 0000000..fc5c4b5 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Black.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Bold.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Bold.ttf new file mode 100755 index 0000000..0af0fe7 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Bold.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-BoldItalic.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-BoldItalic.ttf new file mode 100755 index 0000000..77425ea Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-BoldItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLight.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLight.ttf new file mode 100755 index 0000000..2b506ef Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLight.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLightItalic.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLightItalic.ttf new file mode 100755 index 0000000..c1be5ba Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-ExtraLightItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Italic.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Italic.ttf new file mode 100755 index 0000000..42f2c10 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Italic.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Light.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Light.ttf new file mode 100755 index 0000000..ca67971 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Light.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-LightItalic.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-LightItalic.ttf new file mode 100755 index 0000000..2ea724f Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-LightItalic.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Regular.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Regular.ttf new file mode 100755 index 0000000..6da8219 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-Regular.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf new file mode 100755 index 0000000..dfdcdbe Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBold.ttf differ diff --git a/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBoldItalic.ttf b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBoldItalic.ttf new file mode 100755 index 0000000..b68a669 Binary files /dev/null and b/wikilibrasV2/view/fonts/titilliumweb/TitilliumWeb-SemiBoldItalic.ttf differ diff --git a/wikilibrasV2/view/img/avatar-facial-icon-check.png b/wikilibrasV2/view/img/avatar-facial-icon-check.png new file mode 100755 index 0000000..be269b5 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-facial-icon-check.png differ diff --git a/wikilibrasV2/view/img/avatar-facial-icon-hover.png b/wikilibrasV2/view/img/avatar-facial-icon-hover.png new file mode 100755 index 0000000..bd03502 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-facial-icon-hover.png differ diff --git a/wikilibrasV2/view/img/avatar-facial-icon.png b/wikilibrasV2/view/img/avatar-facial-icon.png new file mode 100755 index 0000000..8a22bd4 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-facial-icon.png differ diff --git a/wikilibrasV2/view/img/avatar-facial.png b/wikilibrasV2/view/img/avatar-facial.png new file mode 100755 index 0000000..b38c44e Binary files /dev/null and b/wikilibrasV2/view/img/avatar-facial.png differ diff --git a/wikilibrasV2/view/img/avatar-left-hand-icon-check.png b/wikilibrasV2/view/img/avatar-left-hand-icon-check.png new file mode 100755 index 0000000..0dfdb08 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-left-hand-icon-check.png differ diff --git a/wikilibrasV2/view/img/avatar-left-hand-icon-hover.png b/wikilibrasV2/view/img/avatar-left-hand-icon-hover.png new file mode 100755 index 0000000..9eb3d80 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-left-hand-icon-hover.png differ diff --git a/wikilibrasV2/view/img/avatar-left-hand-icon.png b/wikilibrasV2/view/img/avatar-left-hand-icon.png new file mode 100755 index 0000000..fae96c4 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-left-hand-icon.png differ diff --git a/wikilibrasV2/view/img/avatar-left-hand.png b/wikilibrasV2/view/img/avatar-left-hand.png new file mode 100755 index 0000000..37c48d6 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-left-hand.png differ diff --git a/wikilibrasV2/view/img/avatar-right-hand-icon-check.png b/wikilibrasV2/view/img/avatar-right-hand-icon-check.png new file mode 100755 index 0000000..3ad5eea Binary files /dev/null and b/wikilibrasV2/view/img/avatar-right-hand-icon-check.png differ diff --git a/wikilibrasV2/view/img/avatar-right-hand-icon-hover.png b/wikilibrasV2/view/img/avatar-right-hand-icon-hover.png new file mode 100755 index 0000000..83a64f6 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-right-hand-icon-hover.png differ diff --git a/wikilibrasV2/view/img/avatar-right-hand-icon.png b/wikilibrasV2/view/img/avatar-right-hand-icon.png new file mode 100755 index 0000000..040f932 Binary files /dev/null and b/wikilibrasV2/view/img/avatar-right-hand-icon.png differ diff --git a/wikilibrasV2/view/img/avatar-right-hand.png b/wikilibrasV2/view/img/avatar-right-hand.png new file mode 100755 index 0000000..7f636ce Binary files /dev/null and b/wikilibrasV2/view/img/avatar-right-hand.png differ diff --git a/wikilibrasV2/view/img/avatar-thanks.png b/wikilibrasV2/view/img/avatar-thanks.png new file mode 100755 index 0000000..0c77d7c Binary files /dev/null and b/wikilibrasV2/view/img/avatar-thanks.png differ diff --git a/wikilibrasV2/view/img/avatar.png b/wikilibrasV2/view/img/avatar.png new file mode 100755 index 0000000..dd24392 Binary files /dev/null and b/wikilibrasV2/view/img/avatar.png differ diff --git a/wikilibrasV2/view/img/big-edit-icon-hover.png b/wikilibrasV2/view/img/big-edit-icon-hover.png new file mode 100755 index 0000000..64e35ac Binary files /dev/null and b/wikilibrasV2/view/img/big-edit-icon-hover.png differ diff --git a/wikilibrasV2/view/img/big-edit-icon.png b/wikilibrasV2/view/img/big-edit-icon.png new file mode 100755 index 0000000..81ae3da Binary files /dev/null and b/wikilibrasV2/view/img/big-edit-icon.png differ diff --git a/wikilibrasV2/view/img/check-icon.png b/wikilibrasV2/view/img/check-icon.png new file mode 100755 index 0000000..093a578 Binary files /dev/null and b/wikilibrasV2/view/img/check-icon.png differ diff --git a/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.mp4 b/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.mp4 new file mode 100755 index 0000000..c9a8094 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.webm b/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.webm new file mode 100755 index 0000000..f1e8a52 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-baixo-esquerda.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-baixo-tras.mp4 b/wikilibrasV2/view/img/circular/md/plano-baixo-tras.mp4 new file mode 100755 index 0000000..97fd5b9 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-baixo-tras.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-baixo-tras.webm b/wikilibrasV2/view/img/circular/md/plano-baixo-tras.webm new file mode 100755 index 0000000..b6e0069 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-baixo-tras.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-cima-direita.mp4 b/wikilibrasV2/view/img/circular/md/plano-cima-direita.mp4 new file mode 100755 index 0000000..8eca7c7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-cima-direita.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-cima-direita.webm b/wikilibrasV2/view/img/circular/md/plano-cima-direita.webm new file mode 100755 index 0000000..7126d50 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-cima-direita.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-cima-frente.mp4 b/wikilibrasV2/view/img/circular/md/plano-cima-frente.mp4 new file mode 100755 index 0000000..86671c9 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-cima-frente.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-cima-frente.webm b/wikilibrasV2/view/img/circular/md/plano-cima-frente.webm new file mode 100755 index 0000000..5e75ad7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-cima-frente.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-direita-baixo.mp4 b/wikilibrasV2/view/img/circular/md/plano-direita-baixo.mp4 new file mode 100755 index 0000000..53be78f Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-direita-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-direita-baixo.webm b/wikilibrasV2/view/img/circular/md/plano-direita-baixo.webm new file mode 100755 index 0000000..d189aac Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-direita-baixo.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-direita-tras.mp4 b/wikilibrasV2/view/img/circular/md/plano-direita-tras.mp4 new file mode 100755 index 0000000..597762a Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-direita-tras.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-direita-tras.webm b/wikilibrasV2/view/img/circular/md/plano-direita-tras.webm new file mode 100755 index 0000000..3da359c Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-direita-tras.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.mp4 b/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.mp4 new file mode 100755 index 0000000..069c33a Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.webm b/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.webm new file mode 100755 index 0000000..72b95f3 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-esquerda-cima.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.mp4 b/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.mp4 new file mode 100755 index 0000000..060a1db Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.webm b/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.webm new file mode 100755 index 0000000..80a8fc7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-esquerda-frente.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-frente-baixo.mp4 b/wikilibrasV2/view/img/circular/md/plano-frente-baixo.mp4 new file mode 100755 index 0000000..45c76fc Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-frente-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-frente-baixo.webm b/wikilibrasV2/view/img/circular/md/plano-frente-baixo.webm new file mode 100755 index 0000000..dc7659f Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-frente-baixo.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-frente-direita.mp4 b/wikilibrasV2/view/img/circular/md/plano-frente-direita.mp4 new file mode 100755 index 0000000..ebe378b Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-frente-direita.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-frente-direita.webm b/wikilibrasV2/view/img/circular/md/plano-frente-direita.webm new file mode 100755 index 0000000..0631cc2 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-frente-direita.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-tras-cima.mp4 b/wikilibrasV2/view/img/circular/md/plano-tras-cima.mp4 new file mode 100755 index 0000000..3dc6b91 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-tras-cima.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-tras-cima.webm b/wikilibrasV2/view/img/circular/md/plano-tras-cima.webm new file mode 100755 index 0000000..28231d4 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-tras-cima.webm differ diff --git a/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.mp4 b/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.mp4 new file mode 100755 index 0000000..92ff0fa Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.webm b/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.webm new file mode 100755 index 0000000..ea255ec Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/plano-tras-esquerda.webm differ diff --git a/wikilibrasV2/view/img/circular/md/raio-grande.mp4 b/wikilibrasV2/view/img/circular/md/raio-grande.mp4 new file mode 100755 index 0000000..757ad41 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-grande.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/raio-grande.webm b/wikilibrasV2/view/img/circular/md/raio-grande.webm new file mode 100755 index 0000000..2eb2738 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-grande.webm differ diff --git a/wikilibrasV2/view/img/circular/md/raio-normal.mp4 b/wikilibrasV2/view/img/circular/md/raio-normal.mp4 new file mode 100755 index 0000000..0f7a1a8 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-normal.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/raio-normal.webm b/wikilibrasV2/view/img/circular/md/raio-normal.webm new file mode 100755 index 0000000..89057c7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-normal.webm differ diff --git a/wikilibrasV2/view/img/circular/md/raio-pequeno.mp4 b/wikilibrasV2/view/img/circular/md/raio-pequeno.mp4 new file mode 100755 index 0000000..bc384ff Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-pequeno.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/raio-pequeno.webm b/wikilibrasV2/view/img/circular/md/raio-pequeno.webm new file mode 100755 index 0000000..4f20bb2 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/raio-pequeno.webm differ diff --git a/wikilibrasV2/view/img/circular/md/sentido-anti-horario.mp4 b/wikilibrasV2/view/img/circular/md/sentido-anti-horario.mp4 new file mode 100755 index 0000000..5568da0 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/sentido-anti-horario.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/sentido-anti-horario.webm b/wikilibrasV2/view/img/circular/md/sentido-anti-horario.webm new file mode 100755 index 0000000..2eb2738 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/sentido-anti-horario.webm differ diff --git a/wikilibrasV2/view/img/circular/md/sentido-horario.mp4 b/wikilibrasV2/view/img/circular/md/sentido-horario.mp4 new file mode 100755 index 0000000..75fea8d Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/sentido-horario.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/sentido-horario.webm b/wikilibrasV2/view/img/circular/md/sentido-horario.webm new file mode 100755 index 0000000..3031d77 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/sentido-horario.webm differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-lento.mp4 b/wikilibrasV2/view/img/circular/md/velocidade-lento.mp4 new file mode 100755 index 0000000..035b952 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-lento.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-lento.webm b/wikilibrasV2/view/img/circular/md/velocidade-lento.webm new file mode 100755 index 0000000..b2c84f2 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-lento.webm differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-normal.mp4 b/wikilibrasV2/view/img/circular/md/velocidade-normal.mp4 new file mode 100755 index 0000000..99a9fd1 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-normal.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-normal.webm b/wikilibrasV2/view/img/circular/md/velocidade-normal.webm new file mode 100755 index 0000000..2eb2738 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-normal.webm differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-rapido.mp4 b/wikilibrasV2/view/img/circular/md/velocidade-rapido.mp4 new file mode 100755 index 0000000..6228d00 Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-rapido.mp4 differ diff --git a/wikilibrasV2/view/img/circular/md/velocidade-rapido.webm b/wikilibrasV2/view/img/circular/md/velocidade-rapido.webm new file mode 100755 index 0000000..e7968fd Binary files /dev/null and b/wikilibrasV2/view/img/circular/md/velocidade-rapido.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.mp4 b/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.mp4 new file mode 100755 index 0000000..fd66c9f Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.webm b/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.webm new file mode 100755 index 0000000..7f860f5 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-baixo-esquerda.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-baixo-tras.mp4 b/wikilibrasV2/view/img/circular/me/plano-baixo-tras.mp4 new file mode 100755 index 0000000..7636639 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-baixo-tras.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-baixo-tras.webm b/wikilibrasV2/view/img/circular/me/plano-baixo-tras.webm new file mode 100755 index 0000000..2568bc7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-baixo-tras.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-cima-direita.mp4 b/wikilibrasV2/view/img/circular/me/plano-cima-direita.mp4 new file mode 100755 index 0000000..cdcc4bb Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-cima-direita.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-cima-direita.webm b/wikilibrasV2/view/img/circular/me/plano-cima-direita.webm new file mode 100755 index 0000000..e8e45db Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-cima-direita.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-cima-frente.mp4 b/wikilibrasV2/view/img/circular/me/plano-cima-frente.mp4 new file mode 100755 index 0000000..cec003d Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-cima-frente.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-cima-frente.webm b/wikilibrasV2/view/img/circular/me/plano-cima-frente.webm new file mode 100755 index 0000000..bdfc58a Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-cima-frente.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-direita-baixo.mp4 b/wikilibrasV2/view/img/circular/me/plano-direita-baixo.mp4 new file mode 100755 index 0000000..d61ae29 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-direita-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-direita-baixo.webm b/wikilibrasV2/view/img/circular/me/plano-direita-baixo.webm new file mode 100755 index 0000000..034b7fb Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-direita-baixo.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-direita-tras.mp4 b/wikilibrasV2/view/img/circular/me/plano-direita-tras.mp4 new file mode 100755 index 0000000..eb027bf Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-direita-tras.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-direita-tras.webm b/wikilibrasV2/view/img/circular/me/plano-direita-tras.webm new file mode 100755 index 0000000..ad6fcd0 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-direita-tras.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.mp4 b/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.mp4 new file mode 100755 index 0000000..2e93b8b Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.webm b/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.webm new file mode 100755 index 0000000..29095c9 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-esquerda-cima.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.mp4 b/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.mp4 new file mode 100755 index 0000000..0070522 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.webm b/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.webm new file mode 100755 index 0000000..6b1a57e Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-esquerda-frente.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-frente-baixo.mp4 b/wikilibrasV2/view/img/circular/me/plano-frente-baixo.mp4 new file mode 100755 index 0000000..0e45518 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-frente-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-frente-baixo.webm b/wikilibrasV2/view/img/circular/me/plano-frente-baixo.webm new file mode 100755 index 0000000..fde4c01 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-frente-baixo.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-frente-direita.mp4 b/wikilibrasV2/view/img/circular/me/plano-frente-direita.mp4 new file mode 100755 index 0000000..9b18d7c Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-frente-direita.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-frente-direita.webm b/wikilibrasV2/view/img/circular/me/plano-frente-direita.webm new file mode 100755 index 0000000..0b83498 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-frente-direita.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-tras-cima.mp4 b/wikilibrasV2/view/img/circular/me/plano-tras-cima.mp4 new file mode 100755 index 0000000..b30f15c Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-tras-cima.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-tras-cima.webm b/wikilibrasV2/view/img/circular/me/plano-tras-cima.webm new file mode 100755 index 0000000..872e1e4 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-tras-cima.webm differ diff --git a/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.mp4 b/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.mp4 new file mode 100755 index 0000000..a29027d Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.webm b/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.webm new file mode 100755 index 0000000..fd8b4f0 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/plano-tras-esquerda.webm differ diff --git a/wikilibrasV2/view/img/circular/me/raio-grande.mp4 b/wikilibrasV2/view/img/circular/me/raio-grande.mp4 new file mode 100755 index 0000000..746944d Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-grande.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/raio-grande.webm b/wikilibrasV2/view/img/circular/me/raio-grande.webm new file mode 100755 index 0000000..cb23b8c Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-grande.webm differ diff --git a/wikilibrasV2/view/img/circular/me/raio-normal.mp4 b/wikilibrasV2/view/img/circular/me/raio-normal.mp4 new file mode 100755 index 0000000..443cfc7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-normal.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/raio-normal.webm b/wikilibrasV2/view/img/circular/me/raio-normal.webm new file mode 100755 index 0000000..90b1fb1 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-normal.webm differ diff --git a/wikilibrasV2/view/img/circular/me/raio-pequeno.mp4 b/wikilibrasV2/view/img/circular/me/raio-pequeno.mp4 new file mode 100755 index 0000000..46abea9 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-pequeno.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/raio-pequeno.webm b/wikilibrasV2/view/img/circular/me/raio-pequeno.webm new file mode 100755 index 0000000..624d696 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/raio-pequeno.webm differ diff --git a/wikilibrasV2/view/img/circular/me/sentido-anti-horario.mp4 b/wikilibrasV2/view/img/circular/me/sentido-anti-horario.mp4 new file mode 100755 index 0000000..841af08 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/sentido-anti-horario.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/sentido-anti-horario.webm b/wikilibrasV2/view/img/circular/me/sentido-anti-horario.webm new file mode 100755 index 0000000..cb23b8c Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/sentido-anti-horario.webm differ diff --git a/wikilibrasV2/view/img/circular/me/sentido-horario.mp4 b/wikilibrasV2/view/img/circular/me/sentido-horario.mp4 new file mode 100755 index 0000000..b7000d6 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/sentido-horario.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/sentido-horario.webm b/wikilibrasV2/view/img/circular/me/sentido-horario.webm new file mode 100755 index 0000000..2bd5849 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/sentido-horario.webm differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-lento.mp4 b/wikilibrasV2/view/img/circular/me/velocidade-lento.mp4 new file mode 100755 index 0000000..7d91975 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-lento.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-lento.webm b/wikilibrasV2/view/img/circular/me/velocidade-lento.webm new file mode 100755 index 0000000..b1867a7 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-lento.webm differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-normal.mp4 b/wikilibrasV2/view/img/circular/me/velocidade-normal.mp4 new file mode 100755 index 0000000..75fd1b9 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-normal.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-normal.webm b/wikilibrasV2/view/img/circular/me/velocidade-normal.webm new file mode 100755 index 0000000..cb23b8c Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-normal.webm differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-rapido.mp4 b/wikilibrasV2/view/img/circular/me/velocidade-rapido.mp4 new file mode 100755 index 0000000..21f1465 Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-rapido.mp4 differ diff --git a/wikilibrasV2/view/img/circular/me/velocidade-rapido.webm b/wikilibrasV2/view/img/circular/me/velocidade-rapido.webm new file mode 100755 index 0000000..5cb74fe Binary files /dev/null and b/wikilibrasV2/view/img/circular/me/velocidade-rapido.webm differ diff --git a/wikilibrasV2/view/img/cmd/0000.png b/wikilibrasV2/view/img/cmd/0000.png new file mode 100755 index 0000000..e03ec9c Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0000.png differ diff --git a/wikilibrasV2/view/img/cmd/0001.png b/wikilibrasV2/view/img/cmd/0001.png new file mode 100755 index 0000000..91de4e0 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0001.png differ diff --git a/wikilibrasV2/view/img/cmd/0002.png b/wikilibrasV2/view/img/cmd/0002.png new file mode 100755 index 0000000..1375ef5 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0002.png differ diff --git a/wikilibrasV2/view/img/cmd/0003.png b/wikilibrasV2/view/img/cmd/0003.png new file mode 100755 index 0000000..be1f095 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0003.png differ diff --git a/wikilibrasV2/view/img/cmd/0004.png b/wikilibrasV2/view/img/cmd/0004.png new file mode 100755 index 0000000..64050ed Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0004.png differ diff --git a/wikilibrasV2/view/img/cmd/0005.png b/wikilibrasV2/view/img/cmd/0005.png new file mode 100755 index 0000000..d108ced Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0005.png differ diff --git a/wikilibrasV2/view/img/cmd/0006.png b/wikilibrasV2/view/img/cmd/0006.png new file mode 100755 index 0000000..b3b760f Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0006.png differ diff --git a/wikilibrasV2/view/img/cmd/0007.png b/wikilibrasV2/view/img/cmd/0007.png new file mode 100755 index 0000000..432a010 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0007.png differ diff --git a/wikilibrasV2/view/img/cmd/0008.png b/wikilibrasV2/view/img/cmd/0008.png new file mode 100755 index 0000000..1477b56 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0008.png differ diff --git a/wikilibrasV2/view/img/cmd/0009.png b/wikilibrasV2/view/img/cmd/0009.png new file mode 100755 index 0000000..ab656f2 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0009.png differ diff --git a/wikilibrasV2/view/img/cmd/0010.png b/wikilibrasV2/view/img/cmd/0010.png new file mode 100755 index 0000000..009bdf4 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0010.png differ diff --git a/wikilibrasV2/view/img/cmd/0011.png b/wikilibrasV2/view/img/cmd/0011.png new file mode 100755 index 0000000..7341400 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0011.png differ diff --git a/wikilibrasV2/view/img/cmd/0012.png b/wikilibrasV2/view/img/cmd/0012.png new file mode 100755 index 0000000..818df79 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0012.png differ diff --git a/wikilibrasV2/view/img/cmd/0013.png b/wikilibrasV2/view/img/cmd/0013.png new file mode 100755 index 0000000..4ae57dc Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0013.png differ diff --git a/wikilibrasV2/view/img/cmd/0014.png b/wikilibrasV2/view/img/cmd/0014.png new file mode 100755 index 0000000..0fcc7f8 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0014.png differ diff --git a/wikilibrasV2/view/img/cmd/0015.png b/wikilibrasV2/view/img/cmd/0015.png new file mode 100755 index 0000000..afdc4ba Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0015.png differ diff --git a/wikilibrasV2/view/img/cmd/0016.png b/wikilibrasV2/view/img/cmd/0016.png new file mode 100755 index 0000000..5137068 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0016.png differ diff --git a/wikilibrasV2/view/img/cmd/0017.png b/wikilibrasV2/view/img/cmd/0017.png new file mode 100755 index 0000000..b5f53cd Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0017.png differ diff --git a/wikilibrasV2/view/img/cmd/0018.png b/wikilibrasV2/view/img/cmd/0018.png new file mode 100755 index 0000000..87bbaa9 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0018.png differ diff --git a/wikilibrasV2/view/img/cmd/0019.png b/wikilibrasV2/view/img/cmd/0019.png new file mode 100755 index 0000000..8e5a868 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0019.png differ diff --git a/wikilibrasV2/view/img/cmd/0020.png b/wikilibrasV2/view/img/cmd/0020.png new file mode 100755 index 0000000..0c83f2a Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0020.png differ diff --git a/wikilibrasV2/view/img/cmd/0021.png b/wikilibrasV2/view/img/cmd/0021.png new file mode 100755 index 0000000..1cf573f Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0021.png differ diff --git a/wikilibrasV2/view/img/cmd/0022.png b/wikilibrasV2/view/img/cmd/0022.png new file mode 100755 index 0000000..5be9298 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0022.png differ diff --git a/wikilibrasV2/view/img/cmd/0023.png b/wikilibrasV2/view/img/cmd/0023.png new file mode 100755 index 0000000..7232177 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0023.png differ diff --git a/wikilibrasV2/view/img/cmd/0024.png b/wikilibrasV2/view/img/cmd/0024.png new file mode 100755 index 0000000..e1a98e0 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0024.png differ diff --git a/wikilibrasV2/view/img/cmd/0025.png b/wikilibrasV2/view/img/cmd/0025.png new file mode 100755 index 0000000..4308b20 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0025.png differ diff --git a/wikilibrasV2/view/img/cmd/0026.png b/wikilibrasV2/view/img/cmd/0026.png new file mode 100755 index 0000000..ef25ccb Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0026.png differ diff --git a/wikilibrasV2/view/img/cmd/0027.png b/wikilibrasV2/view/img/cmd/0027.png new file mode 100755 index 0000000..81d97eb Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0027.png differ diff --git a/wikilibrasV2/view/img/cmd/0028.png b/wikilibrasV2/view/img/cmd/0028.png new file mode 100755 index 0000000..d5c23f0 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0028.png differ diff --git a/wikilibrasV2/view/img/cmd/0029.png b/wikilibrasV2/view/img/cmd/0029.png new file mode 100755 index 0000000..7e47846 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0029.png differ diff --git a/wikilibrasV2/view/img/cmd/0030.png b/wikilibrasV2/view/img/cmd/0030.png new file mode 100755 index 0000000..42e9bbd Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0030.png differ diff --git a/wikilibrasV2/view/img/cmd/0031.png b/wikilibrasV2/view/img/cmd/0031.png new file mode 100755 index 0000000..cc44f41 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0031.png differ diff --git a/wikilibrasV2/view/img/cmd/0032.png b/wikilibrasV2/view/img/cmd/0032.png new file mode 100755 index 0000000..49206ae Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0032.png differ diff --git a/wikilibrasV2/view/img/cmd/0033.png b/wikilibrasV2/view/img/cmd/0033.png new file mode 100755 index 0000000..4aba4ab Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0033.png differ diff --git a/wikilibrasV2/view/img/cmd/0034.png b/wikilibrasV2/view/img/cmd/0034.png new file mode 100755 index 0000000..820cba3 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0034.png differ diff --git a/wikilibrasV2/view/img/cmd/0035.png b/wikilibrasV2/view/img/cmd/0035.png new file mode 100755 index 0000000..ded862d Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0035.png differ diff --git a/wikilibrasV2/view/img/cmd/0036.png b/wikilibrasV2/view/img/cmd/0036.png new file mode 100755 index 0000000..47f44d2 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0036.png differ diff --git a/wikilibrasV2/view/img/cmd/0037.png b/wikilibrasV2/view/img/cmd/0037.png new file mode 100755 index 0000000..7443557 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0037.png differ diff --git a/wikilibrasV2/view/img/cmd/0038.png b/wikilibrasV2/view/img/cmd/0038.png new file mode 100755 index 0000000..069aef5 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0038.png differ diff --git a/wikilibrasV2/view/img/cmd/0039.png b/wikilibrasV2/view/img/cmd/0039.png new file mode 100755 index 0000000..f471b8d Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0039.png differ diff --git a/wikilibrasV2/view/img/cmd/0040.png b/wikilibrasV2/view/img/cmd/0040.png new file mode 100755 index 0000000..faaf144 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0040.png differ diff --git a/wikilibrasV2/view/img/cmd/0041.png b/wikilibrasV2/view/img/cmd/0041.png new file mode 100755 index 0000000..766dd83 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0041.png differ diff --git a/wikilibrasV2/view/img/cmd/0042.png b/wikilibrasV2/view/img/cmd/0042.png new file mode 100755 index 0000000..f8a6b31 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0042.png differ diff --git a/wikilibrasV2/view/img/cmd/0043.png b/wikilibrasV2/view/img/cmd/0043.png new file mode 100755 index 0000000..9ca64a9 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0043.png differ diff --git a/wikilibrasV2/view/img/cmd/0044.png b/wikilibrasV2/view/img/cmd/0044.png new file mode 100755 index 0000000..9d1ad53 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0044.png differ diff --git a/wikilibrasV2/view/img/cmd/0045.png b/wikilibrasV2/view/img/cmd/0045.png new file mode 100755 index 0000000..9e7e62a Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0045.png differ diff --git a/wikilibrasV2/view/img/cmd/0046.png b/wikilibrasV2/view/img/cmd/0046.png new file mode 100755 index 0000000..bf78c31 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0046.png differ diff --git a/wikilibrasV2/view/img/cmd/0047.png b/wikilibrasV2/view/img/cmd/0047.png new file mode 100755 index 0000000..11f9ae6 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0047.png differ diff --git a/wikilibrasV2/view/img/cmd/0048.png b/wikilibrasV2/view/img/cmd/0048.png new file mode 100755 index 0000000..d08aa3b Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0048.png differ diff --git a/wikilibrasV2/view/img/cmd/0049.png b/wikilibrasV2/view/img/cmd/0049.png new file mode 100755 index 0000000..100bfe7 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0049.png differ diff --git a/wikilibrasV2/view/img/cmd/0050.png b/wikilibrasV2/view/img/cmd/0050.png new file mode 100755 index 0000000..6986821 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0050.png differ diff --git a/wikilibrasV2/view/img/cmd/0051.png b/wikilibrasV2/view/img/cmd/0051.png new file mode 100755 index 0000000..40309a9 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0051.png differ diff --git a/wikilibrasV2/view/img/cmd/0052.png b/wikilibrasV2/view/img/cmd/0052.png new file mode 100755 index 0000000..b61fa73 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0052.png differ diff --git a/wikilibrasV2/view/img/cmd/0053.png b/wikilibrasV2/view/img/cmd/0053.png new file mode 100755 index 0000000..f574409 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0053.png differ diff --git a/wikilibrasV2/view/img/cmd/0054.png b/wikilibrasV2/view/img/cmd/0054.png new file mode 100755 index 0000000..702307b Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0054.png differ diff --git a/wikilibrasV2/view/img/cmd/0055.png b/wikilibrasV2/view/img/cmd/0055.png new file mode 100755 index 0000000..dfe674e Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0055.png differ diff --git a/wikilibrasV2/view/img/cmd/0056.png b/wikilibrasV2/view/img/cmd/0056.png new file mode 100755 index 0000000..f374376 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0056.png differ diff --git a/wikilibrasV2/view/img/cmd/0057.png b/wikilibrasV2/view/img/cmd/0057.png new file mode 100755 index 0000000..2f82c3a Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0057.png differ diff --git a/wikilibrasV2/view/img/cmd/0058.png b/wikilibrasV2/view/img/cmd/0058.png new file mode 100755 index 0000000..860a7da Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0058.png differ diff --git a/wikilibrasV2/view/img/cmd/0059.png b/wikilibrasV2/view/img/cmd/0059.png new file mode 100755 index 0000000..db6dee4 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0059.png differ diff --git a/wikilibrasV2/view/img/cmd/0060.png b/wikilibrasV2/view/img/cmd/0060.png new file mode 100755 index 0000000..db6dee4 Binary files /dev/null and b/wikilibrasV2/view/img/cmd/0060.png differ diff --git a/wikilibrasV2/view/img/cme/0000.png b/wikilibrasV2/view/img/cme/0000.png new file mode 100755 index 0000000..16ea8f8 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0000.png differ diff --git a/wikilibrasV2/view/img/cme/0001.png b/wikilibrasV2/view/img/cme/0001.png new file mode 100755 index 0000000..9878d60 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0001.png differ diff --git a/wikilibrasV2/view/img/cme/0002.png b/wikilibrasV2/view/img/cme/0002.png new file mode 100755 index 0000000..0c8d1a7 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0002.png differ diff --git a/wikilibrasV2/view/img/cme/0003.png b/wikilibrasV2/view/img/cme/0003.png new file mode 100755 index 0000000..dc831e7 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0003.png differ diff --git a/wikilibrasV2/view/img/cme/0004.png b/wikilibrasV2/view/img/cme/0004.png new file mode 100755 index 0000000..e04d7b9 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0004.png differ diff --git a/wikilibrasV2/view/img/cme/0005.png b/wikilibrasV2/view/img/cme/0005.png new file mode 100755 index 0000000..7ad8779 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0005.png differ diff --git a/wikilibrasV2/view/img/cme/0006.png b/wikilibrasV2/view/img/cme/0006.png new file mode 100755 index 0000000..909bc71 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0006.png differ diff --git a/wikilibrasV2/view/img/cme/0007.png b/wikilibrasV2/view/img/cme/0007.png new file mode 100755 index 0000000..b07019d Binary files /dev/null and b/wikilibrasV2/view/img/cme/0007.png differ diff --git a/wikilibrasV2/view/img/cme/0008.png b/wikilibrasV2/view/img/cme/0008.png new file mode 100755 index 0000000..4fb61ef Binary files /dev/null and b/wikilibrasV2/view/img/cme/0008.png differ diff --git a/wikilibrasV2/view/img/cme/0009.png b/wikilibrasV2/view/img/cme/0009.png new file mode 100755 index 0000000..5cd3177 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0009.png differ diff --git a/wikilibrasV2/view/img/cme/0010.png b/wikilibrasV2/view/img/cme/0010.png new file mode 100755 index 0000000..7bcdad3 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0010.png differ diff --git a/wikilibrasV2/view/img/cme/0011.png b/wikilibrasV2/view/img/cme/0011.png new file mode 100755 index 0000000..fca1e33 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0011.png differ diff --git a/wikilibrasV2/view/img/cme/0012.png b/wikilibrasV2/view/img/cme/0012.png new file mode 100755 index 0000000..6d8cd1a Binary files /dev/null and b/wikilibrasV2/view/img/cme/0012.png differ diff --git a/wikilibrasV2/view/img/cme/0013.png b/wikilibrasV2/view/img/cme/0013.png new file mode 100755 index 0000000..cb6a7a3 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0013.png differ diff --git a/wikilibrasV2/view/img/cme/0014.png b/wikilibrasV2/view/img/cme/0014.png new file mode 100755 index 0000000..8e3862d Binary files /dev/null and b/wikilibrasV2/view/img/cme/0014.png differ diff --git a/wikilibrasV2/view/img/cme/0015.png b/wikilibrasV2/view/img/cme/0015.png new file mode 100755 index 0000000..adaec6c Binary files /dev/null and b/wikilibrasV2/view/img/cme/0015.png differ diff --git a/wikilibrasV2/view/img/cme/0016.png b/wikilibrasV2/view/img/cme/0016.png new file mode 100755 index 0000000..8db9626 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0016.png differ diff --git a/wikilibrasV2/view/img/cme/0017.png b/wikilibrasV2/view/img/cme/0017.png new file mode 100755 index 0000000..5e0d8b2 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0017.png differ diff --git a/wikilibrasV2/view/img/cme/0018.png b/wikilibrasV2/view/img/cme/0018.png new file mode 100755 index 0000000..0da2de4 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0018.png differ diff --git a/wikilibrasV2/view/img/cme/0019.png b/wikilibrasV2/view/img/cme/0019.png new file mode 100755 index 0000000..e83c2b9 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0019.png differ diff --git a/wikilibrasV2/view/img/cme/0020.png b/wikilibrasV2/view/img/cme/0020.png new file mode 100755 index 0000000..3610521 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0020.png differ diff --git a/wikilibrasV2/view/img/cme/0021.png b/wikilibrasV2/view/img/cme/0021.png new file mode 100755 index 0000000..52c9563 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0021.png differ diff --git a/wikilibrasV2/view/img/cme/0022.png b/wikilibrasV2/view/img/cme/0022.png new file mode 100755 index 0000000..d4c7d7c Binary files /dev/null and b/wikilibrasV2/view/img/cme/0022.png differ diff --git a/wikilibrasV2/view/img/cme/0023.png b/wikilibrasV2/view/img/cme/0023.png new file mode 100755 index 0000000..6357bf3 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0023.png differ diff --git a/wikilibrasV2/view/img/cme/0024.png b/wikilibrasV2/view/img/cme/0024.png new file mode 100755 index 0000000..5822079 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0024.png differ diff --git a/wikilibrasV2/view/img/cme/0025.png b/wikilibrasV2/view/img/cme/0025.png new file mode 100755 index 0000000..e97d27e Binary files /dev/null and b/wikilibrasV2/view/img/cme/0025.png differ diff --git a/wikilibrasV2/view/img/cme/0026.png b/wikilibrasV2/view/img/cme/0026.png new file mode 100755 index 0000000..788b4c0 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0026.png differ diff --git a/wikilibrasV2/view/img/cme/0027.png b/wikilibrasV2/view/img/cme/0027.png new file mode 100755 index 0000000..250f505 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0027.png differ diff --git a/wikilibrasV2/view/img/cme/0028.png b/wikilibrasV2/view/img/cme/0028.png new file mode 100755 index 0000000..0ce959b Binary files /dev/null and b/wikilibrasV2/view/img/cme/0028.png differ diff --git a/wikilibrasV2/view/img/cme/0029.png b/wikilibrasV2/view/img/cme/0029.png new file mode 100755 index 0000000..dee8580 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0029.png differ diff --git a/wikilibrasV2/view/img/cme/0030.png b/wikilibrasV2/view/img/cme/0030.png new file mode 100755 index 0000000..0797abb Binary files /dev/null and b/wikilibrasV2/view/img/cme/0030.png differ diff --git a/wikilibrasV2/view/img/cme/0031.png b/wikilibrasV2/view/img/cme/0031.png new file mode 100755 index 0000000..bb654be Binary files /dev/null and b/wikilibrasV2/view/img/cme/0031.png differ diff --git a/wikilibrasV2/view/img/cme/0032.png b/wikilibrasV2/view/img/cme/0032.png new file mode 100755 index 0000000..b6cbba4 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0032.png differ diff --git a/wikilibrasV2/view/img/cme/0033.png b/wikilibrasV2/view/img/cme/0033.png new file mode 100755 index 0000000..f83c30b Binary files /dev/null and b/wikilibrasV2/view/img/cme/0033.png differ diff --git a/wikilibrasV2/view/img/cme/0034.png b/wikilibrasV2/view/img/cme/0034.png new file mode 100755 index 0000000..d214c9a Binary files /dev/null and b/wikilibrasV2/view/img/cme/0034.png differ diff --git a/wikilibrasV2/view/img/cme/0035.png b/wikilibrasV2/view/img/cme/0035.png new file mode 100755 index 0000000..557e554 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0035.png differ diff --git a/wikilibrasV2/view/img/cme/0036.png b/wikilibrasV2/view/img/cme/0036.png new file mode 100755 index 0000000..54b1ebc Binary files /dev/null and b/wikilibrasV2/view/img/cme/0036.png differ diff --git a/wikilibrasV2/view/img/cme/0037.png b/wikilibrasV2/view/img/cme/0037.png new file mode 100755 index 0000000..9e45e36 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0037.png differ diff --git a/wikilibrasV2/view/img/cme/0038.png b/wikilibrasV2/view/img/cme/0038.png new file mode 100755 index 0000000..828eb94 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0038.png differ diff --git a/wikilibrasV2/view/img/cme/0039.png b/wikilibrasV2/view/img/cme/0039.png new file mode 100755 index 0000000..6e6cd44 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0039.png differ diff --git a/wikilibrasV2/view/img/cme/0040.png b/wikilibrasV2/view/img/cme/0040.png new file mode 100755 index 0000000..46dadf5 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0040.png differ diff --git a/wikilibrasV2/view/img/cme/0041.png b/wikilibrasV2/view/img/cme/0041.png new file mode 100755 index 0000000..af91a92 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0041.png differ diff --git a/wikilibrasV2/view/img/cme/0042.png b/wikilibrasV2/view/img/cme/0042.png new file mode 100755 index 0000000..f2d78fe Binary files /dev/null and b/wikilibrasV2/view/img/cme/0042.png differ diff --git a/wikilibrasV2/view/img/cme/0043.png b/wikilibrasV2/view/img/cme/0043.png new file mode 100755 index 0000000..e926859 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0043.png differ diff --git a/wikilibrasV2/view/img/cme/0044.png b/wikilibrasV2/view/img/cme/0044.png new file mode 100755 index 0000000..89af44e Binary files /dev/null and b/wikilibrasV2/view/img/cme/0044.png differ diff --git a/wikilibrasV2/view/img/cme/0045.png b/wikilibrasV2/view/img/cme/0045.png new file mode 100755 index 0000000..6c6a409 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0045.png differ diff --git a/wikilibrasV2/view/img/cme/0046.png b/wikilibrasV2/view/img/cme/0046.png new file mode 100755 index 0000000..ac56b3c Binary files /dev/null and b/wikilibrasV2/view/img/cme/0046.png differ diff --git a/wikilibrasV2/view/img/cme/0047.png b/wikilibrasV2/view/img/cme/0047.png new file mode 100755 index 0000000..b823c0f Binary files /dev/null and b/wikilibrasV2/view/img/cme/0047.png differ diff --git a/wikilibrasV2/view/img/cme/0048.png b/wikilibrasV2/view/img/cme/0048.png new file mode 100755 index 0000000..2253eb3 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0048.png differ diff --git a/wikilibrasV2/view/img/cme/0049.png b/wikilibrasV2/view/img/cme/0049.png new file mode 100755 index 0000000..8957759 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0049.png differ diff --git a/wikilibrasV2/view/img/cme/0050.png b/wikilibrasV2/view/img/cme/0050.png new file mode 100755 index 0000000..dbd9e6c Binary files /dev/null and b/wikilibrasV2/view/img/cme/0050.png differ diff --git a/wikilibrasV2/view/img/cme/0051.png b/wikilibrasV2/view/img/cme/0051.png new file mode 100755 index 0000000..2df8542 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0051.png differ diff --git a/wikilibrasV2/view/img/cme/0052.png b/wikilibrasV2/view/img/cme/0052.png new file mode 100755 index 0000000..af4d572 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0052.png differ diff --git a/wikilibrasV2/view/img/cme/0053.png b/wikilibrasV2/view/img/cme/0053.png new file mode 100755 index 0000000..9b91263 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0053.png differ diff --git a/wikilibrasV2/view/img/cme/0054.png b/wikilibrasV2/view/img/cme/0054.png new file mode 100755 index 0000000..e46777e Binary files /dev/null and b/wikilibrasV2/view/img/cme/0054.png differ diff --git a/wikilibrasV2/view/img/cme/0055.png b/wikilibrasV2/view/img/cme/0055.png new file mode 100755 index 0000000..220c2d1 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0055.png differ diff --git a/wikilibrasV2/view/img/cme/0056.png b/wikilibrasV2/view/img/cme/0056.png new file mode 100755 index 0000000..9c0951d Binary files /dev/null and b/wikilibrasV2/view/img/cme/0056.png differ diff --git a/wikilibrasV2/view/img/cme/0057.png b/wikilibrasV2/view/img/cme/0057.png new file mode 100755 index 0000000..0295187 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0057.png differ diff --git a/wikilibrasV2/view/img/cme/0058.png b/wikilibrasV2/view/img/cme/0058.png new file mode 100755 index 0000000..17775eb Binary files /dev/null and b/wikilibrasV2/view/img/cme/0058.png differ diff --git a/wikilibrasV2/view/img/cme/0059.png b/wikilibrasV2/view/img/cme/0059.png new file mode 100755 index 0000000..699f828 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0059.png differ diff --git a/wikilibrasV2/view/img/cme/0060.png b/wikilibrasV2/view/img/cme/0060.png new file mode 100755 index 0000000..699f828 Binary files /dev/null and b/wikilibrasV2/view/img/cme/0060.png differ diff --git a/wikilibrasV2/view/img/edit-icon-hover.png b/wikilibrasV2/view/img/edit-icon-hover.png new file mode 100755 index 0000000..4d20148 Binary files /dev/null and b/wikilibrasV2/view/img/edit-icon-hover.png differ diff --git a/wikilibrasV2/view/img/edit-icon.png b/wikilibrasV2/view/img/edit-icon.png new file mode 100755 index 0000000..3074e90 Binary files /dev/null and b/wikilibrasV2/view/img/edit-icon.png differ diff --git a/wikilibrasV2/view/img/exf/0000.png b/wikilibrasV2/view/img/exf/0000.png new file mode 100755 index 0000000..beb5890 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0000.png differ diff --git a/wikilibrasV2/view/img/exf/0001.png b/wikilibrasV2/view/img/exf/0001.png new file mode 100755 index 0000000..5c97768 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0001.png differ diff --git a/wikilibrasV2/view/img/exf/0002.png b/wikilibrasV2/view/img/exf/0002.png new file mode 100755 index 0000000..6ac2051 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0002.png differ diff --git a/wikilibrasV2/view/img/exf/0003.png b/wikilibrasV2/view/img/exf/0003.png new file mode 100755 index 0000000..49364de Binary files /dev/null and b/wikilibrasV2/view/img/exf/0003.png differ diff --git a/wikilibrasV2/view/img/exf/0004.png b/wikilibrasV2/view/img/exf/0004.png new file mode 100755 index 0000000..177b29f Binary files /dev/null and b/wikilibrasV2/view/img/exf/0004.png differ diff --git a/wikilibrasV2/view/img/exf/0005.png b/wikilibrasV2/view/img/exf/0005.png new file mode 100755 index 0000000..5095026 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0005.png differ diff --git a/wikilibrasV2/view/img/exf/0006.png b/wikilibrasV2/view/img/exf/0006.png new file mode 100755 index 0000000..fe02375 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0006.png differ diff --git a/wikilibrasV2/view/img/exf/0007.png b/wikilibrasV2/view/img/exf/0007.png new file mode 100755 index 0000000..f6f74f4 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0007.png differ diff --git a/wikilibrasV2/view/img/exf/0008.png b/wikilibrasV2/view/img/exf/0008.png new file mode 100755 index 0000000..9c79101 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0008.png differ diff --git a/wikilibrasV2/view/img/exf/0009.png b/wikilibrasV2/view/img/exf/0009.png new file mode 100755 index 0000000..8ed44ea Binary files /dev/null and b/wikilibrasV2/view/img/exf/0009.png differ diff --git a/wikilibrasV2/view/img/exf/0010.png b/wikilibrasV2/view/img/exf/0010.png new file mode 100755 index 0000000..60a9d38 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0010.png differ diff --git a/wikilibrasV2/view/img/exf/0011.png b/wikilibrasV2/view/img/exf/0011.png new file mode 100755 index 0000000..5cfd4e7 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0011.png differ diff --git a/wikilibrasV2/view/img/exf/0012.png b/wikilibrasV2/view/img/exf/0012.png new file mode 100755 index 0000000..ddb1937 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0012.png differ diff --git a/wikilibrasV2/view/img/exf/0013.png b/wikilibrasV2/view/img/exf/0013.png new file mode 100755 index 0000000..dbd9734 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0013.png differ diff --git a/wikilibrasV2/view/img/exf/0014.png b/wikilibrasV2/view/img/exf/0014.png new file mode 100755 index 0000000..77272d1 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0014.png differ diff --git a/wikilibrasV2/view/img/exf/0015.png b/wikilibrasV2/view/img/exf/0015.png new file mode 100755 index 0000000..23eb053 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0015.png differ diff --git a/wikilibrasV2/view/img/exf/0016.png b/wikilibrasV2/view/img/exf/0016.png new file mode 100755 index 0000000..54b8fac Binary files /dev/null and b/wikilibrasV2/view/img/exf/0016.png differ diff --git a/wikilibrasV2/view/img/exf/0017.png b/wikilibrasV2/view/img/exf/0017.png new file mode 100755 index 0000000..5749be8 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0017.png differ diff --git a/wikilibrasV2/view/img/exf/0018.png b/wikilibrasV2/view/img/exf/0018.png new file mode 100755 index 0000000..548b99a Binary files /dev/null and b/wikilibrasV2/view/img/exf/0018.png differ diff --git a/wikilibrasV2/view/img/exf/0019.png b/wikilibrasV2/view/img/exf/0019.png new file mode 100755 index 0000000..c8d26ac Binary files /dev/null and b/wikilibrasV2/view/img/exf/0019.png differ diff --git a/wikilibrasV2/view/img/exf/0020.png b/wikilibrasV2/view/img/exf/0020.png new file mode 100755 index 0000000..05abe2c Binary files /dev/null and b/wikilibrasV2/view/img/exf/0020.png differ diff --git a/wikilibrasV2/view/img/exf/0021.png b/wikilibrasV2/view/img/exf/0021.png new file mode 100755 index 0000000..5618742 Binary files /dev/null and b/wikilibrasV2/view/img/exf/0021.png differ diff --git a/wikilibrasV2/view/img/exf/duration-fast.mp4 b/wikilibrasV2/view/img/exf/duration-fast.mp4 new file mode 100755 index 0000000..89fe07e Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-fast.mp4 differ diff --git a/wikilibrasV2/view/img/exf/duration-fast.webm b/wikilibrasV2/view/img/exf/duration-fast.webm new file mode 100755 index 0000000..74cafb2 Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-fast.webm differ diff --git a/wikilibrasV2/view/img/exf/duration-normal.mp4 b/wikilibrasV2/view/img/exf/duration-normal.mp4 new file mode 100755 index 0000000..98a5833 Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-normal.mp4 differ diff --git a/wikilibrasV2/view/img/exf/duration-normal.webm b/wikilibrasV2/view/img/exf/duration-normal.webm new file mode 100755 index 0000000..88af30c Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-normal.webm differ diff --git a/wikilibrasV2/view/img/exf/duration-slow.mp4 b/wikilibrasV2/view/img/exf/duration-slow.mp4 new file mode 100755 index 0000000..53d3cfd Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-slow.mp4 differ diff --git a/wikilibrasV2/view/img/exf/duration-slow.webm b/wikilibrasV2/view/img/exf/duration-slow.webm new file mode 100755 index 0000000..60b42ae Binary files /dev/null and b/wikilibrasV2/view/img/exf/duration-slow.webm differ diff --git a/wikilibrasV2/view/img/exf/velocity-fast.mp4 b/wikilibrasV2/view/img/exf/velocity-fast.mp4 new file mode 100755 index 0000000..6dadddc Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-fast.mp4 differ diff --git a/wikilibrasV2/view/img/exf/velocity-fast.webm b/wikilibrasV2/view/img/exf/velocity-fast.webm new file mode 100755 index 0000000..fe86aee Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-fast.webm differ diff --git a/wikilibrasV2/view/img/exf/velocity-normal.mp4 b/wikilibrasV2/view/img/exf/velocity-normal.mp4 new file mode 100755 index 0000000..ae189c2 Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-normal.mp4 differ diff --git a/wikilibrasV2/view/img/exf/velocity-normal.webm b/wikilibrasV2/view/img/exf/velocity-normal.webm new file mode 100755 index 0000000..88af30c Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-normal.webm differ diff --git a/wikilibrasV2/view/img/exf/velocity-slow.mp4 b/wikilibrasV2/view/img/exf/velocity-slow.mp4 new file mode 100755 index 0000000..8c73f23 Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-slow.mp4 differ diff --git a/wikilibrasV2/view/img/exf/velocity-slow.webm b/wikilibrasV2/view/img/exf/velocity-slow.webm new file mode 100755 index 0000000..1656357 Binary files /dev/null and b/wikilibrasV2/view/img/exf/velocity-slow.webm differ diff --git a/wikilibrasV2/view/img/facial-expression-duration-icon-check.png b/wikilibrasV2/view/img/facial-expression-duration-icon-check.png new file mode 100755 index 0000000..d6489d7 Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-duration-icon-check.png differ diff --git a/wikilibrasV2/view/img/facial-expression-duration-icon-hover.png b/wikilibrasV2/view/img/facial-expression-duration-icon-hover.png new file mode 100755 index 0000000..5fd7bbf Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-duration-icon-hover.png differ diff --git a/wikilibrasV2/view/img/facial-expression-duration-icon.png b/wikilibrasV2/view/img/facial-expression-duration-icon.png new file mode 100755 index 0000000..f3be911 Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-duration-icon.png differ diff --git a/wikilibrasV2/view/img/facial-expression-icon-check.png b/wikilibrasV2/view/img/facial-expression-icon-check.png new file mode 100755 index 0000000..899edf6 Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-icon-check.png differ diff --git a/wikilibrasV2/view/img/facial-expression-icon-hover.png b/wikilibrasV2/view/img/facial-expression-icon-hover.png new file mode 100755 index 0000000..62150db Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-icon-hover.png differ diff --git a/wikilibrasV2/view/img/facial-expression-icon.png b/wikilibrasV2/view/img/facial-expression-icon.png new file mode 100755 index 0000000..0800ab7 Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-icon.png differ diff --git a/wikilibrasV2/view/img/facial-expression-velocity-icon-check.png b/wikilibrasV2/view/img/facial-expression-velocity-icon-check.png new file mode 100755 index 0000000..1a83883 Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-velocity-icon-check.png differ diff --git a/wikilibrasV2/view/img/facial-expression-velocity-icon-hover.png b/wikilibrasV2/view/img/facial-expression-velocity-icon-hover.png new file mode 100755 index 0000000..c71eedf Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-velocity-icon-hover.png differ diff --git a/wikilibrasV2/view/img/facial-expression-velocity-icon.png b/wikilibrasV2/view/img/facial-expression-velocity-icon.png new file mode 100755 index 0000000..a6285cf Binary files /dev/null and b/wikilibrasV2/view/img/facial-expression-velocity-icon.png differ diff --git a/wikilibrasV2/view/img/facial-icon-check.png b/wikilibrasV2/view/img/facial-icon-check.png new file mode 100755 index 0000000..3c5f5ec Binary files /dev/null and b/wikilibrasV2/view/img/facial-icon-check.png differ diff --git a/wikilibrasV2/view/img/facial-icon-hover.png b/wikilibrasV2/view/img/facial-icon-hover.png new file mode 100755 index 0000000..61964d4 Binary files /dev/null and b/wikilibrasV2/view/img/facial-icon-hover.png differ diff --git a/wikilibrasV2/view/img/facial-icon.png b/wikilibrasV2/view/img/facial-icon.png new file mode 100755 index 0000000..a01ca29 Binary files /dev/null and b/wikilibrasV2/view/img/facial-icon.png differ diff --git a/wikilibrasV2/view/img/fast-velocity-icon.png b/wikilibrasV2/view/img/fast-velocity-icon.png new file mode 100755 index 0000000..80ecfad Binary files /dev/null and b/wikilibrasV2/view/img/fast-velocity-icon.png differ diff --git a/wikilibrasV2/view/img/hand-articulation-icon-check.png b/wikilibrasV2/view/img/hand-articulation-icon-check.png new file mode 100755 index 0000000..5fa37e7 Binary files /dev/null and b/wikilibrasV2/view/img/hand-articulation-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-articulation-icon-hover.png b/wikilibrasV2/view/img/hand-articulation-icon-hover.png new file mode 100755 index 0000000..c51ff5b Binary files /dev/null and b/wikilibrasV2/view/img/hand-articulation-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-articulation-icon.png b/wikilibrasV2/view/img/hand-articulation-icon.png new file mode 100755 index 0000000..458f136 Binary files /dev/null and b/wikilibrasV2/view/img/hand-articulation-icon.png differ diff --git a/wikilibrasV2/view/img/hand-fingers-position-icon-check.png b/wikilibrasV2/view/img/hand-fingers-position-icon-check.png new file mode 100755 index 0000000..0a29115 Binary files /dev/null and b/wikilibrasV2/view/img/hand-fingers-position-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-fingers-position-icon-hover.png b/wikilibrasV2/view/img/hand-fingers-position-icon-hover.png new file mode 100755 index 0000000..abdea0b Binary files /dev/null and b/wikilibrasV2/view/img/hand-fingers-position-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-fingers-position-icon.png b/wikilibrasV2/view/img/hand-fingers-position-icon.png new file mode 100755 index 0000000..62fffd5 Binary files /dev/null and b/wikilibrasV2/view/img/hand-fingers-position-icon.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-direction-icon-check.png b/wikilibrasV2/view/img/hand-moviment-direction-icon-check.png new file mode 100755 index 0000000..381d45e Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-direction-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-direction-icon-hover.png b/wikilibrasV2/view/img/hand-moviment-direction-icon-hover.png new file mode 100755 index 0000000..d5dcf85 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-direction-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-direction-icon.png b/wikilibrasV2/view/img/hand-moviment-direction-icon.png new file mode 100755 index 0000000..a62cdd3 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-direction-icon.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-icon-check.png b/wikilibrasV2/view/img/hand-moviment-icon-check.png new file mode 100755 index 0000000..d6f9732 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-icon-hover.png b/wikilibrasV2/view/img/hand-moviment-icon-hover.png new file mode 100755 index 0000000..fc95f78 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-icon.png b/wikilibrasV2/view/img/hand-moviment-icon.png new file mode 100755 index 0000000..b735fd2 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-icon.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-plane-icon-check.png b/wikilibrasV2/view/img/hand-moviment-plane-icon-check.png new file mode 100755 index 0000000..0d264dd Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-plane-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-plane-icon-hover.png b/wikilibrasV2/view/img/hand-moviment-plane-icon-hover.png new file mode 100755 index 0000000..4f32b30 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-plane-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-plane-icon.png b/wikilibrasV2/view/img/hand-moviment-plane-icon.png new file mode 100755 index 0000000..0a4fba0 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-plane-icon.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-radius-icon-check.png b/wikilibrasV2/view/img/hand-moviment-radius-icon-check.png new file mode 100755 index 0000000..2b98f22 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-radius-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-radius-icon-hover.png b/wikilibrasV2/view/img/hand-moviment-radius-icon-hover.png new file mode 100755 index 0000000..1ba35c9 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-radius-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-radius-icon.png b/wikilibrasV2/view/img/hand-moviment-radius-icon.png new file mode 100755 index 0000000..8ef7c76 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-radius-icon.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-velocity-icon-check.png b/wikilibrasV2/view/img/hand-moviment-velocity-icon-check.png new file mode 100755 index 0000000..371cf29 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-velocity-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-velocity-icon-hover.png b/wikilibrasV2/view/img/hand-moviment-velocity-icon-hover.png new file mode 100755 index 0000000..34ac4c7 Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-velocity-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-moviment-velocity-icon.png b/wikilibrasV2/view/img/hand-moviment-velocity-icon.png new file mode 100755 index 0000000..dd6ca4c Binary files /dev/null and b/wikilibrasV2/view/img/hand-moviment-velocity-icon.png differ diff --git a/wikilibrasV2/view/img/hand-orientation-icon-check.png b/wikilibrasV2/view/img/hand-orientation-icon-check.png new file mode 100755 index 0000000..ab7a94a Binary files /dev/null and b/wikilibrasV2/view/img/hand-orientation-icon-check.png differ diff --git a/wikilibrasV2/view/img/hand-orientation-icon-hover.png b/wikilibrasV2/view/img/hand-orientation-icon-hover.png new file mode 100755 index 0000000..76b8c1c Binary files /dev/null and b/wikilibrasV2/view/img/hand-orientation-icon-hover.png differ diff --git a/wikilibrasV2/view/img/hand-orientation-icon.png b/wikilibrasV2/view/img/hand-orientation-icon.png new file mode 100755 index 0000000..4efd7b0 Binary files /dev/null and b/wikilibrasV2/view/img/hand-orientation-icon.png differ diff --git a/wikilibrasV2/view/img/left-arrow-icon-hover.png b/wikilibrasV2/view/img/left-arrow-icon-hover.png new file mode 100755 index 0000000..c7540e9 Binary files /dev/null and b/wikilibrasV2/view/img/left-arrow-icon-hover.png differ diff --git a/wikilibrasV2/view/img/left-arrow-icon.png b/wikilibrasV2/view/img/left-arrow-icon.png new file mode 100755 index 0000000..c7540e9 Binary files /dev/null and b/wikilibrasV2/view/img/left-arrow-icon.png differ diff --git a/wikilibrasV2/view/img/left-hand-icon-check.png b/wikilibrasV2/view/img/left-hand-icon-check.png new file mode 100755 index 0000000..7998fe0 Binary files /dev/null and b/wikilibrasV2/view/img/left-hand-icon-check.png differ diff --git a/wikilibrasV2/view/img/left-hand-icon-hover.png b/wikilibrasV2/view/img/left-hand-icon-hover.png new file mode 100755 index 0000000..8c513a4 Binary files /dev/null and b/wikilibrasV2/view/img/left-hand-icon-hover.png differ diff --git a/wikilibrasV2/view/img/left-hand-icon.png b/wikilibrasV2/view/img/left-hand-icon.png new file mode 100755 index 0000000..8130734 Binary files /dev/null and b/wikilibrasV2/view/img/left-hand-icon.png differ diff --git a/wikilibrasV2/view/img/loading.gif b/wikilibrasV2/view/img/loading.gif new file mode 100755 index 0000000..0fcd282 Binary files /dev/null and b/wikilibrasV2/view/img/loading.gif differ diff --git a/wikilibrasV2/view/img/logo.svg b/wikilibrasV2/view/img/logo.svg new file mode 100755 index 0000000..a206e5b --- /dev/null +++ b/wikilibrasV2/view/img/logo.svg @@ -0,0 +1,17 @@ + + + + + + + diff --git a/wikilibrasV2/view/img/long-duration-icon.png b/wikilibrasV2/view/img/long-duration-icon.png new file mode 100755 index 0000000..9c8e66e Binary files /dev/null and b/wikilibrasV2/view/img/long-duration-icon.png differ diff --git a/wikilibrasV2/view/img/maximize-icon-hover.png b/wikilibrasV2/view/img/maximize-icon-hover.png new file mode 100755 index 0000000..6de056f Binary files /dev/null and b/wikilibrasV2/view/img/maximize-icon-hover.png differ diff --git a/wikilibrasV2/view/img/maximize-icon.png b/wikilibrasV2/view/img/maximize-icon.png new file mode 100755 index 0000000..bad50f6 Binary files /dev/null and b/wikilibrasV2/view/img/maximize-icon.png differ diff --git a/wikilibrasV2/view/img/minimize-icon-hover.png b/wikilibrasV2/view/img/minimize-icon-hover.png new file mode 100755 index 0000000..98f7146 Binary files /dev/null and b/wikilibrasV2/view/img/minimize-icon-hover.png differ diff --git a/wikilibrasV2/view/img/minimize-icon.png b/wikilibrasV2/view/img/minimize-icon.png new file mode 100755 index 0000000..f402b4c Binary files /dev/null and b/wikilibrasV2/view/img/minimize-icon.png differ diff --git a/wikilibrasV2/view/img/mov/CIRCULAR.mp4 b/wikilibrasV2/view/img/mov/CIRCULAR.mp4 new file mode 100755 index 0000000..2ca4b13 Binary files /dev/null and b/wikilibrasV2/view/img/mov/CIRCULAR.mp4 differ diff --git a/wikilibrasV2/view/img/mov/CIRCULAR.webm b/wikilibrasV2/view/img/mov/CIRCULAR.webm new file mode 100755 index 0000000..bccdaf4 Binary files /dev/null and b/wikilibrasV2/view/img/mov/CIRCULAR.webm differ diff --git a/wikilibrasV2/view/img/mov/PONTUAL.mp4 b/wikilibrasV2/view/img/mov/PONTUAL.mp4 new file mode 100755 index 0000000..9f930ef Binary files /dev/null and b/wikilibrasV2/view/img/mov/PONTUAL.mp4 differ diff --git a/wikilibrasV2/view/img/mov/PONTUAL.webm b/wikilibrasV2/view/img/mov/PONTUAL.webm new file mode 100755 index 0000000..b2b981f Binary files /dev/null and b/wikilibrasV2/view/img/mov/PONTUAL.webm differ diff --git a/wikilibrasV2/view/img/mov/RETILINEO.mp4 b/wikilibrasV2/view/img/mov/RETILINEO.mp4 new file mode 100755 index 0000000..00bac7d Binary files /dev/null and b/wikilibrasV2/view/img/mov/RETILINEO.mp4 differ diff --git a/wikilibrasV2/view/img/mov/RETILINEO.webm b/wikilibrasV2/view/img/mov/RETILINEO.webm new file mode 100755 index 0000000..1764bfe Binary files /dev/null and b/wikilibrasV2/view/img/mov/RETILINEO.webm differ diff --git a/wikilibrasV2/view/img/mov/SEMICIRCULAR.mp4 b/wikilibrasV2/view/img/mov/SEMICIRCULAR.mp4 new file mode 100755 index 0000000..0a36ebb Binary files /dev/null and b/wikilibrasV2/view/img/mov/SEMICIRCULAR.mp4 differ diff --git a/wikilibrasV2/view/img/mov/SEMICIRCULAR.webm b/wikilibrasV2/view/img/mov/SEMICIRCULAR.webm new file mode 100755 index 0000000..42072f5 Binary files /dev/null and b/wikilibrasV2/view/img/mov/SEMICIRCULAR.webm differ diff --git a/wikilibrasV2/view/img/normal-duration-icon.png b/wikilibrasV2/view/img/normal-duration-icon.png new file mode 100755 index 0000000..d13de20 Binary files /dev/null and b/wikilibrasV2/view/img/normal-duration-icon.png differ diff --git a/wikilibrasV2/view/img/normal-velocity-icon.png b/wikilibrasV2/view/img/normal-velocity-icon.png new file mode 100755 index 0000000..4abdb76 Binary files /dev/null and b/wikilibrasV2/view/img/normal-velocity-icon.png differ diff --git a/wikilibrasV2/view/img/ord/01.png b/wikilibrasV2/view/img/ord/01.png new file mode 100755 index 0000000..0b47752 Binary files /dev/null and b/wikilibrasV2/view/img/ord/01.png differ diff --git a/wikilibrasV2/view/img/ord/02.png b/wikilibrasV2/view/img/ord/02.png new file mode 100755 index 0000000..31261d4 Binary files /dev/null and b/wikilibrasV2/view/img/ord/02.png differ diff --git a/wikilibrasV2/view/img/ord/03.png b/wikilibrasV2/view/img/ord/03.png new file mode 100755 index 0000000..fb212df Binary files /dev/null and b/wikilibrasV2/view/img/ord/03.png differ diff --git a/wikilibrasV2/view/img/ord/04.png b/wikilibrasV2/view/img/ord/04.png new file mode 100755 index 0000000..d8ad3bf Binary files /dev/null and b/wikilibrasV2/view/img/ord/04.png differ diff --git a/wikilibrasV2/view/img/ord/05.png b/wikilibrasV2/view/img/ord/05.png new file mode 100755 index 0000000..5c0cbe8 Binary files /dev/null and b/wikilibrasV2/view/img/ord/05.png differ diff --git a/wikilibrasV2/view/img/ord/06.png b/wikilibrasV2/view/img/ord/06.png new file mode 100755 index 0000000..e94a2a7 Binary files /dev/null and b/wikilibrasV2/view/img/ord/06.png differ diff --git a/wikilibrasV2/view/img/ord/07.png b/wikilibrasV2/view/img/ord/07.png new file mode 100755 index 0000000..5c0213b Binary files /dev/null and b/wikilibrasV2/view/img/ord/07.png differ diff --git a/wikilibrasV2/view/img/ord/08.png b/wikilibrasV2/view/img/ord/08.png new file mode 100755 index 0000000..3780a29 Binary files /dev/null and b/wikilibrasV2/view/img/ord/08.png differ diff --git a/wikilibrasV2/view/img/ord/09.png b/wikilibrasV2/view/img/ord/09.png new file mode 100755 index 0000000..2a42d28 Binary files /dev/null and b/wikilibrasV2/view/img/ord/09.png differ diff --git a/wikilibrasV2/view/img/ord/10.png b/wikilibrasV2/view/img/ord/10.png new file mode 100755 index 0000000..4dd3052 Binary files /dev/null and b/wikilibrasV2/view/img/ord/10.png differ diff --git a/wikilibrasV2/view/img/ord/11.png b/wikilibrasV2/view/img/ord/11.png new file mode 100755 index 0000000..78f3537 Binary files /dev/null and b/wikilibrasV2/view/img/ord/11.png differ diff --git a/wikilibrasV2/view/img/ord/12.png b/wikilibrasV2/view/img/ord/12.png new file mode 100755 index 0000000..7ffa979 Binary files /dev/null and b/wikilibrasV2/view/img/ord/12.png differ diff --git a/wikilibrasV2/view/img/ore/01.png b/wikilibrasV2/view/img/ore/01.png new file mode 100755 index 0000000..9533c4e Binary files /dev/null and b/wikilibrasV2/view/img/ore/01.png differ diff --git a/wikilibrasV2/view/img/ore/02.png b/wikilibrasV2/view/img/ore/02.png new file mode 100755 index 0000000..4ce1fb2 Binary files /dev/null and b/wikilibrasV2/view/img/ore/02.png differ diff --git a/wikilibrasV2/view/img/ore/03.png b/wikilibrasV2/view/img/ore/03.png new file mode 100755 index 0000000..ba778ad Binary files /dev/null and b/wikilibrasV2/view/img/ore/03.png differ diff --git a/wikilibrasV2/view/img/ore/04.png b/wikilibrasV2/view/img/ore/04.png new file mode 100755 index 0000000..3b7a1c0 Binary files /dev/null and b/wikilibrasV2/view/img/ore/04.png differ diff --git a/wikilibrasV2/view/img/ore/05.png b/wikilibrasV2/view/img/ore/05.png new file mode 100755 index 0000000..77466cc Binary files /dev/null and b/wikilibrasV2/view/img/ore/05.png differ diff --git a/wikilibrasV2/view/img/ore/06.png b/wikilibrasV2/view/img/ore/06.png new file mode 100755 index 0000000..c87fc87 Binary files /dev/null and b/wikilibrasV2/view/img/ore/06.png differ diff --git a/wikilibrasV2/view/img/ore/07.png b/wikilibrasV2/view/img/ore/07.png new file mode 100755 index 0000000..0ab9f72 Binary files /dev/null and b/wikilibrasV2/view/img/ore/07.png differ diff --git a/wikilibrasV2/view/img/ore/08.png b/wikilibrasV2/view/img/ore/08.png new file mode 100755 index 0000000..07a01e7 Binary files /dev/null and b/wikilibrasV2/view/img/ore/08.png differ diff --git a/wikilibrasV2/view/img/ore/09.png b/wikilibrasV2/view/img/ore/09.png new file mode 100755 index 0000000..4d4ca1f Binary files /dev/null and b/wikilibrasV2/view/img/ore/09.png differ diff --git a/wikilibrasV2/view/img/ore/10.png b/wikilibrasV2/view/img/ore/10.png new file mode 100755 index 0000000..ee449a3 Binary files /dev/null and b/wikilibrasV2/view/img/ore/10.png differ diff --git a/wikilibrasV2/view/img/ore/11.png b/wikilibrasV2/view/img/ore/11.png new file mode 100755 index 0000000..9c341ed Binary files /dev/null and b/wikilibrasV2/view/img/ore/11.png differ diff --git a/wikilibrasV2/view/img/ore/12.png b/wikilibrasV2/view/img/ore/12.png new file mode 100755 index 0000000..46ff4e5 Binary files /dev/null and b/wikilibrasV2/view/img/ore/12.png differ diff --git a/wikilibrasV2/view/img/pa/A-Seletor.png b/wikilibrasV2/view/img/pa/A-Seletor.png new file mode 100755 index 0000000..eee09ba Binary files /dev/null and b/wikilibrasV2/view/img/pa/A-Seletor.png differ diff --git a/wikilibrasV2/view/img/pa/B-Seletor.png b/wikilibrasV2/view/img/pa/B-Seletor.png new file mode 100755 index 0000000..9b03e94 Binary files /dev/null and b/wikilibrasV2/view/img/pa/B-Seletor.png differ diff --git a/wikilibrasV2/view/img/pa/default-base.png b/wikilibrasV2/view/img/pa/default-base.png new file mode 100755 index 0000000..71824fb Binary files /dev/null and b/wikilibrasV2/view/img/pa/default-base.png differ diff --git a/wikilibrasV2/view/img/pa/gray-front-avatar.png b/wikilibrasV2/view/img/pa/gray-front-avatar.png new file mode 100755 index 0000000..3a2b10d Binary files /dev/null and b/wikilibrasV2/view/img/pa/gray-front-avatar.png differ diff --git a/wikilibrasV2/view/img/pa/gray-side-avatar.png b/wikilibrasV2/view/img/pa/gray-side-avatar.png new file mode 100755 index 0000000..329b916 Binary files /dev/null and b/wikilibrasV2/view/img/pa/gray-side-avatar.png differ diff --git a/wikilibrasV2/view/img/ranking/bronze-star-icon.png b/wikilibrasV2/view/img/ranking/bronze-star-icon.png new file mode 100755 index 0000000..d1cf5af Binary files /dev/null and b/wikilibrasV2/view/img/ranking/bronze-star-icon.png differ diff --git a/wikilibrasV2/view/img/ranking/gold-star-icon.png b/wikilibrasV2/view/img/ranking/gold-star-icon.png new file mode 100755 index 0000000..cbb5b6f Binary files /dev/null and b/wikilibrasV2/view/img/ranking/gold-star-icon.png differ diff --git a/wikilibrasV2/view/img/ranking/signs-icon.png b/wikilibrasV2/view/img/ranking/signs-icon.png new file mode 100755 index 0000000..f99f05d Binary files /dev/null and b/wikilibrasV2/view/img/ranking/signs-icon.png differ diff --git a/wikilibrasV2/view/img/ranking/silver-star-icon.png b/wikilibrasV2/view/img/ranking/silver-star-icon.png new file mode 100755 index 0000000..121e773 Binary files /dev/null and b/wikilibrasV2/view/img/ranking/silver-star-icon.png differ diff --git a/wikilibrasV2/view/img/ranking/trophy-icon.png b/wikilibrasV2/view/img/ranking/trophy-icon.png new file mode 100755 index 0000000..c048eb8 Binary files /dev/null and b/wikilibrasV2/view/img/ranking/trophy-icon.png differ diff --git a/wikilibrasV2/view/img/ranking/user-shape.png b/wikilibrasV2/view/img/ranking/user-shape.png new file mode 100755 index 0000000..f2ffb8f Binary files /dev/null and b/wikilibrasV2/view/img/ranking/user-shape.png differ diff --git a/wikilibrasV2/view/img/right-arrow-icon-hover.png b/wikilibrasV2/view/img/right-arrow-icon-hover.png new file mode 100755 index 0000000..b37c3f6 Binary files /dev/null and b/wikilibrasV2/view/img/right-arrow-icon-hover.png differ diff --git a/wikilibrasV2/view/img/right-arrow-icon.png b/wikilibrasV2/view/img/right-arrow-icon.png new file mode 100755 index 0000000..b37c3f6 Binary files /dev/null and b/wikilibrasV2/view/img/right-arrow-icon.png differ diff --git a/wikilibrasV2/view/img/right-hand-icon-check.png b/wikilibrasV2/view/img/right-hand-icon-check.png new file mode 100755 index 0000000..12af9fa Binary files /dev/null and b/wikilibrasV2/view/img/right-hand-icon-check.png differ diff --git a/wikilibrasV2/view/img/right-hand-icon-hover.png b/wikilibrasV2/view/img/right-hand-icon-hover.png new file mode 100755 index 0000000..b3c9894 Binary files /dev/null and b/wikilibrasV2/view/img/right-hand-icon-hover.png differ diff --git a/wikilibrasV2/view/img/right-hand-icon.png b/wikilibrasV2/view/img/right-hand-icon.png new file mode 100755 index 0000000..3b5cecb Binary files /dev/null and b/wikilibrasV2/view/img/right-hand-icon.png differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.mp4 new file mode 100755 index 0000000..e890921 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.webm b/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.webm new file mode 100755 index 0000000..88d2c14 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-baixo-esquerda.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.mp4 new file mode 100755 index 0000000..efa9472 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.webm b/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.webm new file mode 100755 index 0000000..067751e Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-baixo-tras.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.mp4 new file mode 100755 index 0000000..aa584d9 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.webm b/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.webm new file mode 100755 index 0000000..afa2645 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-cima-direita.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.mp4 new file mode 100755 index 0000000..f4d6f4e Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.webm b/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.webm new file mode 100755 index 0000000..ed1c76a Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-cima-frente.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.mp4 new file mode 100755 index 0000000..b7843b4 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.webm b/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.webm new file mode 100755 index 0000000..d4edfab Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-direita-baixo.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.mp4 new file mode 100755 index 0000000..b2a2024 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.webm b/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.webm new file mode 100755 index 0000000..bbd2628 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-direita-tras.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.mp4 new file mode 100755 index 0000000..2479aa8 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.webm b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.webm new file mode 100755 index 0000000..2d03b0b Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-cima.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.mp4 new file mode 100755 index 0000000..6b10f40 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.webm b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.webm new file mode 100755 index 0000000..8648ecc Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-esquerda-frente.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.mp4 new file mode 100755 index 0000000..9881415 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.webm b/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.webm new file mode 100755 index 0000000..9d43068 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-frente-baixo.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.mp4 new file mode 100755 index 0000000..0469445 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.webm b/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.webm new file mode 100755 index 0000000..d936ea6 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-frente-direita.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.mp4 new file mode 100755 index 0000000..8c7275a Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.webm b/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.webm new file mode 100755 index 0000000..deb10be Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-tras-cima.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.mp4 b/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.mp4 new file mode 100755 index 0000000..20fbb08 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.webm b/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.webm new file mode 100755 index 0000000..44e66a3 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/plano-tras-esquerda.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-grande.mp4 b/wikilibrasV2/view/img/semicircular/md/raio-grande.mp4 new file mode 100755 index 0000000..adbb3c3 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-grande.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-grande.webm b/wikilibrasV2/view/img/semicircular/md/raio-grande.webm new file mode 100755 index 0000000..6aa5181 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-grande.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-normal.mp4 b/wikilibrasV2/view/img/semicircular/md/raio-normal.mp4 new file mode 100755 index 0000000..4b771ac Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-normal.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-normal.webm b/wikilibrasV2/view/img/semicircular/md/raio-normal.webm new file mode 100755 index 0000000..c94c4cb Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-normal.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-pequeno.mp4 b/wikilibrasV2/view/img/semicircular/md/raio-pequeno.mp4 new file mode 100755 index 0000000..aa23dc8 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-pequeno.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/raio-pequeno.webm b/wikilibrasV2/view/img/semicircular/md/raio-pequeno.webm new file mode 100755 index 0000000..592cc3a Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/raio-pequeno.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.mp4 b/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.mp4 new file mode 100755 index 0000000..773cb34 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.webm b/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.webm new file mode 100755 index 0000000..2d03b0b Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/sentido-anti-horario.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/sentido-horario.mp4 b/wikilibrasV2/view/img/semicircular/md/sentido-horario.mp4 new file mode 100755 index 0000000..68b292e Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/sentido-horario.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/sentido-horario.webm b/wikilibrasV2/view/img/semicircular/md/sentido-horario.webm new file mode 100755 index 0000000..3ef4159 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/sentido-horario.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-lento.mp4 b/wikilibrasV2/view/img/semicircular/md/velocidade-lento.mp4 new file mode 100755 index 0000000..970dd8c Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-lento.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-lento.webm b/wikilibrasV2/view/img/semicircular/md/velocidade-lento.webm new file mode 100755 index 0000000..eee81e4 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-lento.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-normal.mp4 b/wikilibrasV2/view/img/semicircular/md/velocidade-normal.mp4 new file mode 100755 index 0000000..745ac8d Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-normal.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-normal.webm b/wikilibrasV2/view/img/semicircular/md/velocidade-normal.webm new file mode 100755 index 0000000..6aa5181 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-normal.webm differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.mp4 b/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.mp4 new file mode 100755 index 0000000..175b9dd Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.webm b/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.webm new file mode 100755 index 0000000..15e733c Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/md/velocidade-rapido.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.mp4 new file mode 100755 index 0000000..c78daff Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.webm b/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.webm new file mode 100755 index 0000000..4699915 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-baixo-esquerda.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.mp4 new file mode 100755 index 0000000..caa29c5 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.webm b/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.webm new file mode 100755 index 0000000..e7d9e5a Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-baixo-tras.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.mp4 new file mode 100755 index 0000000..a728ec2 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.webm b/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.webm new file mode 100755 index 0000000..672e645 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-cima-direita.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.mp4 new file mode 100755 index 0000000..b6ec981 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.webm b/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.webm new file mode 100755 index 0000000..56bc9c0 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-cima-frente.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.mp4 new file mode 100755 index 0000000..9233667 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.webm b/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.webm new file mode 100755 index 0000000..4b3b9a3 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-direita-baixo.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.mp4 new file mode 100755 index 0000000..4d638ed Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.webm b/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.webm new file mode 100755 index 0000000..1463bca Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-direita-tras.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.mp4 new file mode 100755 index 0000000..55329d0 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.webm b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.webm new file mode 100755 index 0000000..6de38fb Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-cima.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.mp4 new file mode 100755 index 0000000..ac021e7 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.webm b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.webm new file mode 100755 index 0000000..4d953d6 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-esquerda-frente.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.mp4 new file mode 100755 index 0000000..f4125ce Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.webm b/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.webm new file mode 100755 index 0000000..8d8f58b Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-frente-baixo.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.mp4 new file mode 100755 index 0000000..3db9183 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.webm b/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.webm new file mode 100755 index 0000000..b09d5c3 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-frente-direita.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.mp4 new file mode 100755 index 0000000..4c6d1f8 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.webm b/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.webm new file mode 100755 index 0000000..b2acb2d Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-tras-cima.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.mp4 b/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.mp4 new file mode 100755 index 0000000..ed6bb5a Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.webm b/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.webm new file mode 100755 index 0000000..974e173 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/plano-tras-esquerda.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-grande.mp4 b/wikilibrasV2/view/img/semicircular/me/raio-grande.mp4 new file mode 100755 index 0000000..84595e0 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-grande.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-grande.webm b/wikilibrasV2/view/img/semicircular/me/raio-grande.webm new file mode 100755 index 0000000..42072f5 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-grande.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-normal.mp4 b/wikilibrasV2/view/img/semicircular/me/raio-normal.mp4 new file mode 100755 index 0000000..a1ead95 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-normal.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-normal.webm b/wikilibrasV2/view/img/semicircular/me/raio-normal.webm new file mode 100755 index 0000000..318c844 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-normal.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-pequeno.mp4 b/wikilibrasV2/view/img/semicircular/me/raio-pequeno.mp4 new file mode 100755 index 0000000..380d3ae Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-pequeno.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/raio-pequeno.webm b/wikilibrasV2/view/img/semicircular/me/raio-pequeno.webm new file mode 100755 index 0000000..fcbacdf Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/raio-pequeno.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.mp4 b/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.mp4 new file mode 100755 index 0000000..a61ffa0 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.webm b/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.webm new file mode 100755 index 0000000..6de38fb Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/sentido-anti-horario.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/sentido-horario.mp4 b/wikilibrasV2/view/img/semicircular/me/sentido-horario.mp4 new file mode 100755 index 0000000..8d71cb8 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/sentido-horario.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/sentido-horario.webm b/wikilibrasV2/view/img/semicircular/me/sentido-horario.webm new file mode 100755 index 0000000..c93eaa2 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/sentido-horario.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-lento.mp4 b/wikilibrasV2/view/img/semicircular/me/velocidade-lento.mp4 new file mode 100755 index 0000000..3fd4adc Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-lento.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-lento.webm b/wikilibrasV2/view/img/semicircular/me/velocidade-lento.webm new file mode 100755 index 0000000..f899d69 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-lento.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-normal.mp4 b/wikilibrasV2/view/img/semicircular/me/velocidade-normal.mp4 new file mode 100755 index 0000000..85b1b54 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-normal.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-normal.webm b/wikilibrasV2/view/img/semicircular/me/velocidade-normal.webm new file mode 100755 index 0000000..42072f5 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-normal.webm differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.mp4 b/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.mp4 new file mode 100755 index 0000000..e482e52 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.mp4 differ diff --git a/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.webm b/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.webm new file mode 100755 index 0000000..23a79a9 Binary files /dev/null and b/wikilibrasV2/view/img/semicircular/me/velocidade-rapido.webm differ diff --git a/wikilibrasV2/view/img/short-duration-icon.png b/wikilibrasV2/view/img/short-duration-icon.png new file mode 100755 index 0000000..b9d1a99 Binary files /dev/null and b/wikilibrasV2/view/img/short-duration-icon.png differ diff --git a/wikilibrasV2/view/img/slow-velocity-icon.png b/wikilibrasV2/view/img/slow-velocity-icon.png new file mode 100755 index 0000000..d7fd371 Binary files /dev/null and b/wikilibrasV2/view/img/slow-velocity-icon.png differ diff --git a/wikilibrasV2/view/img/thumbnail.png b/wikilibrasV2/view/img/thumbnail.png new file mode 100755 index 0000000..b6ace6e Binary files /dev/null and b/wikilibrasV2/view/img/thumbnail.png differ diff --git a/wikilibrasV2/view/js/configuration-screen.js b/wikilibrasV2/view/js/configuration-screen.js new file mode 100755 index 0000000..44038ac --- /dev/null +++ b/wikilibrasV2/view/js/configuration-screen.js @@ -0,0 +1,62 @@ +(function(configurationScreen, $, undefined) { + + function _isMenuSelected() { + return $('#configuration-menu .icon_container[select=true]').length > 0; + } + + function _getCurrentMainConfiguration() { + return _isMenuSelected() ? $( + '#configuration-menu .icon_container[select=true]').attr( + 'name') : ''; + } + + configurationScreen.isMenuSelected = function() { + return _isMenuSelected(); + } + + configurationScreen.getCurrentMainConfiguration = function() { + return _getCurrentMainConfiguration(); + } + + configurationScreen.setup = function() { + $('.icon_container').off('mouseover').on('mouseover', function() { + if (iconHelper.canHover(this)) { + iconHelper.enableIconHover(this, true); + } + }); + $('.icon_container').off('mouseout').on('mouseout', function() { + if (iconHelper.canHover(this)) { + iconHelper.enableIconHover(this, false); + } + }); + $('.config-menu-option').off('click').on('click', function() { + selectionPanel.show($(this).attr('panel')); + }); + $('#minimize-icon-container').off('click').on('click', function() { + $('#ref-video-container').hide(); + $('#minimize-icon-container').hide(); + $('#maximize-icon-container').show(); + }); + $('#maximize-icon-container').off('click').on('click', function() { + $('#ref-video-container').show(); + $('#maximize-icon-container').hide(); + $('#minimize-icon-container').show(); + }); + selectionPanel.setup(); + }; + + function _showConfigurationScreen(toShow) { + if (toShow) { + $("#configuration-screen").show(); + videoHelper.play("#ref-video-container video"); + } else { + $("#configuration-screen").hide(); + videoHelper.pause("#ref-video-container video"); + } + } + + configurationScreen.show = function(toShow) { + _showConfigurationScreen(toShow); + } + +}(window.configurationScreen = window.configurationScreen || {}, jQuery)); diff --git a/wikilibrasV2/view/js/external-libs/jquery.fileupload.js b/wikilibrasV2/view/js/external-libs/jquery.fileupload.js new file mode 100755 index 0000000..91b7254 --- /dev/null +++ b/wikilibrasV2/view/js/external-libs/jquery.fileupload.js @@ -0,0 +1,1477 @@ +/* + * jQuery File Upload Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2010, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/* jshint nomen:false */ +/* global define, require, window, document, location, Blob, FormData */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define([ + 'jquery', + 'jquery.ui.widget' + ], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory( + require('jquery'), + require('./vendor/jquery.ui.widget') + ); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Detect file input support, based on + // http://viljamis.com/blog/2012/file-upload-support-on-mobile/ + $.support.fileInput = !(new RegExp( + // Handle devices which give false positives for the feature detection: + '(Android (1\\.[0156]|2\\.[01]))' + + '|(Windows Phone (OS 7|8\\.0))|(XBLWP)|(ZuneWP)|(WPDesktop)' + + '|(w(eb)?OSBrowser)|(webOS)' + + '|(Kindle/(1\\.0|2\\.[05]|3\\.0))' + ).test(window.navigator.userAgent) || + // Feature detection for all other devices: + $('').prop('disabled')); + + // The FileReader API is not actually used, but works as feature detection, + // as some Safari versions (5?) support XHR file uploads via the FormData API, + // but not non-multipart XHR file uploads. + // window.XMLHttpRequestUpload is not available on IE10, so we check for + // window.ProgressEvent instead to detect XHR2 file upload capability: + $.support.xhrFileUpload = !!(window.ProgressEvent && window.FileReader); + $.support.xhrFormDataFileUpload = !!window.FormData; + + // Detect support for Blob slicing (required for chunked uploads): + $.support.blobSlice = window.Blob && (Blob.prototype.slice || + Blob.prototype.webkitSlice || Blob.prototype.mozSlice); + + // Helper function to create drag handlers for dragover/dragenter/dragleave: + function getDragHandler(type) { + var isDragOver = type === 'dragover'; + return function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var dataTransfer = e.dataTransfer; + if (dataTransfer && $.inArray('Files', dataTransfer.types) !== -1 && + this._trigger( + type, + $.Event(type, {delegatedEvent: e}) + ) !== false) { + e.preventDefault(); + if (isDragOver) { + dataTransfer.dropEffect = 'copy'; + } + } + }; + } + + // The fileupload widget listens for change events on file input fields defined + // via fileInput setting and paste or drop events of the given dropZone. + // In addition to the default jQuery Widget methods, the fileupload widget + // exposes the "add" and "send" methods, to add or directly send files using + // the fileupload API. + // By default, files added via file input selection, paste, drag & drop or + // "add" method are uploaded immediately, but it is possible to override + // the "add" callback option to queue file uploads. + $.widget('blueimp.fileupload', { + + options: { + // The drop target element(s), by the default the complete document. + // Set to null to disable drag & drop support: + dropZone: $(document), + // The paste target element(s), by the default undefined. + // Set to a DOM node or jQuery object to enable file pasting: + pasteZone: undefined, + // The file input field(s), that are listened to for change events. + // If undefined, it is set to the file input fields inside + // of the widget element on plugin initialization. + // Set to null to disable the change listener. + fileInput: undefined, + // By default, the file input field is replaced with a clone after + // each input field change event. This is required for iframe transport + // queues and allows change events to be fired for the same file + // selection, but can be disabled by setting the following option to false: + replaceFileInput: true, + // The parameter name for the file form data (the request argument name). + // If undefined or empty, the name property of the file input field is + // used, or "files[]" if the file input name property is also empty, + // can be a string or an array of strings: + paramName: undefined, + // By default, each file of a selection is uploaded using an individual + // request for XHR type uploads. Set to false to upload file + // selections in one request each: + singleFileUploads: true, + // To limit the number of files uploaded with one XHR request, + // set the following option to an integer greater than 0: + limitMultiFileUploads: undefined, + // The following option limits the number of files uploaded with one + // XHR request to keep the request size under or equal to the defined + // limit in bytes: + limitMultiFileUploadSize: undefined, + // Multipart file uploads add a number of bytes to each uploaded file, + // therefore the following option adds an overhead for each file used + // in the limitMultiFileUploadSize configuration: + limitMultiFileUploadSizeOverhead: 512, + // Set the following option to true to issue all file upload requests + // in a sequential order: + sequentialUploads: false, + // To limit the number of concurrent uploads, + // set the following option to an integer greater than 0: + limitConcurrentUploads: undefined, + // Set the following option to true to force iframe transport uploads: + forceIframeTransport: false, + // Set the following option to the location of a redirect url on the + // origin server, for cross-domain iframe transport uploads: + redirect: undefined, + // The parameter name for the redirect url, sent as part of the form + // data and set to 'redirect' if this option is empty: + redirectParamName: undefined, + // Set the following option to the location of a postMessage window, + // to enable postMessage transport uploads: + postMessage: undefined, + // By default, XHR file uploads are sent as multipart/form-data. + // The iframe transport is always using multipart/form-data. + // Set to false to enable non-multipart XHR uploads: + multipart: true, + // To upload large files in smaller chunks, set the following option + // to a preferred maximum chunk size. If set to 0, null or undefined, + // or the browser does not support the required Blob API, files will + // be uploaded as a whole. + maxChunkSize: undefined, + // When a non-multipart upload or a chunked multipart upload has been + // aborted, this option can be used to resume the upload by setting + // it to the size of the already uploaded bytes. This option is most + // useful when modifying the options object inside of the "add" or + // "send" callbacks, as the options are cloned for each file upload. + uploadedBytes: undefined, + // By default, failed (abort or error) file uploads are removed from the + // global progress calculation. Set the following option to false to + // prevent recalculating the global progress data: + recalculateProgress: true, + // Interval in milliseconds to calculate and trigger progress events: + progressInterval: 100, + // Interval in milliseconds to calculate progress bitrate: + bitrateInterval: 500, + // By default, uploads are started automatically when adding files: + autoUpload: true, + + // Error and info messages: + messages: { + uploadedBytes: 'Uploaded bytes exceed file size' + }, + + // Translation function, gets the message key to be translated + // and an object with context specific data as arguments: + i18n: function (message, context) { + message = this.messages[message] || message.toString(); + if (context) { + $.each(context, function (key, value) { + message = message.replace('{' + key + '}', value); + }); + } + return message; + }, + + // Additional form data to be sent along with the file uploads can be set + // using this option, which accepts an array of objects with name and + // value properties, a function returning such an array, a FormData + // object (for XHR file uploads), or a simple object. + // The form of the first fileInput is given as parameter to the function: + formData: function (form) { + return form.serializeArray(); + }, + + // The add callback is invoked as soon as files are added to the fileupload + // widget (via file input selection, drag & drop, paste or add API call). + // If the singleFileUploads option is enabled, this callback will be + // called once for each file in the selection for XHR file uploads, else + // once for each file selection. + // + // The upload starts when the submit method is invoked on the data parameter. + // The data object contains a files property holding the added files + // and allows you to override plugin options as well as define ajax settings. + // + // Listeners for this callback can also be bound the following way: + // .bind('fileuploadadd', func); + // + // data.submit() returns a Promise object and allows to attach additional + // handlers using jQuery's Deferred callbacks: + // data.submit().done(func).fail(func).always(func); + add: function (e, data) { + if (e.isDefaultPrevented()) { + return false; + } + if (data.autoUpload || (data.autoUpload !== false && + $(this).fileupload('option', 'autoUpload'))) { + data.process().done(function () { + data.submit(); + }); + } + }, + + // Other callbacks: + + // Callback for the submit event of each file upload: + // submit: function (e, data) {}, // .bind('fileuploadsubmit', func); + + // Callback for the start of each file upload request: + // send: function (e, data) {}, // .bind('fileuploadsend', func); + + // Callback for successful uploads: + // done: function (e, data) {}, // .bind('fileuploaddone', func); + + // Callback for failed (abort or error) uploads: + // fail: function (e, data) {}, // .bind('fileuploadfail', func); + + // Callback for completed (success, abort or error) requests: + // always: function (e, data) {}, // .bind('fileuploadalways', func); + + // Callback for upload progress events: + // progress: function (e, data) {}, // .bind('fileuploadprogress', func); + + // Callback for global upload progress events: + // progressall: function (e, data) {}, // .bind('fileuploadprogressall', func); + + // Callback for uploads start, equivalent to the global ajaxStart event: + // start: function (e) {}, // .bind('fileuploadstart', func); + + // Callback for uploads stop, equivalent to the global ajaxStop event: + // stop: function (e) {}, // .bind('fileuploadstop', func); + + // Callback for change events of the fileInput(s): + // change: function (e, data) {}, // .bind('fileuploadchange', func); + + // Callback for paste events to the pasteZone(s): + // paste: function (e, data) {}, // .bind('fileuploadpaste', func); + + // Callback for drop events of the dropZone(s): + // drop: function (e, data) {}, // .bind('fileuploaddrop', func); + + // Callback for dragover events of the dropZone(s): + // dragover: function (e) {}, // .bind('fileuploaddragover', func); + + // Callback for the start of each chunk upload request: + // chunksend: function (e, data) {}, // .bind('fileuploadchunksend', func); + + // Callback for successful chunk uploads: + // chunkdone: function (e, data) {}, // .bind('fileuploadchunkdone', func); + + // Callback for failed (abort or error) chunk uploads: + // chunkfail: function (e, data) {}, // .bind('fileuploadchunkfail', func); + + // Callback for completed (success, abort or error) chunk upload requests: + // chunkalways: function (e, data) {}, // .bind('fileuploadchunkalways', func); + + // The plugin options are used as settings object for the ajax calls. + // The following are jQuery ajax settings required for the file uploads: + processData: false, + contentType: false, + cache: false, + timeout: 0 + }, + + // A list of options that require reinitializing event listeners and/or + // special initialization code: + _specialOptions: [ + 'fileInput', + 'dropZone', + 'pasteZone', + 'multipart', + 'forceIframeTransport' + ], + + _blobSlice: $.support.blobSlice && function () { + var slice = this.slice || this.webkitSlice || this.mozSlice; + return slice.apply(this, arguments); + }, + + _BitrateTimer: function () { + this.timestamp = ((Date.now) ? Date.now() : (new Date()).getTime()); + this.loaded = 0; + this.bitrate = 0; + this.getBitrate = function (now, loaded, interval) { + var timeDiff = now - this.timestamp; + if (!this.bitrate || !interval || timeDiff > interval) { + this.bitrate = (loaded - this.loaded) * (1000 / timeDiff) * 8; + this.loaded = loaded; + this.timestamp = now; + } + return this.bitrate; + }; + }, + + _isXHRUpload: function (options) { + return !options.forceIframeTransport && + ((!options.multipart && $.support.xhrFileUpload) || + $.support.xhrFormDataFileUpload); + }, + + _getFormData: function (options) { + var formData; + if ($.type(options.formData) === 'function') { + return options.formData(options.form); + } + if ($.isArray(options.formData)) { + return options.formData; + } + if ($.type(options.formData) === 'object') { + formData = []; + $.each(options.formData, function (name, value) { + formData.push({name: name, value: value}); + }); + return formData; + } + return []; + }, + + _getTotal: function (files) { + var total = 0; + $.each(files, function (index, file) { + total += file.size || 1; + }); + return total; + }, + + _initProgressObject: function (obj) { + var progress = { + loaded: 0, + total: 0, + bitrate: 0 + }; + if (obj._progress) { + $.extend(obj._progress, progress); + } else { + obj._progress = progress; + } + }, + + _initResponseObject: function (obj) { + var prop; + if (obj._response) { + for (prop in obj._response) { + if (obj._response.hasOwnProperty(prop)) { + delete obj._response[prop]; + } + } + } else { + obj._response = {}; + } + }, + + _onProgress: function (e, data) { + if (e.lengthComputable) { + var now = ((Date.now) ? Date.now() : (new Date()).getTime()), + loaded; + if (data._time && data.progressInterval && + (now - data._time < data.progressInterval) && + e.loaded !== e.total) { + return; + } + data._time = now; + loaded = Math.floor( + e.loaded / e.total * (data.chunkSize || data._progress.total) + ) + (data.uploadedBytes || 0); + // Add the difference from the previously loaded state + // to the global loaded counter: + this._progress.loaded += (loaded - data._progress.loaded); + this._progress.bitrate = this._bitrateTimer.getBitrate( + now, + this._progress.loaded, + data.bitrateInterval + ); + data._progress.loaded = data.loaded = loaded; + data._progress.bitrate = data.bitrate = data._bitrateTimer.getBitrate( + now, + loaded, + data.bitrateInterval + ); + // Trigger a custom progress event with a total data property set + // to the file size(s) of the current upload and a loaded data + // property calculated accordingly: + this._trigger( + 'progress', + $.Event('progress', {delegatedEvent: e}), + data + ); + // Trigger a global progress event for all current file uploads, + // including ajax calls queued for sequential file uploads: + this._trigger( + 'progressall', + $.Event('progressall', {delegatedEvent: e}), + this._progress + ); + } + }, + + _initProgressListener: function (options) { + var that = this, + xhr = options.xhr ? options.xhr() : $.ajaxSettings.xhr(); + // Accesss to the native XHR object is required to add event listeners + // for the upload progress event: + if (xhr.upload) { + $(xhr.upload).bind('progress', function (e) { + var oe = e.originalEvent; + // Make sure the progress event properties get copied over: + e.lengthComputable = oe.lengthComputable; + e.loaded = oe.loaded; + e.total = oe.total; + that._onProgress(e, options); + }); + options.xhr = function () { + return xhr; + }; + } + }, + + _isInstanceOf: function (type, obj) { + // Cross-frame instanceof check + return Object.prototype.toString.call(obj) === '[object ' + type + ']'; + }, + + _initXHRData: function (options) { + var that = this, + formData, + file = options.files[0], + // Ignore non-multipart setting if not supported: + multipart = options.multipart || !$.support.xhrFileUpload, + paramName = $.type(options.paramName) === 'array' ? + options.paramName[0] : options.paramName; + options.headers = $.extend({}, options.headers); + if (options.contentRange) { + options.headers['Content-Range'] = options.contentRange; + } + if (!multipart || options.blob || !this._isInstanceOf('File', file)) { + options.headers['Content-Disposition'] = 'attachment; filename="' + + encodeURI(file.name) + '"'; + } + if (!multipart) { + options.contentType = file.type || 'application/octet-stream'; + options.data = options.blob || file; + } else if ($.support.xhrFormDataFileUpload) { + if (options.postMessage) { + // window.postMessage does not allow sending FormData + // objects, so we just add the File/Blob objects to + // the formData array and let the postMessage window + // create the FormData object out of this array: + formData = this._getFormData(options); + if (options.blob) { + formData.push({ + name: paramName, + value: options.blob + }); + } else { + $.each(options.files, function (index, file) { + formData.push({ + name: ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + value: file + }); + }); + } + } else { + if (that._isInstanceOf('FormData', options.formData)) { + formData = options.formData; + } else { + formData = new FormData(); + $.each(this._getFormData(options), function (index, field) { + formData.append(field.name, field.value); + }); + } + if (options.blob) { + formData.append(paramName, options.blob, file.name); + } else { + $.each(options.files, function (index, file) { + // This check allows the tests to run with + // dummy objects: + if (that._isInstanceOf('File', file) || + that._isInstanceOf('Blob', file)) { + formData.append( + ($.type(options.paramName) === 'array' && + options.paramName[index]) || paramName, + file, + file.uploadName || file.name + ); + } + }); + } + } + options.data = formData; + } + // Blob reference is not needed anymore, free memory: + options.blob = null; + }, + + _initIframeSettings: function (options) { + var targetHost = $('').prop('href', options.url).prop('host'); + // Setting the dataType to iframe enables the iframe transport: + options.dataType = 'iframe ' + (options.dataType || ''); + // The iframe transport accepts a serialized array as form data: + options.formData = this._getFormData(options); + // Add redirect url to form data on cross-domain uploads: + if (options.redirect && targetHost && targetHost !== location.host) { + options.formData.push({ + name: options.redirectParamName || 'redirect', + value: options.redirect + }); + } + }, + + _initDataSettings: function (options) { + if (this._isXHRUpload(options)) { + if (!this._chunkedUpload(options, true)) { + if (!options.data) { + this._initXHRData(options); + } + this._initProgressListener(options); + } + if (options.postMessage) { + // Setting the dataType to postmessage enables the + // postMessage transport: + options.dataType = 'postmessage ' + (options.dataType || ''); + } + } else { + this._initIframeSettings(options); + } + }, + + _getParamName: function (options) { + var fileInput = $(options.fileInput), + paramName = options.paramName; + if (!paramName) { + paramName = []; + fileInput.each(function () { + var input = $(this), + name = input.prop('name') || 'files[]', + i = (input.prop('files') || [1]).length; + while (i) { + paramName.push(name); + i -= 1; + } + }); + if (!paramName.length) { + paramName = [fileInput.prop('name') || 'files[]']; + } + } else if (!$.isArray(paramName)) { + paramName = [paramName]; + } + return paramName; + }, + + _initFormSettings: function (options) { + // Retrieve missing options from the input field and the + // associated form, if available: + if (!options.form || !options.form.length) { + options.form = $(options.fileInput.prop('form')); + // If the given file input doesn't have an associated form, + // use the default widget file input's form: + if (!options.form.length) { + options.form = $(this.options.fileInput.prop('form')); + } + } + options.paramName = this._getParamName(options); + if (!options.url) { + options.url = options.form.prop('action') || location.href; + } + // The HTTP request method must be "POST" or "PUT": + options.type = (options.type || + ($.type(options.form.prop('method')) === 'string' && + options.form.prop('method')) || '' + ).toUpperCase(); + if (options.type !== 'POST' && options.type !== 'PUT' && + options.type !== 'PATCH') { + options.type = 'POST'; + } + if (!options.formAcceptCharset) { + options.formAcceptCharset = options.form.attr('accept-charset'); + } + }, + + _getAJAXSettings: function (data) { + var options = $.extend({}, this.options, data); + this._initFormSettings(options); + this._initDataSettings(options); + return options; + }, + + // jQuery 1.6 doesn't provide .state(), + // while jQuery 1.8+ removed .isRejected() and .isResolved(): + _getDeferredState: function (deferred) { + if (deferred.state) { + return deferred.state(); + } + if (deferred.isResolved()) { + return 'resolved'; + } + if (deferred.isRejected()) { + return 'rejected'; + } + return 'pending'; + }, + + // Maps jqXHR callbacks to the equivalent + // methods of the given Promise object: + _enhancePromise: function (promise) { + promise.success = promise.done; + promise.error = promise.fail; + promise.complete = promise.always; + return promise; + }, + + // Creates and returns a Promise object enhanced with + // the jqXHR methods abort, success, error and complete: + _getXHRPromise: function (resolveOrReject, context, args) { + var dfd = $.Deferred(), + promise = dfd.promise(); + context = context || this.options.context || promise; + if (resolveOrReject === true) { + dfd.resolveWith(context, args); + } else if (resolveOrReject === false) { + dfd.rejectWith(context, args); + } + promise.abort = dfd.promise; + return this._enhancePromise(promise); + }, + + // Adds convenience methods to the data callback argument: + _addConvenienceMethods: function (e, data) { + var that = this, + getPromise = function (args) { + return $.Deferred().resolveWith(that, args).promise(); + }; + data.process = function (resolveFunc, rejectFunc) { + if (resolveFunc || rejectFunc) { + data._processQueue = this._processQueue = + (this._processQueue || getPromise([this])).pipe( + function () { + if (data.errorThrown) { + return $.Deferred() + .rejectWith(that, [data]).promise(); + } + return getPromise(arguments); + } + ).pipe(resolveFunc, rejectFunc); + } + return this._processQueue || getPromise([this]); + }; + data.submit = function () { + if (this.state() !== 'pending') { + data.jqXHR = this.jqXHR = + (that._trigger( + 'submit', + $.Event('submit', {delegatedEvent: e}), + this + ) !== false) && that._onSend(e, this); + } + return this.jqXHR || that._getXHRPromise(); + }; + data.abort = function () { + if (this.jqXHR) { + return this.jqXHR.abort(); + } + this.errorThrown = 'abort'; + that._trigger('fail', null, this); + return that._getXHRPromise(false); + }; + data.state = function () { + if (this.jqXHR) { + return that._getDeferredState(this.jqXHR); + } + if (this._processQueue) { + return that._getDeferredState(this._processQueue); + } + }; + data.processing = function () { + return !this.jqXHR && this._processQueue && that + ._getDeferredState(this._processQueue) === 'pending'; + }; + data.progress = function () { + return this._progress; + }; + data.response = function () { + return this._response; + }; + }, + + // Parses the Range header from the server response + // and returns the uploaded bytes: + _getUploadedBytes: function (jqXHR) { + var range = jqXHR.getResponseHeader('Range'), + parts = range && range.split('-'), + upperBytesPos = parts && parts.length > 1 && + parseInt(parts[1], 10); + return upperBytesPos && upperBytesPos + 1; + }, + + // Uploads a file in multiple, sequential requests + // by splitting the file up in multiple blob chunks. + // If the second parameter is true, only tests if the file + // should be uploaded in chunks, but does not invoke any + // upload requests: + _chunkedUpload: function (options, testOnly) { + options.uploadedBytes = options.uploadedBytes || 0; + var that = this, + file = options.files[0], + fs = file.size, + ub = options.uploadedBytes, + mcs = options.maxChunkSize || fs, + slice = this._blobSlice, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + upload; + if (!(this._isXHRUpload(options) && slice && (ub || mcs < fs)) || + options.data) { + return false; + } + if (testOnly) { + return true; + } + if (ub >= fs) { + file.error = options.i18n('uploadedBytes'); + return this._getXHRPromise( + false, + options.context, + [null, 'error', file.error] + ); + } + // The chunk upload method: + upload = function () { + // Clone the options object for each chunk upload: + var o = $.extend({}, options), + currentLoaded = o._progress.loaded; + o.blob = slice.call( + file, + ub, + ub + mcs, + file.type + ); + // Store the current chunk size, as the blob itself + // will be dereferenced after data processing: + o.chunkSize = o.blob.size; + // Expose the chunk bytes position range: + o.contentRange = 'bytes ' + ub + '-' + + (ub + o.chunkSize - 1) + '/' + fs; + // Process the upload data (the blob and potential form data): + that._initXHRData(o); + // Add progress listeners for this chunk upload: + that._initProgressListener(o); + jqXHR = ((that._trigger('chunksend', null, o) !== false && $.ajax(o)) || + that._getXHRPromise(false, o.context)) + .done(function (result, textStatus, jqXHR) { + ub = that._getUploadedBytes(jqXHR) || + (ub + o.chunkSize); + // Create a progress event if no final progress event + // with loaded equaling total has been triggered + // for this chunk: + if (currentLoaded + o.chunkSize - o._progress.loaded) { + that._onProgress($.Event('progress', { + lengthComputable: true, + loaded: ub - o.uploadedBytes, + total: ub - o.uploadedBytes + }), o); + } + options.uploadedBytes = o.uploadedBytes = ub; + o.result = result; + o.textStatus = textStatus; + o.jqXHR = jqXHR; + that._trigger('chunkdone', null, o); + that._trigger('chunkalways', null, o); + if (ub < fs) { + // File upload not yet complete, + // continue with the next chunk: + upload(); + } else { + dfd.resolveWith( + o.context, + [result, textStatus, jqXHR] + ); + } + }) + .fail(function (jqXHR, textStatus, errorThrown) { + o.jqXHR = jqXHR; + o.textStatus = textStatus; + o.errorThrown = errorThrown; + that._trigger('chunkfail', null, o); + that._trigger('chunkalways', null, o); + dfd.rejectWith( + o.context, + [jqXHR, textStatus, errorThrown] + ); + }); + }; + this._enhancePromise(promise); + promise.abort = function () { + return jqXHR.abort(); + }; + upload(); + return promise; + }, + + _beforeSend: function (e, data) { + if (this._active === 0) { + // the start callback is triggered when an upload starts + // and no other uploads are currently running, + // equivalent to the global ajaxStart event: + this._trigger('start'); + // Set timer for global bitrate progress calculation: + this._bitrateTimer = new this._BitrateTimer(); + // Reset the global progress values: + this._progress.loaded = this._progress.total = 0; + this._progress.bitrate = 0; + } + // Make sure the container objects for the .response() and + // .progress() methods on the data object are available + // and reset to their initial state: + this._initResponseObject(data); + this._initProgressObject(data); + data._progress.loaded = data.loaded = data.uploadedBytes || 0; + data._progress.total = data.total = this._getTotal(data.files) || 1; + data._progress.bitrate = data.bitrate = 0; + this._active += 1; + // Initialize the global progress values: + this._progress.loaded += data.loaded; + this._progress.total += data.total; + }, + + _onDone: function (result, textStatus, jqXHR, options) { + var total = options._progress.total, + response = options._response; + if (options._progress.loaded < total) { + // Create a progress event if no final progress event + // with loaded equaling total has been triggered: + this._onProgress($.Event('progress', { + lengthComputable: true, + loaded: total, + total: total + }), options); + } + response.result = options.result = result; + response.textStatus = options.textStatus = textStatus; + response.jqXHR = options.jqXHR = jqXHR; + this._trigger('done', null, options); + }, + + _onFail: function (jqXHR, textStatus, errorThrown, options) { + var response = options._response; + if (options.recalculateProgress) { + // Remove the failed (error or abort) file upload from + // the global progress calculation: + this._progress.loaded -= options._progress.loaded; + this._progress.total -= options._progress.total; + } + response.jqXHR = options.jqXHR = jqXHR; + response.textStatus = options.textStatus = textStatus; + response.errorThrown = options.errorThrown = errorThrown; + this._trigger('fail', null, options); + }, + + _onAlways: function (jqXHRorResult, textStatus, jqXHRorError, options) { + // jqXHRorResult, textStatus and jqXHRorError are added to the + // options object via done and fail callbacks + this._trigger('always', null, options); + }, + + _onSend: function (e, data) { + if (!data.submit) { + this._addConvenienceMethods(e, data); + } + var that = this, + jqXHR, + aborted, + slot, + pipe, + options = that._getAJAXSettings(data), + send = function () { + that._sending += 1; + // Set timer for bitrate progress calculation: + options._bitrateTimer = new that._BitrateTimer(); + jqXHR = jqXHR || ( + ((aborted || that._trigger( + 'send', + $.Event('send', {delegatedEvent: e}), + options + ) === false) && + that._getXHRPromise(false, options.context, aborted)) || + that._chunkedUpload(options) || $.ajax(options) + ).done(function (result, textStatus, jqXHR) { + that._onDone(result, textStatus, jqXHR, options); + }).fail(function (jqXHR, textStatus, errorThrown) { + that._onFail(jqXHR, textStatus, errorThrown, options); + }).always(function (jqXHRorResult, textStatus, jqXHRorError) { + that._onAlways( + jqXHRorResult, + textStatus, + jqXHRorError, + options + ); + that._sending -= 1; + that._active -= 1; + if (options.limitConcurrentUploads && + options.limitConcurrentUploads > that._sending) { + // Start the next queued upload, + // that has not been aborted: + var nextSlot = that._slots.shift(); + while (nextSlot) { + if (that._getDeferredState(nextSlot) === 'pending') { + nextSlot.resolve(); + break; + } + nextSlot = that._slots.shift(); + } + } + if (that._active === 0) { + // The stop callback is triggered when all uploads have + // been completed, equivalent to the global ajaxStop event: + that._trigger('stop'); + } + }); + return jqXHR; + }; + this._beforeSend(e, options); + if (this.options.sequentialUploads || + (this.options.limitConcurrentUploads && + this.options.limitConcurrentUploads <= this._sending)) { + if (this.options.limitConcurrentUploads > 1) { + slot = $.Deferred(); + this._slots.push(slot); + pipe = slot.pipe(send); + } else { + this._sequence = this._sequence.pipe(send, send); + pipe = this._sequence; + } + // Return the piped Promise object, enhanced with an abort method, + // which is delegated to the jqXHR object of the current upload, + // and jqXHR callbacks mapped to the equivalent Promise methods: + pipe.abort = function () { + aborted = [undefined, 'abort', 'abort']; + if (!jqXHR) { + if (slot) { + slot.rejectWith(options.context, aborted); + } + return send(); + } + return jqXHR.abort(); + }; + return this._enhancePromise(pipe); + } + return send(); + }, + + _onAdd: function (e, data) { + var that = this, + result = true, + options = $.extend({}, this.options, data), + files = data.files, + filesLength = files.length, + limit = options.limitMultiFileUploads, + limitSize = options.limitMultiFileUploadSize, + overhead = options.limitMultiFileUploadSizeOverhead, + batchSize = 0, + paramName = this._getParamName(options), + paramNameSet, + paramNameSlice, + fileSet, + i, + j = 0; + if (!filesLength) { + return false; + } + if (limitSize && files[0].size === undefined) { + limitSize = undefined; + } + if (!(options.singleFileUploads || limit || limitSize) || + !this._isXHRUpload(options)) { + fileSet = [files]; + paramNameSet = [paramName]; + } else if (!(options.singleFileUploads || limitSize) && limit) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i += limit) { + fileSet.push(files.slice(i, i + limit)); + paramNameSlice = paramName.slice(i, i + limit); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + } + } else if (!options.singleFileUploads && limitSize) { + fileSet = []; + paramNameSet = []; + for (i = 0; i < filesLength; i = i + 1) { + batchSize += files[i].size + overhead; + if (i + 1 === filesLength || + ((batchSize + files[i + 1].size + overhead) > limitSize) || + (limit && i + 1 - j >= limit)) { + fileSet.push(files.slice(j, i + 1)); + paramNameSlice = paramName.slice(j, i + 1); + if (!paramNameSlice.length) { + paramNameSlice = paramName; + } + paramNameSet.push(paramNameSlice); + j = i + 1; + batchSize = 0; + } + } + } else { + paramNameSet = paramName; + } + data.originalFiles = files; + $.each(fileSet || files, function (index, element) { + var newData = $.extend({}, data); + newData.files = fileSet ? element : [element]; + newData.paramName = paramNameSet[index]; + that._initResponseObject(newData); + that._initProgressObject(newData); + that._addConvenienceMethods(e, newData); + result = that._trigger( + 'add', + $.Event('add', {delegatedEvent: e}), + newData + ); + return result; + }); + return result; + }, + + _replaceFileInput: function (data) { + var input = data.fileInput, + inputClone = input.clone(true), + restoreFocus = input.is(document.activeElement); + // Add a reference for the new cloned file input to the data argument: + data.fileInputClone = inputClone; + $('
').append(inputClone)[0].reset(); + // Detaching allows to insert the fileInput on another form + // without loosing the file input value: + input.after(inputClone).detach(); + // If the fileInput had focus before it was detached, + // restore focus to the inputClone. + if (restoreFocus) { + inputClone.focus(); + } + // Avoid memory leaks with the detached file input: + $.cleanData(input.unbind('remove')); + // Replace the original file input element in the fileInput + // elements set with the clone, which has been copied including + // event handlers: + this.options.fileInput = this.options.fileInput.map(function (i, el) { + if (el === input[0]) { + return inputClone[0]; + } + return el; + }); + // If the widget has been initialized on the file input itself, + // override this.element with the file input clone: + if (input[0] === this.element[0]) { + this.element = inputClone; + } + }, + + _handleFileTreeEntry: function (entry, path) { + var that = this, + dfd = $.Deferred(), + errorHandler = function (e) { + if (e && !e.entry) { + e.entry = entry; + } + // Since $.when returns immediately if one + // Deferred is rejected, we use resolve instead. + // This allows valid files and invalid items + // to be returned together in one set: + dfd.resolve([e]); + }, + successHandler = function (entries) { + that._handleFileTreeEntries( + entries, + path + entry.name + '/' + ).done(function (files) { + dfd.resolve(files); + }).fail(errorHandler); + }, + readEntries = function () { + dirReader.readEntries(function (results) { + if (!results.length) { + successHandler(entries); + } else { + entries = entries.concat(results); + readEntries(); + } + }, errorHandler); + }, + dirReader, entries = []; + path = path || ''; + if (entry.isFile) { + if (entry._file) { + // Workaround for Chrome bug #149735 + entry._file.relativePath = path; + dfd.resolve(entry._file); + } else { + entry.file(function (file) { + file.relativePath = path; + dfd.resolve(file); + }, errorHandler); + } + } else if (entry.isDirectory) { + dirReader = entry.createReader(); + readEntries(); + } else { + // Return an empy list for file system items + // other than files or directories: + dfd.resolve([]); + } + return dfd.promise(); + }, + + _handleFileTreeEntries: function (entries, path) { + var that = this; + return $.when.apply( + $, + $.map(entries, function (entry) { + return that._handleFileTreeEntry(entry, path); + }) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _getDroppedFiles: function (dataTransfer) { + dataTransfer = dataTransfer || {}; + var items = dataTransfer.items; + if (items && items.length && (items[0].webkitGetAsEntry || + items[0].getAsEntry)) { + return this._handleFileTreeEntries( + $.map(items, function (item) { + var entry; + if (item.webkitGetAsEntry) { + entry = item.webkitGetAsEntry(); + if (entry) { + // Workaround for Chrome bug #149735: + entry._file = item.getAsFile(); + } + return entry; + } + return item.getAsEntry(); + }) + ); + } + return $.Deferred().resolve( + $.makeArray(dataTransfer.files) + ).promise(); + }, + + _getSingleFileInputFiles: function (fileInput) { + fileInput = $(fileInput); + var entries = fileInput.prop('webkitEntries') || + fileInput.prop('entries'), + files, + value; + if (entries && entries.length) { + return this._handleFileTreeEntries(entries); + } + files = $.makeArray(fileInput.prop('files')); + if (!files.length) { + value = fileInput.prop('value'); + if (!value) { + return $.Deferred().resolve([]).promise(); + } + // If the files property is not available, the browser does not + // support the File API and we add a pseudo File object with + // the input value as name with path information removed: + files = [{name: value.replace(/^.*\\/, '')}]; + } else if (files[0].name === undefined && files[0].fileName) { + // File normalization for Safari 4 and Firefox 3: + $.each(files, function (index, file) { + file.name = file.fileName; + file.size = file.fileSize; + }); + } + return $.Deferred().resolve(files).promise(); + }, + + _getFileInputFiles: function (fileInput) { + if (!(fileInput instanceof $) || fileInput.length === 1) { + return this._getSingleFileInputFiles(fileInput); + } + return $.when.apply( + $, + $.map(fileInput, this._getSingleFileInputFiles) + ).pipe(function () { + return Array.prototype.concat.apply( + [], + arguments + ); + }); + }, + + _onChange: function (e) { + var that = this, + data = { + fileInput: $(e.target), + form: $(e.target.form) + }; + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + if (that.options.replaceFileInput) { + that._replaceFileInput(data); + } + if (that._trigger( + 'change', + $.Event('change', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + }, + + _onPaste: function (e) { + var items = e.originalEvent && e.originalEvent.clipboardData && + e.originalEvent.clipboardData.items, + data = {files: []}; + if (items && items.length) { + $.each(items, function (index, item) { + var file = item.getAsFile && item.getAsFile(); + if (file) { + data.files.push(file); + } + }); + if (this._trigger( + 'paste', + $.Event('paste', {delegatedEvent: e}), + data + ) !== false) { + this._onAdd(e, data); + } + } + }, + + _onDrop: function (e) { + e.dataTransfer = e.originalEvent && e.originalEvent.dataTransfer; + var that = this, + dataTransfer = e.dataTransfer, + data = {}; + if (dataTransfer && dataTransfer.files && dataTransfer.files.length) { + e.preventDefault(); + this._getDroppedFiles(dataTransfer).always(function (files) { + data.files = files; + if (that._trigger( + 'drop', + $.Event('drop', {delegatedEvent: e}), + data + ) !== false) { + that._onAdd(e, data); + } + }); + } + }, + + _onDragOver: getDragHandler('dragover'), + + _onDragEnter: getDragHandler('dragenter'), + + _onDragLeave: getDragHandler('dragleave'), + + _initEventHandlers: function () { + if (this._isXHRUpload(this.options)) { + this._on(this.options.dropZone, { + dragover: this._onDragOver, + drop: this._onDrop, + // event.preventDefault() on dragenter is required for IE10+: + dragenter: this._onDragEnter, + // dragleave is not required, but added for completeness: + dragleave: this._onDragLeave + }); + this._on(this.options.pasteZone, { + paste: this._onPaste + }); + } + if ($.support.fileInput) { + this._on(this.options.fileInput, { + change: this._onChange + }); + } + }, + + _destroyEventHandlers: function () { + this._off(this.options.dropZone, 'dragenter dragleave dragover drop'); + this._off(this.options.pasteZone, 'paste'); + this._off(this.options.fileInput, 'change'); + }, + + _setOption: function (key, value) { + var reinit = $.inArray(key, this._specialOptions) !== -1; + if (reinit) { + this._destroyEventHandlers(); + } + this._super(key, value); + if (reinit) { + this._initSpecialOptions(); + this._initEventHandlers(); + } + }, + + _initSpecialOptions: function () { + var options = this.options; + if (options.fileInput === undefined) { + options.fileInput = this.element.is('input[type="file"]') ? + this.element : this.element.find('input[type="file"]'); + } else if (!(options.fileInput instanceof $)) { + options.fileInput = $(options.fileInput); + } + if (!(options.dropZone instanceof $)) { + options.dropZone = $(options.dropZone); + } + if (!(options.pasteZone instanceof $)) { + options.pasteZone = $(options.pasteZone); + } + }, + + _getRegExp: function (str) { + var parts = str.split('/'), + modifiers = parts.pop(); + parts.shift(); + return new RegExp(parts.join('/'), modifiers); + }, + + _isRegExpOption: function (key, value) { + return key !== 'url' && $.type(value) === 'string' && + /^\/.*\/[igm]{0,3}$/.test(value); + }, + + _initDataAttributes: function () { + var that = this, + options = this.options, + data = this.element.data(); + // Initialize options set via HTML5 data-attributes: + $.each( + this.element[0].attributes, + function (index, attr) { + var key = attr.name.toLowerCase(), + value; + if (/^data-/.test(key)) { + // Convert hyphen-ated key to camelCase: + key = key.slice(5).replace(/-[a-z]/g, function (str) { + return str.charAt(1).toUpperCase(); + }); + value = data[key]; + if (that._isRegExpOption(key, value)) { + value = that._getRegExp(value); + } + options[key] = value; + } + } + ); + }, + + _create: function () { + this._initDataAttributes(); + this._initSpecialOptions(); + this._slots = []; + this._sequence = this._getXHRPromise(true); + this._sending = this._active = 0; + this._initProgressObject(this); + this._initEventHandlers(); + }, + + // This method is exposed to the widget API and allows to query + // the number of active uploads: + active: function () { + return this._active; + }, + + // This method is exposed to the widget API and allows to query + // the widget upload progress. + // It returns an object with loaded, total and bitrate properties + // for the running uploads: + progress: function () { + return this._progress; + }, + + // This method is exposed to the widget API and allows adding files + // using the fileupload API. The data parameter accepts an object which + // must have a files property and can contain additional options: + // .fileupload('add', {files: filesList}); + add: function (data) { + var that = this; + if (!data || this.options.disabled) { + return; + } + if (data.fileInput && !data.files) { + this._getFileInputFiles(data.fileInput).always(function (files) { + data.files = files; + that._onAdd(null, data); + }); + } else { + data.files = $.makeArray(data.files); + this._onAdd(null, data); + } + }, + + // This method is exposed to the widget API and allows sending files + // using the fileupload API. The data parameter accepts an object which + // must have a files or fileInput property and can contain additional options: + // .fileupload('send', {files: filesList}); + // The method returns a Promise object for the file upload call. + send: function (data) { + if (data && !this.options.disabled) { + if (data.fileInput && !data.files) { + var that = this, + dfd = $.Deferred(), + promise = dfd.promise(), + jqXHR, + aborted; + promise.abort = function () { + aborted = true; + if (jqXHR) { + return jqXHR.abort(); + } + dfd.reject(null, 'abort', 'abort'); + return promise; + }; + this._getFileInputFiles(data.fileInput).always( + function (files) { + if (aborted) { + return; + } + if (!files.length) { + dfd.reject(); + return; + } + data.files = files; + jqXHR = that._onSend(null, data); + jqXHR.then( + function (result, textStatus, jqXHR) { + dfd.resolve(result, textStatus, jqXHR); + }, + function (jqXHR, textStatus, errorThrown) { + dfd.reject(jqXHR, textStatus, errorThrown); + } + ); + } + ); + return this._enhancePromise(promise); + } + data.files = $.makeArray(data.files); + if (data.files.length) { + return this._onSend(null, data); + } + } + return this._getXHRPromise(false, data && data.context); + } + + }); + +})); diff --git a/wikilibrasV2/view/js/external-libs/jquery.iframe-transport.js b/wikilibrasV2/view/js/external-libs/jquery.iframe-transport.js new file mode 100755 index 0000000..a7d34e0 --- /dev/null +++ b/wikilibrasV2/view/js/external-libs/jquery.iframe-transport.js @@ -0,0 +1,217 @@ +/* + * jQuery Iframe Transport Plugin + * https://github.com/blueimp/jQuery-File-Upload + * + * Copyright 2011, Sebastian Tschan + * https://blueimp.net + * + * Licensed under the MIT license: + * http://www.opensource.org/licenses/MIT + */ + +/* global define, require, window, document */ + +(function (factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // Register as an anonymous AMD module: + define(['jquery'], factory); + } else if (typeof exports === 'object') { + // Node/CommonJS: + factory(require('jquery')); + } else { + // Browser globals: + factory(window.jQuery); + } +}(function ($) { + 'use strict'; + + // Helper variable to create unique names for the transport iframes: + var counter = 0; + + // The iframe transport accepts four additional options: + // options.fileInput: a jQuery collection of file input fields + // options.paramName: the parameter name for the file form data, + // overrides the name property of the file input field(s), + // can be a string or an array of strings. + // options.formData: an array of objects with name and value properties, + // equivalent to the return data of .serializeArray(), e.g.: + // [{name: 'a', value: 1}, {name: 'b', value: 2}] + // options.initialIframeSrc: the URL of the initial iframe src, + // by default set to "javascript:false;" + $.ajaxTransport('iframe', function (options) { + if (options.async) { + // javascript:false as initial iframe src + // prevents warning popups on HTTPS in IE6: + /*jshint scripturl: true */ + var initialIframeSrc = options.initialIframeSrc || 'javascript:false;', + /*jshint scripturl: false */ + form, + iframe, + addParamChar; + return { + send: function (_, completeCallback) { + form = $('
'); + form.attr('accept-charset', options.formAcceptCharset); + addParamChar = /\?/.test(options.url) ? '&' : '?'; + // XDomainRequest only supports GET and POST: + if (options.type === 'DELETE') { + options.url = options.url + addParamChar + '_method=DELETE'; + options.type = 'POST'; + } else if (options.type === 'PUT') { + options.url = options.url + addParamChar + '_method=PUT'; + options.type = 'POST'; + } else if (options.type === 'PATCH') { + options.url = options.url + addParamChar + '_method=PATCH'; + options.type = 'POST'; + } + // IE versions below IE8 cannot set the name property of + // elements that have already been added to the DOM, + // so we set the name along with the iframe HTML markup: + counter += 1; + iframe = $( + '' + ).bind('load', function () { + var fileInputClones, + paramNames = $.isArray(options.paramName) ? + options.paramName : [options.paramName]; + iframe + .unbind('load') + .bind('load', function () { + var response; + // Wrap in a try/catch block to catch exceptions thrown + // when trying to access cross-domain iframe contents: + try { + response = iframe.contents(); + // Google Chrome and Firefox do not throw an + // exception when calling iframe.contents() on + // cross-domain requests, so we unify the response: + if (!response.length || !response[0].firstChild) { + throw new Error(); + } + } catch (e) { + response = undefined; + } + // The complete callback returns the + // iframe content document as response object: + completeCallback( + 200, + 'success', + {'iframe': response} + ); + // Fix for IE endless progress bar activity bug + // (happens on form submits to iframe targets): + $('') + .appendTo(form); + window.setTimeout(function () { + // Removing the form in a setTimeout call + // allows Chrome's developer tools to display + // the response result + form.remove(); + }, 0); + }); + form + .prop('target', iframe.prop('name')) + .prop('action', options.url) + .prop('method', options.type); + if (options.formData) { + $.each(options.formData, function (index, field) { + $('') + .prop('name', field.name) + .val(field.value) + .appendTo(form); + }); + } + if (options.fileInput && options.fileInput.length && + options.type === 'POST') { + fileInputClones = options.fileInput.clone(); + // Insert a clone for each file input field: + options.fileInput.after(function (index) { + return fileInputClones[index]; + }); + if (options.paramName) { + options.fileInput.each(function (index) { + $(this).prop( + 'name', + paramNames[index] || options.paramName + ); + }); + } + // Appending the file input fields to the hidden form + // removes them from their original location: + form + .append(options.fileInput) + .prop('enctype', 'multipart/form-data') + // enctype must be set as encoding for IE: + .prop('encoding', 'multipart/form-data'); + // Remove the HTML5 form attribute from the input(s): + options.fileInput.removeAttr('form'); + } + form.submit(); + // Insert the file input fields at their original location + // by replacing the clones with the originals: + if (fileInputClones && fileInputClones.length) { + options.fileInput.each(function (index, input) { + var clone = $(fileInputClones[index]); + // Restore the original name and form properties: + $(input) + .prop('name', clone.prop('name')) + .attr('form', clone.attr('form')); + clone.replaceWith(input); + }); + } + }); + form.append(iframe).appendTo(document.body); + }, + abort: function () { + if (iframe) { + // javascript:false as iframe src aborts the request + // and prevents warning popups on HTTPS in IE6. + // concat is used to avoid the "Script URL" JSLint error: + iframe + .unbind('load') + .prop('src', initialIframeSrc); + } + if (form) { + form.remove(); + } + } + }; + } + }); + + // The iframe transport returns the iframe content document as response. + // The following adds converters from iframe to text, json, html, xml + // and script. + // Please note that the Content-Type for JSON responses has to be text/plain + // or text/html, if the browser doesn't include application/json in the + // Accept header, else IE will show a download dialog. + // The Content-Type for XML responses on the other hand has to be always + // application/xml or text/xml, so IE properly parses the XML response. + // See also + // https://github.com/blueimp/jQuery-File-Upload/wiki/Setup#content-type-negotiation + $.ajaxSetup({ + converters: { + 'iframe text': function (iframe) { + return iframe && $(iframe[0].body).text(); + }, + 'iframe json': function (iframe) { + return iframe && $.parseJSON($(iframe[0].body).text()); + }, + 'iframe html': function (iframe) { + return iframe && $(iframe[0].body).html(); + }, + 'iframe xml': function (iframe) { + var xmlDoc = iframe && iframe[0]; + return xmlDoc && $.isXMLDoc(xmlDoc) ? xmlDoc : + $.parseXML((xmlDoc.XMLDocument && xmlDoc.XMLDocument.xml) || + $(xmlDoc.body).html()); + }, + 'iframe script': function (iframe) { + return iframe && $.globalEval($(iframe[0].body).text()); + } + } + }); + +})); diff --git a/wikilibrasV2/view/js/external-libs/jquery.scrollTo.js b/wikilibrasV2/view/js/external-libs/jquery.scrollTo.js new file mode 100755 index 0000000..7ba1776 --- /dev/null +++ b/wikilibrasV2/view/js/external-libs/jquery.scrollTo.js @@ -0,0 +1,210 @@ +/*! + * jQuery.scrollTo + * Copyright (c) 2007-2015 Ariel Flesler - afleslergmailcom | http://flesler.blogspot.com + * Licensed under MIT + * http://flesler.blogspot.com/2007/10/jqueryscrollto.html + * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery + * @author Ariel Flesler + * @version 2.1.2 + */ +;(function(factory) { + 'use strict'; + if (typeof define === 'function' && define.amd) { + // AMD + define(['jquery'], factory); + } else if (typeof module !== 'undefined' && module.exports) { + // CommonJS + module.exports = factory(require('jquery')); + } else { + // Global + factory(jQuery); + } +})(function($) { + 'use strict'; + + var $scrollTo = $.scrollTo = function(target, duration, settings) { + return $(window).scrollTo(target, duration, settings); + }; + + $scrollTo.defaults = { + axis:'xy', + duration: 0, + limit:true + }; + + function isWin(elem) { + return !elem.nodeName || + $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1; + } + + $.fn.scrollTo = function(target, duration, settings) { + if (typeof duration === 'object') { + settings = duration; + duration = 0; + } + if (typeof settings === 'function') { + settings = { onAfter:settings }; + } + if (target === 'max') { + target = 9e9; + } + + settings = $.extend({}, $scrollTo.defaults, settings); + // Speed is still recognized for backwards compatibility + duration = duration || settings.duration; + // Make sure the settings are given right + var queue = settings.queue && settings.axis.length > 1; + if (queue) { + // Let's keep the overall duration + duration /= 2; + } + settings.offset = both(settings.offset); + settings.over = both(settings.over); + + return this.each(function() { + // Null target yields nothing, just like jQuery does + if (target === null) return; + + var win = isWin(this), + elem = win ? this.contentWindow || window : this, + $elem = $(elem), + targ = target, + attr = {}, + toff; + + switch (typeof targ) { + // A number will pass the regex + case 'number': + case 'string': + if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { + targ = both(targ); + // We are done + break; + } + // Relative/Absolute selector + targ = win ? $(targ) : $(targ, elem); + /* falls through */ + case 'object': + if (targ.length === 0) return; + // DOMElement / jQuery + if (targ.is || targ.style) { + // Get the real position of the target + toff = (targ = $(targ)).offset(); + } + } + + var offset = $.isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; + + $.each(settings.axis.split(''), function(i, axis) { + var Pos = axis === 'x' ? 'Left' : 'Top', + pos = Pos.toLowerCase(), + key = 'scroll' + Pos, + prev = $elem[key](), + max = $scrollTo.max(elem, axis); + + if (toff) {// jQuery / DOMElement + attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]); + + // If it's a dom element, reduce the margin + if (settings.margin) { + attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0; + attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0; + } + + attr[key] += offset[pos] || 0; + + if (settings.over[pos]) { + // Scroll to a fraction of its width/height + attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos]; + } + } else { + var val = targ[pos]; + // Handle percentage values + attr[key] = val.slice && val.slice(-1) === '%' ? + parseFloat(val) / 100 * max + : val; + } + + // Number or 'number' + if (settings.limit && /^\d+$/.test(attr[key])) { + // Check the limits + attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); + } + + // Don't waste time animating, if there's no need. + if (!i && settings.axis.length > 1) { + if (prev === attr[key]) { + // No animation needed + attr = {}; + } else if (queue) { + // Intermediate animation + animate(settings.onAfterFirst); + // Don't animate this axis again in the next iteration. + attr = {}; + } + } + }); + + animate(settings.onAfter); + + function animate(callback) { + var opts = $.extend({}, settings, { + // The queue setting conflicts with animate() + // Force it to always be true + queue: true, + duration: duration, + complete: callback && function() { + callback.call(elem, targ, settings); + } + }); + $elem.animate(attr, opts); + } + }); + }; + + // Max scrolling position, works on quirks mode + // It only fails (not too badly) on IE, quirks mode. + $scrollTo.max = function(elem, axis) { + var Dim = axis === 'x' ? 'Width' : 'Height', + scroll = 'scroll'+Dim; + + if (!isWin(elem)) + return elem[scroll] - $(elem)[Dim.toLowerCase()](); + + var size = 'client' + Dim, + doc = elem.ownerDocument || elem.document, + html = doc.documentElement, + body = doc.body; + + return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]); + }; + + function both(val) { + return $.isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val }; + } + + // Add special hooks so that window scroll properties can be animated + $.Tween.propHooks.scrollLeft = + $.Tween.propHooks.scrollTop = { + get: function(t) { + return $(t.elem)[t.prop](); + }, + set: function(t) { + var curr = this.get(t); + // If interrupt is true and user scrolled, stop animating + if (t.options.interrupt && t._last && t._last !== curr) { + return $(t.elem).stop(); + } + var next = Math.round(t.now); + // Don't waste CPU + // Browsers don't render floating point scroll + if (curr !== next) { + $(t.elem)[t.prop](next); + t._last = this.get(t); + } + } + }; + + // AMD requirement + return $scrollTo; +}); diff --git a/wikilibrasV2/view/js/external-libs/jquery.ui.widget.js b/wikilibrasV2/view/js/external-libs/jquery.ui.widget.js new file mode 100755 index 0000000..e08df3f --- /dev/null +++ b/wikilibrasV2/view/js/external-libs/jquery.ui.widget.js @@ -0,0 +1,572 @@ +/*! jQuery UI - v1.11.4+CommonJS - 2015-08-28 +* http://jqueryui.com +* Includes: widget.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 if ( typeof exports === "object" ) { + + // Node/CommonJS + factory( require( "jquery" ) ); + + } else { + + // Browser globals + factory( jQuery ); + } +}(function( $ ) { +/*! + * 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: "
", + 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; + + + +})); diff --git a/wikilibrasV2/view/js/external-libs/js.cookie.js b/wikilibrasV2/view/js/external-libs/js.cookie.js new file mode 100755 index 0000000..e808108 --- /dev/null +++ b/wikilibrasV2/view/js/external-libs/js.cookie.js @@ -0,0 +1,145 @@ +/*! + * JavaScript Cookie v2.0.4 + * https://github.com/js-cookie/js-cookie + * + * Copyright 2006, 2015 Klaus Hartl & Fagner Brack + * Released under the MIT license + */ +(function(factory) { + if (typeof define === 'function' && define.amd) { + define(factory); + } else if (typeof exports === 'object') { + module.exports = factory(); + } else { + var _OldCookies = window.Cookies; + var api = window.Cookies = factory(); + api.noConflict = function() { + window.Cookies = _OldCookies; + return api; + }; + } +}(function() { + function extend() { + var i = 0; + var result = {}; + for (; i < arguments.length; i++) { + var attributes = arguments[ i ]; + for (var key in attributes) { + result[key] = attributes[key]; + } + } + return result; + } + + function init(converter) { + function api(key, value, attributes) { + var result; + + // Write + + if (arguments.length > 1) { + attributes = extend({ + path: '/' + }, api.defaults, attributes); + + if (typeof attributes.expires === 'number') { + var expires = new Date(); + expires.setMilliseconds(expires.getMilliseconds() + attributes.expires * 864e+5); + attributes.expires = expires; + } + + try { + result = JSON.stringify(value); + if (/^[\{\[]/.test(result)) { + value = result; + } + } catch (e) {} + + if (!converter.write) { + value = encodeURIComponent(String(value)) + .replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g, decodeURIComponent); + } else { + value = converter.write(value, key); + } + + key = encodeURIComponent(String(key)); + key = key.replace(/%(23|24|26|2B|5E|60|7C)/g, decodeURIComponent); + key = key.replace(/[\(\)]/g, escape); + + return (document.cookie = [ + key, '=', value, + attributes.expires && '; expires=' + attributes.expires.toUTCString(), // use expires attribute, max-age is not supported by IE + attributes.path && '; path=' + attributes.path, + attributes.domain && '; domain=' + attributes.domain, + attributes.secure ? '; secure' : '' + ].join('')); + } + + // Read + + if (!key) { + result = {}; + } + + // To prevent the for loop in the first place assign an empty array + // in case there are no cookies at all. Also prevents odd result when + // calling "get()" + var cookies = document.cookie ? document.cookie.split('; ') : []; + var rdecode = /(%[0-9A-Z]{2})+/g; + var i = 0; + + for (; i < cookies.length; i++) { + var parts = cookies[i].split('='); + var name = parts[0].replace(rdecode, decodeURIComponent); + var cookie = parts.slice(1).join('='); + + if (cookie.charAt(0) === '"') { + cookie = cookie.slice(1, -1); + } + + try { + cookie = converter.read ? + converter.read(cookie, name) : converter(cookie, name) || + cookie.replace(rdecode, decodeURIComponent); + + if (this.json) { + try { + cookie = JSON.parse(cookie); + } catch (e) {} + } + + if (key === name) { + result = cookie; + break; + } + + if (!key) { + result[name] = cookie; + } + } catch (e) {} + } + + return result; + } + + api.get = api.set = api; + api.getJSON = function() { + return api.apply({ + json: true + }, [].slice.call(arguments)); + }; + api.defaults = {}; + + api.remove = function(key, attributes) { + api(key, '', extend(attributes, { + expires: -1 + })); + }; + + api.withConverter = init; + + return api; + } + + return init(function() {}); +})); diff --git a/wikilibrasV2/view/js/helpers/icon-helper.js b/wikilibrasV2/view/js/helpers/icon-helper.js new file mode 100755 index 0000000..9cc0f4f --- /dev/null +++ b/wikilibrasV2/view/js/helpers/icon-helper.js @@ -0,0 +1,85 @@ +(function(iconHelper, $, undefined) { + + var baseUrl = ''; + + function _changeImage(img, url) { + img.attr('src', url); + } + + function _enableIconHover(container, isHover) { + var img = $(container).find('img').first(); + var hover_img_url = baseUrl + '/img/' + $(container).attr('name'); + if (isHover) { + hover_img_url += '-icon-hover.png'; + } else { + hover_img_url += '-icon.png'; + } + _changeImage(img, hover_img_url); + } + + function _enableIconCheck(container, isCheck) { + var img = $(container).find('img').first(); + var check_img_url = baseUrl + '/img/' + $(container).attr('name'); + if (isCheck) { + check_img_url += '-icon-check.png'; + } else { + check_img_url += '-icon.png'; + } + _changeImage(img, check_img_url); + } + + function _selectIcon(iconName, isSelect, panel) { + panel = typeof panel == 'undefined' ? '' : '[panel=' + panel + ']'; + var icon_id = '.icon_container[name=' + iconName + ']' + panel; + _enableIconHover(icon_id, isSelect); + $(icon_id).attr('select', isSelect); + } + + function _deselectIcon(iconName, parent) { + _selectIcon(iconName, false, parent); + } + + function _setupCheckIcon(option, isCheck, panel) { + panel = typeof panel == 'undefined' ? '' : '[panel=' + panel + ']'; + var icon_id = '.icon_container[name=' + option + ']' + panel; + iconHelper.enableIconCheck(icon_id, isCheck); + $('.icon_container[name=' + option + ']' + panel).attr('complete', + isCheck); + } + + function _canHover(el) { + var incompleteConfig = typeof $(el).attr('complete') == 'undefined' + || $(el).attr('complete') == 'false'; + return (!configurationScreen.isMenuSelected() && incompleteConfig) + || (typeof $(el).attr('select') == 'undefined' && incompleteConfig); + } + + iconHelper.enableIconHover = function(container, isHover) { + _enableIconHover(container, isHover); + } + + iconHelper.enableIconCheck = function(container, isCheck) { + _enableIconCheck(container, isCheck); + } + + iconHelper.setupCheckIcon = function(option, isCheck, panel) { + _setupCheckIcon(option, isCheck, panel); + } + + iconHelper.selectIcon = function(iconName, isSelect, panel) { + _selectIcon(iconName, isSelect, panel); + } + + iconHelper.deselectIcon = function(iconName, parent) { + _deselectIcon(iconName, parent); + } + + iconHelper.canHover = function(el) { + return _canHover(el); + } + + iconHelper.setup = function(url) { + baseUrl = url; + }; + +}(window.iconHelper = window.iconHelper || {}, jQuery)); diff --git a/wikilibrasV2/view/js/helpers/load-html-helper.js b/wikilibrasV2/view/js/helpers/load-html-helper.js new file mode 100755 index 0000000..ea3aef1 --- /dev/null +++ b/wikilibrasV2/view/js/helpers/load-html-helper.js @@ -0,0 +1,106 @@ +(function(loadHtmlHelper, $, undefined) { + + var baseUrl = ''; + var templatesUrl = ''; + + _preprocessHtml = function(data) { + var matchSubConfig = data.match(/sub(?:C|c)onfig="(.*?)"/); + var currentMainConfig = dynworkflow.getMainConfig(); // right-hand or left-hand + var goodData = data; + + var isRightHand = function(hand) { + return hand === 'right-hand'; + }; + + var replaceConfigurationTag = function(data, mainConfig) { + if (isRightHand(mainConfig)) { + return data.replace(/{{ configuracao }}/g, 'cmd'); + } else { + return data.replace(/{{ configuracao }}/g, 'cme'); + } + }; + + var replaceOrientationTag = function(data, mainConfig) { + if (isRightHand(mainConfig)) { + return data.replace(/{{ orientacao }}/g, 'ord'); + } else { + return data.replace(/{{ orientacao }}/g, 'ore'); + } + }; + + var replaceHandFolderTag = function(data, mainConfig) { + if (isRightHand(mainConfig)) { + return data.replace(/{{ hand-folder }}/g, 'md'); + } else { + return data.replace(/{{ hand-folder }}/g, 'me'); + } + }; + + var replaceMovementNameTag = function(data, mainConfig) { + var selectedMovement = movement + .getPreviousSelectedMovement(mainConfig); + if (typeof selectedMovement != "undefined") { + return data.replace(/{{ movement-name }}/g, selectedMovement); + } + return data; + }; + + if (matchSubConfig) { // case defined + // There is no specific(right or left hand dependent) assets for: articulacao, duracao, expressao, movimento, transicao + // Specific configurations: configuracao, orientacao + // possible values on the side as comment + var subConfig = matchSubConfig[1]; // articulacao | configuracao | duracao | expressao | movimento | orientacao | transicao + + // possible subconfigs that need changing + switch (subConfig) { + case 'configuracao': + goodData = replaceConfigurationTag(data, currentMainConfig); + break; + case 'configuracao-retilineo': + goodData = replaceConfigurationTag(data, currentMainConfig); + break; + case 'orientacao': + goodData = replaceOrientationTag(data, currentMainConfig); + break; + case 'orientacao-retilineo': + goodData = replaceOrientationTag(data, currentMainConfig); + break; + } + } + goodData = replaceHandFolderTag(goodData, currentMainConfig); + goodData = replaceMovementNameTag(goodData, currentMainConfig); + goodData = goodData.replace(/{{ hand }}/g, currentMainConfig); + return goodData.replace(/{{ server }}/g, baseUrl); + }; + + function _getHtml(templatePath, target, toReplace, toPrepend, callback) { + var url = templatesUrl + templatePath; + $.get(url, function(data) { + var processedHtml = _preprocessHtml(data); + + if (toReplace) { + $(target).html(processedHtml); + } else if (toPrepend) { + $(target).prepend(processedHtml); + } else { + $(target).append(processedHtml); + } + }).done(function() { + callback && callback(); // call if defined + }); + } + + loadHtmlHelper.append = function(templatePath, target, toPrepend, callback) { + _getHtml(templatePath, target, false, toPrepend, callback); + }; + + loadHtmlHelper.load = function(templatePath, target, callback) { + _getHtml(templatePath, target, true, false, callback); + }; + + loadHtmlHelper.setup = function(url) { + baseUrl = url; + templatesUrl = baseUrl + "/templates"; + }; + +}(window.loadHtmlHelper = window.loadHtmlHelper || {}, jQuery)); diff --git a/wikilibrasV2/view/js/helpers/pybossa-api-helper.js b/wikilibrasV2/view/js/helpers/pybossa-api-helper.js new file mode 100755 index 0000000..8a79e28 --- /dev/null +++ b/wikilibrasV2/view/js/helpers/pybossa-api-helper.js @@ -0,0 +1,44 @@ +(function(pybossaApiHelper, $, undefined) { + + var pybossaEndpoint = ''; + var projectName = ''; + + function _getProjectId() { + return $.ajax({ + url : pybossaEndpoint + '/api/project?short_name=' + projectName + }); + } + + function _getUserProgress() { + return $.ajax({ + url : pybossaEndpoint + '/api/project/' + projectName + '/userprogress', + cache : false, + dataType : 'json' + }); + } + + function _getAnswers(projectId, userId) { + return $.ajax({ + url : pybossaEndpoint + '/api/taskrun?project_id=' + projectId + + '&user_id=' + userId + }); + } + + pybossaApiHelper.setup = function(endpoint, name) { + pybossaEndpoint = endpoint; + projectName = name; + } + + pybossaApiHelper.getProjectId = function() { + return _getProjectId(); + } + + pybossaApiHelper.getUserProgress = function() { + return _getUserProgress(); + } + + pybossaApiHelper.getAnswers = function(projectId, userId) { + return _getAnswers(projectId, userId); + } + +}(window.pybossaApiHelper = window.pybossaApiHelper || {}, jQuery)); diff --git a/wikilibrasV2/view/js/helpers/tmpJSONParser.js b/wikilibrasV2/view/js/helpers/tmpJSONParser.js new file mode 100755 index 0000000..0c0dc60 --- /dev/null +++ b/wikilibrasV2/view/js/helpers/tmpJSONParser.js @@ -0,0 +1,124 @@ +(function(tmpJSONParser, $, undefined) { + + var base_parameter_json = {}; + var movement_parameter_json = {}; + + function _setupBaseParameterJSON(tmpJSON) { + base_parameter_json['userId'] = tmpJSON['userId']; + base_parameter_json['sinal'] = tmpJSON['sinal']; + base_parameter_json['interpolacao'] = 'normal'; + base_parameter_json['movimentos'] = []; + movement_parameter_json = { + 'facial': {}, + 'mao_direita': {}, + 'mao_esquerda': {} + }; + base_parameter_json['movimentos'].push(movement_parameter_json); + } + + function _parseParameterValue(value) { + if (typeof value == 'string' && value.toLowerCase() == 'true') { + return true; + } else if (typeof value == 'string' && value.toLowerCase() == 'false') { + return false; + } else { + return !isNaN(value) ? parseInt(value) : value; + } + } + + function _parseTempFacialParameterJSON(tmpJSON) { + var attrs = dynworkflow.getFacialParameters(); + for (var i in attrs) { + var attr = attrs[i]; + parameterValue = tmpJSON['facial'][attr][0]; + movement_parameter_json['facial'][attr] = _parseParameterValue(parameterValue); + } + } + + function _parseHand(hand) { + var parsedHand = hand == 'right-hand' ? 'mao_direita' : hand; + parsedHand = hand == 'left-hand' ? 'mao_esquerda' : parsedHand; + return parsedHand; + } + + // Default parser + function _defaultMovementParser(tmpJSON, movementName, hand) { + var attrs = dynworkflow.getMovementParameters(movementName); + var parsedHand = _parseHand(hand); + + for (var i in attrs) { + var attr = attrs[i]; + var parameterValue = ''; + if (typeof tmpJSON[hand][attr] == "undefined") { + continue; + } + if (attr == 'configuracao') { + parameterValue = tmpJSON[hand][attr][1]; + } else if (attr == 'articulacao') { + parameterValue = articulation.processValue(hand, tmpJSON[hand][attr]); + } else { + parameterValue = tmpJSON[hand][attr][0]; + } + movement_parameter_json[parsedHand][movementName][attr] = + _parseParameterValue(parameterValue); + } + } + + function _retilinearMovementParser(tmpJSON, movementName, hand) { + var attrs = dynworkflow.getMovementParameters(movementName); + var parsedHand = _parseHand(hand); + + for (var i in attrs) { + var attr = attrs[i]; + var initParameterValue = ''; + var endParameterValue = ''; + if (attr == 'configuracao-retilineo') { + initParameterValue = tmpJSON[hand][attr][1]; + endParameterValue = tmpJSON[hand][attr][3]; + } else if (attr == 'articulacao-retilineo') { + initSlice = tmpJSON[hand][attr].slice(0, 2); + endSlice = tmpJSON[hand][attr].slice(2, 4); + initParameterValue = articulation.processValue(hand, initSlice); + endParameterValue = articulation.processValue(hand, endSlice); + } else { + initParameterValue = tmpJSON[hand][attr][0]; + endParameterValue = tmpJSON[hand][attr][1]; + } + attr = attr.replace('-retilineo', ''); + var initAttr = attr + '_inicial'; + var endAttr = attr + '_final'; + movement_parameter_json[parsedHand][movementName][initAttr] = + _parseParameterValue(initParameterValue); + movement_parameter_json[parsedHand][movementName][endAttr] = + _parseParameterValue(endParameterValue); + } + } + + function _parseTempMovementParameterJSON(tmpJSON, hand) { + var movimentConfig = tmpJSON[hand]['movimento']; + if (typeof movimentConfig == 'undefined') return; + + var movementName = movimentConfig[0]; + var parsedHand = _parseHand(hand); + movement_parameter_json[parsedHand][movementName] = {}; + + if (movementName == 'retilineo') { + _retilinearMovementParser(tmpJSON, movementName, hand); + } else { + _defaultMovementParser(tmpJSON, movementName, hand); + } + } + + tmpJSONParser.parse = function(tmpJSON, rightHand, leftHand) { + _setupBaseParameterJSON(tmpJSON); + _parseTempFacialParameterJSON(tmpJSON); + if (rightHand) { + _parseTempMovementParameterJSON(tmpJSON, 'right-hand'); + } + if (leftHand) { + _parseTempMovementParameterJSON(tmpJSON, 'left-hand'); + } + return base_parameter_json; + }; + +}(window.tmpJSONParser = window.tmpJSONParser || {}, jQuery)); diff --git a/wikilibrasV2/view/js/helpers/video-helper.js b/wikilibrasV2/view/js/helpers/video-helper.js new file mode 100755 index 0000000..b0eac42 --- /dev/null +++ b/wikilibrasV2/view/js/helpers/video-helper.js @@ -0,0 +1,40 @@ +(function(videoHelper, $, undefined) { + + function _getSource(videoBaseUrl) { + return '' + + 'Sem suporte a vídeos'; + } + + function _getSourceByWebmUrl(webmUrl) { + var mp4Url = webmUrl.replace('.webm', '.mp4'); + return '' + + 'Sem suporte a vídeos'; + } + + function _controlVideo(elId, toPlay) { + if ($(elId).length === 0) + return; + if (toPlay) { + $(elId).get(0).play(); + } else { + $(elId).get(0).pause(); + } + } + + videoHelper.play = function(elId) { + _controlVideo(elId, true); + }; + + videoHelper.pause = function(elId) { + _controlVideo(elId, false); + }; + + videoHelper.getSource = function(videoBaseUrl) { + return _getSource(videoBaseUrl); + }; + + videoHelper.getSourceByWebmUrl = function(webmUrl) { + return _getSourceByWebmUrl(webmUrl); + }; + +}(window.videoHelper = window.videoHelper || {}, jQuery)); diff --git a/wikilibrasV2/view/js/ranking.js b/wikilibrasV2/view/js/ranking.js new file mode 100755 index 0000000..50bb0d0 --- /dev/null +++ b/wikilibrasV2/view/js/ranking.js @@ -0,0 +1,138 @@ +(function(ranking, $, undefined) { + + var NUMBER_OF_TOP_USERS = 10; + var STARS_MAP = ['', 'gold', 'silver', 'bronze']; + var baseUrl = ''; + var pybossaEndpoint = ''; + var projectName = ''; + var loggedUser = {}; + var totalTasks = 0; + var doneTasks = 0; + + function _getRankingData(callback) { + $.ajax({ + url : pybossaEndpoint + '/api/leaderboard?limit=' + + NUMBER_OF_TOP_USERS, + success : function(response) { + callback(typeof response == 'object' ? response[projectName] + : ''); + }, + error : function(xhr, textStatus, error) { + alert(xhr.responseText); + } + }); + } + + function _processRankingRow(rowData) { + var rank = rowData.rank; + if (rank < 0) { + return ''; + } + var starHTML = ''; + if (rank > 0 && rank < 4) { + starHTML = ''; + } + var trHTML = ''; + if (rowData.name === loggedUser.name) { + trHTML = ''; + loggedUser.rank = rowData.rank; + } + rank = rank == 0 ? '-' : rank + '.'; + return trHTML + '' + starHTML + '' + rank + + '' + rowData.fullname + '' + + rowData.score + ''; + } + + function _updateRanking() { + _getRankingData(function(data) { + if (data === '') + return; + + var rowsHTML = ''; + for (var i = 0; i < data.length; i++) { + rowsHTML += _processRankingRow(data[i]); + } + $('#leaderboard-container tbody').html(rowsHTML); + $('#ranking-info-container .rank-position').html(loggedUser.rank); + $('#ranking-info-container .username').html(loggedUser.fullName); + if (loggedUser.avatarUrl != '') { + $('#ranking-info-container .avatar-container img').attr('src', + loggedUser.avatarUrl); + $('#ranking-info-container .avatar-placeholder').hide(); + $('#ranking-info-container .avatar-container').show(); + } + if (loggedUser.rank === 0) { + $('#ranking-info-container .rank-position-container').hide(); + } + _updateProgress(); + }); + } + + function _getUserData() { + return $.ajax({ + url : pybossaEndpoint + '/api/user?name=' + loggedUser.name + }); + } + + function _getAvatarUrl(data) { + return !data || typeof data.avatar === 'undefined' || typeof data.container === 'undefined' ? + '' : pybossaEndpoint + '/uploads/' + data.container + '/' + data.avatar; + } + + function _updateProgress() { + pybossaApiHelper + .getUserProgress() + .done( + function(response) { + totalTasks = response.total; + doneTasks = response.done; + var percentage = (doneTasks / totalTasks) * 100; + $('#ranking-info-container .progress-bar').attr( + 'aria-valuenow', percentage).css('width', + percentage + '%'); + $('#ranking-container [data-toggle="tooltip"]') + .tooltip( + { + title : '' + + doneTasks + + ' / ' + + totalTasks + + ' sinais ensinados.', + placement : 'bottom', + trigger : 'manual' + }); + }); + } + + function _loadRankingData() { + _getUserData().done(function(response) { + if (typeof response == 'undefined' || response.length < 1) { + return; + } + loggedUser.fullName = response[0].fullname; + loggedUser.avatarUrl = _getAvatarUrl(response[0].info); + _updateRanking(); + }); + } + + ranking.show = function() { + $('.sub-main-container').hide(); + $('#ranking-container').show(); + + if (doneTasks > 0) { + $('#ranking-container [data-toggle="tooltip"]').tooltip('show'); + } + } + + ranking.setup = function(serverUrl, endpoint, name, user) { + baseUrl = serverUrl; + pybossaEndpoint = endpoint; + projectName = name; + loggedUser.name = user; + loadHtmlHelper.load('/ranking/ranking.html', '#ranking-container', + _loadRankingData); + }; + +}(window.ranking = window.ranking || {}, jQuery)); \ No newline at end of file diff --git a/wikilibrasV2/view/js/render-sign.js b/wikilibrasV2/view/js/render-sign.js new file mode 100755 index 0000000..ec804ed --- /dev/null +++ b/wikilibrasV2/view/js/render-sign.js @@ -0,0 +1,85 @@ +(function(renderSign, $, undefined) { + + var apiUrl = ''; + + function _submitParameterJSON(parsedParameterJSON, callback) { + console.log(parsedParameterJSON); + $.ajax({ + type : 'POST', + url : apiUrl + '/sign', + data : JSON.stringify(parsedParameterJSON), + contentType : 'application/json', + success : function(response) { + console.log(response); + callback(parsedParameterJSON); + }, + error : function(xhr, textStatus, error) { + alert(xhr.responseText); + } + }); + } + + function _showRenderedAvatar(parameterJSON) { + var userId = parameterJSON['userId']; + var signName = parameterJSON['sinal']; + + var avatarBaseUrl = _getRenderedAvatarBaseUrl(userId, signName); + $('#render-avatar video').html(videoHelper.getSource(avatarBaseUrl)); + $("#render-avatar").fadeIn(300); + } + + function _showRenderScreen(toShow) { + if (toShow) { + $("#render-screen").fadeIn(300); + videoHelper.play("#render-ref video"); + videoHelper.play("#render-avatar video"); + } else { + $("#render-screen").hide(); + videoHelper.pause("#render-ref video"); + videoHelper.pause("#render-avatar video"); + } + } + + function _getRenderedAvatarBaseUrl(userId, signName) { + return apiUrl + '/public/' + userId + '/' + signName; + } + + renderSign.showRenderedAvatar = function(parameterJSON) { + _showRenderedAvatar(parameterJSON); + _showRenderScreen(true); + } + + renderSign.showRenderScreen = function(toShow) { + _showRenderScreen(toShow); + } + + renderSign.getRenderedAvatarBaseUrl = function(userId, signName) { + return _getRenderedAvatarBaseUrl(userId, signName); + } + + renderSign.submit = function(parsedParameterJSON) { + configurationScreen.show(false); + _showRenderScreen(true); + $("#render-avatar").hide(); + $("#render-loading").fadeIn(300); + $("#render-button-container .btn").hide(); + $("#finish-button").addClass("disabled"); + $("#finish-button").show(); + + _submitParameterJSON(parsedParameterJSON, + function(parsedParameterJSON) { + $("#render-loading").fadeOut(300); + $("#finish-button").removeClass("disabled"); + _showRenderedAvatar(parsedParameterJSON); + }); + }; + + renderSign.setup = function(url) { + apiUrl = url; + $("#render-edit").off("click").on("click", function() { + _showRenderScreen(false); + configurationScreen.show(true); + }); + } + +}(window.renderSign = window.renderSign || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/articulation.js b/wikilibrasV2/view/js/selection-panel/articulation.js new file mode 100755 index 0000000..cdefabd --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/articulation.js @@ -0,0 +1,143 @@ +(function(articulation, $, undefined) { + + var server_host = ''; + var MAX_COLUMNS = 14; + + function _updateASelector(container, ballSelector, step) { + var pointSelector = parseInt(step) == 2 ? 'A' : 'B'; + $(container + ' .ball-selector.active').each(function() { + $(this).removeClass('active'); + $(this).find('.point-selector').remove(); + }); + ballSelector.addClass('active'); + ballSelector.append('
'); + $(container + ' .selection-panel-option[select=true]').attr('select', + false); + $(ballSelector).attr('select', true); + } + + function _getSelectedY(hand, subConfig, step) { + step = parseInt(step) - 1; + var previousStepId = '.selection-panel-body[mainConfig=' + hand + + '][subConfig=' + subConfig + '][step=' + step + + '] .module-x-y'; + return $(previousStepId).attr('data-y'); + } + + function _setupModuleZ(hand, subConfig, step, selectedY) { + if (typeof selectedY == 'undefined' || selectedY == '') + return; + + var base_id = '.selection-panel-body[mainConfig=' + hand + + '][subConfig=' + subConfig + '][step=' + step + ']'; + var articulation_z = base_id + ' .module-z'; + $(articulation_z + ' .ball-selector').hide(); + $(articulation_z + ' .row-number-' + selectedY + ' .ball-selector') + .show(); + + var z = $(articulation_z).attr('data-z'); + if (typeof z != 'undefined') { + var ball_selector = $(articulation_z + ' .row-number-' + selectedY + + ' .ball-' + z); + _updateASelector(articulation_z, ball_selector, step); + } + } + + function _setupBallSelectorXY(hand, subConfig, step) { + var base_id = '.selection-panel-body[mainConfig=' + hand + + '][subConfig=' + subConfig + '][step=' + step + ']'; + var articulation_x_y = base_id + ' .module-x-y'; + $(articulation_x_y + ' .ball-selector') + .off('click') + .on( + 'click', + function(a) { + var b = $(a.target); + if (!b.hasClass('ball-selector')) { + dynworkflow.userSelectedAnOption(); + return; + } + var c = b.parent('.grid-row'), d = $(articulation_x_y), f = b + .attr('data-x'), g = c.attr('data-y'); + d.attr('data-x', f), d.attr('data-y', g); + + var nextStep = parseInt(step) + 1; + _updateASelector(articulation_x_y, b, nextStep); + _setupModuleZ(hand, subConfig, nextStep, g); + + wikilibras.updateTempParameterJSON(hand, subConfig, + step, f + ';' + g); + dynworkflow.userSelectedAnOption(); + }); + } + + function _setupBallSelectorZ(hand, subConfig, step) { + var base_id = '.selection-panel-body[mainConfig=' + hand + + '][subConfig=' + subConfig + '][step=' + step + ']'; + var articulation_z = base_id + ' .module-z'; + $(articulation_z + ' .ball-selector').off('click').on( + 'click', + function(a) { + var b = $(a.target); + if (!b.hasClass('ball-selector')) { + dynworkflow.userSelectedAnOption(); + return; + } + var c = b.parent('.grid-row'), e = $(articulation_z), h = b + .attr('data-z'); + b.attr('data-z') && e.attr('data-z', h), _updateASelector( + articulation_z, b, step); + + wikilibras + .updateTempParameterJSON(hand, subConfig, step, h); + dynworkflow.userSelectedAnOption(); + }); + } + + function _calculateArticulationPointIndex(hand, xValue, yValue, zValue) { + var x = xValue; + var y = yValue; + var z = zValue; + if (hand == 'left-hand') { + x = MAX_COLUMNS - x + 1; + } + + var value = (z - 1) * MAX_COLUMNS + x + 3 * MAX_COLUMNS * (y - 1); + //console.log(value); + return value; + } + + articulation.processValue = function(hand, selectionArray) { + var xyValueSplit = selectionArray[0].split(';'); + var xValue = parseInt(xyValueSplit[0]); + var yValue = parseInt(xyValueSplit[1]); + var zValue = parseInt(selectionArray[1]); + return _calculateArticulationPointIndex(hand, xValue, yValue, zValue); + }; + + articulation.setupModuleXY = function(serverhost, hand, subConfig, step) { + server_host = serverhost; + _setupBallSelectorXY(hand, subConfig, step); + }; + + articulation.setupModuleZ = function(serverhost, hand, subConfig, step) { + server_host = serverhost; + _setupBallSelectorZ(hand, subConfig, step); + + var selectedY = _getSelectedY(hand, subConfig, step); + _setupModuleZ(hand, subConfig, step, selectedY); + }; + + articulation.clean = function() { + $('.ball-selector.active').each(function() { + $(this).removeClass('active'); + $(this).find('.point-selector').remove(); + }); + $('.module-x-y').attr('data-x', ''); + $('.module-x-y').attr('data-y', ''); + $('.module-z').attr('data-z', ''); + } + +}(window.articulation = window.articulation || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/configuration.js b/wikilibrasV2/view/js/selection-panel/configuration.js new file mode 100755 index 0000000..8e0e3d0 --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/configuration.js @@ -0,0 +1,43 @@ +(function(configuration, $, undefined) { + + configuration.setupFingersGroup = function(hand, subConfig, step) { + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + ']'; + $(baseId + ' .selection-panel-option' + ).off('click').on('click', function() { + selectionPanel.selectAnOption(baseId, this); + _setupFingersToShow(hand, subConfig, step); + + dynworkflow.userSelectedAnOption(); + }); + }; + + function _setupFingersToShow(hand, subConfig, step) { + var stepOneBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + ']'; + var nextStep = parseInt(step) + 1; + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + nextStep + ']'; + + var finger_group = $(stepOneBaseId + ' .selection-panel-option[select=true]').attr('value'); + finger_group = typeof finger_group == 'undefined' ? '0' : finger_group; + + // clean next step + dynworkflow.cleanStep(hand, subConfig, nextStep); + $(stepTwoBaseId + ' .finger-group').hide(); + $(stepTwoBaseId + ' .finger-group[group=' + finger_group + ']').show(); + } + + configuration.setupFingersPosition = function(hand, subConfig, step) { + var stepTwoBaseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + ']'; + $(stepTwoBaseId + ' .selection-panel-option').off('click').on( + 'click', function() { + selectionPanel.selectAnOption(stepTwoBaseId, this); + dynworkflow.userSelectedAnOption(); + }); + var previousStep = parseInt(step) - 1; + _setupFingersToShow(hand, subConfig, previousStep); + }; + +}(window.configuration = window.configuration || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/default-configuration-handler.js b/wikilibrasV2/view/js/selection-panel/default-configuration-handler.js new file mode 100755 index 0000000..93c4283 --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/default-configuration-handler.js @@ -0,0 +1,27 @@ +(function(defaultConfigurationHandler, $, undefined) { + + defaultConfigurationHandler.setup = function(hand, subConfig, step) { + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + ']'; + $(baseId + ' .selection-panel-option').off('click').on( + 'click', function() { + selectionPanel.selectAnOption(baseId, this); + dynworkflow.userSelectedAnOption(); + }); + }; + + function _startVideoLoop(hand, subConfig, step, timeBetweenLoops) { + setTimeout(function(){ + $('.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + '] video').each(function(){ + videoHelper.play(this); + }); + _startVideoLoop(hand, subConfig, step, timeBetweenLoops); + }, timeBetweenLoops); + } + + defaultConfigurationHandler.startVideoLoop = function(hand, subConfig, step, timeBetweenLoops) { + _startVideoLoop(hand, subConfig, step, timeBetweenLoops); + } + +}(window.defaultConfigurationHandler = window.defaultConfigurationHandler || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/dynamic-selection-workflow.js b/wikilibrasV2/view/js/selection-panel/dynamic-selection-workflow.js new file mode 100755 index 0000000..af9987f --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/dynamic-selection-workflow.js @@ -0,0 +1,369 @@ +(function(dynworkflow, $, undefined) { + + // Workflow configuration + var jsonWF = {}; + var baseUrl = ''; + + // Main configurations: right-hand, left-hand and facial + var mainConfig = ''; + // The converted Main Config (right/left-hand) to hand for using the same configuration + var preprocessedMainConfig = ''; + // Subconfigurations: movimento, articulacao, configuracao, orientacao, etc + var currentSubconfig = ''; + var currentSubConfigName = ''; + var currentSubconfigParent = ''; + var currentStep = 0; + + function _preprocessMainConfig(config) { + config = config.replace('right-hand', 'hand'); + config = config.replace('left-hand', 'hand'); + return config; + } + + function _getFirstKey(json) { + var first_key = undefined; + for (first_key in json) + break; + return first_key; + } + + function _getAttributes(json) { + var result = []; + for (attr in json) { + result.push(attr); + } + return result; + } + + function _updateAndGetFirstMovementSubConfig() { + var selectedMovement = movement.getPreviousSelectedMovement(mainConfig); + if (typeof selectedMovement == 'undefined') + return -1; + + currentSubconfigParent = jsonWF[preprocessedMainConfig]['movimento'][selectedMovement]; + currentSubConfigName = _getFirstKey(currentSubconfigParent); + return currentSubConfigName; + } + + function _updateAndGetMovementConfig() { + currentSubconfigParent = jsonWF[preprocessedMainConfig]; + currentSubConfigName = _getFirstKey(currentSubconfigParent); + return currentSubConfigName; + } + + function _getNextSubConfig(toForward) { + var attrs = _getAttributes(currentSubconfigParent); + for (var i = 0; i < attrs.length; i++) { + if (toForward && attrs[i] == currentSubConfigName + && i < attrs.length - 1) { + return attrs[i + 1]; + } else if (!toForward && attrs[i] == currentSubConfigName && i >= 1) { + return attrs[i - 1]; + } + } + if (toForward && currentSubConfigName == 'movimento') { + return _updateAndGetFirstMovementSubConfig(); + } else if (!toForward && preprocessedMainConfig == 'hand') { + return _updateAndGetMovementConfig(); + } else if (!toForward) { + return currentSubConfigName; + } else { + return -1; + } + } + + function _showCurrentSubconfig() { + _showSubconfiguration(mainConfig, currentSubConfigName, currentStep); + } + + // It checks if a selection panel is already loaded + function _isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber) { + var stepNumber = stepNumber + 1; + return $('.selection-panel-body[mainConfig=' + mainConfig + + '][subConfig=' + subConfig + '][step=' + stepNumber + ']').length > 0; + } + + function _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber) { + var stepNumber = stepNumber + 1; + return $( + '.selection-panel-body[mainConfig=' + mainConfig + + '][subConfig=' + subConfig + '][step=' + stepNumber + + ']').show(); + } + + // It renders or shows the requested selection panel + function _showSubconfiguration(mainConfig, subConfig, stepNumber) { + $('.selection-panel-body').hide(); + if (_isSubconfigurationPanelLoaded(mainConfig, subConfig, stepNumber)) { + _showLoadedSubconfigurationPanel(mainConfig, subConfig, stepNumber); + } else { + var step = currentSubconfig[stepNumber]; + step = typeof step == 'undefined' ? 'passo-1' : step; + loadHtmlHelper.append('/' + preprocessedMainConfig + '/' + + subConfig + '/' + step + '.html', '#selection-panel', + true); + } + _selectTimelineIcon(mainConfig, subConfig, true); + } + + function _selectSubConfig(subConfig) { + if (subConfig == 'movimento') { + _updateAndGetMovementConfig(); + } else if (currentSubConfigName == 'movimento') { + _updateAndGetFirstMovementSubConfig(); + } + currentSubConfigName = subConfig; + currentSubconfig = currentSubconfigParent[currentSubConfigName]; + currentStep = 0; + _showCurrentSubconfig(); + } + + // It shows the next selection panel on the workflow + function _showNextSubConfig() { + _walkOnTheWorkflow(true); + } + + function _showPreviousSubConfig() { + _walkOnTheWorkflow(false); + } + + function _walkOnTheWorkflow(toForward) { + currentStep = toForward ? currentStep + 1 : currentStep - 1; + + if (currentStep >= 0 && currentStep < currentSubconfig.length) { + _showCurrentSubconfig(); + } else { + var nextSubConfig = _getNextSubConfig(toForward); + if (nextSubConfig != -1) { + _selectSubConfig(nextSubConfig); + } else { + selectionPanel.hide(); + } + } + } + + function _checkIfFinished(mainConfig, currentSubConfigName) { + var numberOfSteps = currentSubconfig.length; + var completedSteps = $('.selection-panel-body[mainConfig=' + mainConfig + + '][subConfig=' + currentSubConfigName + + '] .selection-panel-option[select=true]').length; + return completedSteps != 0 && completedSteps == numberOfSteps; + } + + // A callback function to be called when the user selects a option on a panel + function _userSelectedAnOption() { + if (_checkIfFinished(mainConfig, currentSubConfigName)) { + _setupCheckIcon(mainConfig, currentSubConfigName); + } + _showNextSubConfig(); + } + + function _cleanStep(mainConfig, subConfig, step) { + var baseId = '.selection-panel-body[mainConfig=' + mainConfig + + '][subConfig=' + subConfig + '][step=' + step + ']'; + $(baseId + ' .selection-panel-option').removeAttr('select'); + var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig + + '] .icon_container[json_name=' + subConfig + ']'; + $(icon_id).removeAttr('complete'); + } + + // Timeline functions + function _selectTimelineIcon(mainConfig, subConfig) { + var baseId = '.subconfiguration-panel[mainConfig=' + mainConfig + + '] .subconfiguration-options'; + var iconContainer = '.icon_container[json_name=' + subConfig + ']'; + var iconId = baseId + ' ' + iconContainer; + + var previousSelected = $(baseId + ' .icon_container[select=true]') + .attr('json_name'); + if (typeof previousSelected != 'undefined') { + _deselectTimelineIcon(mainConfig, previousSelected); + } + + iconHelper.enableIconHover($(iconId), true); + $(iconId).attr('select', true); + $(baseId).scrollTo(iconContainer, { + 'offset' : -60, + 'duration' : 750 + }); + } + + function _deselectTimelineIcon(mainConfig, subConfig) { + var icon_id = '.subconfiguration-panel[mainConfig=' + mainConfig + + '] .icon_container[json_name=' + subConfig + ']'; + + if ($(icon_id + '[complete=true]').length > 0) { + _setupCheckIcon(mainConfig, subConfig); + } else { + iconHelper.enableIconHover($(icon_id), false); + $(icon_id).removeAttr('select'); + } + } + + function _setupCheckIcon(mainConfig, subConfig) { + var icon_id = $('.subconfiguration-panel[mainConfig=' + mainConfig + + '] .icon_container[json_name=' + subConfig + ']'); + iconHelper.enableIconCheck(icon_id, true); + $(icon_id).attr('complete', true); + $(icon_id).attr('select', false); + } + + function _isTimelineLoaded() { + return $('.subconfiguration-panel[mainConfig=' + mainConfig + ']').length > 0; + } + + function _setupTimelineListeners(timelineBaseId) { + $(timelineBaseId + ' .icon_container[json_name]').off('click').on( + 'click', function() { + var subConfig = $(this).attr('json_name'); + _selectSubConfig(subConfig); + }); + $(timelineBaseId + ' .icon_container[json_name]').off('mouseover').on( + 'mouseover', function() { + if (iconHelper.canHover(this)) { + iconHelper.enableIconHover(this, true); + } + }); + $(timelineBaseId + ' .icon_container[json_name]').off('mouseout').on( + 'mouseout', function() { + if (iconHelper.canHover(this)) { + iconHelper.enableIconHover(this, false); + } + }); + $(timelineBaseId + ' .arrow[name=right-arrow]').off('click').on( + 'click', function() { + _showNextSubConfig(); + }); + $(timelineBaseId + ' .arrow[name=left-arrow]').off('click').on('click', + function() { + _showPreviousSubConfig(); + }); + } + + function _setupTimelineIcons(timelineBaseId, toUpdate) { + if (!toUpdate) { + $(timelineBaseId).show(); + $(timelineBaseId + " .subconfiguration-options").scrollTo(0, 0); + return; + } + + $(timelineBaseId + ' .icon_container[json_name]').attr("active", + "false"); + for ( var name in currentSubconfigParent) { + $(timelineBaseId + ' .icon_container[json_name=' + name + ']') + .attr("active", "true"); + } + + if (preprocessedMainConfig == 'hand') { + $(timelineBaseId + ' .icon_container[json_name=movimento]').attr( + "active", "true"); + _setupCheckIcon(mainConfig, 'movimento'); + } + _selectTimelineIcon(mainConfig, currentSubConfigName); + _setupTimelineListeners(timelineBaseId); + $(timelineBaseId).show(); + } + + function _setupTimeline(toUpdate) { + var timelineBaseId = '.subconfiguration-panel[mainConfig=' + mainConfig + + ']'; + if (_isTimelineLoaded()) { + _setupTimelineIcons(timelineBaseId, toUpdate); + } else { + loadHtmlHelper.append('/' + preprocessedMainConfig + + '/timeline.html', '#selection-panel', false, function() { + _setupTimelineIcons(timelineBaseId, true); + }); + } + } + + function _initTimeline() { + if (preprocessedMainConfig != 'hand' || _isTimelineLoaded()) { + _setupTimeline(false); + } + } + + function _cleanTimeline() { + $(".subconfiguration-panel").remove(); + } + + function _cleanPreviousLoadedPanel() { + $('.selection-panel-body[mainConfig=' + mainConfig + ']').each( + function() { + var subConfigName = $(this).attr("subConfig"); + if (subConfigName.indexOf("articulacao") != -1 + || subConfigName.indexOf("configuracao") != -1 + || subConfigName.indexOf("orientacao") != -1 + || subConfigName.indexOf("movimento") != -1) { + return; + } + $( + '.selection-panel-body[mainConfig=' + mainConfig + + '][subConfig=' + subConfigName + ']') + .remove(); + }); + } + + // Public methods + dynworkflow.selectMainConfig = function(config) { + mainConfig = config; + preprocessedMainConfig = _preprocessMainConfig(mainConfig); + currentSubconfigParent = jsonWF[preprocessedMainConfig]; + currentSubConfigName = _getFirstKey(currentSubconfigParent); + currentSubconfig = currentSubconfigParent[currentSubConfigName]; + currentStep = 0; + + _showCurrentSubconfig(); + }; + + dynworkflow.selectMovement = function(movement) { + var subconfigJSON = currentSubconfig[movement]; + currentSubConfigName = _getFirstKey(subconfigJSON); + currentSubconfigParent = subconfigJSON; + currentSubconfig = subconfigJSON[currentSubConfigName]; + currentStep = 0; + + _cleanPreviousLoadedPanel(); + _showCurrentSubconfig(); + _setupTimeline(true); + }; + + dynworkflow.selectSubConfig = function(subConfig) { + _selectSubConfig(subConfig); + }; + + dynworkflow.userSelectedAnOption = function() { + _userSelectedAnOption(); + }; + + dynworkflow.cleanStep = function(mainConfig, subConfig, step) { + _cleanStep(mainConfig, subConfig, step); + }; + + dynworkflow.getFacialParameters = function() { + return _getAttributes(jsonWF['facial']); + }; + + dynworkflow.getMovementParameters = function(movementName) { + return _getAttributes(jsonWF['hand']['movimento'][movementName]); + }; + + dynworkflow.getMainConfig = function() { + return mainConfig; + }; + + dynworkflow.initTimeline = function() { + _initTimeline(); + }; + + dynworkflow.setup = function(url) { + baseUrl = url; + $.get(baseUrl + '/conf/selection-workflow-json', function(result) { + jsonWF = $.parseJSON(result); + }).fail(function() { + console.log('Failed to load the workflow configuration'); + }); + _cleanTimeline(); + }; + +}(window.dynworkflow = window.dynworkflow || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/facial.js b/wikilibrasV2/view/js/selection-panel/facial.js new file mode 100755 index 0000000..0958ddb --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/facial.js @@ -0,0 +1,21 @@ +(function(facial, $, undefined) { + + facial.setup = function(subConfig) { + var baseId = '.selection-panel-body[mainConfig=facial][subConfig=' + + subConfig + ']'; + $(baseId + ' .selection-panel-option').off('click').on('click', + function() { + selectionPanel.selectAnOption(baseId, this); + dynworkflow.userSelectedAnOption(); + }); + $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter', + function(event) { + $(this).addClass('video-panel-option-hover'); + }); + $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave', + function(event) { + $(this).removeClass('video-panel-option-hover'); + }); + }; + +}(window.facial = window.facial || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/movement.js b/wikilibrasV2/view/js/selection-panel/movement.js new file mode 100755 index 0000000..67f5a04 --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/movement.js @@ -0,0 +1,24 @@ +(function(movement, $, undefined) { + + movement.getPreviousSelectedMovement = function(mainConfig) { + return typeof mainConfig === "undefined" || mainConfig === "" ? "" : $('.selection-panel-body[mainConfig=' + + mainConfig + '][subConfig=movimento][step=1] .selection-panel-option[select=true]').attr('value'); + }; + + movement.setup = function(serverhost, hand) { + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=movimento][step=1]'; + $(baseId + ' .selection-panel-option').off('click').on( + 'click', function() { + selectionPanel.selectAnOption(baseId, this); + dynworkflow.selectMovement($(this).attr('value')); + }); + $(baseId + ' .video-panel-option').off('mouseenter').on('mouseenter', + function(event) { + $(this).addClass('video-panel-option-hover'); + }); + $(baseId + ' .video-panel-option').off('mouseleave').on('mouseleave', + function(event) { + $(this).removeClass('video-panel-option-hover'); + }); + }; +}(window.movement = window.movement || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/orientation.js b/wikilibrasV2/view/js/selection-panel/orientation.js new file mode 100755 index 0000000..ed3da57 --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/orientation.js @@ -0,0 +1,13 @@ +(function(orientation, $, undefined) { + + orientation.setup = function(hand, subConfig, step) { + var baseId = '.selection-panel-body[mainConfig=' + hand + '][subConfig=' + + subConfig + '][step=' + step + ']'; + $(baseId + ' .selection-panel-option').off('click').on( + 'click', function() { + selectionPanel.selectAnOption(baseId, this); + dynworkflow.userSelectedAnOption(); + }); + }; + +}(window.orientation = window.orientation || {}, jQuery)); diff --git a/wikilibrasV2/view/js/selection-panel/selection-panel.js b/wikilibrasV2/view/js/selection-panel/selection-panel.js new file mode 100755 index 0000000..cfcc8b1 --- /dev/null +++ b/wikilibrasV2/view/js/selection-panel/selection-panel.js @@ -0,0 +1,194 @@ +(function(selectionPanel, $, undefined) { + + function _selectAnOption(parentId, el) { + $(parentId + ' .selection-panel-option[select=true]').removeAttr( + 'select'); + $(el).attr('select', true); + + var mainConfig = $(parentId).attr('mainConfig'); + var subConfig = $(parentId).attr('subConfig'); + var step = $(parentId).attr('step'); + wikilibras.updateTempParameterJSON(mainConfig, subConfig, step, $(el).attr( + 'value')); + } + + function _canRenderSignVideo() { + return _isConfigurationComplete('facial') && + (_isConfigurationComplete('right-hand') || _isConfigurationComplete('left-hand')); + } + + function _isConfigurationComplete(config) { + var baseId = '.subconfiguration-panel[mainConfig=' + config + ']'; + var total_config = $(baseId + + ' .icon_container[json_name][active=true]').length; + var completed_config = $(baseId + + ' .icon_container[active=true][complete=true]').length; + return completed_config != 0 && total_config == completed_config; + } + + function _clearPreviousSelection() { + $('.selection-panel-body').hide(); + $('.subconfiguration-panel').hide(); + + if (configurationScreen.isMenuSelected()) { + var current_option = configurationScreen.getCurrentMainConfiguration(); + iconHelper.selectIcon(current_option, false); + if (_isConfigurationComplete(current_option)) { + iconHelper.setupCheckIcon(current_option, true); + } + $('#avatar-' + current_option).fadeOut(500); + } + } + + function _finishConfiguration(config, toFinish) { + iconHelper.setupCheckIcon(config, toFinish); + iconHelper.setupCheckIcon('avatar-' + config, toFinish); + + if (toFinish) { + $('#' + config + '-edit .check-icon').show(); + } else { + $('#' + config + '-edit .check-icon').hide(); + } + if (_canRenderSignVideo()) { + $('#ready-button').removeClass('disabled'); + } else { + $('#ready-button').addClass('disabled'); + } + } + + function _unfinishConfiguration(config, panel) { + iconHelper.setupCheckIcon(config, false, panel); + iconHelper.setupCheckIcon('avatar-' + config, false, panel); + $('#' + config + '-edit .check-icon').hide(); + + if (!_canRenderSignVideo()) { + $('#ready-button').addClass('disabled'); + } + } + + function _addZoomInToAvatar(option, callback) { + $('#avatar-default') + .fadeOut( + 500, + function() { + $('#avatar-container').removeClass('col-sm-7'); + $('#avatar-container').addClass('col-sm-5'); + $('#selection-container').removeClass('col-sm-2'); + $('#selection-container').addClass('col-sm-4'); + $('#avatar-container').removeClass( + 'avatar-container-zoom-out'); + $('#avatar-container').addClass( + 'avatar-container-zoom-in'); + $('#avatar-' + option).removeClass( + 'avatar-img-zoom-out'); + $('#avatar-' + option).fadeIn( + 500, + function() { + $('#avatar-' + option).addClass( + 'avatar-' + option + + '-img-zoom-in'); + callback(); + }); + }); + } + + function _addZoomOutToAvatar(option, callback) { + $('#avatar-' + option).fadeOut( + 500, + function() { + $('#selection-container').removeClass('col-sm-4'); + $('#selection-container').addClass('col-sm-2'); + $('#avatar-container').removeClass('col-sm-5'); + $('#avatar-container').addClass('col-sm-7'); + $('#avatar-container').removeClass( + 'avatar-container-zoom-in'); + $('#avatar-container') + .addClass('avatar-container-zoom-out'); + $('#avatar-default').fadeIn( + 500, + function() { + $('#avatar-' + option).removeClass( + 'avatar-' + option + '-img-zoom-in'); + $('#avatar-' + option).addClass( + 'avatar-img-zoom-out'); + callback(); + }); + }); + } + + function _hide() { + var config = configurationScreen.getCurrentMainConfiguration(); + if (config === '') return; + + iconHelper.deselectIcon(config); + if (_isConfigurationComplete(config)) { + _finishConfiguration(config, true); + } else { + _finishConfiguration(config, false); + } + + _addZoomOutToAvatar(config, function() { + $('#ready-button').fadeIn(300); + $('.edit-container').fadeIn(300); + }); + $('#selection-panel').fadeOut(300); + } + + function _setupGUIOnSelection(option, finishCallback) { + $('#ready-button').fadeOut(300); + $('.edit-container').fadeOut(300); + _addZoomInToAvatar(option, function() { + $('#selection-panel').fadeIn(300, function() { + finishCallback(); + }); + }); + } + + function _show(option) { + _clearPreviousSelection(); + iconHelper.selectIcon(option, true); + dynworkflow.selectMainConfig(option); + _setupGUIOnSelection(option, function() { + dynworkflow.initTimeline(); + }); + } + + selectionPanel.selectAnOption = function (parentId, el) { + _selectAnOption(parentId, el); + } + + selectionPanel.unfinishConfiguration = function(config, panel) { + return _unfinishConfiguration(config, panel); + } + + selectionPanel.isConfigurationComplete = function(config) { + return _isConfigurationComplete(config); + } + + selectionPanel.hide = function() { + return _hide(); + } + + selectionPanel.show = function(option) { + _show(option); + } + + selectionPanel.clean = function() { + articulation.clean(); + $(".selection-panel-option").removeAttr('select'); + $(".icon_container").removeAttr("select"); + $(".icon_container[complete=true]").each( + function() { + _unfinishConfiguration($(this).attr("name"), $(this).attr( + "panel")); + }); + } + + selectionPanel.setup = function(url) { + $('#selection-panel .x').off('click').on('click', function() { + _hide(); + }); + selectionPanel.clean(); + }; + +}(window.selectionPanel = window.selectionPanel || {}, jQuery)); diff --git a/wikilibrasV2/view/js/submit-sign.js b/wikilibrasV2/view/js/submit-sign.js new file mode 100755 index 0000000..ebe1fa8 --- /dev/null +++ b/wikilibrasV2/view/js/submit-sign.js @@ -0,0 +1,210 @@ +(function(submitSign, $, undefined) { + + var submitUrl = ''; + var loggedUser = ''; + var MAX_CHAR_LENGTH = 255; + + function _isEmpty(str) { + return (!str || 0 === str.length); + } + + function _alertSignName() { + $('#upload-warning-msg').hide(); + var signName = $('#input-sign-name').val(); + if (_isEmpty(signName)) { + $('#upload-warning-msg').html('Por favor indique o nome do sinal.'); + $('#upload-warning-msg').show(); + } + } + + function _alertWordClass() { + $('#upload-warning-msg').hide(); + var wordClass = $('#input-word-class').val(); + if (_isEmpty(wordClass)) { + $('#upload-warning-msg').html( + 'Por favor selecione a classe gramatical do sinal.'); + $('#upload-warning-msg').show(); + } + } + + function _arePhrasesValid(phrases) { + return phrases.length <= MAX_CHAR_LENGTH; + } + + function _alertPhrase() { + $('#upload-warning-msg').hide(); + var phrases = $('#input-phrases').val(); + if (!_arePhrasesValid(phrases)) { + $('#upload-warning-msg').html( + 'As frases de exemplo devem possuir no máximo ' + + MAX_CHAR_LENGTH + ' caracteres.'); + $('#upload-warning-msg').show(); + } + } + + function _alertState() { + $('#upload-warning-msg').hide(); + var state = $('#input-state').val(); + if (_isEmpty(state)) { + $('#upload-warning-msg').html('Por favor selecione seu estado.'); + $('#upload-warning-msg').show(); + } + } + + function _alertSignUpload() { + $('#upload-warning-msg').hide(); + var signUpload = $('#input-sign-upload').val(); + if (_isEmpty(signUpload)) { + $('#upload-warning-msg').html( + 'Por favor selecione o arquivo do vídeo do seu sinal.'); + $('#upload-warning-msg').show(); + } + } + + function _getNationalRadioCheckedValue() { + return $(".wl-national-sign-radio:checked").attr("value"); + } + + function _isValidState(state) { + var value = _getNationalRadioCheckedValue(); + return value === 'no' && state != '' || value === 'yes'; + } + + function _validadeAllFields() { + var signName = $('#input-sign-name').val(); + var wordClass = $('#input-word-class').val(); + var phrases = $('#input-phrases').val(); + var state = $('#input-state').val(); + var signUpload = $('#input-sign-upload').val(); + return !_isEmpty(signName) && !_isEmpty(wordClass) + && _arePhrasesValid(phrases) && !_isEmpty(signUpload) + && _isValidState(state); + } + + function _updateSubmitButton() { + if (_validadeAllFields()) { + _enableSubmitButton(); + } else { + _disableSubmitButton(); + } + } + + function _enableSubmitButton() { + $('#submit-sign-container button').removeClass('disabled'); + } + + function _disableSubmitButton() { + $('#submit-sign-container button').addClass('disabled'); + } + + function _resetFormFields() { + $('#input-sign-name').val(''); + $('#input-word-class').val(''); + $('#input-phrases').val(''); + $('#input-state').val(''); + $('#input-city').val(''); + $('#input-sign-upload').val(''); + $("#upload-progress .progress-bar").css("width", "0px"); + $('#upload-progress-container').hide(); + $('#input-sign-upload').show(); + } + + function _setupSubmitSignForm() { + _disableSubmitButton(); + $('#input-user-login').attr('value', loggedUser); + $('#submit-sign-container form').fileupload( + { + url : submitUrl, + add : function(e, data) { + $('#submit-sign-container button').off('click').on( + 'click', + function(event) { + event.preventDefault(); + if ($(this).hasClass('disabled')) return; + + $('#submit-sign-container button') + .addClass('disabled'); + $('#input-sign-upload').hide(); + $('#upload-progress-container').show(); + data.submit(); + }); + }, + done : function(e, data) { + $('#upload-success-msg').fadeIn(500); + _resetFormFields(); + setTimeout(function() { + $('#upload-success-msg').fadeOut(500); + }, 5000); + }, + progressall : function(e, data) { + var progress = parseInt(data.loaded / data.total * 100, + 10); + $("#upload-progress .progress-bar").attr( + 'aria-valuenow', progress).css("width", + progress + "%"); + }, + error : function(error) { + alert(error.responseText); + _enableSubmitButton(); + }, + replaceFileInput : false + }); + + $('#input-sign-name').on('input', function() { + _alertSignName(); + _updateSubmitButton(); + }); + $('#input-word-class').on('input', function() { + _alertWordClass(); + _updateSubmitButton(); + }); + $('#input-phrases').on('input', function() { + _alertPhrase(); + _updateSubmitButton(); + }); + $('#input-sign-upload').on('change', function() { + _alertSignUpload(); + _updateSubmitButton(); + }); + + $('#input-state').on('input', function() { + var value = $(this).val(); + if (value === 'Nacional') { + $('.wl-national-sign-radio[value=yes]').trigger("click"); + } else { + _alertState(); + } + + _updateSubmitButton(); + }); + $('.wl-national-sign-radio').on('click', function() { + var value = $(this).attr("value"); + if (value === 'no') { + $("#input-state-container").show(); + $("#input-city-container").show(); + $("#input-state").val(''); + } else { + $("#input-state-container").hide(); + $("#input-city-container").hide(); + $("#input-state").val('Nacional'); + $("#input-city").val(''); + } + + _updateSubmitButton(); + }); + } + + submitSign.show = function() { + $(".sub-main-container").hide(); + $("#submit-sign-container").show(); + $("#submit-sign-anchor").focus(); + }; + + submitSign.setup = function(uploadSignHost, user) { + submitUrl = uploadSignHost + "/addsinal"; + loggedUser = user; + loadHtmlHelper.load('/submit-sign/submit-sign.html', + '#submit-sign-container', _setupSubmitSignForm); + }; + +}(window.submitSign = window.submitSign || {}, jQuery)); \ No newline at end of file diff --git a/wikilibrasV2/view/js/teached-signs.js b/wikilibrasV2/view/js/teached-signs.js new file mode 100755 index 0000000..2f4ecbf --- /dev/null +++ b/wikilibrasV2/view/js/teached-signs.js @@ -0,0 +1,77 @@ +(function(teachedSigns, $, undefined) { + + var totalTasks = 0; + var doneTasks = 0; + var userId = -1; + var projectId = -1; + + function _updateTeachedSignsMessage() { + $('.teached-signs-msg').hide(); + if (doneTasks == 0) { + $('.teached-signs-msg[type=none]').show(); + } else if (doneTasks == 1) { + $('.teached-signs-msg[type=one]').show(); + } else { + $('.teached-signs-msg[type=more] span').text(doneTasks); + $('.teached-signs-msg[type=more]').show(); + } + } + + function _createSigns(answers) { + _updateTeachedSignsMessage(); + $('#signs-list-container').html(''); + for (i = 0; i < answers.length; i++) { + _addSign(answers[i].info); + } + } + + function _addSign(answer) { + var signName = answer.parameter_json.sinal; + var apiUserId = answer.parameter_json.userId; + var videoBaseUrl = renderSign.getRenderedAvatarBaseUrl(apiUserId, + signName); + $('#signs-list-container').append( + '
'); + $('#signs-list-container .col-btn[sign-name=' + signName + ']').off( + 'click').on( + 'click', + function() { + $('#teached-sign-video-container').html( + ''); + $('#teached-sign-name').html(signName); + $('#teached-sign-modal').modal('show'); + }); + } + + function _updateTeachedSignsContainer() { + pybossaApiHelper.getAnswers(projectId, userId).done(function(answers) { + _createSigns(answers); + }); + } + + teachedSigns.show = function() { + $('.sub-main-container').hide(); + $('#teached-signs-container').show(); + } + + teachedSigns.setup = function() { + pybossaApiHelper.getProjectId().done(function(response) { + if (typeof response == 'undefined' || response.length < 1) { + return; + } + projectId = response[0].id; + pybossaApiHelper.getUserProgress().done(function(response) { + totalTasks = response.total; + doneTasks = response.done; + userId = response.user_id; + _updateTeachedSignsContainer(); + }); + }); + }; + +}(window.teachedSigns = window.teachedSigns || {}, jQuery)); diff --git a/wikilibrasV2/view/js/tutorial.js b/wikilibrasV2/view/js/tutorial.js new file mode 100755 index 0000000..fff5a88 --- /dev/null +++ b/wikilibrasV2/view/js/tutorial.js @@ -0,0 +1,25 @@ +(function(tutorial, $, undefined) { + + var TUTORIAL_DURATION = 30 * 2; + var pybossaEndpoint = ''; + var projectName = ''; + var loggedUser = ''; + + function _finishTutorialSetup() { + var cookieName = loggedUser + "_" + projectName + '_tutorial'; + var isFirstTime = typeof Cookies.get(cookieName) === 'undefined'; + if (isFirstTime) { + $("#tutorial-container .modal").modal("show"); + } + Cookies.set(cookieName, true, {expires : TUTORIAL_DURATION, path: pybossaEndpoint + + "/project/" + projectName}); + } + + tutorial.setup = function(endpoint, name, user) { + pybossaEndpoint = endpoint; + projectName = name; + loggedUser = user; + loadHtmlHelper.load('/tutorial/tutorial.html', '#tutorial-container', _finishTutorialSetup); + }; + +}(window.tutorial = window.tutorial || {}, jQuery)); \ No newline at end of file diff --git a/wikilibrasV2/view/js/wikilibras.js b/wikilibrasV2/view/js/wikilibras.js new file mode 100755 index 0000000..91cc5b7 --- /dev/null +++ b/wikilibrasV2/view/js/wikilibras.js @@ -0,0 +1,277 @@ +(function(wikilibras, $, undefined) { + + var videosUrl = ''; + var baseUrl = ''; + var serverBackendUrl = ''; + var apiUrl = ''; + var uploadSignsUrl = ''; + var currentTaskId = -1; + var tmpParameterJSON = {}; + var parsedParameterJSON = {}; + var pybossaEndpoint = ''; + var projectName = ''; + var isDemoTask = false; + + function _setupTmpParameterJSON(sign_name) { + tmpParameterJSON = { + 'sinal' : sign_name, + 'userId' : _getLoggedUser(), + 'facial' : {}, + 'right-hand' : {}, + 'left-hand' : {} + }; + parsedParameterJSON = {}; + } + + function _getLoggedUser() { + var pybossaRememberToken = Cookies.get('remember_token'); + var splittedTokenId = pybossaRememberToken.split('|'); + return splittedTokenId.length > 0 ? splittedTokenId[0] + : 'anonymous'; + } + + function _loadTaskInfo(task) { + currentTaskId = task.id; + var signName = task.info.sign_name; + var videoRef = task.info.video_ref; + var videoSource = ''; + + if (isDemoTask) { + var baseRefVidUrl = videosUrl + signName + '_REF'; + videoSource = videoHelper.getSource(baseRefVidUrl); + } else { + var webmVideoUrl = uploadSignsUrl + videoRef; + videoSource = videoHelper.getSourceByWebmUrl(webmVideoUrl); + } + + $('.sign-label').text(signName); + $('.ref-video').html(videoSource); + _setupTmpParameterJSON(task.info.sign_name); + } + + function _updateTempParameterJSON(mainConfig, subConfig, step, value) { + var subConfigJSON = tmpParameterJSON[mainConfig][subConfig]; + if (typeof subConfigJSON == 'undefined') { + tmpParameterJSON[mainConfig][subConfig] = []; + subConfigJSON = tmpParameterJSON[mainConfig][subConfig]; + } + subConfigJSON[parseInt(step) - 1] = value; + } + + function _parseTmpParameterJSON() { + parsedParameterJSON = tmpJSONParser.parse(tmpParameterJSON, + selectionPanel.isConfigurationComplete('right-hand'), + selectionPanel.isConfigurationComplete('left-hand')); + return parsedParameterJSON; + } + + function _showInitialScreen(toShow) { + if (toShow) { + $("#initial-screen").fadeIn(300); + videoHelper.play("#initial-screen video"); + } else { + $("#initial-screen").hide(); + videoHelper.pause("#initial-screen video"); + } + } + + function _showApprovalScreen(toShow, parameterJSON) { + if (toShow) { + $("#render-button-container .btn").hide(); + $("#approval-button").show(); + $("#approval-msg").show(); + renderSign.showRenderedAvatar(parameterJSON); + } else { + $("#approval-button").hide(); + $("#approval-msg").hide(); + } + } + + function _submitAnswer(task, deferred, status) { + if (!isDemoTask) { + var answer = _createAnswer(task, status); + if (status == "APPROVED") { + _finishTask(task, deferred, answer); + } else { + _saveAnswer(task, deferred, answer); + } + } + renderSign.showRenderScreen(false); + $("#thanks-screen").show(); + } + + function _setupMainScreen(task, deferred) { + var lastAnswer = task.info.last_answer; + var hasLastAnswer = typeof lastAnswer != "undefined"; + if (hasLastAnswer) { + _showApprovalScreen(true, lastAnswer.parameter_json); + } else { + _showApprovalScreen(false); + _showInitialScreen(true); + } + $("#start-button").off("click").on("click", function() { + _showInitialScreen(false); + configurationScreen.show(true); + }); + $("#ready-button").off("click").on("click", function() { + if ($(this).hasClass('disabled')) { + event.preventDefault(); + return; + } + renderSign.submit(_parseTmpParameterJSON()); + }); + $("#finish-button").off("click").on("click", function() { + if ($(this).hasClass('disabled')) { + event.preventDefault(); + return; + } + _submitAnswer(task, deferred, "FINISHED"); + }); + $("#approval-button").off("click").on("click", function() { + _submitAnswer(task, deferred, "APPROVED"); + }); + } + + function _setupGUI(task, deferred) { + configurationScreen.setup(); + _setupMainScreen(task, deferred); + } + + function _createAnswer(task, status) { + var answer = {} + answer["status"] = status; + var lastAnswer = task.info.last_answer; + var hasLastAnswer = typeof lastAnswer != "undefined"; + + if (hasLastAnswer && status == "APPROVED") { + answer["number_of_approval"] = lastAnswer.number_of_approval + 1; + answer["parameter_json"] = lastAnswer.parameter_json; + } else { + answer["number_of_approval"] = 0; + answer["parameter_json"] = parsedParameterJSON; + } + return answer; + } + + function _finishTask(task, deferred, answer) { + var lastAnswer = task.info.last_answer; + var hasLastAnswer = typeof lastAnswer != "undefined"; + var toSubmitUserId = hasLastAnswer ? lastAnswer.parameter_json["userId"] + : _getLoggedUser(); + $.ajax({ + type : "POST", + url : serverBackendUrl + "/finish_task", + data : { + "task_id" : task.id, + "project_id" : task.project_id, + "user_id" : toSubmitUserId, + "sign_name" : task.info.sign_name, + "number_of_approval" : answer.number_of_approval + }, + success : function(response) { + _saveAnswer(task, deferred, answer); + }, + error : function(xhr, textStatus, error) { + alert(xhr.responseText); + } + }); + } + + function _saveAnswer(task, deferred, answer) { + pybossa.saveTask(task.id, answer).done(function() { + setTimeout(function() { + $("#thanks-screen").hide(); + deferred.resolve(); + }, 2500); + }); + } + + function _showCompletedAllTaskMsg() { + $("#completed-task-msg").hide(); + $("#completed-all-task-msg").show(); + $("#thanks-screen").fadeIn(300); + } + + function _setupLoginContainer() { + if ($("#login-container").html() === "") { + $("#login-container").html( + $("#main-navbar-collapse .navbar-right li").html()); + } + } + + function _loadMainComponents() { + pybossaApiHelper.setup(pybossaEndpoint, projectName); + loadHtmlHelper.setup(baseUrl); + iconHelper.setup(baseUrl); + dynworkflow.setup(baseUrl); + + tutorial.setup(pybossaEndpoint, projectName, _getLoggedUser()); + submitSign.setup(uploadSignsUrl, _getLoggedUser()); + teachedSigns.setup(); + renderSign.setup(apiUrl); + ranking.setup(baseUrl, pybossaEndpoint, projectName, + _getLoggedUser()); + _setupLoginContainer(); + } + + function _showDemoTask() { + isDemoTask = true; + var task = {'info':{'sign_name':'CALAR'}}; + _startTask(task, function() {}); + } + + function _startTask(task, deferred) { + _loadTaskInfo(task); + _setupGUI(task, deferred); + $("#thanks-screen").hide(); + $("#main-container").fadeIn(500); + } + + pybossa.presentTask(function(task, deferred) { + _loadMainComponents(); + if (!$.isEmptyObject(task) && currentTaskId != task.id) { + _startTask(task, deferred); + } else { + _showCompletedAllTaskMsg(); + } + }); + + // Private methods + function _run(projectname) { + pybossa.setEndpoint(pybossaEndpoint); + pybossa.run(projectname); + } + + // Public methods + wikilibras.run = function(serverhost, serverbackend, projname, apihost, + uploadsignshost) { + baseUrl = serverhost; + serverBackendUrl = serverbackend; + videosUrl = baseUrl + "/videos/"; + apiUrl = apihost; + uploadSignsUrl = uploadsignshost; + pybossaEndpoint = '/pybossa'; + projectName = projname; + _run(projectName); + }; + + wikilibras.updateTempParameterJSON = function(mainConfig, subConfig, step, + value) { + _updateTempParameterJSON(mainConfig, subConfig, step, value); + } + + wikilibras.showTeachContainer = function() { + $(".sub-main-container").hide(); + $("#teach-container").show(); + } + + wikilibras.showTutorialContainer = function() { + $(".sub-main-container").hide(); + $("#navbar-tutorial-container").show(); + } + + wikilibras.showDemoTask = function() { + _showDemoTask(); + } + +}(window.wikilibras = window.wikilibras || {}, jQuery)); \ No newline at end of file diff --git a/wikilibrasV2/view/templates/facial/duracao/passo-1.html b/wikilibrasV2/view/templates/facial/duracao/passo-1.html new file mode 100755 index 0000000..bd46a2d --- /dev/null +++ b/wikilibrasV2/view/templates/facial/duracao/passo-1.html @@ -0,0 +1,41 @@ +
+
+ Duração da Expressão +
+
+
+
+ Longa +
+
+
+
+ Normal +
+
+
+
+ Breve +
+
+ \ No newline at end of file diff --git a/wikilibrasV2/view/templates/facial/expressao/passo-1.html b/wikilibrasV2/view/templates/facial/expressao/passo-1.html new file mode 100755 index 0000000..849b3d4 --- /dev/null +++ b/wikilibrasV2/view/templates/facial/expressao/passo-1.html @@ -0,0 +1,54 @@ +
+
+ Expressão +
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
  • 13.
  • +
  • 14.
  • +
  • 15.
  • +
  • 16.
  • +
  • 17.
  • +
  • 18.
  • +
  • 19.
  • +
  • 20.
  • +
  • 21.
  • +
+
+
+ \ No newline at end of file diff --git a/wikilibrasV2/view/templates/facial/timeline.html b/wikilibrasV2/view/templates/facial/timeline.html new file mode 100755 index 0000000..bea08c9 --- /dev/null +++ b/wikilibrasV2/view/templates/facial/timeline.html @@ -0,0 +1,24 @@ +
+
+ +
+
+
+
+ +
+
+ +
+
+ +
+
+
+
+ +
+
diff --git a/wikilibrasV2/view/templates/facial/transicao/passo-1.html b/wikilibrasV2/view/templates/facial/transicao/passo-1.html new file mode 100755 index 0000000..61c8bd4 --- /dev/null +++ b/wikilibrasV2/view/templates/facial/transicao/passo-1.html @@ -0,0 +1,42 @@ +
+
+ Velocidade de Transição +
+
+
+
+ Lento +
+
+
+
+ Normal +
+
+
+
+ Rápido +
+
+ \ No newline at end of file diff --git a/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-1.html b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-1.html new file mode 100755 index 0000000..1b79a4f --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-1.html @@ -0,0 +1,181 @@ +
+
+ Ponto inicial + (A): onde começa o sinal? +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-2.html b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-2.html new file mode 100755 index 0000000..e694155 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-2.html @@ -0,0 +1,68 @@ +
+
+ Ponto inicial + (A): escolha a distância entre a mão e o corpo +
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-3.html b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-3.html new file mode 100755 index 0000000..137d9e2 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-3.html @@ -0,0 +1,182 @@ +
+
+ + Ponto final (B): onde + termina o sinal? +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-4.html b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-4.html new file mode 100755 index 0000000..4f571a7 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao-retilineo/passo-4.html @@ -0,0 +1,67 @@ +
+
+ Ponto final + (B): escolha a distância entre a mão e o corpo +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/articulacao/passo-1.html b/wikilibrasV2/view/templates/hand/articulacao/passo-1.html new file mode 100755 index 0000000..5341222 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao/passo-1.html @@ -0,0 +1,180 @@ +
+
+ Onde é feito o sinal? +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/articulacao/passo-2.html b/wikilibrasV2/view/templates/hand/articulacao/passo-2.html new file mode 100755 index 0000000..8c01a66 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/articulacao/passo-2.html @@ -0,0 +1,65 @@ +
+
+ Escolha a distância entre a mão e o corpo +
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-1.html b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-1.html new file mode 100755 index 0000000..ba2a36c --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-1.html @@ -0,0 +1,30 @@ +
+
+ Ponto inicial (A): escolha a posição inicial mais parecida dos dedos +
+
+
    +
  • + 0.
  • +
  • + 1.
  • +
  • + 2.
  • +
  • + 3.
  • +
  • + 4.
  • +
  • + 5.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-2.html b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-2.html new file mode 100755 index 0000000..48ac35c --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-2.html @@ -0,0 +1,214 @@ +
+
+ Ponto inicial (A): escolha a posição inicial dos dedos +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
  • 13.
  • +
  • 14.
  • +
  • 15.
  • +
  • 16.
  • +
  • 17.
  • +
  • 18.
  • +
  • 19.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-3.html b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-3.html new file mode 100755 index 0000000..96da69c --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-3.html @@ -0,0 +1,30 @@ +
+
+ Ponto final (B): escolha a posição final mais parecida dos dedos +
+
+
    +
  • + 0.
  • +
  • + 1.
  • +
  • + 2.
  • +
  • + 3.
  • +
  • + 4.
  • +
  • + 5.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-4.html b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-4.html new file mode 100755 index 0000000..5726508 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao-retilineo/passo-4.html @@ -0,0 +1,214 @@ +
+
+ Ponto inicial (B): escolha a posição final dos dedos +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
  • 13.
  • +
  • 14.
  • +
  • 15.
  • +
  • 16.
  • +
  • 17.
  • +
  • 18.
  • +
  • 19.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao/passo-1.html b/wikilibrasV2/view/templates/hand/configuracao/passo-1.html new file mode 100755 index 0000000..225703f --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao/passo-1.html @@ -0,0 +1,30 @@ +
+
+ Escolha a posição mais parecida dos dedos +
+
+
    +
  • + 0.
  • +
  • + 1.
  • +
  • + 2.
  • +
  • + 3.
  • +
  • + 4.
  • +
  • + 5.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/configuracao/passo-2.html b/wikilibrasV2/view/templates/hand/configuracao/passo-2.html new file mode 100755 index 0000000..ee1c6ed --- /dev/null +++ b/wikilibrasV2/view/templates/hand/configuracao/passo-2.html @@ -0,0 +1,214 @@ +
+
+ Escolha a posição dos dedos +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
  • 13.
  • +
  • 14.
  • +
  • 15.
  • +
  • 16.
  • +
  • 17.
  • +
  • 18.
  • +
  • 19.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
+
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
+
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/movimento/passo-1.html b/wikilibrasV2/view/templates/hand/movimento/passo-1.html new file mode 100755 index 0000000..240fec1 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/movimento/passo-1.html @@ -0,0 +1,37 @@ +
+
+ Escolha o movimento mais parecido +
+
+
    +
  • Pontual
  • +
  • Retilíneo
  • +
  • Circular
  • +
  • Semi-Circular
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-1.html b/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-1.html new file mode 100755 index 0000000..0622eb5 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-1.html @@ -0,0 +1,36 @@ +
+
+ Ponto inicial (A): palma da mão +
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-2.html b/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-2.html new file mode 100755 index 0000000..b8a4777 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/orientacao-retilineo/passo-2.html @@ -0,0 +1,36 @@ +
+
+ Ponto Final (B): palma da mão +
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/orientacao/passo-1.html b/wikilibrasV2/view/templates/hand/orientacao/passo-1.html new file mode 100755 index 0000000..f31860f --- /dev/null +++ b/wikilibrasV2/view/templates/hand/orientacao/passo-1.html @@ -0,0 +1,36 @@ +
+
+ Palma da mão +
+
+
    +
  • 1.
  • +
  • 2.
  • +
  • 3.
  • +
  • 4.
  • +
  • 5.
  • +
  • 6.
  • +
  • 7.
  • +
  • 8.
  • +
  • 9.
  • +
  • 10.
  • +
  • 11.
  • +
  • 12.
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/plano/passo-1.html b/wikilibrasV2/view/templates/hand/plano/passo-1.html new file mode 100755 index 0000000..822b709 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/plano/passo-1.html @@ -0,0 +1,86 @@ +
+
+ Escolha o plano do movimento +
+
+
    +
  • Baixo - Direita
  • +
  • Cima - Esquerda
  • +
  • Esquerda - Baixo
  • +
  • Direita - Cima
  • +
  • Baixo - Trás
  • +
  • Cima - Frente
  • +
  • Frente - Baixo
  • +
  • Trás - Cima
  • +
  • Frente - Esquerda
  • +
  • Trás - Direita
  • +
  • Esquerda - Trás
  • +
  • Direita - Frente
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/raio/passo-1.html b/wikilibrasV2/view/templates/hand/raio/passo-1.html new file mode 100755 index 0000000..c7277b9 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/raio/passo-1.html @@ -0,0 +1,31 @@ +
+
+ Escolha o tamanho do raio do movimento +
+
+
    +
  • Pequeno
  • +
  • Médio
  • +
  • Grande
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/sentido_inverso/passo-1.html b/wikilibrasV2/view/templates/hand/sentido_inverso/passo-1.html new file mode 100755 index 0000000..d385527 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/sentido_inverso/passo-1.html @@ -0,0 +1,25 @@ +
+
+ Escolha o sentido do movimento +
+
+
    +
  • Horário
  • +
  • Anti-horário
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/hand/timeline.html b/wikilibrasV2/view/templates/hand/timeline.html new file mode 100755 index 0000000..9f6cd22 --- /dev/null +++ b/wikilibrasV2/view/templates/hand/timeline.html @@ -0,0 +1,63 @@ +
+
+ +
+
+
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+ +
+
+
+
+ +
+
diff --git a/wikilibrasV2/view/templates/hand/velocidade/passo-1.html b/wikilibrasV2/view/templates/hand/velocidade/passo-1.html new file mode 100755 index 0000000..e8bd53b --- /dev/null +++ b/wikilibrasV2/view/templates/hand/velocidade/passo-1.html @@ -0,0 +1,31 @@ +
+
+ Escolha a velocidade do movimento +
+
+
    +
  • Lento
  • +
  • Normal
  • +
  • Rápido
  • +
+
+
+ diff --git a/wikilibrasV2/view/templates/index.html b/wikilibrasV2/view/templates/index.html new file mode 100755 index 0000000..794eae5 --- /dev/null +++ b/wikilibrasV2/view/templates/index.html @@ -0,0 +1,300 @@ + + + + +
+
+
+
+
+ +
+
+ Ajude a criar o sinal . +
+
+
OK
+
+
+
+
+
+
+ Vídeo de referência "" +
+
+ +
+
+ +
+
+ +
+
+
+
+ Expressão +
+
+ Mão direita +
+
+ Mão esquerda +
+
+
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+ +
+
+ +
+
+ +
+ +
+ +
+
+
+
+
+
+
+
+
GERAR + SINAL
+
+
+
+
+

+ O sinal "" feito pelo avatar está + correto? +

+
+
Vídeo de referência
+
+ +
+
+
+
+
+ Sinal "" construído +
+ +
+ +
+
+
+
+ Gerando o sinal "" +
+
+ +
+
+
+
+
+
ENVIAR + SINAL
+
CONFIRMAR + SINAL
+
+
+
+
+
+

Obrigado,

+
você configurou o sinal com sucesso!
+
+
+

+ Que pena, não há sinais disponíveis no momento! +

+
+ Ajude a expandir o dicionário gravando e enviando um vídeo, ou +
+
+ experimente uma tarefa de + demonstração. +
+
+
+ +
+
+
+
+
+
+
+

Você ainda não ensinou + sinais ao Ícaro.

+

Você já ensinou ao Ícaro + 1 sinal de LIBRAS.

+

+ Você já ensinou ao Ícaro x sinais de LIBRAS. +

+
+ +
+ +
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/wikilibrasV2/view/templates/ranking/ranking.html b/wikilibrasV2/view/templates/ranking/ranking.html new file mode 100755 index 0000000..374e8d4 --- /dev/null +++ b/wikilibrasV2/view/templates/ranking/ranking.html @@ -0,0 +1,47 @@ +
+
WikiRanking
+
Lorem Ipsum é apenas uma simulação de texto da indústria + tipográfica e de impressos, e vem sendo utilizado desde o século XVI.
+
+
+ +
+
+ +
+
+
+
+ º Posição +
+
+
+
+
+
+
+
+
+
+ Progresso: +
+
+
+
+ + + + + + + + + + + +
# +
Membro
+
Sinais
+
\ No newline at end of file diff --git a/wikilibrasV2/view/templates/submit-sign/submit-sign.html b/wikilibrasV2/view/templates/submit-sign/submit-sign.html new file mode 100755 index 0000000..b8ee57d --- /dev/null +++ b/wikilibrasV2/view/templates/submit-sign/submit-sign.html @@ -0,0 +1,125 @@ +
+
+ +
+ Envio concluído, muito obrigado! Em breve o seu + sinal estará no dicionário WikiLibras. +
+
+
+
+
+ + +

Sentiu falta de algum sinal no dicionário? Grave e envie o + vídeo do seu sinal aqui!

+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ + +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+ +
+ +
+
+
+
+
+
+
+
+ + +
+
+
diff --git a/wikilibrasV2/view/templates/tutorial/tutorial.html b/wikilibrasV2/view/templates/tutorial/tutorial.html new file mode 100755 index 0000000..ca36c41 --- /dev/null +++ b/wikilibrasV2/view/templates/tutorial/tutorial.html @@ -0,0 +1,24 @@ + \ No newline at end of file diff --git a/wikilibrasV2/wikilibras.py b/wikilibrasV2/wikilibras.py new file mode 100755 index 0000000..f5261f4 --- /dev/null +++ b/wikilibrasV2/wikilibras.py @@ -0,0 +1,157 @@ +# -*- coding: utf-8 -*- +from flask import request, make_response +from werkzeug import secure_filename +import json +import pbclient +import os +import pyutil +import requests +import tempfile +import shutil + +class Wikilibras: + + def __init__(self, configuration, template_env): + self.config = configuration + self.env = template_env + self.__setup_pb_client() + + def __create_tasks(self, project): + test_signs = ["ENSINADO", "ENTANTO", "ENTENDIDO"] + for sign in test_signs: + video_ref = "/videos/" + sign + "_REF.webm" + task = dict(sign_name=sign, submission_date=pyutil.get_date_now(), video_ref=video_ref) + pbclient.create_task(project.id, task) + + def __setup_pb_client(self): + pbclient.set('endpoint', self.config['PYBOSSA_ENDPOINT']) + pbclient.set('api_key', self.config['PYBOSSA_API_KEY']) + + def __find_project(self, app_short_name): + projects = pbclient.find_project(short_name=app_short_name) + return projects[0] if len(projects) > 0 else None + + def __setup_project(self, project): + self.__update_project_info(project) + + def __update_project_info(self, project): + template = self.env.get_template('index.html') + project.info['task_presenter'] = template.render( + server = self.config['HOST_STATIC_FILES_ENDPOINT'], + server_backend = self.config['HOST_ENDPOINT'], + app_shortname = self.config['PYBOSSA_APP_SHORT_NAME'], + api_host = self.config['API_HOST'], + homepage_url = self.config['HOMEPAGE_URL'], + upload_sign_host = self.config['API_DB_HOST'] + ) + project.info['thumbnail'] = self.config['HOST_STATIC_FILES_ENDPOINT'] + "/img/thumbnail.png" + project.info['sched'] = "incremental" + project.info['published'] = True + project.allow_anonymous_contributors = False + project.description = self.config['PYBOSSA_APP_DESCRIPTION'] + pbclient.update_project(project) + + def create_project(self): + app_short_name = self.config['PYBOSSA_APP_SHORT_NAME'] + project = self.__find_project(app_short_name) + result_msg = "" + if (project): + result_msg = "The project " + app_short_name + " was already created." + else: + project = pbclient.create_project(self.config['PYBOSSA_APP_NAME'], app_short_name, self.config['PYBOSSA_APP_DESCRIPTION']) + if (project): + self.__setup_project(project) + result_msg = "The project " + app_short_name + " was created." + else: + result_msg = "The project " + app_short_name + " couldn't be created. Check the server log for details." + pyutil.log(result_msg) + return result_msg + + def update_project(self): + app_short_name = self.config['PYBOSSA_APP_SHORT_NAME'] + project = self.__find_project(app_short_name) + # self.__create_tasks(project) + self.__update_project_info(project) + result_msg = "The project " + app_short_name + " was updated." + pyutil.log(result_msg) + return result_msg + + def __find_task(self, project_id, task_id): + tasks = pbclient.find_tasks(project_id, id=task_id) + return tasks[0] if len(tasks) > 0 else None + + def __find_taskruns(self, project_id, task_id): + return pbclient.find_taskruns(project_id, task_id=task_id) + + def __number_of_taskruns(self, project_id, task_id): + taskruns = self.__find_taskruns(project_id, task_id) + return len(taskruns) + + def __close_task(self, project_id, task_id): + pyutil.log("Closing the task with ID=" + str(task_id) + ".") + task = self.__find_task(project_id, task_id) + number_of_taskruns = self.__number_of_taskruns(project_id, task_id) + task.n_answers = number_of_taskruns + 1 + pbclient.update_task(task) + return "The task with ID=" + str(task_id) + " was closed." + + def get_file(self, url, filename): + r = requests.get(url, stream = True) + if (r.status_code == 200): + with open(filename, 'wb') as f: + for chunk in r.iter_content(chunk_size = 1024): + if chunk: + f.write(chunk) + return True + return False + + def finish_task(self): + task_id = request.form['task_id'] + api_host = self.config['API_HOST'] + api_dbhost = self.config['API_DB_HOST'] + user_id = request.form['user_id'] + sign_name = request.form['sign_name'] + project_id = request.form['project_id'] + number_of_approval = int(request.form['number_of_approval']) + agreement_number = self.config['AGREEMENT_NUMBER'] + result_msg = "" + code = 200 + if (number_of_approval >= agreement_number): + tmp_dir = tempfile.NamedTemporaryFile().name + if not os.path.exists(tmp_dir): + os.makedirs(tmp_dir) + blend_path = os.path.join(tmp_dir, sign_name + ".blend") + video_path = os.path.join(tmp_dir, sign_name + ".webm") + blend_url = '%s/public/%s/%s.blend' % (api_host, user_id, sign_name) + video_url = '%s/public/%s/%s.webm' % (api_host, user_id, sign_name) + blend_downloaded = self.get_file(blend_url, blend_path) + video_downloaded = self.get_file(video_url, video_path) + if (not blend_downloaded): + pyutil.log("blend file: %s was not downloaded" % (blend_url)) + elif (not video_downloaded): + pyutil.log("video file: %s was not downloaded" % (video_url)) + else: + files = [ + ("video", (video_path, open(video_path, "rb"))), + ("video", (blend_path, open(blend_path, "rb"))) + ] + body = { + "nome": sign_name, + "idtask": task_id, + "selo": 1 + } + r = requests.post( + "%s/updatesinal" % (api_dbhost), + files=files, + data=body + ) + shutil.rmtree(tmp_dir) + code = r.status_code + if (code == 200): + result_msg = self.__close_task(project_id, task_id) + else: + result_msg = r.text + else: + result_msg = "The task with ID=" + str(task_id) + " didn't reach the agreement number yet." + pyutil.log(str(result_msg).encode("UTF-8", errors="ignore")) + return make_response(result_msg, code) -- libgit2 0.21.2