diff options
author | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-30 10:34:12 -0400 |
---|---|---|
committer | Michael Gapczynski <mtgap@owncloud.com> | 2012-07-30 10:34:12 -0400 |
commit | 530e7f03cd2a5c8b348408cb33ea14a424c48f49 (patch) | |
tree | 44ad3c9398bc1fa20f0c0d6e09f013a1602837ad /apps | |
parent | db72ce398b9463f1f6547b864494e1c8b3267f1c (diff) | |
download | nextcloud-server-530e7f03cd2a5c8b348408cb33ea14a424c48f49.tar.gz nextcloud-server-530e7f03cd2a5c8b348408cb33ea14a424c48f49.zip |
Remove accidently added 3rd party apps
Diffstat (limited to 'apps')
276 files changed, 0 insertions, 22402 deletions
diff --git a/apps/journal/.gitignore b/apps/journal/.gitignore deleted file mode 100644 index e2ff07d14d8..00000000000 --- a/apps/journal/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# the default generated dir + db file -data -owncloud -config/config.php -config/mount.php -apps/inc.php - -# just sane ignores -.*.sw[po] -*.bak -*.BAK -*~ -*.orig -*.class -.cvsignore -Thumbs.db -*.py[co] -_darcs/* -CVS/* -.svn/* -RCS/* - -# kdevelop -.kdev -*.kdev4 - -# Lokalize -*lokalize* - -# eclipse -.project -.settings - -# netbeans -nbproject - -# geany -*.geany - -# Cloud9IDE -.settings.xml - -# vim ex mode -.vimrc - -# Mac OS -.DS_Store - -# WebFinger -.well-known -/.buildpath diff --git a/apps/journal/COPYING-AGPL b/apps/journal/COPYING-AGPL deleted file mode 100644 index dba13ed2ddf..00000000000 --- a/apps/journal/COPYING-AGPL +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - 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 AGPL, see -<http://www.gnu.org/licenses/>. diff --git a/apps/journal/COPYING-README b/apps/journal/COPYING-README deleted file mode 100644 index 18f06caa3ec..00000000000 --- a/apps/journal/COPYING-README +++ /dev/null @@ -1,10 +0,0 @@ -Files in TAL Templating System for ownCloud are licensed under the Affero General Public License version 3, -the text of which can be found in COPYING-AGPL, or any later version of the AGPL, -unless otherwise noted. - -Licensing of components: -* PHPTAL - http://phptal.org/ : LGPL - -All unmodified files from these and other sources retain their original copyright -and license notices: see the relevant individual files. - diff --git a/apps/journal/Changelog b/apps/journal/Changelog deleted file mode 100644 index 08b20831bed..00000000000 --- a/apps/journal/Changelog +++ /dev/null @@ -1,5 +0,0 @@ -# Changelog - -### 0.1 - -- First release.
\ No newline at end of file diff --git a/apps/journal/README.md b/apps/journal/README.md deleted file mode 100644 index 7c06e4f0389..00000000000 --- a/apps/journal/README.md +++ /dev/null @@ -1,38 +0,0 @@ -# Journal/Notes app for ownCloud - -## Features - -- Saves notes/journal entries as VJOURNAL records in the ownCloud Calendar. - -- Integrates with ownClouds search backend. - -- Sort entries by date/time ascending/descending or summary ascending/descending. - -- Plain text or rich text editing (rich text editing is still buggy and immature). - -- Syncs with KDEPIMs Journal part. - -- Completed tasks from the Task app can be automatically added as journal entries. - -- Stores entry data as json objects in each element for quich access and to minimize ajax calls. - -To install this app you will first have to install the [TAL Page Templates for ownCloud](/tanghus/tal#readme) app. - -## Installation from git - -1. Go to your ownCloud apps dir and clone the repo there: - <pre> - cd owncloud/apps - git clone git://github.com/tanghus/journal.git</pre> - -2. From your browser go to the ownCloud apps page (`/settings/apps.php`) and enable the Journal app. - -3. After a page refresh you should see the Journal app in the main menu. - - -## DISCLAIMER - -There's no garantee this app won't eat your data, chew it up and spit it out. It works directly on the calendar app data -though not touching anything but VJOURNAL entries. [Always backup!](http://tanghus.net/2012/04/backup-owncloud-calendar-and-contacts/) - -Please report any issues at the [github issue tracker](https://github.com/tanghus/journal/issues)
\ No newline at end of file diff --git a/apps/journal/TODO b/apps/journal/TODO deleted file mode 100644 index 28271365813..00000000000 --- a/apps/journal/TODO +++ /dev/null @@ -1,13 +0,0 @@ - -- Fix categories. - -- Hide empty elements? - -- Check if entered text in one mode gets transfered when changing modes. - -- Make edit area fit size and scrollable. - -- Add an "only read from this calendar" checkbox. - -- Test, test, test in other browser as well. - diff --git a/apps/journal/ajax/categories/categoriesfor.php b/apps/journal/ajax/categories/categoriesfor.php deleted file mode 100644 index 846af300de8..00000000000 --- a/apps/journal/ajax/categories/categoriesfor.php +++ /dev/null @@ -1,28 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('contacts'); - -$id = isset($_GET['id'])?$_GET['id']:null; -if(is_null($id)) { - OCP\JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('No ID provided')))); - exit(); -} -$vcard = OC_Contacts_App::getContactVCard( $id ); -foreach($vcard->children as $property){ - //OCP\Util::writeLog('contacts','ajax/categories/checksumfor.php: '.$property->name, OCP\Util::DEBUG); - if($property->name == 'CATEGORIES') { - $checksum = md5($property->serialize()); - OCP\JSON::success(array('data' => array('value'=>$property->value, 'checksum'=>$checksum))); - exit(); - } -} -OCP\JSON::error(array('data' => array('message' => OC_Contacts_App::$l10n->t('Error setting checksum.')))); -?> diff --git a/apps/journal/ajax/categories/delete.php b/apps/journal/ajax/categories/delete.php deleted file mode 100644 index e68d608c5da..00000000000 --- a/apps/journal/ajax/categories/delete.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('contacts'); -OCP\JSON::callCheck(); - -foreach ($_POST as $key=>$element) { - debug('_POST: '.$key.'=>'.print_r($element, true)); -} - -require_once('../util.php'); - -$categories = isset($_POST['categories'])?$_POST['categories']:null; - -if(is_null($categories)) { - bailOut(OC_Contacts_App::$l10n->t('No categories selected for deletion.')); -} - -debug(print_r($categories, true)); - -$addressbooks = OC_Contacts_Addressbook::all(OCP\USER::getUser()); -if(count($addressbooks) == 0) { - bailOut(OC_Contacts_App::$l10n->t('No address books found.')); -} -$addressbookids = array(); -foreach($addressbooks as $addressbook) { - $addressbookids[] = $addressbook['id']; -} -$contacts = OC_Contacts_VCard::all($addressbookids); -if(count($contacts) == 0) { - bailOut(OC_Contacts_App::$l10n->t('No contacts found.')); -} - -$cards = array(); -foreach($contacts as $contact) { - $cards[] = array($contact['id'], $contact['carddata']); -} - -debug('Before delete: '.print_r($categories, true)); - -$catman = new OC_VCategories('contacts'); -$catman->delete($categories, $cards); -debug('After delete: '.print_r($catman->categories(), true)); -OC_Contacts_VCard::updateDataByID($cards); -OCP\JSON::success(array('data' => array('categories'=>$catman->categories()))); - -?> diff --git a/apps/journal/ajax/categories/list.php b/apps/journal/ajax/categories/list.php deleted file mode 100644 index ac8976fa0ec..00000000000 --- a/apps/journal/ajax/categories/list.php +++ /dev/null @@ -1,17 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); - -$categories = OC_Journal_App::getCategories(); - -OCP\JSON::success(array('data' => array('categories'=>$categories))); - -?> diff --git a/apps/journal/ajax/categories/rescan.php b/apps/journal/ajax/categories/rescan.php deleted file mode 100644 index d746f9179fe..00000000000 --- a/apps/journal/ajax/categories/rescan.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); - -foreach ($_POST as $key=>$element) { - debug('_POST: '.$key.'=>'.print_r($element, true)); -} - -function bailOut($msg) { - OCP\JSON::error(array('data' => array('message' => $msg))); - OCP\Util::writeLog('journal','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG); - exit(); -} -function debug($msg) { - OCP\Util::writeLog('journal','ajax/categories/rescan.php: '.$msg, OCP\Util::DEBUG); -} - -$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser()); -if(count($calendars) == 0) { - bailOut(OC_Calendar_App::$l10n->t('No calendars found.')); -} -$events = array(); -foreach($calendars as $calendar) { - $calendar_events = OC_Calendar_Object::all($calendar['id']); - $events = $events + $calendar_events; -} -if(count($events) == 0) { - bailOut(OC_Calendar_App::$l10n->t('No events found.')); -} - -OC_Calendar_App::scanCategories($events); -$categories = OC_Calendar_App::getCategoryOptions(); - -OCP\JSON::success(array('data' => array('categories'=>$categories)));
\ No newline at end of file diff --git a/apps/journal/ajax/delete.php b/apps/journal/ajax/delete.php deleted file mode 100644 index 4013e4440a6..00000000000 --- a/apps/journal/ajax/delete.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** - * ownCloud - Journal - * - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); -OCP\JSON::callCheck(); - -$id = isset($_POST['id'])?$_POST['id']:null; -if(is_null($id)) { - OCP\JSON::error(array('data'=>array('message' => OC_Journal_App::$l10n->t('ID is not set!')))); - exit; -} -$journal = OC_Calendar_App::getEventObject($id); -if($journal) { - OC_Calendar_Object::delete($id); - OCP\JSON::success(array('data' => array( 'id' => $id ))); -} else { - OCP\JSON::error(array('data' => array('id' => $id, 'message' => OC_Journal_App::$l10n->t('Could not find journal entry: '.$id)))); -}
\ No newline at end of file diff --git a/apps/journal/ajax/entries.php b/apps/journal/ajax/entries.php deleted file mode 100644 index 03f2366d33b..00000000000 --- a/apps/journal/ajax/entries.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * Copyright (c) 2011 Georg Ehrke <ownclouddev at georgswebsite dot de> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -// Init owncloud -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); - -$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); -$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); -session_write_close(); -$journals = array(); -foreach( $calendars as $calendar ){ - $calendar_journals = OC_Calendar_Object::all($calendar['id']); - foreach( $calendar_journals as $journal ) { - if($journal['objecttype']!='VJOURNAL') { - continue; - } - if(is_null($journal['summary'])) { - continue; - } - $object = OC_VObject::parse($journal['calendardata']); - $vjournalobj = $object->VJOURNAL; - try { - $journals[] = OC_Journal_App::arrayForJSON($journal['id'], $vjournalobj, $user_timezone); - } catch(Exception $e) { - OCP\Util::writeLog('journal', 'ajax/getentries.php. id: '.$journal['id'].' '.$e->getMessage(), OCP\Util::ERROR); - } - } -} - -OCP\JSON::success(array('data' => array('entries' => $journals))); diff --git a/apps/journal/ajax/saveproperty.php b/apps/journal/ajax/saveproperty.php deleted file mode 100644 index 016f922a9af..00000000000 --- a/apps/journal/ajax/saveproperty.php +++ /dev/null @@ -1,138 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -$htmlwrap = '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head></head><body>%s</body></html>'; -$divwrap = '<div>%s</div>'; -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); -OCP\JSON::callCheck(); - -$id = isset($_POST['id'])?$_POST['id']:null; -$property = isset($_POST['type'])?$_POST['type']:null; -$value = isset($_POST['value'])?$_POST['value']:null; -if(is_null($id)) { - OCP\JSON::error(array('data'=>array('message' => OC_Journal_App::$l10n->t('ID is not set!')))); - exit; -} -if(is_null($property)) { - OCP\JSON::error(array('data'=>array('message' => OC_Journal_App::$l10n->t('Property name is not set!')))); - exit; -} -if(is_null($value)) { - OCP\JSON::error(array('data'=>array('message' => OC_Journal_App::$l10n->t('Property value is not set!')))); - exit; -} - -foreach($_POST as $key => $val) { - error_log($key.': '.print_r($val, true)); -} - -$parameters = isset($_POST['parameters'])? $_POST['parameters']:null; -if($id == 'new') { - $vcalendar = OC_Journal_App::createVCalendar(); -} else { - $vcalendar = OC_Calendar_App::getVCalendar( $id ); -} -error_log('saveproperty: '.$property.': '.print_r($value, true)); -$vjournal = $vcalendar->VJOURNAL; -switch($property) { - case 'DESCRIPTION': - $hasgenericformat = false; - $haskdeformat = false; - if(!$vjournal->DESCRIPTION) { - $vjournal->setString('DESCRIPTION', $value); - } - if($parameters && isset($parameters['FORMAT']) && strtoupper($parameters['FORMAT']) == 'HTML') { - if($value[0] != '<') { // Fugly hack coming up - $value = sprintf($divwrap, $value); - } - $vjournal->DESCRIPTION->value = sprintf($htmlwrap, $value); - foreach($vjournal->DESCRIPTION->parameters as $parameter){ - if(stripos($parameter->name, 'X-KDE-TEXTFORMAT') !== false && stripos($parameter->value, 'HTML') !== false){ - $haskdeformat = true; - } - if(stripos($parameter->name, 'X-TEXTFORMAT') !== false && stripos($parameter->value, 'HTML') !== false){ - $hasgenericformat = true; - } - } - if(!$haskdeformat) { - try { - $vjournal->DESCRIPTION->add(new Sabre_VObject_Parameter('X-KDE-TEXTFORMAT', 'HTML')); - } catch (Exception $e) { - OCP\JSON::error(array('data'=>array('message'=>OC_Journal_App::$l10n->t('Error setting rich text format parameter: '.$e->getMessage())))); - exit(); - } - } - if(!$hasgenericformat) { // Add a more generic text formatting parameter in case other clients would use VJOURNAL this way. - try { - $vjournal->DESCRIPTION->add(new Sabre_VObject_Parameter('X-TEXTFORMAT', 'HTML')); - } catch (Exception $e) { - OCP\JSON::error(array('data'=>array('message'=>OC_Journal_App::$l10n->t('Error setting rich text format parameter: '.$e->getMessage())))); - exit(); - } - } - } else { - $vjournal->DESCRIPTION->value = $value; - } - break; - case 'DTSTART': - try { - $date_only = isset($_POST['date_only']) && (bool)$_POST['date_only'] == true?true:false; - $timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); - $timezone = new DateTimeZone($timezone); - //$dtstart = new DateTime($value, $timezone); - $dtstart = new DateTime('@'.$value); - $dtstart->setTimezone($timezone); - $type = Sabre_VObject_Property_DateTime::LOCALTZ; - if ($date_only) { - $type = Sabre_VObject_Property_DateTime::DATE; - } - $vjournal->setDateTime('DTSTART', $value, $type); - } catch (Exception $e) { - OCP\JSON::error(array('data'=>array('message'=>OC_Journal_App::$l10n->t('Invalid date/time: '.$e->getMessage())))); - exit(); - } - break; - case 'ORGANIZER': - case 'SUMMARY': - case 'CATEGORIES': - $vobject = $vjournal->getVObject(); - if(isset($vobject[$property])) { - $vobject[$property]['value'] = $value; - } else { - $vjournal->setString($property, $value); - } - break; - $vjournal->setString($property, $value); - break; - default: - OCP\JSON::error(array('data'=>array('message'=>'Unknown type: '.$property))); - exit(); -} - -$vjournal->setDateTime('LAST-MODIFIED', 'now', Sabre_VObject_Property_DateTime::UTC); -$vjournal->setDateTime('DTSTAMP', 'now', Sabre_VObject_Property_DateTime::UTC); - -if($id == 'new') { - // TODO: Have a calendar ID parameter in request. - $cid = OCP\Config::getUserValue(OCP\User::getUser(), 'journal', 'default_calendar', null); - // Check that the calendar exists and that it's ours. - $cid = OC_Calendar_App::getCalendar($cid, true); - if(!$cid) { - OCP\Util::writeLog('journal', 'The default calendar '.$cid.' is either not owned by '.OCP\User::getUser().' or doesn\'t exist.', OCP\Util::WARN); - $calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); - $first_calendar = reset($calendars); - $cid = $first_calendar['id']; - } - $id = OC_Calendar_Object::add($cid, $vcalendar->serialize()); -} else { - OC_Calendar_Object::edit($id, $vcalendar->serialize()); -} -$user_timezone = OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone', date_default_timezone_get()); -$journal_info = OC_Journal_App::arrayForJSON($id, $vjournal, $user_timezone); -OCP\JSON::success(array('data' => $journal_info)); diff --git a/apps/journal/ajax/setdefaultcalendar.php b/apps/journal/ajax/setdefaultcalendar.php deleted file mode 100644 index a82c1e3cf1f..00000000000 --- a/apps/journal/ajax/setdefaultcalendar.php +++ /dev/null @@ -1,36 +0,0 @@ -<?php -/** - * ownCloud - Addressbook - * - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('journal'); -OCP\JSON::callCheck(); - -$id = isset($_POST['id'])?$_POST['id']:null; -if(is_null($id)) { - OCP\JSON::error(array('data'=>array('message' => OC_Journal_App::$l10n->t('ID is not set!')))); - exit; -} -if(OCP\Config::setUserValue(OCP\USER::getUser(), 'journal', 'default_calendar', $id)) { - OC_Calendar_Object::delete($id); - OCP\JSON::success(array('data' => array( 'id' => $id ))); -} else { - OCP\JSON::error(array('data' => array('id' => $id, 'message' => OC_Journal_App::$l10n->t('Could not set default calendar: '.$id)))); -}
\ No newline at end of file diff --git a/apps/journal/ajax/util.php b/apps/journal/ajax/util.php deleted file mode 100644 index b690b2e1948..00000000000 --- a/apps/journal/ajax/util.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php -/** - * ownCloud - Addressbook - * - * @author Thomas Tanghus - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -function bailOut($msg, $tracelevel=1, $debuglevel=OCP\Util::ERROR) { - OCP\JSON::error(array('data' => array('message' => $msg))); - debug($msg, $tracelevel, $debuglevel); - exit(); -} - -function debug($msg, $tracelevel=0, $debuglevel=OCP\Util::DEBUG) { - if(PHP_VERSION >= "5.4") { - $call = debug_backtrace(false, $tracelevel+1); - } else { - $call = debug_backtrace(false); - } - error_log('trace: '.print_r($call, true)); - $call = $call[$tracelevel]; - if($debuglevel !== false) { - OCP\Util::writeLog('journal', $call['file'].'. Line: '.$call['line'].': '.$msg, $debuglevel); - } -} diff --git a/apps/journal/appinfo/app.php b/apps/journal/appinfo/app.php deleted file mode 100644 index 5f33d40399f..00000000000 --- a/apps/journal/appinfo/app.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php -$l=new OC_L10N('journal'); -OC::$CLASSPATH['OC_Calendar_Calendar'] = 'calendar/lib/calendar.php'; -OC::$CLASSPATH['OC_Journal_App'] = 'journal/lib/app.php'; -OC::$CLASSPATH['OC_Search_Provider_Journal'] = 'journal/lib/search.php'; -OC::$CLASSPATH['OC_Journal_Hooks'] = 'journal/lib/hooks.php'; - -OCP\Util::connectHook('OC_Task', 'taskCompleted', 'OC_Journal_Hooks', 'taskToJournalEntry'); - -OCP\App::addNavigationEntry( array( - 'id' => 'journal_index', - 'order' => 11, - 'href' => OCP\Util::linkTo( 'journal', 'index.php' ), - 'icon' => OCP\Util::imagePath( 'journal', 'journal.png' ), - 'name' => $l->t('Journal'))); - -OC_Search::registerProvider('OC_Search_Provider_Journal'); -OCP\App::registerPersonal('journal','settings');
\ No newline at end of file diff --git a/apps/journal/appinfo/info.xml b/apps/journal/appinfo/info.xml deleted file mode 100644 index 426e38eb9f1..00000000000 --- a/apps/journal/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<info> - <id>journal</id> - <name>Journal</name> - <version>0.1</version> - <licence>AGPL</licence> - <author>Thomas Tanghus</author> - <require>5</require> - <shipped>true</shipped> - <description>Journal view from calendar</description> -</info> diff --git a/apps/journal/css/journal.css b/apps/journal/css/journal.css deleted file mode 100644 index ac2ae74c65a..00000000000 --- a/apps/journal/css/journal.css +++ /dev/null @@ -1,19 +0,0 @@ -#leftcontent a { font-weight: bold; } -#metadata { position: fixed; background-color: #ccc; width: 20em; right: 0; top: 6.5em; bottom: 0; overflow: auto; padding: 1em; margin: 0; font-size: 1em; font-weight: bold; } -#metadata :disabled.property { background-color: #ccc; -webkit-appearance:none !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; } -#entry { position: fixed; background: #fff; top: 6.5em; bottom: 0; left: 32.5em !important; right: 22em; padding: 1em; margin: 0; } -div.propertycontainer[data-type="DESCRIPTION"] { height: 90%; } -#description { width: 95%; height: 90%; } -.rte-content { position: absolute; left: 1em; right: 1em; top: 7em; bottom: 1em; overflow: auto; } -#summary { width: 95%; font-size: 1.4em; font-weight: bold; height: 1.6em; } -.editable,.content { font-size: 1.2em; background-color: #fff !important; border: 1px solid #fff !important; -webkit-appearance:none !important; -moz-appearance:none !important; -webkit-box-sizing:none !important; -moz-box-sizing:none !important; box-sizing:none !important; -moz-box-shadow: none; -webkit-box-shadow: none; box-shadow: none; -moz-border-radius: 3px; -webkit-border-radius: 3px; border-radius: 3px; cursor: text; } -.editable:hover,.editable:focus,.editable:hover:active { border: 1px solid #1d2d44 !important; } -#categories,#organizer,#location,#link { width: 18em; clear: right; } -#dtstartdate { width: 10em; } -#dtstarttime { width: 5em; } -.loading { background: url('%webroot%/core/img/loading.gif') no-repeat center !important; cursor: wait; } -.action { padding-left: 0.5em; } -label,dt { color: #aaa; } -label:hover, dt:hover { color: #333; } -.required { color: red; border: 3px solid red; } -input { font-size: 1em; font-weight: bold; }
\ No newline at end of file diff --git a/apps/journal/css/rte.css b/apps/journal/css/rte.css deleted file mode 100644 index e786599002a..00000000000 --- a/apps/journal/css/rte.css +++ /dev/null @@ -1,7 +0,0 @@ -.rte-toolbar { margin: 0; width:100%; height:22px; padding:0; list-style-type:none; } -.rte-toolbar li button, .rte-toolbar li a { float:left; cursor:pointer; opacity: 0.6; padding:0; margin: 0; border: 0; border-radius: 0; outline: 0; background: inherit; } -.rte-toolbar li button:hover { opacity: 0.8; } -.rte-content { cursor:text;position:absolute; border-color:#000;border-style:solid;white-space: pre-wrap;word-wrap:break-word; padding: 0.2em; } -.rte-content ul { list-style: circle inside; } -.rte-content li { padding-left: 1em; } - diff --git a/apps/journal/img/bold.svg b/apps/journal/img/bold.svg deleted file mode 100644 index 2b06228258a..00000000000 --- a/apps/journal/img/bold.svg +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"> -<defs/> -<g id="layer4"> - <g id="g2464" transform="translate(-3.90271, -4.31297)" fill="none"> - <path id="path2277" transform="translate(4.74736, 5.23002)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M5.13684 0L0 13.8281L3.42454 13.8281L4.1862 11.5856L10.1818 11.5856L10.9586 13.8281L14.3831 13.8281L9.24627 0L8.21891 0L6.1642 0ZM7.19155 3.17671L9.10715 8.59582L5.27595 8.59582Z"/> - </g> - </g> -</svg> diff --git a/apps/journal/img/indent-less.svg b/apps/journal/img/indent-less.svg deleted file mode 100644 index 246089c293c..00000000000 --- a/apps/journal/img/indent-less.svg +++ /dev/null @@ -1,300 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.42+devel" - sodipodi:docbase="/home/jimmac/gfx/ximian/tango-icon-theme/scalable/actions" - sodipodi:docname="format-indent-less.svg"> - <defs - id="defs4200"> - <linearGradient - id="linearGradient5157"> - <stop - style="stop-color:#555753" - offset="0" - id="stop5159" /> - <stop - style="stop-color:#555753;stop-opacity:0;" - offset="1" - id="stop5161" /> - </linearGradient> - <linearGradient - id="linearGradient2591"> - <stop - style="stop-color:#9db029;stop-opacity:1;" - offset="0" - id="stop2593" /> - <stop - style="stop-color:#869623;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop2595" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient15224" - x1="22.308331" - y1="18.992140" - x2="35.785294" - y2="39.498238" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.060837,0.000000,0.000000,0.987595,4.641161,4.108291)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2259"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop2261" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop2263" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2259" - id="linearGradient2265" - x1="26.076092" - y1="26.696676" - x2="30.811172" - y2="42.007351" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.993566,0.000000,0.000000,1.000000,6.219859,4.033411)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2216"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop2218" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop2220" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2216" - id="linearGradient2222" - x1="36.8125" - y1="39.15625" - x2="39.0625" - y2="42.0625" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(6.161836,4.033411)" /> - <linearGradient - id="linearGradient2224"> - <stop - style="stop-color:#7c7c7c;stop-opacity:1;" - offset="0" - id="stop2226" /> - <stop - style="stop-color:#b8b8b8;stop-opacity:1;" - offset="1" - id="stop2228" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient5157" - id="linearGradient5163" - x1="10.729691" - y1="26.422195" - x2="2.3941064" - y2="26.422195" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(-1.188000,0.000000,0.000000,1.188000,38.20277,4.174916)" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="0.28627451" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="32.761989" - inkscape:cy="19.079251" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="770" - inkscape:window-height="852" - inkscape:window-x="395" - inkscape:window-y="881" - inkscape:showpageshadow="false" - fill="#555753" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Unindent</dc:title> - <dc:date></dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Jakub Steiner</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>indent</rdf:li> - <rdf:li>less</rdf:li> - <rdf:li>unindent</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - <dc:contributor> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:contributor> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="17.63052" - height="2" - x="10" - y="6" /> - <rect - y="10" - x="10" - height="2" - width="16.324554" - id="rect4250" - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="15" - height="2" - x="10" - y="14" /> - <rect - y="18" - x="10" - height="2" - width="17.63052" - id="rect4254" - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - <path - sodipodi:nodetypes="cccccccc" - id="path8643" - d="M 35.851425,26.743533 L 35.851425,38.610554 L 22.739004,38.610554 L 22.739004,44.458667 L 9,32.651858 L 22.741562,21 L 22.741562,26.747164 L 35.851425,26.743533 z " - style="opacity:1;color:#000000;fill:url(#linearGradient5163);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - </g> -</svg> diff --git a/apps/journal/img/indent-more.svg b/apps/journal/img/indent-more.svg deleted file mode 100644 index 4e137cf4528..00000000000 --- a/apps/journal/img/indent-more.svg +++ /dev/null @@ -1,295 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.42+devel" - sodipodi:docbase="/home/jimmac/gfx/ximian/tango-icon-theme/scalable/actions" - sodipodi:docname="format-indent-more.svg"> - <defs - id="defs4200"> - <linearGradient - id="linearGradient5157"> - <stop - style="stop-color:#555753" - offset="0" - id="stop5159" /> - <stop - style="stop-color:#555753;stop-opacity:0;" - offset="1" - id="stop5161" /> - </linearGradient> - <linearGradient - id="linearGradient2591"> - <stop - style="stop-color:#9db029;stop-opacity:1;" - offset="0" - id="stop2593" /> - <stop - style="stop-color:#869623;stop-opacity:1.0000000;" - offset="1.0000000" - id="stop2595" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient15224" - x1="22.308331" - y1="18.992140" - x2="35.785294" - y2="39.498238" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.060837,0.000000,0.000000,0.987595,4.641161,4.108291)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2259"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop2261" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop2263" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2259" - id="linearGradient2265" - x1="26.076092" - y1="26.696676" - x2="30.811172" - y2="42.007351" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.993566,0.000000,0.000000,1.000000,6.219859,4.033411)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2216"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop2218" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop2220" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2216" - id="linearGradient2222" - x1="36.8125" - y1="39.15625" - x2="39.0625" - y2="42.0625" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(6.161836,4.033411)" /> - <linearGradient - id="linearGradient2224"> - <stop - style="stop-color:#7c7c7c;stop-opacity:1;" - offset="0" - id="stop2226" /> - <stop - style="stop-color:#b8b8b8;stop-opacity:1;" - offset="1" - id="stop2228" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient5157" - id="linearGradient5163" - x1="10.729691" - y1="26.422195" - x2="2.3941064" - y2="26.422195" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.188000,0.000000,0.000000,1.188000,6.648659,4.174916)" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="0.28627451" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="32.761989" - inkscape:cy="19.079251" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="770" - inkscape:window-height="852" - inkscape:window-x="395" - inkscape:window-y="881" - inkscape:showpageshadow="false" - fill="#555753" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Indent More</dc:title> - <dc:date></dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Jakub Steiner</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>indent</rdf:li> - <rdf:li>more</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - <dc:identifier>http://jimmac.musichall.cz</dc:identifier> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="12.000005" - height="2" - x="26.00001" - y="6" /> - <rect - y="10" - x="26.00001" - height="2" - width="11.111115" - id="rect4250" - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="10.209573" - height="2" - x="26.00001" - y="14" /> - <rect - y="18" - x="26.00001" - height="2" - width="12.000005" - id="rect4254" - style="color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - <path - sodipodi:nodetypes="cccccccc" - id="path8643" - d="M 9,26.743533 L 9,38.610554 L 22.112421,38.610554 L 22.112421,44.458667 L 35.851425,32.651858 L 22.109863,21 L 22.109863,26.747164 L 9,26.743533 z " - style="opacity:1;color:#000000;fill:url(#linearGradient5163);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1.00000036;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:10;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - </g> -</svg> diff --git a/apps/journal/img/italic.svg b/apps/journal/img/italic.svg deleted file mode 100644 index 1eeb4fc1321..00000000000 --- a/apps/journal/img/italic.svg +++ /dev/null @@ -1,8 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"> -<g id="layer5"/><g id="layer2"> - <path id="path2211" transform="translate(1.99698, 0.976621)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M9.01429 0L0 13.4464L1.9531 13.4464L3.90334 10.5391L9.76548 10.5391L9.76548 13.4464L11.2679 13.4464L11.2679 0ZM9.76548 1.81708L9.76548 8.72201L5.12224 8.72201Z"/> - </g> -</svg> diff --git a/apps/journal/img/journal.png b/apps/journal/img/journal.png Binary files differdeleted file mode 100644 index f95dd8e9f3a..00000000000 --- a/apps/journal/img/journal.png +++ /dev/null diff --git a/apps/journal/img/journal.svg b/apps/journal/img/journal.svg deleted file mode 100644 index 2ee85ef0699..00000000000 --- a/apps/journal/img/journal.svg +++ /dev/null @@ -1,104 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="translate(-0.54277, -2.50102)" gradientUnits="objectBoundingBox" x1="0.46156580718" y1="0.26673472489" x2="0.46156580718" y2="1.13340132578" spreadMethod="pad"> - <stop stop-color="#ffffff" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#e6e6e6" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient1" gradientTransform="translate(-0.54277, -2.50102)" gradientUnits="objectBoundingBox" x1="0.15385526906" y1="1.20006799200" x2="0.15385526906" y2="0.13340137911" spreadMethod="pad"> - <stop stop-color="#969696" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#bebebe" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient2" gradientTransform="matrix(0.415777 -0.417494 0.518983 0.514619 -17.796 1.86487)" gradientUnits="objectBoundingBox" x1="1.77989041379" y1="1.91182142950" x2="1.77989041379" y2="2.35319620460" spreadMethod="pad"> - <stop stop-color="#181818" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#dbdbdb" offset="0.13482947648" stop-opacity="1.00000000000"/> - <stop stop-color="#a4a4a4" offset="0.20224422216" stop-opacity="1.00000000000"/> - <stop stop-color="#ffffff" offset="0.26965895295" stop-opacity="1.00000000000"/> - <stop stop-color="#8d8d8d" offset="0.44650277495" stop-opacity="1.00000000000"/> - <stop stop-color="#959595" offset="0.57114136219" stop-opacity="1.00000000000"/> - <stop stop-color="#cecece" offset="0.72038066387" stop-opacity="1.00000000000"/> - <stop stop-color="#181818" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient3" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879825249" y1="7.83967975733" x2="9.40879825249" y2="9.41157739957" spreadMethod="pad"> - <stop stop-color="#565656" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#9a9a9a" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#545454" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient4" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879584896" y1="7.83967765054" x2="9.40879584896" y2="9.41157487035" spreadMethod="pad"> - <stop stop-color="#b1b1b1" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#ffffff" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#8f8f8f" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient5" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879155931" y1="7.83968201339" x2="9.40879155931" y2="9.41158010798" spreadMethod="pad"> - <stop stop-color="#565656" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#9a9a9a" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#545454" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient6" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879343487" y1="7.83967992981" x2="9.40879343487" y2="9.41157760663" spreadMethod="pad"> - <stop stop-color="#b1b1b1" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#ffffff" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#8f8f8f" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient7" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879945977" y1="7.83968103847" x2="9.40879945977" y2="9.41157893758" spreadMethod="pad"> - <stop stop-color="#565656" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#9a9a9a" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#545454" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient8" gradientTransform="matrix(0.404023 -0.405692 0.607375 0.602268 -27.0463 -3.00744)" gradientUnits="objectBoundingBox" x1="9.40879596769" y1="7.83968060850" x2="9.40879596769" y2="9.41157842140" spreadMethod="pad"> - <stop stop-color="#b1b1b1" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#ffffff" offset="0.50000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#8f8f8f" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - <linearGradient id="gradient9" gradientTransform="matrix(0.37638 0.0361526 0.0367 0.374874 -2.47809 -12.1224)" gradientUnits="objectBoundingBox" x1="1.13556603092" y1="7.77791347304" x2="1.95960901921" y2="8.61454878179" spreadMethod="pad"> - <stop stop-color="#dbce48" offset="0.00000000000" stop-opacity="1.00000000000"/> - <stop stop-color="#c5b625" offset="1.00000000000" stop-opacity="1.00000000000"/> - </linearGradient> - </defs> -<g id="g3433"> - <g id="layer1-3" transform="translate(0.0427701, 1.4e-07)" fill="none"> - <path id="path2855" transform="translate(0.5, 0.5)" fill="url(#gradient0)" stroke="url(#gradient1)" stroke-width="1.00000012000" stroke-linecap="round" stroke-linejoin="round" d="M4.44089e-16 0L12.9572 0.01L12.9992 15L1e-08 15L0 1e-07Z"/> - <g id="g4198" transform="translate(3, 3)" fill="none"> - <path id="path6035" transform="matrix(1.01954 0 0 1 0 -5.55112e-16)" fill="#686868" opacity="0.70000000000" d="M0 0L1.12407 0L1.12407 1L0 1Z"/> - <path id="path6033" transform="matrix(1.01954 0 0 1 1.30215 0)" fill="#686868" opacity="0.70000000000" d="M0 0L1.06061 0L1.06061 1L0 1Z"/> - <path id="path6031" transform="matrix(1.01954 0 0 1 2.5396 0)" fill="#686868" opacity="0.70000000000" d="M0 0L0.933684 0L0.933684 1L0 1Z"/> - <path id="path6029" transform="matrix(1.01954 0 0 1 3.64764 0)" fill="#686868" opacity="0.70000000000" d="M0 0L0.410114 0L0.410114 1L0 1Z"/> - <path id="path6027" transform="matrix(1.01954 0 0 1 4.22189 0)" fill="#686868" opacity="0.70000000000" d="M0 0L0.917815 0L0.917815 1L0 1Z"/> - <path id="path6025" transform="matrix(1.01954 0 0 1 5.31375 0)" fill="#686868" opacity="0.70000000000" d="M0 0L2.37746 0L2.37746 1L0 1Z"/> - <path id="path6017" transform="matrix(1.01954 0 0 1 5.55112e-16 6)" fill="#686868" opacity="0.70000000000" d="M0 0L1.12407 0L1.12407 1L0 1Z"/> - <path id="path6015" transform="matrix(1.01954 0 0 1 1.30215 6)" fill="#686868" opacity="0.70000000000" d="M0 0L1.06061 0L1.06061 1L0 1Z"/> - <path id="path6013" transform="matrix(1.01954 0 0 1 2.5396 6)" fill="#686868" opacity="0.70000000000" d="M0 0L0.933683 0L0.933683 1L0 1Z"/> - <path id="path6011" transform="matrix(1.01954 0 0 1 3.64764 6)" fill="#686868" opacity="0.70000000000" d="M0 0L0.410114 0L0.410114 1L0 1Z"/> - <path id="path6009" transform="matrix(1.01954 0 0 1 4.22188 6)" fill="#686868" opacity="0.70000000000" d="M0 0L0.917814 0L0.917814 1L0 1Z"/> - <path id="path5999" transform="matrix(1.01954 0 0 1 5.55112e-16 2)" fill="#686868" opacity="0.70000000000" d="M0 0L1.74283 0L1.74283 1L0 1Z"/> - <path id="path5997" transform="matrix(1.01954 0 0 1 1.93908 2)" fill="#686868" opacity="0.70000000000" d="M0 0L0.838487 0L0.838487 1L0 1Z"/> - <path id="path5995" transform="matrix(1.01954 0 0 1 2.95613 2)" fill="#686868" opacity="0.70000000000" d="M0 0L0.394245 0L0.394245 1L0 1Z"/> - <path id="path5993" transform="matrix(1.01954 0 0 1 3.52026 2)" fill="#686868" opacity="0.70000000000" d="M0 0L0.759159 0L0.759159 1L0 1Z"/> - <path id="path5991" transform="matrix(1.01954 0 0 1 4.45643 2)" fill="#686868" opacity="0.70000000000" d="M0 0L0.759159 0L0.759159 1L0 1Z"/> - <path id="path5989" transform="matrix(1.01954 0 0 1 5.39261 2)" fill="#686868" opacity="0.70000000000" d="M0 0L1.21926 0L1.21926 1L0 1Z"/> - <path id="path5981" transform="matrix(1.01954 0 0 1 5.55112e-16 4)" fill="#686868" opacity="0.70000000000" d="M0 0L1.99668 0L1.99668 1L0 1Z"/> - <path id="path5979" transform="matrix(1.01954 0 0 1 2.19529 4)" fill="#686868" opacity="0.70000000000" d="M0 0L2.13947 0L2.13947 1L0 1Z"/> - <path id="path5977" transform="matrix(1.01954 0 0 1 4.53615 4)" fill="#686868" opacity="0.70000000000" d="M0 0L0.854355 0L0.854355 1L0 1Z"/> - <path id="path5975" transform="matrix(1.01954 0 0 1 5.56679 4)" fill="#686868" opacity="0.70000000000" d="M0 0L2.01255 0L2.01255 1L0 1Z"/> - <path id="path2916" transform="matrix(1.01954 0 0 1 5.55112e-16 8)" fill="#686868" opacity="0.70000000000" d="M0 0L1.12407 0L1.12407 1L0 1Z"/> - <path id="path2918" transform="matrix(1.01954 0 0 1 1.30215 8)" fill="#686868" opacity="0.70000000000" d="M0 0L1.06061 0L1.06061 1L0 1Z"/> - <path id="path2920" transform="matrix(1.01954 0 0 1 2.5396 8)" fill="#686868" opacity="0.70000000000" d="M0 0L0.933683 0L0.933683 1L0 1Z"/> - </g> - <path id="path2422" transform="translate(4.99643, 5.67071)" fill="#0c0c0c" fill-rule="evenodd" opacity="0.15000000000" d="M8.25732 0.0337698C8.17317 -0.0162002 8.10805 -0.00320017 8.06503 0.0245698L2.33547 3.70464L1.28095 4.38385L1.24848 4.39759L0 7.23529L3.09408 7.32929L3.11977 7.31195L4.18107 6.63633L9.9092 2.92453C10.0813 2.81332 9.80913 2.07626 9.29872 1.26826C8.91592 0.662266 8.50978 0.183633 8.25732 0.0337318Z"/> - </g> - <g id="g8626" transform="translate(5.00026, 1.99974)" fill="none"> - <path id="path3041" transform="matrix(0.702577 0 0 0.704261 1.4709 0.216394)" fill="url(#gradient2)" stroke="#0c0c0c" stroke-width="0.60797864000" stroke-linecap="butt" stroke-linejoin="round" d="M0 10.2519C0.286542 10.0442 1.14795 10.5083 1.96034 11.3138C2.77078 12.1174 3.22054 12.9551 3.0179 13.2444C3.01713 13.2455 3.03767 13.2621 3.03688 13.2632L13.1753 3.08288C13.4327 2.82441 12.9622 1.93926 12.1241 1.10813C11.2859 0.277 10.3959 -0.186931 10.1385 0.0715409Z"/> - <path id="path3045" transform="matrix(0.702577 0 0 0.704261 1.4709 2.44622)" fill="#0c0c0c" opacity="0.60000000000" d="M0 7.08568C0.286543 6.87797 1.14795 7.34207 1.96034 8.14762C2.77078 8.95125 3.22054 9.78895 3.0179 10.0782C3.01713 10.0793 3.03767 10.0959 3.03688 10.097L10.0189 3.08615L10.0442 3.0608C10.0449 3.05972 10.0244 3.04308 10.0252 3.04198C10.2278 2.75273 9.77807 1.91503 8.96762 1.1114C8.15523 0.305847 7.29382 -0.158247 7.00728 0.0494597L6.98203 0.0748147L4e-07 7.08568Z"/> - <path id="path3047" transform="matrix(0.702577 0 0 0.704261 6.48008 2.26929)" fill="url(#gradient3)" d="M0 0.176239C0.286541 -0.031468 1.14795 0.432627 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01712 3.16986 3.03767 3.18649 3.03688 3.18758L3.16313 3.0608C3.16392 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.0866 1.1114C1.27421 0.305848 0.412799 -0.158247 0.126257 0.0494596Z"/> - <path id="path3049" transform="matrix(0.702577 0 0 0.704261 6.39879 2.35112)" fill="url(#gradient4)" d="M0 0.176239C0.286544 -0.0314677 1.14795 0.432627 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01712 3.16986 3.03767 3.1865 3.03688 3.18758L3.16313 3.0608C3.16392 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.0866 1.1114C1.27421 0.305848 0.4128 -0.158247 0.126257 0.0494597Z"/> - <path id="path3051" transform="matrix(0.702577 0 0 0.704261 6.76258 1.98495)" fill="url(#gradient5)" d="M0 0.176239C0.286543 -0.0314683 1.14795 0.432626 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01712 3.16986 3.03767 3.18649 3.03688 3.18758L3.16313 3.0608C3.16393 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.0866 1.1114C1.27421 0.305847 0.412801 -0.158247 0.126257 0.0494597Z"/> - <path id="path3053" transform="matrix(0.702577 0 0 0.704261 6.68128 2.06678)" fill="url(#gradient6)" d="M0 0.176239C0.286544 -0.0314685 1.14795 0.432626 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01713 3.16986 3.03767 3.18649 3.03688 3.18758L3.16313 3.0608C3.16392 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.0866 1.1114C1.27421 0.305848 0.412801 -0.158247 0.126257 0.0494597Z"/> - <path id="path3055" transform="matrix(0.702577 0 0 0.704261 7.04643 1.69924)" fill="url(#gradient7)" d="M0 0.176238C0.286541 -0.0314683 1.14795 0.432626 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01713 3.16986 3.03767 3.18649 3.03688 3.18758L3.16313 3.0608C3.16392 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.08659 1.1114C1.27421 0.305847 0.412799 -0.158247 0.126256 0.0494597Z"/> - <path id="path3057" transform="matrix(0.702577 0 0 0.704261 6.96514 1.78107)" fill="url(#gradient8)" d="M0 0.176238C0.286541 -0.0314687 1.14795 0.432626 1.96034 1.23818C2.77078 2.04181 3.22054 2.87951 3.0179 3.16876C3.01712 3.16986 3.03767 3.18649 3.03688 3.18758L3.16313 3.0608C3.16392 3.05972 3.14338 3.04308 3.14415 3.04198C3.3468 2.75273 2.89704 1.91503 2.0866 1.1114C1.27421 0.305848 0.412799 -0.158247 0.126257 0.0494599Z"/> - <path id="path3059" transform="matrix(0.702577 0 0 0.704261 0.213987 7.40255)" fill="#dcdcdc" fill-rule="evenodd" stroke="#cccccc" stroke-width="0.60797864000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M0 4.80486L4.77186 3.07937L4.81116 3.04011C5.01381 2.75087 4.55877 1.91283 3.74832 1.1092C2.93593 0.303642 2.07564 -0.158082 1.7891 0.0496248Z"/> - <path id="path3061" transform="matrix(0.702577 0 0 0.704261 0.213576 9.8794)" fill="#0c0c0c" fill-rule="evenodd" stroke="#0c0c0c" stroke-width="0.60797864000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M0.485212 0L0 1.28269L1.30137 0.809298C1.18769 0.676163 1.08209 0.541463 0.947014 0.407525C0.791507 0.253326 0.639934 0.126858 0.485212 0Z"/> - <path id="path3043" transform="matrix(0.702577 0 0 0.704261 7.45448 0.214088)" fill="#c0c0c0" stroke="#cccccc" stroke-width="0.60797864000" stroke-linecap="butt" stroke-linejoin="round" opacity="0.80000000000" d="M0 1.70187C0.286542 1.49416 1.14795 1.95826 1.96034 2.76381C2.77078 3.56744 3.22054 4.40514 3.01789 4.69439C3.01713 4.69549 3.03766 4.71213 3.03688 4.71321L4.58881 3.15609C4.99729 2.74751 4.55953 2.06327 3.60744 1.1114C2.79505 0.305848 1.93364 -0.158247 1.6471 0.0494596L1.62185 0.0748155L3e-06 1.70187Z"/> - </g> - </g> -</svg> diff --git a/apps/journal/img/justify-center.svg b/apps/journal/img/justify-center.svg deleted file mode 100644 index 7a3a7ffb97a..00000000000 --- a/apps/journal/img/justify-center.svg +++ /dev/null @@ -1,269 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.42+0.43pre1" - sodipodi:docbase="/home/andreas/projekt/bild/tango/scalable" - sodipodi:docname="format-justify-center.svg"> - <defs - id="defs4200"> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient15224" - x1="22.308331" - y1="18.992140" - x2="35.785294" - y2="39.498238" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.060837,0.000000,0.000000,0.987595,4.641161,4.108291)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2259"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop2261" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop2263" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2259" - id="linearGradient2265" - x1="26.076092" - y1="26.696676" - x2="30.811172" - y2="42.007351" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.993566,0.000000,0.000000,1.000000,6.219859,4.033411)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2216"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop2218" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop2220" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2216" - id="linearGradient2222" - x1="36.8125" - y1="39.15625" - x2="39.0625" - y2="42.0625" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(6.161836,4.033411)" /> - <linearGradient - id="linearGradient2224"> - <stop - style="stop-color:#7c7c7c;stop-opacity:1;" - offset="0" - id="stop2226" /> - <stop - style="stop-color:#b8b8b8;stop-opacity:1;" - offset="1" - id="stop2228" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="1.0000000" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="26.391074" - inkscape:cy="26.321697" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1280" - inkscape:window-height="885" - inkscape:window-x="0" - inkscape:window-y="25" - inkscape:showpageshadow="false" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Justify Center</dc:title> - <dc:date>2005-10-29</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>justify</rdf:li> - <rdf:li>center</rdf:li> - <rdf:li>format</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="26" - height="2" - x="-37" - y="10" - transform="scale(-1.000000,1.000000)" /> - <rect - y="16" - x="-35" - height="2" - width="23" - id="rect4250" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="21" - height="2" - x="-34" - y="22" - transform="scale(-1.000000,1.000000)" /> - <rect - y="28" - x="-37" - height="2" - width="26" - id="rect4254" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4256" - width="17" - height="2" - x="-32" - y="34" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - </g> -</svg> diff --git a/apps/journal/img/justify-fill.svg b/apps/journal/img/justify-fill.svg deleted file mode 100644 index f9a530bdae1..00000000000 --- a/apps/journal/img/justify-fill.svg +++ /dev/null @@ -1,269 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.42+0.43pre1" - sodipodi:docbase="/home/andreas/projekt/bild/tango/scalable" - sodipodi:docname="format-justify-fill.svg"> - <defs - id="defs4200"> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient15224" - x1="22.308331" - y1="18.992140" - x2="35.785294" - y2="39.498238" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.060837,0.000000,0.000000,0.987595,4.641161,4.108291)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2259"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop2261" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop2263" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2259" - id="linearGradient2265" - x1="26.076092" - y1="26.696676" - x2="30.811172" - y2="42.007351" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.993566,0.000000,0.000000,1.000000,6.219859,4.033411)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2216"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop2218" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop2220" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2216" - id="linearGradient2222" - x1="36.8125" - y1="39.15625" - x2="39.0625" - y2="42.0625" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(6.161836,4.033411)" /> - <linearGradient - id="linearGradient2224"> - <stop - style="stop-color:#7c7c7c;stop-opacity:1;" - offset="0" - id="stop2226" /> - <stop - style="stop-color:#b8b8b8;stop-opacity:1;" - offset="1" - id="stop2228" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="1.0000000" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="16" - inkscape:cx="35.467019" - inkscape:cy="15.522316" - inkscape:current-layer="layer1" - showgrid="true" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1280" - inkscape:window-height="885" - inkscape:window-x="0" - inkscape:window-y="25" - inkscape:showpageshadow="false" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Justify Center</dc:title> - <dc:date>2005-10-29</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>justify</rdf:li> - <rdf:li>center</rdf:li> - <rdf:li>format</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="30" - height="2" - x="-39" - y="10" - transform="scale(-1.000000,1.000000)" /> - <rect - y="16" - x="-39" - height="2" - width="30" - id="rect4250" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="30" - height="2" - x="-39" - y="22" - transform="scale(-1.000000,1.000000)" /> - <rect - y="28" - x="-39" - height="2" - width="30" - id="rect4254" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4256" - width="30" - height="2" - x="-39" - y="34" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - </g> -</svg> diff --git a/apps/journal/img/justify-left.svg b/apps/journal/img/justify-left.svg deleted file mode 100644 index ed5bab46516..00000000000 --- a/apps/journal/img/justify-left.svg +++ /dev/null @@ -1,199 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.43+devel" - sodipodi:docbase="/home/tigert/cvs/freedesktop.org/tango-icon-theme/scalable/actions" - sodipodi:docname="format-justify-left.svg" - inkscape:output_extension="org.inkscape.output.svg.inkscape"> - <defs - id="defs4200"> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="1.0000000" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="39.426031" - inkscape:cy="27.632093" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1280" - inkscape:window-height="885" - inkscape:window-x="0" - inkscape:window-y="25" - inkscape:showpageshadow="false" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Justify Left</dc:title> - <dc:date>2005-10-29</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>justify</rdf:li> - <rdf:li>left</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="27" - height="2" - x="9" - y="10" /> - <rect - y="16" - x="9" - height="2" - width="25" - id="rect4250" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="22.971531" - height="2" - x="9" - y="22" /> - <rect - y="28" - x="9" - height="2" - width="27" - id="rect4254" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4256" - width="17" - height="2" - x="9" - y="34" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - </g> -</svg> diff --git a/apps/journal/img/justify-right.svg b/apps/journal/img/justify-right.svg deleted file mode 100644 index affb129539f..00000000000 --- a/apps/journal/img/justify-right.svg +++ /dev/null @@ -1,269 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created with Inkscape (http://www.inkscape.org/) --> -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://web.resource.org/cc/" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:xlink="http://www.w3.org/1999/xlink" - xmlns:sodipodi="http://inkscape.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="48px" - height="48px" - id="svg4198" - sodipodi:version="0.32" - inkscape:version="0.42+0.43pre1" - sodipodi:docbase="/home/andreas/projekt/bild/tango/scalable" - sodipodi:docname="format-justify-right.svg"> - <defs - id="defs4200"> - <linearGradient - inkscape:collect="always" - id="linearGradient3558"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop3560" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop3562" /> - </linearGradient> - <radialGradient - inkscape:collect="always" - xlink:href="#linearGradient3558" - id="radialGradient3564" - cx="22.571428" - cy="30.857143" - fx="22.571428" - fy="30.857143" - r="15.571428" - gradientTransform="matrix(1.000000,0.000000,0.000000,0.651376,4.638648e-15,10.75754)" - gradientUnits="userSpaceOnUse" /> - <linearGradient - id="linearGradient15218"> - <stop - style="stop-color:#f8f8f7;stop-opacity:1;" - offset="0" - id="stop15220" /> - <stop - id="stop2269" - offset="0.59928656" - style="stop-color:#e8e8e8;stop-opacity:1;" /> - <stop - style="stop-color:#e2e2de;stop-opacity:1;" - offset="1" - id="stop15222" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient15224" - x1="22.308331" - y1="18.992140" - x2="35.785294" - y2="39.498238" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.060837,0.000000,0.000000,0.987595,4.641161,4.108291)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2259"> - <stop - style="stop-color:#ffffff;stop-opacity:1;" - offset="0" - id="stop2261" /> - <stop - style="stop-color:#ffffff;stop-opacity:0;" - offset="1" - id="stop2263" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2259" - id="linearGradient2265" - x1="26.076092" - y1="26.696676" - x2="30.811172" - y2="42.007351" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(0.993566,0.000000,0.000000,1.000000,6.219859,4.033411)" /> - <linearGradient - inkscape:collect="always" - id="linearGradient2216"> - <stop - style="stop-color:#000000;stop-opacity:1;" - offset="0" - id="stop2218" /> - <stop - style="stop-color:#000000;stop-opacity:0;" - offset="1" - id="stop2220" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient2216" - id="linearGradient2222" - x1="36.8125" - y1="39.15625" - x2="39.0625" - y2="42.0625" - gradientUnits="userSpaceOnUse" - gradientTransform="translate(6.161836,4.033411)" /> - <linearGradient - id="linearGradient2224"> - <stop - style="stop-color:#7c7c7c;stop-opacity:1;" - offset="0" - id="stop2226" /> - <stop - style="stop-color:#b8b8b8;stop-opacity:1;" - offset="1" - id="stop2228" /> - </linearGradient> - <linearGradient - inkscape:collect="always" - xlink:href="#linearGradient15218" - id="linearGradient2240" - gradientUnits="userSpaceOnUse" - gradientTransform="matrix(1.342704,0.000000,0.000000,1.235378,-8.219611,-6.577189)" - x1="20.794008" - y1="18.378813" - x2="35.596001" - y2="39.60046" /> - </defs> - <sodipodi:namedview - id="base" - pagecolor="#ffffff" - bordercolor="#bebebe" - borderopacity="1.0000000" - inkscape:pageopacity="0.0" - inkscape:pageshadow="2" - inkscape:zoom="11.313708" - inkscape:cx="31.951275" - inkscape:cy="22.207013" - inkscape:current-layer="layer1" - showgrid="false" - inkscape:grid-bbox="true" - inkscape:document-units="px" - inkscape:window-width="1280" - inkscape:window-height="885" - inkscape:window-x="0" - inkscape:window-y="25" - inkscape:showpageshadow="false" /> - <metadata - id="metadata4203"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>Justify Right</dc:title> - <dc:date>2005-10-29</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Andreas Nilsson</dc:title> - </cc:Agent> - </dc:creator> - <dc:subject> - <rdf:Bag> - <rdf:li>justify</rdf:li> - <rdf:li>left</rdf:li> - <rdf:li>format</rdf:li> - </rdf:Bag> - </dc:subject> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by-sa/2.0/" /> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by-sa/2.0/"> - <cc:permits - rdf:resource="http://web.resource.org/cc/Reproduction" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/Distribution" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Notice" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/Attribution" /> - <cc:permits - rdf:resource="http://web.resource.org/cc/DerivativeWorks" /> - <cc:requires - rdf:resource="http://web.resource.org/cc/ShareAlike" /> - </cc:License> - </rdf:RDF> - </metadata> - <g - id="layer1" - inkscape:label="Layer 1" - inkscape:groupmode="layer"> - <path - sodipodi:type="arc" - style="opacity:0.47368421;color:#000000;fill:url(#radialGradient3564);fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:round;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="path3556" - sodipodi:cx="22.571428" - sodipodi:cy="30.857143" - sodipodi:rx="15.571428" - sodipodi:ry="10.142858" - d="M 38.142857 30.857143 A 15.571428 10.142858 0 1 1 7,30.857143 A 15.571428 10.142858 0 1 1 38.142857 30.857143 z" - transform="matrix(1.472335,0.000000,0.000000,0.266385,-9.159070,37.48203)" /> - <rect - style="opacity:1;fill:url(#linearGradient2240);fill-opacity:1;fill-rule:evenodd;stroke:#888a85;stroke-width:0.99999976;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect4238" - width="38.996792" - height="45.003101" - x="4.5016017" - y="1.4968988" - rx="0.56650788" - ry="0.56650823" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4248" - width="27" - height="2" - x="-38.971531" - y="10" - transform="scale(-1.000000,1.000000)" /> - <rect - y="16" - x="-38.971531" - height="2" - width="25" - id="rect4250" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4252" - width="22.971531" - height="2" - x="-38.971531" - y="22" - transform="scale(-1.000000,1.000000)" /> - <rect - y="28" - x="-38.971531" - height="2" - width="27" - id="rect4254" - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;color:#000000;fill:#999999;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible" - id="rect4256" - width="17" - height="2" - x="-38.971531" - y="34" - transform="scale(-1.000000,1.000000)" /> - <rect - style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#ffffff;stroke-width:0.99999982;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" - id="rect2245" - width="37.025566" - height="43.022316" - x="5.4997125" - y="2.4997177" - rx="0" - ry="0" /> - </g> -</svg> diff --git a/apps/journal/img/list.svg b/apps/journal/img/list.svg deleted file mode 100644 index b253c0ab50d..00000000000 --- a/apps/journal/img/list.svg +++ /dev/null @@ -1,12 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="layer0"> - <path id="path2407" transform="translate(6, 4.5)" fill="none" stroke="#000000" stroke-width="0.99999994000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" opacity="1" d="M0 4L8 4M0 0L8 0M0 8L8 8"/> - <rect id="rect3728" transform="translate(2, 3)" fill="#000000" opacity="1" width="2pt" height="2pt"/> - <rect id="rect2434" transform="translate(2, 11)" fill="#000000" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="0.00000000000" opacity="1" width="2pt" height="2pt"/> - <rect id="rect2440" transform="translate(2, 7)" fill="#000000" opacity="1" width="2pt" height="2pt"/> - </g> -</svg> diff --git a/apps/journal/img/strikethrough.svg b/apps/journal/img/strikethrough.svg deleted file mode 100644 index 528907cebe1..00000000000 --- a/apps/journal/img/strikethrough.svg +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"> -<defs/> -<g id="layer5"/><g id="layer2"> - <path id="path2211" transform="translate(0.833333, 0.627451)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M5.67248 0L0 14.3831L2.26899 14.3831L3.49803 11.2732L10.8723 11.2732L12.1013 14.3831L14.3703 14.3831L8.69781 0ZM7.18514 1.94366L10.1041 9.32958L4.26616 9.32958Z"/> - <rect id="rect2331" transform="translate(0.603318, 6.51584)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="round" stroke-linejoin="round" width="11.75746606335pt" height="0.48265460030pt"/> - </g> -</svg> diff --git a/apps/journal/img/underline.svg b/apps/journal/img/underline.svg deleted file mode 100644 index 534bed6ea24..00000000000 --- a/apps/journal/img/underline.svg +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16" height="16"> -<defs/> -<g id="layer1"> - <path id="path2211" transform="translate(1.46667, 0.658333)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" d="M5.17763 0L0 12.4667L2.07105 12.4667L3.19287 9.77117L9.92379 9.77117L11.0456 12.4667L13.1167 12.4667L7.93904 0ZM6.55833 1.68468L9.22264 8.08649L3.89399 8.08649Z"/> - <rect id="rect2331" transform="matrix(1 0 0 -1 1.23333 15)" fill="#000000" fill-rule="evenodd" stroke="#000000" stroke-width="1.00000000000" stroke-linecap="round" stroke-linejoin="round" width="10.90000000000pt" height="0.44664000000pt"/> - </g> -</svg> diff --git a/apps/journal/index.php b/apps/journal/index.php deleted file mode 100644 index bfe882376e3..00000000000 --- a/apps/journal/index.php +++ /dev/null @@ -1,72 +0,0 @@ -<?php -/** - * ownCloud - Journal - * - * @author Thomas Tanghus - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ -$errors = array(); -$l = new OC_L10N('journal'); -OCP\User::checkLoggedIn(); - -$required_apps = array( - array('id' => 'tal', 'name' => 'TAL Page Templates'), - array('id' => 'journal', 'name' => 'Journal'), - array('id' => 'contacts', 'name' => 'Contacts'), -); -foreach($required_apps as $app) { - if(!OCP\App::isEnabled($app['id'])) { - $error = (string)$l->t('The %%s app isn\'t enabled! Please enable it here: <strong><a href="%%s?appid=%%s">Enable %%s app</a></strong>'); - $errors[] = sprintf($error, $app['name'],OCP\Util::linkTo('settings', 'apps'), $app['id'], $app['name']); - } -} - -if(count($errors) == 0) { - $calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); - if( count($calendars) == 0 ) { - $error = (string)$l->t('You have no calendars. Please add one at the <strong><a href="%%s">Calendar app</a></strong>'); - $errors[] = sprintf($error, OCP\Util::linkTo('calendar', 'index.php')); - } - // Load a specific entry? - $id = isset( $_GET['id'] ) ? $_GET['id'] : null; - - OCP\Util::addScript('3rdparty/timepicker', 'jquery.ui.timepicker'); - OCP\Util::addScript('contacts','jquery.multi-autocomplete'); - OCP\Util::addScript('','oc-vcategories'); - OCP\Util::addScript('journal', 'jquery.rte'); - OCP\Util::addScript('journal', 'jquery.textchange'); - OCP\Util::addScript('journal', 'journal'); - OCP\Util::addscript('tal','modernizr'); - OCP\Util::addStyle('3rdparty/timepicker', 'jquery.ui.timepicker'); - OCP\Util::addStyle('journal', 'rte'); - OCP\Util::addStyle('journal', 'journal'); - OCP\App::setActiveNavigationEntry('journal_index'); - - $categories = OC_Calendar_App::getCategoryOptions(); -} - -//$tmpl = new OCP\Template('journal', 'journals', 'user'); -if($errors) { - $tmpl = new OCP\Template( "journal", "rtfm", "user" ); - $tmpl->assign('errors',$errors, false); -} else { - $tmpl = new OC_TALTemplate('journal', 'index', 'user'); - $tmpl->assign('categories', $categories); - $tmpl->assign('calendars', $calendars); - $tmpl->assign('id',$id); -} -$tmpl->printPage(); diff --git a/apps/journal/js/expanding.js b/apps/journal/js/expanding.js deleted file mode 100644 index 17139f27fff..00000000000 --- a/apps/journal/js/expanding.js +++ /dev/null @@ -1,118 +0,0 @@ -// Expanding Textareas -// https://github.com/bgrins/ExpandingTextareas - -(function(factory) { - // Add jQuery via AMD registration or browser globals - if (typeof define === 'function' && define.amd) { - define([ 'jquery' ], factory); - } - else { - factory(jQuery); - } -}(function ($) { - $.expandingTextarea = $.extend({ - autoInitialize: true, - initialSelector: "textarea.expanding", - opts: { - resize: function() { } - } - }, $.expandingTextarea || {}); - - var cloneCSSProperties = [ - 'lineHeight', 'textDecoration', 'letterSpacing', - 'fontSize', 'fontFamily', 'fontStyle', - 'fontWeight', 'textTransform', 'textAlign', - 'direction', 'wordSpacing', 'fontSizeAdjust', - 'wordWrap', - 'borderLeftWidth', 'borderRightWidth', - 'borderTopWidth','borderBottomWidth', - 'paddingLeft', 'paddingRight', - 'paddingTop','paddingBottom', - 'marginLeft', 'marginRight', - 'marginTop','marginBottom', - 'boxSizing', 'webkitBoxSizing', 'mozBoxSizing', 'msBoxSizing' - ]; - - var textareaCSS = { - position: "absolute", - height: "100%", - resize: "none" - }; - - var preCSS = { - visibility: "hidden", - border: "0 solid", - whiteSpace: "pre-wrap" - }; - - var containerCSS = { - position: "relative" - }; - - function resize() { - $(this).closest('.expandingText').find("div").text(this.value + ' '); - $(this).trigger("resize.expanding"); - } - - $.fn.expandingTextarea = function(o) { - - var opts = $.extend({ }, $.expandingTextarea.opts, o); - - if (o === "resize") { - return this.trigger("input.expanding"); - } - - if (o === "destroy") { - this.filter(".expanding-init").each(function() { - var textarea = $(this).removeClass('expanding-init'); - var container = textarea.closest('.expandingText'); - - container.before(textarea).remove(); - textarea - .attr('style', textarea.data('expanding-styles') || '') - .removeData('expanding-styles'); - }); - - return this; - } - - this.filter("textarea").not(".expanding-init").addClass("expanding-init").each(function() { - var textarea = $(this); - - textarea.wrap("<div class='expandingText'></div>"); - textarea.after("<pre class='textareaClone'><div></div></pre>"); - - var container = textarea.parent().css(containerCSS); - var pre = container.find("pre").css(preCSS); - - // Store the original styles in case of destroying. - textarea.data('expanding-styles', textarea.attr('style')); - textarea.css(textareaCSS); - - $.each(cloneCSSProperties, function(i, p) { - var val = textarea.css(p); - - // Only set if different to prevent overriding percentage css values. - if (pre.css(p) !== val) { - pre.css(p, val); - } - }); - - textarea.bind("input.expanding propertychange.expanding", resize); - resize.apply(this); - - if (opts.resize) { - textarea.bind("resize.expanding", opts.resize); - } - }); - - return this; - }; - - $(function () { - if ($.expandingTextarea.autoInitialize) { - $($.expandingTextarea.initialSelector).expandingTextarea(); - } - }); - -})); diff --git a/apps/journal/js/journal.js b/apps/journal/js/journal.js deleted file mode 100644 index 2611b09c550..00000000000 --- a/apps/journal/js/journal.js +++ /dev/null @@ -1,432 +0,0 @@ -String.prototype.unEscape = function(){ - str = this; - return str.replace(/\\"/g, '"'); -}; -String.prototype.stripTags = function(){ - tags = this; - stripped = tags.replace(/<(.|\n)*?>/g, ''); - return stripped; -}; -String.prototype.zeroPad = function(digits) { - n = this.toString(); - while (n.length < digits) { - n = '0' + n; - } - return n; -} - -OC.Journal = { - init:function() { - this.setEnabled(false); - // Fetch journal entries. If it's a direct link 'id' will be loaded. - OC.Journal.Journals.update(id); - }, - categoriesChanged:function(newcategories) { // Categories added/deleted. - categories = $.map(newcategories, function(v) {return v;}); - $('#categories').multiple_autocomplete('option', 'source', categories); - var categorylist = $('#categories_value').find('input'); - $.getJSON(OC.filePath('journal', 'ajax', 'categories/categoriesfor.php'),{'id':Contacts.UI.Card.id},function(jsondata){ - if(jsondata.status == 'success'){ - $('#categories_value').data('checksum', jsondata.data.checksum); - categorylist.val(jsondata.data.value); - } else { - OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); - } - }); - }, - propertyContainerFor:function(obj) { - if($(obj).hasClass('propertycontainer')) { - return $(obj); - } - return $(obj).parents('.propertycontainer').first(); - }, - required:function(event){ // eventhandler for required elements - // FIXME: This doesn't seem to work. - console.log('blur on required'); - var obj = $(event.target); - $(obj).addClass('required'); - if($(this).val().trim() == '') { - $('<strong>This field is required!</strong>').appendTo($(obj)); - return; - } else { - $(obj).removeClass('required'); - $(obj).off('blur', OC.Journal.required); - } - }, - setEnabled:function(state) { - if(state == undefined) { state = true; } - console.log('OC.Journal.setEnabled: ' + state); - if(state) { - $('#description').rte('setEnabled', true); - if($('#description').rte('mode') == 'html') { - $('#editortoolbar li').show(); - } - $('#togglemode').show(); - $('#summary').addClass('editable'); - $('.property,#also_time').each(function () { - $(this).attr('disabled', false); - }); - } else { - $('#description').rte('setEnabled', false); - $('#editortoolbar .richtext, #togglemode').hide(); - $('#summary').removeClass('editable'); - $('.property,#also_time').each(function () { - $(this).attr('disabled', true); - }); - } - }, - toggleMode:function() { - console.log('togglemode'); - $('#description').rte('toggleMode'); - $('#editortoolbar li.richtext').toggle(); - }, - Entry:{ - id:'', - data:undefined, - add:function() { - // TODO: wrap a DIV around the summary field with a suggestion(?) to fill out this field first. See OC.Journal.required - // Remember to reenable all controls. - $('#leftcontent lidata-id="'+this.id+'"').removeClass('active'); - this.id = 'new'; - this.data = undefined; - $('.property').each(function () { - switch($(this).get(0).nodeName) { - case 'DIV': - $(this).html(''); - break; - case 'INPUT': - case 'TEXTAREA': - $(this).val(''); - break; - default: - console.log('OC.Journal.Entry.add. Forgot: ' + $(this).get(0).nodeName); - break; - } - }); - $('#description').rte('setEnabled', false); - $('#editortoolbar li.richtext').hide(); - $('#editable').attr('checked', true); - OC.Journal.setEnabled(true); - }, - createEntry:function(data) { - var date = new Date(parseInt(data.dtstart)*1000); - var timestring = (data.only_date?'':' ' + date.toLocaleTimeString()); - return $('<li data-id="'+data.id+'"><a href="'+OC.linkTo('journal', 'index.php')+'&id='+data.id+'">'+data.summary.unEscape()+'</a><br /><em>'+date.toDateString()+timestring+'<em></li>').data('entry', data); - }, - loadEntry:function(id, data) { - //$(document).off('change', '.property'); - console.log('loadEntry: ' + id + ': ' + data.summary); - this.id = id; - this.data = data; - $('#entry').data('id', id); - console.log('summary: ' + data.summary.unEscape()); - $('#summary').val(data.summary.unEscape()); - $('#organizer').val(data.organizer.value.split(':')[1]); - var format = data.description.format; - console.log('format: '+format); - $('#description').rte(format, data.description.value.unEscape()); - $('#description').rte('mode', format); - //$('#description').expandingTextarea('resize'); - (format=='html'&&$('#editable').get(0).checked?$('#editortoolbar li.richtext').show():$('#editortoolbar li.richtext').hide()); - $('#location').val(data.location); - $('#categories').val(data.categories.join(',')); - $('#categories').multiple_autocomplete('option', 'source', categories); - console.log('Trying to parse: '+data.dtstart); - var date = new Date(parseInt(data.dtstart)*1000); - //$('#dtstartdate').val(date.getDate()+'-'+date.getMonth()+'-'+date.getFullYear()); // - $('#dtstartdate').datepicker('setDate', date); - if(data.only_date) { - $('#dtstarttime').hide(); - $('#also_time').attr('checked', false); - //$('#also_time').get(0).checked = false; - } else { - // timepicker('setTime', ...) triggers a 'change' event, so you have to jump through hoops here ;-) - $('#dtstarttime').val(date.getHours().toString().zeroPad(2)+':'+date.getMinutes().toString().zeroPad(2)); - $('#dtstarttime').show(); - $('#also_time').attr('checked', true); - //$('#also_time').get(0).checked = true; - } - console.log('dtstart: '+date); - }, - saveproperty:function(obj) { - if(!this.id) { // we are adding an entry and want a response back from the server. - this.id = 'new'; - console.log('OC.Journal.Entry.saveproperty: We need to add a new one.'); - //return; - } - var container = OC.Journal.propertyContainerFor(obj); - var params = {'id':this.id}; - params['type'] = container.data('type'); - params['parameters'] = {}; - switch(params['type']) { - case 'ORGANIZER': - case 'LOCATION': - case 'CATEGORIES': - params['value'] = $(obj).val(); - break; - case 'SUMMARY': - if(this.id == 'new' && $(obj).val().trim() == '') { - $(obj).focus(); - $(obj).addClass('required'); - $(obj).on('blur', OC.Journal.required); - return; - } - params['value'] = $(obj).val(); - break; - case 'DESCRIPTION': - // Check if we get the description from the textarea or the contenteditable. - var format = ($(obj).get(0).nodeName == 'DIV' ? 'html' : 'text'); // FIXME: should check rte instead. - var value = $('#description').rte(format); // calls either the 'text' or 'html' method of the rte. - //var value = ($(obj).get(0).nodeName == 'DIV' ? $(obj).html() : $(obj).text()); - console.log('nodeName: ' + $(obj).get(0).nodeName); - params['value'] = value; - params['parameters']['FORMAT'] = format.toUpperCase(); - break; - case 'DTSTART': - var date = $('#dtstartdate').val(); - var time = $('#dtstarttime').val(); - var datetime = new Date(parseInt(date.substring(6, 10)), parseInt(date.substring(3, 5)), parseInt(date.substring(0, 2)) , parseInt(time.substring(0, 2)), parseInt(time.substring(3, 5)), 0, 0); - params['value'] = datetime.getTime()/1000; - break; - default: - $.extend(1, $(obj).serializeArray(), params); - break; - } - self = this; - $.post(OC.filePath('journal', 'ajax', 'saveproperty.php'), params, function(jsondata) { - if(jsondata.status == 'success') { - if(self.id == 'new') { - self.loadEntry(jsondata.data.id, jsondata.data); - } else { - $('#leftcontent li[data-id="'+self.id+'"]').remove(); - } - var item = self.createEntry(jsondata.data); - $('#leftcontent').append(item); - OC.Journal.Journals.doSort(); - OC.Journal.Journals.scrollTo(self.id); - // add error checking - console.log('successful save'); - } else { - OC.dialogs.alert(jsondata.data.message.text, t('contacts', 'Error')); - } - }); - }, - doExport:function() { - document.location.href = OC.linkTo('calendar', 'export.php') + '?eventid=' + this.id; - }, - doDelete:function() { - // TODO: Do something when there are no more entries. - if(this.id == 'new') { return; } - $('#delete').tipsy('hide'); - self = this; - OC.dialogs.confirm(t('contacts', 'Are you sure you want to delete this entry?'), t('journal', 'Warning'), function(answer) { - if(answer == true) { - $.post(OC.filePath('journal', 'ajax', 'delete.php'), {'id': self.id}, function(jsondata) { - if(jsondata.status == 'success') { - var curlistitem = $('#leftcontent li[data-id="'+self.id+'"]'); - var newlistitem = curlistitem.prev('li'); - if(!$(newlistitem).is('li')) { - newlistitem = curlistitem.next('li'); - } - if(!$(newlistitem).is('li')) { - alert('No more entries. Do something!!!'); - } - $(newlistitem).addClass('active'); - console.log('newlistitem: ' + newlistitem.toString()); - curlistitem.remove(); - var data = newlistitem.data('entry'); - self.loadEntry(data.id, data); - console.log('successful delete'); - } else { - OC.dialogs.alert(jsondata.data.message.text, t('contacts', 'Error')); - } - }); - } - }); - }, - }, - Journals:{ - sortmethod:undefined, - doSort:function(method) { - if(method) { - this.sortmethod = method; - } else { - method = this.sortmethod; - } - // Thanks to http://www.java2s.com/Tutorial/JavaScript/0220__Array/Usinganalphabeticalsortmethodonstrings.html - // and http://stackoverflow.com/questions/4258974/sort-list-based-on-data-attribute-using-jquery-metadata-plugin#4259074 - // and http://stackoverflow.com/questions/8882418/jquery-sorting-lib-that-supports-multilanguage-sorting - compareDateTimeAsc = function(a, b){ - return (parseInt(a.dtstart) > parseInt(b.dtstart)?-1:1); - } - compareDateTimeDesc = function(a, b){ - return (parseInt(b.dtstart) < parseInt(a.dtstart)?-1:1); - } - compareSummaryAsc = function(a, b){ - return b.summary.toLowerCase().localeCompare(a.summary.toLowerCase()); - } - compareSummaryDesc = function(a, b){ - return a.summary.toLowerCase().localeCompare(b.summary.toLowerCase()); - } - var func; - switch(method) { - case 'dtasc': - func = compareDateTimeAsc; - break; - case 'dtdesc': - func = compareDateTimeDesc; - break; - case 'sumasc': - func = compareSummaryAsc; - break; - case 'sumdesc': - func = compareSummaryDesc; - break; - default: - var func = compareDateTimeDesc; - break; - } - - var arr = [] - // loop through each list item and get the metadata - $('#leftcontent li').each(function () { - var meta = $(this).data('entry'); - meta.elem = $(this); - arr.push(meta); - }); - arr.sort(func); - - //Foreach item append it to the container. The first i arr will then end up in the top - $.each(arr, function(index, item){ - item.elem.appendTo(item.elem.parent()); - }); - }, - update:function(id) { - console.log('update: ' + id); - self = this; - $('#leftcontent').addClass('loading'); - $.getJSON(OC.filePath('journal', 'ajax', 'entries.php'), function(jsondata) { - if(jsondata.status == 'success') { - var entries = $('#leftcontent').empty(); - $(jsondata.data.entries).each(function(i, entry) { - entries.append(OC.Journal.Entry.createEntry(entry)); - }); - $('#leftcontent').removeClass('loading'); - self.doSort('dtasc'); - console.log('Count: ' + $('#leftcontent li').length); - if($('#leftcontent li').length > 0 ){ - var firstitem; - if(id) { - firstitem = $('#leftcontent li[data-id="'+id+'"]'); - } else { - firstitem = $('#leftcontent li').first(); - id = firstitem.data('entry').id; - } - firstitem.addClass('active'); - self.scrollTo(id); - OC.Journal.Entry.loadEntry(firstitem.data('id'), firstitem.data('entry')); - } - } else { - OC.dialogs.alert(jsondata.data.message, t('contacts', 'Error')); - } - }); - }, - scrollTo:function(id){ - var item = $('#leftcontent li[data-id="'+id+'"]'); - if(item) { - try { - $('#leftcontent').animate({scrollTop: $('#leftcontent li[data-id="'+id+'"]').offset().top-70}, 'slow','swing'); - } catch(e) {} - } - } - } -}; - -$(document).ready(function(){ - OCCategories.changed = OC.Journal.categoriesChanged; - OCCategories.app = 'calendar'; - - // Initialize controls. - $('#categories').multiple_autocomplete({source: categories}); - //$('#categories').multiple_autocomplete('option', 'source', categories); - $('#dtstartdate').datepicker({dateFormat: 'dd-mm-yy'}); - $('#dtstarttime').timepicker({timeFormat: 'hh:mm', showPeriodLabels:false}); - $('#description').rte({classes: ['property','content']}); - $('.tip').tipsy(); - - OC.Journal.init(); - - // Show the input with a direcy link the journal entry, binds an event to close - // it on blur and removes the binding again afterwards. - $('#showlink').on('click', function(event){ - console.log('showlink'); - $('#link').toggle('slow').val(totalurl+'&id='+OC.Journal.Entry.id).focus(). - on('blur',function(event) {$(this).hide()}).off('blur', $(this)); - return false; - }); - - $('#rightcontent').on('change', '.property', function(event){ - OC.Journal.Entry.saveproperty(this); - }); - - $('#controls').on('click', '#add', function(event){ - OC.Journal.Entry.add(); - }); - - $('#metadata').on('change', '#also_time', function(event){ - $('#dtstarttime').toggle().trigger('change'); - }); - - $('#metadata').on('click', '#export', function(event){ - OC.Journal.Entry.doExport(); - }); - - $('#metadata').on('click', '#editcategories', function(event){ - OCCategories.edit(); - }); - - $('#metadata').on('click', '#delete', function(event){ - OC.Journal.Entry.doDelete(); - }); - - $('#controls').on('change', '#entrysort', function(event){ - OC.Journal.Journals.doSort($(this).val()); - }); - - // Proxy click. - $('#leftcontent').on('keydown', '#leftcontent', function(event){ - if(event.which == 13) { - $('#leftcontent').click(event); - } - }); - // Journal entry clicked - $(document).on('click', '#leftcontent', function(event){ - var $tgt = $(event.target); - var item = $tgt.is('li')?$($tgt):($tgt).parents('li').first(); - var id = item.data('id'); - item.addClass('active'); - var oldid = $('#entry').data('id'); - console.log('oldid: ' + oldid); - if(oldid != 0){ - $('#leftcontent li[data-id="'+oldid+'"]').removeClass('active'); - } - OC.Journal.Entry.loadEntry(id, item.data('entry')); - return false; - }); - // Editor command. - $('.rte-toolbar button').on('click', function(event){ - console.log('cmd: ' + $(this).data('cmd')); - $('#description').rte('formatText', $(this).data('cmd')); - event.preventDefault(); - return false; - }); - // Toggle text/html editing mode. - $('#togglemode').on('click', function(event){ - OC.Journal.toggleMode(true); - return false; - }); - $('#editable').on('change', function(event){ - OC.Journal.setEnabled($(this).get(0).checked); - }); - -}); diff --git a/apps/journal/js/jquery.rte.js b/apps/journal/js/jquery.rte.js deleted file mode 100644 index ca7b61d719c..00000000000 --- a/apps/journal/js/jquery.rte.js +++ /dev/null @@ -1,244 +0,0 @@ -// http://wiki.jqueryui.com/w/page/12138135/Widget%20factory - -(function( $ ) { - -$.widget( 'ui.rte', { - // These options will be used as defaults - options: { - disabled: true, - mode: 'html' - }, - // Set up the widget - _create: function() { - console.log('_create'); - var self = this, - dirty = false, - textarea = this.element; //.hide(), - pos = textarea.position(); - //this.element.text = this.text; - this.mirror = $('<div class="rte-content" contenteditable="true" style="top:'+pos.top+';left:'+pos.left+';" ></div>').insertAfter(textarea).show(); - textarea.hide(); - this.formatText('styleWithCSS', true); - this.validtags = ['A','P','STRONG', 'B', 'I', 'SPAN', 'DIV', 'OL', 'UL', 'LI', 'DL', 'DT', 'DD']; - this.enabled = true; - - /*$(window).resize(function() { - console.log('resize: '); - });*/ - - this.mirror.keydown(function(event){ - if(event.which == 13) { - self.insertAtCaret('<br />'); - } - }); - this.mirror.keyup(function() { - console.log('keyup, set dirty.'); - self.dirty = true; - }); - this.mirror.blur(function() { - console.log('blur: '); - if(self.dirty) { - self.mirror.trigger('change'); - self.dirty = false; - } - }); - - }, - _init: function() { - console.log('_init'); - self = this; - $.each(this.options, function(key, value) { - self._setOption(key, value); - }); - }, - text: function(str) { - console.log('function text'); - if(str != undefined) { - this.mirror.html(str); - this.element.text(str); - } else { - console.log('returning: ' + this.element.val()); - return this.element.val(); - } - }, - html: function(str) { - console.log('function html'); - if(str != undefined) { - console.log('str: ' + str); - var $str; - try { - $str = $(str); - this.mirror.empty().html($str); // Call empty() for IE 8. - this.element.text($str.text()); - } catch(e) { - console.log(e.message); - this.mirror.empty().html(str); - this.element.text(str); - } - //console.log('length: ' + $str.length); - //this.mirror.get(0).contenteditable=false; - } else { - console.log('returning: ' + this.mirror.html()); - return this.mirror.html(); - } - }, - insertAtCaret: function(myValue){ - // Found this at stackoverflow - return this.mirror.each(function(i) { - if (document.selection) { - console.log('IE'); - //For browsers like Internet Explorer - this.focus(); - sel = document.selection.createRange(); - sel.text = myValue; - this.focus(); - } - else if (this.selectionStart || this.selectionStart == '0') { - console.log('FF'); - //For browsers like Firefox and Webkit based - var startPos = this.selectionStart; - var endPos = this.selectionEnd; - var scrollTop = this.scrollTop; - this.value = this.value.substring(0, startPos)+myValue+this.value.substring(endPos,this.value.length); - this.focus(); - this.selectionStart = startPos + myValue.length; - this.selectionEnd = startPos + myValue.length; - this.scrollTop = scrollTop; - } else { - console.log('Smth.'); - this.value += myValue; - this.focus(); - } - }) - }, - showSelection: function() { - var textComponent = this.mirror.get(0); //document.getElementById('Editor'); - var selectedText; - // IE version - if (document.selection != undefined) { - textComponent.focus(); - var sel = document.selection.createRange(); - selectedText = sel.text; - } - // Mozilla version - else if (textComponent.selectionStart != undefined) { - var startPos = textComponent.selectionStart; - var endPos = textComponent.selectionEnd; - selectedText = textComponent.value.substring(startPos, endPos) - } - alert("You selected: " + selectedText); - }, - formatText: function(command, option) { - self = this, useDialog = false; - switch(command) { - case 'ulist': - command = 'insertUnorderedList'; - break; - case 'olist': - command = 'insertOrderedList'; - break; - case 'createlink': - self.showSelection(); - option=prompt('Write the URL here') - useDialog = true; - default: - break; - } - try{ - document.execCommand(command, useDialog, option); - self.dirty = true; // FIXME: This doesn't work because blur is triggered before dirty is set. - self.mirror.trigger('blur'); // Dirty hack to trigger save. Hmm, if it only worked... - }catch(e){ - console.log('Error: ' + e) - } - }, - setEnabled: function(state) { - console.log('function setEnabled: ' + state); - if(state != undefined) { - this._setOption('disabled', !state); - } - return this.options['disabled']; - }, - mode: function(mode) { - if(mode != undefined) { - this._setOption('mode', mode); - } - return this.options['mode']; - }, - /*toggle: function() { - this._setOption('disabled', !this.options['disabled']); - return !this.options['disabled']; - },*/ - toggleMode: function() { - this._setOption('mode', (this.options['mode'] == 'html'?'text':'html')); - return this.options['mode']; - }, - // Use the _setOption method to respond to changes to options - _setOption: function( key, value ) { - console.log('option ' + key + ': ' + value); - switch( key ) { - case 'disabled': - if(value) { - this.mirror.get(0).contenteditable = false; - this.mirror.attr('contenteditable', false); - this.mirror.removeClass('editable'); - this.element.attr('disabled', true); - this.element.removeClass('editable'); - } else { - this.mirror.get(0).contenteditable = true; - this.mirror.attr('contenteditable', true); - this.mirror.addClass('editable'); - this.element.attr('disabled', false); - this.element.addClass('editable'); - } - break; - case 'mode': - switch(value) { - case 'html': - this.mirror.show(); - this.element.hide(); - break; - case 'text': - this.mirror.hide(); - this.element.show(); - this.element.trigger('resize'); - break; - default: - throw { name: 'UnknownMode', message: 'Invalid mode: ' + value } - break; - } - break; - case 'classes': - if($.isArray(value)) { - var mirror = this.mirror; - $.each(this.options['classes'], function(key, value) { - mirror.addClass(value); - }); - } else { - this.mirror.addClass(value); - } - break; - default: - this.options[key] = value; - break; - } - // In jQuery UI 1.8, you have to manually invoke the _setOption method from the base widget - - $.Widget.prototype._setOption.apply( this, arguments ); - // In jQuery UI 1.9 and above, you use the _super method instead - //this._super( "_setOption", key, value ); - }, - // Use the destroy method to clean up any modifications your widget has made to the DOM - destroy: function() { - this.mirror.remove(); - this.element.show(); - // In jQuery UI 1.8, you must invoke the destroy method from the base widget - $.Widget.prototype.destroy.call( this ); - // In jQuery UI 1.9 and above, you would define _destroy instead of destroy and not call the base method - } - -}); - -}( jQuery ) ); - - diff --git a/apps/journal/js/jquery.textchange.js b/apps/journal/js/jquery.textchange.js deleted file mode 100644 index 66a07fc5bcd..00000000000 --- a/apps/journal/js/jquery.textchange.js +++ /dev/null @@ -1,76 +0,0 @@ -/*! - * jQuery TextChange Plugin - * http://www.zurb.com/playground/jquery-text-change-custom-event - * - * Copyright 2010, ZURB - * Released under the MIT License - */ -(function ($) { - - $.event.special.textchange = { - - setup: function (data, namespaces) { - $(this).data('lastValue', this.contentEditable === 'true' ? $(this).html() : $(this).val()); - $(this).bind('keyup.textchange', $.event.special.textchange.handler); - $(this).bind('cut.textchange paste.textchange input.textchange', $.event.special.textchange.delayedHandler); - }, - - teardown: function (namespaces) { - $(this).unbind('.textchange'); - }, - - handler: function (event) { - $.event.special.textchange.triggerIfChanged($(this)); - }, - - delayedHandler: function (event) { - var element = $(this); - setTimeout(function () { - $.event.special.textchange.triggerIfChanged(element); - }, 25); - }, - - triggerIfChanged: function (element) { - var current = element[0].contentEditable === 'true' ? element.html() : element.val(); - if (current !== element.data('lastValue')) { - element.trigger('textchange', [element.data('lastValue')]); - element.data('lastValue', current); - } - } - }; - - $.event.special.hastext = { - - setup: function (data, namespaces) { - $(this).bind('textchange', $.event.special.hastext.handler); - }, - - teardown: function (namespaces) { - $(this).unbind('textchange', $.event.special.hastext.handler); - }, - - handler: function (event, lastValue) { - if ((lastValue === '') && lastValue !== $(this).val()) { - $(this).trigger('hastext'); - } - } - }; - - $.event.special.notext = { - - setup: function (data, namespaces) { - $(this).bind('textchange', $.event.special.notext.handler); - }, - - teardown: function (namespaces) { - $(this).unbind('textchange', $.event.special.notext.handler); - }, - - handler: function (event, lastValue) { - if ($(this).val() === '' && $(this).val() !== lastValue) { - $(this).trigger('notext'); - } - } - }; - -})(jQuery);
\ No newline at end of file diff --git a/apps/journal/js/settings.js b/apps/journal/js/settings.js deleted file mode 100644 index 8cd1b25f6e7..00000000000 --- a/apps/journal/js/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -$(document).ready(function(){ - $('#journal_calendar').on('change', function(event){ - $.post(OC.filePath('journal', 'ajax', 'setdefaultcalendar.php'), {'id':$('#journal_calendar option:selected').val()}, function(jsondata) { - var success = {padding: 0.5em, background-color:green, color: white, font-weight: bold, float: left}; - var failure = {padding: 0.5em, background-color:red, color: white, font-weight: bold, float: left}; - if(jsondata.status == 'success') { - $('#journal_status'); - $('#journal_status').css(success).html(t('journal', 'Saved')).fadeIn().fadeOut(5000); - } else { - $('#journal_status').css(failure); - $('#journal_status').html(t('journal', 'Error saving: ')+jsondata.data.message).fadeIn().fadeOut(5000); - } - }); - }); -}); diff --git a/apps/journal/lib/app.php b/apps/journal/lib/app.php deleted file mode 100644 index d3d9b3bf114..00000000000 --- a/apps/journal/lib/app.php +++ /dev/null @@ -1,135 +0,0 @@ -<?php -/** - * ownCloud - Journal - * - * @author Bart Visscher - * Copyright (c) 2012 Bart Visscher <bartv@thisnet.nl> - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -/** - * This class manages our journal. - */ -OC_Journal_App::$l10n = new OC_L10N('journal'); -class OC_Journal_App { - public static $l10n; - /* - * @brief categories of the user - */ - protected static $categories = null; - - public static function arrayForJSON($id, $vjournal, $user_timezone) { - // Possible properties: URL - $journal = array( 'id' => $id ); - $journal['summary'] = $vjournal->getAsString('SUMMARY'); - $format = 'text'; - if($vjournal->DESCRIPTION) { - foreach($vjournal->DESCRIPTION->parameters as $parameter){ - if(stripos($parameter->name, 'FORMAT') !== false && stripos($parameter->value, 'HTML') !== false){ - $format = 'html'; // an educated guess ;-) - break; - } - } - $desc = $vjournal->getAsString('DESCRIPTION'); - $journal['description'] = array( - 'value' => ($format=='html'?$body = preg_replace("/.*<body[^>]*>|<\/body>.*/si", "", $desc):$desc), - 'format' => $format, - 'parameters' => self::parametersForProperty($vjournal->DESCRIPTION) - ); - } else { - $journal['description'] = array('value' => '', 'format' => 'text'); - } - $journal['organizer'] = array( - 'value' => $vjournal->getAsString('ORGANIZER'), - 'parameters' => self::parametersForProperty($vjournal->ORGANIZER) - ); - $journal['categories'] = $vjournal->getAsArray('CATEGORIES'); - //error_log('DTSTART: '.print_r($vjournal->DTSTART, true)); - $dtprop = $vjournal->DTSTART; - if($dtprop) { - $dtstart = $vjournal->DTSTART->getDateTime(); - if($dtstart) { - //if(!) - $tz = new DateTimeZone($user_timezone); - if($tz->getName() != $dtstart->getTimezone()->getName() && !$vjournal->DTSTART->offsetExists('TZID')) { - //error_log($tz->getName().' != '.$dtstart->getTimezone()->getName()); - //error_log('TZ offset: '.$tz->getOffset(new DateTime("now"))/60); - $dtstart->setTimezone($tz); - } - $journal['dtstart'] = $dtstart->format('U'); - $journal['only_date'] = ($dtprop->getDateType() == Sabre_VObject_Property_DateTime::DATE); - } else { - OCP\Util::writeLog('journal', 'Could not get DTSTART DateTime for '.$journal['summary'], OCP\Util::ERROR); - } - } else { - OCP\Util::writeLog('journal', 'Could not get DTSTART for '.$journal['summary'], OCP\Util::ERROR); - } - return $journal; - } - - /** Get a map of a properties parameters for JSON - * @param $property Sabre_VObject_Property - * @return array of parameters in { name => value, } format - */ - public static function parametersForProperty($property) { - $temp = array(); - if(!$property) { - return; - } - foreach($property->parameters as $parameter){ - $temp[$parameter->name] = $parameter->value; - } - return $temp; - } - - /* - * @brief returns the vcategories object of the user - * @return (object) $vcategories - */ - protected static function getVCategories() { - if (is_null(self::$categories)) { - self::$categories = new OC_VCategories('calendar'); - } - return self::$categories; - } - - - /** - * Create a stub for a new journal entry. - * @return OC_VObject The newly created stub. - */ - public static function createVCalendar() { - $vcalendar = new OC_VObject('VCALENDAR'); - $appinfo = OCP\App::getAppInfo('journal'); - $appversion = OCP\App::getAppVersion('journal'); - $prodid = '-//ownCloud//NONSGML '.$appinfo['name'].' '.$appversion.'//EN'; - $vcalendar->add('PRODID', $prodid); - $vcalendar->add('VERSION', '2.0'); - - $vjournal = new OC_VObject('VJOURNAL'); - $vjournal->setDateTime('DTSTART', 'now', Sabre_VObject_Property_DateTime::LOCALTZ); - $vjournal->setDateTime('CREATED', 'now', Sabre_VObject_Property_DateTime::UTC); - $vjournal->setUID(); - $email = OCP\Config::getUserValue(OCP\User::getUser(), 'settings', 'email', ''); - if($email) { - $vjournal->setString('ORGANIZER', 'mailto:'.$email); - } - $vcalendar->add($vjournal); - return $vcalendar; - } - -} diff --git a/apps/journal/lib/hooks.php b/apps/journal/lib/hooks.php deleted file mode 100644 index 2298871148c..00000000000 --- a/apps/journal/lib/hooks.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** - * ownCloud - Journal - * - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -/** - * This class manages our journal. - */ -class OC_Journal_Hooks { - /** - * Hook to convert a completed Task (VTODO) to a journal entry and add it to the calendar. - * @param $vtodo An OC_VObject of type VTODO. - */ - public static function taskToJournalEntry($vtodo) { - if(!$vtodo) { return; } - - OCP\Util::writeLog('journal', 'Completed task: '.$vtodo->getAsString('SUMMARY'), OCP\Util::DEBUG); - $vcalendar = OC_Journal_App::createVCalendar(); - $vjournal = $vcalendar->VJOURNAL; - $vjournal->setDateTime('DTSTART',$vtodo->COMPLETED->getDateTime()); - $vjournal->SUMMARY = $vtodo->SUMMARY; - $vjournal->setString('SUMMARY', OC_Journal_App::$l10n->t('Completed task: ').$vjournal->getAsString('SUMMARY')); - $vjournal->DESCRIPTION = $vtodo->DESCRIPTION; - - $cid = OCP\Config::getUserValue(OCP\User::getUser(), 'journal', 'default_calendar', null); - if(!$cid) { - $calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); - $first_calendar = reset($calendars); - $cid = $first_calendar['id']; - } - try { - $id = OC_Calendar_Object::add($cid, $vcalendar->serialize()); - } catch (Exception $e) { - OCP\Util::writeLog('journal', 'Error adding completed Task to calendar: "'.$cid.'" '. $e->getMessage(), OCP\Util::ERROR); - } - } -} diff --git a/apps/journal/lib/search.php b/apps/journal/lib/search.php deleted file mode 100644 index 27b9b87b031..00000000000 --- a/apps/journal/lib/search.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -class OC_Search_Provider_Journal extends OC_Search_Provider { - function search($query){ - $calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser(), true); - if(count($calendars)==0 || !OCP\App::isEnabled('calendar')) { - //return false; - } - $results=array(); - $searchquery=array(); - if(substr_count($query, ' ') > 0) { - $searchquery = explode(' ', $query); - }else{ - $searchquery[] = $query; - } - error_log('search'); - $user_timezone = OCP\Config::getUserValue(OCP\USER::getUser(), 'calendar', 'timezone', date_default_timezone_get()); - $l = new OC_l10n('journal'); - foreach($calendars as $calendar) { - $objects = OC_Calendar_Object::all($calendar['id']); - foreach($objects as $object) { - if($object['objecttype']!='VJOURNAL') { - continue; - } - if(substr_count(strtolower($object['summary']), strtolower($query)) > 0) { - $calendardata = OC_VObject::parse($object['calendardata']); - $vjournal = $calendardata->VJOURNAL; - $dtstart = $vjournal->DTSTART; - if($dtstart) { - continue; - } - $start_dt = $dtstart->getDateTime(); - $start_dt->setTimezone(new DateTimeZone($user_timezone)); - if ($dtstart->getDateType() == Sabre_VObject_Property_DateTime::DATE) { - $info = $l->t('Date') . ': ' . $start_dt->format('d.m.Y'); - }else{ - $info = $l->t('Date') . ': ' . $start_dt->format('d.m.y H:i'); - } - $link = OCP\Util::linkTo('journal', 'index.php').'&id='.urlencode($object['id']); - $results[]=new OC_Search_Result($object['summary'],$info, $link,(string)$l->t('Journal'));//$name,$text,$link,$type - } - } - } - return $results; - } -} diff --git a/apps/journal/lib/vjournal.php b/apps/journal/lib/vjournal.php deleted file mode 100644 index b9aedea041e..00000000000 --- a/apps/journal/lib/vjournal.php +++ /dev/null @@ -1,27 +0,0 @@ -<?php -/** - * ownCloud - Journal - * - * @author Thomas Tanghus - * @copyright 2012 Thomas Tanghus <thomas@tanghus.net> - * - * This library is free software; you can redistribute it and/or - * modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE - * License as published by the Free Software Foundation; either - * version 3 of the License, or any later version. - * - * This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. - * - * You should have received a copy of the GNU Affero General Public - * License along with this library. If not, see <http://www.gnu.org/licenses/>. - * - */ - -/** - * This class manages our journals - */ -class OC_Task_VJournal extends OC_Calendar_Object{ -} diff --git a/apps/journal/settings.php b/apps/journal/settings.php deleted file mode 100644 index 35f0ee7d6c2..00000000000 --- a/apps/journal/settings.php +++ /dev/null @@ -1,45 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); - -$errors = array(); - -$required_apps = array( - array('id' => 'tal', 'name' => 'TAL Page Templates'), - array('id' => 'journal', 'name' => 'Journal'), - array('id' => 'contacts', 'name' => 'Contacts'), -); -foreach($required_apps as $app) { - if(!OCP\App::isEnabled($app['id'])) { - $error = (string)$l->t('The %%s app isn\'t enabled! Please enable it here: <strong><a href="%%s?appid=%%s">Enable %%s app</a></strong>'); - $errors[] = sprintf($error, $app['name'],OCP\Util::linkTo('settings', 'apps'), $app['id'], $app['name']); - } -} - -$calendars = OC_Calendar_Calendar::allCalendars(OCP\User::getUser(), true); -if( count($calendars) == 0 ) { - $error = (string)$l->t('You have no calendars. Please add one at the <strong><a href="%%s">Calendar app</a></strong>'); - $errors[] = sprintf($error, OCP\Util::linkTo('calendar', 'index.php')); -} - -if(count($errors) > 0) { - $tmpl = new OCP\Template('journal', 'rtfm'); - $tmpl->assign('errors',$errors, false); -} else { - $cid = OCP\Config::getUserValue(OCP\User::getUser(), 'journal', 'default_calendar', null); - OCP\Util::addScript('journal', 'settings'); - $tmpl = new OC_TALTemplate('journal', 'settings', 'user'); - $tmpl->assign('calendars', $calendars); - $tmpl->assign('cid', $cid); -} - -return $tmpl->fetchPage(); - -?> diff --git a/apps/journal/templates/index.pt b/apps/journal/templates/index.pt deleted file mode 100644 index 40ce351a543..00000000000 --- a/apps/journal/templates/index.pt +++ /dev/null @@ -1,101 +0,0 @@ -<!DOCTYPE html> -<html metal:use-macro="${maintemplate}/page"> -<head> - <title>Journal</title> -</head> -<body> -<div id="content" metal:fill-slot="content"> - <form onsubmit="return false;"> - <div id="controls"> - <select class="tip" id="entrysort" title="Sort journal entries" i18n:attributes="title"> - <option value="dtdesc">Date - descending</option> - <option value="dtasc">Date - ascending</option> - <option value="sumdesc">Summary - descending</option> - <option value="sumasc">Summary - ascending</option> - </select> - <button class="tip" id="add" title="Add new journal entry" i18n:attributes="title" i18n:translate="">Add</button> - </div> - <ul id="leftcontent"></ul> - <div id="rightcontent"> - <div id="entry"> - <input class="property propertycontainer content" id="summary" name="value" type="text" size="80" placeholder="First enter a short summary" value="" required="required" data-type="SUMMARY" i18n:attributes="placeholder" /> - <ul id="editortoolbar" class="rte-toolbar svg"> - <li class="richtext"> - <button class="tip" data-cmd="bold" title="Bold" i18n:attributes="title"> - <img tal:attributes="src image:string:journal/bold.svg" /> - </button> - </li> - <li class="richtext"> - <button class="tip" data-cmd="italic" title="Italic" i18n:attributes="title"> - <img tal:attributes="src image:string:journal/italic.svg" /> - </button> - </li> - <li class="richtext"> - <button class="tip" data-cmd="strikethrough" title="Strike-through" i18n:attributes="title"> - <img tal:attributes="src image:string:journal/strikethrough.svg" /> - </button> - </li> - <li class="richtext"> - <button class="tip" data-cmd="underline" title="Underline" i18n:attributes="title"> - <img tal:attributes="src image:string:journal/underline.svg" /> - </button> - </li> - <li class="richtext"> - <button class="tip" data-cmd="ulist" title="Unordered list" i18n:attributes="title"> - <img tal:attributes="src image:string:journal/list.svg" /> - </button> - </li> - <li class="richtext"> - <button class="tip" data-cmd="createlink" title="Link (URL)" i18n:attributes="title"> - <img tal:attributes="src image:string:core/actions/public.svg" /> - </button> - </li> - <li><a id="togglemode" class="hidden" i18n:translate="">Switch edit mode</a></li> - </ul> - <div class="propertycontainer" data-type="DESCRIPTION"><textarea class="property content" id="description" name="value"></textarea></div> - </div> - <dl id="metadata"> - <div> - <input type="checkbox" id="editable" /><label class="tip" for="editable" title="Set this journal entry in edit mode" i18n:attributes="title" i18n:translate="">Edit</label> - <a class="tip" id="export" title="Export as iCal file" i18n:attributes="title"> - <img class="svg action" tal:attributes="src image:string:core/actions/download.svg" /> - </a> - <a class="tip" id="showlink" title="Direct link to this journal entry" i18n:attributes="title"> - <img class="svg action" tal:attributes="src image:string:core/actions/public.svg" /> - </a> - <a class="tip" id="delete" title="Delete this journal entry" i18n:attributes="title"> - <img class="svg action" tal:attributes="src image:string:core/actions/delete.svg" /> - </a> - <input class="hidden" id="link" type="text" /> - </div> - <dt><label for="organizer" i18n:translate="">Author</label></dt> - <dd> - <input class="property propertycontainer" id="organizer" name="value" type="text" size="16" placeholder="Who has written this" value="" data-type="ORGANIZER" disabled="true" i18n:attributes="placeholder" /> - </dd> - <dt id="categories_label"><label for="categories" i18n:translate="">Categories</label></dt> - <dd class="propertycontainer" id="categories_value" data-type="CATEGORIES"> - <input class="property" id="categories" name="value" type="text" size="16" placeholder="Separate with commas" value="" disabled="true" i18n:attributes="placeholder" /> - <a role="button" class="tip action" id="editcategories" title="Edit groups" i18n:attributes="title"> - <img class="svg action" tal:attributes="src image:string:core/actions/rename.svg" /> - </a> - </dd> - <dt> - <label for="dtstartdate" i18n:translate="">Date</label> - <input type="checkbox" id="also_time" /> - <label class="tip" for="also_time" title="Select if this entry also has a time associated." i18n:attributes="title" i18n:translate="">Include time</label> - </dt> - <dd class="propertycontainer" data-type="DTSTART"> - <input class="property" id="dtstartdate" name="value" type="date" size="10" placeholder="dd-mm-yyyy" value="" i18n:attributes="placeholder" disabled="true" /> - <input class="property" id="dtstarttime" name="value" type="time" size="5" placeholder="hh-mm" value="" i18n:attributes="placeholder" disabled="true" /> - </dd> - </dl> - </div> - <script type="text/javascript"> - var categories = ${structure php:json_encode(categories)}; - var id = '${id}'; - var totalurl = '${url:string:journal/index.php}'; - </script> -</form> -</div> -</body> -</html>
\ No newline at end of file diff --git a/apps/journal/templates/rtfm.php b/apps/journal/templates/rtfm.php deleted file mode 100644 index 8fd51fb8d02..00000000000 --- a/apps/journal/templates/rtfm.php +++ /dev/null @@ -1,7 +0,0 @@ -<ul style="margin: 2em; font-size: 1.4em; line-spacing: 2em;"> -<?php -foreach($_['errors'] as $error) { ?> - <li><?php echo $error; ?></li> -<?php } ?> -</ul> - diff --git a/apps/journal/templates/settings.pt b/apps/journal/templates/settings.pt deleted file mode 100644 index 3e788f58818..00000000000 --- a/apps/journal/templates/settings.pt +++ /dev/null @@ -1,15 +0,0 @@ -<form id="journal"> - <fieldset class="personalblock"> - <legend i18n:translate="">Journal</legend> - <dl> - <dt i18n:translate="">Select default calendar<br />for storing journals</dt> - <dd> - <select id="journal_calendar" style="float:left;"> - <tal:block repeat="calendar calendars"> - <option tal:define="id calendar/id" tal:attributes="value id; selected php:(cid == id ? 'selected' : null )" tal:content="calendar/displayname"></option> - </tal:block> - </select> - </dd><span id="journal_status"></span> - </dl> - </fieldset> -</form> diff --git a/apps/news/.gitignore b/apps/news/.gitignore deleted file mode 100644 index 16469399de3..00000000000 --- a/apps/news/.gitignore +++ /dev/null @@ -1,5 +0,0 @@ -3rdparty/* -news.kdev4 -*~ -.kdev4 -img/* diff --git a/apps/news/ajax/createfeed.php b/apps/news/ajax/createfeed.php deleted file mode 100644 index 754d874957f..00000000000 --- a/apps/news/ajax/createfeed.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); - -$userid = OCP\USER::getUser(); - -$feedurl = trim($_POST['feedurl']); -$folderid = trim($_POST['folderid']); - -$feed = OC_News_Utils::fetch($feedurl); -$feedmapper = new OC_News_FeedMapper(); -$feedid = $feedmapper->save($feed, $folderid); - -$l = OC_L10N::get('news'); - -if(!$feedid) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error adding folder.')))); - OCP\Util::writeLog('news','ajax/createfeed.php: Error adding feed: '.$_POST['feedurl'], OCP\Util::ERROR); - exit(); -} - -//TODO: replace the following with a real success case. see contact/ajax/createaddressbook.php for inspirations -OCP\JSON::success(array('data' => array('message' => $l->t('Feed added!')))); - diff --git a/apps/news/ajax/createfolder.php b/apps/news/ajax/createfolder.php deleted file mode 100644 index b5f624604dc..00000000000 --- a/apps/news/ajax/createfolder.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); - -$userid = OCP\USER::getUser(); - -$name = trim($_POST['name']); -$parentid = trim($_POST['parentid']); - -$foldermapper = new OC_News_FolderMapper($userid); - -if($parentid != 0) - $folder = new OC_News_Folder($name, NULL, $foldermapper->find($parentid)); -else - $folder = new OC_News_Folder($name); - -$folderid = $foldermapper->save($folder); - -$l = OC_L10N::get('news'); - -if(!$folderid) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error adding folder.')))); - OCP\Util::writeLog('news','ajax/createfolder.php: Error adding folder: '.$_POST['name'], OCP\Util::ERROR); -} -else { - //TODO: replace the following with a real success case. see contact/ajax/createaddressbook.php for inspirations - OCP\JSON::success(array('data' => array('message' => $l->t('Folder added!')))); -}
\ No newline at end of file diff --git a/apps/news/ajax/deletefeed.php b/apps/news/ajax/deletefeed.php deleted file mode 100644 index d31a9417d14..00000000000 --- a/apps/news/ajax/deletefeed.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); - -$userid = OCP\USER::getUser(); - -$feedid = $_POST['feedid']; - -$feedmapper = new OC_News_FeedMapper(); -$success = $feedmapper->deleteById($feedid); - -$l = OC_L10N::get('news'); - -if(!$success) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error removing feed.')))); - OCP\Util::writeLog('news','ajax/deletefeed.php: Error removing feed: '.$_POST['feedid'], OCP\Util::ERROR); - exit(); -} - -OCP\JSON::success(array('data' => array( 'feedid' => $feedid ))); diff --git a/apps/news/ajax/deletefolder.php b/apps/news/ajax/deletefolder.php deleted file mode 100644 index bf975c6c329..00000000000 --- a/apps/news/ajax/deletefolder.php +++ /dev/null @@ -1,33 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); - -$userid = OCP\USER::getUser(); - -$folderid = trim($_POST['folderid']); - -$foldermapper = new OC_News_FolderMapper(); -$success = $foldermapper->deleteById($folderid); - -$l = OC_L10N::get('news'); - -if(!$success) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error removing folder.')))); - OCP\Util::writeLog('news','ajax/deletefolder.php: Error removing folder: '.$_POST['folderid'], OCP\Util::ERROR); - exit(); -} - -OCP\JSON::success(array('data' => array( 'folderid' => $folderid ))); diff --git a/apps/news/ajax/feeddialog.php b/apps/news/ajax/feeddialog.php deleted file mode 100644 index c42771c9884..00000000000 --- a/apps/news/ajax/feeddialog.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -include("populateroot.php"); - -$output = new OCP\Template("news", "part.addfeed"); -$output -> assign('allfeeds', $allfeeds); -$output -> printpage();
\ No newline at end of file diff --git a/apps/news/ajax/folderdialog.php b/apps/news/ajax/folderdialog.php deleted file mode 100644 index 97b679e662e..00000000000 --- a/apps/news/ajax/folderdialog.php +++ /dev/null @@ -1,7 +0,0 @@ -<?php - -include("populateroot.php"); - -$output = new OCP\Template("news", "part.addfolder"); -$output -> assign('allfeeds', $allfeeds); -$output -> printpage();
\ No newline at end of file diff --git a/apps/news/ajax/markitem.php b/apps/news/ajax/markitem.php deleted file mode 100644 index c42dc9350cf..00000000000 --- a/apps/news/ajax/markitem.php +++ /dev/null @@ -1,35 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); -OCP\JSON::callCheck(); - -$itemid = $_POST['itemid']; - -$itemmapper = new OC_News_ItemMapper(); -$item = $itemmapper->find($itemid); -$item->setRead(); -$success = $itemmapper->update($item); - -$l = OC_L10N::get('news'); - -if(!$success) { - OCP\JSON::error(array('data' => array('message' => $l->t('Error marking item as read.')))); - OCP\Util::writeLog('news','ajax/markitem.php: Error marking item as read: '.$_POST['itemid'], OCP\Util::ERROR); - exit(); -} - -//TODO: replace the following with a real success case. see contact/ajax/createaddressbook.php for inspirations -OCP\JSON::success(array('data' => array('itemid' => $itemid ))); - diff --git a/apps/news/ajax/populateroot.php b/apps/news/ajax/populateroot.php deleted file mode 100644 index a408c25ec5d..00000000000 --- a/apps/news/ajax/populateroot.php +++ /dev/null @@ -1,18 +0,0 @@ -<?php - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('news'); - -$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser()); - -$allfeeds = $foldermapper->populate('Everything', 0); - -if ($allfeeds) { - $feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null; - if ($feedid == null) { - - } -} -else { - $feedid = 0; -} diff --git a/apps/news/appinfo/app.php b/apps/news/appinfo/app.php deleted file mode 100644 index eb1b54455dd..00000000000 --- a/apps/news/appinfo/app.php +++ /dev/null @@ -1,42 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -OC::$CLASSPATH['OC_News_Item'] = 'apps/news/lib/item.php'; -OC::$CLASSPATH['OC_News_Collection'] = 'apps/news/lib/collection.php'; -OC::$CLASSPATH['OC_News_Feed'] = 'apps/news/lib/feed.php'; -OC::$CLASSPATH['OC_News_Folder'] = 'apps/news/lib/folder.php'; - -OC::$CLASSPATH['OC_News_FeedMapper'] = 'apps/news/lib/feedmapper.php'; -OC::$CLASSPATH['OC_News_ItemMapper'] = 'apps/news/lib/itemmapper.php'; -OC::$CLASSPATH['OC_News_FolderMapper'] = 'apps/news/lib/foldermapper.php'; - -OC::$CLASSPATH['OC_News_Utils'] = 'apps/news/lib/utils.php'; - - -$l = new OC_l10n('news'); - -OCP\App::registerPersonal('news', 'settings'); - -OCP\App::register( array( - 'order' => 70, - 'id' => 'news', - 'name' => 'News' -)); - -OCP\App::addNavigationEntry( array( - 'id' => 'news', - 'order' => 74, - 'href' => OC_Helper::linkTo( 'news', 'index.php' ), - 'icon' => OC_Helper::imagePath( 'news', 'icon.svg' ), - 'name' => $l->t('News') -)); - diff --git a/apps/news/appinfo/database.xml b/apps/news/appinfo/database.xml deleted file mode 100644 index 3f5f6c44afd..00000000000 --- a/apps/news/appinfo/database.xml +++ /dev/null @@ -1,186 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<database> - <name>*dbname*</name> - <create>true</create> - <overwrite>false</overwrite> - <charset>latin1</charset> - <table> - <name>*dbprefix*news_folders</name> - <declaration> - <field> - <name>id</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <autoincrement>1</autoincrement> - <length>4</length> - </field> - <field> - <name>parent_id</name> - <type>integer</type> - <notnull>false</notnull> - <length>4</length> - </field> - <field> - <name>name</name> - <type>text</type> - <notnull>true</notnull> - <length>100</length> - </field> - <field> - <name>user_id</name> - <type>text</type> - <default></default> - <notnull>true</notnull> - <length>64</length> - </field> - - <index> - <name>folder_id</name> - <unique>true</unique> - <field> - <name>id</name> - <sorting>descending</sorting> - </field> - </index> - <index> - <name>user_id</name> - <field> - <name>user_id</name> - </field> - </index> - </declaration> - </table> - - <table> - <name>*dbprefix*news_feeds</name> - <declaration> - <field> - <name>id</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <autoincrement>1</autoincrement> - <length>4</length> - </field> - <field> - <name>url</name> - <type>text</type> - <notnull>true</notnull> - <length>100</length> - </field> - <field> - <name>title</name> - <type>text</type> - <notnull>true</notnull> - <length>100</length> - </field> - <field> - <name>added</name> - <type>integer</type> - <default></default> - <notnull>false</notnull> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>lastmodified</name> - <type>integer</type> - <default></default> - <notnull>false</notnull> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>folder_id</name> - <type>integer</type> - <notnull>true</notnull> - <length>4</length> - </field> - - <index> - <name>feed_id</name> - <unique>true</unique> - <primary>true</primary> - <field> - <name>id</name> - <sorting>descending</sorting> - </field> - </index> - - <index> - <name>feed_url</name> - <unique>true</unique> - <primary>false</primary> - <field> - <name>url</name> - </field> - </index> - </declaration> - </table> - - <table> - <name>*dbprefix*news_items</name> - <declaration> - <field> - <name>id</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <autoincrement>1</autoincrement> - <length>4</length> - </field> - <field> - <name>guid</name> - <type>text</type> - <notnull>true</notnull> - <length>100</length> - </field> - <field> - <name>url</name> - <type>text</type> - <length>100</length> - </field> - <field> - <name>title</name> - <type>text</type> - <length>100</length> - </field> - <field> - <name>feed_id</name> - <type>integer</type> - <notnull>true</notnull> - <length>4</length> - </field> - <field> - <name>body</name> - <type>text</type> - <length>4000</length> - </field> - <field> - <name>status</name> - <type>integer</type> - <length>1</length> - </field> - - <index> - <name>item_id</name> - <unique>true</unique> - <field> - <name>id</name> - <sorting>descending</sorting> - </field> - </index> - <index> - <name>item_guid</name> - <unique>true</unique> - <field> - <name>guid</name> - </field> - <field> - <name>feed_id</name> - </field> - </index> - </declaration> - </table> -</database> diff --git a/apps/news/appinfo/info.xml b/apps/news/appinfo/info.xml deleted file mode 100644 index 0ada6e75c03..00000000000 --- a/apps/news/appinfo/info.xml +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0"?> -<info> - <id>news</id> - <name>News</name> - <description>An RSS/Atom feed reader</description> - <version>5.5</version> - <licence>AGPL</licence> - <author>Alessandro Cosentino</author> - <require>4</require> -</info> diff --git a/apps/news/css/news.css b/apps/news/css/news.css deleted file mode 100644 index 04ce0d2e738..00000000000 --- a/apps/news/css/news.css +++ /dev/null @@ -1,52 +0,0 @@ -li { padding-right: 0px !important; } - -.collapsable { background: url('%webroot%/core/img/places/folder.svg') no-repeat left center; padding-left: 20px;} -.news_input { float:left; font-size:12px; padding:4px 2px; border:solid 1px #aacfe4; width:200px; } -.svg { border: inherit; background: inherit; } - -#leftcontent { top: 3.5em !important; padding: 0; margin: 0; } -#rightcontent { top: 3.5em !important; padding-top: 5px; } -#feeds { background: #fff; width: 20em; left: 12.5em; top: 3.7em; bottom:3em; position: fixed; overflow: auto; padding: 0; margin: 0; } -/* #feeds a { height: 23px; display: block; margin: 0 0 0 0; padding: 0 0 0 25px; } */ -#bottomcontrols { padding: 0; bottom:0px; overflow:visible; height:2.8em; width: 20em; margin:0; background:#eee; border-top:1px solid #ccc; position:fixed; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;} -#feeds_delete { position: absolute; right: 0px; background: url('%webroot%/core/img/actions/delete.svg') no-repeat center; display: inline; } -#feeds_edit { position: absolute; right: 1.6em; background: url('%webroot%/core/img/actions/rename.svg') no-repeat center; display: inline; } - -#dropdownBtn { width: 9em; padding-left: 0; padding-right:20px; background: url('%webroot%/core/img/actions/triangle-s.svg') no-repeat right center; } - -#addfolder { background: url('%webroot%/core/img/places/folder.svg') no-repeat left center; padding-left: 20px; } -#addfeed { background: url('%appswebroot%/apps/news/img/rss.svg') no-repeat left center; padding-left: 20px; } - -ul.controls li { float: left; } - -.accordion .title_unread { background: #DCDCDC; font-size: 12px; border-bottom:1px solid #ccc; font-weight:bold;} -.accordion .title_read { background: #DCDCDC; font-size: 12px; border-bottom:1px solid #ccc;} - -ul.menu { position: absolute; z-index:100; margin-left: 0.3em; - display: none; - background:#EEEEEE; /* default background for browsers without gradient support */ - /* css3 */ - background:-webkit-gradient(linear, 0 0, 0 100%, from(#DCDCDC), to(#EEEEEE)); - background:-moz-linear-gradient(#DCDCDC, #EEEEEE); - background:-o-linear-gradient(#DCDCDC, #EEEEEE); - background:linear-gradient(#DCDCDC, #EEEEEE); - /* - -webkit-border-radius:10px; - -moz-border-radius:10px; - border-radius:10px; - */ -} - -ul#dropdownmenu { left: 0em; box-shadow: 0px 0px 10px rgb(0, 0, 0); } - -ul#feedfoldermenu { position:fixed; margin-left: 0; bottom: 2.8em; border-left:1px solid #ccc; border-top:1px solid #ccc; border-right:1px solid #ccc; -moz-box-shadow: 0 -3px 3px -3px #000; -webkit-box-shadow: 0 -3px 3px -3px #000; box-shadow: 0 -3px 3px -3px #000;} - -li.menuItem { margin-left:0.7em; margin-right:0.7em; float: none !important; text-align: left; } - -li.folder_list:hover { color: rgb(0, 0, 0) !important; background: none !important; } -li.feeds_list:hover { background: none repeat scroll 0% 0% rgb(221, 221, 221) !important; } -div.collapsable:hover { background-color: rgb(221, 221, 221); } -div.add_parentfolder { position: relative; } - -div.dialog { overflow: visible; } - diff --git a/apps/news/index.php b/apps/news/index.php deleted file mode 100644 index e75ec19d670..00000000000 --- a/apps/news/index.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// Check if we are a user -OCP\User::checkLoggedIn(); - -OCP\App::checkAppEnabled('news'); -OCP\App::setActiveNavigationEntry('news'); - -OCP\Util::addscript('news','news'); -OCP\Util::addStyle('news','news'); - -$l = OC_L10N::get('news'); - -$foldermapper = new OC_News_FolderMapper(OCP\USER::getUser()); - -$allfeeds = $foldermapper->populate($l->t('Everything'), 0); - -if ($allfeeds) { - $feedid = isset( $_GET['feedid'] ) ? $_GET['feedid'] : null; - if ($feedid == null) { - - } -} -else { - $feedid = 0; -} - -$tmpl = new OCP\Template( 'news', 'main', 'user' ); -$tmpl->assign('allfeeds', $allfeeds); -$tmpl->assign('feedid', $feedid); -$tmpl->printPage(); - -?> diff --git a/apps/news/js/news.js b/apps/news/js/news.js deleted file mode 100644 index 96c3f60b7d2..00000000000 --- a/apps/news/js/news.js +++ /dev/null @@ -1,196 +0,0 @@ -News={ - DropDownMenu: { - fade:function(menu){ - var list = $(menu).toggle(); - return false; - }, - dropdown:function(button){ - var list = $(button).parent().find('ul#dropdownmenu'); - if (list.css('display') == 'none') - list.slideDown('fast').show(); - else - list.slideUp('fast'); - - return false; - }, - selectItem:function(item, folderid){ - var parent = $(item).parent().parent(); - parent.find('#dropdownBtn').text($(item).text()); - parent.find(':input[name="folderid"]').val(folderid); - parent.find('ul#dropdownmenu').slideUp('fast'); - } - }, - UI: { - overview:function(dialogtype, dialogfile){ - if($(dialogtype).dialog('isOpen') == true){ - $(dialogtype).dialog('moveToTop'); - }else{ - $('#dialog_holder').load(OC.filePath('news', 'ajax', dialogfile), function(jsondata){ - if(jsondata.status != 'error'){ - $(dialogtype).dialog({ - dialogClass:'dialog', - minWidth: 600, - close: function(event, ui) { - $(this).dialog('destroy').remove(); - } - }).css('overflow','visible'); - } else { - alert(jsondata.data.message); - } - }); - } - return false; - } - }, - Folder: { - submit:function(button){ - var displayname = $("#folder_add_name").val().trim(); - - if(displayname.length == 0) { - OC.dialogs.alert(t('news', 'Displayname cannot be empty.'), t('news', 'Error')); - return false; - } - - $(button).attr("disabled", true); - //translation here!!! - $(button).prop('value', 'Adding...'); - - var folderid = $('#inputfolderid:input[name="folderid"]').val(); - - var url; - url = OC.filePath('news', 'ajax', 'createfolder.php'); - - $.post(url, { name: displayname, parentid: folderid }, - function(jsondata){ - if(jsondata.status == 'success'){ - //$(button).closest('tr').prev().html(jsondata.page).show().next().remove(); - OC.dialogs.alert(jsondata.data.message, t('news', 'Success!')); - } else { - OC.dialogs.alert(jsondata.data.message, t('news', 'Error')); - } - $("#folder_add_name").val(''); - $(button).attr("disabled", false); - //translation here!!! - $(button).prop('value', 'Add folder'); - }); - }, - 'delete':function(folderid) { - $('#feeds_delete').tipsy('hide'); - OC.dialogs.confirm(t('news', 'Are you sure you want to delete this folder and all its feeds?'), t('news', 'Warning'), function(answer) { - if(answer == true) { - $.post(OC.filePath('news', 'ajax', 'deletefolder.php'),{'folderid':folderid},function(jsondata){ - if(jsondata.status == 'success'){ - alert('removed!'); - } - else{ - OC.dialogs.alert(jsondata.data.message, t('news', 'Error')); - } - }); - } - }); - return false; - } - }, - Feed: { - id:'', - submit:function(button){ - var feedurl = $("#feed_add_url").val().trim(); - - if(feedurl.length == 0) { - OC.dialogs.alert(t('news', 'URL cannot be empty.'), t('news', 'Error')); - return false; - } - - $(button).attr("disabled", true); - //translation here!!! - $(button).prop('value', 'Adding...'); - - var folderid = $('#inputfolderid:input[name="folderid"]').val(); - - var url; - url = OC.filePath('news', 'ajax', 'createfeed.php'); - - $.post(url, { feedurl: feedurl, folderid: folderid }, - function(jsondata){ - if(jsondata.status == 'success'){ - OC.dialogs.alert(jsondata.data.message, t('news', 'Success!')); - } else { - OC.dialogs.alert(jsondata.data.message, t('news', 'Error')); - } - $("#feed_add_url").val(''); - $(button).attr("disabled", false); - //translation here!!! - $(button).prop('value', 'Add feed'); - }); - }, - 'delete':function(feedid) { - $('#feeds_delete').tipsy('hide'); - OC.dialogs.confirm(t('news', 'Are you sure you want to delete this feed?'), t('news', 'Warning'), function(answer) { - if(answer == true) { - $.post(OC.filePath('news', 'ajax', 'deletefeed.php'),{'feedid':feedid},function(jsondata){ - if(jsondata.status == 'success'){ - $('#leftcontent [data-id="'+jsondata.data.feedid+'"]').remove(); - //change the right view too (maybe a message to subscribe, like in Google Reader?) - } - else{ - OC.dialogs.alert(jsondata.data.message, t('news', 'Error')); - } - }); - } - }); - return false; - }, - markItem:function(itemid) { - $.post(OC.filePath('news', 'ajax', 'markitem.php'),{'itemid':itemid},function(jsondata){ - if(jsondata.status == 'success'){ - var $currentitem = $('#rightcontent [data-id="'+jsondata.data.itemid+'"]'); - $currentitem.removeClass('title_unread'); - $currentitem.addClass('title_read'); - //set a timeout for this - } - else{ - OC.dialogs.alert(jsondata.data.message, t('news', 'Error')); - } - }); - } - } -} - -$(document).ready(function(){ - - $('#addfeed').click(function() { - News.UI.overview('#addfeed_dialog','feeddialog.php'); - $(this).parent().toggle(); - }); - $('#addfolder').click(function() { - News.UI.overview('#addfolder_dialog','folderdialog.php'); - $(this).parent().toggle(); - }); - - $('.collapsable').click(function(){ - $(this).parent().children().toggle(); - $(this).toggle(); - }); - - $('.accordion .title_unread').click(function() { - $(this).next().toggle(); - return false; - }).next().hide(); - - $('.accordion .title_read').click(function() { - $(this).next().toggle(); - return false; - }).next().hide(); - - var list = $('.collapsable,.feeds_list').hover(function() { - var elem = $(this).find('#feeds_delete,#feeds_edit'); - if(elem.css('display') == 'none') - elem.css('display', 'inline'); - else - elem.css('display', 'none'); - - return false; - }); - list.find('#feeds_delete').hide(); - list.find('#feeds_edit').hide(); -}); diff --git a/apps/news/js/settings.js b/apps/news/js/settings.js deleted file mode 100644 index 4c645d241e2..00000000000 --- a/apps/news/js/settings.js +++ /dev/null @@ -1,15 +0,0 @@ -$(document).ready(function(){ - - - - $('#somesetting').blur(function(event){ - event.preventDefault(); - var post = $( "#somesetting" ).serialize(); - $.post( OC.filePath('apptemplate','ajax','seturl.php') , post, function(data){ OC.msg.finishedSaving('#somesetting .msg', data); }); - }); - - - -}); - - diff --git a/apps/news/lib/collection.php b/apps/news/lib/collection.php deleted file mode 100644 index 2ebbb646f0a..00000000000 --- a/apps/news/lib/collection.php +++ /dev/null @@ -1,32 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class models a collection, which is either a feed or a folder. - */ -class OC_News_Collection { - - private $id; - - public function __construct($id){ - $this->id = $id; - } - - public function getId(){ - return $this->id; - } - - public function setId($id){ - $this->id = $id; - } - -}
\ No newline at end of file diff --git a/apps/news/lib/feed.php b/apps/news/lib/feed.php deleted file mode 100644 index bbed8d59824..00000000000 --- a/apps/news/lib/feed.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class models a feed. - */ -class OC_News_Feed extends OC_News_Collection { - - private $url; - private $spfeed; //encapsulate a SimplePie_Core object - private $items; //array that contains all the items of the feed - - public function __construct($url, $title, $items, $id = null){ - $this->url = $url; - $this->title = $title; - $this->items = $items; - if ($id !== null){ - parent::__construct($id); - } - } - - public function getUrl(){ - return $this->url; - } - - public function getTitle(){ - return $this->title; - } - - public function setItems($items){ - $this->items = $items; - } - - public function getItems(){ - return $this->items; - } -} diff --git a/apps/news/lib/feedmapper.php b/apps/news/lib/feedmapper.php deleted file mode 100644 index 73afa0e8647..00000000000 --- a/apps/news/lib/feedmapper.php +++ /dev/null @@ -1,182 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class maps a feed to an entry in the feeds table of the database. - */ -class OC_News_FeedMapper { - - const tableName = '*PREFIX*news_feeds'; - - /** - * @brief Retrieve a feed from the database - * @param id The id of the feed in the database table. - * @returns - */ - public function findById($id){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?'); - $result = $stmt->execute(array($id)); - $row = $result->fetchRow(); - $url = $row['url']; - $title = $row['title']; - $feed = new OC_News_Feed($url, $title, null, $id); - return $feed; - } - - /** - * @brief Retrieve a feed from the database - * @param id The id of the feed in the database table. - * @returns - */ - public function findByFolderId($folderid){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE folder_id = ?'); - $result = $stmt->execute(array($folderid)); - $feeds = array(); - while ($row = $result->fetchRow()) { - $url = $row['url']; - $title = $row['title']; - $id = $row['id']; - $feed = new OC_News_Feed($url, $title, null, $id); - $feeds[] = $feed; - } - return $feeds; - } - - - /** - * @brief Retrieve a feed and all its items from the database - * @param id The id of the feed in the database table. - * @returns - */ - public function findWithItems($id){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?'); - $result = $stmt->execute(array($id)); - $row = $result->fetchRow(); - $url = $row['url']; - $title = $row['title']; - $feed = new OC_News_Feed($url, $title, null,$id); - - $itemMapper = new OC_News_ItemMapper(); - $items = $itemMapper->findAll($id); - $feed->setItems($items); - - return $feed; - } - - /** - * @brief Find the id of a feed and all its items from the database - * @param url url of the feed - * @return id of the feed corresponding to the url passed as parameters - * null - if there is no such feed - */ - public function findIdFromUrl($url){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE url = ?'); - $result = $stmt->execute(array($url)); - $row = $result->fetchRow(); - $id = null; - if ($row != null){ - $id = $row['id']; - } - return $id; - } - - /** - * @brief Save the feed and all its items into the database - * @param feed the feed to be saved - * @returns The id of the feed in the database table. - */ - //TODO: handle error case - public function save(OC_News_Feed $feed, $folderid){ - $CONFIG_DBTYPE = OCP\Config::getSystemValue( "dbtype", "sqlite" ); - if( $CONFIG_DBTYPE == 'sqlite' or $CONFIG_DBTYPE == 'sqlite3' ){ - $_ut = "strftime('%s','now')"; - } elseif($CONFIG_DBTYPE == 'pgsql') { - $_ut = 'date_part(\'epoch\',now())::integer'; - } else { - $_ut = "UNIX_TIMESTAMP()"; - } - - $title = $feed->getTitle(); - $url = htmlspecialchars_decode($feed->getUrl()); - - if(empty($title)) { - $l = OC_L10N::get('news'); - $title = $l->t('no title'); - } - - //FIXME: Detect when feed contains already a database id - $feedid = $this->findIdFromUrl($url); - if ($feedid == null){ - $query = OCP\DB::prepare(' - INSERT INTO ' . self::tableName . - '(url, title, folder_id, added, lastmodified) - VALUES (?, ?, ?, ?, ?) - '); - - $params=array( - $url, - htmlspecialchars_decode($title), - $folderid, - $_ut, - $_ut - ); - $query->execute($params); - - $feedid = OCP\DB::insertid(self::tableName); - } - $feed->setId($feedid); - - $itemMapper = new OC_News_ItemMapper(); - - $items = $feed->getItems(); - foreach($items as $item){ - $itemMapper->save($item, $feedid); - } - - return $feedid; - } - - public function deleteById($id){ - if ($id == null) { - return false; - } - $stmt = OCP\DB::prepare('DELETE FROM ' . self::tableName .' WHERE id = ?'); - - $result = $stmt->execute(array($id)); - - $itemMapper = new OC_News_ItemMapper(); - //TODO: handle the value that the execute returns - $itemMapper->deleteAll($id); - - return true; - } - public function delete(OC_News_Feed $feed){ - $id = $feed->getId(); - return deleteById($id); - } - - //it's more complicated tan this...recursive delete, or delete with a join - public function deleteAll($folderdid){ - if ($folderid == null) { - return false; - } - $stmt = OCP\DB::prepare('DELETE FROM ' . self::tableName .' WHERE folder_id = ?'); - - $result = $stmt->execute(array($folderid)); - - $itemMapper = new OC_News_ItemMapper(); - //TODO: handle the value that the execute returns - $itemMapper->deleteAll($id); - - return true; - } -}
\ No newline at end of file diff --git a/apps/news/lib/folder.php b/apps/news/lib/folder.php deleted file mode 100644 index 6654b2f5e92..00000000000 --- a/apps/news/lib/folder.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class models a folder that contains feeds. - */ -class OC_News_Folder extends OC_News_Collection { - - private $name; - private $children; - private $parent; - - public function __construct($name, $id = null, OC_News_Collection $parent = null){ - $this->name = $name; - if ($id !== null){ - parent::__construct($id); - } - $this->children = array(); - if ($parent !== null){ - $this->parent = $parent; - } - } - - public function getName(){ - return $this->name; - } - - public function setName($name){ - $this->name = $name; - } - - public function getParentId(){ - if ($this->parent === null){ - return 0; - } - return $this->parent->getId(); - } - - public function addChild(OC_News_Collection $child){ - $this->children[] = $child; - } - - public function getChildren(){ - return $this->children; - } - -}
\ No newline at end of file diff --git a/apps/news/lib/foldermapper.php b/apps/news/lib/foldermapper.php deleted file mode 100644 index 45dc53c4243..00000000000 --- a/apps/news/lib/foldermapper.php +++ /dev/null @@ -1,148 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class maps a feed to an entry in the feeds table of the database. - */ -class OC_News_FolderMapper { - - const tableName = '*PREFIX*news_folders'; - - private $userid; - - public function __construct($userid = null){ - if ($userid !== null) { - $this->userid = $userid; - } - $userid = OCP\USER::getUser(); - } - - /** - * @brief Create a folder and populate with children from the database - * @param id The id of the folder. - * @param name The name of the folder. - * @returns an instance of OC_News_Folder - */ - public function populate($name, $id){ - $root = new OC_News_Folder($name, $id); - $stmt = OCP\DB::prepare('SELECT * - FROM ' . self::tableName . - ' WHERE user_id = ? AND parent_id = ?'); - $result = $stmt->execute(array($this->userid, $id)); - - while( $row = $result->fetchRow()){ - $child = OC_News_FolderMapper::populate($row['name'], $row['id']); - $root->addChild($child); - } - - $feedmapper = new OC_News_FeedMapper(); - $feeds = $feedmapper->findByFolderId($id); - foreach ($feeds as $feed){ - $root->addChild($feed); - } - - return $root; - } - - /** - * @brief Retrieve a folder from the database - * @param id The id of the folder in the database table. - * @returns an instance of OC_News_Folder - */ - public function find($id){ - $stmt = OCP\DB::prepare('SELECT * - FROM ' . self::tableName . - ' WHERE user_id = ? AND id = ?'); - $result = $stmt->execute(array($this->userid, $id)); - - $row = $result->fetchRow(); - $folder = new OC_News_Folder($row['name'], $row['id']); - - return $folder; - } - - /** - * @brief Retrieve a feed and all its items from the database - * @param id The id of the feed in the database table. - * @returns - */ - public function findWithItems($id){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?'); - $result = $stmt->execute(array($id)); - $row = $result->fetchRow(); - $url = $row['url']; - $title = $row['title']; - $feed = new OC_News_Feed($url, $title, null,$id); - - $itemMapper = new OC_News_ItemMapper($feed); - $items = $itemMapper->findAll(); - $feed->setItems($items); - - return $feed; - } - - /** - * @brief Store the folder and all its feeds into the database - * @param folder the folder to be saved - * @returns The id of the folder in the database table. - */ - public function save(OC_News_Folder $folder){ - $query = OCP\DB::prepare(' - INSERT INTO ' . self::tableName . - '(name, parent_id, user_id) - VALUES (?, ?, ?) - '); - - $name = $folder->getName(); - - if(empty($name)) { - $l = OC_L10N::get('news'); - $name = $l->t('no name'); - } - - $parentid = $folder->getParentId(); - - $params=array( - htmlspecialchars_decode($name), - $parentid, - $this->userid - ); - $query->execute($params); - $folderid = OCP\DB::insertid(self::tableName); - - $folder->setId($folderid); - return $folderid; - } - - public function delete(OC_News_Folder $folder){ - $folderid = $folder->getId(); - return deleteById(folderid); - } - - //TODO: replace it with a DELETE INNER JOIN operation - public function deleteById($folderid){ - if ($folderid == null){ - return false; - } - - $stmt = OCP\DB::prepare('DELETE FROM ' . self::tableName .' WHERE id = ?'); - - $result = $stmt->execute(array($folderid)); - - $feedMapper = new OC_News_FeedMapper(); - //TODO: handle the value that the execute returns - $feedMapper->deleteAll($folderid); - - return true; - } - -}
\ No newline at end of file diff --git a/apps/news/lib/item.php b/apps/news/lib/item.php deleted file mode 100644 index 64ae368c369..00000000000 --- a/apps/news/lib/item.php +++ /dev/null @@ -1,122 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -class StatusFlag{ - const Unread = 0x02; - const Important = 0x04; - const Deleted = 0x08; - const Updated = 0x16; -} - -/** - * This class models an item. - * - * It encapsulate a SimplePie_Item object and adds a status flag to it - */ -class OC_News_Item { - - private $url; - private $title; - private $guid; - private $body; - private $status; //a bit-field set with status flags - private $id; //id of the item in the database table - - public function __construct($url, $title, $guid, $body, $id = null){ - $this->title = $title; - $this->url = $url; - $this->guid = $guid; - $this->body = $body; - if ($id == null) { - $this->status |= StatusFlag::Unread; - } - else { - $this->id = $id; - } - } - - public function getGuid(){ - return $this->guid; - } - - public function setGuid($guid){ - $this->guid = $guid; - } - - public function getId(){ - return $this->id; - } - - public function setId($id){ - $this->id = $id; - } - - public function setRead(){ - $this->status &= ~StatusFlag::Unread; - } - - public function setUnread(){ - $this->status |= StatusFlag::Unread; - } - - public function isRead(){ - return !($this->status & StatusFlag::Unread); - } - - public function setImportant(){ - $this->status |= StatusFlag::Important; - } - - public function setUnimportant(){ - $this->status &= ~StatusFlag::Important; - } - - public function isImportant(){ - return ($this->status & StatusFlag::Important); - } - - /** - * NOTE: this is needed to store items in the database, otherwise - * the status of an item should be retrieved with methods: isRead(), isImportant(), ... - */ - public function getStatus(){ - return $this->status; - } - - public function setStatus($status){ - $this->status = $status; - } - - public function getTitle(){ - return $this->title; - } - - public function setTitle($title){ - $this->title = $title; - } - - public function getUrl(){ - return $this->url; - } - - public function setUrl($url){ - $this->url = $url; - } - - public function getBody(){ - return $this->body; - } - - public function setBody($body){ - $this->body = $body; - } -} diff --git a/apps/news/lib/itemmapper.php b/apps/news/lib/itemmapper.php deleted file mode 100644 index 8d6a755b161..00000000000 --- a/apps/news/lib/itemmapper.php +++ /dev/null @@ -1,171 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -/** - * This class maps an item to a row of the items table in the database. - * It follows the Data Mapper pattern (see http://martinfowler.com/eaaCatalog/dataMapper.html). - */ -class OC_News_ItemMapper { - - const tableName = '*PREFIX*news_items'; - - public function fromRow($row){ - $url = $row['url']; - $title = $row['title']; - $guid = $row['guid']; - $status = $row['status']; - $body = $row['body']; - $id = $row['id']; - $item = new OC_News_Item($url, $title, $guid, $body, $id); - $item->setStatus($status); - - return $item; - } - - /** - * @brief Retrieve all the item corresponding to a feed from the database - * @param feedid The id of the feed in the database table. - */ - public function findAll($feedid){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE feed_id = ?'); - $result = $stmt->execute(array($feedid)); - - $items = array(); - while ($row = $result->fetchRow()) { - $item = $this->fromRow($row); - $items[] = $item; - } - - return $items; - } - - public function findIdFromGuid($guid, $feedid){ - $stmt = OCP\DB::prepare(' - SELECT * FROM ' . self::tableName . ' - WHERE guid = ? - AND feed_id = ? - '); - $result = $stmt->execute(array($guid, $feedid)); - $row = $result->fetchRow(); - $id = null; - if ($row != null){ - $id = $row['id']; - } - return $id; - } - - /** - * @brief Update the item after its status has changed - * @returns The item whose status has changed. - */ - public function update(OC_News_Item $item){ - - $itemid = $item->getId(); - $status = $item->getStatus(); - - $stmt = OCP\DB::prepare(' - UPDATE ' . self::tableName . - ' SET status = ? - WHERE id = ? - '); - - $params=array( - $status, - $itemid - ); - $stmt->execute($params); - - return true; - } - - /** - * @brief Save the feed and all its items into the database - * @returns The id of the feed in the database table. - */ - public function save(OC_News_Item $item, $feedid){ - $guid = $item->getGuid(); - $status = $item->getStatus(); - - $itemid = $this->findIdFromGuid($guid, $feedid); - - if ($itemid == null){ - $title = $item->getTitle(); - $body = $item->getBody(); - - $stmt = OCP\DB::prepare(' - INSERT INTO ' . self::tableName . - '(url, title, body, guid, feed_id, status) - VALUES (?, ?, ?, ?, ?, ?) - '); - - if(empty($title)) { - $l = OC_L10N::get('news'); - $title = $l->t('no title'); - } - - if(empty($body)) { - $l = OC_L10N::get('news'); - $body = $l->t('no body'); - } - - $params=array( - htmlspecialchars_decode($item->getUrl()), - htmlspecialchars_decode($title), - $body, - $guid, - $feedid, - $status - ); - - $stmt->execute($params); - - $itemid = OCP\DB::insertid(self::tableName); - } - else { - $this->update($item); - } - $item->setId($itemid); - return $itemid; - } - - /** - * @brief Retrieve an item from the database - * @param id The id of the feed in the database table. - */ - public function find($id){ - $stmt = OCP\DB::prepare('SELECT * FROM ' . self::tableName . ' WHERE id = ?'); - $result = $stmt->execute(array($id)); - $row = $result->fetchRow(); - - $item = $this->fromRow($row); - - return $item; - - } - - - /** - * @brief Permanently delete all items belonging to a feed from the database - * @param feedid The id of the feed that we wish to delete - * @return - */ - public function deleteAll($feedid){ - if ($feedid == null) { - return false; - } - $stmt = OCP\DB::prepare('DELETE FROM ' . self::tableName .' WHERE feed_id = ?'); - - $result = $stmt->execute(array($feedid)); - - return $result; - } -}
\ No newline at end of file diff --git a/apps/news/lib/utils.php b/apps/news/lib/utils.php deleted file mode 100644 index e18ce2969e0..00000000000 --- a/apps/news/lib/utils.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php -/** -* ownCloud - News app -* -* @author Alessandro Cosentino -* Copyright (c) 2012 - Alessandro Cosentino <cosenal@gmail.com> -* -* This file is licensed under the Affero General Public License version 3 or later. -* See the COPYING-README file -* -*/ - -// load SimplePie library -//TODO: is this file a suitable place for the following require? -require_once('news/3rdparty/SimplePie/SimplePieAutoloader.php'); - -class OC_News_Utils { - - /** - * @brief Fetch a feed from remote - * @param url remote url of the feed - * @returns - */ - public static function fetch($url){ - //TODO: handle the case where fetching of the feed fails - $spfeed = new SimplePie_Core(); - $spfeed->set_feed_url( $url ); - $spfeed->enable_cache( false ); - $spfeed->init(); - $spfeed->handle_content_type(); - $title = $spfeed->get_title(); - - $spitems = $spfeed->get_items(); - $items = array(); - foreach($spitems as $spitem) { //FIXME: maybe we can avoid this loop - $itemUrl = $spitem->get_permalink(); - $itemTitle = $spitem->get_title(); - $itemGUID = $spitem->get_id(); - $itemBody = $spitem->get_content(); - $items[] = new OC_News_Item($itemUrl, $itemTitle, $itemGUID, $itemBody); - } - - $feed = new OC_News_Feed($url, $title, $items); - return $feed; - } -}
\ No newline at end of file diff --git a/apps/news/settings.php b/apps/news/settings.php deleted file mode 100644 index 94d05735891..00000000000 --- a/apps/news/settings.php +++ /dev/null @@ -1,8 +0,0 @@ -<?php - -//OCP\Util::addscript( "news", "admin" ); - -$tmpl = new OCP\Template( 'news', 'settings'); - -return $tmpl->fetchPage(); - diff --git a/apps/news/templates/main.php b/apps/news/templates/main.php deleted file mode 100644 index 6ab1bc64ea9..00000000000 --- a/apps/news/templates/main.php +++ /dev/null @@ -1,36 +0,0 @@ -<div id="leftcontent" class="leftcontent"> - <ul id="feeds"> - <?php echo $this->inc("part.feeds"); ?> - </ul> -</div> - -<ul class="menu" id="feedfoldermenu"> - <li class="menuItem" id="addfeed"><?php echo $l->t('Feed'); ?></li> - <li class="menuItem" id="addfolder"><?php echo $l->t('Folder'); ?></li> -</ul> - -<div id="bottomcontrols"> - <ul class="controls"> - <li> - <button class="svg" id="addfeedfolder" title="<?php echo $l->t('Add Feed/Folder'); ?>" onclick="News.DropDownMenu.fade('ul#feedfoldermenu')"><img class="svg" src="<?php echo OCP\Util::linkTo('news', 'img/add.svg'); ?>" alt="<?php echo $l->t('Add Feed/Folder'); ?>" /></button> - </li> - <li><button class="svg" title="<?php echo $l->t('Change View'); ?>">Eye</button></li> - <li><button class="svg" title="<?php echo $l->t('Settings'); ?>">Settings</button></li> - <ul> -</div> - -<div id="rightcontent" class="rightcontent" data-id="<?php echo $_['feedid']; ?>"> - <?php - if ($_['feedid']){ - echo $this->inc("part.items"); - } - else { - echo $this->inc("part.nofeeds"); - } - ?> -</div> - -<!-- Dialogs --> -<div id="dialog_holder"></div> -<!-- End of Dialogs --> - diff --git a/apps/news/templates/part.addfeed.php b/apps/news/templates/part.addfeed.php deleted file mode 100644 index 6807f3c5b35..00000000000 --- a/apps/news/templates/part.addfeed.php +++ /dev/null @@ -1,22 +0,0 @@ - -<div id="addfeed_dialog" title="<?php echo $l->t("Add Feed"); ?>"> -<table width="100%" style="border: 0;"> -<tr> - <td>Add new feed</td> - <td> - <div class="add_parentfolder"> - <button id="dropdownBtn" onclick="News.DropDownMenu.dropdown(this)"> - <?php echo $l->t('EVERYTHING'); ?> - </button> - <input id="inputfolderid" type="hidden" name="folderid" value="0" /> - <ul class="menu" id="dropdownmenu"> - <?php echo $this->inc("part.folderlist"); ?> - </ul> - </div> - </td> -</tr> -<tr> - <td><input type="text" id="feed_add_url" placeholder="<?php echo $l->t('URL'); ?>" class="news_input" /></td> - <td><input type="submit" value="<?php echo $l->t('Add feed'); ?>" onclick="News.Feed.submit(this)" id="feed_add_submit" /></td> -</tr> -</table>
\ No newline at end of file diff --git a/apps/news/templates/part.addfolder.php b/apps/news/templates/part.addfolder.php deleted file mode 100644 index e1217160cee..00000000000 --- a/apps/news/templates/part.addfolder.php +++ /dev/null @@ -1,22 +0,0 @@ - -<div id="addfolder_dialog" title="<?php echo $l->t("Add Folder"); ?>"> -<table width="100%" style="border: 0;"> -<tr> - <td>Add new folder</td> - <td> - <div class="add_parentfolder"> - <button id="dropdownBtn" onclick="News.DropDownMenu.dropdown(this)"> - <?php echo $l->t('EVERYTHING'); ?> - </button> - <input id="inputfolderid" type="hidden" name="folderid" value="0" /> - <ul class="menu" id="dropdownmenu"> - <?php echo $this->inc("part.folderlist"); ?> - </ul> - </div> - </td> -</tr> -<tr> - <td><input type="text" id="folder_add_name" placeholder="<?php echo $l->t('Folder name'); ?>" class="news_input" /></td> - <td><input type="submit" value="<?php echo $l->t('Add folder'); ?>" onclick="News.Folder.submit(this)" id="folder_add_submit" /></td> -</tr> -</table>
\ No newline at end of file diff --git a/apps/news/templates/part.feeds.php b/apps/news/templates/part.feeds.php deleted file mode 100644 index 587e73f366a..00000000000 --- a/apps/news/templates/part.feeds.php +++ /dev/null @@ -1,31 +0,0 @@ -<?php - function print_folder(OC_News_Folder $folder, $depth){ - $l = new OC_l10n('news'); - - echo '<ul style="margin-left:' . 10*$depth . 'px;"> <li class="folder_list" >' . - '<div class="collapsable" >' . strtoupper($folder->getName()) . - ( ($depth != 0) ? '<button class="svg action" id="feeds_delete" onClick="(News.Folder.delete(' . $folder->getId(). '))" title="' . $l->t('Delete folder') . '"></button>' . - '<button class="svg action" id="feeds_edit" title="' . $l->t('Rename folder') . '"></button>': '' ) . - '</div>'; - echo '<ul>'; - $children = $folder->getChildren(); - foreach($children as $child) { - if ($child instanceOf OC_News_Folder){ - print_folder($child, $depth+1); - } - elseif ($child instanceOf OC_News_Feed) { //onhover $(element).attr('id', 'newID'); - - echo '<li class="feeds_list" data-id="' . $child->getId() . '"><a href="' . OCP\Util::linkTo('news', 'index.php'). '?feedid=' . $child->getId() . '">' . $child->getTitle() .'</a>'; - echo '<button class="svg action" id="feeds_delete" onClick="(News.Feed.delete(' . $child->getId(). '))" title="' . $l->t('Delete feed') . '"></button>'; - echo '<button class="svg action" id="feeds_edit" title="' . $l->t('Edit feed') . '"></button>'; - echo '</li>'; - } - else { - //TODO:handle error in this case - } - } - echo '</ul></li></ul>'; - } - - print_folder($_['allfeeds'], 0); -?>
\ No newline at end of file diff --git a/apps/news/templates/part.folderlist.php b/apps/news/templates/part.folderlist.php deleted file mode 100644 index 670684fd4c9..00000000000 --- a/apps/news/templates/part.folderlist.php +++ /dev/null @@ -1,12 +0,0 @@ -<?php - function print_folder(OC_News_Folder $folder, $depth){ - echo '<li class="menuItem" onclick="News.DropDownMenu.selectItem(this, ' . $folder->getId() . ')">' . strtoupper($folder->getName()) . '</li>'; - $children = $folder->getChildren(); - foreach($children as $child) { - if ($child instanceOf OC_News_Folder){ - print_folder($child, $depth+1); - } - } - } - print_folder($_['allfeeds'], 0); -?>
\ No newline at end of file diff --git a/apps/news/templates/part.items.php b/apps/news/templates/part.items.php deleted file mode 100644 index 24ca958e98b..00000000000 --- a/apps/news/templates/part.items.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php - -$feedid = isset($_['feedid']) ? $_['feedid'] : ''; - -$itemmapper = new OC_News_ItemMapper(); - -$items = $itemmapper->findAll($feedid); - -echo '<ul class="accordion">'; -foreach($items as $item) { - $title = $item->getTitle(); - echo '<li>'; - echo '<div data-id="' . $item->getId() . '"'; - if ($item->isRead()) { - echo ' class="title_read">'; - } - else { - echo ' class="title_unread" onClick="News.Feed.markItem(' . $item->getId() . ')">'; - } - echo $title . '</div><div class="body">' . $item->getBody() . '</div>'; - echo '</li>'; -} -echo '</ul>'; diff --git a/apps/news/templates/part.nofeeds.php b/apps/news/templates/part.nofeeds.php deleted file mode 100644 index bb78dedbf89..00000000000 --- a/apps/news/templates/part.nofeeds.php +++ /dev/null @@ -1,3 +0,0 @@ -<div id="firstrun"> - <?php echo $l->t('You have no feeds in your reader.') ?> -</div>
\ No newline at end of file diff --git a/apps/news/templates/settings.php b/apps/news/templates/settings.php deleted file mode 100644 index ccbb004f001..00000000000 --- a/apps/news/templates/settings.php +++ /dev/null @@ -1,8 +0,0 @@ -<form id="news"> - <fieldset class="personalblock"> - <strong>News</strong><br /> - <input type="text" name="opml_file" id="opml_file" placeholder="<?php echo $l->t('.opml file');?>" /> - <br /> - - </fieldset> -</form> diff --git a/apps/news/templates/test.php b/apps/news/templates/test.php deleted file mode 100644 index d8e31e67590..00000000000 --- a/apps/news/templates/test.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php - -$feedmapper = new OC_News_FeedMapper(); -$foldermapper = new OC_News_FolderMapper(); -$itemmapper = new OC_News_ItemMapper(); - -$folder = new OC_News_Folder( 'Friends' ); -$folderid = $foldermapper->save($folder); - -$feed = OC_News_Utils::fetch( 'http://www.dabacon.org/newpontiff/?feed=rss2' ); - -$feedmapper->save($feed, $folder->getId()); - -$feed = $feedmapper->findWithItems($feed->getId()); -echo '<br>' . $feed->getTitle() . '<br>'; -$items = $feed->getItems(); - -foreach($items as $item) { - - echo $item->getTitle() . ' - '; - if ($item->isRead()) { - echo $l->t('Read'); - } - else { - echo $l->t('Unread'); - } - echo ' - '; - if ($item->isImportant()) { - echo $l->t('Important'); - } - else { - echo $l->t('Not important'); - } - echo '<br>'; - $item->setImportant(); -} - -echo '<br>...after changing status'; -echo '<br>' . $feed->getTitle() . '<br>'; - -foreach($items as $item) { - echo $item->getTitle() . ' - '; - if ($item->isRead()) { - echo $l->t('Read'); - } - else { - echo $l->t('Unread'); - } - echo ' - '; - if ($item->isImportant()) { - echo $l->t('Important'); - } - else { - echo $l->t('Not important'); - } - echo '<br>'; - $item->setUnimportant(); -} - -$feedmapper->save($feed, $folder->getId()); - -echo '<br>...after saving and reloading'; - -$feed = $feedmapper->findWithItems($feed->getId()); -echo '<br>' . $feed->getTitle() . '<br>'; -$items = $feed->getItems(); - -foreach($items as &$item) { - - echo $item->getTitle() . ' - '; - if ($item->isRead()) { - echo $l->t('Read'); - } - else { - echo $l->t('Unread'); - } - echo ' - '; - if ($item->isImportant()) { - echo $l->t('Important'); - } - else { - echo $l->t('Not important'); - } - echo '<br>'; -}
\ No newline at end of file diff --git a/apps/shorty/.htaccess b/apps/shorty/.htaccess deleted file mode 100644 index b7c4189ae49..00000000000 --- a/apps/shorty/.htaccess +++ /dev/null @@ -1,45 +0,0 @@ -# -# @package shorty an ownCloud url shortener plugin -# @category internet -# @author Christian Reiner -# @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -# @license GNU Affero General Public license (AGPL) -# @link information -# @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -# -# This library is free software; you can redistribute it and/or -# modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -# License as published by the Free Software Foundation; either -# version 3 of the license, or any later version. -# -# This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -# -# You should have received a copy of the GNU Affero General Public -# License along with this library. -# If not, see <http://www.gnu.org/licenses/>. -# - -# @file .htaccess -# These rules try to detect any requests that carry a "shorty id" and map them to forward.php?<shorty id> -# That way you can use shorter (or more simple) urls to publish or relay links -# @author Christian Reiner - -RewriteEngine On - -# example: http://.../apps/shorty/index.php/0123456789 -RewriteRule index\.php/([a-z0-9]{4,12})$ ../../public.php?service=shorty_relay&id=$1 [NC,L] - -# example: http://.../apps/shorty/index.php?0123456789 -RewriteCond %{QUERY_STRING} ^([a-z0-9]{4,12})$ [NC] -RewriteRule index\.php ../../public.php?service=shorty_relay&id=%{QUERY_STRING} [L] - -# example: http://.../apps/shorty/?0123456789 -RewriteCond %{QUERY_STRING} ^([a-z0-9]{4,12})$ [NC] -RewriteCond %{REQUEST_URI} meta/.+\.php -RewriteRule - ../../public.php?service=shorty_relay&id=%{QUERY_STRING} [L] - -# example: http://.../apps/shorty/0123456789 -RewriteRule ^([a-z0-9]{4,12})$ ../../public.php?service=shorty_relay&id=$1 [NC,L] diff --git a/apps/shorty/3rdparty/js/jquery.tinysort.min.js b/apps/shorty/3rdparty/js/jquery.tinysort.min.js deleted file mode 100644 index 225f799ca9d..00000000000 --- a/apps/shorty/3rdparty/js/jquery.tinysort.min.js +++ /dev/null @@ -1 +0,0 @@ -(function(b){var o=!1,d=null,u=parseFloat,j=String.fromCharCode,q=Math.min,l=/(\d+\.?\d*)$/g,g,a=[],h,m,t=9472,f={},c;for(var p=32,k=j(p),r=255;p<r;p++,k=j(p).toLowerCase()){if(!~a.indexOf(k)){a.push(k)}}a.sort();b.tinysort={id:"TinySort",version:"1.3.20",copyright:"Copyright (c) 2008-2012 Ron Valstar",uri:"http://tinysort.sjeiti.com/",licenced:{MIT:"http://www.opensource.org/licenses/mit-license.php",GPL:"http://www.gnu.org/licenses/gpl.html"},defaults:{order:"asc",attr:d,data:d,useVal:o,place:"start",returns:o,cases:o,forceStrings:o,sortFunction:d,charOrder:g}};b.fn.extend({tinysort:function(V,L){if(V&&typeof(V)!="string"){L=V;V=d}var T=b.extend({},b.tinysort.defaults,L),v,Q=this,z=b(this).length,ae={},W=!(!V||V==""),H=!(T.attr===d||T.attr==""),ah=T.data!==d,J=W&&V[0]==":",C=J?Q.filter(V):Q,F=T.sortFunction,s=T.order=="asc"?1:-1,P=[];if(T.charOrder!=g){g=T.charOrder;if(!T.charOrder){m=false;t=9472;f={};c=h=d}else{h=a.slice(0);m=false;for(var S=[],B=function(i,ai){S.push(ai);f[T.cases?i:i.toLowerCase()]=ai},N="",X="z",aa=g.length,ac,Z,ad=0;ad<aa;ad++){var x=g[ad],ab=x.charCodeAt(),I=ab>96&&ab<123;if(!I){if(x=="["){var D=S.length,M=D?S[D-1]:X,w=g.substr(ad+1).match(/[^\]]*/)[0],R=w.match(/{[^}]*}/g);if(R){for(ac=0,Z=R.length;ac<Z;ac++){var O=R[ac];ad+=O.length;w=w.replace(O,"");B(O.replace(/[{}]/g,""),M);m=true}}for(ac=0,Z=w.length;ac<Z;ac++){B(M,w[ac])}ad+=w.length+1}else{if(x=="{"){var G=g.substr(ad+1).match(/[^}]*/)[0];B(G,j(t++));ad+=G.length+1;m=true}else{S.push(x)}}}if(S.length&&(I||ad===aa-1)){var E=S.join("");N+=E;b.each(E,function(i,ai){h.splice(h.indexOf(ai),1)});var A=S.slice(0);A.splice(0,0,h.indexOf(X)+1,0);Array.prototype.splice.apply(h,A);S.length=0}if(ad+1===aa){c=new RegExp("["+N+"]","gi")}else{if(I){X=x}}}}}if(!F){F=T.order=="rand"?function(){return Math.random()<0.5?1:-1}:function(av,at){var au=o,am=!T.cases?n(av.s):av.s,ak=!T.cases?n(at.s):at.s;if(!T.forceStrings){var aj=am&&am.match(l),aw=ak&&ak.match(l);if(aj&&aw){var ar=am.substr(0,am.length-aj[0].length),aq=ak.substr(0,ak.length-aw[0].length);if(ar==aq){au=!o;am=u(aj[0]);ak=u(aw[0])}}}var ai=s*(am<ak?-1:(am>ak?1:0));if(!au&&T.charOrder){if(m){for(var ax in f){var al=f[ax];am=am.replace(ax,al);ak=ak.replace(ax,al)}}if(am.match(c)!==d||ak.match(c)!==d){for(var ap=0,ao=q(am.length,ak.length);ap<ao;ap++){var an=h.indexOf(am[ap]),i=h.indexOf(ak[ap]);if(ai=s*(an<i?-1:(an>i?1:0))){break}}}}return ai}}Q.each(function(ak,al){var am=b(al),ai=W?(J?C.filter(al):am.find(V)):am,an=ah?ai.data(T.data):(H?ai.attr(T.attr):(T.useVal?ai.val():ai.text())),aj=am.parent();if(!ae[aj]){ae[aj]={s:[],n:[]}}if(ai.length>0){ae[aj].s.push({s:an,e:am,n:ak})}else{ae[aj].n.push({e:am,n:ak})}});for(v in ae){ae[v].s.sort(F)}for(v in ae){var ag=ae[v],K=[],Y=z,af=[0,0],ad;switch(T.place){case"first":b.each(ag.s,function(ai,aj){Y=q(Y,aj.n)});break;case"org":b.each(ag.s,function(ai,aj){K.push(aj.n)});break;case"end":Y=ag.n.length;break;default:Y=0}for(ad=0;ad<z;ad++){var y=e(K,ad)?!o:ad>=Y&&ad<Y+ag.s.length,U=(y?ag.s:ag.n)[af[y?0:1]].e;U.parent().append(U);if(y||!T.returns){P.push(U.get(0))}af[y?0:1]++}}Q.length=0;Array.prototype.push.apply(Q,P);return Q}});function n(i){return i&&i.toLowerCase?i.toLowerCase():i}function e(v,x){for(var w=0,s=v.length;w<s;w++){if(v[w]==x){return !o}}return o}b.fn.TinySort=b.fn.Tinysort=b.fn.tsort=b.fn.tinysort})(jQuery);
\ No newline at end of file diff --git a/apps/shorty/3rdparty/php/phpqrcode.php b/apps/shorty/3rdparty/php/phpqrcode.php deleted file mode 100644 index 80adb9df239..00000000000 --- a/apps/shorty/3rdparty/php/phpqrcode.php +++ /dev/null @@ -1,3312 +0,0 @@ -<?php
-
-/*
- * PHP QR Code encoder
- *
- * This file contains MERGED version of PHP QR Code library.
- * It was auto-generated from full version for your convenience.
- *
- * This merged version was configured to not requre any external files,
- * with disabled cache, error loging and weker but faster mask matching.
- * If you need tune it up please use non-merged version.
- *
- * For full version, documentation, examples of use please visit:
- *
- * http://phpqrcode.sourceforge.net/
- * https://sourceforge.net/projects/phpqrcode/
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- - -/* - * Version: 1.1.4 - * Build: 2010100721 - */ - - - -//---- qrconst.php ----------------------------- - - - -
-
-/*
- * PHP QR Code encoder
- *
- * Common constants
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- // Encoding modes
-
- define('QR_MODE_NUL', -1);
- define('QR_MODE_NUM', 0);
- define('QR_MODE_AN', 1);
- define('QR_MODE_8', 2);
- define('QR_MODE_KANJI', 3);
- define('QR_MODE_STRUCTURE', 4);
-
- // Levels of error correction.
-
- define('QR_ECLEVEL_L', 0);
- define('QR_ECLEVEL_M', 1);
- define('QR_ECLEVEL_Q', 2);
- define('QR_ECLEVEL_H', 3);
-
- // Supported output formats
-
- define('QR_FORMAT_TEXT', 0);
- define('QR_FORMAT_PNG', 1);
-
- class qrstr {
- public static function set(&$srctab, $x, $y, $repl, $replLen = false) {
- $srctab[$y] = substr_replace($srctab[$y], ($replLen !== false)?substr($repl,0,$replLen):$repl, $x, ($replLen !== false)?$replLen:strlen($repl));
- }
- } - - - -//---- merged_config.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Config file, tuned-up for merged verion
- */
-
- define('QR_CACHEABLE', false); // use cache - more disk reads but less CPU power, masks and format templates are stored there
- define('QR_CACHE_DIR', false); // used when QR_CACHEABLE === true
- define('QR_LOG_DIR', false); // default error logs dir
-
- define('QR_FIND_BEST_MASK', true); // if true, estimates best mask (spec. default, but extremally slow; set to false to significant performance boost but (propably) worst quality code
- define('QR_FIND_FROM_RANDOM', 2); // if false, checks all masks available, otherwise value tells count of masks need to be checked, mask id are got randomly
- define('QR_DEFAULT_MASK', 2); // when QR_FIND_BEST_MASK === false
-
- define('QR_PNG_MAXIMUM_SIZE', 1024); // maximum allowed png image width (in pixels), tune to make sure GD and PHP can handle such big images
- - - - -//---- qrtools.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Toolset, handy and debug utilites.
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- class QRtools {
-
- //----------------------------------------------------------------------
- public static function binarize($frame)
- {
- $len = count($frame);
- foreach ($frame as &$frameLine) {
-
- for($i=0; $i<$len; $i++) {
- $frameLine[$i] = (ord($frameLine[$i])&1)?'1':'0';
- }
- }
-
- return $frame;
- }
-
- //----------------------------------------------------------------------
- public static function tcpdfBarcodeArray($code, $mode = 'QR,L', $tcPdfVersion = '4.5.037')
- {
- $barcode_array = array();
-
- if (!is_array($mode))
- $mode = explode(',', $mode);
-
- $eccLevel = 'L';
-
- if (count($mode) > 1) {
- $eccLevel = $mode[1];
- }
-
- $qrTab = QRcode::text($code, false, $eccLevel);
- $size = count($qrTab);
-
- $barcode_array['num_rows'] = $size;
- $barcode_array['num_cols'] = $size;
- $barcode_array['bcode'] = array();
-
- foreach ($qrTab as $line) {
- $arrAdd = array();
- foreach(str_split($line) as $char)
- $arrAdd[] = ($char=='1')?1:0;
- $barcode_array['bcode'][] = $arrAdd;
- }
-
- return $barcode_array;
- }
-
- //----------------------------------------------------------------------
- public static function clearCache()
- {
- self::$frames = array();
- }
-
- //----------------------------------------------------------------------
- public static function buildCache()
- {
- QRtools::markTime('before_build_cache');
-
- $mask = new QRmask();
- for ($a=1; $a <= QRSPEC_VERSION_MAX; $a++) {
- $frame = QRspec::newFrame($a);
- if (QR_IMAGE) {
- $fileName = QR_CACHE_DIR.'frame_'.$a.'.png';
- QRimage::png(self::binarize($frame), $fileName, 1, 0);
- }
-
- $width = count($frame);
- $bitMask = array_fill(0, $width, array_fill(0, $width, 0));
- for ($maskNo=0; $maskNo<8; $maskNo++)
- $mask->makeMaskNo($maskNo, $width, $frame, $bitMask, true);
- }
-
- QRtools::markTime('after_build_cache');
- }
-
- //----------------------------------------------------------------------
- public static function log($outfile, $err)
- {
- if (QR_LOG_DIR !== false) {
- if ($err != '') {
- if ($outfile !== false) {
- file_put_contents(QR_LOG_DIR.basename($outfile).'-errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
- } else {
- file_put_contents(QR_LOG_DIR.'errors.txt', date('Y-m-d H:i:s').': '.$err, FILE_APPEND);
- }
- }
- }
- }
-
- //----------------------------------------------------------------------
- public static function dumpMask($frame)
- {
- $width = count($frame);
- for($y=0;$y<$width;$y++) {
- for($x=0;$x<$width;$x++) {
- echo ord($frame[$y][$x]).',';
- }
- }
- }
-
- //----------------------------------------------------------------------
- public static function markTime($markerId)
- {
- list($usec, $sec) = explode(" ", microtime());
- $time = ((float)$usec + (float)$sec);
-
- if (!isset($GLOBALS['qr_time_bench']))
- $GLOBALS['qr_time_bench'] = array();
-
- $GLOBALS['qr_time_bench'][$markerId] = $time;
- }
-
- //----------------------------------------------------------------------
- public static function timeBenchmark()
- {
- self::markTime('finish');
-
- $lastTime = 0;
- $startTime = 0;
- $p = 0;
-
- echo '<table cellpadding="3" cellspacing="1">
- <thead><tr style="border-bottom:1px solid silver"><td colspan="2" style="text-align:center">BENCHMARK</td></tr></thead>
- <tbody>';
-
- foreach($GLOBALS['qr_time_bench'] as $markerId=>$thisTime) {
- if ($p > 0) {
- echo '<tr><th style="text-align:right">till '.$markerId.': </th><td>'.number_format($thisTime-$lastTime, 6).'s</td></tr>';
- } else {
- $startTime = $thisTime;
- }
-
- $p++;
- $lastTime = $thisTime;
- }
-
- echo '</tbody><tfoot>
- <tr style="border-top:2px solid black"><th style="text-align:right">TOTAL: </th><td>'.number_format($lastTime-$startTime, 6).'s</td></tr>
- </tfoot>
- </table>';
- }
-
- }
-
- //##########################################################################
-
- QRtools::markTime('start');
- - - - -//---- qrspec.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * QR Code specifications
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * The following data / specifications are taken from
- * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004)
- * or
- * "Automatic identification and data capture techniques --
- * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- define('QRSPEC_VERSION_MAX', 40);
- define('QRSPEC_WIDTH_MAX', 177);
-
- define('QRCAP_WIDTH', 0);
- define('QRCAP_WORDS', 1);
- define('QRCAP_REMINDER', 2);
- define('QRCAP_EC', 3);
-
- class QRspec {
-
- public static $capacity = array(
- array( 0, 0, 0, array( 0, 0, 0, 0)),
- array( 21, 26, 0, array( 7, 10, 13, 17)), // 1
- array( 25, 44, 7, array( 10, 16, 22, 28)),
- array( 29, 70, 7, array( 15, 26, 36, 44)),
- array( 33, 100, 7, array( 20, 36, 52, 64)),
- array( 37, 134, 7, array( 26, 48, 72, 88)), // 5
- array( 41, 172, 7, array( 36, 64, 96, 112)),
- array( 45, 196, 0, array( 40, 72, 108, 130)),
- array( 49, 242, 0, array( 48, 88, 132, 156)),
- array( 53, 292, 0, array( 60, 110, 160, 192)),
- array( 57, 346, 0, array( 72, 130, 192, 224)), //10
- array( 61, 404, 0, array( 80, 150, 224, 264)),
- array( 65, 466, 0, array( 96, 176, 260, 308)),
- array( 69, 532, 0, array( 104, 198, 288, 352)),
- array( 73, 581, 3, array( 120, 216, 320, 384)),
- array( 77, 655, 3, array( 132, 240, 360, 432)), //15
- array( 81, 733, 3, array( 144, 280, 408, 480)),
- array( 85, 815, 3, array( 168, 308, 448, 532)),
- array( 89, 901, 3, array( 180, 338, 504, 588)),
- array( 93, 991, 3, array( 196, 364, 546, 650)),
- array( 97, 1085, 3, array( 224, 416, 600, 700)), //20
- array(101, 1156, 4, array( 224, 442, 644, 750)),
- array(105, 1258, 4, array( 252, 476, 690, 816)),
- array(109, 1364, 4, array( 270, 504, 750, 900)),
- array(113, 1474, 4, array( 300, 560, 810, 960)),
- array(117, 1588, 4, array( 312, 588, 870, 1050)), //25
- array(121, 1706, 4, array( 336, 644, 952, 1110)),
- array(125, 1828, 4, array( 360, 700, 1020, 1200)),
- array(129, 1921, 3, array( 390, 728, 1050, 1260)),
- array(133, 2051, 3, array( 420, 784, 1140, 1350)),
- array(137, 2185, 3, array( 450, 812, 1200, 1440)), //30
- array(141, 2323, 3, array( 480, 868, 1290, 1530)),
- array(145, 2465, 3, array( 510, 924, 1350, 1620)),
- array(149, 2611, 3, array( 540, 980, 1440, 1710)),
- array(153, 2761, 3, array( 570, 1036, 1530, 1800)),
- array(157, 2876, 0, array( 570, 1064, 1590, 1890)), //35
- array(161, 3034, 0, array( 600, 1120, 1680, 1980)),
- array(165, 3196, 0, array( 630, 1204, 1770, 2100)),
- array(169, 3362, 0, array( 660, 1260, 1860, 2220)),
- array(173, 3532, 0, array( 720, 1316, 1950, 2310)),
- array(177, 3706, 0, array( 750, 1372, 2040, 2430)) //40
- );
-
- //----------------------------------------------------------------------
- public static function getDataLength($version, $level)
- {
- return self::$capacity[$version][QRCAP_WORDS] - self::$capacity[$version][QRCAP_EC][$level];
- }
-
- //----------------------------------------------------------------------
- public static function getECCLength($version, $level)
- {
- return self::$capacity[$version][QRCAP_EC][$level];
- }
-
- //----------------------------------------------------------------------
- public static function getWidth($version)
- {
- return self::$capacity[$version][QRCAP_WIDTH];
- }
-
- //----------------------------------------------------------------------
- public static function getRemainder($version)
- {
- return self::$capacity[$version][QRCAP_REMINDER];
- }
-
- //----------------------------------------------------------------------
- public static function getMinimumVersion($size, $level)
- {
-
- for($i=1; $i<= QRSPEC_VERSION_MAX; $i++) {
- $words = self::$capacity[$i][QRCAP_WORDS] - self::$capacity[$i][QRCAP_EC][$level];
- if($words >= $size)
- return $i;
- }
-
- return -1;
- }
-
- //######################################################################
-
- public static $lengthTableBits = array(
- array(10, 12, 14),
- array( 9, 11, 13),
- array( 8, 16, 16),
- array( 8, 10, 12)
- );
-
- //----------------------------------------------------------------------
- public static function lengthIndicator($mode, $version)
- {
- if ($mode == QR_MODE_STRUCTURE)
- return 0;
-
- if ($version <= 9) {
- $l = 0;
- } else if ($version <= 26) {
- $l = 1;
- } else {
- $l = 2;
- }
-
- return self::$lengthTableBits[$mode][$l];
- }
-
- //----------------------------------------------------------------------
- public static function maximumWords($mode, $version)
- {
- if($mode == QR_MODE_STRUCTURE)
- return 3;
-
- if($version <= 9) {
- $l = 0;
- } else if($version <= 26) {
- $l = 1;
- } else {
- $l = 2;
- }
-
- $bits = self::$lengthTableBits[$mode][$l];
- $words = (1 << $bits) - 1;
-
- if($mode == QR_MODE_KANJI) {
- $words *= 2; // the number of bytes is required
- }
-
- return $words;
- }
-
- // Error correction code -----------------------------------------------
- // Table of the error correction code (Reed-Solomon block)
- // See Table 12-16 (pp.30-36), JIS X0510:2004.
-
- public static $eccTable = array(
- array(array( 0, 0), array( 0, 0), array( 0, 0), array( 0, 0)),
- array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)), // 1
- array(array( 1, 0), array( 1, 0), array( 1, 0), array( 1, 0)),
- array(array( 1, 0), array( 1, 0), array( 2, 0), array( 2, 0)),
- array(array( 1, 0), array( 2, 0), array( 2, 0), array( 4, 0)),
- array(array( 1, 0), array( 2, 0), array( 2, 2), array( 2, 2)), // 5
- array(array( 2, 0), array( 4, 0), array( 4, 0), array( 4, 0)),
- array(array( 2, 0), array( 4, 0), array( 2, 4), array( 4, 1)),
- array(array( 2, 0), array( 2, 2), array( 4, 2), array( 4, 2)),
- array(array( 2, 0), array( 3, 2), array( 4, 4), array( 4, 4)),
- array(array( 2, 2), array( 4, 1), array( 6, 2), array( 6, 2)), //10
- array(array( 4, 0), array( 1, 4), array( 4, 4), array( 3, 8)),
- array(array( 2, 2), array( 6, 2), array( 4, 6), array( 7, 4)),
- array(array( 4, 0), array( 8, 1), array( 8, 4), array(12, 4)),
- array(array( 3, 1), array( 4, 5), array(11, 5), array(11, 5)),
- array(array( 5, 1), array( 5, 5), array( 5, 7), array(11, 7)), //15
- array(array( 5, 1), array( 7, 3), array(15, 2), array( 3, 13)),
- array(array( 1, 5), array(10, 1), array( 1, 15), array( 2, 17)),
- array(array( 5, 1), array( 9, 4), array(17, 1), array( 2, 19)),
- array(array( 3, 4), array( 3, 11), array(17, 4), array( 9, 16)),
- array(array( 3, 5), array( 3, 13), array(15, 5), array(15, 10)), //20
- array(array( 4, 4), array(17, 0), array(17, 6), array(19, 6)),
- array(array( 2, 7), array(17, 0), array( 7, 16), array(34, 0)),
- array(array( 4, 5), array( 4, 14), array(11, 14), array(16, 14)),
- array(array( 6, 4), array( 6, 14), array(11, 16), array(30, 2)),
- array(array( 8, 4), array( 8, 13), array( 7, 22), array(22, 13)), //25
- array(array(10, 2), array(19, 4), array(28, 6), array(33, 4)),
- array(array( 8, 4), array(22, 3), array( 8, 26), array(12, 28)),
- array(array( 3, 10), array( 3, 23), array( 4, 31), array(11, 31)),
- array(array( 7, 7), array(21, 7), array( 1, 37), array(19, 26)),
- array(array( 5, 10), array(19, 10), array(15, 25), array(23, 25)), //30
- array(array(13, 3), array( 2, 29), array(42, 1), array(23, 28)),
- array(array(17, 0), array(10, 23), array(10, 35), array(19, 35)),
- array(array(17, 1), array(14, 21), array(29, 19), array(11, 46)),
- array(array(13, 6), array(14, 23), array(44, 7), array(59, 1)),
- array(array(12, 7), array(12, 26), array(39, 14), array(22, 41)), //35
- array(array( 6, 14), array( 6, 34), array(46, 10), array( 2, 64)),
- array(array(17, 4), array(29, 14), array(49, 10), array(24, 46)),
- array(array( 4, 18), array(13, 32), array(48, 14), array(42, 32)),
- array(array(20, 4), array(40, 7), array(43, 22), array(10, 67)),
- array(array(19, 6), array(18, 31), array(34, 34), array(20, 61)),//40
- );
-
- //----------------------------------------------------------------------
- // CACHEABLE!!!
-
- public static function getEccSpec($version, $level, array &$spec)
- {
- if (count($spec) < 5) {
- $spec = array(0,0,0,0,0);
- }
-
- $b1 = self::$eccTable[$version][$level][0];
- $b2 = self::$eccTable[$version][$level][1];
- $data = self::getDataLength($version, $level);
- $ecc = self::getECCLength($version, $level);
-
- if($b2 == 0) {
- $spec[0] = $b1;
- $spec[1] = (int)($data / $b1);
- $spec[2] = (int)($ecc / $b1);
- $spec[3] = 0;
- $spec[4] = 0;
- } else {
- $spec[0] = $b1;
- $spec[1] = (int)($data / ($b1 + $b2));
- $spec[2] = (int)($ecc / ($b1 + $b2));
- $spec[3] = $b2;
- $spec[4] = $spec[1] + 1;
- }
- }
-
- // Alignment pattern ---------------------------------------------------
-
- // Positions of alignment patterns.
- // This array includes only the second and the third position of the
- // alignment patterns. Rest of them can be calculated from the distance
- // between them.
-
- // See Table 1 in Appendix E (pp.71) of JIS X0510:2004.
-
- public static $alignmentPattern = array(
- array( 0, 0),
- array( 0, 0), array(18, 0), array(22, 0), array(26, 0), array(30, 0), // 1- 5
- array(34, 0), array(22, 38), array(24, 42), array(26, 46), array(28, 50), // 6-10
- array(30, 54), array(32, 58), array(34, 62), array(26, 46), array(26, 48), //11-15
- array(26, 50), array(30, 54), array(30, 56), array(30, 58), array(34, 62), //16-20
- array(28, 50), array(26, 50), array(30, 54), array(28, 54), array(32, 58), //21-25
- array(30, 58), array(34, 62), array(26, 50), array(30, 54), array(26, 52), //26-30
- array(30, 56), array(34, 60), array(30, 58), array(34, 62), array(30, 54), //31-35
- array(24, 50), array(28, 54), array(32, 58), array(26, 54), array(30, 58), //35-40
- );
-
-
- /** --------------------------------------------------------------------
- * Put an alignment marker.
- * @param frame
- * @param width
- * @param ox,oy center coordinate of the pattern
- */
- public static function putAlignmentMarker(array &$frame, $ox, $oy)
- {
- $finder = array(
- "\xa1\xa1\xa1\xa1\xa1",
- "\xa1\xa0\xa0\xa0\xa1",
- "\xa1\xa0\xa1\xa0\xa1",
- "\xa1\xa0\xa0\xa0\xa1",
- "\xa1\xa1\xa1\xa1\xa1"
- );
-
- $yStart = $oy-2;
- $xStart = $ox-2;
-
- for($y=0; $y<5; $y++) {
- QRstr::set($frame, $xStart, $yStart+$y, $finder[$y]);
- }
- }
-
- //----------------------------------------------------------------------
- public static function putAlignmentPattern($version, &$frame, $width)
- {
- if($version < 2)
- return;
-
- $d = self::$alignmentPattern[$version][1] - self::$alignmentPattern[$version][0];
- if($d < 0) {
- $w = 2;
- } else {
- $w = (int)(($width - self::$alignmentPattern[$version][0]) / $d + 2);
- }
-
- if($w * $w - 3 == 1) {
- $x = self::$alignmentPattern[$version][0];
- $y = self::$alignmentPattern[$version][0];
- self::putAlignmentMarker($frame, $x, $y);
- return;
- }
-
- $cx = self::$alignmentPattern[$version][0];
- for($x=1; $x<$w - 1; $x++) {
- self::putAlignmentMarker($frame, 6, $cx);
- self::putAlignmentMarker($frame, $cx, 6);
- $cx += $d;
- }
-
- $cy = self::$alignmentPattern[$version][0];
- for($y=0; $y<$w-1; $y++) {
- $cx = self::$alignmentPattern[$version][0];
- for($x=0; $x<$w-1; $x++) {
- self::putAlignmentMarker($frame, $cx, $cy);
- $cx += $d;
- }
- $cy += $d;
- }
- }
-
- // Version information pattern -----------------------------------------
-
- // Version information pattern (BCH coded).
- // See Table 1 in Appendix D (pp.68) of JIS X0510:2004.
-
- // size: [QRSPEC_VERSION_MAX - 6]
-
- public static $versionPattern = array(
- 0x07c94, 0x085bc, 0x09a99, 0x0a4d3, 0x0bbf6, 0x0c762, 0x0d847, 0x0e60d,
- 0x0f928, 0x10b78, 0x1145d, 0x12a17, 0x13532, 0x149a6, 0x15683, 0x168c9,
- 0x177ec, 0x18ec4, 0x191e1, 0x1afab, 0x1b08e, 0x1cc1a, 0x1d33f, 0x1ed75,
- 0x1f250, 0x209d5, 0x216f0, 0x228ba, 0x2379f, 0x24b0b, 0x2542e, 0x26a64,
- 0x27541, 0x28c69
- );
-
- //----------------------------------------------------------------------
- public static function getVersionPattern($version)
- {
- if($version < 7 || $version > QRSPEC_VERSION_MAX)
- return 0;
-
- return self::$versionPattern[$version -7];
- }
-
- // Format information --------------------------------------------------
- // See calcFormatInfo in tests/test_qrspec.c (orginal qrencode c lib)
-
- public static $formatInfo = array(
- array(0x77c4, 0x72f3, 0x7daa, 0x789d, 0x662f, 0x6318, 0x6c41, 0x6976),
- array(0x5412, 0x5125, 0x5e7c, 0x5b4b, 0x45f9, 0x40ce, 0x4f97, 0x4aa0),
- array(0x355f, 0x3068, 0x3f31, 0x3a06, 0x24b4, 0x2183, 0x2eda, 0x2bed),
- array(0x1689, 0x13be, 0x1ce7, 0x19d0, 0x0762, 0x0255, 0x0d0c, 0x083b)
- );
-
- public static function getFormatInfo($mask, $level)
- {
- if($mask < 0 || $mask > 7)
- return 0;
-
- if($level < 0 || $level > 3)
- return 0;
-
- return self::$formatInfo[$level][$mask];
- }
-
- // Frame ---------------------------------------------------------------
- // Cache of initial frames.
-
- public static $frames = array();
-
- /** --------------------------------------------------------------------
- * Put a finder pattern.
- * @param frame
- * @param width
- * @param ox,oy upper-left coordinate of the pattern
- */
- public static function putFinderPattern(&$frame, $ox, $oy)
- {
- $finder = array(
- "\xc1\xc1\xc1\xc1\xc1\xc1\xc1",
- "\xc1\xc0\xc0\xc0\xc0\xc0\xc1",
- "\xc1\xc0\xc1\xc1\xc1\xc0\xc1",
- "\xc1\xc0\xc1\xc1\xc1\xc0\xc1",
- "\xc1\xc0\xc1\xc1\xc1\xc0\xc1",
- "\xc1\xc0\xc0\xc0\xc0\xc0\xc1",
- "\xc1\xc1\xc1\xc1\xc1\xc1\xc1"
- );
-
- for($y=0; $y<7; $y++) {
- QRstr::set($frame, $ox, $oy+$y, $finder[$y]);
- }
- }
-
- //----------------------------------------------------------------------
- public static function createFrame($version)
- {
- $width = self::$capacity[$version][QRCAP_WIDTH];
- $frameLine = str_repeat ("\0", $width);
- $frame = array_fill(0, $width, $frameLine);
-
- // Finder pattern
- self::putFinderPattern($frame, 0, 0);
- self::putFinderPattern($frame, $width - 7, 0);
- self::putFinderPattern($frame, 0, $width - 7);
-
- // Separator
- $yOffset = $width - 7;
-
- for($y=0; $y<7; $y++) {
- $frame[$y][7] = "\xc0";
- $frame[$y][$width - 8] = "\xc0";
- $frame[$yOffset][7] = "\xc0";
- $yOffset++;
- }
-
- $setPattern = str_repeat("\xc0", 8);
-
- QRstr::set($frame, 0, 7, $setPattern);
- QRstr::set($frame, $width-8, 7, $setPattern);
- QRstr::set($frame, 0, $width - 8, $setPattern);
-
- // Format info
- $setPattern = str_repeat("\x84", 9);
- QRstr::set($frame, 0, 8, $setPattern);
- QRstr::set($frame, $width - 8, 8, $setPattern, 8);
-
- $yOffset = $width - 8;
-
- for($y=0; $y<8; $y++,$yOffset++) {
- $frame[$y][8] = "\x84";
- $frame[$yOffset][8] = "\x84";
- }
-
- // Timing pattern
-
- for($i=1; $i<$width-15; $i++) {
- $frame[6][7+$i] = chr(0x90 | ($i & 1));
- $frame[7+$i][6] = chr(0x90 | ($i & 1));
- }
-
- // Alignment pattern
- self::putAlignmentPattern($version, $frame, $width);
-
- // Version information
- if($version >= 7) {
- $vinf = self::getVersionPattern($version);
-
- $v = $vinf;
-
- for($x=0; $x<6; $x++) {
- for($y=0; $y<3; $y++) {
- $frame[($width - 11)+$y][$x] = chr(0x88 | ($v & 1));
- $v = $v >> 1;
- }
- }
-
- $v = $vinf;
- for($y=0; $y<6; $y++) {
- for($x=0; $x<3; $x++) {
- $frame[$y][$x+($width - 11)] = chr(0x88 | ($v & 1));
- $v = $v >> 1;
- }
- }
- }
-
- // and a little bit...
- $frame[$width - 8][8] = "\x81";
-
- return $frame;
- }
-
- //----------------------------------------------------------------------
- public static function debug($frame, $binary_mode = false)
- {
- if ($binary_mode) {
-
- foreach ($frame as &$frameLine) {
- $frameLine = join('<span class="m"> </span>', explode('0', $frameLine));
- $frameLine = join('██', explode('1', $frameLine));
- }
-
- ?>
- <style>
- .m { background-color: white; }
- </style>
- <?php
- echo '<pre><tt><br/ ><br/ ><br/ > ';
- echo join("<br/ > ", $frame);
- echo '</tt></pre><br/ ><br/ ><br/ ><br/ ><br/ ><br/ >';
-
- } else {
-
- foreach ($frame as &$frameLine) {
- $frameLine = join('<span class="m"> </span>', explode("\xc0", $frameLine));
- $frameLine = join('<span class="m">▒</span>', explode("\xc1", $frameLine));
- $frameLine = join('<span class="p"> </span>', explode("\xa0", $frameLine));
- $frameLine = join('<span class="p">▒</span>', explode("\xa1", $frameLine));
- $frameLine = join('<span class="s">◇</span>', explode("\x84", $frameLine)); //format 0
- $frameLine = join('<span class="s">◆</span>', explode("\x85", $frameLine)); //format 1
- $frameLine = join('<span class="x">☢</span>', explode("\x81", $frameLine)); //special bit
- $frameLine = join('<span class="c"> </span>', explode("\x90", $frameLine)); //clock 0
- $frameLine = join('<span class="c">◷</span>', explode("\x91", $frameLine)); //clock 1
- $frameLine = join('<span class="f"> </span>', explode("\x88", $frameLine)); //version
- $frameLine = join('<span class="f">▒</span>', explode("\x89", $frameLine)); //version
- $frameLine = join('♦', explode("\x01", $frameLine));
- $frameLine = join('⋅', explode("\0", $frameLine));
- }
-
- ?>
- <style>
- .p { background-color: yellow; }
- .m { background-color: #00FF00; }
- .s { background-color: #FF0000; }
- .c { background-color: aqua; }
- .x { background-color: pink; }
- .f { background-color: gold; }
- </style>
- <?php
- echo "<pre><tt>";
- echo join("<br/ >", $frame);
- echo "</tt></pre>";
-
- }
- }
-
- //----------------------------------------------------------------------
- public static function serial($frame)
- {
- return gzcompress(join("\n", $frame), 9);
- }
-
- //----------------------------------------------------------------------
- public static function unserial($code)
- {
- return explode("\n", gzuncompress($code));
- }
-
- //----------------------------------------------------------------------
- public static function newFrame($version)
- {
- if($version < 1 || $version > QRSPEC_VERSION_MAX)
- return null;
-
- if(!isset(self::$frames[$version])) {
-
- $fileName = QR_CACHE_DIR.'frame_'.$version.'.dat';
-
- if (QR_CACHEABLE) {
- if (file_exists($fileName)) {
- self::$frames[$version] = self::unserial(file_get_contents($fileName));
- } else {
- self::$frames[$version] = self::createFrame($version);
- file_put_contents($fileName, self::serial(self::$frames[$version]));
- }
- } else {
- self::$frames[$version] = self::createFrame($version);
- }
- }
-
- if(is_null(self::$frames[$version]))
- return null;
-
- return self::$frames[$version];
- }
-
- //----------------------------------------------------------------------
- public static function rsBlockNum($spec) { return $spec[0] + $spec[3]; }
- public static function rsBlockNum1($spec) { return $spec[0]; }
- public static function rsDataCodes1($spec) { return $spec[1]; }
- public static function rsEccCodes1($spec) { return $spec[2]; }
- public static function rsBlockNum2($spec) { return $spec[3]; }
- public static function rsDataCodes2($spec) { return $spec[4]; }
- public static function rsEccCodes2($spec) { return $spec[2]; }
- public static function rsDataLength($spec) { return ($spec[0] * $spec[1]) + ($spec[3] * $spec[4]); }
- public static function rsEccLength($spec) { return ($spec[0] + $spec[3]) * $spec[2]; }
-
- } - - - -//---- qrimage.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Image output of code using GD2
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- define('QR_IMAGE', true);
-
- class QRimage {
-
- //----------------------------------------------------------------------
- public static function png($frame, $filename = false, $pixelPerPoint = 4, $outerFrame = 4,$saveandprint=FALSE)
- {
- $image = self::image($frame, $pixelPerPoint, $outerFrame);
-
- if ($filename === false) {
- Header("Content-type: image/png");
- ImagePng($image);
- } else {
- if($saveandprint===TRUE){
- ImagePng($image, $filename);
- header("Content-type: image/png");
- ImagePng($image);
- }else{
- ImagePng($image, $filename);
- }
- }
-
- ImageDestroy($image);
- }
-
- //----------------------------------------------------------------------
- public static function jpg($frame, $filename = false, $pixelPerPoint = 8, $outerFrame = 4, $q = 85)
- {
- $image = self::image($frame, $pixelPerPoint, $outerFrame);
-
- if ($filename === false) {
- Header("Content-type: image/jpeg");
- ImageJpeg($image, null, $q);
- } else {
- ImageJpeg($image, $filename, $q);
- }
-
- ImageDestroy($image);
- }
-
- //----------------------------------------------------------------------
- private static function image($frame, $pixelPerPoint = 4, $outerFrame = 4)
- {
- $h = count($frame);
- $w = strlen($frame[0]);
-
- $imgW = $w + 2*$outerFrame;
- $imgH = $h + 2*$outerFrame;
-
- $base_image =ImageCreate($imgW, $imgH);
-
- $col[0] = ImageColorAllocate($base_image,255,255,255);
- $col[1] = ImageColorAllocate($base_image,0,0,0);
-
- imagefill($base_image, 0, 0, $col[0]);
-
- for($y=0; $y<$h; $y++) {
- for($x=0; $x<$w; $x++) {
- if ($frame[$y][$x] == '1') {
- ImageSetPixel($base_image,$x+$outerFrame,$y+$outerFrame,$col[1]);
- }
- }
- }
-
- $target_image =ImageCreate($imgW * $pixelPerPoint, $imgH * $pixelPerPoint);
- ImageCopyResized($target_image, $base_image, 0, 0, 0, 0, $imgW * $pixelPerPoint, $imgH * $pixelPerPoint, $imgW, $imgH);
- ImageDestroy($base_image);
-
- return $target_image;
- }
- } - - - -//---- qrinput.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Input encoding class
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- define('STRUCTURE_HEADER_BITS', 20);
- define('MAX_STRUCTURED_SYMBOLS', 16);
-
- class QRinputItem {
-
- public $mode;
- public $size;
- public $data;
- public $bstream;
-
- public function __construct($mode, $size, $data, $bstream = null)
- {
- $setData = array_slice($data, 0, $size);
-
- if (count($setData) < $size) {
- $setData = array_merge($setData, array_fill(0,$size-count($setData),0));
- }
-
- if(!QRinput::check($mode, $size, $setData)) {
- throw new Exception('Error m:'.$mode.',s:'.$size.',d:'.join(',',$setData));
- return null;
- }
-
- $this->mode = $mode;
- $this->size = $size;
- $this->data = $setData;
- $this->bstream = $bstream;
- }
-
- //----------------------------------------------------------------------
- public function encodeModeNum($version)
- {
- try {
-
- $words = (int)($this->size / 3);
- $bs = new QRbitstream();
-
- $val = 0x1;
- $bs->appendNum(4, $val);
- $bs->appendNum(QRspec::lengthIndicator(QR_MODE_NUM, $version), $this->size);
-
- for($i=0; $i<$words; $i++) {
- $val = (ord($this->data[$i*3 ]) - ord('0')) * 100;
- $val += (ord($this->data[$i*3+1]) - ord('0')) * 10;
- $val += (ord($this->data[$i*3+2]) - ord('0'));
- $bs->appendNum(10, $val);
- }
-
- if($this->size - $words * 3 == 1) {
- $val = ord($this->data[$words*3]) - ord('0');
- $bs->appendNum(4, $val);
- } else if($this->size - $words * 3 == 2) {
- $val = (ord($this->data[$words*3 ]) - ord('0')) * 10;
- $val += (ord($this->data[$words*3+1]) - ord('0'));
- $bs->appendNum(7, $val);
- }
-
- $this->bstream = $bs;
- return 0;
-
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function encodeModeAn($version)
- {
- try {
- $words = (int)($this->size / 2);
- $bs = new QRbitstream();
-
- $bs->appendNum(4, 0x02);
- $bs->appendNum(QRspec::lengthIndicator(QR_MODE_AN, $version), $this->size);
-
- for($i=0; $i<$words; $i++) {
- $val = (int)QRinput::lookAnTable(ord($this->data[$i*2 ])) * 45;
- $val += (int)QRinput::lookAnTable(ord($this->data[$i*2+1]));
-
- $bs->appendNum(11, $val);
- }
-
- if($this->size & 1) {
- $val = QRinput::lookAnTable(ord($this->data[$words * 2]));
- $bs->appendNum(6, $val);
- }
-
- $this->bstream = $bs;
- return 0;
-
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function encodeMode8($version)
- {
- try {
- $bs = new QRbitstream();
-
- $bs->appendNum(4, 0x4);
- $bs->appendNum(QRspec::lengthIndicator(QR_MODE_8, $version), $this->size);
-
- for($i=0; $i<$this->size; $i++) {
- $bs->appendNum(8, ord($this->data[$i]));
- }
-
- $this->bstream = $bs;
- return 0;
-
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function encodeModeKanji($version)
- {
- try {
-
- $bs = new QRbitrtream();
-
- $bs->appendNum(4, 0x8);
- $bs->appendNum(QRspec::lengthIndicator(QR_MODE_KANJI, $version), (int)($this->size / 2));
-
- for($i=0; $i<$this->size; $i+=2) {
- $val = (ord($this->data[$i]) << 8) | ord($this->data[$i+1]);
- if($val <= 0x9ffc) {
- $val -= 0x8140;
- } else {
- $val -= 0xc140;
- }
-
- $h = ($val >> 8) * 0xc0;
- $val = ($val & 0xff) + $h;
-
- $bs->appendNum(13, $val);
- }
-
- $this->bstream = $bs;
- return 0;
-
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function encodeModeStructure()
- {
- try {
- $bs = new QRbitstream();
-
- $bs->appendNum(4, 0x03);
- $bs->appendNum(4, ord($this->data[1]) - 1);
- $bs->appendNum(4, ord($this->data[0]) - 1);
- $bs->appendNum(8, ord($this->data[2]));
-
- $this->bstream = $bs;
- return 0;
-
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function estimateBitStreamSizeOfEntry($version)
- {
- $bits = 0;
-
- if($version == 0)
- $version = 1;
-
- switch($this->mode) {
- case QR_MODE_NUM: $bits = QRinput::estimateBitsModeNum($this->size); break;
- case QR_MODE_AN: $bits = QRinput::estimateBitsModeAn($this->size); break;
- case QR_MODE_8: $bits = QRinput::estimateBitsMode8($this->size); break;
- case QR_MODE_KANJI: $bits = QRinput::estimateBitsModeKanji($this->size);break;
- case QR_MODE_STRUCTURE: return STRUCTURE_HEADER_BITS;
- default:
- return 0;
- }
-
- $l = QRspec::lengthIndicator($this->mode, $version);
- $m = 1 << $l;
- $num = (int)(($this->size + $m - 1) / $m);
-
- $bits += $num * (4 + $l);
-
- return $bits;
- }
-
- //----------------------------------------------------------------------
- public function encodeBitStream($version)
- {
- try {
-
- unset($this->bstream);
- $words = QRspec::maximumWords($this->mode, $version);
-
- if($this->size > $words) {
-
- $st1 = new QRinputItem($this->mode, $words, $this->data);
- $st2 = new QRinputItem($this->mode, $this->size - $words, array_slice($this->data, $words));
-
- $st1->encodeBitStream($version);
- $st2->encodeBitStream($version);
-
- $this->bstream = new QRbitstream();
- $this->bstream->append($st1->bstream);
- $this->bstream->append($st2->bstream);
-
- unset($st1);
- unset($st2);
-
- } else {
-
- $ret = 0;
-
- switch($this->mode) {
- case QR_MODE_NUM: $ret = $this->encodeModeNum($version); break;
- case QR_MODE_AN: $ret = $this->encodeModeAn($version); break;
- case QR_MODE_8: $ret = $this->encodeMode8($version); break;
- case QR_MODE_KANJI: $ret = $this->encodeModeKanji($version);break;
- case QR_MODE_STRUCTURE: $ret = $this->encodeModeStructure(); break;
-
- default:
- break;
- }
-
- if($ret < 0)
- return -1;
- }
-
- return $this->bstream->size();
-
- } catch (Exception $e) {
- return -1;
- }
- }
- };
-
- //##########################################################################
-
- class QRinput {
-
- public $items;
-
- private $version;
- private $level;
-
- //----------------------------------------------------------------------
- public function __construct($version = 0, $level = QR_ECLEVEL_L)
- {
- if ($version < 0 || $version > QRSPEC_VERSION_MAX || $level > QR_ECLEVEL_H) {
- throw new Exception('Invalid version no');
- return NULL;
- }
-
- $this->version = $version;
- $this->level = $level;
- }
-
- //----------------------------------------------------------------------
- public function getVersion()
- {
- return $this->version;
- }
-
- //----------------------------------------------------------------------
- public function setVersion($version)
- {
- if($version < 0 || $version > QRSPEC_VERSION_MAX) {
- throw new Exception('Invalid version no');
- return -1;
- }
-
- $this->version = $version;
-
- return 0;
- }
-
- //----------------------------------------------------------------------
- public function getErrorCorrectionLevel()
- {
- return $this->level;
- }
-
- //----------------------------------------------------------------------
- public function setErrorCorrectionLevel($level)
- {
- if($level > QR_ECLEVEL_H) {
- throw new Exception('Invalid ECLEVEL');
- return -1;
- }
-
- $this->level = $level;
-
- return 0;
- }
-
- //----------------------------------------------------------------------
- public function appendEntry(QRinputItem $entry)
- {
- $this->items[] = $entry;
- }
-
- //----------------------------------------------------------------------
- public function append($mode, $size, $data)
- {
- try {
- $entry = new QRinputItem($mode, $size, $data);
- $this->items[] = $entry;
- return 0;
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
-
- public function insertStructuredAppendHeader($size, $index, $parity)
- {
- if( $size > MAX_STRUCTURED_SYMBOLS ) {
- throw new Exception('insertStructuredAppendHeader wrong size');
- }
-
- if( $index <= 0 || $index > MAX_STRUCTURED_SYMBOLS ) {
- throw new Exception('insertStructuredAppendHeader wrong index');
- }
-
- $buf = array($size, $index, $parity);
-
- try {
- $entry = new QRinputItem(QR_MODE_STRUCTURE, 3, buf);
- array_unshift($this->items, $entry);
- return 0;
- } catch (Exception $e) {
- return -1;
- }
- }
-
- //----------------------------------------------------------------------
- public function calcParity()
- {
- $parity = 0;
-
- foreach($this->items as $item) {
- if($item->mode != QR_MODE_STRUCTURE) {
- for($i=$item->size-1; $i>=0; $i--) {
- $parity ^= $item->data[$i];
- }
- }
- }
-
- return $parity;
- }
-
- //----------------------------------------------------------------------
- public static function checkModeNum($size, $data)
- {
- for($i=0; $i<$size; $i++) {
- if((ord($data[$i]) < ord('0')) || (ord($data[$i]) > ord('9'))){
- return false;
- }
- }
-
- return true;
- }
-
- //----------------------------------------------------------------------
- public static function estimateBitsModeNum($size)
- {
- $w = (int)$size / 3;
- $bits = $w * 10;
-
- switch($size - $w * 3) {
- case 1:
- $bits += 4;
- break;
- case 2:
- $bits += 7;
- break;
- default:
- break;
- }
-
- return $bits;
- }
-
- //----------------------------------------------------------------------
- public static $anTable = array(
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- 36, -1, -1, -1, 37, 38, -1, -1, -1, -1, 39, 40, -1, 41, 42, 43,
- 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 44, -1, -1, -1, -1, -1,
- -1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24,
- 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1,
- -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1
- );
-
- //----------------------------------------------------------------------
- public static function lookAnTable($c)
- {
- return (($c > 127)?-1:self::$anTable[$c]);
- }
-
- //----------------------------------------------------------------------
- public static function checkModeAn($size, $data)
- {
- for($i=0; $i<$size; $i++) {
- if (self::lookAnTable(ord($data[$i])) == -1) {
- return false;
- }
- }
-
- return true;
- }
-
- //----------------------------------------------------------------------
- public static function estimateBitsModeAn($size)
- {
- $w = (int)($size / 2);
- $bits = $w * 11;
-
- if($size & 1) {
- $bits += 6;
- }
-
- return $bits;
- }
-
- //----------------------------------------------------------------------
- public static function estimateBitsMode8($size)
- {
- return $size * 8;
- }
-
- //----------------------------------------------------------------------
- public function estimateBitsModeKanji($size)
- {
- return (int)(($size / 2) * 13);
- }
-
- //----------------------------------------------------------------------
- public static function checkModeKanji($size, $data)
- {
- if($size & 1)
- return false;
-
- for($i=0; $i<$size; $i+=2) {
- $val = (ord($data[$i]) << 8) | ord($data[$i+1]);
- if( $val < 0x8140
- || ($val > 0x9ffc && $val < 0xe040)
- || $val > 0xebbf) {
- return false;
- }
- }
-
- return true;
- }
-
- /***********************************************************************
- * Validation
- **********************************************************************/
-
- public static function check($mode, $size, $data)
- {
- if($size <= 0)
- return false;
-
- switch($mode) {
- case QR_MODE_NUM: return self::checkModeNum($size, $data); break;
- case QR_MODE_AN: return self::checkModeAn($size, $data); break;
- case QR_MODE_KANJI: return self::checkModeKanji($size, $data); break;
- case QR_MODE_8: return true; break;
- case QR_MODE_STRUCTURE: return true; break;
-
- default:
- break;
- }
-
- return false;
- }
-
-
- //----------------------------------------------------------------------
- public function estimateBitStreamSize($version)
- {
- $bits = 0;
-
- foreach($this->items as $item) {
- $bits += $item->estimateBitStreamSizeOfEntry($version);
- }
-
- return $bits;
- }
-
- //----------------------------------------------------------------------
- public function estimateVersion()
- {
- $version = 0;
- $prev = 0;
- do {
- $prev = $version;
- $bits = $this->estimateBitStreamSize($prev);
- $version = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level);
- if ($version < 0) {
- return -1;
- }
- } while ($version > $prev);
-
- return $version;
- }
-
- //----------------------------------------------------------------------
- public static function lengthOfCode($mode, $version, $bits)
- {
- $payload = $bits - 4 - QRspec::lengthIndicator($mode, $version);
- switch($mode) {
- case QR_MODE_NUM:
- $chunks = (int)($payload / 10);
- $remain = $payload - $chunks * 10;
- $size = $chunks * 3;
- if($remain >= 7) {
- $size += 2;
- } else if($remain >= 4) {
- $size += 1;
- }
- break;
- case QR_MODE_AN:
- $chunks = (int)($payload / 11);
- $remain = $payload - $chunks * 11;
- $size = $chunks * 2;
- if($remain >= 6)
- $size++;
- break;
- case QR_MODE_8:
- $size = (int)($payload / 8);
- break;
- case QR_MODE_KANJI:
- $size = (int)(($payload / 13) * 2);
- break;
- case QR_MODE_STRUCTURE:
- $size = (int)($payload / 8);
- break;
- default:
- $size = 0;
- break;
- }
-
- $maxsize = QRspec::maximumWords($mode, $version);
- if($size < 0) $size = 0;
- if($size > $maxsize) $size = $maxsize;
-
- return $size;
- }
-
- //----------------------------------------------------------------------
- public function createBitStream()
- {
- $total = 0;
-
- foreach($this->items as $item) {
- $bits = $item->encodeBitStream($this->version);
-
- if($bits < 0)
- return -1;
-
- $total += $bits;
- }
-
- return $total;
- }
-
- //----------------------------------------------------------------------
- public function convertData()
- {
- $ver = $this->estimateVersion();
- if($ver > $this->getVersion()) {
- $this->setVersion($ver);
- }
-
- for(;;) {
- $bits = $this->createBitStream();
-
- if($bits < 0)
- return -1;
-
- $ver = QRspec::getMinimumVersion((int)(($bits + 7) / 8), $this->level);
- if($ver < 0) {
- throw new Exception('WRONG VERSION');
- return -1;
- } else if($ver > $this->getVersion()) {
- $this->setVersion($ver);
- } else {
- break;
- }
- }
-
- return 0;
- }
-
- //----------------------------------------------------------------------
- public function appendPaddingBit(&$bstream)
- {
- $bits = $bstream->size();
- $maxwords = QRspec::getDataLength($this->version, $this->level);
- $maxbits = $maxwords * 8;
-
- if ($maxbits == $bits) {
- return 0;
- }
-
- if ($maxbits - $bits < 5) {
- return $bstream->appendNum($maxbits - $bits, 0);
- }
-
- $bits += 4;
- $words = (int)(($bits + 7) / 8);
-
- $padding = new QRbitstream();
- $ret = $padding->appendNum($words * 8 - $bits + 4, 0);
-
- if($ret < 0)
- return $ret;
-
- $padlen = $maxwords - $words;
-
- if($padlen > 0) {
-
- $padbuf = array();
- for($i=0; $i<$padlen; $i++) {
- $padbuf[$i] = ($i&1)?0x11:0xec;
- }
-
- $ret = $padding->appendBytes($padlen, $padbuf);
-
- if($ret < 0)
- return $ret;
-
- }
-
- $ret = $bstream->append($padding);
-
- return $ret;
- }
-
- //----------------------------------------------------------------------
- public function mergeBitStream()
- {
- if($this->convertData() < 0) {
- return null;
- }
-
- $bstream = new QRbitstream();
-
- foreach($this->items as $item) {
- $ret = $bstream->append($item->bstream);
- if($ret < 0) {
- return null;
- }
- }
-
- return $bstream;
- }
-
- //----------------------------------------------------------------------
- public function getBitStream()
- {
-
- $bstream = $this->mergeBitStream();
-
- if($bstream == null) {
- return null;
- }
-
- $ret = $this->appendPaddingBit($bstream);
- if($ret < 0) {
- return null;
- }
-
- return $bstream;
- }
-
- //----------------------------------------------------------------------
- public function getByteStream()
- {
- $bstream = $this->getBitStream();
- if($bstream == null) {
- return null;
- }
-
- return $bstream->toByte();
- }
- }
-
-
- - - - -//---- qrbitstream.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Bitstream class
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- class QRbitstream {
-
- public $data = array();
-
- //----------------------------------------------------------------------
- public function size()
- {
- return count($this->data);
- }
-
- //----------------------------------------------------------------------
- public function allocate($setLength)
- {
- $this->data = array_fill(0, $setLength, 0);
- return 0;
- }
-
- //----------------------------------------------------------------------
- public static function newFromNum($bits, $num)
- {
- $bstream = new QRbitstream();
- $bstream->allocate($bits);
-
- $mask = 1 << ($bits - 1);
- for($i=0; $i<$bits; $i++) {
- if($num & $mask) {
- $bstream->data[$i] = 1;
- } else {
- $bstream->data[$i] = 0;
- }
- $mask = $mask >> 1;
- }
-
- return $bstream;
- }
-
- //----------------------------------------------------------------------
- public static function newFromBytes($size, $data)
- {
- $bstream = new QRbitstream();
- $bstream->allocate($size * 8);
- $p=0;
-
- for($i=0; $i<$size; $i++) {
- $mask = 0x80;
- for($j=0; $j<8; $j++) {
- if($data[$i] & $mask) {
- $bstream->data[$p] = 1;
- } else {
- $bstream->data[$p] = 0;
- }
- $p++;
- $mask = $mask >> 1;
- }
- }
-
- return $bstream;
- }
-
- //----------------------------------------------------------------------
- public function append(QRbitstream $arg)
- {
- if (is_null($arg)) {
- return -1;
- }
-
- if($arg->size() == 0) {
- return 0;
- }
-
- if($this->size() == 0) {
- $this->data = $arg->data;
- return 0;
- }
-
- $this->data = array_values(array_merge($this->data, $arg->data));
-
- return 0;
- }
-
- //----------------------------------------------------------------------
- public function appendNum($bits, $num)
- {
- if ($bits == 0)
- return 0;
-
- $b = QRbitstream::newFromNum($bits, $num);
-
- if(is_null($b))
- return -1;
-
- $ret = $this->append($b);
- unset($b);
-
- return $ret;
- }
-
- //----------------------------------------------------------------------
- public function appendBytes($size, $data)
- {
- if ($size == 0)
- return 0;
-
- $b = QRbitstream::newFromBytes($size, $data);
-
- if(is_null($b))
- return -1;
-
- $ret = $this->append($b);
- unset($b);
-
- return $ret;
- }
-
- //----------------------------------------------------------------------
- public function toByte()
- {
-
- $size = $this->size();
-
- if($size == 0) {
- return array();
- }
-
- $data = array_fill(0, (int)(($size + 7) / 8), 0);
- $bytes = (int)($size / 8);
-
- $p = 0;
-
- for($i=0; $i<$bytes; $i++) {
- $v = 0;
- for($j=0; $j<8; $j++) {
- $v = $v << 1;
- $v |= $this->data[$p];
- $p++;
- }
- $data[$i] = $v;
- }
-
- if($size & 7) {
- $v = 0;
- for($j=0; $j<($size & 7); $j++) {
- $v = $v << 1;
- $v |= $this->data[$p];
- $p++;
- }
- $data[$bytes] = $v;
- }
-
- return $data;
- }
-
- }
- - - - -//---- qrsplit.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Input splitting classes
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * The following data / specifications are taken from
- * "Two dimensional symbol -- QR-code -- Basic Specification" (JIS X0510:2004)
- * or
- * "Automatic identification and data capture techniques --
- * QR Code 2005 bar code symbology specification" (ISO/IEC 18004:2006)
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
- class QRsplit {
-
- public $dataStr = '';
- public $input;
- public $modeHint;
-
- //----------------------------------------------------------------------
- public function __construct($dataStr, $input, $modeHint)
- {
- $this->dataStr = $dataStr;
- $this->input = $input;
- $this->modeHint = $modeHint;
- }
-
- //----------------------------------------------------------------------
- public static function isdigitat($str, $pos)
- {
- if ($pos >= strlen($str))
- return false;
-
- return ((ord($str[$pos]) >= ord('0'))&&(ord($str[$pos]) <= ord('9')));
- }
-
- //----------------------------------------------------------------------
- public static function isalnumat($str, $pos)
- {
- if ($pos >= strlen($str))
- return false;
-
- return (QRinput::lookAnTable(ord($str[$pos])) >= 0);
- }
-
- //----------------------------------------------------------------------
- public function identifyMode($pos)
- {
- if ($pos >= strlen($this->dataStr))
- return QR_MODE_NUL;
-
- $c = $this->dataStr[$pos];
-
- if(self::isdigitat($this->dataStr, $pos)) {
- return QR_MODE_NUM;
- } else if(self::isalnumat($this->dataStr, $pos)) {
- return QR_MODE_AN;
- } else if($this->modeHint == QR_MODE_KANJI) {
-
- if ($pos+1 < strlen($this->dataStr))
- {
- $d = $this->dataStr[$pos+1];
- $word = (ord($c) << 8) | ord($d);
- if(($word >= 0x8140 && $word <= 0x9ffc) || ($word >= 0xe040 && $word <= 0xebbf)) {
- return QR_MODE_KANJI;
- }
- }
- }
-
- return QR_MODE_8;
- }
-
- //----------------------------------------------------------------------
- public function eatNum()
- {
- $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion());
-
- $p = 0;
- while(self::isdigitat($this->dataStr, $p)) {
- $p++;
- }
-
- $run = $p;
- $mode = $this->identifyMode($p);
-
- if($mode == QR_MODE_8) {
- $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln
- + QRinput::estimateBitsMode8(1) // + 4 + l8
- - QRinput::estimateBitsMode8($run + 1); // - 4 - l8
- if($dif > 0) {
- return $this->eat8();
- }
- }
- if($mode == QR_MODE_AN) {
- $dif = QRinput::estimateBitsModeNum($run) + 4 + $ln
- + QRinput::estimateBitsModeAn(1) // + 4 + la
- - QRinput::estimateBitsModeAn($run + 1);// - 4 - la
- if($dif > 0) {
- return $this->eatAn();
- }
- }
-
- $ret = $this->input->append(QR_MODE_NUM, $run, str_split($this->dataStr));
- if($ret < 0)
- return -1;
-
- return $run;
- }
-
- //----------------------------------------------------------------------
- public function eatAn()
- {
- $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion());
- $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion());
-
- $p = 0;
-
- while(self::isalnumat($this->dataStr, $p)) {
- if(self::isdigitat($this->dataStr, $p)) {
- $q = $p;
- while(self::isdigitat($this->dataStr, $q)) {
- $q++;
- }
-
- $dif = QRinput::estimateBitsModeAn($p) // + 4 + la
- + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsModeAn($q); // - 4 - la
-
- if($dif < 0) {
- break;
- } else {
- $p = $q;
- }
- } else {
- $p++;
- }
- }
-
- $run = $p;
-
- if(!self::isalnumat($this->dataStr, $p)) {
- $dif = QRinput::estimateBitsModeAn($run) + 4 + $la
- + QRinput::estimateBitsMode8(1) // + 4 + l8
- - QRinput::estimateBitsMode8($run + 1); // - 4 - l8
- if($dif > 0) {
- return $this->eat8();
- }
- }
-
- $ret = $this->input->append(QR_MODE_AN, $run, str_split($this->dataStr));
- if($ret < 0)
- return -1;
-
- return $run;
- }
-
- //----------------------------------------------------------------------
- public function eatKanji()
- {
- $p = 0;
-
- while($this->identifyMode($p) == QR_MODE_KANJI) {
- $p += 2;
- }
-
- $ret = $this->input->append(QR_MODE_KANJI, $p, str_split($this->dataStr));
- if($ret < 0)
- return -1;
-
- return $run;
- }
-
- //----------------------------------------------------------------------
- public function eat8()
- {
- $la = QRspec::lengthIndicator(QR_MODE_AN, $this->input->getVersion());
- $ln = QRspec::lengthIndicator(QR_MODE_NUM, $this->input->getVersion());
-
- $p = 1;
- $dataStrLen = strlen($this->dataStr);
-
- while($p < $dataStrLen) {
-
- $mode = $this->identifyMode($p);
- if($mode == QR_MODE_KANJI) {
- break;
- }
- if($mode == QR_MODE_NUM) {
- $q = $p;
- while(self::isdigitat($this->dataStr, $q)) {
- $q++;
- }
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
- + QRinput::estimateBitsModeNum($q - $p) + 4 + $ln
- - QRinput::estimateBitsMode8($q); // - 4 - l8
- if($dif < 0) {
- break;
- } else {
- $p = $q;
- }
- } else if($mode == QR_MODE_AN) {
- $q = $p;
- while(self::isalnumat($this->dataStr, $q)) {
- $q++;
- }
- $dif = QRinput::estimateBitsMode8($p) // + 4 + l8
- + QRinput::estimateBitsModeAn($q - $p) + 4 + $la
- - QRinput::estimateBitsMode8($q); // - 4 - l8
- if($dif < 0) {
- break;
- } else {
- $p = $q;
- }
- } else {
- $p++;
- }
- }
-
- $run = $p;
- $ret = $this->input->append(QR_MODE_8, $run, str_split($this->dataStr));
-
- if($ret < 0)
- return -1;
-
- return $run;
- }
-
- //----------------------------------------------------------------------
- public function splitString()
- {
- while (strlen($this->dataStr) > 0)
- {
- if($this->dataStr == '')
- return 0;
-
- $mode = $this->identifyMode(0);
-
- switch ($mode) {
- case QR_MODE_NUM: $length = $this->eatNum(); break;
- case QR_MODE_AN: $length = $this->eatAn(); break;
- case QR_MODE_KANJI:
- if ($hint == QR_MODE_KANJI)
- $length = $this->eatKanji();
- else $length = $this->eat8();
- break;
- default: $length = $this->eat8(); break;
-
- }
-
- if($length == 0) return 0;
- if($length < 0) return -1;
-
- $this->dataStr = substr($this->dataStr, $length);
- }
- }
-
- //----------------------------------------------------------------------
- public function toUpper()
- {
- $stringLen = strlen($this->dataStr);
- $p = 0;
-
- while ($p<$stringLen) {
- $mode = self::identifyMode(substr($this->dataStr, $p), $this->modeHint);
- if($mode == QR_MODE_KANJI) {
- $p += 2;
- } else {
- if (ord($this->dataStr[$p]) >= ord('a') && ord($this->dataStr[$p]) <= ord('z')) {
- $this->dataStr[$p] = chr(ord($this->dataStr[$p]) - 32);
- }
- $p++;
- }
- }
-
- return $this->dataStr;
- }
-
- //----------------------------------------------------------------------
- public static function splitStringToQRinput($string, QRinput $input, $modeHint, $casesensitive = true)
- {
- if(is_null($string) || $string == '\0' || $string == '') {
- throw new Exception('empty string!!!');
- }
-
- $split = new QRsplit($string, $input, $modeHint);
-
- if(!$casesensitive)
- $split->toUpper();
-
- return $split->splitString();
- }
- } - - - -//---- qrrscode.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Reed-Solomon error correction support
- *
- * Copyright (C) 2002, 2003, 2004, 2006 Phil Karn, KA9Q
- * (libfec is released under the GNU Lesser General Public License.)
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- class QRrsItem {
-
- public $mm; // Bits per symbol
- public $nn; // Symbols per block (= (1<<mm)-1)
- public $alpha_to = array(); // log lookup table
- public $index_of = array(); // Antilog lookup table
- public $genpoly = array(); // Generator polynomial
- public $nroots; // Number of generator roots = number of parity symbols
- public $fcr; // First consecutive root, index form
- public $prim; // Primitive element, index form
- public $iprim; // prim-th root of 1, index form
- public $pad; // Padding bytes in shortened block
- public $gfpoly;
-
- //----------------------------------------------------------------------
- public function modnn($x)
- {
- while ($x >= $this->nn) {
- $x -= $this->nn;
- $x = ($x >> $this->mm) + ($x & $this->nn);
- }
-
- return $x;
- }
-
- //----------------------------------------------------------------------
- public static function init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
- {
- // Common code for intializing a Reed-Solomon control block (char or int symbols)
- // Copyright 2004 Phil Karn, KA9Q
- // May be used under the terms of the GNU Lesser General Public License (LGPL)
-
- $rs = null;
-
- // Check parameter ranges
- if($symsize < 0 || $symsize > 8) return $rs;
- if($fcr < 0 || $fcr >= (1<<$symsize)) return $rs;
- if($prim <= 0 || $prim >= (1<<$symsize)) return $rs;
- if($nroots < 0 || $nroots >= (1<<$symsize)) return $rs; // Can't have more roots than symbol values!
- if($pad < 0 || $pad >= ((1<<$symsize) -1 - $nroots)) return $rs; // Too much padding
-
- $rs = new QRrsItem();
- $rs->mm = $symsize;
- $rs->nn = (1<<$symsize)-1;
- $rs->pad = $pad;
-
- $rs->alpha_to = array_fill(0, $rs->nn+1, 0);
- $rs->index_of = array_fill(0, $rs->nn+1, 0);
-
- // PHP style macro replacement ;)
- $NN =& $rs->nn;
- $A0 =& $NN;
-
- // Generate Galois field lookup tables
- $rs->index_of[0] = $A0; // log(zero) = -inf
- $rs->alpha_to[$A0] = 0; // alpha**-inf = 0
- $sr = 1;
-
- for($i=0; $i<$rs->nn; $i++) {
- $rs->index_of[$sr] = $i;
- $rs->alpha_to[$i] = $sr;
- $sr <<= 1;
- if($sr & (1<<$symsize)) {
- $sr ^= $gfpoly;
- }
- $sr &= $rs->nn;
- }
-
- if($sr != 1){
- // field generator polynomial is not primitive!
- $rs = NULL;
- return $rs;
- }
-
- /* Form RS code generator polynomial from its roots */
- $rs->genpoly = array_fill(0, $nroots+1, 0);
-
- $rs->fcr = $fcr;
- $rs->prim = $prim;
- $rs->nroots = $nroots;
- $rs->gfpoly = $gfpoly;
-
- /* Find prim-th root of 1, used in decoding */
- for($iprim=1;($iprim % $prim) != 0;$iprim += $rs->nn)
- ; // intentional empty-body loop!
-
- $rs->iprim = (int)($iprim / $prim);
- $rs->genpoly[0] = 1;
-
- for ($i = 0,$root=$fcr*$prim; $i < $nroots; $i++, $root += $prim) {
- $rs->genpoly[$i+1] = 1;
-
- // Multiply rs->genpoly[] by @**(root + x)
- for ($j = $i; $j > 0; $j--) {
- if ($rs->genpoly[$j] != 0) {
- $rs->genpoly[$j] = $rs->genpoly[$j-1] ^ $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[$j]] + $root)];
- } else {
- $rs->genpoly[$j] = $rs->genpoly[$j-1];
- }
- }
- // rs->genpoly[0] can never be zero
- $rs->genpoly[0] = $rs->alpha_to[$rs->modnn($rs->index_of[$rs->genpoly[0]] + $root)];
- }
-
- // convert rs->genpoly[] to index form for quicker encoding
- for ($i = 0; $i <= $nroots; $i++)
- $rs->genpoly[$i] = $rs->index_of[$rs->genpoly[$i]];
-
- return $rs;
- }
-
- //----------------------------------------------------------------------
- public function encode_rs_char($data, &$parity)
- {
- $MM =& $this->mm;
- $NN =& $this->nn;
- $ALPHA_TO =& $this->alpha_to;
- $INDEX_OF =& $this->index_of;
- $GENPOLY =& $this->genpoly;
- $NROOTS =& $this->nroots;
- $FCR =& $this->fcr;
- $PRIM =& $this->prim;
- $IPRIM =& $this->iprim;
- $PAD =& $this->pad;
- $A0 =& $NN;
-
- $parity = array_fill(0, $NROOTS, 0);
-
- for($i=0; $i< ($NN-$NROOTS-$PAD); $i++) {
-
- $feedback = $INDEX_OF[$data[$i] ^ $parity[0]];
- if($feedback != $A0) {
- // feedback term is non-zero
-
- // This line is unnecessary when GENPOLY[NROOTS] is unity, as it must
- // always be for the polynomials constructed by init_rs()
- $feedback = $this->modnn($NN - $GENPOLY[$NROOTS] + $feedback);
-
- for($j=1;$j<$NROOTS;$j++) {
- $parity[$j] ^= $ALPHA_TO[$this->modnn($feedback + $GENPOLY[$NROOTS-$j])];
- }
- }
-
- // Shift
- array_shift($parity);
- if($feedback != $A0) {
- array_push($parity, $ALPHA_TO[$this->modnn($feedback + $GENPOLY[0])]);
- } else {
- array_push($parity, 0);
- }
- }
- }
- }
-
- //##########################################################################
-
- class QRrs {
-
- public static $items = array();
-
- //----------------------------------------------------------------------
- public static function init_rs($symsize, $gfpoly, $fcr, $prim, $nroots, $pad)
- {
- foreach(self::$items as $rs) {
- if($rs->pad != $pad) continue;
- if($rs->nroots != $nroots) continue;
- if($rs->mm != $symsize) continue;
- if($rs->gfpoly != $gfpoly) continue;
- if($rs->fcr != $fcr) continue;
- if($rs->prim != $prim) continue;
-
- return $rs;
- }
-
- $rs = QRrsItem::init_rs_char($symsize, $gfpoly, $fcr, $prim, $nroots, $pad);
- array_unshift(self::$items, $rs);
-
- return $rs;
- }
- } - - - -//---- qrmask.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Masking
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- define('N1', 3);
- define('N2', 3);
- define('N3', 40);
- define('N4', 10);
-
- class QRmask {
-
- public $runLength = array();
-
- //----------------------------------------------------------------------
- public function __construct()
- {
- $this->runLength = array_fill(0, QRSPEC_WIDTH_MAX + 1, 0);
- }
-
- //----------------------------------------------------------------------
- public function writeFormatInformation($width, &$frame, $mask, $level)
- {
- $blacks = 0;
- $format = QRspec::getFormatInfo($mask, $level);
-
- for($i=0; $i<8; $i++) {
- if($format & 1) {
- $blacks += 2;
- $v = 0x85;
- } else {
- $v = 0x84;
- }
-
- $frame[8][$width - 1 - $i] = chr($v);
- if($i < 6) {
- $frame[$i][8] = chr($v);
- } else {
- $frame[$i + 1][8] = chr($v);
- }
- $format = $format >> 1;
- }
-
- for($i=0; $i<7; $i++) {
- if($format & 1) {
- $blacks += 2;
- $v = 0x85;
- } else {
- $v = 0x84;
- }
-
- $frame[$width - 7 + $i][8] = chr($v);
- if($i == 0) {
- $frame[8][7] = chr($v);
- } else {
- $frame[8][6 - $i] = chr($v);
- }
-
- $format = $format >> 1;
- }
-
- return $blacks;
- }
-
- //----------------------------------------------------------------------
- public function mask0($x, $y) { return ($x+$y)&1; }
- public function mask1($x, $y) { return ($y&1); }
- public function mask2($x, $y) { return ($x%3); }
- public function mask3($x, $y) { return ($x+$y)%3; }
- public function mask4($x, $y) { return (((int)($y/2))+((int)($x/3)))&1; }
- public function mask5($x, $y) { return (($x*$y)&1)+($x*$y)%3; }
- public function mask6($x, $y) { return ((($x*$y)&1)+($x*$y)%3)&1; }
- public function mask7($x, $y) { return ((($x*$y)%3)+(($x+$y)&1))&1; }
-
- //----------------------------------------------------------------------
- private function generateMaskNo($maskNo, $width, $frame)
- {
- $bitMask = array_fill(0, $width, array_fill(0, $width, 0));
-
- for($y=0; $y<$width; $y++) {
- for($x=0; $x<$width; $x++) {
- if(ord($frame[$y][$x]) & 0x80) {
- $bitMask[$y][$x] = 0;
- } else {
- $maskFunc = call_user_func(array($this, 'mask'.$maskNo), $x, $y);
- $bitMask[$y][$x] = ($maskFunc == 0)?1:0;
- }
-
- }
- }
-
- return $bitMask;
- }
-
- //----------------------------------------------------------------------
- public static function serial($bitFrame)
- {
- $codeArr = array();
-
- foreach ($bitFrame as $line)
- $codeArr[] = join('', $line);
-
- return gzcompress(join("\n", $codeArr), 9);
- }
-
- //----------------------------------------------------------------------
- public static function unserial($code)
- {
- $codeArr = array();
-
- $codeLines = explode("\n", gzuncompress($code));
- foreach ($codeLines as $line)
- $codeArr[] = str_split($line);
-
- return $codeArr;
- }
-
- //----------------------------------------------------------------------
- public function makeMaskNo($maskNo, $width, $s, &$d, $maskGenOnly = false)
- {
- $b = 0;
- $bitMask = array();
-
- $fileName = QR_CACHE_DIR.'mask_'.$maskNo.DIRECTORY_SEPARATOR.'mask_'.$width.'_'.$maskNo.'.dat';
-
- if (QR_CACHEABLE) {
- if (file_exists($fileName)) {
- $bitMask = self::unserial(file_get_contents($fileName));
- } else {
- $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d);
- if (!file_exists(QR_CACHE_DIR.'mask_'.$maskNo))
- mkdir(QR_CACHE_DIR.'mask_'.$maskNo);
- file_put_contents($fileName, self::serial($bitMask));
- }
- } else {
- $bitMask = $this->generateMaskNo($maskNo, $width, $s, $d);
- }
-
- if ($maskGenOnly)
- return;
-
- $d = $s;
-
- for($y=0; $y<$width; $y++) {
- for($x=0; $x<$width; $x++) {
- if($bitMask[$y][$x] == 1) {
- $d[$y][$x] = chr(ord($s[$y][$x]) ^ (int)$bitMask[$y][$x]);
- }
- $b += (int)(ord($d[$y][$x]) & 1);
- }
- }
-
- return $b;
- }
-
- //----------------------------------------------------------------------
- public function makeMask($width, $frame, $maskNo, $level)
- {
- $masked = array_fill(0, $width, str_repeat("\0", $width));
- $this->makeMaskNo($maskNo, $width, $frame, $masked);
- $this->writeFormatInformation($width, $masked, $maskNo, $level);
-
- return $masked;
- }
-
- //----------------------------------------------------------------------
- public function calcN1N3($length)
- {
- $demerit = 0;
-
- for($i=0; $i<$length; $i++) {
-
- if($this->runLength[$i] >= 5) {
- $demerit += (N1 + ($this->runLength[$i] - 5));
- }
- if($i & 1) {
- if(($i >= 3) && ($i < ($length-2)) && ($this->runLength[$i] % 3 == 0)) {
- $fact = (int)($this->runLength[$i] / 3);
- if(($this->runLength[$i-2] == $fact) &&
- ($this->runLength[$i-1] == $fact) &&
- ($this->runLength[$i+1] == $fact) &&
- ($this->runLength[$i+2] == $fact)) {
- if(($this->runLength[$i-3] < 0) || ($this->runLength[$i-3] >= (4 * $fact))) {
- $demerit += N3;
- } else if((($i+3) >= $length) || ($this->runLength[$i+3] >= (4 * $fact))) {
- $demerit += N3;
- }
- }
- }
- }
- }
- return $demerit;
- }
-
- //----------------------------------------------------------------------
- public function evaluateSymbol($width, $frame)
- {
- $head = 0;
- $demerit = 0;
-
- for($y=0; $y<$width; $y++) {
- $head = 0;
- $this->runLength[0] = 1;
-
- $frameY = $frame[$y];
-
- if ($y>0)
- $frameYM = $frame[$y-1];
-
- for($x=0; $x<$width; $x++) {
- if(($x > 0) && ($y > 0)) {
- $b22 = ord($frameY[$x]) & ord($frameY[$x-1]) & ord($frameYM[$x]) & ord($frameYM[$x-1]);
- $w22 = ord($frameY[$x]) | ord($frameY[$x-1]) | ord($frameYM[$x]) | ord($frameYM[$x-1]);
-
- if(($b22 | ($w22 ^ 1))&1) {
- $demerit += N2;
- }
- }
- if(($x == 0) && (ord($frameY[$x]) & 1)) {
- $this->runLength[0] = -1;
- $head = 1;
- $this->runLength[$head] = 1;
- } else if($x > 0) {
- if((ord($frameY[$x]) ^ ord($frameY[$x-1])) & 1) {
- $head++;
- $this->runLength[$head] = 1;
- } else {
- $this->runLength[$head]++;
- }
- }
- }
-
- $demerit += $this->calcN1N3($head+1);
- }
-
- for($x=0; $x<$width; $x++) {
- $head = 0;
- $this->runLength[0] = 1;
-
- for($y=0; $y<$width; $y++) {
- if($y == 0 && (ord($frame[$y][$x]) & 1)) {
- $this->runLength[0] = -1;
- $head = 1;
- $this->runLength[$head] = 1;
- } else if($y > 0) {
- if((ord($frame[$y][$x]) ^ ord($frame[$y-1][$x])) & 1) {
- $head++;
- $this->runLength[$head] = 1;
- } else {
- $this->runLength[$head]++;
- }
- }
- }
-
- $demerit += $this->calcN1N3($head+1);
- }
-
- return $demerit;
- }
-
-
- //----------------------------------------------------------------------
- public function mask($width, $frame, $level)
- {
- $minDemerit = PHP_INT_MAX;
- $bestMaskNum = 0;
- $bestMask = array();
-
- $checked_masks = array(0,1,2,3,4,5,6,7);
-
- if (QR_FIND_FROM_RANDOM !== false) {
-
- $howManuOut = 8-(QR_FIND_FROM_RANDOM % 9);
- for ($i = 0; $i < $howManuOut; $i++) {
- $remPos = rand (0, count($checked_masks)-1);
- unset($checked_masks[$remPos]);
- $checked_masks = array_values($checked_masks);
- }
-
- }
-
- $bestMask = $frame;
-
- foreach($checked_masks as $i) {
- $mask = array_fill(0, $width, str_repeat("\0", $width));
-
- $demerit = 0;
- $blacks = 0;
- $blacks = $this->makeMaskNo($i, $width, $frame, $mask);
- $blacks += $this->writeFormatInformation($width, $mask, $i, $level);
- $blacks = (int)(100 * $blacks / ($width * $width));
- $demerit = (int)((int)(abs($blacks - 50) / 5) * N4);
- $demerit += $this->evaluateSymbol($width, $mask);
-
- if($demerit < $minDemerit) {
- $minDemerit = $demerit;
- $bestMask = $mask;
- $bestMaskNum = $i;
- }
- }
-
- return $bestMask;
- }
-
- //----------------------------------------------------------------------
- }
- - - - -//---- qrencode.php ----------------------------- - - - -
-/*
- * PHP QR Code encoder
- *
- * Main encoder classes.
- *
- * Based on libqrencode C library distributed under LGPL 2.1
- * Copyright (C) 2006, 2007, 2008, 2009 Kentaro Fukuchi <fukuchi@megaui.net>
- *
- * PHP QR Code is distributed under LGPL 3
- * Copyright (C) 2010 Dominik Dzienia <deltalab at poczta dot fm>
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 3 of the License, or any later version.
- *
- * This library 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
- class QRrsblock {
- public $dataLength;
- public $data = array();
- public $eccLength;
- public $ecc = array();
-
- public function __construct($dl, $data, $el, &$ecc, QRrsItem $rs)
- {
- $rs->encode_rs_char($data, $ecc);
-
- $this->dataLength = $dl;
- $this->data = $data;
- $this->eccLength = $el;
- $this->ecc = $ecc;
- }
- };
-
- //##########################################################################
-
- class QRrawcode {
- public $version;
- public $datacode = array();
- public $ecccode = array();
- public $blocks;
- public $rsblocks = array(); //of RSblock
- public $count;
- public $dataLength;
- public $eccLength;
- public $b1;
-
- //----------------------------------------------------------------------
- public function __construct(QRinput $input)
- {
- $spec = array(0,0,0,0,0);
-
- $this->datacode = $input->getByteStream();
- if(is_null($this->datacode)) {
- throw new Exception('null imput string');
- }
-
- QRspec::getEccSpec($input->getVersion(), $input->getErrorCorrectionLevel(), $spec);
-
- $this->version = $input->getVersion();
- $this->b1 = QRspec::rsBlockNum1($spec);
- $this->dataLength = QRspec::rsDataLength($spec);
- $this->eccLength = QRspec::rsEccLength($spec);
- $this->ecccode = array_fill(0, $this->eccLength, 0);
- $this->blocks = QRspec::rsBlockNum($spec);
-
- $ret = $this->init($spec);
- if($ret < 0) {
- throw new Exception('block alloc error');
- return null;
- }
-
- $this->count = 0;
- }
-
- //----------------------------------------------------------------------
- public function init(array $spec)
- {
- $dl = QRspec::rsDataCodes1($spec);
- $el = QRspec::rsEccCodes1($spec);
- $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el);
-
-
- $blockNo = 0;
- $dataPos = 0;
- $eccPos = 0;
- for($i=0; $i<QRspec::rsBlockNum1($spec); $i++) {
- $ecc = array_slice($this->ecccode,$eccPos);
- $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs);
- $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc);
-
- $dataPos += $dl;
- $eccPos += $el;
- $blockNo++;
- }
-
- if(QRspec::rsBlockNum2($spec) == 0)
- return 0;
-
- $dl = QRspec::rsDataCodes2($spec);
- $el = QRspec::rsEccCodes2($spec);
- $rs = QRrs::init_rs(8, 0x11d, 0, 1, $el, 255 - $dl - $el);
-
- if($rs == NULL) return -1;
-
- for($i=0; $i<QRspec::rsBlockNum2($spec); $i++) {
- $ecc = array_slice($this->ecccode,$eccPos);
- $this->rsblocks[$blockNo] = new QRrsblock($dl, array_slice($this->datacode, $dataPos), $el, $ecc, $rs);
- $this->ecccode = array_merge(array_slice($this->ecccode,0, $eccPos), $ecc);
-
- $dataPos += $dl;
- $eccPos += $el;
- $blockNo++;
- }
-
- return 0;
- }
-
- //----------------------------------------------------------------------
- public function getCode()
- {
- $ret;
-
- if($this->count < $this->dataLength) {
- $row = $this->count % $this->blocks;
- $col = $this->count / $this->blocks;
- if($col >= $this->rsblocks[0]->dataLength) {
- $row += $this->b1;
- }
- $ret = $this->rsblocks[$row]->data[$col];
- } else if($this->count < $this->dataLength + $this->eccLength) {
- $row = ($this->count - $this->dataLength) % $this->blocks;
- $col = ($this->count - $this->dataLength) / $this->blocks;
- $ret = $this->rsblocks[$row]->ecc[$col];
- } else {
- return 0;
- }
- $this->count++;
-
- return $ret;
- }
- }
-
- //##########################################################################
-
- class QRcode {
-
- public $version;
- public $width;
- public $data;
-
- //----------------------------------------------------------------------
- public function encodeMask(QRinput $input, $mask)
- {
- if($input->getVersion() < 0 || $input->getVersion() > QRSPEC_VERSION_MAX) {
- throw new Exception('wrong version');
- }
- if($input->getErrorCorrectionLevel() > QR_ECLEVEL_H) {
- throw new Exception('wrong level');
- }
-
- $raw = new QRrawcode($input);
-
- QRtools::markTime('after_raw');
-
- $version = $raw->version;
- $width = QRspec::getWidth($version);
- $frame = QRspec::newFrame($version);
-
- $filler = new FrameFiller($width, $frame);
- if(is_null($filler)) {
- return NULL;
- }
-
- // inteleaved data and ecc codes
- for($i=0; $i<$raw->dataLength + $raw->eccLength; $i++) {
- $code = $raw->getCode();
- $bit = 0x80;
- for($j=0; $j<8; $j++) {
- $addr = $filler->next();
- $filler->setFrameAt($addr, 0x02 | (($bit & $code) != 0));
- $bit = $bit >> 1;
- }
- }
-
- QRtools::markTime('after_filler');
-
- unset($raw);
-
- // remainder bits
- $j = QRspec::getRemainder($version);
- for($i=0; $i<$j; $i++) {
- $addr = $filler->next();
- $filler->setFrameAt($addr, 0x02);
- }
-
- $frame = $filler->frame;
- unset($filler);
-
-
- // masking
- $maskObj = new QRmask();
- if($mask < 0) {
-
- if (QR_FIND_BEST_MASK) {
- $masked = $maskObj->mask($width, $frame, $input->getErrorCorrectionLevel());
- } else {
- $masked = $maskObj->makeMask($width, $frame, (intval(QR_DEFAULT_MASK) % 8), $input->getErrorCorrectionLevel());
- }
- } else {
- $masked = $maskObj->makeMask($width, $frame, $mask, $input->getErrorCorrectionLevel());
- }
-
- if($masked == NULL) {
- return NULL;
- }
-
- QRtools::markTime('after_mask');
-
- $this->version = $version;
- $this->width = $width;
- $this->data = $masked;
-
- return $this;
- }
-
- //----------------------------------------------------------------------
- public function encodeInput(QRinput $input)
- {
- return $this->encodeMask($input, -1);
- }
-
- //----------------------------------------------------------------------
- public function encodeString8bit($string, $version, $level)
- {
- if(string == NULL) {
- throw new Exception('empty string!');
- return NULL;
- }
-
- $input = new QRinput($version, $level);
- if($input == NULL) return NULL;
-
- $ret = $input->append($input, QR_MODE_8, strlen($string), str_split($string));
- if($ret < 0) {
- unset($input);
- return NULL;
- }
- return $this->encodeInput($input);
- }
-
- //----------------------------------------------------------------------
- public function encodeString($string, $version, $level, $hint, $casesensitive)
- {
-
- if($hint != QR_MODE_8 && $hint != QR_MODE_KANJI) {
- throw new Exception('bad hint');
- return NULL;
- }
-
- $input = new QRinput($version, $level);
- if($input == NULL) return NULL;
-
- $ret = QRsplit::splitStringToQRinput($string, $input, $hint, $casesensitive);
- if($ret < 0) {
- return NULL;
- }
-
- return $this->encodeInput($input);
- }
-
- //----------------------------------------------------------------------
- public static function png($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4, $saveandprint=false)
- {
- $enc = QRencode::factory($level, $size, $margin);
- return $enc->encodePNG($text, $outfile, $saveandprint=false);
- }
-
- //----------------------------------------------------------------------
- public static function text($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4)
- {
- $enc = QRencode::factory($level, $size, $margin);
- return $enc->encode($text, $outfile);
- }
-
- //----------------------------------------------------------------------
- public static function raw($text, $outfile = false, $level = QR_ECLEVEL_L, $size = 3, $margin = 4)
- {
- $enc = QRencode::factory($level, $size, $margin);
- return $enc->encodeRAW($text, $outfile);
- }
- }
-
- //##########################################################################
-
- class FrameFiller {
-
- public $width;
- public $frame;
- public $x;
- public $y;
- public $dir;
- public $bit;
-
- //----------------------------------------------------------------------
- public function __construct($width, &$frame)
- {
- $this->width = $width;
- $this->frame = $frame;
- $this->x = $width - 1;
- $this->y = $width - 1;
- $this->dir = -1;
- $this->bit = -1;
- }
-
- //----------------------------------------------------------------------
- public function setFrameAt($at, $val)
- {
- $this->frame[$at['y']][$at['x']] = chr($val);
- }
-
- //----------------------------------------------------------------------
- public function getFrameAt($at)
- {
- return ord($this->frame[$at['y']][$at['x']]);
- }
-
- //----------------------------------------------------------------------
- public function next()
- {
- do {
-
- if($this->bit == -1) {
- $this->bit = 0;
- return array('x'=>$this->x, 'y'=>$this->y);
- }
-
- $x = $this->x;
- $y = $this->y;
- $w = $this->width;
-
- if($this->bit == 0) {
- $x--;
- $this->bit++;
- } else {
- $x++;
- $y += $this->dir;
- $this->bit--;
- }
-
- if($this->dir < 0) {
- if($y < 0) {
- $y = 0;
- $x -= 2;
- $this->dir = 1;
- if($x == 6) {
- $x--;
- $y = 9;
- }
- }
- } else {
- if($y == $w) {
- $y = $w - 1;
- $x -= 2;
- $this->dir = -1;
- if($x == 6) {
- $x--;
- $y -= 8;
- }
- }
- }
- if($x < 0 || $y < 0) return null;
-
- $this->x = $x;
- $this->y = $y;
-
- } while(ord($this->frame[$y][$x]) & 0x80);
-
- return array('x'=>$x, 'y'=>$y);
- }
-
- } ;
-
- //##########################################################################
-
- class QRencode {
-
- public $casesensitive = true;
- public $eightbit = false;
-
- public $version = 0;
- public $size = 3;
- public $margin = 4;
-
- public $structured = 0; // not supported yet
-
- public $level = QR_ECLEVEL_L;
- public $hint = QR_MODE_8;
-
- //----------------------------------------------------------------------
- public static function factory($level = QR_ECLEVEL_L, $size = 3, $margin = 4)
- {
- $enc = new QRencode();
- $enc->size = $size;
- $enc->margin = $margin;
-
- switch ($level.'') {
- case '0':
- case '1':
- case '2':
- case '3':
- $enc->level = $level;
- break;
- case 'l':
- case 'L':
- $enc->level = QR_ECLEVEL_L;
- break;
- case 'm':
- case 'M':
- $enc->level = QR_ECLEVEL_M;
- break;
- case 'q':
- case 'Q':
- $enc->level = QR_ECLEVEL_Q;
- break;
- case 'h':
- case 'H':
- $enc->level = QR_ECLEVEL_H;
- break;
- }
-
- return $enc;
- }
-
- //----------------------------------------------------------------------
- public function encodeRAW($intext, $outfile = false)
- {
- $code = new QRcode();
-
- if($this->eightbit) {
- $code->encodeString8bit($intext, $this->version, $this->level);
- } else {
- $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive);
- }
-
- return $code->data;
- }
-
- //----------------------------------------------------------------------
- public function encode($intext, $outfile = false)
- {
- $code = new QRcode();
-
- if($this->eightbit) {
- $code->encodeString8bit($intext, $this->version, $this->level);
- } else {
- $code->encodeString($intext, $this->version, $this->level, $this->hint, $this->casesensitive);
- }
-
- QRtools::markTime('after_encode');
-
- if ($outfile!== false) {
- file_put_contents($outfile, join("\n", QRtools::binarize($code->data)));
- } else {
- return QRtools::binarize($code->data);
- }
- }
-
- //----------------------------------------------------------------------
- public function encodePNG($intext, $outfile = false,$saveandprint=false)
- {
- try {
-
- ob_start();
- $tab = $this->encode($intext);
- $err = ob_get_contents();
- ob_end_clean();
-
- if ($err != '')
- QRtools::log($outfile, $err);
-
- $maxSize = (int)(QR_PNG_MAXIMUM_SIZE / (count($tab)+2*$this->margin));
-
- QRimage::png($tab, $outfile, min(max(1, $this->size), $maxSize), $this->margin,$saveandprint);
-
- } catch (Exception $e) {
-
- QRtools::log($outfile, $e->getMessage());
-
- }
- }
- }
- - diff --git a/apps/shorty/ajax/add.php b/apps/shorty/ajax/add.php deleted file mode 100644 index b1130e47db6..00000000000 --- a/apps/shorty/ajax/add.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU AFFERO GENERAL PUBLIC LICENSE (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/add.php - * @brief Ajax method to add a new shorty defined by request arguments - * @param title (string) Human readable title of the shorty - * @param target (url) Remote target url meant to be shortened - * @param until (date) Date until when the created shorty is valid and usable - * @param notes (string) Any additional information in text form - * @param favicon (url) Reference to the shortcut icon used in target url - * @returns (json) success/error state indicator - * @returns (json) Associative array of attributes of the generated shorty - * @returns (json) Human readable message - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - - //no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $p_id = OC_Shorty_Tools::shorty_id ( ); - $p_status = OC_Shorty_Type::req_argument ( 'status', OC_Shorty_Type::STATUS, FALSE ); - $p_title = OC_Shorty_Type::req_argument ( 'title', OC_Shorty_Type::STRING, FALSE ); - $p_target = OC_Shorty_Type::req_argument ( 'target', OC_Shorty_Type::URL, TRUE ); - $p_until = OC_Shorty_Type::req_argument ( 'until', OC_Shorty_Type::DATE, FALSE ); - $p_notes = OC_Shorty_Type::req_argument ( 'notes', OC_Shorty_Type::STRING, FALSE ); - $p_favicon = OC_Shorty_Type::req_argument ( 'favicon', OC_Shorty_Type::URL, FALSE ); - // register shorty at backend - $p_source = OC_Shorty_Backend::registerUrl ( $p_id ); - // fallback title: choose hostname if no title is specified - $p_title = $p_title ? trim($p_title) : parse_url($p_target,PHP_URL_HOST); - // insert new shorty into our database - $param = array - ( - ':user' => OCP\User::getUser(), - ':id' => $p_id, - ':status' => $p_status ? $p_status : '', - ':title' => $p_title ? $p_title : '', - ':favicon' => $p_favicon ? $p_favicon : '', - ':source' => $p_source ? $p_source : '', - ':target' => $p_target ? $p_target : '', - ':notes' => $p_notes ? $p_notes : '', - ':until' => $p_until, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_INSERT ); - $query->execute ( $param ); - - // read new entry for feedback - $param = array - ( - ':user' => OCP\User::getUser(), - ':id' => $p_id, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_VERIFY ); - $entries = $query->execute($param)->FetchAll(); - if ( (1==count($entries)) - &&(isset($entries[0]['id'])) - &&($p_id==$entries[0]['id']) ) - $entries[0]['relay']=OC_Shorty_Tools::relayUrl ( $entries[0]['id'] ); - else - throw new OC_Shorty_Exception ( "failed to verify stored shorty with id '%1s'", array($p_id) ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Url shortened to: %s",$p_source), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => $entries[0], - 'message' => OC_Shorty_L10n::t("Url shortened to: %s",$p_source) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/click.php b/apps/shorty/ajax/click.php deleted file mode 100644 index c88f6eec4f5..00000000000 --- a/apps/shorty/ajax/click.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/click.php - * @brief Ajax method to register a 'click', a single hit on an existing and valid shorty - * @param id (string) Internal id of a referenced shorty - * @returns (json) success/error state indicator - * @returns (json) Associative array holding the id of the shorty whose click was registered - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - if (isset($_GET['id'])) - { - $p_id = OC_Shorty_Type::req_argument ( $_GET['id'], OC_Shorty_Type::ID, TRUE ); - $param = array - ( - 'user' => OCP\User::getUser(), - 'id' => $p_id, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_CLICK ); - $query->execute ( $param ); - OCP\JSON::success ( array ( 'data' => array('id'=>$p_id), - 'message' => OC_Shorty_L10n::t('Click registered') ) ); - } - else - throw new OC_Shorty_Exception ( "request failed: missing mandatory argument 'id'" ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/count.php b/apps/shorty/ajax/count.php deleted file mode 100644 index 9a00083bb9f..00000000000 --- a/apps/shorty/ajax/count.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/count.php - * @brief Ajax method to retrieve a list of important sums, counts of the existing set of shortys - * @returns (json) success/error state indicator - * @returns (json) Associative array of counts - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = TRUE; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $countResult = OC_Shorty_Tools::countShorties ( ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\JSON::success ( array ( 'data' => $countResult, - 'message' => OC_Shorty_L10n::t('Counted entries and clicks') ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/del.php b/apps/shorty/ajax/del.php deleted file mode 100644 index b24f83915ed..00000000000 --- a/apps/shorty/ajax/del.php +++ /dev/null @@ -1,63 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/del.php - * @brief Ajax method to delete an existing shorty - * @param id (string) Internal id of a referenced shorty - * @returns (json) success/error state indicator - * @returns (json) Key of shorty that was deleted - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $p_id = OC_Shorty_Type::req_argument ( 'id', OC_Shorty_Type::ID, TRUE ); - $param = array - ( - 'user' => OCP\User::getUser(), - 'id' => $p_id, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_DELETE ); - $query->execute($param); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Shorty with id '%s' deleted",$p_id), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => array('id'=>$p_id), - 'message' => OC_Shorty_L10n::t("Shorty with id '%s' deleted",$p_id) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/edit.php b/apps/shorty/ajax/edit.php deleted file mode 100644 index 252e4fe5c29..00000000000 --- a/apps/shorty/ajax/edit.php +++ /dev/null @@ -1,88 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/edit.php - * @brief Ajax method to modify aspects of an existing shorty - * @param id (string) Internal id of the referenced shorty - * @param title (string) Human readable title - * @param notes (string) Any additional information in free text form - * @returns (json) success/error state indicator - * @returns (json) Associative array holding the id of the shorty whose click was registered - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $p_id = OC_Shorty_Type::req_argument ( 'id', OC_Shorty_Type::ID, TRUE ); - $p_status = OC_Shorty_Type::req_argument ( 'status', OC_Shorty_Type::STATUS, FALSE ); - $p_title = OC_Shorty_Type::req_argument ( 'title', OC_Shorty_Type::STRING, FALSE ); - $p_until = OC_Shorty_Type::req_argument ( 'until', OC_Shorty_Type::DATE, FALSE ); - $p_notes = OC_Shorty_Type::req_argument ( 'notes', OC_Shorty_Type::STRING, FALSE ); - $param = array - ( - ':user' => OCP\User::getUser ( ), - ':id' => $p_id, - ':status'=> $p_status ? $p_status : '', - ':title' => $p_title ? $p_title : '', - ':notes' => $p_notes ? $p_notes : '', - ':until' => $p_until, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_UPDATE ); - $query->execute ( $param ); - - // read new entry for feedback - $param = array - ( - 'user' => OCP\User::getUser(), - 'id' => $p_id, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_VERIFY ); - $entries = $query->execute($param)->FetchAll(); - if ( (1==count($entries)) - &&(isset($entries[0]['id'])) - &&($p_id==$entries[0]['id']) ) - $entries[0]['relay']=OC_Shorty_Tools::relayUrl ( $entries[0]['id'] ); - else - throw new OC_Shorty_Exception ( "failed to verify stored shorty with id '%1s'", array($p_id) ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Modifications for shorty with id '%s' saved",$p_id), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => $entries[0], - 'message' => OC_Shorty_L10n::t("Modifications for shorty with id '%s' saved",$p_id) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/list.php b/apps/shorty/ajax/list.php deleted file mode 100644 index 8b4e9b3e81e..00000000000 --- a/apps/shorty/ajax/list.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/list.php - * @brief Ajax method to retrieve a list of existing shortys - * @returns (json) success/error state indicator - * @returns (number) Total number of shortys in the list - * @returns (json) Numeric array of all shortys, associative array of attributes as values for every single shorty contained - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = TRUE; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - // first remove any entries already marked as 'deleted' - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_REMOVE ); - $result = $query->execute(array(':user'=>OCP\User::getUser())); - // now comes the real list selection -// define ('PAGE_SIZE', 100); -// $p_offset = OC_Shorty_Type::req_argument ( 'page', OC_Shorty_Type::INTEGER, FALSE) * PAGE_SIZE; - // pre-sort list according to user preferences - $p_sort = OC_Shorty_Type::$SORTING[OCP\Config::getUserValue(OCP\User::getUser(),'shorty','list-sort-code','cd')]; - $param = array - ( - ':user' => OCP\User::getUser ( ), - ':sort' => $p_sort, -// ':offset' => $p_offset, -// ':limit' => PAGE_SIZE, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_LIST ); - $result = $query->execute($param); - $reply = $result->fetchAll(); - // enhance all entries with the relay url - foreach (array_keys($reply) as $key) - if (isset($reply[$key]['id'])) - $reply[$key]['relay']=OC_Shorty_Tools::relayUrl ( $reply[$key]['id'] ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\JSON::success ( array ( 'data' => $reply, - 'count' => sizeof($reply), - 'message' => OC_Shorty_L10n::t('Number of entries: %s', count($reply)) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/meta.php b/apps/shorty/ajax/meta.php deleted file mode 100644 index 5f9d5c3c315..00000000000 --- a/apps/shorty/ajax/meta.php +++ /dev/null @@ -1,56 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/meta.php - * @brief Ajax method to query meta information about a given remote url - * @param target (string) Url of a remote web resource - * @returns (json) success/error state indicator - * @returns (array) Associative array of meta data aspects - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $target = OC_Shorty_Type::req_argument ( 'target', OC_Shorty_Type::URL, TRUE ); - $meta = OC_Shorty_Meta::fetchMetaData(htmlspecialchars_decode($target)); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\JSON::success ( array ( 'data' => $meta, - 'message' => OC_Shorty_L10n::t("Target url '%s' is valid", $meta['target']) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/preferences.php b/apps/shorty/ajax/preferences.php deleted file mode 100644 index e35a2f7aff3..00000000000 --- a/apps/shorty/ajax/preferences.php +++ /dev/null @@ -1,119 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/preferences.php - * @brief Ajax method to store one or more personal preferences - * @param backend-type (string) Identifier of chosen backend type - * @param backend-static-base (string) Url to use as a base when the static backend is active - * @param backend-google-key (string) Personal authentication key to use when the google backend is active - * @param backend-bitly-key (string) Personal authentication key to use when the bit.li backend is active - * @param backend-bitly-user (string) Personal authentication user to use when the bit.li backend is active - * @param sms-control (string) Controls wether a 'send as sms' action should be offered is the sharing dialog - * @param list-sort-code (string) Two character sorting key controlling the active sorting of shorty lists - * @returns (json) success/error state indicator - * @returns (json) Associative array holding the stored values by their key - * @returns (json) Human readable message describing the result - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $data = array(); - switch ( $_SERVER['REQUEST_METHOD'] ) - { - case 'POST': - // detect provided preferences - $data = array(); - foreach (array_keys($_POST) as $key) - if ( isset(OC_Shorty_Type::$PREFERENCE[$key]) ) // ignore unknown preference keys - { - $type = OC_Shorty_Type::$PREFERENCE[$key]; - $data[$key] = OC_Shorty_Type::req_argument ( $key, $type, FALSE ); - } - // eliminate settings not explicitly set - $data = array_diff ( $data, array(FALSE) ); - // store settings - foreach ( $data as $key=>$val ) - OCP\Config::setUserValue( OCP\User::getUser(), 'shorty', $key, $val ); - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Preference(s) '%s' saved.",implode(',',array_keys($data))), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => $data, - 'message' => OC_Shorty_L10n::t("Preference(s) '%s' saved.",implode(',',array_keys($data))) ) ); - break; - case 'GET': - // detect requested preferences - foreach (array_keys($_GET) as $key) - { - if ( isset(OC_Shorty_Type::$PREFERENCE[$key]) ) // ignore unknown preference keys - { - $type = OC_Shorty_Type::$PREFERENCE[$key]; - $data[$key] = OCP\Config::getUserValue( OCP\User::getUser(), 'shorty', $key); - // morph value into an explicit type - switch ($type) - { - case OC_Shorty_Type::ID: - case OC_Shorty_Type::STATUS: - case OC_Shorty_Type::SORTKEY: - case OC_Shorty_Type::SORTVAL: - case OC_Shorty_Type::STRING: - case OC_Shorty_Type::URL: - case OC_Shorty_Type::DATE: - settype ( $data[$key], 'string' ); - break; - case OC_Shorty_Type::INTEGER: - case OC_Shorty_Type::TIMESTAMP: - settype ( $data[$key], 'integer' ); - break; - case OC_Shorty_Type::FLOAT: - settype ( $data[$key], 'float' ); - break; - default: - } // switch - } - } // foreach - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Preference(s) '%s' saved.",implode(',',array_keys($data))), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => $data, - 'message' => OC_Shorty_L10n::t('Preference(s) retrieved.') ) ); - break; - default: - throw new OC_Shorty_Exception ( "unexpected request method '%s'", $_SERVER['REQUEST_METHOD'] ); - } // switch -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/settings.php b/apps/shorty/ajax/settings.php deleted file mode 100644 index af76b69e076..00000000000 --- a/apps/shorty/ajax/settings.php +++ /dev/null @@ -1,109 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/settings.php - * @brief Ajax method to store one or more system settings (plugin settings) - * @param backend-static-base (string) Url to use as a base when the static backend is active (plugins default, may be overridden by user preference) - * @returns (json) success/error state indicator - * @returns (json) Associative array holding the stored values by their key - * @returns (json) Human readable message describing the result - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkAdminUser ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $data = array(); - switch ( $_SERVER['REQUEST_METHOD'] ) - { - case 'POST': - // detect provided settings - $data = array(); - foreach (array_keys($_POST) as $key) - if ( isset(OC_Shorty_Type::$SETTING[$key]) ) // ignore unknown preference keys - { - $type = OC_Shorty_Type::$SETTING[$key]; - $data[$key] = OC_Shorty_Type::req_argument ( $key, $type, FALSE ); - } - // eliminate settings not explicitly set - $data = array_diff ( $data, array(FALSE) ); - // store settings one by one - foreach ( $data as $key=>$val ) - OCP\Config::setAppValue( 'shorty', $key, $val ); - break; - case 'GET': - // detect requested settings - foreach (array_keys($_GET) as $key) - { - if ( isset(OC_Shorty_Type::$SETTING[$key]) ) // ignore unknown preference keys - { - $type = OC_Shorty_Type::$SETTING[$key]; - $data[$key] = OCP\Config::getUserValue( OCP\User::getUser(), 'shorty', $key); - // morph value into an explicit type - switch ($type) - { - case OC_Shorty_Type::ID: - case OC_Shorty_Type::STATUS: - case OC_Shorty_Type::SORTKEY: - case OC_Shorty_Type::SORTVAL: - case OC_Shorty_Type::STRING: - case OC_Shorty_Type::URL: - case OC_Shorty_Type::DATE: - settype ( $data[$key], 'string' ); - break; - case OC_Shorty_Type::INTEGER: - case OC_Shorty_Type::TIMESTAMP: - settype ( $data[$key], 'integer' ); - break; - case OC_Shorty_Type::FLOAT: - settype ( $data[$key], 'float' ); - break; - default: - } // switch - } - } // foreach - break; - default: - throw new OC_Shorty_Exception ( "unexpected request method '%s'", $_SERVER['REQUEST_METHOD'] ); - } // switch - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Setting(s) '%s' saved.",implode(',',array_keys($data))), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => $data, - 'message' => OC_Shorty_L10n::t('Setting saved.') ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/ajax/status.php b/apps/shorty/ajax/status.php deleted file mode 100644 index 6d00bf58854..00000000000 --- a/apps/shorty/ajax/status.php +++ /dev/null @@ -1,67 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file ajax/status.php - * @brief Ajax method to modify the status of an existing shorty - * @param id (string) Internal id of the referenced shorty - * @param title (string) Human readable title - * @param notes (string) Any additional information in free text form - * @returns (json) success/error state indicator - * @returns (json) Associative array holding the id of the shorty whose click was registered - * @author Christian Reiner - */ - -// swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure -OC_Shorty_Tools::ob_control ( TRUE ); - -//no apps or filesystem -$RUNTIME_NOSETUPFS = true; - -// Check if we are a user -OCP\JSON::checkLoggedIn ( ); -OCP\JSON::checkAppEnabled ( 'shorty' ); - -try -{ - $p_id = OC_Shorty_Type::req_argument ( 'id', OC_Shorty_Type::ID, TRUE ); - $p_status = OC_Shorty_Type::req_argument ( 'status', OC_Shorty_Type::STATUS, FALSE ); - $param = array - ( - 'user' => OCP\User::getUser ( ), - 'id' => $p_id, - 'status' => $p_status, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_STATUS ); - $query->execute ( $param ); - - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - OC_Shorty_Tools::ob_control ( FALSE ); - OCP\Util::writeLog( 'shorty', sprintf("Status change for shorty with id '%s' saved",$p_id), OC_Log::INFO ); - OCP\JSON::success ( array ( 'data' => array('id'=>$p_id), - 'message' => sprintf(OC_Shorty_L10n::t("Status change for shorty with id '%s' saved"),$p_id) ) ); -} catch ( Exception $e ) { OC_Shorty_Exception::JSONerror($e); } -?> diff --git a/apps/shorty/appinfo/app.php b/apps/shorty/appinfo/app.php deleted file mode 100644 index 635fda4ee27..00000000000 --- a/apps/shorty/appinfo/app.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file appinfo/app.php - * @brief Basic registration of plugin at ownCloud - * @author Christian Reiner - */ - -OC::$CLASSPATH['OC_Shorty_Backend'] = 'apps/shorty/lib/backend.php'; -OC::$CLASSPATH['OC_Shorty_Exception'] = 'apps/shorty/lib/exception.php'; -OC::$CLASSPATH['OC_Shorty_HttpException'] = 'apps/shorty/lib/exception.php'; -OC::$CLASSPATH['OC_Shorty_L10n'] = 'apps/shorty/lib/l10n.php'; -OC::$CLASSPATH['OC_Shorty_Meta'] = 'apps/shorty/lib/meta.php'; -OC::$CLASSPATH['OC_Shorty_Query'] = 'apps/shorty/lib/query.php'; -OC::$CLASSPATH['OC_Shorty_Tools'] = 'apps/shorty/lib/tools.php'; -OC::$CLASSPATH['OC_Shorty_Type'] = 'apps/shorty/lib/type.php'; - -OCP\App::addNavigationEntry ( array ( 'id' => 'shorty_index', - 'order' => 71, - 'href' => OCP\Util::linkTo ( 'shorty', 'index.php' ), - 'icon' => OCP\Util::imagePath( 'shorty', 'shorty.svg' ), - 'name' => 'Shorty' ) ); - -OCP\App::register ( array ( 'order' => 71, 'id' => 'shorty', 'name' => 'Shorty' ) ); -OCP\App::registerAdmin ( 'shorty', 'settings' ); -OCP\App::registerPersonal ( 'shorty', 'preferences' ); -OCP\Util::connectHook ( 'OC_User', 'post_deleteUser', 'OC_Shorty_Hooks', 'deleteUser'); - -?> diff --git a/apps/shorty/appinfo/database.xml b/apps/shorty/appinfo/database.xml deleted file mode 100644 index 0cac24dbf25..00000000000 --- a/apps/shorty/appinfo/database.xml +++ /dev/null @@ -1,148 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<!-- -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* ---> - -<!-- - /** - * @file appinfo/database.xml - * @brief Database scheme definition for plugins tables - * @author Christian Reiner - */ - --> - -<database> - <name>*dbname*</name> - <create>true</create> - <overwrite>false</overwrite> - <charset>latin1</charset> - <table> - <name>*dbprefix*shorty</name> - <declaration> - <field> - <name>id</name> - <type>text</type> - <notnull>true</notnull> - <length>12</length> - </field> - <field> - <name>status</name> - <type>text</type> - <default>'shared'</default> - <notnull>true</notnull> - <length>10</length> - </field> - <field> - <name>title</name> - <type>text</type> - <default>''</default> - <notnull>true</notnull> - <length>80</length> - </field> - <field> - <name>favicon</name> - <type>text</type> - <default>''</default> - <notnull>false</notnull> - <length>1024</length> - </field> - <field> - <name>source</name> - <type>text</type> - <notnull>true</notnull> - <length>4096</length> - </field> - <field> - <name>target</name> - <type>text</type> - <notnull>true</notnull> - <length>4096</length> - </field> - <field> - <name>user</name> - <type>text</type> - <notnull>true</notnull> - <length>64</length> - </field> - <field> - <name>until</name> - <type>date</type> - <notnull>false</notnull> - <default></default> - </field> - <field> - <name>created</name> - <type>date</type> - <notnull>false</notnull> - <default></default> - </field> - <field> - <name>accessed</name> - <type>timestamp</type> - <notnull>false</notnull> - <default></default> - </field> - <field> - <name>clicks</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <unsigned>true</unsigned> - <length>10</length> - </field> - <field> - <name>notes</name> - <type>text</type> - <default>''</default> - <notnull>true</notnull> - <length>4096</length> - </field> - - <index> - <name>shorty_id</name> - <unique>true</unique> - <field> - <name>id</name> - <sorting>descending</sorting> - </field> - </index> - <index> - <name>shorty_user</name> - <unique>false</unique> - <field> - <name>user</name> - <sorting>ascending</sorting> - </field> - </index> - <index> - <name>shorty_source</name> - <unique>false</unique> - <field> - <name>source</name> - <sorting>ascending</sorting> - </field> - </index> - </declaration> - </table> -</database> diff --git a/apps/shorty/appinfo/info.xml b/apps/shorty/appinfo/info.xml deleted file mode 100644 index bbee9dd673b..00000000000 --- a/apps/shorty/appinfo/info.xml +++ /dev/null @@ -1,56 +0,0 @@ -<?xml version="1.0"?> -<!-- -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* ---> - -<!-- - /** - * @file appinfo/info.xml - * @brief Definition of central information about this plugin - * @author Christian Reiner - /* - --> - -<info> - <id>shorty</id> - <name>Shorty</name> - <description>Shorty offers a service to store, manage and use a collection of short links -pointing to ressources in the web. The features are a combination of a -centralized bookmarks collection, an url shortener and an access control. -The collection is presented as a link of "shorties", a shorty can be created -either manually in the list ("New") or by using the "Shortlet". The Shortlet -is something like a Booklet, a JS based bookmark meant to be stored inside the -bookmark toolbar or area of a web browser. When clicked, the page currently -open in the browser will be offered to be added to the list of existing shorties. -For more information see: http://apps.owncloud.com/content/show.php/Shorty?content=150401 -Current version: 0.2.2 (06.06.2012)</description> - <version>0.2.2</version> - <licence>AGPL</licence> - <author>Christian Reiner</author> - <require>4</require> - <public> - <shorty_relay>relay.php</shorty_relay> - <shorty_qrcode>qrcode.php</shorty_qrcode> - </public> -</info> diff --git a/apps/shorty/appinfo/migrate.php b/apps/shorty/appinfo/migrate.php deleted file mode 100644 index 5efce251a65..00000000000 --- a/apps/shorty/appinfo/migrate.php +++ /dev/null @@ -1,101 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file appinfo/migrate.php - * @brief OC migration support - * @author Christian Reiner - */ - -class OC_Migration_Provider_Shorty extends OC_Migration_Provider -{ - - function export ( ) - { - OCP\Util::writeLog ( 'migration','starting export for Shorty', OCP\Util::INFO ); - $options = array( - 'table'=>'shorty', - 'matchcol'=>'user', - 'matchval'=>$this->uid, - 'idcol'=>'id' - ); - $ids = $this->content->copyRows( $options ); - $count = OC_Shorty_Tools::countShorties(); - // check for success - if( (is_array($ids) && is_array($count)) - && (count($ids)==$count['sum_shortys']) ) - return true; - else return false; - } // function export - - function import ( ) - { - switch( $this->appinfo->version ) - { - default: - $query = $this->content->prepare( "SELECT * FROM shorty WHERE user_id LIKE ?" ); - $result = $query->execute( array( $this->olduid ) ); - if (is_array(is_array($result))) - { - while( $row = $result->fetchRow() ) - { - $param = array ( - 'id' => $row['id'], - 'status' => $row['status'], - 'title' => $row['title'], - 'favicon' => $row['favicon'], - 'source' => $row['source'], - 'target' => $row['target'], - 'user' => $row['user'], - 'until' => $row['until'], - 'created' => $row['created'], - 'accessed' => $row['accessed'], - 'clicks' => $row['clicks'], - 'notes' => $row['notes'], - ); - // import each shorty one by one, no special treatment required, since no autoincrement id is used - $query = OCP\DB::prepare( sprintf ( "INSERT INTO *PREFIX*shorty(%s) VALUES (%s)", - implode(',',array_keys($param)), - implode(',',array_fill(0,count($param),'?')) ) ); - $query->execute( $param ); - } // while - } // if - break; - } // switch - // check for success by counting the generated entries - $count = OC_Shorty_Tools::countShorties(); - if( (is_array($result) && is_array($count)) - && (count($result)==$count['sum_shortys']) ) - return true; - else return false; - } // function import - -} // class OC_Migration_Provider_Shorty - -// Load the provider -new OC_Migration_Provider_Shorty ( 'shortys' ); - -?> diff --git a/apps/shorty/css/preferences.css b/apps/shorty/css/preferences.css deleted file mode 100644 index 37a86a534a6..00000000000 --- a/apps/shorty/css/preferences.css +++ /dev/null @@ -1,109 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file css/preferences.css - * @brief Style definitions for the user preference dialog - * @author Christian Reiner - */ - -#shorty img { - vertical-align: middle; - margin:0; - padding:0; -} -#shorty #shortlet { - outline: medium none; - padding: 0.6em 0.8em; - background-image: -moz-linear-gradient(center bottom, Lavender 0%, white 50%); - border: 1px solid #DDDDDD; - border-radius: 0.5em 0.5em 0.5em 0.5em; - box-shadow: 0 1px 0 #BBBBBB inset; -} -#shorty #shortlet a { - font-style: italic; - color: DarkSlateGray; -} -#shorty #shortlet:after { - content: url("%appswebroot%/apps/shorty/img/drag_me.png"); - position: relative; - top: -12px; - margin-left: -160px; -} -#shorty .chzn-container { - vertical-align: middle; -} - -#shorty .title { - margin-bottom: 0.6em; -} - -#shorty .aspect { - display: inline-block; - font-weight: bold; - width: 6em; - margin: 0 0.2em 0.4em 0; -} - -#shorty .explain { - display: inline-block; - font-style: italic; - margin: 0.3em; -} - -#shorty .example { - font-family: Monospace; - margin: 0.3em; -} - -#shorty a.external { - text-decoration:underline; -} -#shorty a.external:after { - content:url("%appswebroot%/apps/shorty/img/actions/external.png"); - margin-left:0.3em; -} - -#verification #hourglass { - display: block; - text-align: center; - width: 100%; height: 100%; - margin-top: 20px; -} - -#verification #failure { - display: none; - position: absolute; -} - -#verification #success { - display: none; - position: absolute; -} - -#verification legend { - width: 100%; - text-align: center; -} diff --git a/apps/shorty/css/settings.css b/apps/shorty/css/settings.css deleted file mode 100644 index e92031d8913..00000000000 --- a/apps/shorty/css/settings.css +++ /dev/null @@ -1,59 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file css/settings.css - * @brief Style definitions for the system settings dialog - * @author Christian Reiner - */ - -#shorty img { - vertical-align: middle; - margin:0; - padding:0; -} -#shorty .aspect { - display: inline-block; - font-weight: bold; - width: 6em; - margin: 0 0.2em 0.4em; -} - -#shorty .explain { - display: inline-block; - font-style: italic; - margin: 0.3em; -} - -#shorty .example { - font-family: Monospace; - margin: 0.3em; - text-decoration: underline; - color: blue; -} - -#shorty .title { - margin-bottom: 0.6em; -} diff --git a/apps/shorty/css/shorty.css b/apps/shorty/css/shorty.css deleted file mode 100644 index b071f06f77f..00000000000 --- a/apps/shorty/css/shorty.css +++ /dev/null @@ -1,488 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file css/shorty.css - * @brief Style definitions of the plugins own view - * @author Christian Reiner - */ - -/* everything :-) */ -#content { overflow: auto; } - -/* a case sensitive help button */ -#content #controls #help { -/* float:right; */ -} -/* adapt optical appearance in case the help button is pushed into the header */ -#header #help { - float:right; - background-color:blue; -} - -/* the shorty desktop, a canvas, contains all elements except of those pushed into the header */ -#desktop { - display: inline-block; - position: absolute; -/* width: 100%; height: 100%; */ - background: transparent; - text-align: left; - margin-top: 30px; - padding: 2.5em 0.5em; - padding-top: 20px; -} -/* top bar, holding main control elements */ -#controls { - display: none; -} -/* a dialog for verification of the static backend setup */ -#verification { - overflow: hidden; -} -#verification p { - padding-bottom:0.4em; -} - -/* an activity visualizer, currently a 'rotating timer wheel' */ -#hourglass { - display: none; - position: absolute; - width: 100%; height: 100%; - z-index: 1; - background: transparent; -} -#hourglass img { - margin:4em 8em; -} -/* a replacement list visualized in case the 'real' list is empty */ -#vacuum { - display: none; - position: absolute; - left:8em; top:9em; - width: 100%; height: 100%; - z-index: 2; - white-space: nowrap; - font-style: italic; - background: transparent; -} -.shorty-standalone #busy { - display: none; - float: right; -} - -/* the list of shorties */ -#list { - display: inline; - position: absolute; - z-index: 3; - margin: 0.4em; - background: transparent; - table-layout: fixed; - width: 100%; -} -/* the collapsable toolbar below the lists column title row */ -#list thead #toolbar img { - cursor: pointer; - vertical-align: middle; -} -#list thead #toolbar img.shorty-sorter { - opacity:0.6; -} -/* last column in the list, content usually invisible, except when hovered */ -#list thead #toolbar img.shorty-active { - border:1px solid #888888; - border-radius: 0.3em; -} -#list thead tr:nth-child(2) > th { - padding-bottom:0.5em; -} -/* somewhat more fixed layout for the table */ -#list thead #titlebar th span { - display:inline-block; -} -#list tbody th#title, -#list tbody td#title, -#list tbody th#target, -#list tbody td#target { - width:10em; -} -#list thead #clicks span { - width:3em; -} -#list thead #until span { - width:5em; -} -#list thead #toolbar input, -#list thead #toolbar .chzn-container { - width:6em; - font-size: 11px; - margin: 0; - padding: 0.4em 0.3em 0.2em; - vertical-align: baseline; - background-color:#FFFFFF; -} - -/* column title apeparance */ -#list thead th { - font-weight: bold; - padding: 1px 6px; -} -#list thead th#clicks, -#list thead th#until, -#list thead th#actions { - text-align: center; -} -/* hide the dummy row */ -#list thead tr:last-child { display: none; } -/* hide the content of the 'actions' column, except when being hovered */ -#list tbody tr td span.shorty-actions { - visibility:visible; - opacity:0; - transition: opacity 500ms; - -moz-transition: opacity 500ms; - -webkit-transition: opacity 500ms; - -ms-transition: opacity 500ms; - -o-transition: opacity 500ms; - width:100px; - overflow:auto; -} -#list tbody tr:hover td span.shorty-actions { - opacity:1; - transition: opacity 500ms; - -moz-transition: opacity 500ms; - -webkit-transition: opacity 500ms; - -ms-transition: opacity 500ms; - -o-transition: opacity 500ms; -} -/* highlight a specific, 'clicked' row in the list */ -#list tbody tr.clicked { - border-radius: 0.5em; - background-color:#EEEEEE; - box-shadow: 0 0 0.5px #777777; - transition: background-color 500ms; - -moz-transition: background-color 500ms; - -webkit-transition: background-color 500ms; - -ms-transition: background-color 500ms; - -o-transition: background-color 500ms; -} -/* strike through visible content of rows (entries) marked as deleted */ -#list tbody tr.deleted>#title, -#list tbody tr.deleted>#target, -#list tbody tr.deleted>#clicks, -#list tbody tr.deleted>#until { - color: gray; - text-decoration: line-through; - background: transparent url('%appswebroot%/apps/shorty/img/status/strike.png') 0 50% repeat-x; -} -/* replace the 'delete' action icon by an 'undelete' icon */ -#list tbody tr.deleted>#actions #del:after { - content: url("%appswebroot%/apps/shorty/img/actions/recycle.png"); - position: relative; - top: 3px; - margin-left: -19px; - padding: 0; - opacity: 0; -} -#list tbody tr.deleted:hover>#actions #del>img { - opacity: 0; -} -#list tbody tr.deleted:hover>#actions #del:after { - opacity: 1; -} -/* general table cell appearance */ -#list tbody td { - padding: 1px 6px; -} -#list tbody td#until { - text-align: center; -} -#list tbody td#clicks { - text-align: right; - margin-right: 0.4em; -} -/* prettyfied select boxes */ -#content span.shorty-select select { - width: 6.4em; - margin: 0; - padding: 0.2em; - opacity:0.8; - border:0 none; - font-size: 10px; -} -#content span.shorty-select { - border: 1px solid #DDDDDD; - border-radius: 0.5em 0.5em 0.5em 0.5em; - box-shadow: 0 1px 1px #FFFFFF, 0 1px 0 #BBBBBB inset; - outline: medium none; - padding: 2px; -} -/* general style of interactive dialogs */ -.shorty-dialog { - display: none; - color: black; - border-bottom-left-radius: 1em; - border-bottom-right-radius: 1em; - box-shadow: 0 2px 1px #777777; - vertical-align:middle; - z-index:100; -} -.shorty-dialog fieldset { - position:relative; - border-bottom-left-radius: 0.5em; - border-bottom-right-radius: 0.5em; - border: 1px solid gray; - padding: 2px 4px 8px; -} -.shorty-dialog br { - clear: left; -} -.shorty-dialog legend { - font-weight: bold; - margin: 0 0 0 5px; - padding: 0 0.5em 0 0.2em; -} -.shorty-dialog legend a { - padding: 0; -} -.shorty-dialog textarea { - width: 80%; height: 5em; - background: none repeat scroll 0 0 #F8F8F8; - color: #555555; - border: 1px solid #DDDDDD; - border-radius: 0.5em; - cursor: text; - vertical-align:baseline; - margin: 0.3em; -} -.shorty-dialog textarea:hover, -.shorty-dialog textarea:active { - background-color: #FFFFFF; - color: #333333; - opacity: 1; -} -.shorty-dialog input { - width: 80%; -} -.shorty-dialog a, -.shorty-dialog input, -.shorty-dialog select, -.shorty-dialog textarea, -.shorty-dialog button { - padding: 0.4em 0.2em; -} -.shorty-dialog input[readonly], -.shorty-dialog select[readonly], -.shorty-dialog textarea[readonly], -.shorty-dialog button[readonly] { - border: 0 none; -/* box-shadow: 0 0 0; */ - box-shadow: 0 0 0 #FFFFFF; - outline: none; - background: none; - background-color: #F7F7F7; - padding: 0.3em 0.3em; -} -.shorty-dialog button#confirm { - width: 12em; height: 2em; - border: 1px solid lightgray; - background-color: #EEEEEE; -} -.shorty-dialog button#confirm.sharp { - background-color: white; -} -.shorty-dialog button#confirm.sharp:hover { -/* border-color: green; */ - border: 1px solid gray; -} - -/* dialogs floating above other content ('standing alone') */ -.shorty-standalone { - width: 46em; - margin: -1px 1em 0; - padding: 0.5em; - background: none repeat scroll 0 0 #F7F7F7; -} -.shorty-standalone fieldset { - width: 45em; -} -/* dialogs related to elements ('embedded in the content') */ -.shorty-embedded { - left: 6em; - width: 34em; - margin: -1px 4em 0; - padding: 0.5em; - background: none repeat scroll 0 0 #EEEEEE; - position: absolute; -} -.shorty-embedded fieldset { -/* width: 32em; */ -} -.shorty-embedded a#source, -.shorty-embedded a#relay, -.shorty-embedded a#target { - display: inline-block; - width: 26em; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - vertical-align: middle; -} -.shorty-embedded a.shorty-clickable:before { - content:url("%appswebroot%/apps/shorty/img/actions/external.png"); - margin-right:0.3em; -} -.shorty-embedded select { - margin: 0 0 0.2em 1.0em; - padding: 0.2em 0.4em 0.2em 0.2em; - border: 0 none; - background-color: #F4F4F4; -} -.shorty-embedded img.shorty-usage { - opacity: 0.6; - margin: 1em 1.5em 0.2em; - padding: 0; -} -.shorty-embedded img.shorty-usage.disabled { - opacity: 0.2; -} -.shorty-embedded img.shorty-usage:not(.disabled):hover { - cursor: pointer; -} -.shorty-dialog label { - display: inline-block; - clear:none; - width: 5.5em; - text-align: left; - vertical-align: baseline; - padding: 0.6em 0.5em 0.4em 0.3em; - cursor: default; -} -.shorty-dialog span { - padding: 0.6em 0.5em 0.4em 0.3em; -} -.shorty-dialog span.label-line { - display: inline; - clear: none; - margin: 0; - padding: 0; -} -/* elements (rows) freshly added to the list, this calss might trigger visual effects like pulsation */ -.shorty-fresh { - display: none; -} -/* elements (rows) currently filtered out (toolbars column filter options) */ -.shorty-filtered { - display: none; -} -/* style of all icons (as opposed to all images) */ -.shorty-icon { - display: inline; - background: transparent; - vertical-align: middle; - padding: 1px; -} -/* dim entries with expired 'until' dates */ -.shorty-expired { - color: gray; -} -/* but keep embedded dialogs readable */ -.shorty-expired .shorty-dialog { - color: black; -} -.shorty-expired img { - opacity : 0.2; -} -.shorty-expired .shorty-dialog img { - opacity : 1; -} -.shorty-expired #until { - text-decoration: line-through; -} -/* some general style flavours */ -.shorty-prompt { - margin-left: 4px; -} -.shorty-value { - margin-right: 4px; -} -.shorty-single { - padding: 0.5em 1em; -} -.shorty-single:hover { - background-color: #EAEAEA; -} -.shorty-single:hover .shorty-actions { - display: block; -} -.shorty-id { - color: black; -} -.shorty-date { - width: 40%; -} -.shorty-notes { - color: blue; - text-decoration: none; -} -.shorty-source { - color: gray; -} -.shorty-target { - color: green; -} -.shorty-meta { - margin: 0.1em; -} -/* close buttons in dialogs, embedded or standalone */ -.shorty-close-button { - display:inline; - float:left; - margin:0 0.8em 0 0.3em; - padding:0; -} -.shorty-close-button img { - vertical-align: middle; - margin:0; - padding:0; -} -/* unlike elsewhere we underline clickable links in dialogs */ -.shorty-clickable { - white-space: nowrap; - text-decoration: underline; -} -.shorty-framed { - display:inline-block; - padding:1em; - background-color:white; - border:1px solid black; -} -/* keep long entries like urls from disrupting the compact appearance of the list */ -.ellipsis { - display: block; - overflow: hidden; - white-space: nowrap; - text-overflow: ellipsis; - width: inherit; -}
\ No newline at end of file diff --git a/apps/shorty/doc/CHANGELOG b/apps/shorty/doc/CHANGELOG deleted file mode 100644 index b1b09b50fb8..00000000000 --- a/apps/shorty/doc/CHANGELOG +++ /dev/null @@ -1,59 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -Changelog: - -* Wed Jun 06 2012 Christian Reiner: version 0.2.2 -Added swallowing of accidential outputs during ajax requests. -This protects the replies JSON struction from being corrupted. -Additional server side log entries on level INFO -* Sat Jun 02 2012 Christian Reiner: version 0.2.1 -Fixed broken Shortlet -* Fri Jun 01 2012 Christian Reiner: version 0.2.0 -Support of ownCloud version 4 (app interface incompatible to prior versions) -Additional status 'private' for Shortys only accessible for the owner himself -Rudimentary SMS support for smart phones (more an assistance, can be disabled) -Additional QRCodes to publish Shorty source urls on the web (or elsewhere) -Data migration support as introduced by OC4 -Cleanup of Shortys upon user account deletion -* Sun May 28 2012 Christian Reiner: version 0.1.6 -Activation of Shorty sharing via SMS. -Enhanced backend descriptions. -* Sat Apr 28 2012 Christian Reiner: version 0.1.5 -Target url verification is less strict now, this way also more 'exotic' urls notations are accepted. -A few changes to the initilization scripts to prevent race conditions at startup. -Changed url specification in the Shortlet to prevent conflicts with a serverside suhosin protection. -* Fri Apr 27 2012 Christian Reiner: version 0.1.4 -Visualization of busy state in dialogs whilst fetch meta data from targets. -* Fri Apr 27 2012 Christian Reiner: version 0.1.3 -Prevented untimely submission of dialogs before having validated their contents. -* Fri Apr 27 2012 Christian Reiner: version 0.1.2 -Fixed race conditions during initialization. -* Thu Apr 26 2012 Christian Reiner: version 0.1.1 -Minor appearance corrections. -* Wed Apr 25 2012 Christian Reiner: version 0.1.0 -First official release. -* Tue Apr 24 2012 Christian Reiner: version 0.0.9 -Initial release. -Buggy, but some parts actually working. diff --git a/apps/shorty/doc/CONFIGURATION b/apps/shorty/doc/CONFIGURATION deleted file mode 100644 index 2a7dab60d19..00000000000 --- a/apps/shorty/doc/CONFIGURATION +++ /dev/null @@ -1,113 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -There are five aspects that can be configured: -1.) System wide "static backend" (optional) -2.) Selection of a backend per user (optional) -3.) Import of the "shortlet" into a web browser (optional) -4.) Access control inside each single "shorty" (implicit) -5.) Sending of Shortys as SMS - -1.) System wide "static backend" (optional) -(Requires adminisstrative rights) -This optional setting enables a 'static backend'. That is a backend generting -source urls based on a static base url, thus the name. That base url should be -chosen as short as possible, since this defines the total length of all links -to be posted and used. Most likely the definition of that url requires the -configuration of rewrite rules on the server side. So it is only an option for -experienced adminsitrators with access to the server configuration, be it -centralized or based on decentralized per-directory rules (".htaccess files"). -A basic example is packed in the .htaccess file (might be hidden in a directory -listing because of the leading dot (.) in the name). The rules must be -configured such that all requests to urls of the scheme <base url><shorty key> -are mapped directly onto the web url of the shorty plugin -(http://<domain>/<owncloud>/apps/shorty/). The <shorty key> is a string, 6-12 -characters long, hard to predict. It is guaranteed to be unique throughout the -system (though in a technically crude manner...). The perfect situation for the -definition of a meaningful static backend would be a domain with a very short -name and configuration access to something close to the web root. -A random example is my own domain "christian-reiner.info". Since that is not -exactly short I would love to use the additional domain "c-r.info" for the sole -purpose of a static backend. Unfortunately that domain has been reserved by a -domain grabber who asks thousands of Euros for it ! So that's no option. At -least you should try to find a setup where the web path of the ownCloud -application is not part of the base url. So that you get something like -http://<domain name>/<shorty key>. -(Note that the shorty key is NOT part of the base url configuration). -You can easily test your setup any time by clicking on the example dynamically -visualized next to the configuration option. It runs a simple self-tests of the -setup in background. -There is no need that the base url must be served by the same http server that -serves the owncoud system. A static rewrite setup may well forward short source -urls to the shorty plugin inside a remote ownCloud installation. However, it is -a known issue that the internal validation of the setup won't work with such -scenario. - -2.) Selection of a backend per user (optional) -To generate the a source url that is part of every shorty the plugin uses a -backend. The configuration is done by using a preference option in the personal -preference section of the configuration. You can simply chose one of the -offered backends (combo box). Changing the backend does not affect any -previously generated shorties. Meaning they stay valid and usable and keep -their once defined source url. - -Different backends are implemented: -i.) "-none-" -As you have guessed this is something like a "dummy" backend without any -implemented logic. That means the source urls generated are exactly based on -the web url of the shorty plugin in your ownCloud system. This is not a very -clever setup, but it certainly works and keeps your data private. -ii.) "static backend" -If configured in the system administration a "static backend" is offered. For a -description see C-1. This backend typically offers shorter source urls, but its -setup required administrative rights on some http server system. -iii.) online services (url shorteners) -A few online services are offered as backends to generate short source urls. -Usage of some of those services requires you to open a free account at their -site. Detailed configuration requirements are displayed for the chosen backend. -If you don't care for details and just want short urls then have a try with the -tin.ny backend. No registration required, reliable service. But keep in mind -you depend on an external service as opposed to using a local static backend. - -3.) Import of the "shortlet" into a web browser (optional) -Shorty comes with a neat little "Shortlet" offered in the personal preferneces -section of ownCloud. It is a "button" you can import into your web browsers -bookmark toolbar or area by simple drag & drop. The Shortlet should work with -most modern browsers, though probably not all. Just have a try with it. - -4.) Access control inside each single "shorty" (implicit) -There are a few attributres you can configure freely inside each stored shorty: -- a title just shown inside the shorty plugin (serves recognition). -- a notes area, maybe you want to write down whom you send the shorty ? -- a status option that controls the usage of the shorty. - -5.) Sending of Shortys as SMS -Besides sending of Shortys as email message and copying a Shortys source url -to the clipboard a third action can be enabled inside the sharing dialog: -To send a Shortys source url as SMS. -However, the approach is extremely minimalistic, it relies on the client system -to correctly handle a 'sms url'. This is typically only given on a mobile -device, a smart phone. In addition, such url does not allow to specify a message -body, so the Shortys source url has to be copied and pasted manually. -The option is disabled by default. diff --git a/apps/shorty/doc/COPYRIGHT b/apps/shorty/doc/COPYRIGHT deleted file mode 100644 index 5e501826f28..00000000000 --- a/apps/shorty/doc/COPYRIGHT +++ /dev/null @@ -1,23 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** diff --git a/apps/shorty/doc/CREDITS b/apps/shorty/doc/CREDITS deleted file mode 100644 index 8f7a3dd037c..00000000000 --- a/apps/shorty/doc/CREDITS +++ /dev/null @@ -1,32 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -The shorty plugin has been developed by: - -Christian Reiner, Hamburg, Germany -E-Mail: foss@christian-reiner.information - -Contributions: -I'd be more than happy to welcome all contributions to this little experiment. -Drop me a note, an idea, a patch, a good bottle of wine, anything ! diff --git a/apps/shorty/doc/INSTALLATION b/apps/shorty/doc/INSTALLATION deleted file mode 100644 index 0a98605376a..00000000000 --- a/apps/shorty/doc/INSTALLATION +++ /dev/null @@ -1,53 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -This package is a plugin for the ownCloud web application ("ownCloud app"). - -There are two ways of installation: automatic and manual - -* Automatic installation: -You need login to your ownCloud using an account with administrative rights. -Open the 'Apps' section of the adminstration and select 'shorty', enable it. -Then go on below with the basic configuration steps. - -* Manual installation: -Download the package from here: -http://apps.owncloud.com/content/show.php/Shorty?content=150401 -Create a subfolder 'shorty' in the "apps" subfolder of your ownCloud web root. -Unpack the contents of the package into the new folder 'shorty'. -Now load ownCloud in your favorite web browser and login with an administrative -account. -Enable the plugin in the "Apps" section of the configuration ("*") inside -ownClouds web gui (requires admin rights). - -* Basic configuration steps for BOTH types of installation: -The "Admin" section of the configuration allows to configure a base url to -enable usage of the static backend (see USAGE). -The "Preferences" section of that configuration now offers two elements: -- a "Shortlet" to be dragged to the browsers bookmark area (see USAGE). -- a configuration of a backend to use to generate source urls (see USAGE). -The main part of the plugin can be accessed in the navigation menu as "Shorty". - -*** -Have fun ! diff --git a/apps/shorty/doc/ISSUES b/apps/shorty/doc/ISSUES deleted file mode 100644 index 083c4648636..00000000000 --- a/apps/shorty/doc/ISSUES +++ /dev/null @@ -1,58 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -This is a short list of known issues: - -- The datepicker popup in the edit dialog fails to set the expiration date: -I have no idea what the problem is. Exactly the same object works flawlessly -in the dialog to create a new shorty. I can't see any difference, except in -the edit dialog the date is taken from the existing row entry (working fine). -Maybe there is some sort of magic spell to awake a datepicker after changing -its date value ? No idea... - -- Clicking on a source or relay url from within the sharing dialog updates the -clicks counter and access time correctly, but the shown list entry is not -updated accordingly. - -- Shorty does not work in the konqueror web browser -All appears to be working fine except for one annoying thing: -the standalone dialogs won't open ! (show, create and edit entries) -Therefore Shorty is currently more or less useless in this browser. - -- Shorty does not work in the rekonq web browser -The basic navigation elements (menu left) work, but the desktop stays empty. -Apparently no script is executed, an issue with the js document.ready event. - -- It appears there is an issue with setting opacity in the Safari browser: -The status filter in the lists toolbar shows an ugly black brick instead of a -dimmed icon overlay. Also some other style issues appear, but the plugin seems -to be completely usable. - -- When internally validating the setup of the base url used in the static -backend you get a false positive ("doesn't work") although things are fine, if -the mapping of base url to shorty plugin is done via a redirect. This is for -exaple the case if you implement the mapping on a remote server because you -want to use a different domain name for statically shortened urls. -The reason is that jqueries ajax calls won't handle redirects internally. A -wrapper will have to be implemented. diff --git a/apps/shorty/doc/README b/apps/shorty/doc/README deleted file mode 100644 index 4f590f30cd0..00000000000 --- a/apps/shorty/doc/README +++ /dev/null @@ -1,42 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -This "shorty" package implements a plugin for the ownCloud web application. -Shorty offers a service to store, manage and use a collection of short links -pointing to ressources in the web. The features are a combination of a -centralized bookmarks collection, an url shortener and a basic access control. -The collection is presented as a list of "shorties". A shorty can be created -either manually in the list ("New shorty") or by using the "Shortlet". The -Shortlet is something like a Bookmarklet, a script based bookmark meant to be -stored inside the bookmark collection of a web browser. When clicked, the page -currently open in the browser will be added to the list of existing shorties. - -Each Shorty contains a source and a target url. The source url can be used to -be posted in forums, sent inside an email message or whatever. It is typically -shorter than the target url, a full blown web url. But that actually depends -on the target url and the backend used. The target url is the ressource -identified by the shorty. Basic access control is implemented to control the -access of shorties posted to forums or sent per email, but not on a per user or -per group base. Existing shorties can be blocked for usage, set to expire on a -certain date and obviously can be removed permanently again. diff --git a/apps/shorty/doc/ROADMAP b/apps/shorty/doc/ROADMAP deleted file mode 100644 index b18099c9af2..00000000000 --- a/apps/shorty/doc/ROADMAP +++ /dev/null @@ -1,96 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -Future versions might implement additional features and services. Currently -planned are the following: - -* Ability to create Shortys directly from shared files inside ownCloud -Creating a Shorty based on the public url generated for shared files works like -charm. However it is not very convenient to do that manually. It would be great -to offer that option directly where file sharing is done, in that very dialog. -However I currently do not see any means to achieve that on ownCloud. There is -no feature offered to hook additional functionality into exsiting apps. -This means either the existing file sharing app has to be modified or such a -modifying core feature has to be implemented into the ownCLoud core. -Or maybe someone has got another idea ? - -* Integrated proxy function as an alternative to forwarding: -Currently all browser requests are forwarded to the final target url, provided -that the referenced shorty is still valid and accessible. This is a simple but -effective strategy. Offering a transparent proxy service as an alternative -would greatly enhance the privacy protection, since the final target url of a -referenced web ressource would never be handed out. - -* Better, more fine grained access control: -Currently the only means of access control, apart from defining or removing a -shorty are its "status". The status can block an otherwise valid shorty from -usage from outside ownCloud, it can restrict its access to authenticated users -or it can make an existing shorty freely accessible to the public. Other -ownCloud plugins allow to define individual access to content on per-user or -per-group rules. - -* Support of further backends: -Currently the usage of six url shortener services is implemented, besides the -two private or local ones. Unfortunately three of these had to be disabled due -to stability issues. Besides correcting the implementation for the disabled it -might make sense to support further backends, especially other types besides -online services. - -* Performance, stability and usability enhancements: -"Shorty" is my first web application using up to date web technologies. -Therefore the implementation certainly is far from the quality one could expect -from a serious and experienced web developer. One could also put this into more -constructive terms: there is definately much room for enhancements :-) - -* Translations of the shorty module itself (i18n/l10n): -Main development language is english (us), a german translation exists. I do -not feel fit enough in other languages to create a translation myself. So I -certainly welcome any assistance in that aspect. The effort consists of editing -one single file, take a look at the german example in file l10n/de.php. - -* Usage of svg icons instead of png graphics: -I created all icons in svg format. ownCloud implements a mechanism to use those -in browsers supporting svg directly. However I did not yet figure out how to -use that feature without adding too much scripting overhead. Is it possible -to reference icons the ownCloud way directly in a php based template, without -the need to explicit handling via javascript ? -I wish a better API documentation would exist for ownCloud ! - -* Localization for the date picker fields -Currently date inputs (expiration date) are not validated explicitly. -A number of formats work, are accepted correct, but there is no localization -of the input format to the users language. - -* Integrated help button -One thing I miss throughout the ownCloud application is a context sensitive -help, or a help button at all ! Originally I planned to integrate on into this -plugin. However I think that is more something that should be implemented as a -core feature of ownCloud. Maybe as a separate plugin (app). SOmehing like a -help framework with a documented api where other plugins (and core apps) can -attach help texts or documents to. Context sensivity would then simply mean to -update the reference in the help button for each action taken. - -Contributions: -I'd be more than happy to welcome all contributions to this little experiment. -Drop me a note, an idea, a patch, a good bottle of wine, anything ! diff --git a/apps/shorty/doc/STATUS b/apps/shorty/doc/STATUS deleted file mode 100644 index 0b85d147028..00000000000 --- a/apps/shorty/doc/STATUS +++ /dev/null @@ -1,42 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -The current status of this package is as follows: - -The initial release is definately buggy and contains annoying shortcomings. -It has been developed on a linux system using a firefox browser, so this is -most likely the best working combination. Basic usage test have been made with -a few other browsers. The package appears to be working in general though there -might be some minor differences in apeparance. - -Known shortcomings are: -- only very basic input validation is done. -- access control is not yet fine grained, no user or group support exists. -- markup, scripting and style definitions are the work of a web app newbie. - -So "sorry for any inconveniences" ! - -Contributions: -I'd be more than happy to welcome all contributions to this little experiment. -Drop me a note, an idea, a patch, a good bottle of wine, anything ! diff --git a/apps/shorty/doc/USAGE b/apps/shorty/doc/USAGE deleted file mode 100644 index a82f881992a..00000000000 --- a/apps/shorty/doc/USAGE +++ /dev/null @@ -1,64 +0,0 @@ -***** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -***** - -=== Overview === -See file README. - -=== Installation === -See file INSTALLATION. - -=== Requirements === -ownCloud version 2 or newer on the server side. -A css3 capable and reasonably standards conform web browser. -A scripting capable bookmarks feature for the optional Shortlet thing. - -=== Usage === -This is only a very basic description. The plugin should be fairly intuitive to -use, just have a try with a few web urls. To get going I suggest that you -- chose a backend (see configuration below). -- import the shortlet into your preferred web browser (see configuration below). -- define a few shorties either manually ("New") or by using the shortlet. -All actions on existing shorties are accessed using the action icons shown to -the right of the shorty in the list. Daily uses is probably based on selection -the 'share' action and grabbing the visualized "source url". -By clicking on the header row of the list of shorties you can open (and close) -a "toolbox" offering options to sort, filter and reload the list. The sorting -you chose is stored in a persistant manner, not so any filters defined. You -cannot accidentially close the toolbox when there are still filters active. -You can remove (delete) existing shorties, but those shorties will only be -marked as deleted. This way you can 'undelete' them if required. Permanent -removal is done next time you access the shorty plugin. If you really want to -make sure the removal is done NOW then simply reload the list. This is done in -the "toolbox" of the list (click on the header row) by chosing the "reload" -icon on the left (or by a simple browser reload). - -=== PRIVACY === -Shorty allows you to stay more in control over links you post or send. It is up -to you to decide wether a once posted link should stay valid and usable or not. -However it is also very important to keep in mind that such form of control can -never replace any serious form of access control over the content published via -a published link. Shorty works as a short url resolver, meaning it forwards any -requesting web browser to the real address of the published content. This might -change when if future an integrated proxy function gets implemented, as opposed -to the current forwarding mechanism. diff --git a/apps/shorty/img/actions/down.png b/apps/shorty/img/actions/down.png Binary files differdeleted file mode 100644 index d2627e525ee..00000000000 --- a/apps/shorty/img/actions/down.png +++ /dev/null diff --git a/apps/shorty/img/actions/down.svg b/apps/shorty/img/actions/down.svg deleted file mode 100644 index b01642681c1..00000000000 --- a/apps/shorty/img/actions/down.svg +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="layer1"> - <path id="path3086" transform="matrix(0.000287724 1 -1 0.000287724 13.9983 1.99816)" fill="#000000" d="M2.22045e-15 0L12 6L0 12Z"/> - </g> -</svg> diff --git a/apps/shorty/img/actions/external.png b/apps/shorty/img/actions/external.png Binary files differdeleted file mode 100644 index 5da1c41c45d..00000000000 --- a/apps/shorty/img/actions/external.png +++ /dev/null diff --git a/apps/shorty/img/actions/external.svg b/apps/shorty/img/actions/external.svg deleted file mode 100644 index 32453b1ca29..00000000000 --- a/apps/shorty/img/actions/external.svg +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="9.6pt" height="9.6pt"> -<defs/> -<g id="defitem0"> - <rect id="rect" transform="translate(1.5, 4.5)" fill="#ffffff" stroke="#585858" stroke-width="1.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="4.00000000000" width="4.80000000000pt" height="4.80000000000pt"/> - <path id="arrow" transform="translate(2.75, 1)" fill="#303030" fill-rule="evenodd" d="M1.25 1.5L2.25 2.5L2.5 3.25L0 5.5L2.75 8.25L5 5.75L5.75 6L6.75 7L8.25 5.5L8.25 0L2.75 0Z"/> - <path id="gap" transform="translate(4, 2)" fill="#ffffff" fill-rule="evenodd" d="M2 0L6 0L6 4L5.5 4.75L4.25 2.75L1.25 6L0 4.75L3.25 1.75L1.25 0.5Z"/> - </g> -</svg> diff --git a/apps/shorty/img/actions/info.png b/apps/shorty/img/actions/info.png Binary files differdeleted file mode 100644 index 2febafa33e5..00000000000 --- a/apps/shorty/img/actions/info.png +++ /dev/null diff --git a/apps/shorty/img/actions/info.svg b/apps/shorty/img/actions/info.svg deleted file mode 100644 index e92ab4fbf0f..00000000000 --- a/apps/shorty/img/actions/info.svg +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="595.277pt" - height="841.891pt" - id="svg2" - version="1.1" - inkscape:version="0.48.2 r9819" - sodipodi:docname="info.svg" - inkscape:export-filename="/srv/www/htdocs/owncloud/apps/shorty/img/actions/info.png" - inkscape:export-xdpi="1.4732735" - inkscape:export-ydpi="1.4732735"> - <metadata - id="metadata11"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title></dc:title> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="640" - inkscape:window-height="480" - id="namedview9" - showgrid="false" - inkscape:zoom="0.22425706" - inkscape:cx="372.0481" - inkscape:cy="526.18188" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="0" - inkscape:current-layer="svg2" /> - <defs - id="defs4" /> - <g - id="layer0" - transform="matrix(1,0,0,0.92242868,0,1.2000589)"> - <g - id="g4314" - transform="translate(212.946,163.839)" - style="fill:none"> - <path - id="path3536" - transform="translate(-61.9006,-148.543)" - d="m 0,487.048 c 12.4425,24.828 26.0633,44.836 51.6189,16.019 C 84.1849,485.573 192.482,410.026 184.704,480.779 155.218,612.203 117.891,742.51 90.9063,874.249 59.539,946.936 141.764,1009.03 222.092,959.781 308.42,926.996 381.595,875.821 456.598,828.62 445.035,807.645 436.536,777.24 408.795,806.094 371.289,821.672 291.128,891.94 272.933,836.765 298.192,694.682 351.067,556.912 382.294,415.755 414.151,350.273 353.103,270.879 270.187,326.914 169.549,367.14 86.8111,430.152 0,487.048 z M 357.158,0.174395 C 252.436,-0.955228 204.536,139.982 305.684,174.775 387.572,199.404 471.99,128.261 449.008,60.7166 441.179,25.4089 401.168,-2.47535 357.159,0.174395 z" - inkscape:connector-curvature="0" - style="fill:#000000" /> - </g> - </g> -</svg> diff --git a/apps/shorty/img/actions/left.png b/apps/shorty/img/actions/left.png Binary files differdeleted file mode 100644 index e76cf4df2ed..00000000000 --- a/apps/shorty/img/actions/left.png +++ /dev/null diff --git a/apps/shorty/img/actions/left.svg b/apps/shorty/img/actions/left.svg deleted file mode 100644 index 670f0c3069a..00000000000 --- a/apps/shorty/img/actions/left.svg +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="layer1"> - <path id="path3086" transform="matrix(-1 0 0 1 14 2)" fill="#000000" d="M0 0L12 6L0 12Z"/> - </g> -</svg> diff --git a/apps/shorty/img/actions/minus.png b/apps/shorty/img/actions/minus.png Binary files differdeleted file mode 100644 index 72ee0f69ff2..00000000000 --- a/apps/shorty/img/actions/minus.png +++ /dev/null diff --git a/apps/shorty/img/actions/open.png b/apps/shorty/img/actions/open.png Binary files differdeleted file mode 100644 index 54cdd3a2a4c..00000000000 --- a/apps/shorty/img/actions/open.png +++ /dev/null diff --git a/apps/shorty/img/actions/open.svg b/apps/shorty/img/actions/open.svg deleted file mode 100644 index 46e137d73f9..00000000000 --- a/apps/shorty/img/actions/open.svg +++ /dev/null @@ -1,10 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon14, part of koffice: http://www.koffice.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> - <defs> - </defs> - <g id="layer1"> - <path id="path3086" fill="#000000" d="M9 14L5 14L4 7L0 7L7 0L14 7L10 7Z" transform="matrix(0.704343 0.70986 -0.70986 0.704343 8.03052 -1.90816)" /> - </g> -</svg> diff --git a/apps/shorty/img/actions/plus.png b/apps/shorty/img/actions/plus.png Binary files differdeleted file mode 100644 index f18d9c6c31a..00000000000 --- a/apps/shorty/img/actions/plus.png +++ /dev/null diff --git a/apps/shorty/img/actions/recycle.png b/apps/shorty/img/actions/recycle.png Binary files differdeleted file mode 100644 index 29444fd7fd9..00000000000 --- a/apps/shorty/img/actions/recycle.png +++ /dev/null diff --git a/apps/shorty/img/actions/recycle.svg b/apps/shorty/img/actions/recycle.svg deleted file mode 100644 index 61ee3ac8409..00000000000 --- a/apps/shorty/img/actions/recycle.svg +++ /dev/null @@ -1,93 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="119.308pt" - height="121.472pt" - id="svg2" - version="1.1" - inkscape:version="0.48.2 r9819" - sodipodi:docname="recycle_arrows.svg"> - <title - id="title2987">recycle</title> - <metadata - id="metadata10"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - <dc:title>recycle</dc:title> - <cc:license - rdf:resource="http://creativecommons.org/licenses/by/3.0/" /> - <dc:date>2012</dc:date> - <dc:creator> - <cc:Agent> - <dc:title>Christian Reiner</dc:title> - </cc:Agent> - </dc:creator> - <dc:rights> - <cc:Agent> - <dc:title>Copyright 2012: Christian Reiner</dc:title> - </cc:Agent> - </dc:rights> - <dc:description>recycle</dc:description> - </cc:Work> - <cc:License - rdf:about="http://creativecommons.org/licenses/by/3.0/"> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Reproduction" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#Distribution" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Notice" /> - <cc:requires - rdf:resource="http://creativecommons.org/ns#Attribution" /> - <cc:permits - rdf:resource="http://creativecommons.org/ns#DerivativeWorks" /> - </cc:License> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="965" - inkscape:window-height="679" - id="namedview8" - showgrid="false" - inkscape:zoom="1.5542677" - inkscape:cx="74.567497" - inkscape:cy="75.919998" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="0" - inkscape:current-layer="svg2" /> - <defs - id="defs4" /> - <g - id="layer0" - transform="matrix(-1,0,0,1,149.13468,0)" - inkscape:export-xdpi="9.6599998" - inkscape:export-ydpi="9.6599998" - inkscape:export-filename="/home/arkascha/Downloads/icons/recycle.png"> - <path - id="path1298" - d="M 70.8025,151.722 C 37.2549,149.448 11.1077,128.26 2.59247,96.4481 -1.14036,82.5027 -0.820931,65.3241 3.41386,52.2741 10.1512,31.5121 26.9843,13.3207 46.7093,5.48511 82.2059,-8.61567 120.257,5.14042 139.563,39.0531 c 7.34,12.8923 10.355,26.3175 9.4,41.853 -0.76,12.368 -2.629,19.5529 -7.945,30.5419 -3.422,7.074 -5.716,10.094 -13.664,18 -6.689,6.653 -11.649,10.604 -16.551,13.184 -12.0281,6.329 -27.8135,9.916 -40.0005,9.09 z m 4.5,-19.274 0.5,-7.481 5.5,-0.737 c 12.7535,-1.708 24.6295,-7.529 34.4625,-16.892 11.858,-11.2904 18.207,-24.78 19.251,-40.9052 0.739,-11.3966 -0.975,-20.6043 -5.72,-30.7354 C 122.022,20.167 104.421,6.43624 87.9323,3.42918 78.3665,1.68465 61.6527,2.66382 53.3025,5.45794 32.3445,12.4709 14.6307,28.9197 7.32185,48.1551 c -8.71433,22.9342 -5.7724,50.0896 7.63305,70.4559 4.2466,6.452 11.0409,13.477 12.0541,12.464 0.2731,-0.273 -1.1342,-3.139 -3.1273,-6.368 -6.2607,-10.143 -10.5792,-24.58 -10.5792,-35.3665 0,-5.978 2.4851,-18.5157 4.962,-25.0345 6.7044,-17.6444 24.9878,-32.6283 45.6647,-37.4235 3.7707,-0.8745 7.4223,-2.0601 8.1146,-2.6347 0.7686,-0.6379 1.2587,-3.5049 1.2587,-7.3632 0,-3.4751 0.4448,-6.5934 0.9885,-6.9294 1.3812,-0.85363 8.7657,2.5714 15.6814,7.2734 7.1284,4.8465 13.9516,12.0276 19.3896,20.4063 3.307,5.0959 3.997,6.944 3.578,9.5846 -1.425,8.9891 -17.7832,27.9223 -29.4402,34.0753 -3.4665,1.8297 -6.8857,3.1031 -7.5982,2.8297 -0.7624,-0.2926 -1.5662,-3.0878 -1.9535,-6.793 -0.3619,-3.4627 -1.0505,-6.6884 -1.5303,-7.1681 -1.2221,-1.2221 -9.6586,3.2474 -16.2231,8.5948 -9.0772,7.3942 -17.8922,20.3499 -17.8922,26.2968 0,9.067 14.0387,25.185 28.5,32.72 7.3326,3.821 7.9129,3.458 8.5,-5.327 z" - inkscape:connector-curvature="0" - style="fill:#010101" /> - </g> -</svg> diff --git a/apps/shorty/img/actions/reload.png b/apps/shorty/img/actions/reload.png Binary files differdeleted file mode 100644 index 06df1f194e0..00000000000 --- a/apps/shorty/img/actions/reload.png +++ /dev/null diff --git a/apps/shorty/img/actions/right.png b/apps/shorty/img/actions/right.png Binary files differdeleted file mode 100644 index a252a751554..00000000000 --- a/apps/shorty/img/actions/right.png +++ /dev/null diff --git a/apps/shorty/img/actions/right.svg b/apps/shorty/img/actions/right.svg deleted file mode 100644 index 997068063e3..00000000000 --- a/apps/shorty/img/actions/right.svg +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="layer1"> - <path id="path3086" transform="translate(2, 2)" fill="#000000" d="M0 0L12 6L0 12Z"/> - </g> -</svg> diff --git a/apps/shorty/img/actions/shade.png b/apps/shorty/img/actions/shade.png Binary files differdeleted file mode 100644 index a49b9ad34c4..00000000000 --- a/apps/shorty/img/actions/shade.png +++ /dev/null diff --git a/apps/shorty/img/actions/shade.svg b/apps/shorty/img/actions/shade.svg deleted file mode 100644 index 1823941c790..00000000000 --- a/apps/shorty/img/actions/shade.svg +++ /dev/null @@ -1,78 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="no"?> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> - -<svg - xmlns:dc="http://purl.org/dc/elements/1.1/" - xmlns:cc="http://creativecommons.org/ns#" - xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" - xmlns:svg="http://www.w3.org/2000/svg" - xmlns="http://www.w3.org/2000/svg" - xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" - xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" - width="94.337173" - height="94.337173" - id="svg2" - version="1.1" - inkscape:version="0.48.2 r9819" - sodipodi:docname="up.svg"> - <metadata - id="metadata11"> - <rdf:RDF> - <cc:Work - rdf:about=""> - <dc:format>image/svg+xml</dc:format> - <dc:type - rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> - </cc:Work> - </rdf:RDF> - </metadata> - <sodipodi:namedview - pagecolor="#ffffff" - bordercolor="#666666" - borderopacity="1" - objecttolerance="10" - gridtolerance="10" - guidetolerance="10" - inkscape:pageopacity="0" - inkscape:pageshadow="2" - inkscape:window-width="640" - inkscape:window-height="480" - id="namedview9" - showgrid="false" - fit-margin-top="0" - fit-margin-left="0" - fit-margin-right="0" - fit-margin-bottom="0" - inkscape:zoom="0.65555556" - inkscape:cx="76.57817" - inkscape:cy="35.476003" - inkscape:window-x="0" - inkscape:window-y="0" - inkscape:window-maximized="0" - inkscape:current-layer="svg2" /> - <defs - id="defs4" /> - <g - id="layer1" - transform="translate(-103.42183,-121.13883)"> - <path - id="shape0" - transform="translate(132.93,152.141)" - d="m 0,28.8704 35.4331,0 L 17.6016,0 z" - inkscape:connector-curvature="0" - style="fill:#000000;fill-rule:evenodd;stroke:#000000;stroke-width:8.58899117;stroke-linecap:round;stroke-linejoin:round" /> - <circle - id="shape1" - transform="translate(106.299,124.016)" - r="44.291416" - cx="44.291416" - cy="44.291416" - stroke-miterlimit="2.00000000000" - sodipodi:cx="44.291416" - sodipodi:cy="44.291416" - sodipodi:rx="44.291416" - sodipodi:ry="44.291416" - style="fill:none;stroke:#000000;stroke-width:5.75434065;stroke-linecap:square;stroke-linejoin:miter;stroke-miterlimit:2" - d="m 88.582832,44.291416 c 0,24.461474 -19.829942,44.291416 -44.291416,44.291416 C 19.829942,88.582832 0,68.75289 0,44.291416 0,19.829942 19.829942,0 44.291416,0 68.75289,0 88.582832,19.829942 88.582832,44.291416 z" /> - </g> -</svg> diff --git a/apps/shorty/img/actions/up.png b/apps/shorty/img/actions/up.png Binary files differdeleted file mode 100644 index c878f84396c..00000000000 --- a/apps/shorty/img/actions/up.png +++ /dev/null diff --git a/apps/shorty/img/actions/up.svg b/apps/shorty/img/actions/up.svg deleted file mode 100644 index 728243b3b5d..00000000000 --- a/apps/shorty/img/actions/up.svg +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="layer1"> - <path id="path3086" transform="matrix(0.000287724 -1 -1 -0.000287724 13.9983 14.0016)" fill="#000000" d="M2.22045e-15 0L12 6L0 12Z"/> - </g> -</svg> diff --git a/apps/shorty/img/blank.png b/apps/shorty/img/blank.png Binary files differdeleted file mode 100644 index 9386bf3e17b..00000000000 --- a/apps/shorty/img/blank.png +++ /dev/null diff --git a/apps/shorty/img/calendar.png b/apps/shorty/img/calendar.png Binary files differdeleted file mode 100644 index 0e5fdb75bb6..00000000000 --- a/apps/shorty/img/calendar.png +++ /dev/null diff --git a/apps/shorty/img/drag_me.png b/apps/shorty/img/drag_me.png Binary files differdeleted file mode 100644 index 3ebac17d2d3..00000000000 --- a/apps/shorty/img/drag_me.png +++ /dev/null diff --git a/apps/shorty/img/drag_me.svg b/apps/shorty/img/drag_me.svg deleted file mode 100644 index f1d44cdfb9d..00000000000 --- a/apps/shorty/img/drag_me.svg +++ /dev/null @@ -1,135 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="595.277pt" height="841.891pt"> -<defs/> -<g id="Bubbles"> - <ellipse id="shape0" transform="translate(162.259, 571.542)" rx="20.11097874441pt" ry="8.61849622845pt" cx="20.11097874441pt" cy="8.61849622845pt" fill="none" stroke="#989898" stroke-width="3.45827370760" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000"/> - <path id="shape1" transform="translate(172.543, 536.388)" fill="none" stroke="#707071" stroke-width="3.45827370760" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" d="M63.9895 13.6082C63.9895 6.09258 49.6649 4.60196e-16 31.9947 0C14.3245 -4.60196e-16 2.16398e-15 6.09258 0 13.6082C-2.16398e-15 21.1237 14.3245 27.2163 31.9947 27.2163C49.6649 27.2163 63.9895 21.1237 63.9895 13.6082"/> - <path id="shape2" transform="translate(238.818, 495.564)" fill="none" stroke="#535353" stroke-width="3.45827370760" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" d="M254.815 38.5564C254.815 17.2623 197.773 1.30389e-15 127.408 0C57.0423 -1.30389e-15 8.61726e-15 17.2623 0 38.5564C-8.61726e-15 59.8506 57.0423 77.1129 127.408 77.1129C197.773 77.1129 254.815 59.8506 254.815 38.5564"/> - </g><g id="Text"> - <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.2" baseProfile="tiny"> -<title>Qt Svg Document</title> -<desc>Generated with Qt</desc> -<defs> -</defs> -<g fill="none" stroke="black" stroke-width="1" fill-rule="evenodd" stroke-linecap="square" stroke-linejoin="bevel" > - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,0,0)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,-0.235294,-0.346925)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#333333" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -<text fill="#333333" fill-opacity="1" stroke="none" xml:space="preserve" x="0" y="33" font-family="Vahika" font-size="32" font-weight="700" font-style="normal" - >Drag</text> -<text fill="#333333" fill-opacity="1" stroke="none" xml:space="preserve" x="59.0156" y="33" font-family="Vahika" font-size="32" font-weight="700" font-style="normal" - > me !</text> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#1f1c1b" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1.25123,0,0,1.25123,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,0,0)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,288,508.189)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,-0.235294,-0.346925)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="none" transform="matrix(1,0,0,1,-0.235294,-0.346925)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> - -<g fill="none" stroke="#000000" stroke-opacity="1" stroke-width="1" stroke-linecap="square" stroke-linejoin="bevel" transform="matrix(1,0,0,1,0,0)" -font-family="Sans Serif" font-size="9" font-weight="400" font-style="normal" -> -</g> -</g> -</svg> - - </g> -</svg> diff --git a/apps/shorty/img/loading-bar.gif b/apps/shorty/img/loading-bar.gif Binary files differdeleted file mode 100644 index b02798a87eb..00000000000 --- a/apps/shorty/img/loading-bar.gif +++ /dev/null diff --git a/apps/shorty/img/loading-disk.gif b/apps/shorty/img/loading-disk.gif Binary files differdeleted file mode 100644 index 22c961011cd..00000000000 --- a/apps/shorty/img/loading-disk.gif +++ /dev/null diff --git a/apps/shorty/img/loading-led.gif b/apps/shorty/img/loading-led.gif Binary files differdeleted file mode 100644 index 78893c90606..00000000000 --- a/apps/shorty/img/loading-led.gif +++ /dev/null diff --git a/apps/shorty/img/scheme/A.png b/apps/shorty/img/scheme/A.png Binary files differdeleted file mode 100644 index 65163556bab..00000000000 --- a/apps/shorty/img/scheme/A.png +++ /dev/null diff --git a/apps/shorty/img/scheme/B.png b/apps/shorty/img/scheme/B.png Binary files differdeleted file mode 100644 index a5562488824..00000000000 --- a/apps/shorty/img/scheme/B.png +++ /dev/null diff --git a/apps/shorty/img/scheme/C.png b/apps/shorty/img/scheme/C.png Binary files differdeleted file mode 100644 index 61b873de73f..00000000000 --- a/apps/shorty/img/scheme/C.png +++ /dev/null diff --git a/apps/shorty/img/scheme/D.png b/apps/shorty/img/scheme/D.png Binary files differdeleted file mode 100644 index 6ab7451d04a..00000000000 --- a/apps/shorty/img/scheme/D.png +++ /dev/null diff --git a/apps/shorty/img/scheme/E.png b/apps/shorty/img/scheme/E.png Binary files differdeleted file mode 100644 index d9c4e07001b..00000000000 --- a/apps/shorty/img/scheme/E.png +++ /dev/null diff --git a/apps/shorty/img/scheme/F.png b/apps/shorty/img/scheme/F.png Binary files differdeleted file mode 100644 index 2663b5eb308..00000000000 --- a/apps/shorty/img/scheme/F.png +++ /dev/null diff --git a/apps/shorty/img/scheme/G.png b/apps/shorty/img/scheme/G.png Binary files differdeleted file mode 100644 index d1d965d34cb..00000000000 --- a/apps/shorty/img/scheme/G.png +++ /dev/null diff --git a/apps/shorty/img/scheme/H.png b/apps/shorty/img/scheme/H.png Binary files differdeleted file mode 100644 index c644a77bfc5..00000000000 --- a/apps/shorty/img/scheme/H.png +++ /dev/null diff --git a/apps/shorty/img/scheme/J.png b/apps/shorty/img/scheme/J.png Binary files differdeleted file mode 100644 index 0eaa189f4f6..00000000000 --- a/apps/shorty/img/scheme/J.png +++ /dev/null diff --git a/apps/shorty/img/scheme/K.png b/apps/shorty/img/scheme/K.png Binary files differdeleted file mode 100644 index 3d587ae4478..00000000000 --- a/apps/shorty/img/scheme/K.png +++ /dev/null diff --git a/apps/shorty/img/scheme/L.png b/apps/shorty/img/scheme/L.png Binary files differdeleted file mode 100644 index 4e37b9f3645..00000000000 --- a/apps/shorty/img/scheme/L.png +++ /dev/null diff --git a/apps/shorty/img/scheme/M.png b/apps/shorty/img/scheme/M.png Binary files differdeleted file mode 100644 index a4a02e60b40..00000000000 --- a/apps/shorty/img/scheme/M.png +++ /dev/null diff --git a/apps/shorty/img/scheme/N.png b/apps/shorty/img/scheme/N.png Binary files differdeleted file mode 100644 index 6c860f77347..00000000000 --- a/apps/shorty/img/scheme/N.png +++ /dev/null diff --git a/apps/shorty/img/scheme/O.png b/apps/shorty/img/scheme/O.png Binary files differdeleted file mode 100644 index 14a05847b5c..00000000000 --- a/apps/shorty/img/scheme/O.png +++ /dev/null diff --git a/apps/shorty/img/scheme/P.png b/apps/shorty/img/scheme/P.png Binary files differdeleted file mode 100644 index e53d3ee9801..00000000000 --- a/apps/shorty/img/scheme/P.png +++ /dev/null diff --git a/apps/shorty/img/scheme/Q.png b/apps/shorty/img/scheme/Q.png Binary files differdeleted file mode 100644 index d07c42a76de..00000000000 --- a/apps/shorty/img/scheme/Q.png +++ /dev/null diff --git a/apps/shorty/img/scheme/R.png b/apps/shorty/img/scheme/R.png Binary files differdeleted file mode 100644 index 9b522d6c5a0..00000000000 --- a/apps/shorty/img/scheme/R.png +++ /dev/null diff --git a/apps/shorty/img/scheme/S.png b/apps/shorty/img/scheme/S.png Binary files differdeleted file mode 100644 index 1aff52f7525..00000000000 --- a/apps/shorty/img/scheme/S.png +++ /dev/null diff --git a/apps/shorty/img/scheme/T.png b/apps/shorty/img/scheme/T.png Binary files differdeleted file mode 100644 index 1736eedc47b..00000000000 --- a/apps/shorty/img/scheme/T.png +++ /dev/null diff --git a/apps/shorty/img/scheme/U.png b/apps/shorty/img/scheme/U.png Binary files differdeleted file mode 100644 index 320938cedf1..00000000000 --- a/apps/shorty/img/scheme/U.png +++ /dev/null diff --git a/apps/shorty/img/scheme/V.png b/apps/shorty/img/scheme/V.png Binary files differdeleted file mode 100644 index 2fe5e5a1621..00000000000 --- a/apps/shorty/img/scheme/V.png +++ /dev/null diff --git a/apps/shorty/img/scheme/W.png b/apps/shorty/img/scheme/W.png Binary files differdeleted file mode 100644 index e7b37b011f2..00000000000 --- a/apps/shorty/img/scheme/W.png +++ /dev/null diff --git a/apps/shorty/img/scheme/X.png b/apps/shorty/img/scheme/X.png Binary files differdeleted file mode 100644 index 4a3d8bd3816..00000000000 --- a/apps/shorty/img/scheme/X.png +++ /dev/null diff --git a/apps/shorty/img/scheme/Y.png b/apps/shorty/img/scheme/Y.png Binary files differdeleted file mode 100644 index af76045e897..00000000000 --- a/apps/shorty/img/scheme/Y.png +++ /dev/null diff --git a/apps/shorty/img/scheme/Z.png b/apps/shorty/img/scheme/Z.png Binary files differdeleted file mode 100644 index 0d00ced9c14..00000000000 --- a/apps/shorty/img/scheme/Z.png +++ /dev/null diff --git a/apps/shorty/img/shorty.png b/apps/shorty/img/shorty.png Binary files differdeleted file mode 100644 index 3fa8a55f9d8..00000000000 --- a/apps/shorty/img/shorty.png +++ /dev/null diff --git a/apps/shorty/img/shorty.svg b/apps/shorty/img/shorty.svg deleted file mode 100644 index 79b2ee69015..00000000000 --- a/apps/shorty/img/shorty.svg +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="12.8pt" height="12.8pt"> -<defs/> -<g id="g4185"> - <path id="path4189" transform="translate(-0.0314065, 3.97605)" fill="#d3d3d3" d="M5.90496 5.36366e-05L2.03624 0.0483836C0.896812 0.0603836 -0.00985361 2.07369 8.08645e-05 4.5713C0.0100142 7.06891 0.928138 9.07722 2.06757 9.06522L5.93628 9.01689C6.91266 9.00662 7.71351 7.51489 7.91762 5.5184L8.09775 5.5184C8.29805 7.56949 9.13062 9.09502 10.1261 9.08454L13.9948 9.04589C15.1342 9.03389 16.0409 7.01093 16.031 4.51331C16.021 2.0157 15.1029 0.0170616 13.9635 0.0290566L10.0869 0.0677066C9.14538 0.0776066 8.36671 1.46464 8.12907 3.35358L7.90196 3.35358C7.66674 1.41099 6.86557 -0.0100594 5.90496 5.36366e-05ZM4.99651 1.48836C5.86074 1.48036 6.59686 2.24823 6.90737 3.35358L4.47181 3.35358C4.19414 3.35358 3.9706 3.83634 3.9706 4.43599C3.9706 5.03564 4.19414 5.5184 4.47181 5.5184L6.95436 5.5184C6.67695 6.7007 5.92436 7.54932 5.02784 7.55758L2.99951 7.57691C1.86007 7.58743 0.931832 6.24436 0.924186 4.56163C0.916536 2.8789 1.82875 1.50853 2.96818 1.49803L4.99651 1.48843ZM13.055 1.51735C14.1945 1.50686 15.1149 2.84023 15.1225 4.52297C15.1301 6.2057 14.218 7.57607 13.0785 7.58656L11.0502 7.59616C10.1318 7.60466 9.35598 6.73612 9.0845 5.51833L11.4887 5.51833C11.7664 5.51833 11.99 5.03557 11.99 4.43592C11.99 3.83627 11.7664 3.35351 11.4887 3.35351L9.15499 3.35351C9.46901 2.2831 10.1849 1.53477 11.0267 1.52702L13.055 1.51742Z"/> - </g><g id="g4849"> - <path id="path4851" transform="translate(-8.08646e-05, 2.9323)" fill="#505053" fill-opacity="0.95294117647" d="M5.90496 5.36369e-05L2.03624 0.0483836C0.896812 0.0603756 -0.00985362 2.07368 8.08646e-05 4.5713C0.0100142 7.06891 0.928138 9.07721 2.06757 9.06522L5.93628 9.01689C6.91266 9.00662 7.71351 7.51488 7.91762 5.51839L8.09775 5.51839C8.29805 7.56948 9.13062 9.09502 10.1261 9.08454L13.9948 9.04589C15.1342 9.03389 16.0409 7.01092 16.031 4.51331C16.0211 2.01569 15.1029 0.0170526 13.9635 0.0290466L10.0869 0.0676976C9.14538 0.0775976 8.36671 1.46464 8.12907 3.35358L7.90196 3.35358C7.66674 1.41098 6.86557 -0.0100594 5.90496 5.36369e-05ZM4.99651 1.48836C5.86074 1.48036 6.59686 2.24823 6.90737 3.35358L4.47181 3.35358C4.19414 3.35358 3.9706 3.83634 3.9706 4.43599C3.9706 5.03564 4.19414 5.5184 4.47181 5.5184L6.95436 5.5184C6.67695 6.7007 5.92436 7.54931 5.02784 7.55758L2.99951 7.5769C1.86007 7.5874 0.931832 6.24436 0.924186 4.56162C0.91654 2.87889 1.82875 1.50853 2.96818 1.49803L4.99651 1.48843ZM13.055 1.51735C14.1945 1.50686 15.1149 2.84024 15.1225 4.52297C15.1301 6.2057 14.218 7.57607 13.0785 7.58657L11.0502 7.59617C10.1318 7.60467 9.35598 6.73612 9.0845 5.51833L11.4887 5.51833C11.7664 5.51833 11.99 5.03558 11.99 4.43592C11.99 3.83627 11.7664 3.35352 11.4887 3.35352L9.15499 3.35352C9.46901 2.28304 10.1849 1.53471 11.0267 1.52695Z"/> - </g> -</svg> diff --git a/apps/shorty/img/status/active.png b/apps/shorty/img/status/active.png Binary files differdeleted file mode 100644 index 51d013cd058..00000000000 --- a/apps/shorty/img/status/active.png +++ /dev/null diff --git a/apps/shorty/img/status/active.svg b/apps/shorty/img/status/active.svg deleted file mode 100644 index bb4c0573af1..00000000000 --- a/apps/shorty/img/status/active.svg +++ /dev/null @@ -1,9 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="75.4697pt" height="75.4697pt"> -<defs/> -<g id="layer1"> - <circle id="shape1" transform="translate(2.87717, 2.87717)" r="35.43313280000pt" cx="35.43313280000pt" cy="35.43313280000pt" fill="none" stroke="#000000" stroke-width="5.75434065000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000"/> - </g> -</svg> diff --git a/apps/shorty/img/status/bad.png b/apps/shorty/img/status/bad.png Binary files differdeleted file mode 100644 index 11627a21fee..00000000000 --- a/apps/shorty/img/status/bad.png +++ /dev/null diff --git a/apps/shorty/img/status/good.png b/apps/shorty/img/status/good.png Binary files differdeleted file mode 100644 index 08ce0a4453a..00000000000 --- a/apps/shorty/img/status/good.png +++ /dev/null diff --git a/apps/shorty/img/status/neutral.png b/apps/shorty/img/status/neutral.png Binary files differdeleted file mode 100644 index 5b2ad589cb9..00000000000 --- a/apps/shorty/img/status/neutral.png +++ /dev/null diff --git a/apps/shorty/img/status/strike.png b/apps/shorty/img/status/strike.png Binary files differdeleted file mode 100644 index d9a867fa004..00000000000 --- a/apps/shorty/img/status/strike.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/arrow.png b/apps/shorty/img/usage/64/arrow.png Binary files differdeleted file mode 100644 index ac35f78ad1c..00000000000 --- a/apps/shorty/img/usage/64/arrow.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/clipboard.png b/apps/shorty/img/usage/64/clipboard.png Binary files differdeleted file mode 100644 index 701bb6a7796..00000000000 --- a/apps/shorty/img/usage/64/clipboard.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/email.png b/apps/shorty/img/usage/64/email.png Binary files differdeleted file mode 100644 index cfa1f767821..00000000000 --- a/apps/shorty/img/usage/64/email.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/globe.png b/apps/shorty/img/usage/64/globe.png Binary files differdeleted file mode 100644 index 2d41da4819a..00000000000 --- a/apps/shorty/img/usage/64/globe.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/home.png b/apps/shorty/img/usage/64/home.png Binary files differdeleted file mode 100644 index 8cff03b28c6..00000000000 --- a/apps/shorty/img/usage/64/home.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/info.png b/apps/shorty/img/usage/64/info.png Binary files differdeleted file mode 100644 index 2069088f64a..00000000000 --- a/apps/shorty/img/usage/64/info.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/locked.png b/apps/shorty/img/usage/64/locked.png Binary files differdeleted file mode 100644 index 841d2d4483f..00000000000 --- a/apps/shorty/img/usage/64/locked.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/network.png b/apps/shorty/img/usage/64/network.png Binary files differdeleted file mode 100644 index fac47ac7b75..00000000000 --- a/apps/shorty/img/usage/64/network.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/qrcode.png b/apps/shorty/img/usage/64/qrcode.png Binary files differdeleted file mode 100644 index 207741888d3..00000000000 --- a/apps/shorty/img/usage/64/qrcode.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/sms.png b/apps/shorty/img/usage/64/sms.png Binary files differdeleted file mode 100644 index 5dcd2c12231..00000000000 --- a/apps/shorty/img/usage/64/sms.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/team.png b/apps/shorty/img/usage/64/team.png Binary files differdeleted file mode 100644 index e6ea3375807..00000000000 --- a/apps/shorty/img/usage/64/team.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/unlocked.png b/apps/shorty/img/usage/64/unlocked.png Binary files differdeleted file mode 100644 index 54501bbd11f..00000000000 --- a/apps/shorty/img/usage/64/unlocked.png +++ /dev/null diff --git a/apps/shorty/img/usage/64/workstation.png b/apps/shorty/img/usage/64/workstation.png Binary files differdeleted file mode 100644 index 909098c9d8d..00000000000 --- a/apps/shorty/img/usage/64/workstation.png +++ /dev/null diff --git a/apps/shorty/img/usage/_.svg b/apps/shorty/img/usage/_.svg deleted file mode 100644 index e0ef15d83c3..00000000000 --- a/apps/shorty/img/usage/_.svg +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5381" transform="translate(-5.94477e-06, 2.56921e-06)" fill="none"> - <path id="path4167" transform="matrix(0.758527 0 0 0.768105 -8.17197e-15 -3.02746e-16)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4169" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="text4182" transform="translate(66.8213, 30.5499)" fill="none"/> - <path id="path4171" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/arrow.svg b/apps/shorty/img/usage/arrow.svg deleted file mode 100644 index 94b2bf96abe..00000000000 --- a/apps/shorty/img/usage/arrow.svg +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5327" transform="translate(5.00882e-07, -1.00277e-06)" fill="none"> - <path id="path4155" transform="matrix(0.758527 0 0 0.768105 -6.61744e-23 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4157" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g4149" transform="translate(32.6557, 32.5571)" fill="none"> - <path id="path4138" transform="matrix(-0.168373 -0.438415 0.36134 -0.202146 27.838 126.426)" fill="#eeeeee" d="M160.243 0.00621995C156.111 0.109866 152.106 1.44866 148.743 3.84997L8.68012 103.631C2.66423 107.918 -0.608526 115.089 0.0939771 122.442C0.79648 129.796 5.36759 136.217 12.0864 139.287L168.524 210.694C175.246 213.766 183.097 213.018 189.118 208.731C195.139 204.444 198.415 197.27 197.711 189.912L181.336 18.725C180.308 7.91607 171.097 -0.257837 160.243 0.00621995Z"/> - <rect id="rect4143" transform="matrix(0.624447 0 0 0.610576 81.3708 26.8172)" fill="#eeeeee" width="16.29353760000pt" height="62.66744960000pt" rx="8.14676880000pt" ry="15.60399600000pt"/> - </g> - <path id="path4159" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/clipboard.svg b/apps/shorty/img/usage/clipboard.svg deleted file mode 100644 index a470bdaae45..00000000000 --- a/apps/shorty/img/usage/clipboard.svg +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5381" transform="translate(-5.94477e-06, 2.56921e-06)" fill="none"> - <path id="path4167" transform="matrix(0.758527 0 0 0.768105 -8.17197e-15 -3.02746e-16)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4169" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="text4182" transform="translate(66.8213, 30.5499)" fill="none"/> - <path id="path4171" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - <g id="g4549" transform="translate(42.322, 7.02379)" fill="none"> - <g id="g4542" transform="translate(-3.5, 49.2276)" fill="none"> - <rect id="rect812" transform="translate(3.5, 3.5)" fill="none" stroke="#ffffff" stroke-width="7.00000000000" stroke-linecap="butt" stroke-linejoin="round" width="52.59049680000pt" height="52.21751680000pt" rx="2.07274704000pt" ry="2.07274704000pt"/> - <path id="path842" transform="translate(10.9597, 16.8727)" fill="none" stroke="#ffffff" stroke-width="7.00000000000" stroke-linecap="round" stroke-linejoin="round" d="M0 0L49.8864 0"/> - <path id="path845" transform="translate(10.9597, 29.7461)" fill="none" stroke="#ffffff" stroke-width="7.00000000000" stroke-linecap="round" stroke-linejoin="round" d="M0 0L49.8864 0"/> - <path id="path846" transform="translate(10.9597, 42.6194)" fill="none" stroke="#ffffff" stroke-width="7.00000000000" stroke-linecap="round" stroke-linejoin="round" d="M0 0L49.8864 0"/> - <path id="path848" transform="translate(10.8847, 55.4927)" fill="none" stroke="#ffffff" stroke-width="7.00000000000" stroke-linecap="round" stroke-linejoin="round" d="M0 0L27.6572 0"/> - </g> - <g id="g886" transform="translate(24.5258, 32.1333)" fill="none"> - <path id="path599" transform="translate(1.56892, 48.6283)" fill="#ffffff" stroke="#b3b3b3" stroke-width="3.13784003000" stroke-linecap="round" stroke-linejoin="round" d="M16.3475 5.47447C0 17.0594 0 17.0594 0 17.0594L10.0728 0Z"/> - <rect id="rect598" transform="matrix(-0.911191 -0.824059 0.824059 -0.911191 17.3856 54.0244)" fill="#ffffff" stroke="#b3b3b3" stroke-width="3.13783836000" stroke-linecap="round" stroke-linejoin="round" width="5.23702200000pt" height="37.70656160000pt"/> - <path id="path600" transform="translate(4.47967, 60.1754)" fill="#ffffff" stroke="#b3b3b3" stroke-width="2.31749964000" stroke-linecap="butt" stroke-linejoin="round" d="M0.264548 0.337176C0.643913 -0.0822999 1.2915 -0.114817 1.71098 0.264548C2.13045 0.643913 2.16297 1.2915 1.7836 1.71098C1.40424 2.13045 0.756651 2.16297 0.337175 1.7836C-0.0823005 1.40424 -0.114816 0.756651 0.264548 0.337176Z"/> - <rect id="rect601" transform="matrix(-0.911191 -0.824059 0.824059 -0.911191 56.463 11.5345)" fill="#ffffff" stroke="#b3b3b3" stroke-width="3.13783836000" stroke-linecap="butt" stroke-linejoin="round" width="5.97020528000pt" height="3.24695360000pt" rx="1.64633232000pt" ry="1.62347680000pt"/> - </g> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/email.svg b/apps/shorty/img/usage/email.svg deleted file mode 100644 index 7283939e37a..00000000000 --- a/apps/shorty/img/usage/email.svg +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062868749" y1="-2.28811738018" x2="1.88917986746" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5473" transform="translate(1.28609e-06, 3.64259e-06)" fill="none"> - <path id="path5063" transform="matrix(0.758527 0 0 0.768105 -2.64698e-22 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path5065" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="text5197" transform="translate(30.5827, 32.9153)" fill="none"> - <path id="path5202" transform="matrix(0.794213 0 0 0.724445 -1.42109e-13 4.44089e-15)" fill="#eeeeee" d="M80.7728 37.0436L82.4783 29.4711L100.488 29.4711L90.119 78.3851C89.4822 81.4778 89.1638 83.5244 89.1639 84.5249C89.1638 85.571 89.4139 86.3896 89.9143 86.9808C90.46 87.5721 91.0967 87.8677 91.8245 87.8677C94.2803 87.8677 97.4412 86.2759 101.307 83.0923C105.218 79.8632 108.607 75.4971 111.472 69.994C114.382 64.4454 115.838 58.3966 115.838 51.8474C115.838 46.3898 114.792 41.2506 112.7 36.4296C110.653 31.6088 107.674 27.4246 103.763 23.8771C99.8516 20.3297 95.008 17.5554 89.2321 15.5542C83.5015 13.5532 76.9979 12.5526 69.7211 12.5525C62.3078 12.5526 55.5085 13.5304 49.3233 15.486C43.1379 17.3962 37.703 20.1705 33.0186 23.8089C28.3341 27.4019 24.4228 31.8589 21.2847 37.18C18.5104 41.8191 16.3956 46.9583 14.9402 52.5978C13.4849 58.2374 12.7572 63.9906 12.7572 69.8575C12.7572 77.6802 14.3035 84.8433 17.3962 91.3469C20.5343 97.8051 25.0596 103.217 30.972 107.583C36.9299 111.995 44.1157 115.11 52.5296 116.93C60.9434 118.794 70.4487 119.181 81.0457 118.089C89.4594 117.089 96.5771 115.179 102.399 112.359C108.265 109.539 113.223 105.582 117.271 100.488L131.802 100.488C129.436 105.355 126.344 109.698 122.524 113.519C118.749 117.339 114.314 120.545 109.221 123.138C104.127 125.775 98.419 127.777 92.0974 129.141C85.7755 130.505 78.8853 131.188 71.4266 131.188C60.2384 131.188 50.1646 129.709 41.205 126.753C32.2454 123.843 24.6957 119.613 18.5559 114.064C12.4616 108.561 7.84532 101.989 4.7072 94.3486C1.56906 86.6625 -9.99995e-06 78.1805 4.79758e-11 68.9025C-9.99995e-06 59.2152 1.61454 50.1647 4.84364 41.7508C8.07272 33.337 12.7117 26.0375 18.7606 19.8521C24.8549 13.6214 32.2682 8.75503 41.0004 5.25296C49.778 1.75109 59.4425 0.0001 69.994 0C78.6352 0.0001 86.5487 1.27355 93.7347 3.82034C100.966 6.32184 107.151 9.93751 112.291 14.6674C117.43 19.3974 121.341 25.0142 124.024 31.5178C126.753 37.976 128.117 45.1164 128.118 52.9389C128.117 59.0333 127.026 65.0139 124.843 70.8809C122.66 76.7023 119.522 81.9553 115.429 86.6397C111.381 91.2787 106.605 94.9626 101.102 97.6914C95.5992 100.375 89.6641 101.716 83.297 101.716C79.613 101.716 76.7477 101.102 74.7012 99.8745C72.6545 98.601 71.2901 96.5999 70.608 93.8711C66.6511 97.7824 62.1031 100.261 56.9639 101.307C51.8246 102.308 46.8445 101.83 42.0237 99.8745C37.2027 97.8733 33.2915 94.5305 30.2898 89.8461C27.3336 85.1616 25.8555 79.3857 25.8555 72.5181C25.8555 65.3778 27.379 58.3511 30.4262 51.4381C33.5189 44.5251 37.8849 38.8629 43.5245 34.4512C49.2095 30.0397 55.6222 27.8339 62.7627 27.8339C70.949 27.8339 76.9524 30.9038 80.7728 37.0436M43.4563 72.3817C43.4563 77.8393 44.5933 82.0235 46.8673 84.9342C49.1413 87.845 52.1202 89.3003 55.8042 89.3003C60.0793 89.3003 63.8314 87.5948 67.0605 84.1838C70.335 80.7728 72.8137 76.4749 74.4965 71.2902C76.1792 66.06 77.0206 61.0117 77.0207 56.1453C77.0206 53.7349 76.725 51.5746 76.1338 49.6643C75.588 47.7088 74.7466 46.0032 73.6097 44.5478C72.5181 43.0925 71.1764 42.001 69.5847 41.2733C68.0383 40.5002 66.2646 40.1136 64.2635 40.1135C60.2612 40.1136 56.6455 41.6826 53.4165 44.8207C50.2328 47.9134 47.7769 51.9611 46.0487 56.9639C44.3204 61.9213 43.4563 67.0606 43.4563 72.3817"/> - </g> - <path id="path5067" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/globe.svg b/apps/shorty/img/usage/globe.svg deleted file mode 100644 index 018f161dbf4..00000000000 --- a/apps/shorty/img/usage/globe.svg +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811733465" x2="1.88918016404" y2="-1.09199167635" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5362" transform="translate(-3.40191e-06, 5.08678e-06)" fill="none"> - <path id="path4239" transform="matrix(0.758527 0 0 0.768105 5.29396e-22 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4241" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47748)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path244" transform="matrix(0.758527 0 0 0.758527 23.1973 27.4649)" fill="#eeeeee" d="M80.5927 0.0948932C60.0949 -0.911807 40.4347 6.11839 25.2406 19.8968C10.0239 33.6889 1.10091 52.5655 0.0948972 73.0487C-0.911853 93.5465 6.11847 113.207 19.9112 128.409C33.6819 143.61 52.5585 152.533 73.0563 153.54C115.377 155.618 151.469 122.891 153.547 80.5855C155.625 38.2798 122.913 2.17339 80.5927 0.0948932ZM141.304 79.9841C140.952 87.1558 139.42 93.9908 136.945 100.317C131.792 99.6461 126.706 98.7947 121.689 97.7487C126.836 85.2521 128.594 71.5547 126.644 57.7998C124.785 44.717 119.689 32.8544 112.313 22.9264C130.73 35.0912 142.463 56.3835 141.304 79.9841ZM92.0321 26.1704C79.4068 40.6691 68.6314 56.7845 60.0807 74.2049C52.8482 70.0132 45.8857 65.4019 39.2203 60.4163C44.6575 50.0833 52.8087 41.3948 63.0583 35.2373C72.1673 29.7501 82.0974 26.8121 92.0321 26.1704ZM54.9821 85.4129C49.529 98.3126 45.2546 111.857 42.3271 125.908C41.8765 125.226 41.4339 124.529 41.0136 123.826C32.1223 109.048 29.5275 91.6818 33.686 74.9699C33.9167 74.0056 34.1893 73.0873 34.4639 72.1252C41.0431 76.9231 47.8895 81.3601 54.9821 85.4129ZM59.6738 132.526C57.583 132.827 55.4987 132.996 53.4253 133.092C56.1068 118.523 60.2937 104.519 65.8325 91.2201C77.7539 97.1755 90.2767 102.089 103.311 105.84C102.95 106.335 102.586 106.868 102.209 107.377C91.8412 121.166 76.7464 130.085 59.6738 132.526ZM70.8853 80.0467C79.4919 62.3869 90.5152 46.1516 103.52 31.6862C109.148 39.7311 113.028 49.1426 114.5 59.5069C116.233 71.7252 114.484 83.8752 109.573 94.8576C96.0784 91.2018 83.1341 86.2087 70.8853 80.0467ZM33.472 28.994C46.248 17.4001 62.7647 11.4919 79.9914 12.338C83.8846 12.5292 87.6863 13.0901 91.3568 13.9305C79.4801 14.6823 67.6153 18.1782 56.7378 24.723C45.2255 31.6472 35.9361 41.2556 29.501 52.6399C26.5147 50.1165 23.5977 47.5232 20.7443 44.8302C24.0834 38.9789 28.3438 33.6351 33.472 28.994ZM12.3453 73.6503C12.6332 67.7886 13.7123 62.0978 15.4974 56.669C18.3272 59.2435 21.2192 61.7475 24.1803 64.1891C23.2561 66.7258 22.4531 69.3346 21.7789 72.0084C18.4881 85.2417 18.776 98.7975 22.4326 111.573C15.2371 100.355 11.6786 87.2253 12.3453 73.6503ZM75.343 141.335C89.8738 136.43 102.603 127.284 112.015 114.74C113.396 112.9 114.692 111.006 115.896 109.055C120.881 110.158 125.911 111.094 131.015 111.873C119.175 130.1 98.4601 141.884 75.343 141.335Z"/> - <path id="path4243" transform="matrix(0.758527 0 0 0.758527 5.33865 4.46648)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 -1.13687e-13 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/home.svg b/apps/shorty/img/usage/home.svg deleted file mode 100644 index 8c29644503c..00000000000 --- a/apps/shorty/img/usage/home.svg +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5314" transform="translate(-8.17503e-06, -2.94544e-06)" fill="none"> - <path id="path4087" transform="matrix(0.758527 0 0 0.768105 1.05879e-21 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4089" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g4126" transform="translate(27.3419, 27.8174)" fill="none"> - <path id="path4109" transform="matrix(0.646168 0 0 0.646168 2.22045e-14 1.77636e-14)" fill="#eeeeee" d="M83.9733 0.0146219C81.7822 0.0969449 79.6354 0.511418 77.6608 1.23337C74.7217 2.30249 72.2731 4.0111 70.6295 6.13962L2.22329 94.9209C-0.141455 97.987 -0.646597 101.673 0.836575 105.04C2.31975 108.407 5.648 111.13 9.97329 112.515L71.4108 32.7959C73.0479 30.6558 75.4972 28.9358 78.442 27.8584C86.1818 25.036 95.4931 27.2205 99.7545 32.8584L160.005 112.39C163.905 110.818 166.796 108.12 168.021 104.912C169.245 101.704 168.698 98.2572 166.505 95.3584L98.9733 6.23337C95.9221 2.19242 90.1245 -0.211173 83.9733 0.0146219Z"/> - <path id="rect4116" transform="matrix(0.646168 0 0 0.646168 20.0253 26.3303)" fill="#eeeeee" d="M52.6562 0.00858529C51.3133 0.0537124 49.9957 0.308743 48.7812 0.758585C46.9652 1.43702 45.452 2.5257 44.4375 3.88359L2.4062 60.2898C2.26096 60.4729 2.12543 60.6606 1.99995 60.8523C1.98995 60.8666 2.00995 60.9004 1.99995 60.9148C1.96841 60.9459 1.93718 60.9771 1.90625 61.0085C0.67894 62.8827 0 65.1221 0 67.5398L0 116.571C0 123.169 5.28309 128.477 11.875 128.477L36.4375 128.477L36.4375 85.571C36.4375 78.9733 41.7206 73.6648 48.3125 73.6648L57.4375 73.6648C64.0294 73.6648 69.3125 78.9733 69.3125 85.571L69.3125 128.477L93.8437 128.477C100.436 128.477 105.75 123.169 105.75 116.571L105.75 67.5398C105.75 64.4233 104.538 61.6268 102.594 59.5085L61.8437 3.94604C59.9691 1.39179 56.4219 -0.128436 52.6562 0.00853529Z"/> - <rect id="rect4124" transform="matrix(0.646168 0 0 0.646168 21.5365 9.64032)" fill="#eeeeee" width="18.17356080000pt" height="31.33372480000pt" rx="9.08678040000pt" ry="14.74450800000pt"/> - </g> - <path id="path4091" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/info.svg b/apps/shorty/img/usage/info.svg deleted file mode 100644 index 31a3b6387eb..00000000000 --- a/apps/shorty/img/usage/info.svg +++ /dev/null @@ -1,21 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5381" transform="translate(-5.94477e-06, 2.56921e-06)" fill="none"> - <path id="path4167" transform="matrix(0.758527 0 0 0.768105 0 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4169" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="text4182" transform="translate(66.8213, 30.5499)" fill="none"> - <path id="path4187" transform="matrix(1.54651 0 0 0.965127 -2.30926e-13 8.88178e-15)" fill="#eeeeee" d="M19.1953 38.6016L19.1953 94.0781C19.1953 97.9219 18.2812 100.828 16.4531 102.797C14.625 104.766 12.3047 105.75 9.49218 105.75C6.67967 105.75 4.38279 104.742 2.60156 102.727C0.86717 100.711 -9.99991e-06 97.8281 8.66294e-11 94.0781L8.66294e-11 39.1641C-9.99991e-06 35.3673 0.86717 32.5079 2.60156 30.5859C4.38279 28.6641 6.67967 27.7032 9.49218 27.7031C12.3047 27.7032 14.625 28.6641 16.4531 30.5859C18.2812 32.5079 19.1953 35.1798 19.1953 38.6016M9.70312 18.7734C7.03123 18.7735 4.73436 17.9532 2.8125 16.3125C0.93748 14.672 -9.99991e-06 12.3517 8.66294e-11 9.35156C-9.99991e-06 6.63291 0.96092 4.40634 2.88281 2.67187C4.85154 0.89072 7.12498 0.0001 9.70312 0C12.1875 0.0001 14.3906 0.79697 16.3125 2.39062C18.2343 3.98447 19.1953 6.30478 19.1953 9.35156C19.1953 12.3048 18.2578 14.6251 16.3828 16.3125C14.5078 17.9532 12.2812 18.7735 9.70312 18.7734"/> - </g> - <path id="path4171" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/locked.svg b/apps/shorty/img/usage/locked.svg deleted file mode 100644 index 1691a9dfa4d..00000000000 --- a/apps/shorty/img/usage/locked.svg +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5393" transform="translate(-2.11465e-06, -2.863e-06)" fill="none"> - <path id="path4197" transform="matrix(0.758527 0 0 0.768105 2.64698e-22 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4199" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g4220" transform="translate(46.2074, 35.1119)" fill="none"> - <path id="rect4189" transform="matrix(0.758527 0 0 0.758527 10.0979 0)" fill="#eeeeee" d="M11.875 0C5.28309 0 0 5.3085 0 11.9062L0 37.0938L12.7188 37.0938L12.7188 22.9688C12.7188 16.371 18.0331 11.0625 24.625 11.0625L50.125 11.0625C56.7169 11.0625 62.0312 16.371 62.0312 22.9688L62.0312 37.0938L74.2188 37.0938L74.2188 11.9062C74.2188 5.3085 68.9044 0 62.3125 0Z"/> - <path id="rect4193" transform="matrix(0.758527 0 0 0.758527 0 32.6878)" fill="#eeeeee" d="M11.9062 0C5.31434 0 0 5.3085 0 11.9062L0 26.875C0 33.4728 5.31434 38.7812 11.9062 38.7812L87.8125 38.7812C93.6895 38.7812 98.5472 34.5601 99.5312 28.9687L87.9375 28.9687C81.3456 28.9687 76.0312 25.575 76.0312 21.3438C76.0312 17.1125 81.3456 13.6875 87.9375 13.6875L99.7188 13.6875L99.7188 11.9062C99.7188 5.3085 94.4044 0 87.8125 0Z"/> - <path id="path4218" transform="matrix(0.758527 0 0 0.758527 0 67.4477)" fill="#eeeeee" d="M11.9062 0C5.31434 0 0 5.3085 0 11.9062L0 26.875C0 33.4728 5.31434 38.7812 11.9062 38.7812L87.8125 38.7812C93.6895 38.7812 98.5472 34.5601 99.5312 28.9687L87.9375 28.9687C81.3456 28.9687 76.0312 25.575 76.0312 21.3438C76.0312 17.1125 81.3456 13.6875 87.9375 13.6875L99.7188 13.6875L99.7188 11.9062C99.7188 5.3085 94.4044 0 87.8125 0Z"/> - </g> - <path id="path4201" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/network.svg b/apps/shorty/img/usage/network.svg deleted file mode 100644 index 1d3a0257121..00000000000 --- a/apps/shorty/img/usage/network.svg +++ /dev/null @@ -1,34 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062886879" y1="-2.28811738018" x2="1.88918005155" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5449" transform="translate(-8.40215e-06, -2.8318e-06)" fill="none"> - <path id="path5051" transform="matrix(0.758527 0 0 0.768105 1.05879e-21 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path5053" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g5152" transform="translate(24.1282, 25.4609)" fill="none"> - <path id="path5092" transform="matrix(0.7132 0 0 0.7132 29.7461 0)" fill="#eeeeee" d="M9.9163 0C4.4218 0 0 4.14395 0 9.293L0 44.7222C0 49.8712 4.4218 54.0153 9.9163 54.0153L73.1505 54.0153C78.645 54.0153 83.0668 49.8712 83.0668 44.7222L83.0668 9.293C83.0668 4.14395 78.645 0 73.1505 0ZM19.0295 8.14427L64.0374 8.14427C69.5318 8.14427 73.9537 12.2882 73.9537 17.4373L73.9537 36.5778C73.9537 41.7269 69.5318 45.8709 64.0374 45.8709L19.0295 45.8709C13.535 45.8709 9.1132 41.7269 9.1132 36.5778L9.1132 17.4373C9.1132 12.2882 13.535 8.14427 19.0295 8.14427Z"/> - <rect id="rect5098" transform="matrix(0.7132 0 0 0.7132 0 75.1881)" fill="#eeeeee" width="38.99506800000pt" height="30.13255280000pt" rx="11.21705440000pt" ry="11.21705440000pt"/> - <rect id="rect5114" transform="matrix(0.7132 0 0 0.7132 86.1201 75.9782)" fill="#eeeeee" width="38.99506800000pt" height="30.13255280000pt" rx="11.21705440000pt" ry="11.21705440000pt"/> - <rect id="rect5116" transform="matrix(0.7132 0 0 0.7132 42.665 75.9782)" fill="#eeeeee" width="38.99506800000pt" height="30.13255280000pt" rx="11.21705440000pt" ry="11.21705440000pt"/> - <g id="g5138" transform="translate(8.18351, 44.967)" fill="none"> - <rect id="rect5126" transform="matrix(0.7132 0 0 0.7132 48.3081 8.88178e-15)" fill="#eeeeee" width="7.31157528000pt" height="29.91099280000pt"/> - <rect id="rect5128" transform="matrix(0.7132 0 0 0.7132 91.8912 8.69104)" fill="#eeeeee" width="7.53313824000pt" height="20.16222400000pt"/> - <rect id="rect5134" transform="matrix(0.7132 0 0 0.7132 0 8.69104)" fill="#eeeeee" width="7.53313824000pt" height="20.16222400000pt"/> - <rect id="rect5136" transform="matrix(0.7132 0 0 0.7132 -8.88178e-15 8.69104)" fill="#eeeeee" width="110.60805600000pt" height="8.61677440000pt"/> - </g> - <rect id="rect5144" transform="matrix(0.7132 0 0 0.7132 42.2636 10.4152)" fill="#eeeeee" width="39.63716160000pt" height="4.23005296000pt"/> - <rect id="rect5146" transform="matrix(0.7132 0 0 0.7132 42.2636 10.4152)" fill="#eeeeee" width="39.63716160000pt" height="4.23005296000pt"/> - <rect id="rect5148" transform="matrix(0.7132 0 0 0.7132 42.2636 17.5472)" fill="#eeeeee" width="39.63716160000pt" height="4.23005296000pt"/> - <rect id="rect5150" transform="matrix(0.7132 0 0 0.7132 42.2636 24.6792)" fill="#eeeeee" width="39.63716160000pt" height="4.23005296000pt"/> - </g> - <path id="path5055" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/qrcode.svg b/apps/shorty/img/usage/qrcode.svg deleted file mode 100644 index 83802042f7a..00000000000 --- a/apps/shorty/img/usage/qrcode.svg +++ /dev/null @@ -1,271 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811738018" x2="1.88918016404" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5381" transform="translate(-5.94477e-06, 2.56921e-06)" fill="none"> - <path id="path4167" transform="matrix(0.758527 0 0 0.768105 1.41962e-15 -6.05492e-16)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4169" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47751)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="text4182" transform="translate(5.94477e-06, -2.56921e-06)" fill="none"/> - <path id="path4171" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46647)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - <g id="group0" transform="translate(31.4638, 31.6895)" fill="none"> - <rect id="p" transform="translate(0, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p1" transform="translate(0, 7.66166)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p2" transform="translate(0, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p3" transform="translate(0, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p4" transform="translate(0, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p5" transform="translate(0, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p6" transform="translate(0, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p7" transform="translate(0, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p8" transform="translate(0, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p9" transform="translate(0, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p10" transform="translate(0, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p11" transform="translate(0, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p12" transform="translate(0, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p13" transform="translate(0, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p14" transform="translate(0, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p15" transform="translate(0, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p16" transform="translate(0, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p17" transform="translate(4.95608, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p18" transform="translate(4.95608, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p19" transform="translate(4.95608, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p20" transform="translate(4.95608, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p21" transform="translate(4.95608, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p22" transform="translate(4.95608, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p23" transform="translate(9.91217, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p24" transform="translate(9.91217, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p25" transform="translate(9.91217, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p26" transform="translate(9.91217, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p27" transform="translate(9.91217, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p28" transform="translate(9.91217, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p29" transform="translate(9.91217, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p30" transform="translate(9.91217, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p31" transform="translate(9.91217, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p32" transform="translate(9.91217, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p33" transform="translate(9.91217, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p34" transform="translate(9.91217, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p35" transform="translate(9.91217, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p36" transform="translate(9.91217, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p37" transform="translate(14.8683, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p38" transform="translate(14.8683, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p39" transform="translate(14.8683, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p40" transform="translate(14.8683, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p41" transform="translate(14.8683, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p42" transform="translate(14.8683, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p43" transform="translate(14.8683, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p44" transform="translate(14.8683, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p45" transform="translate(14.8683, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p46" transform="translate(14.8683, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p47" transform="translate(14.8683, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p48" transform="translate(14.8683, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p49" transform="translate(14.8683, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p50" transform="translate(19.8243, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p51" transform="translate(19.8243, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p52" transform="translate(19.8243, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p53" transform="translate(19.8243, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p54" transform="translate(19.8243, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p55" transform="translate(19.8243, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p56" transform="translate(19.8243, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p57" transform="translate(19.8243, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p58" transform="translate(19.8243, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p59" transform="translate(19.8243, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p60" transform="translate(19.8243, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p61" transform="translate(19.8243, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p62" transform="translate(24.7804, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p63" transform="translate(24.7804, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p64" transform="translate(24.7804, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p65" transform="translate(24.7804, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p66" transform="translate(24.7804, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p67" transform="translate(24.7804, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p68" transform="translate(24.7804, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p69" transform="translate(29.7365, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p70" transform="translate(29.7365, 7.66166)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p71" transform="translate(29.7365, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p72" transform="translate(29.7365, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p73" transform="translate(29.7365, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p74" transform="translate(29.7365, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p75" transform="translate(29.7365, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p76" transform="translate(29.7365, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p77" transform="translate(29.7365, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p78" transform="translate(29.7365, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p79" transform="translate(29.7365, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p80" transform="translate(29.7365, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p81" transform="translate(29.7365, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p82" transform="translate(29.7365, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p83" transform="translate(29.7365, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p84" transform="translate(29.7365, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p85" transform="translate(29.7365, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p86" transform="translate(34.6926, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p87" transform="translate(34.6926, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p88" transform="translate(34.6926, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p89" transform="translate(39.6487, 7.66166)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p90" transform="translate(39.6487, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p91" transform="translate(39.6487, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p92" transform="translate(39.6487, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p93" transform="translate(39.6487, 36.8632)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p94" transform="translate(39.6487, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p95" transform="translate(39.6487, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p96" transform="translate(39.6487, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p97" transform="translate(39.6487, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p98" transform="translate(39.6487, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p99" transform="translate(39.6487, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p100" transform="translate(44.6048, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p101" transform="translate(44.6048, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p102" transform="translate(44.6048, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p103" transform="translate(44.6048, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p104" transform="translate(44.6048, 36.8632)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p105" transform="translate(44.6048, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p106" transform="translate(44.6048, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p107" transform="translate(44.6048, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p108" transform="translate(44.6048, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p109" transform="translate(44.6048, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p110" transform="translate(44.6048, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p111" transform="translate(44.6048, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p112" transform="translate(49.5608, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p113" transform="translate(49.5608, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p114" transform="translate(49.5608, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p115" transform="translate(49.5608, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p116" transform="translate(49.5608, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p117" transform="translate(49.5608, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p118" transform="translate(49.5608, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p119" transform="translate(49.5608, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p120" transform="translate(49.5608, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p121" transform="translate(54.5169, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p122" transform="translate(54.5169, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p123" transform="translate(54.5169, 36.8632)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p124" transform="translate(54.5169, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p125" transform="translate(54.5169, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p126" transform="translate(54.5169, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p127" transform="translate(54.5169, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p128" transform="translate(59.473, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p129" transform="translate(59.473, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p130" transform="translate(59.473, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p131" transform="translate(59.473, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p132" transform="translate(59.473, 36.8632)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p133" transform="translate(59.473, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p134" transform="translate(59.473, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p135" transform="translate(59.473, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p136" transform="translate(59.473, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p137" transform="translate(59.473, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p138" transform="translate(59.473, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p139" transform="translate(59.473, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p140" transform="translate(64.4291, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p141" transform="translate(64.4291, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p142" transform="translate(64.4291, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p143" transform="translate(64.4291, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p144" transform="translate(64.4291, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p145" transform="translate(64.4291, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p146" transform="translate(64.4291, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p147" transform="translate(69.3852, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p148" transform="translate(69.3852, 7.66166)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p149" transform="translate(69.3852, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p150" transform="translate(69.3852, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p151" transform="translate(69.3852, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p152" transform="translate(69.3852, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p153" transform="translate(69.3852, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p154" transform="translate(69.3852, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p155" transform="translate(69.3852, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p156" transform="translate(69.3852, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p157" transform="translate(69.3852, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p158" transform="translate(69.3852, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p159" transform="translate(69.3852, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p160" transform="translate(74.3413, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p161" transform="translate(74.3413, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p162" transform="translate(74.3413, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p163" transform="translate(74.3413, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p164" transform="translate(74.3413, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p165" transform="translate(74.3413, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p166" transform="translate(74.3413, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p167" transform="translate(74.3413, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p168" transform="translate(74.3413, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p169" transform="translate(74.3413, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p170" transform="translate(79.2974, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p171" transform="translate(79.2974, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p172" transform="translate(79.2974, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p173" transform="translate(79.2974, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p174" transform="translate(79.2974, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p175" transform="translate(79.2974, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p176" transform="translate(79.2974, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p177" transform="translate(79.2974, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p178" transform="translate(79.2974, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p179" transform="translate(79.2974, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p180" transform="translate(79.2974, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p181" transform="translate(84.2534, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p182" transform="translate(84.2534, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p183" transform="translate(84.2534, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p184" transform="translate(84.2534, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p185" transform="translate(84.2534, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p186" transform="translate(84.2534, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p187" transform="translate(84.2534, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p188" transform="translate(84.2534, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p189" transform="translate(84.2534, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p190" transform="translate(84.2534, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p191" transform="translate(84.2534, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p192" transform="translate(84.2534, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p193" transform="translate(84.2534, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p194" transform="translate(84.2534, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p195" transform="translate(89.2095, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p196" transform="translate(89.2095, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p197" transform="translate(89.2095, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p198" transform="translate(89.2095, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p199" transform="translate(89.2095, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p200" transform="translate(89.2095, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p201" transform="translate(89.2095, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p202" transform="translate(89.2095, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p203" transform="translate(89.2095, 56.3308)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p204" transform="translate(89.2095, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p205" transform="translate(89.2095, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p206" transform="translate(89.2095, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p207" transform="translate(89.2095, 85.5323)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p208" transform="translate(89.2095, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p209" transform="translate(89.2095, 95.2662)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p210" transform="translate(94.1656, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p211" transform="translate(94.1656, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p212" transform="translate(94.1656, 41.7301)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p213" transform="translate(94.1656, 46.597)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p214" transform="translate(94.1656, 51.4639)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p215" transform="translate(94.1656, 61.1977)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p216" transform="translate(94.1656, 70.9316)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p217" transform="translate(94.1656, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p218" transform="translate(94.1656, 100.133)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p219" transform="translate(99.1217, 2.79474)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p220" transform="translate(99.1217, 7.66166)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p221" transform="translate(99.1217, 12.5286)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p222" transform="translate(99.1217, 17.3955)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p223" transform="translate(99.1217, 22.2624)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p224" transform="translate(99.1217, 27.1293)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p225" transform="translate(99.1217, 31.9962)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p226" transform="translate(99.1217, 66.0647)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p227" transform="translate(99.1217, 75.7985)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p228" transform="translate(99.1217, 80.6654)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - <rect id="p229" transform="translate(99.1217, 90.3992)" fill="#ffffff" stroke="#000000" stroke-width="0.00000000000" stroke-linecap="butt" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="3.96486751181pt" height="3.89353363095pt"/> - </g> - <rect id="shape0" transform="translate(73.7513, 37.3739)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape1" transform="translate(84.0513, 39.0469)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape2" transform="translate(82.9589, 61.8606)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape3" transform="translate(73.7513, 37.3739)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape4" transform="translate(72.6589, 52.2789)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape5" transform="translate(83.8952, 72.507)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape6" transform="translate(48.4696, 74.18)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape7" transform="translate(34.2682, 77.8302)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape8" transform="translate(73.9074, 95.1686)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape9" transform="translate(73.4392, 120.112)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape10" transform="translate(72.0347, 107.792)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape11" transform="translate(118.384, 85.7389)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape12" transform="translate(125.719, 114.18)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape13" transform="translate(90.6058, 123.762)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape14" transform="translate(87.7967, 92.8872)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape15" transform="translate(104.651, 105.207)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape16" transform="translate(93.8831, 115.853)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape17" transform="translate(106.836, 76.3093)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape18" transform="translate(108.553, 125.739)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - <rect id="shape19" transform="translate(125.251, 75.5488)" fill="#ffffff" fill-rule="evenodd" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" width="7.74057149730pt" height="8.39543189174pt"/> - </g> -</svg> diff --git a/apps/shorty/img/usage/sms.svg b/apps/shorty/img/usage/sms.svg deleted file mode 100644 index 5d519df9570..00000000000 --- a/apps/shorty/img/usage/sms.svg +++ /dev/null @@ -1,19 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062891915" y1="-2.28811733465" x2="1.88918010268" y2="-1.09199167635" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5434" transform="translate(-6.50233e-06, 2.52429e-06)" fill="none"> - <path id="path5075" transform="matrix(0.758527 0 0 0.768105 1.05879e-21 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path5077" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47756)" fill="#000000" stroke="#000000" stroke-width="1.25000000000" stroke-linecap="square" stroke-linejoin="miter" stroke-miterlimit="2.00000000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="rect5206" transform="matrix(0.758527 0 0 0.758527 28.5135 43.1225)" fill="#eeeeee" d="M12 0C5.352 0 0 5.352 0 12L0 72.5937C0 79.2417 5.352 84.5937 12 84.5937L83.4687 84.5937C92.9385 97.8632 117.244 131.838 117.469 130.938C117.697 130.027 118.047 97.894 118.188 84.5937L129 84.5937C135.648 84.5937 141 79.2417 141 72.5937L141 12C141 5.352 135.648 1.13687e-13 129 1.13687e-13ZM29.8125 25.2812C31.4969 25.2813 33.0089 25.5233 34.3437 26C35.6946 26.4768 36.7976 27.1045 37.6875 27.9063C38.5932 28.7081 39.2892 29.6186 39.75 30.5937C40.2268 31.5689 40.4687 32.5057 40.4687 33.4375C40.4687 34.456 40.1959 35.2874 39.6875 35.9375C39.1948 36.5876 38.4842 36.9063 37.5625 36.9062C36.8951 36.9063 36.3205 36.6451 35.8437 36.125C35.383 35.6049 34.8537 34.8527 34.25 33.8125C33.7573 32.9457 33.1984 32.2388 32.5313 31.7187C31.8637 31.1987 30.9566 30.9375 29.8125 30.9375C28.6366 30.9375 27.6536 31.2753 26.875 31.9687C26.0963 32.6405 25.7187 33.4815 25.7187 34.5C25.7187 35.4318 25.9904 36.2057 26.5625 36.8125C27.1345 37.3976 27.9056 37.8912 28.875 38.2812C29.8444 38.6713 31.1747 39.1553 32.875 39.7187C34.8932 40.3905 36.5412 41.1932 37.8125 42.125C39.0997 43.0568 40.0673 44.1589 40.7187 45.4375C41.3863 46.6944 41.7187 48.1247 41.7187 49.75C41.7187 52.1988 41.2802 54.3072 40.4063 56.0625C39.5322 57.7961 38.2474 59.1211 36.5313 60.0312C34.8308 60.9197 32.7597 61.375 30.3125 61.375C27.9765 61.375 25.9811 60.8814 24.3125 59.9062C22.6439 58.9311 21.3884 57.7019 20.5937 56.25C19.7993 54.7764 19.4063 53.3173 19.4063 51.8437C19.4063 50.8686 19.679 50.0372 20.1875 49.3437C20.696 48.6503 21.3151 48.2813 22.0937 48.2812C22.7773 48.2813 23.322 48.5137 23.6875 48.9687C24.053 49.4238 24.3852 50.0828 24.7187 50.9062C25.3863 52.4882 26.2033 53.6573 27.125 54.4375C28.0625 55.2176 29.3325 55.625 30.9375 55.625C32.2405 55.625 33.2987 55.2176 34.125 54.4375C34.9672 53.6357 35.375 52.7373 35.375 51.7187C35.375 50.1585 34.9364 48.9964 34.0625 48.2812C33.2044 47.5661 31.7988 46.9001 29.8125 46.25C27.5719 45.4915 25.7268 44.6985 24.3125 43.875C22.9141 43.0299 21.811 41.9277 20.9687 40.5625C20.1267 39.1973 19.6875 37.5249 19.6875 35.5312C19.6875 33.7543 20.0964 32.0507 20.875 30.4687C21.6536 28.8868 22.8028 27.6506 24.3125 26.7188C25.838 25.7653 27.6673 25.2813 29.8125 25.2812ZM49.9687 25.2812C50.8587 25.2813 51.5995 25.7078 52.1875 26.5312C52.7912 27.3331 53.0937 28.4448 53.0937 29.875L53.0937 30.7187C54.2221 28.8768 55.4316 27.5231 56.7187 26.6563C58.006 25.7895 59.4268 25.3438 61 25.3438C62.6368 25.3438 64.0429 25.799 65.2187 26.6875C66.3947 27.576 67.3621 28.9201 68.125 30.7187C69.2214 28.8985 70.4007 27.5544 71.6563 26.6875C72.9115 25.799 74.3182 25.3438 75.8437 25.3438C77.6236 25.3438 79.1503 25.8278 80.4375 26.7812C81.7247 27.7348 82.6768 29.098 83.3125 30.875C83.8686 32.4786 84.1561 34.9919 84.1563 38.4375L84.1563 55.7812C84.156 57.6449 83.8385 59.0369 83.2187 59.9687C82.5991 60.9006 81.7982 61.375 80.7813 61.375C79.7959 61.375 78.9794 60.9006 78.3437 59.9687C77.7241 59.0152 77.4063 57.6232 77.4063 55.7812L77.4063 40.8437C77.4063 38.9368 77.3463 37.4298 77.2187 36.2812C77.1078 35.1327 76.7744 34.1551 76.25 33.375C75.7256 32.5949 74.9397 32.2188 73.875 32.2187C73.0169 32.2188 72.2161 32.5566 71.4375 33.25C70.6747 33.9435 70.0541 34.8611 69.625 36.0312C69.1483 37.5265 68.9063 40.1764 68.9063 43.9687L68.9063 55.7812C68.9063 57.6449 68.6197 59.0369 68 59.9687C67.3802 60.9006 66.5482 61.375 65.5313 61.375C64.5459 61.375 63.7447 60.9006 63.125 59.9687C62.5211 59.0369 62.2187 57.6449 62.2187 55.7812L62.2187 41.625C62.2187 39.3929 62.1737 37.6727 62.0625 36.4375C61.9514 35.2023 61.6487 34.1864 61.1563 33.4062C60.6636 32.6045 59.8772 32.2188 58.8125 32.2187C56.6831 32.2188 55.2772 33.1938 54.5937 35.1875C53.9264 37.1812 53.5937 40.0539 53.5937 43.7812L53.5937 55.7812C53.5937 57.6232 53.2759 59.0152 52.6563 59.9687C52.0523 60.9006 51.2511 61.375 50.25 61.375C49.2648 61.375 48.4482 60.9006 47.8125 59.9687C47.1928 59.0152 46.9061 57.6232 46.9063 55.7812L46.9063 30.375C46.9063 28.7064 47.1627 27.4606 47.7187 26.5937C48.291 25.727 49.0471 25.2813 49.9687 25.2812ZM99.5 25.2812C101.184 25.2813 102.697 25.5233 104.031 26C105.382 26.4768 106.516 27.1045 107.406 27.9063C108.312 28.7081 108.977 29.6186 109.438 30.5937C109.914 31.5689 110.156 32.5057 110.156 33.4375C110.156 34.456 109.915 35.2874 109.406 35.9375C108.914 36.5876 108.203 36.9063 107.281 36.9062C106.614 36.9063 106.039 36.6451 105.562 36.125C105.102 35.6049 104.573 34.8527 103.969 33.8125C103.476 32.9457 102.886 32.2388 102.219 31.7187C101.551 31.1987 100.644 30.9375 99.5 30.9375C98.324 30.9375 97.3412 31.2753 96.5625 31.9687C95.7839 32.6405 95.4062 33.4815 95.4063 34.5C95.4063 35.4318 95.678 36.2057 96.25 36.8125C96.8221 37.3976 97.5931 37.8912 98.5625 38.2812C99.5318 38.6713 100.862 39.1553 102.562 39.7187C104.581 40.3905 106.229 41.1932 107.5 42.125C108.787 43.0568 109.755 44.1589 110.406 45.4375C111.074 46.6944 111.406 48.1247 111.406 49.75C111.406 52.1988 110.968 54.3072 110.094 56.0625C109.22 57.7961 107.935 59.1211 106.219 60.0312C104.519 60.9197 102.447 61.375 100 61.375C97.6641 61.375 95.6686 60.8814 94 59.9062C92.3314 58.9311 91.1071 57.7019 90.3125 56.25C89.518 54.7764 89.0938 53.3173 89.0937 51.8437C89.0937 50.8686 89.3665 50.0372 89.875 49.3437C90.3834 48.6503 91.0339 48.2813 91.8125 48.2812C92.4958 48.2813 93.0095 48.5137 93.375 48.9687C93.7404 49.4238 94.1038 50.0828 94.4375 50.9062C95.1049 52.4882 95.8907 53.6573 96.8125 54.4375C97.75 55.2176 99.0199 55.625 100.625 55.625C101.928 55.625 102.986 55.2176 103.813 54.4375C104.655 53.6357 105.094 52.7373 105.094 51.7187C105.094 50.1585 104.655 48.9964 103.781 48.2812C102.923 47.5661 101.486 46.9001 99.5 46.25C97.2593 45.4915 95.4456 44.6985 94.0313 43.875C92.6329 43.0299 91.4985 41.9277 90.6563 40.5625C89.814 39.1973 89.4063 37.5249 89.4063 35.5312C89.4063 33.7543 89.7839 32.0507 90.5625 30.4687C91.3411 28.8868 92.4903 27.6506 94 26.7188C95.5255 25.7653 97.3548 25.2813 99.5 25.2812Z"/> - <path id="path5079" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46648)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/team.svg b/apps/shorty/img/usage/team.svg deleted file mode 100644 index c2d3c0075d2..00000000000 --- a/apps/shorty/img/usage/team.svg +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062898865" y1="-2.28811738018" x2="1.88918017325" y2="-1.09199169808" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5258" transform="translate(-2.67397e-06, 5.0533e-06)" fill="none"> - <path id="path4049" transform="matrix(0.758527 0 0 0.768105 5.29396e-22 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4051" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47748)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4066" transform="matrix(0.758527 0 0 0.758527 28.6825 27.5818)" fill="#eeeeee" d="M51.3117 0C34.1148 0 20.1891 15.2419 20.1891 34.0447C20.1891 44.7741 24.7371 54.3331 31.8306 60.5733C16.506 70.8805 4.63895 92.9893 0 120.395L55.1922 120.395C59.0298 99.7894 68.1076 83.2199 79.7599 75.3826C75.6622 71.7778 72.6402 66.7497 71.3435 60.9909C71.1645 60.8664 70.999 60.7224 70.8191 60.6012C70.9527 60.4838 71.0806 60.359 71.2124 60.2393C70.8546 58.4247 70.6355 56.5482 70.6355 54.6162C70.6355 44.9453 75.3345 36.4865 82.3819 31.8177C81.3314 14.0536 67.8239 0 51.3117 0Z"/> - <path id="path4076" transform="matrix(0.758527 0 0 0.758527 79.2535 53.036)" fill="#eeeeee" d="M40.1579 0C26.6991 0 15.8005 11.9287 15.8005 26.6442C15.8005 35.0414 19.3599 42.5225 24.9114 47.4063C12.918 55.4729 3.63055 72.7758 0 94.2243L80.3158 94.2243C76.6873 72.791 67.4064 55.5019 55.4248 47.428C60.9821 42.5445 64.5358 35.0463 64.5358 26.6442C64.5358 11.9287 53.6166 0 40.1579 0Z"/> - <path id="path4053" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46644)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.896 205.25 106.73 205.25 106.562C205.25 47.725 159.299 0 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/unlocked.svg b/apps/shorty/img/usage/unlocked.svg deleted file mode 100644 index b993bd1458b..00000000000 --- a/apps/shorty/img/usage/unlocked.svg +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811733465" x2="1.88918016404" y2="-1.09199167635" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5416" transform="translate(-2.95322e-06, -2.15252e-07)" fill="none"> - <path id="path4251" transform="matrix(0.758527 0 0 0.768105 5.29396e-22 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4253" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47756)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g5406" transform="translate(23.3294, 40.9941)" fill="none"> - <path id="path4263" transform="matrix(0.758527 0 0 0.758527 0 0)" fill="#eeeeee" d="M11.875 0C5.28309 0 0 5.3085 0 11.9062L0 37.0938L12.7188 37.0938L12.7188 22.9688C12.7188 16.371 18.0331 11.0625 24.625 11.0625L50.125 11.0625C56.7169 11.0625 62.0312 16.371 62.0312 22.9688L62.0312 37.0938L74.2188 37.0938L74.2188 11.9062C74.2188 5.3085 68.9044 0 62.3125 0Z"/> - <path id="path4265" transform="matrix(0.758527 0 0 0.758527 37.7996 31.8475)" fill="#eeeeee" d="M11.9062 1.13687e-13C5.31434 1.13687e-13 0 5.3085 0 11.9062L0 26.875C0 33.4727 5.31434 38.7812 11.9062 38.7812L87.8125 38.7812C93.6895 38.7812 98.5472 34.5601 99.5312 28.9687L87.9375 28.9687C81.3456 28.9687 76.0312 25.575 76.0312 21.3437C76.0312 17.1125 81.3456 13.6875 87.9375 13.6875L99.7188 13.6875L99.7188 11.9062C99.7188 5.3085 94.4044 0 87.8125 0Z"/> - <path id="path4267" transform="matrix(0.758527 0 0 0.758527 37.7996 66.6074)" fill="#eeeeee" d="M11.9062 0C5.31434 0 0 5.3085 0 11.9063L0 26.875C0 33.4728 5.31434 38.7813 11.9062 38.7813L87.8125 38.7813C93.6895 38.7813 98.5472 34.5601 99.5312 28.9688L87.9375 28.9688C81.3456 28.9688 76.0312 25.575 76.0312 21.3438C76.0312 17.1126 81.3456 13.6875 87.9375 13.6875L99.7188 13.6875L99.7188 11.9063C99.7188 5.3085 94.4044 0 87.8125 0Z"/> - </g> - <path id="path4255" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46648)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.562C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.062C205.251 106.895 205.25 106.73 205.25 106.562C205.25 47.725 159.299 -1.13687e-13 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/img/usage/workstation.svg b/apps/shorty/img/usage/workstation.svg deleted file mode 100644 index 104d98f8552..00000000000 --- a/apps/shorty/img/usage/workstation.svg +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" standalone="no"?> -<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> -<!-- Created using Karbon, part of Calligra: http://www.calligra.org/karbon --> -<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="133.098pt" height="134.778pt"> -<defs> - <linearGradient id="gradient0" gradientTransform="matrix(0.935714 0 0 0.971429 -260.198 309.044)" gradientUnits="objectBoundingBox" x1="1.86062897958" y1="-2.28811733465" x2="1.88918016404" y2="-1.09199167635" spreadMethod="pad"> - <stop stop-color="#edf4fd" offset="0.00000000000" stop-opacity="0.52845044633"/> - <stop stop-color="#175bb3" offset="1.00000000000" stop-opacity="0.00000000000"/> - </linearGradient> - </defs> -<g id="layer1"> - <g id="g5228" transform="translate(7.95475e-07, 1.12198e-05)" fill="none"> - <path id="path4227" transform="matrix(0.758527 0 0 0.768105 0 0)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <path id="path4229" transform="matrix(0.709764 0 0 0.736855 5.34768 4.47748)" fill="#000000" d="M219.336 109.668C219.336 170.236 170.236 219.336 109.668 219.336C49.1001 219.336 0 170.236 0 109.668C0 49.1001 49.1001 0 109.668 0C170.236 0 219.336 49.1001 219.336 109.668Z"/> - <g id="g5179" transform="translate(32.168, 32.4772)" fill="none"> - <path id="rect5085" transform="matrix(0.758527 0 0 0.758527 5.76033 -8.88178e-15)" fill="#eeeeee" d="M14.0643 1.13687e-13C6.27157 1.13687e-13 0 6.74806 0 15.1328L0 72.8262C0 81.211 6.27157 87.959 14.0643 87.959L103.749 87.959C111.542 87.959 117.814 81.211 117.814 72.8262L117.814 15.1328C117.814 6.74806 111.542 0 103.749 0ZM26.9895 13.2622L90.8242 13.2622C98.6169 13.2622 104.889 20.0103 104.889 28.3951L104.889 59.5638C104.889 67.9486 98.6169 74.6968 90.8242 74.6968L26.9895 74.6968C19.1968 74.6968 12.9252 67.9486 12.9252 59.5638L12.9252 28.3951C12.9252 20.0103 19.1968 13.2622 26.9895 13.2622Z"/> - <path id="rect5167" transform="matrix(0.758527 0 0 0.758527 -4.44089e-15 73.5695)" fill="#eeeeee" d="M5 0C2.23 0 0 2.23 0 5L0 31.125C0 33.895 2.23 36.125 5 36.125L127.938 36.125C130.708 36.125 132.938 33.895 132.938 31.125L132.938 5C132.938 2.23 130.708 0 127.938 0ZM15.375 9C19.5823 9 22.9688 12.0823 22.9688 15.9062C22.9688 19.7302 19.5823 22.8438 15.375 22.8438C11.1677 22.8438 7.75 19.7302 7.75 15.9062C7.75 12.0823 11.1677 9 15.375 9ZM78.0938 9.53125L118.5 9.53125C121.27 9.53125 123.5 11.7613 123.5 14.5312L123.5 16.1875C123.5 18.9575 121.27 21.1875 118.5 21.1875L78.0938 21.1875C75.3237 21.1875 73.0938 18.9575 73.0938 16.1875L73.0938 14.5312C73.0938 11.7613 75.3237 9.53125 78.0938 9.53125Z"/> - </g> - <path id="path4231" transform="matrix(0.758527 0 0 0.758527 5.33866 4.46648)" fill="url(#gradient0)" d="M102.625 0C45.9507 0 0 47.725 0 106.563C0 110.315 0.1979 114.004 0.5625 117.656C50.6291 136.382 127.144 150.025 205.25 107.063C205.251 106.896 205.25 106.73 205.25 106.563C205.25 47.725 159.299 1.13687e-13 102.625 0Z"/> - </g> - </g> -</svg> diff --git a/apps/shorty/index.php b/apps/shorty/index.php deleted file mode 100644 index 8c729bae149..00000000000 --- a/apps/shorty/index.php +++ /dev/null @@ -1,149 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file index.php - * This is the plugins central position - * All requests to the plugin are handled by this file. - * Exceptions: system settings, user preferences and relaying - * @access public - * @author Christian Reiner - */ - -OCP\App::setActiveNavigationEntry ( 'shorty_index' ); - -OCP\Util::addStyle ( 'shorty', 'shorty' ); - -OCP\Util::addScript ( 'shorty/3rdparty','jquery.tinysort.min' ); -OCP\Util::addScript ( 'shorty', 'shorty' ); -OCP\Util::addScript ( 'shorty', 'init' ); -if ( OC_Log::DEBUG==OC_Config::getValue( "loglevel", OC_Log::WARN ) ) - OCP\Util::addScript ( 'shorty', 'debug' ); - -// strategy: -// - first: decide which action is requested -// - second: execute that action with an optional argument provided - -// defaults: -$act = 'index'; -$arg = NULL; -// we try to guess what the request indicates: -// - a (shorty) id to be looked up in the database resulting in a forwarding to the stored target -// - a (target) url to be added as a new shorty -// - none of the two, so just a plain list of existing shortys -foreach ($_GET as $key=>$val) // in case there are unexpected, additional arguments like a timestamp added by some stupid proxy -{ - switch ($key) - { - // this is the OC4 argument used to identify the app called, we ignore it: - case 'app': - break; - // any recognizable argument key indicating a url to be added as new shorty ? - case 'url': - case 'uri': - case 'target': - case 'link': - // example: http://.../shorty/index.php?url=http%... - $act = 'acquire'; - $arg = OC_Shorty_Type::req_argument($key,OC_Shorty_Type::URL,FALSE); - break 2; // skip switch AND foreach - // no recognizable key but something else, hm... - // this _might_ be some unexcepted argument, or: - // it is an expected argument, but without recognizable key, so we try to guess by examining the content - // we restrict this 'guessing' to cases where only a single argument is specified - default: - if ( (1==sizeof($_GET)) // only one single request argument - &&( ! reset($_GET)) ) // no value, so maybe just an id - { - // use that source instead of $key, since $key contains replaced chars (php specific exceptions due to var name problems) - $raw = urldecode($_SERVER['QUERY_STRING']); - // now try to interpret its content - if (NULL!==($value=OC_Shorty_Type::normalize($raw,OC_Shorty_Type::URL,FALSE))) - { - // the query string is a url, acquire it as a new shorty - $act = 'acquire'; - $arg = $raw; - break 2; - } - else - { - // no pattern recognized, so we assume an ordinary index action - $act = 'index'; - break 2; - } - } // if - $act='index'; - break 2; - } // switch key -} // foreach key - -// next, execute the "act" whilst considering the 'arg' -switch ($act) -{ - case 'acquire': // add url as new shorty - // keep the url specified as referer, that is the one we want to store - $_SESSION['shorty-referrer'] = $arg; - OCP\Util::writeLog( 'shorty', sprintf("Detected an incoming Shortlet request for url '%s...'",substr($arg,0,80)), OC_Log::INFO ); - header ( sprintf('Location: %s', OCP\Util::linkTo('shorty','index.php')) ); - exit(); - // ===== - case 'index': // action 'index': list of shortys - default: - try - { - // is this a redirect from a call with a target url to be added ? - if ( isset($_SESSION['shorty-referrer']) ) - { - // this takes care of handling the url on the client side - OCP\Util::addScript ( 'shorty', 'add' ); - // add url taked from the session vars to anything contained in the query string - $_SERVER['QUERY_STRING'] = implode('&',array_merge(array('url'=>$_SESSION['shorty-referrer']),explode('&',$_SERVER['QUERY_STRING']))); - } - else - { - // simple desktop initialization, no special actions contained - OCP\Util::addScript ( 'shorty', 'list' ); - } - $tmpl = new OCP\Template( 'shorty', 'tmpl_index', 'user' ); - // the (remote) base url of the qrcode generator - $tmpl->assign ( 'qrcode-url', sprintf('%s?service=%s&url=',OCP\Util::linkToAbsolute("", "public.php"),'shorty_qrcode') ); - // available status (required for select filter in toolbox) - $shorty_status['']=sprintf('- %s -',OC_Shorty_L10n::t('all')); - foreach ( OC_Shorty_Type::$STATUS as $status ) - $shorty_status[$status] = OC_Shorty_L10n::t($status); - $tmpl->assign ( 'shorty-status', $shorty_status ); - // any referrer we want to hand over to the browser ? - if ( array_key_exists('shorty-referrer',$_SESSION) ) - $tmpl->assign ( 'shorty-referrer', $_SESSION['shorty-referrer'] ); - // is sending sms enabled in the personal preferences ? - $tmpl->assign ( 'sms-control', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','sms-control','disabled') ); - // clean up session var so that a browser reload does not trigger the same action again - unset ( $_SESSION['shorty-referrer'] ); - $tmpl->printPage(); - } catch ( OC_Shorty_Exception $e ) { OCP\JSON::error ( array ( 'message'=>$e->getTranslation(), 'data'=>$result ) ); } -} // switch - -?> diff --git a/apps/shorty/js/add.js b/apps/shorty/js/add.js deleted file mode 100644 index 7b120d888ce..00000000000 --- a/apps/shorty/js/add.js +++ /dev/null @@ -1,51 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/add.js - * @brief Client side desktop initialization in case of a call with an url to add - * @author Christian Reiner - */ - -$(document).ready(function(){ - // initialize desktop - var dialog = $('#dialog-add'); - $.when( - Shorty.WUI.Controls.init() - ).pipe(function(){ - Shorty.WUI.List.build(); - }).done(function(){ - $.when( - Shorty.WUI.Dialog.toggle(dialog) - ).done(function(){ - // any referrer handed over from php (explicitly in markup) ? - var target=$('#controls').attr('data-referrer'); - $('#controls').removeAttr('data-referrer'); - dialog.find('#target').val(target); - dialog.find('#title').focus(); - Shorty.WUI.Meta.collect(dialog); - }) - }) -}); // document.ready diff --git a/apps/shorty/js/debug.js b/apps/shorty/js/debug.js deleted file mode 100644 index a45819152ee..00000000000 --- a/apps/shorty/js/debug.js +++ /dev/null @@ -1,71 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY; without even the implied wpayloadanty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/debug.js - * @brief Client side debugging methods - * The inclusion of these definitions trigger additional debug outputs - * @author Christian Reiner - */ - -$(document).ready(function(){ - $.extend(Shorty,{ - Debug:{ - log: function(issue){ - switch (typeof(issue)){ - case 'string': - console.log(issue); - break; - default: - console.log(this.dump(issue)); - } // switch - }, // Shorty.Debuglog() - - dump: function(payload,level){ - var dumped_text = ""; - if(!level) level = 0; - // some padding given at the beginning of the line - var level_padding = ""; - for(var j=0;j<level+1;j++) level_padding += " "; - - if(typeof(payload) == 'object') { - for(var item in payload) { - var value = payload[item]; - - if(typeof(value) == 'object') { - dumped_text += level_padding + "'" + item + "' ...\n"; - dumped_text += dump(value,level+1); - } else { - dumped_text += level_padding + "'" + item + "' => \"" + value + "\"\n"; - } - } - } else { //Stings/Chars/Numbers etc. - dumped_text = "==>"+payload+"<==("+typeof(payload)+")"; - } - return dumped_text; - } // Shorty.Debug.dump() - } // Shorty.Debug - }); -}); diff --git a/apps/shorty/js/init.js b/apps/shorty/js/init.js deleted file mode 100644 index 3ab9fa7091a..00000000000 --- a/apps/shorty/js/init.js +++ /dev/null @@ -1,92 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/init.js - * @brief Client side initialization of desktop actionss - * @author Christian Reiner - */ - -$(document).ready(function(){ - // make notification closeable - $('#content #notification').bind('click',Shorty.WUI.Notification.hide); - // button to open the 'add' dialog - $('#controls #add').bind('click',function(){Shorty.WUI.Dialog.toggle($('#dialog-add'))}); - // close button in dialogs - $('.shorty-dialog #close').bind('click',function(){Shorty.WUI.Dialog.hide($(this).parents('form').eq(0));}); - // status selection in embedded share dialog - $('.shorty-embedded#dialog-share #status').bind('change',function(){ - Shorty.Action.Url.status($(this).siblings('#id').val(),$(this).val()); - }); - // button to open the tools header row in the list - $('#list #titlebar').bind('click',Shorty.WUI.List.Toolbar.toggle); - // button to reload the list - $('#list #toolbar').find('#reload').bind('click',Shorty.WUI.List.build); - // sort buttons - $('#list #toolbar').find('shorty-sorter').bind('click',Shorty.WUI.List.sort); - // add date picker options - $.datepicker.setDefaults({ - dateFormat :'yy-mm-dd', - appendText: "(yyyy-mm-dd)", - changeMonth: true, - changeYear: true, - showOtherMonths: true, - selectOtherMonths: true, - showOn: 'button', - buttonImage: $('#controls').find('#until').eq(0).attr('icon'), - buttonImageOnly: true - }); - $('#controls #until:not([readonly])').datepicker(); - // bind usage to the usage icons - $('#dialog-share img.shorty-usage:not(.disabled)').live('click',function(e){Shorty.WUI.Entry.send(e,$(this));}); - // bind actions to the actions icons - $('#list tbody .shorty-actions a').live('click',function(e){Shorty.WUI.Entry.click(e,$(this));}); - // bind highlighting to clicks on a row, except for the action icons - $('#list tbody tr td:not(#actions)').live('click',function(){ - Shorty.WUI.List.highlight($(this).parents('tr')); - Shorty.WUI.Dialog.hide($('.shorty-embedded').eq(0)); - }); - // pretty select boxes where applicable (class controlled) - $('.chosen').chosen(); - // title & target filter reaction - $('#list thead tr#toolbar').find('th#target,th#title').find('#filter').bind('keyup',function(){ - Shorty.WUI.List.filter( - $($(this).context.parentElement.parentElement).attr('id'), - $(this).val() - ); - }); - // status filter reaction - $('#list thead tr#toolbar th#status select').change(function(){ - Shorty.WUI.List.filter( - $(this).parents('th').attr('id'), - $(this).find(':selected').val() - ); - }); - // column sorting reaction - $('#list thead tr#toolbar div img.shorty-sorter').bind('click',function(){ - Shorty.WUI.List.sort($(this).attr('data-sort-code')); - }); -}); // document.ready - diff --git a/apps/shorty/js/list.js b/apps/shorty/js/list.js deleted file mode 100644 index 89f319e2e33..00000000000 --- a/apps/shorty/js/list.js +++ /dev/null @@ -1,39 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/list.js - * @brief Client side desktop initialization for normal calls of the plugin - * @author Christian Reiner - */ - -$(document).ready(function(){ - // initialize desktop - $.when( - Shorty.WUI.Controls.init() - ).then(function(){ - Shorty.WUI.List.build(); - }); -}); // document.ready diff --git a/apps/shorty/js/preferences.js b/apps/shorty/js/preferences.js deleted file mode 100644 index 4cda3ab37ac..00000000000 --- a/apps/shorty/js/preferences.js +++ /dev/null @@ -1,69 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/preferences.js - * @brief Client side activity initialization for the user preferences dialog - * @author Christian Reiner - */ - -$(document).ready(function(){ - // backend preferences, activate hints for currently selected backend - var type=$('#shorty #backend-type').val()||''; - if (type.length){ - $('#shorty #backend-'+type).show(); - } - // backend 'static': initialize example that depends on backend-base system setting - if ($('#shorty #backend-static #backend-static-base').val().length) - $('#shorty #backend-static #example').text($('#shorty #backend-static #backend-static-base').val()+'<shorty id>'); - // backend 'static': offer a clickable example link to verify the correct setup - $('#shorty #backend-static #example').bind('click',function(event){ - event.preventDefault(); - Shorty.Action.Setting.verify(); - }); - // react with a matching explanation and example url when backend type is chosen - $('.chosen').chosen(); - $('#shorty #backend-type').change( - function(){ - var type=$('#shorty #backend-type').val(); - $('#shorty .backend-supplement').hide(); - if (type.length){ - $('#shorty .backend-supplement').filter('#backend-'+type).fadeIn('slow'); - // save preference - Shorty.Action.Preference.set($('#shorty #backend-type').serialize()); - return false; - } - } - ); - // safe preferences - $('#shorty .backend-supplement').focusout(function(){ - // save preference - Shorty.Action.Preference.set($(this).find('input').serialize()); - }); - // safe sms-control - $('#shorty #sms-control').change(function(){ - Shorty.Action.Preference.set($('#shorty #sms-control').serialize()); - }); -}); diff --git a/apps/shorty/js/settings.js b/apps/shorty/js/settings.js deleted file mode 100644 index 254ab4f0c13..00000000000 --- a/apps/shorty/js/settings.js +++ /dev/null @@ -1,53 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/settings.js - * @brief Client side activity initialization for the system settings dialog - * @author Christian Reiner - */ - -$(document).ready(function(){ - // initialize example that depends on backend-base - if ($('#shorty #backend-static-base').val().length) - $('#shorty #backend-static #example').text($('#shorty #backend-static-base').val()+'<shorty id>'); - // modify example upon input of a base - $('#shorty #backend-static-base').bind('input',function(){ - $('#shorty #backend-static #example').text($('#shorty #backend-static-base').val()+'<shorty id>'); - }); - // backend 'static': offer a clickable example link to verify the correct setup - $('#shorty #backend-static #example').bind('click',function(event){ - event.preventDefault(); - Shorty.Action.Setting.verify(); - }); - // store setting - $('#shorty #backend-static-base').focusout(function(){ - // modify example - $('#shorty #backend-static #example').text($('#shorty #backend-static-base').val()+'<shorty id>'); - // save setting - Shorty.Action.Setting.set($('#shorty #backend-static-base').serialize()); - return false; - }); -}); diff --git a/apps/shorty/js/shorty.js b/apps/shorty/js/shorty.js deleted file mode 100644 index 688c3e6e158..00000000000 --- a/apps/shorty/js/shorty.js +++ /dev/null @@ -1,1489 +0,0 @@ -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file js/shorty.js - * @brief Client side activity library - * @author Christian Reiner - */ - -// max()-selector -// usage: var maxWidth = $("a").max(function() {return $(this).width(); }); -$.fn.max = function(selector) { - return Math.max.apply(null, this.map(function(index, el) { return selector.apply(el); }).get() ); -} -// min()-selector -// usage: var minWidth = $("a").min(function() {return $(this).width(); }); -$.fn.min = function(selector) { - return Math.min.apply(null, this.map(function(index, el) { return selector.apply(el); }).get() ); -} - -/** - * @class Shorty - * @brief Central activity library for the client side - * @author Christian Reiner - */ -Shorty = -{ - // ===== Shorty.WUI ===== - WUI: - { - // ===== Shorty.WUI.Controls ===== - Controls: - { - // ===== Shorty.WUI.Controls.init ===== - init: function(){ - if (Shorty.Debug) Shorty.Debug.log("init controls"); - var dfd = new $.Deferred(); - $.when( - Shorty.WUI.Controls.toggle(), - Shorty.WUI.Sums.fill() - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Controls.init - // ===== Shorty.WUI.Controls.toggle ===== - toggle: function(){ - if (Shorty.Debug) Shorty.Debug.log("toggle controls"); - var dfd = new $.Deferred(); - Shorty.WUI.Notification.hide(); - // show or hide dialog - var controls = $('#controls'); - if ( ! controls.is(':visible')){ - $.when( - $.when( - controls.slideDown('slow') - ).done(Shorty.WUI.Sums.fill) - ).done(dfd.resolve) - }else{ - $.when( - controls.slideUp('fast') - ).done(dfd.resolve) - } - return dfd.promise(); - }, // Shorty.WUI.Controls.toggle - }, // Shorty.WUI.Controls - // ===== Shorty.WUI.Desktop ===== - Desktop: - { - // ===== Shorty.WUI.Desktop.show ===== - show: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("show desktop"); - duration = duration || 'slow'; - var dfd = new $.Deferred(); - $.when($('#desktop').fadeTo(duration,1.0)).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Desktop.show - // ===== Shorty.WUI.Desktop.hide ===== - hide: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("hide desktop"); - duration = duration || 'slow'; - var dfd = new $.Deferred(); - $.when($('#desktop').fadeTo(duration,0.3)).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Desktop.hide - }, // Shorty.WUI.Desktop - // ===== Shorty.WUI.Dialog ===== - Dialog: - { - // ===== Shorty.WUI.Dialog.execute ===== - execute: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("execute dialog "+dialog.attr('id')); - var dfd = new $.Deferred(); - switch ( dialog.attr('id') ){ - case 'dialog-add': - $.when( - Shorty.WUI.Notification.hide(), - Shorty.Action.Url.add() - ).done(dfd.resolve) - break; - case 'dialog-edit': - $.when( - Shorty.WUI.Notification.hide(), - Shorty.Action.Url.edit() - ).done(dfd.resolve) - break; - case 'dialog-del': - $.when( - Shorty.WUI.Notification.hide(), - Shorty.Action.Url.del() - ).done(dfd.resolve) - break; - default: - dfd.resolve(); - } // switch - return dfd.promise(); - }, // Shorty.WUI.Dialog.execute - // ===== Shorty.WUI.Dialog.hide ===== - hide: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("hide dialog "+dialog.attr('id')); - var duration = 'slow'; - var dfd = new $.Deferred(); - if (!dialog.is(':visible')) - dfd.resolve(); - else{ - $.when( - dialog.slideUp(duration) - ).pipe(function(){ - switch ( dialog.attr('id') ){ - case 'dialog-add': - dialog.find('#confirm').unbind('click'); - dialog.find('#target').unbind('focusout'); - break; - default: - } // switch - }).pipe(function(){ - if (dialog.hasClass('shorty-standalone')) - Shorty.WUI.Desktop.show(); - }).done(dfd.resolve) - } - return dfd.promise(); - }, // Shorty.WUI.Dialog.hide - // ===== Shorty.WUI.Dialog.reset ===== - reset: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("reset dialog "+dialog.attr('id')); - var dfd = new $.Deferred(); - if (dialog){ - // reset dialog fields - $.when( - $.each(dialog.find('#status'),function(){ - if($(this).is('[data]')) - $(this).val($(this).attr('data')); - else $(this).val(''); - }), - $.each(dialog.find('input,textarea'),function(){ - if($(this).is('[data]')) - $(this).val($(this).attr('data')).attr('placeholder',$(this).attr('data')); - else $(this).val('').attr('placeholder',''); - }), - $.each(dialog.find('.shorty-value'),function(){ - if($(this).is('[data]')) - $(this).text($(this).attr('data')); - else $(this).text(''); - }), - $.each(dialog.find('.shorty-icon'), function(){ - if($(this).is('[data]')) - $(this).attr('src',$(this).attr('data')); - else $(this).attr('src',''); - }), - Shorty.WUI.Dialog.sharpen(dialog,false) - ).done(dfd.resolve) - } - else - dfd.resolve(); - return dfd.promise(); - }, // Shorty.WUI.Dialog.reset - // ===== Shorty.WUI.Dialog.sharpen ===== - sharpen: function(dialog,sharpness){ - if (Shorty.Debug) Shorty.Debug.log("toggle sharpness of dialog '"+dialog.attr('id')+"' to "+sharpness); - var confirm=dialog.find('#confirm'); - if (sharpness){ - $('#dialog-add #busy').fadeOut('slow'); - confirm.unbind('click'); - confirm.bind('click',{dialog: dialog}, function(event){event.preventDefault();Shorty.WUI.Dialog.execute(event.data.dialog);}); - confirm.addClass('sharp'); - }else{ - confirm.unbind('click'); - confirm.bind('click',function(event){event.preventDefault();dialog.find('#target').effect('highlight',{'color':'#CCCCCC'},500);}); - confirm.removeClass('sharp'); - } - }, // Shorty.WUI.Dialog.sharpen - // ===== Shorty.WUI.Dialog.show ===== - show: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("show dialog "+dialog.attr('id')); - var duration = 'slow'; - var dfd = new $.Deferred(); - if (dialog.is(':visible')) - // dialog already open, nothing to do... - dfd.resolve(); - else{ - $('#content form.shorty-dialog').each(function(){ - Shorty.WUI.Dialog.hide($(this)); - }); - // hide 'old' notifications - Shorty.WUI.Notification.hide(), - // some preparations - $.when( - function(){ - var dfd = new $.Deferred(); - if (dialog.hasClass('shorty-standalone')) - $.when(Shorty.WUI.Desktop.hide()).done(dfd.resolve) - else dfd.resolve(); - return dfd.promise(); - }() - ).pipe(function(){ - // prevent submission before entering anything - Shorty.WUI.Dialog.sharpen(dialog,false); - // show dialog - dialog.slideDown(duration); - }).pipe(function(){ - // initialize dialog actions - switch(dialog.attr('id')){ - case 'dialog-add': - dialog.find('#target').focus(); - dialog.find('#target').bind('focusout', {dialog: dialog}, function(event){Shorty.WUI.Meta.collect(event.data.dialog);}); - break; - case 'dialog-edit': - dialog.find('#title').focus(); - Shorty.WUI.Dialog.sharpen(dialog,true); - break; - } // switch - }).done(dfd.resolve) - } - return dfd.promise(); - }, // Shorty.WUI.Dialog.show - // ===== Shorty.WUI.Dialog.toggle ===== - toggle: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("toggle dialog "+dialog.attr('id')); - var dfd = new $.Deferred(); - Shorty.WUI.Notification.hide(); - // show or hide dialog - if ( ! dialog.is(':visible')) - $.when(Shorty.WUI.Dialog.show(dialog)).done(dfd.resolve) - else - $.when(Shorty.WUI.Dialog.hide(dialog)).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Dialog.toggle - // ===== Shorty.WUI.Dialog.wipe ===== - wipe: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("wipe dialog "+dialog.attr('id')); - var dfd = new $.Deferred(); - if (dialog){ - // wipe dialog fields - $.when( - $.each(dialog.find('#status'), function(){$(this).attr('data','blocked');$(this).val('blocked');}), - $.each(dialog.find('input'), function(){$(this).attr('data','');$(this).val('');}), - $.each(dialog.find('textarea'), function(){$(this).attr('data','');$(this).val('');}), - $.each(dialog.find('.shorty-value'),function(){$(this).attr('data','');$(this).text('');}), - $.each(dialog.find('.shorty-icon'), function(){$(this).attr('data','');$(this).attr('src','');}), - Shorty.WUI.Dialog.sharpen(dialog,false) - ).done(dfd.resolve) - } - else - dfd.resolve(); - return dfd.promise(); - }, // Shorty.WUI.Dialog.wipe - }, // Shorty.WUI.Dialog - // ===== Shorty.WUI.Entry ===== - Entry: - { - // ===== Shorty.WUI.Entry.click ===== - click: function(event,element){ - var dfd = new $.Deferred(); - var entry=element.parents('tr').eq(0); - if (Shorty.Debug) Shorty.Debug.log(event.type+" on action "+element.attr('id')+" for entry "+entry.attr('id')); - // - if ($('.shorty-dialog').is(':visible')) - $('.shorty-dialog').each(function(){Shorty.WUI.Dialog.hide($(this));}); - else{ - // highlight clicked row as active entry - $.when( - Shorty.WUI.List.highlight(entry) - ).pipe(function(){ - if ('click'==event.type){ - switch(element.attr('id')){ - case 'del': Shorty.WUI.Entry.del(entry); break; - case 'edit': Shorty.WUI.Entry.edit(entry); break; - case 'open': Shorty.Action.Url.forward(entry); break; - case 'share': Shorty.WUI.Entry.share(entry); break; - case 'show': Shorty.WUI.Entry.show(entry); break; - } // switch - } // if click - }).done(dfd.resolve) - } // else - return dfd.promise(); - }, // Shorty.WUI.Entry.click - // ===== Shorty.WUI.Entry.del ===== - del: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("delete entry "+entry.attr('id')); - if (entry.hasClass('deleted')){ - // change status to deleted - Shorty.Action.Url.status(entry.attr('data-id'),'blocked'); - // mark row as undeleted - entry.removeClass('deleted'); - }else{ - // change status to deleted - Shorty.Action.Url.status(entry.attr('data-id'),'deleted'); - // mark row as deleted - entry.addClass('deleted'); - } - }, // Shorty.WUI.Entry.del - // ===== Shorty.WUI.Entry.edit ===== - edit: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("modify entry "+entry.attr('id')); - var dfd = new $.Deferred(); - // use the existing edit dialog for this - var dialog=$('#controls #dialog-edit'); - // load entry into dialog - dialog.find('#id').val(entry.attr('data-id')); - dialog.find('#status').val(entry.attr('data-status')||''); - dialog.find('#source').val(entry.attr('data-source'||'')); - dialog.find('#target').val(entry.attr('data-target'||'')); - dialog.find('#title').val(entry.attr('data-title')||''); - dialog.find('#clicks').val(entry.attr('data-clicks')||''); - dialog.find('#created').val(entry.attr('data-created')||''); - dialog.find('#accessed').val(entry.attr('data-accessed')||''); - dialog.find('#notes').val(entry.attr('data-notes')||''); -// dialog.find('#until').datepicker('setDate',new Date(entry.attr('data-until'))||''); - dialog.find('#until').datepicker('setDate',new Date(entry.attr('data-until'))||'') - .datepicker('refresh'); - // open edit dialog - Shorty.WUI.Dialog.show(dialog) - $.when( - Shorty.WUI.Meta.get(entry.attr('data-target')) - ).pipe(function(response){ - var meta=response.data; - if (meta.final) - dialog.find('#target').val(meta.final); - dialog.find('#title').attr('placeholder',meta.title); - dialog.find('#meta').fadeTo('fast',0,function(){ - Shorty.WUI.Meta.reset(dialog); - // specify the icons and information to be shown as meta data - dialog.find('#staticon').attr('src',meta.staticon); - dialog.find('#schemicon').attr('src',meta.schemicon); - dialog.find('#favicon').attr('src',meta.favicon); - dialog.find('#mimicon').attr('src',meta.mimicon); - dialog.find('#explanation').html(meta.title?meta.title:'[ '+meta.explanation+' ]'); - dialog.find('#meta').fadeTo('fast',1); - }) - }).done(function(){ - Shorty.WUI.Dialog.sharpen(dialog,true); - dfd.resolve(); - }).fail(function(){ - Shorty.WUI.Dialog.sharpen(dialog,false); - dfd.reject(); - }) - return dfd.promise(); - }, // Shorty.WUI.Entry.edit - // ===== Shorty.WUI.Entry.send ===== - send: function(event,element){ - var dfd = new $.Deferred(); - var action=element.attr('id'); - var entry=element.parents('tr'); - if (Shorty.Debug) Shorty.Debug.log("send action "+action+" on entry "+entry.attr('data-id')); - // take action - $.when( - Shorty.Action.Url.send(action,entry) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Entry.send - // ===== Shorty.WUI.Entry.share ===== - share: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("share entry "+entry.attr('id')); - var dfd = new $.Deferred(); - // use the existing 'share' dialog for this - var dialog=$('#dialog-share'); - // fill and show dialog - dialog.find('#id').val(entry.attr('data-id')) - .attr('data',entry.attr('data-id')); - dialog.find('#source').attr('href',entry.attr('data-source')) - .text(entry.attr('data-source')); - dialog.find('#relay').attr('href',entry.attr('data-relay')) - .text(entry.attr('data-relay')); - dialog.find('#target').attr('href',entry.attr('data-target')) - .text(entry.attr('data-target')); - dialog.find('#status').attr('value',entry.attr('data-status')) - .attr('data',entry.attr('data-status')); - // move 'share' dialog towards entry - dialog.appendTo(entry.find('td#actions')), - // open dialog - $.when( - Shorty.WUI.Dialog.show(dialog) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Entry.share - // ===== Shorty.WUI.Entry.show ===== - show: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("show entry "+entry.attr('id')); - var dfd = new $.Deferred(); - // use the existing edit dialog for this - var dialog=$('#controls #dialog-show'); - // load entry into dialog - dialog.find('#id').attr('data-id',entry.attr('data-id')).val(entry.attr('data-id')); - dialog.find('#status').attr('data-status',entry.attr('data-status')||'').val(t('shorty',entry.attr('data-status'))||''); - dialog.find('#source').attr('data-source',entry.attr('data-source')).val(entry.attr('data-source')); - dialog.find('#target').attr('data-target',entry.attr('data-target')).val(entry.attr('data-target')); - dialog.find('#title').attr('data-title',entry.attr('data-title')).val(entry.attr('data-title')); - dialog.find('#until').attr('data-until',entry.attr('data-until')||'').val(entry.attr('data-until')||''); - dialog.find('#clicks').attr('data-clicks',entry.attr('data-clicks')||'').val(entry.attr('data-clicks')||''); - dialog.find('#created').attr('data-created',entry.attr('data-created')||'').val(entry.attr('data-created')||''); - dialog.find('#accessed').attr('data-accessed',entry.attr('data-accessed')||'').val(entry.attr('data-accessed')||''); - dialog.find('#notes').attr('data-notes',entry.attr('data-notes')).val(entry.attr('data-notes')); - // open edit dialog - Shorty.WUI.Dialog.show(dialog) - $.when( - Shorty.WUI.Meta.get(entry.attr('data-target')) - ).pipe(function(response){ - var meta=response.data; - if (meta.final) - dialog.find('#target').val(meta.final); - dialog.find('#title').attr('placeholder',meta.title); - dialog.find('#meta').fadeTo('fast',0,function(){ - Shorty.WUI.Meta.reset(dialog); - // specify the icons and information to be shown as meta data - dialog.find('#staticon').attr('src',meta.staticon); - dialog.find('#schemicon').attr('src',meta.schemicon); - dialog.find('#favicon').attr('src',meta.favicon); - dialog.find('#mimicon').attr('src',meta.mimicon); - dialog.find('#explanation').html(meta.title?meta.title:'[ '+meta.explanation+' ]'); - dialog.find('#meta').fadeTo('fast',1); - }) - }).done(function(){ - dfd.resolve(); - }).fail(function(){ - dfd.reject(); - }) - return dfd.promise(); - } // Shorty.WUI.Entry.show - }, // Shorty.WUI.Entry - // ===== Shorty.WUI.Hourglass ===== - // Shorty.WUI.Hourglass - Hourglass: - { - // ===== Shorty.WUI.Hourglass.toggle ===== - toggle: function(show){ - if (Shorty.Debug) Shorty.Debug.log("toggle hourglass to "+show?"true":"false"); - var dfd = new $.Deferred(); - var hourglass = $('#desktop .shorty-hourglass'); - if (show){ - if (hourglass.is(':visible')) - dfd.resolve(); - else - $.when( - hourglass.fadeIn('fast') - ).done(dfd.resolve) - }else{ - if (!hourglass.is(':visible')) - dfd.resolve(); - else - $.when( - hourglass.fadeOut('slow') - ).done(dfd.resolve) - } - return dfd.promise(); - }, // Shorty.WUI.Hourglass.toggle - }, // Shorty.WUI.Hourglass - // ===== Shorty.WUI.List ===== - List: - { - // ===== Shorty.WUI.List.add ===== - add: function(list,hidden){ - if (Shorty.Debug) Shorty.Debug.log("add entry to list holding "+list.length+" entries"); - var dfd = new $.Deferred(); - // insert list elements (sets) one by one - var row,set; - $.each(list,function(i,set){ - // clone dummy row from list header: dummy is the last row - row = $('#desktop #list thead tr:last-child').eq(0).clone(); - // set row id to entry id - row.attr('id',set.id); - // add attributes to row, as data and value - $.each(['id','status','title','source','relay','target','clicks','created','accessed','until','notes','favicon'], - function(j,aspect){ - if (hidden) - row.addClass('shorty-fresh'); // might lead to a pulsate effect later - // we wrap the cells content into a span tag - var span=$('<span>'); - // enhance row with real set values - if ('undefined'==set[aspect]) - row.attr('data-'+this,''); - else row.attr('data-'+this,set[aspect]); - // fill data into corresponsing column - var title, content, classes=[]; - switch(aspect) - { - case 'favicon': - span.html('<img class="shorty-icon" width="16" src="'+set[aspect]+'">'); - break; - case 'until': - if (null==set[aspect]) - span.text('-never-'); - else{ - span.text(set[aspect]); - if (Shorty.Date.expired(set[aspect])) - row.addClass('shorty-expired'); - } - break; - case 'title': - span.text(set[aspect]); - span.addClass('ellipsis'); - break; - case 'target': - span.text(set[aspect]); - span.attr('title',set[aspect]); - span.addClass('ellipsis'); - break; - case 'status': - if ('deleted'==set[aspect]) - row.addClass('deleted'); -// span.text(set[aspect]); - span.text(t('shorty',set[aspect])); - break; - default: - span.text(set[aspect]); - } // switch - row.find('td#'+aspect).empty().append(span); - }) // each aspect - // insert new row in table - $('#desktop #list tbody').prepend(row); - }) // each - return dfd.promise(); - }, // Shorty.WUI.List.add - // ===== Shorty.WUI.List.build ===== - build: function() - { - if (Shorty.Debug) Shorty.Debug.log("build list"); - var dfd = new $.Deferred(); - // prepare loading - $.when( - Shorty.WUI.Hourglass.toggle(true), - Shorty.WUI.List.dim(false) - ).done(function(){ - // retrieve new entries - $.when( - Shorty.WUI.List.get() - ).pipe(function(response){ - Shorty.WUI.List.fill(response.data); - }).done(function(){ - $.when( - Shorty.WUI.List.show(), - Shorty.WUI.List.dim(true) - ).always(function(){ - Shorty.WUI.Hourglass.toggle(false) - dfd.resolve(); - }) - }).fail(function(){ - dfd.reject(); - }) - }) - return dfd.promise(); - }, // Shorty.WUI.List.build - // ===== Shorty.WUI.List.dim ===== - dim: function(show){ - if (Shorty.Debug) Shorty.Debug.log("dim list to "+(show?"true":"false")); - var duration='slow'; - var dfd =new $.Deferred(); - var list=$('#desktop #list'); - var body=list.find('tbody'); - if (show) - { - var rows=body.find('tr.shorty-fresh'); - Shorty.WUI.List.highlight(rows.eq(0)); - rows.each(function(){ - $(this).removeClass('shorty-fresh'); - $(this).find('td').effect('pulsate'); - }); - $.when( - Shorty.WUI.List.vacuum(), - body.fadeIn(duration) - ).done(dfd.resolve) - }else{ - if (!body.is(':visible')) - dfd.resolve(); - else - { - $.when( - body.fadeOut(duration) - ).done(dfd.resolve) - } - } - return dfd.promise(); - }, // Shorty.WUI.List.dim - // ===== Shorty.WUI.List.empty ===== - empty: function(){ - if (Shorty.Debug) Shorty.Debug.log("empty list"); - var dfd = new $.Deferred(); - // move embedded dialogs back to their safe place in the controls - $('.shorty-embedded').appendTo($('#controls #dialog-show')); - // remove all rows, one by one - $.when( - $('#desktop').find('#list tbody tr').each(function(){ - if(''!=$(this).attr('id')) - $(this).remove(); - }) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.List.empty - // ===== Shorty.WUI.List.fill ===== - fill: function(list){ - if (Shorty.Debug) Shorty.Debug.log("fill list"); - var dfd = new $.Deferred(); - $.when( - Shorty.WUI.Sums.fill(), - Shorty.WUI.List.empty(), - Shorty.WUI.List.add(list,false) - ).pipe( - // filter list - Shorty.WUI.List.filter('target',$('#list thead tr#toolbar th#target #filter').val()), - Shorty.WUI.List.filter('title', $('#list thead tr#toolbar th#title #filter').val()), - Shorty.WUI.List.filter('status',$('#list thead tr#toolbar th#status select :selected').val()) - ).pipe( - // sort list - $.when( - Shorty.Action.Preference.get('list-sort-code') - ).done(function(pref){ - Shorty.WUI.List.sort(pref['list-sort-code']); - }) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.List.fill - // ===== Shorty.WUI.List.filter ===== - filter: function(column,pattern){ - if (Shorty.Debug) Shorty.Debug.log("filter list by column "+column); - var dfd = new $.Deferred(); - $.when( - $('#list tbody tr').filter(function(){ - return (-1==$(this).find('td#'+column+' span').text().toLowerCase().indexOf(pattern.toLowerCase())); - }).addClass('shorty-filtered'), - $('#list tbody tr').not(function(){ - return (-1==$(this).find('td#'+column+' span').text().toLowerCase().indexOf(pattern.toLowerCase())); - }).removeClass('shorty-filtered') - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.List.filter - // ===== Shorty.WUI.List.get ===== - get: function(){ - if (Shorty.Debug) Shorty.Debug.log("get list"); - var dfd = new $.Deferred(); - $.when( - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','list.php'), - cache: false - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ) - ).done(function(response){ - dfd.resolve(response); - }).fail(function(response){ - dfd.reject(response); - }) - return dfd.promise(); - }, // Shorty.WUI.List.get - // ===== Shorty.WUI.List.hide ===== - hide: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("hide list"); - duration = 'slow'; - var dfd = new $.Deferred(); - var list = $('#desktop #list'); - if ( ! list.is(':visible')) - dfd.resolve(); - else - { - $.when( - list.fadeOut(duration) - ).done(dfd.resolve) - } - return dfd.promise(); - }, // Shorty.WUI.List.hide - // ===== Shorty.WUI.List.highlight ===== - highlight: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("highlighting list entry "+entry.attr('id')); - var dfd = new $.Deferred(); - // close any open embedded dialog - $.when( - Shorty.WUI.Dialog.hide($('.shorty-dialog')) - ).pipe(function(){ - // neutralize all rows that might have been highlighted - $('#desktop #list tr').removeClass('clicked'); - entry.addClass('clicked'); - }).always(dfd.resolve); - return dfd.promise(); - }, // Shorty.WUI.List.highlight - // ===== Shorty.WUI.List.modify ===== - modify: function(list,hidden){ - if (Shorty.Debug) Shorty.Debug.log("modify entry in list holding "+list.length+" entries"); - var dfd = new $.Deferred(); - // modify list elements (sets) one by one - var row,set; - $.each(list,function(i,set){ - // select row from list by id - row=$('#desktop #list tbody tr#'+set.id); - // modify attributes in row, as data and value - $.each(['status','title','until','notes'], - function(j,aspect){ - if (set[aspect]){ - // enhance row with actual set values - row.attr('data-'+this,set[aspect]); - if (hidden) row.addClass('shorty-fresh'); - // fill data into corresponsing column - var content, classes=[]; - switch(aspect) - { - case 'until': - if (null==set[aspect]) - content='-never-'; - else{ - content=set[aspect]; - if (Shorty.Date.expired(set[aspect])) - row.addClass('shorty-expired'); - } - break; - case 'title': - classes.push('ellipsis'); - content=set[aspect]; - break; - case 'status': - if ('deleted'==set[aspect]) - row.addClass('deleted'); - content=set[aspect]; - break; - default: - content=set[aspect]; - } // switch - // show modified column immediately or keep it for a later pulsation effect ? - row.find('td').filter('#'+aspect).html('<span class="'+classes.join(' ')+'">'+content+'</span>'); - } // if aspect - }) // each aspect - }) // each entry - return dfd.resolve().promise(); - }, // Shorty.WUI.List.modify - // ===== Shorty.WUI.List.show ===== - show: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("show list"); - duration = 'slow'; - var dfd = new $.Deferred(); - var list = $('#desktop #list'); - if (list.is(':visible')) - dfd.resolve(); - else - { - // list currently not visible, show it - $.when( - list.find('tbody').show(), - list.fadeIn(duration) - ).done(function(){ - dfd.resolve(); - Shorty.WUI.List.vacuum(); - }) - } - return dfd.promise(); - }, // Shorty.WUI.List.show - // ===== Shorty.WUI.List.sort ===== - sort: function(sortCode){ - sortCore = sortCode || 'cd'; - var icon=$('#list thead tr#toolbar th div img[data-sort-code="'+sortCode+'"]'); - var sortCol=icon.parents('th').attr('id'); - var sortDir=icon.attr('data-sort-direction'); - if (Shorty.Debug) Shorty.Debug.log("sorting list column "+sortCol+" "+(sortDir=='asc'?'ascending':'descending')); - // use the 'tinysort' jquery plugin for sorting - switch (sortCol){ - case 'until': - $('#list tbody>tr').tsort('td#until',{order:sortDir}); - break; - default: - $('#list tbody>tr').tsort({attr:'data-'+sortCol,order:sortDir}); - } // switch - // mark currently active sort icon - var icons=$('#list thead tr#toolbar img.shorty-sorter'); - icons.removeClass('shorty-active'); - icons.filter('[data-sort-code="'+sortCode+'"]').addClass('shorty-active'); - // store the sorting code as preference, for returning list retrievals - Shorty.Action.Preference.set({'list-sort-code':sortCode}); - }, // Shorty.WUI.List.sort - // ===== Shorty.WUI.List.toggle ===== - toggle: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("toggle list"); - duration = 'slow'; - var dfd = new $.Deferred(); - if (list.is(':visible')) - return Shorty.WUI.List.hide(); - else - return Shorty.WUI.List.show(); - }, // Shorty.WUI.List.toggle - // ===== Shorty.WUI.List.vacuum ===== - vacuum: function(){ - if (Shorty.Debug) Shorty.Debug.log("vacuum list"); - // list is empty if no row exists - if (0!=$('#list tbody').find('tr').length) - $('#vacuum').fadeOut('fast'); - else - $('#vacuum').fadeIn('slow'); - }, // Shorty.WUI.List.vacuum - // ===== Shorty.WUI.List.Toolbar ===== - Toolbar: - { - // ===== Shorty.WUI.List.Toolbar.toggle ===== - toggle: function(duration){ - if (Shorty.Debug) Shorty.Debug.log("toggle list toolbar"); - duration = duration || 'slow'; - var button=$('#list #tools'); - var toolbar=$('#list #toolbar'); - var dfd = new $.Deferred(); - if (!toolbar.find('div').is(':visible')){ - // tool NOT visible: open toolbar - $.when( - toolbar.find('div').slideDown(duration) - ).pipe( - button.attr('src',button.attr('data-minus')) - ).done(dfd.resolve) - }else{ // toolbar IS visible - // any filters active? prevent closing of toolbar ! - if ( ( (toolbar.find('th#title,#target').find('div input#filter:[value!=""]').length) - &&(toolbar.find('th#title,#target').find('div input#filter:[value!=""]').effect('pulsate')) ) - ||( (toolbar.find('th#status select :selected').val()) -// &&(toolbar.find('#status div.chzn-container').effect('pulsate')) ) - &&(toolbar.find('#status').effect('pulsate')) ) - ) { - if (Shorty.Debug) Shorty.Debug.log('active filter prevents closing of toolbar'); - }else{ - // close toolbar - $.when( - toolbar.find('div').slideUp(duration) - ).pipe( - button.attr('src',button.attr('data-plus')) - ).done(dfd.resolve) - } - } - return dfd.promise(); - }, // Shorty.WUI.List.Toolbar.toggle - }, // Shorty.WUI.List.Toolbar - }, // Shorty.WUI.List - // ===== Shorty.WUI.Notification ===== - Notification: - { - // ===== Shorty.WUI.Notification.hide ===== - hide: function(){ - if (Shorty.Debug) Shorty.Debug.log("hide notification"); - var dfd = new $.Deferred(); - $.when( - $('#notification').slideUp('fast') - ).pipe(function(){ - $('#notification').text(''); - }).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Notification.hide - // ===== Shorty.WUI.Notification.show ===== - show: function(message,level){ - if (Shorty.Debug) Shorty.Debug.log("show notification with level "+level); - level = level || 'info'; - var dfd = new $.Deferred(); - var duration = 'slow'; - var notification = $('#notification'); - if (message && message.length){ - $.when( - notification.slideUp('fast') - ).done(function(){ - switch(level){ - case 'debug': - // detect debug mode by checking, of function 'debug()' exists - if ( Shorty.Debug ){ - Shorty.Debug.log('Debug: '+message); - $.when( - notification.attr('title', 'debug message'), - notification.text('Debug: '+message), - notification.slideDown(duration) - ).done(dfd.resolve) - } - else - dfd.resolve(); - break; - case 'error': - if (Shorty.Debug) - Shorty.Debug.log('Error: '+message); - $.when( - notification.attr('title', 'error message'), - notification.text('Error: ' + message), - notification.slideDown(duration) - ).done(dfd.resolve) - break; - default: // 'info' - if ( message.length ){ - if (Shorty.Debug) - Shorty.Debug.log('Info: '+message); - $.when( - notification.text(message), - notification.slideDown(duration) - ).done(dfd.resolve) - }else{ - $.when( - notification.text('') - ).done(dfd.resolve) - } - } // switch - }) - } // if message - return dfd.promise(); - }, // Shorty.WUI.Notification.show - }, // Shorty.WUI.Notification - // ===== Shorty.WUI.Meta: ===== - Meta: - { - // ===== Shorty.WUI.Meta.collect ===== - collect: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("collect meta data"); - var dfd = new $.Deferred(); - var target = $('#dialog-add #target').val().trim(); - // don't bother getting active on empty input - if ( ! target.length ){ - dialog.find('#target').focus(); - dfd.resolve(); - return dfd.promise(); - } - // start expressing activity - $('#dialog-add #busy').fadeIn('fast'); - // fill in fallback protocol scheme 'http' if none is specified - var regexp = /^[a-zA-Z0-9]+\:\//; - if ( ! regexp.test(target) ){ - target = 'http://' + target; - dialog.find('#target').val(target); - } - // query meta data from target - $.when( - Shorty.WUI.Meta.get(target) - ).done(function(response){ - var meta=response.data; - if (meta.final) - dialog.find('#target').val(meta.final); - dialog.find('#title').attr('placeholder',meta.title); - dialog.find('#meta').fadeTo('fast',0,function(){ - Shorty.WUI.Meta.reset(dialog); - // specify the icons and information to be shown as meta data - dialog.find('#staticon').attr('src',meta.staticon); - dialog.find('#schemicon').attr('src',meta.schemicon); - dialog.find('#favicon').attr('src',meta.favicon); - dialog.find('#mimicon').attr('src',meta.mimicon); - dialog.find('#explanation').html(meta.title?meta.title:'[ '+meta.explanation+' ]'); - dialog.find('#meta').fadeTo('fast',1); - Shorty.WUI.Dialog.sharpen(dialog,true); - // stop expressing activity - $('#dialog-add #busy').fadeOut('slow'); - }); - dfd.resolve(response); - }).fail(function(reponse){ - Shorty.WUI.Dialog.sharpen(dialog,false); - dfd.reject(response); - }) - return dfd.promise(); - }, // Shorty.WUI.Meta.collect - // ===== Shorty.WUI.Meta.get ===== - get: function(target){ - if (Shorty.Debug) Shorty.Debug.log("get meta data for target "+target); - var dfd = new $.Deferred(); - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','meta.php'), - cache: false, - data: { target: encodeURIComponent(target) } - }).pipe( - function(response){return Shorty.Ajax.eval(response);}, - function(response){return Shorty.Ajax.fail(response);} - ).done(function(response){ - dfd.resolve(response); - }).fail(function(response){ - dfd.reject(response); - }) - return dfd.promise(); - }, // Shorty.WUI.Meta.get - // ===== Shorty.WUI.Meta.reset ===== - reset: function(dialog){ - if (Shorty.Debug) Shorty.Debug.log("reset meta data"); - dialog.find('#staticon').attr('src',dialog.find('#staticon').attr('data')); - dialog.find('#schemicon').attr('src',dialog.find('#schemicon').attr('data')); - dialog.find('#favicon').attr('src',dialog.find('#favicon').attr('data')); - dialog.find('#mimicon').attr('src',dialog.find('#mimicon').attr('data')); - dialog.find('#explanation').html(dialog.find('#explanation').attr('data')); - dialog.find('#meta').fadeTo('fast',1); - }, // Shorty.WUI.Meta.reset - }, // Shorty.WUI.Meta - // ===== Shorty.WUI.Sums ===== - Sums: - { - // ===== Shorty.WUI.Sums.fill ===== - fill: function(){ - if (Shorty.Debug) Shorty.Debug.log("fill sums"); - var dfd = new $.Deferred(); - $.when( - // update (set) sum values in the control bar - Shorty.WUI.Sums.get(function(data){ - $('#controls #sum_shortys').text(data.sum_shortys); - $('#controls #sum_clicks').text(data.sum_clicks); - }) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.WUI.Sums.fill - // ===== Shorty.WUI.Sums.get ===== - get: function(callback){ - if (Shorty.Debug) Shorty.Debug.log("get sums"); - var dfd = new $.Deferred(); - $.when( - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','count.php'), - cache: false, - data: { } - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ) - ).done(function(response){ - if (callback) callback(response.data); - dfd.resolve(response); - }).fail(function(response){ - dfd.reject(response); - }) - return dfd.promise(); - }, // Shorty.WUI.Sums.get - }, // Shorty.WUI.Sums - }, // Shorty.WUI - - //========== - - Action: - { - // ===== Shorty.Action.Preference ===== - Preference: - { - // ===== Shorty.Action.Preference.get ===== - get:function(data){ - if (Shorty.Debug){Shorty.Debug.log("get preference(s):");Shorty.Debug.log(data);} - var dfd = new $.Deferred(); - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','preferences.php'), - cache: false, - data: data - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).always(function(response){ - if (Shorty.Debug){Shorty.Debug.log("got preference(s):");Shorty.Debug.log(response.data);} - }).done(function(response){ - dfd.resolve(response.data); - }).fail(function(response){ - dfd.reject({}); - }) - return dfd.promise(); - }, // Shorty.Action.Preference.get - // ===== Shorty.Action.Preference.set ===== - set:function(data){ - if (Shorty.Debug){Shorty.Debug.log("set preference(s):");Shorty.Debug.log(data);} - var dfd = new $.Deferred(); - $.ajax({ - type: 'POST', - url: OC.filePath('shorty','ajax','preferences.php'), - cache: false, - data: data - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).always(function(response){ - if (Shorty.Debug){Shorty.Debug.log("got preference(s):");Shorty.Debug.log(response.data);} - }).done(function(response){ - dfd.resolve(response.data); - }).fail(function(response){ - dfd.reject({}); - }) - return dfd.promise(); - }, // Shorty.Action.Preference.set - }, // Shorty.Action.Preference - // ===== Shorty.Action.Setting ===== - Setting: - { - // ===== Shorty.Action.Setting.get ===== - get:function(data){ - if (Shorty.Debug){Shorty.Debug.log("get setting(s):");Shorty.Debug.log(data);} - var dfd = new $.Deferred(); - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','settings.php'), - cache: false, - data: data - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).always(function(response){ - if (Shorty.Debug){Shorty.Debug.log("got preference(s):");Shorty.Debug.log(response.data);} - }).done(function(response){ - dfd.resolve(response.data); - }).fail(function(response){ - dfd.reject({}); - }) - return dfd.promise(); - }, // Shorty.Action.Setting.get - // ===== Shorty.Action.Setting.set ===== - set:function(data){ - if (Shorty.Debug){Shorty.Debug.log("set setting(s):");Shorty.Debug.log(data);} - var dfd = new $.Deferred(); - $.ajax({ - type: 'POST', - url: OC.filePath('shorty','ajax','settings.php'), - cache: false, - data: data - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).always(function(response){ - if (Shorty.Debug){Shorty.Debug.log("got preference(s):");Shorty.Debug.log(response.data);} - }).done(function(response){ - dfd.resolve(response.data); - }).fail(function(response){ - dfd.reject({}); - }) - return dfd.promise(); - }, // Shorty.Action.Setting.set - // ===== Shorty.Action.Setting.popup ===== - popup:{}, - // ===== Shorty.Action.Setting.verify ===== - verify:function(){ - if (!Shorty.Action.Setting.popup.dialog){ - Shorty.Action.Setting.popup=$('#shorty #dialog-verification'); - Shorty.Action.Setting.popup.dialog({show:'fade',autoOpen:false,modal:true}); - Shorty.Action.Setting.popup.dialog('option','minHeight',240 ); - } - var dfd = new $.Deferred(); - $.when( - this.check(Shorty.Action.Setting.popup, - $('#shorty #backend-static #backend-static-base').val()) - ).done(dfd.resolve) - return dfd.promise(); - }, // Shorty.Action.Setting.verify - // ===== Shorty.Action.Setting.check ===== - check:function(popup,target){ - popup.find('#verification-target').text(target); - popup.dialog('open'); - popup.find('#success').hide(); - popup.find('#failure').hide(); - popup.find('#hourglass').fadeIn('fast'); - var dfd = new $.Deferred(); - $.ajax({ - // the '0000000000' below is a special id recognized for testing purposes - url: target+'0000000000', - cache: false, - data: { }, - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).done(function(response){ - $.when( - popup.find('#hourglass').fadeOut('fast') - ).then(function(){ - popup.find('#success').fadeIn('fast'); - dfd.resolve(response); - }) - }).fail(function(response){ - $.when( - popup.find('#hourglass').fadeOut('fast') - ).then(function(){ - popup.find('#failure').fadeIn('fast'); - dfd.reject(response); - }) - }) - return dfd.promise(); - } // Shorty.Action.Setting.check - }, // Shorty.Action.Setting - // ===== Shorty.Action.Url ===== - Url: - { - // ===== Shorty.Action.Url.add ===== - add:function(){ - if (Shorty.Debug) Shorty.Debug.log("action add url"); - var dfd=new $.Deferred(); - var dialog=$('#dialog-add'); - var status=dialog.find('#status').val()||'public'; - var target=dialog.find('#target').val()||''; - var title =dialog.find('#title').val()||''; - var notes =dialog.find('#notes').val()||''; - var until =dialog.find('#until').val()||''; - // store favicon from meta data, except it is the internal default blank - var favicon = dialog.find('#meta #favicon').attr('src'); - favicon=(favicon==dialog.find('#meta #favicon').attr('data'))?'':favicon; - // perform upload of new shorty - $.when( - Shorty.WUI.Notification.hide(), - // close and neutralize dialog - Shorty.WUI.Dialog.hide(dialog), - Shorty.WUI.List.dim(false), - Shorty.WUI.List.show() - ).done(function(){ - var data={status: status, - target: target, - title: title, - notes: notes, - until: until, - favicon: favicon}; - if (Shorty.Debug) Shorty.Debug.log(data); - $.ajax({ - type: 'POST', - url: OC.filePath('shorty','ajax','add.php'), - cache: false, - data: data - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).done(function(response){ - // wipe entries in dialog - Shorty.WUI.Dialog.reset(dialog) - }).done(function(response){ - // add shorty to existing list - Shorty.WUI.List.add([response.data],true); - Shorty.WUI.List.dim(true) - dfd.resolve(response); - }).fail(function(response){ - Shorty.WUI.List.dim(true) - dfd.reject(response); - }) - }) - return dfd.promise(); - }, // ===== Shorty.Action.Url.add ===== - // ===== Shorty.Action.Url.edit ===== - edit: function(){ - if (Shorty.Debug) Shorty.Debug.log("action modify url"); - var dfd=new $.Deferred(); - var dialog=$('#dialog-edit'); - var id =dialog.find('#id').val(); - var status=dialog.find('#status').val()||'blocked'; - var title =dialog.find('#title').val()||''; - var until =dialog.find('#until').val()||''; - var notes =dialog.find('#notes').val()||''; - // perform modification of existing shorty - $.when( - Shorty.WUI.Notification.hide(), - // close and neutralize dialog - Shorty.WUI.Dialog.hide(dialog), - Shorty.WUI.List.dim(false), - Shorty.WUI.List.show() - ).done(function(){ - var data={id: id, - status: status, - title: title, - notes: notes, - until: until}; - if (Shorty.Debug) Shorty.Debug.log(data); - $.ajax({ - type: 'POST', - url: OC.filePath('shorty','ajax','edit.php'), - cache: false, - data: data, - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).done(function(response){ - // wipe entries in dialog - Shorty.WUI.Dialog.reset(dialog); - // modify existing entry in list - Shorty.WUI.List.modify([response.data],true); - Shorty.WUI.List.dim(true) - dfd.resolve(response); - }).fail(function(response){ - dfd.reject(response); - }) - }) - return dfd.promise(); - }, // ===== Shorty.Action.Url.edit ===== - // ===== Shorty.Action.Url.del ===== - del: function(){ - if (Shorty.Debug) Shorty.Debug.log("action delete url"); - var dfd = new $.Deferred(); - var dialog = $('#dialog-edit'); - var id = dialog.find('#id').val(); - $.when( -// Shorty.WUI.Notification.hide(), - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','del.php'), - cache: false, - data: { id: id } - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ) - ).done(function(response){ - // close and neutralize dialog - Shorty.WUI.Dialog.hide(dialog); - // hide and remove deleted entry - // ... - dfd.resolve(response.data); - }).fail(function(response){ - dfd.reject(response.data); - }) - return dfd.promise(); - }, // ===== Shorty.Action.Url.del ===== - // ===== Shorty.Action.Url.forward ===== - forward: function(entry){ - if (Shorty.Debug) Shorty.Debug.log("action forward to entry "+entry.attr('id')); - var url=entry.attr('data-target'); - if (Shorty.Debug) Shorty.Debug.log("opening target url '"+url+"' in new window"); - window.open(url); - }, // Shorty.Action.Url.forward - // ===== Shorty.Action.Url.send ===== - send: function(action,entry){ - if (Shorty.Debug) Shorty.Debug.log("action send via "+action+" with entry "+entry.attr('id')); - switch (action){ - case 'usage-email': - var mailSubject=entry.attr('data-title')||''; - var mailBody=entry.attr('data-notes')+"\n\n"+entry.attr('data-source'); - window.location='mailto:""?' - +'subject='+encodeURIComponent(mailSubject) - +'&body='+encodeURIComponent(mailBody); - break; - case 'usage-sms': - var smsBody=entry.attr('data-title')+" - "+entry.attr('data-notes')+" - "+entry.attr('data-source'); - // unfortunately there is no way to get the body over into the sms application on "sms urls"... - window.prompt(t('shorty',"Copy to clipboard: Ctrl+C, then paste into SMS: Ctrl-V"), smsBody ); - window.location='sms:'; - break; - case 'usage-qrcode': - var title =entry.attr('data-title'); - var source=entry.attr('data-source'); - var target=entry.attr('data-target'); - Shorty.Action.Usage.Dialog.qrcode(title,source,target); - break; - case 'usage-clipboard': - window.prompt(t('shorty',"Copy to clipboard: Ctrl+C"), entry.attr('data-source')); - break; - default: - if (Shorty.Debug) Shorty.Debug.log("usage action '"+action+"' is disabled, refusing to comply"); - } - }, // Shorty.Action.Url.send - // ===== Shorty.Action.Url.show ===== - show: function(){ - var dfd = new $.Deferred(); - var dialog = $('#dialog-show'); - var id = dialog.find('#id').val(); - var record = $(this).parent().parent(); - $('#shorty-add-id').val(record.attr('data-id')); - $('#shorty-add-id').val(record.attr('data-status')); - $('#shorty-add-source').val(record.children('.shorty-source:first').text()); - $('#shorty-add-target').val(record.children('.shorty-target:first').text()); - $('#shorty-add-notes').val(record.children('.shorty-notes:first').text()); - $('#shorty-add-until').val(record.children('.shorty-until:first').text()); - $.when( - function(){ - if ($('.shorty-add').css('display') == 'none'){ - $('.shorty-add').slideToggle(); - } - }, - $('html, body').animate({ scrollTop: $('.shorty-menu').offset().top }, 500) - ).done(dfd.resolve) - return dfd.promise(); - }, // ===== Shorty.Action.Url.show ===== - // ===== Shorty.Action.Url.status ===== - status: function(id,status){ - if (Shorty.Debug) Shorty.Debug.log("changing status of id "+id+" to "+status); - var dfd = new $.Deferred(); - $.ajax({ - type: 'GET', - url: OC.filePath('shorty','ajax','status.php'), - cache: false, - data: { id : id, - status: status } - }).pipe( - function(response){return Shorty.Ajax.eval(response)}, - function(response){return Shorty.Ajax.fail(response)} - ).done(function(){ - // update the rows content - var row=$('#list tbody tr#'+id); - row.attr('data-status',status); - row.find('td#status span').text(t('shorty',status)); - dfd.resolve(); - }).fail(dfd.reject) - return dfd.promise(); - } // Shorty.Action.Url.status - }, // ===== Shorty.Action.Url ===== - // ===== Shorty.Action.Usage ===== - Usage: - { - // ===== Shorty.Action.Usage.Popup ===== - Popup: - { - // ===== Shorty.Action.Usage.Popup.qrcode ===== - qrcode:{}, - }, // Shorty.Action.Usage.Popup - // ===== Shorty.Action.Usage.Dialog ===== - Dialog: - { - // ===== Shorty.Action.Usage.Dialog.qrcode ===== - qrcode:function(title,source,target){ - var qrcode=Shorty.Action.Usage.Popup.qrcode; - if (!qrcode.dialog){ - qrcode=$('#dialog-qrcode'); - qrcode.dialog({show:'fade',autoOpen:false,modal:true}); - qrcode.dialog('option','width',240 ); - //qrcode.dialog('option','height',80 ); - } - // a hidden input field ('qrcode-url') holds the base url to the qrcode generator - // we just add the url parameter for this specific entrys source url - var url=qrcode.find('#qrcode-url').val()+encodeURIComponent(source); - qrcode.dialog('option','title',title); - qrcode.find('#qrcode-img img').attr('src',url).attr('title',source); - qrcode.find('#qrcode-val a').text(url); - qrcode.bind('click',function(){ - qrcode.find('#qrcode-img').toggle(); - qrcode.find('#qrcode-val').toggle(); - }); - qrcode.dialog('open'); - } // Shorty.Action.Usage.Dialog.qrcode - } // Shorty.Action.Usage.Dialog - } // Shorty.Action.Usage - }, // Shorty.Action - - // =========== - - // ===== Shorty.Ajax ===== - Ajax: - { - // ===== Shorty.Ajax.eval ===== - eval:function(response){ - if (Shorty.Debug) Shorty.Debug.log("eval ajax response of status "+response.status); - // Check to see if the response is truely successful. - if (response.status){ - // this is a valid response - if ('success'==response.status){ - Shorty.WUI.Notification.show(response.message,'debug'); - return new $.Deferred().resolve(response); - } else { - Shorty.WUI.Notification.show(response.message,'error'); - return new $.Deferred().reject(response); - } -// }else{ - // TEST (regex) if this is a DB error: - // DB Error: "SQLSTATE[HY000]: General error: 1 near "WHERE": syntax error"..... -// // not a valid response, maybe a DB error ? -// if ('DB error'==response) - } - }, // Shorty.Ajax.eval - - // ===== Shorty.Ajax.fail ===== - fail:function(response){ - if (Shorty.Debug) Shorty.Debug.log("handle ajax failure"); - return new $.Deferred().reject({ - status: 'error', - data: null, - message: [ "Unexpected error: " + response.status + " " + response.statusText ] - }); - } // Shorty.Ajax.fail - }, // Shorty.Ajax - - // ==== Shorty.Date ===== - Date: - { - // ===== Shorty.Date.expired ===== - expired:function(date){ - return (Date.parse(date)<=Date.parse(Date())); - } // Shorty.Date.expired - } // Shorty.Date - -} // Shorty diff --git a/apps/shorty/l10n/de.php b/apps/shorty/l10n/de.php deleted file mode 100644 index cc4eb624a02..00000000000 --- a/apps/shorty/l10n/de.php +++ /dev/null @@ -1,157 +0,0 @@ -<?php $TRANSLATIONS = array( -// folder js -"all" => "alle", -"blocked" => "geblockt", -"deleted" => "gelöscht", -"disabled" => "deaktiviert", -"enabled" => "aktiviert", -"never" => "niemals", -"private" => "privat", -"public" => "öffentlich", -"shared" => "geteilt", - -"bitly.com service" => "bitly.com-Service", -"cli.gs service" => "cli.gs-Service", -"goo.gl service" => "goo.gl-Service", -"is.gd service" => "is.gd-Service", -"ti.ny service" => "ti.ny-Service", -"tiny.cc service" => "tiny.cc-Service", -"static backend" => "statisches Backend", - -"Access" => "Zugriff", -"Add a new shorty" => "Neuen Shorty hinzufügen", -"Add as new" => "Neu hinzufügen", -"Add page as 'Shorty' to ownCloud" => "Seite als 'Shorty' zu ownCloud hinzufügen", -"Anything that appears helpful …" => "Alles, was hilfreich erscheint …", -"Backend" => "Backend", -"Base url" => "Basis-Url", -"Choose a service…" => "Wähle einen Dienst…", -"Click for qrcode image" => "Klicken für QRCode-Bild", -"Click for qrcode url" => "Klicken für QRCode-Url", -"Click it, for whatever site you want to create a Shorty." => "Klicke es, für welche Seite auch immer Du ein 'Shorty' generieren willst.", -"Click registered" => "Click registriert", -"Clicks" => "Klicks", -"Close" => "Schließen", -"Copy to clipboard" => "In die Zwischenablage kopieren", -"Copy to clipboard: Ctrl+C" => "In Zwischenablage kopieren: Strg-C", -"Copy to clipboard: Ctrl+C, then paste into SMS: Ctrl-V" => "In Zwischenablage kopieren: Strg-C, dann in SMS einfügen: Strg-V", -"Counted entries and clicks" => "Einträge und Klicks gezählt", -"Creation" => "Generierung", -"Delete shorty" => "Shorty löschen", -"Drag this to your browser bookmarks." => "Zieh' dies in die Lesezeichen Deines Browsers.", -"Example" => "Beispiel", -"Exception" => "Ausnahme", -"Exception (%s)" => "Ausnahme (%s)", -"Expiration" => "Verfall", -"List currently empty." => "Liste derzeit leer.", -"Loading" => "Lade", -"Modifications for shorty with id '%s' saved" => "Änderungen zu Shorty mit Kennung '%s' gespeichert", -"Modify attributes" => "Attribute ändern", -"Modify shorty" => "Shorty ändern", -"New Shorty" => "Neuer Shorty", -"Notes" => "Notizen", -"Number of entries" => "Anzahl der Einträge", -"Number of entries: %s" => "Anzahl der Einträge: %s", -"QRCode" => "QRCode", -"Open source url" => "Quell-Url öffnen", -"Open relay url" => "Relais-Url öffnen", -"Open target" => "Ziel öffnen", -"Open target url" => "Ziel-Url öffnen", -"Preference saved." => "Präferenz gespeichert.", -"Preference(s) retrieved." => "Präferenz(en) abgefragt.", -"Relay url" => "Relais-Url", -"Reload list" => "Liste neu laden", -"Save" => "Speichern", -"Send by email" => "Als E-Mail verschicken", -"Send by SMS" => "Als SMS verschicken", -"Setting saved." => "Einstellung gespeichert.", -"Shortlet" => "Shortlet", -"Shorty with id '%s' deleted" => "Shorty mit Kennung '%s' gelöscht", -"Shorty source url" => "Shorty Quell-Url", -"Shorty title" => "Shorty-Titel", -"Show details" => "Details zeigen", -"Show as QRCode" => "Als QRCode anzeigen", -"Sort ascending" => "aufsteigend sortieren", -"Sort descending" => "absteigend sortieren", -"Source url" => "Quell-Url", -"Specify a backend base url…" => "Lege eine Basis-Url für das Backend fest…", -"Status" => "Status", -"Status change for shorty with id '%s' saved" => "Statusänderung für Shorty mit Kennung '%s' gespeichert", -"Target" => "Ziel", -"Target url" => "Ziel-Url", -"Target url '%s' is valid" => "Ziel-Url '%s' ist valide", -"Test and use" => "Testen und nutzen", -"Title" => "Titel", -"Total of clicks" => "Summe der Klicks", -"Unexpected type of exception caught: %s" => "Unerwarteter Type einer Ausnahme aufgetreten: %s", -"Unknown object of type caught: %s" => "Unbekanntes Objekttyp aufgetreten: %s", -"Url shortened to: %s" => "Url gekürzt zu: %s", -"Verification by click" => "Prüfung durch Klicken", - -"%s\nMessage(code): %s (%s)\nFile(line): %s (%s)\nInfo: %%s" => "%s\Nachricht(Code): %s (%s)\nDatei(Zeile): %s (%s)\nInfo: %%s", - -"API access key" => "API-Zugriffsschlüssel", -"Account" => "Nutzerkonto", -"API key" => "API-Schlüssel", -"bit.ly user" => "bit.ly-Nutzer", -"bit.ly user name" => "bit.ly-Nutzerkennung", -"bit.ly key" => "bit.ly-Schlüssel", -"bit.ly users key" => "bit.ly-Nutzerschlüssel", -"Google API key" => "Google API-Schlüssel", -"Google API account" => "Google API-Nutzerkonto", -"tiny.cc user" => "tiny.cc-Nutzer", -"tiny.cc user name" => "tiny.cc-Nutzerkennung", -"tiny.cc key" => "tiny.cc-Schlüssel", -"tiny.cc user key" => "tiny.cc-Nutzerschlüssel", - -"The external 'bitly.com' service is used to register a short url for each generated shorty." -=> "Der externe 'bitly.com'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"This means you have to register an '%s' at their site first." -=> "Das bedeutet, zunächst muss ein '%s' auf deren Seite registriert werden.", -"The external 'turl' service is used to register a short url for each generated shorty." -=> "Der externe 'turl'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"The external 'ti.ny' service is used to register a short url for each generated shorty." -=> "Der externe 'ti.ny'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"The external 'cli.gs' service is used to register a short url for each generated shorty." -=> "Der externe 'cli.gs'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"The external 'is.gd' service is used to register a short url for each generated shorty." -=> "Der externe 'is.gd'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"The external 'tiny.cc' service is used to register a short url for each generated shorty." -=>"Der externe 'tiny.cc'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"No backend is used, direct links pointing to your ownCloud are generated." -=> "Kein Backend wird verwendet, einfache direkte Links zur ownCloud werden erzeugt.", -"The service requires you to authenticate yourself by providing a valid bit.ly user name and an '%s'." -=> "Dieser Dienst erfordert die Authentifizierung durch eine valide bit.ly-Nutzerkennung und einen '%s'", -"Such links are most likely longer than those generated when using a backend." -=> "Solche Links werden sicherlich länger sein, als wenn ein Backend eingesetzt wird.", -"However this option does not rely on any third party service and keeps your shortys under your control." -=> "Dafür stützt sich diese Option aber nicht auf fremde Angebote und belässt die Shorties unter eigener Kontrolle.", -"A static, rule-based backend is used, shorty links are generated relative to a given base url." -=> "Ein statisches, regelbasiertes Backend wird genutzt, Shorty-Links werden relativ zu einer gegebenen Basis-Url generiert.", -"Since this setup depends on server based configuration rules the base url can only be specified in the 'Admin' section of the configuration." -=> "Da diese Konfiguration von serverseitigen Konfigurationsregeln abhängt, kann die Basis-Url nur unter 'Verwaltung' in der Konfiguration festgelegt werden.", -"You have to take care that any request to the url configured here is internally mapped to the 'shorty' module." -=> "Es muss sicher gestellt werden, dass jede Anfrage an die hier konfigurierte URL intern umgesetzt wird auf das 'Shorty'-Modul", -"Have a try with the example link provided, click it, it should result in a confirmation that your setup is working." -=> "Einfach den verfügbaren Beispiel-Link durch Anklicken testen. Das sollte zu einer Bestätigung führen, dass die Konfiguration funktioniert.", -"Leave empty if you can't provide a short base url that is mapped the described way." -=> "Einfach leer lassen, wenn keine Basis-URL angegeben werden kann, die wir beschrieben umgesetzt wird.", -"Only use this backend, if you can provide a short base url that is mapped the described way. Your shorties won't work otherwise." -=> "Dieses Backend kann nur verwendet werden, wenn die Basis-Url in der beschriebenen Art umgesetzt wird. Die Shorties werden andernfalls nicht nutzbar sein.", -"Googles external 'goo.gl service' is used to register a short url for each generated shorty." -=> "Googles externer 'goo.gl'-Dienst wird genutzt, um eine Kurz-Url für jeden generierten Shorty zu registrieren.", -"You must provide a valid '%s' to use this service." -=> "Es muss eine valide '%s' angegeben werden um diesen Dienst nutzen zu können. ", -"This means you require a 'Google API console account'." -=> "Das bedeutet, dass ein 'Google API console account' benötigt wird", -"Register a new '%s' at their pages." -=> "Einen neuen '%s' auf deren Seite registrieren.", -"Enabling the SMS option will offer sending a Shorty via SMS." -=> "Aktivieren der SMS-Option bietet das Versenden von Shortys via SMS an.", -"Unfortunately support for 'SMS url handling' is usually only found on mobile devices like smart phones." -=> "Unglücklicherweise werden 'SMS-Urls' typischerweise nur auf mobilen Geräten wie etwa Smartphones unterstützt.", -"In addition, the implementations found in Android or iOS are minimalistic, buggy and differ from system to system." -=> "Darüber hinaus sind die Implementierungen, etwa die in Adroid oder auch iOS minimalistisch, fehlerhaft und unterschiedlich von System zu System.", -"In short: this might not work for you, therefore you can disable it…" -=> "Kurz gesagt: die mag nicht funktionieren, daher can die Option deaktiviert werden…", -);
\ No newline at end of file diff --git a/apps/shorty/lib/backend.php b/apps/shorty/lib/backend.php deleted file mode 100644 index aa6c58b4490..00000000000 --- a/apps/shorty/lib/backend.php +++ /dev/null @@ -1,286 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/backend.php - * Routines to use remote (online) shortening services as backends in a local workflow - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Backend - * @brief Library to register urls using backends, typically remote (online) url shortening services - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Backend -{ - /** - * @method OC_Shorty_Backend::registerUrl - * @brief Wrapper function around the specific backend routines - * @param id (string) Internal shorty id used to reference a shorty upon usage. - * @returns (string) The shortened url as generated by a specific backend. - * @throws OC_Shorty_Exception taking over the explaining of the failure from the specific backend - * @access public - * @author Christian Reiner - */ - static function registerUrl ( $id ) - { - try - { - // construct the $relay, the url to be called to reach THIS service (ownclouds shorty plugin) - $relay = OC_Shorty_Tools::relayUrl ( $id ); - // call backend specific work horse - switch ( $type=OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-type','none') ) - { - default: return OC_Shorty_Backend::registerUrl_default ( $id, $relay ); - case 'static': return OC_Shorty_Backend::registerUrl_static ( $id, $relay ); - case 'bitly': return OC_Shorty_Backend::registerUrl_bitly ( $id, $relay ); - case 'cligs': return OC_Shorty_Backend::registerUrl_cligs ( $id, $relay ); - case 'google': return OC_Shorty_Backend::registerUrl_google ( $id, $relay ); - case 'isgd': return OC_Shorty_Backend::registerUrl_isgd ( $id, $relay ); - case 'tinyurl': return OC_Shorty_Backend::registerUrl_tinyurl ( $id, $relay ); - case 'tinycc': return OC_Shorty_Backend::registerUrl_tinycc ( $id, $relay ); - } // switch - } // try - catch (OC_Shorty_Exception $e) - { - throw $e; - } // catch - catch (Exception $e) - { - throw new OC_Shorty_Exception ( "Failed to register url '%s' at '%s' backend", array($relay,$type) ); - } // catch - } // OC_Shorty_Backend::registerUrl - - /** - * @method OC_Shorty_Backend::registerUrl_default - * @brief Pseudo-registers a given local relay url - * @param id (string) - * @param relay (url) - * @returns validated and pseudo-registered relay - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_default ( $id, $relay ) - { - return OC_Shorty_Type::validate ( $relay, OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_default - - /** - * @method OC_Shorty_Backend::registerUrl_static - * @brief Registers a given local relay url as local static shorty - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_static ( $id, $relay ) - { - if ( (FALSE===($base=trim ( OCP\Config::getAppValue('shorty','backend-static-base',FALSE)))) - ||(empty($base)) ) - throw new OC_Shorty_Exception ( 'No base url defined for the static backend' ); - return OC_Shorty_Type::validate ( $base.$id, OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_static - - /** - * @method OC_Shorty_Backend::registerUrl_bitly - * @brief Registers a given local relay url at the bit.ly shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_bitly ( $id, $relay ) - { - $bitly_api_user = OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-bitly-user',''); - $bitly_api_key = OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-bitly-key', ''); - if ( ! $bitly_api_key || ! $bitly_api_user ) - throw new OC_Shorty_Exception ( 'No API user or key configured' ); - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, 'https://api-ssl.bit.ly/shorten' ); - curl_setopt ( $curl, CURLOPT_SSL_VERIFYHOST, TRUE ); - curl_setopt ( $curl, CURLOPT_POST, TRUE ); - curl_setopt ( $curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json') ); - curl_setopt ( $curl, CURLOPT_POSTFIELDS, json_encode(array('version'=>'2.0.1', - 'longUrl'=>$relay, - 'format'=>'json', - 'login'=>$bitly_api_user, - 'apiKey'=>$bitly_api_key) ) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||(NULL===($payload=json_decode($reply))) - ||(!is_object($payload)) - ||(!property_exists($payload,'id')) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'static'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $payload->id, OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_bitly - - /** - * @method OC_Shorty_Backend::registerUrl_cligs - * @brief Registers a given local relay url at the cli.gs shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_cligs ( $id, $relay ) - { - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, sprintf('http://cli.gs/api/v2/cligs/create?url=%s&appid=owncloud_shorty&test=1', urlencode(trim($relay))) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||( ! preg_match( '/^(.+)$/', $reply, $match )) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'cli.gs'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $match[1], OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_cligs - - /** - * @method OC_Shorty_Backend::registerUrl_isgd - * @brief Registers a given local relay url at the is.gd shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_isgd ( $id, $relay ) - { - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, sprintf('http://is.gd/create.php?format=simple&url=%s', urlencode(trim($relay))) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||( ! preg_match( '/^(.+)$/', $reply, $match )) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'is.gd'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $match[1], OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_isgd - - /** - * @method OC_Shorty_Backend::registerUrl_google - * @brief Registers a given local relay url at the google shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_google ( $id, $relay ) - { - $api_key = OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-google-key',''); - if ( ! $api_key ) - throw new OC_Shorty_Exception ( 'No goo.gl API key configured' ); - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, 'https://www.googleapis.com/urlshortener/v1/url' ); - curl_setopt ( $curl, CURLOPT_SSL_VERIFYHOST, TRUE ); - curl_setopt ( $curl, CURLOPT_POST, TRUE ); - curl_setopt ( $curl, CURLOPT_HTTPHEADER, array('Content-Type: application/json') ); - curl_setopt ( $curl, CURLOPT_POSTFIELDS, json_encode(array('longUrl'=>$relay, - 'key'=>$api_key) ) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||(NULL===($payload=json_decode($reply))) - ||(!is_object($payload)) - ||(!property_exists($payload,'id')) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'goo.gl'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $payload->id, OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_google - - /** - * @method OC_Shorty_Backend::registerUrl_tinycc - * @brief Registers a given local relay url at the tiny.cc shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_tinycc ( $id, $relay ) - { - $api_user = OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-tinycc-user',''); - $api_key = OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-tinycc-key',''); - if ( ! $api_key || ! $api_user ) - throw new OC_Shorty_Exception ( 'No goo.gl API key configured' ); - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, 'http://tiny.cc/?c=shorten' ); - curl_setopt ( $curl, CURLOPT_SSL_VERIFYHOST, TRUE ); - curl_setopt ( $curl, CURLOPT_POST, TRUE ); - curl_setopt ( $curl, CURLOPT_HEADER, TRUE ); - curl_setopt ( $curl, CURLOPT_POSTFIELDS, array('longUrl'=>$relay, - 'version'=>'2.0.3', - 'format'=>'json', - 'login'=>$api_user, - 'apiKey'=>$api_key) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||(NULL===($payload=json_decode($reply))) - ||(!is_object($payload)) - ||(!property_exists($payload,'id')) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'tiny.cc'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $payload->id, OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_google - - /** - * @method OC_Shorty_Backend::registerUrl_tinyurl - * @brief Registers a given local relay url at the tinyURL shortening service - * @param id (string) - * @param relay (url) - * @returns registered and validated relay url - * @access public - * @author Chrisian Reiner - */ - static function registerUrl_tinyurl ( $id, $relay ) - { - $curl = curl_init ( ); - curl_setopt ( $curl, CURLOPT_URL, sprintf('http://tinyurl.com/api-create.php?url=%s', urlencode(trim($relay))) ); - curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, TRUE ); - if ( (FALSE===($reply=curl_exec($curl))) - ||( ! preg_match( '/^(.+)$/', $reply, $match )) ) - { - throw new OC_Shorty_Exception ( "Failed to register url at backend 'tinyUrl'" ); - } - curl_close ( $curl ); - return OC_Shorty_Type::validate ( $match[1], OC_Shorty_Type::URL ); - } // OC_Shorty_Backend::registerUrl_tinyurl - -} // class OC_Shorty_Backend diff --git a/apps/shorty/lib/exception.php b/apps/shorty/lib/exception.php deleted file mode 100644 index daeb9d10a9c..00000000000 --- a/apps/shorty/lib/exception.php +++ /dev/null @@ -1,162 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/exception.php - * Application specific exception class - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Exception - * @brief Application specific exception class - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Exception extends Exception -{ - protected $phrase = ''; - protected $param = array ( ); - - /** - * @method OC_Shorty_Exception::__construct - * @brief: Constructs an exception based on a phrase and a set of parameters - * @param phrase (string) Human readable message that should be translatable - * @param param (array) Set of parameters to be used as sprintf arguments to fill the phrase - * @access public - * @author Christian Reiner - */ - public function __construct ( $phrase, $param=array() ) - { - if ( is_array($param) ) - $this->param = $param; - else $this->param = array($param); - $this->phrase = $phrase; -// $this->message = vsprintf ( $phrase, $this->params ); - Exception::__construct ( vsprintf($phrase,$this->param), 1 ); - } - - /** - * @method OC_Shorty_Exception::getTranslation - * @brief: Returns the translated message of the exception - * @returns (string) Translated message including the filled in set of arguments - * @access public - * @author Christian Reiner - */ - public function getTranslation ( ) - { - return OC_Shorty_L10n::t ( $this->phrase, $this->param ); - } - - /** - * @method OC_Shorty_Exception::JSONerror - * @brief Calls OCP\JSON::error with a pretty formated version of an exception - * @param e (exception) an exception object holding information - * @returns (json) OCP\JSON::error - * @access public - * @author Christian Reiner - */ - static function JSONerror ( $e ) - { - $title = OC_Shorty_L10n::t("Exception"); - switch ( get_class($e) ) - { - case 'OC_Shorty_Exception': - $message = $e->getTranslation(); - break; - case 'PDOException': - $message = sprintf ( OC_Shorty_L10n::t( "%s\nMessage(code): %s (%s)\nFile(line): %s (%s)\nInfo: %%s", - OC_Shorty_L10n::t("Exception (%s)", get_class($e)), - htmlspecialchars($e->getMessage()), - htmlspecialchars($e->getCode()), - htmlspecialchars($e->getFile()), - htmlspecialchars($e->getLine()) ), - (method_exists($e,'errorInfo') ? trim($e->errorInfo()) : '-/-') ); - break; - default: - if ( is_a($e,'Exception') ) - $message = OC_Shorty_L10n::t("Unexpected type of exception caught: %s", get_class($e)); - else $message = OC_Shorty_L10n::t("Unknown object of type caught: %s", get_class($e)); - } // switch - // swallow any accidential output generated by php notices and stuff to preserve a clean JSON reply structure - $output = trim ( OC_Shorty_Tools::ob_control(FALSE) ); - if ( $output ) - { - $message = "! Swallowing accidential output from ajax routines ! \n" - ."Please fix this ! Here is the first line: \n" - .substr ( $output, 0, strpos($output,"\n") ); - OCP\Util::writeLog( 'shorty', $message, OC_Log::WARN ); - } // output - // return a clean JSON error - return OCP\JSON::error ( array ( 'title' => $title, - 'message' => sprintf("%s: %s", $title, $message) ) ); - } // function error -} // class OC_Shorty_Exception - -/** - * @class OC_Shorty_HttpException - * @brief Application specific exception class: protocol layer - * @access public - * @author Christian Reiner - */ -class OC_Shorty_HttpException extends OC_Shorty_Exception -{ - - /** - * @method OC_Shorty_HttpException::__construct - * @brief: Constructs an exception based on a phrase and a set of parameters - * @param status (integer) Http status code - * @access public - * @author Christian Reiner - */ - public function __construct ( $status ) - { - if ( is_numeric($status) - && array_key_exists($status,OC_Shorty_Type::$HTTPCODE) ) - { - $status = intval($status); - $phrase = OC_Shorty_Type::$HTTPCODE[$status]; - } - else - { - $status = 400; - $phrase = OC_Shorty_Type::$HTTPCODE[400]; // "Bad Request" - } // switch - - // return http status code to client (browser) - if ( ! headers_sent() ) - { - header ( sprintf("HTTP/1.0 %s %s",$status,$phrase) ); - } - $tmpl = new OCP\Template("shorty", "tmpl_http_status", "guest"); - $tmpl->assign("explanation", OC_Shorty_L10n::t($phrase)); - $tmpl->printPage(); - exit; - } // function __construct - -} // class OC_Shorty_HttpException - -?> diff --git a/apps/shorty/lib/hooks.php b/apps/shorty/lib/hooks.php deleted file mode 100644 index 6ba59eccbda..00000000000 --- a/apps/shorty/lib/hooks.php +++ /dev/null @@ -1,64 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/hooks.php - * Static class providing routines to populate hooks called by other parts of ownCloud - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Hooks - * @brief Static 'namespace' class for api hook population - * ownCloud propagates to use static classes as namespaces instead of OOP. - * This 'namespace' defines routines to populate hooks called by other parts of ownCloud - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Hooks -{ - /** - * @brief Deletes all Shortys and preferences of a certain user - * @param paramters (array) parameters from postDeleteUser-Hook - * @return bool - */ - public static function deleteUser ( $parameters ) - { - OCP\Util::writeLog ( 'user post delete','wiping all users Shortys', OCP\Util::INFO ); - $result = TRUE; - $param = array ( 'user' => OCP\User::getUser() ); - // wipe shortys - $query = OCP\DB::prepare ( OC_Shorty_Query::WIPE_SHORTYS ); - if ( FALSE===$query->execute($param) ) - $result = FALSE; - // wipe preferences - $query = OCP\DB::prepare ( OC_Shorty_Query::WIPE_PREFERENCES ); - if ( FALSE===$query->execute($param) ) - $result = FALSE; - // report completion success - return $result; - } -} diff --git a/apps/shorty/lib/l10n.php b/apps/shorty/lib/l10n.php deleted file mode 100644 index 648130645a0..00000000000 --- a/apps/shorty/lib/l10n.php +++ /dev/null @@ -1,93 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/l10n.php - * Translation singleton - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_L10n - * @brief Convenient translation singleton - * @access public - * @author Christian Reiner - */ -class OC_Shorty_L10n -{ - /** - * @var OC_Shorty_L10n::dictionary - * @brief An internal dictionary file filled from the translation files provided. - * @access private - * @author Christian Reiner - */ - private $dictionary; - - /** - * @var OC_Shorty_L10n::instance - * @brief Internal singleton object - * @access private - * @author Christian Reiner - */ - static private $instance=NULL; - - /** - * @method OC_Shorty_L10n::__construct - * @brief - * @access private - * @author Christian Reiner - */ - private function __construct ( ) { $this->dictionary = new OC_L10n('shorty'); } - - /** - * @method OC_Shorty_L10n::t - * @brief Translates a given string into the users session language and fills any placeolders - * @param phrase to be translated - * @param … further arguments used as filling tokens in the tradition of printf strategies - * @returns translated phrase or the original phrase incase no translation could be found - * @access public - * @author Christian Reiner - */ - static public function t ( $phrase ) - { - // create singleton instance, if required - if ( ! self::$instance ) - self::$instance = new OC_Shorty_L10n ( ); - // handle different styles of how arguments can be handed over to this method - switch ( func_num_args() ) - { - case 1: return self::$instance->dictionary->t ( $phrase, array() ); - case 2: $arg = func_get_arg(1); - if ( is_array($arg) ) - return self::$instance->dictionary->t ( $phrase, $arg ); - else return self::$instance->dictionary->t ( $phrase, array($arg) ); - default: $args = func_get_args(); - array_shift ( $args ); - return self::$instance->dictionary->t ( $phrase, $args ); - } - } -} // class OC_Shorty_L10n -?> diff --git a/apps/shorty/lib/meta.php b/apps/shorty/lib/meta.php deleted file mode 100644 index 91937bd3c8a..00000000000 --- a/apps/shorty/lib/meta.php +++ /dev/null @@ -1,213 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/meta.php - * Routines to retrieve meta information about a remote url - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Meta - * @brief Static 'namespace' class for url meta information retrieval - * ownCloud propagates to use static classes as namespaces instead of OOP. - * This 'namespace' defines routines for the retrieval of meta information about remote urls. - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Meta -{ - - /** - * @method OC_Shorty_Meta::fetchMetaData - * @brief Retrieves the meta information to a given remote url - * @param url decoded target url for which meta information if requested - * @returns associative array holding the requested meta data - * @access public - * @author Christian Reiner - */ - static function fetchMetaData ( $url ) - { - $url_token = parse_url ( $url ); - // some sane fallback values, in case we cannot get the meta data - $meta = array(); - $meta['target'] = $url; - $meta['title'] = strtolower ( $url_token['host'] ); - $meta['scheme'] = strtolower ( $url_token['scheme'] ); - $meta['mimetype'] = 'application/octet-stream'; - $meta['schemicon'] = self::selectIcon ( 'scheme', strtolower($url_token['scheme']) ); - // we wont bother retrieving data about other protocols than http or ftp - if ( ! in_array(strtolower($url_token['scheme']),array('http','https','ftp','ftps')) ) - return $meta; - // to fetch meta data we rely on curl being installed - if ( ! function_exists('curl_init') ) - return $meta; - // try to retrieve the meta data - $handle = curl_init ( ); - curl_setopt ( $handle, CURLOPT_URL, $url ); - curl_setopt ( $handle, CURLOPT_RETURNTRANSFER, 1 ); - curl_setopt ( $handle, CURLOPT_FOLLOWLOCATION, TRUE ); - curl_setopt ( $handle, CURLOPT_MAXREDIRS, 10 ); - if ( FALSE!==($page=curl_exec($handle)) ) - { - // try to extract title from page - preg_match ( "/<head>.*<title>(.*)<\/title>.*<\/head>/si", $page, $match ); - $meta['title'] = htmlspecialchars_decode ( $match[1] ); - $meta['staticon'] = self::selectIcon ( 'state', TRUE ); - // final url after a possible redirection - $meta['final'] = curl_getinfo ( $handle, CURLINFO_EFFECTIVE_URL ); - // try to extract favicon from page - preg_match ( '/<[^>]*link[^>]*(rel=["\']icon["\']|rel=["\']shortcut icon["\']) .*href=["\']([^>]*)["\'].*>/iU', $page, $match ); - if (1<sizeof($match)) - { - // the specified uri might be an url, an absolute or a relative path - // we have to turn it into an url to be able to display it out of context - $favicon = htmlspecialchars_decode ( $match[2] ); - // test for an url - if (parse_url($favicon,PHP_URL_SCHEME)) - { - $meta['favicon'] = $favicon; - } - // test for an absolute path - elseif ( 0===strpos(parse_url($favicon,PHP_URL_PATH),'/') ) - { - $url_token = parse_url($meta['final']); - $meta['favicon'] = sprintf( '%s://%s/%s', $url_token['scheme'], $url_token['host'], $favicon ); - } - // so it appears to be a relative path - else - { - $url_token = parse_url($meta['final']); - $meta['favicon'] = sprintf( '%s://%s%s%s', $url_token['scheme'], $url_token['host'], dirname($url_token['path']), $favicon ); - } - } - $meta['mimetype'] = preg_replace ( '/^([^;]+);.*/i', '$1', curl_getinfo($handle,CURLINFO_CONTENT_TYPE) ); - $meta['mimicon'] = self::selectIcon ( 'mimetype', $meta['mimetype'] ); - $meta['code'] = curl_getinfo ( $handle, CURLINFO_HTTP_CODE ); - $meta['status'] = OC_Shorty_L10n::t ( self::selectCode('status',$meta['code']) ); - $meta['explanation'] = OC_Shorty_L10n::t ( self::selectCode('explanation',$meta['code']) ); - } - curl_close ( $handle ); - // that's it ! - return $meta; - } // function fetchMetaData - - /** - * @method OC_Shorty_Meta::selectCode - * @brief Some helper utility used to resolve numeric http status codes into human readable strings - * @param aspect a string indicating a section/pool a code is to be resolved in - * @param identifier a string indicating a specific code to be resolved - * @returns a human readable string resolving the specified numeric status code - * @throws OC_Shorty_Exception in case of an undefined code to be resolved - * @access public - * @author Christian Reiner - */ - static function selectCode ( $aspect, $identifier ) - { - // map of official http status codes - $_code_map = array - ( - 'status' => OC_Shorty_Type::$HTTPCODE, - 'explanation' => array - ( - 200 => 'Target url is valid and resolved.', - 201 => 'The request has been fulfilled and created a new ressource.', - 202 => 'The request has been accepted.', - 203 => 'The request yielded in non-authorative information.', - 204 => 'The request has been fulfilled but not produced any content.', - 205 => 'The request has been fulfilled and the view should be reset.', - 206 => 'The request has been fulfilled partially.', - ) - ); - // resolve specified code against map or provide some fallback content - if ( key_exists($aspect,$_code_map) && key_exists($identifier,$_code_map[$aspect]) ) - return $_code_map[$aspect][$identifier]; - else - { - switch ( $aspect ) - { - case 'status': return sprintf("Status %s [unknown]",$identifier); - case 'explanation': return sprintf("[Undefined status code '%s']",$identifier); - default: throw new OC_Shorty_Exception ( "unknown aspect '%s' requested to resolve code '%s'", - array($aspect,$identifier) ); - } // switch - } - } // function selectCode - - /** - * @method OC_Shorty_Meta::selectIcon - * @brief Some helper utility for the easy integrate of icon references into templates and alike - * @param aspect a string indicating a section/pool an icon is to be chosen from - * @param identifier a string indicating a specific icon to be referenced - * @returns a hyper reference to an icon in form of a string - * @access public - * @author Christian Reiner - */ - static function selectIcon ( $aspect, $identifier ) - { - switch ( $aspect ) - { - case 'state': - switch ($identifier) - { - case TRUE: return OCP\Util::imagePath('shorty', 'status/good.png'); - case FALSE: return OCP\Util::imagePath('shorty', 'status/bad.png'); - default: return OCP\Util::imagePath('shorty', 'status/neutral.png'); - } // switch identifier - case 'scheme': - switch ($identifier) - { - case 'http': - case 'https': return OCP\Util::imagePath('shorty', 'scheme/H.png'); - case 'ftp': - case 'ftps': return OCP\Util::imagePath('shorty', 'scheme/F.png'); - case 'sftp': return OCP\Util::imagePath('shorty', 'scheme/S.png'); - case 'mailto': return OCP\Util::imagePath('shorty', 'scheme/M.png'); - case 'gopher': return OCP\Util::imagePath('shorty', 'scheme/G.png'); - case 'webdav': - case 'webdavs': return OCP\Util::imagePath('shorty', 'scheme/W.png'); - default: return OCP\Util::imagePath('shorty', 'blank.png'); - } // switch identifier - case 'mimetype': - $identifier = explode('/',$identifier); - switch ($identifier[0]) - { - case 'audio': return OCP\Util::imagePath('core', 'filetypes/audio.png'); - case 'text': return OCP\Util::imagePath('core', 'filetypes/text.png'); - case 'video': return OCP\Util::imagePath('core', 'filetypes/video.png'); - case 'application': - switch ($identifier[1]) - { - case 'pdf': return OCP\Util::imagePath('core', 'filetypes/application-pdf.png'); - default: return OCP\Util::imagePath('shorty', 'blank.png'); - } // switch identifier[1] - default: return OCP\Util::imagePath('shorty', 'blank.png'); - } // switch identifier[0] - } // switch aspect - } // function selectIcon - -} // class OC_Shorty_Meta -?> diff --git a/apps/shorty/lib/query.php b/apps/shorty/lib/query.php deleted file mode 100644 index 6501a54d927..00000000000 --- a/apps/shorty/lib/query.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/query.php - * Static catalog of sql queries - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Query - * @brief Static catalog of sql queries - * These query templates are referenced by a OC_Shorty_Query::URL_... - * They have to be prapared by adding an array of parameters - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Query -{ - const URL_INSERT = "INSERT INTO *PREFIX*shorty (id,status,favicon,title,source,target,user,until,created,notes) VALUES (:id,:status,:favicon,:title,:source,:target,:user,:until,CURRENT_DATE,:notes)"; - const URL_DELETE = "DELETE FROM *PREFIX*shorty WHERE user=:user AND id=:id"; - const URL_REMOVE = "DELETE FROM *PREFIX*shorty WHERE user=:user AND 'deleted'=status"; - const URL_UPDATE = "UPDATE *PREFIX*shorty SET status=:status,title=:title,until=:until,notes=:notes WHERE user=:user AND id=:id"; - const URL_STATUS = "UPDATE *PREFIX*shorty SET status=:status WHERE user=:user AND id=:id"; - const URL_CLICK = "UPDATE *PREFIX*shorty SET accessed=CURRENT_TIMESTAMP, clicks=(clicks+1) WHERE id=:id"; - const URL_FORWARD = "SELECT user,source,target,status,(until IS NOT NULL AND until!='' AND until<CURRENT_TIMESTAMP) AS expired FROM *PREFIX*shorty WHERE id=:id"; - const URL_SOURCE = "SELECT id,source,target,status,(until IS NOT NULL AND until!='' AND until<CURRENT_TIMESTAMP) AS expired FROM *PREFIX*shorty WHERE source=:source"; - const URL_VERIFY = "SELECT id,status,favicon,title,source,target,clicks,created,accessed,until,notes FROM *PREFIX*shorty WHERE user=:user AND id=:id LIMIT 1"; - const URL_LIST = "SELECT id,status,favicon,title,source,target,clicks,created,accessed,until,notes FROM *PREFIX*shorty WHERE user=:user ORDER BY :sort"; - const URL_COUNT = "SELECT count(*) AS sum_shortys,IFNULL(sum(clicks),0) AS sum_clicks FROM *PREFIX*shorty WHERE user=:user"; - const WIPE_SHORTYS = "DELETE FROM *PREFIX*shorty WHERE user=:user"; - const WIPE_PREFERENCES = "DELETE FROM *PREFIX*preferences WHERE user=:user"; -} // class OC_Shorty_Query -?> diff --git a/apps/shorty/lib/tools.php b/apps/shorty/lib/tools.php deleted file mode 100644 index 2b3bac70672..00000000000 --- a/apps/shorty/lib/tools.php +++ /dev/null @@ -1,235 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/tools.php - * A collection of general utility routines - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Tools - * @brief Collection of a few practical routines, a tool box - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Tools -{ - // internal flag indicating if output buffering should be used to prevent accidentially output during ajax requests - static $ob_usage = TRUE; - // internal flag indicating if there is currently an output buffer active - static $ob_active = FALSE; - - /** - * @method OC_Shorty_Tools::ob_control - * @param on (boolean) wether to activate or deactivate the buffer - * @access public - * @author Christian Reiner - */ - static function ob_control ( $on=TRUE ) - { - $output = NULL; - if ( self::$ob_usage ) - { - // attempt to use outpout buffering - if ( $on ) - { - // start buffering if possible and not yet started before - if ( function_exists('ob_start') // output buffers installed at all ? - && ! self::$ob_active ) // don't stack buffers (create buffer only, if not yet started) - { - ob_implicit_flush ( FALSE ); - ob_start ( ); - self::$ob_active = TRUE; - } - } // if $on==TRUE - else - { - // end buffering _if_ it has been started before - if ( self::$ob_active ) - { - $output = ob_get_contents ( ); - ob_end_clean ( ); - self::$ob_active = FALSE; - } - } // if $on==FALSE - } // if ob_usage - return $output; - } // function ob_control - - /** - * @method OC_Shorty_Tools::db_escape - * @brief escape a value for incusion in db statements - * @param value (string) value to be escaped - * @returns (string) escaped string value - * @throws OC_Shorty_Exception in case of an unknown database engine - * @access public - * @author Christian Reiner - * @todo use mdb2::quote() / mdb2:.escape() instead ? - */ - static function db_escape ( $value ) - { - $type = OCP\Config::getSystemValue ( 'dbtype', 'sqlite' ); - switch ( $type ) - { - case 'sqlite': - case 'sqlite3': - return sqlite_escape_string ( $value ); - case 'pgsql': - return pg_escape_string ( $value ); - case 'mysql': - if (get_magic_quotes_gpc()) - return mysql_real_escape_string ( stripslashes($value) ); - else return mysql_real_escape_string ( $value ); - } - throw new OC_Shorty_Exception ( "unknown database backend type '%1'", array($type) ); - } // function db_escape - - /** - * @method OC_Shorty_Tools::db_timestamp - * @brief current timestamp as required by db engine - * @returns (string) current timestamp as required by db engine - * @throws OC_Shorty_Exception in case of an unknown database engine - * @access public - * @author Christian Reiner - * @todo not really required any more, we rely on CURRENT_TIMESTAMP instead - */ - static function db_timestamp ( ) - { - $type = OCP\Config::getSystemValue( "dbtype", "sqlite" ); - switch ( $type ) - { - case 'sqlite': - case 'sqlite3': return "strftime('%s','now')"; - case 'mysql': return 'UNIX_TIMESTAMP()'; - case 'pgsql': return "date_part('epoch',now())::integer"; - } - throw new OC_Shorty_Exception ( "unknown database backend type '%1'", array($type) ); - } // function db_timestamp - - /** - * @method OC_Shorty_Tools::shorty_id - * @brief Creates a unique id to be used for a new shorty entry - * @returns (string) valid and unique id - * @access public - * @author Christian Reiner - */ - static function shorty_id ( ) - { - // each shorty installation uses a (once self generated) 62 char alphabet - $alphabet=OCP\Config::getAppValue('shorty','id-alphabet'); - if ( empty($alphabet) ) - { - $alphabet = self::randomAlphabet(62); - OCP\Config::setAppValue ( 'shorty', 'id-alphabet', $alphabet ); - } - // use alphabet to generate a id being unique over time - return self::convertToAlphabet ( str_replace(array(' ','.'),'',microtime()), $alphabet ); - } // function shorty_id - - /** - * - */ - static function randomAlphabet ($length) - { - if ( ! is_integer($length) ) - return FALSE; - $c = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxwz0123456789"; - for($l=0;$l<$length;$l++) $s .= $c{rand(0,strlen($c))}; - return str_shuffle($s); - } // function randomAlphabet - - /** - * @method OC_Shorty_Tools::convertToAlphabet - * @brief Converts a given decimal number into an arbitrary base (alphabet) - * @param number decimal value to be converted - * @returns (string) converted value in string notation - * @access public - * @author Christian Reiner - */ - static function convertToAlphabet ( $number, $alphabet ) - { - $alphabetLen = strlen($alphabet); - $decVal = (int) $number; - $number = FALSE; - $nslen = 0; - $pos = 1; - while ($decVal > 0) - { - $valPerChar = pow($alphabetLen, $pos); - $curChar = floor($decVal / $valPerChar); - if ($curChar >= $alphabetLen) - { - $pos++; - } else { - $decVal -= ($curChar * $valPerChar); - if ($number === FALSE) - { - $number = str_repeat($alphabet{1}, $pos); - $nslen = $pos; - } - $number = substr($number, 0, ($nslen - $pos)) . $alphabet{$curChar} . substr($number, (($nslen - $pos) + 1)); - $pos--; - } - } - if ($number === FALSE) $number = $alphabet{1}; - return $number; - } - - /** - * @method OC_Shorty_Tools::relayUrl - * @brief Generates a relay url for a given id acting as a href target for all backends - * @param id (string) shorty id as shorty identification - * @returns (string) generated absolute relay url - * @access public - * @author Christian Reiner - */ - static function relayUrl ($id) - { - return sprintf ( '%s?service=%s&id=%s', OCP\Util::linkToAbsolute("", "public.php"), 'shorty_relay', $id ); - } // function relayUrl - - /** - * @method OC_Shorty_Tools::countShortys - * @brief Returns the total number of entries and clicks from the database - * @returns (array) two elements sum_shortys & sum_clicks holding an integer each - * @access public - * @author Christian Reiner - */ - static function countShorties () - { - $param = array - ( - ':user' => OCP\User::getUser ( ), - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_COUNT ); - $result = $query->execute($param); - $reply = $result->fetchAll(); - return $reply[0]; - } // function countShorties - -} // class OC_Shorty_Tools -?> diff --git a/apps/shorty/lib/type.php b/apps/shorty/lib/type.php deleted file mode 100644 index 97cbf04ddb4..00000000000 --- a/apps/shorty/lib/type.php +++ /dev/null @@ -1,291 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file lib/type.php - * Type handling, recognition and verification routines - * @author Christian Reiner - */ - -/** - * @class OC_Shorty_Type - * @brief Static 'namespace' class offering routines and constants used to handle type recognition and value verification - * @access public - * @author Christian Reiner - */ -class OC_Shorty_Type -{ - // the 'types' of values we deal with, actually more something like flavours - const ID = 'id'; - const STATUS = 'status'; - const SORTKEY = 'sortkey'; - const SORTVAL = 'sortval'; - const STRING = 'string'; - const URL = 'url'; - const INTEGER = 'integer'; - const FLOAT = 'float'; - const DATE = 'date'; - const TIMESTAMP = 'timestamp'; - // a list of all valid list sorting codes - static $SORTING = array ( - '' =>'created DESC', // default - 'aa'=>'accessed', 'ad'=>'accessed DESC', - 'ca'=>'created', 'cd'=>'created DESC', - 'da'=>'until', 'dd'=>'until DESC', - 'ha'=>'clicks', 'hd'=>'clicks DESC', - 'ka'=>'id', 'kd'=>'id DESC', - 'sa'=>'status', 'sd'=>'status DESC', - 'ta'=>'title', 'td'=>'title DESC', - 'ua'=>'target', 'ud'=>'target DESC' ); - // a list of all valid user preferences - static $PREFERENCE = array ( - 'backend-type' => OC_Shorty_Type::STRING, - 'backend-static-base' => OC_Shorty_Type::URL, - 'backend-bitly-user' => OC_Shorty_Type::STRING, - 'backend-bitly-key' => OC_Shorty_Type::STRING, - 'backend-google-key' => OC_Shorty_Type::STRING, - 'backend-tinycc-user' => OC_Shorty_Type::STRING, - 'backend-tinycc-key' => OC_Shorty_Type::STRING, - 'sms-control' => OC_Shorty_Type::STRING, - 'list-sort-code' => OC_Shorty_Type::SORTKEY, - ); - // valid status for entries - static $STATUS = array ( - 'blocked', - 'private', - 'shared', - 'public', - 'deleted', - ); - // a list of implemented backends - static $BACKENDS = array ( - 'none' => ' [ none ] ', - 'static' => 'static backend', -// 'bitly' => 'bitly.com service', -// 'cligs' => 'cli.gs service', - 'isgd' => 'is.gd service', - 'google' => 'goo.gl service', -// 'tinycc' => 'tiny.cc service', - 'tinyurl' => 'ti.ny service', - ); - // a list of all valid system settings - static $SETTING = array ( - 'backend-static-base' => OC_Shorty_Type::URL, - ); - static $HTTPCODE = array ( - 200 => 'Ok', - 201 => 'Created', - 202 => 'Accepted', - 203 => 'Non-Authoritative Information', - 204 => 'No Content', - 205 => 'Reset Content', - 206 => 'Partial Content', - 300 => 'Multiple Choices', - 301 => 'Moved Permanently', - 302 => 'Found', - 303 => 'See Other', - 304 => 'Not Modified', - 305 => 'Use Proxy', - 306 => '(unused)', - 307 => 'Temporary Redirect', - 400 => 'Bad Request', - 401 => 'Unauthorized', - 402 => 'Payment Required', - 403 => 'Forbidden', - 404 => 'Not Found', - 405 => 'Method Not Allowed', - 406 => 'Not Acceptable', - 407 => 'Proxy Authentication Required', - 408 => 'Request Timeout', - 409 => 'Conflict', - 410 => 'Gone', - 411 => 'Length Required', - 412 => 'Precondition Failed', - 413 => 'Request Entity Too Large', - 414 => 'Request-URI Too Long', - 415 => 'Unsupported Media Type', - 416 => 'Requested Range Not Satisfiable', - 417 => 'Expectation Failed', - 500 => 'Internal Server Error', - 501 => 'Not Implemented', - 502 => 'Bad Gateway', - 503 => 'Service Unavailable', - 504 => 'Gateway Timeout', - 505 => 'HTTP Version Not Supported', - ); - - /** - * @method OC_Shorty_Type::validate - * @brief Validates a given value against a type specific regular expression - * Validates a given value according to the claimed type of the value. - * Validation is done by matching the value against a type specific regular expression. - * @param value the value to be verified according to the specified type - * @param type the type the value is said to belong to, important for verification - * @param strict flag indicating if the verification should be done strict, that is if an exception should be thrown in case of a failure - * @returns the value itself in case of a positive validation, NULL or an exception in case of a failure, depending on the flag indication strict mode - * @throws error indicating a failed validation in case of strict mode - * @access public - * @author Christian Reiner - */ - static function validate ( $value, $type, $strict=FALSE ) - { - switch ( $type ) - { - case self::ID: - if ( preg_match ( '/^[a-z0-9]{2,20}$/i', $value ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::STATUS: - if ( in_array($value,OC_Shorty_Type::$STATUS) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::SORTKEY: - if ( array_key_exists ( trim($value), self::$SORTING ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::SORTVAL: - if ( in_array ( trim($value), self::$SORTING ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::STRING: - if ( preg_match ( '/^.*$/x', str_replace("\n","\\n",$value) ) ) - return str_replace("\n","\\n",$value); - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::URL: -// $pattern = '/^([a-zA-Z][a-zA-Z][a-zA-Z0-9]+)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|[a-zA-Z0-9\.\;\:\,\@\?\'\\\+&%\$#\=~_\-]+)?)*$/'; - $pattern = '/^([a-zA-Z][a-zA-Z][a-zA-Z0-9]+)\:\/\/([a-zA-Z0-9\.\-]+(\:[a-zA-Z0-9\.&%\$\-]+)*@)*((25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9])\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[1-9]|0)\.(25[0-5]|2[0-4][0-9]|[0-1]{1}[0-9]{2}|[1-9]{1}[0-9]{1}|[0-9])|localhost|([a-zA-Z0-9\-]+\.)*[a-zA-Z0-9\-]+\.(com|edu|gov|int|mil|net|org|biz|arpa|info|name|pro|aero|coop|museum|[a-zA-Z]{2}))(\:[0-9]+)*(\/($|.+)?)*$/'; - if ( preg_match ( $pattern, $value ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::INTEGER: - if ( preg_match ( '/^[0-9]+$/', $value ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::FLOAT: - if ( preg_match ( '/^[0-9]+(\.[0-9]+)?$/', $value ) ) - return $value; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::TIMESTAMP: - if ( preg_match ( '/^[0-9]{10}$/', $value ) ) - return $value; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - case self::DATE: - if (FALSE!==($time=strtotime($value))) - return $time; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "invalid value '%s' for type '%s'", array( ((24<sizeof($value))?$value:substr($value,0,21).'…'),$type) ); - } // switch $type - throw new OC_Shorty_Exception ( "unknown request argument type '%s'", array($type) ); - } // function is_valid - - /** - * @method OC_Shorty_Type::normalize - * @brief cleanup and formal normalization of a given value according to its type - * Normalizes a given value according to its claimed type. - * This typically means trimming of string values, but sometimes also more specific actions. - * @param value the value to be normalized - * @param type the supposed type of the value - * @param strict boolean flag indicating if the normalization should be done in a strict way - * @returns the normalized value - * @throws error indicating a parameter violation - * @access public - * @author Christian Reiner - */ - static function normalize ( $value, $type, $strict=FALSE ) - { - if (NULL===(self::validate($value,$type,$strict))) - { - if ( ! $strict) - return NULL; - else - throw new OC_Shorty_Exception ( "invalid value '%1\$s' for type '%2\$s'", array($value,$type) ); - } // if - switch ( $type ) - { - case self::ID: return trim ( $value ); - case self::STATUS: return trim ( $value ); - case self::SORTKEY: return trim ( $value ); - case self::SORTVAL: return trim ( $value ); - case self::STRING: return trim ( $value ); - case self::URL: return trim ( $value ); - case self::INTEGER: return sprintf ( '%d', $value ); - case self::FLOAT: return sprintf ( '%f', $value ); - case self::TIMESTAMP: return trim ( $value ); - case self::DATE: return date ( 'Y-m-d', self::validate($value,OC_Shorty_Type::DATE) ); - } // switch $type - throw new OC_Shorty_Exception ( "unknown request argument type '%s'", array($type) ); - } // function normalize - - /** - * @method OC_Shorty_Type::req_argument - * @brief returns checked request argument or throws an error - * @param arg (string) name of the request argument to get_argument - * @param strict (bool) controls if an exception will be thrown upon a missing argument - * @returns (string) checked and prepared value of request argument - * @throws error indicating a parameter violation - * @access public - * @author Christian Reiner - */ - static function req_argument ( $arg, $type, $strict=FALSE ) - { - switch ( $_SERVER['REQUEST_METHOD'] ) - { - case 'POST': - if ( isset($_POST[$arg]) && !empty($_POST[$arg]) ) - return self::normalize ( urldecode($_POST[$arg]), $type ) ; - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "missing mandatory argument '%1s'", array($arg) ); - case 'GET': - if ( isset($_GET[$arg]) && !empty($_GET[$arg]) ) - return self::normalize ( urldecode(trim($_GET[$arg])), $type, $strict ); - elseif ( ! $strict) - return NULL; - throw new OC_Shorty_Exception ( "missing mandatory argument '%1s'", array($arg) ); - default: - throw new OC_Shorty_Exception ( "unexpected http request method '%1s'", array($_SERVER['REQUEST_METHOD']) ); - } - } // function req_argument - -} // class OC_Shorty_Query -?> diff --git a/apps/shorty/preferences.php b/apps/shorty/preferences.php deleted file mode 100644 index 6e122fe410b..00000000000 --- a/apps/shorty/preferences.php +++ /dev/null @@ -1,68 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file settings.php - * This plugins user preferences dialog - * The dialog will be included in the general framework of the user preferences page - * @access public - * @author Christian Reiner - */ - -OCP\Util::addStyle ( '3rdparty', 'chosen/chosen' ); -OCP\Util::addStyle ( 'shorty', 'shorty' ); -OCP\Util::addStyle ( 'shorty', 'preferences' ); - -OCP\Util::addScript ( '3rdparty', 'chosen/chosen.jquery.min' ); -OCP\Util::addScript ( 'shorty', 'shorty' ); -OCP\Util::addScript ( 'shorty', 'preferences' ); -if ( OC_Log::DEBUG==OC_Config::getValue( "loglevel", OC_Log::WARN ) ) - OCP\Util::addScript ( 'shorty', 'debug' ); - - -// fetch template -$tmpl = new OCP\Template ( 'shorty', 'tmpl_preferences' ); -// inflate template -$backend_types = OC_Shorty_Type::$BACKENDS; -// kick out static option again if no global backend base has been specified in the system settings -$backend_static_base = OCP\Config::getAppValue('shorty','backend-static-base',''); -if ( empty($backend_static_base) - || !parse_url($backend_static_base,PHP_URL_SCHEME) - || !parse_url($backend_static_base,PHP_URL_HOST) ) - unset($backend_types['static']); -// feed template engine -$tmpl->assign ( 'backend-types', $backend_types ); -$tmpl->assign ( 'backend-static-base', $backend_static_base ); -$tmpl->assign ( 'backend-bitly-user', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-bitly-user','') ); -$tmpl->assign ( 'backend-bitly-key', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-bitly-key','') ); -$tmpl->assign ( 'backend-google-key', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-google-key','') ); -$tmpl->assign ( 'backend-tinycc-user', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-tinycc-user','') ); -$tmpl->assign ( 'backend-tinycc-key', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-tinycc-key','') ); -$tmpl->assign ( 'backend-type', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','backend-type','') ); -$tmpl->assign ( 'sms-control', OCP\Config::getUserValue(OCP\User::getUser(),'shorty','sms-control','disabled') ); -// render template -return $tmpl->fetchPage ( ); -?> diff --git a/apps/shorty/qrcode.php b/apps/shorty/qrcode.php deleted file mode 100644 index 43b91b22afb..00000000000 --- a/apps/shorty/qrcode.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file qrcode.php - * Generates qr code barcodes cading a specified url - * @access public - * @author Christian Reiner - */ - -require_once ( '3rdparty/php/phpqrcode.php' ); - -$source = NULL; -// we try to guess what the request indicates: -// - a (source) url to be looked up in the database -foreach ($_GET as $key=>$val) // in case there are unexpected, additional arguments like a timestamp added by some stupid proxy -{ - switch ($key) - { - default: - // unrecognized key, we ignore it - break; - case 'url': - case 'uri': - case 'ref': - case 'source': - case 'target': - // a recognized argument key indicating an id to be looked up - $source = OC_Shorty_Type::req_argument($key,OC_Shorty_Type::URL,FALSE); - break 2; // skip switch AND foreach - } // switch -} // foreach - -// generate qr code for the specified url, IF it exists and is usable in the database -try -{ - if ( $source ) - { - $param = array ( 'source' => OC_Shorty_Type::normalize($source,OC_Shorty_Type::URL) ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_SOURCE ); - $result = $query->execute($param)->FetchAll(); - - if ( FALSE===$result ) - throw new OC_Shorty_HttpException ( 500 ); - elseif ( ! is_array($result) ) - throw new OC_Shorty_HttpException ( 500 ); - elseif ( 0==sizeof($result) ) - { - // no entry found => 404: Not Found - throw new OC_Shorty_HttpException ( 404 ); - } - elseif ( 1<sizeof($result) ) - { - // multiple matches => 409: Conflict - throw new OC_Shorty_HttpException ( 409 ); - } - elseif ( (!array_key_exists(0,$result)) || (!is_array($result[0])) || (!array_key_exists('source',$result[0])) ) - { - // invalid entry => 500: Internal Server Error - throw new OC_Shorty_HttpException ( 500 ); - } - elseif ( (!array_key_exists('source',$result[0])) || ('1'==$result[0]['expired']) ) - { - // entry expired => 410: Gone - throw new OC_Shorty_HttpException ( 410 ); - } - // generate qrcode, regardless of who sends the request - QRcode::png ( $source ); - } // if $source - else - { - // refuse forwarding => 403: Forbidden - throw new OC_Shorty_HttpException ( 403 ); - } -} catch ( OC_Shorty_Exception $e ) { header($e->getMessage()); } - -?> diff --git a/apps/shorty/relay.php b/apps/shorty/relay.php deleted file mode 100644 index 077a3625afb..00000000000 --- a/apps/shorty/relay.php +++ /dev/null @@ -1,140 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file relay.php - * This is the plugins central relaying feature - * All relay requests are handled by this file. - * @access public - * @author Christian Reiner - */ - -OCP\App::setActiveNavigationEntry ( 'shorty_index' ); - -$arg = NULL; -// we try to guess what the request indicates: -// - a (shorty) id to be looked up in the database resulting in a forwarding to the stored target -// - a (target) url to be added as a new shorty -// - none of the two, so just a plain list of existing shortys -foreach ($_GET as $key=>$val) // in case there are unexpected, additional arguments like a timestamp added by some stupid proxy -{ - switch ($key) - { - default: - // unrecognized key, we ignore it - break; - case 'id': - case 'shorty': - case 'ref': - case 'entry': - // a recognized argument key indicating an id to be looked up - $arg = OC_Shorty_Type::req_argument($key,OC_Shorty_Type::ID,FALSE); - break 2; // skip switch AND foreach - } // switch -} // foreach - -// an id was specified, ordinary or special meaning ? -if ( '0000000000'==$arg ) -{ - // this is a pseudo id, used to test the setup, so just return a positive message. - // this is used to test the setup of the static backend, shorty calls itself from there - OCP\Util::writeLog( 'shorty', "Positiv validation of static backend base url", OC_Log::INFO ); - OCP\JSON::success ( array ( ) ); - exit(); -} - -// now construct the target url and relay to it (if applicable) -try -{ - // detect requested shorty id from request - $p_id = trim ( OC_Shorty_Type::normalize($arg,OC_Shorty_Type::ID) ) ; - if ( $p_id ) - { - $param = array - ( - 'id' => $p_id, - ); - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_FORWARD ); - $result = $query->execute($param)->FetchAll(); - if ( FALSE===$result ) - throw new OC_Shorty_HttpException ( 500 ); - elseif ( ! is_array($result) ) - throw new OC_Shorty_HttpException ( 500 ); - elseif ( 0==sizeof($result) ) - { - // no entry found => 404: Not Found - throw new OC_Shorty_HttpException ( 404 ); - } - elseif ( 1<sizeof($result) ) - { - // multiple matches => 409: Conflict - throw new OC_Shorty_HttpException ( 409 ); - } - elseif ( (!array_key_exists(0,$result)) || (!is_array($result[0])) || (!array_key_exists('target',$result[0])) ) - { - // invalid entry => 500: Internal Server Error - throw new OC_Shorty_HttpException ( 500 ); - } - elseif ( (!array_key_exists('target',$result[0])) || ('1'==$result[0]['expired']) ) - { - // entry expired => 410: Gone - throw new OC_Shorty_HttpException ( 410 ); - } - // an usable target ! - $target = trim($result[0]['target']); - // check status of matched entry - switch (trim($result[0]['status'])) - { - default: - case 'blocked': - // refuse forwarding => 403: Forbidden - throw new OC_Shorty_HttpException ( 403 ); - case 'private': - // check if user owns the Shorty, deny access if not - if ( $result[0]['user']!=OCP\User::getUser() ) - // refuse forwarding => 403: Forbidden - throw new OC_Shorty_HttpException ( 403 ); - // NO break; but fall through to the action in 'case public:' - case 'shared': - // check if we are a user, deny access if not - if ( ! OCP\User::isLoggedIn() ) - // refuse forwarding => 403: Forbidden - throw new OC_Shorty_HttpException ( 403 ); - // NO break; but fall through to the action in 'case public:' - case 'public': - // forward to target, regardless of who sends the request - header("HTTP/1.0 301 Moved Permanently"); - // http forwarding header - header ( sprintf('Location: %s', $target) ); - } // switch status - // register click in shorty - $query = OCP\DB::prepare ( OC_Shorty_Query::URL_CLICK ); - $query->execute ( $param ); - exit(); - } // if id -} catch ( OC_Shorty_Exception $e ) { header($e->getMessage()); } - -?> diff --git a/apps/shorty/settings.php b/apps/shorty/settings.php deleted file mode 100644 index f10e354a7be..00000000000 --- a/apps/shorty/settings.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * @file settings.php - * This plugins system settings dialog - * The dialog will be included in the general framework of the system settings page - * @access public - * @author Christian Reiner - */ - -OCP\Util::addStyle ( '3rdparty', 'chosen/chosen' ); -OCP\Util::addStyle ( 'shorty', 'shorty' ); -OCP\Util::addStyle ( 'shorty', 'settings' ); - -OCP\Util::addScript ( '3rdparty', 'chosen/chosen.jquery.min' ); -OCP\Util::addScript ( 'shorty', 'shorty' ); -OCP\Util::addScript ( 'shorty', 'settings' ); -if ( OC_Log::DEBUG==OC_Config::getValue( "loglevel", OC_Log::WARN ) ) - OCP\Util::addScript ( 'shorty', 'debug' ); - - -// fetch template -$tmpl = new OCP\Template ( 'shorty', 'tmpl_settings' ); -// inflate template -$tmpl->assign ( 'backend-static-base', OCP\Config::getAppValue('shorty','backend-static-base','') ); -// render template -return $tmpl->fetchPage ( ); -?> diff --git a/apps/shorty/templates/tmpl_dlg_qrcode.php b/apps/shorty/templates/tmpl_dlg_qrcode.php deleted file mode 100644 index 15b0eb2c366..00000000000 --- a/apps/shorty/templates/tmpl_dlg_qrcode.php +++ /dev/null @@ -1,52 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_dlg_qrcode.php - * Dialog popup to visualize and offer an url as a QRCode (2D barcode) - * @access public - * @author Christian Reiner - */ -?> - -<!-- additional (hidden) popup dialogs for specific usage actions --> -<fieldset id="dialog-qrcode" style="display:none;" class="" style="align:center;"> - <input id="qrcode-url" type="hidden" value="<?php echo $_['qrcode-url']; ?>"> - <span id='qrcode-img'> - <?php echo $l->t("Click for qrcode url").":"; ?> - <br> - <img width="100%" class="shorty-status" border="1" alt="<?php echo $l->t("QRCode"); ?>" - src="<?php echo OCP\Util::imagePath('shorty','loading-disk.gif'); ?>" > - </span> - <span id='qrcode-val' style="display:none;"> - <?php echo $l->t("Click for qrcode image").":"; ?> - <br> - <span class="shorty-framed"><a title="<?php echo $l->t("QRCode url").":"; ?>"></a></span> - </span> -</fieldset> -<!-- end of qrcode dialog --> diff --git a/apps/shorty/templates/tmpl_dlg_verify.php b/apps/shorty/templates/tmpl_dlg_verify.php deleted file mode 100644 index 14b10d84174..00000000000 --- a/apps/shorty/templates/tmpl_dlg_verify.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_dlg_verify.php - * Dialog popup to validate a configured static backend base - * @access public - * @author Christian Reiner - */ -?> - -<!-- a (usually hidden) dialog used for verification of the correct setup of the 'static' backend --> -<div id="dialog-verification" style="display:none;" title="<?php echo $l->t("'Static' backend: base url verification"); ?>"> - <!-- verification-in-progress --> - <div id="hourglass"> - <img src="<?php echo OCP\Util::imagePath('shorty', 'loading-disk.gif'); ?>"> - </div> - <!-- success --> - <div id="success" style="display:none;"> - <fieldset> - <legend> - <img class="shorty-status" src="<?php echo OCP\Util::imagePath('shorty','status/good.png'); ?>" alt="<?php $l->t('Success') ?>" title="<?php $l->t('Verification successful') ?>"> - <span id="title" class="title"><strong>Verification successful !</strong></span> - </legend> - <?php echo $l->t("<p>Great, your setup appears to be working fine ! </p>". - "<p>Requests to the configured base url '%s' are mapped to this ownClouds shorty module at '%1\$s'</p>". - "<p>Usage of that static backend is fine and safe as long as this setup is not altered.</p>", - array('<a id="verification-target" style="font-family:Monospace;"></a>',OCP\Util::linkToAbsolute('shorty','index.php')) );?> - </fieldset> - </div> - <!-- failure --> - <div id="failure" style="display:none;"> - <fieldset> - <legend> - <img class="shorty-status" src="<?php echo OCP\Util::imagePath('shorty','status/bad.png'); ?>" alt="<?php $l->t('Success') ?>" title="<?php $l->t('Verification successful') ?>"> - <span id="title" class="title"><strong>Verification failed !</strong></span> - </legend> - <?php echo $l->t("Sorry, but your setup appears not be be working correctly yet.<p>". - "Please check your setup and make sure that the configured base url '%1\$s' is indeed correct ". - "and that all requests to it are somehow mapped to ownClouds shorty module at '%2\$s'.", - array('<a id="verification-target" style="font-family:Monospace;"></a>',OCP\Util::linkToAbsolute('shorty','index.php')) );?> - </fieldset> - </div> -</div> -<!-- end of verification dialog --> diff --git a/apps/shorty/templates/tmpl_http_status.php b/apps/shorty/templates/tmpl_http_status.php deleted file mode 100644 index a43b4e3c328..00000000000 --- a/apps/shorty/templates/tmpl_http_status.php +++ /dev/null @@ -1,41 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_http_status.php - * Displays a human readable version of a classical http status error - * @access public - * @author Christian Reiner - */ -?> - -<ul> - <li class='error'> - <?php echo $_['explanation']; ?> - </li> -</ul> diff --git a/apps/shorty/templates/tmpl_index.php b/apps/shorty/templates/tmpl_index.php deleted file mode 100644 index fc4c4f91616..00000000000 --- a/apps/shorty/templates/tmpl_index.php +++ /dev/null @@ -1,66 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_index.php - * The general html environment where specific templates are bedded into. - * @access public - * @author Christian Reiner - */ -?> - -<!-- central notification area --> -<div id='notification'></div> - -<!-- top control bar --> -<div id="controls" class="controls shorty-controls" data-referrer="<?php if (array_key_exists('shorty-referrer',$_)) echo $_['shorty-referrer']; ?>"> - <!-- button to add a new entry to list --> - <input type="button" id="add" value="<?php echo OC_Shorty_L10n::t('New Shorty'); ?>"/> - <!-- display label: number of entries in list --> - <span> - <a class="shorty-prompt"><?php echo OC_Shorty_L10n::t('Number of entries') ?>:</a> - <a id="sum_shortys" class="shorty-value"> - <img src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" /></a> - </span> - <!-- display label: total of clicks in list --> - <span> - <a class="shorty-prompt"><?php echo OC_Shorty_L10n::t('Total of clicks') ?>:</a> - <a id="sum_clicks" class="shorty-value"> - <img src="<?php echo OCP\Util::imagePath('core', 'loading.gif'); ?>" /></a> - </span> - <!-- the dialogs, hidden by default --> -<?php require_once('tmpl_url_add.php'); ?> -<?php require_once('tmpl_url_edit.php'); ?> -<?php require_once('tmpl_url_show.php'); ?> -<?php require_once('tmpl_url_share.php'); ?> -</div> - -<!-- the "desktop where the action takes place --> -<div id="desktop" class="right-content shorty-desktop"> -<?php require_once('tmpl_url_list.php'); ?> -</div> diff --git a/apps/shorty/templates/tmpl_preferences.php b/apps/shorty/templates/tmpl_preferences.php deleted file mode 100644 index 61294c1914c..00000000000 --- a/apps/shorty/templates/tmpl_preferences.php +++ /dev/null @@ -1,257 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_preferences.php - * Dialog to change user preferences, to be included in the clouds preferences page. - * @access public - * @author Christian Reiner - */ -?> - -<form id="shorty"> - <fieldset class="personalblock"> - <div id="title" class="title"> - <img class="" src="<?php echo OCP\Util::imagePath("shorty","shorty.png"); ?> "> - <strong>Shorty</strong> - </div> - <div id="settings"> - <!-- shortlet --> - <label for="shortlet" class="aspect"><?php echo $l->t("Shortlet").":";?></label> - <span id="shortlet"> - <a class="shortlet" - href="javascript:(function(){url=encodeURIComponent(location.href);window.open('<?php echo OCP\Util::linkToAbsolute('shorty', 'index.php'); ?>&url='+url, 'owncloud-shorty')%20})()"> - <?php echo $l->t("Add page as 'Shorty' to ownCloud"); ?> - </a> - </span> - <p> - <span class="explain"><em><?php echo $l->t("Drag this to your browser bookmarks."); - echo $l->t("Click it, for whatever site you want to create a Shorty."); ?></em></span> - </p> - <p> - <!-- backend selection --> - <label for="backend-type" class="aspect"><?php echo $l->t("Backend").":";?></label> - <!-- list of available backend types --> - <span style="margin-right:1em;"> - <select id="backend-type" name="backend-type" style="width:11em;" class="chosen" - placeholder="<?php echo $l->t("Choose service…"); ?>" > - <?php - foreach ( $_['backend-types'] as $value=>$display ) - echo sprintf ( " <option value=\"%s\" %s>%s</option>\n", - $value, - ($value==$_['backend-type']?'selected':''), - $l->t($display) ); - ?> - </select> - </span> - <!-- some additional fields: input, explanation and example --> - <!-- depending on the chosen backend-type above only one of the following span tags will be displayed --> - <span id="backend-none" class="backend-supplement" style="display:none;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://%s%s<em><shorty id></em>',$_SERVER['SERVER_NAME'],OCP\Util::linkTo('shorty','',false)) ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo sprintf('%s<br />%s<br />%s', - $l->t("No backend is used, direct links pointing to your ownCloud are generated."), - $l->t("Such links are most likely longer than those generated when using a backend."), - $l->t("However this option does not rely on any third party service and keeps your shortys under your control.") ); ?> - </span> - </span> - <!-- backend -static- --> - <span id="backend-static" class="backend-supplement" style="display:none;"> - <label for="backend-static-base" class="aspect"><?php echo $l->t("Base url").':';?></label> - <input id="backend-static-base" type="text" name="backend-static-base" - readonly disabled value="<?php echo $_['backend-static-base']; ?>" - placeholder="<?php echo $l->t("Specify a backend base url…"); ?>" style="width:25em;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <a id="example" class="example" title="<?php echo $l->t("Verification by click");?>"> - <?php echo sprintf('http://%s/<em><service></em>/<em><shorty id></em>',$_SERVER['SERVER_NAME']) ?> - </a> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo sprintf("%s<br />\n%s<br />\n%s<br />\n%s", - $l->t("A static, rule-based backend is used, shorty links are generated relative to a given base url."), - $l->t("Since this setup depends on server based configuration rules the base url can only be specified in the 'Admin' section of the configuration."), - $l->t("Have a try with the example link provided, click it, it should result in a confirmation that your setup is working."), - $l->t("Only use this backend, if you can provide a short base url that is mapped the described way. Your shorties won't work otherwise.") ); ?> - </span> - </span> - <!-- backend bit.ly --> - <span id="backend-bitly" class="backend-supplement" style="display:none;"> - <label for="backend-bitly-user" class="aspect"><?php echo $l->t("bit.ly user").':';?></label> - <input id="backend-bitly-user" type="text" name="backend-bitly-user" value="<?php echo $_['backend-bitly-user']; ?>" - maxlength="256" placeholder="<?php echo $l->t("bit.ly user name");?>" style="width:10em;"> - <label for="backend-bitly-key" class="aspect"><?php echo $l->t("bit.ly key").':';?></label> - <input id="backend-bitly-key" type="text" name="backend-bitly-key" value="<?php echo $_['backend-bitly-key']; ?>" - maxlength="256" placeholder="<?php echo $l->t("bit.ly users key");?>" style="width:18em;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://bitly.com/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo sprintf("%s<br />\n%s<br />\n%s", - $l->t("The external 'bitly.com' service is used to register a short url for each generated shorty."), - $l->t("The service requires you to authenticate yourself by providing a valid bit.ly user name and an '%s'.", - sprintf('<a class="external" href="http://bitly.com/a/your_api_key" target="_blank">%s</a>',$l->t("API access key")) ), - $l->t("This means you have to '%s' at their site first.", - sprintf('<a class="external" href="http://bitly.com/a/sign_up" target="_blank">%s</a>',$l->t("register an account")) ) ); ?> - </span> - </span> - <!-- backend cligs --> - <span id="backend-cligs" class="backend-supplement" style="display:none;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://cli.gs/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo $l->t("The external 'cli.gs' service is used to register a short url for each generated shorty.");?> - </span> - </span> - <!-- backend is.gd --> - <span id="backend-isgd" class="backend-supplement" style="display:none;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://is.gd/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo $l->t("The external 'is.gd' service is used to register a short url for each generated shorty.");?> - </span> - </span> - <!-- backend google --> - <span id="backend-google" class="backend-supplement" style="display:none;"> - <label for="backend-google-key" class="aspect"><?php echo $l->t("API key").':';?></label> - <input id="backend-google-key" type="text" name="backend-google-key" value="<?php echo $_['backend-google-key']; ?>" - maxlength="256" placeholder="<?php echo $l->t("Google API key");?>" style="width:24em;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://goo.gl/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo sprintf("%s<br />\n%s<br />\n%s<br />\n%s", - $l->t("Googles external 'goo.gl service' is used to register a short url for each generated shorty."), - $l->t("You must provide a valid '%s' to use this service.", - sprintf('<a class="external" href="https://code.google.com/apis/console/" target="_blank">%s</a>',$l->t("Google API key")) ), - $l->t("This means you require a 'Google API console account'."), - $l->t("Register a new '%s' at their pages.", array( - sprintf('<a class="external" href="https://code.google.com/apis/console/" target="_blank">%s</a>',$l->t("Google API account")) ) ) );?> - </span> - </span> - <!-- backend tinycc --> - <span id="backend-tinycc" class="backend-supplement" style="display:none;"> - <label for="backend-tinycc-user" class="aspect"><?php echo $l->t("tiny.cc user").':'; ?></label> - <input id="backend-tinycc-user" type="text" name="backend-tinycc-user" value="<?php echo $_['backend-tinycc-user']; ?>" - maxlength="256" placeholder="<?php echo $l->t("tiny.cc user name"); ?>" style="width:10em;"> - <label for="backend-tinycc-key" class="aspect"><?php echo $l->t("tiny.cc key").':'; ?></label> - <input id="backend-tinycc-key" type="text" name="backend-tinycc-key" value="<?php echo $_['backend-tinycc-key']; ?>" - maxlength="256" placeholder="<?php echo $l->t("tiny.cc user key"); ?>" style="width:19em;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <span id="example" class="example"><?php echo sprintf('http://tiny.cc/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo sprintf ( "%s<br />\n%s<br />\n%s", - $l->t("The external 'tiny.cc' service is used to register a short url for each generated shorty."), - $l->t("The service requires you to authenticate yourself by providing a valid tiny.cc user name and an api access key."), - $l->t("This means you have to register an '%s' at their site first.", array ( - sprintf('<a class="external" href="http://tiny.ccc/" target="_blank">%s</a>', $l->t("account") ) ) ) ); ?> - </span> - </span> - <!-- backend tinyURL --> - <span id="backend-tinyurl" class="backend-supplement" style="display:none;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':'; ?></label> - <span id="example" class="example"><?php echo sprintf('http://ti.ny/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo $l->t("The external 'ti.ny' service is used to register a short url for each generated shorty.");?> - </span> - </span> - <!-- backend turl --> - <span id="backend-turl" class="backend-supplement" style="display:none;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':'; ?></label> - <span id="example" class="example"><?php echo sprintf('http://turl.ca/<em><shorty id></em>') ?></span> - </span> - <br/> - <span id="explain" class="explain"> - <?php echo $l->t("The external 'turl' service is used to register a short url for each generated shorty."); ?> - </span> - </span> - </p> - <p> - <!-- sms --> - <label for="sms" class="aspect"><?php echo $l->t("SMS").":";?></label> - <span id="sms" style="margin-right:1em;"> - <select id="sms-control" name="sms-control" style="width:11em;" class="chosen"> - <?php echo sprintf("<option value=\"disabled\" %s>%s</option>\n", - ('enabled'!=$_['sms-control']?'selected':''), - $l->t('disabled') ); ?> - <?php echo sprintf("<option value=\"enabled\" %s>%s</option>\n", - ('enabled'==$_['sms-control']?'selected':''), - $l->t('enabled')); ?> - </select> - <em><?php echo $l->t("Enabling the SMS option will offer sending a Shorty via SMS."); ?></em> - </span> - <p> - <span class="explain"><em><?php echo $l->t("Unfortunately support for 'SMS url handling' is usually only found on mobile devices like smart phones.")."<br>\n"; - echo $l->t("In addition, the implementations found in Android or iOS are minimalistic, buggy and differ from system to system.")."<br>\n"; - echo $l->t("In short: this might not work for you, therefore you can disable it…")."<br>\n";?></em></span> - </p> - </div> - <!-- a (usually hidden) dialog used for verification of the correct setup of the 'static' backend --> - <?php require_once('tmpl_dlg_verify.php'); ?> - </fieldset> -</form> diff --git a/apps/shorty/templates/tmpl_settings.php b/apps/shorty/templates/tmpl_settings.php deleted file mode 100644 index bcbab5ae014..00000000000 --- a/apps/shorty/templates/tmpl_settings.php +++ /dev/null @@ -1,70 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_settings.php - * Dialog to change plugin settings, to be included in the clouds settings page. - * @access public - * @author Christian Reiner - */ -?> - -<!-- settings of app 'shorty' --> -<form id="shorty"> - <fieldset class="personalblock"> - <legend> - <span id="title" class="title"> - <img class="" src="<?php echo OCP\Util::imagePath("shorty","shorty.png"); ?> "> - <strong>Shorty</strong> - </span> - </legend> - <div id="backend-static" class="backend-supplement"> - <label for="backend-static-base" class="aspect"><?php echo $l->t("Base url").':';?></label> - <input id="backend-static-base" type="text" name="backend-static-base" - value="<?php echo $_['backend-static-base']; ?>" - maxlength="256" placeholder="<?php echo $l->t('Specify a static base url…');?>" style="width:25em;"> - <br/> - <label for="backend-example" class="aspect"> </label> - <span id="backend-example"> - <label for="example" class="aspect"><?php echo $l->t("Example").':';?></label> - <a id="example" class="example" title="<?php echo $l->t("Verification by click");?>"> - <?php echo sprintf('http://%s/<em><service></em>/<em><shorty id></em>',$_SERVER['SERVER_NAME']) ?> - </a> - </span> - <br/> - <span id="explain" class="explain"><?php echo sprintf("%s<br />\n%s<br />\n%s<br />\n%s", - $l->t("Static, rule-based backend, generates shorty links relative to a given base url."), - $l->t("You have to take care that any request to the url configured here is internally mapped to the 'shorty' module."), - $l->t("Have a try with the example link provided, click it, it should result in a confirmation that your setup is working."), - $l->t("Leave empty if you can't provide a short base url that is mapped the described way.") ); ?> - </span> - </div> - - <?php require_once('tmpl_dlg_verify.php'); ?> - </fieldset> -</form> diff --git a/apps/shorty/templates/tmpl_url_add.php b/apps/shorty/templates/tmpl_url_add.php deleted file mode 100644 index abf51bdab73..00000000000 --- a/apps/shorty/templates/tmpl_url_add.php +++ /dev/null @@ -1,86 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_url_add.php - * A dialog to add a remote target url as a new shorty. - * @access public - * @author Christian Reiner - */ -?> - -<!-- (hidden) dialog to add a new shorty --> -<form id="dialog-add" class="shorty-dialog shorty-standalone"> - <fieldset> - <legend class=""> - <a id="close" class="shorty-close-button" - title="<?php echo OC_Shorty_L10n::t('Close'); ?>"> - <img alt="<?php echo OC_Shorty_L10n::t('Close'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/shade.png'); ?>"> - </a> - <?php echo OC_Shorty_L10n::t('Add a new shorty').':'; ?> - </legend> - <label for="target"><?php echo OC_Shorty_L10n::t('Target url').':'; ?></label> - <input id="target" name="target" type="text" maxlength="4096" data="" class=""/> - <br /> - <label for="meta"> <img id="busy" height="12px" src="<?php echo OCP\Util::imagePath('shorty', 'loading-led.gif'); ?>"></label> - <span id="meta" class="shorty-meta"> - <img id="staticon" class="shorty-icon" src="" width="16" data="<?php echo OCP\Util::imagePath('shorty', 'status/neutral.png'); ?>"> - <img id="schemicon" class="shorty-icon" src="" width="16" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="favicon" class="shorty-icon" src="" width="16" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="mimicon" class="shorty-icon" src="" width="16" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <a id="explanation" maxlength="80" data="" class="shorty-value"></a> - </span> - <br /> - <label for="title"><?php echo OC_Shorty_L10n::t('Shorty title').':'; ?></label> - <input id="title" name="title" type="text" maxlength="80" data="" class="" placeholder=""/> - <br /> - <label for="status"><?php echo OC_Shorty_L10n::t('Status').':'; ?></label> - <select id="status" name="status" data="shared" value="shared" class=""> - <?php - foreach ( OC_Shorty_Type::$STATUS as $status ) - if ( 'deleted'!=$status ) - echo sprintf ( "<option value=\"%s\">%s</option>\n", $status, OC_Shorty_L10n::t($status) ); - ?> - </select> - <span style="display:inline-block;"> - <label for="until"><?php echo OC_Shorty_L10n::t('Expiration').':'; ?></label> - <input id="until" name="until" type="text" maxlength="10" value="" - data="" class="" style="width:8em;" - placeholder="-<?php echo OC_Shorty_L10n::t('never'); ?>-" - icon="<?php echo OCP\Util::imagePath('shorty', 'calendar.png'); ?>"/> - </span> - <br /> - <label for="notes"><?php echo OC_Shorty_L10n::t('Notes').':'; ?></label> - <textarea id="notes" name="notes" maxlength="4096" data="" class="" - placeholder="<?php echo OC_Shorty_L10n::t('Anything that appears helpful …'); ?>"></textarea> - <br /> - <label for="confirm"></label> - <button id="confirm" class="shorty-button-submit"><?php echo OC_Shorty_L10n::t('Add as new'); ?></button> - </fieldset> -</form> diff --git a/apps/shorty/templates/tmpl_url_edit.php b/apps/shorty/templates/tmpl_url_edit.php deleted file mode 100644 index 395b75ecab5..00000000000 --- a/apps/shorty/templates/tmpl_url_edit.php +++ /dev/null @@ -1,100 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_url_edit.php - * A dialog to modify some aspects of a selected shorty. - * @access public - * @author Christian Reiner - */ -?> - -<!-- (hidden) dialog to modify a stored shorty --> -<form id="dialog-edit" class="shorty-dialog shorty-standalone"> - <fieldset> - <legend class=""> - <a id="close" class="shorty-close-button" - title="<?php echo OC_Shorty_L10n::t('Close'); ?>"> - <img alt="<?php echo OC_Shorty_L10n::t('Close'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/shade.png'); ?>"> - </a> - <?php echo OC_Shorty_L10n::t('Modify shorty').':'; ?> - </legend> - <input id="id" name="id" type="hidden" readonly data="" class="" readonly disabled /> - <label for="source"><?php echo OC_Shorty_L10n::t('Source url').':'; ?></label> - <input id="source" name="source" type="text" data="" class="" readonly disabled /> - <br /> - <label for="target"><?php echo OC_Shorty_L10n::t('Target url').':'; ?></label> - <input id="target" name="target" type="text" data="" class="" readonly /> - <br /> - <label for="meta"> </label> - <span id="meta"> - <img id="staticon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'status/neutral.png'); ?>"> - <img id="schemicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="favicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="mimicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <a id="explanation" maxlength="80" data="" class="shorty-value"></a> - </span> - <br /> - <label for="title"><?php echo OC_Shorty_L10n::t('Shorty title').':'; ?></label> - <input id="title" name="title" type="text" maxlength="80" data="" class="" /> - <br /> - <label for="status"><?php echo OC_Shorty_L10n::t('Status').':'; ?></label> - <select id="status" name="status" data="shared" value="shared" style="width:8em;" class=""> - <?php - foreach ( OC_Shorty_Type::$STATUS as $status ) - if ( 'deleted'!=$status ) - echo sprintf ( "<option value=\"%s\">%s</option>\n", $status, OC_Shorty_L10n::t($status) ); - ?> - </select> - <span style="display:inline;"> - <label for="until"><?php echo OC_Shorty_L10n::t('Expiration').':'; ?></label> - <input id="until" name="until" type="text" value="" - maxlength="10" data="" class="" style="width:8em;" - placeholder="-<?php echo OC_Shorty_L10n::t('never'); ?>-" - icon="<?php echo OCP\Util::imagePath('shorty', 'calendar.png'); ?>" /> - </span> - <br /> - <label for="notes"><?php echo OC_Shorty_L10n::t('Notes').':'; ?></label> - <textarea id="notes" name="notes" maxlength="4096" data="" class="" - placeholder="<?php echo OC_Shorty_L10n::t('Anything that appears helpful …'); ?>"> - </textarea> - <br /> - <span class="label-line"> - <label for="clicks"><?php echo OC_Shorty_L10n::t('Clicks').':'; ?></label> - <input id="clicks" name="clicks" data="" type="textarea" class="" style="width:1em;" readonly disabled /> - <label for="created"><?php echo OC_Shorty_L10n::t('Creation').':'; ?></label> - <input id="created" name="created" type="text" data="" class="" style="width:7em;" readonly disabled /> - <label for="accessed"><?php echo OC_Shorty_L10n::t('Access').':'; ?></label> - <input id="accessed" name="accessed" type="text" data="" class="" style="width:10em;" readonly disabled /> - </span> - <br /> - <label for="confirm"></label> - <button id="confirm" class="shorty-button-submit"><?php echo OC_Shorty_L10n::t('Save'); ?></button> - </fieldset> -</form> diff --git a/apps/shorty/templates/tmpl_url_list.php b/apps/shorty/templates/tmpl_url_list.php deleted file mode 100644 index 7a93eab9d8d..00000000000 --- a/apps/shorty/templates/tmpl_url_list.php +++ /dev/null @@ -1,167 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_url_list.php - * A table to visualize the list of existing shortys. - * @access public - * @author Christian Reiner - */ -?> - -<div id="hourglass" class="shorty-hourglass" style="left:10em;top:10em;"><img src="<?php echo OCP\Util::imagePath('shorty', 'loading-disk.gif'); ?>"></div> -<div id="vacuum" class="shorty-vacuum"><span class="shorty-label"><?php echo OC_Shorty_L10n::t('List currently empty.') ?></span></div> - -<!-- the list of urls --> -<table id="list" class="shorty-list" style="display:none;"> - <thead> - <tr id="titlebar"> - <!-- a button to open/close the toolbar below --> - <th id="favicon"><span><img id="tools" alt="toolbar" title="toggle toolbar" - src="<?php echo OCP\Util::imagePath('shorty','actions/plus.png'); ?>" - data-plus="<?php echo OCP\Util::imagePath('shorty','actions/plus.png'); ?>" - data-minus="<?php echo OCP\Util::imagePath('shorty','actions/minus.png'); ?>"></span></th> - <th id="title" ><span><?php echo OC_Shorty_L10n::t('Title') ?></span></th> - <th id="target" ><span><?php echo OC_Shorty_L10n::t('Target') ?></span></th> - <th id="clicks" ><span><?php echo OC_Shorty_L10n::t('Clicks') ?></span></th> - <th id="until" ><span><?php echo OC_Shorty_L10n::t('Expiration') ?></span></th> - <th id="status" ><span><?php echo OC_Shorty_L10n::t('Status') ?></span></th> - <th id="action" ><span> </span></th> - </tr> - <!-- toolbar opened/closed by the button above --> - <tr id="toolbar"> - <th id="favicon"> - <div style="display:none;"> - <a id="reload"><img alt="<?php echo $l->t('reload'); ?>" title="<?php echo $l->t('Reload list'); ?>" src="<?php echo OCP\Util::imagePath('shorty','actions/reload.png'); ?>"></a> - </div> - </th> - <th id="title"> - <div style="display:none;"> - <img id="sort-up" class="shorty-sorter" data-sort-code="ta" data-sort-type="string" data-sort-direction='asc' - alt="<?php echo $l->t('up'); ?>" title="<?php echo $l->t('Sort ascending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/up.png'); ?>"> - <img id="sort-down" class="shorty-sorter" data-sort-code="td" data-sort-type="string" data-sort-direction='desc' - alt="<?php echo $l->t('down'); ?>" title="<?php echo $l->t('Sort descending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/down.png'); ?>"> - <input id='filter' type="text" value=""> - </div> - </th> - <th id="target"> - <div style="display:none;"> - <img id="sort-up" class="shorty-sorter" data-sort-code="ua" data-sort-type="string" data-sort-direction='asc' - alt="<?php echo $l->t('up'); ?>" title="<?php echo $l->t('Sort ascending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/up.png'); ?>"> - <img id="sort-down" class="shorty-sorter" data-sort-code="ud" data-sort-type="string" data-sort-direction='desc' - alt="<?php echo $l->t('down'); ?>" title="<?php echo $l->t('Sort descending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/down.png'); ?>"> - <input id='filter' type="text" value=""> - </div> - </th> - <th id="clicks"> - <div style="display:none;"> - <img id="sort-up" class="shorty-sorter" data-sort-code="ha" data-sort-type="int" data-sort-direction='asc' - alt="<?php echo $l->t('up'); ?>" title="<?php echo $l->t('Sort ascending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/up.png'); ?>"> - <img id="sort-down" class="shorty-sorter" data-sort-code="hd" data-sort-type="int" data-sort-direction='desc' - alt="<?php echo $l->t('down'); ?>" title="<?php echo $l->t('Sort descending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/down.png'); ?>"> - </div> - </th> - <th id="until"> - <div style="display:none;"> - <img id="sort-up" class="shorty-sorter" data-sort-code="da" data-sort-type="date" data-sort-direction='asc' - alt="<?php echo $l->t('up'); ?>" title="<?php echo $l->t('Sort ascending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/up.png'); ?>"> - <img id="sort-down" class="shorty-sorter" data-sort-code="dd" data-sort-type="date" data-sort-direction='desc' - alt="<?php echo $l->t('down'); ?>" title="<?php echo $l->t('Sort descending'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/down.png'); ?>"> - </div> - </th> - <!-- status filter, colspan 2 to prevent width enhancement of column --> - <th id="status" colspan=2> - <div style="display:none;"> - <span id="horst" class="shorty-select"> - <select id='filter' value="" data-placeholder=" "> - <?php foreach($_['shorty-status'] as $status=>$label) - echo sprintf("<option value=\"%s\">%s</option>\n",($status?$label:''),$label); - ?> - </select> - </span> - </div> - </th> - </tr> - <!-- the 'dummy' row, a blueprint --> - <tr id="" - data-id="" - data-status="" - data-source="" - data-relay="" - data-title="" - data-favicon="" - data-target="" - data-clicks="" - data-until="" - data-created="" - data-accessed="" - data-notes=""> - <td id="favicon"></td> - <td id="title" ></td> - <td id="target" ></td> - <td id="clicks" ></td> - <td id="until" ></td> - <td id="status" ></td> - <td id="actions"> - <span class="shorty-actions"> - <a id="show" title="<?php echo $l->t('show'); ?>" class=""> - <img class="shorty-icon" alt="<?php echo $l->t('show'); ?>" title="<?php echo $l->t('Show details'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/info.png'); ?>" /> - </a> - <a id="edit" title="<?php echo $l->t('edit'); ?>" class=""> - <img class="shorty-icon" alt="<?php echo $l->t('modify'); ?>" title="<?php echo $l->t('Modify shorty'); ?>" - src="<?php echo OCP\Util::imagePath('core','actions/rename.png'); ?>" /> - </a> - <a id="del" title="<?php echo $l->t('delete'); ?>" class=""> - <img class="shorty-icon" alt="<?php echo $l->t('delete'); ?>" title="<?php echo $l->t('Delete shorty'); ?>" - src="<?php echo OCP\Util::imagePath('core','actions/delete.png'); ?>" /> - </a> - <a id="share" title="<?php echo $l->t('share'); ?>" class=""> - <img class="shorty-icon" alt="<?php echo $l->t('share'); ?>" title="<?php echo $l->t('Test and use links'); ?>" - src="<?php echo OCP\Util::imagePath('core','actions/share.png'); ?>" /> - </a> - <a id="open" title="<?php echo $l->t('open'); ?>" class=""> - <img class="shorty-icon" alt="<?php echo $l->t('open'); ?>" title="<?php echo $l->t('Open target'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/open.png'); ?>" /> - </a> - </span> - </td> - </tr> - </thead> - <!-- the standard body for non-empty lists --> - <tbody> - </tbody> -</table> diff --git a/apps/shorty/templates/tmpl_url_share.php b/apps/shorty/templates/tmpl_url_share.php deleted file mode 100644 index b42396d6a05..00000000000 --- a/apps/shorty/templates/tmpl_url_share.php +++ /dev/null @@ -1,89 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_url_share.php - * A dialog offering control over an entries state and offers the source url - * @access public - * @author Christian Reiner - */ -?> - -<!-- (hidden) dialog to share a shorty from the list --> -<form id="dialog-share" class="shorty-dialog shorty-embedded"> - <fieldset> - <legend class=""> - <a id="close" class="shorty-close-button" - title="<?php echo OC_Shorty_L10n::t('Close'); ?>"> - <img alt="<?php echo OC_Shorty_L10n::t('Close'); ?>" - src="<?php echo OCP\Util::imagePath('apps/shorty','actions/shade.png'); ?>"> - </a> - <?php echo OC_Shorty_L10n::t('Test and use').':'; ?> - </legend> - <input id="id" name="id" type="hidden" readonly data="" class="" readonly disabled /> - <label for="status"><?php echo OC_Shorty_L10n::t('Status').':'; ?></label> - <select id="status" name="status" data="" class="" value=""> - <?php - foreach ( OC_Shorty_Type::$STATUS as $status ) - if ( 'deleted'!=$status ) - echo sprintf ( "<option value=\"%s\">%s</option>\n", $status, OC_Shorty_L10n::t($status) ); - ?> - </select> - <br /> - <label for="source"><?php echo OC_Shorty_L10n::t('Source url').':'; ?></label> - <a id="source" class="shorty-clickable" target="_blank" - title="<?php echo OC_Shorty_L10n::t('Open source url'); ?>" - href=""></a> - <br /> - <label for="relay"><?php echo OC_Shorty_L10n::t('Relay url').':'; ?></label> - <a id="relay" class="shorty-clickable" target="_blank" - title="<?php echo OC_Shorty_L10n::t('Open relay url'); ?>" - href=""></a> - <br /> - <label for="target"><?php echo OC_Shorty_L10n::t('Target url').':'; ?></label> - <a id="target" class="shorty-clickable" target="_blank" - title="<?php echo OC_Shorty_L10n::t('Open target url'); ?>" - href=""></a> - <br /> - <img id="usage-email" name="usage-email" class="shorty-usage" alt="email" - src="<?php echo OCP\Util::imagePath('apps/shorty','usage/64/email.png'); ?>" - title="<?php echo OC_Shorty_L10n::t("Send by email"); ?>" /> - <img id="usage-sms" type="image" name="usage-sms" alt="sms" - class="shorty-usage <?php echo $_['sms-control']; ?>" - src="<?php echo OCP\Util::imagePath('apps/shorty','usage/64/sms.png'); ?>" - title="<?php echo OC_Shorty_L10n::t("Send by SMS"); ?>" /> - <img id="usage-qrcode" type="image" name="usage-qrcode" class="shorty-usage" alt="qrcode" - src="<?php echo OCP\Util::imagePath('apps/shorty','usage/64/qrcode.png'); ?>" - title="<?php echo OC_Shorty_L10n::t("Show as QRCode"); ?>" /> - <img id="usage-clipboard" type="image" name="usage-clipboard" class="shorty-usage" alt="clipbaord" - src="<?php echo OCP\Util::imagePath('apps/shorty','usage/64/clipboard.png'); ?>" - title="<?php echo OC_Shorty_L10n::t("Copy to clipboard"); ?>" /> - </fieldset> -</form> - -<?php require_once('tmpl_dlg_qrcode.php'); ?> diff --git a/apps/shorty/templates/tmpl_url_show.php b/apps/shorty/templates/tmpl_url_show.php deleted file mode 100644 index 462d8e8b9cb..00000000000 --- a/apps/shorty/templates/tmpl_url_show.php +++ /dev/null @@ -1,85 +0,0 @@ -<?php -/** -* @package shorty an ownCloud url shortener plugin -* @category internet -* @author Christian Reiner -* @copyright 2011-2012 Christian Reiner <foss@christian-reiner.info> -* @license GNU Affero General Public license (AGPL) -* @link information -* @link repository https://svn.christian-reiner.info/svn/app/oc/shorty -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the license, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Affero General Public -* License along with this library. -* If not, see <http://www.gnu.org/licenses/>. -* -*/ -?> - -<?php -/** - * @file templates/tmpl_url_show.php - * A read-only dialog visualizing all aspects of a selected shorty. - * @access public - * @author Christian Reiner - */ -?> - -<!-- (hidden) dialog to show a shorty from the list --> -<form id="dialog-show" class="shorty-dialog shorty-standalone"> - <fieldset> - <legend class=""> - <a id="close" class="shorty-close-button" - title="<?php echo OC_Shorty_L10n::t('Close'); ?>"> - <img alt="<?php echo OC_Shorty_L10n::t('Close'); ?>" - src="<?php echo OCP\Util::imagePath('shorty','actions/shade.png'); ?>"> - </a> - <?php echo OC_Shorty_L10n::t('Show details').':'; ?> - </legend> - <label for="source"><?php echo OC_Shorty_L10n::t('Source url').':'; ?></label> - <input id="source" name="source" type="text" data="" class="" readonly disabled /> - <br /> - <label for="target"><?php echo OC_Shorty_L10n::t('Target url').':'; ?></label> - <input id="target" name="target" data="" class="" readonly disabled /> - <br /> - <label for="meta"> </label> - <span id="meta"> - <img id="staticon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'status/neutral.png'); ?>"> - <img id="schemicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="favicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <img id="mimicon" class="shorty-icon" src="" data="<?php echo OCP\Util::imagePath('shorty', 'blank.png'); ?>"> - <a id="explanation" maxlength="80" data="" class="shorty-value"></a> - </span> - <br /> - <label for="title"><?php echo OC_Shorty_L10n::t('Shorty title').':'; ?></label> - <input id="title" name="title" type="text" data="" class="" readonly disabled /> - <br /> - <label for="status"><?php echo OC_Shorty_L10n::t('Status').':'; ?></label> - <input id="status" name="status" type="text" data="" class="" style="width:8em;" readonly disabled /> - <span class="label-line"> - <label for="until"><?php echo OC_Shorty_L10n::t('Expiration').':'; ?></label> - <input id="until" name="until" type="text" data="" class="" style="width:12em;" readonly disabled /> - </span> - <br /> - <label for="notes"><?php echo OC_Shorty_L10n::t('Notes').':'; ?></label> - <input id="notes" name="notes" data="" class="" readonly disabled /> - <br /> - <span class="label-line"> - <label for="clicks"><?php echo OC_Shorty_L10n::t('Clicks').':'; ?></label> - <input id="clicks" name="clicks" data="" type="textarea" class="" style="width:1em;" readonly disabled /> - <label for="created"><?php echo OC_Shorty_L10n::t('Creation').':'; ?></label> - <input id="created" name="created" type="text" data="" class="" style="width:7em;" readonly disabled /> - <label for="accessed"><?php echo OC_Shorty_L10n::t('Access').':'; ?></label> - <input id="accessed" name="accessed" type="text" data="" class="" style="width:10em;" readonly disabled /> - </span> - </fieldset> -</form> diff --git a/apps/storage_charts/ajax/config.php b/apps/storage_charts/ajax/config.php deleted file mode 100644 index 22fa0384290..00000000000 --- a/apps/storage_charts/ajax/config.php +++ /dev/null @@ -1,44 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('storage_charts'); - -if(in_array($_POST['k'], Array('hu_size','sc_sort','hu_size_hus'))){ - switch($_POST['o']){ - case 'set': - $i = NULL; - if(is_array($_POST['i'])){ - $i = serialize($_POST['i']); - - }elseif(is_numeric($_POST['i'])){ - $i = $_POST['i']; - } - OC_DLStCharts::setUConfValue($_POST['k'], $i); - break; - case 'get': - $v = OC_DLStCharts::getUConfValue($_POST['k']); - OCP\JSON::encodedPrint(Array('r' => $v['uc_val'])); - break; - } -} diff --git a/apps/storage_charts/ajax/data.php b/apps/storage_charts/ajax/data.php deleted file mode 100644 index a9a36d3c642..00000000000 --- a/apps/storage_charts/ajax/data.php +++ /dev/null @@ -1,37 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('storage_charts'); - -$l = new OC_L10N('storage_charts'); - -// Update and save the new configuration -if(is_numeric($_POST['s']) && in_array($_POST['k'], Array('hu_size','hu_size_hus'))){ - OC_DLStCharts::setUConfValue($_POST['k'], $_POST['s']); - if(strcmp($_POST['k'],'hu_size') == 0){ - OCP\JSON::encodedPrint(Array('r' => OC_DLStChartsLoader::loadChart('clines_usse', $l))); - }else{ - OCP\JSON::encodedPrint(Array('r' => OC_DLStChartsLoader::loadChart('chisto_us', $l))); - } -} diff --git a/apps/storage_charts/appinfo/app.php b/apps/storage_charts/appinfo/app.php deleted file mode 100644 index 3efec67ea8f..00000000000 --- a/apps/storage_charts/appinfo/app.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\App::checkAppEnabled('storage_charts'); - -OC::$CLASSPATH['OC_DLStCharts'] = "apps/storage_charts/lib/db.class.php"; -OC::$CLASSPATH['OC_DLStChartsLoader'] = "apps/storage_charts/lib/loader.class.php"; - -OCP\App::register(Array( - 'order' => 60, - 'id' => 'storage_charts', - 'name' => 'Storage Charts' -)); - -OCP\App::addNavigationEntry(Array( - 'id' => 'storage_charts', - 'order' => 60, - 'href' => OCP\Util::linkTo('storage_charts', 'charts.php'), - 'icon' => OCP\Util::imagePath('storage_charts', 'chart.png'), - 'name' => 'DL Charts' -)); - -OCP\App::registerPersonal('storage_charts','settings'); - -$data_dir = OCP\Config::getSystemValue('datadirectory', ''); -if(OCP\User::getUser() && strlen($data_dir) != 0){ - $fs = OCP\Files::getStorage('files'); - $used = OC_DLStCharts::getTotalDataSize(OC::$CONFIG_DATADIRECTORY); - $total = OC_DLStCharts::getTotalDataSize($data_dir) + $fs->free_space(); - OC_DLStCharts::update($used, $total); -} diff --git a/apps/storage_charts/appinfo/app_admin.php b/apps/storage_charts/appinfo/app_admin.php deleted file mode 100644 index 9181d2f54bb..00000000000 --- a/apps/storage_charts/appinfo/app_admin.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\App::checkAppEnabled('storage_charts'); - -$l = OC_L10N::get('storage_charts'); - -OC::$CLASSPATH['OC_DLStCharts'] = "apps/storage_charts/lib/db.class.php"; -OC::$CLASSPATH['OC_DLStChartsLoader'] = "apps/storage_charts/lib/loader.class.php"; - -if(OC_Group::inGroup(OCP\User::getUser(), 'admin')){ - OCP\App::register(Array( - 'order' => 60, - 'id' => 'storage_charts', - 'name' => 'Storage Charts' - )); - - OCP\App::addNavigationEntry(Array( - 'id' => 'storage_charts', - 'order' => 60, - 'href' => OCP\Util::linkTo('storage_charts', 'charts.php'), - 'icon' => OCP\Util::imagePath('storage_charts', 'chart.png'), - 'name' => 'DL Charts' - )); - - OCP\App::registerPersonal('storage_charts','settings'); -}elseif(OCP\User::isLoggedIn() && $_GET['app'] == 'storage_charts'){ - die($l->t('Permission denied.')); -} - -// Get storage value for logged in user -$data_dir = OCP\Config::getSystemValue('datadirectory', ''); -if(OCP\User::getUser() && strlen($data_dir) != 0){ - $fs = OCP\Files::getStorage('files'); - $used = OC_DLStCharts::getTotalDataSize(OC::$CONFIG_DATADIRECTORY); - $total = OC_DLStCharts::getTotalDataSize($data_dir) + $fs->free_space(); - OC_DLStCharts::update($used, $total); -}
\ No newline at end of file diff --git a/apps/storage_charts/appinfo/database.xml b/apps/storage_charts/appinfo/database.xml deleted file mode 100644 index cac8136d2e9..00000000000 --- a/apps/storage_charts/appinfo/database.xml +++ /dev/null @@ -1,99 +0,0 @@ -<?xml version="1.0" encoding="ISO-8859-1" ?> -<database> - <name>*dbname*</name> - <create>true</create> - <overwrite>false</overwrite> - <charset>utf8</charset> - <table> - <name>*dbprefix*dlstcharts</name> - <declaration> - <field> - <name>stc_id</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <autoincrement>1</autoincrement> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>oc_uid</name> - <type>text</type> - <notnull>true</notnull> - <length>64</length> - </field> - <field> - <name>stc_month</name> - <type>integer</type> - <notnull>true</notnull> - <length>6</length> - </field> - <field> - <name>stc_dayts</name> - <type>integer</type> - <notnull>true</notnull> - <length>11</length> - </field> - <field> - <name>stc_used</name> - <type>integer</type> - <notnull>true</notnull> - <length>30</length> - </field> - <field> - <name>stc_total</name> - <type>integer</type> - <notnull>true</notnull> - <length>30</length> - </field> - <index> - <name>stc_pk</name> - <primary>true</primary> - <field> - <name>stc_id</name> - <sorting>ascending</sorting> - </field> - </index> - </declaration> - </table> - <table> - <name>*dbprefix*dlstcharts_uconf</name> - <declaration> - <field> - <name>uc_id</name> - <type>integer</type> - <default>0</default> - <notnull>true</notnull> - <autoincrement>1</autoincrement> - <unsigned>true</unsigned> - <length>4</length> - </field> - <field> - <name>oc_uid</name> - <type>text</type> - <notnull>true</notnull> - <length>64</length> - </field> - <field> - <name>uc_key</name> - <type>text</type> - <notnull>true</notnull> - <length>64</length> - </field> - <field> - <name>uc_val</name> - <type>text</type> - <notnull>true</notnull> - <length>255</length> - </field> - <index> - <name>uc_pk</name> - <primary>true</primary> - <field> - <name>uc_id</name> - <sorting>ascending</sorting> - </field> - </index> - </declaration> - </table> -</database> diff --git a/apps/storage_charts/appinfo/info.xml b/apps/storage_charts/appinfo/info.xml deleted file mode 100644 index 435c5a40934..00000000000 --- a/apps/storage_charts/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<info> - <id>storage_charts</id> - <name>Storage Charts</name> - <description>Display storage charts, using HighCharts non-commercial free library (www.highcharts.com)</description> - <version>2.2</version> - <licence>AGPL</licence> - <author>Xavier Beurois (www.djazz-lab.net)</author> - <require>4</require> - <shipped>true</shipped> -</info> diff --git a/apps/storage_charts/charts.php b/apps/storage_charts/charts.php deleted file mode 100644 index 774f1135540..00000000000 --- a/apps/storage_charts/charts.php +++ /dev/null @@ -1,46 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\User::checkLoggedIn(); -OCP\App::checkAppEnabled('storage_charts'); - -$tmpl = new OCP\Template('storage_charts', 'charts.tpl', 'user'); - -// Get data for all users if admin or just for the current user -$displays = OC_DLStCharts::getUConfValue('c_disp', Array('uc_val' => 'a:3:{s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:1;s:9:"chisto_us";i:1;}')); -$displays = unserialize($displays['uc_val']); -$tmpl->assign('c_disp', $displays); - -$sc_sort = OC_DLStCharts::getUConfValue('sc_sort', Array('uc_val' => 'a:3:{i:0;s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:2;s:9:"chisto_us";}')); -$tmpl->assign('sc_sort', unserialize($sc_sort['uc_val'])); - -if($displays['clines_usse']){ - $hu_size = OC_DLStCharts::getUConfValue('hu_size', Array('uc_val' => 3)); - $tmpl->assign('hu_size', $hu_size['uc_val']); -} -if($displays['chisto_us']){ - $hu_size_hus = OC_DLStCharts::getUConfValue('hu_size_hus', Array('uc_val' => 3)); - $tmpl->assign('hu_size_hus', $hu_size_hus['uc_val']); -} - -$tmpl->printPage(); diff --git a/apps/storage_charts/css/styles.css b/apps/storage_charts/css/styles.css deleted file mode 100644 index e5fb7a3dad0..00000000000 --- a/apps/storage_charts/css/styles.css +++ /dev/null @@ -1,32 +0,0 @@ -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -#storage-charts div.personalblock.topblock span{float:right;color:#BBB;font-style:italic;} - -#stc_sortable div.personalblock.bottomblock, #storage-charts div.personalblock.bottomblock{margin-bottom:1em;} -#stc_sortable div.personalblock.titleblock, #storage-charts div.personalblock.titleblock{font-weight:bold;} -#stc_sortable div.personalblock, #storage-charts div.personalblock{margin:1em 1em 0;padding:0.5em 1em;background: none repeat scroll 0 0 #F8F8F8;border-radius:0.5em 0.5em 0.5em 0.5em;color:#555555;text-shadow:0 1px 0 #FFFFFF;border:1px solid #DDDDDD;box-shadow:0 1px 1px #FFFFFF,0 1px 1px #FFFFFF inset;} - -#stc_frame{margin:1em 1em 0;} -#stc_frame #stc_sortable div.personalblock{margin:0;margin-bottom:1em;} -#stc_frame #stc_sortable div.personalblock h3{line-height:2.6;} -#stc_frame #stc_sortable div.personalblock h3 img{vertical-align:middle;margin-right:10px;} -#stc_frame #stc_sortable div.personalblock h3 span#selunits,#stc_frame #stc_sortable div.personalblock h3 span#selunits_hus{float:right;} diff --git a/apps/storage_charts/img/chart.png b/apps/storage_charts/img/chart.png Binary files differdeleted file mode 100644 index d8a99816641..00000000000 --- a/apps/storage_charts/img/chart.png +++ /dev/null diff --git a/apps/storage_charts/img/loader.gif b/apps/storage_charts/img/loader.gif Binary files differdeleted file mode 100644 index 190582b8226..00000000000 --- a/apps/storage_charts/img/loader.gif +++ /dev/null diff --git a/apps/storage_charts/img/move.png b/apps/storage_charts/img/move.png Binary files differdeleted file mode 100644 index afb605ed9a8..00000000000 --- a/apps/storage_charts/img/move.png +++ /dev/null diff --git a/apps/storage_charts/js/highCharts-2.2.1/highcharts.min.js b/apps/storage_charts/js/highCharts-2.2.1/highcharts.min.js deleted file mode 100644 index 203d89b6ea1..00000000000 --- a/apps/storage_charts/js/highCharts-2.2.1/highcharts.min.js +++ /dev/null @@ -1,202 +0,0 @@ -/* - Highcharts JS v2.2.1 (2012-03-15) - - (c) 2009-2011 Torstein H?nsi - - License: www.highcharts.com/license -*/ -(function(){function L(a,b){var c;a||(a={});for(c in b)a[c]=b[c];return a}function za(){for(var a=0,b=arguments,c=b.length,d={};a<c;a++)d[b[a++]]=b[a];return d}function S(a,b){return parseInt(a,b||10)}function Ab(a){return typeof a==="string"}function mb(a){return typeof a==="object"}function Fb(a){return Object.prototype.toString.call(a)==="[object Array]"}function Bb(a){return typeof a==="number"}function nb(a){return oa.log(a)/oa.LN10}function cb(a){return oa.pow(10,a)}function Gb(a,b){for(var c= -a.length;c--;)if(a[c]===b){a.splice(c,1);break}}function s(a){return a!==X&&a!==null}function A(a,b,c){var d,e;if(Ab(b))s(c)?a.setAttribute(b,c):a&&a.getAttribute&&(e=a.getAttribute(b));else if(s(b)&&mb(b))for(d in b)a.setAttribute(d,b[d]);return e}function Hb(a){return Fb(a)?a:[a]}function p(){var a=arguments,b,c,d=a.length;for(b=0;b<d;b++)if(c=a[b],typeof c!=="undefined"&&c!==null)return c}function P(a,b){if(Qb&&b&&b.opacity!==X)b.filter="alpha(opacity="+b.opacity*100+")";L(a.style,b)}function Aa(a, -b,c,d,e){a=x.createElement(a);b&&L(a,b);e&&P(a,{padding:0,border:Ma,margin:0});c&&P(a,c);d&&d.appendChild(a);return a}function pa(a,b){var c=function(){};c.prototype=new a;L(c.prototype,b);return c}function dc(a,b,c,d){var e=Ea.lang,f=isNaN(b=Ba(b))?2:b,b=c===void 0?e.decimalPoint:c,d=d===void 0?e.thousandsSep:d,e=a<0?"-":"",c=String(S(a=Ba(+a||0).toFixed(f))),g=c.length>3?c.length%3:0;return e+(g?c.substr(0,g)+d:"")+c.substr(g).replace(/(\d{3})(?=\d)/g,"$1"+d)+(f?b+Ba(a-c).toFixed(f).slice(2):"")} -function Na(a,b){return Array((b||2)+1-String(a).length).join(0)+a}function ec(a,b,c,d){var e,c=p(c,1);e=a/c;b||(b=[1,2,2.5,5,10],d&&d.allowDecimals===!1&&(c===1?b=[1,2,5,10]:c<=0.1&&(b=[1/c])));for(d=0;d<b.length;d++)if(a=b[d],e<=(b[d]+(b[d+1]||b[d]))/2)break;a*=c;return a}function Kc(a,b){var c=b||[[Rb,[1,2,5,10,20,25,50,100,200,500]],[ob,[1,2,5,10,15,30]],[pb,[1,2,5,10,15,30]],[va,[1,2,3,4,6,8,12]],[Ca,[1,2]],[Ya,[1,2]],[Da,[1,2,3,4,6]],[Za,null]],d=c[c.length-1],e=E[d[0]],f=d[1],g;for(g=0;g<c.length;g++)if(d= -c[g],e=E[d[0]],f=d[1],c[g+1]&&a<=(e*f[f.length-1]+E[c[g+1][0]])/2)break;e===E[Za]&&a<5*e&&(f=[1,2,5]);e===E[Za]&&a<5*e&&(f=[1,2,5]);c=ec(a/e,f);return{unitRange:e,count:c,unitName:d[0]}}function Lc(a,b,c,d){var e=[],f={},g=Ea.global.useUTC,h,i=new Date(b),b=a.unitRange,k=a.count;b>=E[ob]&&(i.setMilliseconds(0),i.setSeconds(b>=E[pb]?0:k*Ta(i.getSeconds()/k)));if(b>=E[pb])i[pc](b>=E[va]?0:k*Ta(i[fc]()/k));if(b>=E[va])i[qc](b>=E[Ca]?0:k*Ta(i[gc]()/k));if(b>=E[Ca])i[hc](b>=E[Da]?1:k*Ta(i[db]()/k));b>= -E[Da]&&(i[rc](b>=E[Za]?0:k*Ta(i[qb]()/k)),h=i[rb]());b>=E[Za]&&(h-=h%k,i[sc](h));if(b===E[Ya])i[hc](i[db]()-i[ic]()+p(d,1));d=1;h=i[rb]();for(var j=i.getTime(),l=i[qb](),i=i[db]();j<c;)e.push(j),b===E[Za]?j=sb(h+d*k,0):b===E[Da]?j=sb(h,l+d*k):!g&&(b===E[Ca]||b===E[Ya])?j=sb(h,l,i+d*k*(b===E[Ca]?1:7)):(j+=b*k,b<=E[va]&&j%E[Ca]===0&&(f[j]=Ca)),d++;e.push(j);e.info=L(a,{higherRanks:f,totalRange:b*k});return e}function tc(){this.symbol=this.color=0}function uc(a,b,c,d,e,f,g,h,i){var k=g.x,g=g.y,i=k+c+ -(i?h:-a-h),j=g-b+d+15,l;i<7&&(i=c+k+h);i+a>c+e&&(i-=i+a-(c+e),j=g-b+d-h,l=!0);j<d+5?(j=d+5,l&&g>=j&&g<=j+b&&(j=g+d+h)):j+b>d+f&&(j=d+f-b-h);return{x:i,y:j}}function Mc(a,b){var c=a.length,d,e;for(e=0;e<c;e++)a[e].ss_i=e;a.sort(function(a,c){d=b(a,c);return d===0?a.ss_i-c.ss_i:d});for(e=0;e<c;e++)delete a[e].ss_i}function Sb(a){for(var b=a.length,c=a[0];b--;)a[b]<c&&(c=a[b]);return c}function Ib(a){for(var b=a.length,c=a[0];b--;)a[b]>c&&(c=a[b]);return c}function Jb(a){for(var b in a)a[b]&&a[b].destroy&& -a[b].destroy(),delete a[b]}function Tb(a){tb||(tb=Aa(Ra));a&&tb.appendChild(a);tb.innerHTML=""}function jc(a,b){var c="Highcharts error #"+a+": www.highcharts.com/errors/"+a;if(b)throw c;else ca.console&&console.log(c)}function Cb(a){return parseFloat(a.toPrecision(14))}function Kb(a,b){Ub=p(a,b.animation)}function vc(){var a=Ea.global.useUTC,b=a?"getUTC":"get",c=a?"setUTC":"set";sb=a?Date.UTC:function(a,b,c,g,h,i){return(new Date(a,b,p(c,1),p(g,0),p(h,0),p(i,0))).getTime()};fc=b+"Minutes";gc=b+"Hours"; -ic=b+"Day";db=b+"Date";qb=b+"Month";rb=b+"FullYear";pc=c+"Minutes";qc=c+"Hours";hc=c+"Date";rc=c+"Month";sc=c+"FullYear"}function Sa(){}function wc(a,b){function c(a){function b(a,c){this.pos=a;this.type=c||"";this.isNew=!0;c||this.addLabel()}function c(a){if(a)this.options=a,this.id=a.id;return this}function d(a,b,c,e){this.isNegative=b;this.options=a;this.x=c;this.stack=e;this.alignOptions={align:a.align||(U?b?"left":"right":"center"),verticalAlign:a.verticalAlign||(U?"middle":b?"bottom":"top"), -y:p(a.y,U?4:b?14:-6),x:p(a.x,U?b?-6:6:0)};this.textAlign=a.textAlign||(U?b?"right":"left":"center")}function e(){var a=[],b=[],c;C=M=null;o(B.series,function(e){if(e.visible||!q.ignoreHiddenSeries){var f=e.options,g,h,i,j,k,m,l,n,Y,ea=f.threshold,B,o=[],xc=0;if(R&&ea<=0)ea=f.threshold=null;if(t)f=e.xData,f.length&&(C=Ua(p(C,f[0]),Sb(f)),M=W(p(M,f[0]),Ib(f)));else{var y,r,G,v=e.cropped,Z=e.xAxis.getExtremes(),V=!!e.modifyValue;g=f.stacking;Ha=g==="percent";if(g)k=f.stack,j=e.type+p(k,""),m="-"+j,e.stackKey= -j,h=a[j]||[],a[j]=h,i=b[m]||[],b[m]=i;Ha&&(C=0,M=99);f=e.processedXData;l=e.processedYData;B=l.length;for(c=0;c<B;c++)if(n=f[c],Y=l[c],Y!==null&&Y!==X&&(g?(r=(y=Y<ea)?i:h,G=y?m:j,Y=r[n]=s(r[n])?r[n]+Y:Y,qa[G]||(qa[G]={}),qa[G][n]||(qa[G][n]=new d(u.stackLabels,y,n,k)),qa[G][n].setTotal(Y)):V&&(Y=e.modifyValue(Y)),v||(f[c+1]||n)>=Z.min&&(f[c-1]||n)<=Z.max))if(n=Y.length)for(;n--;)Y[n]!==null&&(o[xc++]=Y[n]);else o[xc++]=Y;!Ha&&o.length&&(C=Ua(p(C,o[0]),Sb(o)),M=W(p(M,o[0]),Ib(o)));s(ea)&&(C>=ea?(C= -ea,Ma=!0):M<ea&&(M=ea,Na=!0))}}})}function f(a,b,c){for(var d,b=Cb(Ta(b/a)*a),c=Cb(Yb(c/a)*a),e=[];b<=c;){e.push(b);b=Cb(b+a);if(b===d)break;d=b}return e}function g(a,b,c,d){var e=[];if(!d)B._minorAutoInterval=null;if(a>=0.5)a=z(a),e=f(a,b,c);else if(a>=0.08){var h=Ta(b),i,j,k,n,m,l;for(i=a>0.3?[1,2,4]:a>0.15?[1,2,4,6,8]:[1,2,3,4,5,6,7,8,9];h<c+1&&!l;h++){k=i.length;for(j=0;j<k&&!l;j++)n=nb(cb(h)*i[j]),n>b&&e.push(m),m>c&&(l=!0),m=n}}else if(b=cb(b),c=cb(c),a=u[d?"minorTickInterval":"tickInterval"], -a=p(a==="auto"?null:a,B._minorAutoInterval,(c-b)*(u.tickPixelInterval/(d?5:1))/((d?D/N.length:D)||1)),a=ec(a,null,oa.pow(10,Ta(oa.log(a)/oa.LN10))),e=Vb(f(a,b,c),nb),!d)B._minorAutoInterval=a/5;d||(Oa=a);return e}function h(){var a=[],b,c;if(R){c=N.length;for(b=1;b<c;b++)a=a.concat(g(Ga,N[b-1],N[b],!0))}else for(b=F+(N[0]-F)%Ga;b<=H;b+=Ga)a.push(b);return a}function i(){var a,b=M-C>=fb,c,d,e,f,g,h;t&&fb===X&&!R&&(s(u.min)||s(u.max)?fb=null:(o(B.series,function(a){f=a.xData;for(d=g=a.xIncrement?1: -f.length-1;d>0;d--)if(e=f[d]-f[d-1],c===X||e<c)c=e}),fb=Ua(c*5,M-C)));H-F<fb&&(a=(fb-H+F)/2,a=[F-a,p(u.min,F-a)],b&&(a[2]=C),F=Ib(a),h=[F+fb,p(u.max,F+fb)],b&&(h[2]=M),H=Sb(h),H-F<fb&&(a[0]=H-fb,a[1]=p(u.min,H-fb),F=Ib(a)))}function j(a){var b,c=u.tickInterval,d=u.tickPixelInterval;da?(na=m[t?"xAxis":"yAxis"][u.linkedTo],b=na.getExtremes(),F=p(b.min,b.dataMin),H=p(b.max,b.dataMax),u.type!==na.options.type&&jc(11,1)):(F=p(ba,u.min,C),H=p(ca,u.max,M));R&&(!a&&Ua(F,C)<=0&&jc(10,1),F=nb(F),H=nb(H));ja&& -(ba=F=W(F,H-ja),ca=H,a&&(ja=null));i();if(!Va&&!Ha&&!da&&s(F)&&s(H)){b=H-F||1;if(!s(u.min)&&!s(ba)&&Ea&&(C<0||!Ma))F-=b*Ea;if(!s(u.max)&&!s(ca)&&Ja&&(M>0||!Na))H+=b*Ja}Oa=F===H||F===void 0||H===void 0?1:da&&!c&&d===na.options.tickPixelInterval?na.tickInterval:p(c,Va?1:(H-F)*d/(D||1));t&&!a&&o(B.series,function(a){a.processData(F!==ma||H!==za)});ib();B.beforeSetTickPositions&&B.beforeSetTickPositions();B.postProcessTickInterval&&(Oa=B.postProcessTickInterval(Oa));!V&&!R&&(Wa=oa.pow(10,Ta(oa.log(Oa)/ -oa.LN10)),s(u.tickInterval)||(Oa=ec(Oa,null,Wa,u)));B.tickInterval=Oa;Ga=u.minorTickInterval==="auto"&&Oa?Oa/5:u.minorTickInterval;(N=u.tickPositions||Xa&&Xa.apply(B,[F,H]))||(N=V?(B.getNonLinearTimeTicks||Lc)(Kc(Oa,u.units),F,H,u.startOfWeek,B.ordinalPositions,B.closestPointRange,!0):R?g(Oa,F,H):f(Oa,F,H));if(!da&&(a=N[0],c=N[N.length-1],u.startOnTick?F=a:F>a&&N.shift(),u.endOnTick?H=c:H<c&&N.pop(),gb||(gb={x:0,y:0}),!V&&N.length>gb[w]&&u.alignTicks!==!1))gb[w]=N.length}function k(a){a=(new c(a)).render(); -ta.push(a);return a}function l(){var a=u.title,d=u.stackLabels,e=u.alternateGridColor,f=u.lineWidth,g,i,j=m.hasRendered&&s(ma)&&!isNaN(ma),n=(g=B.series.length&&s(F)&&s(H))||p(u.showEmpty,!0),Y,q;if(g||da)if(Ga&&!Va&&o(h(),function(a){va[a]||(va[a]=new b(a,"minor"));j&&va[a].isNew&&va[a].render(null,!0);va[a].isActive=!0;va[a].render()}),o(N.slice(1).concat([N[0]]),function(a,c){c=c===N.length-1?0:c+1;if(!da||a>=F&&a<=H)Pa[a]||(Pa[a]=new b(a)),j&&Pa[a].isNew&&Pa[a].render(c,!0),Pa[a].isActive=!0, -Pa[a].render(c)}),e&&o(N,function(a,b){if(b%2===0&&a<H)Da[a]||(Da[a]=new c),Y=a,q=N[b+1]!==X?N[b+1]:H,Da[a].options={from:R?cb(Y):Y,to:R?cb(q):q,color:e},Da[a].render(),Da[a].isActive=!0}),!B._addedPlotLB)o((u.plotLines||[]).concat(u.plotBands||[]),function(a){k(a)}),B._addedPlotLB=!0;o([Pa,va,Da],function(a){for(var b in a)a[b].isActive?a[b].isActive=!1:(a[b].destroy(),delete a[b])});f&&(g=x+(y?A:0)+T,i=ra-Lb-(y?hb:0)+T,g=I.crispLine([wa,G?x:g,G?i:E,fa,G?sa-Zb:g,G?i:ra-Lb],f),$?$.animate({d:g}): -$=I.path(g).attr({stroke:u.lineColor,"stroke-width":f,zIndex:7}).add(),$[n?"show":"hide"]());if(v&&n)n=G?x:E,f=S(a.style.fontSize||12),n={low:n+(G?0:D),middle:n+D/2,high:n+(G?D:0)}[a.align],f=(G?E+hb:x)+(G?1:-1)*(y?-1:1)*Ya+(r===2?f:0),v[v.isNew?"attr":"animate"]({x:G?n:f+(y?A:0)+T+(a.x||0),y:G?f-(y?hb:0)+T:n+(a.y||0)}),v.isNew=!1;if(d&&d.enabled){var t,yc,d=B.stackTotalGroup;if(!d)B.stackTotalGroup=d=I.g("stack-labels").attr({visibility:eb,zIndex:6}).translate(O,J).add();for(t in qa)for(yc in a= -qa[t],a)a[yc].render(d)}B.isDirty=!1}function n(a){for(var b=ta.length;b--;)ta[b].id===a&&ta[b].destroy()}var t=a.isX,y=a.opposite,G=U?!t:t,r=G?y?0:2:y?1:3,qa={},u=K(t?$b:kc,[Nc,Oc,zc,Pc][r],a),B=this,v,Z=u.type,V=Z==="datetime",R=Z==="logarithmic",T=u.offset||0,w=t?"x":"y",D=0,ua,ia,bb,jb,x,E,A,hb,Lb,Zb,Mb,ib,P,Q,bc,$,C,M,fb=u.minRange||u.maxZoom,ja=u.range,ba,ca,Aa,Ca,H=null,F=null,ma,za,Ea=u.minPadding,Ja=u.maxPadding,Ka=0,da=s(u.linkedTo),na,Ma,Na,Ha,Z=u.events,Sa,ta=[],Oa,Ga,Wa,N,Xa=u.tickPositioner, -Pa={},va={},Da={},Fa,La,Ya,Va=u.categories,db=u.labels.formatter||function(){var a=this.value,b=this.dateTimeLabelFormat;return b?ac(b,a):Oa%1E6===0?a/1E6+"M":Oa%1E3===0?a/1E3+"k":!Va&&a>=1E3?dc(a,0):a},Ra=G&&u.labels.staggerLines,ya=u.reversed,Ia=Va&&u.tickmarkPlacement==="between"?0.5:0;b.prototype={addLabel:function(){var a=this.pos,b=u.labels,c=Va&&G&&Va.length&&!b.step&&!b.staggerLines&&!b.rotation&&ka/Va.length||!G&&ka/2,d=a===N[0],e=a===N[N.length-1],f=Va&&s(Va[a])?Va[a]:a,g=this.label,h=N.info, -i;V&&h&&(i=u.dateTimeLabelFormats[h.higherRanks[a]||h.unitName]);this.isFirst=d;this.isLast=e;a=db.call({axis:B,chart:m,isFirst:d,isLast:e,dateTimeLabelFormat:i,value:R?Cb(cb(f)):f});c=c&&{width:W(1,z(c-2*(b.padding||10)))+ga};c=L(c,b.style);s(g)?g&&g.attr({text:a}).css(c):this.label=s(a)&&b.enabled?I.text(a,0,0,b.useHTML).attr({align:b.align,rotation:b.rotation}).css(c).add(Q):null},getLabelSize:function(){var a=this.label;return a?(this.labelBBox=a.getBBox())[G?"height":"width"]:0},getLabelSides:function(){var a= -u.labels,b=this.labelBBox.width,a=b*{left:0,center:0.5,right:1}[a.align]-a.x;return[-a,b-a]},handleOverflow:function(a){var b=!0,c=this.isFirst,d=this.isLast,e=this.label,f=e.x;if(c||d){var g=this.getLabelSides(),h=g[0],g=g[1],i=m.plotLeft,j=i+B.len,k=(a=Pa[N[a+(c?1:-1)]])&&a.label.x+a.getLabelSides()[c?0:1];c&&!ya||d&&ya?f+h<i&&(f=i-h,a&&f+g>k&&(b=!1)):f+g>j&&(f=j-g,a&&f+h<k&&(b=!1));e.x=f}return b},render:function(a,b){var c=this.type,d=this.label,e=this.pos,f=u.labels,g=this.gridLine,h=c?c+"Grid": -"grid",i=c?c+"Tick":"tick",j=u[h+"LineWidth"],k=u[h+"LineColor"],n=u[h+"LineDashStyle"],m=u[i+"Length"],h=u[i+"Width"]||0,l=u[i+"Color"],Y=u[i+"Position"],i=this.mark,q=f.step,ea=b&&Za||ra,qa=!0,o;o=G?Mb(e+Ia,null,null,b)+bb:x+T+(y?(b&&$a||sa)-Zb-x:0);ea=G?ea-Lb+T-(y?hb:0):ea-Mb(e+Ia,null,null,b)-bb;if(j){e=P(e+Ia,j,b);if(g===X){g={stroke:k,"stroke-width":j};if(n)g.dashstyle=n;if(!c)g.zIndex=1;this.gridLine=g=j?I.path(e).attr(g).add(bc):null}!b&&g&&e&&g.animate({d:e})}if(h)Y==="inside"&&(m=-m),y&& -(m=-m),c=I.crispLine([wa,o,ea,fa,o+(G?0:-m),ea+(G?m:0)],h),i?i.animate({d:c}):this.mark=I.path(c).attr({stroke:l,"stroke-width":h}).add(Q);if(d&&!isNaN(o))o=o+f.x-(Ia&&G?Ia*ia*(ya?-1:1):0),ea=ea+f.y-(Ia&&!G?Ia*ia*(ya?1:-1):0),s(f.y)||(ea+=S(d.styles.lineHeight)*0.9-d.getBBox().height/2),Ra&&(ea+=a/(q||1)%Ra*16),d.x=o,d.y=ea,this.isFirst&&!p(u.showFirstLabel,1)||this.isLast&&!p(u.showLastLabel,1)?qa=!1:!Ra&&G&&f.overflow==="justify"&&!this.handleOverflow(a)&&(qa=!1),q&&a%q&&(qa=!1),qa?(d[this.isNew? -"attr":"animate"]({x:d.x,y:d.y}),d.show(),this.isNew=!1):d.hide()},destroy:function(){Jb(this)}};c.prototype={render:function(){var a=this,b=(B.pointRange||0)/2,c=a.options,d=c.label,e=a.label,f=c.width,g=c.to,h=c.from,i=c.value,j,k=c.dashStyle,n=a.svgElem,m=[],l,Y,u=c.color;Y=c.zIndex;var ea=c.events;R&&(h=nb(h),g=nb(g),i=nb(i));if(f){if(m=P(i,f),b={stroke:u,"stroke-width":f},k)b.dashstyle=k}else if(s(h)&&s(g))h=W(h,F-b),g=Ua(g,H+b),j=P(g),(m=P(h))&&j?m.push(j[4],j[5],j[1],j[2]):m=null,b={fill:u}; -else return;if(s(Y))b.zIndex=Y;if(n)m?n.animate({d:m},null,n.onGetPath):(n.hide(),n.onGetPath=function(){n.show()});else if(m&&m.length&&(a.svgElem=n=I.path(m).attr(b).add(),ea))for(l in k=function(b){n.on(b,function(c){ea[b].apply(a,[c])})},ea)k(l);if(d&&s(d.text)&&m&&m.length&&A>0&&hb>0){d=K({align:G&&j&&"center",x:G?!j&&4:10,verticalAlign:!G&&j&&"middle",y:G?j?16:10:j?6:-4,rotation:G&&!j&&90},d);if(!e)a.label=e=I.text(d.text,0,0).attr({align:d.textAlign||d.align,rotation:d.rotation,zIndex:Y}).css(d.style).add(); -j=[m[1],m[4],p(m[6],m[1])];m=[m[2],m[5],p(m[7],m[2])];l=Sb(j);Y=Sb(m);e.align(d,!1,{x:l,y:Y,width:Ib(j)-l,height:Ib(m)-Y});e.show()}else e&&e.hide();return a},destroy:function(){Jb(this);Gb(ta,this)}};d.prototype={destroy:function(){Jb(this)},setTotal:function(a){this.cum=this.total=a},render:function(a){var b=this.options.formatter.call(this);this.label?this.label.attr({text:b,visibility:ab}):this.label=m.renderer.text(b,0,0).css(this.options.style).attr({align:this.textAlign,rotation:this.options.rotation, -visibility:ab}).add(a)},setOffset:function(a,b){var c=this.isNegative,d=B.translate(this.total,0,0,0,1),e=B.translate(0),e=Ba(d-e),f=m.xAxis[0].translate(this.x)+a,g=m.plotHeight,c={x:U?c?d:d-e:f,y:U?g-f-b:c?g-d-e:g-d,width:U?e:b,height:U?b:e};this.label&&this.label.align(this.alignOptions,null,c).attr({visibility:eb})}};Mb=function(a,b,c,d,e){var f=1,g=0,h=d?jb:ia,d=d?ma:F,e=u.ordinal||R&&e;h||(h=ia);c&&(f*=-1,g=D);ya&&(f*=-1,g-=f*D);b?(ya&&(a=D-a),a=a/h+d,e&&(a=B.lin2val(a))):(e&&(a=B.val2lin(a)), -a=f*(a-d)*h+g+f*Ka);return a};P=function(a,b,c){var d,e,f,a=Mb(a,null,null,c),g=c&&Za||ra,h=c&&$a||sa,i,c=e=z(a+bb);d=f=z(g-a-bb);if(isNaN(a))i=!0;else if(G){if(d=E,f=g-Lb,c<x||c>x+A)i=!0}else if(c=x,e=h-Zb,d<E||d>E+hb)i=!0;return i?null:I.crispLine([wa,c,d,fa,e,f],b||0)};ib=function(){var a=H-F,b=0,c,d;if(t)da?b=na.pointRange:o(B.series,function(a){b=W(b,a.pointRange);d=a.closestPointRange;!a.noSharedTooltip&&s(d)&&(c=s(c)?Ua(c,d):d)}),B.pointRange=b,B.closestPointRange=c;jb=ia;B.translationSlope= -ia=D/(a+b||1);bb=G?x:Lb;Ka=ia*(b/2)};xa.push(B);m[t?"xAxis":"yAxis"].push(B);U&&t&&ya===X&&(ya=!0);L(B,{addPlotBand:k,addPlotLine:k,adjustTickAmount:function(){if(gb&&gb[w]&&!V&&!Va&&!da&&u.alignTicks!==!1){var a=Fa,b=N.length;Fa=gb[w];if(b<Fa){for(;N.length<Fa;)N.push(Cb(N[N.length-1]+Oa));ia*=(b-1)/(Fa-1);H=N[N.length-1]}if(s(a)&&Fa!==a)B.isDirty=!0}},categories:Va,getExtremes:function(){return{min:R?Cb(cb(F)):F,max:R?Cb(cb(H)):H,dataMin:C,dataMax:M,userMin:ba,userMax:ca}},getPlotLinePath:P,getThreshold:function(a){var b= -R?cb(F):F,c=R?cb(H):H;b>a||a===null?a=b:c<a&&(a=c);return Mb(a,0,1,0,1)},isXAxis:t,options:u,plotLinesAndBands:ta,getOffset:function(){var a=B.series.length&&s(F)&&s(H),c=a||p(u.showEmpty,!0),d=0,e,f=0,g=u.title,h=u.labels,i=[-1,1,1,-1][r],j;Q||(Q=I.g("axis").attr({zIndex:7}).add(),bc=I.g("grid").attr({zIndex:u.gridZIndex||1}).add());La=0;if(a||da)o(N,function(a){Pa[a]?Pa[a].addLabel():Pa[a]=new b(a)}),o(N,function(a){if(r===0||r===2||{1:"left",3:"right"}[r]===h.align)La=W(Pa[a].getLabelSize(),La)}), -Ra&&(La+=(Ra-1)*16);else for(j in Pa)Pa[j].destroy(),delete Pa[j];if(g&&g.text){if(!v)v=B.axisTitle=I.text(g.text,0,0,g.useHTML).attr({zIndex:7,rotation:g.rotation||0,align:g.textAlign||{low:"left",middle:"center",high:"right"}[g.align]}).css(g.style).add(),v.isNew=!0;if(c)d=v.getBBox()[G?"height":"width"],f=p(g.margin,G?5:10),e=g.offset;v[c?"show":"hide"]()}T=i*p(u.offset,pa[r]);Ya=p(e,La+f+(r!==2&&La&&i*u.labels[G?"y":"x"]));pa[r]=W(pa[r],Ya+d+i*T)},render:l,setAxisSize:function(){var a=u.offsetLeft|| -0,b=u.offsetRight||0;x=p(u.left,O+a);E=p(u.top,J);A=p(u.width,ka-a+b);hb=p(u.height,la);Lb=ra-hb-E;Zb=sa-A-x;D=G?A:hb;B.left=x;B.top=E;B.len=D},setAxisTranslation:ib,setCategories:function(b,c){B.categories=a.categories=Va=b;o(B.series,function(a){a.translate();a.setTooltipPoints(!0)});B.isDirty=!0;p(c,!0)&&m.redraw()},setExtremes:function(a,b,c,d,e){c=p(c,!0);e=L(e,{min:a,max:b});aa(B,"setExtremes",e,function(){ba=a;ca=b;B.isDirtyExtremes=!0;c&&m.redraw(d)})},setScale:function(){var a,b,c,d;ma=F; -za=H;ua=D;D=G?A:hb;d=D!==ua;o(B.series,function(a){if(a.isDirtyData||a.isDirty||a.xAxis.isDirty)c=!0});if(d||c||da||ba!==Aa||ca!==Ca){e();j();Aa=ba;Ca=ca;if(!t)for(a in qa)for(b in qa[a])qa[a][b].cum=qa[a][b].total;if(!B.isDirty)B.isDirty=d||F!==ma||H!==za}},setTickPositions:j,translate:Mb,redraw:function(){ub.resetTracker&&ub.resetTracker();l();o(ta,function(a){a.render()});o(B.series,function(a){a.isDirty=!0})},removePlotBand:n,removePlotLine:n,reversed:ya,setTitle:function(a,b){u.title=K(u.title, -a);v=v.destroy();B.isDirty=!0;p(b,!0)&&m.redraw()},series:[],stacks:qa,destroy:function(){var a;Qa(B);for(a in qa)Jb(qa[a]),qa[a]=null;if(B.stackTotalGroup)B.stackTotalGroup=B.stackTotalGroup.destroy();o([Pa,va,Da,ta],function(a){Jb(a)});o([$,Q,bc,v],function(a){a&&a.destroy()});$=Q=bc=v=null}});for(Sa in Z)ha(B,Sa,Z[Sa]);if(R)B.val2lin=nb,B.lin2val=cb}function d(a){function b(){var c=this.points||Hb(this),d=c[0].series,e;e=[d.tooltipHeaderFormatter(c[0].key)];o(c,function(a){d=a.series;e.push(d.tooltipFormatter&& -d.tooltipFormatter(a)||a.point.tooltipFormatter(d.tooltipOptions.pointFormat))});e.push(a.footerFormat||"");return e.join("")}function c(a,b){l=n?a:(2*l+a)/3;q=n?b:(q+b)/2;t.attr({x:l,y:q});lb=Ba(a-l)>1||Ba(b-q)>1?function(){c(a,b)}:null}function d(){if(!n){var a=m.hoverPoints;t.hide();a&&o(a,function(a){a.setState()});m.hoverPoints=null;n=!0}}var e,f=a.borderWidth,g=a.crosshairs,h=[],i=a.style,j=a.shared,k=S(i.padding),n=!0,l=0,q=0;i.padding=0;var t=I.label("",0,0,null,null,null,a.useHTML).attr({padding:k, -fill:a.backgroundColor,"stroke-width":f,r:a.borderRadius,zIndex:8}).css(i).hide().add();Fa||t.shadow(a.shadow);return{shared:j,refresh:function(f){var i,k,l,q,r={},y=[];l=f.tooltipPos;i=a.formatter||b;var r=m.hoverPoints,v;j&&(!f.series||!f.series.noSharedTooltip)?(q=0,r&&o(r,function(a){a.setState()}),m.hoverPoints=f,o(f,function(a){a.setState(ta);q+=a.plotY;y.push(a.getLabelConfig())}),k=f[0].plotX,q=z(q)/f.length,r={x:f[0].category},r.points=y,f=f[0]):r=f.getLabelConfig();r=i.call(r);e=f.series; -k=p(k,f.plotX);q=p(q,f.plotY);i=z(l?l[0]:U?ka-q:k);k=z(l?l[1]:U?la-k:q);l=j||!e.isCartesian||e.tooltipOutsidePlot||Db(i,k);r===!1||!l?d():(n&&(t.show(),n=!1),t.attr({text:r}),v=a.borderColor||f.color||e.color||"#606060",t.attr({stroke:v}),l=uc(t.width,t.height,O,J,ka,la,{x:i,y:k},p(a.distance,12),U),c(z(l.x),z(l.y)));if(g){g=Hb(g);var R;l=g.length;for(var Z;l--;)if(R=f.series[l?"yAxis":"xAxis"],g[l]&&R)if(R=R.getPlotLinePath(l?p(f.stackY,f.y):f.x,1),h[l])h[l].attr({d:R,visibility:eb});else{Z={"stroke-width":g[l].width|| -1,stroke:g[l].color||"#C0C0C0",zIndex:g[l].zIndex||2};if(g[l].dashStyle)Z.dashstyle=g[l].dashStyle;h[l]=I.path(R).attr(Z).add()}}aa(m,"tooltipRefresh",{text:r,x:i+O,y:k+J,borderColor:v})},hide:d,hideCrosshairs:function(){o(h,function(a){a&&a.hide()})},destroy:function(){o(h,function(a){a&&a.destroy()});t&&(t=t.destroy())}}}function e(a){function b(a){var c,d,e,a=a||ca.event;if(!a.target)a.target=a.srcElement;if(a.originalEvent)a=a.originalEvent;if(a.event)a=a.event;c=a.touches?a.touches.item(0):a; -ya=Ac(D);d=ya.left;e=ya.top;Qb?(d=a.x,c=a.y):(d=c.pageX-d,c=c.pageY-e);return L(a,{chartX:z(d),chartY:z(c)})}function c(a){var b={xAxis:[],yAxis:[]};o(xa,function(c){var d=c.translate,e=c.isXAxis;b[e?"xAxis":"yAxis"].push({axis:c,value:d((U?!e:e)?a.chartX-O:la-a.chartY+J,!0)})});return b}function e(){var a=m.hoverSeries,b=m.hoverPoint;if(b)b.onMouseOut();if(a)a.onMouseOut();vb&&(vb.hide(),vb.hideCrosshairs());ob=null}function f(){if(n){var a={xAxis:[],yAxis:[]},b=n.getBBox(),c=b.x-O,d=b.y-J;k&&(o(xa, -function(e){if(e.options.zoomEnabled!==!1){var f=e.translate,g=e.isXAxis,h=U?!g:g,i=f(h?c:la-d-b.height,!0,0,0,1),f=f(h?c+b.width:la-d,!0,0,0,1);a[g?"xAxis":"yAxis"].push({axis:e,min:Ua(i,f),max:W(i,f)})}}),aa(m,"selection",a,zb));n=n.destroy()}P(D,{cursor:"auto"});m.mouseIsDown=Da=k=!1;Qa(x,Ga?"touchend":"mouseup",f)}function g(a){var b=s(a.pageX)?a.pageX:a.page.x,a=s(a.pageX)?a.pageY:a.page.y;ya&&!Db(b-ya.left-O,a-ya.top-J)&&e()}function h(){e();ya=null}var i,j,k,n,l=Fa?"":q.zoomType,t=/x/.test(l), -r=/y/.test(l),y=t&&!U||r&&U,p=r&&!U||t&&U;if(!db)m.trackerGroup=db=I.g("tracker").attr({zIndex:9}).add();if(a.enabled)m.tooltip=vb=d(a),Bb=setInterval(function(){lb&&lb()},32);(function(){D.onmousedown=function(a){a=b(a);!Ga&&a.preventDefault&&a.preventDefault();m.mouseIsDown=Da=!0;m.mouseDownX=i=a.chartX;j=a.chartY;ha(x,Ga?"touchend":"mouseup",f)};var d=function(c){if(!c||!(c.touches&&c.touches.length>1)){c=b(c);if(!Ga)c.returnValue=!1;var d=c.chartX,e=c.chartY,f=!Db(d-O,e-J);Ga&&c.type==="touchstart"&& -(A(c.target,"isTracker")?m.runTrackerClick||c.preventDefault():!kb&&!f&&c.preventDefault());f&&(d<O?d=O:d>O+ka&&(d=O+ka),e<J?e=J:e>J+la&&(e=J+la));if(Da&&c.type!=="touchstart"){if(k=Math.sqrt(Math.pow(i-d,2)+Math.pow(j-e,2)),k>10){var g=Db(i-O,j-J);if(Nb&&(t||r)&&g)n||(n=I.rect(O,J,y?1:ka,p?1:la,0).attr({fill:q.selectionMarkerFill||"rgba(69,114,167,0.25)",zIndex:7}).add());n&&y&&(c=d-i,n.attr({width:Ba(c),x:(c>0?0:c)+i}));n&&p&&(e-=j,n.attr({height:Ba(e),y:(e>0?0:e)+j}));g&&!n&&q.panning&&m.pan(d)}}else if(!f){var h, -d=m.hoverPoint,e=m.hoverSeries,l,o,g=sa,R=U?c.chartY:c.chartX-O;if(vb&&a.shared&&(!e||!e.noSharedTooltip)){h=[];l=Q.length;for(o=0;o<l;o++)if(Q[o].visible&&Q[o].options.enableMouseTracking!==!1&&!Q[o].noSharedTooltip&&Q[o].tooltipPoints.length)c=Q[o].tooltipPoints[R],c._dist=Ba(R-c.plotX),g=Ua(g,c._dist),h.push(c);for(l=h.length;l--;)h[l]._dist>g&&h.splice(l,1);if(h.length&&h[0].plotX!==ob)vb.refresh(h),ob=h[0].plotX}if(e&&e.tracker&&(c=e.tooltipPoints[R])&&c!==d)c.onMouseOver()}return f||!Nb}};D.onmousemove= -d;ha(D,"mouseleave",h);ha(x,"mousemove",g);D.ontouchstart=function(a){if(t||r)D.onmousedown(a);d(a)};D.ontouchmove=d;D.ontouchend=function(){k&&e()};D.onclick=function(a){var d=m.hoverPoint,a=b(a);a.cancelBubble=!0;if(!k)if(d&&(A(a.target,"isTracker")||A(a.target.parentNode,"isTracker"))){var e=d.plotX,f=d.plotY;L(d,{pageX:ya.left+O+(U?ka-f:e),pageY:ya.top+J+(U?la-e:f)});aa(d.series,"click",L(a,{point:d}));d.firePointEvent("click",a)}else L(a,c(a)),Db(a.chartX-O,a.chartY-J)&&aa(m,"click",a);k=!1}})(); -L(this,{zoomX:t,zoomY:r,resetTracker:e,normalizeMouseEvent:b,destroy:function(){if(m.trackerGroup)m.trackerGroup=db=m.trackerGroup.destroy();Qa(D,"mouseleave",h);Qa(x,"mousemove",g);D.onclick=D.onmousedown=D.onmousemove=D.ontouchstart=D.ontouchend=D.ontouchmove=null}})}function f(a){var b=a.type||q.type||q.defaultSeriesType,c=Ha[b],d=m.hasRendered;if(d)if(U&&b==="column")c=Ha.bar;else if(!U&&b==="bar")c=Ha.column;b=new c;b.init(m,a);!d&&b.inverted&&(U=!0);if(b.isCartesian)Nb=b.isCartesian;Q.push(b); -return b}function g(){q.alignTicks!==!1&&o(xa,function(a){a.adjustTickAmount()});gb=null}function h(a){var b=m.isDirtyLegend,c,d=m.isDirtyBox,e=Q.length,f=e,h=m.clipRect;for(Kb(a,m);f--;)if(a=Q[f],a.isDirty&&a.options.stacking){c=!0;break}if(c)for(f=e;f--;)if(a=Q[f],a.options.stacking)a.isDirty=!0;o(Q,function(a){a.isDirty&&a.options.legendType==="point"&&(b=!0)});if(b&&Xa.renderLegend)Xa.renderLegend(),m.isDirtyLegend=!1;Nb&&(La||(gb=null,o(xa,function(a){a.setScale()})),g(),Wb(),o(xa,function(a){if(a.isDirtyExtremes)a.isDirtyExtremes= -!1,aa(a,"afterSetExtremes",a.getExtremes());if(a.isDirty||d)a.redraw(),d=!0}));d&&(qb(),h&&(Ob(h),h.animate({width:m.plotSizeX,height:m.plotSizeY+1})));o(Q,function(a){a.isDirty&&a.visible&&(!a.isCartesian||a.xAxis)&&a.redraw()});ub&&ub.resetTracker&&ub.resetTracker();I.draw();aa(m,"redraw")}function i(){var a=v.xAxis||{},b=v.yAxis||{},a=Hb(a);o(a,function(a,b){a.index=b;a.isX=!0});b=Hb(b);o(b,function(a,b){a.index=b});a=a.concat(b);o(a,function(a){new c(a)});g()}function k(){var a=Ea.lang,b=q.resetZoomButton, -c=b.theme,d=c.states,e=b.relativeTo==="chart"?null:{x:O,y:J,width:ka,height:la};m.resetZoomButton=I.button(a.resetZoom,null,null,Fb,c,d&&d.hover).attr({align:b.position.align,title:a.resetZoomTitle}).add().align(b.position,!1,e)}function j(a,b){$=K(v.title,a);ja=K(v.subtitle,b);o([["title",a,$],["subtitle",b,ja]],function(a){var b=a[0],c=m[b],d=a[1],a=a[2];c&&d&&(c=c.destroy());a&&a.text&&!c&&(m[b]=I.text(a.text,0,0,a.useHTML).attr({align:a.align,"class":Ia+b,zIndex:a.zIndex||4}).css(a.style).add().align(a, -!1,ib))})}function l(){Ja=q.renderTo;na=Ia+lc++;Ab(Ja)&&(Ja=x.getElementById(Ja));Ja||jc(13,!0);Ja.innerHTML="";Ja.offsetWidth||(C=Ja.cloneNode(0),P(C,{position:wb,top:"-9999px",display:""}),x.body.appendChild(C));za=(C||Ja).offsetWidth;Ca=(C||Ja).offsetHeight;m.chartWidth=sa=q.width||za||600;m.chartHeight=ra=q.height||(Ca>19?Ca:400);m.container=D=Aa(Ra,{className:Ia+"container"+(q.className?" "+q.className:""),id:na},L({position:mc,overflow:ab,width:sa+ga,height:ra+ga,textAlign:"left",lineHeight:"normal"}, -q.style),C||Ja);m.renderer=I=q.forExport?new Eb(D,sa,ra,!0):new Xb(D,sa,ra);Fa&&I.create(m,D,sa,ra);var a,b;Bc&&D.getBoundingClientRect&&(a=function(){P(D,{left:0,top:0});b=D.getBoundingClientRect();P(D,{left:-(b.left-S(b.left))+ga,top:-(b.top-S(b.top))+ga})},a(),ha(ca,"resize",a),ha(m,"destroy",function(){Qa(ca,"resize",a)}))}function n(){function a(c){var d=q.width||Ja.offsetWidth,e=q.height||Ja.offsetHeight,c=c?c.target:ca;if(d&&e&&(c===ca||c===x)){if(d!==za||e!==Ca)clearTimeout(b),b=setTimeout(function(){tb(d, -e,!1)},100);za=d;Ca=e}}var b;ha(ca,"resize",a);ha(m,"destroy",function(){Qa(ca,"resize",a)})}function t(){m&&aa(m,"endResize",null,function(){La-=1})}function r(){for(var a=U||q.inverted||q.type==="bar"||q.defaultSeriesType==="bar",b=v.series,c=b&&b.length;!a&&c--;)b[c].type==="bar"&&(a=!0);m.inverted=U=a}function Z(){var a=v.labels,b=v.credits,c;j();Xa=m.legend=new Rb;o(xa,function(a){a.setScale()});Wb();o(xa,function(a){a.setTickPositions(!0)});g();Wb();qb();Nb&&o(xa,function(a){a.render()});if(!m.seriesGroup)m.seriesGroup= -I.g("series-group").attr({zIndex:3}).add();o(Q,function(a){a.translate();a.setTooltipPoints();a.render()});a.items&&o(a.items,function(){var b=L(a.style,this.style),c=S(b.left)+O,d=S(b.top)+J+12;delete b.left;delete b.top;I.text(this.html,c,d).attr({zIndex:2}).css(b).add()});if(b.enabled&&!m.credits)c=b.href,m.credits=I.text(b.text,0,0).on("click",function(){if(c)location.href=c}).attr({align:b.position.align,zIndex:8}).css(b.style).add().align(b.position);m.hasRendered=!0}function V(){if(!Pb&&ca== -ca.top&&x.readyState!=="complete"||Fa&&!ca.canvg)Fa?Cc.push(V,v.global.canvasToolsURL):x.attachEvent("onreadystatechange",function(){x.detachEvent("onreadystatechange",V);x.readyState==="complete"&&V()});else{l();aa(m,"init");if(Highcharts.RangeSelector&&v.rangeSelector.enabled)m.rangeSelector=new Highcharts.RangeSelector(m);rb();sb();r();i();o(v.series||[],function(a){f(a)});if(Highcharts.Scroller&&(v.navigator.enabled||v.scrollbar.enabled))m.scroller=new Highcharts.Scroller(m);m.render=Z;m.tracker= -ub=new e(v.tooltip);Z();I.draw();b&&b.apply(m,[m]);o(m.callbacks,function(a){a.apply(m,[m])});C&&(Ja.appendChild(D),Tb(C));aa(m,"load")}}var v,y=a.series;a.series=null;v=K(Ea,a);v.series=a.series=y;var q=v.chart,y=q.margin,y=mb(y)?y:[y,y,y,y],T=p(q.marginTop,y[0]),w=p(q.marginRight,y[1]),E=p(q.marginBottom,y[2]),bb=p(q.marginLeft,y[3]),ia=q.spacingTop,ua=q.spacingRight,R=q.spacingBottom,jb=q.spacingLeft,ib,$,ja,J,ba,M,O,pa,Ja,C,D,na,za,Ca,sa,ra,$a,Za,ma,Na,Sa,da,m=this,kb=(y=q.events)&&!!y.click, -va,Db,vb,Da,xb,pb,Ya,la,ka,ub,db,Xa,Wa,yb,ya,Nb=q.showAxes,La=0,xa=[],gb,Q=[],U,I,lb,Bb,ob,qb,Wb,rb,sb,tb,zb,Fb,Rb=function(){function a(b,c){var d=b.legendItem,e=b.legendLine,g=b.legendSymbol,h=q.color,i=c?f.itemStyle.color:h,h=c?b.color:h;d&&d.css({fill:i});e&&e.attr({stroke:h});g&&g.attr({stroke:h,fill:h})}function b(a){var c=a.legendItem,d=a.legendLine,e=a._legendItemPos,f=e[0],e=e[1],g=a.legendSymbol,a=a.checkbox;c&&c.attr({x:r?f:Wa-f,y:e});d&&d.translate(r?f:Wa-f,e-4);g&&(c=f+g.xOff,g.attr({x:r? -c:Wa-c,y:e+g.yOff}));if(a)a.x=f,a.y=e}function c(){o(j,function(a){var b=a.checkbox,c=A.alignAttr;b&&P(b,{left:c.translateX+a.legendItemWidth+b.x-40+ga,top:c.translateY+b.y-11+ga})})}function d(b){var c,e,j,k,m=b.legendItem;k=b.series||b;var o=k.options,v=o&&o.borderWidth||0;if(!m){k=/^(bar|pie|area|column)$/.test(k.type);b.legendItem=m=I.text(f.labelFormatter.call(b),0,0,f.useHTML).css(b.visible?n:q).on("mouseover",function(){b.setState(ta);m.css(l)}).on("mouseout",function(){m.css(b.visible?n:q); -b.setState()}).on("click",function(){var a=function(){b.setVisible()};b.firePointEvent?b.firePointEvent("legendItemClick",null,a):aa(b,"legendItemClick",null,a)}).attr({align:r?"left":"right",zIndex:2}).add(A);if(!k&&o&&o.lineWidth){var u={"stroke-width":o.lineWidth,zIndex:2};if(o.dashStyle)u.dashstyle=o.dashStyle;b.legendLine=I.path([wa,(-h-i)*(r?1:-1),0,fa,-i*(r?1:-1),0]).attr(u).add(A)}if(k)j=I.rect(c=-h-i,e=-11,h,12,2).attr({zIndex:3}).add(A),r||(c+=h);else if(o&&o.marker&&o.marker.enabled)j= -o.marker.radius,j=I.symbol(b.symbol,c=-h/2-i-j,e=-4-j,2*j,2*j).attr(b.pointAttr[Ka]).attr({zIndex:3}).add(A),r||(c+=h/2);if(j)j.xOff=c+v%2/2,j.yOff=e+v%2/2;b.legendSymbol=j;a(b,b.visible);if(o&&o.showCheckbox)b.checkbox=Aa("input",{type:"checkbox",checked:b.selected,defaultChecked:b.selected},f.itemCheckboxStyle,D),ha(b.checkbox,"click",function(a){aa(b,"checkboxClick",{checked:a.target.checked},function(){b.select()})})}c=m.getBBox();e=b.legendItemWidth=f.itemWidth||h+i+c.width+t;w=c.height;if(g&& -s-V+e>(J||sa-2*t-V))s=V,z+=y+w+p;!g&&z+f.y+w>ra-ia-R&&(z=T,s+=Z,Z=0);Z=W(Z,e);x=W(x,z+p);b._legendItemPos=[s,z];g?s+=e:z+=y+w+p;C=J||W(s-V+(g?0:e),C)}function e(){s=V;z=T;x=C=0;A||(A=I.g("legend").attr({zIndex:7}).add());j=[];o(M,function(a){var b=a.options;b.showInLegend&&(j=j.concat(a.legendItems||(b.legendType==="point"?a.data:a)))});Mc(j,function(a,b){return(a.options.legendIndex||0)-(b.options.legendIndex||0)});jb&&j.reverse();o(j,d);Wa=J||C;yb=x-v+w;if(E||bb){Wa+=2*t;yb+=2*t;if(ua){if(Wa>0&& -yb>0)ua[ua.isNew?"attr":"animate"](ua.crisp(null,null,null,Wa,yb)),ua.isNew=!1}else ua=I.rect(0,0,Wa,yb,f.borderRadius,E||0).attr({stroke:f.borderColor,"stroke-width":E||0,fill:bb||Ma}).add(A).shadow(f.shadow),ua.isNew=!0;ua[j.length?"show":"hide"]()}o(j,b);for(var a=["left","right","top","bottom"],g,h=4;h--;)g=a[h],k[g]&&k[g]!=="auto"&&(f[h<2?"align":"verticalAlign"]=g,f[h<2?"x":"y"]=S(k[g])*(h%2?-1:1));j.length&&A.align(L(f,{width:Wa,height:yb}),!0,ib);La||c()}var f=m.options.legend;if(f.enabled){var g= -f.layout==="horizontal",h=f.symbolWidth,i=f.symbolPadding,j,k=f.style,n=f.itemStyle,l=f.itemHoverStyle,q=K(n,f.itemHiddenStyle),t=f.padding||S(k.padding),r=!f.rtl,y=f.itemMarginTop||0,p=f.itemMarginBottom||0,v=18,Z=0,V=4+t+h+i,T=t+y+v-5,s,z,x,w=0,ua,E=f.borderWidth,bb=f.backgroundColor,A,C,J=f.width,M=m.series,jb=f.reversed;e();ha(m,"endResize",c);return{colorizeItem:a,destroyItem:function(a){var b=a.checkbox;o(["legendItem","legendLine","legendSymbol"],function(b){a[b]&&a[b].destroy()});b&&Tb(a.checkbox)}, -renderLegend:e,destroy:function(){ua&&(ua=ua.destroy());A&&(A=A.destroy())}}}};Db=function(a,b){return a>=0&&a<=ka&&b>=0&&b<=la};Fb=function(){var a=m.resetZoomButton;aa(m,"selection",{resetSelection:!0},zb);if(a)m.resetZoomButton=a.destroy()};zb=function(a){var b;m.resetZoomEnabled!==!1&&!m.resetZoomButton&&k();!a||a.resetSelection?o(xa,function(a){a.options.zoomEnabled!==!1&&(a.setExtremes(null,null,!1),b=!0)}):o(a.xAxis.concat(a.yAxis),function(a){var c=a.axis;if(m.tracker[c.isXAxis?"zoomX":"zoomY"])c.setExtremes(a.min, -a.max,!1),b=!0});b&&h(p(q.animation,m.pointCount<100))};m.pan=function(a){var b=m.xAxis[0],c=m.mouseDownX,d=b.pointRange/2,e=b.getExtremes(),f=b.translate(c-a,!0)+d,c=b.translate(c+ka-a,!0)-d;(d=m.hoverPoints)&&o(d,function(a){a.setState()});f>Ua(e.dataMin,e.min)&&c<W(e.dataMax,e.max)&&b.setExtremes(f,c,!0,!1);m.mouseDownX=a;P(D,{cursor:"move"})};Wb=function(){var a=v.legend,b=p(a.margin,10),c=a.x,d=a.y,e=a.align,f=a.verticalAlign,g;rb();if((m.title||m.subtitle)&&!s(T))(g=W(m.title&&!$.floating&& -!$.verticalAlign&&$.y||0,m.subtitle&&!ja.floating&&!ja.verticalAlign&&ja.y||0))&&(J=W(J,g+p($.margin,15)+ia));a.enabled&&!a.floating&&(e==="right"?s(w)||(ba=W(ba,Wa-c+b+ua)):e==="left"?s(bb)||(O=W(O,Wa+c+b+jb)):f==="top"?s(T)||(J=W(J,yb+d+b+ia)):f==="bottom"&&(s(E)||(M=W(M,yb-d+b+R))));m.extraBottomMargin&&(M+=m.extraBottomMargin);m.extraTopMargin&&(J+=m.extraTopMargin);Nb&&o(xa,function(a){a.getOffset()});s(bb)||(O+=pa[3]);s(T)||(J+=pa[0]);s(E)||(M+=pa[2]);s(w)||(ba+=pa[1]);sb()};tb=function(a,b, -c){var d=m.title,e=m.subtitle;La+=1;Kb(c,m);Za=ra;$a=sa;if(s(a))m.chartWidth=sa=z(a);if(s(b))m.chartHeight=ra=z(b);P(D,{width:sa+ga,height:ra+ga});I.setSize(sa,ra,c);ka=sa-O-ba;la=ra-J-M;gb=null;o(xa,function(a){a.isDirty=!0;a.setScale()});o(Q,function(a){a.isDirty=!0});m.isDirtyLegend=!0;m.isDirtyBox=!0;Wb();d&&d.align(null,null,ib);e&&e.align(null,null,ib);h(c);Za=null;aa(m,"resize");Ub===!1?t():setTimeout(t,Ub&&Ub.duration||500)};sb=function(){m.plotLeft=O=z(O);m.plotTop=J=z(J);m.plotWidth=ka= -z(sa-O-ba);m.plotHeight=la=z(ra-J-M);m.plotSizeX=U?la:ka;m.plotSizeY=U?ka:la;ib={x:jb,y:ia,width:sa-jb-ua,height:ra-ia-R};o(xa,function(a){a.setAxisSize();a.setAxisTranslation()})};rb=function(){J=p(T,ia);ba=p(w,ua);M=p(E,R);O=p(bb,jb);pa=[0,0,0,0]};qb=function(){var a=q.borderWidth||0,b=q.backgroundColor,c=q.plotBackgroundColor,d=q.plotBackgroundImage,e,f={x:O,y:J,width:ka,height:la};e=a+(q.shadow?8:0);if(a||b)ma?ma.animate(ma.crisp(null,null,null,sa-e,ra-e)):ma=I.rect(e/2,e/2,sa-e,ra-e,q.borderRadius, -a).attr({stroke:q.borderColor,"stroke-width":a,fill:b||Ma}).add().shadow(q.shadow);c&&(Na?Na.animate(f):Na=I.rect(O,J,ka,la,0).attr({fill:c}).add().shadow(q.plotShadow));d&&(Sa?Sa.animate(f):Sa=I.image(d,O,J,ka,la).add());q.plotBorderWidth&&(da?da.animate(da.crisp(null,O,J,ka,la)):da=I.rect(O,J,ka,la,0,q.plotBorderWidth).attr({stroke:q.plotBorderColor,"stroke-width":q.plotBorderWidth,zIndex:4}).add());m.isDirtyBox=!1};q.reflow!==!1&&ha(m,"load",n);if(y)for(va in y)ha(m,va,y[va]);m.options=v;m.series= -Q;m.xAxis=[];m.yAxis=[];m.addSeries=function(a,b,c){var d;a&&(Kb(c,m),b=p(b,!0),aa(m,"addSeries",{options:a},function(){d=f(a);d.isDirty=!0;m.isDirtyLegend=!0;b&&m.redraw()}));return d};m.animation=Fa?!1:p(q.animation,!0);m.Axis=c;m.destroy=function(){var a,b=D&&D.parentNode;if(m!==null){aa(m,"destroy");Qa(m);for(a=xa.length;a--;)xa[a]=xa[a].destroy();for(a=Q.length;a--;)Q[a]=Q[a].destroy();o("title,subtitle,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector".split(","),function(a){var b= -m[a];b&&(m[a]=b.destroy())});o([ma,da,Na,Xa,vb,I,ub],function(a){a&&a.destroy&&a.destroy()});ma=da=Na=Xa=vb=I=ub=null;if(D)D.innerHTML="",Qa(D),b&&Tb(D),D=null;clearInterval(Bb);for(a in m)delete m[a];v=m=null}};m.get=function(a){var b,c,d;for(b=0;b<xa.length;b++)if(xa[b].options.id===a)return xa[b];for(b=0;b<Q.length;b++)if(Q[b].options.id===a)return Q[b];for(b=0;b<Q.length;b++){d=Q[b].points||[];for(c=0;c<d.length;c++)if(d[c].id===a)return d[c]}return null};m.getSelectedPoints=function(){var a= -[];o(Q,function(b){a=a.concat(nc(b.points,function(a){return a.selected}))});return a};m.getSelectedSeries=function(){return nc(Q,function(a){return a.selected})};m.hideLoading=function(){xb&&cc(xb,{opacity:0},{duration:v.loading.hideDuration||100,complete:function(){P(xb,{display:Ma})}});Ya=!1};m.initSeries=f;m.isInsidePlot=Db;m.redraw=h;m.setSize=tb;m.setTitle=j;m.showLoading=function(a){var b=v.loading;xb||(xb=Aa(Ra,{className:Ia+"loading"},L(b.style,{left:O+ga,top:J+ga,width:ka+ga,height:la+ga, -zIndex:10,display:Ma}),D),pb=Aa("span",null,b.labelStyle,xb));pb.innerHTML=a||v.lang.loading;Ya||(P(xb,{opacity:0,display:""}),cc(xb,{opacity:b.style.opacity},{duration:b.showDuration||0}),Ya=!0)};m.pointCount=0;m.counters=new tc;V()}var X,x=document,ca=window,oa=Math,z=oa.round,Ta=oa.floor,Yb=oa.ceil,W=oa.max,Ua=oa.min,Ba=oa.abs,ja=oa.cos,C=oa.sin,da=oa.PI,Dc=da*2/360,kb=navigator.userAgent,Qb=/msie/i.test(kb)&&!ca.opera,Xa=x.documentMode===8,Ec=/AppleWebKit/.test(kb),Bc=/Firefox/.test(kb),Pb=!!x.createElementNS&& -!!x.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect,Qc=Bc&&parseInt(kb.split("Firefox/")[1],10)<4,Fa=!Pb&&!Qb&&!!x.createElement("canvas").getContext,Xb,Ga=x.documentElement.ontouchstart!==X,Fc={},lc=0,tb,Ea,ac,Ub,La,E,Ra="div",wb="absolute",mc="relative",ab="hidden",Ia="highcharts-",eb="visible",ga="px",Ma="none",wa="M",fa="L",Gc="rgba(192,192,192,"+(Pb?1.0E-6:0.0020)+")",Ka="",ta="hover",Rb="millisecond",ob="second",pb="minute",va="hour",Ca="day",Ya="week",Da="month",Za="year", -sb,fc,gc,ic,db,qb,rb,pc,qc,hc,rc,sc,w=ca.HighchartsAdapter,na=w||{},Hc=na.getScript,o=na.each,nc=na.grep,Ac=na.offset,Vb=na.map,K=na.merge,ha=na.addEvent,Qa=na.removeEvent,aa=na.fireEvent,cc=na.animate,Ob=na.stop,Ha={};ca.Highcharts={};ac=function(a,b,c){if(!s(b)||isNaN(b))return"Invalid date";var a=p(a,"%Y-%m-%d %H:%M:%S"),d=new Date(b),e,f=d[gc](),g=d[ic](),h=d[db](),i=d[qb](),k=d[rb](),j=Ea.lang,l=j.weekdays,b={a:l[g].substr(0,3),A:l[g],d:Na(h),e:h,b:j.shortMonths[i],B:j.months[i],m:Na(i+1),y:k.toString().substr(2, -2),Y:k,H:Na(f),I:Na(f%12||12),l:f%12||12,M:Na(d[fc]()),p:f<12?"AM":"PM",P:f<12?"am":"pm",S:Na(d.getSeconds()),L:Na(z(b%1E3),3)};for(e in b)a=a.replace("%"+e,b[e]);return c?a.substr(0,1).toUpperCase()+a.substr(1):a};tc.prototype={wrapColor:function(a){if(this.color>=a)this.color=0},wrapSymbol:function(a){if(this.symbol>=a)this.symbol=0}};E=za(Rb,1,ob,1E3,pb,6E4,va,36E5,Ca,864E5,Ya,6048E5,Da,2592E6,Za,31556952E3);La={init:function(a,b,c){var b=b||"",d=a.shift,e=b.indexOf("C")>-1,f=e?7:3,g,b=b.split(" "), -c=[].concat(c),h,i,k=function(a){for(g=a.length;g--;)a[g]===wa&&a.splice(g+1,0,a[g+1],a[g+2],a[g+1],a[g+2])};e&&(k(b),k(c));a.isArea&&(h=b.splice(b.length-6,6),i=c.splice(c.length-6,6));d===1&&(c=[].concat(c).splice(0,f).concat(c));a.shift=0;if(b.length)for(a=c.length;b.length<a;)d=[].concat(b).splice(b.length-f,f),e&&(d[f-6]=d[f-2],d[f-5]=d[f-1]),b=b.concat(d);h&&(b=b.concat(h),c=c.concat(i));return[b,c]},step:function(a,b,c,d){var e=[],f=a.length;if(c===1)e=d;else if(f===b.length&&c<1)for(;f--;)d= -parseFloat(a[f]),e[f]=isNaN(d)?a[f]:c*parseFloat(b[f]-d)+d;else e=b;return e}};w&&w.init&&w.init(La);if(!w&&ca.jQuery){var ba=jQuery,Hc=ba.getScript,o=function(a,b){for(var c=0,d=a.length;c<d;c++)if(b.call(a[c],a[c],c,a)===!1)return c},nc=ba.grep,Vb=function(a,b){for(var c=[],d=0,e=a.length;d<e;d++)c[d]=b.call(a[d],a[d],d,a);return c},K=function(){var a=arguments;return ba.extend(!0,null,a[0],a[1],a[2],a[3])},Ac=function(a){return ba(a).offset()},ha=function(a,b,c){ba(a).bind(b,c)},Qa=function(a, -b,c){var d=x.removeEventListener?"removeEventListener":"detachEvent";x[d]&&!a[d]&&(a[d]=function(){});ba(a).unbind(b,c)},aa=function(a,b,c,d){var e=ba.Event(b),f="detached"+b,g;L(e,c);a[b]&&(a[f]=a[b],a[b]=null);o(["preventDefault","stopPropagation"],function(a){var b=e[a];e[a]=function(){try{b.call(e)}catch(c){a==="preventDefault"&&(g=!0)}}});ba(a).trigger(e);a[f]&&(a[b]=a[f],a[f]=null);d&&!e.isDefaultPrevented()&&!g&&d(e)},cc=function(a,b,c){var d=ba(a);if(b.d)a.toD=b.d,b.d=1;d.stop();d.animate(b, -c)},Ob=function(a){ba(a).stop()};ba.extend(ba.easing,{easeOutQuad:function(a,b,c,d,e){return-d*(b/=e)*(b-2)+c}});var Ic=jQuery.fx,Jc=Ic.step;o(["cur","_default","width","height"],function(a,b){var c=b?Jc:Ic.prototype,d=c[a],e;d&&(c[a]=function(a){a=b?a:this;e=a.elem;return e.attr?e.attr(a.prop,a.now):d.apply(this,arguments)})});Jc.d=function(a){var b=a.elem;if(!a.started){var c=La.init(b,b.d,b.toD);a.start=c[0];a.end=c[1];a.started=!0}b.attr("d",La.step(a.start,a.end,a.pos,b.toD))}}w={enabled:!0, -align:"center",x:0,y:15,style:{color:"#666",fontSize:"11px",lineHeight:"14px"}};Ea={colors:"#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","),symbols:["circle","diamond","square","triangle","triangle-down"],lang:{loading:"Loading...",months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),shortMonths:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","), -decimalPoint:".",resetZoom:"Reset zoom",resetZoomTitle:"Reset zoom level 1:1",thousandsSep:","},global:{useUTC:!0,canvasToolsURL:"http://code.highcharts.com/2.2.1/modules/canvas-tools.js"},chart:{borderColor:"#4572A7",borderRadius:5,defaultSeriesType:"line",ignoreHiddenSeries:!0,spacingTop:10,spacingRight:10,spacingBottom:15,spacingLeft:10,style:{fontFamily:'"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',fontSize:"12px"},backgroundColor:"#FFFFFF",plotBorderColor:"#C0C0C0", -resetZoomButton:{theme:{zIndex:20},position:{align:"right",x:-10,y:10}}},title:{text:"Chart title",align:"center",y:15,style:{color:"#3E576F",fontSize:"16px"}},subtitle:{text:"",align:"center",y:30,style:{color:"#6D869F"}},plotOptions:{line:{allowPointSelect:!1,showCheckbox:!1,animation:{duration:1E3},events:{},lineWidth:2,shadow:!0,marker:{enabled:!0,lineWidth:0,radius:4,lineColor:"#FFFFFF",states:{hover:{},select:{fillColor:"#FFFFFF",lineColor:"#000000",lineWidth:2}}},point:{events:{}},dataLabels:K(w, -{enabled:!1,y:-6,formatter:function(){return this.y}}),cropThreshold:300,pointRange:0,showInLegend:!0,states:{hover:{marker:{}},select:{marker:{}}},stickyTracking:!0}},labels:{style:{position:wb,color:"#3E576F"}},legend:{enabled:!0,align:"center",layout:"horizontal",labelFormatter:function(){return this.name},borderWidth:1,borderColor:"#909090",borderRadius:5,shadow:!1,style:{padding:"5px"},itemStyle:{cursor:"pointer",color:"#3E576F"},itemHoverStyle:{color:"#000000"},itemHiddenStyle:{color:"#C0C0C0"}, -itemCheckboxStyle:{position:wb,width:"13px",height:"13px"},symbolWidth:16,symbolPadding:5,verticalAlign:"bottom",x:0,y:0},loading:{labelStyle:{fontWeight:"bold",position:mc,top:"1em"},style:{position:wb,backgroundColor:"white",opacity:0.5,textAlign:"center"}},tooltip:{enabled:!0,backgroundColor:"rgba(255, 255, 255, .85)",borderWidth:2,borderRadius:5,headerFormat:'<span style="font-size: 10px">{point.key}</span><br/>',pointFormat:'<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>', -shadow:!0,shared:Fa,snap:Ga?25:10,style:{color:"#333333",fontSize:"12px",padding:"5px",whiteSpace:"nowrap"}},credits:{enabled:!0,text:"Highcharts.com",href:"http://www.highcharts.com",position:{align:"right",x:-10,verticalAlign:"bottom",y:-5},style:{cursor:"pointer",color:"#909090",fontSize:"10px"}}};var $b={dateTimeLabelFormats:za(Rb,"%H:%M:%S.%L",ob,"%H:%M:%S",pb,"%H:%M",va,"%H:%M",Ca,"%e. %b",Ya,"%e. %b",Da,"%b '%y",Za,"%Y"),endOnTick:!1,gridLineColor:"#C0C0C0",labels:w,lineColor:"#C0D0E0",lineWidth:1, -max:null,min:null,minPadding:0.01,maxPadding:0.01,minorGridLineColor:"#E0E0E0",minorGridLineWidth:1,minorTickColor:"#A0A0A0",minorTickLength:2,minorTickPosition:"outside",startOfWeek:1,startOnTick:!1,tickColor:"#C0D0E0",tickLength:5,tickmarkPlacement:"between",tickPixelInterval:100,tickPosition:"outside",tickWidth:1,title:{align:"middle",style:{color:"#6D869F",fontWeight:"bold"}},type:"linear"},kc=K($b,{endOnTick:!0,gridLineWidth:1,tickPixelInterval:72,showLastLabel:!0,labels:{align:"right",x:-8, -y:3},lineWidth:0,maxPadding:0.05,minPadding:0.05,startOnTick:!0,tickWidth:0,title:{rotation:270,text:"Y-values"},stackLabels:{enabled:!1,formatter:function(){return this.total},style:w.style}}),Pc={labels:{align:"right",x:-8,y:null},title:{rotation:270}},Oc={labels:{align:"left",x:8,y:null},title:{rotation:90}},zc={labels:{align:"center",x:0,y:14,overflow:"justify"},title:{rotation:0}},Nc=K(zc,{labels:{y:-5,overflow:"justify"}}),M=Ea.plotOptions,w=M.line;M.spline=K(w);M.scatter=K(w,{lineWidth:0,states:{hover:{lineWidth:0}}, -tooltip:{headerFormat:'<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',pointFormat:"x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"}});M.area=K(w,{threshold:0});M.areaspline=K(M.area);M.column=K(w,{borderColor:"#FFFFFF",borderWidth:1,borderRadius:0,groupPadding:0.2,marker:null,pointPadding:0.1,minPointLength:0,cropThreshold:50,pointRange:null,states:{hover:{brightness:0.1,shadow:!1},select:{color:"#C0C0C0",borderColor:"#000000",shadow:!1}},dataLabels:{y:null,verticalAlign:null}, -threshold:0});M.bar=K(M.column,{dataLabels:{align:"left",x:5,y:null,verticalAlign:"middle"}});M.pie=K(w,{borderColor:"#FFFFFF",borderWidth:1,center:["50%","50%"],colorByPoint:!0,dataLabels:{distance:30,enabled:!0,formatter:function(){return this.point.name},y:5},legendType:"point",marker:null,size:"75%",showInLegend:!1,slicedOffset:10,states:{hover:{brightness:0.1,shadow:!1}}});vc();var ma=function(a){var b=[],c;(function(a){(c=/rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a))? -b=[S(c[1]),S(c[2]),S(c[3]),parseFloat(c[4],10)]:(c=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a))&&(b=[S(c[1],16),S(c[2],16),S(c[3],16),1])})(a);return{get:function(c){return b&&!isNaN(b[0])?c==="rgb"?"rgb("+b[0]+","+b[1]+","+b[2]+")":c==="a"?b[3]:"rgba("+b.join(",")+")":a},brighten:function(a){if(Bb(a)&&a!==0){var c;for(c=0;c<3;c++)b[c]+=S(a*255),b[c]<0&&(b[c]=0),b[c]>255&&(b[c]=255)}return this},setOpacity:function(a){b[3]=a;return this}}};Sa.prototype={init:function(a,b){this.element= -b==="span"?Aa(b):x.createElementNS("http://www.w3.org/2000/svg",b);this.renderer=a;this.attrSetters={}},animate:function(a,b,c){b=p(b,Ub,!0);Ob(this);if(b){b=K(b);if(c)b.complete=c;cc(this,a,b)}else this.attr(a),c&&c()},attr:function(a,b){var c,d,e,f,g=this.element,h=g.nodeName,i=this.renderer,k,j=this.attrSetters,l=this.shadows,n,o=this;Ab(a)&&s(b)&&(c=a,a={},a[c]=b);if(Ab(a))c=a,h==="circle"?c={x:"cx",y:"cy"}[c]||c:c==="strokeWidth"&&(c="stroke-width"),o=A(g,c)||this[c]||0,c!=="d"&&c!=="visibility"&& -(o=parseFloat(o));else for(c in a)if(k=!1,d=a[c],e=j[c]&&j[c](d,c),e!==!1){e!==X&&(d=e);if(c==="d")d&&d.join&&(d=d.join(" ")),/(NaN| {2}|^$)/.test(d)&&(d="M 0 0"),this.d=d;else if(c==="x"&&h==="text"){for(e=0;e<g.childNodes.length;e++)f=g.childNodes[e],A(f,"x")===A(g,"x")&&A(f,"x",d);this.rotation&&A(g,"transform","rotate("+this.rotation+" "+d+" "+S(a.y||A(g,"y"))+")")}else if(c==="fill")d=i.color(d,g,c);else if(h==="circle"&&(c==="x"||c==="y"))c={x:"cx",y:"cy"}[c]||c;else if(h==="rect"&&c==="r")A(g, -{rx:d,ry:d}),k=!0;else if(c==="translateX"||c==="translateY"||c==="rotation"||c==="verticalAlign")this[c]=d,this.updateTransform(),k=!0;else if(c==="stroke")d=i.color(d,g,c);else if(c==="dashstyle")if(c="stroke-dasharray",d=d&&d.toLowerCase(),d==="solid")d=Ma;else{if(d){d=d.replace("shortdashdotdot","3,1,1,1,1,1,").replace("shortdashdot","3,1,1,1").replace("shortdot","1,1,").replace("shortdash","3,1,").replace("longdash","8,3,").replace(/dot/g,"1,3,").replace("dash","4,3,").replace(/,$/,"").split(","); -for(e=d.length;e--;)d[e]=S(d[e])*a["stroke-width"];d=d.join(",")}}else c==="isTracker"?this[c]=d:c==="width"?d=S(d):c==="align"?(c="text-anchor",d={left:"start",center:"middle",right:"end"}[d]):c==="title"&&(e=x.createElementNS("http://www.w3.org/2000/svg","title"),e.appendChild(x.createTextNode(d)),g.appendChild(e));c==="strokeWidth"&&(c="stroke-width");Ec&&c==="stroke-width"&&d===0&&(d=1.0E-6);this.symbolName&&/^(x|y|r|start|end|innerR|anchorX|anchorY)/.test(c)&&(n||(this.symbolAttr(a),n=!0),k= -!0);if(l&&/^(width|height|visibility|x|y|d|transform)$/.test(c))for(e=l.length;e--;)A(l[e],c,d);if((c==="width"||c==="height")&&h==="rect"&&d<0)d=0;c==="text"?(this.textStr=d,this.added&&i.buildText(this)):k||A(g,c,d)}if(Ec&&/Chrome\/(18|19)/.test(kb)&&h==="text"&&(a.x!==X||a.y!==X))c=g.parentNode,d=g.nextSibling,c&&(c.removeChild(g),d?c.insertBefore(g,d):c.appendChild(g));return o},symbolAttr:function(a){var b=this;o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","),function(c){b[c]= -p(a[c],b[c])});b.attr({d:b.renderer.symbols[b.symbolName](b.x,b.y,b.width,b.height,b)})},clip:function(a){return this.attr("clip-path","url("+this.renderer.url+"#"+a.id+")")},crisp:function(a,b,c,d,e){var f,g={},h={},i,a=a||this.strokeWidth||this.attr&&this.attr("stroke-width")||0;i=z(a)%2/2;h.x=Ta(b||this.x||0)+i;h.y=Ta(c||this.y||0)+i;h.width=Ta((d||this.width||0)-2*i);h.height=Ta((e||this.height||0)-2*i);h.strokeWidth=a;for(f in h)this[f]!==h[f]&&(this[f]=g[f]=h[f]);return g},css:function(a){var b= -this.element,b=a&&a.width&&b.nodeName==="text",c,d="",e=function(a,b){return"-"+b.toLowerCase()};if(a&&a.color)a.fill=a.color;this.styles=a=L(this.styles,a);if(Qb&&!Pb)b&&delete a.width,P(this.element,a);else{for(c in a)d+=c.replace(/([A-Z])/g,e)+":"+a[c]+";";this.attr({style:d})}b&&this.added&&this.renderer.buildText(this);return this},on:function(a,b){var c=b;Ga&&a==="click"&&(a="touchstart",c=function(a){a.preventDefault();b()});this.element["on"+a]=c;return this},translate:function(a,b){return this.attr({translateX:a, -translateY:b})},invert:function(){this.inverted=!0;this.updateTransform();return this},htmlCss:function(a){var b=this.element;if(b=a&&b.tagName==="SPAN"&&a.width)delete a.width,this.textWidth=b,this.updateTransform();this.styles=L(this.styles,a);P(this.element,a);return this},htmlGetBBox:function(a){var b=this.element,c=this.bBox;if(!c||a){if(b.nodeName==="text")b.style.position=wb;c=this.bBox={x:b.offsetLeft,y:b.offsetTop,width:b.offsetWidth,height:b.offsetHeight}}return c},htmlUpdateTransform:function(){if(this.added){var a= -this.renderer,b=this.element,c=this.translateX||0,d=this.translateY||0,e=this.x||0,f=this.y||0,g=this.textAlign||"left",h={left:0,center:0.5,right:1}[g],i=g&&g!=="left",k=this.shadows;if(c||d)P(b,{marginLeft:c,marginTop:d}),k&&o(k,function(a){P(a,{marginLeft:c+1,marginTop:d+1})});this.inverted&&o(b.childNodes,function(c){a.invertChild(c,b)});if(b.tagName==="SPAN"){var j,l,k=this.rotation,n;j=0;var t=1,r=0,Z;n=S(this.textWidth);var V=this.xCorr||0,v=this.yCorr||0,y=[k,g,b.innerHTML,this.textWidth].join(","); -if(y!==this.cTT)s(k)&&(j=k*Dc,t=ja(j),r=C(j),P(b,{filter:k?["progid:DXImageTransform.Microsoft.Matrix(M11=",t,", M12=",-r,", M21=",r,", M22=",t,", sizingMethod='auto expand')"].join(""):Ma})),j=p(this.elemWidth,b.offsetWidth),l=p(this.elemHeight,b.offsetHeight),j>n&&(P(b,{width:n+ga,display:"block",whiteSpace:"normal"}),j=n),n=a.fontMetrics(b.style.fontSize).b,V=t<0&&-j,v=r<0&&-l,Z=t*r<0,V+=r*n*(Z?1-h:h),v-=t*n*(k?Z?h:1-h:1),i&&(V-=j*h*(t<0?-1:1),k&&(v-=l*h*(r<0?-1:1)),P(b,{textAlign:g})),this.xCorr= -V,this.yCorr=v;P(b,{left:e+V+ga,top:f+v+ga});this.cTT=y}}else this.alignOnAdd=!0},updateTransform:function(){var a=this.translateX||0,b=this.translateY||0,c=this.inverted,d=this.rotation,e=[];c&&(a+=this.attr("width"),b+=this.attr("height"));(a||b)&&e.push("translate("+a+","+b+")");c?e.push("rotate(90) scale(-1,1)"):d&&e.push("rotate("+d+" "+this.x+" "+this.y+")");e.length&&A(this.element,"transform",e.join(" "))},toFront:function(){var a=this.element;a.parentNode.appendChild(a);return this},align:function(a, -b,c){a?(this.alignOptions=a,this.alignByTranslate=b,c||this.renderer.alignedObjects.push(this)):(a=this.alignOptions,b=this.alignByTranslate);var c=p(c,this.renderer),d=a.align,e=a.verticalAlign,f=(c.x||0)+(a.x||0),g=(c.y||0)+(a.y||0),h={};/^(right|center)$/.test(d)&&(f+=(c.width-(a.width||0))/{right:1,center:2}[d]);h[b?"translateX":"x"]=z(f);/^(bottom|middle)$/.test(e)&&(g+=(c.height-(a.height||0))/({bottom:1,middle:2}[e]||1));h[b?"translateY":"y"]=z(g);this[this.placed?"animate":"attr"](h);this.placed= -!0;this.alignAttr=h;return this},getBBox:function(a){var b,c,d=this.rotation;c=this.element;var e=d*Dc;if(c.namespaceURI==="http://www.w3.org/2000/svg"){try{b=c.getBBox?L({},c.getBBox()):{width:c.offsetWidth,height:c.offsetHeight}}catch(f){}if(!b||b.width<0)b={width:0,height:0};a=b.width;c=b.height;if(d)b.width=Ba(c*C(e))+Ba(a*ja(e)),b.height=Ba(c*ja(e))+Ba(a*C(e))}else b=this.htmlGetBBox(a);return b},show:function(){return this.attr({visibility:eb})},hide:function(){return this.attr({visibility:ab})}, -add:function(a){var b=this.renderer,c=a||b,d=c.element||b.box,e=d.childNodes,f=this.element,g=A(f,"zIndex"),h;this.parentInverted=a&&a.inverted;this.textStr!==void 0&&b.buildText(this);if(g)c.handleZ=!0,g=S(g);if(c.handleZ)for(c=0;c<e.length;c++)if(a=e[c],b=A(a,"zIndex"),a!==f&&(S(b)>g||!s(g)&&s(b))){d.insertBefore(f,a);h=!0;break}h||d.appendChild(f);this.added=!0;aa(this,"add");return this},safeRemoveChild:function(a){var b=a.parentNode;b&&b.removeChild(a)},destroy:function(){var a=this,b=a.element|| -{},c=a.shadows,d=a.box,e,f;b.onclick=b.onmouseout=b.onmouseover=b.onmousemove=null;Ob(a);if(a.clipPath)a.clipPath=a.clipPath.destroy();if(a.stops){for(f=0;f<a.stops.length;f++)a.stops[f]=a.stops[f].destroy();a.stops=null}a.safeRemoveChild(b);c&&o(c,function(b){a.safeRemoveChild(b)});d&&d.destroy();Gb(a.renderer.alignedObjects,a);for(e in a)delete a[e];return null},empty:function(){for(var a=this.element,b=a.childNodes,c=b.length;c--;)a.removeChild(b[c])},shadow:function(a,b){var c=[],d,e,f=this.element, -g=this.parentInverted?"(-1,-1)":"(1,1)";if(a){for(d=1;d<=3;d++)e=f.cloneNode(0),A(e,{isShadow:"true",stroke:"rgb(0, 0, 0)","stroke-opacity":0.05*d,"stroke-width":7-2*d,transform:"translate"+g,fill:Ma}),b?b.element.appendChild(e):f.parentNode.insertBefore(e,f),c.push(e);this.shadows=c}return this}};var Eb=function(){this.init.apply(this,arguments)};Eb.prototype={Element:Sa,init:function(a,b,c,d){var e=location,f;f=this.createElement("svg").attr({xmlns:"http://www.w3.org/2000/svg",version:"1.1"});a.appendChild(f.element); -this.isSVG=!0;this.box=f.element;this.boxWrapper=f;this.alignedObjects=[];this.url=Qb?"":e.href.replace(/#.*?$/,"").replace(/([\('\)])/g,"\\$1");this.defs=this.createElement("defs").add();this.forExport=d;this.gradients={};this.setSize(b,c,!1)},destroy:function(){var a=this.defs;this.box=null;this.boxWrapper=this.boxWrapper.destroy();Jb(this.gradients||{});this.gradients=null;if(a)this.defs=a.destroy();return this.alignedObjects=null},createElement:function(a){var b=new this.Element;b.init(this,a); -return b},draw:function(){},buildText:function(a){for(var b=a.element,c=p(a.textStr,"").toString().replace(/<(b|strong)>/g,'<span style="font-weight:bold">').replace(/<(i|em)>/g,'<span style="font-style:italic">').replace(/<a/g,"<span").replace(/<\/(b|strong|i|em|a)>/g,"</span>").split(/<br.*?>/g),d=b.childNodes,e=/style="([^"]+)"/,f=/href="([^"]+)"/,g=A(b,"x"),h=a.styles,i=h&&S(h.width),k=h&&h.lineHeight,j,h=d.length;h--;)b.removeChild(d[h]);i&&!a.added&&this.box.appendChild(b);c[c.length-1]===""&& -c.pop();o(c,function(c,d){var h,r=0,p,c=c.replace(/<span/g,"|||<span").replace(/<\/span>/g,"</span>|||");h=c.split("|||");o(h,function(c){if(c!==""||h.length===1){var l={},o=x.createElementNS("http://www.w3.org/2000/svg","tspan");e.test(c)&&A(o,"style",c.match(e)[1].replace(/(;| |^)color([ :])/,"$1fill$2"));f.test(c)&&(A(o,"onclick",'location.href="'+c.match(f)[1]+'"'),P(o,{cursor:"pointer"}));c=(c.replace(/<(.|\n)*?>/g,"")||" ").replace(/</g,"<").replace(/>/g,">");o.appendChild(x.createTextNode(c)); -r?l.dx=3:l.x=g;if(!r){if(d){!Pb&&a.renderer.forExport&&P(o,{display:"block"});p=ca.getComputedStyle&&S(ca.getComputedStyle(j,null).getPropertyValue("line-height"));if(!p||isNaN(p))p=k||j.offsetHeight||18;A(o,"dy",p)}j=o}A(o,l);b.appendChild(o);r++;if(i)for(var c=c.replace(/-/g,"- ").split(" "),q,T=[];c.length||T.length;)q=a.getBBox().width,l=q>i,!l||c.length===1?(c=T,T=[],c.length&&(o=x.createElementNS("http://www.w3.org/2000/svg","tspan"),A(o,{dy:k||16,x:g}),b.appendChild(o),q>i&&(i=q))):(o.removeChild(o.firstChild), -T.unshift(c.pop())),c.length&&o.appendChild(x.createTextNode(c.join(" ").replace(/- /g,"-")))}})})},button:function(a,b,c,d,e,f,g){var h=this.label(a,b,c),i=0,k,j,l,n,o,a={x1:0,y1:0,x2:0,y2:1},e=K(za("stroke-width",1,"stroke","#999","fill",za("linearGradient",a,"stops",[[0,"#FFF"],[1,"#DDD"]]),"r",3,"padding",3,"style",za("color","black")),e);l=e.style;delete e.style;f=K(e,za("stroke","#68A","fill",za("linearGradient",a,"stops",[[0,"#FFF"],[1,"#ACF"]])),f);n=f.style;delete f.style;g=K(e,za("stroke", -"#68A","fill",za("linearGradient",a,"stops",[[0,"#9BD"],[1,"#CDF"]])),g);o=g.style;delete g.style;ha(h.element,"mouseenter",function(){h.attr(f).css(n)});ha(h.element,"mouseleave",function(){k=[e,f,g][i];j=[l,n,o][i];h.attr(k).css(j)});h.setState=function(a){(i=a)?a===2&&h.attr(g).css(o):h.attr(e).css(l)};return h.on("click",function(){d.call(h)}).attr(e).css(L({cursor:"default"},l))},crispLine:function(a,b){a[1]===a[4]&&(a[1]=a[4]=z(a[1])+b%2/2);a[2]===a[5]&&(a[2]=a[5]=z(a[2])+b%2/2);return a},path:function(a){return this.createElement("path").attr({d:a, -fill:Ma})},circle:function(a,b,c){a=mb(a)?a:{x:a,y:b,r:c};return this.createElement("circle").attr(a)},arc:function(a,b,c,d,e,f){if(mb(a))b=a.y,c=a.r,d=a.innerR,e=a.start,f=a.end,a=a.x;return this.symbol("arc",a||0,b||0,c||0,c||0,{innerR:d||0,start:e||0,end:f||0})},rect:function(a,b,c,d,e,f){if(mb(a))b=a.y,c=a.width,d=a.height,e=a.r,f=a.strokeWidth,a=a.x;e=this.createElement("rect").attr({rx:e,ry:e,fill:Ma});return e.attr(e.crisp(f,a,b,W(c,0),W(d,0)))},setSize:function(a,b,c){var d=this.alignedObjects, -e=d.length;this.width=a;this.height=b;for(this.boxWrapper[p(c,!0)?"animate":"attr"]({width:a,height:b});e--;)d[e].align()},g:function(a){var b=this.createElement("g");return s(a)?b.attr({"class":Ia+a}):b},image:function(a,b,c,d,e){var f={preserveAspectRatio:Ma};arguments.length>1&&L(f,{x:b,y:c,width:d,height:e});f=this.createElement("image").attr(f);f.element.setAttributeNS?f.element.setAttributeNS("http://www.w3.org/1999/xlink","href",a):f.element.setAttribute("hc-svg-href",a);return f},symbol:function(a, -b,c,d,e,f){var g,h=this.symbols[a],h=h&&h(z(b),z(c),d,e,f),i=/^url\((.*?)\)$/,k;if(h)g=this.path(h),L(g,{symbolName:a,x:b,y:c,width:d,height:e}),f&&L(g,f);else if(i.test(a)){var j=function(a,b){a.attr({width:b[0],height:b[1]}).translate(-z(b[0]/2),-z(b[1]/2))};k=a.match(i)[1];a=Fc[k];g=this.image(k).attr({x:b,y:c});a?j(g,a):(g.attr({width:0,height:0}),Aa("img",{onload:function(){j(g,Fc[k]=[this.width,this.height])},src:k}))}return g},symbols:{circle:function(a,b,c,d){var e=0.166*c;return[wa,a+c/2, -b,"C",a+c+e,b,a+c+e,b+d,a+c/2,b+d,"C",a-e,b+d,a-e,b,a+c/2,b,"Z"]},square:function(a,b,c,d){return[wa,a,b,fa,a+c,b,a+c,b+d,a,b+d,"Z"]},triangle:function(a,b,c,d){return[wa,a+c/2,b,fa,a+c,b+d,a,b+d,"Z"]},"triangle-down":function(a,b,c,d){return[wa,a,b,fa,a+c,b,a+c/2,b+d,"Z"]},diamond:function(a,b,c,d){return[wa,a+c/2,b,fa,a+c,b+d/2,a+c/2,b+d,a,b+d/2,"Z"]},arc:function(a,b,c,d,e){var f=e.start,c=e.r||c||d,g=e.end-1.0E-6,d=e.innerR,h=ja(f),i=C(f),k=ja(g),g=C(g),e=e.end-f<da?0:1;return[wa,a+c*h,b+c*i, -"A",c,c,0,e,1,a+c*k,b+c*g,fa,a+d*k,b+d*g,"A",d,d,0,e,0,a+d*h,b+d*i,"Z"]}},clipRect:function(a,b,c,d){var e=Ia+lc++,f=this.createElement("clipPath").attr({id:e}).add(this.defs),a=this.rect(a,b,c,d,0).add(f);a.id=e;a.clipPath=f;return a},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f=this,g=a.linearGradient,b=!Fb(g),c=f.gradients,h,i=g.x1||g[0]||0,k=g.y1||g[1]||0,j=g.x2||g[2]||0,l=g.y2||g[3]||0,n,t,r=[b,i,k,j,l,a.stops.join(",")].join(",");c[r]?g=A(c[r].element,"id"):(g=Ia+lc++, -h=f.createElement("linearGradient").attr(L({id:g,x1:i,y1:k,x2:j,y2:l},b?null:{gradientUnits:"userSpaceOnUse"})).add(f.defs),h.stops=[],o(a.stops,function(a){e.test(a[1])?(d=ma(a[1]),n=d.get("rgb"),t=d.get("a")):(n=a[1],t=1);a=f.createElement("stop").attr({offset:a[0],"stop-color":n,"stop-opacity":t}).add(h);h.stops.push(a)}),c[r]=h);return"url("+this.url+"#"+g+")"}else return e.test(a)?(d=ma(a),A(b,c+"-opacity",d.get("a")),d.get("rgb")):(b.removeAttribute(c+"-opacity"),a)},text:function(a,b,c,d){var e= -Ea.chart.style;if(d&&!this.forExport)return this.html(a,b,c);b=z(p(b,0));c=z(p(c,0));a=this.createElement("text").attr({x:b,y:c,text:a}).css({fontFamily:e.fontFamily,fontSize:e.fontSize});a.x=b;a.y=c;return a},html:function(a,b,c){var d=Ea.chart.style,e=this.createElement("span"),f=e.attrSetters,g=e.element,h=e.renderer;f.text=function(a){g.innerHTML=a;return!1};f.x=f.y=f.align=function(a,b){b==="align"&&(b="textAlign");e[b]=a;e.htmlUpdateTransform();return!1};e.attr({text:a,x:z(b),y:z(c)}).css({position:wb, -whiteSpace:"nowrap",fontFamily:d.fontFamily,fontSize:d.fontSize});e.css=e.htmlCss;if(h.isSVG)e.add=function(a){var b,c,d=h.box.parentNode;if(a){if(b=a.div,!b)b=a.div=Aa(Ra,{className:A(a.element,"class")},{position:wb,left:a.attr("translateX")+ga,top:a.attr("translateY")+ga},d),c=b.style,L(a.attrSetters,{translateX:function(a){c.left=a+ga},translateY:function(a){c.top=a+ga},visibility:function(a,b){c[b]=a}})}else b=d;b.appendChild(g);e.added=!0;e.alignOnAdd&&e.htmlUpdateTransform();return e};return e}, -fontMetrics:function(a){var a=S(a||11),a=a<24?a+4:z(a*1.2),b=z(a*0.8);return{h:a,b:b}},label:function(a,b,c,d,e,f,g,h){function i(){var a=n.styles,a=a&&a.textAlign,b=v,c;c=h?0:ia;if(s(y)&&(a==="center"||a==="right"))b+={center:0.5,right:1}[a]*(y-p.width);(b!==t.x||c!==t.y)&&t.attr({x:b,y:c});t.x=b;t.y=c}function k(a,b){r?r.attr(a,b):x[a]=b}function j(){n.attr({text:a,x:b,y:c,anchorX:e,anchorY:f})}var l=this,n=l.g(),t=l.text("",0,0,g).attr({zIndex:1}).add(n),r,p,V="left",v=3,y,q,T,A,w=0,x={},ia,g= -n.attrSetters;ha(n,"add",j);g.width=function(a){y=a;return!1};g.height=function(a){q=a;return!1};g.padding=function(a){s(a)&&a!==v&&(v=a,i());return!1};g.align=function(a){V=a;return!1};g.text=function(a,b){t.attr(b,a);var c;c=t.element.style;p=(y===void 0||q===void 0||n.styles.textAlign)&&t.getBBox(!0);n.width=(y||p.width)+2*v;n.height=(q||p.height)+2*v;ia=v+l.fontMetrics(c&&c.fontSize).b;if(!r)c=h?-ia:0,n.box=r=d?l.symbol(d,0,c,n.width,n.height):l.rect(0,c,n.width,n.height,0,x["stroke-width"]), -r.add(n);r.attr(K({width:n.width,height:n.height},x));x=null;i();return!1};g["stroke-width"]=function(a,b){w=a%2/2;k(b,a);return!1};g.stroke=g.fill=g.r=function(a,b){k(b,a);return!1};g.anchorX=function(a,b){e=a;k(b,a+w-T);return!1};g.anchorY=function(a,b){f=a;k(b,a-A);return!1};g.x=function(a){a-={left:0,center:0.5,right:1}[V]*((y||p.width)+v);T=n.x=z(a);n.attr("translateX",T);return!1};g.y=function(a){A=n.y=z(a);n.attr("translateY",a);return!1};var ua=n.css;return L(n,{css:function(a){if(a){var b= -{},a=K({},a);o("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","),function(c){a[c]!==X&&(b[c]=a[c],delete a[c])});t.css(b)}return ua.call(n,a)},getBBox:function(){return r.getBBox()},shadow:function(a){r.shadow(a);return n},destroy:function(){Qa(n,"add",j);Qa(n.element,"mouseenter");Qa(n.element,"mouseleave");t&&(t=t.destroy());Sa.prototype.destroy.call(n)}})}};Xb=Eb;var $a;if(!Pb&&!Fa)$a={init:function(a,b){var c=["<",b,' filled="f" stroked="f"'],d=["position: ",wb,";"];(b==="shape"|| -b===Ra)&&d.push("left:0;top:0;width:10px;height:10px;");Xa&&d.push("visibility: ",b===Ra?ab:eb);c.push(' style="',d.join(""),'"/>');if(b)c=b===Ra||b==="span"||b==="img"?c.join(""):a.prepVML(c),this.element=Aa(c);this.renderer=a;this.attrSetters={}},add:function(a){var b=this.renderer,c=this.element,d=b.box,d=a?a.element||a:d;a&&a.inverted&&b.invertChild(c,d);Xa&&d.gVis===ab&&P(c,{visibility:ab});d.appendChild(c);this.added=!0;this.alignOnAdd&&!this.deferUpdateTransform&&this.updateTransform();aa(this, -"add");return this},toggleChildren:function(a,b){for(var c=a.childNodes,d=c.length;d--;)P(c[d],{visibility:b}),c[d].nodeName==="DIV"&&this.toggleChildren(c[d],b)},updateTransform:Sa.prototype.htmlUpdateTransform,attr:function(a,b){var c,d,e,f=this.element||{},g=f.style,h=f.nodeName,i=this.renderer,k=this.symbolName,j,l=this.shadows,n,o=this.attrSetters,r=this;Ab(a)&&s(b)&&(c=a,a={},a[c]=b);if(Ab(a))c=a,r=c==="strokeWidth"||c==="stroke-width"?this.strokeweight:this[c];else for(c in a)if(d=a[c],n=!1, -e=o[c]&&o[c](d,c),e!==!1&&d!==null){e!==X&&(d=e);if(k&&/^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c))j||(this.symbolAttr(a),j=!0),n=!0;else if(c==="d"){d=d||[];this.d=d.join(" ");e=d.length;for(n=[];e--;)n[e]=Bb(d[e])?z(d[e]*10)-5:d[e]==="Z"?"x":d[e];d=n.join(" ")||"x";f.path=d;if(l)for(e=l.length;e--;)l[e].path=d;n=!0}else if(c==="zIndex"||c==="visibility"){if(Xa&&c==="visibility"&&h==="DIV")f.gVis=d,this.toggleChildren(f,d),d===eb&&(d=null);d&&(g[c]=d);n=!0}else if(c==="width"|| -c==="height")d=W(0,d),this[c]=d,this.updateClipping?(this[c]=d,this.updateClipping()):g[c]=d,n=!0;else if(c==="x"||c==="y")this[c]=d,g[{x:"left",y:"top"}[c]]=d;else if(c==="class")f.className=d;else if(c==="stroke")d=i.color(d,f,c),c="strokecolor";else if(c==="stroke-width"||c==="strokeWidth")f.stroked=d?!0:!1,c="strokeweight",this[c]=d,Bb(d)&&(d+=ga);else if(c==="dashstyle")(f.getElementsByTagName("stroke")[0]||Aa(i.prepVML(["<stroke/>"]),null,null,f))[c]=d||"solid",this.dashstyle=d,n=!0;else if(c=== -"fill")h==="SPAN"?g.color=d:(f.filled=d!==Ma?!0:!1,d=i.color(d,f,c),c="fillcolor");else if(c==="translateX"||c==="translateY"||c==="rotation")this[c]=d,this.updateTransform(),n=!0;else if(c==="text")this.bBox=null,f.innerHTML=d,n=!0;if(l&&c==="visibility")for(e=l.length;e--;)l[e].style[c]=d;n||(Xa?f[c]=d:A(f,c,d))}return r},clip:function(a){var b=this,c=a.members;c.push(b);b.destroyClip=function(){Gb(c,b)};return b.css(a.getCSS(b.inverted))},css:Sa.prototype.htmlCss,safeRemoveChild:function(a){a.parentNode&& -Tb(a)},destroy:function(){this.destroyClip&&this.destroyClip();return Sa.prototype.destroy.apply(this)},empty:function(){for(var a=this.element.childNodes,b=a.length,c;b--;)c=a[b],c.parentNode.removeChild(c)},on:function(a,b){this.element["on"+a]=function(){var a=ca.event;a.target=a.srcElement;b(a)};return this},shadow:function(a,b){var c=[],d,e=this.element,f=this.renderer,g,h=e.style,i,k=e.path;k&&typeof k.value!=="string"&&(k="x");if(a){for(d=1;d<=3;d++)i=['<shape isShadow="true" strokeweight="', -7-2*d,'" filled="false" path="',k,'" coordsize="100,100" style="',e.style.cssText,'" />'],g=Aa(f.prepVML(i),null,{left:S(h.left)+1,top:S(h.top)+1}),i=['<stroke color="black" opacity="',0.05*d,'"/>'],Aa(f.prepVML(i),null,null,g),b?b.element.appendChild(g):e.parentNode.insertBefore(g,e),c.push(g);this.shadows=c}return this}},$a=pa(Sa,$a),w={Element:$a,isIE8:kb.indexOf("MSIE 8.0")>-1,init:function(a,b,c){var d,e;this.alignedObjects=[];d=this.createElement(Ra);e=d.element;e.style.position=mc;a.appendChild(d.element); -this.box=e;this.boxWrapper=d;this.setSize(b,c,!1);if(!x.namespaces.hcv)x.namespaces.add("hcv","urn:schemas-microsoft-com:vml"),x.createStyleSheet().cssText="hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "},clipRect:function(a,b,c,d){var e=this.createElement();return L(e,{members:[],left:a,top:b,width:c,height:d,getCSS:function(a){var b=this.top,c=this.left,d=c+this.width,e=b+this.height,b={clip:"rect("+z(a?c:b)+"px,"+z(a?e:d)+"px,"+z(a?d:e)+ -"px,"+z(a?b:c)+"px)"};!a&&Xa&&L(b,{width:d+ga,height:e+ga});return b},updateClipping:function(){o(e.members,function(a){a.css(e.getCSS(a.inverted))})}})},color:function(a,b,c){var d,e=/^rgba/;if(a&&a.linearGradient){var f,g,h=a.linearGradient,i=h.x1||h[0]||0,k=h.y1||h[1]||0,j=h.x2||h[2]||0,h=h.y2||h[3]||0,l,n,p,r;o(a.stops,function(a,b){e.test(a[1])?(d=ma(a[1]),f=d.get("rgb"),g=d.get("a")):(f=a[1],g=1);b?(p=f,r=g):(l=f,n=g)});if(c==="fill")a=90-oa.atan((h-k)/(j-i))*180/da,a=['<fill colors="0% ',l, -",100% ",p,'" angle="',a,'" opacity="',r,'" o:opacity2="',n,'" type="gradient" focus="100%" method="sigma" />'],Aa(this.prepVML(a),null,null,b);else return f}else if(e.test(a)&&b.tagName!=="IMG")return d=ma(a),a=["<",c,' opacity="',d.get("a"),'"/>'],Aa(this.prepVML(a),null,null,b),d.get("rgb");else{b=b.getElementsByTagName(c);if(b.length)b[0].opacity=1;return a}},prepVML:function(a){var b=this.isIE8,a=a.join("");b?(a=a.replace("/>",' xmlns="urn:schemas-microsoft-com:vml" />'),a=a.indexOf('style="')=== --1?a.replace("/>",' style="display:inline-block;behavior:url(#default#VML);" />'):a.replace('style="','style="display:inline-block;behavior:url(#default#VML);')):a=a.replace("<","<hcv:");return a},text:Eb.prototype.html,path:function(a){return this.createElement("shape").attr({coordsize:"100 100",d:a})},circle:function(a,b,c){return this.symbol("circle").attr({x:a-c,y:b-c,width:2*c,height:2*c})},g:function(a){var b;a&&(b={className:Ia+a,"class":Ia+a});return this.createElement(Ra).attr(b)},image:function(a, -b,c,d,e){var f=this.createElement("img").attr({src:a});arguments.length>1&&f.css({left:b,top:c,width:d,height:e});return f},rect:function(a,b,c,d,e,f){if(mb(a))b=a.y,c=a.width,d=a.height,f=a.strokeWidth,a=a.x;var g=this.symbol("rect");g.r=e;return g.attr(g.crisp(f,a,b,W(c,0),W(d,0)))},invertChild:function(a,b){var c=b.style;P(a,{flip:"x",left:S(c.width)-10,top:S(c.height)-10,rotation:-90})},symbols:{arc:function(a,b,c,d,e){var f=e.start,g=e.end,c=e.r||c||d,d=ja(f),h=C(f),i=ja(g),k=C(g),e=e.innerR, -j=0.08/c,l=e&&0.25/e||0;if(g-f===0)return["x"];else 2*da-g+f<j?i=-j:g-f<l&&(i=ja(f+l));return["wa",a-c,b-c,a+c,b+c,a+c*d,b+c*h,a+c*i,b+c*k,"at",a-e,b-e,a+e,b+e,a+e*i,b+e*k,a+e*d,b+e*h,"x","e"]},circle:function(a,b,c,d){return["wa",a,b,a+c,b+d,a+c,b+d/2,a+c,b+d/2,"e"]},rect:function(a,b,c,d,e){if(!s(e))return[];var f=a+c,g=b+d,c=Ua(e.r||0,c,d);return[wa,a+c,b,fa,f-c,b,"wa",f-2*c,b,f,b+2*c,f-c,b,f,b+c,fa,f,g-c,"wa",f-2*c,g-2*c,f,g,f,g-c,f-c,g,fa,a+c,g,"wa",a,g-2*c,a+2*c,g,a+c,g,a,g-c,fa,a,b+c,"wa", -a,b,a+2*c,b+2*c,a,b+c,a+c,b,"x","e"]}}},$a=function(){this.init.apply(this,arguments)},$a.prototype=K(Eb.prototype,w),Xb=$a;var oc,Cc;Fa&&(oc=function(){},Cc=function(){function a(){var a=b.length,d;for(d=0;d<a;d++)b[d]();b=[]}var b=[];return{push:function(c,d){b.length===0&&Hc(d,a);b.push(c)}}}());Xb=$a||oc||Eb;wc.prototype.callbacks=[];var lb=function(){};lb.prototype={init:function(a,b,c){var d=a.chart.counters;this.series=a;this.applyOptions(b,c);this.pointAttr={};if(a.options.colorByPoint){b= -a.chart.options.colors;if(!this.options)this.options={};this.color=this.options.color=this.color||b[d.color++];d.wrapColor(b.length)}a.chart.pointCount++;return this},applyOptions:function(a,b){var c=this.series,d=typeof a;this.config=a;if(d==="number"||a===null)this.y=a;else if(typeof a[0]==="number")this.x=a[0],this.y=a[1];else if(d==="object"&&typeof a.length!=="number"){if(L(this,a),this.options=a,a.dataLabels)c._hasPointLabels=!0}else if(typeof a[0]==="string")this.name=a[0],this.y=a[1];if(this.x=== -X)this.x=b===X?c.autoIncrement():b},destroy:function(){var a=this.series,b=a.chart.hoverPoints,c;a.chart.pointCount--;b&&(this.setState(),Gb(b,this));if(this===a.chart.hoverPoint)this.onMouseOut();a.chart.hoverPoints=null;if(this.graphic||this.dataLabel)Qa(this),this.destroyElements();this.legendItem&&this.series.chart.legend.destroyItem(this);for(c in this)this[c]=null},destroyElements:function(){for(var a="graphic,tracker,dataLabel,group,connector,shadowGroup".split(","),b,c=6;c--;)b=a[c],this[b]&& -(this[b]=this[b].destroy())},getLabelConfig:function(){return{x:this.category,y:this.y,key:this.name||this.category,series:this.series,point:this,percentage:this.percentage,total:this.total||this.stackTotal}},select:function(a,b){var c=this,d=c.series.chart,a=p(a,!c.selected);c.firePointEvent(a?"select":"unselect",{accumulate:b},function(){c.selected=a;c.setState(a&&"select");b||o(d.getSelectedPoints(),function(a){if(a.selected&&a!==c)a.selected=!1,a.setState(Ka),a.firePointEvent("unselect")})})}, -onMouseOver:function(){var a=this.series,b=a.chart,c=b.tooltip,d=b.hoverPoint;if(d&&d!==this)d.onMouseOut();this.firePointEvent("mouseOver");c&&(!c.shared||a.noSharedTooltip)&&c.refresh(this);this.setState(ta);b.hoverPoint=this},onMouseOut:function(){this.firePointEvent("mouseOut");this.setState();this.series.chart.hoverPoint=null},tooltipFormatter:function(a){var b=this.series,c=b.tooltipOptions,d=String(this.y).split("."),d=d[1]?d[1].length:0,e=a.match(/\{(series|point)\.[a-zA-Z]+\}/g),f=/[{\.}]/, -g,h,i,k;for(k in e)h=e[k],Ab(h)&&h!==a&&(i=(" "+h).split(f),g={point:this,series:b}[i[1]],i=i[2],g=g===this&&(i==="y"||i==="open"||i==="high"||i==="low"||i==="close")?(c.valuePrefix||c.yPrefix||"")+dc(this[i],p(c.valueDecimals,c.yDecimals,d))+(c.valueSuffix||c.ySuffix||""):g[i],a=a.replace(h,g));return a},update:function(a,b,c){var d=this,e=d.series,f=d.graphic,g,h=e.data,i=h.length,k=e.chart,b=p(b,!0);d.firePointEvent("update",{options:a},function(){d.applyOptions(a);mb(a)&&(e.getAttribs(),f&&f.attr(d.pointAttr[e.state])); -for(g=0;g<i;g++)if(h[g]===d){e.xData[g]=d.x;e.yData[g]=d.y;e.options.data[g]=a;break}e.isDirty=!0;e.isDirtyData=!0;b&&k.redraw(c)})},remove:function(a,b){var c=this,d=c.series,e=d.chart,f,g=d.data,h=g.length;Kb(b,e);a=p(a,!0);c.firePointEvent("remove",null,function(){for(f=0;f<h;f++)if(g[f]===c){g.splice(f,1);d.options.data.splice(f,1);d.xData.splice(f,1);d.yData.splice(f,1);break}c.destroy();d.isDirty=!0;d.isDirtyData=!0;a&&e.redraw()})},firePointEvent:function(a,b,c){var d=this,e=this.series.options; -(e.point.events[a]||d.options&&d.options.events&&d.options.events[a])&&this.importEvents();a==="click"&&e.allowPointSelect&&(c=function(a){d.select(null,a.ctrlKey||a.metaKey||a.shiftKey)});aa(this,a,b,c)},importEvents:function(){if(!this.hasImportedEvents){var a=K(this.series.options.point,this.options).events,b;this.events=a;for(b in a)ha(this,b,a[b]);this.hasImportedEvents=!0}},setState:function(a){var b=this.plotX,c=this.plotY,d=this.series,e=d.options.states,f=M[d.type].marker&&d.options.marker, -g=f&&!f.enabled,h=f&&f.states[a],i=h&&h.enabled===!1,k=d.stateMarkerGraphic,j=d.chart,l=this.pointAttr,a=a||Ka;if(!(a===this.state||this.selected&&a!=="select"||e[a]&&e[a].enabled===!1||a&&(i||g&&!h.enabled))){if(this.graphic)e=f&&this.graphic.symbolName&&l[a].r,this.graphic.attr(K(l[a],e?{x:b-e,y:c-e,width:2*e,height:2*e}:{}));else{if(a){if(!k)e=f.radius,d.stateMarkerGraphic=k=j.renderer.symbol(d.symbol,-e,-e,2*e,2*e).attr(l[a]).add(d.group);k.translate(b,c)}if(k)k[a?"show":"hide"]()}this.state= -a}}};var $=function(){};$.prototype={isCartesian:!0,type:"line",pointClass:lb,sorted:!0,pointAttrToOptions:{stroke:"lineColor","stroke-width":"lineWidth",fill:"fillColor",r:"radius"},init:function(a,b){var c,d;d=a.series.length;this.chart=a;this.options=b=this.setOptions(b);this.bindAxes();L(this,{index:d,name:b.name||"Series "+(d+1),state:Ka,pointAttr:{},visible:b.visible!==!1,selected:b.selected===!0});if(Fa)b.animation=!1;d=b.events;for(c in d)ha(this,c,d[c]);if(d&&d.click||b.point&&b.point.events&& -b.point.events.click||b.allowPointSelect)a.runTrackerClick=!0;this.getColor();this.getSymbol();this.setData(b.data,!1)},bindAxes:function(){var a=this,b=a.options,c=a.chart,d;a.isCartesian&&o(["xAxis","yAxis"],function(e){o(c[e],function(c){d=c.options;if(b[e]===d.index||b[e]===X&&d.index===0)c.series.push(a),a[e]=c,c.isDirty=!0})})},autoIncrement:function(){var a=this.options,b=this.xIncrement,b=p(b,a.pointStart,0);this.pointInterval=p(this.pointInterval,a.pointInterval,1);this.xIncrement=b+this.pointInterval; -return b},getSegments:function(){var a=-1,b=[],c,d=this.points,e=d.length;if(e)if(this.options.connectNulls){for(c=e;c--;)d[c].y===null&&d.splice(c,1);d.length&&(b=[d])}else o(d,function(c,g){c.y===null?(g>a+1&&b.push(d.slice(a+1,g)),a=g):g===e-1&&b.push(d.slice(a+1,g+1))});this.segments=b},setOptions:function(a){var b=this.chart.options,c=b.plotOptions,d=a.data;a.data=null;c=K(c[this.type],c.series,a);c.data=a.data=d;this.tooltipOptions=K(b.tooltip,c.tooltip);return c},getColor:function(){var a= -this.chart.options.colors,b=this.chart.counters;this.color=this.options.color||a[b.color++]||"#0000ff";b.wrapColor(a.length)},getSymbol:function(){var a=this.options.marker,b=this.chart,c=b.options.symbols,b=b.counters;this.symbol=a.symbol||c[b.symbol++];if(/^url/.test(this.symbol))a.radius=0;b.wrapSymbol(c.length)},addPoint:function(a,b,c,d){var e=this.data,f=this.graph,g=this.area,h=this.chart,i=this.xData,k=this.yData,j=f&&f.shift||0,l=this.options.data;Kb(d,h);if(f&&c)f.shift=j+1;if(g){if(c)g.shift= -j+1;g.isArea=!0}b=p(b,!0);d={series:this};this.pointClass.prototype.applyOptions.apply(d,[a]);i.push(d.x);k.push(this.valueCount===4?[d.open,d.high,d.low,d.close]:d.y);l.push(a);c&&(e[0]?e[0].remove(!1):(e.shift(),i.shift(),k.shift(),l.shift()));this.getAttribs();this.isDirtyData=this.isDirty=!0;b&&h.redraw()},setData:function(a,b){var c=this.points,d=this.options,e=this.initialColor,f=this.chart,g=null;this.xIncrement=null;this.pointRange=this.xAxis&&this.xAxis.categories&&1||d.pointRange;if(s(e))f.counters.color= -e;var h=[],i=[],k=a?a.length:[],j=this.valueCount===4;if(k>(d.turboThreshold||1E3)){for(e=0;g===null&&e<k;)g=a[e],e++;if(Bb(g)){g=p(d.pointStart,0);d=p(d.pointInterval,1);for(e=0;e<k;e++)h[e]=g,i[e]=a[e],g+=d;this.xIncrement=g}else if(Fb(g))if(j)for(e=0;e<k;e++)d=a[e],h[e]=d[0],i[e]=d.slice(1,5);else for(e=0;e<k;e++)d=a[e],h[e]=d[0],i[e]=d[1]}else for(e=0;e<k;e++)d={series:this},this.pointClass.prototype.applyOptions.apply(d,[a[e]]),h[e]=d.x,i[e]=j?[d.open,d.high,d.low,d.close]:d.y;this.data=[];this.options.data= -a;this.xData=h;this.yData=i;for(e=c&&c.length||0;e--;)c[e]&&c[e].destroy&&c[e].destroy();this.isDirty=this.isDirtyData=f.isDirtyBox=!0;p(b,!0)&&f.redraw(!1)},remove:function(a,b){var c=this,d=c.chart,a=p(a,!0);if(!c.isRemoving)c.isRemoving=!0,aa(c,"remove",null,function(){c.destroy();d.isDirtyLegend=d.isDirtyBox=!0;a&&d.redraw(b)});c.isRemoving=!1},processData:function(a){var b=this.xData,c=this.yData,d=b.length,e=0,f=d,g,h,i=this.xAxis,k=this.options,j=k.cropThreshold,l=this.isCartesian;if(l&&!this.isDirty&& -!i.isDirty&&!this.yAxis.isDirty&&!a)return!1;if(l&&this.sorted&&(!j||d>j||this.forceCrop))if(a=i.getExtremes(),i=a.min,j=a.max,b[d-1]<i||b[0]>j)b=[],c=[];else if(b[0]<i||b[d-1]>j){for(a=0;a<d;a++)if(b[a]>=i){e=W(0,a-1);break}for(;a<d;a++)if(b[a]>j){f=a+1;break}b=b.slice(e,f);c=c.slice(e,f);g=!0}for(a=b.length-1;a>0;a--)if(d=b[a]-b[a-1],d>0&&(h===X||d<h))h=d;this.cropped=g;this.cropStart=e;this.processedXData=b;this.processedYData=c;if(k.pointRange===null)this.pointRange=h||1;this.closestPointRange= -h},generatePoints:function(){var a=this.options.data,b=this.data,c,d=this.processedXData,e=this.processedYData,f=this.pointClass,g=d.length,h=this.cropStart||0,i,k=this.hasGroupedData,j,l=[],n;if(!b&&!k)b=[],b.length=a.length,b=this.data=b;for(n=0;n<g;n++)i=h+n,k?l[n]=(new f).init(this,[d[n]].concat(Hb(e[n]))):(b[i]?j=b[i]:b[i]=j=(new f).init(this,a[i],d[n]),l[n]=j);if(b&&(g!==(c=b.length)||k))for(n=0;n<c;n++)n===h&&!k&&(n+=g),b[n]&&b[n].destroyElements();this.data=b;this.points=l},translate:function(){this.processedXData|| -this.processData();this.generatePoints();for(var a=this.chart,b=this.options,c=b.stacking,d=this.xAxis,e=d.categories,f=this.yAxis,g=this.points,h=g.length,i=!!this.modifyValue,k,j=f.series,l=j.length;l--;)if(j[l].visible){l===this.index&&(k=!0);break}for(l=0;l<h;l++){var j=g[l],n=j.x,o=j.y,r=j.low,p=f.stacks[(o<b.threshold?"-":"")+this.stackKey];j.plotX=z(d.translate(n,0,0,0,1)*10)/10;if(c&&this.visible&&p&&p[n]){r=p[n];n=r.total;r.cum=r=r.cum-o;o=r+o;if(k)r=b.threshold;c==="percent"&&(r=n?r*100/ -n:0,o=n?o*100/n:0);j.percentage=n?j.y*100/n:0;j.stackTotal=n;j.stackY=o}j.yBottom=s(r)?f.translate(r,0,1,0,1):null;i&&(o=this.modifyValue(o,j));j.plotY=typeof o==="number"?z(f.translate(o,0,1,0,1)*10)/10:X;j.clientX=a.inverted?a.plotHeight-j.plotX:j.plotX;j.category=e&&e[j.x]!==X?e[j.x]:j.x}this.getSegments()},setTooltipPoints:function(a){var b=this.chart,c=b.inverted,d=[],b=z((c?b.plotTop:b.plotLeft)+b.plotSizeX),e,f;e=this.xAxis;var g,h,i=[];if(this.options.enableMouseTracking!==!1){if(a)this.tooltipPoints= -null;o(this.segments||this.points,function(a){d=d.concat(a)});e&&e.reversed&&(d=d.reverse());a=d.length;for(h=0;h<a;h++){g=d[h];e=d[h-1]?d[h-1]._high+1:0;for(f=g._high=d[h+1]?Ta((g.plotX+(d[h+1]?d[h+1].plotX:b))/2):b;e<=f;)i[c?b-e++:e++]=g}this.tooltipPoints=i}},tooltipHeaderFormatter:function(a){var b=this.tooltipOptions,c=b.xDateFormat||"%A, %b %e, %Y",d=this.xAxis;return b.headerFormat.replace("{point.key}",d&&d.options.type==="datetime"?ac(c,a):a).replace("{series.name}",this.name).replace("{series.color}", -this.color)},onMouseOver:function(){var a=this.chart,b=a.hoverSeries;if(Ga||!a.mouseIsDown){if(b&&b!==this)b.onMouseOut();this.options.events.mouseOver&&aa(this,"mouseOver");this.setState(ta);a.hoverSeries=this}},onMouseOut:function(){var a=this.options,b=this.chart,c=b.tooltip,d=b.hoverPoint;if(d)d.onMouseOut();this&&a.events.mouseOut&&aa(this,"mouseOut");c&&!a.stickyTracking&&!c.shared&&c.hide();this.setState();b.hoverSeries=null},animate:function(a){var b=this.chart,c=this.clipRect,d=this.options.animation; -d&&!mb(d)&&(d={});if(a){if(!c.isAnimating)c.attr("width",0),c.isAnimating=!0}else c.animate({width:b.plotSizeX},d),this.animate=null},drawPoints:function(){var a,b=this.points,c=this.chart,d,e,f,g,h,i,k,j;if(this.options.marker.enabled)for(f=b.length;f--;)if(g=b[f],d=g.plotX,e=g.plotY,j=g.graphic,e!==X&&!isNaN(e))if(a=g.pointAttr[g.selected?"select":Ka],h=a.r,i=p(g.marker&&g.marker.symbol,this.symbol),k=i.indexOf("url")===0,j)j.animate(L({x:d-h,y:e-h},j.symbolName?{width:2*h,height:2*h}:{}));else if(h> -0||k)g.graphic=c.renderer.symbol(i,d-h,e-h,2*h,2*h).attr(a).add(this.group)},convertAttribs:function(a,b,c,d){var e=this.pointAttrToOptions,f,g,h={},a=a||{},b=b||{},c=c||{},d=d||{};for(f in e)g=e[f],h[f]=p(a[g],b[f],c[f],d[f]);return h},getAttribs:function(){var a=this,b=M[a.type].marker?a.options.marker:a.options,c=b.states,d=c[ta],e,f=a.color,g={stroke:f,fill:f},h=a.points,i=[],k,j=a.pointAttrToOptions,l;a.options.marker?(d.radius=d.radius||b.radius+2,d.lineWidth=d.lineWidth||b.lineWidth+1):d.color= -d.color||ma(d.color||f).brighten(d.brightness).get();i[Ka]=a.convertAttribs(b,g);o([ta,"select"],function(b){i[b]=a.convertAttribs(c[b],i[Ka])});a.pointAttr=i;for(f=h.length;f--;){g=h[f];if((b=g.options&&g.options.marker||g.options)&&b.enabled===!1)b.radius=0;e=!1;if(g.options)for(l in j)s(b[j[l]])&&(e=!0);if(e){k=[];c=b.states||{};e=c[ta]=c[ta]||{};if(!a.options.marker)e.color=ma(e.color||g.options.color).brighten(e.brightness||d.brightness).get();k[Ka]=a.convertAttribs(b,i[Ka]);k[ta]=a.convertAttribs(c[ta], -i[ta],k[Ka]);k.select=a.convertAttribs(c.select,i.select,k[Ka])}else k=i;g.pointAttr=k}},destroy:function(){var a=this,b=a.chart,c=a.clipRect,d=/AppleWebKit\/533/.test(kb),e,f,g=a.data||[],h,i,k;aa(a,"destroy");Qa(a);o(["xAxis","yAxis"],function(b){if(k=a[b])Gb(k.series,a),k.isDirty=!0});a.legendItem&&a.chart.legend.destroyItem(a);for(f=g.length;f--;)(h=g[f])&&h.destroy&&h.destroy();a.points=null;if(c&&c!==b.clipRect)a.clipRect=c.destroy();o(["area","graph","dataLabelsGroup","group","tracker"],function(b){a[b]&& -(e=d&&b==="group"?"hide":"destroy",a[b][e]())});if(b.hoverSeries===a)b.hoverSeries=null;Gb(b.series,a);for(i in a)delete a[i]},drawDataLabels:function(){var a=this,b=a.options,c=b.dataLabels;if(c.enabled||a._hasPointLabels){var d,e,f=a.points,g,h,i,k=a.dataLabelsGroup,j=a.chart,l=a.xAxis,l=l?l.left:j.plotLeft,n=a.yAxis,n=n?n.top:j.plotTop,t=j.renderer,r=j.inverted,Z=a.type,V=b.stacking,v=Z==="column"||Z==="bar",y=c.verticalAlign===null,q=c.y===null,T=t.fontMetrics(c.style.fontSize),A=T.h,x=T.b,w, -ia;v&&(T={top:x,middle:x-A/2,bottom:-A+x},V?(y&&(c=K(c,{verticalAlign:"middle"})),q&&(c=K(c,{y:T[c.verticalAlign]}))):y?c=K(c,{verticalAlign:"top"}):q&&(c=K(c,{y:T[c.verticalAlign]})));k?k.translate(l,n):k=a.dataLabelsGroup=t.g("data-labels").attr({visibility:a.visible?eb:ab,zIndex:6}).translate(l,n).add();h=c;o(f,function(f){w=f.dataLabel;c=h;(g=f.options)&&g.dataLabels&&(c=K(c,g.dataLabels));if(ia=c.enabled){var l=f.barX&&f.barX+f.barW/2||p(f.plotX,-999),n=p(f.plotY,-999),o=c.y===null?f.y>=b.threshold? --A+x:x:c.y;d=(r?j.plotWidth-n:l)+c.x;e=z((r?j.plotHeight-l:n)+o)}if(w&&a.isCartesian&&(!j.isInsidePlot(d,e)||!ia))f.dataLabel=w.destroy();else if(ia){l=c.align;i=c.formatter.call(f.getLabelConfig(),c);Z==="column"&&(d+={left:-1,right:1}[l]*f.barW/2||0);!V&&r&&f.y<0&&(l="right",d-=10);c.style.color=p(c.color,c.style.color,a.color,"black");if(w)w.attr({text:i}).animate({x:d,y:e});else if(s(i))w=f.dataLabel=t[c.rotation?"text":"label"](i,d,e,null,null,null,c.useHTML,!0).attr({align:l,fill:c.backgroundColor, -stroke:c.borderColor,"stroke-width":c.borderWidth,r:c.borderRadius,rotation:c.rotation,padding:c.padding,zIndex:1}).css(c.style).add(k).shadow(c.shadow);if(v&&b.stacking&&w)l=f.barX,n=f.barY,o=f.barW,f=f.barH,w.align(c,null,{x:r?j.plotWidth-n-f:l,y:r?j.plotHeight-l-o:n,width:r?f:o,height:r?o:f})}})}},drawGraph:function(){var a=this,b=a.options,c=a.graph,d=[],e,f=a.area,g=a.group,h=b.lineColor||a.color,i=b.lineWidth,k=b.dashStyle,j,l=a.chart.renderer,n=a.yAxis.getThreshold(b.threshold),t=/^area/.test(a.type), -r=[],s=[];o(a.segments,function(c){j=[];o(c,function(d,e){a.getPointSpline?j.push.apply(j,a.getPointSpline(c,d,e)):(j.push(e?fa:wa),e&&b.step&&j.push(d.plotX,c[e-1].plotY),j.push(d.plotX,d.plotY))});c.length>1?d=d.concat(j):r.push(c[0]);if(t){var e=[],f,g=j.length;for(f=0;f<g;f++)e.push(j[f]);g===3&&e.push(fa,j[1],j[2]);if(b.stacking&&a.type!=="areaspline")for(f=c.length-1;f>=0;f--)f<c.length-1&&b.step&&e.push(c[f+1].plotX,c[f].yBottom),e.push(c[f].plotX,c[f].yBottom);else e.push(fa,c[c.length-1].plotX, -n,fa,c[0].plotX,n);s=s.concat(e)}});a.graphPath=d;a.singlePoints=r;if(t)e=p(b.fillColor,ma(a.color).setOpacity(b.fillOpacity||0.75).get()),f?f.animate({d:s}):a.area=a.chart.renderer.path(s).attr({fill:e}).add(g);if(c)Ob(c),c.animate({d:d});else if(i){c={stroke:h,"stroke-width":i};if(k)c.dashstyle=k;a.graph=l.path(d).attr(c).add(g).shadow(b.shadow)}},invertGroups:function(){function a(){var a={width:b.yAxis.len,height:b.xAxis.len};c.attr(a).invert();d&&d.attr(a).invert()}var b=this,c=b.group,d=b.trackerGroup, -e=b.chart;ha(e,"resize",a);ha(b,"destroy",function(){Qa(e,"resize",a)});a();b.invertGroups=a},render:function(){var a=this,b=a.chart,c,d=a.options,e=d.clip!==!1,f=d.animation,g=f&&a.animate,f=g?f&&f.duration||500:0,h=a.clipRect,i=b.renderer;if(!h&&(h=a.clipRect=!b.hasRendered&&b.clipRect?b.clipRect:i.clipRect(0,0,b.plotSizeX,b.plotSizeY+1),!b.clipRect))b.clipRect=h;if(!a.group)c=a.group=i.g("series"),c.attr({visibility:a.visible?eb:ab,zIndex:d.zIndex}).translate(a.xAxis.left,a.yAxis.top).add(b.seriesGroup); -a.drawDataLabels();g&&a.animate(!0);a.getAttribs();a.drawGraph&&a.drawGraph();a.drawPoints();a.options.enableMouseTracking!==!1&&a.drawTracker();b.inverted&&a.invertGroups();e&&!a.hasRendered&&(c.clip(h),a.trackerGroup&&a.trackerGroup.clip(b.clipRect));g&&a.animate();setTimeout(function(){h.isAnimating=!1;if((c=a.group)&&h!==b.clipRect&&h.renderer){if(e)c.clip(a.clipRect=b.clipRect);h.destroy()}},f);a.isDirty=a.isDirtyData=!1;a.hasRendered=!0},redraw:function(){var a=this.chart,b=this.isDirtyData, -c=this.group;c&&(a.inverted&&c.attr({width:a.plotWidth,height:a.plotHeight}),c.animate({translateX:this.xAxis.left,translateY:this.yAxis.top}));this.translate();this.setTooltipPoints(!0);this.render();b&&aa(this,"updatedData")},setState:function(a){var b=this.options,c=this.graph,d=b.states,b=b.lineWidth,a=a||Ka;if(this.state!==a)this.state=a,d[a]&&d[a].enabled===!1||(a&&(b=d[a].lineWidth||b+1),c&&!c.dashstyle&&c.attr({"stroke-width":b},a?0:500))},setVisible:function(a,b){var c=this.chart,d=this.legendItem, -e=this.group,f=this.tracker,g=this.dataLabelsGroup,h,i=this.points,k=c.options.chart.ignoreHiddenSeries;h=this.visible;h=(this.visible=a=a===X?!h:a)?"show":"hide";if(e)e[h]();if(f)f[h]();else if(i)for(e=i.length;e--;)if(f=i[e],f.tracker)f.tracker[h]();if(g)g[h]();d&&c.legend.colorizeItem(this,a);this.isDirty=!0;this.options.stacking&&o(c.series,function(a){if(a.options.stacking&&a.visible)a.isDirty=!0});if(k)c.isDirtyBox=!0;b!==!1&&c.redraw();aa(this,h)},show:function(){this.setVisible(!0)},hide:function(){this.setVisible(!1)}, -select:function(a){this.selected=a=a===X?!this.selected:a;if(this.checkbox)this.checkbox.checked=a;aa(this,a?"select":"unselect")},drawTrackerGroup:function(){var a=this.trackerGroup,b=this.chart;if(this.isCartesian){if(!a)this.trackerGroup=a=b.renderer.g().attr({zIndex:this.options.zIndex||1}).add(b.trackerGroup);a.translate(this.xAxis.left,this.yAxis.top)}return a},drawTracker:function(){var a=this,b=a.options,c=[].concat(a.graphPath),d=c.length,e=a.chart,f=e.renderer,g=e.options.tooltip.snap,h= -a.tracker,i=b.cursor,i=i&&{cursor:i},k=a.singlePoints,j=a.drawTrackerGroup(),l;if(d)for(l=d+1;l--;)c[l]===wa&&c.splice(l+1,0,c[l+1]-g,c[l+2],fa),(l&&c[l]===wa||l===d)&&c.splice(l,0,fa,c[l-2]+g,c[l-1]);for(l=0;l<k.length;l++)d=k[l],c.push(wa,d.plotX-g,d.plotY,fa,d.plotX+g,d.plotY);h?h.attr({d:c}):a.tracker=f.path(c).attr({isTracker:!0,stroke:Gc,fill:Ma,"stroke-linejoin":"bevel","stroke-width":b.lineWidth+2*g,visibility:a.visible?eb:ab}).on(Ga?"touchstart":"mouseover",function(){if(e.hoverSeries!== -a)a.onMouseOver()}).on("mouseout",function(){if(!b.stickyTracking)a.onMouseOut()}).css(i).add(j)}};w=pa($);Ha.line=w;w=pa($,{type:"area"});Ha.area=w;w=pa($,{type:"spline",getPointSpline:function(a,b,c){var d=b.plotX,e=b.plotY,f=a[c-1],g=a[c+1],h,i,k,j;if(c&&c<a.length-1){a=f.plotY;k=g.plotX;var g=g.plotY,l;h=(1.5*d+f.plotX)/2.5;i=(1.5*e+a)/2.5;k=(1.5*d+k)/2.5;j=(1.5*e+g)/2.5;l=(j-i)*(k-d)/(k-h)+e-j;i+=l;j+=l;i>a&&i>e?(i=W(a,e),j=2*e-i):i<a&&i<e&&(i=Ua(a,e),j=2*e-i);j>g&&j>e?(j=W(g,e),i=2*e-j):j<g&& -j<e&&(j=Ua(g,e),i=2*e-j);b.rightContX=k;b.rightContY=j}c?(b=["C",f.rightContX||f.plotX,f.rightContY||f.plotY,h||d,i||e,d,e],f.rightContX=f.rightContY=null):b=[wa,d,e];return b}});Ha.spline=w;w=pa(w,{type:"areaspline"});Ha.areaspline=w;var zb=pa($,{type:"column",tooltipOutsidePlot:!0,pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color",r:"borderRadius"},init:function(){$.prototype.init.apply(this,arguments);var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type=== -a.type)b.isDirty=!0})},translate:function(){var a=this,b=a.chart,c=a.options,d=c.stacking,e=c.borderWidth,f=0,g=a.xAxis,h=g.reversed,i={},k,j;$.prototype.translate.apply(a);o(b.series,function(b){if(b.type===a.type&&b.visible&&a.options.group===b.options.group)b.options.stacking?(k=b.stackKey,i[k]===X&&(i[k]=f++),j=i[k]):j=f++,b.columnIndex=j});var b=a.points,g=Ba(g.translationSlope)*(g.ordinalSlope||g.closestPointRange||1),l=g*c.groupPadding,n=(g-2*l)/f,t=c.pointWidth,r=s(t)?(n-t)/2:n*c.pointPadding, -w=Yb(W(p(t,n-2*r),1+2*e)),x=r+(l+((h?f-a.columnIndex:a.columnIndex)||0)*n-g/2)*(h?-1:1),v=a.yAxis.getThreshold(c.threshold),y=p(c.minPointLength,5);o(b,function(b){var f=b.plotY,g=p(b.yBottom,v),h=b.plotX+x,i=Yb(Ua(f,g)),j=Yb(W(f,g)-i),k=a.yAxis.stacks[(b.y<0?"-":"")+a.stackKey];d&&a.visible&&k&&k[b.x]&&k[b.x].setOffset(x,w);Ba(j)<y&&y&&(j=y,i=Ba(i-v)>y?g-y:v-(f<=v?y:0));L(b,{barX:h,barY:i,barW:w,barH:j});b.shapeType="rect";f={x:h,y:i,width:w,height:j,r:c.borderRadius,strokeWidth:e};e%2&&(f.y-=1, -f.height+=1);b.shapeArgs=f;b.trackerArgs=Ba(j)<3&&K(b.shapeArgs,{height:6,y:i-3})})},getSymbol:function(){},drawGraph:function(){},drawPoints:function(){var a=this,b=a.options,c=a.chart.renderer,d,e;o(a.points,function(f){var g=f.plotY;if(g!==X&&!isNaN(g)&&f.y!==null)d=f.graphic,e=f.shapeArgs,d?(Ob(d),d.animate(c.Element.prototype.crisp.apply({},[e.strokeWidth,e.x,e.y,e.width,e.height]))):f.graphic=d=c[f.shapeType](e).attr(f.pointAttr[f.selected?"select":Ka]).add(a.group).shadow(b.shadow)})},drawTracker:function(){var a= -this,b=a.chart,c=b.renderer,d,e,f=+new Date,g=a.options,h=g.cursor,i=h&&{cursor:h},k=a.drawTrackerGroup(),j;o(a.points,function(h){e=h.tracker;d=h.trackerArgs||h.shapeArgs;delete d.strokeWidth;if(h.y!==null)e?e.attr(d):h.tracker=c[h.shapeType](d).attr({isTracker:f,fill:Gc,visibility:a.visible?eb:ab}).on(Ga?"touchstart":"mouseover",function(c){j=c.relatedTarget||c.fromElement;if(b.hoverSeries!==a&&A(j,"isTracker")!==f)a.onMouseOver();h.onMouseOver()}).on("mouseout",function(b){if(!g.stickyTracking&& -(j=b.relatedTarget||b.toElement,A(j,"isTracker")!==f))a.onMouseOut()}).css(i).add(h.group||k)})},animate:function(a){var b=this,c=b.points,d=b.options;if(!a)o(c,function(a){var c=a.graphic,a=a.shapeArgs,g=b.yAxis,h=d.threshold;c&&(c.attr({height:0,y:s(h)?g.getThreshold(h):g.translate(g.getExtremes().min,0,1,0,1)}),c.animate({height:a.height,y:a.y},d.animation))}),b.animate=null},remove:function(){var a=this,b=a.chart;b.hasRendered&&o(b.series,function(b){if(b.type===a.type)b.isDirty=!0});$.prototype.remove.apply(a, -arguments)}});Ha.column=zb;w=pa(zb,{type:"bar",init:function(){this.inverted=!0;zb.prototype.init.apply(this,arguments)}});Ha.bar=w;w=pa($,{type:"scatter",sorted:!1,translate:function(){var a=this;$.prototype.translate.apply(a);o(a.points,function(b){b.shapeType="circle";b.shapeArgs={x:b.plotX,y:b.plotY,r:a.chart.options.tooltip.snap}})},drawTracker:function(){for(var a=this,b=a.options.cursor,b=b&&{cursor:b},c=a.points,d=c.length,e;d--;)if(e=c[d].graphic)e.element._i=d;a._hasTracking?a._hasTracking= -!0:a.group.attr({isTracker:!0}).on(Ga?"touchstart":"mouseover",function(b){a.onMouseOver();if(b.target._i!==X)c[b.target._i].onMouseOver()}).on("mouseout",function(){if(!a.options.stickyTracking)a.onMouseOut()}).css(b)}});Ha.scatter=w;w=pa(lb,{init:function(){lb.prototype.init.apply(this,arguments);var a=this,b;L(a,{visible:a.visible!==!1,name:p(a.name,"Slice")});b=function(){a.slice()};ha(a,"select",b);ha(a,"unselect",b);return a},setVisible:function(a){var b=this.series.chart,c=this.tracker,d=this.dataLabel, -e=this.connector,f=this.shadowGroup,g;g=(this.visible=a=a===X?!this.visible:a)?"show":"hide";this.group[g]();if(c)c[g]();if(d)d[g]();if(e)e[g]();if(f)f[g]();this.legendItem&&b.legend.colorizeItem(this,a)},slice:function(a,b,c){var d=this.series.chart,e=this.slicedTranslation;Kb(c,d);p(b,!0);a=this.sliced=s(a)?a:!this.sliced;a={translateX:a?e[0]:d.plotLeft,translateY:a?e[1]:d.plotTop};this.group.animate(a);this.shadowGroup&&this.shadowGroup.animate(a)}});w=pa($,{type:"pie",isCartesian:!1,pointClass:w, -pointAttrToOptions:{stroke:"borderColor","stroke-width":"borderWidth",fill:"color"},getColor:function(){this.initialColor=this.chart.counters.color},animate:function(){var a=this;o(a.points,function(b){var c=b.graphic,b=b.shapeArgs,d=-da/2;c&&(c.attr({r:0,start:d,end:d}),c.animate({r:b.r,start:b.start,end:b.end},a.options.animation))});a.animate=null},setData:function(){$.prototype.setData.apply(this,arguments);this.processData();this.generatePoints()},translate:function(){this.generatePoints();var a= -0,b=-0.25,c=this.options,d=c.slicedOffset,e=d+c.borderWidth,f=c.center.concat([c.size,c.innerSize||0]),g=this.chart,h=g.plotWidth,i=g.plotHeight,k,j,l,n=this.points,p=2*da,r,s=Ua(h,i),w,v,y,q=c.dataLabels.distance,f=Vb(f,function(a,b){return(w=/%$/.test(a))?[h,i,s,s][b]*S(a)/100:a});this.getX=function(a,b){l=oa.asin((a-f[1])/(f[2]/2+q));return f[0]+(b?-1:1)*ja(l)*(f[2]/2+q)};this.center=f;o(n,function(b){a+=b.y});o(n,function(c){r=a?c.y/a:0;k=z(b*p*1E3)/1E3;b+=r;j=z(b*p*1E3)/1E3;c.shapeType="arc"; -c.shapeArgs={x:f[0],y:f[1],r:f[2]/2,innerR:f[3]/2,start:k,end:j};l=(j+k)/2;c.slicedTranslation=Vb([ja(l)*d+g.plotLeft,C(l)*d+g.plotTop],z);v=ja(l)*f[2]/2;y=C(l)*f[2]/2;c.tooltipPos=[f[0]+v*0.7,f[1]+y*0.7];c.labelPos=[f[0]+v+ja(l)*q,f[1]+y+C(l)*q,f[0]+v+ja(l)*e,f[1]+y+C(l)*e,f[0]+v,f[1]+y,q<0?"center":l<p/4?"left":"right",l];c.percentage=r*100;c.total=a});this.setTooltipPoints()},render:function(){this.getAttribs();this.drawPoints();this.options.enableMouseTracking!==!1&&this.drawTracker();this.drawDataLabels(); -this.options.animation&&this.animate&&this.animate();this.isDirty=!1},drawPoints:function(){var a=this.chart,b=a.renderer,c,d,e,f=this.options.shadow,g,h;o(this.points,function(i){d=i.graphic;h=i.shapeArgs;e=i.group;g=i.shadowGroup;if(f&&!g)g=i.shadowGroup=b.g("shadow").attr({zIndex:4}).add();if(!e)e=i.group=b.g("point").attr({zIndex:5}).add();c=i.sliced?i.slicedTranslation:[a.plotLeft,a.plotTop];e.translate(c[0],c[1]);g&&g.translate(c[0],c[1]);d?d.animate(h):i.graphic=b.arc(h).attr(L(i.pointAttr[Ka], -{"stroke-linejoin":"round"})).add(i.group).shadow(f,g);i.visible===!1&&i.setVisible(!1)})},drawDataLabels:function(){var a=this.data,b,c=this.chart,d=this.options.dataLabels,e=p(d.connectorPadding,10),f=p(d.connectorWidth,1),g,h,i=p(d.softConnector,!0),k=d.distance,j=this.center,l=j[2]/2,j=j[1],n=k>0,t=[[],[]],r,s,w,v,y=2,q;if(d.enabled){$.prototype.drawDataLabels.apply(this);o(a,function(a){a.dataLabel&&t[a.labelPos[7]<da/2?0:1].push(a)});t[1].reverse();v=function(a,b){return b.y-a.y};for(a=t[0][0]&& -t[0][0].dataLabel&&t[0][0].dataLabel.getBBox().height;y--;){var x=[],A=[],z=t[y],E=z.length,C;for(q=j-l-k;q<=j+l+k;q+=a)x.push(q);w=x.length;if(E>w){h=[].concat(z);h.sort(v);for(q=E;q--;)h[q].rank=q;for(q=E;q--;)z[q].rank>=w&&z.splice(q,1);E=z.length}for(q=0;q<E;q++){b=z[q];h=b.labelPos;b=9999;for(s=0;s<w;s++)g=Ba(x[s]-h[1]),g<b&&(b=g,C=s);if(C<q&&x[q]!==null)C=q;else for(w<E-q+C&&x[q]!==null&&(C=w-E+q);x[C]===null;)C++;A.push({i:C,y:x[C]});x[C]=null}A.sort(v);for(q=0;q<E;q++){b=z[q];h=b.labelPos; -g=b.dataLabel;s=A.pop();r=h[1];w=b.visible===!1?ab:eb;C=s.i;s=s.y;if(r>s&&x[C+1]!==null||r<s&&x[C-1]!==null)s=r;r=this.getX(C===0||C===x.length-1?r:s,y);g.attr({visibility:w,align:h[6]})[g.moved?"animate":"attr"]({x:r+d.x+({left:e,right:-e}[h[6]]||0),y:s+d.y});g.moved=!0;if(n&&f)g=b.connector,h=i?[wa,r+(h[6]==="left"?5:-5),s,"C",r,s,2*h[2]-h[4],2*h[3]-h[5],h[2],h[3],fa,h[4],h[5]]:[wa,r+(h[6]==="left"?5:-5),s,fa,h[2],h[3],fa,h[4],h[5]],g?(g.animate({d:h}),g.attr("visibility",w)):b.connector=g=this.chart.renderer.path(h).attr({"stroke-width":f, -stroke:d.connectorColor||b.color||"#606060",visibility:w,zIndex:3}).translate(c.plotLeft,c.plotTop).add()}}}},drawTracker:zb.prototype.drawTracker,getSymbol:function(){}});Ha.pie=w;L(Highcharts,{Chart:wc,dateFormat:ac,pathAnim:La,getOptions:function(){return Ea},hasBidiBug:Qc,numberFormat:dc,Point:lb,Color:ma,Renderer:Xb,SVGRenderer:Eb,VMLRenderer:$a,CanVGRenderer:oc,seriesTypes:Ha,setOptions:function(a){$b=K($b,a.xAxis);kc=K(kc,a.yAxis);a.xAxis=a.yAxis=X;Ea=K(Ea,a);vc();return Ea},Series:$,addEvent:ha, -removeEvent:Qa,createElement:Aa,discardElement:Tb,css:P,each:o,extend:L,map:Vb,merge:K,pick:p,splat:Hb,extendClass:pa,placeBox:uc,product:"Highcharts",version:"2.2.1"})})(); diff --git a/apps/storage_charts/js/units.min.js b/apps/storage_charts/js/units.min.js deleted file mode 100644 index 5815f75fbb7..00000000000 --- a/apps/storage_charts/js/units.min.js +++ /dev/null @@ -1,23 +0,0 @@ -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -function getLinesUsseUnitsSelect(s){$('#clines_usse h3').append('<span id="selunits"><span id="selloader"></span><select id="chunits"><option value="1"'+(s==1?' selected':'')+'>'+t('storage_charts','Kilobytes (KB)')+'</option><option value="2"'+(s==2?' selected':'')+'>'+t('storage_charts','Megabytes (MB)')+'</option><option value="3"'+(s==3?' selected':'')+'>'+t('storage_charts','Gigabytes (GB)')+'</option><option value="4"'+(s==4?' selected':'')+'>'+t('storage_charts','Terabytes (TB)')+'</option></select></span>');$('#chunits').chosen();$('#chunits').change(function(){$('#selloader').html('<img src="'+OC.imagePath('storage_charts','loader.gif')+'" />');$.ajax({type:'POST',url:OC.linkTo('storage_charts','ajax/data.php'),dataType:'json',data:{s:$('#chunits').val(),k:'hu_size'},async:true,success:function(s){eval(s.r);$('#selloader img').remove();}});});} -function getHistoUsUnitsSelect(s){$('#chisto_us h3').append('<span id="selunits_hus"><span id="selloader_hus"></span><select id="chunits_hus"><option value="1"'+(s==1?' selected':'')+'>'+t('storage_charts','Kilobytes (KB)')+'</option><option value="2"'+(s==2?' selected':'')+'>'+t('storage_charts','Megabytes (MB)')+'</option><option value="3"'+(s==3?' selected':'')+'>'+t('storage_charts','Gigabytes (GB)')+'</option><option value="4"'+(s==4?' selected':'')+'>'+t('storage_charts','Terabytes (TB)')+'</option></select></span>');$('#chunits_hus').chosen();$('#chunits_hus').change(function(){$('#selloader_hus').html('<img src="'+OC.imagePath('storage_charts','loader.gif')+'" />');$.ajax({type:'POST',url:OC.linkTo('storage_charts','ajax/data.php'),dataType:'json',data:{s:$('#chunits_hus').val(),k:'hu_size_hus'},async:true,success:function(s){eval(s.r);$('#selloader_hus img').remove();}});});} diff --git a/apps/storage_charts/l10n/de.php b/apps/storage_charts/l10n/de.php deleted file mode 100644 index e58e8acde2e..00000000000 --- a/apps/storage_charts/l10n/de.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -* English texts -* -*/ - -$TRANSLATIONS = Array( - 'all users' => 'Alle Benutzer', - 'April' => 'April', - 'August' => 'August', - 'December' => 'Dezember', - 'February' => 'Februar', - 'January' => 'Januar', - 'July' => 'Juli', - 'June' => 'Juni', - 'March' => 'März', - 'May' => 'Mai', - 'November' => 'November', - 'October' => 'Oktober', - 'September' => 'September', - 'Monthly Used Space Evolution' => 'Entwicklung des monatlich genutzten Speichers', - 'Last 7 days' => 'Die letzten 7 Tage', - 'Daily Used Space Evolution' => 'Entwicklung des täglich genutzten Speichers', - 'Current ratio free space / used space' => 'Aktuelles Verhältnis zwischen freier Speicher / genutzter Speicher', - 'for' => 'für', - 'Free space' => 'Freier Speicher', - 'Drag\'N\'Drop on the chart title to re-order' => 'Drag\'N\'Drop der Diagrammnamen zum neuordnern', - 'Gigabytes (GB)' => 'Gigabytes (GB)', - 'Kilobytes (KB)' => 'Kilobytes (KB)', - 'Megabytes (MB)' => 'Megabytes (MB)', - 'Terabytes (TB)' => 'Terabytes (TB)', - 'Used space' => 'Genutzter Speicher', - 'Average used space' => 'Durchschnittlich verbrauchter Speicher', - - // Personal settings - 'Save' => 'Speichern', - 'Save OK' => 'Speichern erfolgreich', - 'Uncheck charts you do not want to display' => 'Diagramme abwählen die nicht angezeigt werden sollen' -);
\ No newline at end of file diff --git a/apps/storage_charts/l10n/en.php b/apps/storage_charts/l10n/en.php deleted file mode 100644 index 7676107aa31..00000000000 --- a/apps/storage_charts/l10n/en.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -* English texts -* -*/ - -$TRANSLATIONS = Array( - 'all users' => 'all users', - 'April' => 'April', - 'August' => 'August', - 'Average used space' => 'Average used space', - 'December' => 'December', - 'February' => 'February', - 'January' => 'January', - 'July' => 'July', - 'June' => 'June', - 'March' => 'March', - 'May' => 'May', - 'November' => 'November', - 'October' => 'October', - 'September' => 'September', - 'Monthly Used Space Evolution' => 'Monthly Used Space Evolution', - 'Last 7 days' => 'Last 7 days', - 'Daily Used Space Evolution' => 'Daily Used Space Evolution', - 'Current ratio free space / used space' => 'Current ratio free space / used space', - 'for' => 'for', - 'Free space' => 'Free space', - 'Drag\'N\'Drop on the chart title to re-order' => 'Drag\'N\'Drop on the chart title to re-order', - 'Gigabytes (GB)' => 'Gigabytes (GB)', - 'Kilobytes (KB)' => 'Kilobytes (KB)', - 'Megabytes (MB)' => 'Megabytes (MB)', - 'Terabytes (TB)' => 'Terabytes (TB)', - 'Used space' => 'Used space', - - // Personal settings - 'Save' => 'Save', - 'Save OK' => 'Save OK', - 'Uncheck charts you do not want to display' => 'Uncheck charts you do not want to display' -);
\ No newline at end of file diff --git a/apps/storage_charts/l10n/fr.php b/apps/storage_charts/l10n/fr.php deleted file mode 100644 index 9d1b23b34df..00000000000 --- a/apps/storage_charts/l10n/fr.php +++ /dev/null @@ -1,58 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -* French texts -* -*/ - -$TRANSLATIONS = Array( - 'all users' => 'tous les utilisateurs', - 'April' => 'Avril', - 'August' => 'Août', - 'December' => 'Décembre', - 'February' => 'Février', - 'January' => 'Janvier', - 'July' => 'Juillet', - 'June' => 'Juin', - 'March' => 'Mars', - 'May' => 'Mai', - 'November' => 'Novembre', - 'October' => 'Octobre', - 'September' => 'Septembre', - 'Monthly Used Space Evolution' => 'Evolution mensuelle de l\'espace utilisé', - 'Last 7 days' => 'Les 7 derniers jours', - 'Daily Used Space Evolution' => 'Evolution quotidienne de l\'espace utilisé', - 'Current ratio free space / used space' => 'Ratio Espace libre / Espace utilisé actuel', - 'for' => 'pour', - 'Free space' => 'Espace libre', - 'Drag\'N\'Drop on the chart title to re-order' => 'Drag\'N\'Drop sur le titre du graph pour changer l\'ordre', - 'Gigabytes (GB)' => 'Gigabytes (GB)', - 'Kilobytes (KB)' => 'Kilobytes (KB)', - 'Megabytes (MB)' => 'Megabytes (MB)', - 'Terabytes (TB)' => 'Terabytes (TB)', - 'Used space' => 'Espace utilisé', - 'Average used space' => 'Espace utilisé moyen', - - // Personal settings - 'Save' => 'Enregistrer', - 'Save OK' => 'Enregistrement OK', - 'Uncheck charts you do not want to display' => 'Décochez les graphs que vous ne voulez pas afficher' -);
\ No newline at end of file diff --git a/apps/storage_charts/l10n/pt_BR.php b/apps/storage_charts/l10n/pt_BR.php deleted file mode 100644 index 823e19a6edd..00000000000 --- a/apps/storage_charts/l10n/pt_BR.php +++ /dev/null @@ -1,59 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -* Portuguese texts -* 26/May/2012 - Translated by Tiago Soares (tbsoares@gmail.com) -* -*/ - -$TRANSLATIONS = Array( - 'all users' => 'Todos os usuários', - 'April' => 'Abril', - 'August' => 'Agosto', - 'Average used space' => 'Média de espaço utilizado', - 'December' => 'Dezembro', - 'February' => 'Fevereiro', - 'January' => 'Janeiro', - 'July' => 'Julho', - 'June' => 'Junho', - 'March' => 'Março', - 'May' => 'Maio', - 'November' => 'Novembro', - 'October' => 'Outubro', - 'September' => 'Setembro', - 'Monthly Used Space Evolution' => 'Evolução mensal do espaço utilizado', - 'Last 7 days' => 'Últimos 7 dias', - 'Daily Used Space Evolution' => 'Evolução diária do espaço utilizado', - 'Current ratio free space / used space' => 'Proporção atual entre espaço livre / espaço utilizado', - 'for' => 'para', - 'Free space' => 'Espaço livre', - 'Drag\'N\'Drop on the chart title to re-order' => 'Arraste e solte no tÃtulo do gráfico para reordenar', - 'Gigabytes (GB)' => 'Gigabytes (GB)', - 'Kilobytes (KB)' => 'Kilobytes (KB)', - 'Megabytes (MB)' => 'Megabytes (MB)', - 'Terabytes (TB)' => 'Terabytes (TB)', - 'Used space' => 'Espaço utlizado', - - // Personal settings - 'Save' => 'Salvar', - 'Save OK' => 'Salvo', - 'Uncheck charts you do not want to display' => 'Desmarque os gráficos que não deseja exibir' -); diff --git a/apps/storage_charts/lib/db.class.php b/apps/storage_charts/lib/db.class.php deleted file mode 100644 index 4479622180a..00000000000 --- a/apps/storage_charts/lib/db.class.php +++ /dev/null @@ -1,290 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * This class manages storage_charts. - */ -class OC_DLStCharts { - - /** - * UPDATE day use for a user - * @param $used user used space - * @param $total total users used space - */ - public static function update($used, $total){ - $query = OCP\DB::prepare("SELECT stc_id FROM *PREFIX*dlstcharts WHERE oc_uid = ? AND stc_dayts = ?"); - $result = $query->execute(Array(OCP\User::getUser(), mktime(0,0,0)))->fetchRow(); - if($result){ - $query = OCP\DB::prepare("UPDATE *PREFIX*dlstcharts SET stc_used = ?, stc_total = ? WHERE stc_id = ?"); - $query->execute(Array($used, $total, $result['stc_id'])); - }else{ - $query = OCP\DB::prepare("INSERT INTO *PREFIX*dlstcharts (oc_uid,stc_month,stc_dayts,stc_used,stc_total) VALUES (?,?,?,?,?)"); - $query->execute(Array(OCP\User::getUser(), date('Ym'), mktime(0,0,0), $used, $total)); - } - } - - /** - * Get the size of the data folder - * @param $path path to the folder you want to calculate the total size - */ - public static function getTotalDataSize($path){ - if(is_file($path)){ - $path = dirname($path); - } - $path = str_replace('//', '/', $path); - if(is_dir($path) and strcmp(substr($path, -1), '/') != 0){ - $path .= '/'; - } - $size = 0; - if($dh = opendir($path)){ - while(($filename = readdir($dh)) !== false) { - if(strcmp($filename, '.') != 0 and strcmp($filename, '..') != 0){ - $subFile = $path . '/' . $filename; - if(is_file($subFile)){ - $size += filesize($subFile); - }else{ - $size += self::getTotalDataSize($subFile); - } - } - } - } - return $size; - } - - /** - * Get data to build the pie about the Free-Used space ratio - */ - public static function getPieFreeUsedSpaceRatio(){ - if(OC_Group::inGroup(OCP\User::getUser(), 'admin')){ - $query = OCP\DB::prepare("SELECT stc_id, stc_dayts, oc_uid FROM (SELECT * FROM *PREFIX*dlstcharts ORDER BY stc_dayts DESC) last GROUP BY oc_uid"); - $results = $query->execute()->fetchAll(); - }else{ - $query = OCP\DB::prepare("SELECT stc_id, MAX(stc_dayts) as stc_dayts FROM *PREFIX*dlstcharts WHERE oc_uid = ?"); - $results = $query->execute(Array(OCP\User::getUser()))->fetchAll(); - } - - $return = Array(); - foreach($results as $result){ - $query = OCP\DB::prepare("SELECT oc_uid, stc_used, stc_total FROM *PREFIX*dlstcharts WHERE stc_id = ?"); - $return[] = $query->execute(Array($result['stc_id']))->fetchAll(); - } - - return $return; - } - - /** - * Get data to build the line chart about last 7 days used space evolution - */ - public static function getUsedSpaceOverTime($time){ - $return = Array(); - if(OC_Group::inGroup(OCP\User::getUser(), 'admin')){ - foreach(OCP\User::getUsers() as $user){ - if(strcmp($time, 'daily') == 0){ - $return[$user] = self::getDataByUserToLineChart($user); - }else{ - $return[$user] = self::getDataByUserToHistoChart($user); - } - } - }else{ - if(strcmp($time, 'daily') == 0){ - $return[OCP\User::getUser()] = self::getDataByUserToLineChart(OCP\User::getUser()); - }else{ - $return[OCP\User::getUser()] = self::getDataByUserToHistoChart(OCP\User::getUser()); - } - } - return $return; - } - - /** - * Get configuration values stored in the database - * @param $key The conf key - * @return Array The conf value - */ - public static function getUConfValue($key, $default = NULL){ - $query = OCP\DB::prepare("SELECT uc_id,uc_val FROM *PREFIX*dlstcharts_uconf WHERE oc_uid = ? AND uc_key = ?"); - $result = $query->execute(Array(OCP\User::getUser(), $key))->fetchRow(); - if($result){ - return $result; - } - return $default; - } - - /** - * Set configuration values stored in the database - * @param $key The conf key - * @param $val The conf value - */ - public static function setUConfValue($key,$val){ - $conf = self::getUConfValue($key); - if(!is_null($conf)){ - $query = OCP\DB::prepare("UPDATE *PREFIX*dlstcharts_uconf SET uc_val = ? WHERE uc_id = ?"); - $query->execute(Array($val, $conf['uc_id'])); - }else{ - $query = OCP\DB::prepare("INSERT INTO *PREFIX*dlstcharts_uconf (oc_uid,uc_key,uc_val) VALUES (?,?,?)"); - $query->execute(Array(OCP\User::getUser(), $key, $val)); - } - } - - /** - * Parse an array and return data in the highCharts format - * @param $operation operation to do - * @param $elements elements to parse - */ - public static function arrayParser($operation, $elements, $l, $data_sep = ',', $ck = 'hu_size'){ - $return = ""; - switch($operation){ - case 'pie': - $free = $total = 0; - foreach($elements as $element){ - $element = $element[0]; - - $total = $element['stc_total']; - $free += $element['stc_used']; - - $return .= "['" . $element['oc_uid'] . "', " . $element['stc_used'] . "],"; - } - $return .= "['" . $l->t('Free space') . "', " . ($total - $free) . "]"; - break; - case 'histo': - case 'line': - $conf = self::getUConfValue($ck, Array('uc_val' => 3)); - $div = 1; - switch($conf['uc_val']){ - case 4: - $div = 1024; - case 3: - $div *= 1024; - case 2: - $div *= 1024; - case 1: - $div *= 1024; - } - - foreach($elements as $user => $data){ - $return_tmp = '{"name":"' . $user . '","data":['; - foreach($data as $number){ - $return_tmp .= round($number/$div, 2) . ","; - } - $return_tmp = substr($return_tmp, 0, -1) . "]}"; - - $return .= $return_tmp . $data_sep; - } - $return = substr($return, 0, -(strlen($data_sep))); - break; - } - return $return; - } - - /** - * Get data by user for Seven Days Line Chart - * @param $user the user - * @return Array - */ - private static function getDataByUserToLineChart($user){ - $dates = Array( - mktime(0,0,0,date('m'),date('d')-6), - mktime(0,0,0,date('m'),date('d')-5), - mktime(0,0,0,date('m'),date('d')-4), - mktime(0,0,0,date('m'),date('d')-3), - mktime(0,0,0,date('m'),date('d')-2), - mktime(0,0,0,date('m'),date('d')-1), - mktime(0,0,0,date('m'),date('d')) - ); - - $return = Array(); - foreach($dates as $kd => $date){ - $query = OCP\DB::prepare("SELECT stc_used FROM *PREFIX*dlstcharts WHERE oc_uid = ? AND stc_dayts = ?"); - $result = $query->execute(Array($user, $date))->fetchAll(); - - if(count($result) > 0){ - $return[] = $result[0]['stc_used']; - }else{ - if($kd == 0){ - $query = OCP\DB::prepare("SELECT stc_used FROM *PREFIX*dlstcharts WHERE oc_uid = ? AND stc_dayts < ? ORDER BY stc_dayts DESC"); - $result = $query->execute(Array($user, $date))->fetchAll(); - - if(count($result) > 0){ - $return[] = $result[0]['stc_used']; - }else{ - $return[] = 0; - } - }else{ - $return[] = 0; - } - } - } - - $last = 0; - foreach ($return as $key => $value) { - if($value == 0){ - $return[$key] = $last; - } - $last = $return[$key]; - } - return $return; - } - - /** - * Get data by users for monthly evolution - * @param $user The user - * @return Array - */ - private static function getDataByUserToHistoChart($user){ - $months = Array( - date('Ym',mktime(0,0,0,date('m')-11)), - date('Ym',mktime(0,0,0,date('m')-10)), - date('Ym',mktime(0,0,0,date('m')-9)), - date('Ym',mktime(0,0,0,date('m')-8)), - date('Ym',mktime(0,0,0,date('m')-7)), - date('Ym',mktime(0,0,0,date('m')-6)), - date('Ym',mktime(0,0,0,date('m')-5)), - date('Ym',mktime(0,0,0,date('m')-4)), - date('Ym',mktime(0,0,0,date('m')-3)), - date('Ym',mktime(0,0,0,date('m')-2)), - date('Ym',mktime(0,0,0,date('m')-1)), - date('Ym',mktime(0,0,0,date('m'))) - ); - - $return = Array(); - foreach($months as $km => $month){ - $query = OCP\DB::prepare("SELECT AVG(stc_used) as stc_used FROM *PREFIX*dlstcharts WHERE oc_uid = ? AND stc_month = ?"); - $result = $query->execute(Array($user, $month))->fetchAll(); - - if(count($result) > 0){ - $return[] = $result[0]['stc_used']; - }else{ - $return[] = 0; - } - } - - $last = 0; - foreach ($return as $key => $value) { - if($value == 0){ - $return[$key] = $last; - } - $last = $return[$key]; - } - return $return; - } - -}
\ No newline at end of file diff --git a/apps/storage_charts/lib/loader.class.php b/apps/storage_charts/lib/loader.class.php deleted file mode 100644 index 3df5abe5842..00000000000 --- a/apps/storage_charts/lib/loader.class.php +++ /dev/null @@ -1,102 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -/** - * This class load charts for storage_charts. - */ -class OC_DLStChartsLoader { - - private static $l; - - /** - * Loader - * @param $chart_id The chart iD - * @return String - */ - public static function loadChart($chart_id, $l){ - self::$l = $l; - - switch($chart_id){ - case 'cpie_rfsus': - return self::loadPieFreeUsedSpaceRatioChart(); - break; - case 'clines_usse': - return self::loadLinesLastSevenDaysUsedSpaceChart(); - break; - case 'chisto_us': - return self::loadHistoMonthlyUsedSpaceChart(); - break; - } - } - - /** - * Get free/used space ratio chart - * @return String - */ - private static function loadPieFreeUsedSpaceRatioChart(){ - return 'pierfsus=new Highcharts.Chart({chart:{renderTo:\'pie_rfsus\',backgroundColor:\'#F8F8F8\',plotBackgroundColor:\'#F8F8F8\',plotBorderWidth:false,plotShadow:false},title:{text:\'\'},tooltip:{formatter:function(){return \'<b>\'+this.point.name+\'</b>: \'+(Math.round(this.percentage*100)/100)+\' %\';}},plotOptions:{pie:{allowPointSelect:true,cursor:\'pointer\',dataLabels:{enabled:true,color:\'#000000\',connectorColor:\'#000000\',formatter:function(){return\'<b>\'+this.point.name+\'</b>: \'+Math.round(this.percentage)+\' %\';}}}},series:[{type:\'pie\',name:\'Used-Free space ratio\',data:[' . OC_DLStCharts::arrayParser('pie',OC_DLStCharts::getPieFreeUsedSpaceRatio(), self::$l) . ']}],exporting:{enabled:false}});'; - } - - /** - * Get seven days used space evolution chart - * @return String - */ - private static function loadLinesLastSevenDaysUsedSpaceChart(){ - $units = Array('', 'KB', 'MB', 'GB', 'TB'); - $u = OC_DLStCharts::getUConfValue('hu_size', Array('uc_val' => 3)); - $u = $units[$u['uc_val']]; - return 'linesusse=new Highcharts.Chart({chart:{renderTo:\'lines_usse\',backgroundColor:\'#F8F8F8\',plotBackgroundColor:\'#F8F8F8\',type:\'line\'},title:{text:\'\'},subtitle:{text:\''.self::$l->t('Last 7 days').'\',x:-20},xAxis:{categories:["'.date('m/d', mktime(0,0,0,date('m'),date('d')-6)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d')-5)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d')-4)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d')-3)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d')-2)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d')-1)).'","'.date('m/d', mktime(0,0,0,date('m'),date('d'))).'"]},yAxis:{title:{text:\''.self::$l->t('Used space').' ('.$u.')\'},plotLines:[{value:0,width:1,color:\'#808080\'}],startOnTick:false,min:0},tooltip:{crosshairs:true,formatter:function(){return \'<b>\'+this.series.name+\'</b><br/>\'+this.x+\': \'+this.y+\' '.$u.'\';}},legend:{layout:\'horizontal\',align:\'center\',verticalAlign:\'top\',x:-25,y:40,borderWidth:0},series:['.OC_DLStCharts::arrayParser('line', OC_DLStCharts::getUsedSpaceOverTime('daily'), self::$l).'],exporting:{enabled:false}});'; - } - - /** - * Get monthly used space evolution chart - * @return String - */ - private static function loadHistoMonthlyUsedSpaceChart(){ - $units = Array('', 'KB', 'MB', 'GB', 'TB'); - $u = OC_DLStCharts::getUConfValue('hu_size_hus', Array('uc_val' => 3)); - $u = $units[$u['uc_val']]; - - $months = self::getMonths(); - - return 'histous=new Highcharts.Chart({chart:{renderTo:\'histo_us\',backgroundColor:\'#F8F8F8\',plotBackgroundColor:\'#F8F8F8\',type:\'column\'},title:{text:\'\'},xAxis:{categories:["'.self::$l->t($months[0]).' '.date('Y',mktime(0,0,0,date('m')-11)).'","'.self::$l->t($months[1]).' '.date('Y',mktime(0,0,0,date('m')-10)).'","'.self::$l->t($months[2]).' '.date('Y',mktime(0,0,0,date('m')-9)).'","'.self::$l->t($months[3]).' '.date('Y',mktime(0,0,0,date('m')-8)).'","'.self::$l->t($months[4]).' '.date('Y',mktime(0,0,0,date('m')-7)).'","'.self::$l->t($months[5]).' '.date('Y',mktime(0,0,0,date('m')-6)).'","'.self::$l->t($months[6]).' '.date('Y',mktime(0,0,0,date('m')-5)).'","'.self::$l->t($months[7]).' '.date('Y',mktime(0,0,0,date('m')-4)).'","'.self::$l->t($months[8]).' '.date('Y',mktime(0,0,0,date('m')-3)).'","'.self::$l->t($months[9]).' '.date('Y',mktime(0,0,0,date('m')-2)).'","'.self::$l->t($months[10]).' '.date('Y',mktime(0,0,0,date('m')-1)).'","'.self::$l->t($months[11]).' '.date('Y',mktime(0,0,0,date('m'))).'"]},yAxis:{min:0,title:{text:\''.self::$l->t('Average used space').' ('.$u.')\'},stackLabels:{enabled:true,style:{fontWeight:\'bold\',color:(Highcharts.theme&&Highcharts.theme.textColor)||\'gray\'},formatter:function(){return(Math.round(this.total*100)/100);}}},legend:{align:\'center\',x:-20,verticalAlign:\'top\',y:20,floating:true,backgroundColor:(Highcharts.theme&&Highcharts.theme.legendBackgroundColorSolid)||\'white\',borderColor:\'#CCC\',borderWidth:1,shadow:false},tooltip:{formatter:function(){return \'<b>\'+this.x+\'</b><br/>\'+this.series.name+\': \'+(Math.round(this.y*100)/100)+\' '.$u.'<br/>\'+\'Total: \'+(Math.round(this.point.stackTotal*100)/100)+\' '.$u.'\';}},plotOptions:{column:{stacking:\'normal\',dataLabels:{enabled:false,color:(Highcharts.theme&&Highcharts.theme.dataLabelsColor)||\'white\'}}},series:['.OC_DLStCharts::arrayParser('histo',OC_DLStCharts::getUsedSpaceOverTime('monthly'),self::$l,',','hu_size_hus').'],exporting:{enabled:false}});'; - } - - /** - * Get months - */ - private static function getMonths(){ - $months = Array('January','February','March','April','May','June','July','August','September','October','November','December'); - - $tmp = Array(); - for($i=date('n');$i<12;$i++){ - $tmp[] = $months[$i]; - } - for($i=0;$i<date('n');$i++){ - $tmp[] = $months[$i]; - } - - return $tmp; - } - -}
\ No newline at end of file diff --git a/apps/storage_charts/settings.php b/apps/storage_charts/settings.php deleted file mode 100644 index 6a436844525..00000000000 --- a/apps/storage_charts/settings.php +++ /dev/null @@ -1,43 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -OCP\User::checkLoggedIn(); -OCP\App::checkAppEnabled('storage_charts'); - -$tmpl = new OCP\Template('storage_charts', 'settings.tpl'); - -if(isset($_POST['storage_charts_disp']) && count($_POST['storage_charts_disp']) <= 3){ - $c = $_POST['storage_charts_disp']; - $c_disp = Array('cpie_rfsus'=>0,'clines_usse'=>0,'chisto_us'=>0); - foreach(array_keys($c_disp) as $chart){ - if(in_array($chart, $c)){ - $c_disp[$chart] = 1; - } - } - OC_DLStCharts::setUConfValue('c_disp', serialize($c_disp)); - $tmpl->assign('stc_save_ok', TRUE); -} - -$displays = OC_DLStCharts::getUConfValue('c_disp', Array('uc_val' => 'a:3:{s:10:"cpie_rfsus";i:1;s:11:"clines_usse";i:1;s:9:"chisto_us";i:1;}')); -$tmpl->assign('displays', unserialize($displays['uc_val'])); -return $tmpl->fetchPage();
\ No newline at end of file diff --git a/apps/storage_charts/templates/charts.tpl.php b/apps/storage_charts/templates/charts.tpl.php deleted file mode 100644 index 98d20706dfe..00000000000 --- a/apps/storage_charts/templates/charts.tpl.php +++ /dev/null @@ -1,77 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -* JS minified by http://fmarcia.info/jsmin/test.html -* -*/ - -OCP\Util::addStyle('storage_charts', 'styles'); -OCP\Util::addScript('storage_charts', 'highCharts-2.2.1/highcharts.min'); -OCP\Util::addScript('3rdparty','chosen/chosen.jquery.min'); -OCP\Util::addStyle('3rdparty','chosen'); -OCP\Util::addScript('storage_charts', 'units.min'); - -?> - -<script type="text/javascript"> - $(document).ready(function(){ - $('#stc_sortable').sortable({ - axis:'y',handle:'h3',placeholder:'ui-state-highlight',update:function(e,u){ - $.ajax({ - type:'POST', - url:OC.linkTo('storage_charts','ajax/config.php'), - dataType:'json', - data:{o:'set',k:'sc_sort',i:$('#stc_sortable').sortable('toArray')}, - async:true - }); - } - }); - $('#stc_sortable').disableSelection(); - }); -</script> - -<div id="storage-charts"> - <div class="personalblock topblock titleblock"> - DjazzLab Storage Charts<span><?php print($l->t('Drag\'N\'Drop on the chart title to re-order')); ?></span> - </div> -</div> -<div id="stc_frame"> - <div id="stc_sortable"> - <?php foreach($_['sc_sort'] as $sc_sort){ - if(strcmp($sc_sort, 'cpie_rfsus') == 0){ - $sc_sort_title = 'Current ratio free space / used space'; - }elseif(strcmp($sc_sort, 'clines_usse') == 0){ - $sc_sort_title = 'Daily Used Space Evolution'; - }else{ - $sc_sort_title = 'Monthly Used Space Evolution'; - } - if($_['c_disp'][$sc_sort]){ ?> - <div id="<?php print($sc_sort); ?>" class="personalblock"> - <h3><img src="<?php print(OCP\Util::imagePath('storage_charts', 'move.png')); ?>" /><?php print($l->t($sc_sort_title).' '.$l->t('for')); ?> "<?php print(OC_Group::inGroup(OCP\User::getUser(), 'admin')?$l->t('all users'):OCP\User::getUser()); ?>"</h3> - <div id="<?php print(substr($sc_sort, 1)); ?>" style="max-width:100%;height:400px;margin:0 auto"></div> - <script type="text/javascript">$(document).ready(function(){<?php print(OC_DLStChartsLoader::loadChart($sc_sort, $l)); ?>});</script> - </div> - <?php } - } ?> - </div> - <?php if($_['c_disp']['clines_usse']){print('<script type="text/javascript">$(document).ready(function(){getLinesUsseUnitsSelect('.$_['hu_size'].');});</script>');} - if($_['c_disp']['chisto_us']){print('<script type="text/javascript">$(document).ready(function(){getHistoUsUnitsSelect(' . $_['hu_size_hus'] . ');});</script>');} ?> -</div>
\ No newline at end of file diff --git a/apps/storage_charts/templates/settings.tpl.php b/apps/storage_charts/templates/settings.tpl.php deleted file mode 100644 index 6b86850c938..00000000000 --- a/apps/storage_charts/templates/settings.tpl.php +++ /dev/null @@ -1,40 +0,0 @@ -<?php - -/** -* ownCloud - DjazzLab Storage Charts plugin -* -* @author Xavier Beurois -* @copyright 2012 Xavier Beurois www.djazz-lab.net -* -* This library is free software; you can redistribute it and/or -* modify it under the terms of the GNU AFFERO GENERAL PUBLIC LICENSE -* License as published by the Free Software Foundation; either -* version 3 of the License, or any later version. -* -* This library 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 AFFERO GENERAL PUBLIC LICENSE for more details. -* -* You should have received a copy of the GNU Lesser General Public -* License along with this library. If not, see <http://www.gnu.org/licenses/>. -* -*/ - -?> -<form id="storage_charts" method="POST" action="<?php print(OC_Helper::linkTo('settings','personal.php')); ?>"> - <fieldset class="personalblock"> - <strong>DjazzLab Storage Charts</strong><span style="margin-left:10px;color:#BBB;font-style:italic;"><?php print($l->t('Uncheck charts you do not want to display')); ?></span> - <?php foreach($_['displays'] as $chart => $is_enable){ - if(strcmp($chart, 'cpie_rfsus') == 0){ - $chart_title = 'Current ratio free space / used space'; - }elseif(strcmp($chart, 'clines_usse') == 0){ - $chart_title = 'Daily Used Space Evolution'; - }else{ - $chart_title = 'Monthly Used Space Evolution'; - } ?> - <div><input type="checkbox" name="storage_charts_disp[]" id="<?php print($chart); ?>_e" style="margin-right:10px;"<?php print($is_enable?' checked':'') ?> value="<?php print($chart); ?>" /><?php print($l->t($chart_title)); ?></div> - <?php } ?> - <input type="submit" value="<?php print($l->t('Save')); ?>" /><span style="color:#00A220;"><?php if(isset($_['stc_save_ok'])){print($l->t('Save OK'));} ?></span> - </fieldset> -</form> diff --git a/apps/tal/.gitignore b/apps/tal/.gitignore deleted file mode 100644 index e2ff07d14d8..00000000000 --- a/apps/tal/.gitignore +++ /dev/null @@ -1,51 +0,0 @@ -# the default generated dir + db file -data -owncloud -config/config.php -config/mount.php -apps/inc.php - -# just sane ignores -.*.sw[po] -*.bak -*.BAK -*~ -*.orig -*.class -.cvsignore -Thumbs.db -*.py[co] -_darcs/* -CVS/* -.svn/* -RCS/* - -# kdevelop -.kdev -*.kdev4 - -# Lokalize -*lokalize* - -# eclipse -.project -.settings - -# netbeans -nbproject - -# geany -*.geany - -# Cloud9IDE -.settings.xml - -# vim ex mode -.vimrc - -# Mac OS -.DS_Store - -# WebFinger -.well-known -/.buildpath diff --git a/apps/tal/COPYING-AGPL b/apps/tal/COPYING-AGPL deleted file mode 100644 index dba13ed2ddf..00000000000 --- a/apps/tal/COPYING-AGPL +++ /dev/null @@ -1,661 +0,0 @@ - GNU AFFERO GENERAL PUBLIC LICENSE - Version 3, 19 November 2007 - - Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The GNU Affero General Public License is a free, copyleft license for -software and other kinds of works, specifically designed to ensure -cooperation with the community in the case of network server software. - - The licenses for most software and other practical works are designed -to take away your freedom to share and change the works. By contrast, -our General Public Licenses are 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. - - 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. - - Developers that use our General Public Licenses protect your rights -with two steps: (1) assert copyright on the software, and (2) offer -you this License which gives you legal permission to copy, distribute -and/or modify the software. - - A secondary benefit of defending all users' freedom is that -improvements made in alternate versions of the program, if they -receive widespread use, become available for other developers to -incorporate. Many developers of free software are heartened and -encouraged by the resulting cooperation. However, in the case of -software used on network servers, this result may fail to come about. -The GNU General Public License permits making a modified version and -letting the public access it on a server without ever releasing its -source code to the public. - - The GNU Affero General Public License is designed specifically to -ensure that, in such cases, the modified source code becomes available -to the community. It requires the operator of a network server to -provide the source code of the modified version running there to the -users of that server. Therefore, public use of a modified version, on -a publicly accessible server, gives the public access to the source -code of the modified version. - - An older license, called the Affero General Public License and -published by Affero, was designed to accomplish similar goals. This is -a different license, not a version of the Affero GPL, but Affero has -released a new version of the Affero GPL which permits relicensing under -this license. - - 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 Affero 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. Remote Network Interaction; Use with the GNU General Public License. - - Notwithstanding any other provision of this License, if you modify the -Program, your modified version must prominently offer all users -interacting with it remotely through a computer network (if your version -supports such interaction) an opportunity to receive the Corresponding -Source of your version by providing access to the Corresponding Source -from a network server at no charge, through some standard or customary -means of facilitating copying of software. This Corresponding Source -shall include the Corresponding Source for any work covered by version 3 -of the GNU General Public License that is incorporated pursuant to the -following paragraph. - - 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 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 work with which it is combined will remain governed by version -3 of the GNU General Public License. - - 14. Revised Versions of this License. - - The Free Software Foundation may publish revised and/or new versions of -the GNU Affero 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 Affero 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 Affero 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 Affero 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. - - <one line to give the program's name and a brief idea of what it does.> - Copyright (C) <year> <name of author> - - This program is free software: you can redistribute it and/or modify - it under the terms of the GNU Affero 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 Affero General Public License for more details. - - You should have received a copy of the GNU Affero General Public License - along with this program. If not, see <http://www.gnu.org/licenses/>. - -Also add information on how to contact you by electronic and paper mail. - - If your software can interact with users remotely through a computer -network, you should also make sure that it provides a way for users to -get its source. For example, if your program is a web application, its -interface could display a "Source" link that leads users to an archive -of the code. There are many ways you could offer source, and different -solutions will be better for different programs; see section 13 for the -specific requirements. - - 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 AGPL, see -<http://www.gnu.org/licenses/>. diff --git a/apps/tal/COPYING-README b/apps/tal/COPYING-README deleted file mode 100644 index 18f06caa3ec..00000000000 --- a/apps/tal/COPYING-README +++ /dev/null @@ -1,10 +0,0 @@ -Files in TAL Templating System for ownCloud are licensed under the Affero General Public License version 3, -the text of which can be found in COPYING-AGPL, or any later version of the AGPL, -unless otherwise noted. - -Licensing of components: -* PHPTAL - http://phptal.org/ : LGPL - -All unmodified files from these and other sources retain their original copyright -and license notices: see the relevant individual files. - diff --git a/apps/tal/README.md b/apps/tal/README.md deleted file mode 100644 index 756221c07a6..00000000000 --- a/apps/tal/README.md +++ /dev/null @@ -1,26 +0,0 @@ -# TAL Page Templates for ownCloud - -Develop using the Template Attribute Language instead of having clumsy -`<?php echo $var; ?>` tags in your markup. - -Read more at the [PHPTAL site](http://phptal.org/introduction.html) - -## Install from git - -1. Go to your ownCloud apps dir and clone the repo there: - <pre> - cd owncloud/apps - git clone git://github.com/tanghus/tal.git - </pre> - -2. Go to the `lib`directory of the newly created `tal` folder and clone the [PHPTAL repo](https://github.com/pornel/PHPTAL): - - <pre> - cd tal/lib - git clone git://github.com/pornel/PHPTAL.git - </pre> - -3. From your browser go to the ownCloud apps page (`/settings/apps.php`) and enable the "TAL Page Templates for ownCloud" app. - -4. Go to the Personal page (`/settings/personal.php`) and check if the installation has succeeded. You will find a section with a link to the manual. - diff --git a/apps/tal/TODO b/apps/tal/TODO deleted file mode 100644 index ef1e495249d..00000000000 --- a/apps/tal/TODO +++ /dev/null @@ -1,2 +0,0 @@ -TODO -- Create script to extract translatable strings. diff --git a/apps/tal/ajax/loadpage.php b/apps/tal/ajax/loadpage.php deleted file mode 100644 index f6a1499f454..00000000000 --- a/apps/tal/ajax/loadpage.php +++ /dev/null @@ -1,23 +0,0 @@ -<?php -/** - * Copyright (c) 2011 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('tal'); - -$id = isset($_GET['id'])?trim(strip_tags($_GET['id'])):''; - -if($id) { - $tmpl = new OC_TALTemplate('tal', 'sections'); - $tmpl->assign('id',$id); - $page = $tmpl->fetchPage(); - OCP\JSON::success(array('data' => array('id'=>$id, 'page'=>$page))); - exit(); -} else { - $l10n = new OC_L10N('tal'); - OCP\JSON::error(array('data' => array('message' => $l10n->t('Page name missing from request.')))); -}
\ No newline at end of file diff --git a/apps/tal/appinfo/app.php b/apps/tal/appinfo/app.php deleted file mode 100644 index 65c1c4b5bd5..00000000000 --- a/apps/tal/appinfo/app.php +++ /dev/null @@ -1,11 +0,0 @@ -<?php -OC::$CLASSPATH['OC_TALTemplate'] = 'tal/lib/taltemplate.php'; -OC::$CLASSPATH['OC_TALL10N'] = 'tal/lib/tall10n.php'; -OC::$CLASSPATH['PHPTAL'] = 'tal/lib/PHPTAL/classes/PHPTAL.php'; -OC::$CLASSPATH['PHPTAL_TranslationService'] = 'tal/lib/PHPTAL/classes/PHPTAL/TranslationService.php'; - -OCP\App::register( array( - 'id' => 'tal', - 'name' => 'TAL Page Templates' )); - -OCP\App::registerPersonal('tal','settings');
\ No newline at end of file diff --git a/apps/tal/appinfo/info.xml b/apps/tal/appinfo/info.xml deleted file mode 100644 index 40224f29ff3..00000000000 --- a/apps/tal/appinfo/info.xml +++ /dev/null @@ -1,11 +0,0 @@ -<?xml version="1.0"?> -<info> - <id>tal</id> - <name>TAL Page Templates for ownCloud</name> - <description>This is an alternative to OC_Template and OC_L10N - the templating and internationalization classes used in ownCloud. - </description> - <version>0.1</version> - <licence>AGPL</licence> - <author>Thomas Tanghus</author> - <require>5</require> -</info> diff --git a/apps/tal/css/tal.css b/apps/tal/css/tal.css deleted file mode 100644 index ed51bc5038d..00000000000 --- a/apps/tal/css/tal.css +++ /dev/null @@ -1,25 +0,0 @@ -#manual { - float: left; - position: absolute; left: 0; top: 0; right: 0; bottom: 0; - margin: 0.5em; - padding: 1em; - overflow: auto; - background-color :#f8f8f8; - color: #555; - border: 1px solid #ddd; - border-radius: 0.5em 0.5em 0.5em 0.5em; - -webkit-transition:background-color 200ms; -moz-transition:background-color 200ms; -o-transition:background-color 200ms; transition:background-color 200ms; -} -#manual nav { position: fixed; top: 5em; width: 15%; font-weight: bold; font-size: 1.2em; } -#manual ol { list-style: decimal; padding-left: 3em; } -#manual section { float:right; width: 80%; height: 95%; padding: 1em; font-size: 1.2em; } -#manual a { color: #555; } -#manual a:hover { color: #333; } -#manual li:hover { color: #333; background-color:#eee; } -code, pre { font-family: "Lucida Console", "Lucida Sans Typewriter", "DejaVu Sans Mono", monospace; } -code { margin: 0; padding: 0; } -pre { overflow:auto; display:block; margin: 1em; padding: 1em; background-color:#f5f5f5; border:1px solid rgba(0, 0, 0, 0.15); border-radius:4px;white-space:pre;} -h1 { font-size: 1.6em; font-weight: bold; padding: 0.2em 0.2em 0.8em 0.2em; } -h2 { font-size: 1.2em; font-weight: bold; padding: 1em 0.2em 0.8em 0em; } -h3 { font-size: 1em; font-weight: bold; } -.readmore { font-weight: bold; } diff --git a/apps/tal/index.php b/apps/tal/index.php deleted file mode 100644 index d847195dc9f..00000000000 --- a/apps/tal/index.php +++ /dev/null @@ -1,30 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -// Check if we are a user -OCP\User::checkLoggedIn(); -OCP\App::checkAppEnabled('tal'); - -OCP\Util::addscript('tal','tal'); -OCP\Util::addscript('tal','modernizr'); -OCP\Util::addStyle('tal','tal'); - -$sections = array( - array('id' => 'intro', 'title' => 'Introduction'), - array('id' => 'example-1', 'title' => 'A simple example'), - array('id' => 'gotchas', 'title' => 'Caveats & Gotchas'), - array('id' => 'ref', 'title' => 'References'), - ); -$page = isset($_GET['page'])?trim(strip_tags($_GET['page'])):$sections[0]['id']; - -$tmpl = new OC_TALTemplate('tal', 'manual', 'user'); -$tmpl->assign('application', 'TAL'); -$tmpl->assign('page', $page); -$tmpl->assign('sections', $sections); -$tmpl->printPage(); -?> diff --git a/apps/tal/js/modernizr.js b/apps/tal/js/modernizr.js deleted file mode 100644 index c1a6a9a51d0..00000000000 --- a/apps/tal/js/modernizr.js +++ /dev/null @@ -1,1265 +0,0 @@ -/*! - * Modernizr v2.5.3 - * www.modernizr.com - * - * Copyright (c) Faruk Ates, Paul Irish, Alex Sexton - * Available under the BSD and MIT licenses: www.modernizr.com/license/ - */ - -/* - * Modernizr tests which native CSS3 and HTML5 features are available in - * the current UA and makes the results available to you in two ways: - * as properties on a global Modernizr object, and as classes on the - * <html> element. This information allows you to progressively enhance - * your pages with a granular level of control over the experience. - * - * Modernizr has an optional (not included) conditional resource loader - * called Modernizr.load(), based on Yepnope.js (yepnopejs.com). - * To get a build that includes Modernizr.load(), as well as choosing - * which tests to include, go to www.modernizr.com/download/ - * - * Authors Faruk Ates, Paul Irish, Alex Sexton - * Contributors Ryan Seddon, Ben Alman - */ - -window.Modernizr = (function( window, document, undefined ) { - - var version = '2.5.3', - - Modernizr = {}, - - // option for enabling the HTML classes to be added - enableClasses = true, - - docElement = document.documentElement, - - /** - * Create our "modernizr" element that we do most feature tests on. - */ - mod = 'modernizr', - modElem = document.createElement(mod), - mStyle = modElem.style, - - /** - * Create the input element for various Web Forms feature tests. - */ - inputElem = document.createElement('input'), - - smile = ':)', - - toString = {}.toString, - - // List of property values to set for css tests. See ticket #21 - prefixes = ' -webkit- -moz- -o- -ms- '.split(' '), - - // Following spec is to expose vendor-specific style properties as: - // elem.style.WebkitBorderRadius - // and the following would be incorrect: - // elem.style.webkitBorderRadius - - // Webkit ghosts their properties in lowercase but Opera & Moz do not. - // Microsoft uses a lowercase `ms` instead of the correct `Ms` in IE8+ - // erik.eae.net/archives/2008/03/10/21.48.10/ - - // More here: github.com/Modernizr/Modernizr/issues/issue/21 - omPrefixes = 'Webkit Moz O ms', - - cssomPrefixes = omPrefixes.split(' '), - - domPrefixes = omPrefixes.toLowerCase().split(' '), - - ns = {'svg': 'http://www.w3.org/2000/svg'}, - - tests = {}, - inputs = {}, - attrs = {}, - - classes = [], - - slice = classes.slice, - - featureName, // used in testing loop - - - // Inject element with style element and some CSS rules - injectElementWithStyles = function( rule, callback, nodes, testnames ) { - - var style, ret, node, - div = document.createElement('div'), - // After page load injecting a fake body doesn't work so check if body exists - body = document.body, - // IE6 and 7 won't return offsetWidth or offsetHeight unless it's in the body element, so we fake it. - fakeBody = body ? body : document.createElement('body'); - - if ( parseInt(nodes, 10) ) { - // In order not to give false positives we create a node for each test - // This also allows the method to scale for unspecified uses - while ( nodes-- ) { - node = document.createElement('div'); - node.id = testnames ? testnames[nodes] : mod + (nodes + 1); - div.appendChild(node); - } - } - - // <style> elements in IE6-9 are considered 'NoScope' elements and therefore will be removed - // when injected with innerHTML. To get around this you need to prepend the 'NoScope' element - // with a 'scoped' element, in our case the soft-hyphen entity as it won't mess with our measurements. - // msdn.microsoft.com/en-us/library/ms533897%28VS.85%29.aspx - // Documents served as xml will throw if using ­ so use xml friendly encoded version. See issue #277 - style = ['­','<style>', rule, '</style>'].join(''); - div.id = mod; - // IE6 will false positive on some tests due to the style element inside the test div somehow interfering offsetHeight, so insert it into body or fakebody. - // Opera will act all quirky when injecting elements in documentElement when page is served as xml, needs fakebody too. #270 - fakeBody.innerHTML += style; - fakeBody.appendChild(div); - if(!body){ - //avoid crashing IE8, if background image is used - fakeBody.style.background = ""; - docElement.appendChild(fakeBody); - } - - ret = callback(div, rule); - // If this is done after page load we don't want to remove the body so check if body exists - !body ? fakeBody.parentNode.removeChild(fakeBody) : div.parentNode.removeChild(div); - - return !!ret; - - }, - - - // adapted from matchMedia polyfill - // by Scott Jehl and Paul Irish - // gist.github.com/786768 - testMediaQuery = function( mq ) { - - var matchMedia = window.matchMedia || window.msMatchMedia; - if ( matchMedia ) { - return matchMedia(mq).matches; - } - - var bool; - - injectElementWithStyles('@media ' + mq + ' { #' + mod + ' { position: absolute; } }', function( node ) { - bool = (window.getComputedStyle ? - getComputedStyle(node, null) : - node.currentStyle)['position'] == 'absolute'; - }); - - return bool; - - }, - - - /** - * isEventSupported determines if a given element supports the given event - * function from yura.thinkweb2.com/isEventSupported/ - */ - isEventSupported = (function() { - - var TAGNAMES = { - 'select': 'input', 'change': 'input', - 'submit': 'form', 'reset': 'form', - 'error': 'img', 'load': 'img', 'abort': 'img' - }; - - function isEventSupported( eventName, element ) { - - element = element || document.createElement(TAGNAMES[eventName] || 'div'); - eventName = 'on' + eventName; - - // When using `setAttribute`, IE skips "unload", WebKit skips "unload" and "resize", whereas `in` "catches" those - var isSupported = eventName in element; - - if ( !isSupported ) { - // If it has no `setAttribute` (i.e. doesn't implement Node interface), try generic element - if ( !element.setAttribute ) { - element = document.createElement('div'); - } - if ( element.setAttribute && element.removeAttribute ) { - element.setAttribute(eventName, ''); - isSupported = is(element[eventName], 'function'); - - // If property was created, "remove it" (by setting value to `undefined`) - if ( !is(element[eventName], 'undefined') ) { - element[eventName] = undefined; - } - element.removeAttribute(eventName); - } - } - - element = null; - return isSupported; - } - return isEventSupported; - })(); - - // hasOwnProperty shim by kangax needed for Safari 2.0 support - var _hasOwnProperty = ({}).hasOwnProperty, hasOwnProperty; - if ( !is(_hasOwnProperty, 'undefined') && !is(_hasOwnProperty.call, 'undefined') ) { - hasOwnProperty = function (object, property) { - return _hasOwnProperty.call(object, property); - }; - } - else { - hasOwnProperty = function (object, property) { /* yes, this can give false positives/negatives, but most of the time we don't care about those */ - return ((property in object) && is(object.constructor.prototype[property], 'undefined')); - }; - } - - // Taken from ES5-shim https://github.com/kriskowal/es5-shim/blob/master/es5-shim.js - // ES-5 15.3.4.5 - // http://es5.github.com/#x15.3.4.5 - - if (!Function.prototype.bind) { - - Function.prototype.bind = function bind(that) { - - var target = this; - - if (typeof target != "function") { - throw new TypeError(); - } - - var args = slice.call(arguments, 1), - bound = function () { - - if (this instanceof bound) { - - var F = function(){}; - F.prototype = target.prototype; - var self = new F; - - var result = target.apply( - self, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return self; - - } else { - - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - - return bound; - }; - } - - /** - * setCss applies given styles to the Modernizr DOM node. - */ - function setCss( str ) { - mStyle.cssText = str; - } - - /** - * setCssAll extrapolates all vendor-specific css strings. - */ - function setCssAll( str1, str2 ) { - return setCss(prefixes.join(str1 + ';') + ( str2 || '' )); - } - - /** - * is returns a boolean for if typeof obj is exactly type. - */ - function is( obj, type ) { - return typeof obj === type; - } - - /** - * contains returns a boolean for if substr is found within str. - */ - function contains( str, substr ) { - return !!~('' + str).indexOf(substr); - } - - /** - * testProps is a generic CSS / DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - * A supported CSS property returns empty string when its not yet set. - */ - function testProps( props, prefixed ) { - for ( var i in props ) { - if ( mStyle[ props[i] ] !== undefined ) { - return prefixed == 'pfx' ? props[i] : true; - } - } - return false; - } - - /** - * testDOMProps is a generic DOM property test; if a browser supports - * a certain property, it won't return undefined for it. - */ - function testDOMProps( props, obj, elem ) { - for ( var i in props ) { - var item = obj[props[i]]; - if ( item !== undefined) { - - // return the property name as a string - if (elem === false) return props[i]; - - // let's bind a function - if (is(item, 'function')){ - // default to autobind unless override - return item.bind(elem || obj); - } - - // return the unbound function or obj or value - return item; - } - } - return false; - } - - /** - * testPropsAll tests a list of DOM properties we want to check against. - * We specify literally ALL possible (known and/or likely) properties on - * the element including the non-vendor prefixed one, for forward- - * compatibility. - */ - function testPropsAll( prop, prefixed, elem ) { - - var ucProp = prop.charAt(0).toUpperCase() + prop.substr(1), - props = (prop + ' ' + cssomPrefixes.join(ucProp + ' ') + ucProp).split(' '); - - // did they call .prefixed('boxSizing') or are we just testing a prop? - if(is(prefixed, "string") || is(prefixed, "undefined")) { - return testProps(props, prefixed); - - // otherwise, they called .prefixed('requestAnimationFrame', window[, elem]) - } else { - props = (prop + ' ' + (domPrefixes).join(ucProp + ' ') + ucProp).split(' '); - return testDOMProps(props, prefixed, elem); - } - } - - /** - * testBundle tests a list of CSS features that require element and style injection. - * By bundling them together we can reduce the need to touch the DOM multiple times. - */ - /*>>testBundle*/ - var testBundle = (function( styles, tests ) { - var style = styles.join(''), - len = tests.length; - - injectElementWithStyles(style, function( node, rule ) { - var style = document.styleSheets[document.styleSheets.length - 1], - // IE8 will bork if you create a custom build that excludes both fontface and generatedcontent tests. - // So we check for cssRules and that there is a rule available - // More here: github.com/Modernizr/Modernizr/issues/288 & github.com/Modernizr/Modernizr/issues/293 - cssText = style ? (style.cssRules && style.cssRules[0] ? style.cssRules[0].cssText : style.cssText || '') : '', - children = node.childNodes, hash = {}; - - while ( len-- ) { - hash[children[len].id] = children[len]; - } - - /*>>touch*/ Modernizr['touch'] = ('ontouchstart' in window) || window.DocumentTouch && document instanceof DocumentTouch || (hash['touch'] && hash['touch'].offsetTop) === 9; /*>>touch*/ - /*>>csstransforms3d*/ Modernizr['csstransforms3d'] = (hash['csstransforms3d'] && hash['csstransforms3d'].offsetLeft) === 9 && hash['csstransforms3d'].offsetHeight === 3; /*>>csstransforms3d*/ - /*>>generatedcontent*/Modernizr['generatedcontent'] = (hash['generatedcontent'] && hash['generatedcontent'].offsetHeight) >= 1; /*>>generatedcontent*/ - /*>>fontface*/ Modernizr['fontface'] = /src/i.test(cssText) && - cssText.indexOf(rule.split(' ')[0]) === 0; /*>>fontface*/ - }, len, tests); - - })([ - // Pass in styles to be injected into document - /*>>fontface*/ '@font-face {font-family:"font";src:url("https://")}' /*>>fontface*/ - - /*>>touch*/ ,['@media (',prefixes.join('touch-enabled),('),mod,')', - '{#touch{top:9px;position:absolute}}'].join('') /*>>touch*/ - - /*>>csstransforms3d*/ ,['@media (',prefixes.join('transform-3d),('),mod,')', - '{#csstransforms3d{left:9px;position:absolute;height:3px;}}'].join('')/*>>csstransforms3d*/ - - /*>>generatedcontent*/,['#generatedcontent:after{content:"',smile,'";visibility:hidden}'].join('') /*>>generatedcontent*/ - ], - [ - /*>>fontface*/ 'fontface' /*>>fontface*/ - /*>>touch*/ ,'touch' /*>>touch*/ - /*>>csstransforms3d*/ ,'csstransforms3d' /*>>csstransforms3d*/ - /*>>generatedcontent*/,'generatedcontent' /*>>generatedcontent*/ - - ]);/*>>testBundle*/ - - - /** - * Tests - * ----- - */ - - // The *new* flexbox - // dev.w3.org/csswg/css3-flexbox - - tests['flexbox'] = function() { - return testPropsAll('flexOrder'); - }; - - // The *old* flexbox - // www.w3.org/TR/2009/WD-css3-flexbox-20090723/ - - tests['flexbox-legacy'] = function() { - return testPropsAll('boxDirection'); - }; - - // On the S60 and BB Storm, getContext exists, but always returns undefined - // so we actually have to call getContext() to verify - // github.com/Modernizr/Modernizr/issues/issue/97/ - - tests['canvas'] = function() { - var elem = document.createElement('canvas'); - return !!(elem.getContext && elem.getContext('2d')); - }; - - tests['canvastext'] = function() { - return !!(Modernizr['canvas'] && is(document.createElement('canvas').getContext('2d').fillText, 'function')); - }; - - // this test initiates a new webgl context. - // webk.it/70117 is tracking a legit feature detect proposal - - tests['webgl'] = function() { - try { - var canvas = document.createElement('canvas'), - ret; - ret = !!(window.WebGLRenderingContext && (canvas.getContext('experimental-webgl') || canvas.getContext('webgl'))); - canvas = undefined; - } catch (e){ - ret = false; - } - return ret; - }; - - /* - * The Modernizr.touch test only indicates if the browser supports - * touch events, which does not necessarily reflect a touchscreen - * device, as evidenced by tablets running Windows 7 or, alas, - * the Palm Pre / WebOS (touch) phones. - * - * Additionally, Chrome (desktop) used to lie about its support on this, - * but that has since been rectified: crbug.com/36415 - * - * We also test for Firefox 4 Multitouch Support. - * - * For more info, see: modernizr.github.com/Modernizr/touch.html - */ - - tests['touch'] = function() { - return Modernizr['touch']; - }; - - /** - * geolocation tests for the new Geolocation API specification. - * This test is a standards compliant-only test; for more complete - * testing, including a Google Gears fallback, please see: - * code.google.com/p/geo-location-javascript/ - * or view a fallback solution using google's geo API: - * gist.github.com/366184 - */ - tests['geolocation'] = function() { - return !!navigator.geolocation; - }; - - // Per 1.6: - // This used to be Modernizr.crosswindowmessaging but the longer - // name has been deprecated in favor of a shorter and property-matching one. - // The old API is still available in 1.6, but as of 2.0 will throw a warning, - // and in the first release thereafter disappear entirely. - tests['postmessage'] = function() { - return !!window.postMessage; - }; - - - // Chrome incognito mode used to throw an exception when using openDatabase - // It doesn't anymore. - tests['websqldatabase'] = function() { - return !!window.openDatabase; - }; - - // Vendors had inconsistent prefixing with the experimental Indexed DB: - // - Webkit's implementation is accessible through webkitIndexedDB - // - Firefox shipped moz_indexedDB before FF4b9, but since then has been mozIndexedDB - // For speed, we don't test the legacy (and beta-only) indexedDB - tests['indexedDB'] = function() { - return !!testPropsAll("indexedDB",window); - }; - - // documentMode logic from YUI to filter out IE8 Compat Mode - // which false positives. - tests['hashchange'] = function() { - return isEventSupported('hashchange', window) && (document.documentMode === undefined || document.documentMode > 7); - }; - - // Per 1.6: - // This used to be Modernizr.historymanagement but the longer - // name has been deprecated in favor of a shorter and property-matching one. - // The old API is still available in 1.6, but as of 2.0 will throw a warning, - // and in the first release thereafter disappear entirely. - tests['history'] = function() { - return !!(window.history && history.pushState); - }; - - tests['draganddrop'] = function() { - var div = document.createElement('div'); - return ('draggable' in div) || ('ondragstart' in div && 'ondrop' in div); - }; - - // FIXME: Once FF10 is sunsetted, we can drop prefixed MozWebSocket - // bugzil.la/695635 - tests['websockets'] = function() { - for ( var i = -1, len = cssomPrefixes.length; ++i < len; ){ - if ( window[cssomPrefixes[i] + 'WebSocket'] ){ - return true; - } - } - return 'WebSocket' in window; - }; - - - // css-tricks.com/rgba-browser-support/ - tests['rgba'] = function() { - // Set an rgba() color and check the returned value - - setCss('background-color:rgba(150,255,150,.5)'); - - return contains(mStyle.backgroundColor, 'rgba'); - }; - - tests['hsla'] = function() { - // Same as rgba(), in fact, browsers re-map hsla() to rgba() internally, - // except IE9 who retains it as hsla - - setCss('background-color:hsla(120,40%,100%,.5)'); - - return contains(mStyle.backgroundColor, 'rgba') || contains(mStyle.backgroundColor, 'hsla'); - }; - - tests['multiplebgs'] = function() { - // Setting multiple images AND a color on the background shorthand property - // and then querying the style.background property value for the number of - // occurrences of "url(" is a reliable method for detecting ACTUAL support for this! - - setCss('background:url(https://),url(https://),red url(https://)'); - - // If the UA supports multiple backgrounds, there should be three occurrences - // of the string "url(" in the return value for elemStyle.background - - return /(url\s*\(.*?){3}/.test(mStyle.background); - }; - - - // In testing support for a given CSS property, it's legit to test: - // `elem.style[styleName] !== undefined` - // If the property is supported it will return an empty string, - // if unsupported it will return undefined. - - // We'll take advantage of this quick test and skip setting a style - // on our modernizr element, but instead just testing undefined vs - // empty string. - - - tests['backgroundsize'] = function() { - return testPropsAll('backgroundSize'); - }; - - tests['borderimage'] = function() { - return testPropsAll('borderImage'); - }; - - - // Super comprehensive table about all the unique implementations of - // border-radius: muddledramblings.com/table-of-css3-border-radius-compliance - - tests['borderradius'] = function() { - return testPropsAll('borderRadius'); - }; - - // WebOS unfortunately false positives on this test. - tests['boxshadow'] = function() { - return testPropsAll('boxShadow'); - }; - - // FF3.0 will false positive on this test - tests['textshadow'] = function() { - return document.createElement('div').style.textShadow === ''; - }; - - - tests['opacity'] = function() { - // Browsers that actually have CSS Opacity implemented have done so - // according to spec, which means their return values are within the - // range of [0.0,1.0] - including the leading zero. - - setCssAll('opacity:.55'); - - // The non-literal . in this regex is intentional: - // German Chrome returns this value as 0,55 - // github.com/Modernizr/Modernizr/issues/#issue/59/comment/516632 - return /^0.55$/.test(mStyle.opacity); - }; - - - // Note, Android < 4 will pass this test, but can only animate - // a single property at a time - // daneden.me/2011/12/putting-up-with-androids-bullshit/ - tests['cssanimations'] = function() { - return testPropsAll('animationName'); - }; - - - tests['csscolumns'] = function() { - return testPropsAll('columnCount'); - }; - - - tests['cssgradients'] = function() { - /** - * For CSS Gradients syntax, please see: - * webkit.org/blog/175/introducing-css-gradients/ - * developer.mozilla.org/en/CSS/-moz-linear-gradient - * developer.mozilla.org/en/CSS/-moz-radial-gradient - * dev.w3.org/csswg/css3-images/#gradients- - */ - - var str1 = 'background-image:', - str2 = 'gradient(linear,left top,right bottom,from(#9f9),to(white));', - str3 = 'linear-gradient(left top,#9f9, white);'; - - setCss( - // legacy webkit syntax (FIXME: remove when syntax not in use anymore) - (str1 + '-webkit- '.split(' ').join(str2 + str1) - // standard syntax // trailing 'background-image:' - + prefixes.join(str3 + str1)).slice(0, -str1.length) - ); - - return contains(mStyle.backgroundImage, 'gradient'); - }; - - - tests['cssreflections'] = function() { - return testPropsAll('boxReflect'); - }; - - - tests['csstransforms'] = function() { - return !!testPropsAll('transform'); - }; - - - tests['csstransforms3d'] = function() { - - var ret = !!testPropsAll('perspective'); - - // Webkit's 3D transforms are passed off to the browser's own graphics renderer. - // It works fine in Safari on Leopard and Snow Leopard, but not in Chrome in - // some conditions. As a result, Webkit typically recognizes the syntax but - // will sometimes throw a false positive, thus we must do a more thorough check: - if ( ret && 'webkitPerspective' in docElement.style ) { - - // Webkit allows this media query to succeed only if the feature is enabled. - // `@media (transform-3d),(-o-transform-3d),(-moz-transform-3d),(-ms-transform-3d),(-webkit-transform-3d),(modernizr){ ... }` - ret = Modernizr['csstransforms3d']; - } - return ret; - }; - - - tests['csstransitions'] = function() { - return testPropsAll('transition'); - }; - - - /*>>fontface*/ - // @font-face detection routine by Diego Perini - // javascript.nwbox.com/CSSSupport/ - - // false positives in WebOS: github.com/Modernizr/Modernizr/issues/342 - tests['fontface'] = function() { - return Modernizr['fontface']; - }; - /*>>fontface*/ - - // CSS generated content detection - tests['generatedcontent'] = function() { - return Modernizr['generatedcontent']; - }; - - - - // These tests evaluate support of the video/audio elements, as well as - // testing what types of content they support. - // - // We're using the Boolean constructor here, so that we can extend the value - // e.g. Modernizr.video // true - // Modernizr.video.ogg // 'probably' - // - // Codec values from : github.com/NielsLeenheer/html5test/blob/9106a8/index.html#L845 - // thx to NielsLeenheer and zcorpan - - // Note: in some older browsers, "no" was a return value instead of empty string. - // It was live in FF3.5.0 and 3.5.1, but fixed in 3.5.2 - // It was also live in Safari 4.0.0 - 4.0.4, but fixed in 4.0.5 - - tests['video'] = function() { - var elem = document.createElement('video'), - bool = false; - - // IE9 Running on Windows Server SKU can cause an exception to be thrown, bug #224 - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('video/ogg; codecs="theora"') .replace(/^no$/,''); - - bool.h264 = elem.canPlayType('video/mp4; codecs="avc1.42E01E"') .replace(/^no$/,''); - - bool.webm = elem.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,''); - } - - } catch(e) { } - - return bool; - }; - - tests['audio'] = function() { - var elem = document.createElement('audio'), - bool = false; - - try { - if ( bool = !!elem.canPlayType ) { - bool = new Boolean(bool); - bool.ogg = elem.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,''); - bool.mp3 = elem.canPlayType('audio/mpeg;') .replace(/^no$/,''); - - // Mimetypes accepted: - // developer.mozilla.org/En/Media_formats_supported_by_the_audio_and_video_elements - // bit.ly/iphoneoscodecs - bool.wav = elem.canPlayType('audio/wav; codecs="1"') .replace(/^no$/,''); - bool.m4a = ( elem.canPlayType('audio/x-m4a;') || - elem.canPlayType('audio/aac;')) .replace(/^no$/,''); - } - } catch(e) { } - - return bool; - }; - - - // In FF4, if disabled, window.localStorage should === null. - - // Normally, we could not test that directly and need to do a - // `('localStorage' in window) && ` test first because otherwise Firefox will - // throw bugzil.la/365772 if cookies are disabled - - // Also in iOS5 Private Browsing mode, attepting to use localStorage.setItem - // will throw the exception: - // QUOTA_EXCEEDED_ERRROR DOM Exception 22. - // Peculiarly, getItem and removeItem calls do not throw. - - // Because we are forced to try/catch this, we'll go aggressive. - - // Just FWIW: IE8 Compat mode supports these features completely: - // www.quirksmode.org/dom/html5.html - // But IE8 doesn't support either with local files - - tests['localstorage'] = function() { - try { - localStorage.setItem(mod, mod); - localStorage.removeItem(mod); - return true; - } catch(e) { - return false; - } - }; - - tests['sessionstorage'] = function() { - try { - sessionStorage.setItem(mod, mod); - sessionStorage.removeItem(mod); - return true; - } catch(e) { - return false; - } - }; - - - tests['webworkers'] = function() { - return !!window.Worker; - }; - - - tests['applicationcache'] = function() { - return !!window.applicationCache; - }; - - - // Thanks to Erik Dahlstrom - tests['svg'] = function() { - return !!document.createElementNS && !!document.createElementNS(ns.svg, 'svg').createSVGRect; - }; - - // specifically for SVG inline in HTML, not within XHTML - // test page: paulirish.com/demo/inline-svg - tests['inlinesvg'] = function() { - var div = document.createElement('div'); - div.innerHTML = '<svg/>'; - return (div.firstChild && div.firstChild.namespaceURI) == ns.svg; - }; - - // SVG SMIL animation - tests['smil'] = function() { - return !!document.createElementNS && /SVGAnimate/.test(toString.call(document.createElementNS(ns.svg, 'animate'))); - }; - - // This test is only for clip paths in SVG proper, not clip paths on HTML content - // demo: srufaculty.sru.edu/david.dailey/svg/newstuff/clipPath4.svg - - // However read the comments to dig into applying SVG clippaths to HTML content here: - // github.com/Modernizr/Modernizr/issues/213#issuecomment-1149491 - tests['svgclippaths'] = function() { - return !!document.createElementNS && /SVGClipPath/.test(toString.call(document.createElementNS(ns.svg, 'clipPath'))); - }; - - // input features and input types go directly onto the ret object, bypassing the tests loop. - // Hold this guy to execute in a moment. - function webforms() { - // Run through HTML5's new input attributes to see if the UA understands any. - // We're using f which is the <input> element created early on - // Mike Taylr has created a comprehensive resource for testing these attributes - // when applied to all input types: - // miketaylr.com/code/input-type-attr.html - // spec: www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#input-type-attr-summary - - // Only input placeholder is tested while textarea's placeholder is not. - // Currently Safari 4 and Opera 11 have support only for the input placeholder - // Both tests are available in feature-detects/forms-placeholder.js - Modernizr['input'] = (function( props ) { - for ( var i = 0, len = props.length; i < len; i++ ) { - attrs[ props[i] ] = !!(props[i] in inputElem); - } - if (attrs.list){ - // safari false positive's on datalist: webk.it/74252 - // see also github.com/Modernizr/Modernizr/issues/146 - attrs.list = !!(document.createElement('datalist') && window.HTMLDataListElement); - } - return attrs; - })('autocomplete autofocus list placeholder max min multiple pattern required step'.split(' ')); - - // Run through HTML5's new input types to see if the UA understands any. - // This is put behind the tests runloop because it doesn't return a - // true/false like all the other tests; instead, it returns an object - // containing each input type with its corresponding true/false value - - // Big thanks to @miketaylr for the html5 forms expertise. miketaylr.com/ - Modernizr['inputtypes'] = (function(props) { - - for ( var i = 0, bool, inputElemType, defaultView, len = props.length; i < len; i++ ) { - - inputElem.setAttribute('type', inputElemType = props[i]); - bool = inputElem.type !== 'text'; - - // We first check to see if the type we give it sticks.. - // If the type does, we feed it a textual value, which shouldn't be valid. - // If the value doesn't stick, we know there's input sanitization which infers a custom UI - if ( bool ) { - - inputElem.value = smile; - inputElem.style.cssText = 'position:absolute;visibility:hidden;'; - - if ( /^range$/.test(inputElemType) && inputElem.style.WebkitAppearance !== undefined ) { - - docElement.appendChild(inputElem); - defaultView = document.defaultView; - - // Safari 2-4 allows the smiley as a value, despite making a slider - bool = defaultView.getComputedStyle && - defaultView.getComputedStyle(inputElem, null).WebkitAppearance !== 'textfield' && - // Mobile android web browser has false positive, so must - // check the height to see if the widget is actually there. - (inputElem.offsetHeight !== 0); - - docElement.removeChild(inputElem); - - } else if ( /^(search|tel)$/.test(inputElemType) ){ - // Spec doesnt define any special parsing or detectable UI - // behaviors so we pass these through as true - - // Interestingly, opera fails the earlier test, so it doesn't - // even make it here. - - } else if ( /^(url|email)$/.test(inputElemType) ) { - // Real url and email support comes with prebaked validation. - bool = inputElem.checkValidity && inputElem.checkValidity() === false; - - } else if ( /^color$/.test(inputElemType) ) { - // chuck into DOM and force reflow for Opera bug in 11.00 - // github.com/Modernizr/Modernizr/issues#issue/159 - docElement.appendChild(inputElem); - docElement.offsetWidth; - bool = inputElem.value != smile; - docElement.removeChild(inputElem); - - } else { - // If the upgraded input compontent rejects the :) text, we got a winner - bool = inputElem.value != smile; - } - } - - inputs[ props[i] ] = !!bool; - } - return inputs; - })('search tel url email datetime date month week time datetime-local number range color'.split(' ')); - } - - - // End of test definitions - // ----------------------- - - - - // Run through all tests and detect their support in the current UA. - // todo: hypothetically we could be doing an array of tests and use a basic loop here. - for ( var feature in tests ) { - if ( hasOwnProperty(tests, feature) ) { - // run the test, throw the return value into the Modernizr, - // then based on that boolean, define an appropriate className - // and push it into an array of classes we'll join later. - featureName = feature.toLowerCase(); - Modernizr[featureName] = tests[feature](); - - classes.push((Modernizr[featureName] ? '' : 'no-') + featureName); - } - } - - // input tests need to run. - Modernizr.input || webforms(); - - - /** - * addTest allows the user to define their own feature tests - * the result will be added onto the Modernizr object, - * as well as an appropriate className set on the html element - * - * @param feature - String naming the feature - * @param test - Function returning true if feature is supported, false if not - */ - Modernizr.addTest = function ( feature, test ) { - if ( typeof feature == 'object' ) { - for ( var key in feature ) { - if ( hasOwnProperty( feature, key ) ) { - Modernizr.addTest( key, feature[ key ] ); - } - } - } else { - - feature = feature.toLowerCase(); - - if ( Modernizr[feature] !== undefined ) { - // we're going to quit if you're trying to overwrite an existing test - // if we were to allow it, we'd do this: - // var re = new RegExp("\\b(no-)?" + feature + "\\b"); - // docElement.className = docElement.className.replace( re, '' ); - // but, no rly, stuff 'em. - return Modernizr; - } - - test = typeof test == 'function' ? test() : test; - - docElement.className += ' ' + (test ? '' : 'no-') + feature; - Modernizr[feature] = test; - - } - - return Modernizr; // allow chaining. - }; - - - // Reset modElem.cssText to nothing to reduce memory footprint. - setCss(''); - modElem = inputElem = null; - - //>>BEGIN IEPP - // Enable HTML 5 elements for styling in IE & add HTML5 css - /*! HTML5 Shiv v3.4 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed */ - ;(function(window, document) { - - /** Preset options */ - var options = window.html5 || {}; - - /** Used to skip problem elements */ - var reSkip = /^<|^(?:button|form|map|select|textarea)$/i; - - /** Detect whether the browser supports default html5 styles */ - var supportsHtml5Styles; - - /** Detect whether the browser supports unknown elements */ - var supportsUnknownElements; - - (function() { - var a = document.createElement('a'); - - a.innerHTML = '<xyz></xyz>'; - - //if the hidden property is implemented we can assume, that the browser supports HTML5 Styles - supportsHtml5Styles = ('hidden' in a); - supportsUnknownElements = a.childNodes.length == 1 || (function() { - // assign a false positive if unable to shiv - try { - (document.createElement)('a'); - } catch(e) { - return true; - } - var frag = document.createDocumentFragment(); - return ( - typeof frag.cloneNode == 'undefined' || - typeof frag.createDocumentFragment == 'undefined' || - typeof frag.createElement == 'undefined' - ); - }()); - - }()); - - /*--------------------------------------------------------------------------*/ - - /** - * Creates a style sheet with the given CSS text and adds it to the document. - * @private - * @param {Document} ownerDocument The document. - * @param {String} cssText The CSS text. - * @returns {StyleSheet} The style element. - */ - function addStyleSheet(ownerDocument, cssText) { - var p = ownerDocument.createElement('p'), - parent = ownerDocument.getElementsByTagName('head')[0] || ownerDocument.documentElement; - - p.innerHTML = 'x<style>' + cssText + '</style>'; - return parent.insertBefore(p.lastChild, parent.firstChild); - } - - /** - * Returns the value of `html5.elements` as an array. - * @private - * @returns {Array} An array of shived element node names. - */ - function getElements() { - var elements = html5.elements; - return typeof elements == 'string' ? elements.split(' ') : elements; - } - - /** - * Shivs the `createElement` and `createDocumentFragment` methods of the document. - * @private - * @param {Document|DocumentFragment} ownerDocument The document. - */ - function shivMethods(ownerDocument) { - var cache = {}, - docCreateElement = ownerDocument.createElement, - docCreateFragment = ownerDocument.createDocumentFragment, - frag = docCreateFragment(); - - ownerDocument.createElement = function(nodeName) { - // Avoid adding some elements to fragments in IE < 9 because - // * Attributes like `name` or `type` cannot be set/changed once an element - // is inserted into a document/fragment - // * Link elements with `src` attributes that are inaccessible, as with - // a 403 response, will cause the tab/window to crash - // * Script elements appended to fragments will execute when their `src` - // or `text` property is set - var node = (cache[nodeName] || (cache[nodeName] = docCreateElement(nodeName))).cloneNode(); - return html5.shivMethods && node.canHaveChildren && !reSkip.test(nodeName) ? frag.appendChild(node) : node; - }; - - ownerDocument.createDocumentFragment = Function('h,f', 'return function(){' + - 'var n=f.cloneNode(),c=n.createElement;' + - 'h.shivMethods&&(' + - // unroll the `createElement` calls - getElements().join().replace(/\w+/g, function(nodeName) { - cache[nodeName] = docCreateElement(nodeName); - frag.createElement(nodeName); - return 'c("' + nodeName + '")'; - }) + - ');return n}' - )(html5, frag); - } - - /*--------------------------------------------------------------------------*/ - - /** - * Shivs the given document. - * @memberOf html5 - * @param {Document} ownerDocument The document to shiv. - * @returns {Document} The shived document. - */ - function shivDocument(ownerDocument) { - var shived; - if (ownerDocument.documentShived) { - return ownerDocument; - } - if (html5.shivCSS && !supportsHtml5Styles) { - shived = !!addStyleSheet(ownerDocument, - // corrects block display not defined in IE6/7/8/9 - 'article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}' + - // corrects audio display not defined in IE6/7/8/9 - 'audio{display:none}' + - // corrects canvas and video display not defined in IE6/7/8/9 - 'canvas,video{display:inline-block;*display:inline;*zoom:1}' + - // corrects 'hidden' attribute and audio[controls] display not present in IE7/8/9 - '[hidden]{display:none}audio[controls]{display:inline-block;*display:inline;*zoom:1}' + - // adds styling not present in IE6/7/8/9 - 'mark{background:#FF0;color:#000}' - ); - } - if (!supportsUnknownElements) { - shived = !shivMethods(ownerDocument); - } - if (shived) { - ownerDocument.documentShived = shived; - } - return ownerDocument; - } - - /*--------------------------------------------------------------------------*/ - - /** - * The `html5` object is exposed so that more elements can be shived and - * existing shiving can be detected on iframes. - * @type Object - * @example - * - * // options can be changed before the script is included - * html5 = { 'elements': 'mark section', 'shivCSS': false, 'shivMethods': false }; - */ - var html5 = { - - /** - * An array or space separated string of node names of the elements to shiv. - * @memberOf html5 - * @type Array|String - */ - 'elements': options.elements || 'abbr article aside audio bdi canvas data datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video', - - /** - * A flag to indicate that the HTML5 style sheet should be inserted. - * @memberOf html5 - * @type Boolean - */ - 'shivCSS': !(options.shivCSS === false), - - /** - * A flag to indicate that the document's `createElement` and `createDocumentFragment` - * methods should be overwritten. - * @memberOf html5 - * @type Boolean - */ - 'shivMethods': !(options.shivMethods === false), - - /** - * A string to describe the type of `html5` object ("default" or "default print"). - * @memberOf html5 - * @type String - */ - 'type': 'default', - - // shivs the document according to the specified `html5` object options - 'shivDocument': shivDocument - }; - - /*--------------------------------------------------------------------------*/ - - // expose html5 - window.html5 = html5; - - // shiv the document - shivDocument(document); - - }(this, document)); - - //>>END IEPP - - // Assign private properties to the return object with prefix - Modernizr._version = version; - - // expose these for the plugin API. Look in the source for how to join() them against your input - Modernizr._prefixes = prefixes; - Modernizr._domPrefixes = domPrefixes; - Modernizr._cssomPrefixes = cssomPrefixes; - - // Modernizr.mq tests a given media query, live against the current state of the window - // A few important notes: - // * If a browser does not support media queries at all (eg. oldIE) the mq() will always return false - // * A max-width or orientation query will be evaluated against the current state, which may change later. - // * You must specify values. Eg. If you are testing support for the min-width media query use: - // Modernizr.mq('(min-width:0)') - // usage: - // Modernizr.mq('only screen and (max-width:768)') - Modernizr.mq = testMediaQuery; - - // Modernizr.hasEvent() detects support for a given event, with an optional element to test on - // Modernizr.hasEvent('gesturestart', elem) - Modernizr.hasEvent = isEventSupported; - - // Modernizr.testProp() investigates whether a given style property is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testProp('pointerEvents') - Modernizr.testProp = function(prop){ - return testProps([prop]); - }; - - // Modernizr.testAllProps() investigates whether a given style property, - // or any of its vendor-prefixed variants, is recognized - // Note that the property names must be provided in the camelCase variant. - // Modernizr.testAllProps('boxSizing') - Modernizr.testAllProps = testPropsAll; - - - - // Modernizr.testStyles() allows you to add custom styles to the document and test an element afterwards - // Modernizr.testStyles('#modernizr { position:absolute }', function(elem, rule){ ... }) - Modernizr.testStyles = injectElementWithStyles; - - - // Modernizr.prefixed() returns the prefixed or nonprefixed property name variant of your input - // Modernizr.prefixed('boxSizing') // 'MozBoxSizing' - - // Properties must be passed as dom-style camelcase, rather than `box-sizing` hypentated style. - // Return values will also be the camelCase variant, if you need to translate that to hypenated style use: - // - // str.replace(/([A-Z])/g, function(str,m1){ return '-' + m1.toLowerCase(); }).replace(/^ms-/,'-ms-'); - - // If you're trying to ascertain which transition end event to bind to, you might do something like... - // - // var transEndEventNames = { - // 'WebkitTransition' : 'webkitTransitionEnd', - // 'MozTransition' : 'transitionend', - // 'OTransition' : 'oTransitionEnd', - // 'msTransition' : 'MsTransitionEnd', - // 'transition' : 'transitionend' - // }, - // transEndEventName = transEndEventNames[ Modernizr.prefixed('transition') ]; - - Modernizr.prefixed = function(prop, obj, elem){ - if(!obj) { - return testPropsAll(prop, 'pfx'); - } else { - // Testing DOM property e.g. Modernizr.prefixed('requestAnimationFrame', window) // 'mozRequestAnimationFrame' - return testPropsAll(prop, obj, elem); - } - }; - - - - // Remove "no-js" class from <html> element, if it exists: - docElement.className = docElement.className.replace(/(^|\s)no-js(\s|$)/, '$1$2') + - - // Add the new classes to the <html> element. - (enableClasses ? ' js ' + classes.join(' ') : ''); - - return Modernizr; - -})(this, this.document); diff --git a/apps/tal/js/tal.js b/apps/tal/js/tal.js deleted file mode 100644 index c4c64694404..00000000000 --- a/apps/tal/js/tal.js +++ /dev/null @@ -1,32 +0,0 @@ - -$(document).ready(function(){ - $('#manual nav').keydown(function(event) { - if(event.which == 13) { - $('#manual ol').click(); - } - }); - $('#manual nav').click(function(event){ - var $tgt = $(event.target); - if ($tgt.is('li') || $tgt.is('a')) { - var item = $tgt.is('li')?$($tgt):($tgt).parent(); - var section = $('#manual section'); - var id = item.data('id'); - item.addClass('active'); - var oldpage = section.data('id'); - if(oldpage){ - $('#manual li[data-id="'+oldpage+'"]').removeClass('active'); - } - $.getJSON(OC.filePath('tal', 'ajax', 'loadpage.php'),{'id':id},function(jsondata){ - if(jsondata.status == 'success'){ - $('#manual li[data-id="'+id+'"]').addClass('active'); - section.replaceWith(jsondata.data.page); - section.data('id', id); - } - else{ - OC.dialogs.alert(jsondata.data.message, t('core', 'Error')); - } - }); - } - return false; - }); -});
\ No newline at end of file diff --git a/apps/tal/lib/paths.php b/apps/tal/lib/paths.php deleted file mode 100644 index b61d52c0f47..00000000000 --- a/apps/tal/lib/paths.php +++ /dev/null @@ -1,13 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -/** - * This class provides TAL templates for owncloud. - */ -class OC_TALTemplate extends OC_Template { -}
\ No newline at end of file diff --git a/apps/tal/lib/tall10n.php b/apps/tal/lib/tall10n.php deleted file mode 100644 index 81ebfe49041..00000000000 --- a/apps/tal/lib/tall10n.php +++ /dev/null @@ -1,105 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -//require_once 'PHPTAL/TranslationService.php'; - - -class OC_TALL10N extends OC_L10N implements PHPTAL_TranslationService { - private $encoding = 'UTF-8'; - private $vars = array(); - //private $lang = ''; - //private $app = ''; - - /** - * @brief The constructor - * @param $app the app requesting l10n - * @param $lang default: null Language - * @returns OC_L10N-Object - * - * If language is not set, the constructor tries to find the right - * language. - */ - public function __construct($app, $lang = null){ - //$this->app = $app; - //$this->lang = $lang; - parent::__construct($app, $lang); - } - - /** - * Set the target language for translations. - * @return string - chosen language - */ - function setLanguage(/*...*/) { - $langs = func_get_args(); - $this->language = $langs[0]; - } - - /** - * PHPTAL will inform translation service what encoding page uses. - * Output of translate() must be in this encoding. - * NOTE: Currently not used (and probably won't be as we use utf-8 all over?). - */ - function setEncoding($encoding) { - $this->encoding = $encoding; - } - - /** - * Set the domain to use for translations (if different parts of application are translated in different files. This is not for language selection). - */ - function useDomain($domain) { - if(!$domain) { - return; - } - error_log('useDomain: '.$domain); - $this->app = $domain; - $this->init(); - } - - /** - * Set value of a variable used in translation key. - * - * You should use it to replace all {key}s with values in translated strings. - * - * @param string $key - name of the variable - * @param string $value - */ - public function setVar($key, $value) { - error_log('setVar: '.$key.'=>'.$value); - $this->vars[$key] = $value; - } - - /** - * Translate a gettext key and interpolate variables. - * - * @param string $key - translation key, e.g. "hello {username}!" - * @param string $htmlescape - if true, you should HTML-escape translated string. You should never HTML-escape interpolated variables. - */ - function translate($key, $escape=true) { - $translations = $this->getTranslations(); - if (array_key_exists($key, $translations)) { - $v = $translations[$key]; - } else { - $v = $key; - } - - if ($escape) { - $v = htmlspecialchars($v); - } - - //while (preg_match('/\{(.*?)\}/sm', $v, $m)) { - while (preg_match('/\$\{(.*?)\}/sm', $v, $m)) { - list($src, $var) = $m; - if (!isset($this->vars[$var])) { - $v = str_replace($src, 'undefined', $v); - } else { - $v = str_replace($src, $this->vars[$var], $v); - } - } - return $v; - } -}
\ No newline at end of file diff --git a/apps/tal/lib/taltemplate.php b/apps/tal/lib/taltemplate.php deleted file mode 100644 index 523e857e6f2..00000000000 --- a/apps/tal/lib/taltemplate.php +++ /dev/null @@ -1,372 +0,0 @@ -<?php -/** - * kate: replace-tabs off; indent-mode Normal; keep-extra-spaces: off; tab-indents: on; - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - -function phptal_tales_remote($exp, $nothrow) { - //$exp = trim($exp, ' \t\r\n/'); - error_log(phptal_tales($exp, $nothrow)); - return "OCP\Util::linkToRemote(".phptal_tales($exp, $nothrow).")"; -} - -function phptal_tales_url($src, $nothrow) { - //$exp = trim($exp, ' \t\r\n/'); - error_log(phptal_tales($src, $nothrow)); - return "OC_TALTemplate::linkToAbsolute(".phptal_tales($src, $nothrow).")"; -} - -function phptal_tales_linkto($src, $nothrow) { - return "OC_TALTemplate::linkTo(".phptal_tales($src, $nothrow).")"; -} - -function phptal_tales_image($src, $nothrow) { - return "OC_TALTemplate::imagePath(".phptal_tales($src, $nothrow).")"; -} - -function phptal_tales_config($src, $nothrow) { - return "OC_TALTemplate::config(".phptal_tales($src, $nothrow).")"; -} - -/** - * This class provides TAL templates for owncloud. - */ -class OC_TALTemplate extends OC_Template { - /** - */ - protected $_engine = null; - protected $scripts = Array(); - protected $styles = Array(); - protected $_headers = Array(); - protected $renderas; - protected static $app = ''; - - public function __construct($app, $name, $renderas = "") { - //if(defined('DEBUG') && DEBUG) { - ini_set('display_errors', true); - //} - $this->renderas = $renderas; - $this->i18n = new OC_TALL10N($app); - $this->setEngine(new PHPTAL()); - parent::__construct($app, $name, $renderas); - //$this->fetchHeadVars(); - self::$app = $app; - //$this->assign('application', $this->app); - $this->assign('i18n', $this->i18n); - $this->assign('user', OCP\User::getUser()); - $this->assign('appinfo', OCP\App::getAppInfo($app)); - $this->assign('appajaxpath', OC::$SERVERROOT.OC_App::getAppPath($app).'/ajax'); - $this->assign('appjspath', OC::$SERVERROOT.OC_App::getAppPath($app).'/js'); - $this->assign('apptemplatepath', OC::$SERVERROOT.OC_App::getAppPath($app).'/templates'); - if($renderas) { - $this->assign('maintemplate', OC_App::getAppPath('tal').'/templates/layout.'.$renderas.'.pt'); - if($renderas == 'user') { - $this->assign('requesttoken', OC_Util::callRegister()); - } - } - //$this->assign('styles', $this->styles); - $this->assign('core_styles', !empty(OC_Util::$core_styles)?'core.css':null); - $this->assign('core_scripts', !empty(OC_Util::$core_scripts)?'core.js':null); - $request = isset($_REQUEST)?$_REQUEST:array(); - $request['post'] = isset($_POST)?$_POST:array(); - $request['get'] = isset($_GET)?$_GET:array(); - $this->assign('request', $request); - $this->assign('server', $_SERVER); - $this->assign('webroot', OC::$WEBROOT); - $this->assign('theme', OC_Config::getValue('theme')); - - $apps_paths = array(); - foreach(OC_App::getEnabledApps() as $app){ - $apps_paths[$app] = OC_App::getAppWebPath($app); - } - $this->assign( 'apps_paths', str_replace('\\/', '/',json_encode($apps_paths)),false ); // Ugly unescape slashes waiting for better solution - - // Add the js files - $jsfiles = OC_TemplateLayout::findJavascriptFiles(OC_Util::$scripts); - - foreach($jsfiles as $info) { - $root = $info[0]; - $web = $info[1]; - $file = $info[2]; - $this->scripts[] = $web.'/'.$file; - } - $this->assign('scripts',$this->scripts); - - // Add the css files - $cssfiles = OC_TemplateLayout::findStylesheetFiles(OC_Util::$styles); - - foreach($cssfiles as $info) { - $root = $info[0]; - $web = $info[1]; - $file = $info[2]; - $paths = explode('/', $file); - - $in_root = false; - foreach(OC::$APPSROOTS as $app_root) { - if($root == $app_root['path']) { - $in_root = true; - break; - } - } - - if($in_root ) { - $app = $paths[0]; - unset($paths[0]); - $path = implode('/', $paths); - $this->styles[] = OC_Helper::linkTo($app, $path); - } - else { - $this->styles[] = $web.'/'.$file; - } - } - $this->assign('styles', $this->styles); - - } - - /** - * Plug in PHPTAL object into View - * - * @name setEngine - * @access public - * @param object PHPTAL $engine - */ - public function setEngine(PHPTAL $engine) { - $view = new OC_FilesystemView('/'.OC_User::getUser()); - if(!$view->file_exists('phptal')) { - $view->mkdir('phptal'); - } - $this->_engine = $engine; - $this->_engine->setPhpCodeDestination($view->getLocalFile('/phptal/')); - $this->_engine->setTemplateRepository($_SERVER['DOCUMENT_ROOT'].OCP\Util::linkTo(self::$app, 'templates')); - $this->_engine->set('this', $this); - $this->_engine->setOutputMode(PHPTAL::HTML5); - $this->_engine->setTranslator($this->i18n); - return $this; - } - - /** - * Forces reparsing of all templates all the time. It should be used only for testing and debugging. - * It's useful if you're testing pre filters or changing code of PHPTAL itself. - * WARNING: This slows down PHPTAL very much. Never enable this on production servers! - */ - public function setForceReparse() { - OCP\Util::writeLog('tal','ForceReparse is enabled!', OCP\Util::WARN); - $this->_engine->setForceReparse(); - } - - /** - * Get PHPTAL object from View - * - * @name getEngine - * @access public - */ - public function getEngine() { - return $this->_engine; - } - - /** - * Clone PHPTAL object - * - * @access public - */ - public function __clone() { - $this->_engine = clone $this->_engine; - } - - /** - * Display template - * - * @access protected - */ - protected function _run() { - $this->_engine->setTemplate(func_get_arg(0)); - try { - echo $this->_engine->execute(); - } catch (Exception $e) { - throw new Exception($e); - } - } - - /** - * @brief check Path For Template with and without $fext - * @param $path to check - * @param $name of the template file (without suffix) - * @param $fext formfactor extension - * @return bool true when found - * - * Will set $this->template and $this->path if there is a template at - * the specified $path - */ - protected function checkPathForTemplate($path, $name, $fext) { - if ($name =='') return false; - $template = null; - if( is_file( $path.$name.$fext.'.pt' )){ - $template = $path.$name.$fext.'.pt'; - }elseif( is_file( $path.$name.'.pt' )){ - $template = $path.$name.'.pt'; - } - //error_log('Template: '.$template); - if ($template) { - $this->template = $template; - $this->path = $path; - $this->_engine->template = $this->template; - $this->_engine->setTemplate($this->template); - return true; - } - return false; - } - - /** - * @brief Assign variables - * @param $key key - * @param $value value - * @param $sanitizeHTML Ignored, as values are always sanitized unless explicitly specified not to. - * @returns true - * - * This function assigns a variable. It can be accessed via TALES expressions or ${$key} in - * the template. - * - * If the key existed before, it will be overwritten - */ - public function assign( $key, $value, $sanitizeHTML=false ){ - $this->_engine->set($key, $value); - return true; - } - - /** - * @brief Add a custom element to the header - * @param string tag tag name of the element - * @param array $attributes array of attributes for the element - * @param string $text the text content for the element - */ - public function addHeader( $tag, $attributes, $text=''){ - $this->_headers[]=array('tag'=>$tag,'attributes'=>$attributes,'text'=>$text); - } - - /** - * @brief Prints the proceeded template - * @returns true/false - * - * This function proceeds the template and prints its output. - */ - public function printPage(){ - echo $this->fetchPage(); - } - - /** - * @brief Proceeds the template - * @returns content - * - * This function proceeds the template. If $this->renderas is set, it - * will produce a full page. - */ - public function fetchPage(){ - error_log('renderas: '.$this->renderas); - if($this->renderas) { - // Add custom headers - $this->assign('headers',array_merge($this->_headers, OC_Util::$headers)); - // Add navigation entry - $navigation = OC_App::getNavigation(); - $this->assign( "navigation", $navigation); - $this->assign( "settingsnavigation", OC_App::getSettingsNavigation()); - if(array_search(OC_APP::getCurrentApp(),array('settings','admin','help'))!==false){ - $this->assign('bodyid','body-settings'); - }else{ - $this->assign('bodyid','body-user'); - } - foreach($navigation as $entry) { - if ($entry['active']) { - $this->assign( 'application', $entry['name'] ); - break; - } - } - } - //error_log('utilheaders'.print_r(array_merge($this->_headers, OC_Util::$headers), true)); - return $this->_engine->execute(); - } - - static function linkTo($src) { - //error_log('linkTo '.$src); - $parts = is_array($src)?$src:explode('/', rtrim($src, ' \t\r\n/')); - if($parts[0] == '') { - array_shift($parts); - return OCP\Util::linkTo('', implode('/', $parts)); - } elseif(count($parts) == 1) { - return OCP\Util::linkTo('', implode('/', $parts)); - } elseif(trim($parts[0] == 'core')) { - array_shift($parts); - return OCP\Util::linkTo('', implode('/', $parts)); - } else { // This should be an app. - return OCP\Util::linkTo(array_shift($parts), implode('/', $parts)); - } - } - - static function linkToAbsolute($src) { - //error_log('linkTo '.$src); - $parts = is_array($src)?$src:explode('/', rtrim($src, ' \t\r\n/')); - if($parts[0] == '') { - array_shift($parts); - return OCP\Util::linkToAbsolute('', implode('/', $parts)); - } elseif(count($parts) == 1) { - return OCP\Util::linkToAbsolute('', implode('/', $parts)); - } elseif(trim($parts[0] == 'core')) { - array_shift($parts); - return OCP\Util::linkToAbsolute('', implode('/', $parts)); - } else { // This should be an app. - return OCP\Util::linkToAbsolute(array_shift($parts), implode('/', $parts)); - } - } - - static function imagePath($src) { - //error_log('imagePath '.$src); - $parts = is_array($src)?$src:explode('/', rtrim($src, ' \t\r\n/')); - if($parts[0] == '') { - array_shift($parts); - return OCP\Util::imagePath('', implode('/', $parts)); - } elseif(count($parts) == 1) { - return OCP\Util::imagePath('', implode('/', $parts)); - } elseif(trim($parts[0] == 'core')) { - array_shift($parts); - return OCP\Util::imagePath('', implode('/', $parts)); - } else { // This should be an app. - return OCP\Util::imagePath(array_shift($parts), implode('/', $parts)); - } - } - - static function config($src) { - error_log('pref '.$src); - $parts = is_array($src)?$src:explode('/', rtrim($src, ' \t\r\n/')); - if(count($parts) < 2) { - throw new PHPTAL_Exception('Wrong argument count: config: takes no less than 2 arguments.'); - } else { - switch ($parts[0]) { - case 'sys': - return OCP\Config::getSystemValue($parts[1]); - break; - case 'app': - if(count($parts) == 2) { - return OCP\Config::getAppValue(self::app, $parts[1]); - } elseif(count($parts) == 3) { - return OCP\Config::getAppValue($parts[1], $parts[2]); - } else { - throw new PHPTAL_Exception('Wrong argument count: config:$app takes no more than 3 arguments.'); - } - break; - case 'user': - if(count($parts) == 2) { - return OCP\Config::getUserValue(OCP\User::getUser(), self::app, $parts[1]); - } elseif(count($parts) == 3) { - return OCP\Config::getUserValue(OCP\User::getUser(), $parts[1], $parts[2]); - } elseif(count($parts) == 4) { - return OCP\Config::getUserValue($parts[1], $parts[2], $parts[3]); - } else { - throw new PHPTAL_Exception('Wrong argument count: config: takes no more than 4 arguments.'); - } - break; - } - } - } -}
\ No newline at end of file diff --git a/apps/tal/settings.php b/apps/tal/settings.php deleted file mode 100644 index a4eeb333446..00000000000 --- a/apps/tal/settings.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php -/** - * Copyright (c) 2012 Thomas Tanghus <thomas@tanghus.net> - * This file is licensed under the Affero General Public License version 3 or - * later. - * See the COPYING-README file. - */ - - -OCP\JSON::checkLoggedIn(); -OCP\JSON::checkAppEnabled('tal'); - -$tmpl = new OC_TALTemplate('tal', 'settings'); -return $tmpl->fetchPage(); - -?> diff --git a/apps/tal/templates/layout.guest.pt b/apps/tal/templates/layout.guest.pt deleted file mode 100644 index 884b44a582e..00000000000 --- a/apps/tal/templates/layout.guest.pt +++ /dev/null @@ -1,43 +0,0 @@ -<!DOCTYPE html> -<html metal:define-macro="page"> -<head> - <title>ownCloud</title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="/owncloud/core/img/favicon.png" tal:attributes="href string:${webroot}/core/img/favicon.png" /> - <link rel="apple-touch-icon-precomposed" href="/owncloud/core/img/favicon-touch.png" tal:attributes="href string:${webroot}/core/img/favicon-touch.png" /> - - <link rel="stylesheet" href="core.css" type="text/css" media="screen" tal:condition="php:OC_Util::$core_styles" tal:attributes="href php:OC_Helper::linkToRemote('core.css', false)" /> - - <tal:block tal:repeat="style styles"> - <link rel="stylesheet" href="/owncloud/core/css/styles.css" type="text/css" media="screen" tal:attributes="href style" /> - </tal:block> - <script type="text/javascript"> - var oc_webroot = '${webroot}'; - var oc_appswebroot = '${appswebroot}'; - </script> - - <script type="text/javascript" src="<?php echo OC_Helper::linkToRemote('core.js', false) ?>" tal:condition="php:OC_Util::$core_scripts" tal:attributes="src php:OC_Helper::linkToRemote('core.js', false)"></script> - - <tal:block tal:repeat="script scripts"> - <script type="text/javascript" tal:attributes="src script"></script> - </tal:block> - - <tal:block tal:repeat="header headers"> - <tal:block tal:replace='structure string:<${header/tag}' /> <tal:block tal:repeat="attribute header/attributes"><tal:block tal:replace='structure string:${repeat/attribute/key}="${attribute}"' /></tal:block> /> - </tal:block> -</head> - -<body id="body-login"> - <div id="login"> - <header> - <div id="header"> - <img src="/owncloud/core/img/logo.png" alt="ownCloud" tal:attributes="href string:${webroot}/core/img/logo.png" /> - </div> - </header> - <div id="content" metal:define-slot="content"> - This is the content. - </div> - </div> - <footer><p class="info"><a href="http://owncloud.org/" i18n:translate="">ownCloud</a> – web services under your control</p></footer> -</body> -</html> diff --git a/apps/tal/templates/layout.user.pt b/apps/tal/templates/layout.user.pt deleted file mode 100644 index a945e1af7a2..00000000000 --- a/apps/tal/templates/layout.user.pt +++ /dev/null @@ -1,78 +0,0 @@ -<!DOCTYPE html> -<html metal:define-macro="page"> -<head> - <title tal:define="pretitle php:(!empty(application)) ? application . ' | ' : null" tal:content="string:${pretitle} ownCloud (${user}@${server/SERVER_NAME})"> - Scripts and Styles - </title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> - <link rel="shortcut icon" href="/owncloud/core/img/favicon.png" tal:attributes="href string:${webroot}/core/img/favicon.png" /> - <link rel="apple-touch-icon-precomposed" href="favicon-touch.png" tal:attributes="href string:${webroot}/core/img/favicon-touch.png" /> - - <link rel="stylesheet" href="core.css" type="text/css" media="screen" tal:condition="core_styles" tal:attributes="href remote:core_styles" /> - <tal:block tal:repeat="style styles"> - <link rel="stylesheet" href="/owncloud/core/css/styles.css" type="text/css" media="screen" tal:attributes="href style" /> - </tal:block> - - <script type="text/javascript"> - var oc_webroot = '${webroot}'; - var oc_appswebroots = ${structure apps_paths}; - var oc_current_user = '${user}'; - </script> - - <script type="text/javascript" src="core.js" tal:condition="core_scripts" tal:attributes="src remote:core_scripts"></script> - <tal:block tal:repeat="script scripts"> - <script type="text/javascript" tal:attributes="src script"></script> - </tal:block> - - <script type="text/javascript"> - $(function() { - requesttoken = '${requesttoken}'; - $(document).bind('ajaxSend', function(elm, xhr, s){ - if(requesttoken) { - xhr.setRequestHeader('requesttoken', requesttoken); - } - }); - }); - </script> - - <tal:block tal:repeat="header headers"> - <tal:block tal:replace='structure string:${header/tag}' /> <tal:block tal:repeat="attribute header/attributes"><tal:block tal:replace='structure string:${repeat/attribute/key}="${attribute}"' /></tal:block> /> - </tal:block> -</head> -<body tal:attributes="id bodyid"> -<header> - <div id="header" tal:define="index linkto:string:/index.php"> - <a id="owncloud" tal:attributes="href index"><img class="svg" tal:attributes="src image:string:logo-wide.svg" src="logo-wide.svg" alt="ownCloud" /></a> - <a class="header-right header-action" id="logout" tal:attributes="href string:${index}?logout=true"><img class="svg" tal:attributes="src image:string:/actions/logout.svg" i18n:attributes="alt;title" alt="Log out" title="Log out" src="actions/logout.svg" /></a> - <form class="searchbox header-right" action="#" method="post"> - <input id="searchbox" class="svg" type="search" name="query" tal:attributes="value request/post/query|nothing" value="" autocomplete="off" /> - </form> - </div> -</header> - -<nav i18n:domain="core"> - <div id="navigation"> - <ul id="apps" class="svg"> - <li tal:repeat="entry navigation"> - <a tal:attributes="style structure string:background-image:url(${entry/icon});href entry/href;class php:entry['active']?'active':null" tal:content="entry/name">Name</a> - </li> - </ul> - - <ul id="settings" class="svg"> - <img role="button" tabindex="0" id="expand" class="svg" - i18n:attributes="alt Settings" alt="Settings" tal:attributes="src image:string:/actions/settings.svg" src="actions/settings.svg" /> - <span i18n:translate="">Settings</span> - <div id="expanddiv" - tal:attributes="class structure php:bodyid EQ 'body-user' ? 'hidden' : nothing"> - <li tal:repeat="entry settingsnavigation"> -<a tal:attributes="style structure string:background-image:url(${entry/icon});href entry/href;class entry/active|nothing" tal:content="entry/name">Name</a></li> - </div> - </ul> - </div> -</nav> - -<div id="content" metal:define-slot="content"> - This is the content. -</div> -</body> -</html>
\ No newline at end of file diff --git a/apps/tal/templates/macros.util.pt b/apps/tal/templates/macros.util.pt deleted file mode 100644 index 0e8c590e0e6..00000000000 --- a/apps/tal/templates/macros.util.pt +++ /dev/null @@ -1,56 +0,0 @@ -<!DOCTYPE html> -<html> -<head> - <title> - Utility macros - </title> - <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> -</head> -<body tal:attributes="id bodyid"> -<header> - <div id="header" tal:define="index php:OCP\Util::linkTo('', 'index.php')"> - <a id="owncloud" tal:attributes="href index"><img class="svg" tal:attributes="src php:OCP\Util::imagePath('', 'logo-wide.svg')" src="logo-wide.svg" alt="ownCloud" /></a> - <form class="searchbox" action="#" method="post"> - <input id="searchbox" class="svg" type="search" name="query" tal:attributes="value request/post/query|nothing" value="" autocomplete="off" /> - </form> - <a id="logout" tal:attributes="href string:${index}?logout=true"><img class="svg" tal:attributes="src php:OCP\Util::imagePath('', 'actions/logout.svg')" i18n:attributes="alt Log out;title Log out" alt="Log out" title="Log out" src="actions/logout.svg" /></a> - </div> -</header> -<body> -<tal:block metal:define-macro="html_select_options"> - <tal:block condition="options"> - <tal:block tal:define="options php:isset('combine') AND array_combine(options, options) OR options" repeat="option options"> - <option tal:content="option" tal:attributes></option> - </tal:block> - </tal:block> -</tal:block> -function html_select_options($options, $selected, $params=array()) { - if (!is_array($selected)){ - $selected=array($selected); - } - if (isset($params['combine']) && $params['combine']){ - $options = array_combine($options, $options); - } - $value_name = $label_name = false; - if (isset($params['value'])){ - $value_name = $params['value']; - } - if (isset($params['label'])){ - $label_name = $params['label']; - } - $html = ''; - foreach($options as $value => $label){ - if ($value_name && is_array($label)){ - $value = $label[$value_name]; - } - if ($label_name && is_array($label)){ - $label = $label[$label_name]; - } - $select = in_array($value, $selected) ? ' selected="selected"' : ''; - $html .= '<option value="' . $value . '"' . $select . '>' . $label . '</option>'."\n"; - } - return $html; -} - -</body> -</html>
\ No newline at end of file diff --git a/apps/tal/templates/manual.pt b/apps/tal/templates/manual.pt deleted file mode 100644 index 9ad03db30be..00000000000 --- a/apps/tal/templates/manual.pt +++ /dev/null @@ -1,23 +0,0 @@ -<!DOCTYPE html> -<html metal:use-macro="${maintemplate}/page"> -<head> - <title>TAL Page Templates</title> -</head> -<body> -<div id="content" metal:fill-slot="content"> - <article id="manual" i18n:domain="tal" tal:define="page page|string:intro"> - <nav> - <ol> - <li tal:repeat="section sections" tal:attributes="data-id section/id" data-page="intro"> - <a tal:content="section/title">Introduction</a> - </li> - </ol> - </nav> - <section metal:use-macro="sections.pt/${page}"> - <h1>Manual</h1> - rest of the content - </section> - </article> -</div> -</body> -</html>
\ No newline at end of file diff --git a/apps/tal/templates/sections.pt b/apps/tal/templates/sections.pt deleted file mode 100644 index 9dcda6ebf45..00000000000 --- a/apps/tal/templates/sections.pt +++ /dev/null @@ -1,142 +0,0 @@ -<span metal:use-macro="${id}"> -TRUT -</span> -<section data-id="intro" metal:define-macro="intro"> - <h1>Introduction</h1> - <h2>Initializing a template</h2> - <strong>Before:</strong> - <pre>$output = new OCP\Template('app', 'template', 'user');</pre> - <strong>After:</strong> - <pre>$tmpl = new OC_TALTemplate('app', 'template', 'user');</pre> - <h2>Assigning a variable</h2> - <strong>Before:</strong> - <pre>$tmpl->assign('myvar', $myvar);</pre> - <strong>After:</strong> - <pre>$tmpl->assign('myvar', $myvar);</pre> - The sharp minds may have noticed that there is no difference ;-) - <h2>Linking to an image</h2> - <strong>Before:</strong> - <pre> -<img class="svg" src="<?php echo image_path('', 'logo-wide.svg'); ?>" alt="ownCloud" /> -<img class="svg" src="<?php echo image_path('app', 'someimage.png'); ?>" alt="ownCloud" /></pre> - <strong>After:</strong> - <pre> -<img class="svg" tal:attributes="src image:string:logo-wide.svg" alt="ownCloud" /> -<img class="svg" tal:attributes="src image:string:app/someimage.png" alt="ownCloud" /></pre> - <h2>Constructing a link</h2> - <strong>Before:</strong> - <pre> -<a href="<?php echo link_to('', 'index.php'); ?>">Home</a> -<a href="<?php echo link_to('app', 'index.php'); ?>">Some app</a></pre> - <strong>After:</strong> - <pre> -<a tal:attributes="href linkto:string:index.php">Home</a> -<a tal:attributes="href linkto:string:app/index.php">Some app</a></pre> - <h2>Link to remote service</h2> - <strong>Before:</strong> - <pre> -<link rel="stylesheet" href="<?php echo OC_Helper::linkToRemote('core.css') ?>" type="text/css" media="screen" /> -<a href="<?php echo OC_Helper::linkToRemote('webdav') ?>">WebDAV</a></pre> - <strong>After:</strong> - <pre> -<link rel="stylesheet" type="text/css" media="screen" tal:attributes="href remote:string:core.css" /> -<a tal:attributes="href remote:string:webdav">WebDAV</a></pre> - <p>The latter produces a link to the WebDAV service on the current instance: - <a tal:attributes="href remote:string:webdav">WebDAV</a></p> - <h2>Accessing configuration</h2> - <strong>Before:</strong> - <pre> -ownCloud version: <?php echo OCP\Config::getSystemValue('version'); ?> -Default quota: <?php echo OCP\Config::getAppValue('files', 'default_quota'); ?> -Calendar time zone: <?php echo OCP\Config::getUserValue(OCP\User::getUser(), 'calendar', 'timezone'); ?></pre> - <strong>After:</strong> - <pre> -ownCloud version: $${config:string:sys/version} -Default quota: $${config:string:app/files/default_quota} -Calendar time zone: $${config:string:user/calendar/timezone}</pre> - ownCloud version: ${config:string:sys/version}<br /> - Default quota: ${config:string:app/files/default_quota}<br /> - Calendar time zone: ${config:string:user/calendar/timezone}<br /> - <h2>Translating content</h2> - <strong>Before:</strong> - <pre><p><?php echo $l->t('This will be translated.'); ?><p></pre> - <strong>After:</strong> - <pre><p i18n:translate="">This will be translated.<p></pre> - <a class="readmore" href="http://phptal.org/manual/en/split/i18n-content.html" target="_blank">Read more...</a> - <h2>Translating content with variables</h2> - <strong>Before:</strong> - <p>There is no standardized way to do this currently. I have seen both translation keys using printf formatting - and custom interpolation using e.g. curly brackets.</p> - <strong>After:</strong> - <pre> -<tal:block i18n:name="username" tal:content="user" /> -<p i18n:translate="">Your user name is ${username}.</p></pre> - <tal:block i18n:name="username" tal:content="user" /> - <p i18n:translate="">Your user name is ${username}.</p> - <p>Or you can wrap it in some markup:</p> - <pre> -<p i18n:translate=""> -Welcome back <span i18n:name="username" tal:replace="user"/>. -</p></pre> - <p i18n:translate=""> - Welcome back <span i18n:name="username" tal:replace="user"/>. - </p> - <a class="readmore" href="http://phptal.org/manual/en/split/i18n-name.html" target="_blank">Read more...</a> - <h2>Translating attributes.</h2> - <strong>Before:</strong> - <pre><img alt="<?php echo $l->t('Log out');?>" title="<?php echo $l->t('Log out');?>" src="<?php echo image_path('', 'actions/logout.svg'); ?>" /></pre> - <strong>After:</strong> - <pre><img tal:attributes="src image:string:/actions/logout.svg" i18n:attributes="alt;title" alt="Log out" title="Log out" /></pre> - <a href="http://phptal.org/manual/en/split/i18n-attributes.html" target="_blank">See more...</a> - <h2>Iterating</h2> - <pre> -$$arr = array('color' => 'red', - 'taste' => 'sweet', - 'shape' => 'round', - 'name' => 'apple'); - </pre> - <strong>Before:</strong> - <pre> -<select size="4"> -<?php foreach($$arr as $key=>$value) { ?> -<option value="<php echo $key; >" ><php echo $value; ></option> -</select> -<?php } ?></pre> - <strong>After:</strong> - <pre> -<select size="4"> -<option tal:repeat="item arr" tal:attributes="value repeat/item/key" tal:content="item"></option> -</select></pre> - <form> - <select size="4" tal:define="arr php:array('color' => 'red', 'taste' => 'sweet', 'shape' => 'round', 'name' => 'apple')"> - <option tal:repeat="item arr" tal:attributes="value repeat/item/key" tal:content="item"></option> - </select> - </form> - <a class="readmore" href="http://phptal.org/manual/en/split/tal-repeat.html" target="_blank">Read more...</a> - <h2>Initializing a template</h2> - <strong>Before:</strong> - <pre></pre> - <strong>After:</strong> - <pre></pre> -</section> -<section data-id="example-1" metal:define-macro="example-1"> - <h1>A simple example</h1> - This is actually the main template for this manual. - <pre tal:define="dut php:file_get_contents(apptemplatepath . '/manual.pt')" tal:content="dut"> - </pre> -</section> -<section data-id="gotchas" metal:define-macro="gotchas"> - <h1>Caveats & Gotchas</h1> - I know -</section> -<section data-id="ref" metal:define-macro="ref"> - <h1>References</h1> - <dl> - <dt><a href="http://phptal.org/" target="_blank">PHPTAL</a></dt><dd>The PHP TAL implementation</dd> - <dt><a href="http://phptal.org/manual/en/split/tal-namespace.html" target="_blank">TAL</a></dt><dd>Template Attribute Language</dd> - <dt><a href="http://phptal.org/manual/en/split/phptales.html" target="_blank">TALES</a></dt><dd>TAL Expression Syntax</dd> - <dt><a href="http://phptal.org/manual/en/split/metal.html" target="_blank">METAL</a></dt><dd>Macro Expansion Template Attribute Language</dd> - <dt><a href="http://phptal.org/manual/en/split/i18n.html" target="_blank">i18n namespace</a></dt><dd>Internationalization in TAL</dd> - <dt><a href="http://phptal.org/wiki/doku.php/zopepagetemplates" target="_blank">Zope Page Templates</a></dt><dd>Links and specifications from the original TAL implementation</dd> - </dl> -</section> diff --git a/apps/tal/templates/settings.pt b/apps/tal/templates/settings.pt deleted file mode 100644 index 1ae6eea9e7f..00000000000 --- a/apps/tal/templates/settings.pt +++ /dev/null @@ -1,10 +0,0 @@ -<form id="tal"> - <fieldset class="personalblock"> - <legend i18n:translate="">TAL Page Templates for ownCloud</legend> - <p i18n:translate="">You can now create templates using TAL. As a matter of fact this section is using the internationalization namespace defined in TAL.<br /> - Read more about it from the links below</p> - <ul> - <li><a href="" tal:attributes="href php:OCP\Util::linkTo('tal', 'index.php')" i18n:translate="">HOWTO use it in ownCloud</a></li> - </ul> - </fieldset> -</form> diff --git a/apps/tanghus-journal-2c506aa.tar.gz b/apps/tanghus-journal-2c506aa.tar.gz Binary files differdeleted file mode 100644 index faa1ccfe477..00000000000 --- a/apps/tanghus-journal-2c506aa.tar.gz +++ /dev/null diff --git a/apps/tanghus-tal-7f8befe.tar.gz b/apps/tanghus-tal-7f8befe.tar.gz Binary files differdeleted file mode 100644 index fae360b2a90..00000000000 --- a/apps/tanghus-tal-7f8befe.tar.gz +++ /dev/null |