diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..cfcdd616c --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +.idea +._* +.DS_Store +.vagrant* +tmp +src/.htaccess +src/bb-config* +!src/bb-config-sample.php +src/bb-data/log/* +src/bb-data/cache/* +src/bb-data/tmp.txt +src/bb-vendor +src/bb-test.php +build +composer.phar +public +report/* \ No newline at end of file diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 000000000..cffc1b625 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,37 @@ +# http://docs.travis-ci.com/user/build-configuration/ + +language: php + +php: + - 5.3 + - 5.4 + - 5.5 + - 5.6 + - hhvm + +matrix: + allow_failures: + - php: hhvm + +install: + - composer self-update + - composer install --no-interaction --prefer-source --dev + +before_script: + - mysql -e 'create database IF NOT EXISTS boxbilling' + +script: ant + +notifications: + email: false + +deploy: + provider: releases + api-key: + secure: tVzZ+3U0ndBGvoUpFqA6ikg6fDKnPgMoNqK1pvTdEp0xmrFtjMP/fuc8+awObhj89iEC+MyzfsOP57CZbHR/UjmUSHPQew+BvTwxYmTUzgUeyUrYsTEI7WJgB7tsL35aRgrpxk102tlSmlX7EonufUT0svPOAQ1p4NgZRm3GI3A= + file: ./build/distribution/BoxBilling.zip + skip_cleanup: true + on: + tags: true + all_branches: true + php: 5.3 diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 000000000..8c9bf9efe --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,261 @@ +Release 4.11.3(2014-11-03) +------------------------------------------------------------------------------ + +* BoxBilling going open source +* Removed Doctrine in favor of RedBean and PDO +* URL changes. Now urls are index.php?_url=/slug instead of index.php/slug +* Bug fixes +* Requires PHP >5.3 +* Changed modules logic + +Release 3.3.20 (2013-03-20) +------------------------------------------------------------------------------ + +* Service license unable to order if not configured issue fix +* Select first payment option for cart checkout as default +* IDR currency rate update fix +* PayPal IPN fix. Was not able to add amount to balance if currency was not USD + +Release 2.12.5 (2012-12-05) +------------------------------------------------------------------------------ + +* Fixes issue when domain order is activated for 2 years instead of 1 +* Approved invoice issue fix on Windows servers +* Show transactions list for client +* Enable multisite support by determining hostname and config file +* Do not show payment gateway select box if cart total is 0 + +Release 2.11.28 (2012-11-28) +------------------------------------------------------------------------------ + +* All modules settings moved to global settings page +* Ability to edit countries list in system settings page +* YouHosting API support. Now you can sell YouHosting services with BoxBilling +* BoxBilling theme can now have settings page. Settings are globally available in client area theme +* New theme filters: + * asset_url - {{ 'style.css' | asset_url | stylesheet_tag }} + * img_tag - {{ company.logo_url | img_tag }} + * script_tag - {{ 'jquery.min.js' | asset_url | script_tag }} + * stylesheet_tag - {{ 'style.css' | asset_url | stylesheet_tag }} + * money - {{ '40' | money }} + * money_without_currency - {{ '40' | money_without_currency }} + * money_convert - {{ '40' | money_convert }} + * money_convert_without_currency - {{ '40' | money_convert_without_currency }} +* Updating Twig to 1.10.3 +* Cron option: Enable web based cron. This method requires that site has visitors and special theme tag support +* Major admin area theme update. Using fluid layout. Added breadcrumbs +* News module updates +* Ability to change payment gateway in invoice payment page +* Immediately redirect to payment gateway after checkout if payment gateway was selected +* Defautl theme update: Show client login/signup form before checkout button in shopping cart +* Search can be made by order meta keys +* Added new database table *client_order_meta* to store custom order data +* new statistic method to get number of sales by country +* new statistic method to get number of clients in country +* Do not use ajax when loading statistics in admin dashboard +* Show Last month statistics in dashboard +* Render mod_page_login.phtml instead of mod_client_login.phtml template if template exists +* Allow create any template mod_client_*.phtml to be accessed by client only +* Added redirects module. Usefull to redirect deprecated URLs to new ones +* Simplified payment gateway logic. Now it is a simple file, no need to extend any class. +* New event hooks: + * onBeforeAdminExtensionConfigSave + * onAfterAdminExtensionConfigSave + * onBeforeProductAddedToCart + * onAfterProductAddedToCart +* Removed hostinger branding +* Option to enable/disable ability for client to change his email +* Ability to require email confirmation in welcome email +* Ability to define required fields for client registration form +* Ability to disable new client registrations +* Invoices are not generated for 0 amount orders +* Performance and multiple bug fixes + +Release 2.9.14 (2012-09-14) +------------------------------------------------------------------------------ + +* Added new field for service license - checked_at +* Support tickets canned responses are grouped +* Support settings option: auto responder and delay message +* Preview ticket notes in tickets listing page +* Ticket page updates in admin area +* Ability to generate email templates for enabled extensions before first event occurrence +* Ability to define which IPs are allowed to login to admin area +* Redesigned settings page. All configurable extensions are listed in this page. +* Simplified payment gateway adapters transaction processing logic. + Now you can use API inside payment gateway method **processTransaction** + Requires new parameter (new_transaction_process_logic) to be added to settings table to enable this option +* Option to skip calling event hook in order suspend and cancel actions + +Release 2.9.10 (2012-09-10) +------------------------------------------------------------------------------ + +* Search clients by company name in clients listing page +* Ability to define staff member permissions +* New parameter in bb-config.php file BB_LOCALE_TIME_FORMAT - to define localized time format +* Add: New filter to display translatable date with time: bb_datetime +* Update: Search clients by company name in clients listing page +* Fix: Use PDO::MYSQL_ATTR_USE_BUFFERED_QUERY for PDO connection +* Fix: Order created from admin area do not match clients currency +* Update: If order total after discount is 0 and product activation is set to after payment, activate order after checkout +* Fix: Show total amount in print invoice page +* Update: onAfterAdminClientPasswordChange receives password parameter +* If order total after discount is 0 and product activation is set to after payment, activate order after checkout +* Simplified installer app. Now works smoothly with nginx +* Admin navigation is displayed according to staff member permissions +* Currency converter in currency management page +* No country detected flag fix +* Print invoice total issue fix +* Do not show help desks grouping in admin area support tickets listing +* Forums has new attribute - category +* Forum messages can now be rated with points +* RedBean update to 3.2.3 + +Release 2.8.2 (2012-08-02) +------------------------------------------------------------------------------ + +* Email template subject not updating fix +* Ability to import existing hosting accounts without activation from admin area +* Ability to automatically setup EU VAT rules from admin area +* Invoice not marked as paid if client balance is equal to amount of invoice +* Admin area client listing update. Shows clients country. +* Added Queue manager. Gives ability to execute long running tasks in background +* Added Mass mailer tool to send email to filtered list of clients. +* Added Centova cast module to sell shout cast servers. +* Added file editor to edit any file on BoxBilling. +* Show Admin API key in admin profile +* New fields in client profile: referred_by, company_vat, company_number, type +* New fields for invoice: seller_company_vat, seller_company_number, buyer_phone_cc, buyer_company_vat, buyer_company_number, text_1, text_2 +* Added Tanzania to country list +* Transfer code is not mandatory in domain order form +* Country flag is visible in admin area clients listing page +* Added country translations to default locale pot + +Release 2.7.4 (2012-07-04) +------------------------------------------------------------------------------ + +* Update script issue fix when did not update from 2.4.30 +* Payza payment gateway +* Bug fix when shopping cart did not generate subscribable invoices +* 2Checkout gateway updates +* Does not list hidden products by default in guest/product/get_list call +* Ability to remove order with addons. + +Release 2.7.2 (2012-07-02) +------------------------------------------------------------------------------ + +* Pass hosting account password to email template as variable +* Whm server manager updates +* Set default currency if clients currency is not defined when preparing invoice for client +* Ability to call custom event hook on invoice item activation. New invoice item type - hook_call +* Parameter **execute** in admin/invoice/mark_as_paid now can activate related services immediately +* Order renewal logic parameter. Can select how renewal date is calculated +* added new field in client database to define authorization type +* admin/client/create password is not mandatory +* admin/client/get can now find client by email +* Invoices duplicate listing issue fix +* Added Akismet checking for forum posts in spamChecker module +* Support for php-gettext if gettext extension is not installed on server. +* AliPay payment gateway updates +* Added Thank You page. Clients can be redirected after payment instead of invoice. + +Release 2.6.22 (2012-06-22) +------------------------------------------------------------------------------ + +* Invoice tax calculation bug fix +* Whm/Cpanel invalid body response issue updates +* Fixed order event hooks +* Can not create currency issue fix. Change currency price format from %price% to {{price}}. Solving an for servers where mod_security is enabled. +* Fix for issue: Email templates are cached and does not auto refresh if BB_DEBUG mode is false +* Add message to notification center after client makes post to forum topic. Notification center extension must be enabled. + +Release 2.6.17 (2012-06-17) +------------------------------------------------------------------------------ + +* New SolusVM VPS product type. Ability to import clients and existing servers from SolusVM master server. Full control from admin and client area. +* New product type BoxBiling license. Ability to sell BoxBilling licenses from any BoxBilling installation. Enable +* Email templates are generated on first event occurrence. Until then it can not be managed. +* Ability to filter orders by invoice option: issue invoice manually or automatically. +* Ability to preview email templates. Old email templates are deprecated. +* Ability to place new order for clients from admin area +* Ability to change currency price format +* Deprecated bb-library/Hook bindings. Now event hooks are binded from modules Service.php class +* php mcrypt extension is now mandatory +* Email settings are now stored in encrypted format +* Added ability to reset email template to default +* Moved email sending settings from *general settings* to *email templates* menu +* New dashboard widget to show active orders count grouped by products +* Updated Twig to 1.8.2 version +* Added ability to disable/enable automatic invoice issuing for orders +* SpamChecker is a module. Google recapthca and stopforumspam.com database checks can be simply enabled or disabled as any other module +* All extensions can call other extension event hooks +* All extensions can hook into cron job event +* Added new API methods **extension_config_get** and **extension_config_save** to store encrypted extension configuration data +* Admin layout contains more blocks. Gives more freedom for extensions developers. +* Admin area dashboard statistics links now filters data for today and yesterday +* Ability to load custom listing template file for order index page +* Check if template file exists function for guest API guest.system_template_exists({"file":"mod_index_dashboard.phtml"}) +* Ability to create admin account if none exists from admin area interface instead of login form. +* Default sort order for new products +* Products grouped by type can now be ordered on *slider* type form +* Bug fix when installed in subfolder named same as one of the modules +* Client profile management page updates - split to sections +* Adding dotTk domain registrar to official version +* Adding Interkassa payment gateway +* Email registrar bug fixes +* Internetbs registrar bug fixes +* Ability to create custom products. These products can now be enabled and disabled as an extension +* Added loader spinner to admin area login form +* Added weekly pricing option for products +* Currency rate is saved in invoice on payment event +* Google Recaptcha now uses https +* Ability to add/remove forum topic to favorites +* Ability to subscribe/unsubscribe to forum message notifications +* Adding new field to extensions meta table - client_id + +Release v2.4.30 (2012-04-30) +------------------------------------------------------------------------------ + +* Fixed bug when admin was not able to update order creation date in admin area +* Promo code can be recurrent or applied to first order only +* Promo code validation once per client +* PayPal gateway validates non latin characters IPNs correctly +* Ability to change how many times promo code was used +* Added ability for admin to issue new invoice for order +* Setup price promo code issue fix. +* More translations made available +* Show ticket notes counter in list and ticket +* Order renewal invoice due date is same a order expiration date +* Added version param to js and css files to avoid clear cache on update +* https links updates +* https://github.com/boxbilling/BoxBilling/issues/115 fix +* Password issue fix: https://github.com/boxbilling/BoxBilling/issues/114 +* Including http://redbeanphp.com/ ORM in bb-library/rb.php For extensions as a helper +* Simplifie nginx server support. Routing includes only 2 simple rules +* Adding new core module mod_api. Api is now accessible from yourdomain.com/api/role/module/method. bb-api is deprecated and will be removed in 2.6 version +* Gravatar url uses ssl if BoxBilling is on https +* Selectable refunds logic: generate refund invoice with paid invoice numbering or generate credit note +* New invoice status: "canceled". Invoice with canceled status are not counted into income. +* Invoice mark as paid with credits fix. +* Show task status and charge icons for invoice items for approved invoices +* Ability to remove clients balance +* Adding exception to PayPal gateway for HUF currency. +* Ability to install module from extensions site +* Ability to filter invoices by paid_at date in url param +* Adding config field for license service for more possibilities +* https://github.com/boxbilling/BoxBilling/issues/113 update +* Mail issue fix when port number was not recognized +* Stats module update: Income is counted on paid_at date not created_at date +* onBeforeClientProfileUpdate Event updates. Now receives currently logged in client data. +* Invoice API returns more information +* Display currency selector only if more than one currency is available +* Hosting account password is generated on order activation action +* Removing favicon to avoid overwriting on update +* Added zip code management to invoice client credentials +* Whm/Cpanel server manager update. Do not try to exceute command again if response failed +* Translations fix +* Typo fix in order management page +* WebToPay payment adapter updates +* Admin area dashboard updates. Clickable titles. +* Adding missing email templates for closing ticket event +* Client area popup close button style fix diff --git a/LICENSE b/LICENSE new file mode 100644 index 000000000..ebde5004d --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright 2014 Boxbilling, Inc + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. \ No newline at end of file diff --git a/README.md b/README.md index 8579bdca4..b93f8ddd3 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,46 @@ +BoxBilling +================================================================================ + +[![Build Status](https://travis-ci.org/boxbilling/boxbilling.svg)](https://travis-ci.org/boxbilling/boxbilling) + +Open Source billing software + +Requirements +================================================================================ + +* PHP >=5.3.3 +* PHP extensions: + * mcrypt + * curl + * zlib + * PDO + * gettext +* MySQL or any PDO compatible SQL server + Getting started -======== +================================================================================ -Please read documentation at http://www.boxbilling.com/docs/ to get started with BoxBilling +Please read documentation at http://www.boxbilling.com/docs to get started +with BoxBilling -Support & Feedback -======== +Contributing +================================================================================ -* Read documentation: http://www.boxbilling.com/docs/ -* Contact us at: http://www.boxbilling.com/en/support/contact -* Submit support ticket at http://www.boxbilling.com/en/support -* Report bug at https://github.com/boxbilling/BoxBilling/issues/new -* Request a feature http://www.boxbilling.com/en/forum -* Contact us directly at development@boxbilling.com -* Follow us on Twitter http://twitter.com/#boxbilling -* Like us on Facebook https://www.facebook.com/boxbilling +1. Fork it +2. Create your feature branch (`git checkout -b my-new-feature`) +3. Commit your changes (`git commit -am 'Add some feature'`) +4. Push to the branch (`git push origin my-new-feature`) +5. Create new Pull Request -Copyright -======== +Support +================================================================================ -* Copyright (C) BoxBilling.com All rights reserved. -* See Licenses details at http://www.boxbilling.com/LICENSE.txt \ No newline at end of file +* [Documentation](http://www.boxbilling.com/docs/) +* [Official website](http://www.boxbilling.com/) +* [@boxbilling](https://twitter.com/boxbilling) +* [Facebook](https://www.facebook.com/boxbilling) + +Licensing +================================================================================ + +BoxBilling is licensed under the Apache License, Version 2.0. See LICENSE for full license text. \ No newline at end of file diff --git a/bin/export_db_structure.sh b/bin/export_db_structure.sh new file mode 100644 index 000000000..6559e2f91 --- /dev/null +++ b/bin/export_db_structure.sh @@ -0,0 +1,13 @@ +#!/bin/bash +# Generates dump of provided database structure and save it to src/install/structure.sql + +if [ -z $1 ] || [ -z $2 ]; then + echo "error: arguments not found" >&2 + echo "usage: $0 database username" >&2 + exit 1 +fi + +db_name=$1 +db_user_name=$2 + +mysqldump --skip-add-drop-table -d -h localhost -u $db_user_name -p $db_name | sed 's/ AUTO_INCREMENT=[0-9]*\b//' > ../src/install/structure.sql \ No newline at end of file diff --git a/bin/gettext.php b/bin/gettext.php new file mode 100644 index 000000000..6e01e88b2 --- /dev/null +++ b/bin/gettext.php @@ -0,0 +1,45 @@ + $tmpDir, + 'auto_reload' => true + )); + $twig->addExtension(new Twig_Extensions_Extension_I18n()); + $twig->addExtension(new Twig_Extensions_Extension_Debug()); + $twig->addExtension(new Twig_Extensions_Extension_BB()); + + foreach($dirs as $tplDir) { + if(is_link(pathinfo($tplDir, PATHINFO_DIRNAME))) { + print 'Skip symlink module'. $tplDir; + continue; + } + + foreach (new RecursiveIteratorIterator(new RecursiveDirectoryIterator($tplDir), RecursiveIteratorIterator::LEAVES_ONLY|FilesystemIterator::SKIP_DOTS) as $file) + { + if($file->getBaseName() == '.svn' || $file->getBaseName() == '.' || $file->getBaseName() == '..') { + continue; + } + + $twig->loadTemplate(str_replace($tplDir.'/', '', $file)); + echo "."; + } + } + echo "Done".PHP_EOL; +} + diff --git a/bin/gettext.sh b/bin/gettext.sh new file mode 100644 index 000000000..088870204 --- /dev/null +++ b/bin/gettext.sh @@ -0,0 +1,30 @@ +# Generate pot files + +BASEDIR=$(dirname $0) +APPDIR=`cd $BASEDIR/.. ; pwd` +BB_CACHE_ADMIN="/tmp/bb_admin_cache/" +BB_CACHE_CLIENT="/tmp/bb_client_cache/" +BB_POT_ADMIN=$APPDIR/src/bb-locale/admin.pot +BB_POT_CLIENT=$APPDIR/src/bb-locale/messages.pot +BB_POT_EXCLUDE=$APPDIR/bin/gettext_exclude.po +BB_POT_INCLUDE=$APPDIR/bin/gettext_include.pot + +rm -rf $BB_CACHE_ADMIN +rm -rf $BB_CACHE_CLIENT + +php gettext.php + +echo "Generating admin.pot file from" $BB_CACHE_ADMIN +cd $BB_CACHE_ADMIN +find . -iname "*.php" | xargs xgettext --omit-header --output=$BB_POT_ADMIN --from-code=UTF-8 --no-location --language=PHP + +echo "Generating messages.pot file from" $BB_CACHE_CLIENT +cd $BB_CACHE_CLIENT +find . -iname "*.php" | xargs xgettext --omit-header --output=$BB_POT_CLIENT --from-code=UTF-8 --no-location --language=PHP + +echo "Joining messages.pot file from" $APPDIR/src +cd $APPDIR/src +find . -iname "*.php" | xargs xgettext --omit-header --output=$BB_POT_CLIENT --join-existing --from-code=UTF-8 --no-location --language=PHP --keyword=__ --keyword=Box_Exception -x $BB_POT_EXCLUDE + +echo "Joining gettext_include.pot file to messages.pot" +msgcat $BB_POT_INCLUDE $BB_POT_CLIENT --output=$BB_POT_CLIENT \ No newline at end of file diff --git a/bin/gettext_exclude.po b/bin/gettext_exclude.po new file mode 100644 index 000000000..e69de29bb diff --git a/bin/gettext_include.pot b/bin/gettext_include.pot new file mode 100644 index 000000000..eae0361a1 --- /dev/null +++ b/bin/gettext_include.pot @@ -0,0 +1,323 @@ +msgid "sq_AL" +msgstr "Albanian (Albania)" + +msgid "ar_DZ" +msgstr "Arabic (Algeria)" + +msgid "ar_BH" +msgstr "Arabic (Bahrain)" + +msgid "ar_EG" +msgstr "Arabic (Egypt)" + +msgid "ar_IQ" +msgstr "Arabic (Iraq)" + +msgid "ar_JO" +msgstr "Arabic (Jordan)" + +msgid "ar_KW" +msgstr "Arabic (Kuwait)" + +msgid "ar_LB" +msgstr "Arabic (Lebanon)" + +msgid "ar_LY" +msgstr "Arabic (Libya)" + +msgid "ar_MA" +msgstr "Arabic (Morocco)" + +msgid "ar_OM" +msgstr "Arabic (Oman)" + +msgid "ar_QA" +msgstr "Arabic (Qatar)" + +msgid "ar_SA" +msgstr "Arabic (Saudi Arabia)" + +msgid "ar_SD" +msgstr "Arabic (Sudan)" + +msgid "ar_SY" +msgstr "Arabic (Syria)" + +msgid "ar_TN" +msgstr "Arabic (Tunisia)" + +msgid "ar_AE" +msgstr "Arabic (United Arab Emirates)" + +msgid "ar_YE" +msgstr "Arabic (Yemen)" + +msgid "be_BY" +msgstr "Belarusian (Belarus)" + +msgid "bg_BG" +msgstr "Bulgarian (Bulgaria)" + +msgid "ca_ES" +msgstr "Catalan (Spain)" + +msgid "zh_CN" +msgstr "Chinese (China)" + +msgid "zh_HK" +msgstr "Chinese (Hong Kong)" + +msgid "zh_SG" +msgstr "Chinese (Singapore)" + +msgid "zh_TW" +msgstr "Chinese (Taiwan)" + +msgid "hr_HR" +msgstr "Croatian (Croatia)" + +msgid "cs_CZ" +msgstr "Czech (Czech Republic)" + +msgid "da_DK" +msgstr "Danish (Denmark)" + +msgid "nl_BE" +msgstr "Dutch (Belgium)" + +msgid "nl_NL" +msgstr "Dutch (Netherlands)" + +msgid "en_AU" +msgstr "English (Australia)" + +msgid "en_CA" +msgstr "English (Canada)" + +msgid "en_IN" +msgstr "English (India)" + +msgid "en_IE" +msgstr "English (Ireland)" + +msgid "en_MT" +msgstr "English (Malta)" + +msgid "en_NZ" +msgstr "English (New Zealand)" + +msgid "en_PH" +msgstr "English (Philippines)" + +msgid "en_SG" +msgstr "English (Singapore)" + +msgid "en_ZA" +msgstr "English (South Africa)" + +msgid "en_GB" +msgstr "English (United Kingdom)" + +msgid "en_US" +msgstr "English (United States)" + +msgid "et_EE" +msgstr "Estonian (Estonia)" + +msgid "fi_FI" +msgstr "Finnish (Finland)" + +msgid "fr_BE" +msgstr "French (Belgium)" + +msgid "fr_CA" +msgstr "French (Canada)" + +msgid "fr_FR" +msgstr "French (France)" + +msgid "fr_LU" +msgstr "French (Luxembourg)" + +msgid "fr_CH" +msgstr "French (Switzerland)" + +msgid "de_AT" +msgstr "German (Austria)" + +msgid "de_DE" +msgstr "German (Germany)" + +msgid "de_LU" +msgstr "German (Luxembourg)" + +msgid "de_CH" +msgstr "German (Switzerland)" + +msgid "el_CY" +msgstr "Greek (Cyprus)" + +msgid "el_GR" +msgstr "Greek (Greece)" + +msgid "iw_IL" +msgstr "Hebrew (Israel)" + +msgid "hi_IN" +msgstr "Hindi (India)" + +msgid "hu_HU" +msgstr "Hungarian (Hungary)" + +msgid "is_IS" +msgstr "Icelandic (Iceland)" + +msgid "in_ID" +msgstr "Indonesian (Indonesia)" + +msgid "ga_IE" +msgstr "Irish (Ireland)" + +msgid "it_IT" +msgstr "Italian (Italy)" + +msgid "it_CH" +msgstr "Italian (Switzerland)" + +msgid "ja_JP" +msgstr "Japanese (Japan)" + +msgid "ja_JP_JP" +msgstr "Japanese (Japan,JP)" + +msgid "ko_KR" +msgstr "Korean (South Korea)" + +msgid "lv_LV" +msgstr "Latvian (Latvia)" + +msgid "lt_LT" +msgstr "Lithuanian (Lithuania)" + +msgid "mk_MK" +msgstr "Macedonian (Macedonia)" + +msgid "ms_MY" +msgstr "Malay (Malaysia)" + +msgid "mt_MT" +msgstr "Maltese (Malta)" + +msgid "no_NO" +msgstr "Norwegian (Norway)" + +msgid "no_NO_NY" +msgstr "Norwegian (Norway,Nynorsk)" + +msgid "pl_PL" +msgstr "Polish (Poland)" + +msgid "pt_BR" +msgstr "Portuguese (Brazil)" + +msgid "pt_PT" +msgstr "Portuguese (Portugal)" + +msgid "ro_RO" +msgstr "Romanian (Romania)" + +msgid "ru_RU" +msgstr "Russian (Russia)" + +msgid "sr_BA" +msgstr "Serbian (Bosnia and Herzegovina)" + +msgid "sr_ME" +msgstr "Serbian (Montenegro)" + +msgid "sr_CS" +msgstr "Serbian (Serbia and Montenegro)" + +msgid "sr_RS" +msgstr "Serbian (Serbia)" + +msgid "sk_SK" +msgstr "Slovak (Slovakia)" + +msgid "sl_SI" +msgstr "Slovenian (Slovenia)" + +msgid "es_AR" +msgstr "Spanish (Argentina)" + +msgid "es_BO" +msgstr "Spanish (Bolivia)" + +msgid "es_CL" +msgstr "Spanish (Chile)" + +msgid "es_CO" +msgstr "Spanish (Colombia)" + +msgid "es_CR" +msgstr "Spanish (Costa Rica)" + +msgid "es_DO" +msgstr "Spanish (Dominican Republic)" + +msgid "es_EC" +msgstr "Spanish (Ecuador)" + +msgid "es_SV" +msgstr "Spanish (El Salvador)" + +msgid "es_GT" +msgstr "Spanish (Guatemala)" + +msgid "es_HN" +msgstr "Spanish (Honduras)" + +msgid "es_MX" +msgstr "Spanish (Mexico)" + +msgid "es_NI" +msgstr "Spanish (Nicaragua)" + +msgid "es_PA" +msgstr "Spanish (Panama)" + +msgid "es_PY" +msgstr "Spanish (Paraguay)" + +msgid "es_PE" +msgstr "Spanish (Peru)" + +msgid "es_PR" +msgstr "Spanish (Puerto Rico)" + +msgid "es_ES" +msgstr "Spanish (Spain)" + +msgid "es_US" +msgstr "Spanish (United States)" + +msgid "es_UY" +msgstr "Spanish (Uruguay)" + +msgid "es_VE" +msgstr "Spanish (Venezuela)" + +msgid "sv_SE" +msgstr "Swedish (Sweden)" + +msgid "th_TH" +msgstr "Thai (Thailand)" + +msgid "tr_TR" +msgstr "Turkish (Turkey)" + +msgid "uk_UA" +msgstr "Ukrainian (Ukraine)" + +msgid "vi_VN" +msgstr "Vietnamese (Vietnam)" \ No newline at end of file diff --git a/bin/install.sh b/bin/install.sh new file mode 100644 index 000000000..c31e5d2a1 --- /dev/null +++ b/bin/install.sh @@ -0,0 +1,14 @@ +#!/bin/sh + +URLBASE="http://www.boxbilling.com/version/latest.zip" + +wget -O latest.zip $URLBASE +unzip -o latest.zip + +cp bb-config-sample.php bb-config.php +chmod 755 bb-config.php +chmod 777 bb-uploads +chmod -R 777 bb-data + +rm -rf latest.zip + diff --git a/bin/install_locale.sh b/bin/install_locale.sh new file mode 100644 index 000000000..1955b0c09 --- /dev/null +++ b/bin/install_locale.sh @@ -0,0 +1,9 @@ +#!/bin/bash +# Install new locale +# +# $ sudo sh install_locale.sh fr_FR + +cd /usr/share/locales +./install-language-pack $1 +dpkg-reconfigure locales +locale -a \ No newline at end of file diff --git a/bin/prepare.php b/bin/prepare.php new file mode 100644 index 000000000..ae29f124f --- /dev/null +++ b/bin/prepare.php @@ -0,0 +1,73 @@ + true, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, +)); + +echo sprintf("Dropping database %s", $dbname) . PHP_EOL; +$sql = sprintf("DROP DATABASE IF EXISTS %s;", $dbname); +$dbh->exec($sql); +$error = $dbh->errorInfo(); +if ($error[2]) { + var_dump($dbh->errorInfo()); + exit; +} + +echo sprintf("Creating database %s", $dbname) . PHP_EOL; +$sql = sprintf("CREATE DATABASE %s;", $dbname); +$dbh->exec($sql); +$error = $dbh->errorInfo(); +if ($error[2]) { + var_dump($dbh->errorInfo()); + exit; +} + +echo sprintf("Connecting to %s database with user %s", $dbname, $user) . PHP_EOL; +$sql = sprintf("use %s;", $dbname); +$dbh->exec($sql); +$error = $dbh->errorInfo(); +if ($error[2]) { + var_dump($dbh->errorInfo()); + exit; +} + +echo sprintf("Create SQL database structure from file %s", $structureSql) . PHP_EOL; +$sql = file_get_contents($pathAppInstall . $structureSql); +$dbh->exec($sql); +$error = $dbh->errorInfo(); +if ($error[2]) { + var_dump($dbh->errorInfo()); + exit; +} + +echo sprintf("Import content to database from file %s", $contentSql) . PHP_EOL; +$sql = file_get_contents($pathAppInstall . $contentSql); +$stmt = $dbh->prepare($sql); +$stmt->execute(); +$i = 0; +do{ +}while($stmt->nextRowset()); + + +echo "Finished" . PHP_EOL; \ No newline at end of file diff --git a/bin/provision.sh b/bin/provision.sh new file mode 100644 index 000000000..c61409d91 --- /dev/null +++ b/bin/provision.sh @@ -0,0 +1,18 @@ +#!/usr/bin/env bash + +mysql -u root -e "DROP DATABASE IF EXISTS boxbilling" +mysql -u root -e "CREATE DATABASE boxbilling" +mysql -u root boxbilling < /var/www/src/install/structure.sql +mysql -u root boxbilling -e "INSERT INTO admin (role, name, email, pass, protected, created_at, updated_at) VALUES('admin', 'Admin', 'admin@boxbilling.com', SHA1('admin'), 1, NOW(), NOW());" + +cd /var/www/src +cp htaccess.txt .htaccess +cp bb-config-sample.php bb-config.php + +cd /var/www +ln -s src public +curl -sS https://getcomposer.org/installer | php +php composer.phar install --no-interaction --prefer-source --dev + +yum install php-mcrypt -y +service httpd restart diff --git a/bin/update.sh b/bin/update.sh new file mode 100644 index 000000000..b27929494 --- /dev/null +++ b/bin/update.sh @@ -0,0 +1,9 @@ +#!/bin/sh + +UPDATE_URL="http://www.boxbilling.com/version/latest_update.zip" + +wget -O update.zip -q $UPDATE_URL +unzip -o update.zip +php bb-update.php +rm -rf update.zip +rm -rf bb-data/cache/* diff --git a/build.xml b/build.xml new file mode 100644 index 000000000..1a56331bc --- /dev/null +++ b/build.xml @@ -0,0 +1,150 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data/class-header.txt b/data/class-header.txt new file mode 100755 index 000000000..ec3ffa615 --- /dev/null +++ b/data/class-header.txt @@ -0,0 +1,12 @@ + + + + \ No newline at end of file diff --git a/src/bb-config-sample.php b/src/bb-config-sample.php new file mode 100755 index 000000000..51f76ee99 --- /dev/null +++ b/src/bb-config-sample.php @@ -0,0 +1,115 @@ + 'PRO-wfe1RJ6aqG1wurwlocc9lwouNeTcUtklsp9ujy33clb8c57fdV', + + 'salt' => '', + + /** + * Full URL where BoxBilling is installed with trailing slash + */ + 'url' => 'http://www.boxbilling.vm/', + + 'admin_area_prefix' => '/bb-admin', + + /** + * Enable or Disable the display of notices + */ + 'debug' => false, + + /** + * Enable or Disable search engine friendly urls. + * Configure .htaccess file before enabling this feature + * Set to TRUE if using nginx + */ + 'sef_urls' => false, + + /** + * Application timezone + */ + 'timezone' => 'UTC', + + /** + * Set BoxBilling locale + */ + 'locale' => 'en_US', + + /** + * Set default date format for localized strings + * Format information: http://php.net/manual/en/function.strftime.php + */ + 'locale_date_format' => '%A, %d %B %G', + + /** + * Set default time format for localized strings + * Format information: http://php.net/manual/en/function.strftime.php + */ + 'locale_time_format' => ' %T', + + /** + * Set location to store sensitive data + */ + 'path_data' => dirname(__FILE__) . '/bb-data', + + 'path_logs' => dirname(__FILE__) . '/bb-data/log/application.log', + + 'db' => array( + /** + * Database type. Don't change this if in doubt. + */ + 'type' =>'mysql', + + /** + * Database hostname. Don't change this if in doubt. + */ + 'host' =>'127.0.0.1', + + /** + * The name of the database for BoxBilling + */ + 'name' =>'boxbilling', + + /** + * Database username + */ + 'user' =>'root', + + /** + * Database password + */ + 'password' =>'', + ), + + 'twig' => array( + 'debug' => false, + 'auto_reload' => false, + 'cache' => dirname(__FILE__) . '/bb-data/cache', + ), + + 'api' => array( + // all requests made to API must have referrer request header with the same url as BoxBilling installation + 'require_referrer_header' => false, + + // empty array will allow all IPs to access API + 'allowed_ips' => array(), + + // Time span for limit in seconds + 'rate_span' => 60 * 60, + + // How many requests allowed per time span + 'rate_limit' => 1000, + ), +); \ No newline at end of file diff --git a/src/bb-cron.php b/src/bb-cron.php new file mode 100644 index 000000000..6275e287d --- /dev/null +++ b/src/bb-cron.php @@ -0,0 +1,21 @@ +runCrons($interval); + +unset($service, $interval, $di); \ No newline at end of file diff --git a/src/bb-data/.htaccess b/src/bb-data/.htaccess new file mode 100755 index 000000000..ff2beb844 --- /dev/null +++ b/src/bb-data/.htaccess @@ -0,0 +1,2 @@ +order deny,allow +deny from all diff --git a/src/bb-data/index.html b/src/bb-data/index.html new file mode 100755 index 000000000..8b1378917 --- /dev/null +++ b/src/bb-data/index.html @@ -0,0 +1 @@ + diff --git a/src/bb-data/uploads/index.html b/src/bb-data/uploads/index.html new file mode 100755 index 000000000..8b1378917 --- /dev/null +++ b/src/bb-data/uploads/index.html @@ -0,0 +1 @@ + diff --git a/src/bb-di.php b/src/bb-di.php new file mode 100644 index 000000000..f0be9fbd8 --- /dev/null +++ b/src/bb-di.php @@ -0,0 +1,290 @@ +addWriter($writer); + return $log; +}; +$di['crypt'] = function() use ($di) { + $crypt = new Box_Crypt(); + $crypt->setDi($di); + return $crypt; +}; +$di['pdo'] = function() use ($di) { + $c = $di['config']['db']; + + $pdo = new PDO($c['type'].':host='.$c['host'].';dbname='.$c['name'], + $c['user'], + $c['password'], + array( + PDO::MYSQL_ATTR_USE_BUFFERED_QUERY => true, + PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION, + PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC, + ) + ); + + if(isset($c['debug']) && $c['debug']) { + $pdo->setAttribute(PDO::ATTR_STATEMENT_CLASS, array ('Box_DbLoggedPDOStatement')); + } + + if($c['type'] == 'mysql') { + $pdo->exec( 'SET NAMES "utf8"' ); + $pdo->exec( 'SET CHARACTER SET utf8' ); + $pdo->exec( 'SET CHARACTER_SET_CONNECTION = utf8' ); + $pdo->exec( 'SET CHARACTER_SET_DATABASE = utf8' ); + $pdo->exec( 'SET character_set_results = utf8' ); + $pdo->exec( 'SET character_set_server = utf8' ); + $pdo->exec( 'SET SESSION interactive_timeout = 28800' ); + $pdo->exec( 'SET SESSION wait_timeout = 28800' ); + } + + return $pdo; +}; +$di['db'] = function() use ($di) { + + require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . 'rb.php'; + R::setup($di['pdo']); + + $helper = new Box_BeanHelper(); + $helper->setDi($di); + + $mapper = new \RedBeanPHP\Facade(); + $mapper->getRedBean()->setBeanHelper($helper); + $freeze = isset($di['config']['db']['freeze']) ? (bool)$di['config']['db']['freeze'] : true; + $mapper->freeze($freeze); + + $db = new Box_Database(); + $db->setDi($di); + $db->setDataMapper($mapper); + return $db; +}; +$di['pager'] = function() use($di) { + $service = new Box_Pagination(); + $service->setDi($di); + return $service; +}; +$di['url'] = function() use ($di) { + $url = new Box_Url(); + $url->setDi($di); + $url->setBaseUri(BB_URL); + return $url; +}; +$di['mod'] = $di->protect(function ($name) use($di) { + $mod = new Box_Mod($name); + $mod->setDi($di); + return $mod; +}); +$di['mod_service'] = $di->protect(function ($mod, $sub = '') use($di) { + return $di['mod']($mod)->getService($sub); +}); +$di['mod_config'] = $di->protect(function ($name) use($di) { + return $di['mod']($name)->getConfig(); +}); +$di['events_manager'] = function() use ($di) { + $service = new Box_EventManager(); + $service->setDi($di); + return $service; +}; +$di['session'] = function () use ($di) { + $handler = new PdoSessionHandler($di['pdo']); + return new Box_Session($handler); +}; +$di['cookie'] = function () use ($di) { + $service = new Box_Cookie(); + $service->setDi($di); + return $service; +}; +$di['request'] = function () use ($di) { + $service = new Box_Request(); + $service->setDi($di); + return $service; +}; +$di['cache'] = function () use ($di) { return new FileCache();}; +$di['auth'] = function () use ($di) { return new Box_Authorization($di);}; +$di['twig'] = function () use ($di) { + $config = $di['config']; + $options = $config['twig']; + + $loader = new Twig_Loader_String(); + $twig = new Twig_Environment($loader, $options); + + $box_extensions = new Box_TwigExtensions(); + $box_extensions->setDi($di); + + $twig->addExtension(new Twig_Extension_Optimizer()); + $twig->addExtension(new Twig_Extensions_Extension_I18n()); + $twig->addExtension(new Twig_Extensions_Extension_Debug()); + $twig->addExtension($box_extensions); + $twig->getExtension('core')->setDateFormat($config['locale_date_format']); + $twig->getExtension('core')->setTimezone($config['timezone']); + + // add globals + if(isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { + $_GET['ajax'] = TRUE; + } + + $twig->addGlobal('request', $_GET); + $twig->addGlobal('guest', $di['api_guest']); + + return $twig; +}; + +$di['loggedin_client'] = function() use ($di) { + if(!$di['auth']->isClientLoggedIn()) { + throw new Exception('Client is not logged in'); + } + $client_id = $di['session']->get('client_id'); + return $di['db']->getExistingModelById('Client', $client_id); +}; +$di['loggedin_admin'] = function() use ($di) { + if(php_sapi_name() == 'cli') { + return $di['mod_service']('staff')->getCronAdmin(); + } + + if(!$di['auth']->isAdminLoggedIn()) { + throw new Exception('Admin is not logged in'); + } + $admin = $di['session']->get('admin'); + return $di['db']->getExistingModelById('Admin', $admin['id']); +}; + +$di['api'] = $di->protect(function($role) use($di) { + switch ($role) { + case 'guest': + $identity = new \Model_Guest(); + break; + + case 'client': + $identity = $di['loggedin_client']; + break; + + case 'admin': + $identity = $di['loggedin_admin']; + break; + + case 'system': + $identity = $di['mod_service']('staff')->getCronAdmin(); + break; + + default : + throw new Exception('Unrecognized Handler type: '.$this->type); + } + $api = new Api_Handler($identity); + $api->setDi($di); + return $api; +}); +$di['api_guest'] = function() use ($di) { return $di['api']('guest'); }; +$di['api_client'] = function() use ($di) { return $di['api']('client');}; +$di['api_admin'] = function() use ($di) { return $di['api']('admin'); }; +$di['api_system'] = function() use ($di) { return $di['api']('system'); }; +$di['license'] = function () use ($di) { + $service = new Box_License(); + $service->setDi($di); + return $service; +}; + +$di['tools'] = function () use ($di){ + $service = new Box_Tools(); + $service->setDi($di); + return $service; +}; + +$di['validator'] = function () use ($di){ + $validator = new Box_Validate(); + $validator->setDi($di); + return $validator; +}; +$di['guzzle_client'] = function () { + return new \Guzzle\Http\Client(); +}; +$di['mail'] = function () { + return new Box_Mail(); +}; +$di['extension'] = function () use ($di) { + $extension = new \Box_Extension(); + $extension->setDi($di); + return $extension; +}; +$di['updater'] = function () use ($di) { + $updater = new \Box_Update(); + $updater->setDi($di); + return $updater; +}; +$di['curl'] = function ($url) use ($di) { + $curl = new \Box_Curl($url); + $curl->setDi($di); + return $curl; + +}; +$di['zip_archive'] = function () use ($di) {return new ZipArchive;}; + +$di['server_package'] = function () use ($di) {return new Server_Package();}; +$di['server_client'] = function () use ($di) {return new Server_Client();}; +$di['server_account'] = function () use ($di) {return new Server_Account();}; + +$di['server_manager'] = $di->protect(function ($manager, $config) use($di) { + $class = sprintf('Server_Manager_%s', ucfirst($manager)); + return new $class($config); +}); + +$di['requirements'] = function () use ($di) { + $r = new Box_Requirements(); + $r->setDi($di); + return $r; +}; + +$di['period'] = $di->protect(function($code) use($di){ return new \Box_Period($code); }); + +$di['theme'] = function() use($di) { + $service = $di['mod_service']('theme'); + return $service->getCurrentClientAreaTheme(); +}; +$di['cart'] = function() use($di) { + $service = $di['mod_service']('cart'); + return $service->getSessionCart(); +}; + +$di['table'] = $di->protect(function ($name) use($di) { + $tools = new Box_Tools(); + $tools->setDi($di); + $table = $tools->getTable($name); + $table->setDi($di); + return $table; +}); + +$di['license_server'] = function () use ($di) { + $server = new \Box\Mod\Servicelicense\Server($di['logger']); + $server->setDi($di); + return $server; +}; + +$di['service_boxbilling'] = $di->protect(function ($config) use($di) { + $service = new \Box\Mod\Serviceboxbillinglicense\ServiceBoxbilling($config); + //$service->setDi($di); + return $service; +}); + +$di['ftp'] = $di->protect(function($params) use($di){ return new \Box_Ftp($params); }); + +$di['pdf'] = function () use ($di) { return new \tFPDF(); }; + +$di['geoip'] = function () use ($di) { return new \GeoIp2\Database\Reader(BB_PATH_LIBRARY . '/GeoLite2-Country.mmdb'); }; +return $di; diff --git a/src/bb-ipn.php b/src/bb-ipn.php new file mode 100644 index 000000000..9724541bc --- /dev/null +++ b/src/bb-ipn.php @@ -0,0 +1,68 @@ + true, + 'bb_invoice_id' => $bb_invoice_id, + 'bb_gateway_id' => $bb_gateway_id, + 'get' => $_GET, + 'post' => $_POST, + 'server' => $_SERVER, + 'http_raw_post_data' => file_get_contents("php://input"), +); + +try { + $service = $di['mod_service']('invoice', 'transaction'); + $output = $service->createAndProcess($ipn); + $res = array('result'=>$output, 'error'=>null); +} catch(Exception $e) { + $res = array('result'=>null, 'error'=>$e->getMessage()); + $output = false; +} + +// print transaction output if available +if(!is_bool($output)) { + print $output; + exit; +} + +// redirect to invoice if gateways requires +if(isset($_GET['bb_redirect']) && isset($_GET['bb_invoice_hash'])) { + $url = $di['url']->get('invoice/'.$_GET['bb_invoice_hash']); + header("Location: $url"); + exit; +} else { + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Content-type: application/json; charset=utf-8'); + print json_encode($res); + exit; +} \ No newline at end of file diff --git a/src/bb-library/Api/Abstract.php b/src/bb-library/Api/Abstract.php new file mode 100644 index 000000000..94045b821 --- /dev/null +++ b/src/bb-library/Api/Abstract.php @@ -0,0 +1,151 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param null $mod + */ + public function setMod($mod) + { + $this->mod = $mod; + } + + /** + * @return null + */ + public function getMod() + { + if(!$this->mod) { + throw new Exception('Mod object is not set for the service'); + } + return $this->mod; + } + + /** + * @param null $identity + */ + public function setIdentity($identity) + { + $this->identity = $identity; + } + + /** + * @return null + */ + public function getIdentity() + { + return $this->identity; + } + + /** + * @param null $service + */ + public function setService($service) + { + $this->service = $service; + } + + /** + * @return null + */ + public function getService() + { + return $this->service; + } + + /** + * @param null $ip + */ + public function setIp($ip) + { + $this->ip = $ip; + } + + /** + * @return null + */ + public function getIp() + { + return $this->ip; + } + + /** + * @deprecated use DI + */ + public function getApiAdmin() + { + if($this->identity instanceof \Model_Admin) { + return $this->di['api_admin']; + } + return $this->di['api_system']; + } + + /** + * @deprecated use DI + */ + public function getApiGuest() + { + return $this->di['api_guest']; + } + + /** + * @deprecated use DI + */ + public function getApiClient() + { + return $this->di['api_client']; + } +} \ No newline at end of file diff --git a/src/bb-library/Api/Handler.php b/src/bb-library/Api/Handler.php new file mode 100644 index 000000000..536eb6fed --- /dev/null +++ b/src/bb-library/Api/Handler.php @@ -0,0 +1,135 @@ +identity = $identity; + $role = str_replace('model_', '', strtolower(get_class($identity))); + $this->type = $role; + } + + public function setDi($di) + { + $this->di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function __call($method, $arguments) + { + if(strpos($method, '_') === FALSE) { + throw new \Box_Exception("Method :method must contain underscore", array(':method'=>$method), 710); + } + + if(isset($arguments[0])) { + $arguments = $arguments[0]; + } + + $e = explode('_', $method); + $mod = strtolower($e[0]); + unset($e[0]); + $method_name = implode('_', $e); + + if(empty($mod)) { + throw new \Box_Exception('Invalid module name', null, 714); + } + + //cache + $cache_key = md5($this->type.$mod.$method_name.serialize($arguments)); + if($this->_enable_cache && isset($this->_cache[$cache_key])) { + return $this->_cache[$cache_key]; + } + + $service = $this->di['mod']('extension')->getService(); + + if(!$service->isExtensionActive('mod',$mod)) { + throw new \Box_Exception('BoxBilling module :mod is not installed/activated',array(':mod'=>$mod), 715); + } + + // permissions check + if($this->type == 'admin') { + $staff_service = $this->di['mod_service']('Staff'); + if(!$staff_service->hasPermission($this->identity, $mod, $method_name)) { + if($this->_acl_exception) { + throw new \Box_Exception('You do not have access to :mod module', array(':mod'=>$mod), 725); + } else { + if(BB_DEBUG) error_log('You do not have access to '.$mod. ' module'); + return null; + } + } + } + + $api_class = '\Box\Mod\\'.ucfirst($mod).'\\Api\\'.ucfirst($this->type); + + $api = new $api_class(); + + if(!$api instanceof Api_Abstract ) { + throw new \Box_Exception('Api class must be instance of Api_Abstract', null, 730); + } + + $bb_mod = $this->di['mod']($mod); + + $api->setDi($this->di); + $api->setMod($bb_mod); + $api->setIdentity($this->identity); + $api->setIp($this->di['request']->getClientAddress()); + if($bb_mod->hasService()) { + $api->setService($this->di['mod_service']($mod)); + } + + if(!method_exists($api, $method_name) || !is_callable(array($api, $method_name))) { + $reflector = new ReflectionClass($api); + if(!$reflector->hasMethod('__call')) { + throw new \Box_Exception(':type API call :method does not exist in module :module', array(':type'=>ucfirst($this->type), ':method'=>$method_name,':module'=>$mod), 740); + } + } + + $res = $api->{$method_name}($arguments); + if($this->_enable_cache) $this->_cache[$cache_key] = $res; + return $res; + } + + private function _getIdentity() + { + if ('guest' == $this->type){ + return new Model_Guest(); + } + if ('system' == $this->type){ + return $this->di['mod_service']('staff')->getCronAdmin(); + } + if ('admin' == $this->type){ + return $this->di['loggedin_admin']; + } + if ('client' == $this->type){ + return $this->di['loggedin_client']; + } + + throw new Exception('Unrecognized Handler type: '.$this->type); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/App.php b/src/bb-library/Box/App.php new file mode 100644 index 000000000..8db16e823 --- /dev/null +++ b/src/bb-library/Box/App.php @@ -0,0 +1,264 @@ +options = new ArrayObject($options); + } + + public function setDi($di) + { + $this->di = $di; + } + + public function setUrl($url) + { + $this->url = $url; + } + + protected function registerModule() + { + //bind module urls and process + //determine module and bind urls + $requestUri = $this->url; + if(empty($requestUri)) { + $requestUri = '/'; + } + if($requestUri == '/') { + $mod = 'index'; + } else { + $requestUri = trim($requestUri, '/'); + if(strpos($requestUri, '/') === false) { + $mod = $requestUri; + } else { + list($mod) = explode('/',$requestUri); + } + } + $mod = filter_var($mod, FILTER_SANITIZE_STRING, FILTER_FLAG_STRIP_HIGH); + + $this->mod = $mod; + } + + protected function init(){} + + public function show404(Exception $e) { + error_log($e->getMessage()); + header("HTTP/1.0 404 Not Found"); + return $this->render('404', array('exception'=>$e)); + } + + public function get($url, $methodName, $conditions = array(), $class = null) { + $this->event('get', $url, $methodName, $conditions, $class); + } + + public function post($url, $methodName, $conditions = array(), $class = null) { + $this->event('post', $url, $methodName, $conditions, $class); + } + + public function put($url, $methodName, $conditions = array(), $class = null) { + $this->event('put', $url, $methodName, $conditions, $class); + } + + public function delete($url, $methodName, $conditions = array(), $class = null) { + $this->event('delete', $url, $methodName, $conditions, $class); + } + + public function before($methodName, $filterName) { + $this->push_filter($this->before_filters, $methodName, $filterName); + } + + public function after($methodName, $filterName) { + $this->push_filter($this->after_filters, $methodName, $filterName); + } + + protected function push_filter(&$arr_filter, $methodName, $filterName) { + if (!is_array($methodName)) { + $methodName = explode('|', $methodName); + } + + for ($i = 0; $i < count($methodName); $i++) { + $method = $methodName[$i]; + if (!isset($arr_filter[$method])) { + $arr_filter[$method] = array(); + } + array_push($arr_filter[$method], $filterName); + } + } + + protected function run_filter($arr_filter, $methodName) { + if(isset($arr_filter[$methodName])) { + for ($i=0; $i < count($arr_filter[$methodName]); $i++) { + $return = call_user_func(array($this, $arr_filter[$methodName][$i])); + + if(!is_null($return)) { + return $return; + } + } + } + } + + public function run() + { + $this->registerModule(); + $this->init(); + return $this->processRequest(); + } + + public function redirect($path) + { + $location = $this->di['url']->link($path); + header("Location: $location"); + exit; + } + + public function render($fileName, $variableArray = array()) + { + print 'Rendering '.$fileName; + } + + public function sendFile($filename, $contentType, $path) { + header("Content-type: $contentType"); + header("Content-Disposition: attachment; filename=$filename"); + return readfile($path); + } + + public function sendDownload($filename, $path) { + header("Content-Type: application/force-download"); + header("Content-Type: application/octet-stream"); + header("Content-Type: application/download"); + header("Content-Description: File Transfer"); + header("Content-Disposition: attachment; filename=$filename".";"); + header("Content-Transfer-Encoding: binary"); + return readfile($path); + } + + protected function executeShared($classname, $methodName, $params) + { + $class = new $classname(); + if($class instanceof InjectionAwareInterface) { + $class->setDi($this->di); + } + $reflection = new ReflectionMethod(get_class($class), $methodName); + $args = array(); + $args[] = $this; // first param always app instance + + foreach($reflection->getParameters() as $param) { + if(isset($params[$param->name])) { + $args[$param->name] = $params[$param->name]; + } + else if($param->isDefaultValueAvailable()) { + $args[$param->name] = $param->getDefaultValue(); + } + } + + return $reflection->invokeArgs($class, $args); + } + + protected function execute($methodName, $params, $classname = null) { + $return = $this->run_filter($this->before_filters, $methodName); + if (!is_null($return)) { + return $return; + } + + $reflection = new ReflectionMethod(get_class($this), $methodName); + $args = array(); + + foreach($reflection->getParameters() as $param) { + if(isset($params[$param->name])) { + $args[$param->name] = $params[$param->name]; + } + else if($param->isDefaultValueAvailable()) { + $args[$param->name] = $param->getDefaultValue(); + } + } + + $response = $reflection->invokeArgs($this, $args); + + $return = $this->run_filter($this->after_filters, $methodName); + if (!is_null($return)) { + return $return; + } + + return $response; + } + + protected function event($httpMethod, $url, $methodName, $conditions=array(), $classname = null) { + if (method_exists($this, $methodName)) { + array_push($this->mappings, array($httpMethod, $url, $methodName, $conditions)); + } + if (null !== $classname) { + array_push($this->shared, array($httpMethod, $url, $methodName, $conditions, $classname)); + } + } + + protected function processRequest() + { + for($i = 0; $i < count($this->shared); $i++) { + $mapping = $this->shared[$i]; + $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url); + if($url->match) { + return $this->executeShared($mapping[4], $mapping[2], $url->params); + } + } + + // this class mappings + for($i = 0; $i < count($this->mappings); $i++) { + $mapping = $this->mappings[$i]; + $url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url); + if($url->match) { + return $this->execute($mapping[2], $url->params); + } + } + + $e = new \Box_Exception('Page :url not found', array(':url'=>$this->url), 404); + return $this->show404($e); + } + + /** + * @deprecated + */ + public function getApiAdmin() + { + return $this->di['api_admin']; + } + + /** + * @deprecated + */ + public function getApiClient() + { + return $this->di['api_client']; + } + + /** + * @deprecated + */ + public function getApiGuest() + { + return $this->di['api_guest']; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/AppAdmin.php b/src/bb-library/Box/AppAdmin.php new file mode 100644 index 000000000..2da80fe64 --- /dev/null +++ b/src/bb-library/Box/AppAdmin.php @@ -0,0 +1,61 @@ +options->redirect_on_auth_exception = '/staff/login'; + + $m = $this->di['mod']($this->mod); + $controller = $m->getAdminController(); + $controller->register($this); + } + + public function render($fileName, $variableArray = array()) + { + $template = $this->getTwig()->loadTemplate($fileName.'.phtml'); + return $template->render($variableArray); + } + + public function redirect($path) + { + $location = $this->di['url']->adminLink($path); + header("Location: $location"); + exit; + } + + protected function getTwig() + { + $service = $this->di['mod_service']('theme'); + $theme = $service->getCurrentAdminAreaTheme(); + + $loader = new Box_TwigLoader(array( + "mods" => BB_PATH_MODS, + "theme" => BB_PATH_THEMES . DIRECTORY_SEPARATOR . $theme['code'], + "type" => "admin" + ) + ); + + $twig = $this->di['twig']; + $twig->setLoader($loader); + + $twig->addGlobal('theme', $theme); + + if($this->di['auth']->isAdminLoggedIn()) { + $twig->addGlobal('admin', $this->di['api_admin']); + } + + return $twig; + } +} diff --git a/src/bb-library/Box/AppClient.php b/src/bb-library/Box/AppClient.php new file mode 100644 index 000000000..0e0211b1b --- /dev/null +++ b/src/bb-library/Box/AppClient.php @@ -0,0 +1,106 @@ +options->redirect_on_auth_exception = '/login'; + + $m = $this->di['mod']($this->mod); + $m->registerClientRoutes($this); + + if($this->mod == 'api') { + define ('BB_MODE_API', TRUE); + } else { + $extensionService = $this->di['mod_service']('extension'); + if ($extensionService->isExtensionActive('mod', 'redirect')) { + $m = $this->di['mod']('redirect'); + $m->registerClientRoutes($this); + } + + //init index module manually + $this->get('', 'get_index'); + $this->get('/', 'get_index'); + + + //init custom methods for undefined pages + $this->get('/:page', 'get_custom_page', array('page' => '[a-z0-9-/.//]+')); + $this->post('/:page', 'get_custom_page', array('page' => '[a-z0-9-/.//]+')); + } + } + + public function get_index() + { + return $this->render('mod_index_dashboard'); + } + + public function get_custom_page($page) + { + $ext = $this->ext; + if(strpos($page, '.') !== false) { + $ext = substr($page, strpos($page, '.')+1); + $page = substr($page, 0, strpos($page, '.')); + } + $page = str_replace('/', '_', $page); + $tpl = 'mod_page_'.$page; + try { + return $this->render($tpl, array('post'=>$_POST), $ext); + } catch(Exception $e) { + if(BB_DEBUG) error_log($e); + } + throw new \Box_Exception('Page :url not found', array(':url'=>$page), 404); + } + + public function render($fileName, $variableArray = array(), $ext = 'phtml') + { + try { + $template = $this->getTwig()->loadTemplate($fileName.'.'.$ext); + } catch (Twig_Error_Loader $e) { + error_log($e->getMessage()); + throw new \Box_Exception('Page not found', null, 404); + } + return $template->render($variableArray); + } + + protected function getTwig() + { + $service = $this->di['mod_service']('theme'); + $code = $service->getCurrentClientAreaThemeCode(); + $theme = $service->getTheme($code); + $settings = $service->getThemeSettings($theme); + + $loader = new Box_TwigLoader(array( + "mods" => BB_PATH_MODS, + "theme" => BB_PATH_THEMES.DIRECTORY_SEPARATOR.$code, + "type" => "client" + ) + ); + + $twig = $this->di['twig']; + $twig->setLoader($loader); + + $twig->addGlobal('current_theme', $code); + $twig->addGlobal('settings', $settings); + + if($this->di['auth']->isClientLoggedIn()) { + $twig->addGlobal('client', $this->di['api_client']); + } + + if($this->di['auth']->isAdminLoggedIn()) { + $twig->addGlobal('admin', $this->di['api_admin']); + } + + return $twig; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Authorization.php b/src/bb-library/Box/Authorization.php new file mode 100644 index 000000000..1372acdd5 --- /dev/null +++ b/src/bb-library/Box/Authorization.php @@ -0,0 +1,35 @@ +di = $di; + $this->session = $di['session']; + } + + public function isClientLoggedIn() + { + return (bool)($this->session->get('client_id')); + } + + public function isAdminLoggedIn() + { + return (bool)($this->session->get('admin')); + } + +} diff --git a/src/bb-library/Box/BeanHelper.php b/src/bb-library/Box/BeanHelper.php new file mode 100644 index 000000000..f43661b0c --- /dev/null +++ b/src/bb-library/Box/BeanHelper.php @@ -0,0 +1,63 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function getModelForBean( \RedBeanPHP\OODBBean $bean ) + { + $prefix = '\\Model_'; + $model = $bean->getMeta( 'type' ); + $modelName = $prefix.$this->underscoreToCamelCase($model); + + if ( !class_exists( $modelName ) ) { + return null; + } + + $model = new $modelName(); + if($model instanceof \Box\InjectionAwareInterface) { + $model->setDi( $this->di ); + } + + $model->loadBean( $bean ); + + return $model; + } + + private function underscoreToCamelCase( $string, $first_char_caps = true) + { + if( $first_char_caps == true ) + { + $string[0] = strtoupper($string[0]); + } + $func = create_function('$c', 'return strtoupper($c[1]);'); + return preg_replace_callback('/_([a-z])/', $func, $string); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Config.php b/src/bb-library/Box/Config.php new file mode 100644 index 000000000..2c8542692 --- /dev/null +++ b/src/bb-library/Box/Config.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function delete($key) + { + unset($_COOKIE[$key]); + } + + public function has($key) + { + return isset($_COOKIE[$key]); + } + + public function get($key) + { + return isset($_COOKIE[$key]) ? $_COOKIE[$key] : null; + } + + public function set($key, $value) + { + $_COOKIE[$key] = $value; + } + + public function reset() + { + $_COOKIE = null; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Crypt.php b/src/bb-library/Box/Crypt.php new file mode 100644 index 000000000..3f6285db2 --- /dev/null +++ b/src/bb-library/Box/Crypt.php @@ -0,0 +1,58 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function encrypt($text, $pass = null) + { + $pass = $this->_getSalt($pass); + $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); + $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); + return base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $pass, $text, MCRYPT_MODE_ECB, $iv)); + } + + public function decrypt($text, $pass = null) + { + $pass = $this->_getSalt($pass); + $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); + $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); + return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $pass, base64_decode($text), MCRYPT_MODE_ECB, $iv)); + } + + private function _getSalt($pass = null) + { + if (null == $pass) { + return $this->di['config']['salt']; + } + return $pass; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Curl.php b/src/bb-library/Box/Curl.php new file mode 100644 index 000000000..2f138f95a --- /dev/null +++ b/src/bb-library/Box/Curl.php @@ -0,0 +1,206 @@ +_url = $url; + $this->_followlocation = (bool)$followlocation; + $this->_timeout = $timeOut; + $this->_maxRedirects = $maxRedirecs; + $this->_noBody = $noBody; + $this->_includeHeader = $includeHeader; + $this->_binaryTransfer = $binaryTransfer; + + $this->_cookieFileLocation = BB_PATH_CACHE . '/c.txt'; + } + + public function useAuth($use) { + $this->authentication = 0; + if ($use == true) + $this->authentication = 1; + } + + public function setName($name) { + $this->auth_name = $name; + } + + public function setPass($pass) { + $this->auth_pass = $pass; + } + + public function setReferer($referer) { + $this->_referer = $referer; + } + + public function setCookiFileLocation($path) { + $this->_cookieFileLocation = $path; + } + + public function setPost($postFields) { + $this->_post = true; + $this->_postFields = $postFields; + } + + public function setUserAgent($userAgent) { + $this->_useragent = $userAgent; + } + + public function request($url = null) { + if (null !== $url) { + $this->_url = $url; + } + + $ch = curl_init(); + + curl_setopt($ch, CURLOPT_URL, $this->_url); + curl_setopt($ch, CURLOPT_HTTPHEADER, array('Expect:')); + curl_setopt($ch, CURLOPT_TIMEOUT, $this->_timeout); + curl_setopt($ch, CURLOPT_MAXREDIRS, $this->_maxRedirects); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt($ch, CURLOPT_COOKIEJAR, $this->_cookieFileLocation); + curl_setopt($ch, CURLOPT_COOKIEFILE, $this->_cookieFileLocation); + + if (ini_get('open_basedir') == '' && ini_get('safe_mode') == 'Off'){ + curl_setopt($ch, CURLOPT_FOLLOWLOCATION, $this->_followlocation); + } + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + + if ($this->authentication == 1) { + curl_setopt($ch, CURLOPT_USERPWD, $this->auth_name . ':' . $this->auth_pass); + } + if ($this->_post) { + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, $this->_postFields); + } + + if ($this->_includeHeader) { + curl_setopt($ch, CURLOPT_HEADER, true); + } + + if ($this->_noBody) { + curl_setopt($ch, CURLOPT_NOBODY, true); + } + /* + if($this->_binary) + { + curl_setopt($s,CURLOPT_BINARYTRANSFER,true); + } + */ + curl_setopt($ch, CURLOPT_USERAGENT, $this->_useragent); + curl_setopt($ch, CURLOPT_REFERER, $this->_referer); + + $this->_webpage = curl_exec($ch); + + $this->_status = curl_getinfo($ch, CURLINFO_HTTP_CODE); + curl_close($ch); + + return $this; + } + + public function getBody() + { + return $this->_webpage; + } + + public function getHttpStatus() { + return $this->_status; + } + + public function downloadTo($path) + { + if(!file_exists($path)) { + touch($path); + } + + set_time_limit(0); // unlimited max execution time + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $this->_url); + curl_setopt($ch, CURLOPT_TIMEOUT, $this->_timeout); + curl_setopt($ch, CURLOPT_FILE, fopen($path, 'w')); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_exec($ch); + if(curl_errno($ch)) { + throw new Exception(sprintf("curl Error %s: %s", curl_errno($ch), curl_error($ch))); + } + } + + public function __tostring() { + return $this->_webpage; + } +/* + private function postViaSocket($host, $url, $data='') + { + $fp = fsockopen($host, 80, $errno, $errstr, 2); + if (!$fp) { + return ''; + } + + $newline = "\r\n"; + $post_data = "POST " . $url . " HTTP/1.0" . $newline; + $post_data .= "Host: " . $host . $newline; + $post_data .= "Content-Type: text/xml; charset=ISO-8859-1" . $newline; + $post_data .= "Content-Length: " . strlen($data) . $newline; + $post_data .= "Connection: close" . $newline . $newline; + $post_data .= $data; + + fputs($fp, $post_data, strlen($post_data)); + + $in_headers = true; + $response = ''; + while (!feof($fp)) { + $line = trim(fgets($fp, 1024)); + + if ($line == '') { + $in_headers = false; + continue; + } + + if ($in_headers) { + continue; + } + + $response .= $line; + } + fclose($fp); + return $response; + } +*/ +} \ No newline at end of file diff --git a/src/bb-library/Box/Database.php b/src/bb-library/Box/Database.php new file mode 100644 index 000000000..b0748e720 --- /dev/null +++ b/src/bb-library/Box/Database.php @@ -0,0 +1,200 @@ +orm = $orm; + } + + public function setDi($di) + { + $this->di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function dispense($modelName) + { + $type = $this->_getTypeFromModelName($modelName); + $bean = $this->orm->dispense($type); + if($type == $modelName) return $bean; + return $bean->box(); + } + + public function store($modelOrBean) + { + if($modelOrBean instanceof \RedBean_SimpleModel) { + $bean = $modelOrBean->unbox(); + } else { + $bean = $modelOrBean; + } + return $this->orm->store($bean); + } + + public function getAll($sql, $values=array() ) + { + return $this->orm->getAll($sql, $values); + } + + public function getCell($sql, $values=array() ) + { + return $this->orm->getCell($sql, $values); + } + + public function getRow($sql, $values=array() ) + { + return $this->orm->getRow($sql, $values); + } + + public function getAssoc( $sql, $values = array()) + { + return $this->orm->getAssoc($sql, $values); + } + + public function findOne($modelName, $sql=null, $values=array()) + { + $type = $this->_getTypeFromModelName($modelName); + $bean = $this->orm->findOne($type, $sql, $values); + if($type == $modelName) return $bean; + if($bean && $bean->id) { + return $bean->box(); + } + return null; + } + + public function find($modelName, $sql = null, $values = array()) + { + $type = $this->_getTypeFromModelName($modelName); + $beans = $this->orm->find($type, $sql, $values); + if($type == $modelName) return $beans; + foreach ($beans as &$bean) { + $bean = $bean->box(); + } + + return $beans; + } + + public function load($modelName,$id) + { + $type = $this->_getTypeFromModelName($modelName); + $bean = $this->orm->load($type, $id); + if($type == $modelName) return $bean; + if($bean && $bean->id) { + return $bean->box(); + } + return null; + } + + /** + * @param string $sql + * @param array $values + * @return int - affected rows + */ + public function exec($sql, $values=array()) + { + return $this->orm->exec($sql, $values); + } + + public function trash($modelOrBean) + { + if($modelOrBean instanceof \RedBean_SimpleModel) { + $bean = $modelOrBean->unbox(); + } else { + $bean = $modelOrBean; + } + return $this->orm->trash($bean); + } + + public function getInsertID() + { + return $this->di['pdo']->lastInsertId(); + } + + public function getColumns($table) + { + return $this->orm->getColumns($table); + } + + public function toArray($modelOrBean) + { + if($modelOrBean instanceof \RedBean_SimpleModel) { + $bean = $modelOrBean->unbox(); + } else { + $bean = $modelOrBean; + } + return $bean->export(); + } + + /** + * @param string $modelName + * @param int $id + * @param string $message + * @return \RedBean_SimpleModel + * @throws Box_Exception + */ + public function getExistingModelById($modelName, $id, $message = "Model not found") + { + /*If RedBean finds the bean it will return + * the OODB Bean object; if it cannot find the bean + * RedBean will return a new bean of type $modelName and with + * primary key ID 0. In the latter case it acts basically the + * same as dispense().*/ + + $model = $this->load($modelName, (int)$id); + if (null === $model) { + throw new \Box_Exception($message); + } + + return $model; + } + + /** + * @param string $modelName + * @param array $records + * @return array + */ + public function convertToModels($modelName, array $records) + { + $result = array(); + $beans = $this->orm->convertToBeans($modelName, $records); + foreach($beans as $bean){ + $result[] = $bean->box(); + } + return $result; + } + + private function _getTypeFromModelName($modelName) + { + if($modelName == strtolower($modelName)) { + return $modelName; + } + + preg_match_all('!([A-Z][A-Z0-9]*(?=$|[A-Z][a-z0-9])|[A-Za-z][a-z0-9]+)!', $modelName, $matches); + $ret = $matches[0]; + foreach ($ret as &$match) { + $match = $match == strtoupper($match) ? strtolower($match) : lcfirst($match); + } + return implode('_', $ret); + } +} diff --git a/src/bb-library/Box/DbLoggedPDOStatement.php b/src/bb-library/Box/DbLoggedPDOStatement.php new file mode 100644 index 000000000..b36c59762 --- /dev/null +++ b/src/bb-library/Box/DbLoggedPDOStatement.php @@ -0,0 +1,21 @@ +queryString); + parent::execute($input_parameters); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Di.php b/src/bb-library/Box/Di.php new file mode 100644 index 000000000..92afa9ecf --- /dev/null +++ b/src/bb-library/Box/Di.php @@ -0,0 +1,14 @@ +subject = $subject; + $this->name = $name; + + $this->parameters = $parameters; + + $this->api_admin = $api_admin; + $this->api_guest = $api_guest; + } + + /** + * @param null $di + */ + public function setDi($di) + { + $this->di = $di; + } + + /** + * @return null + */ + public function getDi() + { + return $this->di; + } + + /** + * Returns the subject. + * + * @return mixed The subject + */ + public function getSubject() + { + return $this->subject; + } + + public function getApiAdmin() + { + return $this->api_admin; + } + + public function getApiGuest() + { + return $this->api_guest; + } + + /** + * Returns the event name. + * + * @return string The event name + */ + public function getName() + { + return $this->name; + } + + /** + * Sets the return value for this event. + * + * @param mixed $value The return value + */ + public function setReturnValue($value) + { + $this->value = $value; + } + + /** + * Returns the return value. + * + * @return mixed The return value + */ + public function getReturnValue() + { + return $this->value; + } + + /** + * Sets the processed flag. + * + * @param Boolean $processed The processed flag value + */ + public function setProcessed($processed) + { + $this->processed = (boolean) $processed; + } + + /** + * Returns whether the event has been processed by a listener or not. + * + * @return Boolean true if the event has been processed, false otherwise + */ + public function isProcessed() + { + return $this->processed; + } + + /** + * Returns the event parameters. + * + * @return array The event parameters + */ + public function getParameters() + { + return $this->parameters; + } + + /** + * Returns true if the parameter exists (implements the ArrayAccess interface). + * + * @param string $name The parameter name + * + * @return Boolean true if the parameter exists, false otherwise + */ + public function offsetExists($name) + { + return array_key_exists($name, $this->parameters); + } + + /** + * Returns a parameter value (implements the ArrayAccess interface). + * + * @param string $name The parameter name + * + * @return mixed The parameter value + */ + public function offsetGet($name) + { + if (!array_key_exists($name, $this->parameters)) + { + throw new InvalidArgumentException(sprintf('The event "%s" has no "%s" parameter.', $this->name, $name)); + } + + return $this->parameters[$name]; + } + + /** + * Sets a parameter (implements the ArrayAccess interface). + * + * @param string $name The parameter name + * @param mixed $value The parameter value + */ + public function offsetSet($name, $value) + { + $this->parameters[$name] = $value; + } + + /** + * Removes a parameter (implements the ArrayAccess interface). + * + * @param string $name The parameter name + */ + public function offsetUnset($name) + { + unset($this->parameters[$name]); + } +} diff --git a/src/bb-library/Box/EventDispatcher.php b/src/bb-library/Box/EventDispatcher.php new file mode 100644 index 000000000..d3dba7dba --- /dev/null +++ b/src/bb-library/Box/EventDispatcher.php @@ -0,0 +1,169 @@ +listeners[$name])) + { + $this->listeners[$name] = array(); + } + + $this->listeners[$name][] = $listener; + } + + /** + * Disconnects a listener for a given event name. + * + * @param string $name An event name + * @param mixed $listener A PHP callable + * + * @return mixed false if listener does not exist, null otherwise + */ + public function disconnect($name, $listener) + { + if (!isset($this->listeners[$name])) + { + return false; + } + + foreach ($this->listeners[$name] as $i => $callable) + { + if ($listener === $callable) + { + unset($this->listeners[$name][$i]); + } + } + } + + /** + * Disconnects all listeners for a given event name. + * + * @param string $name An event name + * + * @return mixed false if listener does not exist, null otherwise + */ + public function disconnectAll($name) + { + if (!isset($this->listeners[$name])) + { + return false; + } + + foreach ($this->listeners[$name] as $i => $callable) + { + unset($this->listeners[$name][$i]); + } + } + + /** + * Notifies all listeners of a given event. + * + * @param Box_Event $event A Box_Event instance + * + * @return Box_Event The Box_Event instance + */ + public function notify(Box_Event $event) + { + foreach ($this->getListeners($event->getName()) as $listener) + { + call_user_func($listener, $event); + } + + return $event; + } + + /** + * Notifies all listeners of a given event until one returns a non null value. + * + * @param Box_Event $event A Box_Event instance + * + * @return Box_Event The Box_Event instance + */ + public function notifyUntil(Box_Event $event) + { + foreach ($this->getListeners($event->getName()) as $listener) + { + if (call_user_func($listener, $event)) + { + $event->setProcessed(true); + break; + } + } + + return $event; + } + + /** + * Filters a value by calling all listeners of a given event. + * + * @param Box_Event $event A Box_Event instance + * @param mixed $value The value to be filtered + * + * @return Box_Event The Box_Event instance + */ + public function filter(Box_Event $event, $value) + { + foreach ($this->getListeners($event->getName()) as $listener) + { + $value = call_user_func_array($listener, array($event, $value)); + } + + $event->setReturnValue($value); + + return $event; + } + + /** + * Returns true if the given event name has some listeners. + * + * @param string $name The event name + * + * @return Boolean true if some listeners are connected, false otherwise + */ + public function hasListeners($name) + { + if (!isset($this->listeners[$name])) + { + $this->listeners[$name] = array(); + } + + return (boolean) count($this->listeners[$name]); + } + + /** + * Returns all listeners associated with a given event name. + * + * @param string $name The event name + * + * @return array An array of listeners + */ + public function getListeners($name) + { + if (!isset($this->listeners[$name])) + { + return array(); + } + + return $this->listeners[$name]; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/EventManager.php b/src/bb-library/Box/EventManager.php new file mode 100644 index 000000000..942198d25 --- /dev/null +++ b/src/bb-library/Box/EventManager.php @@ -0,0 +1,88 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fire($data) + { + if(!isset($data['event']) || empty($data['event'])) { + error_log('Invoked event call without providing event name'); + return false; + } + + $event = $data['event']; + $subject = isset($data['subject']) ? $data['subject'] : null; + $params = isset($data['params']) ? $data['params'] : null; + + if(BB_DEBUG) { + $this->di['logger']->debug($event. ': '. var_export($params, 1)); + } + + $e = new Box_Event($subject, $event, $params); + $e->setDi($this->di); + $disp = new Box_EventDispatcher(); + $this->_connectDatabaseHooks($disp, $e->getName()); + $disp->notify($e); + + return $e->getReturnValue(); + } + + + private function _connectDatabaseHooks(&$disp, $event) + { + $sql="SELECT id, rel_id, meta_value + FROM extension_meta + WHERE extension = 'mod_hook' + AND rel_type = 'mod' + AND meta_key = 'listener' + AND meta_value = :event + "; + $list = $this->di['db']->getAll($sql, array('event'=>$event)); + + // no need to connect listeners + if(empty($list)) { + return ; + } + + foreach($list as $listener) { + $mod = $listener['rel_id']; + $event = $listener['meta_value']; + try { + $s = $this->di['mod_service']($mod); + if(method_exists($s, $event)) { + $disp->connect($event, array(get_class($s), $event)); + } + } catch(Exception $e) { + error_log($e->getMessage()); + } + } + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Exception.php b/src/bb-library/Box/Exception.php new file mode 100644 index 000000000..85422606d --- /dev/null +++ b/src/bb-library/Box/Exception.php @@ -0,0 +1,30 @@ +$uri), $code); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Extension.php b/src/bb-library/Box/Extension.php new file mode 100644 index 000000000..219923c9c --- /dev/null +++ b/src/bb-library/Box/Extension.php @@ -0,0 +1,95 @@ +di = $di; + } + + /** + * @return \Box_Ii + */ + public function getDi() + { + return $this->di; + } + + const TYPE_MOD = 'mod'; + const TYPE_THEME = 'theme'; + const TYPE_PG = 'payment-gateway'; + const TYPE_SM = 'server-manager'; + const TYPE_DR = 'domain-registrar'; + const TYPE_HOOK = 'hook'; + const TYPE_TRANSLATION = 'translation'; + + private $_url = 'https://extensions.boxbilling.com/api/'; + + public function getExtension($id, $type = Box_Extension::TYPE_MOD) + { + $params = array(); + $params['return'] = 'manifest'; + $params['type'] = $type; + $params['id'] = $id; + return $this->_request('guest/extension/get', $params); + } + + public function getLatestExtensionVersion($id, $type = Box_Extension::TYPE_MOD) + { + $params = array(); + $params['type'] = $type; + $params['id'] = $id; + return $this->_request('guest/extension/version', $params); + } + + public function getLatest($type = null) + { + $params = array(); + $params['return'] = 'manifest'; + if(!empty($type)) { + $params['type'] = $type; + } + return $this->_request('guest/extension/search', $params); + } + + private function _request($call, array $params) + { + $params['bb_version'] = Box_Version::VERSION; + $url = $this->_url.$call.'?'.http_build_query($params); + $curl = new Box_Curl($url, 5); + $curl->request(); + $response = $curl->getBody(); + $json = json_decode($response, 1); + + if(is_null($json)) { + throw new \Box_Exception('Unable to connect to BoxBilling extensions site.', null, 1545); + } + + if(isset($json['error']) && is_array($json['error'])) { + throw new Exception($json['error']['message'], 746); + } + return $json['result']; + } + } \ No newline at end of file diff --git a/src/bb-library/Box/Ftp.php b/src/bb-library/Box/Ftp.php new file mode 100644 index 000000000..38d5a0b99 --- /dev/null +++ b/src/bb-library/Box/Ftp.php @@ -0,0 +1,531 @@ +method = 'ftpext'; + + //Check if possible to use ftp functions. + if ( ! extension_loaded('ftp') ) { + throw new \Box_Exception('The ftp PHP extension is not available'); + return false; + } + + // Set defaults: + if ( empty($opt['port']) ) + $this->options['port'] = 21; + else + $this->options['port'] = $opt['port']; + + if ( empty($opt['hostname']) ) + throw new \Box_Exception('FTP hostname is required'); + else + $this->options['hostname'] = $opt['hostname']; + + if ( isset($opt['root']) && ! empty($opt['root']) ) + $this->bb_root = $opt['root']; + + // Check if the options provided are OK. + if ( empty($opt['username']) ) + throw new \Box_Exception('FTP username is required'); + else + $this->options['username'] = $opt['username']; + + if ( empty($opt['password']) ) + throw new \Box_Exception('FTP password is required'); + else + $this->options['password'] = $opt['password']; + + $this->options['ssl'] = false; + if ( isset($opt['connection_type']) && 'ftps' == $opt['connection_type'] ) + $this->options['ssl'] = true; + } + + public function connect() + { + if ( isset($this->options['ssl']) && $this->options['ssl'] && function_exists('ftp_ssl_connect') ) + $this->link = @ftp_ssl_connect($this->options['hostname'], $this->options['port'], $this->timeout); + else + $this->link = @ftp_connect($this->options['hostname'], $this->options['port'], $this->timeout); + + if ( ! $this->link ) { + throw new \Box_Exception('Failed to connect to FTP Server :host : :port',array(':host'=>$this->options['hostname'], ':port'=>$this->options['port'])); + } + + if ( ! @ftp_login($this->link,$this->options['username'], $this->options['password']) ) { + throw new \Box_Exception('FTP Username/Password incorrect for :usernmae', array(':username'=>$this->options['username'])); + } + + //Set the Connection to use Passive FTP + @ftp_pasv( $this->link, true ); + + if($this->bb_root) { + $this->chdir($this->bb_root); + } + + return true; + } + + public function setDefaultPermissions($perm) + { + $this->permission = $perm; + return $this; + } + + public function get_contents($file, $type = '', $resumepos = 0 ) + { + if( empty($type) ) + $type = FTP_BINARY; + + $temp = tmpfile(); + if ( ! $temp ) + return false; + + if( ! @ftp_fget($this->link, $temp, $file, $type, $resumepos) ) + return false; + + fseek($temp, 0); //Skip back to the start of the file being written to + $contents = ''; + + while ( ! feof($temp) ) + $contents .= fread($temp, 8192); + + fclose($temp); + return $contents; + } + + public function get_contents_array($file) + { + return explode("\n", $this->get_contents($file)); + } + + public function put_contents($file, $contents, $type = '' ) + { + if( empty($type) ) + $type = $this->is_binary($contents) ? FTP_BINARY : FTP_ASCII; + + $temp = tmpfile(); + if ( ! $temp ) + return false; + + fwrite($temp, $contents); + fseek($temp, 0); //Skip back to the start of the file being written to + + $ret = @ftp_fput($this->link, $file, $temp, $type); + + fclose($temp); + return $ret; + } + + /** + * Put directory to ftp + * @param string $src_dir + * @param string $dst_dir + */ + public function put_dir($src_dir, $dst_dir = null) + { + if ($dst_dir == null) { + $dst_dir = $this->cwd(); + } + $src_dir = rtrim($src_dir, '/'); + + $conn_id = $this->link; + $d = dir($src_dir); + while($file = $d->read()) { // do this for each file in the directory + if ($file != "." && $file != "..") { // to prevent an infinite loop + if (is_dir($src_dir."/".$file)) { // do the following if it is a directory + if (!@ftp_chdir($conn_id, $dst_dir."/".$file)) { + ftp_mkdir($conn_id, $dst_dir."/".$file); // create directories that do not yet exist + } + $this->put_dir($src_dir."/".$file, $dst_dir."/".$file); // recursive part + } else { + @ftp_delete($conn_id, $dst_dir."/".$file); + $upload = ftp_put($conn_id, $dst_dir."/".$file, $src_dir."/".$file, FTP_BINARY); // put the files + } + } + } + $d->close(); + return true; + } + + public function cwd() + { + $cwd = ftp_pwd($this->link); + if( $cwd ) { + $cwd = $this->trailingslashit($cwd); + } + return $cwd; + } + + public function chdir($dir) + { + return @ftp_chdir($this->link, $dir); + } + + private function chgrp($file, $group, $recursive = false ) + { + return false; + } + + public function chmod($file, $mode = false, $recursive = false) + { + if( ! $mode ) + $mode = $this->permission; + if( ! $mode ) + return false; + if ( ! $this->exists($file) && ! $this->is_dir($file) ) + return false; + if ( ! $recursive || ! $this->is_dir($file) ) { + if ( ! function_exists('ftp_chmod') ) + return @ftp_site($this->link, sprintf('CHMOD %o %s', $mode, $file)); + return @ftp_chmod($this->link, $mode, $file); + } + //Is a directory, and we want recursive + $filelist = $this->dirlist($file); + foreach($filelist as $filename){ + $this->chmod($file . '/' . $filename, $mode, $recursive); + } + return true; + } + + private function chown($file, $owner, $recursive = false ) + { + return false; + } + + public function owner($file) + { + $dir = $this->dirlist($file); + return $dir[$file]['owner']; + } + + public function getchmod($file) + { + $dir = $this->dirlist($file); + return $dir[$file]['permsn']; + } + + public function group($file) + { + $dir = $this->dirlist($file); + return $dir[$file]['group']; + } + + /** + * Perfomrs recursive directory copy with content + * @todo check for unlimited recurse if source folder is hghr than destination + * + * @param string $source + * @param string $destination + * @param bool $overwrite + * @return bool + */ + public function copyDir($source, $destination, $overwrite = false ) + { + if( ! $overwrite && !$this->is_dir($destination) ) + return false; + + if( $overwrite && !$this->is_dir($destination) ) { + if(!$this->mkdir($destination)) { + return false; + } + } + + if (!$this->is_dir($source) || !$this->is_dir($destination)) { + return false; + } + + $res = false; + $this->chdir($source); + $dir_contents = $this->dirlist($source, false, true); + if (empty($dir_contents)) { return true; } + + foreach($dir_contents as $name=>$params) { + if ($params['isdir']) { + $res = $this->copyDir($source."/".$name, $destination."/".$name, $overwrite); + } else { + $res = $this->copy($source."/".$name, $destination."/".$name, $overwrite); + } + } + + return $res; + } + + public function copy($source, $destination, $overwrite = false ) + { + if( ! $overwrite && $this->exists($destination) ) + return false; + $content = $this->get_contents($source); + if( false === $content) + return false; + return $this->put_contents($destination, $content); + } + + public function move($source, $destination, $overwrite = false) + { + return ftp_rename($this->link, $source, $destination); + } + + public function delete($file, $recursive = false ) + { + if ( empty($file) ) + return false; + if ( $this->is_file($file) ) + return @ftp_delete($this->link, $file); + if ( !$recursive ) + return @ftp_rmdir($this->link, $file); + + $filelist = $this->dirlist( $this->trailingslashit($file) ); + if ( !empty($filelist) ) + foreach ( $filelist as $delete_file ) + $this->delete( $this->trailingslashit($file) . $delete_file['name'], $recursive); + return @ftp_rmdir($this->link, $file); + } + + public function exists($file) + { + $list = ftp_rawlist($this->link, $file, false); + return !empty($list); //empty list = no file, so invert. + } + + public function is_file($file) { + return $this->exists($file) && !$this->is_dir($file); + } + + public function is_dir($path) + { + $cwd = $this->cwd(); + $result = @ftp_chdir($this->link, $this->trailingslashit($path) ); + if( $result && $path == $this->cwd() || $this->cwd() != $cwd ) { + ftp_chdir($this->link, $cwd); + return true; + } + return false; + } + + private function is_readable($file) + { + //Get dir list, Check if the file is readable by the current user?? + return true; + } + + private function is_writable($file) + { + //Get dir list, Check if the file is writable by the current user?? + return true; + } + + private function atime($file) + { + return false; + } + + public function mtime($file) + { + return ftp_mdtm($this->link, $file); + } + + public function size($file) + { + return ftp_size($this->link, $file); + } + + private function touch($file, $time = 0, $atime = 0) + { + return false; + } + + public function mkdir($path, $chmod = false, $chown = false, $chgrp = false) + { + if( !ftp_mkdir($this->link, $path) ) + return false; + if( $chmod ) + $this->chmod($path, $chmod); + if( $chown ) + $this->chown($path, $chown); + if( $chgrp ) + $this->chgrp($path, $chgrp); + return true; + } + + public function rmdir($path, $recursive = false) + { + return $this->delete($path, $recursive); + } + + private function parselisting($line) + { + static $is_windows; + if ( is_null($is_windows) ) + $is_windows = strpos( strtolower(ftp_systype($this->link)), 'win') !== false; + + if ($is_windows && preg_match("/([0-9]{2})-([0-9]{2})-([0-9]{2}) +([0-9]{2}):([0-9]{2})(AM|PM) +([0-9]+|) +(.+)/", $line, $lucifer)) { + $b = array(); + if ($lucifer[3]<70) { $lucifer[3] +=2000; } else { $lucifer[3]+=1900; } // 4digit year fix + $b['isdir'] = ($lucifer[7]==""); + if ( $b['isdir'] ) + $b['type'] = 'd'; + else + $b['type'] = 'f'; + $b['size'] = $lucifer[7]; + $b['month'] = $lucifer[1]; + $b['day'] = $lucifer[2]; + $b['year'] = $lucifer[3]; + $b['hour'] = $lucifer[4]; + $b['minute'] = $lucifer[5]; + $b['time'] = @mktime($lucifer[4]+(strcasecmp($lucifer[6],"PM")==0?12:0),$lucifer[5],0,$lucifer[1],$lucifer[2],$lucifer[3]); + $b['am/pm'] = $lucifer[6]; + $b['name'] = $lucifer[8]; + } else if (!$is_windows && $lucifer=preg_split("/[ ]/",$line,9,PREG_SPLIT_NO_EMPTY)) { + //echo $line."\n"; + $lcount=count($lucifer); + if ($lcount<8) return ''; + $b = array(); + $b['isdir'] = $lucifer[0]{0} === "d"; + $b['islink'] = $lucifer[0]{0} === "l"; + if ( $b['isdir'] ) + $b['type'] = 'd'; + elseif ( $b['islink'] ) + $b['type'] = 'l'; + else + $b['type'] = 'f'; + $b['perms'] = $lucifer[0]; + $b['number'] = $lucifer[1]; + $b['owner'] = $lucifer[2]; + $b['group'] = $lucifer[3]; + $b['size'] = $lucifer[4]; + if ($lcount==8) { + sscanf($lucifer[5],"%d-%d-%d",$b['year'],$b['month'],$b['day']); + sscanf($lucifer[6],"%d:%d",$b['hour'],$b['minute']); + $b['time'] = @mktime($b['hour'],$b['minute'],0,$b['month'],$b['day'],$b['year']); + $b['name'] = $lucifer[7]; + } else { + $b['month'] = $lucifer[5]; + $b['day'] = $lucifer[6]; + if (preg_match("/([0-9]{2}):([0-9]{2})/",$lucifer[7],$l2)) { + $b['year'] = date("Y"); + $b['hour'] = $l2[1]; + $b['minute'] = $l2[2]; + } else { + $b['year'] = $lucifer[7]; + $b['hour'] = 0; + $b['minute'] = 0; + } + $b['time'] = strtotime(sprintf("%d %s %d %02d:%02d",$b['day'],$b['month'],$b['year'],$b['hour'],$b['minute'])); + $b['name'] = $lucifer[8]; + } + } + + return $b; + } + + public function dirlist($path = '.', $incdot = false, $recursive = false) + { + if( $this->is_file($path) ) { + $limitFile = basename($path); + $path = dirname($path) . '/'; + } else { + $limitFile = false; + } + + $list = ftp_rawlist($this->link, '-a ' . $path, false); + + if ( $list === false ) + return false; + + $dirlist = array(); + foreach ( $list as $k => $v ) { + $entry = $this->parselisting($v); + if ( empty($entry) ) + continue; + + if ( '.' == $entry["name"] || '..' == $entry["name"] ) + continue; + + $dirlist[ $entry['name'] ] = $entry; + } + + if ( ! $dirlist ) + return false; + if ( empty($dirlist) ) + return array(); + + $ret = array(); + foreach ( $dirlist as $struc ) { + + if ( 'd' == $struc['type'] ) { + $struc['files'] = array(); + + if ( $incdot ){ + //We're including the doted starts + if( '.' != $struc['name'] && '..' != $struc['name'] ){ //Ok, It isnt a special folder + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } else { //No dots + if ($recursive) + $struc['files'] = $this->dirlist($path . '/' . $struc['name'], $incdot, $recursive); + } + } + //File + $ret[$struc['name']] = $struc; + } + return $ret; + } + + /** + * Return current directory contents + * @return array + */ + public function dirContents() + { + $contents = ftp_nlist($this->link, "."); + return $contents; + } + + protected function trailingslashit($string) + { + $string = rtrim($string, '/'); + return $string . '/'; + } + + protected function is_binary( $text ) + { + return (bool) preg_match('|[^\x20-\x7E]|', $text); //chr(32)..chr(127) + } + + public function disconnect() + { + if( $this->link ) + ftp_close($this->link); + } + + public function __destruct() + { + $this->disconnect(); + } + +} \ No newline at end of file diff --git a/src/bb-library/Box/InjectionAwareInterface.php b/src/bb-library/Box/InjectionAwareInterface.php new file mode 100644 index 000000000..a1e70e4d0 --- /dev/null +++ b/src/bb-library/Box/InjectionAwareInterface.php @@ -0,0 +1,26 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getKey() + { + $license = $this->di['config']['license']; + if(!$license || $license == '') { + throw new \Box_Exception('BoxBilling license key must be defined in bb-config.php file.', null, 315); + } + return $license; + } + + public function check() + { + if(!$this->isValid()) { + throw new \Box_Exception('License is not valid'); + } + } + + public function isValid() + { + try { + $this->getDetails(); + return true; + } catch(\Exception $e) { + return false; + } + } + + public function isPro() + { + return ($this->getBBType() == \Box_Version::TYPE_PRO); + } + + private function getBBType() + { + $prefixes = array( + 'PRO-', + 'HOSTING24-', + ); + $bb_license = $this->getKey(); + foreach($prefixes as $prefix){ + if(substr($bb_license, 0, strlen($prefix)) == $prefix) { + return \Box_Version::TYPE_PRO; + } + } + + return \Box_Version::TYPE_FREE; + } + + public function getDetails($from_server = false) + { + $license = $this->getKey(); + $systemService = $this->di['mod_service']('system'); + $salt = 'IJ2bspsxk1U1INr'; + $key = md5('_lc_'.$license); + $cache = $systemService->getParamValue($key); + + //set when last time was license checked + $check_key = md5('_last_check_'.$license); + $v = $systemService->getParamValue($check_key); + + $last_check = time(); + + if(!$v) { + $from_server = true; + } else { + $checkd = $this->di['crypt']->decrypt($v, $salt); + if(is_numeric($checkd)) { + $last_check = $checkd; + } + } + + if((time() - $last_check) > 60 * 60 * 1) { + $from_server = true; + } + + if($cache && !$from_server) { + $data = @unserialize($this->di['crypt']->decrypt($cache, $salt)); + if ($data === false) { + $from_server = true; + } + } + + if(!$cache || $from_server) { + try { + $servers = array( + 'http://www.boxbilling.com/api/guest/servicelicense/check', + 'http://api.boxbilling.com/license.php', + 'http://api.boxbilling.com/license-valid.php', + ); + $l = $this->_getLicenseDetailsFromServer($servers); + } catch(\LogicException $e) { + error_log($e->getMessage()); + return array(); + } + + $data = $l; + + $systemService->updateParam($key, $this->di['crypt']->encrypt(serialize($l), $salt), true); + $systemService->updateParam($check_key, $this->di['crypt']->encrypt(time(), $salt), true); + } else { + $data = @unserialize($this->di['crypt']->decrypt($cache, $salt)); + if (!is_array($data)) { + error_log('Invalid response from licensing server. 9115'); + $systemService->updateParam($key, $this->di['crypt']->encrypt(serialize(false), $salt), true); + } + } + + return $data; + } + + public function _getLicenseDetailsFromServer(array $servers) + { + $params = array(); + $params['license'] = $this->di['config']['license']; + $params['host'] = BB_URL; + $params['path'] = BB_PATH_ROOT; + $params['version'] = \Box_Version::VERSION; + $params['os'] = PHP_OS; + $params['format'] = 2; + + foreach($servers as $server) { + $response = $this->_tryLicensingServer($server, $params); + + // check empty response + if(!$response) { + error_log($response); + continue; + } + + // check invalid json + $r = json_decode($response, 1); + if(!is_array($r) || !isset($r['result'])) { + error_log('Invalid json result '. $response); + continue; + } + + // check server error + if(isset($r['error']) && is_array($r['error'])) { + error_log(print_r($r['error'], 1)); + continue; + } + + if(!is_array($r['result']) || !isset($r['result']['valid'])) { + error_log('Strange response from licensing server'); + continue; + } + + if(!$r['result']['valid']) { + $code = $r['result']['error_code'] ? (int)$r['result']['error_code'] : 9019; + $msg = (string)$r['result']['error']; + throw new \Exception($msg, $code); + } + + return $r['result']; + } + + return array(); + } + + private function _tryLicensingServer($url, $params) + { + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_VERBOSE, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); + curl_setopt($ch, CURLOPT_RETURNTRANSFER,1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 20); + curl_setopt($ch, CURLOPT_TIMEOUT, 20); + curl_setopt($ch, CURLOPT_POST, true); + curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($params)); + $result = curl_exec($ch); + curl_close($ch); + + return $result; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Log.php b/src/bb-library/Box/Log.php new file mode 100644 index 000000000..51e9a379e --- /dev/null +++ b/src/bb-library/Box/Log.php @@ -0,0 +1,150 @@ + 'EMERG', + self::ALERT => 'ALERT', + self::CRIT => 'CRIT', + self::ERR => 'ERR', + self::WARN => 'WARN', + self::NOTICE => 'NOTICE', + self::INFO => 'INFO', + self::DEBUG => 'DEBUG', + ); + + protected $_min_priority = NULL; + + protected $_writers = array(); + + protected $_extras = array(); + + protected $di; + + /** + * @param mixed $di + */ + public function setDi($di) + { + $this->di = $di; + } + + public function __call($method, $params) + { + $priority = strtoupper($method); + if (($priority = array_search($priority, $this->_priorities)) !== false) { + switch (count($params)) { + case 0: + throw new \Box_Exception('Missing log message'); + case 1: + $message = array_shift($params); + $extras = null; + break; + default: + $message = array_shift($params); + $extras = array_shift($params); + break; + } + $this->log($message, $priority, $extras); + } else { + throw new \Box_Exception('Bad log priority'); + } + } + + public function log($message, $priority, $extras = null) + { + // sanity checks + if (empty($this->_writers)) { + return; + } + + if (! isset($this->_priorities[$priority])) { + throw new \Box_Exception('Bad log priority'); + } + + if($this->_min_priority && $priority > $this->_min_priority) { + return; + } + + $event = $this->_packEvent($message, $priority); + + // Check to see if any extra information was passed + if (!empty($extras)) { + $info = array(); + if (is_array($extras)) { + foreach ($extras as $key => $value) { + if (is_string($key)) { + $event[$key] = $value; + } else { + $info[] = $value; + } + } + } else { + $info = $extras; + } + if (!empty($info)) { + $event['info'] = $info; + } + } + + //do not log debug level messages if debug is OFF + if($this->di['config']['debug'] === FALSE && $event['priority'] > self::INFO) { + return ; + } + + // send to each writer + foreach ($this->_writers as $writer) { + $writer->write($event); + } + } + + protected function _packEvent($message, $priority) + { + return array_merge(array( + 'timestamp' => date('c'), + 'message' => $message, + 'priority' => $priority, + 'priorityName' => $this->_priorities[$priority] + ), + $this->_extras + ); + } + + public function addWriter($writer) + { + $this->_writers[] = $writer; + return $this; + } + + public function setEventItem($name, $value) + { + $this->_extras = array_merge($this->_extras, array($name => $value)); + return $this; + } + + public function setMinPriority($priority) + { + $this->_min_priority = $priority; + return $this; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/LogDb.php b/src/bb-library/Box/LogDb.php new file mode 100644 index 000000000..ccc89db2c --- /dev/null +++ b/src/bb-library/Box/LogDb.php @@ -0,0 +1,51 @@ +service = $service; + } + + /** + * Write a message to the log. + * + * @param array $event event data + * @return void + */ + public function write($event) + { + try { + if(method_exists($this->service, 'logEvent')) { + $this->service->logEvent($event); + } + } catch(Exception $e) { + error_log($e); + } + } + +} diff --git a/src/bb-library/Box/LogStream.php b/src/bb-library/Box/LogStream.php new file mode 100644 index 000000000..97f7dd5b8 --- /dev/null +++ b/src/bb-library/Box/LogStream.php @@ -0,0 +1,62 @@ +_stream = $streamOrUrl; + } else { + if (is_array($streamOrUrl) && isset($streamOrUrl['stream'])) { + $streamOrUrl = $streamOrUrl['stream']; + } + + if (! $this->_stream = @fopen($streamOrUrl, $mode, false)) { + throw new \Box_Exception(":stream cannot be opened with mode :mode", array(':stream'=>$streamOrUrl, ':mode'=>$mode)); + } + } + } + + public function write($event) + { + $output = '%timestamp% %priorityName% (%priority%): %message%'.PHP_EOL; + foreach ($event as $name => $value) { + if ((is_object($value) && !method_exists($value,'__toString')) + || is_array($value) + ) { + $value = gettype($value); + } + $output = str_replace("%$name%", $value, $output); + } + + if (false === @fwrite($this->_stream, $output)) { + throw new \Box_Exception("Unable to write to stream"); + } + } +} diff --git a/src/bb-library/Box/Mail.php b/src/bb-library/Box/Mail.php new file mode 100644 index 000000000..b179bdb3c --- /dev/null +++ b/src/bb-library/Box/Mail.php @@ -0,0 +1,3588 @@ +_sendMail($options); + } else if($transport == 'smtp') { + $this->_sendSmtpMail($options); + } else { + throw new \Box_Exception('Unknown mail transport: :transport', array(':transport'=>$transport)); + } + } + + public function setBodyHtml($param) + { + $this->_bodyHtml = $param; + return $this; + } + + public function setFrom($email, $name = null) + { + $this->_from = $this->_filterEmail($email); + $this->_from_name = $this->_filterName($name); + + return $this; + } + + public function getSubject() + { + return $this->_subject; + } + + public function getBody() + { + return $this->_bodyHtml; + } + + public function setSubject($subject) + { + $this->_subject = $this->_filterOther($subject); + return $this; + } + + public function setReplyTo($email, $name = null) + { + $this->_replyTo = $this->_filterEmail($email); + $this->_replyTo_name = $this->_filterName($name); + return $this; + } + + public function addTo($email, $name='') + { + $this->_to = $this->_filterEmail($email); + return $this; + } + + private function _sendSmtpMail($options) + { + if(!isset($options['smtp_host'])) { + throw new \Box_Exception('SMTP host not configured'); + } + + if(!isset($options['smtp_port'])) { + throw new \Box_Exception('SMTP port not configured'); + } + + $user = isset($options['smtp_username']) ? $options['smtp_username'] : NULL; + $pass = isset($options['smtp_password']) ? $options['smtp_password'] : NULL; + $port = isset($options['smtp_port']) ? $options['smtp_port'] : NULL; + $host = isset($options['smtp_host']) ? $options['smtp_host'] : NULL; + $security = isset($options['smtp_security']) ? $options['smtp_security'] : NULL; + + if(empty($host)) { + throw new \Box_Exception('SMTP hostname is not configured.'); + } + + $mail = new PHPMailer(true); + $mail->CharSet = 'utf-8'; + $mail->IsSMTP(); + $mail->Host = $host; + $mail->SMTPDebug = 0; + + if($port) + $mail->Port = (int)$port; + + if($user) { + $mail->SMTPAuth = true; + $mail->SMTPSecure = $security; + $mail->Username = $user; + $mail->Password = $pass; + } + + $mail->SetFrom($this->_from, $this->_from_name); + $mail->AddReplyTo($this->_from); + $mail->AddAddress($this->_to); + + $mail->Subject = $this->_subject; + $mail->MsgHTML($this->_bodyHtml); + $mail->send(); + } + + private function _sendMail() + { + try { + $mail = new PHPMailer(true); + $mail->CharSet = 'utf-8'; + $mail->AddReplyTo($this->_from, $this->_from_name); + $mail->SetFrom($this->_from, $this->_from_name); + $mail->AddAddress($this->_to); + $mail->Subject = $this->_subject; + $mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test + $mail->MsgHTML($this->_bodyHtml); + $mail->Send(); + } catch(Exception $e) { + error_log($e->getMessage()); + + //simple mail sending + $subject = "=?utf-8?B?".base64_encode($this->_subject)."?="; + $this->addHeader('From', $this->_from); + $this->addHeader('Reply-To', $this->_replyTo); + $this->addHeader('Return-Path', $this->_from); + $this->addHeader('Content-type', 'text/html;charset=utf-8'); + $this->addHeader('Content-Transfer-Encoding', '8bit'); + $this->addHeader('X-mailer', 'BoxBilling/'.Box_Version::VERSION); + mail($this->_to,$subject,$this->_bodyHtml,$this->_headers); + } + } + + private function addHeader($name, $value) + { + $this->_headers .= $name.": ".$value."\r\n"; + } + + /** + * Temporary error handler for PHP native mail(). + * + * @param int $errno + * @param string $errstr + * @param string $errfile + * @param string $errline + * @param array $errcontext + * @return true + */ + public function _handleMailErrors($errno, $errstr, $errfile = null, $errline = null, array $errcontext = null) + { + throw new \Box_Exception($errstr); + } + + /** + * Filter of email data + * + * @param string $email + * @return string + */ + private function _filterEmail($email) + { + $rule = array("\r" => '', + "\n" => '', + "\t" => '', + '"' => '', + ',' => '', + '<' => '', + '>' => '', + ); + + return strtr($email, $rule); + } + + /** + * Filter of name data + * + * @param string $name + * @return string + */ + private function _filterName($name) + { + $rule = array("\r" => '', + "\n" => '', + "\t" => '', + '"' => "'", + '<' => '[', + '>' => ']', + ); + + return trim(strtr($name, $rule)); + } + + /** + * Filter of other data + * + * @param string $data + * @return string + */ + private function _filterOther($data) + { + $rule = array("\r" => '', + "\n" => '', + "\t" => '', + ); + + return strtr($data, $rule); + } +} + + +/*~ class.phpmailer.php +.---------------------------------------------------------------------------. +| Software: PHPMailer - PHP email class | +| Version: 5.2.1 | +| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ | +| ------------------------------------------------------------------------- | +| Admin: Jim Jagielski (project admininistrator) | +| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net | +| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net | +| : Jim Jagielski (jimjag) jimjag@gmail.com | +| Founder: Brent R. Matzelle (original founder) | +| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. | +| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. | +| Copyright (c) 2001-2003, Brent R. Matzelle | +| ------------------------------------------------------------------------- | +| License: Distributed under the Lesser General Public License (LGPL) | +| http://www.gnu.org/copyleft/lesser.html | +| This program is distributed in the hope that it will be useful - WITHOUT | +| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | +| FITNESS FOR A PARTICULAR PURPOSE. | +'---------------------------------------------------------------------------' +*/ + +/** + * PHPMailer - PHP email transport class + * NOTE: Requires PHP version 5 or later + * @package PHPMailer + * @author Andy Prevost + * @author Marcus Bointon + * @author Jim Jagielski + * @copyright 2010 - 2012 Jim Jagielski + * @copyright 2004 - 2009 Andy Prevost + * @version $Id: class.phpmailer.php 450 2010-06-23 16:46:33Z coolbru $ + * @license http://www.gnu.org/copyleft/lesser.html GNU Lesser General Public License + */ + +if (version_compare(PHP_VERSION, '5.0.0', '<') ) exit("Sorry, this version of PHPMailer will only run on PHP version 5 or greater!\n"); + +class PHPMailer { + + ///////////////////////////////////////////////// + // PROPERTIES, PUBLIC + ///////////////////////////////////////////////// + + /** + * Email priority (1 = High, 3 = Normal, 5 = low). + * @var int + */ + public $Priority = 3; + + /** + * Sets the CharSet of the message. + * @var string + */ + public $CharSet = 'iso-8859-1'; + + /** + * Sets the Content-type of the message. + * @var string + */ + public $ContentType = 'text/plain'; + + /** + * Sets the Encoding of the message. Options for this are + * "8bit", "7bit", "binary", "base64", and "quoted-printable". + * @var string + */ + public $Encoding = '8bit'; + + /** + * Holds the most recent mailer error message. + * @var string + */ + public $ErrorInfo = ''; + + /** + * Sets the From email address for the message. + * @var string + */ + public $From = 'root@localhost'; + + /** + * Sets the From name of the message. + * @var string + */ + public $FromName = 'Root User'; + + /** + * Sets the Sender email (Return-Path) of the message. If not empty, + * will be sent via -f to sendmail or as 'MAIL FROM' in smtp mode. + * @var string + */ + public $Sender = ''; + + /** + * Sets the Subject of the message. + * @var string + */ + public $Subject = ''; + + /** + * Sets the Body of the message. This can be either an HTML or text body. + * If HTML then run IsHTML(true). + * @var string + */ + public $Body = ''; + + /** + * Sets the text-only body of the message. This automatically sets the + * email to multipart/alternative. This body can be read by mail + * clients that do not have HTML email capability such as mutt. Clients + * that can read HTML will view the normal Body. + * @var string + */ + public $AltBody = ''; + + /** + * Stores the complete compiled MIME message body. + * @var string + * @access protected + */ + protected $MIMEBody = ''; + + /** + * Stores the complete compiled MIME message headers. + * @var string + * @access protected + */ + protected $MIMEHeader = ''; + + /** + * Stores the complete sent MIME message (Body and Headers) + * @var string + * @access protected + */ + protected $SentMIMEMessage = ''; + + /** + * Sets word wrapping on the body of the message to a given number of + * characters. + * @var int + */ + public $WordWrap = 0; + + /** + * Method to send mail: ("mail", "sendmail", or "smtp"). + * @var string + */ + public $Mailer = 'mail'; + + /** + * Sets the path of the sendmail program. + * @var string + */ + public $Sendmail = '/usr/sbin/sendmail'; + + /** + * Path to PHPMailer plugins. Useful if the SMTP class + * is in a different directory than the PHP include path. + * @var string + */ + public $PluginDir = ''; + + /** + * Sets the email address that a reading confirmation will be sent. + * @var string + */ + public $ConfirmReadingTo = ''; + + /** + * Sets the hostname to use in Message-Id and Received headers + * and as default HELO string. If empty, the value returned + * by SERVER_NAME is used or 'localhost.localdomain'. + * @var string + */ + public $Hostname = ''; + + /** + * Sets the message ID to be used in the Message-Id header. + * If empty, a unique id will be generated. + * @var string + */ + public $MessageID = ''; + + ///////////////////////////////////////////////// + // PROPERTIES FOR SMTP + ///////////////////////////////////////////////// + + /** + * Sets the SMTP hosts. All hosts must be separated by a + * semicolon. You can also specify a different port + * for each host by using this format: [hostname:port] + * (e.g. "smtp1.example.com:25;smtp2.example.com"). + * Hosts will be tried in order. + * @var string + */ + public $Host = 'localhost'; + + /** + * Sets the default SMTP server port. + * @var int + */ + public $Port = 25; + + /** + * Sets the SMTP HELO of the message (Default is $Hostname). + * @var string + */ + public $Helo = ''; + + /** + * Sets connection prefix. + * Options are "", "ssl" or "tls" + * @var string + */ + public $SMTPSecure = ''; + + /** + * Sets SMTP authentication. Utilizes the Username and Password variables. + * @var bool + */ + public $SMTPAuth = false; + + /** + * Sets SMTP username. + * @var string + */ + public $Username = ''; + + /** + * Sets SMTP password. + * @var string + */ + public $Password = ''; + + /** + * Sets the SMTP server timeout in seconds. + * This function will not work with the win32 version. + * @var int + */ + public $Timeout = 10; + + /** + * Sets SMTP class debugging on or off. + * @var bool + */ + public $SMTPDebug = false; + + /** + * Prevents the SMTP connection from being closed after each mail + * sending. If this is set to true then to close the connection + * requires an explicit call to SmtpClose(). + * @var bool + */ + public $SMTPKeepAlive = false; + + /** + * Provides the ability to have the TO field process individual + * emails, instead of sending to entire TO addresses + * @var bool + */ + public $SingleTo = false; + + /** + * If SingleTo is true, this provides the array to hold the email addresses + * @var bool + */ + public $SingleToArray = array(); + + /** + * Provides the ability to change the line ending + * @var string + */ + public $LE = "\n"; + + /** + * Used with DKIM DNS Resource Record + * @var string + */ + public $DKIM_selector = 'phpmailer'; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'you@yourdomain.com' + * @var string + */ + public $DKIM_identity = ''; + + /** + * Used with DKIM DNS Resource Record + * @var string + */ + public $DKIM_passphrase = ''; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'you@yourdomain.com' + * @var string + */ + public $DKIM_domain = ''; + + /** + * Used with DKIM DNS Resource Record + * optional, in format of email address 'you@yourdomain.com' + * @var string + */ + public $DKIM_private = ''; + + /** + * Callback Action function name + * the function that handles the result of the send email action. Parameters: + * bool $result result of the send action + * string $to email address of the recipient + * string $cc cc email addresses + * string $bcc bcc email addresses + * string $subject the subject + * string $body the email body + * @var string + */ + public $action_function = ''; //'callbackAction'; + + /** + * Sets the PHPMailer Version number + * @var string + */ + public $Version = '5.2.1'; + + /** + * What to use in the X-Mailer header + * @var string + */ + public $XMailer = ''; + + ///////////////////////////////////////////////// + // PROPERTIES, PRIVATE AND PROTECTED + ///////////////////////////////////////////////// + + protected $smtp = NULL; + protected $to = array(); + protected $cc = array(); + protected $bcc = array(); + protected $ReplyTo = array(); + protected $all_recipients = array(); + protected $attachment = array(); + protected $CustomHeader = array(); + protected $message_type = ''; + protected $boundary = array(); + protected $language = array(); + protected $error_count = 0; + protected $sign_cert_file = ''; + protected $sign_key_file = ''; + protected $sign_key_pass = ''; + protected $exceptions = false; + + ///////////////////////////////////////////////// + // CONSTANTS + ///////////////////////////////////////////////// + + const STOP_MESSAGE = 0; // message only, continue processing + const STOP_CONTINUE = 1; // message?, likely ok to continue processing + const STOP_CRITICAL = 2; // message, plus full stop, critical error reached + + ///////////////////////////////////////////////// + // METHODS, VARIABLES + ///////////////////////////////////////////////// + + /** + * Constructor + * @param boolean $exceptions Should we throw external exceptions? + */ + public function __construct($exceptions = false) { + $this->exceptions = ($exceptions == true); + } + + /** + * Sets message type to HTML. + * @param bool $ishtml + * @return void + */ + public function IsHTML($ishtml = true) { + if ($ishtml) { + $this->ContentType = 'text/html'; + } else { + $this->ContentType = 'text/plain'; + } + } + + /** + * Sets Mailer to send message using SMTP. + * @return void + */ + public function IsSMTP() { + $this->Mailer = 'smtp'; + } + + /** + * Sets Mailer to send message using PHP mail() function. + * @return void + */ + public function IsMail() { + $this->Mailer = 'mail'; + } + + /** + * Sets Mailer to send message using the $Sendmail program. + * @return void + */ + public function IsSendmail() { + if (!stristr(ini_get('sendmail_path'), 'sendmail')) { + $this->Sendmail = '/var/qmail/bin/sendmail'; + } + $this->Mailer = 'sendmail'; + } + + /** + * Sets Mailer to send message using the qmail MTA. + * @return void + */ + public function IsQmail() { + if (stristr(ini_get('sendmail_path'), 'qmail')) { + $this->Sendmail = '/var/qmail/bin/sendmail'; + } + $this->Mailer = 'sendmail'; + } + + ///////////////////////////////////////////////// + // METHODS, RECIPIENTS + ///////////////////////////////////////////////// + + /** + * Adds a "To" address. + * @param string $address + * @param string $name + * @return boolean true on success, false if address already used + */ + public function AddAddress($address, $name = '') { + return $this->AddAnAddress('to', $address, $name); + } + + /** + * Adds a "Cc" address. + * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address + * @param string $name + * @return boolean true on success, false if address already used + */ + public function AddCC($address, $name = '') { + return $this->AddAnAddress('cc', $address, $name); + } + + /** + * Adds a "Bcc" address. + * Note: this function works with the SMTP mailer on win32, not with the "mail" mailer. + * @param string $address + * @param string $name + * @return boolean true on success, false if address already used + */ + public function AddBCC($address, $name = '') { + return $this->AddAnAddress('bcc', $address, $name); + } + + /** + * Adds a "Reply-to" address. + * @param string $address + * @param string $name + * @return boolean + */ + public function AddReplyTo($address, $name = '') { + return $this->AddAnAddress('Reply-To', $address, $name); + } + + /** + * Adds an address to one of the recipient arrays + * Addresses that have been added already return false, but do not throw exceptions + * @param string $kind One of 'to', 'cc', 'bcc', 'ReplyTo' + * @param string $address The email address to send to + * @param string $name + * @return boolean true on success, false if address already used or invalid in some way + * @access protected + */ + protected function AddAnAddress($kind, $address, $name = '') { + if (!preg_match('/^(to|cc|bcc|Reply-To)$/', $kind)) { + $this->SetError($this->Lang('Invalid recipient array').': '.$kind); + if ($this->exceptions) { + throw new phpmailerException('Invalid recipient array: ' . $kind); + } + if ($this->SMTPDebug) { + echo $this->Lang('Invalid recipient array').': '.$kind; + } + return false; + } + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!self::ValidateAddress($address)) { + $this->SetError($this->Lang('invalid_address').': '. $address); + if ($this->exceptions) { + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + if ($this->SMTPDebug) { + echo $this->Lang('invalid_address').': '.$address; + } + return false; + } + if ($kind != 'Reply-To') { + if (!isset($this->all_recipients[strtolower($address)])) { + array_push($this->$kind, array($address, $name)); + $this->all_recipients[strtolower($address)] = true; + return true; + } + } else { + if (!array_key_exists(strtolower($address), $this->ReplyTo)) { + $this->ReplyTo[strtolower($address)] = array($address, $name); + return true; + } + } + return false; +} + +/** + * Set the From and FromName properties + * @param string $address + * @param string $name + * @return boolean + */ + public function SetFrom($address, $name = '', $auto = 1) { + $address = trim($address); + $name = trim(preg_replace('/[\r\n]+/', '', $name)); //Strip breaks and trim + if (!self::ValidateAddress($address)) { + $this->SetError($this->Lang('invalid_address').': '. $address); + if ($this->exceptions) { + throw new phpmailerException($this->Lang('invalid_address').': '.$address); + } + if ($this->SMTPDebug) { + echo $this->Lang('invalid_address').': '.$address; + } + return false; + } + $this->From = $address; + $this->FromName = $name; + if ($auto) { + if (empty($this->ReplyTo)) { + $this->AddAnAddress('Reply-To', $address, $name); + } + if (empty($this->Sender)) { + $this->Sender = $address; + } + } + return true; + } + + /** + * Check that a string looks roughly like an email address should + * Static so it can be used without instantiation + * Tries to use PHP built-in validator in the filter extension (from PHP 5.2), falls back to a reasonably competent regex validator + * Conforms approximately to RFC2822 + * @link http://www.hexillion.com/samples/#Regex Original pattern found here + * @param string $address The email address to check + * @return boolean + * @static + * @access public + */ + public static function ValidateAddress($address) { + if (function_exists('filter_var')) { //Introduced in PHP 5.2 + if(filter_var($address, FILTER_VALIDATE_EMAIL) === FALSE) { + return false; + } else { + return true; + } + } else { + return preg_match('/^(?:[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+\.)*[\w\!\#\$\%\&\'\*\+\-\/\=\?\^\`\{\|\}\~]+@(?:(?:(?:[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!\.)){0,61}[a-zA-Z0-9_-]?\.)+[a-zA-Z0-9_](?:[a-zA-Z0-9_\-](?!$)){0,61}[a-zA-Z0-9_]?)|(?:\[(?:(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\.){3}(?:[01]?\d{1,2}|2[0-4]\d|25[0-5])\]))$/', $address); + } + } + + ///////////////////////////////////////////////// + // METHODS, MAIL SENDING + ///////////////////////////////////////////////// + + /** + * Creates message and assigns Mailer. If the message is + * not sent successfully then it returns false. Use the ErrorInfo + * variable to view description of the error. + * @return bool + */ + public function Send() { + try { + if(!$this->PreSend()) return false; + return $this->PostSend(); + } catch (phpmailerException $e) { + $this->SentMIMEMessage = ''; + $this->SetError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + return false; + } + } + + protected function PreSend() { + try { + $mailHeader = ""; + if ((count($this->to) + count($this->cc) + count($this->bcc)) < 1) { + throw new phpmailerException($this->Lang('provide_address'), self::STOP_CRITICAL); + } + + // Set whether the message is multipart/alternative + if(!empty($this->AltBody)) { + $this->ContentType = 'multipart/alternative'; + } + + $this->error_count = 0; // reset errors + $this->SetMessageType(); + //Refuse to send an empty message + if (empty($this->Body)) { + throw new phpmailerException($this->Lang('empty_message'), self::STOP_CRITICAL); + } + + $this->MIMEHeader = $this->CreateHeader(); + $this->MIMEBody = $this->CreateBody(); + + // To capture the complete message when using mail(), create + // an extra header list which CreateHeader() doesn't fold in + if ($this->Mailer == 'mail') { + if (count($this->to) > 0) { + $mailHeader .= $this->AddrAppend("To", $this->to); + } else { + $mailHeader .= $this->HeaderLine("To", "undisclosed-recipients:;"); + } + $mailHeader .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader(trim($this->Subject)))); + // if(count($this->cc) > 0) { + // $mailHeader .= $this->AddrAppend("Cc", $this->cc); + // } + } + + // digitally sign with DKIM if enabled + if ($this->DKIM_domain && $this->DKIM_private) { + $header_dkim = $this->DKIM_Add($this->MIMEHeader, $this->EncodeHeader($this->SecureHeader($this->Subject)), $this->MIMEBody); + $this->MIMEHeader = str_replace("\r\n", "\n", $header_dkim) . $this->MIMEHeader; + } + + $this->SentMIMEMessage = sprintf("%s%s\r\n\r\n%s",$this->MIMEHeader,$mailHeader,$this->MIMEBody); + return true; + + } catch (phpmailerException $e) { + $this->SetError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + return false; + } + } + + protected function PostSend() { + try { + // Choose the mailer and send through it + switch($this->Mailer) { + case 'sendmail': + return $this->SendmailSend($this->MIMEHeader, $this->MIMEBody); + case 'smtp': + return $this->SmtpSend($this->MIMEHeader, $this->MIMEBody); + case 'mail': + return $this->MailSend($this->MIMEHeader, $this->MIMEBody); + default: + return $this->MailSend($this->MIMEHeader, $this->MIMEBody); + } + + } catch (phpmailerException $e) { + $this->SetError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + if ($this->SMTPDebug) { + echo $e->getMessage()."\n"; + } + return false; + } + } + + /** + * Sends mail using the $Sendmail program. + * @param string $header The message headers + * @param string $body The message body + * @access protected + * @return bool + */ + protected function SendmailSend($header, $body) { + if ($this->Sender != '') { + $sendmail = sprintf("%s -oi -f %s -t", escapeshellcmd($this->Sendmail), escapeshellarg($this->Sender)); + } else { + $sendmail = sprintf("%s -oi -t", escapeshellcmd($this->Sendmail)); + } + if ($this->SingleTo === true) { + foreach ($this->SingleToArray as $key => $val) { + if(!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, "To: " . $val . "\n"); + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); + if($result != 0) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + } else { + if(!@$mail = popen($sendmail, 'w')) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + fputs($mail, $header); + fputs($mail, $body); + $result = pclose($mail); + // implement call back function if it exists + $isSent = ($result == 0) ? 1 : 0; + $this->doCallback($isSent, $this->to, $this->cc, $this->bcc, $this->Subject, $body); + if($result != 0) { + throw new phpmailerException($this->Lang('execute') . $this->Sendmail, self::STOP_CRITICAL); + } + } + return true; + } + + /** + * Sends mail using the PHP mail() function. + * @param string $header The message headers + * @param string $body The message body + * @access protected + * @return bool + */ + protected function MailSend($header, $body) { + $toArr = array(); + foreach($this->to as $t) { + $toArr[] = $this->AddrFormat($t); + } + $to = implode(', ', $toArr); + + if (empty($this->Sender)) { + $params = "-oi "; + } else { + $params = sprintf("-oi -f %s", $this->Sender); + } + if ($this->Sender != '' and !ini_get('safe_mode')) { + $old_from = ini_get('sendmail_from'); + ini_set('sendmail_from', $this->Sender); + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $key => $val) { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); + } + } else { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); + } + } else { + if ($this->SingleTo === true && count($toArr) > 1) { + foreach ($toArr as $key => $val) { + $rt = @mail($val, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $val, $this->cc, $this->bcc, $this->Subject, $body); + } + } else { + $rt = @mail($to, $this->EncodeHeader($this->SecureHeader($this->Subject)), $body, $header, $params); + // implement call back function if it exists + $isSent = ($rt == 1) ? 1 : 0; + $this->doCallback($isSent, $to, $this->cc, $this->bcc, $this->Subject, $body); + } + } + if (isset($old_from)) { + ini_set('sendmail_from', $old_from); + } + if(!$rt) { + throw new phpmailerException($this->Lang('instantiate'), self::STOP_CRITICAL); + } + return true; + } + + /** + * Sends mail via SMTP using PhpSMTP + * Returns false if there is a bad MAIL FROM, RCPT, or DATA input. + * @param string $header The message headers + * @param string $body The message body + * @uses SMTP + * @access protected + * @return bool + */ + protected function SmtpSend($header, $body) { + $bad_rcpt = array(); + + if(!$this->SmtpConnect()) { + throw new phpmailerException($this->Lang('smtp_connect_failed'), self::STOP_CRITICAL); + } + $smtp_from = ($this->Sender == '') ? $this->From : $this->Sender; + if(!$this->smtp->Mail($smtp_from)) { + throw new phpmailerException($this->Lang('from_failed') . $smtp_from, self::STOP_CRITICAL); + } + + // Attempt to send attach all recipients + foreach($this->to as $to) { + if (!$this->smtp->Recipient($to[0])) { + $bad_rcpt[] = $to[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent, $to[0], '', '', $this->Subject, $body); + } + } + foreach($this->cc as $cc) { + if (!$this->smtp->Recipient($cc[0])) { + $bad_rcpt[] = $cc[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent, '', $cc[0], '', $this->Subject, $body); + } + } + foreach($this->bcc as $bcc) { + if (!$this->smtp->Recipient($bcc[0])) { + $bad_rcpt[] = $bcc[0]; + // implement call back function if it exists + $isSent = 0; + $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); + } else { + // implement call back function if it exists + $isSent = 1; + $this->doCallback($isSent, '', '', $bcc[0], $this->Subject, $body); + } + } + + + if (count($bad_rcpt) > 0 ) { //Create error message for any bad addresses + $badaddresses = implode(', ', $bad_rcpt); + throw new phpmailerException($this->Lang('recipients_failed') . $badaddresses); + } + if(!$this->smtp->Data($header . $body)) { + throw new phpmailerException($this->Lang('data_not_accepted'), self::STOP_CRITICAL); + } + if($this->SMTPKeepAlive == true) { + $this->smtp->Reset(); + } + return true; + } + + /** + * Initiates a connection to an SMTP server. + * Returns false if the operation failed. + * @uses SMTP + * @access public + * @return bool + */ + public function SmtpConnect() { + if(is_null($this->smtp)) { + $this->smtp = new SMTP(); + } + + $this->smtp->do_debug = $this->SMTPDebug; + $hosts = explode(';', $this->Host); + $index = 0; + $connection = $this->smtp->Connected(); + + // Retry while there is no connection + try { + while($index < count($hosts) && !$connection) { + $hostinfo = array(); + if (preg_match('/^(.+):([0-9]+)$/', $hosts[$index], $hostinfo)) { + $host = $hostinfo[1]; + $port = $hostinfo[2]; + } else { + $host = $hosts[$index]; + $port = $this->Port; + } + + $tls = ($this->SMTPSecure == 'tls'); + $ssl = ($this->SMTPSecure == 'ssl'); + + if ($this->smtp->Connect(($ssl ? 'ssl://':'').$host, $port, $this->Timeout)) { + + $hello = ($this->Helo != '' ? $this->Helo : $this->ServerHostname()); + $this->smtp->Hello($hello); + + if ($tls) { + if (!$this->smtp->StartTLS()) { + throw new phpmailerException($this->Lang('tls')); + } + + //We must resend HELO after tls negotiation + $this->smtp->Hello($hello); + } + + $connection = true; + if ($this->SMTPAuth) { + if (!$this->smtp->Authenticate($this->Username, $this->Password)) { + throw new phpmailerException($this->Lang('authenticate')); + } + } + } + $index++; + if (!$connection) { + throw new phpmailerException($this->Lang('connect_host')); + } + } + } catch (phpmailerException $e) { + $this->smtp->Reset(); + if ($this->exceptions) { + throw $e; + } + } + return true; + } + + /** + * Closes the active SMTP session if one exists. + * @return void + */ + public function SmtpClose() { + if(!is_null($this->smtp)) { + if($this->smtp->Connected()) { + $this->smtp->Quit(); + $this->smtp->Close(); + } + } + } + + /** + * Sets the language for all class error messages. + * Returns false if it cannot load the language file. The default language is English. + * @param string $langcode ISO 639-1 2-character language code (e.g. Portuguese: "br") + * @param string $lang_path Path to the language file directory + * @access public + */ + function SetLanguage($langcode = 'en', $lang_path = 'language/') { + //Define full set of translatable strings + $PHPMAILER_LANG = array( + 'provide_address' => 'You must provide at least one recipient email address.', + 'mailer_not_supported' => ' mailer is not supported.', + 'execute' => 'Could not execute: ', + 'instantiate' => 'Could not instantiate mail function.', + 'authenticate' => 'SMTP Error: Could not authenticate.', + 'from_failed' => 'The following From address failed: ', + 'recipients_failed' => 'SMTP Error: The following recipients failed: ', + 'data_not_accepted' => 'SMTP Error: Data not accepted.', + 'connect_host' => 'SMTP Error: Could not connect to SMTP host.', + 'file_access' => 'Could not access file: ', + 'file_open' => 'File Error: Could not open file: ', + 'encoding' => 'Unknown encoding: ', + 'signing' => 'Signing Error: ', + 'smtp_error' => 'SMTP server error: ', + 'empty_message' => 'Message body empty', + 'invalid_address' => 'Invalid address', + 'variable_set' => 'Cannot set or reset variable: ' + ); + //Overwrite language-specific strings. This way we'll never have missing translations - no more "language string failed to load"! + $l = true; + if ($langcode != 'en') { //There is no English translation file + $l = @include $lang_path.'phpmailer.lang-'.$langcode.'.php'; + } + $this->language = $PHPMAILER_LANG; + return ($l == true); //Returns false if language not found + } + + /** + * Return the current array of language strings + * @return array + */ + public function GetTranslations() { + return $this->language; + } + + ///////////////////////////////////////////////// + // METHODS, MESSAGE CREATION + ///////////////////////////////////////////////// + + /** + * Creates recipient headers. + * @access public + * @return string + */ + public function AddrAppend($type, $addr) { + $addr_str = $type . ': '; + $addresses = array(); + foreach ($addr as $a) { + $addresses[] = $this->AddrFormat($a); + } + $addr_str .= implode(', ', $addresses); + $addr_str .= $this->LE; + + return $addr_str; + } + + /** + * Formats an address correctly. + * @access public + * @return string + */ + public function AddrFormat($addr) { + if (empty($addr[1])) { + return $this->SecureHeader($addr[0]); + } else { + return $this->EncodeHeader($this->SecureHeader($addr[1]), 'phrase') . " <" . $this->SecureHeader($addr[0]) . ">"; + } + } + + /** + * Wraps message for use with mailers that do not + * automatically perform wrapping and for quoted-printable. + * Original written by philippe. + * @param string $message The message to wrap + * @param integer $length The line length to wrap to + * @param boolean $qp_mode Whether to run in Quoted-Printable mode + * @access public + * @return string + */ + public function WrapText($message, $length, $qp_mode = false) { + $soft_break = ($qp_mode) ? sprintf(" =%s", $this->LE) : $this->LE; + // If utf-8 encoding is used, we will need to make sure we don't + // split multibyte characters when we wrap + $is_utf8 = (strtolower($this->CharSet) == "utf-8"); + + $message = $this->FixEOL($message); + if (substr($message, -1) == $this->LE) { + $message = substr($message, 0, -1); + } + + $line = explode($this->LE, $message); + $message = ''; + for ($i = 0 ;$i < count($line); $i++) { + $line_part = explode(' ', $line[$i]); + $buf = ''; + for ($e = 0; $e $length)) { + $space_left = $length - strlen($buf) - 1; + if ($e != 0) { + if ($space_left > 20) { + $len = $space_left; + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + $buf .= ' ' . $part; + $message .= $buf . sprintf("=%s", $this->LE); + } else { + $message .= $buf . $soft_break; + } + $buf = ''; + } + while (strlen($word) > 0) { + $len = $length; + if ($is_utf8) { + $len = $this->UTF8CharBoundary($word, $len); + } elseif (substr($word, $len - 1, 1) == "=") { + $len--; + } elseif (substr($word, $len - 2, 1) == "=") { + $len -= 2; + } + $part = substr($word, 0, $len); + $word = substr($word, $len); + + if (strlen($word) > 0) { + $message .= $part . sprintf("=%s", $this->LE); + } else { + $buf = $part; + } + } + } else { + $buf_o = $buf; + $buf .= ($e == 0) ? $word : (' ' . $word); + + if (strlen($buf) > $length and $buf_o != '') { + $message .= $buf_o . $soft_break; + $buf = $word; + } + } + } + $message .= $buf . $this->LE; + } + + return $message; + } + + /** + * Finds last character boundary prior to maxLength in a utf-8 + * quoted (printable) encoded string. + * Original written by Colin Brown. + * @access public + * @param string $encodedText utf-8 QP text + * @param int $maxLength find last character boundary prior to this length + * @return int + */ + public function UTF8CharBoundary($encodedText, $maxLength) { + $foundSplitPos = false; + $lookBack = 3; + while (!$foundSplitPos) { + $lastChunk = substr($encodedText, $maxLength - $lookBack, $lookBack); + $encodedCharPos = strpos($lastChunk, "="); + if ($encodedCharPos !== false) { + // Found start of encoded character byte within $lookBack block. + // Check the encoded byte value (the 2 chars after the '=') + $hex = substr($encodedText, $maxLength - $lookBack + $encodedCharPos + 1, 2); + $dec = hexdec($hex); + if ($dec < 128) { // Single byte character. + // If the encoded char was found at pos 0, it will fit + // otherwise reduce maxLength to start of the encoded char + $maxLength = ($encodedCharPos == 0) ? $maxLength : + $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec >= 192) { // First byte of a multi byte character + // Reduce maxLength to split at start of character + $maxLength = $maxLength - ($lookBack - $encodedCharPos); + $foundSplitPos = true; + } elseif ($dec < 192) { // Middle byte of a multi byte character, look further back + $lookBack += 3; + } + } else { + // No encoded character found + $foundSplitPos = true; + } + } + return $maxLength; + } + + + /** + * Set the body wrapping. + * @access public + * @return void + */ + public function SetWordWrap() { + if($this->WordWrap < 1) { + return; + } + + switch($this->message_type) { + case 'alt': + case 'alt_inline': + case 'alt_attach': + case 'alt_inline_attach': + $this->AltBody = $this->WrapText($this->AltBody, $this->WordWrap); + break; + default: + $this->Body = $this->WrapText($this->Body, $this->WordWrap); + break; + } + } + + /** + * Assembles message header. + * @access public + * @return string The assembled header + */ + public function CreateHeader() { + $result = ''; + + // Set the boundaries + $uniq_id = md5(uniqid(time())); + $this->boundary[1] = 'b1_' . $uniq_id; + $this->boundary[2] = 'b2_' . $uniq_id; + $this->boundary[3] = 'b3_' . $uniq_id; + + $result .= $this->HeaderLine('Date', self::RFCDate()); + if($this->Sender == '') { + $result .= $this->HeaderLine('Return-Path', trim($this->From)); + } else { + $result .= $this->HeaderLine('Return-Path', trim($this->Sender)); + } + + // To be created automatically by mail() + if($this->Mailer != 'mail') { + if ($this->SingleTo === true) { + foreach($this->to as $t) { + $this->SingleToArray[] = $this->AddrFormat($t); + } + } else { + if(count($this->to) > 0) { + $result .= $this->AddrAppend('To', $this->to); + } elseif (count($this->cc) == 0) { + $result .= $this->HeaderLine('To', 'undisclosed-recipients:;'); + } + } + } + + $from = array(); + $from[0][0] = trim($this->From); + $from[0][1] = $this->FromName; + $result .= $this->AddrAppend('From', $from); + + // sendmail and mail() extract Cc from the header before sending + if(count($this->cc) > 0) { + $result .= $this->AddrAppend('Cc', $this->cc); + } + + // sendmail and mail() extract Bcc from the header before sending + if((($this->Mailer == 'sendmail') || ($this->Mailer == 'mail')) && (count($this->bcc) > 0)) { + $result .= $this->AddrAppend('Bcc', $this->bcc); + } + + if(count($this->ReplyTo) > 0) { + $result .= $this->AddrAppend('Reply-To', $this->ReplyTo); + } + + // mail() sets the subject itself + if($this->Mailer != 'mail') { + $result .= $this->HeaderLine('Subject', $this->EncodeHeader($this->SecureHeader($this->Subject))); + } + + if($this->MessageID != '') { + $result .= $this->HeaderLine('Message-ID', $this->MessageID); + } else { + $result .= sprintf("Message-ID: <%s@%s>%s", $uniq_id, $this->ServerHostname(), $this->LE); + } + $result .= $this->HeaderLine('X-Priority', $this->Priority); + if($this->XMailer) { + $result .= $this->HeaderLine('X-Mailer', $this->XMailer); + } else { + $result .= $this->HeaderLine('X-Mailer', 'PHPMailer '.$this->Version.' (http://code.google.com/a/apache-extras.org/p/phpmailer/)'); + } + + if($this->ConfirmReadingTo != '') { + $result .= $this->HeaderLine('Disposition-Notification-To', '<' . trim($this->ConfirmReadingTo) . '>'); + } + + // Add custom headers + for($index = 0; $index < count($this->CustomHeader); $index++) { + $result .= $this->HeaderLine(trim($this->CustomHeader[$index][0]), $this->EncodeHeader(trim($this->CustomHeader[$index][1]))); + } + if (!$this->sign_key_file) { + $result .= $this->HeaderLine('MIME-Version', '1.0'); + $result .= $this->GetMailMIME(); + } + + return $result; + } + + /** + * Returns the message MIME. + * @access public + * @return string + */ + public function GetMailMIME() { + $result = ''; + switch($this->message_type) { + case 'plain': + $result .= $this->HeaderLine('Content-Transfer-Encoding', $this->Encoding); + $result .= $this->TextLine('Content-Type: '.$this->ContentType.'; charset="'.$this->CharSet.'"'); + break; + case 'inline': + $result .= $this->HeaderLine('Content-Type', 'multipart/related;'); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'attach': + case 'inline_attach': + case 'alt_attach': + case 'alt_inline_attach': + $result .= $this->HeaderLine('Content-Type', 'multipart/mixed;'); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + case 'alt': + case 'alt_inline': + $result .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); + $result .= $this->TextLine("\tboundary=\"" . $this->boundary[1] . '"'); + break; + } + + if($this->Mailer != 'mail') { + $result .= $this->LE.$this->LE; + } + + return $result; + } + + /** + * Returns the MIME message (headers and body). Only really valid post PreSend(). + * @access public + * @return string + */ + public function GetSentMIMEMessage() { + return $this->SentMIMEMessage; + } + + + /** + * Assembles the message body. Returns an empty string on failure. + * @access public + * @return string The assembled message body + */ + public function CreateBody() { + $body = ''; + + if ($this->sign_key_file) { + $body .= $this->GetMailMIME(); + } + + $this->SetWordWrap(); + + switch($this->message_type) { + case 'plain': + $body .= $this->EncodeString($this->Body, $this->Encoding); + break; + case 'inline': + $body .= $this->GetBoundary($this->boundary[1], '', '', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->AttachAll("inline", $this->boundary[1]); + break; + case 'attach': + $body .= $this->GetBoundary($this->boundary[1], '', '', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->AttachAll("attachment", $this->boundary[1]); + break; + case 'inline_attach': + $body .= $this->TextLine("--" . $this->boundary[1]); + $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); + $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->GetBoundary($this->boundary[2], '', '', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->AttachAll("inline", $this->boundary[2]); + $body .= $this->LE; + $body .= $this->AttachAll("attachment", $this->boundary[1]); + break; + case 'alt': + $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); + $body .= $this->EncodeString($this->AltBody, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->GetBoundary($this->boundary[1], '', 'text/html', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->EndBoundary($this->boundary[1]); + break; + case 'alt_inline': + $body .= $this->GetBoundary($this->boundary[1], '', 'text/plain', ''); + $body .= $this->EncodeString($this->AltBody, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->TextLine("--" . $this->boundary[1]); + $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); + $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->AttachAll("inline", $this->boundary[2]); + $body .= $this->LE; + $body .= $this->EndBoundary($this->boundary[1]); + break; + case 'alt_attach': + $body .= $this->TextLine("--" . $this->boundary[1]); + $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); + $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); + $body .= $this->EncodeString($this->AltBody, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->GetBoundary($this->boundary[2], '', 'text/html', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->EndBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->AttachAll("attachment", $this->boundary[1]); + break; + case 'alt_inline_attach': + $body .= $this->TextLine("--" . $this->boundary[1]); + $body .= $this->HeaderLine('Content-Type', 'multipart/alternative;'); + $body .= $this->TextLine("\tboundary=\"" . $this->boundary[2] . '"'); + $body .= $this->LE; + $body .= $this->GetBoundary($this->boundary[2], '', 'text/plain', ''); + $body .= $this->EncodeString($this->AltBody, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->TextLine("--" . $this->boundary[2]); + $body .= $this->HeaderLine('Content-Type', 'multipart/related;'); + $body .= $this->TextLine("\tboundary=\"" . $this->boundary[3] . '"'); + $body .= $this->LE; + $body .= $this->GetBoundary($this->boundary[3], '', 'text/html', ''); + $body .= $this->EncodeString($this->Body, $this->Encoding); + $body .= $this->LE.$this->LE; + $body .= $this->AttachAll("inline", $this->boundary[3]); + $body .= $this->LE; + $body .= $this->EndBoundary($this->boundary[2]); + $body .= $this->LE; + $body .= $this->AttachAll("attachment", $this->boundary[1]); + break; + } + + if ($this->IsError()) { + $body = ''; + } elseif ($this->sign_key_file) { + try { + $file = tempnam('', 'mail'); + file_put_contents($file, $body); //TODO check this worked + $signed = tempnam("", "signed"); + if (@openssl_pkcs7_sign($file, $signed, "file://".$this->sign_cert_file, array("file://".$this->sign_key_file, $this->sign_key_pass), NULL)) { + @unlink($file); + $body = file_get_contents($signed); + @unlink($signed); + } else { + @unlink($file); + @unlink($signed); + throw new phpmailerException($this->Lang("signing").openssl_error_string()); + } + } catch (phpmailerException $e) { + $body = ''; + if ($this->exceptions) { + throw $e; + } + } + } + + return $body; + } + + /** + * Returns the start of a message boundary. + * @access protected + * @return string + */ + protected function GetBoundary($boundary, $charSet, $contentType, $encoding) { + $result = ''; + if($charSet == '') { + $charSet = $this->CharSet; + } + if($contentType == '') { + $contentType = $this->ContentType; + } + if($encoding == '') { + $encoding = $this->Encoding; + } + $result .= $this->TextLine('--' . $boundary); + $result .= sprintf("Content-Type: %s; charset=\"%s\"", $contentType, $charSet); + $result .= $this->LE; + $result .= $this->HeaderLine('Content-Transfer-Encoding', $encoding); + $result .= $this->LE; + + return $result; + } + + /** + * Returns the end of a message boundary. + * @access protected + * @return string + */ + protected function EndBoundary($boundary) { + return $this->LE . '--' . $boundary . '--' . $this->LE; + } + + /** + * Sets the message type. + * @access protected + * @return void + */ + protected function SetMessageType() { + $this->message_type = array(); + if($this->AlternativeExists()) $this->message_type[] = "alt"; + if($this->InlineImageExists()) $this->message_type[] = "inline"; + if($this->AttachmentExists()) $this->message_type[] = "attach"; + $this->message_type = implode("_", $this->message_type); + if($this->message_type == "") $this->message_type = "plain"; + } + + /** + * Returns a formatted header line. + * @access public + * @return string + */ + public function HeaderLine($name, $value) { + return $name . ': ' . $value . $this->LE; + } + + /** + * Returns a formatted mail line. + * @access public + * @return string + */ + public function TextLine($value) { + return $value . $this->LE; + } + + ///////////////////////////////////////////////// + // CLASS METHODS, ATTACHMENTS + ///////////////////////////////////////////////// + + /** + * Adds an attachment from a path on the filesystem. + * Returns false if the file could not be found + * or accessed. + * @param string $path Path to the attachment. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + public function AddAttachment($path, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { + try { + if ( !@is_file($path) ) { + throw new phpmailerException($this->Lang('file_access') . $path, self::STOP_CONTINUE); + } + $filename = basename($path); + if ( $name == '' ) { + $name = $filename; + } + + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => 'attachment', + 7 => 0 + ); + + } catch (phpmailerException $e) { + $this->SetError($e->getMessage()); + if ($this->exceptions) { + throw $e; + } + if ($this->SMTPDebug) { + echo $e->getMessage()."\n"; + } + if ( $e->getCode() == self::STOP_CRITICAL ) { + return false; + } + } + return true; + } + + /** + * Return the current array of attachments + * @return array + */ + public function GetAttachments() { + return $this->attachment; + } + + /** + * Attaches all fs, string, and binary attachments to the message. + * Returns an empty string on failure. + * @access protected + * @return string + */ + protected function AttachAll($disposition_type, $boundary) { + // Return text of body + $mime = array(); + $cidUniq = array(); + $incl = array(); + + // Add all attachments + foreach ($this->attachment as $attachment) { + // CHECK IF IT IS A VALID DISPOSITION_FILTER + if($attachment[6] == $disposition_type) { + // Check for string attachment + $bString = $attachment[5]; + if ($bString) { + $string = $attachment[0]; + } else { + $path = $attachment[0]; + } + + $inclhash = md5(serialize($attachment)); + if (in_array($inclhash, $incl)) { continue; } + $incl[] = $inclhash; + $filename = $attachment[1]; + $name = $attachment[2]; + $encoding = $attachment[3]; + $type = $attachment[4]; + $disposition = $attachment[6]; + $cid = $attachment[7]; + if ( $disposition == 'inline' && isset($cidUniq[$cid]) ) { continue; } + $cidUniq[$cid] = true; + + $mime[] = sprintf("--%s%s", $boundary, $this->LE); + $mime[] = sprintf("Content-Type: %s; name=\"%s\"%s", $type, $this->EncodeHeader($this->SecureHeader($name)), $this->LE); + $mime[] = sprintf("Content-Transfer-Encoding: %s%s", $encoding, $this->LE); + + if($disposition == 'inline') { + $mime[] = sprintf("Content-ID: <%s>%s", $cid, $this->LE); + } + + $mime[] = sprintf("Content-Disposition: %s; filename=\"%s\"%s", $disposition, $this->EncodeHeader($this->SecureHeader($name)), $this->LE.$this->LE); + + // Encode as string attachment + if($bString) { + $mime[] = $this->EncodeString($string, $encoding); + if($this->IsError()) { + return ''; + } + $mime[] = $this->LE.$this->LE; + } else { + $mime[] = $this->EncodeFile($path, $encoding); + if($this->IsError()) { + return ''; + } + $mime[] = $this->LE.$this->LE; + } + } + } + + $mime[] = sprintf("--%s--%s", $boundary, $this->LE); + + return implode("", $mime); + } + + /** + * Encodes attachment in requested format. + * Returns an empty string on failure. + * @param string $path The full path to the file + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @see EncodeFile() + * @access protected + * @return string + */ + protected function EncodeFile($path, $encoding = 'base64') { + try { + if (!is_readable($path)) { + throw new phpmailerException($this->Lang('file_open') . $path, self::STOP_CONTINUE); + } + if (function_exists('get_magic_quotes')) { + function get_magic_quotes() { + return false; + } + } + $magic_quotes = get_magic_quotes_runtime(); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime(0); + } else { + ini_set('magic_quotes_runtime', 0); + } + } + $file_buffer = file_get_contents($path); + $file_buffer = $this->EncodeString($file_buffer, $encoding); + if ($magic_quotes) { + if (version_compare(PHP_VERSION, '5.3.0', '<')) { + set_magic_quotes_runtime($magic_quotes); + } else { + ini_set('magic_quotes_runtime', $magic_quotes); + } + } + return $file_buffer; + } catch (Exception $e) { + $this->SetError($e->getMessage()); + return ''; + } + } + + /** + * Encodes string to requested format. + * Returns an empty string on failure. + * @param string $str The text to encode + * @param string $encoding The encoding to use; one of 'base64', '7bit', '8bit', 'binary', 'quoted-printable' + * @access public + * @return string + */ + public function EncodeString($str, $encoding = 'base64') { + $encoded = ''; + switch(strtolower($encoding)) { + case 'base64': + $encoded = chunk_split(base64_encode($str), 76, $this->LE); + break; + case '7bit': + case '8bit': + $encoded = $this->FixEOL($str); + //Make sure it ends with a line break + if (substr($encoded, -(strlen($this->LE))) != $this->LE) + $encoded .= $this->LE; + break; + case 'binary': + $encoded = $str; + break; + case 'quoted-printable': + $encoded = $this->EncodeQP($str); + break; + default: + $this->SetError($this->Lang('encoding') . $encoding); + break; + } + return $encoded; + } + + /** + * Encode a header string to best (shortest) of Q, B, quoted or none. + * @access public + * @return string + */ + public function EncodeHeader($str, $position = 'text') { + $x = 0; + + switch (strtolower($position)) { + case 'phrase': + if (!preg_match('/[\200-\377]/', $str)) { + // Can't use addslashes as we don't know what value has magic_quotes_sybase + $encoded = addcslashes($str, "\0..\37\177\\\""); + if (($str == $encoded) && !preg_match('/[^A-Za-z0-9!#$%&\'*+\/=?^_`{|}~ -]/', $str)) { + return ($encoded); + } else { + return ("\"$encoded\""); + } + } + $x = preg_match_all('/[^\040\041\043-\133\135-\176]/', $str, $matches); + break; + case 'comment': + $x = preg_match_all('/[()"]/', $str, $matches); + // Fall-through + case 'text': + default: + $x += preg_match_all('/[\000-\010\013\014\016-\037\177-\377]/', $str, $matches); + break; + } + + if ($x == 0) { + return ($str); + } + + $maxlen = 75 - 7 - strlen($this->CharSet); + // Try to select the encoding which should produce the shortest output + if (strlen($str)/3 < $x) { + $encoding = 'B'; + if (function_exists('mb_strlen') && $this->HasMultiBytes($str)) { + // Use a custom function which correctly encodes and wraps long + // multibyte strings without breaking lines within a character + $encoded = $this->Base64EncodeWrapMB($str); + } else { + $encoded = base64_encode($str); + $maxlen -= $maxlen % 4; + $encoded = trim(chunk_split($encoded, $maxlen, "\n")); + } + } else { + $encoding = 'Q'; + $encoded = $this->EncodeQ($str, $position); + $encoded = $this->WrapText($encoded, $maxlen, true); + $encoded = str_replace('='.$this->LE, "\n", trim($encoded)); + } + + $encoded = preg_replace('/^(.*)$/m', " =?".$this->CharSet."?$encoding?\\1?=", $encoded); + $encoded = trim(str_replace("\n", $this->LE, $encoded)); + + return $encoded; + } + + /** + * Checks if a string contains multibyte characters. + * @access public + * @param string $str multi-byte text to wrap encode + * @return bool + */ + public function HasMultiBytes($str) { + if (function_exists('mb_strlen')) { + return (strlen($str) > mb_strlen($str, $this->CharSet)); + } else { // Assume no multibytes (we can't handle without mbstring functions anyway) + return false; + } + } + + /** + * Correctly encodes and wraps long multibyte strings for mail headers + * without breaking lines within a character. + * Adapted from a function by paravoid at http://uk.php.net/manual/en/function.mb-encode-mimeheader.php + * @access public + * @param string $str multi-byte text to wrap encode + * @return string + */ + public function Base64EncodeWrapMB($str) { + $start = "=?".$this->CharSet."?B?"; + $end = "?="; + $encoded = ""; + + $mb_length = mb_strlen($str, $this->CharSet); + // Each line must have length <= 75, including $start and $end + $length = 75 - strlen($start) - strlen($end); + // Average multi-byte ratio + $ratio = $mb_length / strlen($str); + // Base64 has a 4:3 ratio + $offset = $avgLength = floor($length * $ratio * .75); + + for ($i = 0; $i < $mb_length; $i += $offset) { + $lookBack = 0; + + do { + $offset = $avgLength - $lookBack; + $chunk = mb_substr($str, $i, $offset, $this->CharSet); + $chunk = base64_encode($chunk); + $lookBack++; + } + while (strlen($chunk) > $length); + + $encoded .= $chunk . $this->LE; + } + + // Chomp the last linefeed + $encoded = substr($encoded, 0, -strlen($this->LE)); + return $encoded; + } + + /** + * Encode string to quoted-printable. + * Only uses standard PHP, slow, but will always work + * @access public + * @param string $string the text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @return string + */ + public function EncodeQPphp( $input = '', $line_max = 76, $space_conv = false) { + $hex = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'); + $lines = preg_split('/(?:\r\n|\r|\n)/', $input); + $eol = "\r\n"; + $escape = '='; + $output = ''; + while( list(, $line) = each($lines) ) { + $linlen = strlen($line); + $newline = ''; + for($i = 0; $i < $linlen; $i++) { + $c = substr( $line, $i, 1 ); + $dec = ord( $c ); + if ( ( $i == 0 ) && ( $dec == 46 ) ) { // convert first point in the line into =2E + $c = '=2E'; + } + if ( $dec == 32 ) { + if ( $i == ( $linlen - 1 ) ) { // convert space at eol only + $c = '=20'; + } else if ( $space_conv ) { + $c = '=20'; + } + } elseif ( ($dec == 61) || ($dec < 32 ) || ($dec > 126) ) { // always encode "\t", which is *not* required + $h2 = floor($dec/16); + $h1 = floor($dec%16); + $c = $escape.$hex[$h2].$hex[$h1]; + } + if ( (strlen($newline) + strlen($c)) >= $line_max ) { // CRLF is not counted + $output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay + $newline = ''; + // check if newline first character will be point or not + if ( $dec == 46 ) { + $c = '=2E'; + } + } + $newline .= $c; + } // end of for + $output .= $newline.$eol; + } // end of while + return $output; + } + + /** + * Encode string to RFC2045 (6.7) quoted-printable format + * Uses a PHP5 stream filter to do the encoding about 64x faster than the old version + * Also results in same content as you started with after decoding + * @see EncodeQPphp() + * @access public + * @param string $string the text to encode + * @param integer $line_max Number of chars allowed on a line before wrapping + * @param boolean $space_conv Dummy param for compatibility with existing EncodeQP function + * @return string + * @author Marcus Bointon + */ + public function EncodeQP($string, $line_max = 76, $space_conv = false) { + if (function_exists('quoted_printable_encode')) { //Use native function if it's available (>= PHP5.3) + return quoted_printable_encode($string); + } + $filters = stream_get_filters(); + if (!in_array('convert.*', $filters)) { //Got convert stream filter? + return $this->EncodeQPphp($string, $line_max, $space_conv); //Fall back to old implementation + } + $fp = fopen('php://temp/', 'r+'); + $string = preg_replace('/\r\n?/', $this->LE, $string); //Normalise line breaks + $params = array('line-length' => $line_max, 'line-break-chars' => $this->LE); + $s = stream_filter_append($fp, 'convert.quoted-printable-encode', STREAM_FILTER_READ, $params); + fputs($fp, $string); + rewind($fp); + $out = stream_get_contents($fp); + stream_filter_remove($s); + $out = preg_replace('/^\./m', '=2E', $out); //Encode . if it is first char on a line, workaround for bug in Exchange + fclose($fp); + return $out; + } + + /** + * Encode string to q encoding. + * @link http://tools.ietf.org/html/rfc2047 + * @param string $str the text to encode + * @param string $position Where the text is going to be used, see the RFC for what that means + * @access public + * @return string + */ + public function EncodeQ($str, $position = 'text') { + // There should not be any EOL in the string + $encoded = preg_replace('/[\r\n]*/', '', $str); + + switch (strtolower($position)) { + case 'phrase': + $encoded = preg_replace("/([^A-Za-z0-9!*+\/ -])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + break; + case 'comment': + $encoded = preg_replace("/([\(\)\"])/e", "'='.sprintf('%02X', ord('\\1'))", $encoded); + case 'text': + default: + // Replace every high ascii, control =, ? and _ characters + //TODO using /e (equivalent to eval()) is probably not a good idea + $encoded = preg_replace('/([\000-\011\013\014\016-\037\075\077\137\177-\377])/e', + "'='.sprintf('%02X', ord(stripslashes('\\1')))", $encoded); + break; + } + + // Replace every spaces to _ (more readable than =20) + $encoded = str_replace(' ', '_', $encoded); + + return $encoded; + } + + /** + * Adds a string or binary attachment (non-filesystem) to the list. + * This method can be used to attach ascii or binary data, + * such as a BLOB record from a database. + * @param string $string String attachment data. + * @param string $filename Name of the attachment. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return void + */ + public function AddStringAttachment($string, $filename, $encoding = 'base64', $type = 'application/octet-stream') { + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => 'attachment', + 7 => 0 + ); + } + + /** + * Adds an embedded attachment. This can include images, sounds, and + * just about any other document. Make sure to set the $type to an + * image type. For JPEG images use "image/jpeg" and for GIF images + * use "image/gif". + * @param string $path Path to the attachment. + * @param string $cid Content ID of the attachment. Use this to identify + * the Id for accessing the image in an HTML form. + * @param string $name Overrides the attachment name. + * @param string $encoding File encoding (see $Encoding). + * @param string $type File extension (MIME) type. + * @return bool + */ + public function AddEmbeddedImage($path, $cid, $name = '', $encoding = 'base64', $type = 'application/octet-stream') { + + if ( !@is_file($path) ) { + $this->SetError($this->Lang('file_access') . $path); + return false; + } + + $filename = basename($path); + if ( $name == '' ) { + $name = $filename; + } + + // Append to $attachment array + $this->attachment[] = array( + 0 => $path, + 1 => $filename, + 2 => $name, + 3 => $encoding, + 4 => $type, + 5 => false, // isStringAttachment + 6 => 'inline', + 7 => $cid + ); + + return true; + } + + public function AddStringEmbeddedImage($string, $cid, $filename = '', $encoding = 'base64', $type = 'application/octet-stream') { + // Append to $attachment array + $this->attachment[] = array( + 0 => $string, + 1 => $filename, + 2 => basename($filename), + 3 => $encoding, + 4 => $type, + 5 => true, // isStringAttachment + 6 => 'inline', + 7 => $cid + ); + } + + /** + * Returns true if an inline attachment is present. + * @access public + * @return bool + */ + public function InlineImageExists() { + foreach($this->attachment as $attachment) { + if ($attachment[6] == 'inline') { + return true; + } + } + return false; + } + + public function AttachmentExists() { + foreach($this->attachment as $attachment) { + if ($attachment[6] == 'attachment') { + return true; + } + } + return false; + } + + public function AlternativeExists() { + return strlen($this->AltBody)>0; + } + + ///////////////////////////////////////////////// + // CLASS METHODS, MESSAGE RESET + ///////////////////////////////////////////////// + + /** + * Clears all recipients assigned in the TO array. Returns void. + * @return void + */ + public function ClearAddresses() { + foreach($this->to as $to) { + unset($this->all_recipients[strtolower($to[0])]); + } + $this->to = array(); + } + + /** + * Clears all recipients assigned in the CC array. Returns void. + * @return void + */ + public function ClearCCs() { + foreach($this->cc as $cc) { + unset($this->all_recipients[strtolower($cc[0])]); + } + $this->cc = array(); + } + + /** + * Clears all recipients assigned in the BCC array. Returns void. + * @return void + */ + public function ClearBCCs() { + foreach($this->bcc as $bcc) { + unset($this->all_recipients[strtolower($bcc[0])]); + } + $this->bcc = array(); + } + + /** + * Clears all recipients assigned in the ReplyTo array. Returns void. + * @return void + */ + public function ClearReplyTos() { + $this->ReplyTo = array(); + } + + /** + * Clears all recipients assigned in the TO, CC and BCC + * array. Returns void. + * @return void + */ + public function ClearAllRecipients() { + $this->to = array(); + $this->cc = array(); + $this->bcc = array(); + $this->all_recipients = array(); + } + + /** + * Clears all previously set filesystem, string, and binary + * attachments. Returns void. + * @return void + */ + public function ClearAttachments() { + $this->attachment = array(); + } + + /** + * Clears all custom headers. Returns void. + * @return void + */ + public function ClearCustomHeaders() { + $this->CustomHeader = array(); + } + + ///////////////////////////////////////////////// + // CLASS METHODS, MISCELLANEOUS + ///////////////////////////////////////////////// + + /** + * Adds the error message to the error container. + * @access protected + * @return void + */ + protected function SetError($msg) { + $this->error_count++; + if ($this->Mailer == 'smtp' and !is_null($this->smtp)) { + $lasterror = $this->smtp->getError(); + if (!empty($lasterror) and array_key_exists('smtp_msg', $lasterror)) { + $msg .= '

' . $this->Lang('smtp_error') . $lasterror['smtp_msg'] . "

\n"; + } + } + $this->ErrorInfo = $msg; + } + + /** + * Returns the proper RFC 822 formatted date. + * @access public + * @return string + * @static + */ + public static function RFCDate() { + $tz = date('Z'); + $tzs = ($tz < 0) ? '-' : '+'; + $tz = abs($tz); + $tz = (int)($tz/3600)*100 + ($tz%3600)/60; + $result = sprintf("%s %s%04d", date('D, j M Y H:i:s'), $tzs, $tz); + + return $result; + } + + /** + * Returns the server hostname or 'localhost.localdomain' if unknown. + * @access protected + * @return string + */ + protected function ServerHostname() { + if (!empty($this->Hostname)) { + $result = $this->Hostname; + } elseif (isset($_SERVER['SERVER_NAME'])) { + $result = $_SERVER['SERVER_NAME']; + } else { + $result = 'localhost.localdomain'; + } + + return $result; + } + + /** + * Returns a message in the appropriate language. + * @access protected + * @return string + */ + protected function Lang($key) { + if(count($this->language) < 1) { + $this->SetLanguage('en'); // set the default language + } + + if(isset($this->language[$key])) { + return $this->language[$key]; + } else { + return 'Language string failed to load: ' . $key; + } + } + + /** + * Returns true if an error occurred. + * @access public + * @return bool + */ + public function IsError() { + return ($this->error_count > 0); + } + + /** + * Changes every end of line from CR or LF to CRLF. + * @access public + * @return string + */ + public function FixEOL($str) { + $str = str_replace("\r\n", "\n", $str); + $str = str_replace("\r", "\n", $str); + $str = str_replace("\n", $this->LE, $str); + return $str; + } + + /** + * Adds a custom header. + * @access public + * @return void + */ + public function AddCustomHeader($custom_header) { + $this->CustomHeader[] = explode(':', $custom_header, 2); + } + + /** + * Evaluates the message and returns modifications for inline images and backgrounds + * @access public + * @return $message + */ + public function MsgHTML($message, $basedir = '') { + preg_match_all("/(src|background)=[\"'](.*)[\"']/Ui", $message, $images); + if(isset($images[2])) { + foreach($images[2] as $i => $url) { + // do not change urls for absolute images (thanks to corvuscorax) + if (!preg_match('#^[A-z]+://#', $url)) { + $filename = basename($url); + $directory = dirname($url); + ($directory == '.') ? $directory='': ''; + $cid = 'cid:' . md5($filename); + $ext = pathinfo($filename, PATHINFO_EXTENSION); + $mimeType = self::_mime_types($ext); + if ( strlen($basedir) > 1 && substr($basedir, -1) != '/') { $basedir .= '/'; } + if ( strlen($directory) > 1 && substr($directory, -1) != '/') { $directory .= '/'; } + if ( $this->AddEmbeddedImage($basedir.$directory.$filename, md5($filename), $filename, 'base64', $mimeType) ) { + $message = preg_replace("/".$images[1][$i]."=[\"']".preg_quote($url, '/')."[\"']/Ui", $images[1][$i]."=\"".$cid."\"", $message); + } + } + } + } + $this->IsHTML(true); + $this->Body = $message; + if (empty($this->AltBody)) { + $textMsg = trim(strip_tags(preg_replace('/<(head|title|style|script)[^>]*>.*?<\/\\1>/s', '', $message))); + if (!empty($textMsg)) { + $this->AltBody = html_entity_decode($textMsg, ENT_QUOTES, $this->CharSet); + } + } + if (empty($this->AltBody)) { + $this->AltBody = 'To view this email message, open it in a program that understands HTML!' . "\n\n"; + } + return $message; + } + + /** + * Gets the MIME type of the embedded or inline image + * @param string File extension + * @access public + * @return string MIME type of ext + * @static + */ + public static function _mime_types($ext = '') { + $mimes = array( + 'hqx' => 'application/mac-binhex40', + 'cpt' => 'application/mac-compactpro', + 'doc' => 'application/msword', + 'bin' => 'application/macbinary', + 'dms' => 'application/octet-stream', + 'lha' => 'application/octet-stream', + 'lzh' => 'application/octet-stream', + 'exe' => 'application/octet-stream', + 'class' => 'application/octet-stream', + 'psd' => 'application/octet-stream', + 'so' => 'application/octet-stream', + 'sea' => 'application/octet-stream', + 'dll' => 'application/octet-stream', + 'oda' => 'application/oda', + 'pdf' => 'application/pdf', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + 'smi' => 'application/smil', + 'smil' => 'application/smil', + 'mif' => 'application/vnd.mif', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + 'wbxml' => 'application/vnd.wap.wbxml', + 'wmlc' => 'application/vnd.wap.wmlc', + 'dcr' => 'application/x-director', + 'dir' => 'application/x-director', + 'dxr' => 'application/x-director', + 'dvi' => 'application/x-dvi', + 'gtar' => 'application/x-gtar', + 'php' => 'application/x-httpd-php', + 'php4' => 'application/x-httpd-php', + 'php3' => 'application/x-httpd-php', + 'phtml' => 'application/x-httpd-php', + 'phps' => 'application/x-httpd-php-source', + 'js' => 'application/x-javascript', + 'swf' => 'application/x-shockwave-flash', + 'sit' => 'application/x-stuffit', + 'tar' => 'application/x-tar', + 'tgz' => 'application/x-tar', + 'xhtml' => 'application/xhtml+xml', + 'xht' => 'application/xhtml+xml', + 'zip' => 'application/zip', + 'mid' => 'audio/midi', + 'midi' => 'audio/midi', + 'mpga' => 'audio/mpeg', + 'mp2' => 'audio/mpeg', + 'mp3' => 'audio/mpeg', + 'aif' => 'audio/x-aiff', + 'aiff' => 'audio/x-aiff', + 'aifc' => 'audio/x-aiff', + 'ram' => 'audio/x-pn-realaudio', + 'rm' => 'audio/x-pn-realaudio', + 'rpm' => 'audio/x-pn-realaudio-plugin', + 'ra' => 'audio/x-realaudio', + 'rv' => 'video/vnd.rn-realvideo', + 'wav' => 'audio/x-wav', + 'bmp' => 'image/bmp', + 'gif' => 'image/gif', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'jpe' => 'image/jpeg', + 'png' => 'image/png', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'css' => 'text/css', + 'html' => 'text/html', + 'htm' => 'text/html', + 'shtml' => 'text/html', + 'txt' => 'text/plain', + 'text' => 'text/plain', + 'log' => 'text/plain', + 'rtx' => 'text/richtext', + 'rtf' => 'text/rtf', + 'xml' => 'text/xml', + 'xsl' => 'text/xml', + 'mpeg' => 'video/mpeg', + 'mpg' => 'video/mpeg', + 'mpe' => 'video/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + 'avi' => 'video/x-msvideo', + 'movie' => 'video/x-sgi-movie', + 'doc' => 'application/msword', + 'word' => 'application/msword', + 'xl' => 'application/excel', + 'eml' => 'message/rfc822' + ); + return (!isset($mimes[strtolower($ext)])) ? 'application/octet-stream' : $mimes[strtolower($ext)]; + } + + /** + * Set (or reset) Class Objects (variables) + * + * Usage Example: + * $page->set('X-Priority', '3'); + * + * @access public + * @param string $name Parameter Name + * @param mixed $value Parameter Value + * NOTE: will not work with arrays, there are no arrays to set/reset + * @todo Should this not be using __set() magic function? + */ + public function set($name, $value = '') { + try { + if (isset($this->$name) ) { + $this->$name = $value; + } else { + throw new phpmailerException($this->Lang('variable_set') . $name, self::STOP_CRITICAL); + } + } catch (Exception $e) { + $this->SetError($e->getMessage()); + if ($e->getCode() == self::STOP_CRITICAL) { + return false; + } + } + return true; + } + + /** + * Strips newlines to prevent header injection. + * @access public + * @param string $str String + * @return string + */ + public function SecureHeader($str) { + $str = str_replace("\r", '', $str); + $str = str_replace("\n", '', $str); + return trim($str); + } + + /** + * Set the private key file and password to sign the message. + * + * @access public + * @param string $key_filename Parameter File Name + * @param string $key_pass Password for private key + */ + public function Sign($cert_filename, $key_filename, $key_pass) { + $this->sign_cert_file = $cert_filename; + $this->sign_key_file = $key_filename; + $this->sign_key_pass = $key_pass; + } + + /** + * Set the private key file and password to sign the message. + * + * @access public + * @param string $key_filename Parameter File Name + * @param string $key_pass Password for private key + */ + public function DKIM_QP($txt) { + $tmp = ''; + $line = ''; + for ($i = 0; $i < strlen($txt); $i++) { + $ord = ord($txt[$i]); + if ( ((0x21 <= $ord) && ($ord <= 0x3A)) || $ord == 0x3C || ((0x3E <= $ord) && ($ord <= 0x7E)) ) { + $line .= $txt[$i]; + } else { + $line .= "=".sprintf("%02X", $ord); + } + } + return $line; + } + + /** + * Generate DKIM signature + * + * @access public + * @param string $s Header + */ + public function DKIM_Sign($s) { + $privKeyStr = file_get_contents($this->DKIM_private); + if ($this->DKIM_passphrase != '') { + $privKey = openssl_pkey_get_private($privKeyStr, $this->DKIM_passphrase); + } else { + $privKey = $privKeyStr; + } + if (openssl_sign($s, $signature, $privKey)) { + return base64_encode($signature); + } + } + + /** + * Generate DKIM Canonicalization Header + * + * @access public + * @param string $s Header + */ + public function DKIM_HeaderC($s) { + $s = preg_replace("/\r\n\s+/", " ", $s); + $lines = explode("\r\n", $s); + foreach ($lines as $key => $line) { + list($heading, $value) = explode(":", $line, 2); + $heading = strtolower($heading); + $value = preg_replace("/\s+/", " ", $value) ; // Compress useless spaces + $lines[$key] = $heading.":".trim($value) ; // Don't forget to remove WSP around the value + } + $s = implode("\r\n", $lines); + return $s; + } + + /** + * Generate DKIM Canonicalization Body + * + * @access public + * @param string $body Message Body + */ + public function DKIM_BodyC($body) { + if ($body == '') return "\r\n"; + // stabilize line endings + $body = str_replace("\r\n", "\n", $body); + $body = str_replace("\n", "\r\n", $body); + // END stabilize line endings + while (substr($body, strlen($body) - 4, 4) == "\r\n\r\n") { + $body = substr($body, 0, strlen($body) - 2); + } + return $body; + } + + /** + * Create the DKIM header, body, as new header + * + * @access public + * @param string $headers_line Header lines + * @param string $subject Subject + * @param string $body Body + */ + public function DKIM_Add($headers_line, $subject, $body) { + $DKIMsignatureType = 'rsa-sha1'; // Signature & hash algorithms + $DKIMcanonicalization = 'relaxed/simple'; // Canonicalization of header/body + $DKIMquery = 'dns/txt'; // Query method + $DKIMtime = time() ; // Signature Timestamp = seconds since 00:00:00 - Jan 1, 1970 (UTC time zone) + $subject_header = "Subject: $subject"; + $headers = explode($this->LE, $headers_line); + foreach($headers as $header) { + if (strpos($header, 'From:') === 0) { + $from_header = $header; + } elseif (strpos($header, 'To:') === 0) { + $to_header = $header; + } + } + $from = str_replace('|', '=7C', $this->DKIM_QP($from_header)); + $to = str_replace('|', '=7C', $this->DKIM_QP($to_header)); + $subject = str_replace('|', '=7C', $this->DKIM_QP($subject_header)) ; // Copied header fields (dkim-quoted-printable + $body = $this->DKIM_BodyC($body); + $DKIMlen = strlen($body) ; // Length of body + $DKIMb64 = base64_encode(pack("H*", sha1($body))) ; // Base64 of packed binary SHA-1 hash of body + $ident = ($this->DKIM_identity == '')? '' : " i=" . $this->DKIM_identity . ";"; + $dkimhdrs = "DKIM-Signature: v=1; a=" . $DKIMsignatureType . "; q=" . $DKIMquery . "; l=" . $DKIMlen . "; s=" . $this->DKIM_selector . ";\r\n". + "\tt=" . $DKIMtime . "; c=" . $DKIMcanonicalization . ";\r\n". + "\th=From:To:Subject;\r\n". + "\td=" . $this->DKIM_domain . ";" . $ident . "\r\n". + "\tz=$from\r\n". + "\t|$to\r\n". + "\t|$subject;\r\n". + "\tbh=" . $DKIMb64 . ";\r\n". + "\tb="; + $toSign = $this->DKIM_HeaderC($from_header . "\r\n" . $to_header . "\r\n" . $subject_header . "\r\n" . $dkimhdrs); + $signed = $this->DKIM_Sign($toSign); + return "X-PHPMAILER-DKIM: phpmailer.worxware.com\r\n".$dkimhdrs.$signed."\r\n"; + } + + protected function doCallback($isSent, $to, $cc, $bcc, $subject, $body) { + if (!empty($this->action_function) && function_exists($this->action_function)) { + $params = array($isSent, $to, $cc, $bcc, $subject, $body); + call_user_func_array($this->action_function, $params); + } + } +} + +class phpmailerException extends Exception { + public function errorMessage() { + $errorMsg = '' . $this->getMessage() . "
\n"; + return $errorMsg; + } +} + +/*~ class.smtp.php +.---------------------------------------------------------------------------. +| Software: PHPMailer - PHP email class | +| Version: 5.2.1 | +| Site: https://code.google.com/a/apache-extras.org/p/phpmailer/ | +| ------------------------------------------------------------------------- | +| Admin: Jim Jagielski (project admininistrator) | +| Authors: Andy Prevost (codeworxtech) codeworxtech@users.sourceforge.net | +| : Marcus Bointon (coolbru) coolbru@users.sourceforge.net | +| : Jim Jagielski (jimjag) jimjag@gmail.com | +| Founder: Brent R. Matzelle (original founder) | +| Copyright (c) 2010-2012, Jim Jagielski. All Rights Reserved. | +| Copyright (c) 2004-2009, Andy Prevost. All Rights Reserved. | +| Copyright (c) 2001-2003, Brent R. Matzelle | +| ------------------------------------------------------------------------- | +| License: Distributed under the Lesser General Public License (LGPL) | +| http://www.gnu.org/copyleft/lesser.html | +| This program is distributed in the hope that it will be useful - WITHOUT | +| ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | +| FITNESS FOR A PARTICULAR PURPOSE. | +'---------------------------------------------------------------------------' +*/ + +/** + * PHPMailer - PHP SMTP email transport class + * NOTE: Designed for use with PHP version 5 and up + * @package PHPMailer + * @author Andy Prevost + * @author Marcus Bointon + * @copyright 2004 - 2008 Andy Prevost + * @author Jim Jagielski + * @copyright 2010 - 2012 Jim Jagielski + * @license http://www.gnu.org/copyleft/lesser.html Distributed under the Lesser General Public License (LGPL) + * @version $Id: class.smtp.php 450 2010-06-23 16:46:33Z coolbru $ + */ + +/** + * SMTP is rfc 821 compliant and implements all the rfc 821 SMTP + * commands except TURN which will always return a not implemented + * error. SMTP also provides some utility methods for sending mail + * to an SMTP server. + * original author: Chris Ryan + */ + +class SMTP { + /** + * SMTP server port + * @var int + */ + public $SMTP_PORT = 25; + + /** + * SMTP reply line ending + * @var string + */ + public $CRLF = "\r\n"; + + /** + * Sets whether debugging is turned on + * @var bool + */ + public $do_debug; // the level of debug to perform + + /** + * Sets VERP use on/off (default is off) + * @var bool + */ + public $do_verp = false; + + /** + * Sets the SMTP PHPMailer Version number + * @var string + */ + public $Version = '5.2.1'; + + ///////////////////////////////////////////////// + // PROPERTIES, PRIVATE AND PROTECTED + ///////////////////////////////////////////////// + + private $smtp_conn; // the socket to the server + private $error; // error if any on the last call + private $helo_rply; // the reply the server sent to us for HELO + + /** + * Initialize the class so that the data is in a known state. + * @access public + * @return void + */ + public function __construct() { + $this->smtp_conn = 0; + $this->error = null; + $this->helo_rply = null; + + $this->do_debug = 0; + } + + ///////////////////////////////////////////////// + // CONNECTION FUNCTIONS + ///////////////////////////////////////////////// + + /** + * Connect to the server specified on the port specified. + * If the port is not specified use the default SMTP_PORT. + * If tval is specified then a connection will try and be + * established with the server for that number of seconds. + * If tval is not specified the default is 30 seconds to + * try on the connection. + * + * SMTP CODE SUCCESS: 220 + * SMTP CODE FAILURE: 421 + * @access public + * @return bool + */ + public function Connect($host, $port = 0, $tval = 30) { + // set the error val to null so there is no confusion + $this->error = null; + + // make sure we are __not__ connected + if($this->connected()) { + // already connected, generate error + $this->error = array("error" => "Already connected to a server"); + return false; + } + + if(empty($port)) { + $port = $this->SMTP_PORT; + } + + // connect to the smtp server + $this->smtp_conn = @fsockopen($host, // the host of the server + $port, // the port to use + $errno, // error number if any + $errstr, // error message if any + $tval); // give up after ? secs + // verify we connected properly + if(empty($this->smtp_conn)) { + $this->error = array("error" => "Failed to connect to server", + "errno" => $errno, + "errstr" => $errstr); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": $errstr ($errno)" . $this->CRLF . '
'; + } + return false; + } + + // SMTP server can take longer to respond, give longer timeout for first read + // Windows does not have support for this timeout function + if(substr(PHP_OS, 0, 3) != "WIN") + socket_set_timeout($this->smtp_conn, $tval, 0); + + // get any announcement + $announce = $this->get_lines(); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $announce . $this->CRLF . '
'; + } + + return true; + } + + /** + * Initiate a TLS communication with the server. + * + * SMTP CODE 220 Ready to start TLS + * SMTP CODE 501 Syntax error (no parameters allowed) + * SMTP CODE 454 TLS not available due to temporary reason + * @access public + * @return bool success + */ + public function StartTLS() { + $this->error = null; # to avoid confusion + + if(!$this->connected()) { + $this->error = array("error" => "Called StartTLS() without being connected"); + return false; + } + + fputs($this->smtp_conn,"STARTTLS" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 220) { + $this->error = + array("error" => "STARTTLS not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + // Begin encrypted connection + if(!stream_socket_enable_crypto($this->smtp_conn, true, STREAM_CRYPTO_METHOD_TLS_CLIENT)) { + return false; + } + + return true; + } + + /** + * Performs SMTP authentication. Must be run after running the + * Hello() method. Returns true if successfully authenticated. + * @access public + * @return bool + */ + public function Authenticate($username, $password) { + // Start authentication + fputs($this->smtp_conn,"AUTH LOGIN" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "AUTH not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + // Send encoded username + fputs($this->smtp_conn, base64_encode($username) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 334) { + $this->error = + array("error" => "Username not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + // Send encoded password + fputs($this->smtp_conn, base64_encode($password) . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($code != 235) { + $this->error = + array("error" => "Password not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + return true; + } + + /** + * Returns true if connected to a server otherwise false + * @access public + * @return bool + */ + public function Connected() { + if(!empty($this->smtp_conn)) { + $sock_status = socket_get_status($this->smtp_conn); + if($sock_status["eof"]) { + // the socket is valid but we are not connected + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE:" . $this->CRLF . "EOF caught while checking if connected"; + } + $this->Close(); + return false; + } + return true; // everything looks good + } + return false; + } + + /** + * Closes the socket and cleans up the state of the class. + * It is not considered good to use this function without + * first trying to use QUIT. + * @access public + * @return void + */ + public function Close() { + $this->error = null; // so there is no confusion + $this->helo_rply = null; + if(!empty($this->smtp_conn)) { + // close the connection and cleanup + fclose($this->smtp_conn); + $this->smtp_conn = 0; + } + } + + ///////////////////////////////////////////////// + // SMTP COMMANDS + ///////////////////////////////////////////////// + + /** + * Issues a data command and sends the msg_data to the server + * finializing the mail transaction. $msg_data is the message + * that is to be send with the headers. Each header needs to be + * on a single line followed by a with the message headers + * and the message body being seperated by and additional . + * + * Implements rfc 821: DATA + * + * SMTP CODE INTERMEDIATE: 354 + * [data] + * . + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 552,554,451,452 + * SMTP CODE FAILURE: 451,554 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + public function Data($msg_data) { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Data() without being connected"); + return false; + } + + fputs($this->smtp_conn,"DATA" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 354) { + $this->error = + array("error" => "DATA command not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + /* the server is ready to accept data! + * according to rfc 821 we should not send more than 1000 + * including the CRLF + * characters on a single line so we will break the data up + * into lines by \r and/or \n then if needed we will break + * each of those into smaller lines to fit within the limit. + * in addition we will be looking for lines that start with + * a period '.' and append and additional period '.' to that + * line. NOTE: this does not count towards limit. + */ + + // normalize the line breaks so we know the explode works + $msg_data = str_replace("\r\n","\n",$msg_data); + $msg_data = str_replace("\r","\n",$msg_data); + $lines = explode("\n",$msg_data); + + /* we need to find a good way to determine is headers are + * in the msg_data or if it is a straight msg body + * currently I am assuming rfc 822 definitions of msg headers + * and if the first field of the first line (':' sperated) + * does not contain a space then it _should_ be a header + * and we can process all lines before a blank "" line as + * headers. + */ + + $field = substr($lines[0],0,strpos($lines[0],":")); + $in_headers = false; + if(!empty($field) && !strstr($field," ")) { + $in_headers = true; + } + + $max_line_length = 998; // used below; set here for ease in change + + while(list(,$line) = @each($lines)) { + $lines_out = null; + if($line == "" && $in_headers) { + $in_headers = false; + } + // ok we need to break this line up into several smaller lines + while(strlen($line) > $max_line_length) { + $pos = strrpos(substr($line,0,$max_line_length)," "); + + // Patch to fix DOS attack + if(!$pos) { + $pos = $max_line_length - 1; + $lines_out[] = substr($line,0,$pos); + $line = substr($line,$pos); + } else { + $lines_out[] = substr($line,0,$pos); + $line = substr($line,$pos + 1); + } + + /* if processing headers add a LWSP-char to the front of new line + * rfc 822 on long msg headers + */ + if($in_headers) { + $line = "\t" . $line; + } + } + $lines_out[] = $line; + + // send the lines to the server + while(list(,$line_out) = @each($lines_out)) { + if(strlen($line_out) > 0) + { + if(substr($line_out, 0, 1) == ".") { + $line_out = "." . $line_out; + } + } + fputs($this->smtp_conn,$line_out . $this->CRLF); + } + } + + // message data has been sent + fputs($this->smtp_conn, $this->CRLF . "." . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 250) { + $this->error = + array("error" => "DATA not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + return true; + } + + /** + * Sends the HELO command to the smtp server. + * This makes sure that we and the server are in + * the same known state. + * + * Implements from rfc 821: HELO + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500, 501, 504, 421 + * @access public + * @return bool + */ + public function Hello($host = '') { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Hello() without being connected"); + return false; + } + + // if hostname for HELO was not specified send default + if(empty($host)) { + // determine appropriate default to send to server + $host = "localhost"; + } + + // Send extended hello first (RFC 2821) + if(!$this->SendHello("EHLO", $host)) { + if(!$this->SendHello("HELO", $host)) { + return false; + } + } + + return true; + } + + /** + * Sends a HELO/EHLO command. + * @access private + * @return bool + */ + private function SendHello($hello, $host) { + fputs($this->smtp_conn, $hello . " " . $host . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER: " . $rply . $this->CRLF . '
'; + } + + if($code != 250) { + $this->error = + array("error" => $hello . " not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + $this->helo_rply = $rply; + + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. + * + * Implements rfc 821: MAIL FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,421 + * @access public + * @return bool + */ + public function Mail($from) { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Mail() without being connected"); + return false; + } + + $useVerp = ($this->do_verp ? "XVERP" : ""); + fputs($this->smtp_conn,"MAIL FROM:<" . $from . ">" . $useVerp . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 250) { + $this->error = + array("error" => "MAIL not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + return true; + } + + /** + * Sends the quit command to the server and then closes the socket + * if there is no error or the $close_on_error argument is true. + * + * Implements from rfc 821: QUIT + * + * SMTP CODE SUCCESS: 221 + * SMTP CODE ERROR : 500 + * @access public + * @return bool + */ + public function Quit($close_on_error = true) { + $this->error = null; // so there is no confusion + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Quit() without being connected"); + return false; + } + + // send the quit command to the server + fputs($this->smtp_conn,"quit" . $this->CRLF); + + // get any good-bye messages + $byemsg = $this->get_lines(); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $byemsg . $this->CRLF . '
'; + } + + $rval = true; + $e = null; + + $code = substr($byemsg,0,3); + if($code != 221) { + // use e as a tmp var cause Close will overwrite $this->error + $e = array("error" => "SMTP server rejected quit command", + "smtp_code" => $code, + "smtp_rply" => substr($byemsg,4)); + $rval = false; + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $e["error"] . ": " . $byemsg . $this->CRLF . '
'; + } + } + + if(empty($e) || $close_on_error) { + $this->Close(); + } + + return $rval; + } + + /** + * Sends the command RCPT to the SMTP server with the TO: argument of $to. + * Returns true if the recipient was accepted false if it was rejected. + * + * Implements from rfc 821: RCPT TO: + * + * SMTP CODE SUCCESS: 250,251 + * SMTP CODE FAILURE: 550,551,552,553,450,451,452 + * SMTP CODE ERROR : 500,501,503,421 + * @access public + * @return bool + */ + public function Recipient($to) { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Recipient() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RCPT TO:<" . $to . ">" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 250 && $code != 251) { + $this->error = + array("error" => "RCPT not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + return true; + } + + /** + * Sends the RSET command to abort and transaction that is + * currently in progress. Returns true if successful false + * otherwise. + * + * Implements rfc 821: RSET + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE ERROR : 500,501,504,421 + * @access public + * @return bool + */ + public function Reset() { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called Reset() without being connected"); + return false; + } + + fputs($this->smtp_conn,"RSET" . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 250) { + $this->error = + array("error" => "RSET failed", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + + return true; + } + + /** + * Starts a mail transaction from the email address specified in + * $from. Returns true if successful or false otherwise. If True + * the mail transaction is started and then one or more Recipient + * commands may be called followed by a Data command. This command + * will send the message to the users terminal if they are logged + * in and send them an email. + * + * Implements rfc 821: SAML FROM: + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE SUCCESS: 552,451,452 + * SMTP CODE SUCCESS: 500,501,502,421 + * @access public + * @return bool + */ + public function SendAndMail($from) { + $this->error = null; // so no confusion is caused + + if(!$this->connected()) { + $this->error = array( + "error" => "Called SendAndMail() without being connected"); + return false; + } + + fputs($this->smtp_conn,"SAML FROM:" . $from . $this->CRLF); + + $rply = $this->get_lines(); + $code = substr($rply,0,3); + + if($this->do_debug >= 2) { + echo "SMTP -> FROM SERVER:" . $rply . $this->CRLF . '
'; + } + + if($code != 250) { + $this->error = + array("error" => "SAML not accepted from server", + "smtp_code" => $code, + "smtp_msg" => substr($rply,4)); + if($this->do_debug >= 1) { + echo "SMTP -> ERROR: " . $this->error["error"] . ": " . $rply . $this->CRLF . '
'; + } + return false; + } + return true; + } + + /** + * This is an optional command for SMTP that this class does not + * support. This method is here to make the RFC821 Definition + * complete for this class and __may__ be implimented in the future + * + * Implements from rfc 821: TURN + * + * SMTP CODE SUCCESS: 250 + * SMTP CODE FAILURE: 502 + * SMTP CODE ERROR : 500, 503 + * @access public + * @return bool + */ + public function Turn() { + $this->error = array("error" => "This method, TURN, of the SMTP ". + "is not implemented"); + if($this->do_debug >= 1) { + echo "SMTP -> NOTICE: " . $this->error["error"] . $this->CRLF . '
'; + } + return false; + } + + /** + * Get the current error + * @access public + * @return array + */ + public function getError() { + return $this->error; + } + + ///////////////////////////////////////////////// + // INTERNAL FUNCTIONS + ///////////////////////////////////////////////// + + /** + * Read in as many lines as possible + * either before eof or socket timeout occurs on the operation. + * With SMTP we can tell if we have more lines to read if the + * 4th character is '-' symbol. If it is a space then we don't + * need to read anything else. + * @access private + * @return string + */ + private function get_lines() { + $data = ""; + while(!feof($this->smtp_conn)) { + $str = @fgets($this->smtp_conn,515); + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data was \"$data\"" . $this->CRLF . '
'; + echo "SMTP -> get_lines(): \$str is \"$str\"" . $this->CRLF . '
'; + } + $data .= $str; + if($this->do_debug >= 4) { + echo "SMTP -> get_lines(): \$data is \"$data\"" . $this->CRLF . '
'; + } + // if 4th character is a space, we are done reading, break the loop + if(substr($str,3,1) == " ") { break; } + } + return $data; + } + +} diff --git a/src/bb-library/Box/Mod.php b/src/bb-library/Box/Mod.php new file mode 100644 index 000000000..250293a92 --- /dev/null +++ b/src/bb-library/Box/Mod.php @@ -0,0 +1,270 @@ +mod = strtolower($mod); + } + + public function setDi($di) + { + $this->di = $di; + } + + public function hasManifest() + { + return file_exists($this->_getModPath() . 'manifest.json'); + } + + public function getManifest() + { + if(!$this->hasManifest()) { + throw new \Box_Exception('Module :mod manifest file is missing', array(':mod'=>$this->mod), 5897); + } + $file = $this->_getModPath() . 'manifest.json'; + $json = json_decode(file_get_contents($file), true); + if(empty ($json)) { + throw new \Box_Exception('Module :mod manifest file is not valid. Check file syntax and permissions.', array(':mod'=>$this->mod)); + } + + //default module info if some fields are missing + $info = array( + 'id' => $this->mod, + 'type' => 'mod', + 'name' => $this->mod, + 'description' => NULL, + 'homepage_url' => 'https://github.com/boxbilling/', + 'author' => 'BoxBilling', + 'author_url' => 'https://extensions.boxbilling.com/', + 'license' => 'GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html', + 'version' => '1.0', + 'icon_url' => NULL, + 'download_url' => NULL, + 'project_url' => 'https://extensions.boxbilling.com/', + "minimum_boxbilling_version" => NULL, + "maximum_boxbilling_version" => NULL, + ); + + $info = array_merge($info, $json); + $info['id'] = $this->mod; + $info['type'] = 'mod'; + + if(!empty($info['icon_url'])) { + $info['icon_url'] = $this->di['url']->get('bb-modules/'.ucfirst($this->mod).'/'.$info['icon_url']); + } + + return $info; + } + + public function hasService($sub = '') + { + $filename = sprintf('Service%s.php', $sub); + return file_exists($this->_getModPath() . $filename); + } + + public function getService($sub = '') + { + if(!$this->hasService($sub)) { + throw new \Box_Exception('Module :mod does not have service class', array(':mod'=>$this->mod), 5898); + } + $class = 'Box\\Mod\\'.ucfirst($this->mod).'\\Service'.$sub; + $service = new $class(); + if(method_exists($service, 'setDi')) { + $service->setDi($this->di); + } + return $service; + } + + public function hasClientController() + { + return file_exists($this->_getModPath() . 'Controller/Client.php'); + } + + public function getClientController() + { + if(!$this->hasClientController()) { + throw new \Box_Exception('Module :mod Client controller class was not found', array(':mod'=>$this->mod)); + } + + $class = 'Box\\Mod\\'.ucfirst($this->mod).'\\Controller\\Client'; + $service = new $class(); + if(method_exists($service, 'setDi')) { + $service->setDi($this->di); + } + return $service; + } + + public function hasSettingsPage() + { + return file_exists($this->_getModPath() . 'html_admin/mod_'.$this->mod.'_settings.phtml'); + } + + public function hasAdminController() + { + return file_exists($this->_getModPath() . 'Controller/Admin.php'); + } + + public function getAdminController() + { + if(!$this->hasAdminController()) { + throw new \Box_Exception('Module :mod Admin controller class was not found', array(':mod'=>$this->mod)); + } + $class = 'Box\\Mod\\'.ucfirst($this->mod).'\\Controller\\Admin'; + $service = new $class(); + if(method_exists($service, 'setDi')) { + $service->setDi($this->di); + } + return $service; + } + + public function install() + { + if($this->isCore()) { + return true; + } + + if($this->hasService()) { + $s = $this->getService(); + if(method_exists($s, 'install')) { + $s->install(); + return true; + } + } + + return false; + } + + public function uninstall() + { + if($this->isCore()) { + return true; + } + + if($this->hasService()) { + $s = $this->getService(); + if(method_exists($s, 'uninstall')) { + $s->uninstall(); + return true; + } + } + return false; + } + + public function update() + { + if($this->isCore()) { + throw new \Box_Exception('Core module can not be updated'); + } + + if($this->hasService()) { + $s = $this->getService(); + if(method_exists($s, 'update')) { + $manifest = $this->getManifest(); + $s->update($manifest); + return true; + } + } + return false; + } + + public function getCoreModules() + { + return $this->core; + } + + public function isCore() + { + return in_array($this->mod, $this->core); + } + + public function getConfig() + { + $db = $this->di['db']; + $bb_config = $this->di['config']; + $config = array(); + + $modName = 'mod_'.strtolower($this->mod); + $c = $db->findOne('extension_meta', 'extension = :ext AND meta_key = :key', array(':ext'=>$modName, ':key'=>'config')); + if($c) { + $config = $this->di['crypt']->decrypt($c->meta_value, $bb_config['salt']); + $config = $this->di['tools']->decodeJ($config); + } + return $config; + } + + public function getName() + { + return $this->mod; + } + + public function registerClientRoutes(Box_App &$app) + { + if($this->hasClientController()) { + $cc = $this->getClientController(); + if(method_exists($cc, 'register')) { + $cc->register($app); + return true; + } + } + return false; + } + + private function _getModPath() + { + return BB_PATH_MODS . DIRECTORY_SEPARATOR . ucfirst($this->mod) . DIRECTORY_SEPARATOR; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Pagination.php b/src/bb-library/Box/Pagination.php new file mode 100644 index 000000000..a1237b13a --- /dev/null +++ b/src/bb-library/Box/Pagination.php @@ -0,0 +1,84 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + /** + * @return int + */ + public function getPer_page() + { + return $this->per_page; + } + + public function getSimpleResultSet($q, $values, $per_page = 100) + { + $page = $this->di['request']->getQuery('page', "int", 1); + $per_page = $this->di['request']->getQuery('per_page', "int", $per_page); + + $offset = ($page - 1) * $per_page; + + $sql = $q; + $sql .= sprintf(' LIMIT %s,%s', $offset, $per_page); + $result = $this->di['db']->getAll($sql, $values); + + $exploded = explode('FROM', $q); + $sql = 'SELECT count(1) FROM ' . $exploded[1]; + $total = $this->di['db']->getCell($sql , $values); + + $pages = ($per_page > 1) ? (int)ceil($total / $per_page) : 1; + return array( + "pages" => $pages, + "page" => $page, + "per_page" => $per_page, + "total" => $total, + "list" => $result, + ); + } + + public function getAdvancedResultSet($q, $values, $per_page = 100) + { + $page = $this->di['request']->getQuery('page', "int", 1); + $per_page = $this->di['request']->getQuery('per_page', "int", $per_page); + + $offset = ($page - 1) * $per_page; + $q = str_replace('SELECT ', 'SELECT SQL_CALC_FOUND_ROWS ', $q); + $q .= sprintf(' LIMIT %s,%s', $offset, $per_page); + $result = $this->di['db']->getAll($q, $values); + $total = $this->di['db']->getCell('SELECT FOUND_ROWS();'); + + $pages = ($per_page > 1) ? (int)ceil($total / $per_page) : 1; + return array( + "pages" => $pages, + "page" => $page, + "per_page" => $per_page, + "total" => $total, + "list" => $result, + ); + } +} diff --git a/src/bb-library/Box/Paginator.php b/src/bb-library/Box/Paginator.php new file mode 100644 index 000000000..03ec6e373 --- /dev/null +++ b/src/bb-library/Box/Paginator.php @@ -0,0 +1,228 @@ + + * @www.inchoo.net + */ +class Box_Paginator { + + /** + * @var int current displayed page + */ + protected $currentPage; + + /** + * @var int items limit (items per page) + */ + protected $limit; + + /** + * @var int total number of pages + */ + protected $numPages; + + /** + * @var int items limit (items per page) + */ + protected $itemsCount; + + /** + * @var int offset + */ + protected $offset; + + /** + * @var int pages to show at left and right of current page + */ + protected $midRange; + + /** + * @var array range + */ + protected $range; + + /** + * @param int $itemsCount + * @param int $currentPage + * @param int $limit + * @param int $midRange + */ + function __construct($itemsCount = 0, $currentPage = 1, $limit = 20, $midRange = 7) + { + //set total items count from controller + $this->itemsCount = $itemsCount; + $this->currentPage = $currentPage; + $this->limit = $limit; + $this->midRange= $midRange; + + //Set defaults + $this->setDefaults(); + + //Calculate number of pages total + $this->getInternalNumPages(); + + //Calculate first shown item on current page + $this->calculateOffset(); + $this->calculateRange(); + } + + private function calculateRange() + { + $startRange = $this->currentPage - floor($this->midRange/2); + $endRange = $this->currentPage + floor($this->midRange/2); + + if($startRange <= 0) + { + $endRange += abs($startRange)+1; + $startRange = 1; + } + + if($endRange > $this->numPages) + { + $startRange -= $endRange-$this->numPages; + $endRange = $this->numPages; + } + + $this->range = range($startRange, $endRange); + } + + private function setDefaults() + { + //If currentPage is set to null or is set to 0 or less + //set it to default (1) + if ($this->currentPage == null || $this->currentPage < 1) + { + $this->currentPage = 1; + } + //if limit is set to null set it to default (20) + if ($this->limit == null) + { + $this->limit = 20; + //if limit is any number less than 1 then set it to 0 for displaying + //items without limit + } + else if ($this->limit < 1) + { + $this->limit = 0; + } + } + + private function getInternalNumPages() + { + //If limit is set to 0 or set to number bigger then total items count + //display all in one page + if ($this->limit < 1 || $this->limit > $this->itemsCount) + { + $this->numPages = 1; + } + else + { + //Calculate rest numbers from dividing operation so we can add one + //more page for this items + $restItemsNum = $this->itemsCount % $this->limit; + //if rest items > 0 then add one more page else just divide items + //by limit + $this->numPages = $restItemsNum > 0 ? intval($this->itemsCount / $this->limit) + 1 : intval($this->itemsCount / $this->limit); + } + } + + private function calculateOffset() + { + //Calculet offset for items based on current page number + $this->offset = ($this->currentPage - 1) * $this->limit; + } + + /** + * @return int number of pages + */ + public function getNumPages() + { + return $this->numPages; + } + + /** + * @return int current page + */ + public function getCurrentPage() + { + return $this->currentPage; + } + + /** + * @return string current url + */ + public function getCurrentUrl() + { + return $this->currentUrl; + } + + /** + * @return int limit items per page + */ + public function getLimit() + { + return $this->limit; + } + + /** + * @return int offset + */ + public function getOffset() + { + return $this->offset; + } + + /** + * @return array range + */ + public function getRange() + { + return $this->range; + } + + /** + * @return int mid range + */ + public function getMidRange() + { + return $this->midRange; + } + + public function getStartingPoint() + { + $arr = $this->getRange(); + return reset($arr); + } + + public function getEndingPoint() + { + $arr = $this->getRange(); + return end($arr); + } + + public function toArray() + { + return array( + 'currentpage' => $this->getCurrentPage(), + 'numpages' => $this->getNumPages(), + 'midrange' => $this->getMidRange(), + 'range' => $this->getRange(), + 'start' => $this->getStartingPoint(), + 'end' => $this->getEndingPoint(), + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Period.php b/src/bb-library/Box/Period.php new file mode 100644 index 000000000..53dedce28 --- /dev/null +++ b/src/bb-library/Box/Period.php @@ -0,0 +1,201 @@ + 1, + self::PERIOD_QUARTER => 3, + self::PERIOD_BIANNUAL => 6, + self::PERIOD_ANNUAL => 12, + self::PERIOD_BIENNIAL => 24, + self::PERIOD_TRIENNIAL => 36, + ); + + private $unit, $qty; + + public function __construct($code) + { + if(strlen($code) != 2) { + throw new \Box_Exception("Invalid period code. Period definition must be 2 chars length"); + } + + list($qty, $unit) = str_split($code); + + $units = $this->getUnits(); + $qty = (int)$qty; + $unit = strtoupper($unit); + if(!array_key_exists($unit, $units)) { + throw new \Box_Exception("Period Error. Unit :unit is not defined", array(':unit'=>$unit)); + } + + if($qty < $units[$unit][0] || $qty > $units[$unit][1]) { + $d = array( + ':qty' => $qty, + ':unit' => $unit, + ':from' => $units[$unit][0], + ':to' => $units[$unit][1], + ); + throw new \Box_Exception("Invalid period quantity :qty for unit :unit. Allowed range is from :from to :to", $d); + } + + $this->unit = $unit; + $this->qty = $qty; + } + + private function getUnits() + { + return array( + self::UNIT_DAY => array(1, 90), + self::UNIT_WEEK => array(1, 52), + self::UNIT_MONTH => array(1, 24), + self::UNIT_YEAR => array(1, 5), + ); + } + + public static function getPredefined($simple = true) + { + $periods = array( + self::PERIOD_WEEK => array('rec_qty'=>1, 'title'=>__('Every week'), 'code'=>self::PERIOD_WEEK, 'rec_unit'=>self::UNIT_WEEK), + self::PERIOD_MONTH => array('rec_qty'=>1, 'title'=>__('Every month'), 'code'=>self::PERIOD_MONTH, 'rec_unit'=>self::UNIT_MONTH), + self::PERIOD_QUARTER => array('rec_qty'=>3, 'title'=>__('Every 3 months'), 'code'=>self::PERIOD_QUARTER, 'rec_unit'=>self::UNIT_MONTH), + self::PERIOD_BIANNUAL => array('rec_qty'=>6, 'title'=>__('Every 6 months'), 'code'=>self::PERIOD_BIANNUAL, 'rec_unit'=>self::UNIT_MONTH), + self::PERIOD_ANNUAL => array('rec_qty'=>1, 'title'=>__('Every year'), 'code'=>self::PERIOD_ANNUAL, 'rec_unit'=>self::UNIT_YEAR), + self::PERIOD_BIENNIAL => array('rec_qty'=>2, 'title'=>__('Every 2 years'), 'code'=>self::PERIOD_BIENNIAL, 'rec_unit'=>self::UNIT_YEAR), + self::PERIOD_TRIENNIAL => array('rec_qty'=>3, 'title'=>__('Every 3 years'), 'code'=>self::PERIOD_TRIENNIAL, 'rec_unit'=>self::UNIT_YEAR), + ); + + if($simple) { + $new = array(); + foreach($periods as $pp) { + $new[$pp['code']] = $pp['title']; + } + $periods = $new; + } + return $periods; + } + + public function getUnit() + { + return $this->unit; + } + + public function getQty() + { + return $this->qty; + } + + public function getCode() + { + return $this->qty.$this->unit; + } + + public function getTitle() + { + switch ($this->unit) { + case self::UNIT_DAY: + $shift = __('Every :number day', array(':number'=>$this->qty)); + break; + case self::UNIT_WEEK: + $shift = __('Every :number week(s)', array(':number'=>$this->qty)); + break; + case self::UNIT_MONTH: + $shift = __('Every :number months', array(':number'=>$this->qty)); + break; + case self::UNIT_YEAR: + $shift = __('Every :number years', array(':number'=>$this->qty)); + break; + default: + throw new \Box_Exception('Unit not defined'); + break; + } + + return $shift; + } + + public function getDays() + { + return $this->getMonths() * 30; + } + + /** + * How many months $this->unit consists of + * @return int + */ + public function getMonths() + { + $qty = 0; + + switch ($this->unit) { + case self::UNIT_DAY: + $qty = $this->qty / 30; + break; + case self::UNIT_WEEK: + $qty = $this->qty / 4; + break; + case self::UNIT_MONTH: + $qty = $this->qty; + break; + case self::UNIT_YEAR: + $qty = $this->qty * 12; + break; + default: + throw new \Box_Exception('Can not determine months amount from unit'); + break; + } + + return $qty; + } + + public function getExpirationTime($now = NULL) + { + if(NULL === $now) { + $now = time(); + } + + switch ($this->unit) { + case self::UNIT_DAY: + $shift = 'days'; + break; + case self::UNIT_WEEK: + $shift = 'weeks'; + break; + case self::UNIT_MONTH: + $shift = 'months'; + break; + case self::UNIT_YEAR: + $shift = 'years'; + break; + default: + throw new \Box_Exception('Unit not defined'); + break; + } + return strtotime("+$this->qty $shift", $now); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Request.php b/src/bb-library/Box/Request.php new file mode 100644 index 000000000..cbcf58d48 --- /dev/null +++ b/src/bb-library/Box/Request.php @@ -0,0 +1,591 @@ +_get = $_GET; + $this->_post = $_POST; + $this->_request = $_REQUEST; + $this->_server = $_SERVER; + } + + public function setDi($di) + { + $this->di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function get($name = null, $filters = null, $defaultValue = null) + { + if (empty($name)) { + return $this->_request; + } + $value = isset($this->_request[$name]) ? $this->_request[$name] : $defaultValue; + return $this->_filterValue($value, $filters); + } + + public function getPost($name = null, $filters = null, $defaultValue = null) + { + if (empty($name)) { + return $this->_post; + } + $value = isset($this->_post[$name]) ? $this->_post[$name] : $defaultValue; + return $this->_filterValue($value, $filters); + } + + public function getQuery($name = null, $filters = null, $defaultValue = null) + { + if (empty($name)) { + return $this->_get; + } + + $value = isset($this->_get[$name]) ? $this->_get[$name] : $defaultValue; + return $this->_filterValue($value, $filters); + } + + /** + * Returns the available headers in the request + * @return array + */ + public function getHeaders() + { + $list = getallheaders(); + return is_array($list) ? $list : array(); + } + + public function getPut($name = null, $filters = null, $defaultValue = null) + { + parse_str($this->getRawBody(), $put); + if(empty($name)) { + return $put; + } + + $value = isset($put[$name]) ? $put[$name] : $defaultValue; + return $this->_filterValue($value, $filters); + } + + public function getServer($name) + { + return isset($this->_server[$name]) ? $this->_server[$name] : null; + } + + public function has($name) + { + return isset($this->_request[$name]); + } + + public function hasPost($name) + { + return isset($this->_post[$name]); + } + + public function hasPut($name) + { + parse_str($this->getRawBody(), $put); + if(is_array($put) && isset($put[$name])) { + return true; + } + return false; + } + + public function hasQuery($name) + { + return isset($this->_get[$name]); + } + + public function hasServer($name) + { + return isset($this->_server[$name]); + } + + /** + * Gets HTTP header from request data + * @param string $header + * @return string + */ + public function getHeader($header) + { + $headers = $this->getHeaders(); + return isset($headers[$header]) ? $headers[$header] : null; + } + + /** + * Gets HTTP schema (http/https) + * @return string + */ + public function getScheme() + { + return $this->getServer('HTTPS') ? 'https' : 'http'; + } + + /** + * Checks whether request has been made using ajax. Checks if $_SERVER[‘HTTP_X_REQUESTED_WITH’]==’XMLHttpRequest’ + * @return bool + */ + public function isAjax() + { + return ($this->getServer('HTTP_X_REQUESTED_WITH') == 'XMLHttpRequest'); + } + + /** + * Checks whether request has been made using SOAP + * @return bool + */ + public function isSoapRequested() + { + if($this->hasServer('HTTP_SOAPACTION')) { + return true; + } + + if($this->getServer('CONTENT_TYPE') == 'application/soap+xml') { + return true; + } + + return false; + } + + /** + * Checks whether request has been made using any secure layer + * @return bool + */ + public function isSecureRequest() + { + return ($this->getScheme() == 'https'); + } + + /** + * Gets HTTP raw request body + * @return string + */ + public function getRawBody() + { + return file_get_contents('php://input'); + } + + /** + * Gets decoded JSON HTTP raw request body + * @return string + */ + public function getJsonRawBody() + { + $result = json_decode($this->getRawBody(), 1); + if($result) { + return $result; + } + + $_messages = array( + JSON_ERROR_NONE => 'No error has occurred', + JSON_ERROR_DEPTH => 'The maximum stack depth has been exceeded', + JSON_ERROR_STATE_MISMATCH => 'Invalid or malformed JSON', + JSON_ERROR_CTRL_CHAR => 'Control character error, possibly incorrectly encoded', + JSON_ERROR_SYNTAX => 'Syntax error', + JSON_ERROR_UTF8 => 'Malformed UTF-8 characters, possibly incorrectly encoded' + ); + $error = json_last_error(); + $msg = isset($_messages[$error]) ? $_messages[$error] : 'Error decoding json'; + throw new RuntimeException($msg); + } + + /** + * Gets active server address IP + * @return string + */ + public function getServerAddress() + { + $address = $this->getServer('SERVER_ADDR'); + return ($address) ? $address : '127.0.0.1'; + } + + /** + * Gets active server name + * @return string + */ + public function getServerName() + { + $address = $this->getServer('SERVER_NAME'); + return ($address) ? $address : 'localhost'; + } + + /** + * Gets information about schema, host and port used by the request + * @return string + */ + public function getHttpHost() + { + return $this->getServer('HTTP_HOST'); + } + + /** + * Gets most possible client IPv4 Address. This method search in $_SERVER[‘REMOTE_ADDR’] and optionally in $_SERVER[‘HTTP_X_FORWARDED_FOR’] + * @param bool $trustForwardedHeader - should we trust forwarded header? + * return string + */ + public function getClientAddress($trustForwardedHeader = true) + { + $address = null; + if($trustForwardedHeader) { + $address = $this->getServer('HTTP_X_FORWARDED_FOR'); + } + if(is_null($address)) { + $address = $this->getServer('REMOTE_ADDR'); + } + if(is_string($address)) { + if(strpos($address, ',') !== false) { + list($address) = explode(',', $address); + } + } + return $address; + } + + /** + * Gets HTTP method which request has been made + * @return string + */ + public function getMethod() + { + return $this->getServer('REQUEST_METHOD'); + } + + /** + * Gets HTTP URI which request has been made + * @return string + */ + public function getURI() + { + return $this->getServer('REQUEST_URI'); + } + + /** + * Gets HTTP user agent used to made the request + * @return string + */ + public function getUserAgent() + { + return $this->getServer('HTTP_USER_AGENT'); + } + + /** + * Check if HTTP method match any of the passed methods + * @param string | array + * @return bool + */ + public function isMethod($methods) + { + $current = $this->getMethod(); + if(is_array($methods)) { + foreach($methods as $method) { + if($current == $method) { + return true; + } + } + return false; + } + return ($current == $methods); + } + + /** + * Checks whether HTTP method is POST. if $_SERVER[‘REQUEST_METHOD’]==’POST’ + * @return bool + */ + public function isPost() + { + return ($this->getMethod() == 'POST'); + } + + /** + * Checks whether HTTP method is GET. if $_SERVER[‘REQUEST_METHOD’]==’GET’ + * @return bool + */ + public function isGet() + { + return ($this->getMethod() == 'GET'); + } + + /** + * Checks whether HTTP method is PUT. if $_SERVER[‘REQUEST_METHOD’]==’PUT’ + * @return bool + */ + public function isPut() + { + return ($this->getMethod() == 'PUT'); + } + + /** + * Checks whether HTTP method is PATCH. if $_SERVER[‘REQUEST_METHOD’]==’PATCH’ + * @return bool + */ + public function isPatch() + { + return ($this->getMethod() == 'PATCH'); + } + + /** + * Checks whether HTTP method is HEAD. if $_SERVER[‘REQUEST_METHOD’]==’HEAD’ + * @return bool + */ + public function isHead() + { + return ($this->getMethod() == 'HEAD'); + } + + /** + * Checks whether HTTP method is DELETE. if $_SERVER[‘REQUEST_METHOD’]==’DELETE’ + * @return bool + */ + public function isDelete() + { + return ($this->getMethod() == 'DELETE'); + } + + /** + * Checks whether HTTP method is OPTIONS. if $_SERVER[‘REQUEST_METHOD’]==’OPTIONS’ + * @return bool + */ + public function isOptions() + { + return ($this->getMethod() == 'OPTIONS'); + } + + /** + * Checks whether request includes attached files + * @return int - number of files + */ + public function hasFiles($onlySuccessful = true) + { + $number_of_files = 0; + $number_of_successful_files = 0; + foreach($_FILES as $file) { + $number_of_files++; + if(isset($file['error']) && $file['error'] == 0) { + $number_of_successful_files++; + } + } + return ($onlySuccessful) ? $number_of_successful_files : $number_of_files; + } + + /** + * Gets attached files as SplFileInfo collection + * @return array + */ + public function getUploadedFiles($onlySuccessful = true) + { + $files = array(); + foreach($_FILES as $file) { + $f = new Box_RequestFile($file); + if($onlySuccessful) { + if($file['error'] == 0) { + $files[] = $f; + } + } else { + $files[] = $f; + } + } + return $files; + } + + /** + * Gets web page that refers active request. ie: http://www.google.com + * @return string + */ + public function getHTTPReferer() + { + return $this->getServer('HTTP_REFERER'); + } + + /** + * Gets array with mime/types and their quality accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT’] + * @return array + */ + public function getAcceptableContent() + { + return $this->getServer('HTTP_ACCEPT'); + } + + /** + * Gets best mime/type accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT’] + * @return array + */ + public function getBestAccept() + { + //@todo + } + + /** + * Gets charsets array and their quality accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT_CHARSET’] + * @return array + */ + public function getClientCharsets() + { + //@todo + } + + /** + * Gets best charset accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT_CHARSET’] + * @return string + */ + public function getBestCharset() + { + //@todo + } + + /** + * Gets languages array and their quality accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] + * @return array + */ + public function getLanguages() + { + $language_header = $this->getServer('HTTP_ACCEPT_LANGUAGE'); + return $this->_getQualityHeader($language_header, 'language'); + } + + /** + * Gets best language accepted by the browser/client from $_SERVER[‘HTTP_ACCEPT_LANGUAGE’] + * @return string + */ + public function getBestLanguage() + { + //@todo + } + + /** + * Gets auth info accepted by the browser/client from $_SERVER[‘PHP_AUTH_USER’] + * @return array + */ + public function getBasicAuth() + { + $username = null; + $password = null; + + if ($this->hasServer('PHP_AUTH_USER')) { + $username = $_SERVER['PHP_AUTH_USER']; + $password = $_SERVER['PHP_AUTH_PW']; + } elseif ($this->hasServer('HTTP_AUTHENTICATION')) { + $auth = $this->getServer('HTTP_AUTHENTICATION'); + if (strpos(strtolower($auth), 'basic') === 0) { + list($username,$password) = explode(':',base64_decode(substr($auth, 6))); + } + } + + return array( + 'username' => $username, + 'password' => $password, + ); + } + + /** + * Gets auth info accepted by the browser/client from $_SERVER[‘PHP_AUTH_DIGEST’] + * @return array + */ + public function getDigestAuth() + { + // mod_php + if ($this->hasServer('PHP_AUTH_DIGEST')) { + $digest = $this->getServer('PHP_AUTH_DIGEST'); + // most other servers + } elseif ($this->hasServer('HTTP_AUTHENTICATION')) { + $auth = $this->getServer('HTTP_AUTHENTICATION'); + if (strpos(strtolower($auth),'digest')===0) { + $digest = substr($auth, 7); + } + } + + // protect against missing data + $needed_parts = array('nonce'=>1, 'nc'=>1, 'cnonce'=>1, 'qop'=>1, 'username'=>1, 'uri'=>1, 'response'=>1); + $data = array(); + $keys = implode('|', array_keys($needed_parts)); + + preg_match_all('@(' . $keys . ')=(?:([\'"])([^\2]+?)\2|([^\s,]+))@', $digest, $matches, PREG_SET_ORDER); + + foreach ($matches as $m) { + $data[$m[1]] = $m[3] ? $m[3] : $m[4]; + unset($needed_parts[$m[1]]); + } + + return $needed_parts ? false : $data; + } + + /** + * Process a request header and return an array of values with their qualities + * @return array + */ + protected function _getQualityHeader($header, $q) + { + $return = array(); + $parts = preg_split('/,\\s*/', $header); + + foreach($parts as $part) { + $headerParts = explode(';', $part); + if(isset($headerParts[1]) === true) { + $quality = substr($headerParts[1], 2); + } else { + $quality = 1; + } + + $return[] = array($q => $headerParts[0], 'quality' => $quality); + } + + return $return; + } + + /** + * Process a request header and return the one with best quality + * @return string + */ + protected function _getBestQuality($header) + { + //@todo + } + + /** + * @todo implement filtering + * @param $value - value to filter + * @param [string|array $filters] - list of filter to apply on value + */ + private function _filterValue($value, $filters) + { + return $value; + } +} + + +if (!function_exists('getallheaders')) +{ + function getallheaders() + { + $headers = ''; + foreach ($_SERVER as $name => $value) + { + if (substr($name, 0, 5) == 'HTTP_') + { + $headers[str_replace(' ', '-', ucwords(strtolower(str_replace('_', ' ', substr($name, 5)))))] = $value; + } + } + return $headers; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/RequestFile.php b/src/bb-library/Box/RequestFile.php new file mode 100644 index 000000000..1fbdde948 --- /dev/null +++ b/src/bb-library/Box/RequestFile.php @@ -0,0 +1,30 @@ +name = $file['name']; + parent::__construct($file['tmp_name']); + } + + + public function getName() + { + return $this->name; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Requirements.php b/src/bb-library/Box/Requirements.php new file mode 100644 index 000000000..039a8debc --- /dev/null +++ b/src/bb-library/Box/Requirements.php @@ -0,0 +1,202 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + private $_all_ok = true; + private $_app_path = BB_PATH_ROOT; + + public function __construct() + { + $this->_options = array( + 'php' => array( + 'extensions' => array( + 'pdo_mysql', + 'curl', + 'zlib', + 'gettext', + 'mcrypt', + ), + 'version' => PHP_VERSION, + 'min_version' => '5.3', + 'safe_mode' => ini_get('safe_mode'), + ), + 'writable_folders' => array( + $this->_app_path . '/bb-data/cache', + $this->_app_path . '/bb-data/log', + $this->_app_path . '/bb-data/uploads', + ), + 'writable_files' => array( + $this->_app_path . '/bb-config.php', + ), + ); + } + + public function getOptions() + { + return $this->_options; + } + + public function getInfo() + { + $data = array(); + $data['ip'] = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : null; + $data['PHP_OS'] = PHP_OS; + $data['PHP_VERSION'] = PHP_VERSION; + + $data['bb'] = array( + 'BB_LOCALE' => $this->di['config']['locale'], + 'BB_SEF_URLS' => BB_SEF_URLS, + 'version' => Box_Version::VERSION, + ); + + $data['ini'] = array( + 'allow_url_fopen' => ini_get('allow_url_fopen'), + 'safe_mode' => ini_get('safe_mode'), + 'memory_limit' => ini_get('memory_limit'), + 'magic_quotes' => (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()), + ); + + $data['permissions'] = array( + BB_PATH_UPLOADS => substr(sprintf('%o', fileperms(BB_PATH_UPLOADS)), -4), + BB_PATH_DATA => substr(sprintf('%o', fileperms(BB_PATH_DATA)), -4), + BB_PATH_CACHE => substr(sprintf('%o', fileperms(BB_PATH_CACHE)), -4), + BB_PATH_LOG => substr(sprintf('%o', fileperms(BB_PATH_LOG)), -4), + ); + + $data['extensions'] = array( + 'ionCube Loader' => extension_loaded('ionCube Loader'), + 'apc' => extension_loaded('apc'), + 'curl' => extension_loaded('curl'), + 'pdo_mysql' => extension_loaded('pdo_mysql'), + 'zlib' => extension_loaded('zlib'), + 'mbstring' => extension_loaded('mbstring'), + 'mcrypt' => extension_loaded('mcrypt'), + 'gettext' => extension_loaded('gettext'), + ); + + //determine php username + if(function_exists('posix_getpwuid') && function_exists('posix_geteuid')) { + $data['posix_getpwuid'] = posix_getpwuid(posix_geteuid()); + } + return $data; + } + + public function isPhpVersionOk() + { + $current = $this->_options['php']['version']; + $required = $this->_options['php']['min_version']; + return version_compare($current, $required, '>='); + } + + /** + * What extensions must be loaded for BoxBilling o function correctly + */ + public function extensions() + { + $exts = $this->_options['php']['extensions']; + + $result = array(); + foreach($exts as $ext) { + if(extension_loaded($ext)) { + $result[$ext] = true; + } else { + $result[$ext] = false; + $this->_all_ok = false; + } + } + + return $result; + } + + /** + * Files that must be writable + */ + public function files() + { + $files = $this->_options['writable_files']; + $result = array(); + + foreach($files as $file) { + if ($this->checkPerms($file)) { + $result[$file] = true; + } else if (is_writable($file)) { + $result[$file] = true; + } else { + $result[$file] = false; + $this->_all_ok = false; + } + } + + return $result; + } + + /** + * Folders that must be writable + */ + public function folders() + { + $folders = $this->_options['writable_folders']; + + foreach($folders as $folder) { + if($this->checkPerms($folder)) { + $result[$folder] = true; + } else if (is_writable($folder)) { + $result[$folder] = true; + } else { + $result[$folder] = false; + $this->_all_ok = false; + } + } + + return $result; + } + + /** + * Check if we can continue with installation + * @return bool + */ + public function canInstall() + { + $this->extensions(); + $this->folders(); + $this->files(); + return $this->_all_ok; + } + + /** + * Check permissions + * @param string $path + * @param string $perm + * @return bool + */ + public function checkPerms($path, $perm = '0777') + { + clearstatcache(); + $configmod = substr(sprintf('%o', @fileperms($path)), -4); + return ($configmod == $perm); + } + +} diff --git a/src/bb-library/Box/Response.php b/src/bb-library/Box/Response.php new file mode 100644 index 000000000..b470b00f8 --- /dev/null +++ b/src/bb-library/Box/Response.php @@ -0,0 +1,128 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + /** + * @param mixed $etag + */ + public function setEtag($etag) + { + $this->etag = $etag; + } + + /** + * @param mixed $content_type + */ + public function setContentType($contentType, $charset = null) + { + $this->content_type = $contentType; + } + + public function redirect($location, $externalRedirect = false, $statusCode = null) + { + + } + + /** + * @param mixed $content + */ + public function setContent($content) + { + $this->content = $content; + } + + /** + * @return mixed + */ + public function getContent() + { + return $this->content; + } + + public function appendContent($content) + { + $this->content .= $content; + } + + /** + * @param mixed $json_content + */ + public function setJsonContent($json_content) + { + $this->json_content = $json_content; + } + + /** + * @return bool + */ + public function isSent() + { + return (bool)$this->is_sent; + } + + + public function sendHeaders() + { + + } + + public function sendCookies() + { + + } + + public function send() + { + + $this->is_sent = true; + } + + public function setFileToSend($filePath, $attachmentName = null) + { + + } + +} \ No newline at end of file diff --git a/src/bb-library/Box/Session.php b/src/bb-library/Box/Session.php new file mode 100644 index 000000000..79c67f3c8 --- /dev/null +++ b/src/bb-library/Box/Session.php @@ -0,0 +1,55 @@ +di = $di; + } + + /** + * @return null + */ + public function getDi() + { + return $this->di; + } + + public function file_put_contents($content, $target, $mode = 'wt') + { + $fp = @fopen($target, $mode); + + if ($fp) { + $bytes = fwrite($fp, $content); + fclose($fp); + return $bytes; + } else { + $error = error_get_last(); + + throw new RuntimeException( + sprintf( + 'Could not write to %s: %s', + $target, + substr( + $error['message'], + strpos($error['message'], ':') + 2 + ) + ) + ); + } + } + + public function file_get_contents($filename, $use_include_path = false, $context = null, $offset = -1) + { + return file_get_contents($filename, $use_include_path, $context, $offset); + } + + public function get_url($url, $timeout = 10) + { + $ch = curl_init(); + $userAgent = 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)'; + curl_setopt($ch, CURLOPT_USERAGENT, $userAgent); + curl_setopt($ch, CURLOPT_URL, $url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); + curl_setopt($ch, CURLOPT_FAILONERROR, true); + curl_setopt($ch, CURLOPT_AUTOREFERER, true); + curl_setopt($ch, CURLOPT_TIMEOUT, $timeout); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + + $data = curl_exec($ch); + if($data === false) { + throw new Exception(curl_error($ch), curl_errno($ch)); + } + curl_close($ch); + return $data; + } + + /** + * Return site url + * @return string + */ + public function url($link = null) + { + $link = trim($link, '/'); + if(BB_SEF_URLS) { + return BB_URL . $link; + } + + return BB_URL .'index.php?_url=/' . $link; + } + + public function hasService($type) + { + $file = BB_PATH_MODS . '/mod_'.$type.'/Service.php'; + return file_exists($file); + } + + public function getService($type) + { + $class = 'Box_Mod_'.ucfirst($type).'_Service'; + $file = BB_PATH_MODS . '/mod_'.$type.'/Service.php'; + if(!file_exists($file)){ + throw new \Box_Exception('Service class :class was not found in :path', array(':class'=>$class,':path'=>$file)); + } + require_once $file; + return new $class(); + } + + /** + * Get client IP + * @return string + */ + public function getIpv4() + { + $ip = NULL; + if (isset($_SERVER) ) { + if (isset($_SERVER['REMOTE_ADDR']) ) { + $ip = $_SERVER['REMOTE_ADDR']; + } elseif (isset($_SERVER['HTTP_CLIENT_IP'])) { + $ip = $_SERVER['HTTP_CLIENT_IP']; + } elseif (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { + $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; + $iplist = explode(',', $ip); + if(is_array($iplist)) { + $ip = trim(array_pop($iplist)); + } + } + } + return $ip; + } + + public function checkPerms($path, $perm = '0777') + { + clearstatcache(); + $configmod = substr(sprintf('%o', fileperms($path)), -4); + $int = (int)$configmod; + if($configmod == $perm) { + return true; + } + + if((int)$configmod < (int)$perm) { + return true; + } + return false; + } + + public function emptyFolder($folder) + { + if(!is_dir($folder)) { + return; + } + $d = dir($folder); + while (false !== ($entry = $d->read())) { + $isdir = is_dir($folder."/".$entry); + if (!$isdir and $entry!="." and $entry!="..") { + unlink($folder."/".$entry); + } elseif ($isdir and $entry!="." and $entry!="..") { + $this->emptyFolder($folder."/".$entry); + rmdir($folder."/".$entry); + } + } + $d->close(); + } + + /** + * Returns referer url + * @return string + */ + public function getReferer($default = '/') + { + $r = empty($_SERVER['HTTP_REFERER']) ? $default : $_SERVER['HTTP_REFERER']; + return $r; + } + + /** + * Generates random password + * @param int $length + * @param int $strength + * @return string + */ + public function generatePassword($length=8, $strength=3) { + $upper = 0; + $lower = 0; + $numeric = 0; + $other = 0; + + $upper_letters = 'QWERTYUIOPASDFGHJKLZXCVBNM'; + $lower_letters = 'qwertyuiopasdfghjklzxccvbnm'; + $numbers = '1234567890'; + $symbols = '!@#$%&?()+-_'; + + switch ($strength) { + //lowercase + case 1: + $lower = $length; + break; + //lowercase + numeric + case 2: + $lower = rand(1, $length - 1); + $numeric = $length - $lower; + break; + //lowercase + uppsercase + numeric + case 3: + $lower = rand(1, $length - 2); + $upper = rand(1, $length - $lower - 1); + $numeric = $length - $lower - $upper; + break; + //lowercase + uppercase + numeric + symbols + case 4: + default: + $lower = rand(1, $length - 3); + $upper = rand(1, $length - $lower - 2); + $numeric = rand(1, $length - $lower - $upper - 1); + $other = $length - $lower - $upper - $numeric; + break; + } + + for ($i = 0; $i < $upper; $i++) { + $passOrder[] = $upper_letters[rand() % strlen($upper_letters)]; + } + for ($i = 0; $i < $lower; $i++) { + $passOrder[] = $lower_letters[rand() % strlen($lower_letters)]; + } + for ($i = 0; $i < $numeric; $i++) { + $passOrder[] = $numbers[rand() % strlen($numbers)]; + } + for ($i = 0; $i < $other; $i++) { + $passOrder[] = $symbols[rand() % strlen($symbols)]; + } + + shuffle($passOrder); + $password = implode('', $passOrder); + + return $password; + } + + public function autoLinkText($text) + { + $pattern = '#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#'; + $callback = create_function('$matches', ' + $url = array_shift($matches); + $url_parts = parse_url($url); + if(!isset($url_parts["scheme"])) { + $url = "http://".$url; + } + return sprintf(\'%s\', $url, $url); + '); + + /* + $callback = create_function('$matches', ' + $url = array_shift($matches); + $url_parts = parse_url($url); + + $text = parse_url($url, PHP_URL_HOST) . parse_url($url, PHP_URL_PATH); + $text = preg_replace("/^www./", "", $text); + + $last = -(strlen(strrchr($text, "/"))) + 1; + if ($last < 0) { + $text = substr($text, 0, $last) . "…"; + } + + return sprintf(\'%s\', $url, $text); + '); + */ + return preg_replace_callback($pattern, $callback, $text); + } + + public function getResponseCode($theURL) + { + $headers = get_headers($theURL); + return substr($headers[0], 9, 3); + } + + public function slug($str) + { + $str = strtolower(trim($str)); + $str = preg_replace('/[^a-z0-9-]/', '-', $str); + $str = preg_replace('/-+/', "-", $str); + $str = trim($str, '-'); + return $str; + } + + public function escape($string) + { + $string = htmlspecialchars($string, ENT_QUOTES, 'UTF-8'); + return stripslashes($string); + } + + public function get_mime_content_type($filename) + { + $mime_types = array( + + 'txt' => 'text/plain', + 'htm' => 'text/html', + 'html' => 'text/html', + 'php' => 'text/html', + 'css' => 'text/css', + 'js' => 'application/javascript', + 'json' => 'application/json', + 'xml' => 'application/xml', + 'swf' => 'application/x-shockwave-flash', + 'flv' => 'video/x-flv', + + // images + 'png' => 'image/png', + 'jpe' => 'image/jpeg', + 'jpeg' => 'image/jpeg', + 'jpg' => 'image/jpeg', + 'gif' => 'image/gif', + 'bmp' => 'image/bmp', + 'ico' => 'image/vnd.microsoft.icon', + 'tiff' => 'image/tiff', + 'tif' => 'image/tiff', + 'svg' => 'image/svg+xml', + 'svgz' => 'image/svg+xml', + + // archives + 'zip' => 'application/zip', + 'rar' => 'application/x-rar-compressed', + 'exe' => 'application/x-msdownload', + 'msi' => 'application/x-msdownload', + 'cab' => 'application/vnd.ms-cab-compressed', + + // audio/video + 'mp3' => 'audio/mpeg', + 'qt' => 'video/quicktime', + 'mov' => 'video/quicktime', + + // adobe + 'pdf' => 'application/pdf', + 'psd' => 'image/vnd.adobe.photoshop', + 'ai' => 'application/postscript', + 'eps' => 'application/postscript', + 'ps' => 'application/postscript', + + // ms office + 'doc' => 'application/msword', + 'rtf' => 'application/rtf', + 'xls' => 'application/vnd.ms-excel', + 'ppt' => 'application/vnd.ms-powerpoint', + + // open office + 'odt' => 'application/vnd.oasis.opendocument.text', + 'ods' => 'application/vnd.oasis.opendocument.spreadsheet', + ); + + $ext = strtolower(array_pop(explode('.',$filename))); + if (array_key_exists($ext, $mime_types)) { + return $mime_types[$ext]; + } + elseif (function_exists('finfo_open')) { + $finfo = finfo_open(FILEINFO_MIME); + $mimetype = finfo_file($finfo, $filename); + finfo_close($finfo); + return $mimetype; + } + else { + return 'application/octet-stream'; + } + } + + public function to_camel_case($str, $capitalise_first_char = false) { + if($capitalise_first_char) { + $str[0] = strtoupper($str[0]); + } + $func = create_function('$c', 'return strtoupper($c[1]);'); + return preg_replace_callback('/-([a-z])/', $func, $str); + } + + public function from_camel_case($str) { + $str[0] = strtolower($str[0]); + $func = create_function('$c', 'return "-" . strtolower($c[1]);'); + return preg_replace_callback('/([A-Z])/', $func, $str); + } + + public function decodeJ($json_str) + { + $config = json_decode($json_str, true); + return is_array($config) ? $config : array(); + } + + public function sortByOneKey(array $array, $key, $asc = true) { + $result = array(); + + $values = array(); + foreach ($array as $id => $value) { + $values[$id] = isset($value[$key]) ? $value[$key] : ''; + } + + if ($asc) { + asort($values); + } + else { + arsort($values); + } + + foreach ($values as $key => $value) { + $result[$key] = $array[$key]; + } + + return $result; + } + + public function cache_function($buildCallback, array $args = array(), $timeoutSeconds = 3600) + { + // Set up the filename for the cache file + if(is_array($buildCallback)){ + $cacheKey = get_class($buildCallback[0]) .'::'. $buildCallback[1]; + }else{ + $cacheKey = $buildCallback . ':' . implode(':', $args); + } + $cacheKey .= ':' . implode(':', $args); + $file_path = BB_PATH_CACHE .DIRECTORY_SEPARATOR. md5($cacheKey); + + // If the file hasn't yet been created or is out of date then call the require function and store it's result. + if(!file_exists($file_path) OR filemtime($file_path) < (time() - $timeoutSeconds)){ + $result = call_user_func_array($buildCallback, $args); + file_put_contents($file_path, serialize($result), LOCK_EX); + // Else, grab the result from the cache. + }else{ + $result = unserialize(file_get_contents($file_path)); + } + + return $result; + } + + public function fileExists($file) + { + return file_exists($file); + } + + public function rename($old, $new) + { + return rename($old, $new); + } + + public function unlink($file) + { + return unlink($file); + } + + public function mkdir($destination, $perm, $recursive = false) + { + return mkdir($destination, $perm, $recursive); + } + + public function glob($pattern, $flag = 0) + { + return glob($pattern, $flag); + } + + public function getTable($type) + { + $class = 'Model_'.ucfirst($type).'Table'; + $file = BB_PATH_LIBRARY . '/Model/'.$type.'Table.php'; + if(!file_exists($file)){ + throw new \Box_Exception('Service class :class was not found in :path', array(':class'=>$class,':path'=>$file)); + } + require_once $file; + return new $class(); + } + +} diff --git a/src/bb-library/Box/TwigExtensions.php b/src/bb-library/Box/TwigExtensions.php new file mode 100644 index 000000000..2e68921dd --- /dev/null +++ b/src/bb-library/Box/TwigExtensions.php @@ -0,0 +1,280 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + /** + * Returns a list of filters to add to the existing list. + * + * @return array An array of filters + */ + public function getFilters() + { + return array( + 'alink' => new Twig_Filter_Function(array($this, 'twig_bb_admin_link_filter'), array('is_safe' => array('html'))), + 'link' => new Twig_Filter_Function(array($this, 'twig_bb_client_link_filter'), array('is_safe' => array('html'))), + 'gravatar' => new Twig_Filter_Function('twig_gravatar_filter'), + 'markdown' => new Twig_Filter_Function('twig_markdown_filter', array('needs_environment' => true, 'is_safe' => array('html'))), + 'truncate' => new Twig_Filter_Function('twig_truncate_filter', array('needs_environment' => true)), + 'timeago' => new Twig_Filter_Function('twig_timeago_filter'), + 'daysleft' => new Twig_Filter_Function('twig_daysleft_filter'), + 'size' => new Twig_Filter_Function('twig_size_filter'), + 'ipcountryname' => new Twig_Filter_Function(array($this, 'twig_ipcountryname_filter')), + 'number' => new Twig_Filter_Function('twig_number_filter'), + 'period_title' => new Twig_Filter_Function('twig_period_title', array('needs_environment' => true, 'is_safe' => array('html'))), + 'autolink' => new Twig_Filter_Function('twig_autolink_filter'), + 'bbmd' => new Twig_Filter_Function('twig_bbmd_filter', array('needs_environment' => true, 'is_safe' => array('html'))), + + 'bb_date' => new Twig_Filter_Function(array($this, 'twig_bb_date')), + 'bb_datetime' => new Twig_Filter_Function(array($this, 'twig_bb_datetime')), + + 'img_tag' => new Twig_Filter_Function('twig_img_tag', array('needs_environment' => false, 'is_safe' => array('html'))), + 'script_tag' => new Twig_Filter_Function('twig_script_tag', array('needs_environment' => false, 'is_safe' => array('html'))), + 'stylesheet_tag' => new Twig_Filter_Function('twig_stylesheet_tag', array('needs_environment' => false, 'is_safe' => array('html'))), + + 'mod_asset_url' => new Twig_Filter_Function('twig_mod_asset_url'), + 'asset_url' => new Twig_Filter_Function('twig_asset_url', array('needs_environment' => true, 'is_safe' => array('html'))), + + 'money' => new Twig_Filter_Function('twig_money', array('needs_environment' => true, 'is_safe' => array('html'))), + 'money_without_currency' => new Twig_Filter_Function('twig_money_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))), + 'money_convert' => new Twig_Filter_Function('twig_money_convert', array('needs_environment' => true, 'is_safe' => array('html'))), + 'money_convert_without_currency' => new Twig_Filter_Function('money_convert_without_currency', array('needs_environment' => true, 'is_safe' => array('html'))), + ); + } + + /** + * Returns the name of the extension. + * + * @return string The extension name + */ + public function getName() + { + return 'bb'; + } + + public function twig_bb_date($time, $format = null) + { + $locale_date_format = $this->di['config']['locale_date_format']; + $format = is_null($format) ? $locale_date_format : $format; + return strftime($format, strtotime($time)); + } + + public function twig_bb_datetime($time, $format = null) + { + $locale_date_format = $this->di['config']['locale_date_format']; + $locale_time_format = $this->di['config']['locale_time_format']; + $format = is_null($format) ? $locale_date_format . $locale_time_format : $format; + return strftime($format, strtotime($time)); + } + + function twig_ipcountryname_filter($value) + { + try { + $record = $this->di['geoip']->country($value); + return $record->country->name; + } catch (Exception $e) { + //return $e->getMessage(); + return ''; + } + } + + function twig_bb_client_link_filter($link, $params = null) + { + return $this->di['url']->link($link, $params); + } + + function twig_bb_admin_link_filter($link, $params = null) + { + return $this->di['url']->adminLink($link, $params); + } + +} + +function twig_period_title(Twig_Environment $env, $period) +{ + $globals = $env->getGlobals(); + $api_guest = $globals['guest']; + return $api_guest->system_period_title(array('code'=>$period)); +} + +function twig_money_convert(Twig_Environment $env, $price, $currency = null) +{ + $globals = $env->getGlobals(); + $api_guest = $globals['guest']; + if(is_null($currency)) { + $c = $api_guest->cart_get_currency(); + $currency = $c['code']; + } + return $api_guest->currency_format(array("price" => $price, 'code'=>$currency, 'convert'=>true)); +} + +function money_convert_without_currency(Twig_Environment $env, $price, $currency = null, $without_currency = false) +{ + $globals = $env->getGlobals(); + $api_guest = $globals['guest']; + if(is_null($currency)) { + $c = $api_guest->cart_get_currency(); + $currency = $c['code']; + } + return $api_guest->currency_format(array("price" => $price, 'code'=>$currency, 'convert'=>true, 'without_currency'=>true)); +} + +function twig_money(Twig_Environment $env, $price, $currency = null) +{ + $globals = $env->getGlobals(); + $api_guest = $globals['guest']; + return $api_guest->currency_format(array("price" => $price, 'code'=>$currency, 'convert'=>false)); +} + +function twig_money_without_currency(Twig_Environment $env, $price, $currency = null) +{ + $globals = $env->getGlobals(); + $api_guest = $globals['guest']; + return $api_guest->currency_format(array("price" => $price, 'code'=>$currency, 'convert'=>false, 'without_currency'=>true)); +} + +function twig_mod_asset_url($asset, $mod) +{ + return BB_URL . 'bb-modules/'.ucfirst($mod).'/assets/'.$asset; +} + +function twig_asset_url(Twig_Environment $env, $asset) +{ + $globals = $env->getGlobals(); + return BB_URL . 'bb-themes/'.$globals['current_theme'].'/assets/'.$asset; +} + +function twig_img_tag($path, $alt = null) +{ + $alt = is_null($alt) ? pathinfo($path, PATHINFO_BASENAME) : $alt; + return sprintf('%s', $path, $alt, $alt); +} + +function twig_script_tag($path) +{ + return sprintf('', $path, Box_Version::VERSION); +} + +function twig_stylesheet_tag($path, $media = 'screen') +{ + return sprintf('', $path, Box_Version::VERSION, $media); +} + +function twig_gravatar_filter($email, $size = null) +{ + $protocol = BB_SSL ? 'https' : 'http'; + $link = $protocol . '://gravatar.com/avatar/' . md5($email); + if ($size) { + $link .= '/?s=' . $size; + } + + return $link; +} + +function twig_autolink_filter($text) +{ + $pattern = '#\b(([\w-]+://?|www[.])[^\s()<>]+(?:\([\w\d]+\)|([^[:punct:]\s]|/)))#'; + $callback = create_function('$matches', ' + $url = array_shift($matches); + $url_parts = parse_url($url); + if(!isset($url_parts["scheme"])) { + $url = "http://".$url; + } + return sprintf(\'%s\', $url, $url); + '); + return preg_replace_callback($pattern, $callback, $text); +} + +function twig_number_filter($number, $decimals = 2, $dec_point = '.', $thousands_sep = '') +{ + return number_format($number, $decimals, $dec_point, $thousands_sep); +} + +function twig_daysleft_filter($iso8601) +{ + $timediff = strtotime($iso8601) - time(); + return intval($timediff/86400); +} + +function twig_timeago_filter($iso8601) +{ + $cur_tm = time(); $dif = $cur_tm-strtotime($iso8601); + $pds = array(__('second'),__('minute'),__('hour'),__('day'),__('week'),__('month'),__('year'),__('decade')); + $lngh = array(1,60,3600,86400,604800,2630880,31570560,315705600); + for($v = sizeof($lngh)-1; ($v >= 0)&&(($no = $dif/$lngh[$v])<=1); $v--); if($v < 0) $v = 0; $_tm = $cur_tm-($dif%$lngh[$v]); + + $no = floor($no); if($no <> 1) $pds[$v] .='s'; $x=sprintf("%d %s ",$no,$pds[$v]); + return $x; +} + +function twig_size_filter($value) +{ + $precision = 2; + $units = array('B', 'KB', 'MB', 'GB', 'TB'); + + $bytes = max($value, 0); + $pow = floor(($bytes ? log($bytes) : 0) / log(1024)); + $pow = min($pow, count($units) - 1); + + $bytes /= pow(1024, $pow); + + return round($bytes, $precision) . ' ' . $units[$pow]; +} + +function twig_markdown_filter(Twig_Environment $env, $value) +{ + $markdownParser = new dflydev\markdown\MarkdownExtraParser(); + return $markdownParser->transform($value); +} + +function twig_truncate_filter(Twig_Environment $env, $value, $length = 30, $preserve = false, $separator = '...') +{ + if (strlen($value) > $length) { + if ($preserve) { + if (false !== ($breakpoint = strpos($value, ' ', $length))) { + $length = $breakpoint; + } + } + + return substr($value, 0, $length) . $separator; + } + + return $value; +} + +/** + * BoxBilling markdown + */ +function twig_bbmd_filter(Twig_Environment $env, $value) +{ + $value = twig_markdown_filter($env, $value); + return $value; +} \ No newline at end of file diff --git a/src/bb-library/Box/TwigLoader.php b/src/bb-library/Box/TwigLoader.php new file mode 100644 index 000000000..932958df2 --- /dev/null +++ b/src/bb-library/Box/TwigLoader.php @@ -0,0 +1,68 @@ +options = $options; + $paths_arr = array($options['mods'], $options['theme']); + $this->setPaths($paths_arr); + } + + + protected function findTemplate($name) + { + // normalize name + $name = preg_replace('#/{2,}#', '/', strtr($name, '\\', '/')); + + if (isset($this->cache[$name])) { + return $this->cache[$name]; + } + + $name_split = explode("_", $name); + + $paths = array(); + $paths[] = $this->options["theme"] . DIRECTORY_SEPARATOR . "html"; + if(isset($name_split[1])) { + $paths[] = $this->options["mods"] . DIRECTORY_SEPARATOR . ucfirst($name_split[1]). DIRECTORY_SEPARATOR . "html_" . $this->options["type"]; + } + + foreach($paths as $path) { + if(file_exists($path . DIRECTORY_SEPARATOR . $name)) { + return $this->cache[$name] = $path . '/' . $name; + } + } + + throw new Twig_Error_Loader(sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $paths))); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Update.php b/src/bb-library/Box/Update.php new file mode 100644 index 000000000..65a2e4a7f --- /dev/null +++ b/src/bb-library/Box/Update.php @@ -0,0 +1,153 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + private $_url = 'http://api.boxbilling.com/compare-version.php'; + + public function __construct() + { + if(defined('BB_VERSION_URL') && BB_VERSION_URL) { + $this->_url = BB_VERSION_URL; + } + } + + /** + * Returns latest information + */ + private function _getLatestVersionInfo() + { + return $this->di['tools']->cache_function(array($this, 'getJson'), array(), 86400); + } + + /** + * Return latest version number + * @return string + */ + public function getLatestVersion() + { + $response = $this->_getLatestVersionInfo(); + if(!is_object($response)) { + return Box_Version::VERSION; + } + return $response->version; + } + + /** + * Latest version link + * @return string + */ + public function getLatestVersionDownloadLink() + { + $response = $this->_getLatestVersionInfo(); + if(isset($response->update)) { + return $response->update; + } + return $response->link; + } + + /** + * Check if we need to update current BoxBilling version + * @return bool + */ + public function getCanUpdate() + { + $version = $this->getLatestVersion(); + $result = Box_Version::compareVersion($version); + return ($result > 0); + } + + /** + * Check if given file is same as original + * @param string $file - filepath + * @return bool + */ + private function isHashValid($file) + { + if(!file_exists($file)) { + return false; + } + + $response = $this->_getLatestVersionInfo(); + $hash = md5($response->version.filesize($file)); + return ($hash == $response->hash); + } + + public function getJson() + { + $url = $this->_url . '?current=' . Box_Version::VERSION; + $curl = new Box_Curl($url); + $curl->request(); + $response = $curl->getBody(); + return json_decode($response); + } + + /** + * Perform update + * + * @throws Exception + */ + public function performUpdate() + { + if(!$this->getCanUpdate()) { + throw new LogicException('You have latest version of BoxBilling. You do not need to update.'); + } + + error_log('Started BoxBilling auto-update script'); + $latest_version = $this->getLatestVersion(); + $latest_version_archive = BB_PATH_CACHE.DIRECTORY_SEPARATOR.$latest_version.'.zip'; + + // download latest archive from link + $content = $this->di['tools']->file_get_contents($this->getLatestVersionDownloadLink()); + $f = fopen($latest_version_archive,'wb'); + fwrite($f,$content,strlen($content)); + fclose($f); + + //@todo validate downloaded file hash + + // Extract latest archive on top of current version + $ff = new Box_Zip($latest_version_archive); + $ff->decompress(BB_PATH_ROOT); + + if(file_exists(BB_PATH_ROOT.'/bb-update.php')) { + error_log('Calling bb-update.php script from auto-updater'); + $this->di['tools']->file_get_contents(BB_URL.'bb-update.php'); + } + + // clean up things + $this->di['tools']->emptyFolder(BB_PATH_CACHE); + $this->di['tools']->emptyFolder(BB_PATH_ROOT.'/install'); + rmdir(BB_PATH_ROOT.'/install'); + return true; + } +} \ No newline at end of file diff --git a/src/bb-library/Box/Url.php b/src/bb-library/Box/Url.php new file mode 100644 index 000000000..6ccf5207e --- /dev/null +++ b/src/bb-library/Box/Url.php @@ -0,0 +1,66 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function setBaseUri($baseUri) + { + $this->baseUri = $baseUri; + } + + /** + * Generates a URL + */ + public function get ($uri) + { + return $this->baseUri . $uri; + } + + public function link($uri = null, $params = array()) + { + $uri = trim($uri, '/'); + $link =$this->baseUri .'index.php?_url=/' . $uri; + if(BB_SEF_URLS) { + $link = $this->baseUri . $uri; + if (!empty($params)){ + $link .= '?'; + } + } + + if($params) { + $link .= '&' . http_build_query($params); + } + return $link; + } + + public function adminLink($uri, $params = array()) + { + $uri = trim($uri, '/'); + $prefix = $this->di['config']['admin_area_prefix']; + $uri = $prefix . '/' . $uri; + return $this->link($uri, $params); + } +} \ No newline at end of file diff --git a/src/bb-library/Box/UrlHelper.php b/src/bb-library/Box/UrlHelper.php new file mode 100644 index 000000000..260cf67fe --- /dev/null +++ b/src/bb-library/Box/UrlHelper.php @@ -0,0 +1,54 @@ +method = $httpMethod; + $this->conditions = $conditions; + + if (strtoupper($httpMethod) == $requestMethod) { + + $paramNames = array(); + $paramValues = array(); + + preg_match_all('@:([a-zA-Z]+)@', $url, $paramNames, PREG_PATTERN_ORDER); // get param names + $paramNames = $paramNames[1]; // we want the set of matches + $regexedUrl = preg_replace_callback('@:[a-zA-Z_\-]+@', array($this, 'regexValue'), $url); // replace param with regex capture + if (preg_match('@^' . $regexedUrl . '$@', $requestUri, $paramValues)) { // determine match and get param values + array_shift($paramValues); // remove the complete text match + for ($i=0; $i < count($paramNames); $i++) { + $this->params[$paramNames[$i]] = $paramValues[$i]; + } + $this->match = true; + } + } + } + + private function regexValue($matches) { + $key = str_replace(':', '', $matches[0]); + if (array_key_exists($key, $this->conditions)) { + return '(' . $this->conditions[$key] . ')'; + } else { + return '([a-zA-Z0-9_\-]+)'; + } + } + +} \ No newline at end of file diff --git a/src/bb-library/Box/Validate.php b/src/bb-library/Box/Validate.php new file mode 100644 index 000000000..bfa8f3624 --- /dev/null +++ b/src/bb-library/Box/Validate.php @@ -0,0 +1,93 @@ +di = $di; + } + + /** + * @return null + */ + public function getDi() + { + return $this->di; + } + + + public function isSldValid($sld) + { + // allow punnycode + if(substr($sld, 0, 4) == 'xn--') { + return true; + } + + if(preg_match('/^[a-z0-9]+[a-z0-9\-]*[a-z0-9]+$/i', $sld) && strlen($sld) < 64 && substr($sld, 2, 2) != '--') { + return true; + } else { + return false; + } + } + + public function isEmailValid($email, $throw = true) + { + $valid = (preg_match("/[-a-zA-Z0-9_.+]+@[a-zA-Z0-9-]{2,}\.[a-zA-Z]{2,}/", $email) > 0) ? true : false; + if(!$valid && $throw) { + throw new \Box_Exception('Email is not valid'); + } + return $valid; + } + + public function isPasswordStrong($pwd) + { + if( strlen($pwd) < 7 ) { + throw new \Box_Exception("Password too short!"); + } + + if( !preg_match("#[0-9]+#", $pwd) ) { + throw new \Box_Exception("Password must include at least one number!"); + } + + if( !preg_match("#[a-z]+#", $pwd) ) { + throw new \Box_Exception("Password must include at least one letter!"); + } + + /* + if( !preg_match("#[A-Z]+#", $pwd) ) { + throw new \Box_Exception("Password must include at least one CAPS!"); + } + + if( !preg_match("#\W+#", $pwd) ) { + throw new \Box_Exception("Password must include at least one symbol!"); + } + */ + return true; + } + + public function checkRequiredParamsForArray($required, $data) + { + foreach ($required as $key => $msg) { + if (!isset($data[$key]) || empty($data[$key])) { + throw new \Box_Exception($msg); + } + } + } +} diff --git a/src/bb-library/Box/Version.php b/src/bb-library/Box/Version.php new file mode 100644 index 000000000..2d2b21ae6 --- /dev/null +++ b/src/bb-library/Box/Version.php @@ -0,0 +1,37 @@ +zip = $zip; + } + + function decompress($to) + { + if(!file_exists($this->zip)) { + throw new \Box_Exception('File :file does not exist', array(':file'=>$this->zip)); + } + + $zip = new PclZip($this->zip); + if (($list = $zip->listContent()) == 0) { + error_log($zip->errorInfo(true)); + throw new \Box_Exception('Invalid zip file'); + } + + $v_list = $zip->extract($to); + if ($v_list == 0) { + error_log($zip->errorInfo(true)); + throw new \Box_Exception('Zip extraction failed'); + } + return true; + } +} + +// -------------------------------------------------------------------------------- +// PhpConcept Library - Zip Module 2.8.2 +// -------------------------------------------------------------------------------- +// License GNU/LGPL - Vincent Blavet - August 2009 +// http://www.phpconcept.net +// -------------------------------------------------------------------------------- +// +// Presentation : +// PclZip is a PHP library that manage ZIP archives. +// So far tests show that archives generated by PclZip are readable by +// WinZip application and other tools. +// +// Description : +// See readme.txt and http://www.phpconcept.net +// +// Warning : +// This library and the associated files are non commercial, non professional +// work. +// It should not have unexpected results. However if any damage is caused by +// this software the author can not be responsible. +// The use of this software is at the risk of the user. +// +// -------------------------------------------------------------------------------- +// $Id: pclzip.lib.php,v 1.60 2009/09/30 21:01:04 vblavet Exp $ +// -------------------------------------------------------------------------------- + + // ----- Constants + if (!defined('PCLZIP_READ_BLOCK_SIZE')) { + define( 'PCLZIP_READ_BLOCK_SIZE', 2048 ); + } + + // ----- File list separator + // In version 1.x of PclZip, the separator for file list is a space + // (which is not a very smart choice, specifically for windows paths !). + // A better separator should be a comma (,). This constant gives you the + // abilty to change that. + // However notice that changing this value, may have impact on existing + // scripts, using space separated filenames. + // Recommanded values for compatibility with older versions : + //define( 'PCLZIP_SEPARATOR', ' ' ); + // Recommanded values for smart separation of filenames. + if (!defined('PCLZIP_SEPARATOR')) { + define( 'PCLZIP_SEPARATOR', ',' ); + } + + // ----- Error configuration + // 0 : PclZip Class integrated error handling + // 1 : PclError external library error handling. By enabling this + // you must ensure that you have included PclError library. + // [2,...] : reserved for futur use + if (!defined('PCLZIP_ERROR_EXTERNAL')) { + define( 'PCLZIP_ERROR_EXTERNAL', 0 ); + } + + // ----- Optional static temporary directory + // By default temporary files are generated in the script current + // path. + // If defined : + // - MUST BE terminated by a '/'. + // - MUST be a valid, already created directory + // Samples : + // define( 'PCLZIP_TEMPORARY_DIR', '/temp/' ); + // define( 'PCLZIP_TEMPORARY_DIR', 'C:/Temp/' ); + if (!defined('PCLZIP_TEMPORARY_DIR')) { + define( 'PCLZIP_TEMPORARY_DIR', '' ); + } + + // ----- Optional threshold ratio for use of temporary files + // Pclzip sense the size of the file to add/extract and decide to + // use or not temporary file. The algorythm is looking for + // memory_limit of PHP and apply a ratio. + // threshold = memory_limit * ratio. + // Recommended values are under 0.5. Default 0.47. + // Samples : + // define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.5 ); + if (!defined('PCLZIP_TEMPORARY_FILE_RATIO')) { + define( 'PCLZIP_TEMPORARY_FILE_RATIO', 0.47 ); + } + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE NOTHING NEEDS TO BE MODIFIED ***** +// -------------------------------------------------------------------------------- + + // ----- Global variables + $g_pclzip_version = "2.8.2"; + + // ----- Error codes + // -1 : Unable to open file in binary write mode + // -2 : Unable to open file in binary read mode + // -3 : Invalid parameters + // -4 : File does not exist + // -5 : Filename is too long (max. 255) + // -6 : Not a valid zip file + // -7 : Invalid extracted file size + // -8 : Unable to create directory + // -9 : Invalid archive extension + // -10 : Invalid archive format + // -11 : Unable to delete file (unlink) + // -12 : Unable to rename file (rename) + // -13 : Invalid header checksum + // -14 : Invalid archive size + define( 'PCLZIP_ERR_USER_ABORTED', 2 ); + define( 'PCLZIP_ERR_NO_ERROR', 0 ); + define( 'PCLZIP_ERR_WRITE_OPEN_FAIL', -1 ); + define( 'PCLZIP_ERR_READ_OPEN_FAIL', -2 ); + define( 'PCLZIP_ERR_INVALID_PARAMETER', -3 ); + define( 'PCLZIP_ERR_MISSING_FILE', -4 ); + define( 'PCLZIP_ERR_FILENAME_TOO_LONG', -5 ); + define( 'PCLZIP_ERR_INVALID_ZIP', -6 ); + define( 'PCLZIP_ERR_BAD_EXTRACTED_FILE', -7 ); + define( 'PCLZIP_ERR_DIR_CREATE_FAIL', -8 ); + define( 'PCLZIP_ERR_BAD_EXTENSION', -9 ); + define( 'PCLZIP_ERR_BAD_FORMAT', -10 ); + define( 'PCLZIP_ERR_DELETE_FILE_FAIL', -11 ); + define( 'PCLZIP_ERR_RENAME_FILE_FAIL', -12 ); + define( 'PCLZIP_ERR_BAD_CHECKSUM', -13 ); + define( 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', -14 ); + define( 'PCLZIP_ERR_MISSING_OPTION_VALUE', -15 ); + define( 'PCLZIP_ERR_INVALID_OPTION_VALUE', -16 ); + define( 'PCLZIP_ERR_ALREADY_A_DIRECTORY', -17 ); + define( 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', -18 ); + define( 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION', -19 ); + define( 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE', -20 ); + define( 'PCLZIP_ERR_DIRECTORY_RESTRICTION', -21 ); + + // ----- Options values + define( 'PCLZIP_OPT_PATH', 77001 ); + define( 'PCLZIP_OPT_ADD_PATH', 77002 ); + define( 'PCLZIP_OPT_REMOVE_PATH', 77003 ); + define( 'PCLZIP_OPT_REMOVE_ALL_PATH', 77004 ); + define( 'PCLZIP_OPT_SET_CHMOD', 77005 ); + define( 'PCLZIP_OPT_EXTRACT_AS_STRING', 77006 ); + define( 'PCLZIP_OPT_NO_COMPRESSION', 77007 ); + define( 'PCLZIP_OPT_BY_NAME', 77008 ); + define( 'PCLZIP_OPT_BY_INDEX', 77009 ); + define( 'PCLZIP_OPT_BY_EREG', 77010 ); + define( 'PCLZIP_OPT_BY_PREG', 77011 ); + define( 'PCLZIP_OPT_COMMENT', 77012 ); + define( 'PCLZIP_OPT_ADD_COMMENT', 77013 ); + define( 'PCLZIP_OPT_PREPEND_COMMENT', 77014 ); + define( 'PCLZIP_OPT_EXTRACT_IN_OUTPUT', 77015 ); + define( 'PCLZIP_OPT_REPLACE_NEWER', 77016 ); + define( 'PCLZIP_OPT_STOP_ON_ERROR', 77017 ); + // Having big trouble with crypt. Need to multiply 2 long int + // which is not correctly supported by PHP ... + //define( 'PCLZIP_OPT_CRYPT', 77018 ); + define( 'PCLZIP_OPT_EXTRACT_DIR_RESTRICTION', 77019 ); + define( 'PCLZIP_OPT_TEMP_FILE_THRESHOLD', 77020 ); + define( 'PCLZIP_OPT_ADD_TEMP_FILE_THRESHOLD', 77020 ); // alias + define( 'PCLZIP_OPT_TEMP_FILE_ON', 77021 ); + define( 'PCLZIP_OPT_ADD_TEMP_FILE_ON', 77021 ); // alias + define( 'PCLZIP_OPT_TEMP_FILE_OFF', 77022 ); + define( 'PCLZIP_OPT_ADD_TEMP_FILE_OFF', 77022 ); // alias + + // ----- File description attributes + define( 'PCLZIP_ATT_FILE_NAME', 79001 ); + define( 'PCLZIP_ATT_FILE_NEW_SHORT_NAME', 79002 ); + define( 'PCLZIP_ATT_FILE_NEW_FULL_NAME', 79003 ); + define( 'PCLZIP_ATT_FILE_MTIME', 79004 ); + define( 'PCLZIP_ATT_FILE_CONTENT', 79005 ); + define( 'PCLZIP_ATT_FILE_COMMENT', 79006 ); + + // ----- Call backs values + define( 'PCLZIP_CB_PRE_EXTRACT', 78001 ); + define( 'PCLZIP_CB_POST_EXTRACT', 78002 ); + define( 'PCLZIP_CB_PRE_ADD', 78003 ); + define( 'PCLZIP_CB_POST_ADD', 78004 ); + /* For futur use + define( 'PCLZIP_CB_PRE_LIST', 78005 ); + define( 'PCLZIP_CB_POST_LIST', 78006 ); + define( 'PCLZIP_CB_PRE_DELETE', 78007 ); + define( 'PCLZIP_CB_POST_DELETE', 78008 ); + */ + + // -------------------------------------------------------------------------------- + // Class : PclZip + // Description : + // PclZip is the class that represent a Zip archive. + // The public methods allow the manipulation of the archive. + // Attributes : + // Attributes must not be accessed directly. + // Methods : + // PclZip() : Object creator + // create() : Creates the Zip archive + // listContent() : List the content of the Zip archive + // extract() : Extract the content of the archive + // properties() : List the properties of the archive + // -------------------------------------------------------------------------------- + class PclZip + { + // ----- Filename of the zip file + var $zipname = ''; + + // ----- File descriptor of the zip file + var $zip_fd = 0; + + // ----- Internal error handling + var $error_code = 1; + var $error_string = ''; + + // ----- Current status of the magic_quotes_runtime + // This value store the php configuration for magic_quotes + // The class can then disable the magic_quotes and reset it after + var $magic_quotes_status; + + // -------------------------------------------------------------------------------- + // Function : PclZip() + // Description : + // Creates a PclZip object and set the name of the associated Zip archive + // filename. + // Note that no real action is taken, if the archive does not exist it is not + // created. Use create() for that. + // -------------------------------------------------------------------------------- + function PclZip($p_zipname) + { + + // ----- Tests the zlib + if (!function_exists('gzopen')) + { + throw new Exeption('Missing zlib extensions'); + } + + // ----- Set the attributes + $this->zipname = $p_zipname; + $this->zip_fd = 0; + $this->magic_quotes_status = -1; + + // ----- Return + return; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // create($p_filelist, $p_add_dir="", $p_remove_dir="") + // create($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two different synopsis. The first one is historical. + // This method creates a Zip Archive. The Zip file is created in the + // filesystem. The files and directories indicated in $p_filelist + // are added in the archive. See the parameters description for the + // supported format of $p_filelist. + // When a directory is in the list, the directory and its content is added + // in the archive. + // In this synopsis, the function takes an optional variable list of + // options. See bellow the supported options. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function create($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove from the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Invalid number / type of arguments"); + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + if ($v_string != '') { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + else { + } + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privCreate($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // add($p_filelist, $p_add_dir="", $p_remove_dir="") + // add($p_filelist, $p_option, $p_option_value, ...) + // Description : + // This method supports two synopsis. The first one is historical. + // This methods add the list of files in an existing archive. + // If a file with the same name already exists, it is added at the end of the + // archive, the first one is still present. + // If the archive does not exist, it is created. + // Parameters : + // $p_filelist : An array containing file or directory names, or + // a string containing one filename or one directory name, or + // a string containing a list of filenames and/or directory + // names separated by spaces. + // $p_add_dir : A path to add before the real path of the archived file, + // in order to have it memorized in the archive. + // $p_remove_dir : A path to remove from the real path of the file to archive, + // in order to have a shorter path memorized in the archive. + // When $p_add_dir and $p_remove_dir are set, $p_remove_dir + // is removed first, before $p_add_dir is added. + // Options : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_COMMENT : + // PCLZIP_OPT_ADD_COMMENT : + // PCLZIP_OPT_PREPEND_COMMENT : + // PCLZIP_CB_PRE_ADD : + // PCLZIP_CB_POST_ADD : + // Return Values : + // 0 on failure, + // The list of the added files, with a status of the add action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function add($p_filelist) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Set default values + $v_options = array(); + $v_options[PCLZIP_OPT_NO_COMPRESSION] = FALSE; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_ADD => 'optional', + PCLZIP_CB_POST_ADD => 'optional', + PCLZIP_OPT_NO_COMPRESSION => 'optional', + PCLZIP_OPT_COMMENT => 'optional', + PCLZIP_OPT_ADD_COMMENT => 'optional', + PCLZIP_OPT_PREPEND_COMMENT => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + //, PCLZIP_OPT_CRYPT => 'optional' + )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_options[PCLZIP_OPT_ADD_PATH] = $v_add_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_options[PCLZIP_OPT_REMOVE_PATH] = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Init + $v_string_list = array(); + $v_att_list = array(); + $v_filedescr_list = array(); + $p_result_list = array(); + + // ----- Look if the $p_filelist is really an array + if (is_array($p_filelist)) { + + // ----- Look if the first element is also an array + // This will mean that this is a file description entry + if (isset($p_filelist[0]) && is_array($p_filelist[0])) { + $v_att_list = $p_filelist; + } + + // ----- The list is a list of string names + else { + $v_string_list = $p_filelist; + } + } + + // ----- Look if the $p_filelist is a string + else if (is_string($p_filelist)) { + // ----- Create a list from the string + $v_string_list = explode(PCLZIP_SEPARATOR, $p_filelist); + } + + // ----- Invalid variable type for $p_filelist + else { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type '".gettype($p_filelist)."' for p_filelist"); + return 0; + } + + // ----- Reformat the string list + if (sizeof($v_string_list) != 0) { + foreach ($v_string_list as $v_string) { + $v_att_list[][PCLZIP_ATT_FILE_NAME] = $v_string; + } + } + + // ----- For each file in the list check the attributes + $v_supported_attributes + = array ( PCLZIP_ATT_FILE_NAME => 'mandatory' + ,PCLZIP_ATT_FILE_NEW_SHORT_NAME => 'optional' + ,PCLZIP_ATT_FILE_NEW_FULL_NAME => 'optional' + ,PCLZIP_ATT_FILE_MTIME => 'optional' + ,PCLZIP_ATT_FILE_CONTENT => 'optional' + ,PCLZIP_ATT_FILE_COMMENT => 'optional' + ); + foreach ($v_att_list as $v_entry) { + $v_result = $this->privFileDescrParseAtt($v_entry, + $v_filedescr_list[], + $v_options, + $v_supported_attributes); + if ($v_result != 1) { + return 0; + } + } + + // ----- Expand the filelist (expand directories) + $v_result = $this->privFileDescrExpand($v_filedescr_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Call the create fct + $v_result = $this->privAdd($v_filedescr_list, $p_result_list, $v_options); + if ($v_result != 1) { + return 0; + } + + // ----- Return + return $p_result_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : listContent() + // Description : + // This public method, gives the list of the files and directories, with their + // properties. + // The properties of each entries in the list are (used also in other functions) : + // filename : Name of the file. For a create or add action it is the filename + // given by the user. For an extract function it is the filename + // of the extracted file. + // stored_filename : Name of the file / directory stored in the archive. + // size : Size of the stored file. + // compressed_size : Size of the file's data compressed in the archive + // (without the headers overhead) + // mtime : Last known modification date of the file (UNIX timestamp) + // comment : Comment associated with the file + // folder : true | false + // index : index of the file in the archive + // status : status of the action (depending of the action) : + // Values are : + // ok : OK ! + // filtered : the file / dir is not extracted (filtered by user) + // already_a_directory : the file can not be extracted because a + // directory with the same name already exists + // write_protected : the file can not be extracted because a file + // with the same name already exists and is + // write protected + // newer_exist : the file was not extracted because a newer file exists + // path_creation_fail : the file is not extracted because the folder + // does not exist and can not be created + // write_error : the file was not extracted because there was a + // error while writing the file + // read_error : the file was not extracted because there was a error + // while reading the file + // invalid_header : the file was not extracted because of an archive + // format error (bad file header) + // Note that each time a method can continue operating when there + // is an action error on a file, the error is only logged in the file status. + // Return Values : + // 0 on an unrecoverable failure, + // The list of the files in the archive. + // -------------------------------------------------------------------------------- + function listContent() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Call the extracting fct + $p_list = array(); + if (($v_result = $this->privList($p_list)) != 1) + { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // extract($p_path="./", $p_remove_path="") + // extract([$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method extract all the files / directories from the archive to the + // folder indicated in $p_path. + // If you want to ignore the 'root' part of path of the memorized files + // you can indicate this in the optional $p_remove_path parameter. + // By default, if a newer file with the same name already exists, the + // file is not extracted. + // + // If both PCLZIP_OPT_PATH and PCLZIP_OPT_ADD_PATH aoptions + // are used, the path indicated in PCLZIP_OPT_ADD_PATH is append + // at the end of the path value of PCLZIP_OPT_PATH. + // Parameters : + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 or a negative value on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function extract() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_EXTRACT_IN_OUTPUT => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Trace + + // ----- Call the extracting fct + $p_list = array(); + $v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, + $v_remove_all_path, $v_options); + if ($v_result < 1) { + unset($p_list); + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + + // -------------------------------------------------------------------------------- + // Function : + // extractByIndex($p_index, $p_path="./", $p_remove_path="") + // extractByIndex($p_index, [$p_option, $p_option_value, ...]) + // Description : + // This method supports two synopsis. The first one is historical. + // This method is doing a partial extract of the archive. + // The extracted files or folders are identified by their index in the + // archive (from 0 to n). + // Note that if the index identify a folder, only the folder entry is + // extracted, not all the files included in the archive. + // Parameters : + // $p_index : A single index (integer) or a string of indexes of files to + // extract. The form of the string is "0,4-6,8-12" with only numbers + // and '-' for range or ',' to separate ranges. No spaces or ';' + // are allowed. + // $p_path : Path where the files and directories are to be extracted + // $p_remove_path : First part ('root' part) of the memorized path + // (if any similar) to remove while extracting. + // Options : + // PCLZIP_OPT_PATH : + // PCLZIP_OPT_ADD_PATH : + // PCLZIP_OPT_REMOVE_PATH : + // PCLZIP_OPT_REMOVE_ALL_PATH : + // PCLZIP_OPT_EXTRACT_AS_STRING : The files are extracted as strings and + // not as files. + // The resulting content is in a new field 'content' in the file + // structure. + // This option must be used alone (any other options are ignored). + // PCLZIP_CB_PRE_EXTRACT : + // PCLZIP_CB_POST_EXTRACT : + // Return Values : + // 0 on failure, + // The list of the extracted files, with a status of the action. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + //function extractByIndex($p_index, options...) + function extractByIndex($p_index) + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); +// $v_path = "./"; + $v_path = ''; + $v_remove_path = ""; + $v_remove_all_path = false; + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Default values for option + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + + // ----- Look for arguments + if ($v_size > 1) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Remove form the options list the first argument + array_shift($v_arg_list); + $v_size--; + + // ----- Look for first arg + if ((is_integer($v_arg_list[0])) && ($v_arg_list[0] > 77000)) { + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_PATH => 'optional', + PCLZIP_OPT_REMOVE_PATH => 'optional', + PCLZIP_OPT_REMOVE_ALL_PATH => 'optional', + PCLZIP_OPT_EXTRACT_AS_STRING => 'optional', + PCLZIP_OPT_ADD_PATH => 'optional', + PCLZIP_CB_PRE_EXTRACT => 'optional', + PCLZIP_CB_POST_EXTRACT => 'optional', + PCLZIP_OPT_SET_CHMOD => 'optional', + PCLZIP_OPT_REPLACE_NEWER => 'optional' + ,PCLZIP_OPT_STOP_ON_ERROR => 'optional' + ,PCLZIP_OPT_EXTRACT_DIR_RESTRICTION => 'optional', + PCLZIP_OPT_TEMP_FILE_THRESHOLD => 'optional', + PCLZIP_OPT_TEMP_FILE_ON => 'optional', + PCLZIP_OPT_TEMP_FILE_OFF => 'optional' + )); + if ($v_result != 1) { + return 0; + } + + // ----- Set the arguments + if (isset($v_options[PCLZIP_OPT_PATH])) { + $v_path = $v_options[PCLZIP_OPT_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_PATH])) { + $v_remove_path = $v_options[PCLZIP_OPT_REMOVE_PATH]; + } + if (isset($v_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $v_remove_all_path = $v_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + if (isset($v_options[PCLZIP_OPT_ADD_PATH])) { + // ----- Check for '/' in last path char + if ((strlen($v_path) > 0) && (substr($v_path, -1) != '/')) { + $v_path .= '/'; + } + $v_path .= $v_options[PCLZIP_OPT_ADD_PATH]; + } + if (!isset($v_options[PCLZIP_OPT_EXTRACT_AS_STRING])) { + $v_options[PCLZIP_OPT_EXTRACT_AS_STRING] = FALSE; + } + else { + } + } + + // ----- Look for 2 args + // Here we need to support the first historic synopsis of the + // method. + else { + + // ----- Get the first argument + $v_path = $v_arg_list[0]; + + // ----- Look for the optional second argument + if ($v_size == 2) { + $v_remove_path = $v_arg_list[1]; + } + else if ($v_size > 2) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid number / type of arguments"); + + // ----- Return + return 0; + } + } + } + + // ----- Trace + + // ----- Trick + // Here I want to reuse extractByRule(), so I need to parse the $p_index + // with privParseOptions() + $v_arg_trick = array (PCLZIP_OPT_BY_INDEX, $p_index); + $v_options_trick = array(); + $v_result = $this->privParseOptions($v_arg_trick, sizeof($v_arg_trick), $v_options_trick, + array (PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + $v_options[PCLZIP_OPT_BY_INDEX] = $v_options_trick[PCLZIP_OPT_BY_INDEX]; + + // ----- Look for default option values + $this->privOptionDefaultThreshold($v_options); + + // ----- Call the extracting fct + if (($v_result = $this->privExtractByRule($p_list, $v_path, $v_remove_path, $v_remove_all_path, $v_options)) < 1) { + return(0); + } + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : + // delete([$p_option, $p_option_value, ...]) + // Description : + // This method removes files from the archive. + // If no parameters are given, then all the archive is emptied. + // Parameters : + // None or optional arguments. + // Options : + // PCLZIP_OPT_BY_INDEX : + // PCLZIP_OPT_BY_NAME : + // PCLZIP_OPT_BY_EREG : + // PCLZIP_OPT_BY_PREG : + // Return Values : + // 0 on failure, + // The list of the files which are still present in the archive. + // (see PclZip::listContent() for list entry format) + // -------------------------------------------------------------------------------- + function delete() + { + $v_result=1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Set default values + $v_options = array(); + + // ----- Look for variable options arguments + $v_size = func_num_args(); + + // ----- Look for arguments + if ($v_size > 0) { + // ----- Get the arguments + $v_arg_list = func_get_args(); + + // ----- Parse the options + $v_result = $this->privParseOptions($v_arg_list, $v_size, $v_options, + array (PCLZIP_OPT_BY_NAME => 'optional', + PCLZIP_OPT_BY_EREG => 'optional', + PCLZIP_OPT_BY_PREG => 'optional', + PCLZIP_OPT_BY_INDEX => 'optional' )); + if ($v_result != 1) { + return 0; + } + } + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Call the delete fct + $v_list = array(); + if (($v_result = $this->privDeleteByRule($v_list, $v_options)) != 1) { + $this->privSwapBackMagicQuotes(); + unset($v_list); + return(0); + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : deleteByIndex() + // Description : + // ***** Deprecated ***** + // delete(PCLZIP_OPT_BY_INDEX, $p_index) should be prefered. + // -------------------------------------------------------------------------------- + function deleteByIndex($p_index) + { + + $p_list = $this->delete(PCLZIP_OPT_BY_INDEX, $p_index); + + // ----- Return + return $p_list; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : properties() + // Description : + // This method gives the properties of the archive. + // The properties are : + // nb : Number of files in the archive + // comment : Comment associated with the archive file + // status : not_exist, ok + // Parameters : + // None + // Return Values : + // 0 on failure, + // An array with the archive properties. + // -------------------------------------------------------------------------------- + function properties() + { + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + $this->privSwapBackMagicQuotes(); + return(0); + } + + // ----- Default properties + $v_prop = array(); + $v_prop['comment'] = ''; + $v_prop['nb'] = 0; + $v_prop['status'] = 'not_exist'; + + // ----- Look if file exists + if (@is_file($this->zipname)) + { + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return 0; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return 0; + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Set the user attributes + $v_prop['comment'] = $v_central_dir['comment']; + $v_prop['nb'] = $v_central_dir['entries']; + $v_prop['status'] = 'ok'; + } + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_prop; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : duplicate() + // Description : + // This method creates an archive by copying the content of an other one. If + // the archive already exist, it is replaced by the new one without any warning. + // Parameters : + // $p_archive : The filename of a valid archive, or + // a valid PclZip object. + // Return Values : + // 1 on success. + // 0 or a negative value on error (error code). + // -------------------------------------------------------------------------------- + function duplicate($p_archive) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the $p_archive is a PclZip object + if ((is_object($p_archive)) && (get_class($p_archive) == 'pclzip')) + { + + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive->zipname); + } + + // ----- Look if the $p_archive is a string (so a filename) + else if (is_string($p_archive)) + { + + // ----- Check that $p_archive is a valid zip file + // TBC : Should also check the archive format + if (!is_file($p_archive)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "No file with filename '".$p_archive."'"); + $v_result = PCLZIP_ERR_MISSING_FILE; + } + else { + // ----- Duplicate the archive + $v_result = $this->privDuplicate($p_archive); + } + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : merge() + // Description : + // This method merge the $p_archive_to_add archive at the end of the current + // one ($this). + // If the archive ($this) does not exist, the merge becomes a duplicate. + // If the $p_archive_to_add archive does not exist, the merge is a success. + // Parameters : + // $p_archive_to_add : It can be directly the filename of a valid zip archive, + // or a PclZip object archive. + // Return Values : + // 1 on success, + // 0 or negative values on error (see below). + // -------------------------------------------------------------------------------- + function merge($p_archive_to_add) + { + $v_result = 1; + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Check archive + if (!$this->privCheckFormat()) { + return(0); + } + + // ----- Look if the $p_archive_to_add is a PclZip object + if ((is_object($p_archive_to_add)) && (get_class($p_archive_to_add) == 'pclzip')) + { + + // ----- Merge the archive + $v_result = $this->privMerge($p_archive_to_add); + } + + // ----- Look if the $p_archive_to_add is a string (so a filename) + else if (is_string($p_archive_to_add)) + { + + // ----- Create a temporary archive + $v_object_archive = new PclZip($p_archive_to_add); + + // ----- Merge the archive + $v_result = $this->privMerge($v_object_archive); + } + + // ----- Invalid variable + else + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid variable type p_archive_to_add"); + $v_result = PCLZIP_ERR_INVALID_PARAMETER; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : errorCode() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorCode() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorCode()); + } + else { + return($this->error_code); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorName() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorName($p_with_code=false) + { + $v_name = array ( PCLZIP_ERR_NO_ERROR => 'PCLZIP_ERR_NO_ERROR', + PCLZIP_ERR_WRITE_OPEN_FAIL => 'PCLZIP_ERR_WRITE_OPEN_FAIL', + PCLZIP_ERR_READ_OPEN_FAIL => 'PCLZIP_ERR_READ_OPEN_FAIL', + PCLZIP_ERR_INVALID_PARAMETER => 'PCLZIP_ERR_INVALID_PARAMETER', + PCLZIP_ERR_MISSING_FILE => 'PCLZIP_ERR_MISSING_FILE', + PCLZIP_ERR_FILENAME_TOO_LONG => 'PCLZIP_ERR_FILENAME_TOO_LONG', + PCLZIP_ERR_INVALID_ZIP => 'PCLZIP_ERR_INVALID_ZIP', + PCLZIP_ERR_BAD_EXTRACTED_FILE => 'PCLZIP_ERR_BAD_EXTRACTED_FILE', + PCLZIP_ERR_DIR_CREATE_FAIL => 'PCLZIP_ERR_DIR_CREATE_FAIL', + PCLZIP_ERR_BAD_EXTENSION => 'PCLZIP_ERR_BAD_EXTENSION', + PCLZIP_ERR_BAD_FORMAT => 'PCLZIP_ERR_BAD_FORMAT', + PCLZIP_ERR_DELETE_FILE_FAIL => 'PCLZIP_ERR_DELETE_FILE_FAIL', + PCLZIP_ERR_RENAME_FILE_FAIL => 'PCLZIP_ERR_RENAME_FILE_FAIL', + PCLZIP_ERR_BAD_CHECKSUM => 'PCLZIP_ERR_BAD_CHECKSUM', + PCLZIP_ERR_INVALID_ARCHIVE_ZIP => 'PCLZIP_ERR_INVALID_ARCHIVE_ZIP', + PCLZIP_ERR_MISSING_OPTION_VALUE => 'PCLZIP_ERR_MISSING_OPTION_VALUE', + PCLZIP_ERR_INVALID_OPTION_VALUE => 'PCLZIP_ERR_INVALID_OPTION_VALUE', + PCLZIP_ERR_UNSUPPORTED_COMPRESSION => 'PCLZIP_ERR_UNSUPPORTED_COMPRESSION', + PCLZIP_ERR_UNSUPPORTED_ENCRYPTION => 'PCLZIP_ERR_UNSUPPORTED_ENCRYPTION' + ,PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE => 'PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE' + ,PCLZIP_ERR_DIRECTORY_RESTRICTION => 'PCLZIP_ERR_DIRECTORY_RESTRICTION' + ); + + if (isset($v_name[$this->error_code])) { + $v_value = $v_name[$this->error_code]; + } + else { + $v_value = 'NoName'; + } + + if ($p_with_code) { + return($v_value.' ('.$this->error_code.')'); + } + else { + return($v_value); + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : errorInfo() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function errorInfo($p_full=false) + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + return(PclErrorString()); + } + else { + if ($p_full) { + return($this->errorName(true)." : ".$this->error_string); + } + else { + return($this->error_string." [code ".$this->error_code."]"); + } + } + } + // -------------------------------------------------------------------------------- + + +// -------------------------------------------------------------------------------- +// ***** UNDER THIS LINE ARE DEFINED PRIVATE INTERNAL FUNCTIONS ***** +// ***** ***** +// ***** THESES FUNCTIONS MUST NOT BE USED DIRECTLY ***** +// -------------------------------------------------------------------------------- + + + + // -------------------------------------------------------------------------------- + // Function : privCheckFormat() + // Description : + // This method check that the archive exists and is a valid zip archive. + // Several level of check exists. (futur) + // Parameters : + // $p_level : Level of check. Default 0. + // 0 : Check the first bytes (magic codes) (default value)) + // 1 : 0 + Check the central directory (futur) + // 2 : 1 + Check each file header (futur) + // Return Values : + // true on success, + // false on error, the error code is set. + // -------------------------------------------------------------------------------- + function privCheckFormat($p_level=0) + { + $v_result = true; + + // ----- Reset the file system cache + clearstatcache(); + + // ----- Reset the error handler + $this->privErrorReset(); + + // ----- Look if the file exits + if (!is_file($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_FILE, "Missing archive file '".$this->zipname."'"); + return(false); + } + + // ----- Check that the file is readeable + if (!is_readable($this->zipname)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to read archive '".$this->zipname."'"); + return(false); + } + + // ----- Check the magic code + // TBC + + // ----- Check the central header + // TBC + + // ----- Check each file header + // TBC + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privParseOptions() + // Description : + // This internal methods reads the variable list of arguments ($p_options_list, + // $p_size) and generate an array with the options and values ($v_result_list). + // $v_requested_options contains the options that can be present and those that + // must be present. + // $v_requested_options is an array, with the option value as key, and 'optional', + // or 'mandatory' as value. + // Parameters : + // See above. + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privParseOptions(&$p_options_list, $p_size, &$v_result_list, $v_requested_options=false) + { + $v_result=1; + + // ----- Read the options + $i=0; + while ($i<$p_size) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$p_options_list[$i]])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid optional parameter '".$p_options_list[$i]."' for this method"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for next option + switch ($p_options_list[$i]) { + // ----- Look for options that request a path value + case PCLZIP_OPT_PATH : + case PCLZIP_OPT_REMOVE_PATH : + case PCLZIP_OPT_ADD_PATH : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_THRESHOLD : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + // ----- Check the value + $v_value = $p_options_list[$i+1]; + if ((!is_integer($v_value)) || ($v_value<0)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Integer expected for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + return PclZip::errorCode(); + } + + // ----- Get the value (and convert it in bytes) + $v_result_list[$p_options_list[$i]] = $v_value*1048576; + $i++; + break; + + case PCLZIP_OPT_TEMP_FILE_ON : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_OFF])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_OFF'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_TEMP_FILE_OFF : + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_ON])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_ON'"); + return PclZip::errorCode(); + } + // ----- Check for incompatible options + if (isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Option '".PclZipUtilOptionText($p_options_list[$i])."' can not be used with option 'PCLZIP_OPT_TEMP_FILE_THRESHOLD'"); + return PclZip::errorCode(); + } + + $v_result_list[$p_options_list[$i]] = true; + break; + + case PCLZIP_OPT_EXTRACT_DIR_RESTRICTION : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if ( is_string($p_options_list[$i+1]) + && ($p_options_list[$i+1] != '')) { + $v_result_list[$p_options_list[$i]] = PclZipUtilTranslateWinPath($p_options_list[$i+1], FALSE); + $i++; + } + else { + } + break; + + // ----- Look for options that request an array of string for value + case PCLZIP_OPT_BY_NAME : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]][0] = $p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an EREG or PREG expression + case PCLZIP_OPT_BY_EREG : + // ereg() is deprecated starting with PHP 5.3. Move PCLZIP_OPT_BY_EREG + // to PCLZIP_OPT_BY_PREG + $p_options_list[$i] = PCLZIP_OPT_BY_PREG; + case PCLZIP_OPT_BY_PREG : + //case PCLZIP_OPT_CRYPT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Wrong parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that takes a string + case PCLZIP_OPT_COMMENT : + case PCLZIP_OPT_ADD_COMMENT : + case PCLZIP_OPT_PREPEND_COMMENT : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, + "Missing parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + if (is_string($p_options_list[$i+1])) { + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, + "Wrong parameter value for option '" + .PclZipUtilOptionText($p_options_list[$i]) + ."'"); + + // ----- Return + return PclZip::errorCode(); + } + $i++; + break; + + // ----- Look for options that request an array of index + case PCLZIP_OPT_BY_INDEX : + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_work_list = array(); + if (is_string($p_options_list[$i+1])) { + + // ----- Remove spaces + $p_options_list[$i+1] = strtr($p_options_list[$i+1], ' ', ''); + + // ----- Parse items + $v_work_list = explode(",", $p_options_list[$i+1]); + } + else if (is_integer($p_options_list[$i+1])) { + $v_work_list[0] = $p_options_list[$i+1].'-'.$p_options_list[$i+1]; + } + else if (is_array($p_options_list[$i+1])) { + $v_work_list = $p_options_list[$i+1]; + } + else { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Value must be integer, string or array for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Reduce the index list + // each index item in the list must be a couple with a start and + // an end value : [0,3], [5-5], [8-10], ... + // ----- Check the format of each item + $v_sort_flag=false; + $v_sort_value=0; + for ($j=0; $j= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_result_list[$p_options_list[$i]] = $p_options_list[$i+1]; + $i++; + break; + + // ----- Look for options that request a call-back + case PCLZIP_CB_PRE_EXTRACT : + case PCLZIP_CB_POST_EXTRACT : + case PCLZIP_CB_PRE_ADD : + case PCLZIP_CB_POST_ADD : + /* for futur use + case PCLZIP_CB_PRE_DELETE : + case PCLZIP_CB_POST_DELETE : + case PCLZIP_CB_PRE_LIST : + case PCLZIP_CB_POST_LIST : + */ + // ----- Check the number of parameters + if (($i+1) >= $p_size) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_MISSING_OPTION_VALUE, "Missing parameter value for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Get the value + $v_function_name = $p_options_list[$i+1]; + + // ----- Check that the value is a valid existing function + if (!function_exists($v_function_name)) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_OPTION_VALUE, "Function '".$v_function_name."()' is not an existing function for option '".PclZipUtilOptionText($p_options_list[$i])."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Set the attribute + $v_result_list[$p_options_list[$i]] = $v_function_name; + $i++; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '" + .$p_options_list[$i]."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Next options + $i++; + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($v_result_list[$key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + + // ----- Return + return PclZip::errorCode(); + } + } + } + } + + // ----- Look for default values + if (!isset($v_result_list[PCLZIP_OPT_TEMP_FILE_THRESHOLD])) { + + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOptionDefaultThreshold() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privOptionDefaultThreshold(&$p_options) + { + $v_result=1; + + if (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + || isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) { + return $v_result; + } + + // ----- Get 'memory_limit' configuration value + $v_memory_limit = ini_get('memory_limit'); + $v_memory_limit = trim($v_memory_limit); + $last = strtolower(substr($v_memory_limit, -1)); + + if($last == 'g') + //$v_memory_limit = $v_memory_limit*1024*1024*1024; + $v_memory_limit = $v_memory_limit*1073741824; + if($last == 'm') + //$v_memory_limit = $v_memory_limit*1024*1024; + $v_memory_limit = $v_memory_limit*1048576; + if($last == 'k') + $v_memory_limit = $v_memory_limit*1024; + + $p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] = floor($v_memory_limit*PCLZIP_TEMPORARY_FILE_RATIO); + + + // ----- Sanity check : No threshold if value lower than 1M + if ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] < 1048576) { + unset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrParseAtt() + // Description : + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrParseAtt(&$p_file_list, &$p_filedescr, $v_options, $v_requested_options=false) + { + $v_result=1; + + // ----- For each file in the list check the attributes + foreach ($p_file_list as $v_key => $v_value) { + + // ----- Check if the option is supported + if (!isset($v_requested_options[$v_key])) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file attribute '".$v_key."' for this file"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for attribute + switch ($v_key) { + case PCLZIP_ATT_FILE_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['filename'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['filename'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + break; + + case PCLZIP_ATT_FILE_NEW_SHORT_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_short_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_short_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty short filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + case PCLZIP_ATT_FILE_NEW_FULL_NAME : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['new_full_name'] = PclZipUtilPathReduction($v_value); + + if ($p_filedescr['new_full_name'] == '') { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid empty full filename for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + break; + + // ----- Look for options that takes a string + case PCLZIP_ATT_FILE_COMMENT : + if (!is_string($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". String expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['comment'] = $v_value; + break; + + case PCLZIP_ATT_FILE_MTIME : + if (!is_integer($v_value)) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ATTRIBUTE_VALUE, "Invalid type ".gettype($v_value).". Integer expected for attribute '".PclZipUtilOptionText($v_key)."'"); + return PclZip::errorCode(); + } + + $p_filedescr['mtime'] = $v_value; + break; + + case PCLZIP_ATT_FILE_CONTENT : + $p_filedescr['content'] = $v_value; + break; + + default : + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, + "Unknown parameter '".$v_key."'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for mandatory options + if ($v_requested_options !== false) { + for ($key=reset($v_requested_options); $key=key($v_requested_options); $key=next($v_requested_options)) { + // ----- Look for mandatory option + if ($v_requested_options[$key] == 'mandatory') { + // ----- Look if present + if (!isset($p_file_list[$key])) { + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Missing mandatory parameter ".PclZipUtilOptionText($key)."(".$key.")"); + return PclZip::errorCode(); + } + } + } + } + + // end foreach + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privFileDescrExpand() + // Description : + // This method look for each item of the list to see if its a file, a folder + // or a string to be added as file. For any other type of files (link, other) + // just ignore the item. + // Then prepare the information that will be stored for that file. + // When its a folder, expand the folder with all the files that are in that + // folder (recursively). + // Parameters : + // Return Values : + // 1 on success. + // 0 on failure. + // -------------------------------------------------------------------------------- + function privFileDescrExpand(&$p_filedescr_list, &$p_options) + { + $v_result=1; + + // ----- Create a result list + $v_result_list = array(); + + // ----- Look each entry + for ($i=0; $iprivCalculateStoredFilename($v_descr, $p_options); + + // ----- Add the descriptor in result list + $v_result_list[sizeof($v_result_list)] = $v_descr; + + // ----- Look for folder + if ($v_descr['type'] == 'folder') { + // ----- List of items in folder + $v_dirlist_descr = array(); + $v_dirlist_nb = 0; + if ($v_folder_handler = @opendir($v_descr['filename'])) { + while (($v_item_handler = @readdir($v_folder_handler)) !== false) { + + // ----- Skip '.' and '..' + if (($v_item_handler == '.') || ($v_item_handler == '..')) { + continue; + } + + // ----- Compose the full filename + $v_dirlist_descr[$v_dirlist_nb]['filename'] = $v_descr['filename'].'/'.$v_item_handler; + + // ----- Look for different stored filename + // Because the name of the folder was changed, the name of the + // files/sub-folders also change + if (($v_descr['stored_filename'] != $v_descr['filename']) + && (!isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH]))) { + if ($v_descr['stored_filename'] != '') { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_descr['stored_filename'].'/'.$v_item_handler; + } + else { + $v_dirlist_descr[$v_dirlist_nb]['new_full_name'] = $v_item_handler; + } + } + + $v_dirlist_nb++; + } + + @closedir($v_folder_handler); + } + else { + // TBC : unable to open folder in read mode + } + + // ----- Expand each element of the list + if ($v_dirlist_nb != 0) { + // ----- Expand + if (($v_result = $this->privFileDescrExpand($v_dirlist_descr, $p_options)) != 1) { + return $v_result; + } + + // ----- Concat the resulting list + $v_result_list = array_merge($v_result_list, $v_dirlist_descr); + } + else { + } + + // ----- Free local array + unset($v_dirlist_descr); + } + } + + // ----- Get the result list + $p_filedescr_list = $v_result_list; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCreate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCreate($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the file in write mode + if (($v_result = $this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Add the list of files + $v_result = $this->privAddList($p_filedescr_list, $p_result_list, $p_options); + + // ----- Close + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAdd() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAdd($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Look if the archive exists or is empty + if ((!is_file($this->zipname)) || (filesize($this->zipname) == 0)) + { + + // ----- Do a create + $v_result = $this->privCreate($p_filedescr_list, $p_result_list, $p_options); + + // ----- Return + return $v_result; + } + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Create the Central Dir files header + for ($i=0, $v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + fclose($v_zip_temp_fd); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = $v_central_dir['comment']; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_ADD_COMMENT])) { + $v_comment = $v_comment.$p_options[PCLZIP_OPT_ADD_COMMENT]; + } + if (isset($p_options[PCLZIP_OPT_PREPEND_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_PREPEND_COMMENT].$v_comment; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count+$v_central_dir['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privOpenFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privOpenFd($p_mode) + { + $v_result=1; + + // ----- Look if already open + if ($this->zip_fd != 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Zip file \''.$this->zipname.'\' already open'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, $p_mode)) == 0) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in '.$p_mode.' mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCloseFd() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privCloseFd() + { + $v_result=1; + + if ($this->zip_fd != 0) + @fclose($this->zip_fd); + $this->zip_fd = 0; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddList() + // Description : + // $p_add_dir and $p_remove_dir will give the ability to memorize a path which is + // different from the real path of the file. This is usefull if you want to have PclTar + // running in any directory, and memorize relative path from an other directory. + // Parameters : + // $p_list : An array containing the file or directory names to add in the tar + // $p_result_list : list of added files with their properties (specially the status field) + // $p_add_dir : Path to add in the filename path archived + // $p_remove_dir : Path to remove in the filename path archived + // Return Values : + // -------------------------------------------------------------------------------- +// function privAddList($p_list, &$p_result_list, $p_add_dir, $p_remove_dir, $p_remove_all_dir, &$p_options) + function privAddList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + + // ----- Add the files + $v_header_list = array(); + if (($v_result = $this->privAddFileList($p_filedescr_list, $v_header_list, $p_options)) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($this->zip_fd); + + // ----- Create the Central Dir files header + for ($i=0,$v_count=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + // ----- Return + return $v_result; + } + $v_count++; + } + + // ----- Transform the header to a 'usable' info + $this->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($this->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_count, $v_size, $v_offset, $v_comment)) != 1) + { + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileList() + // Description : + // Parameters : + // $p_filedescr_list : An array containing the file description + // or directory names to add in the zip + // $p_result_list : list of added files with their properties (specially the status field) + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileList($p_filedescr_list, &$p_result_list, &$p_options) + { + $v_result=1; + $v_header = array(); + + // ----- Recuperate the current number of elt in list + $v_nb = sizeof($p_result_list); + + // ----- Loop on the files + for ($j=0; ($jprivAddFile($p_filedescr_list[$j], $v_header, + $p_options); + if ($v_result != 1) { + return $v_result; + } + + // ----- Store the file infos + $p_result_list[$v_nb++] = $v_header; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=1; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + // TBC : Already done in the fileAtt check ... ? + if ($p_filename == "") { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_PARAMETER, "Invalid file list parameter (invalid or empty list)"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for a stored different filename + /* TBC : Removed + if (isset($p_filedescr['stored_filename'])) { + $v_stored_filename = $p_filedescr['stored_filename']; + } + else { + $v_stored_filename = $p_filedescr['stored_filename']; + } + */ + + // ----- Set the file properties + clearstatcache(); + $p_header['version'] = 20; + $p_header['version_extracted'] = 10; + $p_header['flag'] = 0; + $p_header['compression'] = 0; + $p_header['crc'] = 0; + $p_header['compressed_size'] = 0; + $p_header['filename_len'] = strlen($p_filename); + $p_header['extra_len'] = 0; + $p_header['disk'] = 0; + $p_header['internal'] = 0; + $p_header['offset'] = 0; + $p_header['filename'] = $p_filename; +// TBC : Removed $p_header['stored_filename'] = $v_stored_filename; + $p_header['stored_filename'] = $p_filedescr['stored_filename']; + $p_header['extra'] = ''; + $p_header['status'] = 'ok'; + $p_header['index'] = -1; + + // ----- Look for regular file + if ($p_filedescr['type']=='file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for regular folder + else if ($p_filedescr['type']=='folder') { + $p_header['external'] = 0x00000010; + $p_header['mtime'] = filemtime($p_filename); + $p_header['size'] = filesize($p_filename); + } + + // ----- Look for virtual file + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['external'] = 0x00000000; + $p_header['size'] = strlen($p_filedescr['content']); + } + + + // ----- Look for filetime + if (isset($p_filedescr['mtime'])) { + $p_header['mtime'] = $p_filedescr['mtime']; + } + else if ($p_filedescr['type'] == 'virtual_file') { + $p_header['mtime'] = time(); + } + else { + $p_header['mtime'] = filemtime($p_filename); + } + + // ------ Look for file comment + if (isset($p_filedescr['comment'])) { + $p_header['comment_len'] = strlen($p_filedescr['comment']); + $p_header['comment'] = $p_filedescr['comment']; + } + else { + $p_header['comment_len'] = 0; + $p_header['comment'] = ''; + } + + // ----- Look for pre-add callback + if (isset($p_options[PCLZIP_CB_PRE_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_ADD].'(PCLZIP_CB_PRE_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_ADD](PCLZIP_CB_PRE_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_header['status'] = "skipped"; + $v_result = 1; + } + + // ----- Update the informations + // Only some fields can be modified + if ($p_header['stored_filename'] != $v_local_header['stored_filename']) { + $p_header['stored_filename'] = PclZipUtilPathReduction($v_local_header['stored_filename']); + } + } + + // ----- Look for empty stored filename + if ($p_header['stored_filename'] == "") { + $p_header['status'] = "filtered"; + } + + // ----- Check the path length + if (strlen($p_header['stored_filename']) > 0xFF) { + $p_header['status'] = 'filename_too_long'; + } + + // ----- Look if no error, or file not skipped + if ($p_header['status'] == 'ok') { + + // ----- Look for a file + if ($p_filedescr['type'] == 'file') { + // ----- Look for using temporary file to zip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_header['size'])) ) ) { + $v_result = $this->privAddFileUsingTempFile($p_filedescr, $p_header, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Use "in memory" zip algo + else { + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Read the file content + $v_content = @fread($v_file, $p_header['size']); + + // ----- Close the file + @fclose($v_file); + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + + } + + } + + // ----- Look for a virtual file (a file from string) + else if ($p_filedescr['type'] == 'virtual_file') { + + $v_content = $p_filedescr['content']; + + // ----- Calculate the CRC + $p_header['crc'] = @crc32($v_content); + + // ----- Look for no compression + if ($p_options[PCLZIP_OPT_NO_COMPRESSION]) { + // ----- Set header parameters + $p_header['compressed_size'] = $p_header['size']; + $p_header['compression'] = 0; + } + + // ----- Look for normal compression + else { + // ----- Compress the content + $v_content = @gzdeflate($v_content); + + // ----- Set header parameters + $p_header['compressed_size'] = strlen($v_content); + $p_header['compression'] = 8; + } + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + @fclose($v_file); + return $v_result; + } + + // ----- Write the compressed (or not) content + @fwrite($this->zip_fd, $v_content, $p_header['compressed_size']); + } + + // ----- Look for a directory + else if ($p_filedescr['type'] == 'folder') { + // ----- Look for directory last '/' + if (@substr($p_header['stored_filename'], -1) != '/') { + $p_header['stored_filename'] .= '/'; + } + + // ----- Set the file properties + $p_header['size'] = 0; + //$p_header['external'] = 0x41FF0010; // Value for a folder : to be checked + $p_header['external'] = 0x00000010; // Value for a folder : to be checked + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) + { + return $v_result; + } + } + } + + // ----- Look for post-add callback + if (isset($p_options[PCLZIP_CB_POST_ADD])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_header, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_ADD].'(PCLZIP_CB_POST_ADD, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_ADD](PCLZIP_CB_POST_ADD, $v_local_header); + if ($v_result == 0) { + // ----- Ignored + $v_result = 1; + } + + // ----- Update the informations + // Nothing can be modified + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privAddFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privAddFileUsingTempFile($p_filedescr, &$p_header, &$p_options) + { + $v_result=PCLZIP_ERR_NO_ERROR; + + // ----- Working variable + $p_filename = $p_filedescr['filename']; + + + // ----- Open the source file + if (($v_file = @fopen($p_filename, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, "Unable to open file '$p_filename' in binary read mode"); + return PclZip::errorCode(); + } + + // ----- Creates a compressed temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_file_compressed = @gzopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = filesize($p_filename); + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @gzputs($v_file_compressed, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file); + @gzclose($v_file_compressed); + + // ----- Check the minimum file size + if (filesize($v_gzip_temp_name) < 18) { + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'gzip temporary file \''.$v_gzip_temp_name.'\' has invalid filesize - should be minimum 18 bytes'); + return PclZip::errorCode(); + } + + // ----- Extract the compressed attributes + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the gzip file header + $v_binary_data = @fread($v_file_compressed, 10); + $v_data_header = unpack('a1id1/a1id2/a1cm/a1flag/Vmtime/a1xfl/a1os', $v_binary_data); + + // ----- Check some parameters + $v_data_header['os'] = bin2hex($v_data_header['os']); + + // ----- Read the gzip file footer + @fseek($v_file_compressed, filesize($v_gzip_temp_name)-8); + $v_binary_data = @fread($v_file_compressed, 8); + $v_data_footer = unpack('Vcrc/Vcompressed_size', $v_binary_data); + + // ----- Set the attributes + $p_header['compression'] = ord($v_data_header['cm']); + //$p_header['mtime'] = $v_data_header['mtime']; + $p_header['crc'] = $v_data_footer['crc']; + $p_header['compressed_size'] = filesize($v_gzip_temp_name)-18; + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Call the header generation + if (($v_result = $this->privWriteFileHeader($p_header)) != 1) { + return $v_result; + } + + // ----- Add the compressed data + if (($v_file_compressed = @fopen($v_gzip_temp_name, "rb")) == 0) + { + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + fseek($v_file_compressed, 10); + $v_size = $p_header['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($v_file_compressed, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close the file + @fclose($v_file_compressed); + + // ----- Unlink the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCalculateStoredFilename() + // Description : + // Based on file descriptor properties and global options, this method + // calculate the filename that will be stored in the archive. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privCalculateStoredFilename(&$p_filedescr, &$p_options) + { + $v_result=1; + + // ----- Working variables + $p_filename = $p_filedescr['filename']; + if (isset($p_options[PCLZIP_OPT_ADD_PATH])) { + $p_add_dir = $p_options[PCLZIP_OPT_ADD_PATH]; + } + else { + $p_add_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_PATH])) { + $p_remove_dir = $p_options[PCLZIP_OPT_REMOVE_PATH]; + } + else { + $p_remove_dir = ''; + } + if (isset($p_options[PCLZIP_OPT_REMOVE_ALL_PATH])) { + $p_remove_all_dir = $p_options[PCLZIP_OPT_REMOVE_ALL_PATH]; + } + else { + $p_remove_all_dir = 0; + } + + + // ----- Look for full name change + if (isset($p_filedescr['new_full_name'])) { + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($p_filedescr['new_full_name']); + } + + // ----- Look for path and/or short name change + else { + + // ----- Look for short name change + // Its when we cahnge just the filename but not the path + if (isset($p_filedescr['new_short_name'])) { + $v_path_info = pathinfo($p_filename); + $v_dir = ''; + if ($v_path_info['dirname'] != '') { + $v_dir = $v_path_info['dirname'].'/'; + } + $v_stored_filename = $v_dir.$p_filedescr['new_short_name']; + } + else { + // ----- Calculate the stored filename + $v_stored_filename = $p_filename; + } + + // ----- Look for all path to remove + if ($p_remove_all_dir) { + $v_stored_filename = basename($p_filename); + } + // ----- Look for partial path remove + else if ($p_remove_dir != "") { + if (substr($p_remove_dir, -1) != '/') + $p_remove_dir .= "/"; + + if ( (substr($p_filename, 0, 2) == "./") + || (substr($p_remove_dir, 0, 2) == "./")) { + + if ( (substr($p_filename, 0, 2) == "./") + && (substr($p_remove_dir, 0, 2) != "./")) { + $p_remove_dir = "./".$p_remove_dir; + } + if ( (substr($p_filename, 0, 2) != "./") + && (substr($p_remove_dir, 0, 2) == "./")) { + $p_remove_dir = substr($p_remove_dir, 2); + } + } + + $v_compare = PclZipUtilPathInclusion($p_remove_dir, + $v_stored_filename); + if ($v_compare > 0) { + if ($v_compare == 2) { + $v_stored_filename = ""; + } + else { + $v_stored_filename = substr($v_stored_filename, + strlen($p_remove_dir)); + } + } + } + + // ----- Remove drive letter if any + $v_stored_filename = PclZipUtilTranslateWinPath($v_stored_filename); + + // ----- Look for path to add + if ($p_add_dir != "") { + if (substr($p_add_dir, -1) == "/") + $v_stored_filename = $p_add_dir.$v_stored_filename; + else + $v_stored_filename = $p_add_dir."/".$v_stored_filename; + } + } + + // ----- Filename (reduce the path of stored name) + $v_stored_filename = PclZipUtilPathReduction($v_stored_filename); + $p_filedescr['stored_filename'] = $v_stored_filename; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteFileHeader(&$p_header) + { + $v_result=1; + + // ----- Store the offset position of the file + $p_header['offset'] = ftell($this->zip_fd); + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + // ----- Packed data + $v_binary_data = pack("VvvvvvVVVvv", 0x04034b50, + $p_header['version_extracted'], $p_header['flag'], + $p_header['compression'], $v_mtime, $v_mdate, + $p_header['crc'], $p_header['compressed_size'], + $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len']); + + // ----- Write the first 148 bytes of the header in the archive + fputs($this->zip_fd, $v_binary_data, 30); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralFileHeader(&$p_header) + { + $v_result=1; + + // TBC + //for(reset($p_header); $key = key($p_header); next($p_header)) { + //} + + // ----- Transform UNIX mtime to DOS format mdate/mtime + $v_date = getdate($p_header['mtime']); + $v_mtime = ($v_date['hours']<<11) + ($v_date['minutes']<<5) + $v_date['seconds']/2; + $v_mdate = (($v_date['year']-1980)<<9) + ($v_date['mon']<<5) + $v_date['mday']; + + + // ----- Packed data + $v_binary_data = pack("VvvvvvvVVVvvvvvVV", 0x02014b50, + $p_header['version'], $p_header['version_extracted'], + $p_header['flag'], $p_header['compression'], + $v_mtime, $v_mdate, $p_header['crc'], + $p_header['compressed_size'], $p_header['size'], + strlen($p_header['stored_filename']), + $p_header['extra_len'], $p_header['comment_len'], + $p_header['disk'], $p_header['internal'], + $p_header['external'], $p_header['offset']); + + // ----- Write the 42 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 46); + + // ----- Write the variable fields + if (strlen($p_header['stored_filename']) != 0) + { + fputs($this->zip_fd, $p_header['stored_filename'], strlen($p_header['stored_filename'])); + } + if ($p_header['extra_len'] != 0) + { + fputs($this->zip_fd, $p_header['extra'], $p_header['extra_len']); + } + if ($p_header['comment_len'] != 0) + { + fputs($this->zip_fd, $p_header['comment'], $p_header['comment_len']); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privWriteCentralHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privWriteCentralHeader($p_nb_entries, $p_size, $p_offset, $p_comment) + { + $v_result=1; + + // ----- Packed data + $v_binary_data = pack("VvvvvVVv", 0x06054b50, 0, 0, $p_nb_entries, + $p_nb_entries, $p_size, + $p_offset, strlen($p_comment)); + + // ----- Write the 22 bytes of the header in the zip file + fputs($this->zip_fd, $v_binary_data, 22); + + // ----- Write the variable fields + if (strlen($p_comment) != 0) + { + fputs($this->zip_fd, $p_comment, strlen($p_comment)); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privList() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privList(&$p_list) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Open the zip file + if (($this->zip_fd = @fopen($this->zipname, 'rb')) == 0) + { + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive \''.$this->zipname.'\' in binary read mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Go to beginning of Central Dir + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_central_dir['offset'])) + { + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + for ($i=0; $i<$v_central_dir['entries']; $i++) + { + // ----- Read the file header + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + $v_header['index'] = $i; + + // ----- Get the only interesting attributes + $this->privConvertHeader2FileInfo($v_header, $p_list[$i]); + unset($v_header); + } + + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Magic quotes trick + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privConvertHeader2FileInfo() + // Description : + // This function takes the file informations from the central directory + // entries and extract the interesting parameters that will be given back. + // The resulting file infos are set in the array $p_info + // $p_info['filename'] : Filename with full path. Given by user (add), + // extracted in the filesystem (extract). + // $p_info['stored_filename'] : Stored filename in the archive. + // $p_info['size'] = Size of the file. + // $p_info['compressed_size'] = Compressed size of the file. + // $p_info['mtime'] = Last modification date of the file. + // $p_info['comment'] = Comment associated with the file. + // $p_info['folder'] = true/false : indicates if the entry is a folder or not. + // $p_info['status'] = status of the action on the file. + // $p_info['crc'] = CRC of the file content. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privConvertHeader2FileInfo($p_header, &$p_info) + { + $v_result=1; + + // ----- Get the interesting attributes + $v_temp_path = PclZipUtilPathReduction($p_header['filename']); + $p_info['filename'] = $v_temp_path; + $v_temp_path = PclZipUtilPathReduction($p_header['stored_filename']); + $p_info['stored_filename'] = $v_temp_path; + $p_info['size'] = $p_header['size']; + $p_info['compressed_size'] = $p_header['compressed_size']; + $p_info['mtime'] = $p_header['mtime']; + $p_info['comment'] = $p_header['comment']; + $p_info['folder'] = (($p_header['external']&0x00000010)==0x00000010); + $p_info['index'] = $p_header['index']; + $p_info['status'] = $p_header['status']; + $p_info['crc'] = $p_header['crc']; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractByRule() + // Description : + // Extract a file or directory depending of rules (by index, by name, ...) + // Parameters : + // $p_file_list : An array where will be placed the properties of each + // extracted file + // $p_path : Path to add while writing the extracted files + // $p_remove_path : Path to remove (from the file memorized path) while writing the + // extracted files. If the path does not match the file path, + // the file is extracted with its memorized path. + // $p_remove_path does not apply to 'list' mode. + // $p_path and $p_remove_path are commulative. + // Return Values : + // 1 on success,0 or less on error (see error code list) + // -------------------------------------------------------------------------------- + function privExtractByRule(&$p_file_list, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Magic quotes trick + $this->privDisableMagicQuotes(); + + // ----- Check the path + if ( ($p_path == "") + || ( (substr($p_path, 0, 1) != "/") + && (substr($p_path, 0, 3) != "../") + && (substr($p_path,1,2)!=":/"))) + $p_path = "./".$p_path; + + // ----- Reduce the path last (and duplicated) '/' + if (($p_path != "./") && ($p_path != "/")) + { + // ----- Look for the path end '/' + while (substr($p_path, -1) == "/") + { + $p_path = substr($p_path, 0, strlen($p_path)-1); + } + } + + // ----- Look for path to remove format (should end by /) + if (($p_remove_path != "") && (substr($p_remove_path, -1) != '/')) + { + $p_remove_path .= '/'; + } + $p_remove_path_size = strlen($p_remove_path); + + // ----- Open the zip file + if (($v_result = $this->privOpenFd('rb')) != 1) + { + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + + // ----- Read each entry + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read next Central dir entry + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header)) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Store the index + $v_header['index'] = $i; + + // ----- Store the file position + $v_pos_entry = ftell($this->zip_fd); + + // ----- Look for the specific extract rules + $v_extract = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_extract = true; + } + } + // ----- Look for a filename + elseif ($v_header['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_extract = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header['stored_filename'])) { + $v_extract = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_extract = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + + // ----- Look for no rule, which means extract all the archive + else { + $v_extract = true; + } + + // ----- Check compression method + if ( ($v_extract) + && ( ($v_header['compression'] != 8) + && ($v_header['compression'] != 0))) { + $v_header['status'] = 'unsupported_compression'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_COMPRESSION, + "Filename '".$v_header['stored_filename']."' is " + ."compressed by an unsupported compression " + ."method (".$v_header['compression'].") "); + + return PclZip::errorCode(); + } + } + + // ----- Check encrypted files + if (($v_extract) && (($v_header['flag'] & 1) == 1)) { + $v_header['status'] = 'unsupported_encryption'; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + $this->privSwapBackMagicQuotes(); + + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, + "Unsupported encryption for " + ." filename '".$v_header['stored_filename'] + ."'"); + + return PclZip::errorCode(); + } + } + + // ----- Look for real extraction + if (($v_extract) && ($v_header['status'] != 'ok')) { + $v_result = $this->privConvertHeader2FileInfo($v_header, + $p_file_list[$v_nb_extracted++]); + if ($v_result != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + $v_extract = false; + } + + // ----- Look for real extraction + if ($v_extract) + { + + // ----- Go to the file position + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_header['offset'])) + { + // ----- Close the zip file + $this->privCloseFd(); + + $this->privSwapBackMagicQuotes(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Look for extraction as string + if ($p_options[PCLZIP_OPT_EXTRACT_AS_STRING]) { + + $v_string = ''; + + // ----- Extracting the file + $v_result1 = $this->privExtractFileAsString($v_header, $v_string, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Set the file content + $p_file_list[$v_nb_extracted]['content'] = $v_string; + + // ----- Next extracted file + $v_nb_extracted++; + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for extraction in standard output + elseif ( (isset($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) + && ($p_options[PCLZIP_OPT_EXTRACT_IN_OUTPUT])) { + // ----- Extracting the file in standard output + $v_result1 = $this->privExtractFileInOutput($v_header, $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + // ----- Look for normal extraction + else { + // ----- Extracting the file + $v_result1 = $this->privExtractFile($v_header, + $p_path, $p_remove_path, + $p_remove_all_path, + $p_options); + if ($v_result1 < 1) { + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + return $v_result1; + } + + // ----- Get the only interesting attributes + if (($v_result = $this->privConvertHeader2FileInfo($v_header, $p_file_list[$v_nb_extracted++])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + return $v_result; + } + + // ----- Look for user callback abort + if ($v_result1 == 2) { + break; + } + } + } + } + + // ----- Close the zip file + $this->privCloseFd(); + $this->privSwapBackMagicQuotes(); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFile() + // Description : + // Parameters : + // Return Values : + // + // 1 : ... ? + // PCLZIP_ERR_USER_ABORTED(2) : User ask for extraction stop in callback + // -------------------------------------------------------------------------------- + function privExtractFile(&$p_entry, $p_path, $p_remove_path, $p_remove_all_path, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for all path to remove + if ($p_remove_all_path == true) { + // ----- Look for folder entry that not need to be extracted + if (($p_entry['external']&0x00000010)==0x00000010) { + + $p_entry['status'] = "filtered"; + + return $v_result; + } + + // ----- Get the basename of the path + $p_entry['filename'] = basename($p_entry['filename']); + } + + // ----- Look for path to remove + else if ($p_remove_path != "") + { + if (PclZipUtilPathInclusion($p_remove_path, $p_entry['filename']) == 2) + { + + // ----- Change the file status + $p_entry['status'] = "filtered"; + + // ----- Return + return $v_result; + } + + $p_remove_path_size = strlen($p_remove_path); + if (substr($p_entry['filename'], 0, $p_remove_path_size) == $p_remove_path) + { + + // ----- Remove the path + $p_entry['filename'] = substr($p_entry['filename'], $p_remove_path_size); + + } + } + + // ----- Add the path + if ($p_path != '') { + $p_entry['filename'] = $p_path."/".$p_entry['filename']; + } + + // ----- Check a base_dir_restriction + if (isset($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION])) { + $v_inclusion + = PclZipUtilPathInclusion($p_options[PCLZIP_OPT_EXTRACT_DIR_RESTRICTION], + $p_entry['filename']); + if ($v_inclusion == 0) { + + PclZip::privErrorLog(PCLZIP_ERR_DIRECTORY_RESTRICTION, + "Filename '".$p_entry['filename']."' is " + ."outside PCLZIP_OPT_EXTRACT_DIR_RESTRICTION"); + + return PclZip::errorCode(); + } + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Look for specific actions while the file exist + if (file_exists($p_entry['filename'])) + { + + // ----- Look if file is a directory + if (is_dir($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "already_a_directory"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_ALREADY_A_DIRECTORY, + "Filename '".$p_entry['filename']."' is " + ."already used by an existing directory"); + + return PclZip::errorCode(); + } + } + // ----- Look if file is write protected + else if (!is_writeable($p_entry['filename'])) + { + + // ----- Change the file status + $p_entry['status'] = "write_protected"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Filename '".$p_entry['filename']."' exists " + ."and is write protected"); + + return PclZip::errorCode(); + } + } + + // ----- Look if the extracted file is older + else if (filemtime($p_entry['filename']) > $p_entry['mtime']) + { + // ----- Change the file status + if ( (isset($p_options[PCLZIP_OPT_REPLACE_NEWER])) + && ($p_options[PCLZIP_OPT_REPLACE_NEWER]===true)) { + } + else { + $p_entry['status'] = "newer_exist"; + + // ----- Look for PCLZIP_OPT_STOP_ON_ERROR + // For historical reason first PclZip implementation does not stop + // when this kind of error occurs. + if ( (isset($p_options[PCLZIP_OPT_STOP_ON_ERROR])) + && ($p_options[PCLZIP_OPT_STOP_ON_ERROR]===true)) { + + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, + "Newer version of '".$p_entry['filename']."' exists " + ."and option PCLZIP_OPT_REPLACE_NEWER is not selected"); + + return PclZip::errorCode(); + } + } + } + else { + } + } + + // ----- Check the directory availability and create it if necessary + else { + if ((($p_entry['external']&0x00000010)==0x00000010) || (substr($p_entry['filename'], -1) == '/')) + $v_dir_to_check = $p_entry['filename']; + else if (!strstr($p_entry['filename'], "/")) + $v_dir_to_check = ""; + else + $v_dir_to_check = dirname($p_entry['filename']); + + if (($v_result = $this->privDirCheck($v_dir_to_check, (($p_entry['external']&0x00000010)==0x00000010))) != 1) { + + // ----- Change the file status + $p_entry['status'] = "path_creation_fail"; + + // ----- Return + //return $v_result; + $v_result = 1; + } + } + } + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) + { + // ----- Look for not compressed file + if ($p_entry['compression'] == 0) { + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) + { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + // ----- Return + return $v_result; + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + /* Try to speed up the code + $v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_binary_data, $v_read_size); + */ + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Closing the destination file + fclose($v_dest_file); + + // ----- Change the file mtime + touch($p_entry['filename'], $p_entry['mtime']); + + + } + else { + // ----- TBC + // Need to be finished + if (($p_entry['flag'] & 1) == 1) { + PclZip::privErrorLog(PCLZIP_ERR_UNSUPPORTED_ENCRYPTION, 'File \''.$p_entry['filename'].'\' is encrypted. Encrypted files are not supported.'); + return PclZip::errorCode(); + } + + + // ----- Look for using temporary file to unzip + if ( (!isset($p_options[PCLZIP_OPT_TEMP_FILE_OFF])) + && (isset($p_options[PCLZIP_OPT_TEMP_FILE_ON]) + || (isset($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD]) + && ($p_options[PCLZIP_OPT_TEMP_FILE_THRESHOLD] <= $p_entry['size'])) ) ) { + $v_result = $this->privExtractFileUsingTempFile($p_entry, $p_options); + if ($v_result < PCLZIP_ERR_NO_ERROR) { + return $v_result; + } + } + + // ----- Look for extract in memory + else { + + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = @gzinflate($v_buffer); + unset($v_buffer); + if ($v_file_content === FALSE) { + + // ----- Change the file status + // TBC + $p_entry['status'] = "error"; + + return $v_result; + } + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + + // ----- Change the file status + $p_entry['status'] = "write_error"; + + return $v_result; + } + + // ----- Write the uncompressed data + @fwrite($v_dest_file, $v_file_content, $p_entry['size']); + unset($v_file_content); + + // ----- Closing the destination file + @fclose($v_dest_file); + + } + + // ----- Change the file mtime + @touch($p_entry['filename'], $p_entry['mtime']); + } + + // ----- Look for chmod option + if (isset($p_options[PCLZIP_OPT_SET_CHMOD])) { + + // ----- Change the mode of the file + @chmod($p_entry['filename'], $p_options[PCLZIP_OPT_SET_CHMOD]); + } + + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileUsingTempFile() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileUsingTempFile(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Creates a temporary file + $v_gzip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.gz'; + if (($v_dest_file = @fopen($v_gzip_temp_name, "wb")) == 0) { + fclose($v_file); + PclZip::privErrorLog(PCLZIP_ERR_WRITE_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary write mode'); + return PclZip::errorCode(); + } + + + // ----- Write gz file format header + $v_binary_data = pack('va1a1Va1a1', 0x8b1f, Chr($p_entry['compression']), Chr(0x00), time(), Chr(0x00), Chr(3)); + @fwrite($v_dest_file, $v_binary_data, 10); + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['compressed_size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Write gz file format footer + $v_binary_data = pack('VV', $p_entry['crc'], $p_entry['size']); + @fwrite($v_dest_file, $v_binary_data, 8); + + // ----- Close the temporary file + @fclose($v_dest_file); + + // ----- Opening destination file + if (($v_dest_file = @fopen($p_entry['filename'], 'wb')) == 0) { + $p_entry['status'] = "write_error"; + return $v_result; + } + + // ----- Open the temporary gz file + if (($v_src_file = @gzopen($v_gzip_temp_name, 'rb')) == 0) { + @fclose($v_dest_file); + $p_entry['status'] = "read_error"; + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_gzip_temp_name.'\' in binary read mode'); + return PclZip::errorCode(); + } + + + // ----- Read the file by PCLZIP_READ_BLOCK_SIZE octets blocks + $v_size = $p_entry['size']; + while ($v_size != 0) { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($v_src_file, $v_read_size); + //$v_binary_data = pack('a'.$v_read_size, $v_buffer); + @fwrite($v_dest_file, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + @fclose($v_dest_file); + @gzclose($v_src_file); + + // ----- Delete the temporary file + @unlink($v_gzip_temp_name); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileInOutput() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileInOutput(&$p_entry, &$p_options) + { + $v_result=1; + + // ----- Read the file header + if (($v_result = $this->privReadFileHeader($v_header)) != 1) { + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + // ----- Trace + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + if ($p_entry['compressed_size'] == $p_entry['size']) { + + // ----- Read the file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Send the file to the output + echo $v_buffer; + unset($v_buffer); + } + else { + + // ----- Read the compressed file in a buffer (one shot) + $v_buffer = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + $v_file_content = gzinflate($v_buffer); + unset($v_buffer); + + // ----- Send the file to the output + echo $v_file_content; + unset($v_file_content); + } + } + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privExtractFileAsString() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privExtractFileAsString(&$p_entry, &$p_string, &$p_options) + { + $v_result=1; + + // ----- Read the file header + $v_header = array(); + if (($v_result = $this->privReadFileHeader($v_header)) != 1) + { + // ----- Return + return $v_result; + } + + + // ----- Check that the file header is coherent with $p_entry info + if ($this->privCheckFileHeaders($v_header, $p_entry) != 1) { + // TBC + } + + // ----- Look for pre-extract callback + if (isset($p_options[PCLZIP_CB_PRE_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_PRE_EXTRACT].'(PCLZIP_CB_PRE_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_PRE_EXTRACT](PCLZIP_CB_PRE_EXTRACT, $v_local_header); + if ($v_result == 0) { + // ----- Change the file status + $p_entry['status'] = "skipped"; + $v_result = 1; + } + + // ----- Look for abort result + if ($v_result == 2) { + // ----- This status is internal and will be changed in 'skipped' + $p_entry['status'] = "aborted"; + $v_result = PCLZIP_ERR_USER_ABORTED; + } + + // ----- Update the informations + // Only some fields can be modified + $p_entry['filename'] = $v_local_header['filename']; + } + + + // ----- Look if extraction should be done + if ($p_entry['status'] == 'ok') { + + // ----- Do the extraction (if not a folder) + if (!(($p_entry['external']&0x00000010)==0x00000010)) { + // ----- Look for not compressed file + // if ($p_entry['compressed_size'] == $p_entry['size']) + if ($p_entry['compression'] == 0) { + + // ----- Reading the file + $p_string = @fread($this->zip_fd, $p_entry['compressed_size']); + } + else { + + // ----- Reading the file + $v_data = @fread($this->zip_fd, $p_entry['compressed_size']); + + // ----- Decompress the file + if (($p_string = @gzinflate($v_data)) === FALSE) { + // TBC + } + } + + // ----- Trace + } + else { + // TBC : error : can not extract a folder in a string + } + + } + + // ----- Change abort status + if ($p_entry['status'] == "aborted") { + $p_entry['status'] = "skipped"; + } + + // ----- Look for post-extract callback + elseif (isset($p_options[PCLZIP_CB_POST_EXTRACT])) { + + // ----- Generate a local information + $v_local_header = array(); + $this->privConvertHeader2FileInfo($p_entry, $v_local_header); + + // ----- Swap the content to header + $v_local_header['content'] = $p_string; + $p_string = ''; + + // ----- Call the callback + // Here I do not use call_user_func() because I need to send a reference to the + // header. +// eval('$v_result = '.$p_options[PCLZIP_CB_POST_EXTRACT].'(PCLZIP_CB_POST_EXTRACT, $v_local_header);'); + $v_result = $p_options[PCLZIP_CB_POST_EXTRACT](PCLZIP_CB_POST_EXTRACT, $v_local_header); + + // ----- Swap back the content to header + $p_string = $v_local_header['content']; + unset($v_local_header['content']); + + // ----- Look for abort result + if ($v_result == 2) { + $v_result = PCLZIP_ERR_USER_ABORTED; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x04034b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 26); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 26) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vversion/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len', $v_binary_data); + + // ----- Get filename + $p_header['filename'] = fread($this->zip_fd, $v_data['filename_len']); + + // ----- Get extra_fields + if ($v_data['extra_len'] != 0) { + $p_header['extra'] = fread($this->zip_fd, $v_data['extra_len']); + } + else { + $p_header['extra'] = ''; + } + + // ----- Extract properties + $p_header['version_extracted'] = $v_data['version']; + $p_header['compression'] = $v_data['compression']; + $p_header['size'] = $v_data['size']; + $p_header['compressed_size'] = $v_data['compressed_size']; + $p_header['crc'] = $v_data['crc']; + $p_header['flag'] = $v_data['flag']; + $p_header['filename_len'] = $v_data['filename_len']; + + // ----- Recuperate date in UNIX format + $p_header['mdate'] = $v_data['mdate']; + $p_header['mtime'] = $v_data['mtime']; + if ($p_header['mdate'] && $p_header['mtime']) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // TBC + //for(reset($v_data); $key = key($v_data); next($v_data)) { + //} + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set the status field + $p_header['status'] = "ok"; + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadCentralFileHeader() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadCentralFileHeader(&$p_header) + { + $v_result=1; + + // ----- Read the 4 bytes signature + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] != 0x02014b50) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Invalid archive structure'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the first 42 bytes of the header + $v_binary_data = fread($this->zip_fd, 42); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 42) + { + $p_header['filename'] = ""; + $p_header['status'] = "invalid_header"; + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid block size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $p_header = unpack('vversion/vversion_extracted/vflag/vcompression/vmtime/vmdate/Vcrc/Vcompressed_size/Vsize/vfilename_len/vextra_len/vcomment_len/vdisk/vinternal/Vexternal/Voffset', $v_binary_data); + + // ----- Get filename + if ($p_header['filename_len'] != 0) + $p_header['filename'] = fread($this->zip_fd, $p_header['filename_len']); + else + $p_header['filename'] = ''; + + // ----- Get extra + if ($p_header['extra_len'] != 0) + $p_header['extra'] = fread($this->zip_fd, $p_header['extra_len']); + else + $p_header['extra'] = ''; + + // ----- Get comment + if ($p_header['comment_len'] != 0) + $p_header['comment'] = fread($this->zip_fd, $p_header['comment_len']); + else + $p_header['comment'] = ''; + + // ----- Extract properties + + // ----- Recuperate date in UNIX format + //if ($p_header['mdate'] && $p_header['mtime']) + // TBC : bug : this was ignoring time with 0/0/0 + if (1) + { + // ----- Extract time + $v_hour = ($p_header['mtime'] & 0xF800) >> 11; + $v_minute = ($p_header['mtime'] & 0x07E0) >> 5; + $v_seconde = ($p_header['mtime'] & 0x001F)*2; + + // ----- Extract date + $v_year = (($p_header['mdate'] & 0xFE00) >> 9) + 1980; + $v_month = ($p_header['mdate'] & 0x01E0) >> 5; + $v_day = $p_header['mdate'] & 0x001F; + + // ----- Get UNIX date format + $p_header['mtime'] = @mktime($v_hour, $v_minute, $v_seconde, $v_month, $v_day, $v_year); + + } + else + { + $p_header['mtime'] = time(); + } + + // ----- Set the stored filename + $p_header['stored_filename'] = $p_header['filename']; + + // ----- Set default status to ok + $p_header['status'] = 'ok'; + + // ----- Look if it is a directory + if (substr($p_header['filename'], -1) == '/') { + //$p_header['external'] = 0x41FF0010; + $p_header['external'] = 0x00000010; + } + + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privCheckFileHeaders() + // Description : + // Parameters : + // Return Values : + // 1 on success, + // 0 on error; + // -------------------------------------------------------------------------------- + function privCheckFileHeaders(&$p_local_header, &$p_central_header) + { + $v_result=1; + + // ----- Check the static values + // TBC + if ($p_local_header['filename'] != $p_central_header['filename']) { + } + if ($p_local_header['version_extracted'] != $p_central_header['version_extracted']) { + } + if ($p_local_header['flag'] != $p_central_header['flag']) { + } + if ($p_local_header['compression'] != $p_central_header['compression']) { + } + if ($p_local_header['mtime'] != $p_central_header['mtime']) { + } + if ($p_local_header['filename_len'] != $p_central_header['filename_len']) { + } + + // ----- Look for flag bit 3 + if (($p_local_header['flag'] & 8) == 8) { + $p_local_header['size'] = $p_central_header['size']; + $p_local_header['compressed_size'] = $p_central_header['compressed_size']; + $p_local_header['crc'] = $p_central_header['crc']; + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privReadEndCentralDir() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privReadEndCentralDir(&$p_central_dir) + { + $v_result=1; + + // ----- Go to the end of the zip file + $v_size = filesize($this->zipname); + @fseek($this->zip_fd, $v_size); + if (@ftell($this->zip_fd) != $v_size) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to go to the end of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- First try : look if this is an archive with no commentaries (most of the time) + // in this case the end of central dir is at 22 bytes of the file end + $v_found = 0; + if ($v_size > 26) { + @fseek($this->zip_fd, $v_size-22); + if (($v_pos = @ftell($this->zip_fd)) != ($v_size-22)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read for bytes + $v_binary_data = @fread($this->zip_fd, 4); + $v_data = @unpack('Vid', $v_binary_data); + + // ----- Check signature + if ($v_data['id'] == 0x06054b50) { + $v_found = 1; + } + + $v_pos = ftell($this->zip_fd); + } + + // ----- Go back to the maximum possible size of the Central Dir End Record + if (!$v_found) { + $v_maximum_size = 65557; // 0xFFFF + 22; + if ($v_maximum_size > $v_size) + $v_maximum_size = $v_size; + @fseek($this->zip_fd, $v_size-$v_maximum_size); + if (@ftell($this->zip_fd) != ($v_size-$v_maximum_size)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, 'Unable to seek back to the middle of the archive \''.$this->zipname.'\''); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read byte per byte in order to find the signature + $v_pos = ftell($this->zip_fd); + $v_bytes = 0x00000000; + while ($v_pos < $v_size) + { + // ----- Read a byte + $v_byte = @fread($this->zip_fd, 1); + + // ----- Add the byte + //$v_bytes = ($v_bytes << 8) | Ord($v_byte); + // Note we mask the old value down such that once shifted we can never end up with more than a 32bit number + // Otherwise on systems where we have 64bit integers the check below for the magic number will fail. + $v_bytes = ( ($v_bytes & 0xFFFFFF) << 8) | Ord($v_byte); + + // ----- Compare the bytes + if ($v_bytes == 0x504b0506) + { + $v_pos++; + break; + } + + $v_pos++; + } + + // ----- Look if not found end of central dir + if ($v_pos == $v_size) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Unable to find End of Central Dir Record signature"); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Read the first 18 bytes of the header + $v_binary_data = fread($this->zip_fd, 18); + + // ----- Look for invalid block size + if (strlen($v_binary_data) != 18) + { + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, "Invalid End of Central Dir Record size : ".strlen($v_binary_data)); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Extract the values + $v_data = unpack('vdisk/vdisk_start/vdisk_entries/ventries/Vsize/Voffset/vcomment_size', $v_binary_data); + + // ----- Check the global size + if (($v_pos + $v_data['comment_size'] + 18) != $v_size) { + + // ----- Removed in release 2.2 see readme file + // The check of the file size is a little too strict. + // Some bugs where found when a zip is encrypted/decrypted with 'crypt'. + // While decrypted, zip has training 0 bytes + if (0) { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_BAD_FORMAT, + 'The central dir is not at the end of the archive.' + .' Some trailing bytes exists after the archive.'); + + // ----- Return + return PclZip::errorCode(); + } + } + + // ----- Get comment + if ($v_data['comment_size'] != 0) { + $p_central_dir['comment'] = fread($this->zip_fd, $v_data['comment_size']); + } + else + $p_central_dir['comment'] = ''; + + $p_central_dir['entries'] = $v_data['entries']; + $p_central_dir['disk_entries'] = $v_data['disk_entries']; + $p_central_dir['offset'] = $v_data['offset']; + $p_central_dir['size'] = $v_data['size']; + $p_central_dir['disk'] = $v_data['disk']; + $p_central_dir['disk_start'] = $v_data['disk_start']; + + // TBC + //for(reset($p_central_dir); $key = key($p_central_dir); next($p_central_dir)) { + //} + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDeleteByRule() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDeleteByRule(&$p_result_list, &$p_options) + { + $v_result=1; + $v_list_detail = array(); + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Scan all the files + // ----- Start at beginning of Central Dir + $v_pos_entry = $v_central_dir['offset']; + @rewind($this->zip_fd); + if (@fseek($this->zip_fd, $v_pos_entry)) + { + // ----- Close the zip file + $this->privCloseFd(); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read each entry + $v_header_list = array(); + $j_start = 0; + for ($i=0, $v_nb_extracted=0; $i<$v_central_dir['entries']; $i++) + { + + // ----- Read the file header + $v_header_list[$v_nb_extracted] = array(); + if (($v_result = $this->privReadCentralFileHeader($v_header_list[$v_nb_extracted])) != 1) + { + // ----- Close the zip file + $this->privCloseFd(); + + return $v_result; + } + + + // ----- Store the index + $v_header_list[$v_nb_extracted]['index'] = $i; + + // ----- Look for the specific extract rules + $v_found = false; + + // ----- Look for extract by name rule + if ( (isset($p_options[PCLZIP_OPT_BY_NAME])) + && ($p_options[PCLZIP_OPT_BY_NAME] != 0)) { + + // ----- Look if the filename is in the list + for ($j=0; ($j strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) + && (substr($v_header_list[$v_nb_extracted]['stored_filename'], 0, strlen($p_options[PCLZIP_OPT_BY_NAME][$j])) == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + elseif ( (($v_header_list[$v_nb_extracted]['external']&0x00000010)==0x00000010) /* Indicates a folder */ + && ($v_header_list[$v_nb_extracted]['stored_filename'].'/' == $p_options[PCLZIP_OPT_BY_NAME][$j])) { + $v_found = true; + } + } + // ----- Look for a filename + elseif ($v_header_list[$v_nb_extracted]['stored_filename'] == $p_options[PCLZIP_OPT_BY_NAME][$j]) { + $v_found = true; + } + } + } + + // ----- Look for extract by ereg rule + // ereg() is deprecated with PHP 5.3 + /* + else if ( (isset($p_options[PCLZIP_OPT_BY_EREG])) + && ($p_options[PCLZIP_OPT_BY_EREG] != "")) { + + if (ereg($p_options[PCLZIP_OPT_BY_EREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + */ + + // ----- Look for extract by preg rule + else if ( (isset($p_options[PCLZIP_OPT_BY_PREG])) + && ($p_options[PCLZIP_OPT_BY_PREG] != "")) { + + if (preg_match($p_options[PCLZIP_OPT_BY_PREG], $v_header_list[$v_nb_extracted]['stored_filename'])) { + $v_found = true; + } + } + + // ----- Look for extract by index rule + else if ( (isset($p_options[PCLZIP_OPT_BY_INDEX])) + && ($p_options[PCLZIP_OPT_BY_INDEX] != 0)) { + + // ----- Look if the index is in the list + for ($j=$j_start; ($j=$p_options[PCLZIP_OPT_BY_INDEX][$j]['start']) && ($i<=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end'])) { + $v_found = true; + } + if ($i>=$p_options[PCLZIP_OPT_BY_INDEX][$j]['end']) { + $j_start = $j+1; + } + + if ($p_options[PCLZIP_OPT_BY_INDEX][$j]['start']>$i) { + break; + } + } + } + else { + $v_found = true; + } + + // ----- Look for deletion + if ($v_found) + { + unset($v_header_list[$v_nb_extracted]); + } + else + { + $v_nb_extracted++; + } + } + + // ----- Look if something need to be deleted + if ($v_nb_extracted > 0) { + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Creates a temporary zip archive + $v_temp_zip = new PclZip($v_zip_temp_name); + + // ----- Open the temporary zip file in write mode + if (($v_result = $v_temp_zip->privOpenFd('wb')) != 1) { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Look which file need to be kept + for ($i=0; $izip_fd); + if (@fseek($this->zip_fd, $v_header_list[$i]['offset'])) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_INVALID_ARCHIVE_ZIP, 'Invalid archive size'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Read the file header + $v_local_header = array(); + if (($v_result = $this->privReadFileHeader($v_local_header)) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Check that local file header is same as central file header + if ($this->privCheckFileHeaders($v_local_header, + $v_header_list[$i]) != 1) { + // TBC + } + unset($v_local_header); + + // ----- Write the file header + if (($v_result = $v_temp_zip->privWriteFileHeader($v_header_list[$i])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Read/write the data block + if (($v_result = PclZipUtilCopyBlock($this->zip_fd, $v_temp_zip->zip_fd, $v_header_list[$i]['compressed_size'])) != 1) { + // ----- Close the zip file + $this->privCloseFd(); + $v_temp_zip->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_temp_zip->zip_fd); + + // ----- Re-Create the Central Dir files header + for ($i=0; $iprivWriteCentralFileHeader($v_header_list[$i])) != 1) { + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Transform the header to a 'usable' info + $v_temp_zip->privConvertHeader2FileInfo($v_header_list[$i], $p_result_list[$i]); + } + + + // ----- Zip file comment + $v_comment = ''; + if (isset($p_options[PCLZIP_OPT_COMMENT])) { + $v_comment = $p_options[PCLZIP_OPT_COMMENT]; + } + + // ----- Calculate the size of the central header + $v_size = @ftell($v_temp_zip->zip_fd)-$v_offset; + + // ----- Create the central dir footer + if (($v_result = $v_temp_zip->privWriteCentralHeader(sizeof($v_header_list), $v_size, $v_offset, $v_comment)) != 1) { + // ----- Reset the file list + unset($v_header_list); + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + @unlink($v_zip_temp_name); + + // ----- Return + return $v_result; + } + + // ----- Close + $v_temp_zip->privCloseFd(); + $this->privCloseFd(); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Destroy the temporary archive + unset($v_temp_zip); + } + + // ----- Remove every files : reset the file + else if ($v_central_dir['entries'] != 0) { + $this->privCloseFd(); + + if (($v_result = $this->privOpenFd('wb')) != 1) { + return $v_result; + } + + if (($v_result = $this->privWriteCentralHeader(0, 0, 0, '')) != 1) { + return $v_result; + } + + $this->privCloseFd(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDirCheck() + // Description : + // Check if a directory exists, if not it creates it and all the parents directory + // which may be useful. + // Parameters : + // $p_dir : Directory path to check. + // Return Values : + // 1 : OK + // -1 : Unable to create directory + // -------------------------------------------------------------------------------- + function privDirCheck($p_dir, $p_is_dir=false) + { + $v_result = 1; + + + // ----- Remove the final '/' + if (($p_is_dir) && (substr($p_dir, -1)=='/')) + { + $p_dir = substr($p_dir, 0, strlen($p_dir)-1); + } + + // ----- Check the directory availability + if ((is_dir($p_dir)) || ($p_dir == "")) + { + return 1; + } + + // ----- Extract parent directory + $p_parent_dir = dirname($p_dir); + + // ----- Just a check + if ($p_parent_dir != $p_dir) + { + // ----- Look for parent directory + if ($p_parent_dir != "") + { + if (($v_result = $this->privDirCheck($p_parent_dir)) != 1) + { + return $v_result; + } + } + } + + // ----- Create the directory + if (!@mkdir($p_dir, 0777)) + { + // ----- Error log + PclZip::privErrorLog(PCLZIP_ERR_DIR_CREATE_FAIL, "Unable to create directory '$p_dir'"); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privMerge() + // Description : + // If $p_archive_to_add does not exist, the function exit with a success result. + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privMerge(&$p_archive_to_add) + { + $v_result=1; + + // ----- Look if the archive_to_add exists + if (!is_file($p_archive_to_add->zipname)) + { + + // ----- Nothing to merge, so merge is a success + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Look if the archive exists + if (!is_file($this->zipname)) + { + + // ----- Do a duplicate + $v_result = $this->privDuplicate($p_archive_to_add->zipname); + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('rb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir = array(); + if (($v_result = $this->privReadEndCentralDir($v_central_dir)) != 1) + { + $this->privCloseFd(); + return $v_result; + } + + // ----- Go to beginning of File + @rewind($this->zip_fd); + + // ----- Open the archive_to_add file + if (($v_result=$p_archive_to_add->privOpenFd('rb')) != 1) + { + $this->privCloseFd(); + + // ----- Return + return $v_result; + } + + // ----- Read the central directory informations + $v_central_dir_to_add = array(); + if (($v_result = $p_archive_to_add->privReadEndCentralDir($v_central_dir_to_add)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + return $v_result; + } + + // ----- Go to beginning of File + @rewind($p_archive_to_add->zip_fd); + + // ----- Creates a temporay file + $v_zip_temp_name = PCLZIP_TEMPORARY_DIR.uniqid('pclzip-').'.tmp'; + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($v_zip_temp_name, 'wb')) == 0) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open temporary file \''.$v_zip_temp_name.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = $v_central_dir['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the files from the archive_to_add into the temporary file + $v_size = $v_central_dir_to_add['offset']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Store the offset of the central dir + $v_offset = @ftell($v_zip_temp_fd); + + // ----- Copy the block of file headers from the old archive + $v_size = $v_central_dir['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($this->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Copy the block of file headers from the archive_to_add + $v_size = $v_central_dir_to_add['size']; + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_archive_to_add->zip_fd, $v_read_size); + @fwrite($v_zip_temp_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Merge the file comments + $v_comment = $v_central_dir['comment'].' '.$v_central_dir_to_add['comment']; + + // ----- Calculate the size of the (new) central header + $v_size = @ftell($v_zip_temp_fd)-$v_offset; + + // ----- Swap the file descriptor + // Here is a trick : I swap the temporary fd with the zip fd, in order to use + // the following methods on the temporary fil and not the real archive fd + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Create the central dir footer + if (($v_result = $this->privWriteCentralHeader($v_central_dir['entries']+$v_central_dir_to_add['entries'], $v_size, $v_offset, $v_comment)) != 1) + { + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + @fclose($v_zip_temp_fd); + $this->zip_fd = null; + + // ----- Reset the file list + unset($v_header_list); + + // ----- Return + return $v_result; + } + + // ----- Swap back the file descriptor + $v_swap = $this->zip_fd; + $this->zip_fd = $v_zip_temp_fd; + $v_zip_temp_fd = $v_swap; + + // ----- Close + $this->privCloseFd(); + $p_archive_to_add->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Delete the zip file + // TBC : I should test the result ... + @unlink($this->zipname); + + // ----- Rename the temporary file + // TBC : I should test the result ... + //@rename($v_zip_temp_name, $this->zipname); + PclZipUtilRename($v_zip_temp_name, $this->zipname); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDuplicate() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDuplicate($p_archive_filename) + { + $v_result=1; + + // ----- Look if the $p_archive_filename exists + if (!is_file($p_archive_filename)) + { + + // ----- Nothing to duplicate, so duplicate is a success. + $v_result = 1; + + // ----- Return + return $v_result; + } + + // ----- Open the zip file + if (($v_result=$this->privOpenFd('wb')) != 1) + { + // ----- Return + return $v_result; + } + + // ----- Open the temporary file in write mode + if (($v_zip_temp_fd = @fopen($p_archive_filename, 'rb')) == 0) + { + $this->privCloseFd(); + + PclZip::privErrorLog(PCLZIP_ERR_READ_OPEN_FAIL, 'Unable to open archive file \''.$p_archive_filename.'\' in binary write mode'); + + // ----- Return + return PclZip::errorCode(); + } + + // ----- Copy the files from the archive to the temporary file + // TBC : Here I should better append the file and go back to erase the central dir + $v_size = filesize($p_archive_filename); + while ($v_size != 0) + { + $v_read_size = ($v_size < PCLZIP_READ_BLOCK_SIZE ? $v_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = fread($v_zip_temp_fd, $v_read_size); + @fwrite($this->zip_fd, $v_buffer, $v_read_size); + $v_size -= $v_read_size; + } + + // ----- Close + $this->privCloseFd(); + + // ----- Close the temporary file + @fclose($v_zip_temp_fd); + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorLog() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorLog($p_error_code=0, $p_error_string='') + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclError($p_error_code, $p_error_string); + } + else { + $this->error_code = $p_error_code; + $this->error_string = $p_error_string; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privErrorReset() + // Description : + // Parameters : + // -------------------------------------------------------------------------------- + function privErrorReset() + { + if (PCLZIP_ERROR_EXTERNAL == 1) { + PclErrorReset(); + } + else { + $this->error_code = 0; + $this->error_string = ''; + } + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privDisableMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privDisableMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if already done + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Get and memorize the magic_quote value + $this->magic_quotes_status = @get_magic_quotes_runtime(); + + // ----- Disable magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime(0); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : privSwapBackMagicQuotes() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function privSwapBackMagicQuotes() + { + $v_result=1; + + // ----- Look if function exists + if ( (!function_exists("get_magic_quotes_runtime")) + || (!function_exists("set_magic_quotes_runtime"))) { + return $v_result; + } + + // ----- Look if something to do + if ($this->magic_quotes_status != -1) { + return $v_result; + } + + // ----- Swap back magic_quotes + if ($this->magic_quotes_status == 1) { + @set_magic_quotes_runtime($this->magic_quotes_status); + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + } + // End of class + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathReduction() + // Description : + // Parameters : + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilPathReduction($p_dir) + { + $v_result = ""; + + // ----- Look for not empty path + if ($p_dir != "") { + // ----- Explode path by directory names + $v_list = explode("/", $p_dir); + + // ----- Study directories from last to first + $v_skip = 0; + for ($i=sizeof($v_list)-1; $i>=0; $i--) { + // ----- Look for current path + if ($v_list[$i] == ".") { + // ----- Ignore this directory + // Should be the first $i=0, but no check is done + } + else if ($v_list[$i] == "..") { + $v_skip++; + } + else if ($v_list[$i] == "") { + // ----- First '/' i.e. root slash + if ($i == 0) { + $v_result = "/".$v_result; + if ($v_skip > 0) { + // ----- It is an invalid path, so the path is not modified + // TBC + $v_result = $p_dir; + $v_skip = 0; + } + } + // ----- Last '/' i.e. indicates a directory + else if ($i == (sizeof($v_list)-1)) { + $v_result = $v_list[$i]; + } + // ----- Double '/' inside the path + else { + // ----- Ignore only the double '//' in path, + // but not the first and last '/' + } + } + else { + // ----- Look for item to skip + if ($v_skip > 0) { + $v_skip--; + } + else { + $v_result = $v_list[$i].($i!=(sizeof($v_list)-1)?"/".$v_result:""); + } + } + } + + // ----- Look for skip + if ($v_skip > 0) { + while ($v_skip > 0) { + $v_result = '../'.$v_result; + $v_skip--; + } + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilPathInclusion() + // Description : + // This function indicates if the path $p_path is under the $p_dir tree. Or, + // said in an other way, if the file or sub-dir $p_path is inside the dir + // $p_dir. + // The function indicates also if the path is exactly the same as the dir. + // This function supports path with duplicated '/' like '//', but does not + // support '.' or '..' statements. + // Parameters : + // Return Values : + // 0 if $p_path is not inside directory $p_dir + // 1 if $p_path is inside directory $p_dir + // 2 if $p_path is exactly the same as $p_dir + // -------------------------------------------------------------------------------- + function PclZipUtilPathInclusion($p_dir, $p_path) + { + $v_result = 1; + + // ----- Look for path beginning by ./ + if ( ($p_dir == '.') + || ((strlen($p_dir) >=2) && (substr($p_dir, 0, 2) == './'))) { + $p_dir = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_dir, 1); + } + if ( ($p_path == '.') + || ((strlen($p_path) >=2) && (substr($p_path, 0, 2) == './'))) { + $p_path = PclZipUtilTranslateWinPath(getcwd(), FALSE).'/'.substr($p_path, 1); + } + + // ----- Explode dir and path by directory separator + $v_list_dir = explode("/", $p_dir); + $v_list_dir_size = sizeof($v_list_dir); + $v_list_path = explode("/", $p_path); + $v_list_path_size = sizeof($v_list_path); + + // ----- Study directories paths + $i = 0; + $j = 0; + while (($i < $v_list_dir_size) && ($j < $v_list_path_size) && ($v_result)) { + + // ----- Look for empty dir (path reduction) + if ($v_list_dir[$i] == '') { + $i++; + continue; + } + if ($v_list_path[$j] == '') { + $j++; + continue; + } + + // ----- Compare the items + if (($v_list_dir[$i] != $v_list_path[$j]) && ($v_list_dir[$i] != '') && ( $v_list_path[$j] != '')) { + $v_result = 0; + } + + // ----- Next items + $i++; + $j++; + } + + // ----- Look if everything seems to be the same + if ($v_result) { + // ----- Skip all the empty items + while (($j < $v_list_path_size) && ($v_list_path[$j] == '')) $j++; + while (($i < $v_list_dir_size) && ($v_list_dir[$i] == '')) $i++; + + if (($i >= $v_list_dir_size) && ($j >= $v_list_path_size)) { + // ----- There are exactly the same + $v_result = 2; + } + else if ($i < $v_list_dir_size) { + // ----- The path is shorter than the dir + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilCopyBlock() + // Description : + // Parameters : + // $p_mode : read/write compression mode + // 0 : src & dest normal + // 1 : src gzip, dest normal + // 2 : src normal, dest gzip + // 3 : src & dest gzip + // Return Values : + // -------------------------------------------------------------------------------- + function PclZipUtilCopyBlock($p_src, $p_dest, $p_size, $p_mode=0) + { + $v_result = 1; + + if ($p_mode==0) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==1) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @fwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==2) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @fread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + else if ($p_mode==3) + { + while ($p_size != 0) + { + $v_read_size = ($p_size < PCLZIP_READ_BLOCK_SIZE ? $p_size : PCLZIP_READ_BLOCK_SIZE); + $v_buffer = @gzread($p_src, $v_read_size); + @gzwrite($p_dest, $v_buffer, $v_read_size); + $p_size -= $v_read_size; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilRename() + // Description : + // This function tries to do a simple rename() function. If it fails, it + // tries to copy the $p_src file in a new $p_dest file and then unlink the + // first one. + // Parameters : + // $p_src : Old filename + // $p_dest : New filename + // Return Values : + // 1 on success, 0 on failure. + // -------------------------------------------------------------------------------- + function PclZipUtilRename($p_src, $p_dest) + { + $v_result = 1; + + // ----- Try to rename the files + if (!@rename($p_src, $p_dest)) { + + // ----- Try to copy & unlink the src + if (!@copy($p_src, $p_dest)) { + $v_result = 0; + } + else if (!@unlink($p_src)) { + $v_result = 0; + } + } + + // ----- Return + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilOptionText() + // Description : + // Translate option value in text. Mainly for debug purpose. + // Parameters : + // $p_option : the option value. + // Return Values : + // The option text value. + // -------------------------------------------------------------------------------- + function PclZipUtilOptionText($p_option) + { + + $v_list = get_defined_constants(); + for (reset($v_list); $v_key = key($v_list); next($v_list)) { + $v_prefix = substr($v_key, 0, 10); + if (( ($v_prefix == 'PCLZIP_OPT') + || ($v_prefix == 'PCLZIP_CB_') + || ($v_prefix == 'PCLZIP_ATT')) + && ($v_list[$v_key] == $p_option)) { + return $v_key; + } + } + + $v_result = 'Unknown'; + + return $v_result; + } + // -------------------------------------------------------------------------------- + + // -------------------------------------------------------------------------------- + // Function : PclZipUtilTranslateWinPath() + // Description : + // Translate windows path by replacing '\' by '/' and optionally removing + // drive letter. + // Parameters : + // $p_path : path to translate. + // $p_remove_disk_letter : true | false + // Return Values : + // The path translated. + // -------------------------------------------------------------------------------- + function PclZipUtilTranslateWinPath($p_path, $p_remove_disk_letter=true) + { + if (stristr(php_uname(), 'windows')) { + // ----- Look for potential disk letter + if (($p_remove_disk_letter) && (($v_position = strpos($p_path, ':')) != false)) { + $p_path = substr($p_path, $v_position+1); + } + // ----- Change potential windows directory separator + if ((strpos($p_path, '\\') > 0) || (substr($p_path, 0,1) == '\\')) { + $p_path = strtr($p_path, '\\', '/'); + } + } + return $p_path; + } \ No newline at end of file diff --git a/src/bb-library/FileCache.php b/src/bb-library/FileCache.php new file mode 100644 index 000000000..640206875 --- /dev/null +++ b/src/bb-library/FileCache.php @@ -0,0 +1,104 @@ +_cacheDir = $cacheDir; + } + } + + /** + * Save data to the specified cache file + */ + public function set($key, $data) + { + $cacheFile = $this->getCacheFile($key); + if (!file_put_contents($cacheFile, json_encode($data))) { + throw new FileCacheException('Error saving data with the key ' . $key . ' to the cache file.'); + } + return $this; + } + + /** + * Get data from the specified cache file + */ + public function get($key) + { + if ($this->exists($key)) { + $cacheFile = $this->getCacheFile($key); + if (!$data = json_decode(file_get_contents($cacheFile), true)) { + throw new FileCacheException('Error reading data with the key ' . $key . ' from the cache file.'); + } + return $data; + } + return null; + } + + /** + * Delete the specified cache file + */ + public function delete($key) + { + if ($this->exists($key)) { + $cacheFile = $this->getCacheFile($key); + if (!unlink($cacheFile)) { + throw new FileCacheException('Error deleting the file cache with key ' . $key); + } + return true; + } + return false; + } + + /** + * Check if the specified cache file exists + */ + public function exists($key) + { + $cacheFile = $this->getCacheFile($key); + return file_exists($cacheFile); + } + + /** + * Get the specified cache file + */ + protected function getCacheFile($key) + { + $key = $this->getCacheKey($key); + return $this->_cacheDir . DIRECTORY_SEPARATOR . $key . '.cache'; + } + + /** + * Convert cache key to unreadable value + */ + protected function getCacheKey($raw) + { + return strtolower(md5($raw . 'Iip6tPwfNi95gugl0e6')); + } +} + +class FileCacheException extends Exception{} \ No newline at end of file diff --git a/src/bb-library/GeoLite2-Country.mmdb b/src/bb-library/GeoLite2-Country.mmdb new file mode 100644 index 000000000..0fa39ad8b Binary files /dev/null and b/src/bb-library/GeoLite2-Country.mmdb differ diff --git a/src/bb-library/Model/ActivityAdminHistory.php b/src/bb-library/Model/ActivityAdminHistory.php new file mode 100644 index 000000000..0672dc303 --- /dev/null +++ b/src/bb-library/Model/ActivityAdminHistory.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param array $data + */ + public function logEvent($data) + { + if(!isset($data['admin_id']) || !isset($data['ip'])) { + return ; + } + + $entry = $this->di['db']->dispense('ActivityAdminHistory'); + $entry->admin_id = $data['admin_id']; + $entry->ip = $data['ip']; + $entry->created_at = date('c'); + $entry->updated_at = date('c'); + $this->di['db']->store($entry); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ActivityClientEmail.php b/src/bb-library/Model/ActivityClientEmail.php new file mode 100644 index 000000000..da80cad4e --- /dev/null +++ b/src/bb-library/Model/ActivityClientEmail.php @@ -0,0 +1,16 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param array $data + */ + public function logEvent($data) + { + $entry = $this->di['db']->dispense('ActivityClientEmail'); + $entry->client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $entry->sender = isset($data['sender']) ? $data['sender'] : NULL; + $entry->recipients = isset($data['recipients']) ? $data['recipients'] : NULL; + $entry->subject = isset($data['subject']) ? $data['subject'] : NULL; + $entry->content_html = isset($data['content_html']) ? $data['content_html'] : NULL; + $entry->content_text = isset($data['content_text']) ? $data['content_text'] : NULL; + $entry->created_at = isset($data['timestamp']) ? $data['timestamp'] : NULL; + $entry->updated_at = isset($data['timestamp']) ? $data['timestamp'] : NULL; + $this->di['db']->store($entry); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ActivityClientHistory.php b/src/bb-library/Model/ActivityClientHistory.php new file mode 100644 index 000000000..f28e11d0a --- /dev/null +++ b/src/bb-library/Model/ActivityClientHistory.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param array $data + */ + public function logEvent($data) + { + if(!isset($data['client_id']) || !isset($data['ip'])) { + return ; + } + + $entry = $this->di['db']->dispense('ActivityClientHistory'); + $entry->client_id = $data['client_id']; + $entry->ip = $data['ip']; + $entry->created_at = date('c'); + $entry->updated_at = date('c'); + $this->di['db']->store($entry); + } + + public function rmByClient(Model_Client $client) + { + $models = $this->di['db']->find('ActivityClientHistory', 'client_id = ?', array($client->id)); + foreach($models as $model){ + $this->di['db']->trash($model); + } + } + +} \ No newline at end of file diff --git a/src/bb-library/Model/ActivitySystem.php b/src/bb-library/Model/ActivitySystem.php new file mode 100644 index 000000000..5e5147539 --- /dev/null +++ b/src/bb-library/Model/ActivitySystem.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param array $data + */ + public function logEvent($data) + { + if(!isset($data['message']) || empty ($data['message'])) { + return ; + } + + foreach($data as $val) { + if($val instanceof Model_Admin) { + $data['admin_id'] = $val->id; + } + if($val instanceof Model_Client) { + $data['client_id'] = $val->id; + } + } + + $entry = $this->di['db']->dispense('ActivitySystem'); + $entry->client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $entry->admin_id = isset($data['admin_id']) ? $data['admin_id'] : NULL; + $entry->priority = $data['priority']; + $entry->message = $data['message']; + $entry->created_at = $data['timestamp']; + $entry->updated_at = $data['timestamp']; + $entry->ip = isset($data['ip']) ? $data['ip'] : NULL; + $this->di['db']->store($entry); + } + + public function rmByClient(Model_Client $client) + { + $models = $this->di['db']->find('ActivitySystem', 'client_id = ?', $client->id); + foreach($models as $model){ + $this->di['db']->trash($model); + } + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Admin.php b/src/bb-library/Model/Admin.php new file mode 100644 index 000000000..dc6b00ec0 --- /dev/null +++ b/src/bb-library/Model/Admin.php @@ -0,0 +1,27 @@ +name; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/AdminGroup.php b/src/bb-library/Model/AdminGroup.php new file mode 100644 index 000000000..c27e49143 --- /dev/null +++ b/src/bb-library/Model/AdminGroup.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function logRequest($request, $ip) + { + $r = $this->di['db']->dispense('ApiRequest'); + $r->ip = $ip; + $r->request = $request; + $r->created_at = date('c'); + $this->di['db']->store($r); + } + + public function getRequestCount($since, $ip = null) + { + $sinceIso = date('c', $since); + + $sql = 'SELECT count(id) as cc + WHERE created_at > :since'; + + $params = array(':since' => $sinceIso); + + if(NULL !== $ip) { + $sql .= ' AND ip = :ip'; + $params[':ip'] = $ip; + } + + $stmt = $this->di['pdo']->prepare($sql); + $stmt->execute($params); + + return $stmt->fetchColumn($stmt); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Cart.php b/src/bb-library/Model/Cart.php new file mode 100644 index 000000000..72db05fb3 --- /dev/null +++ b/src/bb-library/Model/Cart.php @@ -0,0 +1,17 @@ +mapValue('tmp_pass', $value); + return $this->_set('pass', sha1($value)); + } + + /** + * @return bool + * @deprecated + */ + public function getTempPass() + { + if($this->hasMappedValue('tmp_pass')) { + return $this->_values['tmp_pass']; + } + return false; + } + + public function getFullName() + { + return $this->first_name .' '.$this->last_name; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ClientBalance.php b/src/bb-library/Model/ClientBalance.php new file mode 100644 index 000000000..1397f927d --- /dev/null +++ b/src/bb-library/Model/ClientBalance.php @@ -0,0 +1,17 @@ +di['db']->toArray($model); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ClientOrder.php b/src/bb-library/Model/ClientOrder.php new file mode 100644 index 000000000..76eb980d2 --- /dev/null +++ b/src/bb-library/Model/ClientOrder.php @@ -0,0 +1,30 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @param array $data + */ + public function logEvent($data) + { + // do not log debug messages if debug is disabled + if(isset($data['priority']) && $data['priority'] > 6 && !BB_DEBUG) { + return ; + } + + if(!isset($data['message']) || empty ($data['message'])) { + return ; + } + + if(!isset($data['client_order_id'])) { + return ; + } + + $entry = $this->di['db']->dispense('ClientOrderStatus'); + $entry->client_order_id = $data['client_order_id']; + $entry->status = isset($data['status']) ? $data['status'] : Model_ClientOrder::STATUS_PENDING_SETUP; + $entry->notes = $data['message']; + $entry->created_at = date('c'); + $entry->updated_at = date('c'); + $this->di['db']->store($entry); + } + + public function getSearchQuery($data) + { + $sql = 'SELECT * + FROM client_order_status + WHERE 1'; + $params = array(); + + $oid = isset($data['client_order_id']) ? $data['client_order_id'] : NULL; + + if(NULL !== $oid) { + $params[':client_order_id'] = $oid; + $sql .= ' AND client_order_id = :client_order_id'; + } + + $sql .= ' ORDER BY id DESC'; + return array($sql, $params); + } + + public function toApiArray(\Model_ClientOrderStatus $model) + { + return array( + 'id' => $model->id, + 'order_id' => $model->client_order_id, + 'status' => $model->status, + 'notes' => $model->notes, + 'created_at' => $model->created_at, + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ClientOrderTable.php b/src/bb-library/Model/ClientOrderTable.php new file mode 100644 index 000000000..ec3ffa615 --- /dev/null +++ b/src/bb-library/Model/ClientOrderTable.php @@ -0,0 +1,12 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function generate(Model_Client $client, $ip) + { + $r = $this->di['db']->findOne('ClientPasswordReset', 'client_id', $client->id); + if(!$r instanceof Model_ClientPasswordReset) { + $r = $this->di['db']->dispense('ClientPasswordReset'); + $r->created_at = date('c'); + $r->client_id = $client->id; + } + + $r->ip = $ip; + $r->hash = sha1(rand(50, rand(10, 99))); + $r->updated_at = date('c'); + $this->di['db']->store($r); + + return $r; + } + + public function rmByClient(Model_Client $client) + { + $models = $this->di['db']->find('ClientPasswordReset', 'client_id = ?', array($client->id)); + foreach($models as $model){ + $this->di['db']->trash($model); + } + } + +} \ No newline at end of file diff --git a/src/bb-library/Model/Currency.php b/src/bb-library/Model/Currency.php new file mode 100644 index 000000000..d9268807c --- /dev/null +++ b/src/bb-library/Model/Currency.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getModulesCount() + { + $query = "SELECT COUNT(id) as cc + FROM extension + WHERE `type` = 'mod' + GROUP BY `type` + "; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($query); + $stmt->execute(); + return $stmt->fetch(PDO::FETCH_COLUMN); + } + + public function getModule($mod) + { + return $this->di['db']->findOne('extension', 'type = "mod" and name = ?', array($mod)); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Form.php b/src/bb-library/Model/Form.php new file mode 100644 index 000000000..088b13b52 --- /dev/null +++ b/src/bb-library/Model/Form.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($data) + { + $query = "SELECT * FROM forum ORDER BY priority ASC, category ASC"; + $bindingss = array(); + + return array($query, $bindingss); + } + + public function findAll($hydrationMode = null) + { + $query = "SELECT f.*, ft.* FROM forum f + LEFT JOIN forum_topic ft ON ft.forum_id = f.id + ORDER BY f.priority ASC, ft.id DESC"; + + return $this->di['db']->getAll($query); + } + + public function findAllActive() + { + $query = "SELECT f.*, ft.* FROM forum f + LEFT JOIN forum_topic ft ON ft.forum_id = f.id + WHERE f.status IN ('active', 'locked') + ORDER BY f.priority ASC, ft.id DESC"; + + return $this->di['db']->getAll($query); + } + + public function findOneActiveById($id) + { + $bindings = array( + ':forum_id' => $id + ); + + return $this->di['db']->findOne('Forum', "id = :forum_id AND status IN ('active', 'locked')", $bindings); + } + + public function findOneActiveBySlug($slug) + { + $bindings = array( + ':slug' => $slug + ); + + return $this->di['db']->findOne('Forum', "slug = :slug AND status IN ('active', 'locked')", $bindings); + } + + public function findAllActiveWithTopics() + { + $query = "SELECT f.*, ft.* FROM forum f + LEFT JOIN forum_topic ft ON ft.forum_id = f.id + WHERE f.status IN ('active', 'locked') + ORDER BY f.priority ASC, ft.id DESC"; + + return $this->di['db']->getAll($query); + } + + public function getNextPriority() + { + $query = "SELECT priority FROM forum ORDER BY priority ASC LIMIT 1"; + + $priority = $this->di['db']->getCell($query); + + return $priority + 1; + } + + public function moveForum(Model_Forum $forum, $dir = 'up') + { + $current = $forum->priority; + $near = ($dir == 'up') ? $current - 1 : $current + 1; + if ($near == 0) { + return true; + } + + $fn = $this->di['db']->findOne('Forum', 'priority = :priority', array(':priority' => $near)); + $fn->priority = $current; + $this->di['db']->store($fn); + + $forum->priority = $near; + $this->di['db']->store($forum); + + return true; + } + + public function getViewsCount(Model_Forum $forum) + { + $table = $this->di['table']('ForumTopic'); + + return $table->getViewsCountForForum($forum); + } + + public function getMessagesCount(Model_Forum $forum) + { + $table = $this->di['table']('ForumTopicMessage'); + + return $table->getMessagesCountForForum($forum); + } + + public function getPairs() + { + $query = "SELECT id, title FROM forum ORDER BY priority ASC"; + + return $this->di['db']->getAssoc($query); + } + + public function rm(Model_Forum $forum) + { + $table = $this->di['table']('ForumTopic'); + + $forumTopic = $this->di['db']->find('ForumTopic', 'forum_id = :forum_id', array(':forum_id' => $forum->id)); + + foreach ($forumTopic as $topic) { + $table->rm($topic); + } + $this->di['db']->trash($forum); + } + + public function toApiArray(\Model_Forum $forum, $deep = false, $identity = null) + { + $data = $this->di['db']->toArray($forum); + + $forumTopic = $this->di['db']->find('ForumTopic', 'forum_id = :forum_id', array(':forum_id' => $forum->id)); + $data['stats']['topics_count'] = count($forumTopic); + $data['stats']['posts_count'] = $this->getMessagesCount($forum); + $data['stats']['views_count'] = $this->getViewsCount($forum); + + return $data; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ForumTopic.php b/src/bb-library/Model/ForumTopic.php new file mode 100644 index 000000000..b7b9370d4 --- /dev/null +++ b/src/bb-library/Model/ForumTopic.php @@ -0,0 +1,18 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($data) + { + $query = "SELECT ftm.* + FROM forum_topic_message ftm + LEFT JOIN forum_topic ft ON ft.id = ftm.forum_topic_id + LEFT JOIN forum f ON f.id = ft.forum_id + LEFT JOIN admin a ON a.id = ftm.admin_id + LEFT JOIN client c ON c.id = ftm.client_id"; + + $search = (isset($data['q']) && !empty($data['q'])) ? $data['q'] : NULL; + $search2 = (isset($data['search']) && !empty($data['search'])) ? $data['search'] : NULL; + $forum_topic_id = (isset($data['forum_topic_id']) && !empty($data['forum_topic_id'])) ? $data['forum_topic_id'] : NULL; + $forum_id = isset($data['forum_id']) ? $data['forum_id'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + + $where = $bindings = array(); + + if ($forum_topic_id) { + $where[] = "ftm.forum_topic_id = :forum_topic_id"; + $bindings[':forum_topic_id'] = $forum_topic_id; + } + + if ($forum_id) { + $where[] = "ft.forum_id = :forum_id"; + $bindings[':forum_id'] = $forum_id; + } + + if ($client_id) { + $where[] = "ftm.client_id = :client_id"; + $bindings[':client_id'] = $client_id; + } + + if ($search) { + $where[] = "ftm.message LIKE :message"; + $bindings[':message'] = "%$search%"; + } + + if ($search2) { + $where[] = "ftm.message LIKE :message2"; + $bindings[':message2'] = "%$search%"; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + if (isset($data['orderby'])) { + if (in_array(strtolower($data['orderby']), array('id', 'created_at'))) { + $sortorder = (isset($data['sortorder']) && in_array(strtolower($data['sortorder']), array('asc', 'desc'))) ? $data['sortorder'] : 'asc'; + $query .= " ORDER BY ftm." . $data['orderby'] . " " . strtoupper($sortorder); + } + } else { + $query .= " ORDER BY ftm.id ASC"; + } + + return array($query, $bindings); + } + + public function search(array $filter = null) + { + if (!isset($filter['q'])) { + return array(); + } + + $searchQuery = $filter['q']; + + $query = "SELECT ftm.*, ft.id, ft.slug, f.id, f.slug + FROM forum_topic_message ftm + LEFT JOIN client c ON c.id = ftm.client_id + LEFT JOIN forum_topic ft ON ft.id = ftm.forum_topic_id + LEFT JOIN forum f ON f.id = fr.forum_id + WHERE ft.status IN ('active', 'locked')"; + + $where = $bindings = array(); + + if (isset($filter['match_date']) && $filter['match_date'] !== "0") { + $seconds = (int)$filter['match_date'] * 24 * 60 * 60; + $where[] = "(UNIX_TIMESTAMP() - ftm.created_at) < :created_at"; + $bindings[':created_at'] = $seconds; + //$q->andWhere('(UNIX_TIMESTAMP() - m.created_at) < ?', $seconds); + } + $where[] = "ftm.message LIKE :message"; + $bindings[':message'] = "%$searchQuery%"; + + //$q->andWhere('m.message LIKE ?', "%$searchQuery%"); + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " ORDER BY ftm.id DESC"; + + return $this->di['db']->getAssoc($query, $bindings); + } + + public function searchForum(Model_Forum $forum, array $filter = null) + { + if (!isset($filter['q'])) { + return array(); + } + + $searchQuery = $filter['q']; + + $query = "SELECT ftm.*, ft.id, ft.slug + FROM forum_topic_message ftm + LEFT JOIN client c ON c.id = ftm.client_id + LEFT JOIN forum_topic ft ON ft.id = ftm.forum_topic_id + WHERE ft.status IN ('active', 'locked') + AND ft.forum_id = :forum_id"; + + $where = $bindings = array(); + $bindings[':forum_id'] = $forum->id; + + if (isset($filter['match_date']) && $filter['match_date'] !== "0") { + $seconds = (int)$filter['match_date'] * 24 * 60 * 60; + $where[] = "(UNIX_TIMESTAMP() - ftm.created_at) < :created_at"; + $bindings[':created_at'] = $seconds; + } + + $where[] = "ftm.message LIKE :message"; + $bindings[':message'] = "%$searchQuery%"; + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " ORDER BY ftm.id DESC"; + + return $this->di['db']->getAssoc($query, $bindings); + } + + public function findTopicMessages(Model_ForumTopic $topic) + { + $query = "SELECT ftm.*, ft.id, ft.slug + FROM forum_topic_message ftm + LEFT JOIN client c ON c.id = ftm.client_id + WHERE ftm.forum_topic_id = :forum_topic_id + ORDER BY ftm.id ASC"; + $bindings = array( + ':forum_topic_id' => $topic->id + ); + + return $this->di['db']->getAssoc($query, $bindings); + } + + public function getMessagesCountForTopic(Model_ForumTopic $topic) + { + $query = 'SELECT COUNT(id) as posts + FROM forum_topic_message + WHERE forum_topic_id = :forum_topic_id + GROUP BY forum_topic_id'; + $bindings = array( + ':forum_topic_id' => $topic->id + ); + + return $this->di['db']->getCell($query, $bindings); + } + + public function getMessagesCountForForum(Model_Forum $forum) + { + $query = 'SELECT COUNT(ftm.id) as posts + FROM forum_topic_message ftm + LEFT JOIN forum_topic ft ON ftm.forum_topic_id = ft.id + WHERE ft.forum_id = :forum_id + GROUP BY ft.forum_id'; + $bindings = array( + ':forum_id' => $forum->id + ); + + return $this->di['db']->getCell($query, $bindings); + } + + public function getAuthorDetails(Model_ForumTopicMessage $model) + { + $author = false; + + if ($model->admin_id) { + $author = $this->di['db']->getExistingModelById('Admin', $model->admin_id, 'Admin not found'); + } + + if ($model->client_id) { + $author = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); + } + + if ($author) { + return array( + 'id' => $author->id, + 'name' => $author->getFullName(), + 'email' => $author->email, + ); + } + + return array( + 'id' => null, + 'name' => 'Anonymous', + 'email' => 'anonymous@anonymous.com', + ); + } + + /** + * Do not remove client messages but mark them as null + * @param Model_Client $client + */ + public function rmByClient(Model_Client $client) + { + $query = "UPDATE forum_topic_message + SET client_id = NULL + WHERE client_id = :client_id"; + $bindings = array( + ':client_id' => $client->id + ); + + $this->di['db']->exec($query, $bindings); + } + + public function rm(Model_ForumTopicMessage $model) + { + $messages = $this->di['db']->find('ForumTopicMessage', 'forum_topic_id = :forum_topic_id', array(':forum_topic_id' => $model->forum_topic_id)); + if (count($messages) == 1) { + throw new \Box_Exception('This is a last message in topic. Remove topic in order to remove this message.'); + } + + $this->di['db']->trash($model); + } + + public function toApiArray(Model_ForumTopicMessage $model, $deep = false, $identity = null) + { + $topic = null; + $forum = null; + $topic = $this->di['db']->load('ForumTopic', $model->forum_topic_id); + + if ($topic instanceof Model_ForumTopic) { + if ($topic->Forum instanceof Model_Forum) { + $topic = $this->di['db']->load('Forum', $topic->forum_id); + } + } + + $data = array( + 'id' => $model->id, + 'forum_topic_id' => $model->forum_topic_id, + 'message' => $model->message, + 'created_at' => $model->created_at, + 'updated_at' => $model->updated_at, + 'author' => $this->getAuthorDetails($model), + ); + + if ($forum) { + $data['forum_slug'] = $forum->slug; + } else { + $data['forum_slug'] = null; + } + + if ($topic) { + $data['forum_topic_slug'] = $topic->slug; + } else { + $data['forum_topic_slug'] = null; + } + + if ($identity instanceof Model_Admin) { + $data['ip'] = $model->ip; + } + + return $data; + } + +} \ No newline at end of file diff --git a/src/bb-library/Model/ForumTopicTable.php b/src/bb-library/Model/ForumTopicTable.php new file mode 100644 index 000000000..c99f1af28 --- /dev/null +++ b/src/bb-library/Model/ForumTopicTable.php @@ -0,0 +1,222 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + public function getActiveForumTopics(Model_Forum $forum) + { + return $this->getActiveForumTopicsQuery($forum)->execute(); + } + + public function getSearchQuery($data) + { + $query = "SELECT ft.* FROM forum_topic ft + LEFT JOIN forum_topic_message ftm ON ftm.forum_topic_id = ft.id"; + + $search = isset($data['search']) ? $data['search'] : NULL; + + $where = $bindings = array(); + + if (isset($data['forum_id']) && !empty($data['forum_id'])) { + $where[] = "ft.forum_id = :forum_id"; + $bindings[':forum_id'] = $data['forum_id']; + } + + if ($search) { + $where[] = "ft.title LIKE :title OR ftm.message LIKE :message"; + $bindings[':title'] = "%$search%"; + $bindings[':message'] = "%$search%"; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + $query .= " GROUP BY ft.id ORDER BY ft.sticky DESC, ftm.id DESC"; + + return array($query, $bindings); + } + + public function getTopicsByIds(array $ids) + { + if(empty($ids)) { + return array(); + } + + $bindings = array( + ':ids' => implode(',', $ids) + ); + + return $this->di['db']->find('ForumTopic', "id IN (:ids) AND status IN ('active', 'locked')", $bindings); + } + + public function getActiveForumTopicsQuery(Model_Forum $forum) + { + $query = "SELECT * FROM forum_topic ft + LEFT JOIN forum_topic_message ftm ON ftm.forum_topic_id = ft.id + WHERE ft.forum_id = :forum_id + AND ft.status IN ('active', 'locked') + ORDER BY ftm.created_at DESC"; + + $bindings = array( + ':forum_id' => $forum->id + ); + + return array($query, $bindings); + } + + public function findTopic($slug) + { + $query = "SELECT ft.*, f.* FROM forum_topic ft + LEFT JOIN forum f ON ft.forum_id = f.id + WHERE ft.slug = :slug + AND ft.status IN ('active', 'locked')"; + + $bindings = array( + ':slug' => $slug + ); + + return $this->di['db']->getAssoc($query, $bindings); + } + + public function findForumTopic($forum, $topic) + { + $query = "SELECT ft.*, f.*, ftm.* + FROM forum_topic ft + LEFT JOIN forum f ON ft.forum_id = f.id + LEFT JOIN forum_topic_message ftm ON ftm.forum_topic_id = ft.id + WHERE ft.slug = :topic + AND f.slug = :forum"; + + $bindings = array( + ':topic' => $topic, + ':forum' => $forum + ); + + return $this->di['db']->getAssoc($query, $bindings); + } + + public function getViewsCountForForum(Model_Forum $forum) + { + $query = "SELECT SUM(views) as views + FROM forum_topic + WHERE forum_id = :forum_id + GROUP BY id + "; + $bindings = array( + ':forum_id' => $forum->id + ); + + return $this->di['db']->getCell($query, $bindings); + } + + public function hitView(Model_ForumTopic $topic) + { + $topic->views = $topic->views + 1; + $this->di['db']->store($topic); + } + + public function getAuthorClient(Model_ForumTopic $topic) + { + $bindings = array( + ':forum_topic_id' => $topic->id + ); + $forumTopicMessage = $this->di['db']->findOne('ForumTopicMessage', 'forum_topic_id = :forum_topic_id ORDER BY id ASC LIMIT 1', $bindings); + if($forumTopicMessage instanceof Model_ForumTopicMessage) { + return $this->di['db']->getExistingModelById('Client', $forumTopicMessage->client_id, 'Client not found'); + } + return null; + } + + public function getParticipants(Model_ForumTopic $topic) + { + $q="SELECT DISTINCT(client_id) as id FROM `forum_topic_message` + WHERE forum_topic_id = :id + AND client_id IS NOT NULL"; + + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($q); + $stmt->execute(array('id'=>$topic->id)); + return $stmt->fetchAll(PDO::FETCH_COLUMN); + } + + public function rm(Model_ForumTopic $topic) + { + $bindings = array( + ':forum_topic_id' => $topic->id + ); + + $forumTopicMessage = $this->di['db']->find('ForumTopicMessage', 'forum_topic_id = :forum_topic_id', $bindings); + + foreach ($forumTopicMessage as $msg) { + $this->di['db']->trash($msg); + } + + $this->di['db']->trash($topic); + } + + public function toApiArray(Model_ForumTopic $topic, $deep = false, $identity = null) + { + $table = $this->di['table']('ForumTopicMessage'); + + $bindings = array( + ':forum_topic_id' => $topic->id + ); + + $forum = $this->di['db']->getExistingModelById('Forum', $topic->forum_id);; + $first = $this->di['db']->findOne('ForumTopicMessage', 'forum_topic_id = :forum_topic_id ORDER BY id ASC LIMIT 1', $bindings);; + $last = $this->di['db']->findOne('ForumTopicMessage', 'forum_topic_id = :forum_topic_id ORDER BY id DESC LIMIT 1', $bindings);; + + $data = array( + 'id' => $topic->id, + 'title' => $topic->title, + 'slug' => $topic->slug, + 'status' => $topic->status, + 'sticky' => $topic->sticky, + 'created_at' => $topic->created_at, + 'updated_at' => $topic->updated_at, + ); + $data['forum'] = array( + 'id' => $forum->id, + 'slug' => $forum->slug, + 'title' => $forum->title, + 'category' => $forum->category, + ); + if($first instanceof Model_ForumTopicMessage) { + $data['first'] = $table->toApiArray($first, $deep, $identity); + } + + if($last instanceof Model_ForumTopicMessage) { + $data['last'] = $table->toApiArray($last, $deep, $identity); + } + + $data['stats']['posts_count'] = $table->getMessagesCountForTopic($topic); + $data['stats']['views_count'] = $topic->views; + + return $data; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Guest.php b/src/bb-library/Model/Guest.php new file mode 100644 index 000000000..df13f8afa --- /dev/null +++ b/src/bb-library/Model/Guest.php @@ -0,0 +1,14 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($data) + { + $sql = 'SELECT * + FROM post + WHERE 1 '; + $params = array(); + + $search = isset($data['search']) ? $data['search'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + + if(NULL !== $status) { + $sql .= ' status = :status '; + $params[':status'] = $status; + } + + if($search) { + $sql .= ' title LIKE :title OR content :content ? '; + $params[':title'] = "%$search%"; + $params[':content'] = "%$search%"; + } + + $sql .= ' ORDER BY id DESC'; + return array($sql, $params); + } + + public function findOneActiveById($id) + { + return $this->di['db']->findOne('Post', 'id = ? and status = "active"', array($id)); + } + + public function findOneActiveBySlug($slug) + { + return $this->di['db']->findOne('Post', 'slug = ? and status = "active"', array($slug)); + } + + public function findActive() + { + return $this->di['db']->find('Post', 'active = 1'); + } + + public function getAuthorDetails(Model_Post $model) + { + $author = $this->di['db']->load('Admin', $model->admin_id); + return array( + 'name' => $author->getFullName(), + 'email' => $author->email, + ); + } + + public function rm(Model_Post $model) + { + $this->di['db']->trash($model); + } + + public function toApiArray(Model_Post $model, $deep = true) + { + $data = $this->di['db']->toArray($model); + $data['author'] = $this->getAuthorDetails($model); + return $data; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Product.php b/src/bb-library/Model/Product.php new file mode 100644 index 000000000..02b245b61 --- /dev/null +++ b/src/bb-library/Model/Product.php @@ -0,0 +1,65 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function getTable() + { + $tableName = 'Model_Product'. ucfirst($this->type). 'Table'; + if(!class_exists($tableName)) { + $tableName = 'Model_ProductTable'; + } + $productTable = new $tableName; + $productTable->setDi($this->di); + return $productTable; + } + + public function getService() + { + return $this->di['mod_service']('service'.$this->type); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ProductCategory.php b/src/bb-library/Model/ProductCategory.php new file mode 100644 index 000000000..d6c015e1f --- /dev/null +++ b/src/bb-library/Model/ProductCategory.php @@ -0,0 +1,16 @@ +di['mod_service']('Product'); + return $productService->toAddonArray($model, $deep); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ProductDomain.php b/src/bb-library/Model/ProductDomain.php new file mode 100644 index 000000000..d03690e3f --- /dev/null +++ b/src/bb-library/Model/ProductDomain.php @@ -0,0 +1,17 @@ +getPricingArray($model); + foreach($prices as $tld) { + $p[] = $tld['price_registration']; + } + return empty($p) ? 0 : min($p); + } + + public function isRecurrentPricing(Model_Product $model) + { + return false; + } + + public function getRelatedDiscount(array $items, Model_Product $product, array $config) + { + foreach($items as $item) { + + if($this->isActionNameSet($item, 'register') && + $this->isFreeDomainSet($item) && + $this->domainMatch($item, $config) ) + { + return $this->getProductPrice($product, $config); + } + + if($this->isActionNameSet($item, 'transfer') && + $this->isFreeTransferSet($item) && + $this->domainMatch($item, $config) ) { + return $this->getProductPrice($product, $config); + } + } + + return 0; + } + + private function isActionNameSet($item, $actionName) + { + return isset($item['config']['domain']['action']) && $item['config']['domain']['action'] == $actionName; + } + + private function isFreeDomainSet($item) + { + return isset($item['config']['free_domain']) && $item['config']['free_domain']; + } + + private function domainMatch($item, $config) + { + return $item['config']['domain']['register_sld'] == $config['register_sld'] && $item['config']['domain']['register_tld'] == $config['register_tld']; + } + + private function isFreeTransferSet($item) + { + return isset($item['config']['free_transfer']) && $item['config']['free_transfer']; + } + + + public function getPricingArray(Model_Product $product) + { + $pricing = array(); + + $sql=" + SELECT t.*, r.name + FROM tld t + LEFT JOIN tld_registrar r ON (r.id = t.tld_registrar_id) + WHERE t.active = 1 + ORDER BY t.id ASC + "; + $stmt = $this->di['pdo']->prepare($sql); + $stmt->execute(); + + foreach($stmt->fetchAll() as $tld) { + $pricing[$tld['tld']] = array( + 'tld' => $tld['tld'], + 'price_registration' => $tld['price_registration'], + 'price_renew' => $tld['price_renew'], + 'price_transfer' => $tld['price_transfer'], + 'active' => $tld['active'], + 'allow_register' => $tld['allow_register'], + 'allow_transfer' => $tld['allow_transfer'], + 'min_years' => $tld['min_years'], + 'registrar' => array( + 'id' => $tld['tld_registrar_id'], + 'title' => $tld['name'], + ) + ); + } + + return $pricing; + } + + public function getProductPrice(Model_Product $product, array $config = array()) + { + $rtable = $this->di['mod_service']('servicedomain', 'Tld'); + $tld = ''; + + if(!isset($config['action'])) { + throw new \Box_Exception('Could not determine domain price. Domain action is missing', null, 498); + } + + if($config['action'] == 'owndomain') { + return 0; + } + + if($config['action'] == 'register') { + $tld = $config['register_tld']; + } + + if($config['action'] == 'transfer') { + $tld = $config['transfer_tld']; + } + + $tld = $rtable->findOneByTld($tld); + if(!$tld instanceof Model_Tld) { + throw new \Box_Exception('Unknown TLD. Could not determine registration price'); + } + + if($config['action'] == 'register') { + return $tld->price_registration; + } + + if($config['action'] == 'transfer') { + return $tld->price_transfer; + } + + return 0; + } + + public function getProductSetupPrice(Model_Product $product, array $config = array()) + { + return 0; + } + + public function rm(Model_Product $product) + { + throw new \Box_Exception('Domain product can not be removed.'); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ProductDownloadable.php b/src/bb-library/Model/ProductDownloadable.php new file mode 100644 index 000000000..85dfe1a99 --- /dev/null +++ b/src/bb-library/Model/ProductDownloadable.php @@ -0,0 +1,17 @@ +getSavePath($config['filename']); + if(file_exists($f)) { + unlink($f); + } + } + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ProductHosting.php b/src/bb-library/Model/ProductHosting.php new file mode 100644 index 000000000..30f97d97a --- /dev/null +++ b/src/bb-library/Model/ProductHosting.php @@ -0,0 +1,17 @@ + 'Free', + Model_ProductPayment::ONCE => 'One time', + Model_ProductPayment::RECURRENT => 'Recurrent', + ); + } + + /** + * @deprecated moved to Product\Service + */ + public function getStartingFromPrice(Model_ProductPayment $model) + { + if($model->type == 'free') { + return 0; + } + + if($model->type == 'once') { + return $model->once_price; + } + + if($model->type == 'recurrent') { + $p = array(); + + if($model->w_enabled) { + $p[] = $model->w_price; + } + + if($model->m_enabled) { + $p[] = $model->m_price; + } + + if($model->q_enabled) { + $p[] = $model->q_price; + + } + + if($model->b_enabled) { + $p[] = $model->b_price; + } + + if($model->a_enabled) { + $p[] = $model->a_price; + } + + if($model->bia_enabled) { + $p[] = $model->bia_price; + } + + if($model->tria_enabled) { + $p[] = $model->tria_price; + } + return min($p); + } + + return NULL; + } + + /** + * @deprecated moved to Product\Service::toProductPaymentApiArray + */ + public function toApiArray($model) + { + $periods = array(); + $periods['1W'] = array('price'=>$model->w_price, 'setup'=>$model->w_setup_price, 'enabled'=>$model->w_enabled); + $periods['1M'] = array('price'=>$model->m_price, 'setup'=>$model->m_setup_price, 'enabled'=>$model->m_enabled); + $periods['3M'] = array('price'=>$model->q_price, 'setup'=>$model->q_setup_price, 'enabled'=>$model->q_enabled); + $periods['6M'] = array('price'=>$model->b_price, 'setup'=>$model->b_setup_price, 'enabled'=>$model->b_enabled); + $periods['1Y'] = array('price'=>$model->a_price, 'setup'=>$model->a_setup_price, 'enabled'=>$model->a_enabled); + $periods['2Y'] = array('price'=>$model->bia_price, 'setup'=>$model->bia_setup_price, 'enabled'=>$model->bia_enabled); + $periods['3Y'] = array('price'=>$model->tria_price, 'setup'=>$model->tria_setup_price, 'enabled'=>$model->tria_enabled); + + return array( + 'type' => $model->type, + Model_ProductPayment::FREE => array('price'=>0, 'setup'=>0), + Model_ProductPayment::ONCE => array('price'=>$model->once_price, 'setup'=>$model->once_setup_price), + Model_ProductPayment::RECURRENT => $periods, + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/ProductTable.php b/src/bb-library/Model/ProductTable.php new file mode 100644 index 000000000..6f9aa3dfa --- /dev/null +++ b/src/bb-library/Model/ProductTable.php @@ -0,0 +1,176 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function getUnit(Model_Product $model) + { + return $model->unit; + } + + /** + * @deprecated in order of Box_Period appear + * @param Box_Period $period + * @return string + */ + private function _getPeriodKey(Box_Period $period) + { + $code = $period->getCode(); + switch ($code) { + case '1W': + return 'w'; + break; + + case '1M': + return 'm'; + break; + + case '3M': + return 'q'; + break; + + case '6M': + return 'b'; + break; + + case '12M': + case '1Y': + return 'a'; + break; + + case '2Y': + return 'bia'; + break; + + case '3Y': + return 'tria'; + break; + + default: + throw new Exception('Unknown period selected ' . $code); + break; + } + } + + public function getPricingArray(Model_Product $model) + { + if($model->product_payment_id) { + $service = $this->di['mod_service']('product'); + $productPayment = $this->di['db']->load('ProductPayment', $model->product_payment_id); + return $service->toProductPaymentApiArray($productPayment); + } + + throw new \Box_Exception('Product pricing could not be determined. '.get_class($this)); + } + + /** + * Price for one unit + * + * @param Model_Product $product + * @param Model_Currency $currency + * @param array $config + * @return float + */ + public function getProductSetupPrice(Model_Product $product, array $config = null) + { + $pp = $this->di['db']->load('ProductPayment', $product->product_payment_id); + + if($pp->type == Model_ProductPayment::FREE) { + $price = 0; + } + + if($pp->type == Model_ProductPayment::ONCE) { + $price = (float)$pp->once_setup_price; + } + + if($pp->type == Model_ProductPayment::RECURRENT) { + $period = new Box_Period($config['period']); + $key = $this->_getPeriodKey($period); + $price = (float)$pp->{$key.'_setup_price'}; + } + + if(isset($price)) { + return $price; + } + + throw new \Box_Exception('Unknown Period selected for setup price'); + } + + /** + * Price for one unit + * + * @param Model_Product $product + * @param Model_Currency $currency + * @param array $config + * @return float + */ + public function getProductPrice(Model_Product $product, array $config = null) + { + $pp = $this->di['db']->load('ProductPayment', $product->product_payment_id); + + if($pp->type == Model_ProductPayment::FREE) { + $price = 0; + } + + if($pp->type == Model_ProductPayment::ONCE) { + $price = $pp->once_price; + } + + if($pp->type == Model_ProductPayment::RECURRENT) { + if(!isset($config['period'])) { + throw new \Box_Exception('Product :id payment type is recurrent, but period was not selected', array(':id'=>$product->id)); + } + + $period = new Box_Period($config['period']); + $key = $this->_getPeriodKey($period); + $price =$pp->{$key.'_price'}; + } + + if(isset($price)) { + return $price; + } + + throw new \Box_Exception('Unknown Period selected for price'); + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Promo.php b/src/bb-library/Model/Promo.php new file mode 100644 index 000000000..b1de00a01 --- /dev/null +++ b/src/bb-library/Model/Promo.php @@ -0,0 +1,18 @@ +setTmpPass($value); + $this->_set('pass', sha1($value)); + } + + private function setTmpPass($value) + { + $this->_tmp_pass = $value; + return $this; + } + + public function getTmpPass() + { + if($this->_tmp_pass) { + return $this->_tmp_pass; + } + return '********'; + } + +} \ No newline at end of file diff --git a/src/bb-library/Model/ServiceHostingHp.php b/src/bb-library/Model/ServiceHostingHp.php new file mode 100644 index 000000000..43f7b7c9b --- /dev/null +++ b/src/bb-library/Model/ServiceHostingHp.php @@ -0,0 +1,17 @@ +_decodeJson($this->ips); + } + + public function getAllowedVersions() + { + return $this->_decodeJson($this->versions); + } + + public function getAllowedHosts() + { + return $this->_decodeJson($this->hosts); + } + + public function getAllowedPaths() + { + return $this->_decodeJson($this->paths); + } + +} \ No newline at end of file diff --git a/src/bb-library/Model/ServiceMembership.php b/src/bb-library/Model/ServiceMembership.php new file mode 100644 index 000000000..f02151a97 --- /dev/null +++ b/src/bb-library/Model/ServiceMembership.php @@ -0,0 +1,17 @@ +di = $di; + } + + /** + * @return Box_Di + */ + public function getDi() + { + return $this->di; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/Setting.php b/src/bb-library/Model/Setting.php new file mode 100644 index 000000000..37fc3d7a3 --- /dev/null +++ b/src/bb-library/Model/Setting.php @@ -0,0 +1,17 @@ +admin_id) { + $author = $model->Admin; + return array( + 'name' => $author->getFullName(), + 'email' => $author->email, + ); + } + + $ticket = $model->SupportPTicket; + return array( + 'name' => $ticket->author_name, + 'email' => $ticket->author_email, + ); + } + + public function toApiArray(Model_SupportPTicketMessage $model, $deep = true) + { + $data = $model->toArray(false); + $data['author'] = $this->getAuthorDetails($model); + return $data; + } +} \ No newline at end of file diff --git a/src/bb-library/Model/SupportPr.php b/src/bb-library/Model/SupportPr.php new file mode 100644 index 000000000..a80ccb8dd --- /dev/null +++ b/src/bb-library/Model/SupportPr.php @@ -0,0 +1,17 @@ +getParam('email')) { + throw new Payment_Exception('Payment gateway "AlertPay" is not configured properly. Please update configuration parameter "AlertPay Email address" at "Configuration -> Payments".'); + } + + if (!$this->getParam('securityCode')) { + throw new Payment_Exception('Payment gateway "AlertPay" is not configured properly. Please update configuration parameter "IPN Security Code" at "Configuration -> Payments".'); + } + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'Clients will be redirected to alertpay.com to make payment. Note that alertpay.com supports credit card payments.
' . + 'In your alertpay account go to Business Tools > IPN Setup and enable: IPN Status', + 'form' => array( + 'email' => array('text', array( + 'label' => 'AlertPay Email address', + 'description' => 'Your business account email at AlertPay', + 'validators'=>array('EmailAddress'), + ), + ), + 'securityCode' => array('password', array( + 'label' => 'IPN Security Code', + 'description' => 'To setup your "IPN Security Code" login to AlertPay account. Go to "Business Tools" -> "IPN setup". Enter your PIN and click on "Access". Copy "IPN Security Code" and paste it to this field.', + 'validators' => array('notempty'), + ), + ), + ), + ); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + /** + * Return payment gateway type + * @return string + */ + public function getServiceUrl() + { + if($this->testMode) { + return 'https://sandbox.alertpay.com/sandbox/payprocess.aspx'; + } + return 'https://www.alertpay.com/PayProcess.aspx'; + } + + public function getInvoiceId($data) + { + $id = parent::getInvoiceId($data); + if(!is_null($id)) { + return $id; + } + + return isset($data['post']['apc_1']) ? (int)$data['post']['apc_1'] : NULL; + } + + public function singlePayment(Payment_Invoice $invoice) + { + $c = $invoice->getBuyer(); + $params = array( + 'ap_merchant' => $this->getParam('email'), + 'ap_purchasetype' => 'service', + 'ap_currency' => $invoice->getCurrency(), + 'ap_alerturl' => $this->getParam('notify_url'), + 'ap_returnurl' => $this->getParam('return_url'), + 'ap_cancelurl' => $this->getParam('cancel_url'), + 'ap_fname' => $c->getFirstName(), + 'ap_lname' => $c->getLastName(), + 'ap_contactemail' => $c->getEmail(), + 'ap_contactphone' => $c->getPhone(), + 'ap_addressline1' => $c->getAddress(), + 'ap_city' => $c->getCity(), + 'ap_stateprovince' => $c->getState(), + 'ap_zippostalcode' => $c->getZip(), + 'ap_country' => $c->getCountry(), + 'apc_1' => $invoice->getId(), + 'apc_2' => $invoice->getNumber(), + ); + + $i = 1; + foreach ($invoice->getItems() as $item) { + $params['ap_itemcode_' . $i] = $item->getId(); + $params['ap_itemname_' . $i] = $item->getTitle(); + $params['ap_description_' . $i] = $item->getDescription(); + $params['ap_amount_' . $i] = $item->getPrice() + $item->getTax(); + $params['ap_quantity_' . $i] = $item->getQuantity(); + $i++; + } + + return $params; + } + + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('Not implemented yet'); + } + + + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + $tx = new Payment_Transaction(); + $tx->setAmount($ipn['ap_totalamount']); + $tx->setCurrency($ipn['ap_currency']); + + if($ipn['ap_transactiontype'] == 'purchase') { + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + } + + if($ipn['ap_status'] == 'Success') { + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + } + + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + return ($ipn['ap_securitycode'] == $this->getParam('securityCode')); + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/AliPay.php b/src/bb-library/Payment/Adapter/AliPay.php new file mode 100644 index 000000000..2fda7df0c --- /dev/null +++ b/src/bb-library/Payment/Adapter/AliPay.php @@ -0,0 +1,216 @@ +getParam('partner')) { + throw new Payment_Exception('Payment gateway "AliPay" is not configured properly. Please update configuration parameter "Partner ID" at "Configuration -> Payment gateways".'); + } + + if (!$this->getParam('security_code')) { + throw new Payment_Exception('Payment gateway "AliPay" is not configured properly. Please update configuration parameter "Security Code" at "Configuration -> Payment gateways".'); + } + + if (!$this->getParam('seller_email')) { + throw new Payment_Exception('Payment gateway "AliPay" is not configured properly. Please update configuration parameter "Seller email" at "Configuration -> Payment gateways".'); + } + + $this->_config['charset'] = 'utf-8'; + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'Clients will be redirected to Alipay to make payment.', + 'form' => array( + 'partner' => array('text', array( + 'label' => 'AliPay Partner ID. After signing contract online successfully, Alipay provides the partner id', + ), + ), + 'security_code' => array('text', array( + 'label' => 'AliPay security code. After signing contract online successfully, Alipay provides the 32bits security code', + ), + ), + 'seller_email' => array('text', array( + 'label' => 'AliPay seller email. Your Alipay account', + ), + ), + 'type' => array('select', array( + 'multiOptions' => array( + '1' => 'Type 1 - receive money at once. You need to be registered company in china', + '2' => 'Type 2 - receive money after buyer confirm it' + ), + 'label' => 'Contract type. Type 1: is mainly for virtual goods. So seller can receive money at once, but it requires seller is an register company; Type 2 is mainly for real goods, when buyer receive goods, then buyer check the goods is right and confirm to pay! During the process, the money is held by Alipay, if buyer dont claim to get money back, whether confirm or not, the money will transfer to seller after certain days.', + ), + ), + ), + ); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + /** + * Return payment gateway type + * @return string + */ + public function getServiceUrl() + { + if($this->testMode) { + return 'https://www.alipay.com/cooperate/gateway.do'; + } + return 'https://www.alipay.com/cooperate/gateway.do'; + } + + public function getInvoiceId($data) + { + $id = parent::getInvoiceId($data); + if(is_null($id)) { + $id = isset($data['post']['out_trade_no']) ? (int)$data['post']['out_trade_no'] : NULL; + } + return $id; + } + + public function singlePayment(Payment_Invoice $invoice) + { + $client = $invoice->getBuyer(); + + $contract = $this->getParam('type'); + switch ($contract){ + case '0': + $service = 'trade_create_by_buyer'; + break; + case '1': + $service = 'create_direct_pay_by_user'; + break; + case '2': + $service = 'create_partner_trade_by_buyer'; + break; + } + + $parameter = array( + 'service' => $service, + 'partner' => $this->getParam('partner'), + '_input_charset' => $this->getParam('charset'), + 'notify_url' => $this->getParam('notify_url'), + 'return_url' => $this->getParam('thankyou_url'), + + 'subject' => $invoice->getTitle(), + 'out_trade_no' => $invoice->getId(), + 'price' => $invoice->getTotalWithTax(), + 'quantity' => 1, + 'payment_type' => 1, + + 'logistics_type' => 'EXPRESS', + 'logistics_fee' => 0, + 'logistics_payment' => 'BUYER_PAY_AFTER_RECEIVE', + + 'seller_email' => $this->getParam('seller_email'), + ); + + ksort($parameter); + reset($parameter); + $data = $parameter; + $data['sign'] = $this->_generateSignature($parameter); + $data['sign_type'] = 'MD5'; + + return $data; + } + + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('AliPay does not support recurrent payments'); + } + + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + $uniqid = md5($ipn['trade_no'].$ipn['trade_status']); + + $tx = new Payment_Transaction(); + $tx->setId($uniqid); + $tx->setAmount($ipn['total_fee']); + $tx->setCurrency($invoice->getCurrency()); + + $contract = $this->getParam('type'); + if($contract == '1') { + switch ($ipn['trade_status']) { + case 'TRADE_SUCCESS': + case 'TRADE_FINISHED': + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + break; + + default: + $tx->setStatus($ipn['trade_status']); + break; + } + } + + if($contract == '2') { + switch ($ipn['trade_status']) { + case 'WAIT_SELLER_SEND_GOODS': + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + break; + + default: + $tx->setStatus($ipn['trade_status']); + break; + } + } + + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + ksort($ipn); + reset($ipn); + + $sign = ''; + foreach ($ipn AS $key=>$val) + { + if ($key != 'sign' && $key != 'sign_type' && $key != 'code' && $key !='bb_gateway_id' && $key != 'bb_invoice_id') + { + $sign .= "$key=$val&"; + } + } + + $sign = substr($sign, 0, -1) . $this->getParam('security_code'); + return (md5($sign) == $ipn['sign']); + } + + private function _generateSignature(array $parameter) + { + $sign = ''; + foreach ($parameter AS $key => $val) + { + $sign .= "$key=$val&"; + } + $sign = substr($sign, 0, -1) . $this->getParam('security_code'); + return md5($sign); + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/AuthorizeNet.php b/src/bb-library/Payment/Adapter/AuthorizeNet.php new file mode 100644 index 000000000..a67e5031b --- /dev/null +++ b/src/bb-library/Payment/Adapter/AuthorizeNet.php @@ -0,0 +1,206 @@ +getParam('apiLoginId')) { + throw new Payment_Exception('Payment gateway "Authorize.net" is not configured properly. Please update configuration parameter "API Login ID" at "Configuration -> Payments".'); + } + + if (!$this->getParam('transactionKey')) { + throw new Payment_Exception('Payment gateway "Authorize.net" is not configured properly. Please update configuration parameter "Transaction Key" at "Configuration -> Payments".'); + } + + if (!$this->getParam('md5Hash')) { + throw new Payment_Exception('Payment gateway "Authorize.net" is not configured properly. Please update configuration parameter "MD5 Hash Value" at "Configuration -> Payments".'); + } + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'To setup Authorize.net merchant account in BoxBilling you need to go to Account > Settinggs > MD5-Hash and enter your own secret hash values. To receive instant payment notifications, copy "IPN callback URL" to Authorize.net "Account->Silent Post URL"', + 'form' => array( + 'apiLoginId' => array('text', array( + 'label' => 'API Login ID', + 'description' => 'Authorize.net API Login ID', + ), + ), + 'transactionKey' => array('password', array( + 'label' => 'Transaction Key', + 'description' => 'Authorize.net Transaction Key', + ), + ), + 'md5Hash' => array('password', array( + 'label' => 'MD5 Hash Value', + 'description' => 'The MD5 Hash value is a random value configured by the merchant in the Merchant Interface. It should be stored securely separately from the merchant\'s Web server. For more information on how to configure this value, see the Merchant Integration Guide at http://www.authorize.net/support/merchant/.', + ), + ), + ), + ); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + public function getServiceUrl() { + if ($this->testMode) { + return 'https://test.authorize.net/gateway/transact.dll'; + } + + return 'https://secure.authorize.net/gateway/transact.dll'; + } + + /** + * Get invoice id from IPN + * x_invoice_id is custom param in SIM request + * + * @param array $data + * @return int + */ + public function getInvoiceId($data) + { + $ipn = $data['post']; + return isset($ipn['x_invoice_id']) ? (int)$ipn['x_invoice_id'] : NULL; + } + + /** + * Authorize.net SIM integration. + * Requires to setup ONLY "Silent Post URL" at mechants account + * + * @param Payment_Invoice $invoice + * @return array + */ + public function singlePayment(Payment_Invoice $invoice) { + $b = $invoice->getBuyer(); + $fp_sequence = uniqid(); + $fp_timestamp = time(); + $finger = $this->_getFingerprint($invoice->getTotalWithTax(), $invoice->getCurrency(), $fp_sequence, $fp_timestamp); + + $params = array( + 'x_fp_hash' => $finger, + 'x_fp_sequence' => $fp_sequence, //The merchant-assigned sequence number for the transaction + 'x_fp_timestamp' => $fp_timestamp, //The timestamp at the time of fingerprint generation + 'x_login' => $this->getParam('apiLoginId'), //The merchant's unique API Login ID + 'x_version' => '3.1', + 'x_show_form' => 'PAYMENT_FORM', + 'x_method' => 'CC', + 'x_amount' => $invoice->getTotalWithTax(), + 'x_currency_code' => $invoice->getCurrency(), + 'x_invoice_id' => $invoice->getId(), + 'x_invoice_num' => $invoice->getNumber(), //The merchant-assigned invoice number for the transaction + 'x_test_request' => $this->testMode ? 'TRUE' : 'FALSE', + 'x_address' => $b->getAddress(), //The customer's billing address + 'x_city' => $b->getCity(), //The city of the customer's billing address + 'x_country' => $b->getCountry(), //The country of the customer's billing address + 'x_email' => $b->getEmail(), //The customer's valid email address + 'x_first_name' => $b->getFirstName(), //The first name associated with the customer's billing address + 'x_last_name' => $b->getLastName(), //The last name associated with the customer's billing address + 'x_phone' => $b->getPhone(), //The phone number associated with the customer's billing address + 'x_company' => $b->getCompany(), + 'x_state' => $b->getState(), //The state of the customer's billing address + 'x_zip' => $b->getZip(), //The ZIP code of the customer's billing address + 'x_delim_data' => 'FALSE', //This field is used for AIM. Set it to FALSE if you are using SIM. + + // do not use this, use silent IPN instead + 'x_relay_response' => 'FALSE', + + 'x_receipt_link_method' => 'GET', + 'x_receipt_link_text' => 'Go back merchant', + 'x_receipt_link_url' => $this->getParam('return_url'), + ); + return $params; + } + + public function recurrentPayment(Payment_Invoice $invoice) { + throw new Payment_Exception('Not implemented yet'); + } + + public function getTransaction($data, Payment_Invoice $invoice) { + $ipn = $data['post']; + + $tx = new Payment_Transaction(); + $tx->setId($ipn['x_trans_id']); + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + $tx->setAmount($ipn['x_amount']); + $tx->setCurrency($invoice->getCurrency()); + + if (isset($ipn['x_response_code'])) { + switch ($ipn['x_response_code']) { + //Approved + case '1': + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + break; + + case '2': // Declined + case '3': // Error + case '4': // Held for Review + $tx->setStatus(Payment_Transaction::STATUS_PENDING); + break; + + default: + throw new Payment_Exception('Authorize.net unknown x_response_code'); + break; + } + } + + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + if ($this->testMode && isset($ipn['x_test_request']) && $ipn['x_test_request'] == 'true') { + return true; + } + $hash = $this->_getHash($ipn['x_trans_id'], $invoice->getTotalWithTax()); + return ($ipn['x_MD5_Hash'] == $hash); + } + + private function _getFingerprint($amount, $currency, $fp_sequence, $fp_timestamp) + { + if (function_exists('hash_hmac')) { + return hash_hmac("md5", $this->getParam('apiLoginId') . "^" . $fp_sequence . "^" . + $fp_timestamp . "^" . $amount . "^" . $currency, $this->getParam('transactionKey')); + } else if (function_exists('mhash')) { + return bin2hex(mhash(MHASH_MD5, $this->getParam('apiLoginId') . "^" . $fp_sequence . "^" . + $fp_timestamp . "^" . $amount . "^" . $currency, $this->getParam('transactionKey'))); + } else { + return MD5($this->getParam('apiLoginId') . "^" . $fp_sequence . "^" . + $fp_timestamp . "^" . $amount . "^" . $currency, $this->getParam('transactionKey')); + } + } + + private function _getHash($transaction_id, $amount) + { + $hash = MD5($this->getParam('md5Hash') . $this->getParam('apiLoginId') . $transaction_id . $amount); + return strtoupper($hash); + } +} diff --git a/src/bb-library/Payment/Adapter/BluePay.php b/src/bb-library/Payment/Adapter/BluePay.php new file mode 100644 index 000000000..3ca849a69 --- /dev/null +++ b/src/bb-library/Payment/Adapter/BluePay.php @@ -0,0 +1,221 @@ +config = $config; + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => true, + 'description' => ' +
+ Online Payment Gateway +
+
+Create BluePay account +
+To find your ACCOUNT ID and SECRET KEY: +
    +
  • Log into the Bluepay 2.0 gateway.
  • +
  • From the Administration menu, choose Accounts, then List.
  • +
  • On the Account List, under Options on the right-hand side, choose the first icon to view the account. It looks like a pair of eyes.
  • +
  • On the Account Admin page, you will find the ACCOUNT ID is the second item in the right-hand column and the SECRET KEY is about halfway down the page, near a large red warning.
  • +
+', + 'form' => array( + 'account_id' => array('text', array( + 'label' => 'Account ID', + ), + ), + 'secret' => array('text', array( + 'label' => 'Secret key', + ), + ), + ), + ); + } + + /** + * + * @param type $api_admin + * @param type $invoice_id + * @param type $subscription + * @see https://secure.assurebuy.com/BluePay/BluePay_bp10emu/BluePay%201-0%20Emulator.txt + * @return string + */ + public function getHtml($api_admin, $invoice_id, $subscription) + { + $invoice = $api_admin->invoice_get(array('id'=>$invoice_id)); + $buyer = $invoice['buyer']; + + $p = array( + ':id'=>sprintf('%05s', $invoice['nr']), + ':serie'=>$invoice['serie'], + ':title'=>$invoice['lines'][0]['title'] + ); + $title = __('Payment for invoice :serie:id [:title]', $p); + + $mode = ($this->config['test_mode']) ? "TEST" : "LIVE"; + $type = 'SALE'; + $amount = $invoice['total']; + $account_id = $this->config['account_id']; + $secret_key = $this->config['secret']; + $tps = md5($secret_key.$account_id.$amount.$mode); + + $message = ''; + if(isset($_GET['Result'])) { + $format = '

%s

'; + switch ($_GET['Result']) { + case 'APPROVED': + $message = sprintf($format, $_GET['MESSAGE']); + break; + + case 'ERROR': + case 'DECLINED': + case 'MISSING': + default: + $message = sprintf($format, $_GET['MESSAGE']); + break; + } + } + + $html = ' +
+ + + + + + + + + + + + + + + + + + + + + '.$message.' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
'.__('Card number').' + +
'.__('CVV2').' + +
'.__('Expiration Date').' + +
'.__('Name').' + +
'.__('Address').' + +
'.__('City').' + +
'.__('State').' + +
'.__('Zipcode').' + +
'.__('Phone').' + +
'.__('Email').' + +
+ +
+
+ '; + + return $html; + } + + public function processTransaction($api_admin, $id, $data, $gateway_id) + { + if(APPLICATION_ENV != 'testing' && !$this->_isIpnValid($data)) { + throw new Exception('IPN is not valid'); + } + + $ipn = $data['post']; + + $tx = $api_admin->invoice_transaction_get(array('id'=>$id)); + + + $d = array( + 'id' => $id, + 'error' => '', + 'error_code'=> '', + 'status' => 'processed', + 'updated_at'=> date('c'), + ); + $api_admin->invoice_transaction_update($d); + } +} + + diff --git a/src/bb-library/Payment/Adapter/Custom.php b/src/bb-library/Payment/Adapter/Custom.php new file mode 100644 index 000000000..df6df2c28 --- /dev/null +++ b/src/bb-library/Payment/Adapter/Custom.php @@ -0,0 +1,82 @@ +config = $config; + } + + /** + * @param Box_Di $di + */ + public function setDi($di) + { + $this->di = $di; + } + + public static function getConfig() + { + return array( + 'can_load_in_iframe' => true, + 'supports_one_time_payments' => true, + 'supports_subscriptions' => true, + 'description' => 'Custom payment gateway allows you to give instructions how can your client pay invoice. All system, client, order and invoice details can be printed. HTML and JavaScript code is supported.', + 'form' => array( + 'single' => array('textarea', array( + 'label' => 'Enter your text for single payment information', + ), + ), + 'recurrent' => array('textarea', array( + 'label' => 'Enter your text for subscription information', + ), + ), + ), + ); + } + + /** + * Generate payment text + * + * @param Api_Admin $api_admin + * @param int $invoice_id + * @param bool $subscription + * + * @since BoxBilling v2.9.15 + * + * @return string - html form with auto submit javascript + */ + public function getHtml($api_admin, $invoice_id, $subscription) + { + $invoiceModel = $this->di['db']->load('Invoice', $invoice_id); + $invoiceService = $this->di['mod_service']("Invoice"); + $invoice = $invoiceService->toApiArray($invoiceModel, true); + + $vars = array( + 'client' => $invoice['buyer'], + 'invoice' => $invoice, + '_tpl' => ($subscription) ? $this->config['recurrent'] : $this->config['single'], + ); + $systemService = $this->di['mod_service']('System'); + return $systemService->renderString($vars['_tpl'], false, $vars); + } + + public function process($tx) + { + //do processing + return true; + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/Interkassa.php b/src/bb-library/Payment/Adapter/Interkassa.php new file mode 100644 index 000000000..100eecebb --- /dev/null +++ b/src/bb-library/Payment/Adapter/Interkassa.php @@ -0,0 +1,148 @@ +getParam('ik_shop_id')) { + throw new Payment_Exception('Shop ID is missing in gateway configuration'); + } + if(!$this->getParam('ik_secret_key')) { + throw new Payment_Exception('Secret key is missing in gateway configuration'); + } + } + + /** + * Return gateway type + * + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'это удобный в использовании сервис, подключение к которому позволит Интернет-магазинам, веб-сайтам и прочим торговым площадкам принимать все возможные формы оплаты в максимально короткие сроки. http://www.interkassa.com/', + 'form' => array( + 'ik_shop_id' => array('text', array( + 'label' => 'Shop ID which is registered in "INTERKASSA" system. Can be found under area "Настройки магазина". Example: 64C18529-4B94-0B5D-7405-F2752F2B716C', + 'value' => '', + ), + ), + 'ik_secret_key' => array('password', array( + 'label' => 'Secret Key. This is a line with characters, which is added to payment requisites, which is sent to seller with a notification. It is used to check and form data signature.', + 'value' => '', + ), + ), + ), + ); + } + + /** + * Return service call url + * + * @return string + */ + public function getServiceUrl() + { + return 'http://www.interkassa.com/lib/payment.php'; + } + + /** + * Init single payment call to webservice + * Invoice id is passed via notify_url + * + * @return mixed + */ + public function singlePayment(Payment_Invoice $invoice) + { + $buyer = $invoice->getBuyer(); + return array( + 'ik_shop_id' => $this->getParam('ik_shop_id'), + 'ik_payment_amount' => $invoice->getTotalWithTax(), + 'ik_payment_id' => $invoice->getId(), + 'ik_payment_desc' => $invoice->getTitle(), + 'ik_paysystem_alias' => '', + + 'ik_baggage_fields' => $buyer->getEmail(), + + 'ik_success_url' => $this->getParam('return_url'), + 'ik_success_method' => 'GET', + 'ik_fail_url' => $this->getParam('cancel_url'), + 'ik_fail_method' => 'GET', + 'ik_status_url' => $this->getParam('notify_url'), + 'ik_status_method' => 'POST', + ); + } + + /** + * Init recurrent payment call to webservice + * + * @return mixed + */ + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('Interkassa payment gateway do not support recurrent payments'); + } + + /** + * Handle IPN and return response object + * @return Payment_Transaction + */ + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + $tx = new Payment_Transaction(); + $tx->setId($ipn['ik_payment_id']); + $tx->setAmount($ipn['ik_payment_amount']); + $tx->setCurrency($invoice->getCurrency()); + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + + if($ipn['ik_payment_state'] == 'success' || $ipn['ik_payment_state'] == 'completed') { + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + } + + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $status_data = $data['post']; + $shop_id = $this->getParam('ik_shop_id'); + $secret_key = $this->getParam('ik_secret_key'); + + if($shop_id != $status_data['ik_shop_id']) { + error_log('Shop ids does not match'); + return false; + } + + $sing_hash_str = $status_data['ik_shop_id'].':'. + $status_data['ik_payment_amount'].':'. + $status_data['ik_payment_id'].':'. + $status_data['ik_paysystem_alias'].':'. + $status_data['ik_baggage_fields'].':'. + $status_data['ik_payment_state'].':'. + $status_data['ik_trans_id'].':'. + $status_data['ik_currency_exch'].':'. + $status_data['ik_fees_payer'].':'. + $secret_key; + $sign_hash = strtoupper(md5($sing_hash_str)); + return ($status_data['ik_sign_hash'] === $sign_hash); + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/Onebip.php b/src/bb-library/Payment/Adapter/Onebip.php new file mode 100644 index 000000000..cf8dd1a73 --- /dev/null +++ b/src/bb-library/Payment/Adapter/Onebip.php @@ -0,0 +1,157 @@ + true, + 'supports_subscriptions' => false, + 'description' => 'Onebip is a system that allows mobile phone subscribers to transfer pre-paid or post-paid credit from their SIM card to another use.', + 'form' => array( + 'username' => array('email', array( + 'label' => 'The email address associated to your Onebip account.', + ), + ), + 'api_key' => array('password', array( + 'label' => 'OneBip API key. Stored in OneBip account settings. Used to validate payment notification', + ), + ), + 'logo_url' => array('text', array( + 'label' => 'URL to your company logo. The URL of the 360x45-pixel image displayed as your logo in the upper left corner of the Onebip payment pages', + ), + ), + ), + ); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + /** + * Return payment gateway call url + * @return string + */ + public function getServiceURL() + { + return 'https://www.onebip.com/otms/'; + } + + /** + * Init call to webservice or return form params + * + * @see http://www.onebip.com/website/docs/Onebip_API.pdf + * @param Payment_Invoice $invoice + */ + public function singlePayment(Payment_Invoice $invoice) + { + $data = array(); + $data['username'] = $this->getParam('username'); + $data['description'] = $invoice->getTitle(); + $data['price'] = $invoice->getTotalWithTax() * 100; + $data['currency'] = $invoice->getCurrency(); + $data['command'] = 'standard_pay'; + + $data['item_code'] = $invoice->getId(); + $data['return_url'] = $this->getParam('return_url'); + $data['notify_url'] = $this->getParam('notify_url'); + $data['cancel_url'] = $this->getParam('cancel_url'); + + $c = $invoice->getBuyer(); + $data['customer_email'] = $c->getEmail(); + $data['customer_firstname'] = $c->getFirstName(); + $data['customer_lastname'] = $c->getLastName(); + + if($c->getPhone()) { + $data['customer_cell'] = $c->getPhone(); + } + + if($c->getCountry()) { + $data['customer_country'] = $c->getCountry(); + } + + if($this->testMode) { + $data['debug'] = 1; + $data['debug_url'] = $this->getParam('notify_url'); + } + + $data['logo_url'] = $this->getParam('logo_url'); + + return $data; + } + + /** + * Perform recurent payment + * @param Payment_Invoice $invoice + */ + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('Not implemented yet'); + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['get']; + $server = $data['server']; + + if (isset($ipn['hash'])) { + $my_api_key = $this->getParam('api_key'); + $basename = basename($server['REQUEST_URI']); + $pos = strrpos($basename, "&hash"); + $basename_without_hash = substr($basename, 0, $pos); + $my_hash = md5($my_api_key . $basename_without_hash); + if ($my_hash != $ipn['hash']) { + $this->setOutput('ERROR: Invalid hash code'); + return false; + } + } + + $this->setOutput('OK'); + return true; + } + + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['get']; + + // Onebip parameters: + $payment_id = $ipn['payment_id']; + $country = $ipn['country']; + $currency = $ipn['currency']; + $price = $ipn['price']; + $tax = $ipn['tax']; + $commission = $ipn['commission']; + $amount = $ipn['amount']; + $original_price = $ipn['original_price']; + $original_currency = $ipn['original_currency']; + + $tx = new Payment_Transaction(); + $tx->setId($payment_id); + $tx->setAmount($original_price / 100); + $tx->setCurrency($original_currency); + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + return $tx; + } +} diff --git a/src/bb-library/Payment/Adapter/PayPalEmail.php b/src/bb-library/Payment/Adapter/PayPalEmail.php new file mode 100644 index 000000000..7357969d2 --- /dev/null +++ b/src/bb-library/Payment/Adapter/PayPalEmail.php @@ -0,0 +1,360 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function __construct($config) + { + $this->config = $config; + + if(!function_exists('curl_exec')) { + throw new Exception('PHP Curl extension must be enabled in order to use PayPal gateway'); + } + + if(!$this->config['email']) { + throw new Exception('Payment gateway "PayPal" is not configured properly. Please update configuration parameter "PayPal Email address" at "Configuration -> Payments".'); + } + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => true, + 'description' => 'Enter your PayPal email to start accepting payments by PayPal.', + 'form' => array( + 'email' => array('text', array( + 'label' => 'PayPal email address for payments', + 'validators'=>array('EmailAddress'), + ), + ), + ), + ); + } + + public function getHtml($api_admin, $invoice_id, $subscription) + { + $invoice = $api_admin->invoice_get(array('id'=>$invoice_id)); + $buyer = $invoice['buyer']; + + $p = array( + ':id'=>sprintf('%05s', $invoice['nr']), + ':serie'=>$invoice['serie'], + ':title'=>$invoice['lines'][0]['title'] + ); + $title = __('Payment for invoice :serie:id [:title]', $p); + $number = $invoice['nr']; + + if($subscription) { + + $subs = $invoice['subscription']; + + $data = array(); + $data['item_name'] = $title; + $data['item_number'] = $number; + $data['no_shipping'] = '1'; + $data['no_note'] = '1'; // Do not prompt payers to include a note with their payments. Allowable values for Subscribe buttons: + $data['currency_code'] = $invoice['currency']; + $data['return'] = $this->config['return_url']; + $data['cancel_return'] = $this->config['cancel_url']; + $data['notify_url'] = $this->config['notify_url']; + $data['business'] = $this->config['email']; + + $data['cmd'] = '_xclick-subscriptions'; + $data['rm'] = '2'; + + $data['invoice_id'] = $invoice['id']; + + // 1 period Trial data + //$data['a1'] = $this->moneyFormat($invoice->totalAmount()); // Trial period 1 price. For a free trial period, specify 0. + //$data['p1'] = $invoice->firstPeriod(); // Trial period 1 duration. Required if you specify a1. Specify an integer value in the allowable range for the units of duration that you specify with t1. + //$data['t1'] = $invoice->firstPaymentTerm(); + + // Recurrence info + $data['a3'] = $this->moneyFormat($invoice['total'], $invoice['currency']); // Regular subscription price. + $data['p3'] = $subs['cycle']; //Subscription duration. Specify an integer value in the allowable range for the units of duration that you specify with t3. + + /** + * t3: Regular subscription units of duration. Allowable values: + * D – for days; allowable range for p3 is 1 to 90 + * W – for weeks; allowable range for p3 is 1 to 52 + * M – for months; allowable range for p3 is 1 to 24 + * Y – for years; allowable range for p3 is 1 to 5 + */ + $data['t3'] = $subs['unit']; + + $data['src'] = 1; //Recurring payments. Subscription payments recur unless subscribers cancel their subscriptions before the end of the current billing cycle or you limit the number of times that payments recur with the value that you specify for srt. + // $data['srt'] = 1; //Recurring times. Number of times that subscription payments recur. Specify an integer above 1. Valid only if you specify src="1". + $data['sra'] = 1; //Reattempt on failure. If a recurring payment fails, PayPal attempts to collect the payment two more times before canceling the subscription. + $data['charset'] = 'UTF-8'; //Sets the character encoding for the billing information/log-in page, for the information you send to PayPal in your HTML button code, and for the information that PayPal returns to you as a result of checkout processes initiated by the payment button. The default is based on the character encoding settings in your account profile. + + //client data + $data['address1'] = $buyer['address']; + $data['city'] = $buyer['city']; + $data['email'] = $buyer['email']; + $data['first_name'] = $buyer['first_name']; + $data['last_name'] = $buyer['last_name']; + $data['zip'] = $buyer['zip']; + $data['state'] = $buyer['state']; + $data['charset'] = "utf-8"; + + } else { + $data = array(); + $data['item_name'] = $title; + $data['item_number'] = $number; + $data['no_shipping'] = '1'; + $data['no_note'] = '1'; + $data['currency_code'] = $invoice['currency']; + $data['rm'] = '2'; + $data['return'] = $this->config['return_url']; + $data['cancel_return'] = $this->config['cancel_url']; + $data['notify_url'] = $this->config['notify_url']; + $data['business'] = $this->config['email']; + $data['cmd'] = '_xclick'; + $data['amount'] = $this->moneyFormat($invoice['total'], $invoice['currency']); + $data['tax'] = $this->moneyFormat($invoice['tax'], $invoice['currency']); + $data['bn'] = "PP-BuyNowBF"; + $data['charset'] = "utf-8"; + } + + if($this->config['test_mode']) { + $url = 'https://www.sandbox.paypal.com/cgi-bin/webscr'; + } else { + $url = 'https://www.paypal.com/cgi-bin/webscr'; + } + + return $this->_generateForm($url, $data); + } + + public function processTransaction($api_admin, $id, $data, $gateway_id) + { + if(APPLICATION_ENV != 'testing' && !$this->_isIpnValid($data)) { + throw new Exception('IPN is not valid'); + } + + $ipn = $data['post']; + + $tx = $api_admin->invoice_transaction_get(array('id'=>$id)); + + if(!$tx['invoice_id']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'invoice_id'=>$data['get']['bb_invoice_id'])); + } + + if(!$tx['type']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>$ipn['txn_type'])); + } + + if(!$tx['txn_id']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'txn_id'=>$ipn['txn_id'])); + } + + if(!$tx['txn_status']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'txn_status'=>$ipn['payment_status'])); + } + + if(!$tx['amount']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'amount'=>$ipn['mc_gross'])); + } + + if(!$tx['currency']) { + $api_admin->invoice_transaction_update(array('id'=>$id, 'currency'=>$ipn['mc_currency'])); + } + + $invoice = $api_admin->invoice_get(array('id'=>$data['get']['bb_invoice_id'])); + $client_id = $invoice['client']['id']; + + switch ($ipn['txn_type']) { + + case 'web_accept': + case 'subscr_payment': + + if($ipn['payment_status'] == 'Completed') { + $bd = array( + 'id' => $client_id, + 'amount' => $ipn['mc_gross'], + 'description' => 'PayPal transaction '.$ipn['txn_id'], + 'type' => 'PayPal', + 'rel_id' => $ipn['txn_id'], + ); + $api_admin->client_balance_add_funds($bd); + if($tx['invoice_id']) { + $api_admin->invoice_pay_with_credits(array('id'=>$tx['invoice_id'])); + } + $api_admin->invoice_batch_pay_with_credits(array('client_id'=>$client_id)); + } + + break; + + case 'subscr_signup': + $sd = array( + 'client_id' => $client_id, + 'gateway_id' => $gateway_id, + 'currency' => $ipn['mc_currency'], + 'sid' => $ipn['subscr_id'], + 'status' => 'active', + 'period' => str_replace(' ', '', $ipn['period3']), + 'amount' => $ipn['amount3'], + 'rel_type' => 'invoice', + 'rel_id' => $invoice['id'], + ); + $api_admin->invoice_subscription_create($sd); + + $t = array( + 'id' => $id, + 's_id' => $sd['sid'], + 's_period' => $sd['period'], + ); + $api_admin->invoice_transaction_update($t); + break; + + case 'recurring_payment_suspended_due_to_max_failed_payment': + case 'subscr_failed': + case 'subscr_eot': + case 'subscr_cancel': + $s = $api_admin->invoice_subscription_get(array('sid'=>$ipn['subscr_id'])); + $api_admin->invoice_subscription_update(array('id'=>$s['id'], 'status'=>'canceled')); + break; + + default: + error_log('Unknown paypal transaction '.$id); + break; + } + + if($ipn['payment_status'] == 'Refunded') { + $refd = array( + 'id' => $invoice['id'], + 'note' => 'PayPal refund '.$ipn['parent_txn_id'], + ); + $api_admin->invoice_refund($refd); + } + + $d = array( + 'id' => $id, + 'error' => '', + 'error_code'=> '', + 'status' => 'processed', + 'updated_at'=> date('c'), + ); + $api_admin->invoice_transaction_update($d); + } + + private function _isIpnValid($data) + { + // use http_raw_post_data instead of post due to encoding + parse_str($data['http_raw_post_data'], $post); + $req = 'cmd=_notify-validate'; + foreach ($post as $key => $value) { + $value = urlencode(stripslashes($value)); + $req .= "&$key=$value"; + } + $ret = $this->download('https://www.paypal.com/cgi-bin/webscr', $req); + return $ret == 'VERIFIED'; + } + + private function moneyFormat($amount, $currency) + { + //HUF currency do not accept decimal values + if($currency == 'HUF') { + return number_format($amount, 0); + } + return number_format($amount, 2, '.', ''); + } + + private function download($url, $post_vars = false, $phd = array(), $contentType = 'application/x-www-form-urlencoded') + { + $post_contents = ''; + if ($post_vars) { + if (is_array($post_vars)) { + foreach($post_vars as $key => $val) { + $post_contents .= ($post_contents ? '&' : '').urlencode($key).'='.urlencode($val); + } + } else { + $post_contents = $post_vars; + } + } + + $uinf = parse_url($url); + $host = $uinf['host']; + $path = $uinf['path']; + $path .= (isset($uinf['query']) && $uinf['query']) ? ('?'.$uinf['query']) : ''; + + $headers = Array( + ($post_contents ? 'POST' : 'GET')." $path HTTP/1.1", + "Host: $host", + ); + if ($phd) { + if (!is_array($phd)) { + $headers[count($headers)] = $phd; + } else { + $next = count($headers); + $count = count($phd); + for ($i = 0; $i < $count; $i++) { $headers[$next + $i] = $phd[$i]; } + } + } + if ($post_contents) { + $headers[] = "Content-Type: $contentType"; + $headers[] = 'Content-Length: '.strlen($post_contents); + } + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_URL,$url); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_TIMEOUT, 600); + curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); + + // Apply the XML to our curl call + if ($post_contents) { + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $post_contents); + } + + $data = curl_exec($ch); + if (curl_errno($ch)) return false; + curl_close($ch); + + return $data; + } + + private function _generateForm($url, $data, $method = 'post') + { + $form = ''; + $form .= '
' . PHP_EOL; + foreach($data as $key => $value) { + $form .= sprintf('', $key, $value) . PHP_EOL; + } + $form .= ''. PHP_EOL; + $form .= '
' . PHP_EOL . PHP_EOL; + + if(isset($this->config['auto_redirect']) && $this->config['auto_redirect']) { + $form .= sprintf('

%s

', __('Redirecting to PayPal.com')); + $form .= ""; + } + + return $form; + } +} diff --git a/src/bb-library/Payment/Adapter/Payza.php b/src/bb-library/Payment/Adapter/Payza.php new file mode 100644 index 000000000..1714401d3 --- /dev/null +++ b/src/bb-library/Payment/Adapter/Payza.php @@ -0,0 +1,310 @@ +config = $config; + + if(!function_exists('curl_exec')) { + throw new Exception('PHP Curl extension must be enabled in order to use Payza gateway'); + } + + if(!$this->config['email']) { + throw new Exception('Payment gateway "Payza" is not configured properly. Please update configuration parameter "Payza Email address" at "Configuration -> Payments".'); + } + } + + public function init() + { + if(!$this->getParam('email')) { + throw new Payment_Exception('Payment gateway "Payza" is not configured properly. Please update configuration parameter "Payza Email address" at "Configuration -> Payments".'); + } + + if (!$this->getParam('securityCode')) { + throw new Payment_Exception('Payment gateway "Payza" is not configured properly. Please update configuration parameter "IPN Security Code" at "Configuration -> Payments".'); + } + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'Clients will be redirected to payza.com to make payment. Note that Payza supports credit card payments.
' . + 'In your alertpay account go to Business Tools > IPN Setup and enable: IPN Status', + 'form' => array( + 'email' => array('text', array( + 'label' => 'Payza Email address', + 'description' => 'Your business account email at Payza', + 'validators'=>array('EmailAddress'), + ), + ), + 'securityCode' => array('password', array( + 'label' => 'IPN Security Code', + 'description' => 'To setup your "IPN Security Code" login to Payza account. Go to "Business Tools" -> "IPN setup". Enter your PIN and click on "Access". Copy "IPN Security Code" and paste it to this field.', + 'validators' => array('notempty'), + ), + ), + ), + ); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + /** + * Return payment gateway type + * @return string + */ + public function getServiceUrl() + { + if($this->testMode) { + return 'https://sandbox.payza.com/sandbox/payprocess.aspx'; + } + return 'https://www.payza.com/PayProcess.aspx'; + } + + public function getInvoiceId($data) + { + $id = parent::getInvoiceId($data); + if(!is_null($id)) { + return $id; + } + + return isset($data['post']['apc_1']) ? (int)$data['post']['apc_1'] : NULL; + } + + public function singlePayment(Payment_Invoice $invoice) + { + $c = $invoice->getBuyer(); + $params = array( + 'ap_merchant' => $this->getParam('email'), + 'ap_purchasetype' => 'service', + 'ap_currency' => $invoice->getCurrency(), + 'ap_alerturl' => $this->getParam('notify_url'), + 'ap_returnurl' => $this->getParam('return_url'), + 'ap_cancelurl' => $this->getParam('cancel_url'), + 'ap_fname' => $c->getFirstName(), + 'ap_lname' => $c->getLastName(), + 'ap_contactemail' => $c->getEmail(), + 'ap_contactphone' => $c->getPhone(), + 'ap_addressline1' => $c->getAddress(), + 'ap_city' => $c->getCity(), + 'ap_stateprovince' => $c->getState(), + 'ap_zippostalcode' => $c->getZip(), + 'ap_country' => $c->getCountry(), + 'apc_1' => $invoice->getId(), + 'apc_2' => $invoice->getNumber(), + ); + + $i = 1; + foreach ($invoice->getItems() as $item) { + $params['ap_itemcode_' . $i] = $item->getId(); + $params['ap_itemname_' . $i] = $item->getTitle(); + $params['ap_description_' . $i] = $item->getDescription(); + $params['ap_amount_' . $i] = $item->getTotalWithTax(); + $params['ap_quantity_' . $i] = 1; + $i++; + } + + return $params; + } + + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('Not implemented yet'); + } + + /** + * @see https://dev.payza.com/resources/references/ipn-variables + * @param type $data + * @param Payment_Invoice $invoice + * @return Payment_Transaction + */ + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + $tx = new Payment_Transaction(); + $tx->setId($ipn['ap_referencenumber']); + $tx->setAmount($ipn['ap_totalamount']); + $tx->setCurrency($ipn['ap_currency']); + + if($ipn['ap_purchasetype'] == 'subscription') { + switch ($ipn['ap_status']) { + case 'Subscription-Canceled': + case 'Subscription-Expired': + $tx->setType(Payment_Transaction::TXTYPE_SUBSCR_CANCEL); + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + break; + + case 'Subscription-Payment-Success': + $tx->setType(Payment_Transaction::TXTYPE_SUBSCR_CREATE); + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + $tx->setSubscriptionId($ipn['ap_subscriptionreferencenumber']); + break; + + case 'Subscription-Payment-Failed': + case 'Subscription-Payment-Rescheduled': + default: + + break; + } + } else { + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + if($ipn['ap_status'] == 'Success') { + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + } + } + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['post']; + + if($ipn['ap_merchant'] != $this->getParam('email')) { + error_log('Payza email merchant does not match'); + return false; + } + + if($ipn['ap_securitycode'] != $this->getParam('securityCode')) { + error_log('Payza security code does not match'); + return false; + } + + return true; + } + + public function getHtml($api_admin, $invoice_id, $subscription) + { + $invoice = $api_admin->invoice_get(array('id'=>$invoice_id)); + $buyer = $invoice['buyer']; + + $p = array( + ':id'=>sprintf('%05s', $invoice['nr']), + ':serie'=>$invoice['serie'], + ':title'=>$invoice['lines'][0]['title'] + ); + $title = __('Payment for invoice :serie:id [:title]', $p); + $number = $invoice['nr']; + + if($subscription) { + + $subs = $invoice['subscription']; + + $data = array(); + $data['item_name'] = $title; + $data['item_number'] = $number; + $data['no_shipping'] = '1'; + $data['no_note'] = '1'; // Do not prompt payers to include a note with their payments. Allowable values for Subscribe buttons: + $data['currency_code'] = $invoice['currency']; + $data['return'] = $this->config['return_url']; + $data['cancel_return'] = $this->config['cancel_url']; + $data['notify_url'] = $this->config['notify_url']; + $data['business'] = $this->config['email']; + + $data['cmd'] = '_xclick-subscriptions'; + $data['rm'] = '2'; + + $data['invoice_id'] = $invoice['id']; + + // 1 period Trial data + //$data['a1'] = $this->moneyFormat($invoice->totalAmount()); // Trial period 1 price. For a free trial period, specify 0. + //$data['p1'] = $invoice->firstPeriod(); // Trial period 1 duration. Required if you specify a1. Specify an integer value in the allowable range for the units of duration that you specify with t1. + //$data['t1'] = $invoice->firstPaymentTerm(); + + // Recurrence info + $data['a3'] = $this->moneyFormat($invoice['total'], $invoice['currency']); // Regular subscription price. + $data['p3'] = $subs['cycle']; //Subscription duration. Specify an integer value in the allowable range for the units of duration that you specify with t3. + + /** + * t3: Regular subscription units of duration. Allowable values: + * D – for days; allowable range for p3 is 1 to 90 + * W – for weeks; allowable range for p3 is 1 to 52 + * M – for months; allowable range for p3 is 1 to 24 + * Y – for years; allowable range for p3 is 1 to 5 + */ + $data['t3'] = $subs['unit']; + + $data['src'] = 1; //Recurring payments. Subscription payments recur unless subscribers cancel their subscriptions before the end of the current billing cycle or you limit the number of times that payments recur with the value that you specify for srt. + // $data['srt'] = 1; //Recurring times. Number of times that subscription payments recur. Specify an integer above 1. Valid only if you specify src="1". + $data['sra'] = 1; //Reattempt on failure. If a recurring payment fails, PayPal attempts to collect the payment two more times before canceling the subscription. + $data['charset'] = 'UTF-8'; //Sets the character encoding for the billing information/log-in page, for the information you send to PayPal in your HTML button code, and for the information that PayPal returns to you as a result of checkout processes initiated by the payment button. The default is based on the character encoding settings in your account profile. + + //client data + $data['address1'] = $buyer['address']; + $data['city'] = $buyer['city']; + $data['email'] = $buyer['email']; + $data['first_name'] = $buyer['first_name']; + $data['last_name'] = $buyer['last_name']; + $data['zip'] = $buyer['zip']; + $data['state'] = $buyer['state']; + $data['charset'] = "utf-8"; + + } else { + $data = array(); + $data['ap_itemname'] = $title; + $data['ap_quantity'] = $number; + //$data['no_shipping'] = '1'; + //$data['no_note'] = '1'; + $data['ap_currency'] = $invoice['currency']; + //$data['rm'] = '2'; + //$data['return'] = $this->config['return_url']; + //$data['cancel_return'] = $this->config['cancel_url']; + //$data['notify_url'] = $this->config['notify_url']; + $data['ap_merchant'] = $this->config['email']; + //$data['cmd'] = '_xclick'; + $data['ap_amount'] = $this->moneyFormat($invoice['total'], $invoice['currency']); + $data['ap_taxamount'] = $this->moneyFormat($invoice['tax'], $invoice['currency']); + //$data['bn'] = "PP-BuyNowBF"; + //$data['charset'] = "utf-8"; + $data['ap_purchasetype'] = "item"; + } + + if($this->config['test_mode']) { + $url = 'https://secure.payza.com/checkout'; + } else { + $url = 'https://secure.payza.com/checkout'; + } + + return $this->_generateForm($url, $data); + } + + private function _generateForm($url, $data, $method = 'post') + { + $form = ''; + $form .= '
' . PHP_EOL; + foreach($data as $key => $value) { + $form .= sprintf('', $key, $value) . PHP_EOL; + } + $form .= ''. PHP_EOL; + $form .= '
' . PHP_EOL . PHP_EOL; + + if(isset($this->config['auto_redirect']) && $this->config['auto_redirect']) { + $form .= sprintf('

%s

', __('Redirecting to Payza.com')); + $form .= ""; + } + + return $form; + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/TwoCheckout.php b/src/bb-library/Payment/Adapter/TwoCheckout.php new file mode 100644 index 000000000..f5dcaded4 --- /dev/null +++ b/src/bb-library/Payment/Adapter/TwoCheckout.php @@ -0,0 +1,415 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function __construct($config) + { + if(!$config['vendor_nr']) { + throw new Payment_Exception('Payment gateway "2Checkout" is not configured properly. Please update configuration parameter "Vendor account number" at "Configuration -> Payments".'); + } + + if(!$config['secret']) { + throw new Payment_Exception('Payment gateway "2Checkout" is not configured properly. Please update configuration parameter "Secret word" at "Configuration -> Payments".'); + } + + $this->config = $config; + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => true, + 'description' => 'Allows to start accepting payments by 2Checkout. Redirect option must be configured propertly. Login to your 2checkout account and navigate to Account -> Site Management -> Direct Return section. Select Header Redirect (Your URL) and click "Save changes".', + 'form' => array( + 'vendor_nr' => array('text', array( + 'label' => '2CO Account #', + 'description' => '2Checkout account number is number with which you login to 2CO account', + ), + ), + 'secret' => array('password', array( + 'label' => 'Secret word', + 'description' => 'To set up the secret word please log in to your 2CO account, click on the “Account” tab, then click on “Site Management” subcategory. On the “Site Management” page you will enter the Secret Word in the field provided under Direct Return. After you have entered your Secret Word click the blue “Save Changes” button at the bottom of the page.', + ), + ), + 'single_page' => array('radio', array( + 'multiOptions' => array('1'=>'Single page', '0'=>'Multi-page'), + 'label' => 'Checkout page type', + ), + ), + ), + ); + } + + /** + * Generate payment text + * + * @param Api_Admin $api_admin + * @param int $invoice_id + * @param bool $subscription + * + * @since BoxBilling v2.9.11 + * + * @return string - html form with auto submit javascript + */ + public function getHtml($api_admin, $invoice_id, $subscription) + { + $invoice = $api_admin->invoice_get(array('id'=>$invoice_id)); + + if($subscription) { + $data = $this->_recurrentPayment($invoice); + } else { + $data = $this->_singlePayment($invoice); + } + + if($this->config['test_mode']) { + $data['demo'] = 'Y'; + } + + if((bool)$this->config['single_page'] === false) { + $url = 'https://www.2checkout.com/checkout/purchase'; + } else { + $url = 'https://www.2checkout.com/checkout/spurchase'; + } + + return $this->_generateForm($url, $data); + } + + /** + * Process transaction received from payment gateway + * + * @since BoxBilling v2.9.11 + * + * @param Api_Admin $api_admin + * @param int $id - transaction id to process + * @param array $ipn - post, get, server, http_raw_post_data + * @param int $gateway_id - payment gateway id on BoxBilling + * + * @return mixed + */ + public function processTransaction($api_admin, $id, $data, $gateway_id) + { + $tx = $api_admin->invoice_transaction_get(array('id'=>$id)); + $ipn = array_merge($data['get'], $data['post']); + + if(APPLICATION_ENV != 'testing' && !$this->_isIpnValid($ipn)) { + throw new Exception('2Checkout IPN is not valid'); + } + + if($ipn['message_type'] == 'ORDER_CREATED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'ORDER_CREATED')); + } + + if($ipn['message_type'] == 'SHIP_STATUS_CHANGED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'SHIP_STATUS_CHANGED')); + } + + if($ipn['message_type'] == 'INVOICE_STATUS_CHANGED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'INVOICE_STATUS_CHANGED')); + } + + if($ipn['message_type'] == 'REFUND_ISSUED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'REFUND_ISSUED')); + } + + if($ipn['message_type'] == 'FRAUD_STATUS_CHANGED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'FRAUD_STATUS_CHANGED')); + } + + if($ipn['message_type'] == 'RECURRING_INSTALLMENT_SUCCESS') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'RECURRING_INSTALLMENT_SUCCESS')); + } + + if($ipn['message_type'] == 'RECURRING_STOPPED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'RECURRING_STOPPED')); + } + + if($ipn['message_type'] == 'RECURRING_INSTALLMENT_FAILED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'RECURRING_INSTALLMENT_FAILED')); + } + + if($ipn['message_type'] == 'RECURRING_COMPLETE') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'RECURRING_COMPLETE')); + } + + if($ipn['message_type'] == 'RECURRING_RESTARTED') { + $api_admin->invoice_transaction_update(array('id'=>$id, 'type'=>'RECURRING_RESTARTED')); + } + + $invoice_id = null; + if($tx['invoice_id']) { + $invoice_id = $tx['invoice_id']; + } elseif($ipn['bb_invoice_id']) { + $invoice_id = $ipn['bb_invoice_id']; + $api_admin->invoice_transaction_update(array('id'=>$id, 'invoice_id'=>$invoice_id)); + } elseif(!isset($ipn['bb_invoice_id']) && isset($ipn['sale_id'])) { + $invoice_id = R::getCell('SELECT invoice_id FROM transaction WHERE txn_id = :id AND invoice_id IS NOT NULL', array('id'=>$ipn['sale_id'])); + } elseif(!isset($ipn['bb_invoice_id']) && isset($ipn['order_number'])) { + $invoice_id = R::getCell('SELECT invoice_id FROM transaction WHERE txn_id = :id AND invoice_id IS NOT NULL', array('id'=>$ipn['order_number'])); + } + + if(!$invoice_id) { + throw new Exception('Invoice id could not be determined for this transaction'); + } + + $invoice = $api_admin->invoice_get(array('id'=>$invoice_id)); + $client_id = $invoice['client']['id']; + + $tx_data = array( + 'id' => $id, + 'status' => 'pending', + ); + + if(empty($tx['txn_id']) && isset($ipn['order_number'])) { + $tx_data['txn_id'] = $ipn['order_number']; + } + + if(empty($tx['amount']) && isset($ipn['total'])) { + $tx_data['amount'] = $ipn['total']; + } + + if(empty($tx['currency'])) { + $tx_data['currency'] = $invoice['currency']; + } + + $api_admin->invoice_transaction_update($tx_data); + + if(isset($ipn['credit_card_processed']) && $ipn['credit_card_processed'] == 'Y') { + $bd = array( + 'id' => $client_id, + 'amount' => $ipn['total'], + 'description' => '2Checkout sale id: '.$ipn['order_number'], + 'type' => '2Checkout', + 'rel_id' => $ipn['order_number'], + ); + $api_admin->client_balance_add_funds($bd); + + $tx_data['txn_status'] = 'complete'; + $tx_data['status'] = 'complete'; + $api_admin->invoice_transaction_update($tx_data); + + $api_admin->invoice_batch_pay_with_credits(array('client_id'=>$client_id)); + } + + if (isset($ipn['subscription']) && $ipn['subscription'] == 1) { + + $recurrence = '1M'; + if(isset($ipn['li_0_recurrence'])) { + switch ($ipn['li_0_recurrence']) { + case '3 Year': + $recurrence = '3Y'; + break; + + case '2 Year': + $recurrence = '2Y'; + break; + + case '1 Year': + $recurrence = '1Y'; + break; + + case '6 Month': + $recurrence = '6M'; + break; + + case '3 Month': + $recurrence = '3M'; + break; + + case '2 Month': + $recurrence = '2M'; + break; + + case '3 Week': + $recurrence = '3W'; + break; + + case '2 Week': + $recurrence = '2W'; + break; + + case '1 Week': + $recurrence = '1W'; + break; + + case '1 Month': + default: + $recurrence = '1M'; + break; + } + } + + $sd = array( + 'client_id' => $client_id, + 'gateway_id' => $gateway_id, + 'currency' => $invoice['currency'], + 'sid' => $ipn["order_number"], + 'status' => 'active', + 'period' => $recurrence, + 'amount' => $ipn['total'], + 'rel_type' => 'invoice', + 'rel_id' => $invoice['id'], + ); + $api_admin->invoice_subscription_create($sd); + } + } + + private function _isIpnValid($ipn) + { + $md5_hash = null; + $check_key = ' '; + $secret = $this->config['secret']; + $vendorNumber = $this->config['vendor_nr']; + + // The following code would be applicable to orders placed using our Plug and Play cart and our proprietary third party set of parameters. + if(isset($ipn['order_number']) && isset($ipn['total']) && isset($ipn['key'])) { + $md5_hash = $ipn["key"]; + $check_key = strtoupper(md5($secret . $vendorNumber . $ipn["order_number"] . $ipn["total"])); + + // The following code would then be applicable to orders placed using the Authorize.net parameter set. + } elseif(isset($ipn['order_number']) && isset($ipn['total']) && isset($ipn['key'])) { + $md5_hash = $ipn["key"]; + $check_key = strtoupper(md5($secret.$ipn['order_number'].$ipn["total"])); + + // The following code would be applicable to orders placed using our Plug and Play cart and our proprietary third party set of parameters. + } elseif(isset($ipn['invoice_id']) && isset($ipn['sale_id']) && $ipn["md5_hash"]) { + $md5_hash = $ipn["md5_hash"]; + $check_key = strtoupper(md5($ipn["sale_id"] . $vendorNumber . $ipn["invoice_id"] . $secret)); + } + + error_log(sprintf('Returned MD5 Hash %s should be equal to %s', $md5_hash, $check_key)); + return ($md5_hash == $check_key); + } + + private function _singlePayment($invoice) + { + $b = $invoice['buyer']; + + $data = array(); + $data['sid'] = $this->config['vendor_nr']; + $data['mode'] = '2CO'; + + foreach($invoice['lines'] as $i=>$item) { + $data['li_'.$i.'_id'] = $invoice['id']; + $data['li_'.$i.'_type'] = 'product'; + $data['li_'.$i.'_name'] = $item['title']; + $data['li_'.$i.'_product_id'] = $item['id']; + $data['li_'.$i.'_price'] = $item['price']; + $data['li_'.$i.'_quantity'] = 1; + } + + $data['card_holder_name'] = $b['first_name'].' '.$b['last_name']; + $data['phone'] = $b['phone_cc'].$b['phone']; + $data['email'] = $b['email']; + $data['street_address'] = $b['address']; + $data['city'] = $b['city']; + $data['state'] = $b['state']; + $data['zip'] = $b['zip']; + $data['country'] = $b['country']; + + $data['merchant_order_id'] = $invoice['id']; + + $data['return_url'] = $this->config['redirect_url']; + $data['x_receipt_link_url'] = $this->config['redirect_url']; + $data['fixed'] = 'Y'; + $data['skip_landing'] = 1; + + return $data; + } + + private function _recurrentPayment($invoice) + { + $b = $invoice['buyer']; + $subs = $invoice['subscription']; + + $data = array(); + $data['sid'] = $this->config['vendor_nr']; + $data['mode'] = '2CO'; + + switch ($subs['unit']) { + case 'W': + $unit = 'Week'; + break; + + case 'Y': + $unit = 'Year'; + break; + + case 'M': + default: + $unit = 'Month'; + break; + } + + foreach($invoice['lines'] as $i => $item) { + $data['li_' . $i . '_id'] = $invoice['id']; + $data['li_' . $i . '_type'] = 'product'; + $data['li_' . $i . '_name'] = $item['title']; + $data['li_' . $i . '_quantity'] = 1; + $data['li_' . $i . '_tangible'] = 'N'; + $data['li_' . $i . '_description'] = ''; + $data['li_' . $i . '_recurrence'] = $subs['cycle'] . ' ' . $unit; + $data['li_' . $i . '_price'] = $invoice['total']; + } + + $data['card_holder_name'] = $b['first_name'].' '.$b['last_name']; + $data['phone'] = $b['phone_cc'].$b['phone']; + $data['email'] = $b['email']; + $data['street_address'] = $b['address']; + $data['city'] = $b['city']; + $data['state'] = $b['state']; + $data['zip'] = $b['zip']; + $data['country'] = $b['country']; + + $data['merchant_order_id'] = $invoice['id']; + + $data['return_url'] = $this->config['redirect_url']; + $data['x_receipt_link_url'] = $this->config['redirect_url']; + $data['fixed'] = 'Y'; + $data['skip_landing'] = 1; + + return $data; + } + + private function _generateForm($url, $data, $method = 'post') + { + $form = ''; + $form .= '
' . PHP_EOL; + foreach($data as $key => $value) { + $form .= sprintf('', $key, $value) . PHP_EOL; + } + $form .= ''. PHP_EOL; + $form .= '
' . PHP_EOL . PHP_EOL; + + if(isset($this->config['auto_redirect']) && $this->config['auto_redirect']) { + $form .= sprintf('

%s

', __('Redirecting to 2Checkout.com')); + $form .= ""; + } + + return $form; + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/WebMoney.php b/src/bb-library/Payment/Adapter/WebMoney.php new file mode 100644 index 000000000..a676cdc0e --- /dev/null +++ b/src/bb-library/Payment/Adapter/WebMoney.php @@ -0,0 +1,281 @@ +config = $config; + + if(!$this->config['purse']) { + throw new Payment_Exception('Payment gateway "WebMoney" is not configured properly. Please update configuration parameter "Purse" at "Configuration -> Payment gateways > WebMoney".'); + } + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'Configure WebMoney gateway. Do not forget enable option "Allow URLs transmitted in the form"', + 'form' => array( + 'purse' => array('text', array( + 'label' => 'WebMoney purse', + ), + ), + ), + ); + } + + public function getHtml($api_admin, $id) + { + $invoice = $api_admin->invoice_get(array('id'=>$id)); + + $data = array(); + $data['LMI_PAYEE_PURSE'] = $this->config['purse']; + $data['LMI_PAYMENT_AMOUNT'] = $invoice['total']; + $data['LMI_PAYMENT_NO'] = $invoice['id']; + $data['LMI_PAYMENT_DESC'] = $invoice['title']; + $data['LMI_RESULT_URL'] = $this->config['notify_url']; + $data['LMI_SUCCESS_URL'] = $this->config['success_url']; + $data['LMI_SUCCESS_METHOD'] = 1; //The field may have values 0, 1 or 2 equal to values of the ‘Method of requesting Success URL’ – ‘GET’, ‘POST’ or ‘LINK’. + $data['LMI_FAIL_URL'] = $this->config['cancel_url']; + $data['LMI_FAIL_METHOD'] = 1; //The field may have the values 0, 1 or 2 equal to values of the ‘Method of requesting Fail URL’ – ‘GET’, ‘POST’ or ‘LINK’. + $data['INVOICE_ID'] = $invoice['id']; + + if ($this->testMode) { + $data['LMI_MODE'] = 1; + $data['LMI_SIM_MODE'] = ($this->config['success']) ? 1 : 0; //0 or empty: All test payments will be successful; 1: All test payments will fail; 2: 80% of test payments will be successful, 20% of test payments will fail. + } + + $data['HASH'] = $this->_getHash($data); + + $url = 'https://merchant.wmtransfer.com/lmi/payment.asp'; + return $this->_generateForm($url, $data); + } + + public function processTransaction($api_admin, $id, $data) + { + if(APPLICATION_ENV != 'testing' && !$this->isIpnValid($data)) { + throw new Exception('WebMoney IPN is not valid'); + } + + $ipn = $data['post']; + + //$tx = $api_admin->invoice_transaction_get(array('id'=>$id)); + $invoice = $api_admin->invoice_get(array('id'=>$ipn['INVOICE_ID'])); + $client_id = $invoice['client']['id']; + + $currency = $this->getCurrency($ipn['LMI_PAYER_PURSE']); + $tx_data = array( + 'id' => $id, + 'invoice_id' => $ipn['INVOICE_ID'], + 'txn_status' => 'complete', + 'txn_id' => $ipn['LMI_SYS_TRANS_NO'], + 'amount' => $ipn['LMI_PAYMENT_AMOUNT'], + 'currency' => $currency, + 'type' => 'payment', + 'status' => 'complete', + ); + $api_admin->invoice_transaction_update($tx_data); + + $bd = array( + 'id' => $client_id, + 'amount' => $ipn['LMI_PAYMENT_AMOUNT'], + 'description' => 'WebMoney sale: '.$ipn['LMI_SYS_TRANS_NO'], + 'type' => 'WebMoney', + 'rel_id' => $ipn['LMI_SYS_TRANS_NO'], + ); + $api_admin->client_balance_add_funds($bd); + $api_admin->invoice_batch_pay_with_credits(array('client_id'=>$client_id)); + } + + private function isIpnValid($data) + { + $ipn = $data['post']; + + if (!$this->_verifyNotification($ipn)) { + return false; + } + + if (!$this->verifyRequest($ipn)) { + return false; + } + + return true; + } + + /** + * + * Generates hash + * @param array $data + * @return string + */ + private function _getHash($data) { + $string = $data['LMI_PAYEE_PURSE'] . $data['LMI_PAYMENT_AMOUNT'] . $data['LMI_PAYMENT_NO'] . $data['INVOICE_ID']; + if (isset($data['LMI_MODE']) && $data['LMI_MODE'] == 1) { + $string .= 'test'; + } + return MD5($string); + } + + /** + * + * Verifies request, echos result and stops execution + * @param array $data + * @return boolean + */ + private function verifyRequest($data) { + if (isset($data['HASH']) && $data['HASH'] == $this->_getHash($data)) { + return true; + } else { + return false; + } + } + + /** + * + * Returns LMI hash + * @param array $data + * @see https://wiki.wmtransfer.com/wiki/show/Web_Merchant_Interface#validation + * @return string + */ + private function _getLmiHash($data) { + $string = ''; + + if (isset($data['LMI_PAYEE_PURSE'])) { + $string = $data['LMI_PAYEE_PURSE']; + } + + if (isset($data['LMI_PAYMENT_AMOUNT'])) { + $string .= $data['LMI_PAYMENT_AMOUNT']; + } + + if (isset($data['LMI_PAYMENT_NO'])) { + $string .= $data['LMI_PAYMENT_NO']; + } + + if (isset($data['LMI_MODE'])) { + $string .= $data['LMI_MODE']; + } + + if (isset($data['LMI_SYS_INVS_NO'])) { + $string .= $data['LMI_SYS_INVS_NO']; + } + + if (isset($data['LMI_SYS_TRANS_NO'])) { + $string .= $data['LMI_SYS_TRANS_NO']; + } + + if (isset($data['LMI_SYS_TRANS_DATE'])) { + $string .= $data['LMI_SYS_TRANS_DATE']; + } + + $string .= $this->config['secretWord']; + + if (isset($data['LMI_PAYER_PURSE'])) { + $string .= $data['LMI_PAYER_PURSE']; + } + + if (isset($data['LMI_PAYER_WM'])) { + $string .= $data['LMI_PAYER_WM']; + } + + return strtoupper(MD5($string)); + } + + /** + * returns transaction type + * @param array $request + * @return string + */ + private function getRequestType($request) { + if (isset($request['LMI_PREREQUEST']) && $request['LMI_PREREQUEST'] == 1) { + return self::REQUEST_TYPE_PREREQUEST; + } else if (isset($request['act']) && ($request['act'] == 'success' || $request['act'] == 'fail')) { + return self::REQUEST_TYPE_CONFIRMATION; + } + + return self::REQUEST_TYPE_NOTIFICATION; + } + + /** + * Gets currency code from purse + * @param string $purse + * @return string|boolean + */ + private function getCurrency($purse) { + $firstLetter = substr($purse, 0, 1); + $currencies = $this->getCurrencies(); + + $currency = array_search($firstLetter, $currencies); + if ($currency === false) { + return false; + } + + return $currency; + } + + /** + * Checks if notification is valid + * @param array $data + * @return boolean + */ + private function _verifyNotification($data) { + if (isset($data['LMI_HASH'])) { + if($data['LMI_HASH'] == $this->_getLmiHash($data)) { + return true; + } + } + + return false; + } + + private function getCurrencies() { + return array( + 'USD' => self::USD, + 'RUB' => self::RUB, + 'EUR' => self::EUR, + 'UAH' => self::UAH, + 'BYR' => self::BYR, + ); + } + + private function _generateForm($url, $data, $method = 'post') + { + $form = ''; + $form .= '
' . PHP_EOL; + foreach($data as $key => $value) { + $form .= sprintf('', $key, $value) . PHP_EOL; + } + $form .= ''. PHP_EOL; + $form .= '
' . PHP_EOL . PHP_EOL; + + if(isset($this->config['auto_redirect']) && $this->config['auto_redirect']) { + $form .= ""; + } + + return $form; + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Adapter/WebToPay.php b/src/bb-library/Payment/Adapter/WebToPay.php new file mode 100644 index 000000000..059274f7b --- /dev/null +++ b/src/bb-library/Payment/Adapter/WebToPay.php @@ -0,0 +1,1361 @@ +getParam('projectid')) { + throw new Payment_Exception('Payment gateway "WebToPay" is not configured properly. Please update configuration parameter "Project ID" at "Configuration -> Payments".'); + } + + if(!$this->getParam('sign_password')) { + throw new Payment_Exception('Payment gateway "WebToPay" is not configured properly. Please update configuration parameter "Sign Password" at "Configuration -> Payments".'); + } + } + + /** + * Return gateway type + * + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + public static function getConfig() + { + return array( + 'supports_one_time_payments' => true, + 'supports_subscriptions' => false, + 'description' => 'WebToPay gateway. More information at www.webtopay.com', + 'form' => array( + 'projectid' => array('text', array( + 'label' => 'Project ID', + 'value' => '', + ), + ), + 'sign_password' => array('password', array( + 'label' => 'Sign Password', + 'value' => '', + ), + ), + ), + ); + } + + /** + * Return service call url + * + * @return string + */ + public function getServiceUrl() + { + return WebToPay::PAY_URL; + } + + /** + * Init single payment call to webservice + * Invoice id is passed via notify_url + * + * @return mixed + */ + public function singlePayment(Payment_Invoice $invoice) + { + $buyer = $invoice->getBuyer(); + return WebToPay::buildRequest(array( + 'projectid' => $this->getParam('projectid'), + 'sign_password' => $this->getParam('sign_password'), + 'orderid' => $invoice->getNumber(), + 'amount' => $this->moneyFormat($invoice->getTotalWithTax()), + 'currency' => $invoice->getCurrency(), + 'accepturl' => $this->getParam('return_url'), + 'cancelurl' => $this->getParam('cancel_url'), + 'callbackurl' => $this->getParam('notify_url'), + 'paytext' => $invoice->getTitle(), + + 'p_firstname' => $buyer->getFirstName(), + 'p_lastname' => $buyer->getLastName(), + 'p_email' => $buyer->getEmail(), + 'p_street' => $buyer->getAddress(), + 'p_city' => $buyer->getCity(), + 'p_state' => $buyer->getState(), + 'p_zip' => $buyer->getZip(), + 'p_countrycode' => $buyer->getCountry(), + + 'lang' => 'ENG', + 'test' => $this->testMode, + )); + } + + /** + * Init recurrent payment call to webservice + * + * @return mixed + */ + public function recurrentPayment(Payment_Invoice $invoice) + { + throw new Payment_Exception('WebToPay payment gateway do not support recurrent payments'); + } + + /** + * Handle IPN and return response object + * @return Payment_Transaction + */ + public function getTransaction($data, Payment_Invoice $invoice) + { + $ipn = $data['get']; + + $tx = new Payment_Transaction(); + $tx->setId($ipn['wp_requestid']); + $tx->setAmount($ipn['wp_payamount'] / 100); + $tx->setCurrency($ipn['wp_paycurrency']); + $tx->setType(Payment_Transaction::TXTYPE_PAYMENT); + + if($ipn['wp_status'] == 1) { + $tx->setStatus(Payment_Transaction::STATUS_COMPLETE); + } + + if($ipn['wp_status'] == 2) { + $tx->setStatus(Payment_Transaction::STATUS_PENDING); + } + + return $tx; + } + + public function isIpnValid($data, Payment_Invoice $invoice) + { + $ipn = $data['get']; + try{ + WebToPay::checkResponse($ipn, array( + 'projectid' => $this->getParam('projectid'), + 'sign_password' => $this->getParam('sign_password'), + )); + $this->setOutput('OK'); + return true; + } catch (WebToPayException $e) { + error_log($e->getMessage()); + $this->setOutput('ERR'); + return false; + } + } + + public function moneyFormat($amount, $currency = null) + { + return $amount * 100; + } +} + +/** + * PHP Library for WebToPay provided services. + * Copyright (C) 2010 http://www.webtopay.com/ + * + * This program 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 (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 Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public License + * along with this program. If not, see . + * + * @package WebToPay + * @author EVP International + * @license http://www.gnu.org/licenses/lgpl.html + * @version 1.5 + * @link http://www.webtopay.com/ + */ +class WebToPay { + + /** + * WebToPay Library version. + */ + const VERSION = '1.5'; + + /** + * Server URL where all requests should go. + */ + const PAY_URL = 'https://www.mokejimai.lt/pay/'; + + /** + * Server URL where we can get XML with payment method data. + */ + const XML_URL = 'https://www.mokejimai.lt/new/lt/lib_web_to_pays/api/'; + + /** + * SMS answer url. + */ + const SMS_ANSWER_URL = 'https://www.mokejimai.lt/psms/respond/'; + + /** + * Prefix for callback data. + */ + const PREFIX = 'wp_'; + + /** + * Cache file. + */ + const CACHE_URL = 'cache.php'; + + + /** + * Identifies what verification method was used. + * + * Values can be: + * - false not verified + * - RESPONSE only response parameters are verified + * - SS1v2 SS1 v2 verification + * - SS2 SS2 verification + */ + public static $verified = false; + + + /** + * If true, check SS2 if false, skip to SS1 + * + * @deprecated + */ + private static $SS2 = true; + + /** + * Toggle SS2 checking. Usualy you don't need to use this method, because + * by default first SS2 support are checked and if it doesn't work, + * fallback to SS1. + * + * Use this method if your server supports SS2, but you want to use SS1. + * + * @deprecated + */ + public static function toggleSS2($value) { + self::$SS2 = (bool) $value; + } + + + /** + * Throw exception. + * + * @param string $code + * @return void + */ + public static function throwResponseError($code) { + $errors = array( + '0x1' => self::_('mokėjimo suma per maža'), + '0x2' => self::_('mokėjimo suma per didelė'), + '0x3' => self::_('nurodyta valiuta neaptarnaujama'), + '0x4' => self::_('nėra sumos arba valiutos'), + '0x6' => self::_('klaidos kodas nebenaudojamas'), + '0x7' => self::_('išjungtas testavimo režimas'), + '0x8' => self::_('jūs uždraudėte šį mokėjimo būdą'), + '0x9' => self::_('blogas "paytext" kintamojo kodavimas (turi būti utf-8)'), + '0x10' => self::_('tuščias arba neteisingai užpildytas "orderid"'), + '0x11' => self::_('mokėjimas negalimas, kol projektas nepatvirtintas arba jeigu jis yra blokuotas'), + '0x12' => self::_('negautas "projectid" parametras, nors jis yra privalomas'), + '0x13' => self::_('"accepturl", "cancellurl" arba "callbacurl" skiriasi nuo projekte patvirtintų adresų'), + '0x14' => self::_('blogai sugeneruotas paraštas ("sign" parametras)'), + '0x15' => self::_('klaidingi kai kurie iš perduotų parametrų'), + '0x15x0' => self::_('neteisingas vienas iš šių parametrų: cancelurl, accepturl, callbackurl'), + '0x15x1' => self::_('neteisingas parametras: time_limit'), + ); + + if (isset($errors[$code])) { + $msg = $errors[$code]; + } + else { + $msg = self::_('Nenumatyta klaida'); + } + + throw new WebToPayException($msg); + } + + + /** + * Returns specification array for request. + * + * @return array + */ + public static function getRequestSpec() { + // Array structure: + // * name – request item name. + // * maxlen – max allowed value for item. + // * required – is this item is required. + // * user – if true, user can set value of this item, if false + // item value is generated. + // * isrequest – if true, item will be included in request array, if + // false, item only be used internaly and will not be + // included in outgoing request array. + // * regexp – regexp to test item value. + return array( + array('projectid', 11, true, true, true, '/^\d+$/'), + array('orderid', 40, true, true, true, ''), + array('lang', 3, false, true, true, '/^[a-z]{3}$/i'), + array('amount', 11, false, true, true, '/^\d+$/'), + array('currency', 3, false, true, true, '/^[a-z]{3}$/i'), + array('accepturl', 255, true, true, true, ''), + array('cancelurl', 255, true, true, true, ''), + array('callbackurl', 255, true, true, true, ''), + array('payment', 20, false, true, true, ''), + array('country', 2, false, true, true, '/^[a-z_]{2}$/i'), + array('paytext', 255, false, true, true, ''), + array('p_firstname', 255, false, true, true, ''), + array('p_lastname', 255, false, true, true, ''), + array('p_email', 255, false, true, true, ''), + array('p_street', 255, false, true, true, ''), + array('p_city', 255, false, true, true, ''), + array('p_state', 20, false, true, true, ''), + array('p_zip', 20, false, true, true, ''), + array('p_countrycode', 2, false, true, true, '/^[a-z]{2}$/i'), + array('sign', 255, true, false, true, ''), + array('sign_password', 255, true, true, false, ''), + array('only_payments', 0, false, true, true, ''), + array('disalow_payments', 0, false, true, true, ''), + array('repeat_request', 1, false, false, true, '/^[01]$/'), + array('test', 1, false, true, true, '/^[01]$/'), + array('version', 9, true, false, true, '/^\d+\.\d+$/'), + array('time_limit', 19, false, true, true, '/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/'), + ); + } + + + /** + * Returns specification array for repeat request. + * + * @return array + */ + public static function getRepeatRequestSpec() { + // Array structure: + // * name – request item name. + // * maxlen – max allowed value for item. + // * required – is this item is required. + // * user – if true, user can set value of this item, if false + // item value is generated. + // * isrequest – if true, item will be included in request array, if + // false, item only be used internaly and will not be + // included in outgoing request array. + // * regexp – regexp to test item value. + return array( + array('projectid', 11, true, true, true, '/^\d+$/'), + array('requestid', 40, true, true, true, ''), + array('sign', 255, true, false, true, ''), + array('sign_password', 255, true, true, false, ''), + array('repeat_request', 1, true, false, true, '/^1$/'), + array('version', 9, true, false, true, '/^\d+\.\d+$/'), + ); + } + + + /** + * Returns specification array for makro response. + * + * @return array + */ + public static function getMakroResponseSpec() { + // Array structure: + // * name – request item name. + // * maxlen – max allowed value for item. + // * required – is this item is required in response. + // * mustcheck – this item must be checked by user. + // * isresponse – if false, item must not be included in response array. + // * regexp – regexp to test item value. + return array( + 'projectid' => array(11, true, true, true, '/^\d+$/'), + 'orderid' => array(40, false, false, true, ''), + 'lang' => array(3, false, false, true, '/^[a-z]{3}$/i'), + 'amount' => array(11, false, false, true, '/^\d+$/'), + 'currency' => array(3, false, false, true, '/^[a-z]{3}$/i'), + 'payment' => array(20, false, false, true, ''), + 'country' => array(2, false, false, true, '/^[a-z_]{2}$/i'), + 'paytext' => array(0, false, false, true, ''), + '_ss2' => array(0, true, false, true, ''), + '_ss1v2' => array(0, false, false, true, ''), + 'name' => array(255, false, false, true, ''), + 'surename' => array(255, false, false, true, ''), + 'status' => array(255, false, false, true, ''), + 'error' => array(20, false, false, true, ''), + 'test' => array(1, false, false, true, '/^[01]$/'), + + 'p_email' => array(0, false, false, true, ''), + 'requestid' => array(40, false, false, true, ''), + 'payamount' => array(0, false, false, true, ''), + 'paycurrency' => array(0, false, false, true, ''), + + 'version' => array(9, true, false, true, '/^\d+\.\d+$/'), + + 'sign_password' => array(255, false, true, false, ''), + ); + } + + + + /** + * Returns specification array for mikro response. + * + * @return array + */ + public static function getMikroResponseSpec() { + // Array structure: + // * name – request item name. + // * maxlen – max allowed value for item. + // * required – is this item is required in response. + // * mustcheck – this item must be checked by user. + // * isresponse – if false, item must not be included in response array. + // * regexp – regexp to test item value. + return array( + 'to' => array(0, true, false, true, ''), + 'sms' => array(0, true, false, true, ''), + 'from' => array(0, true, false, true, ''), + 'operator' => array(0, true, false, true, ''), + 'amount' => array(0, true, false, true, ''), + 'currency' => array(0, true, false, true, ''), + 'country' => array(0, true, false, true, ''), + 'id' => array(0, true, false, true, ''), + '_ss2' => array(0, true, false, true, ''), + '_ss1v2' => array(0, true, false, true, ''), + 'test' => array(0, true, false, true, ''), + 'key' => array(0, true, false, true, ''), + //'version' => array(9, true, false, true, '/^\d+\.\d+$/'), + ); + } + + /** + * Checks user given request data array. + * + * If any errors occurs, WebToPayException will be raised. + * + * This method returns validated request array. Returned array contains + * only those items from $data, that are needed. + * + * @param array $data + * @return array + */ + public static function checkRequestData($data, $specs) { + $request = array(); + foreach ($specs as $spec) { + list($name, $maxlen, $required, $user, $isrequest, $regexp) = $spec; + if (!$user) continue; + if ($required && !isset($data[$name])) { + $e = new WebToPayException( + self::_("'%s' is required but missing.", $name), + WebToPayException::E_MISSING); + $e->setField($name); + throw $e; + } + + if (!empty($data[$name])) { + if ($maxlen && strlen($data[$name]) > $maxlen) { + $e = new WebToPayException( + self::_("'%s' value '%s' is too long, %d characters allowed.", + $name, $data[$name], $maxlen), + WebToPayException::E_MAXLEN); + $e->setField($name); + throw $e; + } + + if ('' != $regexp && !preg_match($regexp, $data[$name])) { + $e = new WebToPayException( + self::_("'%s' value '%s' is invalid.", $name, $data[$name]), + WebToPayException::E_REGEXP); + $e->setField($name); + throw $e; + } + } + + if ($isrequest && isset($data[$name])) { + $request[$name] = $data[$name]; + } + } + + return $request; + } + + + /** + * Puts signature on request data array. + * + * @param array $specification + * @param string $request + * @param string $password + * @return string + */ + public static function signRequest($specification, $request, $password) { + $fields = array(); + foreach ($specification as $field) { + if ($field[4] && $field[0] != 'sign') { + $fields[] = $field[0]; + } + } + + $data = ''; + foreach ($fields as $key) { + if (isset($request[$key]) && trim($request[$key]) != '') { + $data .= $request[$key]; + } + } + $request['sign'] = md5($data . $password); + + return $request; + } + + + /** + * Builds request data array. + * + * This method checks all given data and generates correct request data + * array or raises WebToPayException on failure. + * + * Method accepts single parameter $data of array type. All possible array + * keys are described here: + * https://www.mokejimai.lt/makro_specifikacija.html + * + * @param array $data Information about current payment request. + * @return array + */ + public static function buildRequest($data) { + $specs = self::getRequestSpec(); + $request = self::checkRequestData($data, $specs); + $version = explode('.', self::VERSION); + $request['version'] = $version[0].'.'.$version[1]; + $request = self::signRequest($specs, $request, $data['sign_password']); + return $request; + } + + + /** + * Builds repeat request data array. + * + * This method checks all given data and generates correct request data + * array or raises WebToPayException on failure. + * + * Method accepts single parameter $data of array type. All possible array + * keys are described here: + * https://www.mokejimai.lt/makro_specifikacija.html + * + * @param array $data Information about current payment request. + * @return array + */ + public static function buildRepeatRequest($data) { + $specs = self::getRepeatRequestSpec(); + $request = self::checkRequestData($data, $specs); + $request['repeat_request'] = '1'; + $version = explode('.', self::VERSION); + $request['version'] = $version[0].'.'.$version[1]; + $request = self::signRequest($specs, $request, $data['sign_password']); + return $request; + } + + /** + * Download certificate from webtopay.com. + * + * @param string $cert + * @return string + */ + public static function getCert($cert) { + return self::getUrlContent('http://downloads.webtopay.com/download/'.$cert); + } + + /** + * Check is response certificate is valid + * + * @param string $response + * @param string $cert + * @return bool + */ + public static function checkResponseCert($response, $cert='public.key') { + $pKeyP = self::getCert($cert); + if (!$pKeyP) { + throw new WebToPayException( + self::_('Can\'t get openssl public key for %s', $cert), + WebToPayException::E_INVALID); + } + + $_SS2 = ''; + foreach ($response as $key => $value) { + if (in_array($key, array('_ss1v2', '_ss2'))) { + continue; + } + $_SS2 .= "{$value}|"; + } + $ok = openssl_verify($_SS2, base64_decode($response['_ss2']), $pKeyP); + + if ($ok !== 1) { + throw new WebToPayException( + self::_('Can\'t verify SS2 for %s', $cert), + WebToPayException::E_INVALID); + } + + return true; + } + + public static function checkResponseData($response, $mustcheck_data, $specs) { + $resp_keys = array(); + foreach ($specs as $name => $spec) { + list($maxlen, $required, $mustcheck, $is_response, $regexp) = $spec; + if ($required && !isset($response[$name])) { + $e = new WebToPayException( + self::_("'%s' is required but missing.", $name), + WebToPayException::E_MISSING); + $e->setField($name); + throw $e; + } + + if ($mustcheck) { + if (!isset($mustcheck_data[$name])) { + $e = new WebToPayException( + self::_("'%s' must exists in array of second parameter ". + "of checkResponse() method.", $name), + WebToPayException::E_USER_PARAMS); + $e->setField($name); + throw $e; + } + + if ($is_response) { + if ($response[$name] != $mustcheck_data[$name]) { + $e = new WebToPayException( + self::_("'%s' yours and requested value is not ". + "equal ('%s' != '%s') ", + $name, $mustcheck_data[$name], $response[$name]), + WebToPayException::E_INVALID); + $e->setField($name); + throw $e; + } + } + } + + if (!empty($response[$name])) { + if ($maxlen && strlen($response[$name]) > $maxlen) { + $e = new WebToPayException( + self::_("'%s' value '%s' is too long, %d characters allowed.", + $name, $response[$name], $maxlen), + WebToPayException::E_MAXLEN); + $e->setField($name); + throw $e; + } + + if ('' != $regexp && !preg_match($regexp, $response[$name])) { + $e = new WebToPayException( + self::_("'%s' value '%s' is invalid.", $name, $response[$name]), + WebToPayException::E_REGEXP); + $e->setField($name); + throw $e; + } + } + + if (isset($response[$name])) { + $resp_keys[] = $name; + } + } + + // Filter only parameters passed from webtopay + $_response = array(); + foreach (array_keys($response) as $key) { + if (in_array($key, $resp_keys)) { + $_response[$key] = $response[$key]; + } + } + + return $_response; + } + + + /** + * Check if SS2 checking is available and enabled. + * + * @return bool + */ + public static function useSS2() { + return function_exists('openssl_pkey_get_public'); + } + + + /** + * Check for SS1, which is not depend on openssl functions. + * + * @param array $response + * @param string $password + * @return bool + */ + public static function checkSS1v2($response, $password) { + if (32 != strlen($password)) { + $password = md5($password); + } + + $buffer = array($password); + foreach ($response as $key => $value) { + if (in_array($key, array('_ss1v2', '_ss2'))) { + continue; + } + $buffer[] = $value; + } + + $ss1v2 = md5(implode('|', $buffer)); + + if ($response['_ss1v2'] != $ss1v2) { + throw new WebToPayException( + self::_('Can\'t verify SS1 v2'), + WebToPayException::E_INVALID); + } + + return true; + } + + /** + * Filters saved payment method cache by e-shop's order sum and language + * + * @param string $payCurrency + * @param int $sum + * @param array $currency array ( '0' => array ('iso' => 'USD', 'rate' => 0.417391, ),); + * @param string $lang + * @param int $projectID + * @return array $filtered + */ + public static function getPaymentMethods($payCurrency, $sum, $currency, $lang, $projectID) { + + $filtered = array(); + $data = self::loadXML(); + $lang = strtolower($lang); + + //jei xml senesnis nei para + if((($data['ts']+3600*24) - time()) < 0 || $data == null) { + self::getXML($projectID); //siunciam nauja + $data = self::loadXML(); //vel uzloadinam + } + + $filtered = self::filterPayMethods($data['data'], $payCurrency, $sum, $currency, $lang); + + return $filtered; + } + + + /** + * Downloads xml data from webtopay.com + * + * @param int $projectID + * @return string + */ + public static function getXML($projectID) { + $response = self::getUrlContent(self::XML_URL.$projectID.'/'); + $feed = simplexml_load_string($response); + + $feed = simplexml_load_string($response); + if($feed === false){ + return false; + } else { + self::parseXML($feed); + return true; + } + } + + + /** + * Returns payment url + * + * @param string $language + * @return string $url + */ + public static function getPaymentUrl($language) { + $url = self::PAY_URL; + if($language != 'LT') { + $url = str_replace('mokejimai.lt', 'webtopay.com', $url); + } + return $url; + } + + /** + * Loads and unserializes xml data from file + * + * @return array $data + */ + private static function loadXML() { + + $data = array(); + + if (file_exists(self::CACHE_URL)) { + $fh = fopen(self::CACHE_URL, 'r'); + $data = unserialize(fread($fh,filesize(self::CACHE_URL))); + fclose($fh); + return $data; + } else { + return null; + } + } + + /** + * Parses xml to array, serializes it and writes it to file CACHE_URL + * + * @param obj $xml + */ + public static function parseXML($xml){ + + $paydata = array(); + $parsed = array(); + $language = array(); + $logo = array(); + $qouta = array(); + $title = array(); + $cache = array(); + + foreach($xml->country as $country){ + $countries = strtolower(trim((string)$country->attributes())); + foreach($country->payment_group as $group){ + $groups = strtolower(trim((string)$group->attributes())); + foreach($group->title as $tit => $v){ + $language[strtolower(trim((string)$v->attributes()))] = trim((string)$v); + } + $parsed[$countries][$groups]['translate'] = $language; + foreach($group->payment_type as $type) { + $types = strtolower(trim((string)$type->attributes())); + foreach($type as $key => $value) { + if($key === 'logo_url'){ + $logo[trim((string)$value->attributes())] = trim((string)$value); + } + if($key === 'title'){ + $title[trim((string)$value->attributes())] = trim((string)$value); + } + if($key === 'max' || $key === 'min') { + foreach($value->attributes() as $k => $v){ + $qouta[$key.'_amount'] = trim((string)$value->attributes()); + $qouta[$key.'_amount_currency'] = trim((string)$v); + } + } + $paydata['logo'] = $logo; + $paydata['title'] = $title; + $paydata['amount'] = $qouta; + $parsed[$countries][$groups][$types] = $paydata; + } + //unset($qouta); + $qouta = null; + } + } + } + + $cache['ts'] = time(); + $cache['data'] = $parsed; + + if (!is_writable(dirname(__FILE__))) { + throw new WebToPayException(self::_('Directory '.dirname(__FILE__).' is not writable.',WebToPayException::E_INVALID)); + } else { + $file = serialize($cache); + $fp = fopen(self::CACHE_URL, 'w+') or die('error writing cache'); + fwrite($fp, $file); + fclose($fp); + }; + } + + /** + * Converts money amount to e-shops base currency + * + * @param int $sum + * @param string $payCurrency + * @param string $convertCurrency + * @param array $currency array ( '0' => array ('iso' => USD, 'rate' => 0.417391, ),); + * @return int $amount + */ + private static function toBaseCurrency($sum, $payCurrency, $convertCurrency, $currency){ + $amount = 0; + foreach($currency as $entry) { + if($payCurrency == $entry['iso']) { + $amount = $sum/$entry['rate']; //turim viska BASE valiuta + foreach($currency as $entry) { + if($convertCurrency == $entry['iso']) { + $amount *= $entry['rate']; + return $amount; + break; + } + } + break; + } + } + } + + + /** + * Checks minimum amount of payment method + * + * @param array $data + * @param int $sum + * @param string $payCurrency + * @param array $currency array ( '0' => array ('iso' => USD, 'rate' => 0.417391, ),); + * @return bool + */ + private static function checkMinAmount($data, $sum, $payCurrency, $currency){ + //jei apribotas min_amount + if (array_key_exists('min_amount', $data) && $data['min_amount'] != null) { + if ($payCurrency == $data['min_amount_currency']) {//kai sutampa valiutos + return ($sum >= $data['min_amount']); + } else { + //konvertuojam i base + $amount = self::toBaseCurrency($sum, $payCurrency, $data['min_amount_currency'], $currency); + return ($amount >= $data['min_amount']); + } + } + return true; + } + + /** + * Checks maximum amount of payment method + * + * @param array $data + * @param int $sum + * @param string $payCurrency + * @param array $currency array ( '0' => array ('iso' => USD, 'rate' => 0.417391, ),); + * @return bool + */ + private static function checkMaxAmount($data, $sum, $payCurrency, $currency){ + //jei apribotas max_amount + if (array_key_exists('max_amount', $data) && $data['max_amount'] != null) { + if ($payCurrency == $data['max_amount_currency']) {//kai sutampa valiutos + return ($data['max_amount'] >= $sum); + } else { + //konvertuojam i base + $amount = self::toBaseCurrency($sum, $payCurrency, $data['max_amount_currency'], $currency); + return ($data['max_amount'] >= $amount); + } + } + return true; + } + + /** + * Checks maximum amount of payment method + * + * @param array $payMethods - unserialized array with pay method data + * @param string $payCurrency - + * @param int $sum + * @param string $payCurrency + * @param array $currency array ( '0' => array ('iso' => USD, 'rate' => 0.417391, ),); + * @param string $lang + * @return array + */ + public static function filterPayMethods($payMethods, $payCurrency, $sum, $currency, $lang) { + + $filtered = array(); + $groupName = array(); + $logo = null; + $name = null; + + foreach($payMethods as $key1 => $value1) { + foreach($value1 as $key2 => $value2){ + foreach($value2 as $key3 => $value3){ + if($key3 === 'translate') { + foreach($value3 as $loc => $text) { + if($loc === 'en'){ + $groupName = $text; + } + if($loc === $lang) { + $groupName = $text; + break; + } + } + } else { + foreach($value3 as $key4 => $value4) { + if($key4 === 'logo'){ + foreach($value4 as $k => $v) { + if($k === 'en'){ //statom anglu kalba default jei nerasta vertimu + $logo = $v; + } + if($k === $lang) { + $logo = $v; + break; + } + } + } + if($key4 === 'title'){ + foreach($value4 as $k => $v) { + if($k === 'en'){ + $name = $v; + } + if($k === $lang) { + $name = $v; + break; + } + } + } + if($key4 === 'amount'){ + $min = self::checkMinAmount($value4, $sum, $payCurrency, $currency); + $max = self::checkMaxAmount($value4, $sum, $payCurrency, $currency); + if($min && $max) { //jei praeina pagal min ir max irasom + $filtered[$key1][$groupName][$name] = array('name' => $key3,'logo' => $logo); + } + } + } + } + } + } + } + + return $filtered; + } + + + /** + * Return type and specification of given response array. + * + * @param array $response + * @return array($type, $specs) + */ + public static function getSpecsForResponse($response) { + if ( + isset($response['to']) && + isset($response['from']) && + isset($response['sms']) && + !isset($response['projectid']) + ) + { + $type = 'mikro'; + $specs = self::getMikroResponseSpec(); + } + else { + $type = 'makro'; + $specs = self::getMakroResponseSpec(); + } + + return array($type, $specs); + } + + + public static function getPrefixed($data, $prefix) { + if (empty($prefix)) return $data; + $ret = array(); + foreach ($data as $key => $val) { + if (strpos($key, $prefix) === 0 && strlen($key) > 3) { + $ret[substr($key, 3)] = $val; + } + } + return $ret; + } + + private static function getUrlContent($URL){ + $url = parse_url($URL); + if ('https' == $url['scheme']) { + $host = 'ssl://'.$url['host']; + $port = 443; + } else { + $host = $url['host']; + $port = 80; + } + + try { + $fp = fsockopen($host, $port, $errno, $errstr, 30); + if (!$fp) { + throw new WebToPayException( + self::_('Can\'t connect to %s', $URL), + WebToPayException::E_INVALID); + } + + if(isset($url['query'])) { + $data = $url['path'].'?'.$url['query']; + } else { + $data = $url['path']; + } + + $out = "GET " . $data . " HTTP/1.0\r\n"; + $out .= "Host: ".$url['host']."\r\n"; + $out .= "Connection: Close\r\n\r\n"; + + $content = ''; + + fwrite($fp, $out); + while (!feof($fp)) $content .= fgets($fp, 8192); + fclose($fp); + + list($header, $content) = explode("\r\n\r\n", $content, 2); + + return trim($content); + + } catch (WebToPayException $e) { + throw new WebToPayException(self::_('fsockopen fail!', WebToPayException::E_INVALID)); + } + } + + + /** + * Checks and validates response from WebToPay server. + * + * This function accepts both mikro and makro responses. + * + * First parameter usualy should by $_GET array. + * + * Description about response can be found here: + * makro: https://www.mokejimai.lt/makro_specifikacija.html + * mikro: https://www.mokejimai.lt/mikro_mokejimu_specifikacija_SMS.html + * + * If response is not correct, WebToPayException will be raised. + * + * @param array $response Response array. + * @param array $user_data + * @return void + */ + public static function checkResponse($response, $user_data=array()) { + self::$verified = false; + + $response = self::getPrefixed($response, self::PREFIX); + + // *get* response type (makro|mikro) + list($type, $specs) = self::getSpecsForResponse($response); + + try { + // *check* response + $version = explode('.', self::VERSION); + $version = $version[0].'.'.$version[1]; + if ('makro' == $type && $response['version'] != $version) { + throw new WebToPayException( + self::_('Incompatible library and response versions: ' . + 'libwebtopay %s, response %s', self::VERSION, $response['version']), + WebToPayException::E_INVALID); + } + + if ('makro' == $type && $response['projectid'] != $user_data['projectid']) { + throw new WebToPayException( + self::_('Bad projectid: ' . + 'libwebtopay %s, response %s', self::VERSION, $response['version']), + WebToPayException::E_INVALID); + } + + if ('makro' == $type) { + self::$verified = 'RESPONSE VERSION '.$response['version'].' OK'; + } + + $orderid = 'makro' == $type ? $response['orderid'] : $response['id']; + $password = $user_data['sign_password']; + + // *check* SS2 + if (self::useSS2()) { + $cert = 'public.key'; + if (self::checkResponseCert($response, $cert)) { + self::$verified = 'SS2 public.key'; + } + } + + // *check* SS1 v2 + else if (self::checkSS1v2($response, $password)) { + self::$verified = 'SS1v2'; + } + + // *check* status + if ('makro' == $type && $response['status'] != '1') { + throw new WebToPayException( + self::_('Returned transaction status is %d, successful status '. + 'should be 1.', $response['status']), + WebToPayException::E_STATUS); + } + + } + + catch (WebToPayException $e) { + if (isset($user_data['log'])) { + self::log('ERR', + self::responseToLog($type, $response) . + ' ('. get_class($e).': '. $e->getMessage().')', + $user_data['log']); + } + throw $e; + } + + if (isset($user_data['log'])) { + self::log('OK', self::responseToLog($type, $response), $user_data['log']); + } + + return $response; + } + + public static function responseToLog($type, $req) { + if ('mikro' == $type) { + return self::mikroResponseToLog($req); + } + else { + return self::makroResponseToLog($req); + } + } + + public static function mikroResponseToLog($req) { + $ret = array(); + foreach (array('to', 'from', 'id', 'sms') as $key) { + $ret[] = $key.':"'.$req[$key].'"'; + } + + return 'MIKRO '.implode(', ', $ret); + } + + public static function makroResponseToLog($req) { + $ret = array(); + foreach (array('projectid', 'orderid', 'payment') as $key) { + $ret[] = $key.':"'.$req[$key].'"'; + } + + return 'MAKRO '.implode(', ', $ret); + } + + public static function mikroAnswerToLog($answer) { + $ret = array(); + foreach (array('id', 'msg') as $key) { + $ret[] = $key.':"'.$answer[$key].'"'; + } + + return 'MIKRO [answer] '.implode(', ', $ret); + } + + public static function log($type, $msg, $logfile=null) { + if (!isset($logfile)) { + return false; + } + + $fp = @fopen($logfile, 'a'); + if (!$fp) { + throw new WebToPayException( + self::_('Can\'t write to logfile: %s', $logfile), WebToPayException::E_LOG); + } + + $logline = array(); + + // *log* type + $logline[] = $type; + + // *log* REMOTE_ADDR + if (isset($_SERVER['REMOTE_ADDR'])) { + $logline[] = $_SERVER['REMOTE_ADDR']; + } + else { + $logline[] = '-'; + } + + // *log* datetime + $logline[] = date('[Y-m-d H:i:s O]'); + + // *log* version + $logline[] = 'v'.self::VERSION.':'; + + // *log* message + $logline[] = $msg; + + $logline = implode(' ', $logline)."\n"; + fwrite($fp, $logline); + fclose($fp); + + // clear big log file + if (filesize($logfile) > 1024 * 1024 * pi()) { + copy($logfile, $logfile.'.old'); + unlink($logfile); + } + } + + + /** + * Sends SMS answer. + * + * @param array $answer + * @return void + */ + public static function smsAnswer($answer) { + + $data = array( + 'id' => $answer['id'], + 'msg' => $answer['msg'], + 'transaction' => md5($answer['sign_password'].'|'.$answer['id']), + ); + + $url = self::SMS_ANSWER_URL.'?'.http_build_query($data); + try { + $content = self::getUrlContent($url); + if (strpos($content, 'OK') !== 0) { + throw new WebToPayException( + self::_('Error: %s', $content), + WebToPayException::E_SMS_ANSWER); + } + } catch (WebToPayException $e) { + if (isset($answer['log'])) { + self::log('ERR', + self::mikroAnswerToLog($answer). + ' ('. get_class($e).': '. $e->getMessage().')', + $answer['log']); + } + throw $e; + } + + if (isset($answer['log'])) { + self::log('OK', self::mikroAnswerToLog($answer), $answer['log']); + } + + } + + + /** + * I18n support. + */ + public static function _() { + $args = func_get_args(); + if (sizeof($args) > 1) { + return call_user_func_array('sprintf', $args); + } + else { + return $args[0]; + } + } + +} + + + +class WebToPayException extends Exception { + + /** + * Missing field. + */ + const E_MISSING = 1; + + /** + * Invalid field value. + */ + const E_INVALID = 2; + + /** + * Max length exceeded. + */ + const E_MAXLEN = 3; + + /** + * Regexp for field value doesn't match. + */ + const E_REGEXP = 4; + + /** + * Missing or invalid user given parameters. + */ + const E_USER_PARAMS = 5; + + /** + * Logging errors + */ + const E_LOG = 6; + + /** + * SMS answer errors + */ + const E_SMS_ANSWER = 7; + + /** + * Macro answer errors + */ + const E_STATUS = 8; + + protected $field_name = false; + + public function setField($field_name) { + $this->field_name = $field_name; + } + + public function getField() { + return $this->field_name; + } +} diff --git a/src/bb-library/Payment/AdapterAbstract.php b/src/bb-library/Payment/AdapterAbstract.php new file mode 100644 index 000000000..1be63d82c --- /dev/null +++ b/src/bb-library/Payment/AdapterAbstract.php @@ -0,0 +1,208 @@ +_config = $config; + + /** + * Redirect client after successfull payment, usually to invoice + */ + if(!$this->getParam('return_url')) { + throw new Payment_Exception('Return URL for payment gateway was not set', 6001); + } + + /** + * URL to redirect client if payment process was canceled + */ + if(!$this->getParam('cancel_url')) { + throw new Payment_Exception('Cancel URL for payment gateway was not set', 6002); + } + + /** + * IPN notification url. Payment gateway posts data to this URL + * to inform BoxBilling about payment + */ + if(!$this->getParam('notify_url')) { + throw new Payment_Exception('IPN Notification URL for payment gateway was not set', 6003); + } + + /** + * If payment gateway has only one callback url, this url should be + * used. It is equal to return_url + notify_url combined. + * Client gets redirected to redirect_url, POST, GET data are considered + * as IPN data, and client gets redirected to invoice page. + */ + if(!$this->getParam('redirect_url')) { + throw new Payment_Exception('IPN redirect URL for payment gateway was not set', 6004); + } + + $this->init(); + } + + /** + * Return gateway configuration options + * + * @return array + */ + public static function getConfig() + { + throw new Payment_Exception('Payment adapter class did not implement configuration options method', 749); + } + + /** + * Return payment gateway type + * @return string + */ + public function getType() + { + return Payment_AdapterAbstract::TYPE_FORM; + } + + /** + * Payment gateway endpoint + * + * @return string + */ + public function getServiceUrl() + { + return ''; + } + + /** + * Returns invoice id from callback IPN + * + * This method is called before transaction processing to determine + * invoice id from IPN. + * + * @param array $data - Contains $_GET, $_POST, $HTTP_RAW_POST_DATA + * (or file_get_contents("php://input")) in format like: + * $data = array( + * 'get'=>$_GET, + * 'post'=>$_POST, + * 'http_raw_post_data'=>$HTTP_RAW_POST_DATA + * ); + * + * @return int - invoice id + */ + public function getInvoiceId($data) + { + return isset($data['get']['bb_invoice_id']) ? (int)$data['get']['bb_invoice_id'] : NULL; + } + + public function setLog(Box_Log $log) + { + $this->_log = $log; + } + + public function getLog() + { + $log = $this->_log; + if(!$log instanceof Box_Log) { + $log = new Box_Log(); + } + return $log; + } + + /** + * Get config parameter + */ + public function getParam($param) + { + return isset($this->_config[$param]) ? $this->_config[$param] : NULL; + } + + /** + * Convert money amount to Gateway money format + * + * @param float + * @param string + * @return string + */ + public function moneyFormat($amount, $currency = null) + { + return number_format($amount, 2, '.', ''); + } + + /** + * Set test mode + * + * @param none + * @return none + */ + public function setTestMode($bool) + { + $this->testMode = (bool)$bool; + return $this; + } + + public function getTestMode() + { + return $this->testMode; + } + + /** + * Set custom response text to be printed when IPN is received + * Used only by payment gateways who care about notify_url response + * + * @param string + */ + public function setOutput($response) + { + $this->output = $response; + } + + public function getOutput() + { + return $this->output; + } + +} diff --git a/src/bb-library/Payment/Exception.php b/src/bb-library/Payment/Exception.php new file mode 100644 index 000000000..b397437b2 --- /dev/null +++ b/src/bb-library/Payment/Exception.php @@ -0,0 +1,14 @@ +id = $param; + return $this; + } + + public function getId() + { + return $this->id; + } + + public function setNumber($param) + { + $this->number = $param; + return $this; + } + + public function getNumber() + { + return $this->number; + } + + public function setCurrency($param) + { + $this->currency = $param; + return $this; + } + + public function getCurrency() + { + return $this->currency; + } + + public function setBuyer(Payment_Invoice_Buyer $param) + { + $this->buyer = $param; + return $this; + } + + public function getBuyer() + { + return $this->buyer; + } + + public function setItems(array $items) + { + foreach($items as $item) { + if($item instanceof Payment_Invoice_Item) { + $this->items[] = $item; + } + } + return $this; + } + + public function getItems() + { + return $this->items; + } + + public function setSubscription(Payment_Invoice_Subscription $param) + { + $this->subscription = $param; + return $this; + } + + public function getSubscription() + { + return $this->subscription; + } + + public function setTitle($title) + { + $this->title = $title; + return $this; + } + + public function getTitle() + { + return $this->title; + } + + public function getTotal() + { + $total = 0; + foreach ($this->items as $item) { + $total += $item->getTotal(); + } + return $total; + } + + public function getTotalWithTax() + { + return $this->getTotal() + $this->getTax(); + } + + public function getTax() + { + $tax = 0; + foreach ($this->items as $item) { + $tax += $item->getTax() * $item->getQuantity(); + } + return $tax; + } + +} \ No newline at end of file diff --git a/src/bb-library/Payment/Invoice/Buyer.php b/src/bb-library/Payment/Invoice/Buyer.php new file mode 100644 index 000000000..63382b3b9 --- /dev/null +++ b/src/bb-library/Payment/Invoice/Buyer.php @@ -0,0 +1,148 @@ +first_name = $param; + return $this; + } + + public function getFirstName() + { + return $this->first_name; + } + + public function setLastName($param) + { + $this->last_name = $param; + return $this; + } + + public function getLastName() + { + return $this->last_name; + } + + public function setCompany($param) + { + $this->company = $param; + return $this; + } + + public function getCompany() + { + return $this->company; + } + + public function setEmail($param) + { + $this->email = $param; + return $this; + } + + public function getEmail() + { + return $this->email; + } + + public function setAddress($param) + { + $this->address = $param; + return $this; + } + + public function getAddress() + { + return $this->address; + } + + public function setCity($param) + { + $this->city = $param; + return $this; + } + + public function getCity() + { + return $this->city; + } + + public function setState($param) + { + $this->state = $param; + return $this; + } + + public function getState() + { + return $this->state; + } + + public function setCountry($param) + { + $this->country = $param; + return $this; + } + + public function getCountry() + { + return $this->country; + } + + public function setZip($param) + { + $this->zip = $param; + return $this; + } + + public function getZip() + { + return $this->zip; + } + + public function setPhone($param) + { + $this->phone = $param; + return $this; + } + + public function getPhone() + { + return $this->phone; + } + + public function setPhoneCountryCode($param) + { + $this->phone_cc = $param; + return $this; + } + + public function getPhoneCountryCode() + { + return $this->phone_cc; + } + +} \ No newline at end of file diff --git a/src/bb-library/Payment/Invoice/Item.php b/src/bb-library/Payment/Invoice/Item.php new file mode 100644 index 000000000..fdcb902dc --- /dev/null +++ b/src/bb-library/Payment/Invoice/Item.php @@ -0,0 +1,129 @@ +id = $id; + return $this; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + /** + * Set title + * + * @param string $title + */ + public function setTitle($title) + { + $this->title = $title; + return $this; + } + + /** + * Get title + * + * @return string + */ + public function getTitle() + { + return $this->title; + } + + /** + * Set description + * + * @param text $description + */ + public function setDescription($description) + { + $this->description = $description; + return $this; + } + + /** + * Get description + * + * @return text + */ + public function getDescription() + { + return $this->description; + } + + public function setPrice($price) + { + $this->price = $price; + return $this; + } + + public function getPrice() + { + return $this->price; + } + + public function setTax($tax) + { + $this->tax = $tax; + return $this; + } + + public function getTax() + { + return $this->tax; + } + + public function setQuantity($qty) + { + $this->qty = $qty; + return $this; + } + + public function getQuantity() + { + return $this->qty; + } + + /** + * Return total price for this item + */ + public function getTotal() + { + return $this->getQuantity() * $this->getPrice(); + } + + public function getTotalWithTax() + { + return $this->getTotal() + $this->getQuantity() * $this->getTax(); + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Invoice/Subscription.php b/src/bb-library/Payment/Invoice/Subscription.php new file mode 100644 index 000000000..0484f2f69 --- /dev/null +++ b/src/bb-library/Payment/Invoice/Subscription.php @@ -0,0 +1,72 @@ +id = $id; + return $this; + } + + /** + * Get id + * + * @return integer + */ + public function getId() + { + return $this->id; + } + + public function setAmount($price) + { + $this->amount = $price; + return $this; + } + + public function getAmount() + { + return $this->amount; + } + + public function setCycle($cycle) + { + $this->cycle = $cycle; + return $this; + } + + public function getCycle() + { + return $this->cycle; + } + + public function setUnit($param) + { + $this->unit = $param; + return $this; + } + + public function getUnit() + { + return $this->unit; + } +} \ No newline at end of file diff --git a/src/bb-library/Payment/Transaction.php b/src/bb-library/Payment/Transaction.php new file mode 100644 index 000000000..7962d10e9 --- /dev/null +++ b/src/bb-library/Payment/Transaction.php @@ -0,0 +1,97 @@ +id = $param; + return $this; + } + + public function getId() + { + return $this->id; + } + + public function setStatus($param) + { + $this->status = $param; + return $this; + } + + public function getStatus() + { + return $this->status; + } + + public function setType($param) + { + $this->type = $param; + return $this; + } + + public function getType() + { + return $this->type; + } + + public function setCurrency($param) + { + $this->currency = $param; + return $this; + } + + public function getCurrency() + { + return $this->currency; + } + + public function setAmount($param) + { + $this->amount = $param; + return $this; + } + + public function getAmount() + { + return $this->amount; + } + + public function setSubscriptionId($param) + { + $this->subscription_id = $param; + return $this; + } + + public function getSubscriptionId() + { + return $this->subscription_id; + } +} \ No newline at end of file diff --git a/src/bb-library/PdoSessionHandler.php b/src/bb-library/PdoSessionHandler.php new file mode 100644 index 000000000..105c28214 --- /dev/null +++ b/src/bb-library/PdoSessionHandler.php @@ -0,0 +1,258 @@ + + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ + + +/** + * PdoSessionHandler. + * + * @author Fabien Potencier + * @author Michael Williams + */ +class PdoSessionHandler +{ + /** + * @var \PDO PDO instance. + */ + private $pdo; + + /** + * @var array Database options. + */ + private $dbOptions; + + /** + * Constructor. + * + * List of available options: + * * db_table: The name of the table [required] + * * db_id_col: The column where to store the session id [default: sess_id] + * * db_data_col: The column where to store the session data [default: sess_data] + * * db_time_col: The column where to store the timestamp [default: sess_time] + * + * @param \PDO $pdo A \PDO instance + * @param array $dbOptions An associative array of DB options + * + * @throws \InvalidArgumentException When "db_table" option is not provided + */ + public function __construct(\PDO $pdo, array $dbOptions = array()) + { + + $dbOptions = array ( + 'db_table' => 'session', + ); + + if (!array_key_exists('db_table', $dbOptions)) { + throw new \InvalidArgumentException('You must provide the "db_table" option for a PdoSessionStorage.'); + } + if (\PDO::ERRMODE_EXCEPTION !== $pdo->getAttribute(\PDO::ATTR_ERRMODE)) { + throw new \InvalidArgumentException(sprintf('"%s" requires PDO error mode attribute be set to throw Exceptions (i.e. $pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION))', __CLASS__)); + } + $this->pdo = $pdo; + + $this->dbOptions = array_merge(array( + 'db_id_col' => 'id', + 'db_data_col' => 'content', + 'db_time_col' => 'modified_at', + ), $dbOptions); + } + + /** + * {@inheritDoc} + */ + public function open($path, $name) + { + return true; + } + + /** + * {@inheritDoc} + */ + public function close() + { + return true; + } + + /** + * {@inheritDoc} + */ + public function destroy($id) + { + // get table/column + $dbTable = $this->dbOptions['db_table']; + $dbIdCol = $this->dbOptions['db_id_col']; + + // delete the record associated with this id + $sql = "DELETE FROM $dbTable WHERE $dbIdCol = :id"; + + try { + $stmt = $this->pdo->prepare($sql); + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + $stmt->execute(); + } catch (\PDOException $e) { + throw new \RuntimeException(sprintf('PDOException was thrown when trying to manipulate session data: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * {@inheritDoc} + */ + public function gc($lifetime) + { + // get table/column + $dbTable = $this->dbOptions['db_table']; + $dbTimeCol = $this->dbOptions['db_time_col']; + + // delete the session records that have expired + $sql = "DELETE FROM $dbTable WHERE $dbTimeCol < :time"; + + try { + $stmt = $this->pdo->prepare($sql); + $stmt->bindValue(':time', time() - $lifetime, \PDO::PARAM_INT); + $stmt->execute(); + } catch (\PDOException $e) { + throw new \RuntimeException(sprintf('PDOException was thrown when trying to manipulate session data: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * {@inheritDoc} + */ + public function read($id) + { + // get table/columns + $dbTable = $this->dbOptions['db_table']; + $dbDataCol = $this->dbOptions['db_data_col']; + $dbIdCol = $this->dbOptions['db_id_col']; + + try { + $sql = "SELECT $dbDataCol FROM $dbTable WHERE $dbIdCol = :id"; + + $stmt = $this->pdo->prepare($sql); + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + + $stmt->execute(); + // it is recommended to use fetchAll so that PDO can close the DB cursor + // we anyway expect either no rows, or one row with one column. fetchColumn, seems to be buggy #4777 + $sessionRows = $stmt->fetchAll(\PDO::FETCH_NUM); + + if (count($sessionRows) == 1) { + return base64_decode($sessionRows[0][0]); + } + + // session does not exist, create it + $this->createNewSession($id); + + return ''; + } catch (\PDOException $e) { + throw new \RuntimeException(sprintf('PDOException was thrown when trying to read the session data: %s', $e->getMessage()), 0, $e); + } + } + + /** + * {@inheritDoc} + */ + public function write($id, $data) + { + // get table/column + $dbTable = $this->dbOptions['db_table']; + $dbDataCol = $this->dbOptions['db_data_col']; + $dbIdCol = $this->dbOptions['db_id_col']; + $dbTimeCol = $this->dbOptions['db_time_col']; + + //session data can contain non binary safe characters so we need to encode it + $encoded = base64_encode($data); + + try { + $driver = $this->pdo->getAttribute(\PDO::ATTR_DRIVER_NAME); + + if ('mysql' === $driver) { + // MySQL would report $stmt->rowCount() = 0 on UPDATE when the data is left unchanged + // it could result in calling createNewSession() whereas the session already exists in + // the DB which would fail as the id is unique + $stmt = $this->pdo->prepare( + "INSERT INTO $dbTable ($dbIdCol, $dbDataCol, $dbTimeCol) VALUES (:id, :data, :time) " . + "ON DUPLICATE KEY UPDATE $dbDataCol = VALUES($dbDataCol), $dbTimeCol = VALUES($dbTimeCol)" + ); + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + $stmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $stmt->bindValue(':time', time(), \PDO::PARAM_INT); + $stmt->execute(); + } elseif ('oci' === $driver) { + $stmt = $this->pdo->prepare("MERGE INTO $dbTable USING DUAL ON($dbIdCol = :id) ". + "WHEN NOT MATCHED THEN INSERT ($dbIdCol, $dbDataCol, $dbTimeCol) VALUES (:id, :data, sysdate) " . + "WHEN MATCHED THEN UPDATE SET $dbDataCol = :data WHERE $dbIdCol = :id"); + + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + $stmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $stmt->execute(); + } else { + $stmt = $this->pdo->prepare("UPDATE $dbTable SET $dbDataCol = :data, $dbTimeCol = :time WHERE $dbIdCol = :id"); + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + $stmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $stmt->bindValue(':time', time(), \PDO::PARAM_INT); + $stmt->execute(); + + if (!$stmt->rowCount()) { + // No session exists in the database to update. This happens when we have called + // session_regenerate_id() + $this->createNewSession($id, $data); + } + } + } catch (\PDOException $e) { + throw new \RuntimeException(sprintf('PDOException was thrown when trying to write the session data: %s', $e->getMessage()), 0, $e); + } + + return true; + } + + /** + * Creates a new session with the given $id and $data + * + * @param string $id + * @param string $data + * + * @return boolean True. + */ + private function createNewSession($id, $data = '') + { + // get table/column + $dbTable = $this->dbOptions['db_table']; + $dbDataCol = $this->dbOptions['db_data_col']; + $dbIdCol = $this->dbOptions['db_id_col']; + $dbTimeCol = $this->dbOptions['db_time_col']; + + $sql = "INSERT INTO $dbTable ($dbIdCol, $dbDataCol, $dbTimeCol) VALUES (:id, :data, :time)"; + + //session data can contain non binary safe characters so we need to encode it + $encoded = base64_encode($data); + $stmt = $this->pdo->prepare($sql); + $stmt->bindParam(':id', $id, \PDO::PARAM_STR); + $stmt->bindParam(':data', $encoded, \PDO::PARAM_STR); + $stmt->bindValue(':time', time(), \PDO::PARAM_INT); + $stmt->execute(); + + return true; + } + + /** + * Return a PDO instance + * + * @return \PDO + */ + protected function getConnection() + { + return $this->pdo; + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Adapter/Custom.php b/src/bb-library/Registrar/Adapter/Custom.php new file mode 100644 index 000000000..df829b8ae --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Custom.php @@ -0,0 +1,657 @@ + FALSE, + ); + + public function __construct($options) + { + if(isset($options['use_whois'])) { + $this->config['use_whois'] = (bool)$options['use_whois']; + } + } + + public function getTlds() + { + return array(); + } + + public static function getConfig() + { + return array( + 'label' => 'Custom Registrar always responds with positive results. Usefull if no other registrar is suitable.', + 'form' => array( + 'use_whois' => array('radio', array( + 'multiOptions' => array('1'=>'Yes', '0'=>'No'), + 'label' => 'Use WHOIS to check for domain availability', + ), + ), + ), + ); + } + + public function isDomainCanBeTransfered(Registrar_Domain $domain) + { + $this->getLog()->debug('Checking if domain can be transferred: ' . $domain->getName()); + return true; + } + + public function isDomainAvailable(Registrar_Domain $domain) + { + $this->getLog()->debug('Checking domain availability: ' . $domain->getName()); + + if($this->config['use_whois']) { + $w = new Whois($domain->getName()); + return $w->isAvailable(); + } + return true; + } + + public function modifyNs(Registrar_Domain $domain) + { + $this->getLog()->debug('Modifying nameservers: ' . $domain->getName()); + $this->getLog()->debug('Ns1: ' . $domain->getNs1()); + $this->getLog()->debug('Ns2: ' . $domain->getNs2()); + $this->getLog()->debug('Ns3: ' . $domain->getNs3()); + $this->getLog()->debug('Ns4: ' . $domain->getNs4()); + return true; + } + + public function transferDomain(Registrar_Domain $domain) + { + $this->getLog()->debug('Transfering domain: ' . $domain->getName()); + $this->getLog()->debug('Epp code: ' . $domain->getEpp()); + return true; + } + + public function getDomainDetails(Registrar_Domain $domain) + { + $this->getLog()->debug('Getting whois: ' . $domain->getName()); + + if(!$domain->getRegistrationTime()) { + $domain->setRegistrationTime(time()); + } + if(!$domain->getExpirationTime()) { + $years = $domain->getRegistrationPeriod(); + $domain->setExpirationTime(strtotime("+$years year")); + } + return $domain; + } + + public function deleteDomain(Registrar_Domain $domain) + { + $this->getLog()->debug('Removing domain: ' . $domain->getName()); + return true; + } + + public function registerDomain(Registrar_Domain $domain) + { + $this->getLog()->debug('Registering domain: ' . $domain->getName(). ' for '.$domain->getRegistrationPeriod(). ' years'); + return true; + } + + public function renewDomain(Registrar_Domain $domain) + { + $this->getLog()->debug('Renewing domain: ' . $domain->getName()); + return true; + } + + public function modifyContact(Registrar_Domain $domain) + { + $this->getLog()->debug('Updating contact info: ' . $domain->getName()); + return true; + } + + public function enablePrivacyProtection(Registrar_Domain $domain) + { + $this->getLog()->debug('Enabling Privacy protection: ' . $domain->getName()); + return true; + } + + public function disablePrivacyProtection(Registrar_Domain $domain) + { + $this->getLog()->debug('Disabling Privacy protection: ' . $domain->getName()); + return true; + } + + public function getEpp(Registrar_Domain $domain) + { + $this->getLog()->debug('Retrieving domain transfer code: ' . $domain->getName()); + return true; + } + + public function lock(Registrar_Domain $domain) + { + $this->getLog()->debug('Locking domain: ' . $domain->getName()); + return true; + } + + public function unlock(Registrar_Domain $domain) + { + $this->getLog()->debug('Unlocking: ' . $domain->getName()); + return true; + } +} + +class Whois { + + public $domain=""; + protected $idn=array(224,225,226,227,228,229,230,231,232,233,234,235,240,236,237,238,239,241,242,243,244,245,246,248,254,249,250,251,252,253,255); + // var $idn=array("00E0","00E1","00E2","00E3","00E4","00E5","0101","0103","0105","00E6","00E7","0107","0109","010B","010D","010F","0111","00E8","00E9","00EA","00EB","0113","0115","0117","0119","011B","014B","00F0","011D","011F","0121","0123","0125","0127","00EC","00ED","00EE","00EF","0129","012B","012D","012F","0131","0135","0137","0138","013A","013C","013E","0142","00F1","0144","0146","0148","00F2","00F3","00F4","00F5","00F6","00F8","014D","014F","0151","0153","0155","0157","0159","015B","015D","015F","0161","0163","0165","0167","00FE","00F9","00FA","00FB","00FC","0169","016B","016D","016F","0171","0173","0175","00FD","00FF","0177","017A","017C","017E"); + + public static function getServers() + { + /******************************* + * Initializing server variables + * array(top level domain,whois_Server,not_found_string or MAX number of CHARS: MAXCHARS:n) + **/ + $servers=array( + array("ac","whois.nic.ac","Available"), + array("ac.cn","whois.cnnic.net.cn","no matching record"), + array("ac.jp","whois.nic.ad.jp","No match"), + array("ac.uk","whois.ja.net","No such domain"), + array("ad.jp","whois.nic.ad.jp","No match"), + array("adm.br","whois.nic.br","No match"), + array("adv.br","whois.nic.br","No match"), + array("aero","whois.information.aero","is available"), + array("ag","whois.nic.ag","Not found"), + array("agr.br","whois.nic.br","No match"), + array("ah.cn","whois.cnnic.net.cn","No entries found"), + array("al","whois.ripe.net","No entries found"), + array("am","whois.amnic.net","No match"), + array("am.br","whois.nic.br","No match"), + array("arq.br","whois.nic.br","No match"), + array("at","whois.nic.at","nothing found"), + array("au","whois.aunic.net","No Data Found"), + array("art.br","whois.nic.br","No match"), + array("as","whois.nic.as","Domain Not Found"), + array("asia","whois.nic.asia","NOT FOUND"), + array("asn.au","whois.aunic.net","No Data Found"), + array("ato.br","whois.nic.br","No match"), + array("av.tr","whois.nic.tr","Not found in database"), + array("az","whois.ripe.net","no entries found"), + array("ba","whois.ripe.net","No match for"), + array("be","whois.geektools.com","FREE"), + array("bg","whois.digsys.bg","does not exist"), + array("bio.br","whois.nic.br","No match"), + array("biz","whois.biz","Not found"), + array("biz.tr","whois.nic.tr","Not found in database"), + array("bj.cn","whois.cnnic.net.cn","No entries found"), + array("bel.tr","whois.nic.tr","Not found in database"), + array("bmd.br","whois.nic.br","No match"), + array("br","whois.registro.br","No match"), + array("by","whois.ripe.net","no entries found"), + array("ca","whois.cira.ca","Status: AVAIL"), + array("cc","whois.nic.cc","No match"), + array("cd","whois.cd","No match"), + array("ch","whois.nic.ch","We do not have an entry"), + array("cim.br","whois.nic.br","No match"), + array("ck","whois.ck-nic.org.ck","No entries found"), + array("cl","whois.nic.cl","no existe"), + array("cn","whois.cnnic.net.cn","No entries found"), + array("cng.br","whois.nic.br","No match"), + array("cnt.br","whois.nic.br","No match"), + array("com","whois.crsnic.net","No match"), + array("com.au","whois.aunic.net","No Data Found"), + array("com.br","whois.nic.br","No match"), + array("com.cn","whois.cnnic.net.cn","No entries found"), + array("com.eg","whois.ripe.net","No entries found"), + array("com.hk","whois.hknic.net.hk","No Match for"), + array("com.mx","whois.nic.mx","Nombre del Dominio"), + array("com.tr","whois.nic.tr","Not found in database"), + array("com.ru","whois.ripn.ru","No entries found"), + array("com.tw","whois.twnic.net","NO MATCH TIP"), + array("conf.au","whois.aunic.net","No entries found"), + array("co.at","whois.nic.at","nothing found"), + array("co.jp","whois.nic.ad.jp","No match"), + array("co.uk","whois.nic.uk","No match for"), + array("co.in","whois.iisc.ernet.in","No match for"), + array("co.za","whois.coza.net.za","Available"), + array("cq.cn","whois.cnnic.net.cn","No entries found"), + array("csiro.au","whois.aunic.net","No Data Found"), + array("cx","whois.nic.cx","No match"), + array("cy","whois.ripe.net","no entries found"), + array("cz","whois.nic.cz","No data found"), + array("de","whois.denic.de","not found"), + array("dr.tr","whois.nic.tr","Not found in database"), + array("dk","whois.dk-hostmaster.dk","No entries found"), + array("dz","whois.ripe.net","no entries found"), + array("ecn.br","whois.nic.br","No match"), + array("ee","whois.eenet.ee","NOT FOUND"), + // array("edu","whois.verisign-grs.net","No match"), + array("edu","whois.crsnic.net","No match"), + array("edu.au","whois.aunic.net","No Data Found"), + array("edu.br","whois.nic.br","No match"), + array("edu.tr","whois.nic.tr","Not found in database"), + array("eg","whois.ripe.net","No entries found"), + array("es","whois.ripe.net","No entries found"), + array("esp.br","whois.nic.br","No match"), + array("etc.br","whois.nic.br","No match"), + array("eti.br","whois.nic.br","No match"), + array("eun.eg","whois.ripe.net","No entries found"), + array("emu.id.au","whois.aunic.net","No Data Found"), + array("eng.br","whois.nic.br","No match"), + array("eu","whois.eu","Status: AVAILABLE"), + array("far.br","whois.nic.br","No match"), + array("fi","whois.ripe.net","No entries found"), + array("fj","whois.usp.ac.fj",""), + array("fj.cn","whois.cnnic.net.cn","No entries found"), + array("fm.br","whois.nic.br","No match"), + array("fnd.br","whois.nic.br","No match"), + array("fo","whois.ripe.net","no entries found"), + array("fot.br","whois.nic.br","No match"), + array("fst.br","whois.nic.br","No match"), + array("fr","whois.nic.fr","No entries found"), + array("gb","whois.ripe.net","No match for"), + array("gb.com","whois.nomination.net","No match for"), + array("gb.net","whois.nomination.net","No match for"), + array("g12.br","whois.nic.br","No match"), + array("gd.cn","whois.cnnic.net.cn","No entries found"), + array("ge","whois.ripe.net","no entries found"), + array("gen.tr","whois.nic.tr","Not found in database"), + array("ggf.br","whois.nic.br","No match"), + array("gl","whois.ripe.net","no entries found"), + array("gr","whois.ripe.net","no entries found"), + array("gr.jp","whois.nic.ad.jp","No match"), + array("gs","whois.adamsnames.tc","is not registered"), + array("gs.cn","whois.cnnic.net.cn","No entries found"), + array("gov.au","whois.aunic.net","No Data Found"), + array("gov.br","whois.nic.br","No match"), + array("gov.cn","whois.cnnic.net.cn","No entries found"), + array("gov.hk","whois.hknic.net.hk","No Match for"), + array("gov.tr","whois.nic.tr","Not found in database"), + array("gob.mx","whois.nic.mx","Nombre del Dominio"), + array("gs","whois.adamsnames.tc","is not registered"), + array("gz.cn","whois.cnnic.net.cn","No entries found"), + array("gx.cn","whois.cnnic.net.cn","No entries found"), + array("he.cn","whois.cnnic.net.cn","No entries found"), + array("ha.cn","whois.cnnic.net.cn","No entries found"), + array("hb.cn","whois.cnnic.net.cn","No entries found"), + array("hi.cn","whois.cnnic.net.cn","No entries found"), + array("hl.cn","whois.cnnic.net.cn","No entries found"), + array("hn.cn","whois.cnnic.net.cn","No entries found"), + array("hm","whois.registry.hm","(null)"), + array("hk","whois.hknic.net.hk","No Match for"), + array("hk.cn","whois.cnnic.net.cn","No entries found"), + array("hu","whois.ripe.net","MAXCHARS:500"), + array("id.au","whois.aunic.net","No Data Found"), + array("ac.id", "whois.magnet-id.com", "No match for domain"), + array("co.id", "whois.magnet-id.com", "No match for domain"), + array("net.id", "whois.magnet-id.com", "No match for domain"), + array("or.id", "whois.magnet-id.com", "No match for domain"), + array("web.id", "whois.magnet-id.com", "No match for domain"), + array("sch.id", "whois.magnet-id.com", "No match for domain"), + array("mil.id", "whois.magnet-id.com", "No match for domain"), + array("go.id", "whois.magnet-id.com", "No match for domain"), + array("ie","whois.domainregistry.ie","no match"), + array("ind.br","whois.nic.br","No match"), + array("imb.br","whois.nic.br","No match"), + array("inf.br","whois.nic.br","No match"), + array("info","whois.afilias.info","Not found"), + array("info.au","whois.aunic.net","No Data Found"), + array("info.tr","whois.nic.tr","Not found in database"), + array("it","whois.nic.it","No entries found"), + array("idv.tw","whois.twnic.net","NO MATCH TIP"), + array("in","whois.inregistry.net","NOT FOUND"), + array("int","whois.iana.org","not found"), + array("is","whois.isnic.is","No entries found"), + array("il","whois.isoc.org.il","No data was found"), + array("jl.cn","whois.cnnic.net.cn","No entries found"), + array("jor.br","whois.nic.br","No match"), + array("jp","whois.nic.ad.jp","No match"), + array("js.cn","whois.cnnic.net.cn","No entries found"), + array("jx.cn","whois.cnnic.net.cn","No entries found"), + array("k12.tr","whois.nic.tr","Not found in database"), + array("ke","whois.rg.net","No match for"), + array("kr","whois.krnic.net","is not registered"), + array("la","whois.nic.la","NO MATCH"), + array("lel.br","whois.nic.br","No match"), + array("li","whois.nic.ch","We do not have an entry"), + array("lk","whois.nic.lk","No domain registered"), + array("ln.cn","whois.cnnic.net.cn","No entries found"), + array("lt","whois.domreg.lt","Status: available"), + array("lu","whois.dns.lu","No entries found"), + array("lv","whois.ripe.net","no entries found"), + array("ltd.uk","whois.nic.uk","No match for"), + array("ma","whois.ripe.net","No entries found"), + array("mat.br","whois.nic.br","No match"), + array("mc","whois.ripe.net","No entries found"), + array("md","whois.ripe.net","No match for"), + array("me.uk","whois.nic.uk","No match for"), + array("med.br","whois.nic.br","No match"), + array("mil","whois.nic.mil","No match"), + array("mil.br","whois.nic.br","No match"), + array("mil.tr","whois.nic.tr","Not found in database"), + array("mk","whois.ripe.net","No match for"), + array("mn","whois.nic.mn","Domain not found"), + array("mobi","whois.dotmobiregistry.net","NOT FOUND"), + array("mo.cn","whois.cnnic.net.cn","No entries found"), + array("ms","whois.adamsnames.tc","is not registered"), + array("mt","whois.ripe.net","No Entries found"), + array("mus.br","whois.nic.br","No match"), + array("mx","whois.nic.mx","Nombre del Dominio"), + array("name","whois.nic.name","No match"), + array("name.tr","whois.nic.tr","Not found in database"), + array("ne.jp","whois.nic.ad.jp","No match"), + array("net","whois.crsnic.net","No match"), + array("net.au","whois.aunic.net","No Data Found"), + array("net.br","whois.nic.br","No match"), + array("net.cn","whois.cnnic.net.cn","No entries found"), + array("net.eg","whois.ripe.net","No entries found"), + array("net.hk","whois.hknic.net.hk","No Match for"), + array("net.lu","whois.dns.lu","No entries found"), + array("net.mx","whois.nic.mx","Nombre del Dominio"), + array("net.uk","whois.nic.uk","No match for "), + array("net.ru","whois.ripn.ru","No entries found"), + array("net.tr","whois.nic.tr","Not found in database"), + array("net.tw","whois.twnic.net","NO MATCH TIP"), + array("nl","whois.domain-registry.nl","is free"), + array("nm.cn","whois.cnnic.net.cn","No entries found"), + array("no","whois.norid.no","no matches"), + array("no.com","whois.nomination.net","No match for"), + array("nom.br","whois.nic.br","No match"), + array("not.br","whois.nic.br","No match"), + array("ntr.br","whois.nic.br","No match"), + array("nu","whois.nic.nu","NO MATCH for"), + array("nx.cn","whois.cnnic.net.cn","No entries found"), + array("nz","whois.domainz.net.nz","Not Listed"), + array("plc.uk","whois.nic.uk","No match for"), + array("odo.br","whois.nic.br","No match"), + array("oop.br","whois.nic.br","No match"), + array("or.jp","whois.nic.ad.jp","No match"), + array("or.at","whois.nic.at","nothing found"), + array("org","whois.pir.org","NOT FOUND"), + array("org.au","whois.aunic.net","No Data Found"), + array("org.br","whois.nic.br","No match"), + array("org.cn","whois.cnnic.net.cn","No entries found"), + array("org.hk","whois.hknic.net.hk","No Match for"), + array("org.lu","whois.dns.lu","No entries found"), + array("org.ru","whois.ripn.ru","No entries found"), + array("org.tr","whois.nic.tr","Not found in database"), + array("org.tw","whois.twnic.net","NO MATCH TIP"), + array("org.uk","whois.nic.uk","No match for"), + array("pk","whois.pknic.net","is not registered"), + array("pl","whois.ripe.net","No information about"), + array("pol.tr","whois.nic.tr","Not found in database"), + array("pp.ru","whois.ripn.ru","No entries found"), + array("ppg.br","whois.nic.br","No match"), + array("pro.br","whois.nic.br","No match"), + array("psi.br","whois.nic.br","No match"), + array("psc.br","whois.nic.br","No match"), + array("pt","whois.ripe.net","No match for"), + array("qh.cn","whois.cnnic.net.cn","No entries found"), + array("qsl.br","whois.nic.br","No match"), + array("rec.br","whois.nic.br","No match"), + array("ro","whois.ripe.net","No entries found"), + array("ru","whois.ripn.ru","No entries found"), + array("sc.cn","whois.cnnic.net.cn","No entries found"), + array("sd.cn","whois.cnnic.net.cn","No entries found"), + array("se","whois.nic-se.se","No data found"), + array("se.com","whois.nomination.net","No match for"), + array("se.net","whois.nomination.net","No match for"), + array("sg","whois.nic.net.sg","NO entry found"), + array("sh","whois.nic.sh","No match for"), + array("sh.cn","whois.cnnic.net.cn","No entries found"), + array("si","whois.arnes.si","No entries found"), + array("sk","whois.ripe.net","no entries found"), + array("slg.br","whois.nic.br","No match"), + array("sm","whois.ripe.net","no entries found"), + array("sn.cn","whois.cnnic.net.cn","No entries found"), + array("srv.br","whois.nic.br","No match"), + array("st","whois.nic.st","No entries found"), + array("su","whois.ripe.net","No entries found"), + array("sx.cn","whois.cnnic.net.cn","No entries found"), + array("tc","whois.adamsnames.tc","is not registered"), + array("tel","whois.nic.tel","Not found:"), + array("tel.tr","whois.nic.tr","Not found in database"), + array("th","whois.nic.uk","No entries found"), + array("tj.cn","whois.cnnic.net.cn","No entries found"), + array("tm","whois.nic.tm","No match for"), + array("tn","whois.ripe.net","No entries found"), + array("tmp.br","whois.nic.br","No match"), + array("to","whois.tonic.to","No match"), + // array("tr","whois.ripe.net","Not found in database"), + array("trd.br","whois.nic.br","No match"), + array("tur.br","whois.nic.br","No match"), + array("tv","whois.nic.tv","No match for "), + array("tv.br","whois.nic.br","No match"), + array("tw","whois.twnic.net","NO MATCH TIP"), + array("tw.cn","whois.cnnic.net.cn","No entries found"), + array("ua","whois.ripe.net","No entries found"), + array("uk","whois.thnic.net","No match for"), + array("uk.com","whois.nomination.net","No match for"), + array("uk.net","whois.nomination.net","No match for"), + array("us","whois.nic.us","Not found"), + array("va","whois.ripe.net","No entries found"), + array("vet.br","whois.nic.br","No match"), + array("vg","whois.adamsnames.tc","is not registered"), + array("wattle.id.au","whois.aunic.net","No Data Found"), + array("web.tr","whois.nic.tr","Not found in database"), + array("ws","whois.worldsite.ws","No match for"), + array("xj.cn","whois.cnnic.net.cn","No entries found"), + array("xz.cn","whois.cnnic.net.cn","No entries found"), + array("yn.cn","whois.cnnic.net.cn","No entries found"), + array("yu","whois.ripe.net","No entries found"), + array("za","whois.frd.ac.za","No match for"), + array("zlg.br","whois.nic.br","No match"), + array("zj.cn","whois.cnnic.net.cn","No entries found"), + ); + + return $servers; + } + + /** + * Constructor of class domain + * @param string $str_domainame the full name of the domain + * @desc Constructor of class domain + */ + public function __construct($str_domainname) + { + $this->domain=$str_domainname; + } + + /** + * Returns the whois data of the domain + * @return string $whoisdata Whois data as string + * @desc Returns the whois data of the domain + */ + public function info() + { + $tldname=$this->get_tld(); + $domainname=$this->get_domain(); + $whois_server=$this->get_whois_server(); + + // If tldname have not been found + if($whois_server == "") { + throw new Exception('No whois server for this tld in list!'); + } + + // Getting whois information + $fp = @fsockopen($whois_server,43); + + if (!$fp) { + throw new Exception('Whois server '. $whois_server .' is not available'); + } + + $dom=$domainname.".".$tldname; +// fputs($fp, "$dom\r\n"); + + // New IDN + if($tldname=="de") { + fputs($fp, "-C ISO-8859-1 -T dn $dom\r\n"); + } else { + fputs($fp, "$dom\r\n"); + } + + // Getting string + $string=""; + + // Checking whois server for .com and .net + if($tldname=="com" || $tldname=="net" || $tldname=="edu") { + while(!feof($fp)) { + $line=trim(fgets($fp,128)); + + $string.=$line; + + $lineArr=explode(":",$line); + + if(strtolower($lineArr[0])=="whois server") { + $whois_server=trim($lineArr[1]); + } + } + // Getting whois information + $fp = fsockopen($whois_server,43); + if(!is_resource($fp)) { + throw new \Box_Exception('Could not connect to whois :server server', array(':server'=>$whois_server)); + } + + $dom=$domainname.".".$tldname; + fputs($fp, "$dom\r\n"); + + // Getting string + $string=""; + + while(!feof($fp)) { + $string.=fgets($fp,128); + } + + // Checking for other tld's + } else { + while(!feof($fp)) { + $string.=fgets($fp,128); + } + } + fclose($fp); + return $string; + } + + /** + * Returns name of the whois server of the tld + * @return string $server the whois servers hostname + * @desc Returns name of the whois server of the tld + */ + private function get_whois_server() + { + $found=false; + $tldname=$this->get_tld(); + $servers = self::getServers(); + for($i=0;$idomain); + + if(count($domain)>2) { + $domainname=$domain[0]; + for($i=1;$idomain); + return $domain[0]; + } + + /** + * Returns the string which will be returned by the whois server of the tld if a domain is avalable + * @return string $notfound the string which will be returned by the whois server of the tld if a domain is avalable + * @desc Returns the string which will be returned by the whois server of the tld if a domain is avalable + */ + private function get_notfound_string() + { + $found=false; + $tldname=$this->get_tld(); + $servers = self::getServers(); + for($i=0;$iinfo(); // Gets the entire WHOIS query from registrar + $not_found_string=$this->get_notfound_string(); // Gets 3rd item from array + $domain=$this->domain; // Gets current domain being queried + + $whois_string2=@preg_replace("/$domain/","",$whois_string); + + $whois_string =@preg_replace("/\s+/"," ",$whois_string); //Replace whitespace with single space + + $array=explode(":",$not_found_string); + + if($array[0]=="MAXCHARS") { + if(strlen($whois_string2)<=$array[1]) { + return true; + }else { + return false; + } + }else { + if(preg_match("/".$not_found_string."/i",$whois_string)) { + return true; + }else { + return false; + } + } + } +} diff --git a/src/bb-library/Registrar/Adapter/Dottk.php b/src/bb-library/Registrar/Adapter/Dottk.php new file mode 100644 index 000000000..ba1d727ba --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Dottk.php @@ -0,0 +1,494 @@ + null, + 'password' => null + ); + + public function __construct($options) + { + if(isset($options['email']) && !empty($options['email'])) { + $this->config['email'] = $options['email']; + unset($options['email']); + } else { + throw new Registrar_Exception('Domain registrar "dotTK" is not configured properly. Please update configuration parameter "dotTK email" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "dotTK" is not configured properly. Please update configuration parameter "dotTK password" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on dotTK via API', + 'form' => array( + 'email' => array('text', array( + 'label' => 'dotTK email', + 'description'=>'dotTK email', + ), + ), + 'password' => array('password', array( + 'label' => 'dotTK password', + 'description'=>'dotTK password', + 'renderPassword' => true, + ), + ), + ), + ); + } + + public function getTlds() + { + return array( + '.tk', + ); + } + + public function isDomainAvailable(Registrar_Domain $domain) + { + $result = $this->domainshare_availability_check($domain->getName()); + return ($result['status'] == 'DOMAIN AVAILABLE'); + } + + public function modifyNs(Registrar_Domain $domain) + { + $nameservers = array(); + if($domain->getNs1()) { + $nameservers[] = $domain->getNs1(); + } + if($domain->getNs2()) { + $nameservers[] = $domain->getNs2(); + } + if($domain->getNs3()) { + $nameservers[] = $domain->getNs3(); + } + if($domain->getNs4()) { + $nameservers[] = $domain->getNs4(); + } + + $result = $this->domainshare_modify($domain->getName(), $nameservers); + return ($result['status'] == 'DOMAIN MODIFIED'); + } + + public function getDomainDetails(Registrar_Domain $domain) + { + $result = $this->domainshare_availability_check($domain->getName()); + + if(isset($result['nameservers'])) { + $ns = $result['nameservers']; + if(isset($ns[0]['hostname'])) { + $domain->setNs1($ns[0]['hostname']); + } + if(isset($ns[1]['hostname'])) { + $domain->setNs2($ns[1]['hostname']); + } + if(isset($ns[2]['hostname'])) { + $domain->setNs3($ns[2]['hostname']); + } + if(isset($ns[3]['hostname'])) { + $domain->setNs4($ns[3]['hostname']); + } + } + + $date = $result['expirationdate']; + $date_str = substr($date, 0, 4) . ' ' . substr($date, 4, 2) . ' '. substr($date, 6, 2); + $domain->setExpirationTime(strtotime($date_str)); + + return $domain; + } + + public function registerDomain(Registrar_Domain $domain) + { + $domainname = $domain->getName(); + $enduseremail = $domain->getContactRegistrar()->getEmail(); + $monthsofregistration = $domain->getRegistrationPeriod() * 12; + $nameservers = array(); + $nameservers[] = $domain->getNs1(); + $nameservers[] = $domain->getNs2(); + $nameservers[] = $domain->getNs3(); + $nameservers[] = $domain->getNs4(); + + $result = $this->domainshare_register($domainname, $enduseremail, $monthsofregistration, $nameservers); + return ($result['status'] == 'DOMAIN REGISTERED'); + } + + public function renewDomain(Registrar_Domain $domain) + { + $monthsofregistration = $domain->getRegistrationPeriod() * 12; + $result = $this->domainshare_renew($domain->getName(), $monthsofregistration); + return ($result['status'] == 'DOMAIN RENEWED'); + } + + public function enablePrivacyProtection(Registrar_Domain $domain) + { + throw new Registrar_Exception("dotTK does not support Privacy protection"); + } + + public function disablePrivacyProtection(Registrar_Domain $domain) + { + throw new Registrar_Exception("dotTK does not support Privacy protection"); + } + + public function getEpp(Registrar_Domain $domain) + { + throw new Registrar_Exception('dotTK does not support Epp code retrieval'); + } + + public function lock(Registrar_Domain $domain) + { + throw new Registrar_Exception('dotTK does not support Domain locking'); + } + + public function unlock(Registrar_Domain $domain) + { + throw new Registrar_Exception('dotTK does not support Domain unlocking'); + } + + public function deleteDomain(Registrar_Domain $domain) + { + throw new Registrar_Exception('Registrar does not support domain removal.'); + } + + public function modifyContact(Registrar_Domain $domain) + { + throw new Registrar_Exception("dotTK does not support whois modifications"); + } + + public function transferDomain(Registrar_Domain $domain) + { + throw new Registrar_Exception("Can't transfer domains using dotTK API."); + } + + public function isDomainCanBeTransfered(Registrar_Domain $domain) + { + throw new Registrar_Exception('DotTk domain transfer is not possible'); + } + + + + + + + + + + + + + + /* + PHP module for communicating with the DomainShare REST API. + + Please see http://www.dot.tk/en/pageH12.html for detailed argument + description and examples. + */ + private function _rest_call($call, $args = array()) + { + $base_url = "https://api.domainshare.tk/"; + $nameservers = null; + $keywords = null; + + $args['email'] = $this->config['email']; + $args['password'] = $this->config['password']; + + if (array_key_exists("nameservers", $args)) { + if($args["nameservers"] != null) { + $nameservers = $args["nameservers"]; + unset($args["nameservers"]); + } + } + + if (array_key_exists("keywords", $args)) { + if($args["keywords"] != null) { + $keywords = $args["keywords"]; + unset($args["keywords"]); + } + } + + + foreach ($args as $i => $value) { + if($value == null) + unset($args[$i]); + } + + $postdata = http_build_query($args); + + if ($nameservers) + $postdata = $postdata."&nameserver=".join("&nameserver=", $nameservers); + + if ($keywords) + $postdata = $postdata."&keyword=".join("&keyword=", $keywords); + + $opts=array("http" => array("method" => "POST", + "header" => "Content-type: application/x-www-form-urlencoded", + "content" => $postdata)); + + $res = stream_context_create($opts); + $output = file_get_contents($base_url . $call . ".json", false, $res); + $response = json_decode($output,true); + + if($this->_testMode){ + error_log("DotTk Response: " . print_r($response, 1)); + } + + if($response['status'] == 'NOT OK') { + throw new Registrar_Exception($response['reason']); + } + + return $response; + } + + /* + This function is used to check if you are able to the reach the + DomainShare API. + */ + private function domainshare_ping() + { + $result = $this->_rest_call("ping"); + + if($result["status"] == "OK") + return $result["partner_ping"]; + + else return $result; + } + + + /* + This function is used to check if a free domain name is still available + with the Dot TK Registry. This function can also be used to obtain + status information of a domain name. + + + Required arguments: email,password,domainname + */ + private function domainshare_availability_check($domainname) + { + $result = $this->_rest_call("availability_check",array("domainname" => $domainname)); + + if($result["status"] == "OK") + return $result["partner_availability_check"]; + + else return $result; + } + + + /* + This function is used to register a free domain name with the Dot TK + Registry. Only available domain names can be registered. A domain name + can be registered from 1 to 12 months. If no registration period is + provided, a default registration period of 3 months is used. + + + Required arguments: email,password,domainname,enduseremail + + nameservers OR forwardurl + */ + private function domainshare_register($domainname,$enduseremail,$monthsofregistration=null,$nameservers=null,$forwardurl=null) + { + $result = $this->_rest_call("register",array("domainname" => $domainname, "enduseremail" => $enduseremail, "monthsofregistration" => $monthsofregistration, "nameservers" => $nameservers, "forwardurl" => $forwardurl)); + + if($result["status"] == "OK") + return $result["partner_registration"]; + + else return $result; + } + + /* + DomainShare domains need to be actively renewed by the DomainShare + Partner. Renewals may only take place in the last 15 days of any + registration period. + + Required arguments: email,password,domainname + */ + private function domainshare_renew($domainname,$monthsofregistration=null) + { + $result = $this->_rest_call("renew",array("domainname" => $domainname, "monthsofregistration" => $monthsofregistration)); + + if($result["status"] == "OK") + return $result["partner_renew"]; + + else return $result; + } + + /* + Glue records are needed for domains that are configured to use DNS + and where the name servers are in the same DNS zone. Example: if you + register TEST0112.TK and if you want to use name servers within that + same DNS zone, like NS1.TEST0112.TK and NS2.TEST0112.TK, then you + need to add NS1.TEST0112.TK and NS2.TEST0112.TK as glue records to + prevent circular dependency. + + This function adds or modifies glue records. If the glue record + relates to a domain name that is in the DomainShare partner's portfolio + and if it has not been registered before, it will be added to the + database of the Dot TK Registry. If it has been registered before + by the DomainShare Partner the record will be modified with the new + IP address. + + Required arguments: email,password,hostname,ipaddress + */ + private function domainshare_host_registration($hostname,$ipaddress) + { + $result = $this->_rest_call("host_registration",array("hostname" => $hostname, "ipaddress" => $ipaddress)); + + if($result["status"] == "OK") + return $result["partner_host_registration"]; + + else return $result; + } + + /* + Glue records are needed for domains that are configured to use DNS + and where the name servers are in the same DNS zone. With this + function you can remove existing glue records. + + Required arguments: email,password,hostname + */ + private function domainshare_host_removal($hostname) + { + $result = $this->_rest_call("host_removal",array("hostname" => $hostname)); + + if($result["status"] == "OK") + return $result["partner_host_removal"]; + + else return $result; + } + + /* + Glue records are needed for domains that are configured to use DNS and + where the name servers are in the same DNS zone. With this function you can + list existing glue records of a domain name. + + Required arguments: email,password,domainname + */ + private function domainshare_host_list($domainname) + { + $result = $this->_rest_call("host_list",array("domainname" => $domainname)); + + if($result["status"] == "OK") + return $result["partner_host_list"]; + + else return $result; + } + + + /* + This function is used to modify the settings of a domain name. It's + possible to change the name servers or the forwarding URL. Please + note that it can take up to 30 minutes before every DNS in the + world is updated with the new information. Any modification of + a domain will remove any old settings for this domain. + + Required arguments: email,password,domainname + + nameservers OR forwardurl + */ + private function domainshare_modify($domainname,$nameservers=null,$forwardurl=null) + { + $result = $this->_rest_call("modify",array("domainname" => $domainname, "nameservers" => $nameservers, "forwardurl" => $forwardurl)); + + if($result["status"] == "OK") + return $result["partner_modify"]; + + else return $result; + } + + /* + DomainShare Partners are registering domain names for others (endusers). + Endusers need to confirm their email address with Dot TK before a + domain is fully authorized. During initial domain name registration + this confirmation email is sent to the enduser. This function is + resending the confirmation email. It can be used in case the enduser + has not received the Dot TK confirmation email. When this function is + used for domains that are already confirmed, an email with the enduser + Dot TK Registration ID is sent. + + Required arguments: email,password,domainname + */ + private function domainshare_resend_email($domainname,$enduseremail=null) + { + $result = $this->_rest_call("resend_email",array("domainname" => $domainname, "enduseremail" => $enduseremail)); + + if($result["status"] == "OK") + return $result["partner_resend_email"]; + + else return $result; + } + + /* + DomainShare Partners can opt to deactivate domain names at any time. + Deactivation of a domain name can only take place if a valid + reason is provided. + + Valid reasons are: + adult, adult_gay, drugs, violence, gambling, only_ads, does_not_exist, + virus_spyware, weapons + + Please see http://www.dot.tk/en/pageH12.html for further info. + + Required arguments: email,password,domainname,reason + */ + private function domainshare_domain_deactivate($domainname,$reason) + { + $result = $this->_rest_call("domain_deactivate",array("domainname" => $domainname, "reason" => $reason)); + + if($result["status"] == "OK") + return $result["partner_domain_deactivate"]; + + else return $result; + } + + + /* + DomainShare Partners can opt to reactivate a previously deactivated + domain. There are two requirements to reactivate domains. Both + requirements should be met to successfully reactivate a domain name. + The first requirement is that reactivation can only be done if the + domain was deactivated because it had a reason value of does_not_exist. + The second requirement is that only domain names that have been + deactivated less than 15 days ago can be reactivated. + + The reactivation function is mostly used if the DomainShare Partner + made a honest mistake in deactivating a domain name. + + Required arguments: email,password,domainname + */ + private function domainshare_domain_reactivate($domainname) + { + $result = $this->_rest_call("domain_reactivate",array("domainname" => $domainname)); + + if($result["status"] == "OK") + return $result["partner_domain_reactivate"]; + + else return $result; + } + + /* + This function allows DomainShare Partners to increase their revenue on + domain names that show a parking page with advertisements. The + DomainShare Partner is able to set a category of the domain and one + or more keywords. The Dot TK Registry and its advertising partners + do take the suggestions of the DomainShare Partner seriously when + deciding on what subjects advertisements should be displayed. + However, it is in Dot TK's sole discretion to display any + advertisements based on different categories or keywords. + + Required arguments: email,password,domainname + + category OR keywords OR both + */ + private function domainshare_update_parking($domainname,$category=null,$keywords=null) + { + $result = $this->_rest_call("update_parking",array("domainname" => $domainname, "category" => $category, "keywords" => $keywords)); + + if($result["status"] == "OK") + return $result["partner_update_parking"]; + + else return $result; + } + +} + diff --git a/src/bb-library/Registrar/Adapter/Email.php b/src/bb-library/Registrar/Adapter/Email.php new file mode 100644 index 000000000..96d2201a9 --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Email.php @@ -0,0 +1,722 @@ +config['email'] = $options['email']; + unset($options['email']); + } else { + throw new Registrar_Exception('Email Registrar config requires param "email"'); + } + + if(isset($options['use_whois'])) { + $this->config['use_whois'] = (bool)$options['use_whois']; + } else { + $this->config['use_whois'] = false; + } + + $this->config['from'] = $this->config['email']; + } + + public static function getConfig() + { + return array( + 'label' => 'This registrar type sends notifications to the given email about domain management events. For example, when client registers a new domain an email with domain details will be sent to you. It is then your responsibility to register domain on real registrar.', + 'form' => array( + 'email' => array('text', array( + 'label' => 'Email address', + 'description'=>'Email to send domain change notifications' + ), + ), + 'use_whois' => array('radio', array( + 'multiOptions' => array('1'=>'Yes', '0'=>'No'), + 'label' => 'Use WHOIS to check for domain availability', + ), + ), + ), + ); + } + + public function getTlds() + { + return array(); + } + + public function isDomainAvailable(Registrar_Domain $domain) + { + $this->getLog()->debug('Checking domain availability: ' . $domain->getName()); + + if($this->config['use_whois']) { + $w = new Whois2($domain->getName()); + return $w->isAvailable(); + } + throw new Registrar_Exception('Email registrar can not determine wheather domain is available'); + } + + public function isDomainCanBeTransfered(Registrar_Domain $domain) + { + throw new Registrar_Exception('Email registrar can not determine wheather domain can be transferred'); + } + + public function modifyNs(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Modify Name Servers'; + $params['content'] = 'A request to change domain nameservers has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function transferDomain(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Transfer domain'; + $params['content'] = 'A request to transfer domain has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function getDomainDetails(Registrar_Domain $domain) + { + return $domain; + } + + public function deleteDomain(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Delete domain'; + $params['content'] = 'A request to delete domain has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function registerDomain(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Register domain'; + $params['content'] = 'A request to register domain has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function renewDomain(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Renew domain'; + $params['content'] = 'A request to renew domain has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function modifyContact(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Modify Domain Contact'; + $params['content'] = 'A request to update domain contacts details has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function enablePrivacyProtection(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Turn On Domain privacy protection'; + $params['content'] = 'A request to change domain privacy protection has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function disablePrivacyProtection(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Turn Off Domain privacy protection'; + $params['content'] = 'A request to change domain privacy protection has been received.'; + + return $this->sendEmail($domain, $params); + } + + public function getEpp(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Request for Epp code was received'; + $params['content'] = 'A request for Domain Transfer code was received.'; + + return $this->sendEmail($domain, $params); + } + + public function lock(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Request to lock domain received'; + $params['content'] = 'A request to lock domain was received.'; + + return $this->sendEmail($domain, $params); + } + + public function unlock(Registrar_Domain $domain) + { + $params =array(); + $params['subject'] = 'Request to unlock domain received'; + $params['content'] = 'A request to unlock domain was received.'; + + return $this->sendEmail($domain, $params); + } + + private function sendEmail(Registrar_Domain $domain, array $params) + { + $c = $params['content']; + $c .= PHP_EOL; + $c .= PHP_EOL; + $c .= 'Domain should be configured as follows:'; + $c .= PHP_EOL; + $c .= PHP_EOL; + $c .= $domain->__toString(); + + $log = $this->getLog(); + if($this->_testMode) { + $log->alert($params['subject'].PHP_EOL.PHP_EOL.$c); + return true; + } + + mail($this->config['email'], $params['subject'], $c); + $log->info("Email sent: ".$params['subject']); + return true; + } +} + +class Whois2 { + + public $domain=""; + protected $idn=array(224,225,226,227,228,229,230,231,232,233,234,235,240,236,237,238,239,241,242,243,244,245,246,248,254,249,250,251,252,253,255); + // var $idn=array("00E0","00E1","00E2","00E3","00E4","00E5","0101","0103","0105","00E6","00E7","0107","0109","010B","010D","010F","0111","00E8","00E9","00EA","00EB","0113","0115","0117","0119","011B","014B","00F0","011D","011F","0121","0123","0125","0127","00EC","00ED","00EE","00EF","0129","012B","012D","012F","0131","0135","0137","0138","013A","013C","013E","0142","00F1","0144","0146","0148","00F2","00F3","00F4","00F5","00F6","00F8","014D","014F","0151","0153","0155","0157","0159","015B","015D","015F","0161","0163","0165","0167","00FE","00F9","00FA","00FB","00FC","0169","016B","016D","016F","0171","0173","0175","00FD","00FF","0177","017A","017C","017E"); + + public static function getServers() + { + /******************************* + * Initializing server variables + * array(top level domain,whois_Server,not_found_string or MAX number of CHARS: MAXCHARS:n) + **/ + $servers=array( + array("ac","whois.nic.ac","Available"), + array("ac.cn","whois.cnnic.net.cn","no matching record"), + array("ac.jp","whois.nic.ad.jp","No match"), + array("ac.uk","whois.ja.net","No such domain"), + array("ad.jp","whois.nic.ad.jp","No match"), + array("adm.br","whois.nic.br","No match"), + array("adv.br","whois.nic.br","No match"), + array("aero","whois.information.aero","is available"), + array("ag","whois.nic.ag","Not found"), + array("agr.br","whois.nic.br","No match"), + array("ah.cn","whois.cnnic.net.cn","No entries found"), + array("al","whois.ripe.net","No entries found"), + array("am","whois.amnic.net","No match"), + array("am.br","whois.nic.br","No match"), + array("arq.br","whois.nic.br","No match"), + array("at","whois.nic.at","nothing found"), + array("au","whois.aunic.net","No Data Found"), + array("art.br","whois.nic.br","No match"), + array("as","whois.nic.as","Domain Not Found"), + array("asia","whois.nic.asia","NOT FOUND"), + array("asn.au","whois.aunic.net","No Data Found"), + array("ato.br","whois.nic.br","No match"), + array("av.tr","whois.nic.tr","Not found in database"), + array("az","whois.ripe.net","no entries found"), + array("ba","whois.ripe.net","No match for"), + array("be","whois.geektools.com","FREE"), + array("bg","whois.digsys.bg","does not exist"), + array("bio.br","whois.nic.br","No match"), + array("biz","whois.biz","Not found"), + array("biz.tr","whois.nic.tr","Not found in database"), + array("bj.cn","whois.cnnic.net.cn","No entries found"), + array("bel.tr","whois.nic.tr","Not found in database"), + array("bmd.br","whois.nic.br","No match"), + array("br","whois.registro.br","No match"), + array("by","whois.ripe.net","no entries found"), + array("ca","whois.cira.ca","Status: AVAIL"), + array("cc","whois.nic.cc","No match"), + array("cd","whois.cd","No match"), + array("ch","whois.nic.ch","We do not have an entry"), + array("cim.br","whois.nic.br","No match"), + array("ck","whois.ck-nic.org.ck","No entries found"), + array("cl","whois.nic.cl","no existe"), + array("cn","whois.cnnic.net.cn","No entries found"), + array("cng.br","whois.nic.br","No match"), + array("cnt.br","whois.nic.br","No match"), + array("com","whois.crsnic.net","No match"), + array("com.au","whois.aunic.net","No Data Found"), + array("com.br","whois.nic.br","No match"), + array("com.cn","whois.cnnic.net.cn","No entries found"), + array("com.eg","whois.ripe.net","No entries found"), + array("com.hk","whois.hknic.net.hk","No Match for"), + array("com.mx","whois.nic.mx","Nombre del Dominio"), + array("com.tr","whois.nic.tr","Not found in database"), + array("com.ru","whois.ripn.ru","No entries found"), + array("com.tw","whois.twnic.net","NO MATCH TIP"), + array("conf.au","whois.aunic.net","No entries found"), + array("co.at","whois.nic.at","nothing found"), + array("co.jp","whois.nic.ad.jp","No match"), + array("co.uk","whois.nic.uk","No match for"), + array("co.in","whois.iisc.ernet.in","No match for"), + array("co.za","whois.coza.net.za","Available"), + array("cq.cn","whois.cnnic.net.cn","No entries found"), + array("csiro.au","whois.aunic.net","No Data Found"), + array("cx","whois.nic.cx","No match"), + array("cy","whois.ripe.net","no entries found"), + array("cz","whois.nic.cz","No data found"), + array("de","whois.denic.de","not found"), + array("dr.tr","whois.nic.tr","Not found in database"), + array("dk","whois.dk-hostmaster.dk","No entries found"), + array("dz","whois.ripe.net","no entries found"), + array("ecn.br","whois.nic.br","No match"), + array("ee","whois.eenet.ee","NOT FOUND"), + // array("edu","whois.verisign-grs.net","No match"), + array("edu","whois.crsnic.net","No match"), + array("edu.au","whois.aunic.net","No Data Found"), + array("edu.br","whois.nic.br","No match"), + array("edu.tr","whois.nic.tr","Not found in database"), + array("eg","whois.ripe.net","No entries found"), + array("es","whois.ripe.net","No entries found"), + array("esp.br","whois.nic.br","No match"), + array("etc.br","whois.nic.br","No match"), + array("eti.br","whois.nic.br","No match"), + array("eun.eg","whois.ripe.net","No entries found"), + array("emu.id.au","whois.aunic.net","No Data Found"), + array("eng.br","whois.nic.br","No match"), + array("eu","whois.eu","Status: AVAILABLE"), + array("far.br","whois.nic.br","No match"), + array("fi","whois.ripe.net","No entries found"), + array("fj","whois.usp.ac.fj",""), + array("fj.cn","whois.cnnic.net.cn","No entries found"), + array("fm.br","whois.nic.br","No match"), + array("fnd.br","whois.nic.br","No match"), + array("fo","whois.ripe.net","no entries found"), + array("fot.br","whois.nic.br","No match"), + array("fst.br","whois.nic.br","No match"), + array("fr","whois.nic.fr","No entries found"), + array("gb","whois.ripe.net","No match for"), + array("gb.com","whois.nomination.net","No match for"), + array("gb.net","whois.nomination.net","No match for"), + array("g12.br","whois.nic.br","No match"), + array("gd.cn","whois.cnnic.net.cn","No entries found"), + array("ge","whois.ripe.net","no entries found"), + array("gen.tr","whois.nic.tr","Not found in database"), + array("ggf.br","whois.nic.br","No match"), + array("gl","whois.ripe.net","no entries found"), + array("gr","whois.ripe.net","no entries found"), + array("gr.jp","whois.nic.ad.jp","No match"), + array("gs","whois.adamsnames.tc","is not registered"), + array("gs.cn","whois.cnnic.net.cn","No entries found"), + array("gov.au","whois.aunic.net","No Data Found"), + array("gov.br","whois.nic.br","No match"), + array("gov.cn","whois.cnnic.net.cn","No entries found"), + array("gov.hk","whois.hknic.net.hk","No Match for"), + array("gov.tr","whois.nic.tr","Not found in database"), + array("gob.mx","whois.nic.mx","Nombre del Dominio"), + array("gs","whois.adamsnames.tc","is not registered"), + array("gz.cn","whois.cnnic.net.cn","No entries found"), + array("gx.cn","whois.cnnic.net.cn","No entries found"), + array("he.cn","whois.cnnic.net.cn","No entries found"), + array("ha.cn","whois.cnnic.net.cn","No entries found"), + array("hb.cn","whois.cnnic.net.cn","No entries found"), + array("hi.cn","whois.cnnic.net.cn","No entries found"), + array("hl.cn","whois.cnnic.net.cn","No entries found"), + array("hn.cn","whois.cnnic.net.cn","No entries found"), + array("hm","whois.registry.hm","(null)"), + array("hk","whois.hknic.net.hk","No Match for"), + array("hk.cn","whois.cnnic.net.cn","No entries found"), + array("hu","whois.ripe.net","MAXCHARS:500"), + array("id.au","whois.aunic.net","No Data Found"), + array("ac.id", "whois.magnet-id.com", "No match for domain"), + array("co.id", "whois.magnet-id.com", "No match for domain"), + array("net.id", "whois.magnet-id.com", "No match for domain"), + array("or.id", "whois.magnet-id.com", "No match for domain"), + array("web.id", "whois.magnet-id.com", "No match for domain"), + array("sch.id", "whois.magnet-id.com", "No match for domain"), + array("mil.id", "whois.magnet-id.com", "No match for domain"), + array("go.id", "whois.magnet-id.com", "No match for domain"), + array("ie","whois.domainregistry.ie","no match"), + array("ind.br","whois.nic.br","No match"), + array("imb.br","whois.nic.br","No match"), + array("inf.br","whois.nic.br","No match"), + array("info","whois.afilias.info","Not found"), + array("info.au","whois.aunic.net","No Data Found"), + array("info.tr","whois.nic.tr","Not found in database"), + array("it","whois.nic.it","No entries found"), + array("idv.tw","whois.twnic.net","NO MATCH TIP"), + array("in","whois.inregistry.net","NOT FOUND"), + array("int","whois.iana.org","not found"), + array("is","whois.isnic.is","No entries found"), + array("il","whois.isoc.org.il","No data was found"), + array("jl.cn","whois.cnnic.net.cn","No entries found"), + array("jor.br","whois.nic.br","No match"), + array("jp","whois.nic.ad.jp","No match"), + array("js.cn","whois.cnnic.net.cn","No entries found"), + array("jx.cn","whois.cnnic.net.cn","No entries found"), + array("k12.tr","whois.nic.tr","Not found in database"), + array("ke","whois.rg.net","No match for"), + array("kr","whois.krnic.net","is not registered"), + array("la","whois.nic.la","NO MATCH"), + array("lel.br","whois.nic.br","No match"), + array("li","whois.nic.ch","We do not have an entry"), + array("lk","whois.nic.lk","No domain registered"), + array("ln.cn","whois.cnnic.net.cn","No entries found"), + array("lt","whois.domreg.lt","Status: available"), + array("lu","whois.dns.lu","No entries found"), + array("lv","whois.ripe.net","no entries found"), + array("ltd.uk","whois.nic.uk","No match for"), + array("ma","whois.ripe.net","No entries found"), + array("mat.br","whois.nic.br","No match"), + array("mc","whois.ripe.net","No entries found"), + array("md","whois.ripe.net","No match for"), + array("me.uk","whois.nic.uk","No match for"), + array("med.br","whois.nic.br","No match"), + array("mil","whois.nic.mil","No match"), + array("mil.br","whois.nic.br","No match"), + array("mil.tr","whois.nic.tr","Not found in database"), + array("mk","whois.ripe.net","No match for"), + array("mn","whois.nic.mn","Domain not found"), + array("mobi","whois.dotmobiregistry.net","NOT FOUND"), + array("mo.cn","whois.cnnic.net.cn","No entries found"), + array("ms","whois.adamsnames.tc","is not registered"), + array("mt","whois.ripe.net","No Entries found"), + array("mus.br","whois.nic.br","No match"), + array("mx","whois.nic.mx","Nombre del Dominio"), + array("name","whois.nic.name","No match"), + array("name.tr","whois.nic.tr","Not found in database"), + array("ne.jp","whois.nic.ad.jp","No match"), + array("net","whois.crsnic.net","No match"), + array("net.au","whois.aunic.net","No Data Found"), + array("net.br","whois.nic.br","No match"), + array("net.cn","whois.cnnic.net.cn","No entries found"), + array("net.eg","whois.ripe.net","No entries found"), + array("net.hk","whois.hknic.net.hk","No Match for"), + array("net.lu","whois.dns.lu","No entries found"), + array("net.mx","whois.nic.mx","Nombre del Dominio"), + array("net.uk","whois.nic.uk","No match for "), + array("net.ru","whois.ripn.ru","No entries found"), + array("net.tr","whois.nic.tr","Not found in database"), + array("net.tw","whois.twnic.net","NO MATCH TIP"), + array("nl","whois.domain-registry.nl","is free"), + array("nm.cn","whois.cnnic.net.cn","No entries found"), + array("no","whois.norid.no","no matches"), + array("no.com","whois.nomination.net","No match for"), + array("nom.br","whois.nic.br","No match"), + array("not.br","whois.nic.br","No match"), + array("ntr.br","whois.nic.br","No match"), + array("nu","whois.nic.nu","NO MATCH for"), + array("nx.cn","whois.cnnic.net.cn","No entries found"), + array("nz","whois.domainz.net.nz","Not Listed"), + array("plc.uk","whois.nic.uk","No match for"), + array("odo.br","whois.nic.br","No match"), + array("oop.br","whois.nic.br","No match"), + array("or.jp","whois.nic.ad.jp","No match"), + array("or.at","whois.nic.at","nothing found"), + array("org","whois.pir.org","NOT FOUND"), + array("org.au","whois.aunic.net","No Data Found"), + array("org.br","whois.nic.br","No match"), + array("org.cn","whois.cnnic.net.cn","No entries found"), + array("org.hk","whois.hknic.net.hk","No Match for"), + array("org.lu","whois.dns.lu","No entries found"), + array("org.ru","whois.ripn.ru","No entries found"), + array("org.tr","whois.nic.tr","Not found in database"), + array("org.tw","whois.twnic.net","NO MATCH TIP"), + array("org.uk","whois.nic.uk","No match for"), + array("pk","whois.pknic.net","is not registered"), + array("pl","whois.ripe.net","No information about"), + array("pol.tr","whois.nic.tr","Not found in database"), + array("pp.ru","whois.ripn.ru","No entries found"), + array("ppg.br","whois.nic.br","No match"), + array("pro.br","whois.nic.br","No match"), + array("psi.br","whois.nic.br","No match"), + array("psc.br","whois.nic.br","No match"), + array("pt","whois.ripe.net","No match for"), + array("qh.cn","whois.cnnic.net.cn","No entries found"), + array("qsl.br","whois.nic.br","No match"), + array("rec.br","whois.nic.br","No match"), + array("ro","whois.ripe.net","No entries found"), + array("ru","whois.ripn.ru","No entries found"), + array("sc.cn","whois.cnnic.net.cn","No entries found"), + array("sd.cn","whois.cnnic.net.cn","No entries found"), + array("se","whois.nic-se.se","No data found"), + array("se.com","whois.nomination.net","No match for"), + array("se.net","whois.nomination.net","No match for"), + array("sg","whois.nic.net.sg","NO entry found"), + array("sh","whois.nic.sh","No match for"), + array("sh.cn","whois.cnnic.net.cn","No entries found"), + array("si","whois.arnes.si","No entries found"), + array("sk","whois.ripe.net","no entries found"), + array("slg.br","whois.nic.br","No match"), + array("sm","whois.ripe.net","no entries found"), + array("sn.cn","whois.cnnic.net.cn","No entries found"), + array("srv.br","whois.nic.br","No match"), + array("st","whois.nic.st","No entries found"), + array("su","whois.ripe.net","No entries found"), + array("sx.cn","whois.cnnic.net.cn","No entries found"), + array("tc","whois.adamsnames.tc","is not registered"), + array("tel","whois.nic.tel","Not found:"), + array("tel.tr","whois.nic.tr","Not found in database"), + array("th","whois.nic.uk","No entries found"), + array("tj.cn","whois.cnnic.net.cn","No entries found"), + array("tm","whois.nic.tm","No match for"), + array("tn","whois.ripe.net","No entries found"), + array("tmp.br","whois.nic.br","No match"), + array("to","whois.tonic.to","No match"), + // array("tr","whois.ripe.net","Not found in database"), + array("trd.br","whois.nic.br","No match"), + array("tur.br","whois.nic.br","No match"), + array("tv","whois.nic.tv","No match for "), + array("tv.br","whois.nic.br","No match"), + array("tw","whois.twnic.net","NO MATCH TIP"), + array("tw.cn","whois.cnnic.net.cn","No entries found"), + array("ua","whois.ripe.net","No entries found"), + array("uk","whois.thnic.net","No match for"), + array("uk.com","whois.nomination.net","No match for"), + array("uk.net","whois.nomination.net","No match for"), + array("us","whois.nic.us","Not found"), + array("va","whois.ripe.net","No entries found"), + array("vet.br","whois.nic.br","No match"), + array("vg","whois.adamsnames.tc","is not registered"), + array("wattle.id.au","whois.aunic.net","No Data Found"), + array("web.tr","whois.nic.tr","Not found in database"), + array("ws","whois.worldsite.ws","No match for"), + array("xj.cn","whois.cnnic.net.cn","No entries found"), + array("xz.cn","whois.cnnic.net.cn","No entries found"), + array("yn.cn","whois.cnnic.net.cn","No entries found"), + array("yu","whois.ripe.net","No entries found"), + array("za","whois.frd.ac.za","No match for"), + array("zlg.br","whois.nic.br","No match"), + array("zj.cn","whois.cnnic.net.cn","No entries found"), + ); + + return $servers; + } + + /** + * Constructor of class domain + * @param string $str_domainame the full name of the domain + * @desc Constructor of class domain + */ + public function __construct($str_domainname) + { + $this->domain=$str_domainname; + } + + /** + * Returns the whois data of the domain + * @return string $whoisdata Whois data as string + * @desc Returns the whois data of the domain + */ + public function info() + { + $tldname=$this->get_tld(); + $domainname=$this->get_domain(); + $whois_server=$this->get_whois_server(); + + // If tldname have not been found + if($whois_server == "") { + throw new Exception('No whois server for this tld in list!'); + } + + // Getting whois information + $fp = @fsockopen($whois_server,43); + + if (!$fp) { + throw new Exception('Whois server '. $whois_server .' is not available'); + } + + $dom=$domainname.".".$tldname; +// fputs($fp, "$dom\r\n"); + + // New IDN + if($tldname=="de") { + fputs($fp, "-C ISO-8859-1 -T dn $dom\r\n"); + } else { + fputs($fp, "$dom\r\n"); + } + + // Getting string + $string=""; + + // Checking whois server for .com and .net + if($tldname=="com" || $tldname=="net" || $tldname=="edu") { + while(!feof($fp)) { + $line=trim(fgets($fp,128)); + + $string.=$line; + + $lineArr=explode(":",$line); + + if(strtolower($lineArr[0])=="whois server") { + $whois_server=trim($lineArr[1]); + } + } + // Getting whois information + $fp = fsockopen($whois_server,43); + if(!is_resource($fp)) { + throw new \Box_Exception('Could not connect to whois :server server', array(':server'=>$whois_server)); + } + + $dom=$domainname.".".$tldname; + fputs($fp, "$dom\r\n"); + + // Getting string + $string=""; + + while(!feof($fp)) { + $string.=fgets($fp,128); + } + + // Checking for other tld's + } else { + while(!feof($fp)) { + $string.=fgets($fp,128); + } + } + fclose($fp); + return $string; + } + + /** + * Returns name of the whois server of the tld + * @return string $server the whois servers hostname + * @desc Returns name of the whois server of the tld + */ + private function get_whois_server() + { + $found=false; + $tldname=$this->get_tld(); + $servers = self::getServers(); + for($i=0;$idomain); + + if(count($domain)>2) { + $domainname=$domain[0]; + for($i=1;$idomain); + return $domain[0]; + } + + /** + * Returns the string which will be returned by the whois server of the tld if a domain is avalable + * @return string $notfound the string which will be returned by the whois server of the tld if a domain is avalable + * @desc Returns the string which will be returned by the whois server of the tld if a domain is avalable + */ + private function get_notfound_string() + { + $found=false; + $tldname=$this->get_tld(); + $servers = self::getServers(); + for($i=0;$iinfo(); // Gets the entire WHOIS query from registrar + $not_found_string=$this->get_notfound_string(); // Gets 3rd item from array + $domain=$this->domain; // Gets current domain being queried + + $whois_string2=@preg_replace("/$domain/","",$whois_string); + + $whois_string =@preg_replace("/\s+/"," ",$whois_string); //Replace whitespace with single space + + $array=explode(":",$not_found_string); + + if($array[0]=="MAXCHARS") { + if(strlen($whois_string2)<=$array[1]) { + return true; + }else { + return false; + } + }else { + if(preg_match("/".$not_found_string."/i",$whois_string)) { + return true; + }else { + return false; + } + } + } +} diff --git a/src/bb-library/Registrar/Adapter/Internetbs.php b/src/bb-library/Registrar/Adapter/Internetbs.php new file mode 100644 index 000000000..0a966bd9a --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Internetbs.php @@ -0,0 +1,490 @@ + null, + 'password' => null + ); + + public function __construct($options) + { + if (!extension_loaded('curl')) { + throw new Registrar_Exception('CURL extension is not enabled'); + } + + if(isset($options['apikey']) && !empty($options['apikey'])) { + $this->config['apikey'] = $options['apikey']; + unset($options['apikey']); + } else { + throw new Registrar_Exception('Domain registrar "Internetbs" is not configured properly. Please update configuration parameter "Internetbs API key" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "Internetbs" is not configured properly. Please update configuration parameter "Internetbs API password" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on Internetbs via API', + 'form' => array( + 'apikey' => array('text', array( + 'label' => 'Internetbs API key', + 'description'=>'Internetbs API key', + ), + ), + 'password' => array('password', array( + 'label' => 'Internetbs API password', + 'description'=>'Internetbs API password', + 'renderPassword' => true, + ), + ), + ), + ); + } + + public function getTlds() + { + return array( + '.co', '.com', '.net', '.eu', + '.org', '.it', '.fr', '.info', + '.tel', '.us', '.biz', '.co.uk', + '.in', '.mobi', '.asia', '.tv', + '.re', '.be', '.cc', '.com.fr', + '.com.re', '.org.uk', '.me.uk', '.com.co', + '.net.co', '.nom.co', '.co.in', '.net.in', + '.org.in', '.firm.in', '.gen.in', '.ind.in', + ); + } + + public function isDomainAvailable(Registrar_Domain $domain) + { + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process('/Domain/Check', $params); + + return ($result['status'] == 'AVAILABLE'); + } + + public function isDomainCanBeTransfered(Registrar_Domain $domain) + { + throw new Registrar_Exception('Domain transfer checking is not implemented'); + } + + public function modifyNs(Registrar_Domain $domain) + { + $params = array( + 'domain' => $domain->getName() + ); + + $nsList = array(); + $nsList[] = $domain->getNs1(); + $nsList[] = $domain->getNs2(); + $nsList[] = $domain->getNs3(); + $nsList[] = $domain->getNs4(); + + $params['ns_list'] = implode(',', $nsList); + + $result = $this->_process('/Domain/Update', $params); + + return ($result['status'] == 'SUCCESS'); + } + + public function modifyContact(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + + $params = array( + 'domain' => $domain->getName() + ); + + // Set contact data + foreach (array('Registrant', 'Admin', 'Technical', 'Billing') as $contactType) + { + $params[$contactType. '_Organization'] = $c->getCompany(); + $params[$contactType. '_FirstName'] = $c->getFirstName(); + $params[$contactType. '_LastName'] = $c->getLastName(); + $params[$contactType. '_Email'] = $c->getEmail(); + $params[$contactType. '_PhoneNumber'] = '+' . $c->getTelCc() . '.' . $c->getTel(); + $params[$contactType. '_Street'] = $c->getAddress1(); + $params[$contactType. '_Street2'] = $c->getAddress2(); + $params[$contactType. '_Street3'] = $c->getAddress3(); + $params[$contactType. '_City'] = $c->getCity(); + $params[$contactType. '_CountryCode'] = $c->getCountry(); + $params[$contactType. '_PostalCode'] = $c->getZip(); + $params[$contactType. '_Language'] = 'en'; + } + + $result = $this->_process('/Domain/Update', $params); + + return ($result['status'] == 'SUCCESS'); + } + + public function transferDomain(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + + $params = array( + 'domain' => $domain->getName() + ); + + // Set contact data + foreach (array('Registrant', 'Admin', 'Technical', 'Billing') as $contactType) + { + $params[$contactType. '_Organization'] = $c->getCompany(); + $params[$contactType. '_FirstName'] = $c->getFirstName(); + $params[$contactType. '_LastName'] = $c->getLastName(); + $params[$contactType. '_Email'] = $c->getEmail(); + $params[$contactType. '_PhoneNumber'] = '+' . $c->getTelCc() . '.' . $c->getTel(); + $params[$contactType. '_Street'] = $c->getAddress1(); + $params[$contactType. '_Street2'] = $c->getAddress2(); + $params[$contactType. '_Street3'] = $c->getAddress3(); + $params[$contactType. '_City'] = $c->getCity(); + $params[$contactType. '_CountryCode'] = $c->getCountry(); + $params[$contactType. '_PostalCode'] = $c->getZip(); + $params[$contactType. '_Language'] = 'en'; + } + + $result = $this->_process('/Domain/Transfer/Initiate', $params); + + return ($result['status'] == 'SUCCESS'); + } + + public function getDomainDetails(Registrar_Domain $domain) + { + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process('/Domain/Info', $params); + + if ($result['status'] == 'SUCCESS') + return $this->_createDomainObj($result, $domain); + } + + public function deleteDomain(Registrar_Domain $domain) + { + throw new Registrar_Exception('Registrar does not support domain removal.'); + } + + public function registerDomain(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + + $params = array( + 'domain' => $domain->getName(), + 'period' => $domain->getRegistrationPeriod() . 'Y' + ); + + // Add nameservers + $nsList = array(); + $nsList[] = $domain->getNs1(); + $nsList[] = $domain->getNs2(); + if($domain->getNs3()) { + $nsList[] = $domain->getNs3(); + } + if($domain->getNs4()) { + $nsList[] = $domain->getNs4(); + } + $params['ns_list'] = implode(',', $nsList); + + // Set contact data + foreach (array('Registrant', 'Admin', 'Technical', 'Billing') as $contactType) + { + $params[$contactType . '_Organization'] = $c->getCompany(); + $params[$contactType . '_FirstName'] = $c->getFirstName(); + $params[$contactType . '_LastName'] = $c->getLastName(); + $params[$contactType . '_Email'] = $c->getEmail(); + $params[$contactType . '_PhoneNumber'] = '+' . $c->getTelCc() . '.' . $c->getTel(); + $params[$contactType . '_Street'] = $c->getAddress1(); + $params[$contactType . '_Street2'] = $c->getAddress2(); + $params[$contactType . '_Street3'] = $c->getAddress3(); + $params[$contactType . '_City'] = $c->getCity(); + $params[$contactType . '_CountryCode'] = $c->getCountry(); + $params[$contactType . '_PostalCode'] = $c->getZip(); + $params[$contactType . '_Language'] = 'en'; + } + + if ($domain->getTld() == '.asia') + { + $params['Registrant_DotAsiaCedLocality'] = $c->getCountry(); + $params['Registrant_DotAsiaCedEntity'] = 'naturalPerson'; + $params['Registrant_DotAsiaCedIdForm'] = 'passport'; + } + + if ($domain->getTld() == '.fr' || $domain->getTld() == '.re') + { + $tm = rand(100000000, 999999999); + $params['registrant_dotFRContactEntityType'] = 'OTHER'; + $params['admin_dotFRContactEntityType'] = 'OTHER'; + $params['registrant_dotFRContactEntityName'] = $c->getName(); + $params['admin_dotFRContactEntityName'] = $c->getName(); + $params['registrant_dotFROtherContactEntity'] = $c->getName(); + $params['admin_dotFROtherContactEntity'] = $c->getName(); + $params['registrant_dotFRContactEntityTrademark'] = $tm; + $params['admin_dotFRContactEntityTrademark'] = $tm; + } + + if ($domain->getTld() == '.it') + { + $params['Registrant_dotitEntityType'] = 1; + $params['Registrant_dotitNationality'] = $c->getCountry(); + $params['Registrant_dotitRegCode'] = $c->getDocumentNr(); + $params['Registrant_dotitHideWhois'] = ($domain->getPrivacyEnabled() ? 'YES' : 'NO'); + $params['Registrant_dotitProvince'] = $c->getState(); + for ($i = 1; $i < 5; $i++) + $params['Registrant_dotItTerm' . $i] = 'YES'; + $params['Registrant_clientIp'] = '1.1.1.1'; + $params['Admin_dotitProvince'] = $c->getState(); + $params['Technical_dotitProvince'] = $c->getState(); + } + + if ($domain->getTld() == '.us') + { + $params['Registrant_usPurpose'] = 'P3'; + $params['Registrant_usNexusCategory'] = 'C11'; + } + + $result = $this->_process('/Domain/Create', $params); + + return (($result['product_0_status'] == 'PENDING') + || ($result['product_0_status'] == 'SUCCESS')); + } + + public function renewDomain(Registrar_Domain $domain) + { + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process('/Domain/Renew', $params); + + return ($result['product_0_status'] == 'SUCCESS'); + } + + public function enablePrivacyProtection(Registrar_Domain $domain) + { + $cmd = '/Domain/PrivateWhois/Enable'; + + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process($cmd, $params); + + return ($result['status'] == 'SUCCESS'); + } + + public function disablePrivacyProtection(Registrar_Domain $domain) + { + $cmd = '/Domain/PrivateWhois/Disable'; + + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process($cmd, $params); + + return ($result['status'] == 'SUCCESS'); + } + + public function getEpp(Registrar_Domain $domain) + { + $d = $this->getDomainDetails($domain); + return $d->getEpp(); + } + + public function lock(Registrar_Domain $domain) + { + $cmd = '/Domain/RegistrarLock/Enable'; + $params = array( + 'domain' => $domain->getName() + ); + $result = $this->_process($cmd, $params); + return ($result['status'] == 'SUCCESS'); + } + + public function unlock(Registrar_Domain $domain) + { + $cmd = '/Domain/RegistrarLock/Disable'; + $params = array( + 'domain' => $domain->getName() + ); + $result = $this->_process($cmd, $params); + return ($result['status'] == 'SUCCESS'); + } + + /** + * Runs an api command and returns parsed data. + * @param string $command + * @param array $postData + * @return array + */ + private function _process($command, $params) + { + // Set authentication params + $params['apikey'] = $this->config['apikey']; + $params['password'] = $this->config['password']; + + $ch = curl_init(); + curl_setopt($ch, CURLOPT_URL, $this->_getApiUrl() . $command); + + curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); + + curl_setopt($ch, CURLOPT_HEADER, 0); + curl_setopt($ch, CURLOPT_USERAGENT, "Internet.bs ClientExec plugin V2.5"); + curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_POST, 1); + curl_setopt($ch, CURLOPT_POSTFIELDS, $params); + + $data = curl_exec($ch); + + if ($data === false) { + $e = new Registrar_Exception(sprintf('CurlException: "%s"', curl_error($ch))); + $this->getLog()->err($e); + curl_close($ch); + throw $e; + } + + curl_close($ch); + + if ($data) + return $this->_parseResult($data); + } + + /** + * Parses data returned by request. + * @param string $data + * @return array + */ + private function _parseResult($data) + { + $lines = explode("\n", $data); + $result = array(); + + foreach ($lines as $line) + { + list($varName, $value) = explode("=", $line); + $result[strtolower(trim($varName))] = trim($value); + } + + if ((array_key_exists('status', $result)) + && ($result['status'] == 'FAILURE')) + { + throw new Registrar_Exception($result['message']); + } + + if ($this->isTestEnv()) error_log(print_r($result, 1)); + + return $result; + } + + public function isTestEnv() + { + return $this->_testMode; + } + + /** + * Api URL. + * @return string + */ + private function _getApiUrl() + { + if ($this->isTestEnv()) + return 'https://testapi.internet.bs'; + return 'https://api.internet.bs'; + } + + /** + * Creates domain object from received data array. + * @param array $res + * @param Registrar_Domain $domain + * @return Registrar_Domain + */ + private function _createDomainObj($result, Registrar_Domain $domain) + { + $type = 'contacts_registrant_'; + $tel = explode('.', $result[$type . 'phonenumber']); + + // domain specific + if (array_key_exists($type . 'firstname', $result)) + $name = $result[$type . 'firstname']; + if (array_key_exists($type . 'lastname', $result)) + $name .= ' ' . $result[$type . 'lastname']; + + if (!array_key_exists($type . 'organization', $result)) + $result[$type . 'organization'] = ''; + if ($domain->getTld() == 'fr') + $name = $result[$type . 'dotfrcontactentityname']; + if ($domain->getTld() == 'it') + $result['transferauthinfo'] = ''; + + $c = new Registrar_Domain_Contact(); + $c->setName($name) + ->setEmail($result[$type . 'email']) + ->setCompany($result[$type . 'organization']) + ->setTel($tel[1]) + ->setTelCc($tel[0]) + ->setAddress1($result[$type . 'street']) + ->setAddress2($result[$type . 'street2']) + ->setAddress3($result[$type . 'street3']) + ->setCity($result[$type . 'city']) + ->setCountry($result[$type . 'country']) + ->setZip($result[$type . 'postalcode']); + + if(isset($result['nameserver_0'])) { + $domain->setNs1($result['nameserver_0']); + } + + if(isset($result['nameserver_1'])) { + $domain->setNs2($result['nameserver_1']); + } + + if(isset($result['nameserver_2'])) { + $domain->setNs3($result['nameserver_2']); + } + + if(isset($result['nameserver_3'])) { + $domain->setNs4($result['nameserver_3']); + } + + $privacy = 0; + if (array_key_exists('privatewhois', $result)) + { + $privacy = ($result['privatewhois'] == 'FULL') + || ($result['privatewhois'] == 'PARTIAL'); + } + + $domain->setExpirationTime(strtotime($result['expirationdate'])); + $domain->setPrivacyEnabled($privacy); + $domain->setEpp($result['transferauthinfo']); + $domain->setContactRegistrar($c); + + return $domain; + } + + /** + * Checks whether privacy is enabled. + * @param Registrar_Domain $domain + * @return bool + */ + private function _isPrivacyEnabled(Registrar_Domain $domain) + { + $params = array( + 'domain' => $domain->getName() + ); + + $result = $this->_process('/Domain/PrivateWhois/Status', $params); + + return (($result['status'] == 'SUCCESS') + && (($result['privatewhoisstatus'] == 'FULL') + || ($result['privatewhoisstatus'] == 'PARTIAL'))); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Adapter/Netearthone.php b/src/bb-library/Registrar/Adapter/Netearthone.php new file mode 100644 index 000000000..25abeae89 --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Netearthone.php @@ -0,0 +1,45 @@ +config['userid'] = $options['userid']; + unset($options['userid']); + } else { + throw new Registrar_Exception('Domain registrar "NetEarthOne" is not configured properly. Please update configuration parameter "NetEarthOne Username" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "NetEarthOne" is not configured properly. Please update configuration parameter "NetEarthOne Pasword" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on NetEarthOne via API', + 'form' => array( + 'userid' => array('text', array( + 'label' => 'NetEarthOne Username', + 'description'=>'NetEarthOne Username' + ), + ), + 'password' => array('password', array( + 'label' => 'NetEarthOne Pasword', + 'description'=>'NetEarthOne Password', + 'renderPassword' => true, + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Adapter/Resellbiz.php b/src/bb-library/Registrar/Adapter/Resellbiz.php new file mode 100644 index 000000000..7bdf73c84 --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Resellbiz.php @@ -0,0 +1,42 @@ +config['userid'] = $options['userid']; + unset($options['userid']); + } else { + throw new Registrar_Exception('Domain registrar "ResellBiz" is not configured properly. Please update configuration parameter "ResellBiz Username" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "ResellBiz" is not configured properly. Please update configuration parameter "ResellBiz Pasword" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on ResellBiz via API', + 'form' => array( + 'userid' => array('text', array( + 'label' => 'Reseller ID', + ), + ), + 'password' => array('password', array( + 'label' => 'Password', + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Adapter/Resellerclub.php b/src/bb-library/Registrar/Adapter/Resellerclub.php new file mode 100644 index 000000000..76b3c58f5 --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Resellerclub.php @@ -0,0 +1,729 @@ + null, + 'password' => null, + ); + + public function __construct($options) + { + if (!extension_loaded('curl')) { + throw new Registrar_Exception('CURL extension is not enabled'); + } + + if(isset($options['userid']) && !empty($options['userid'])) { + $this->config['userid'] = $options['userid']; + unset($options['userid']); + } else { + throw new Registrar_Exception('Domain registrar "Resellerclub" is not configured properly. Please update configuration parameter "Resellerclub Username" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "Resellerclub" is not configured properly. Please update configuration parameter "Resellerclub Pasword" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on Resellerclub via API. ResellerClub requires your server IP in order to work. Login to the ResellerClub control panel (the url will be in the email you received when you signed up with them) and then go to Settings > API and enter the IP address of the server where BoxBilling is installed to authorize it for API access.', + 'form' => array( + 'userid' => array('text', array( + 'label' => 'Reseller ID. You can get this at ResellerClub control panel Settings > Personal information > Primary profile > Reseller ID', + 'description'=>'Resellerclub Username' + ), + ), + 'password' => array('password', array( + 'label' => 'Resellerclub Pasword', + 'description'=>'Resellerclub Password', + ), + ), + ), + ); + } + + /** + * Tells what TLDs can be registered via this adapter + * @return array + */ + public function getTlds() + { + return array( + '.com', '.net', '.org', '.name', '.biz', + '.in', '.us', '.co.uk', '.org.uk', '.me.uk', + '.eu', '.cn.com', '.info', '.co.nz', '.net.nz', + '.org.nz', '.me', '.co.in', '.net.in', '.org.in', + '.gen.in', '.firm.in', '.ind.in', '.asia', '.mobi', + '.tel', '.tv', '.cc', '.ws', '.bz', + '.mn', '.eu.com', '.gb.com', '.ae.org', '.kr.com', + '.us.com', '.qc.com', '.de.com', '.gb.net', '.no.com', + '.hu.com', '.jpn.com', '.uy.com', '.za.com', '.br.com', + '.sa.com', '.se.com', '.uk.com', '.uk.net', '.ru.com', + '.cn', '.com.cn', '.net.cn', '.org.cn', + ); + } + + public function isDomainAvailable(Registrar_Domain $domain) + { + $params = array( + 'domain-name' => $domain->getSld(), + 'tlds' => array($domain->getTld(false)), + 'suggest-alternative' => false, + ); + + $result = $this->_makeRequest('domains/available', $params); + if(!isset($result[$domain->getName()])) { + return true; + } + + $check = $result[$domain->getName()]; + if($check && $check['status'] == 'available') { + return true; + } + return false; + } + + public function isDomainCanBeTransfered(Registrar_Domain $domain) + { + $params = array( + 'domain-name' => $domain->getName(), + ); + $result = $this->_makeRequest('domains/validate-transfer', $params, 'GET'); + return (strtolower($result['status']) == 'success'); + } + + public function modifyNs(Registrar_Domain $domain) + { + $ns = array(); + $ns[] = $domain->getNs1(); + $ns[] = $domain->getNs2(); + if($domain->getNs3()) { + $ns[] = $domain->getNs3(); + } + if($domain->getNs4()) { + $ns[] = $domain->getNs4(); + } + + $params = array( + 'order-id' => $this->_getDomainOrderId($domain), + 'ns' => $ns, + ); + + $result = $this->_makeRequest('domains/modify-ns', $params, 'POST'); + return ($result['status'] == 'Success'); + } + + public function modifyContact(Registrar_Domain $domain) + { + $cdetails = $this->_getDefaultContactDetails($domain); + $contact_id = $cdetails['Contact']['registrant']; + + $c = $domain->getContactRegistrar(); + + $required_params = array( + 'contact-id' => $contact_id, + 'name' => $c->getName(), + 'company' => $c->getCompany(), + 'email' => $c->getEmail(), + 'address-line-1' => $c->getAddress1(), + 'city' => $c->getCity(), + 'zipcode' => $c->getZip(), + 'phone-cc' => $c->getTelCc(), + 'phone' => $c->getTel(), + 'country' => $c->getCountry(), + ); + + $optional_params = array( + 'address-line-2' => $c->getAddress2(), + 'address-line-3' => $c->getAddress3(), + 'state' => $c->getState(), +// 'fax-cc' => $c->getFax(), +// 'fax' => $c->getFaxCc(), + ); + + $params = array_merge($optional_params, $required_params); + $result = $this->_makeRequest('contacts/modify', $params, 'POST'); + return ($result['status'] == 'Success'); + } + + public function transferDomain(Registrar_Domain $domain) + { + $customer = $this->_getCustomerDetails($domain); + $contacts = $this->_getDefaultContactDetails($domain); + $contact_id = $contacts['Contact']['registrant']; + + $ns = array(); + $ns[] = $domain->getNs1(); + $ns[] = $domain->getNs2(); + if($domain->getNs3()) { + $ns[] = $domain->getNs3(); + } + if($domain->getNs4()) { + $ns[] = $domain->getNs4(); + } + + $required_params = array( + 'domain-name' => $domain->getName(), + 'auth-code' => $domain->getEpp(), + 'ns' => $ns, + 'customer-id' => $customer['customerid'], + 'reg-contact-id' => $contact_id, + 'admin-contact-id' => $contact_id, + 'tech-contact-id' => $contact_id, + 'billing-contact-id'=> $contact_id, + 'invoice-option' => 'NoInvoice', + 'protect-privacy' => false, + ); + + return $this->_makeRequest('domains/transfer', $required_params, 'POST'); + } + + private function _getDomainOrderId(Registrar_Domain $d) + { + $required_params = array( + 'domain-name' => $d->getName(), + ); + return $this->_makeRequest('domains/orderid', $required_params); + } + + public function getDomainDetails(Registrar_Domain $d) + { + $orderid = $this->_getDomainOrderId($d); + $params = array( + 'order-id' => $orderid, + 'options' => 'All', + ); + $data = $this->_makeRequest('domains/details', $params); + + $d->setRegistrationTime($data['creationtime']); + $d->setExpirationTime($data['endtime']); + $d->setEpp($data['domsecret']); + $d->setPrivacyEnabled(($data['isprivacyprotected'] == 'true')); + + /* Contact details */ + $wc = $data['admincontact']; + $c = new Registrar_Domain_Contact(); + $c->setId($wc['contactid']) + ->setName($wc['name']) + ->setEmail($wc['emailaddr']) + ->setCompany($wc['company']) + ->setTel($wc['telno']) + ->setTelCc($wc['telnocc']) + ->setAddress1($wc['address1']) + ->setCity($wc['city']) + ->setCountry($wc['country']) + ->setState($wc['state']) + ->setZip($wc['zip']); + + if(isset($wc['address2'])) { + $c->setAddress2($wc['address2']); + } + + if(isset($wc['address3'])) { + $c->setAddress3($wc['address3']); + } + + $d->setContactRegistrar($c); + + if(isset($data['ns1'])) { + $d->setNs1($data['ns1']); + } + if(isset($data['ns2'])) { + $d->setNs2($data['ns2']); + } + if(isset($data['ns3'])) { + $d->setNs3($data['ns3']); + } + if(isset($data['ns4'])) { + $d->setNs4($data['ns4']); + } + + return $d; + } + + public function deleteDomain(Registrar_Domain $domain) + { + $required_params = array( + 'order-id' => $this->_getDomainOrderId($domain), + ); + $result = $this->_makeRequest('domains/delete', $required_params, 'POST'); + return (strtolower($result['status']) == 'success'); + } + + public function registerDomain(Registrar_Domain $domain) + { + if($this->_hasCompletedOrder($domain)) { + return true; + } + + $tld = $domain->getTld(); + $customer = $this->_getCustomerDetails($domain); + $customer_id = $customer['customerid']; + $contact_id = $this->getContactIdForDomain($domain); + + $ns = array(); + $ns[] = $domain->getNs1(); + $ns[] = $domain->getNs2(); + if($domain->getNs3()) { + $ns[] = $domain->getNs3(); + } + if($domain->getNs4()) { + $ns[] = $domain->getNs4(); + } + + $params = array( + 'domain-name' => $domain->getName(), + 'years' => $domain->getRegistrationPeriod(), + 'ns' => $ns, + 'customer-id' => $customer_id, + 'reg-contact-id' => $contact_id, + 'admin-contact-id' => $contact_id, + 'tech-contact-id' => $contact_id, + 'billing-contact-id'=> $contact_id, + 'invoice-option' => 'NoInvoice', + 'protect-privacy' => false, //$domain->getPrivacyEnabled(), + ); + + if(in_array($tld, array('.eu', '.uk', '.nz', '.ru'))) { + $params['admin-contact-id'] = -1; + } + + if(in_array($tld, array('.eu', '.uk', '.nz', '.ru'))) { + $params['tech-contact-id'] = -1; + } + + if(in_array($tld, array('.eu', '.uk', '.nz', '.ru', '.ca'))) { + $params['billing-contact-id'] = -1; + } + + $result = $this->_makeRequest('domains/register', $params, 'POST'); + return ($result['status'] == 'Success'); + } + + public function renewDomain(Registrar_Domain $domain) + { + $params = array( + 'order-id' => $this->_getDomainOrderId($domain), + 'years' => $domain->getRegistrationPeriod(), + 'exp-date' => $domain->getExpirationTime(), + 'invoice-option' => 'NoInvoice', + ); + + $result = $this->_makeRequest('domains/renew', $params, 'POST'); + return ($result['actionstatus'] == 'Success'); + } + + public function enablePrivacyProtection(Registrar_Domain $domain) + { + $order_id = $this->_getDomainOrderId($domain); + $params = array( + 'order-id' => $order_id, + 'protect-privacy' => true, + 'reason' => 'Owners decision', + ); + + $result = $this->_makeRequest('domains/modify-privacy-protection', $params, 'POST'); + return (strtolower($result['status']) == 'success'); + } + + public function disablePrivacyProtection(Registrar_Domain $domain) + { + $order_id = $this->_getDomainOrderId($domain); + $params = array( + 'order-id' => $order_id, + 'protect-privacy' => false, + 'reason' => 'Owners decision', + ); + + $result = $this->_makeRequest('domains/modify-privacy-protection', $params, 'POST'); + return (strtolower($result['status']) == 'success'); + } + + public function getEpp(Registrar_Domain $domain) + { + $params = array( + 'order-id' => $this->_getDomainOrderId($domain), + 'options' => 'OrderDetails', + ); + $data = $this->_makeRequest('domains/details', $params); + if(!isset($data['domsecret'])) { + throw new Registrar_Exception('Domain EPP code can be retrieved from domain registrar'); + } + return $data['domsecret']; + } + + public function lock(Registrar_Domain $domain) + { + $params = array( + 'order-id' => $this->_getDomainOrderId($domain), + ); + $result = $this->_makeRequest('domains/enable-theft-protection', $params, 'POST'); + return (strtolower($result['status']) == 'success'); + } + + public function unlock(Registrar_Domain $domain) + { + $params = array( + 'order-id' => $this->_getDomainOrderId($domain), + ); + $result = $this->_makeRequest('domains/disable-theft-protection', $params, 'POST'); + return (strtolower($result['status']) == 'success'); + } + + private function _getCustomerDetails(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + $params = array( + 'username' => $c->getEmail(), + ); + + try { + $result = $this->_makeRequest('customers/details', $params); + } catch(Registrar_Exception $e) { + $this->_createCustomer($domain); + $result = $this->_makeRequest('customers/details', $params); + } + + return (array)$result; + } + + private function _createCustomer(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + $params = array( + 'username' => $c->getEmail(), + 'passwd' => $c->getPassword(), + 'name' => $c->getName(), + 'company' => $c->getCompany(), + 'address-line-1' => $c->getAddress1(), + 'address-line-2' => $c->getAddress2(), + 'city' => $c->getCity(), + 'state' => $c->getState(), + 'country' => $c->getCountry(), + 'zipcode' => $c->getZip(), + 'phone-cc' => $c->getTelCc(), + 'phone' => $c->getTel(), + 'lang-pref' => 'en', + 'sales-contact-id' => '', + 'accounting-currency-symbol' => 'USD', + 'selling-currency-symbol' => 'USD', + 'request-headers' => '', + ); + + $optional_params = array( + 'address-line-3' => '', + 'alt-phone-cc' => '', + 'alt-phone' => '', + 'fax-cc' => '', + 'fax' => '', + 'mobile-cc' => '', + 'mobile' => '', + ); + +// $params = $this->_checkRequiredParams($optional_params, $params); + $params = array_merge($optional_params, $params); + $customer_id = $this->_makeRequest('customers/signup', $params, 'POST'); + return $customer_id; + } + + public function getContactIdForDomain(Registrar_Domain $domain) + { + $c = $domain->getContactRegistrar(); + $customer = $this->_getCustomerDetails($domain); + $customer_id = $customer['customerid']; + + $tld = $domain->getTld(); + $contact = array( + 'customer-id' => $customer_id, + 'type' => 'Contact', + 'email' => $c->getEmail(), + 'name' => $c->getName(), + 'company' => $c->getCompany(), + 'address-line-1' => $c->getAddress1(), + 'address-line-2' => $c->getAddress2(), + 'city' => $c->getCity(), + 'state' => $c->getState(), + 'country' => $c->getCountry(), + 'zipcode' => $c->getZip(), + 'phone-cc' => $c->getTelCc(), + 'phone' => $c->getTel(), + ); + + if($tld == '.uk') { + $contact['type'] = 'UkContact'; + } + + if($tld == '.eu') { + $contact['type'] = 'EuContact'; + } + + if($tld == '.cn') { + $contact['type'] = 'CnContact'; + } + + if($tld == '.ca') { + $contact['type'] = 'CaContact'; + } + + if($tld == '.de') { + $contact['type'] = 'DeContact'; + } + + if($tld == '.es') { + $contact['type'] = 'EsContact'; + } + + if($tld == '.ru') { + $contact['type'] = 'RuContact'; + } + + $id = $this->_makeRequest('contacts/add', $contact, 'POST'); + return $id; + } + + private function getResellerDetails() + { + return $this->_makeRequest('resellers/details'); + } + + private function getPromoPrices() + { + return $this->_makeRequest('resellers/promo-details'); + } + + /** + * @see http://manage.resellerclub.com/kb/answer/808 + * @param array $params + * @return stdClass + */ + private function addSubReseller($params) + { + // default values + $required_params = array( + 'username' => '', + 'passwd' => '', + 'name' => '', + 'company' => '', + 'address-line-1' => '', + 'city' => '', + 'state' => '', + 'country' => '', + 'zipcode' => '', + 'phone-cc' => '', + 'phone' => '', + 'lang-pref' => 'en', + 'sales-contact-id' => '', + 'accounting-currency-symbol' => 'USD', + 'selling-currency-symbol' => 'USD', + 'request-headers' => '', + ); + + $optional_params = array( + 'address-line-2' => '', + 'address-line-3' => '', + 'alt-phone-cc' => '', + 'alt-phone' => '', + 'fax-cc' => '', + 'fax' => '', + 'mobile-cc' => '', + 'mobile' => '', + ); + + $params = $this->_checkRequiredParams($required_params, $params); + $params = array_merge($optional_params, $params); + $result = $this->_makeRequest('resellers/signup', $params, 'POST'); + + if(isset($result['status']) && $result['status'] == 'AlreadyReseller') { + throw new Registrar_Exception('You are already registered as reseller'); + } + + return $result; + } + + private function _getDefaultContactDetails(Registrar_Domain $domain) + { + $customer = $this->_getCustomerDetails($domain); + $params = array( + 'customer-id' => $customer['customerid'], + 'type' => 'Contact', + ); + + return $this->_makeRequest('contacts/default', $params, 'POST'); + } + + private function removeCustomer($params) + { + $required_params = array( + 'customer-id' => '', + ); + $params = $this->_checkRequiredParams($required_params, $params); + $result = $this->_makeRequest('customers/delete', $params, 'POST'); + return ($result == 'true'); + } + + private function _hasCompletedOrder(Registrar_Domain $domain) + { + try { + $orderid = $this->_getDomainOrderId($domain); + $params = array( + 'order-id' => $orderid, + 'options' => 'All', + ); + $data = $this->_makeRequest('domains/details', $params); + } catch(Exception $e) { + return false; + } + + return ($data['currentstatus'] == 'Active'); + } + + public function isTestEnv() + { + return $this->_testMode; + } + + /** + * Api URL + * @return string + */ + private function _getApiUrl() + { + if($this->isTestEnv()) { + return 'http://test.httpapi.com/api/'; + } + return 'https://httpapi.com/api/'; + } + + /** + * Perform call to Api + * @param string $url + * @param array $params + * @param string $method + * @return mixed + * @throws Registrar_Exception + */ + private function _makeRequest($url ,$params = array(), $method = 'GET', $type = 'json') + { + $params = array_merge(array( + 'auth-userid' => $this->config['userid'], + 'auth-password' => $this->config['password'], + ), $params); + + $opts = array( + CURLOPT_CONNECTTIMEOUT => 30, + CURLOPT_RETURNTRANSFER => true, + CURLOPT_TIMEOUT => 60, + CURLOPT_URL => $this->_getApiUrl().$url.'.'.$type, + CURLOPT_SSL_VERIFYHOST => 0, + CURLOPT_SSL_VERIFYPEER => 0, + ); + + if($method == 'POST') { + $opts[CURLOPT_POST] = 1; + $opts[CURLOPT_POSTFIELDS] = $this->_formatParams($params); + $this->getLog()->debug('API REQUEST: '.$opts[CURLOPT_URL].'?'.$opts[CURLOPT_POSTFIELDS]); + } else { + $opts[CURLOPT_URL] = $opts[CURLOPT_URL].'?'.$this->_formatParams($params); + $this->getLog()->debug('API REQUEST: '.$opts[CURLOPT_URL]); + } + + $ch = curl_init(); + curl_setopt_array($ch, $opts); + $result = curl_exec($ch); + if ($result === false) { + $e = new Registrar_Exception(sprintf('CurlException: "%s"', curl_error($ch))); + $this->getLog()->err($e); + curl_close($ch); + throw $e; + } + curl_close($ch); + + $this->getLog()->info('API RESULT: '.$result); + + // response checker + $json = json_decode($result, true); + if(!is_array($json)) { + return $result; + } + + if(isset($json['status']) && $json['status'] == 'ERROR') { + throw new Registrar_Exception($json['message'], 101); + } + + if(isset($json['status']) && $json['status'] == 'error') { + throw new Registrar_Exception($json['error'], 102); + } + + if(isset($json['status']) && $json['status'] == 'Failed') { + throw new Registrar_Exception($json['actionstatusdesc'], 103); + } + + return $json; + } + + /** + * Convert params to resellerClub format + * @see http://manage.resellerclub.com/kb/answer/755 + * @param array $params + * @return string + */ + private function _formatParams($params) + { + foreach($params as $key => &$param) { + if(is_bool($param)) { + $param = ($param) ? 'true' : 'false'; + } + } + + $params = http_build_query($params, null, '&'); + $params = preg_replace('~%5B(\d+)%5D~', '', $params); + return $params; + } + + /** + * Check if all required params are present, if not add default values + * @param array $required_params - list of required params with default values + * @param array $params - given params + * @return array + * @throws Registrar_Exception + */ + private function _checkRequiredParams($required_params, $params) + { + foreach($required_params as $param => $value) { + if(!isset($params[$param])) { + $params[$param] = $value; + } + + if(!is_bool($params[$param]) && empty($params[$param])) { +// throw new Registrar_Exception(sprintf('Required param "%s" can not be blank', $param)); + } + } + + return $params; + } +} diff --git a/src/bb-library/Registrar/Adapter/Resellerid.php b/src/bb-library/Registrar/Adapter/Resellerid.php new file mode 100644 index 000000000..e5ad6c390 --- /dev/null +++ b/src/bb-library/Registrar/Adapter/Resellerid.php @@ -0,0 +1,42 @@ +config['userid'] = $options['userid']; + unset($options['userid']); + } else { + throw new Registrar_Exception('Domain registrar "ResellerID" is not configured properly. Please update configuration parameter "ResellerID Username" at "Configuration -> Domain registration".'); + } + + if(isset($options['password']) && !empty($options['password'])) { + $this->config['password'] = $options['password']; + unset($options['password']); + } else { + throw new Registrar_Exception('Domain registrar "ResellerID" is not configured properly. Please update configuration parameter "ResellerID Pasword" at "Configuration -> Domain registration".'); + } + } + + public static function getConfig() + { + return array( + 'label' => 'Manages domains on ResellerID via API', + 'form' => array( + 'userid' => array('text', array( + 'label' => 'Reseller ID', + ), + ), + 'password' => array('password', array( + 'label' => 'Reseller Pasword', + ), + ), + ), + ); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/AdapterAbstract.php b/src/bb-library/Registrar/AdapterAbstract.php new file mode 100644 index 000000000..6214e8190 --- /dev/null +++ b/src/bb-library/Registrar/AdapterAbstract.php @@ -0,0 +1,145 @@ +_log = $log; + return $this; + } + + public function getLog() + { + $log = $this->_log; + if(!$log instanceof Box_Log) { + $log = new Box_Log(); + $log->addWriter(new Box_LogDb('Model_ActivitySystem')); + } + return $log; + } + + public function enableTestMode() + { + $this->_testMode = true; + return $this; + } +} diff --git a/src/bb-library/Registrar/Domain.php b/src/bb-library/Registrar/Domain.php new file mode 100644 index 000000000..fb3e98c0e --- /dev/null +++ b/src/bb-library/Registrar/Domain.php @@ -0,0 +1,255 @@ +_period = (int)$years; + return $this; + } + + public function getRegistrationPeriod() + { + return $this->_period; + } + + public function getName() + { + return $this->_sld . $this->_tld; + } + + public function setExpirationTime($param) + { + $this->_expires_at = $param; + return $this; + } + + public function getExpirationTime() + { + return $this->_expires_at; + } + + public function setRegistrationTime($param) + { + $this->_registered_at = $param; + return $this; + } + + public function getRegistrationTime() + { + return $this->_registered_at; + } + + public function setContactRegistrar(Registrar_Domain_Contact $c) + { + $this->_contact_registrar = $c; + return $this; + } + + public function getContactRegistrar() + { + return $this->_contact_registrar; + } + + public function setContactAdmin(Registrar_Domain_Contact $c) + { + $this->_contact_admin = $c; + return $this; + } + + public function getContactAdmin() + { + return $this->_contact_admin; + } + + public function setContactTech(Registrar_Domain_Contact $c) + { + $this->_contact_tech = $c; + return $this; + } + + public function getContactTech() + { + return $this->_contact_tech; + } + + public function setContactBilling(Registrar_Domain_Contact $c) + { + $this->_contact_billing = $c; + return $this; + } + + public function getContactBilling() + { + return $this->_contact_billing; + } + + public function setEpp($param) + { + $this->_epp = $param; + return $this; + } + + public function getEpp() + { + return $this->_epp; + } + + public function setPrivacyEnabled($param) + { + $this->_privacy = (bool)$param; + return $this; + } + + public function getPrivacyEnabled() + { + return $this->_privacy; + } + + public function setTld($param) + { + $this->_tld = $param; + return $this; + } + + public function getTld($with_dot = true) + { + if($with_dot === false && $this->_tld[0] == '.') { + return ltrim($this->_tld, '.'); + } + return $this->_tld; + } + + public function setSld($param) + { + $this->_sld = $param; + return $this; + } + + public function getSld() + { + return $this->_sld; + } + + public function setNs1($param) + { + $this->_ns1 = $param; + return $this; + } + + public function getNs1() + { + return $this->_ns1; + } + + public function setNs2($param) + { + $this->_ns2 = $param; + return $this; + } + + public function getNs2() + { + return $this->_ns2; + } + + public function setNs3($param) + { + $this->_ns3 = $param; + return $this; + } + + public function getNs3() + { + return $this->_ns3; + } + + public function setNs4($param) + { + $this->_ns4 = $param; + return $this; + } + + public function getNs4() + { + return $this->_ns4; + } + + public function setLocked($param) + { + $this->_locked = $param; + return $this; + } + + public function getLocked() + { + return $this->_locked; + } + + public function __toString() { + $c = ''; + $c .= sprintf("Name: %s", $this->getName()).PHP_EOL; + $c .= sprintf("TLD: %s", $this->getTld()).PHP_EOL; + $c .= sprintf("SLD: %s", $this->getSld()).PHP_EOL; + + $c .= sprintf("EPP: %s", $this->getEpp()).PHP_EOL; + $c .= sprintf("Registration period: %s year(s)", $this->getRegistrationPeriod()).PHP_EOL; + + $registered_at = ($this->getRegistrationTime()) ? date('Y-m-d', $this->getRegistrationTime()) : '-'; + $c .= sprintf("Registered at: %s", $registered_at).PHP_EOL; + + $expires_at = ($this->getExpirationTime()) ? date('Y-m-d', $this->getExpirationTime()) : '-'; + $c .= sprintf("Expires at: %s", $expires_at).PHP_EOL; + + $privacy = ($this->getPrivacyEnabled()) ? 'Yes' : 'No'; + $c .= sprintf("WHOIS Privacy Protection enabled: %s", $privacy); + $c .=PHP_EOL; + $c .=PHP_EOL; + + $c .= sprintf("Nameserver #1: %s", $this->getNs1()).PHP_EOL; + $c .= sprintf("Nameserver #2: %s", $this->getNs2()).PHP_EOL; + $c .= sprintf("Nameserver #3: %s", $this->getNs3()).PHP_EOL; + $c .= sprintf("Nameserver #4: %s", $this->getNs4()).PHP_EOL; + + if($this->getContactRegistrar() instanceof Registrar_Domain_Contact) { + $c .=PHP_EOL; + $c .=PHP_EOL; + $c .= sprintf("Contact Registrar").PHP_EOL; + $c .= $this->getContactRegistrar()->__toString(); + } + + return $c; + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Domain/Contact.php b/src/bb-library/Registrar/Domain/Contact.php new file mode 100644 index 000000000..297e1b351 --- /dev/null +++ b/src/bb-library/Registrar/Domain/Contact.php @@ -0,0 +1,318 @@ +id = $param; + return $this; + } + + public function getId() + { + return $this->id; + } + + public function setName($param) + { + $this->name = $param; + return $this; + } + + public function getName() + { + if ($this->name) return $this->name; + + return $this->firstname . ' ' . $this->lastname; + } + + public function setFirstName($param) + { + $this->firstname = $param; + return $this; + } + + public function getFirstName() + { + if ($this->firstname) return $this->firstname; + + $bits = explode(' ', $this->name); + + return isset($bits[0]) ? $bits[0] : ''; + } + + public function setLastName($param) + { + $this->lastname = $param; + return $this; + } + + public function getLastName() + { + if ($this->lastname) return $this->lastname; + + $bits = explode(' ', $this->name); + + return isset($bits[1]) ? str_replace($bits[0] . ' ', '', $this->name) : ''; + } + + public function setEmail($param) + { + $this->email = $param; + return $this; + } + + public function getEmail() + { + return $this->email; + } + + public function setCity($param) + { + $this->city = $param; + return $this; + } + + public function getCity() + { + return $this->city; + } + + public function setCountry($param) + { + $this->country = $param; + return $this; + } + + public function getCountry() + { + return $this->country; + } + + public function setState($param) + { + $this->state = $param; + return $this; + } + + public function getState() + { + return $this->state; + } + + public function setZip($param) + { + $this->zip = $param; + return $this; + } + + public function getZip() + { + return $this->zip; + } + + public function setTel($param) + { + $this->tel = $param; + return $this; + } + + public function getTel() + { + return $this->tel; + } + + public function setTelCc($param) + { + $this->tel_cc = $param; + return $this; + } + + public function getTelCc() + { + return $this->tel_cc; + } + + public function setFax($param) + { + $this->fax = $param; + return $this; + } + + public function getFax() + { + return $this->fax; + } + + public function setFaxCc($param) + { + $this->fax_cc = $param; + return $this; + } + + public function getFaxCc() + { + return $this->fax_cc; + } + + public function setCompany($param) + { + $this->company = $param; + return $this; + } + + public function getCompany() + { + return $this->company; + } + + public function setAddress1($param) + { + $this->address_1 = $param; + return $this; + } + + public function getAddress1() + { + return $this->address_1; + } + + public function setAddress2($param) + { + $this->address_2 = $param; + return $this; + } + + public function getAddress2() + { + return $this->address_2; + } + + public function setAddress3($param) + { + $this->address_3 = $param; + return $this; + } + + public function getAddress3() + { + return $this->address_3; + } + + public function setUsername($param) + { + $this->username = $param; + return $this; + } + + public function getUsername() + { + return $this->username; + } + + public function setPassword($param) + { + $this->password = $param; + return $this; + } + + public function getPassword() + { + return $this->password; + } + + public function setDocumentType($param) + { + $this->document_type = $param; + return $this; + } + + public function getDocumentType() + { + return $this->document_type; + } + + public function setDocumentNr($param) + { + $this->document_nr = $param; + return $this; + } + + public function getDocumentNr() + { + return $this->document_nr; + } + + public function setJobTitle($param) + { + $this->job_title = $param; + return $this; + } + + public function getJobTitle() + { + return $this->job_title; + } + + public function getAddress() + { + $data = array( + $this->getAddress1(), + $this->getAddress2(), + $this->getAddress3(), + ); + return implode(' ', $data); + } + + public function __toString() + { + $c = ''; + $c .= sprintf("Id: %s", $this->getId()).PHP_EOL; + $c .= sprintf("Name: %s", $this->getName()).PHP_EOL; + $c .= PHP_EOL; + $c .= sprintf("Email: %s", $this->getEmail()).PHP_EOL; + $c .= sprintf("Username: %s", $this->getUsername()).PHP_EOL; + $c .= sprintf("Password: %s", $this->getPassword()).PHP_EOL; + $c .= PHP_EOL; + $c .= sprintf("Company: %s", $this->getCompany()).PHP_EOL; + $c .= sprintf("Address: %s", $this->getAddress()).PHP_EOL; + $c .= sprintf("City: %s", $this->getCity()).PHP_EOL; + $c .= sprintf("State: %s", $this->getState()).PHP_EOL; + $c .= sprintf("Zip: %s", $this->getZip()).PHP_EOL; + $c .= sprintf("Country: %s", $this->getCountry()).PHP_EOL; + $c .= PHP_EOL; + $c .= sprintf("Tel: %s", $this->getTelCc() . ' '. $this->getTel()).PHP_EOL; + $c .= sprintf("Fax: %s", $this->getFaxCc() . ' '. $this->getFax()).PHP_EOL; + $c .= PHP_EOL; + $c .= sprintf("Document type: %s", $this->getDocumentType()).PHP_EOL; + $c .= sprintf("Document nr: %s", $this->getDocumentNr()).PHP_EOL; + return $c; + } + + public function toArray() + { + return get_object_vars($this); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Domain/Nameserver.php b/src/bb-library/Registrar/Domain/Nameserver.php new file mode 100644 index 000000000..6f9706e27 --- /dev/null +++ b/src/bb-library/Registrar/Domain/Nameserver.php @@ -0,0 +1,35 @@ +host = $param; + return $this; + } + + public function getHost() + { + return $this->host; + } + + public function setIp($param) + { + $this->ip = $param; + return $this; + } + + public function getIp() + { + return $this->ip; + } + + public function __toString() { + $c = ''; + $c .= sprintf("Host: %s", $this->getHost()).PHP_EOL; + $c .= sprintf("Ip: %s", $this->getIp()).PHP_EOL; + return $c; + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/Exception.php b/src/bb-library/Registrar/Exception.php new file mode 100644 index 000000000..3d9bd9b3b --- /dev/null +++ b/src/bb-library/Registrar/Exception.php @@ -0,0 +1,3 @@ +params = array('test' => '0'); + $no_args = func_num_args(); + switch ($no_args) { + case 1: + $this->command = func_get_arg(0); + break; + + case 2: + list($this->command, $this->params['domain']) = func_get_args(); + break; + + case 3: + list($this->command, $this->params['domain'], $this->ssl) = func_get_args(); + break; + + case 4: + list($this->command, $this->ssl, $this->user, $this->password) = func_get_args(); + break; + + case 5: + list($this->command, $this->params['domain'], $this->ssl, $this->user, $this->password) = func_get_args(); + break; + + default: + trigger_error('invalid number of arguments!', E_USER_ERROR); + + } + + $this->agent = curl_init(); + $curl_version = curl_version(); + curl_setopt($this->agent, CURLOPT_USERAGENT, sprintf( + 'CNic_Toolkit/%s (cURL %s, OpenSSL %s, PHP %s, %s %s)', + $this->VERSION, + $curl_version['version'], + $curl_version['ssl_version'], + phpversion(), + php_uname('s'), + php_uname('r') + )); + + ini_set('include_path', ini_get('include_path').':'.dirname(dirname(__FILE__))); + } + + /** + * set a query parameter + * @param string $name + * @param mixed $value + */ + function set($name, $value) { + $this->params[$name] = $value; + return true; + } + + /** + * prepare the query, execute it and return the response + * @return CNic_Toolkit_Response + */ + function execute() { + require_once('CNic/Toolkit/Response.php'); + curl_setopt($this->agent, CURLOPT_TIMEOUT, (isset($this->params['timeout']) && $this->params['timeout'] > 0 ? $this->params['timeout'] : 10)); + switch ($this->command) { + case 'suffixes': + return $this->_suffixes(); + + case 'search': + return $this->_search(); + + case 'whois': + return $this->_whois(); + + case 'create_handle': + return $this->_create_handle(); + + case 'handle_info': + return $this->_handle_info(); + + case 'register': + return $this->_register(0); + + case 'register_idn': + return $this->_register(1); + + case 'modify': + return $this->_modify(); + + case 'modify_handle': + return $this->_modify_handle(); + + case 'renewals': + return $this->_renewals(); + + case 'list_domains': + return $this->_list_domains(); + + case 'issue_renewals': + return $this->_issue_renewals(); + + case 'pricing': + return $this->_get_pricing(); + + case 'delete': + return $this->_delete_domain(); + + case 'decline': + return $this->_decline_domain(); + + case 'undecline': + return $this->_undecline_domain(); + + case 'start_transfer': + return $this->_start_transfer(); + + case 'cancel_transfer': + return $this->_cancel_transfer(); + + case 'check_transfer': + return $this->_check_transfer(); + + case 'reactivate': + return $this->_reactivate_request(); + + case 'push_domain': + return $this->_push_domain(); + + case 'auth_info': + return $this->_auth_info(); + + case 'poll_transfers': + return $this->_poll_transfers(); + + case 'approve_transfer': + return $this->_approve_transfer(); + + case 'reject_transfer': + return $this->_reject_transfer(); + + case 'list_outstanding_domains': + return $this->_list_outstanding_domains(); + + case 'submit_payment_batch': + return $this->_submit_payment_batch(); + + case 'registrant_transfer': + return $this->_registrant_transfer(); + + case 'lock_domain': + return $this->_lock_domain(); + + case 'unlock_domain': + return $this->_unlock_domain(); + + case 'validate_domain': + return $this->_validate_domain(); + + default: + trigger_error('Invalid command', E_USER_ERROR); + } + } + + /** + * @access private + */ + private function _suffixes() { + require_once('CNic/Toolkit/Response/Suffixes.php'); + $url = $this->_base().'suffixes?test='.$this->params['test']; + $this->_raw_data = $this->_request($url); + return new CNic_Toolkit_Response_Suffixes($this->_raw_data); + } + + /** + * @access private + */ + private function _search() { + require_once('CNic/Toolkit/Response/Search.php'); + $url = $this->_base().'search'; + $params = array( + 'domain' => $this->params['domain'], + 'test' => $this->params['test'] + ); + if (isset($this->params['suffixlist'])) $params['suffixlist'] = implode(',', $this->params['suffixlist']); + $this->_raw_data = $this->_request($url, $params); + return new CNic_Toolkit_Response_Search($this->_raw_data); + } + + /** + * @access private + */ + private function _whois() { + require_once('CNic/Toolkit/Response/Whois.php'); + $url = $this->_base().'wwwhois'; + $params = array( + 'domain' => $this->params['domain'], + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, $params); + return new CNic_Toolkit_Response_Whois($this->_raw_data); + } + + /** + * @access private + */ + private function _create_handle() { + require_once('CNic/Toolkit/Response/CreateHandle.php'); + $url = $this->_base().'create_handle'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'visible' => ($this->params['visible'] === 0 ? 0 : 1), + ); + if (!empty($this->params['handle']['street1'])) { + $params['name'] = $this->params['handle']['name']; + $params['company'] = $this->params['handle']['company']; + $params['street1'] = $this->params['handle']['street1']; + $params['street2'] = $this->params['handle']['street2']; + $params['street3'] = $this->params['handle']['street3']; + $params['city'] = $this->params['handle']['city']; + $params['sp'] = $this->params['handle']['sp']; + $params['postcode'] = $this->params['handle']['postcode']; + $params['country'] = $this->params['handle']['country']; + $params['phone'] = $this->params['handle']['phone']; + $params['fax'] = $this->params['handle']['fax']; + $params['email'] = $this->params['handle']['email']; + + } else { + $params['handle'] = $this->_format_handle_string($this->params['handle']); + + } + + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_CreateHandle($this->_raw_data); + } + + /** + * @access private + */ + private function _handle_info() { + require_once('CNic/Toolkit/Response/HandleInfo.php'); + $url = $this->_base().'handle_info'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'handle' => $this->params['handle'], + 'test' => $this->params['test'], + 'visible' => ($this->params['visible'] === 0 ? 0 : 1), + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_HandleInfo($this->_raw_data); + } + + /** + * @access private + */ + private function _register($idn) { + require_once('CNic/Toolkit/Response/Register.php'); + $url = $this->_base().'register'; + if (!isset($this->params['suffix'])) list($this->params['domain'], $this->params['suffix']) = explode('.', $this->params['domain'], 2); + $params = array( + 'domain' => $this->params['domain'], + 'suffix' => $this->params['suffix'], + 'registrant' => $this->params['registrant'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'chandle' => $this->_format_handle_string($this->params['chandle']), + 'thandle' => $this->_format_handle_string($this->params['thandle']), + 'period' => $this->params['period'], + 'test' => $this->params['test'] + ); + if (isset($this->params['ahandle'])) $params['ahandle'] = $this->params['ahandle']; + if (isset($this->params['bhandle'])) $params['bhandle'] = $this->params['bhandle']; + if (isset($this->params['url'])) $params['url'] = $this->params['url']; + if (isset($this->params['dns'])) $params = array_merge($params, $this->_dns_register_params($this->params['dns'])); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_Register($this->_raw_data); + } + + /** + * @access private + */ + private function _modify() { + require_once('CNic/Toolkit/Response/Modify.php'); + $url = $this->_base().'modify'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + if (isset($this->params['thandle'])) $params['thandle'] = $this->_format_handle_string($this->params['thandle']); + if (isset($this->params['chandle'])) $params['chandle'] = $this->_format_handle_string($this->params['chandle']); + if (isset($this->params['ahandle'])) $params['url'] = $this->params['ahandle']; + if (isset($this->params['bhandle'])) $params['url'] = $this->params['bhandle']; + if (isset($this->params['ttl'])) $params['ttl'] = $this->_params['ttl']; + if (isset($this->params['dns'])) $params = array_merge($params, $this->_dns_mod_params($this->params['dns'])); + if (isset($this->params['url'])) $params['url'] = $this->params['url']; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_Modify($this->_raw_data); + } + + /** + * @access private + */ + private function _modify_handle() { + require_once('CNic/Toolkit/Response/ModifyHandle.php'); + $url = $this->_base().'modify_handle'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + foreach ($this->params as $name => $value) $params[$name] = $value; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_ModifyHandle($this->_raw_data); + } + + /** + * @access private + */ + private function _renewals() { + require_once('CNic/Toolkit/Response/Renewals.php'); + $url = $this->_base().'upcoming_renewals'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'months' => $this->params['months'], + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'GET', $params); + return new CNic_Toolkit_Response_Renewals($this->_raw_data); + } + + /** + * @access private + */ + private function _list_domains() { + require_once('CNic/Toolkit/Response/DomainList.php'); + $url = $this->_base().'list_domains'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'offset' => $this->params['offset'], + 'length' => $this->params['length'], + 'orderby' => $this->params['orderby'], + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_DomainList($this->_raw_data); + } + + /** + * @access private + */ + private function _issue_renewals() { + require_once('CNic/Toolkit/Response/IssueRenewals.php'); + $url = $this->_base().'issue_renewals'; + + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password) + ); + + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + //'immediate' => $this->params['immediate'], + 'period' => $this->params['period'], + ); + for ($i = 0 ; $i < count($this->params['domains']) ; $i++) $params["domains[$i]"] = $this->params['domains'][$i]; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_IssueRenewals($this->_raw_data); + } + + /** + * @access private + */ + private function _get_pricing() { + require_once('CNic/Toolkit/Response/GetPricing.php'); + $url = $this->_base().'get_pricing'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'type' => $this->params['type'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_GetPricing($this->_raw_data); + } + + /** + * @access private + */ + private function _delete_domain() { + require_once('CNic/Toolkit/Response/DeleteDomain.php'); + $url = $this->_base().'delete_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'reason' => $this->params['reason'], + 'immediate' => $this->params['immediate'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_DeleteDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _decline_domain() { + require_once('CNic/Toolkit/Response/DeclineDomain.php'); + $url = $this->_base().'decline_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_DeclineDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _undecline_domain() { + require_once('CNic/Toolkit/Response/UnDeclineDomain.php'); + $url = $this->_base().'undecline_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_UnDeclineDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _start_transfer() { + require_once('CNic/Toolkit/Response/StartTransfer.php'); + $url = $this->_base().'start_transfer'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + ); + for ($i = 0 ; $i < count($this->params['domains']) ; $i++) $params["domains[$i]"] = $this->params['domains'][$i]; + //for ($i = 0 ; $i < count($this->params['authinfo']) ; $i++) $params["authinfo[$i]"] = $this->params['authinfo'][$i]; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_StartTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _cancel_transfer() { + require_once('CNic/Toolkit/Response/CancelTransfer.php'); + $url = $this->_base().'cancel_transfer'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_CancelTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _check_transfer() { + require_once('CNic/Toolkit/Response/CheckTransfer.php'); + $url = $this->_base().'check_transfer'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_CheckTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _reactivate_request() { + require_once('CNic/Toolkit/Response/ReactivateDomain.php'); + $url = $this->_base().'reactivation_request'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'email' => $this->params['email'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_ReactivateDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _push_domain() { + require_once('CNic/Toolkit/Response/PushDomain.php'); + $url = $this->_base().'push_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'handle' => $this->params['handle'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_PushDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _auth_info() { + require_once('CNic/Toolkit/Response/AuthInfo.php'); + $url = $this->_base().'auth_info'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_AuthInfo($this->_raw_data); + } + + /** + * @access private + */ + private function _poll_transfers() { + require_once('CNic/Toolkit/Response/PollTransfers.php'); + $url = $this->_base().'poll_transfers'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_PollTransfers($this->_raw_data); + } + + /** + * @access private + */ + private function _approve_transfer() { + require_once('CNic/Toolkit/Response/ApproveTransfer.php'); + $url = $this->_base().'approve_transfer'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_ApproveTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _reject_transfer() { + require_once('CNic/Toolkit/Response/RejectTransfer.php'); + $url = $this->_base().'reject_transfer'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_RejectTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _list_outstanding_domains() { + require_once('CNic/Toolkit/Response/ListOutstandingDomains.php'); + $url = $this->_base().'list_outstanding_domains'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_ListOutstandingDomains($this->_raw_data); + } + + /** + * @access private + */ + private function _submit_payment_batch() { + require_once('CNic/Toolkit/Response/SubmitPaymentBatch.php'); + $url = $this->_base().'submit_payment_batch'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'method' => $this->params['method'], + ); + $i = 0; + for ($i = 0 ; $i < count($this->params['domains']) ; $i++) $params["domains[$i]"] = $this->params['domains'][$i]; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_SubmitPaymentBatch($this->_raw_data); + } + + + /** + * @access private + */ + private function _registrant_transfer() { + require_once('CNic/Toolkit/Response/RegistrantTransfer.php'); + $url = $this->_base().'registrant_transfer'; + $params = array( + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'], + 'domain' => $this->params['domain'], + 'registrant' => $this->params['registrant'] + ); + foreach ($this->params as $name => $value) $params[$name] = $value; + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_RegistrantTransfer($this->_raw_data); + } + + /** + * @access private + */ + private function _lock_domain() { + require_once('CNic/Toolkit/Response/LockDomain.php'); + $url = $this->_base().'lock_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_LockDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _unlock_domain() { + require_once('CNic/Toolkit/Response/UnlockDomain.php'); + $url = $this->_base().'unlock_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_UnlockDomain($this->_raw_data); + } + + /** + * @access private + */ + private function _validate_domain() { + require_once('CNic/Toolkit/Response/ValidateDomain.php'); + $url = $this->_base().'validate_domain'; + $params = array( + 'domain' => $this->params['domain'], + 'user' => $this->user, + 'password' => $this->_crypt_md5($this->password), + 'test' => $this->params['test'] + ); + $this->_raw_data = $this->_request($url, 'POST', $params); + return new CNic_Toolkit_Response_ValidateDomain($this->_raw_data); + } + + + /***********************************************************************************************************************************/ + + /** + * @access private + */ + private function _request() { + $no_args = func_num_args(); + switch ($no_args) { + case 1: + $url = func_get_arg(0); + $method = 'GET'; + $params = array(); + break; + + case 2: + list($url, $params) = func_get_args(); + $method = 'GET'; + break; + + case 3: + list($url, $method, $params) = func_get_args(); + break; + + default: + trigger_error('invalid number of arguments to CNic_Toolkit::_get()', E_USER_ERROR); + } + + if ($method == 'POST') curl_setopt($this->agent, CURLOPT_POST, 1); + // this makes curl return the content when curl_exec() is done: + curl_setopt($this->agent, CURLOPT_RETURNTRANSFER, 1); + + $post_vars = array(); + if (count($params) > 0) { + foreach ($params as $name => $value) { + if (in_array(gettype($value), array('array', 'object', 'resource'))) trigger_error(sprintf("cannot use value of type %s as value for '%s', must be a string", gettype($value), $name), E_USER_ERROR); + $post_vars[] = sprintf('%s=%s', urlencode(strtolower($name)), urlencode($value)); + } + } + + if ($method == 'POST' && count($params) > 0) { + curl_setopt($this->agent, CURLOPT_POSTFIELDS, implode('&', $post_vars)); + + } elseif (count($params) > 0) { + $url .= '?'.implode('&', $post_vars); + + } + + curl_setopt($this->agent, CURLOPT_URL, $url); + $response = stripslashes(curl_exec($this->agent)); + if (empty($response)) { + return sprintf("Status: 1\nMessage: %s (CURL error %d)\n", + curl_error($this->agent), + curl_errno($this->agent) + ); + + } else { + return $response; + + } + } + + /** + * @access private + */ + private function _format_handle_string($handle) { + if (is_string($handle)) { + return $handle; + + } elseif (!is_array($handle)) { + trigger_error('invalid variable type passed to CNic_Toolkit::_format_handle_string()', E_USER_ERROR); + + } else { + return 'new::' . implode('::', array_values($handle)); + + } + } + + /** + * @access private + */ + private function _dns_register_params($dns) { + if (!is_array($dns)) { + trigger_error('invalid variable type passed to CNic_Toolkit::_dns_register_params()', E_USER_ERROR); + + } else { + $array = array(); + $i = 0; + foreach ($dns as $key => $value) { + $array["dns[$i]"] = (is_int($key) ? $value : sprintf('%s::%s', $key, $value)); + $i++; + } + return $array; + } + } + + /** + * @access private + */ + private function _dns_mod_params($dns) { + if (!is_array($dns)) { + trigger_error('invalid variable type passed to CNic_Toolkit::_dns_mod_params()', E_USER_ERROR); + + } else { + $array = array(); + $i = 0; + if (@count($dns['add']) > 0) { + foreach ($dns['add'] as $server) { + if (@count($server) == 2) { + $array["dns[$i]"] = sprintf('add:%s:%s', $server[0], $server[1]); + $i++; + + } elseif (!empty($server)) { + $array["dns[$i]"] = 'add:'.$server; + $i++; + + } + } + } + if ($dns['drop'] == 'all') { + $array["dns[$i]"] = 'drop:all'; + $i++; + + } elseif (@count($dns['drop']) > 0) { + foreach ($dns['drop'] as $server) { + $array["dns[$i]"] = 'drop:'.$server; + $i++; + } + } + + return $array; + } + } + + /** + * @access private + */ + private function _base() + { + if(in_array($this->command, array('whois', 'search', 'suffixes'))) + { + return 'http://' . $this->HOSTNAME.'/srv/'; + } + else + { + return 'https://' . $this->HOSTNAME.'/srv/'; + } + } + + /** + * this function forces the creation of an MD5-crypted hash. + * This is because MD5 has better support than other + * ciphers on different platforms, so we know that + * password hashes will use a cipher the server can understand + * @access private + */ + private function _crypt_md5($str) { + $salt = '$1$' . substr(md5(uniqid(rand(), 1)), 0, 8) . '$'; + $crypted = crypt($str, $salt); + return $crypted; + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response.php new file mode 100755 index 000000000..f0ce1d736 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response.php @@ -0,0 +1,89 @@ +_raw = $raw_data; + $lines = explode("\n", trim($raw_data)); + + foreach ($lines as $line) { + $line = trim($line); + if (preg_match('/:\s?/', $line)) + list($name, $value) = preg_split('/:\s?/', $line, 2); + else + $name = $value = $line; + if (preg_match('/(::|=)/', $value)) { + if (preg_match('/=/', $value)) { + $pairs = explode('::', $value); + foreach ($pairs as $pair) { + list($n, $v) = explode('=', $pair, 2); + $v = preg_replace('/^\"?/', '', $v); + $v = preg_replace('/\"?$/', '', $v); + $values[$n] = $v; + } + $this->_response[strtolower($name)][] = $values; + } else { + $this->_response[strtolower($name)][] = explode('::', $value); + } + } else { + $this->_response[strtolower($name)][] = $value; + } + } + } + + function is_success() { + return ((isset($this->_response['query-status'][0]) ? $this->_response['query-status'][0] : $this->_response['status'][0]) == 0 ? true : false); + } + + function is_error() { + return ($this->is_success() ? false : true); + } + + function error() { + return $this->response('message'); + } + + function keys() { + return array_keys($this->_response); + } + + function response($key) { + return $this->_expand($this->_response[$key]); + } + + function _expand($struct) { + if (is_string($struct)) { + return $struct; + } elseif (is_array($struct)) { + if (count($struct) == 1 && $this->is_assoc($struct)) { + return $this->_expand($struct[0]); + } else { + return $struct; + } + } else { + return false; + } + } + + // sort of a kludge to work out whether an array is associative or not + // (since "indexed" arrays in PHP are just associative arrays with ordered + // numerical keys). Walk through the keys in order and see if they're all + // numerical and sequential. This is what you get for not using XML :p + function is_assoc($array) { + $keys = array_keys($array); + for ($i = 0 ; $i < count($keys) ; $i++) { + if ($keys[$i] !== $i) return false; + } + return true; + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ApproveTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ApproveTransfer.php new file mode 100755 index 000000000..a997b13ae --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ApproveTransfer.php @@ -0,0 +1,11 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/AuthInfo.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/AuthInfo.php new file mode 100755 index 000000000..bc388bca5 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/AuthInfo.php @@ -0,0 +1,16 @@ +response('authcode'); + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CancelTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CancelTransfer.php new file mode 100755 index 000000000..1d98f92a9 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CancelTransfer.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CheckTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CheckTransfer.php new file mode 100755 index 000000000..3ed4cc919 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CheckTransfer.php @@ -0,0 +1,16 @@ +response('transfer-status'); + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CreateHandle.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CreateHandle.php new file mode 100755 index 000000000..b0b652f01 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/CreateHandle.php @@ -0,0 +1,16 @@ +response('handle'); + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeclineDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeclineDomain.php new file mode 100755 index 000000000..288c67950 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeclineDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeleteDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeleteDomain.php new file mode 100755 index 000000000..e834a2f79 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DeleteDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DomainList.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DomainList.php new file mode 100755 index 000000000..88056ade3 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/DomainList.php @@ -0,0 +1,30 @@ +keys()); + } + + function regdate($domain) { + list($status, $regdate, $expirydate) = $this->response($domain); + return $regdate; + } + + function expirydate($domain) { + list($status, $regdate, $expirydate) = $this->response($domain); + return $expirydate; + } + + function status($domain) { + list($status, $regdate, $expirydate) = $this->response($domain); + return $status; + } + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/GetPricing.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/GetPricing.php new file mode 100755 index 000000000..467c121ed --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/GetPricing.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/HandleInfo.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/HandleInfo.php new file mode 100755 index 000000000..d21435544 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/HandleInfo.php @@ -0,0 +1,13 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/IssueRenewals.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/IssueRenewals.php new file mode 100755 index 000000000..53dd49470 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/IssueRenewals.php @@ -0,0 +1,24 @@ +response('invoice'); + } + + function proforma() { + return $this->response('proforma'); + } + + function amount() { + return $this->response('amount'); + } + + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ListOutstandingDomains.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ListOutstandingDomains.php new file mode 100755 index 000000000..97a7f298f --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ListOutstandingDomains.php @@ -0,0 +1,24 @@ +keys() as $domain) { + $info = $this->response($domain); + if (is_array($info)) { + $info['domain'] = $domain; + $domains[] = $info; + } + } + return $domains; + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/LockDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/LockDomain.php new file mode 100755 index 000000000..2491c4123 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/LockDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ModifyHandle.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ModifyHandle.php new file mode 100755 index 000000000..c6408e1e0 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ModifyHandle.php @@ -0,0 +1,13 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PollTransfers.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PollTransfers.php new file mode 100755 index 000000000..2a2ef47c2 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PollTransfers.php @@ -0,0 +1,23 @@ +keys()) as $key) { + $info = $this->response($key); + $info['domain'] = preg_replace('/^domain=/', '', $key); + $info['type'] = $info[':type']; + unset($info[':type']); + $transfers[] = $info; + } + return $transfers; + } + } + +?> diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PushDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PushDomain.php new file mode 100755 index 000000000..023a6ebb7 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/PushDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ReactivateDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ReactivateDomain.php new file mode 100755 index 000000000..a4001ea4f --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/ReactivateDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Register.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Register.php new file mode 100755 index 000000000..5e7855faf --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Register.php @@ -0,0 +1,16 @@ +response('amount'); + } + + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RegistrantTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RegistrantTransfer.php new file mode 100755 index 000000000..799bc5122 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RegistrantTransfer.php @@ -0,0 +1,11 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RejectTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RejectTransfer.php new file mode 100755 index 000000000..23b92e73d --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/RejectTransfer.php @@ -0,0 +1,11 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Renewals.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Renewals.php new file mode 100755 index 000000000..51d3af199 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Renewals.php @@ -0,0 +1,25 @@ +keys(); + } + + function amount($domain) { + list($amount, $expiry) = $this->response($domain); + return $amount; + } + + function expiry($domain) { + list($amount, $expiry) = $this->response($domain); + return $expiry; + } + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Search.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Search.php new file mode 100755 index 000000000..b375b1bbc --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Search.php @@ -0,0 +1,42 @@ +keys() as $key) { + if (preg_match("/$suffix$/i", $key)) { + $data = $this->response($key); + return ($data[0] == 1 ? true : false); + } + } + return false; + } + + function registrant($suffix) { + foreach ($this->keys() as $key) { + if (preg_match("/$suffix$/i", $key)) { + $data = $this->response($key); + return $data[1]; + } + } + return false; + } + + function expiry($suffix) { + foreach ($this->keys() as $key) { + if (preg_match("/$suffix$/i", $key)) { + $data = $this->response($key); + return $data[2]; + } + } + return false; + } + + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/StartTransfer.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/StartTransfer.php new file mode 100755 index 000000000..051d5b94f --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/StartTransfer.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/SubmitPaymentBatch.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/SubmitPaymentBatch.php new file mode 100755 index 000000000..a5b36d13d --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/SubmitPaymentBatch.php @@ -0,0 +1,10 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Suffixes.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Suffixes.php new file mode 100755 index 000000000..825b9e063 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Suffixes.php @@ -0,0 +1,20 @@ +keys(); + unset($suffixes[0]); + unset($suffixes[1]); + sort($suffixes, SORT_STRING); + return $suffixes; + } + + } + +?> \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnDeclineDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnDeclineDomain.php new file mode 100755 index 000000000..8a3897bd8 --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnDeclineDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnlockDomain.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnlockDomain.php new file mode 100755 index 000000000..ab41b3e4e --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/UnlockDomain.php @@ -0,0 +1,12 @@ + diff --git a/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Whois.php b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Whois.php new file mode 100755 index 000000000..17c88069e --- /dev/null +++ b/src/bb-library/Registrar/includes/CNic/Toolkit/Response/Whois.php @@ -0,0 +1,21 @@ +_response['dns']; + } else { + return $this->_expand($this->_response[$key]); + } + } + + } + +?> diff --git a/src/bb-library/Registrar/includes/opensrs/class_xml.php b/src/bb-library/Registrar/includes/opensrs/class_xml.php new file mode 100644 index 000000000..271f20b31 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/class_xml.php @@ -0,0 +1,94 @@ +0); + foreach ($xml_values as $data) { + switch($data['type']) { + case 'open': + $last_counter_in_tag[$data['level']+1] = 0; + $new_tag = array('name' => $data['tag']); + + if(isset($data['attributes'])) $new_tag['attributes'] = $data['attributes']; + if(isset($data['value']) && trim($data['value'])) $new_tag['value'] = trim($data['value']); + + $last_tag_ar[$last_counter_in_tag[$data['level']]] = $new_tag; + $parents[$data['level']] =& $last_tag_ar; + $last_tag_ar =& $last_tag_ar[$last_counter_in_tag[$data['level']]++]; + break; + + case 'complete': + $new_tag = array('name' => $data['tag']); + + if(isset($data['attributes'])) $new_tag['attributes'] = $data['attributes']; + if(isset($data['value']) && trim($data['value'])) $new_tag['value'] = trim($data['value']); + + $last_count = count($last_tag_ar)-1; + $last_tag_ar[$last_counter_in_tag[$data['level']]++] = $new_tag; + break; + + case 'close': + $last_tag_ar =& $parents[$data['level']]; + break; + + default: + break; + }; + } + $result = $xml_array; + } + + return $result; + } + + public function getValueByPath($xml_array, $tagPath) { + $tmp_arr =& $xml_array; + $tag_path = explode('/', $tagPath); + + foreach($tag_path as $tag_name) { + $res = false; + foreach($tmp_arr as $key => $node) { + if(is_int($key) && $node['name'] == $tag_name) { + $tmp_arr = $node; + $res = true; + break; + } + } + if(!$res) return false; + } + + return $tmp_arr; + } + + public function renameFile ($path, $input) { + $result = rename ($path . $input .".xml", $path . $input .".txt"); + return $result; + } +} + + +// $arr = xml2array('test.xml'); +// print_r(getValueByPath($arr, 'tag/sub_tag/sub_sub_tag')); diff --git a/src/bb-library/Registrar/includes/opensrs/configurations/activeConfig.xml b/src/bb-library/Registrar/includes/opensrs/configurations/activeConfig.xml new file mode 100644 index 000000000..1fa89443f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/configurations/activeConfig.xml @@ -0,0 +1,4 @@ + + + example_user.xml + diff --git a/src/bb-library/Registrar/includes/opensrs/configurations/example_user.xml b/src/bb-library/Registrar/includes/opensrs/configurations/example_user.xml new file mode 100644 index 000000000..0e4594334 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/configurations/example_user.xml @@ -0,0 +1,26 @@ + + + + test + 3b6a2dd0ca99387940bb56fba15bfe8e5ac927201eac9772d7617d362c4986d78a7910b91c631abc293caf43f0dec81894901404bf4e9804 + TEST + XCP + horizon.opensrs.net + 55000 + 55443 + 2.8.0 + XML:0.1 + + + horizon.opensrs.net + 51000 + + + ssl://admin.test.hostedemail.com + 4449 + mail_user + mail_password + mail_domain + 10 + + diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authAuthenticateUser.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authAuthenticateUser.php new file mode 100644 index 000000000..c1f8ad315 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authAuthenticateUser.php @@ -0,0 +1,72 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->username)) { + trigger_error ("oSRS Error - Username string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->password)) { + trigger_error ("oSRS Error - Password string not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "AUTHENTICATE", + "object" => "USER", + "attributes" => array ( + "crypt_type" => $this->crypt_type, + "username" => $this->_dataObject->data->username, + "password" => $this->_dataObject->data->password + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangeOwnership.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangeOwnership.php new file mode 100644 index 000000000..76f75d68b --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangeOwnership.php @@ -0,0 +1,82 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->cookie)) { + trigger_error ("oSRS Error - Cookie string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->username)) { + trigger_error ("oSRS Error - Username string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->password)) { + trigger_error ("oSRS Error - Password string not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "CHANGE", + "object" => "OWNERSHIP", + "cookie" => $this->_dataObject->data->cookie, +// "registrant_ip" => "12.34.56.78", + "attributes" => array ( + "username" => $this->_dataObject->data->username, + "password" => $this->_dataObject->data->password + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->move_all) && $this->_dataObject->data->move_all != "") $cmd['attributes']['move_all'] = $this->_dataObject->data->move_all; + if (isSet($this->_dataObject->data->reg_domain) && $this->_dataObject->data->reg_domain != "") $cmd['attributes']['reg_domain'] = $this->_dataObject->data->reg_domain; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangePassword.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangePassword.php new file mode 100644 index 000000000..168e62f4d --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authChangePassword.php @@ -0,0 +1,75 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + +// if (!isSet($this->_dataObject->data->cookie)) { +// trigger_error ("oSRS Error - Cookie string is not defined.", E_USER_WARNING); +// $allPassed = false; +// } + + if (!isSet($this->_dataObject->data->reg_password)) { + trigger_error ("oSRS Error - New Password is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "CHANGE", + "object" => "PASSWORD", +// "registrant_ip" => "12.34.56.78", + "attributes" => array ( + "reg_password" => $this->_dataObject->data->reg_password + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['domain'] = $this->_dataObject->data->domain; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authCheckVersion.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authCheckVersion.php new file mode 100644 index 000000000..a116fc4f8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authCheckVersion.php @@ -0,0 +1,62 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "CHECK", + "object" => "VERSION", + "attributes" => array ( + "sender" => "OpenSRS SERVER", + "version" => "2.32", + "state" => "ready" + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendAuthcode.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendAuthcode.php new file mode 100644 index 000000000..322978407 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendAuthcode.php @@ -0,0 +1,65 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain_name)) { + trigger_error ("oSRS Error - Domain name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "SEND_AUTHCODE", + "object" => "DOMAIN", + "attributes" => array ( + "domain_name" => $this->_dataObject->data->domain_name + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendPassword.php b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendPassword.php new file mode 100644 index 000000000..b3627e4ce --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/authentication/authSendPassword.php @@ -0,0 +1,67 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain_name)) { + trigger_error ("oSRS Error - Domain name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "SEND_PASSWORD", + "object" => "DOMAIN", + "attributes" => array ( + "domain_name" => $this->_dataObject->data->domain_name, + "send_to" => $this->_dataObject->data->send_to, + "sub_user" => $this->_dataObject->data->sub_user + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkChange.php b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkChange.php new file mode 100644 index 000000000..5606d3899 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkChange.php @@ -0,0 +1,373 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->change_items) || $this->_dataObject->data->change_items == "") { + trigger_error ("oSRS Error - change_items is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->change_type) || $this->_dataObject->data->change_type == "") { + trigger_error ("oSRS Error - change_type is not defined.", E_USER_WARNING); + $allPassed = false; + }else{ + + switch($this->_dataObject->data->change_type){ + case "availability_check": + break; + case "domain_renew": + if(!$this->_allDomainRenewCheck()) + $allPassed=false; + break; + case "push_domains": + if(!$this->_allPushDomainsCheck()) + $allPassed=false; + break; + case "dns_zone": + if(!$this->_allDnsZoneCheck()) + $allPassed=false; + break; + case "dns_zone_record": + if(!$this->_allDnsZoneRecordCheck()) + $allPassed=false; + break; + case "domain_contacts": + if(!$this->_allDomainContactsCheck()) + $allPassed=false; + break; + case "domain_forwarding": + if(!$this->_allDomainForwardingCheck()) + $allPassed=false; + break; + case "domain_lock": + if(!$this->_allDomainLockCheck()) + $allPassed=false; + break; + case "domain_parked_pages": + if(!$this->_allDomainParkedPagesCheck()) + $allPassed=false; + break; + case "domain_nameservers": + if(!$this->_allDomainNameserversCheck()) + $allPassed=false; + break; + case "whois_privacy": + if(!$this->_allWhoisPrivacyCheck()) + $allPassed=false; + break; + default: + trigger_error ("oSRS Error - Unknown change type.", E_USER_WARNING); + $allPassed = false; + break; + } + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + private function _allDomainRenewCheck(){ + $allDomainRenewPassed=true; + + if(!isSet($this->_dataObject->data->period) && $this->_dataObject->data->period == "" && + !isSet($this->_dataObject->data->let_expire) && $this->_dataObject->data->let_expire == "" && + !isSet($this->_dataObject->data->auto_renew) && $this->_dataObject->data->auto_renew == "" ) { + + trigger_error ("oSRS Error - change type is domain_renew but at least one of period, let_expire or auto_renew has to be defined.", E_USER_WARNING); + $allDomainRenewPassed = false; + } + + return $allDomainRenewPassed; + } + + private function _allPushDomainsCheck(){ + $allPushDomainsPassed=true; + + if (!isSet($this->_dataObject->data->gaining_reseller_username) || $this->_dataObject->data->gaining_reseller_username == "") { + trigger_error ("oSRS Error - change type is dns_zone but gaining_reseller_username is not defined.", E_USER_WARNING); + $allPushDomainsPassed = false; + } + return $allPushDomainsPassed; + } + + private function _allDnsZoneCheck(){ + $allDnsZonePassed=true; + if (!isSet($this->_dataObject->data->apply_to_domains) || $this->_dataObject->data->apply_to_domains == "") { + trigger_error ("oSRS Error - change type is dns_zone but apply_to_domains is not defined.", E_USER_WARNING); + $allDnsZonePassed = false; + } + if (!isSet($this->_dataObject->data->dns_action) || $this->_dataObject->data->dns_action == "") { + trigger_error ("oSRS Error - change type is dns_zone but dns_action is not defined.", E_USER_WARNING); + $allDnsZonePassed = false; + } + return $allDnsZonePassed; + } + + private function _allDnsZoneRecordCheck(){ + $allDnsZoneRecordPassed=true; + if (!isSet($this->_dataObject->data->dns_action) || $this->_dataObject->data->dns_action == "") { + trigger_error ("oSRS Error - change type is dns_zone_record but dns_action is not defined.", E_USER_WARNING); + $allDnsZoneRecordPassed = false; + } + if (!isSet($this->_dataObject->data->dns_record_type) || $this->_dataObject->data->dns_record_type == "") { + trigger_error ("oSRS Error - change type is dns_zone_record but dns_record_type is not defined.", E_USER_WARNING); + $allDnsZoneRecordPassed = false; + } + if (!isSet($this->_dataObject->data->dns_record_data) || $this->_dataObject->data->dns_record_data == "") { + trigger_error ("oSRS Error - change type is dns_zone_record but dns_record_data is not defined.", E_USER_WARNING); + $allDnsZoneRecordPassed = false; + } + return $allDnsZoneRecordCheck; + } + + private function _allDomainContactsCheck(){ + $allDomainContactsPassed=true; + if (!isSet($this->_dataObject->data->type) || $this->_dataObject->data->type == "") { + trigger_error ("oSRS Error - change type is domain_contacts but type is not defined.", E_USER_WARNING); + $alllDomainContactsPassed = false; + } + if (!isSet($this->_dataObject->personal) || $this->_dataObject->personal == "") { + trigger_error ("oSRS Error - change type is domain_contacts but personal is not defined.", E_USER_WARNING); + $alllDomainContactsPassed = false; + } + return $allDomainContactsPassed; + } + + private function _allDomainForwardingCheck(){ + $allDomainForwardingPassed=true; + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - change type is domain_forwarding but op_type is not defined.", E_USER_WARNING); + $allDomainForwardingPassed = false; + } + return $allDomainForwardingPassed; + } + + private function _allDomainLockCheck(){ + $allDomainLockPassed=true; + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - change type is domain_lock but op_type is not defined.", E_USER_WARNING); + $allDomainLockPassed = false; + } + return $allDomainLockPassed; + } + + private function _allDomainNameserversCheck(){ + $allDomainNameserversPassed=true; + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - change type is domain_nameservers but op_type is not defined.", E_USER_WARNING); + $allDomainNameserversPassed = false; + } + if(!isSet($this->_dataObject->data->add_ns) && $this->_dataObject->data->add_ns == "" && + !isSet($this->_dataObject->data->remove_ns) && $this->_dataObject->data->remove_ns == "" && + !isSet($this->_dataObject->data->assign_ns) && $this->_dataObject->data->assign_ns == "" ) { + + trigger_error ("oSRS Error - change type is domain_nameservers but at least one of add_ns, remove_ns or assign_ns has to be defined.", E_USER_WARNING); + $allDomainNameserversPassed = false; + } + return $allDomainNameserversPassed; + } + + private function _allDomainParkedPagesCheck(){ + $allDomainParkedPagesPassed=true; + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - change type is domain_parked_pages but op_type is not defined.", E_USER_WARNING); + $allDomainParkedPagesPassed = false; + } + return $allDomainParkedPagesPassed; + } + + private function _allWhoisPrivacyCheck(){ + $allWhoisPrivacyPassed=true; + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - change type is whois_privacy but op_type is not defined.", E_USER_WARNING); + $allWhoisPrivacyPassed = false; + } + return $allWhoisPrivacyPassed; + } + + // Post validation functions + private function _processRequest (){ + $this->_dataObject->data->change_items = explode (",", $this->_dataObject->data->change_items); + + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'submit_bulk_change', + 'object' => 'bulk_change', + 'attributes' => array ( + 'change_type' => $this->_dataObject->data->change_type, + 'change_items' => $this->_dataObject->data->change_items + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->apply_to_locked_domains) && $this->_dataObject->data->apply_to_locked_domains != "") + $cmd['attributes']['apply_to_locked_domains'] = $this->_dataObject->data->apply_to_locked_domains; + if (isSet($this->_dataObject->data->contact_email) && $this->_dataObject->data->contact_email != "") + $cmd['attributes']['contact_email'] = $this->_dataObject->data->contact_email; + if (isSet($this->_dataObject->data->apply_to_all_reseller_items) && $this->_dataObject->data->apply_to_all_reseller_items!= "") + $cmd['attributes']['apply_to_all_reseller_items'] = $this->_dataObject->data->apply_to_all_reseller_items; + + switch($this->_dataObject->data->change_type){ + case "availability_check": + break; + case "domain_renew": + if (isSet($this->_dataObject->data->period) && $this->_dataObject->data->period!= "") + $cmd['attributes']['period'] = $this->_dataObject->data->period; + if (isSet($this->_dataObject->data->let_expire) && $this->_dataObject->data->let_expire!= "") + $cmd['attributes']['let_expire'] = $this->_dataObject->data->let_expire; + if (isSet($this->_dataObject->data->auto_renew) && $this->_dataObject->data->auto_renew!= "") + $cmd['attributes']['auto_renew'] = $this->_dataObject->data->auto_renew; + if (isSet($this->_dataObject->data->affiliate_id) && $this->_dataObject->data->affiliate_id!= "") + $cmd['attributes']['affiliate_id'] = $this->_dataObject->data->affiliate_id; + break; + case "push_domains": + if (isSet($this->_dataObject->data->gaining_reseller_username) && $this->_dataObject->data->gaining_reseller_username!= "") + $cmd['attributes']['gaining_reseller_username'] = $this->_dataObject->data->gaining_reseller_username; + break; + case "dns_zone": + if (isSet($this->_dataObject->data->apply_to_domains) && $this->_dataObject->data->apply_to_domains!= "") + $cmd['attributes']['apply_to_domains'] = $this->_dataObject->data->apply_to_domains; + if (isSet($this->_dataObject->data->dns_action) && $this->_dataObject->data->dns_action!= "") + $cmd['attributes']['dns_action'] = $this->_dataObject->data->dns_action; + if (isSet($this->_dataObject->data->dns_template) && $this->_dataObject->data->dns_template!= "") + $cmd['attributes']['dns_template'] = $this->_dataObject->data->dns_template; + if (isSet($this->_dataObject->data->only_if) && $this->_dataObject->data->only_if!= "") + $cmd['attributes']['only_if'] = $this->_dataObject->data->only_if; + if (isSet($this->_dataObject->data->force_dns_nameservers) && $this->_dataObject->data->force_dns_nameservers!= "") + $cmd['attributes']['force_dns_nameservers'] = $this->_dataObject->data->force_dns_nameservers; + break; + case "dns_zone_record": + if (isSet($this->_dataObject->data->dns_action) && $this->_dataObject->data->dns_action!= "") + $cmd['attributes']['dns_action'] = $this->_dataObject->data->dns_action; + if (isSet($this->_dataObject->data->dns_record_type) && $this->_dataObject->data->dns_record_type!= "") + $cmd['attributes']['dns_record_type'] = $this->_dataObject->data->dns_record_type; + if (isSet($this->_dataObject->data->dns_record_data->ip_address) && $this->_dataObject->data->dns_record_data->ip_address!= "") + $cmd['attributes']['dns_record_data']['ip_address'] = $this->_dataObject->data->dns_record_data->ip_address; + if (isSet($this->_dataObject->data->dns_record_data->subdomain) && $this->_dataObject->data->dns_record_data->subdomain!= "") + $cmd['attributes']['dns_record_data']['subdomain'] = $this->_dataObject->data->dns_record_data->subdomain; + if (isSet($this->_dataObject->data->dns_record_data->ipv6_address) && $this->_dataObject->data->dns_record_data->ipv6_address!= "") + $cmd['attributes']['dns_record_data']['ipv6_address'] = $this->_dataObject->data->dns_record_data->ipv6_address; + if (isSet($this->_dataObject->data->dns_record_data->hostname) && $this->_dataObject->data->dns_record_data->hostname!= "") $ + $cmd['attributes']['dns_record_data']['hostname'] = $this->_dataObject->data->dns_record_data->hostname; + if (isSet($this->_dataObject->data->dns_record_data->priority) && $this->_dataObject->data->dns_record_data->priority!= "") + $cmd['attributes']['dns_record_data']['priority'] = $this->_dataObject->data->dns_record_data->priority; + if (isSet($this->_dataObject->data->dns_record_data->weight) && $this->_dataObject->data->dns_record_data->weight!= "") + $cmd['attributes']['dns_record_data']['weight'] = $this->_dataObject->data->dns_record_data->weight; + if (isSet($this->_dataObject->data->dns_record_data->port) && $this->_dataObject->data->dns_record_data->port!= "") + $cmd['attributes']['dns_record_data']['port'] = $this->_dataObject->data->dns_record_data->port; + if (isSet($this->_dataObject->data->dns_record_data->text) && $this->_dataObject->data->dns_record_data->text!= "") + $cmd['attributes']['dns_record_data']['text'] = $this->_dataObject->data->dns_record_data->text; + if (isSet($this->_dataObject->data->only_if) && $this->_dataObject->data->only_if!= "") + $cmd['attributes']['only_if'] = $this->_dataObject->data->only_if; + break; + case "domain_contacts": + // Allows for multiple contact changes with the same data + if (isSet($this->_dataObject->data->type) && $this->_dataObject->data->type!= "" && + isSet($this->_dataObject->personal) && $this->_dataObject->personal!= ""){ + + $contact_types=explode (",", $this->_dataObject->data->type); + + $i=0; + foreach($contact_types as $contact_type){ + $cmd['attributes']['contacts'][$i]['type'] = $contact_type; + $cmd['attributes']['contacts'][$i]['set'] = $this->_createUserData(); + $i++; + } + } + break; + case "domain_forwarding": + if (isSet($this->_dataObject->data->op_type) && $this->_dataObject->data->op_type!= "") + $cmd['attributes']['op_type'] = $this->_dataObject->data->op_type; + break; + case "domain_lock": + if (isSet($this->_dataObject->data->op_type) && $this->_dataObject->data->op_type!= "") + $cmd['attributes']['op_type'] = $this->_dataObject->data->op_type; + break; + case "domain_parked_pages": + if (isSet($this->_dataObject->data->op_type) && $this->_dataObject->data->op_type!= "") + $cmd['attributes']['op_type'] = $this->_dataObject->data->op_type; + break; + case "domain_nameservers": + if (isSet($this->_dataObject->data->op_type) && $this->_dataObject->data->op_type!= "") + $cmd['attributes']['op_type'] = $this->_dataObject->data->op_type; + if (isSet($this->_dataObject->data->add_ns) && $this->_dataObject->data->add_ns!= "") + $cmd['attributes']['add_ns'] = explode(",",$this->_dataObject->data->add_ns); + if (isSet($this->_dataObject->data->remove_ns) && $this->_dataObject->data->remove_ns!= "") + $cmd['attributes']['remove_ns'] = explode(",",$this->_dataObject->data->remove_ns); + if (isSet($this->_dataObject->data->assign_ns) && $this->_dataObject->data->assign_ns!= "") + $cmd['attributes']['assign_ns'] = explode(",",$this->_dataObject->data->assign_ns); + break; + case "whois_privacy": + if (isSet($this->_dataObject->data->op_type) && $this->_dataObject->data->op_type!= "") + $cmd['attributes']['op_type'] = $this->_dataObject->data->op_type; + break; + default: + break; + } + + + + + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkSubmit.php b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkSubmit.php new file mode 100644 index 000000000..75f878727 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkSubmit.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->change_items) || $this->_dataObject->data->change_items == "") { + trigger_error ("oSRS Error - change_items is not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->change_type) || $this->_dataObject->data->change_type == "") { + trigger_error ("oSRS Error - change_type is not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - op_type is not defined.", E_USER_WARNING); + $allPassed = false; + } + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + + private function _processRequest (){ + + $this->_dataObject->data->change_items = explode(",", $this->_dataObject->data->change_items); + + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'submit', + 'object' => 'bulk_change', + 'attributes' => array ( + 'change_items' => $this->_dataObject->data->change_items, + 'change_type' => $this->_dataObject->data->change_type, + 'op_type' => $this->_dataObject->data->op_type, + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->contact_email) && $this->_dataObject->data->contact_email != "") $cmd['attributes']['contact_email'] = $this->_dataObject->data->contact_email; + if (isSet($this->_dataObject->data->apply_to_locked_domains) && $this->_dataObject->data->apply_to_locked_domains != "") $cmd['attributes']['apply_to_locked_domains'] = $this->_dataObject->data->apply_to_locked_domains; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkTransfer.php b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkTransfer.php new file mode 100644 index 000000000..d864efb41 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/bulkchange/bulkTransfer.php @@ -0,0 +1,136 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->custom_tech_contact) || $this->_dataObject->data->custom_tech_contact == "") { + trigger_error ("oSRS Error - custom_tech_contact is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->domain_list) || $this->_dataObject->data->domain_list == "") { + trigger_error ("oSRS Error - domain_list is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->reg_username) || $this->_dataObject->data->reg_username == "") { + trigger_error ("oSRS Error - reg_username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->reg_password) || $this->_dataObject->data->reg_password == "") { + trigger_error ("oSRS Error - reg_password is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) + $allPassed=$this->_allTimeRequired(); + + if ($allPassed){ + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } +} + +private function _allTimeRequired(){ + $subtest = true; + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + + return $subtest; +} + + // Post validation functions + private function _processRequest (){ + $this->_dataObject->data->domain_list = explode (",", $this->_dataObject->data->domain_list); + + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'bulk_transfer', + 'object' => 'domain', + 'attributes' => array ( + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ), + 'reg_username' => $this->_dataObject->data->reg_username, + 'reg_domain' => $this->_dataObject->data->reg_domain, + 'reg_password' => $this->_dataObject->data->reg_password, + 'custom_tech_contact' => $this->_dataObject->data->custom_tech_contact, + 'domain_list' => $this->_dataObject->data->domain_list + ) + ); + + // Command optional values + + if (isSet($this->_dataObject->data->reg_domain) || $this->_dataObject->data->reg_domain != "") $cmd['attributes']['reg_domain'] = $this->_dataObject->data->reg_domain; + + if (isSet($this->_dataObject->data->affiliate_id) && $this->_dataObject->data->affiliate_id != "") $cmd['attributes']['affiliate_id'] = $this->_dataObject->data->affiliate_id; + if (isSet($this->_dataObject->data->handle) && $this->_dataObject->data->handle != "") $cmd['attributes']['handle'] = $this->_dataObject->data->handle; + if (isSet($this->_dataObject->data->registrant_ip) && $this->_dataObject->data->registrant_ip != "") $cmd['attributes']['registrant_ip'] = $this->_dataObject->data->registrant_ip; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } + +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieDelete.php new file mode 100644 index 000000000..ba60d64be --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieDelete.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->cookie)) { + trigger_error ("oSRS Error - Cookie code not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "delete", + "object" => "cookie", +// "registrant_ip" => "12.34.56.78", + "attributes" => array ( + "cookie" => $this->_dataObject->data->cookie + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieQuit.php b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieQuit.php new file mode 100644 index 000000000..3eb4a96cf --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieQuit.php @@ -0,0 +1,57 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "quit", + "object" => "session", + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieSet.php b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieSet.php new file mode 100644 index 000000000..89bbeec4f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieSet.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->reg_username)) { + trigger_error ("oSRS Error - Username string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->reg_password)) { + trigger_error ("oSRS Error - Password string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "set", + "object" => "cookie", +// "registrant_ip" => "12.34.56.78", + "attributes" => array ( + "reg_username" => $this->_dataObject->data->reg_username, + "reg_password" => $this->_dataObject->data->reg_password, + "domain" => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieUpdate.php b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieUpdate.php new file mode 100644 index 000000000..2bb0d2874 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/cookie/cookieUpdate.php @@ -0,0 +1,96 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->reg_username)) { + trigger_error ("oSRS Error - Username string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->reg_password)) { + trigger_error ("oSRS Error - Password string not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Existing domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domain_new)) { + trigger_error ("oSRS Error - New domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->cookie)) { + trigger_error ("oSRS Error - Cookie code not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "update", + "object" => "cookie", + "cookie" => $this->_dataObject->data->cookie, + "attributes" => array ( + "reg_username" => $this->_dataObject->data->reg_username, + "reg_password" => $this->_dataObject->data->reg_password, + "domain" => $this->_dataObject->data->domain, + 'domain_new' => $this->_dataObject->data->domain_new + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsCreate.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsCreate.php new file mode 100644 index 000000000..72360704c --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsCreate.php @@ -0,0 +1,156 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'create_dns_zone', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->dns_template) && $this->_dataObject->data->dns_template != "") $cmd['attributes']['dns_template'] = $this->_dataObject->data->dns_template; + + // records - A + $a_ip_address = ""; + $a_subdomain = ""; + if (isSet($this->_dataObject->data->a_ip_address) && $this->_dataObject->data->a_ip_address != "") $a_ip_address = $this->_dataObject->data->a_ip_address; + if (isSet($this->_dataObject->data->a_subdomain) && $this->_dataObject->data->a_subdomain != "") $a_subdomain = $this->_dataObject->data->a_subdomain; + if ($a_ip_address != "" && $a_subdomain != ""){ + $cmd['attributes']['records']['A'][0] = array( + 'ip_address' => $a_ip_address, + 'subdomain' => $a_subdomain + ); + } + + // records - AAAA + $aaaa_ipv6_address = ""; + $aaaa_subdomain = ""; + if (isSet($this->_dataObject->data->aaaa_ipv6_address) && $this->_dataObject->data->aaaa_ipv6_address != "") $aaaa_ipv6_address = $this->_dataObject->data->aaaa_ipv6_address; + if (isSet($this->_dataObject->data->aaaa_subdomain) && $this->_dataObject->data->aaaa_subdomain != "") $aaaa_subdomain = $this->_dataObject->data->aaaa_subdomain; + if ($aaaa_ipv6_address != "" && $aaaa_subdomain != ""){ + $cmd['attributes']['records']['AAAA'][0] = array( + 'ipv6_address' => $aaaa_ipv6_address, + 'subdomain' =>$aaaa_subdomain + ); + } + + // records - CNAME + $cname_hostname = ""; + $cname_subdomain = ""; + if (isSet($this->_dataObject->data->cname_hostname) && $this->_dataObject->data->cname_hostname != "") $cname_hostname = $this->_dataObject->data->cname_hostname; + if (isSet($this->_dataObject->data->cname_subdomain) && $this->_dataObject->data->cname_subdomain != "") $cname_subdomain = $this->_dataObject->data->cname_subdomain; + if ($cname_hostname != "" && $cname_subdomain != ""){ + $cmd['attributes']['records']['CNAME'][0] = array( + 'hostname' => $cname_hostname, + 'subdomain' => $cname_subdomain + ); + } + + // records - MX + $mx_priority = ""; + $mx_subdomain = ""; + $mx_hostname = ""; + if (isSet($this->_dataObject->data->mx_priority) && $this->_dataObject->data->mx_priority != "") $mx_priority = $this->_dataObject->data->mx_priority; + if (isSet($this->_dataObject->data->mx_subdomain) && $this->_dataObject->data->mx_subdomain != "") $mx_subdomain = $this->_dataObject->data->mx_subdomain; + if (isSet($this->_dataObject->data->mx_hostname) && $this->_dataObject->data->mx_hostname != "") $mx_hostname = $this->_dataObject->data->mx_hostname; + if ($mx_priority != "" && $mx_subdomain != "" && $mx_hostname != ""){ + $cmd['attributes']['records']['MX'][0] = array( + 'priority' => $mx_priority, + 'subdomain' => $mx_subdomain, + 'hostname' => $mx_hostname + ); + } + + // records - SRV + $srv_priority = ""; + $srv_weight = ""; + $srv_subdomain = ""; + $srv_hostname = ""; + $srv_port = ""; + if (isSet($this->_dataObject->data->srv_priority) && $this->_dataObject->data->srv_priority != "") $srv_priority = $this->_dataObject->data->srv_priority; + if (isSet($this->_dataObject->data->srv_weight) && $this->_dataObject->data->srv_weight != "") $srv_weight = $this->_dataObject->data->srv_weight; + if (isSet($this->_dataObject->data->srv_subdomain) && $this->_dataObject->data->srv_subdomain != "") $srv_subdomain = $this->_dataObject->data->srv_subdomain; + if (isSet($this->_dataObject->data->srv_hostname) && $this->_dataObject->data->srv_hostname != "") $srv_hostname = $this->_dataObject->data->srv_hostname; + if (isSet($this->_dataObject->data->srv_port) && $this->_dataObject->data->srv_port != "") $srv_port = $this->_dataObject->data->srv_port; + if ($srv_priority != "" && $srv_weight != "" && $srv_subdomain != "" && $srv_hostname != "" && $srv_port != ""){ + $cmd['attributes']['records']['SRV'][0] = array( + 'priority' => $srv_priority, + 'weight' => $srv_weight, + 'subdomain' => $srv_subdomain, + 'hostname' => $srv_hostname, + 'port' => $srv_port + ); + } + + // records - TXT + $txt_subdomain = ""; + $txt_text = ""; + if (isSet($this->_dataObject->data->txt_subdomain) && $this->_dataObject->data->txt_subdomain != "") $txt_subdomain = $this->_dataObject->data->txt_subdomain; + if (isSet($this->_dataObject->data->txt_text) && $this->_dataObject->data->txt_text != "") $txt_text = $this->_dataObject->data->txt_text; + if ($txt_subdomain != "" && $txt_text != ""){ + $cmd['attributes']['records']['TXT'][0] = array( + 'subdomain' => $txt_subdomain, + 'text' => $txt_text + ); + } + + + + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsDelete.php new file mode 100644 index 000000000..5e2a7d3fc --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsDelete.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'delete_dns_zone', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsForce.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsForce.php new file mode 100644 index 000000000..f8ca297cd --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsForce.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'force_dns_nameservers', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsGet.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsGet.php new file mode 100644 index 000000000..08a276569 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsGet.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'get_dns_zone', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsReset.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsReset.php new file mode 100644 index 000000000..5c6fec201 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsReset.php @@ -0,0 +1,69 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'reset_dns_zone', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->dns_template) && $this->_dataObject->data->dns_template != "") $cmd['attributes']['dns_template'] = $this->_dataObject->data->dns_template; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsSet.php b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsSet.php new file mode 100644 index 000000000..58e7744f3 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/dnszone/dnsSet.php @@ -0,0 +1,156 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'set_dns_zone', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->dns_template) && $this->_dataObject->data->dns_template != "") $cmd['attributes']['dns_template'] = $this->_dataObject->data->dns_template; + + // records - A + $a_ip_address = ""; + $a_subdomain = ""; + if (isSet($this->_dataObject->data->a_ip_address) && $this->_dataObject->data->a_ip_address != "") $a_ip_address = $this->_dataObject->data->a_ip_address; + if (isSet($this->_dataObject->data->a_subdomain) && $this->_dataObject->data->a_subdomain != "") $a_subdomain = $this->_dataObject->data->a_subdomain; + if ($a_ip_address != "" && $a_subdomain != ""){ + $cmd['attributes']['records']['A'][0] = array( + 'ip_address' => $a_ip_address, + 'subdomain' => $a_subdomain + ); + } + + // records - AAAA + $aaaa_ipv6_address = ""; + $aaaa_subdomain = ""; + if (isSet($this->_dataObject->data->aaaa_ipv6_address) && $this->_dataObject->data->aaaa_ipv6_address != "") $aaaa_ipv6_address = $this->_dataObject->data->aaaa_ipv6_address; + if (isSet($this->_dataObject->data->aaaa_subdomain) && $this->_dataObject->data->aaaa_subdomain != "") $aaaa_subdomain = $this->_dataObject->data->aaaa_subdomain; + if ($aaaa_ipv6_address != "" && $aaaa_subdomain != ""){ + $cmd['attributes']['records']['AAAA'][0] = array( + 'ipv6_address' => $aaaa_ipv6_address, + 'subdomain' =>$aaaa_subdomain + ); + } + + // records - CNAME + $cname_hostname = ""; + $cname_subdomain = ""; + if (isSet($this->_dataObject->data->cname_hostname) && $this->_dataObject->data->cname_hostname != "") $cname_hostname = $this->_dataObject->data->cname_hostname; + if (isSet($this->_dataObject->data->cname_subdomain) && $this->_dataObject->data->cname_subdomain != "") $cname_subdomain = $this->_dataObject->data->cname_subdomain; + if ($cname_hostname != "" && $cname_subdomain != ""){ + $cmd['attributes']['records']['CNAME'][0] = array( + 'hostname' => $cname_hostname, + 'subdomain' => $cname_subdomain + ); + } + + // records - MX + $mx_priority = ""; + $mx_subdomain = ""; + $mx_hostname = ""; + if (isSet($this->_dataObject->data->mx_priority) && $this->_dataObject->data->mx_priority != "") $mx_priority = $this->_dataObject->data->mx_priority; + if (isSet($this->_dataObject->data->mx_subdomain) && $this->_dataObject->data->mx_subdomain != "") $mx_subdomain = $this->_dataObject->data->mx_subdomain; + if (isSet($this->_dataObject->data->mx_hostname) && $this->_dataObject->data->mx_hostname != "") $mx_hostname = $this->_dataObject->data->mx_hostname; + if ($mx_priority != "" && $mx_subdomain != "" && $mx_hostname != ""){ + $cmd['attributes']['records']['MX'][0] = array( + 'priority' => $mx_priority, + 'subdomain' => $mx_subdomain, + 'hostname' => $mx_hostname + ); + } + + // records - SRV + $srv_priority = ""; + $srv_weight = ""; + $srv_subdomain = ""; + $srv_hostname = ""; + $srv_port = ""; + if (isSet($this->_dataObject->data->srv_priority) && $this->_dataObject->data->srv_priority != "") $srv_priority = $this->_dataObject->data->srv_priority; + if (isSet($this->_dataObject->data->srv_weight) && $this->_dataObject->data->srv_weight != "") $srv_weight = $this->_dataObject->data->srv_weight; + if (isSet($this->_dataObject->data->srv_subdomain) && $this->_dataObject->data->srv_subdomain != "") $srv_subdomain = $this->_dataObject->data->srv_subdomain; + if (isSet($this->_dataObject->data->srv_hostname) && $this->_dataObject->data->srv_hostname != "") $srv_hostname = $this->_dataObject->data->srv_hostname; + if (isSet($this->_dataObject->data->srv_port) && $this->_dataObject->data->srv_port != "") $srv_port = $this->_dataObject->data->srv_port; + if ($srv_priority != "" && $srv_weight != "" && $srv_subdomain != "" && $srv_hostname != "" && $srv_port != ""){ + $cmd['attributes']['records']['SRV'][0] = array( + 'priority' => $srv_priority, + 'weight' => $srv_weight, + 'subdomain' => $srv_subdomain, + 'hostname' => $srv_hostname, + 'port' => $srv_port + ); + } + + // records - TXT + $txt_subdomain = ""; + $txt_text = ""; + if (isSet($this->_dataObject->data->txt_subdomain) && $this->_dataObject->data->txt_subdomain != "") $txt_subdomain = $this->_dataObject->data->txt_subdomain; + if (isSet($this->_dataObject->data->txt_text) && $this->_dataObject->data->txt_text != "") $txt_text = $this->_dataObject->data->txt_text; + if ($txt_subdomain != "" && $txt_text != ""){ + $cmd['attributes']['records']['TXT'][0] = array( + 'subdomain' => $txt_subdomain, + 'text' => $txt_text + ); + } + + + + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdCreate.php b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdCreate.php new file mode 100644 index 000000000..401746654 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdCreate.php @@ -0,0 +1,61 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'create_domain_forwarding', + 'object' => 'domain', + 'attributes' => array () + ); + + // Command optional values + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdDelete.php new file mode 100644 index 000000000..1636fc690 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdDelete.php @@ -0,0 +1,61 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'delete_domain_forwarding', + 'object' => 'domain', + 'attributes' => array() + ); + + // Command optional values + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdGet.php b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdGet.php new file mode 100644 index 000000000..75bfab7f5 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdGet.php @@ -0,0 +1,79 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'get_domain_forwarding', + 'object' => 'domain', +// 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult[attributes]; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdSet.php b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdSet.php new file mode 100644 index 000000000..a5240ac09 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/forwarding/fwdSet.php @@ -0,0 +1,98 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->subdomain) || $this->_dataObject->data->subdomain == "") { + trigger_error ("oSRS Error - subdomain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'set_domain_forwarding', + 'object' => 'domain', +// 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + 'forwarding' => array ( + array ( + 'subdomain' => $this->_dataObject->data->subdomain + ) + + ) + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + // Command optional values + if (isSet($this->_dataObject->data->description) && $this->_dataObject->data->description != "") $cmd['attributes']['forwarding'][0]['description'] = $this->_dataObject->data->description; + if (isSet($this->_dataObject->data->destination_url) && $this->_dataObject->data->destination_url != "") $cmd['attributes']['forwarding'][0]['destination_url'] = $this->_dataObject->data->destination_url; + if (isSet($this->_dataObject->data->enabled) && $this->_dataObject->data->enabled != "") $cmd['attributes']['forwarding'][0]['enabled'] = $this->_dataObject->data->enabled; + if (isSet($this->_dataObject->data->keywords) && $this->_dataObject->data->keywords != "") $cmd['attributes']['forwarding'][0]['keywords'] = $this->_dataObject->data->keywords; + if (isSet($this->_dataObject->data->masked) && $this->_dataObject->data->masked != "") $cmd['attributes']['forwarding'][0]['masked'] = $this->_dataObject->data->masked; + if (isSet($this->_dataObject->data->title) && $this->_dataObject->data->title != "") $cmd['attributes']['forwarding'][0]['title'] = $this->_dataObject->data->title; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/allinoneDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/allinoneDomain.php new file mode 100644 index 000000000..9e52c6eb8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/allinoneDomain.php @@ -0,0 +1,129 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $domain = ""; + $arraSelected = array (); + $arraAll = array (); + $arraCall = array (); + + if (isSet($this->_dataObject->data->domain)) { + // Grab domain name + $tdomain = $this->_dataObject->data->domain; + $tdom = explode (".", $tdomain); + $domain = $tdom[0]; + } else { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Select non empty one + if (isSet($this->_dataObject->data->selected) && $this->_dataObject->data->selected != "") $arraSelected = explode (";", $this->_dataObject->data->selected); + if (isSet($this->_dataObject->data->defaulttld) && $this->_dataObject->data->defaulttld != "") $arraAll = explode (";", $this->_dataObject->data->defaulttld); + if (count($arraSelected) == 0) { + if (count($arraAll) == 0){ + $arraCall = array (".com",".net",".org"); + } else { + $arraCall = $arraAll; + } + } else { + $arraCall = $arraSelected; + } + + + // Call function + if ($allPassed) { + $resObject = $this->_domainTLD ($domain, $arraCall); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Selected / all TLD options + private function _domainTLD($domain, $request){ + $cmd = array( + "protocol" => "XCP", + "action" => "name_suggest", + "object" => "domain", + "attributes" => array( + "searchstring" => $domain, + "service_override" => array( + "lookup" => array( + "tlds" => $request + ), + "premium" => array( + "tlds" => $request + ), + "suggestion" => array( + "tlds" => $request + ) + ), + "services" => array( + "lookup","premium","suggestion" + ) + ) + ); + + if(isSet($this->_dataObject->data->maximum) && $this->_dataObject->data->maximum != ""){ + $cmd['attributes']['service_override']['lookup']['maximum'] = $this->_dataObject->data->maximum; + $cmd['attributes']['service_override']['premium']['maximum'] = $this->_dataObject->data->maximum; + $cmd['attributes']['service_override']['suggestion']['maximum'] = $this->_dataObject->data->maximum; + } + + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // FLip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + + // empty premium + $this->resultFullRaw = $arrayResult; + + if (isSet($arrayResult['attributes'])){ + + if (isSet($arrayResult['attributes']['premium']['items'])) { + $tempHold = $arrayResult['attributes']['premium']['items']; + } else { + $tempHold = null; // Null if there are no premium domains + } + + $this->resultRaw = array ( + 'lookup' => $arrayResult['attributes']['lookup']['items'], + 'premium' => $tempHold, + 'suggestion' => $arrayResult['attributes']['suggestion']['items'] + ); + + } else { + $this->resultRaw = $arrayResult; + } + + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupBelongsToRsp.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupBelongsToRsp.php new file mode 100644 index 000000000..1b365dcd7 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupBelongsToRsp.php @@ -0,0 +1,70 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Search domain string not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "belongs_to_rsp", + "object" => "domain", + "attributes" => array ( + "domain" => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupDomain.php new file mode 100644 index 000000000..d8bc8d97c --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupDomain.php @@ -0,0 +1,110 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $domain = ""; + $arraSelected = array (); + $arraAll = array (); + $arraCall = array (); + + if (isSet($this->_dataObject->data->domain)) { + // Grab domain name + $domain = $this->_dataObject->data->domain; + } else { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Select non empty one + if (isSet($this->_dataObject->data->selected) && $this->_dataObject->data->selected != "") $arraSelected = explode (";", $this->_dataObject->data->selected); + if (isSet($this->_dataObject->data->defaulttld) && $this->_dataObject->data->defaulttld != "") $arraAll = explode (";", $this->_dataObject->data->defaulttld); + + if (count($arraSelected) == 0) { + if (count($arraAll) == 0){ + $arraCall = array (".com",".net",".org"); + } else { + $arraCall = $arraAll; + } + } else { + $arraCall = $arraSelected; + } + + // Call function + if ($allPassed) { + $resObject = $this->_domainTLD ($domain, $arraCall); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Selected / all TLD options + private function _domainTLD($domain, $request){ + $cmd = array( + "protocol" => "XCP", + "action" => "name_suggest", + "object" => "domain", + "attributes" => array( + "searchstring" => $domain, + "service_override" => array( + "lookup" => array( + "tlds" => $request + ), + ), + "services" => array( + "lookup" + ) + ) + ); + + + if(isSet($this->_dataObject->data->maximum) && $this->_dataObject->data->maximum != ""){ + $cmd['attributes']['service_override']['lookup']['maximum'] = $this->_dataObject->data->maximum; + } + +// print_r ($cmd); +// echo ("\n\n\n"); + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML +// echo ($xmlCMD); +// echo ("\n\n\n"); + $XMLresult = $this->send_cmd($xmlCMD); // Send XML +// echo ($XMLresult); +// echo ("\n\n\n"); + $arrayResult = $this->_opsHandler->decode($XMLresult); // FLip XML to Array +// print_r ($arrayResult); +// echo ("\n\n\n"); + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes']['lookup']['items'])){ + $this->resultRaw = $arrayResult['attributes']['lookup']['items']; + } else { + $this->resultRaw = $arrayResult; + } + + $this->resultFullRaw = array_merge($this->resultFullRaw, $this->resultRaw); + + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetBalance.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetBalance.php new file mode 100644 index 000000000..7cd56ebbe --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetBalance.php @@ -0,0 +1,62 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_BALANCE", + "object" => "BALANCE", + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + + if (isset($arrayResult['attributes'])) + $this->resultRaw = $arrayResult['attributes']; + else + $this->resultRaw = $arrayResult; + + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetCaBlockerList.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetCaBlockerList.php new file mode 100644 index 000000000..542f8e1a6 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetCaBlockerList.php @@ -0,0 +1,65 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "get_ca_blocker_list", + "object" => "domain", + "attributes" => array ( + "domain" => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDeletedDomains.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDeletedDomains.php new file mode 100644 index 000000000..ac8ccaf1c --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDeletedDomains.php @@ -0,0 +1,109 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + +// Maybe all attribute array should be compiled here + if (isSet($this->_dataObject->data->owner_email)) { + // Verify proper email + } + if (isSet($this->_dataObject->data->admin_email)) { + // Verify proper email + } + if (isSet($this->_dataObject->data->billing_email)) { + // Verify proper email + } + if (isSet($this->_dataObject->data->tech_email)) { + // Verify proper email + } + if (isSet($this->_dataObject->data->del_from)) { + // verify format - "2000-10-10" - YYYY-MM-DD + } + if (isSet($this->_dataObject->data->del_to)) { + // verify format - "2000-10-10" - YYYY-MM-DD + } + if (isSet($this->_dataObject->data->exp_from)) { + // verify format - "2000-10-10" - YYYY-MM-DD + } + if (isSet($this->_dataObject->data->exp_to)) { + // verify format - "2000-10-10" - YYYY-MM-DD + } + if (isSet($this->_dataObject->data->page)) { + // verify format - positive number + } + if (isSet($this->_dataObject->data->limit)) { + // verify format - postive number + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_DELETED_DOMAINS", + "object" => "domain", + "attributes" => array () + ); + + // Command optional values + if (isSet($this->_dataObject->data->owner_email) && $this->_dataObject->data->owner_email != "") $cmd['attributes']['owner_email'] = $this->_dataObject->data->owner_email; + if (isSet($this->_dataObject->data->admin_email) && $this->_dataObject->data->admin_email != "") $cmd['attributes']['admin_email'] = $this->_dataObject->data->admin_email; + if (isSet($this->_dataObject->data->billing_email) && $this->_dataObject->data->billing_email != "") $cmd['attributes']['billing_email'] = $this->_dataObject->data->billing_email; + if (isSet($this->_dataObject->data->tech_email) && $this->_dataObject->data->tech_email != "") $cmd['attributes']['tech_email'] = $this->_dataObject->data->tech_email; + if (isSet($this->_dataObject->data->del_from) && $this->_dataObject->data->del_from != "") $cmd['attributes']['del_from'] = $this->_dataObject->data->del_from; + if (isSet($this->_dataObject->data->del_to) && $this->_dataObject->data->del_to != "") $cmd['attributes']['del_to'] = $this->_dataObject->data->del_to; + if (isSet($this->_dataObject->data->exp_from) && $this->_dataObject->data->exp_from != "") $cmd['attributes']['exp_from'] = $this->_dataObject->data->exp_from; + if (isSet($this->_dataObject->data->exp_to) && $this->_dataObject->data->exp_to != "") $cmd['attributes']['exp_to'] = $this->_dataObject->data->exp_to; + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomain.php new file mode 100644 index 000000000..7e93a5378 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomain.php @@ -0,0 +1,87 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->type) || $this->_dataObject->data->type == "") { + trigger_error ("oSRS Error - type is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'get', + 'object' => 'domain', +/// 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array ( + 'type' => $this->_dataObject->data->type + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + if (isSet($this->_dataObject->data->registrant_ip) && $this->_dataObject->data->registrant_ip != "") $cmd['registrant_ip'] = $this->_dataObject->data->registrant_ip; + + // Command optional values + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->max_to_expiry) && $this->_dataObject->data->max_to_expiry != "") $cmd['attributes']['max_to_expiry'] = $this->_dataObject->data->max_to_expiry; + if (isSet($this->_dataObject->data->min_to_expiry) && $this->_dataObject->data->min_to_expiry != "") $cmd['attributes']['min_to_expiry'] = $this->_dataObject->data->min_to_expiry; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsByExpiry.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsByExpiry.php new file mode 100644 index 000000000..8eebd9bfa --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsByExpiry.php @@ -0,0 +1,82 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->exp_from)) { + trigger_error ("oSRS Error - exp_from is not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->exp_to)) { + trigger_error ("oSRS Error - exp_to is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_DOMAINS_BY_EXPIREDATE", + "object" => "DOMAIN", + "attributes" => array ( + 'exp_from' => $this->_dataObject->data->exp_from, + 'exp_to' => $this->_dataObject->data->exp_to + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsContacts.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsContacts.php new file mode 100644 index 000000000..015a6164c --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetDomainsContacts.php @@ -0,0 +1,74 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain_list)) { + trigger_error ("oSRS Error - Domain list is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $domainListArray = explode (",", $this->_dataObject->data->domain_list); + + $cmd = array( + "protocol" => "XCP", + "action" => "GET_DOMAINS_CONTACTS", + "object" => "DOMAIN", + "attributes" => array ( + 'domain_list' => $domainListArray + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetNotes.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetNotes.php new file mode 100644 index 000000000..55077eeec --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetNotes.php @@ -0,0 +1,84 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->type)) { + trigger_error ("oSRS Error - type is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_NOTES", + "object" => "DOMAIN", + "attributes" => array ( + 'domain' => $this->_dataObject->data->domain, + 'type' => $this->_dataObject->data->type + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->order_id) && $this->_dataObject->data->order_id != "") $cmd['attributes']['order_id'] = $this->_dataObject->data->order_id; + if (isSet($this->_dataObject->data->transfer_id) && $this->_dataObject->data->transfer_id != "") $cmd['attributes']['transfer_id'] = $this->_dataObject->data->transfer_id; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrderInfo.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrderInfo.php new file mode 100644 index 000000000..ce0c5b80b --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrderInfo.php @@ -0,0 +1,74 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->order_id)) { + trigger_error ("oSRS Error - order_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_ORDER_INFO", + "object" => "DOMAIN", + "attributes" => array ( + "order_id" => $this->_dataObject->data->order_id + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->order_id) && $this->_dataObject->data->order_id != "") $cmd['attributes']['order_id'] = $this->_dataObject->data->order_id; + if (isSet($this->_dataObject->data->transfer_id) && $this->_dataObject->data->transfer_id != "") $cmd['attributes']['transfer_id'] = $this->_dataObject->data->transfer_id; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrdersByDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrdersByDomain.php new file mode 100644 index 000000000..5db048178 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetOrdersByDomain.php @@ -0,0 +1,80 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_ORDERS_BY_DOMAIN", + "object" => "DOMAIN", + "attributes" => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->order_from) && $this->_dataObject->data->order_from != "") $cmd['attributes']['order_from'] = $this->_dataObject->data->order_from; + if (isSet($this->_dataObject->data->status) && $this->_dataObject->data->status != "") $cmd['attributes']['status'] = $this->_dataObject->data->status; + if (isSet($this->_dataObject->data->type) && $this->_dataObject->data->type != "") $cmd['attributes']['type'] = $this->_dataObject->data->type; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->order_to) && $this->_dataObject->data->order_to != "") $cmd['attributes']['order_to'] = $this->_dataObject->data->order_to; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetPrice.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetPrice.php new file mode 100644 index 000000000..69c415130 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/lookupGetPrice.php @@ -0,0 +1,76 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + if (!isSet($this->_dataObject->data->domain)) { + trigger_error ("oSRS Error - Domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "GET_PRICE", + "object" => "DOMAIN", + "attributes" => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->period) && $this->_dataObject->data->period != "") $cmd['attributes']['period'] = $this->_dataObject->data->period; + if (isSet($this->_dataObject->data->reg_type) && $this->_dataObject->data->reg_type != "") $cmd['attributes']['reg_type'] = $this->_dataObject->data->reg_type; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/premiumDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/premiumDomain.php new file mode 100644 index 000000000..141285487 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/premiumDomain.php @@ -0,0 +1,102 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $domain = ""; + $arraSelected = array (); + $arraAll = array (); + $arraCall = array (); + + if (isSet($this->_dataObject->data->domain)) { + // Grab domain name + $domain = $this->_dataObject->data->domain; + } else { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Select non empty one + if (isSet($this->_dataObject->data->selected) && $this->_dataObject->data->selected != "") $arraSelected = explode (";", $this->_dataObject->data->selected); + if (isSet($this->_dataObject->data->defaulttld) && $this->_dataObject->data->defaulttld != "") $arraAll = explode (";", $this->_dataObject->data->defaulttld); + if (count($arraSelected) == 0) { + if (count($arraAll) == 0){ + $arraCall = array (".com",".net",".org"); + } else { + $arraCall = $arraAll; + } + } else { + $arraCall = $arraSelected; + } + + // Call function + if ($allPassed) { + $resObject = $this->_domainTLD ($domain, $arraCall); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Selected / all TLD options + private function _domainTLD($domain, $request){ + $cmd = array( + "protocol" => "XCP", + "action" => "name_suggest", + "object" => "domain", + "attributes" => array( + "searchstring" => $domain, + "service_override" => array( + "premium" => array( + "tlds" => $request + ) + ), + "services" => array( + "premium" + ) + ) + ); + + + if(isSet($this->_dataObject->data->maximum) && $this->_dataObject->data->maximum != ""){ + $cmd['attributes']['service_override']['premium']['maximum'] = $this->_dataObject->data->maximum; + } + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // FLip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes']['premium']['items'])) { + $this->resultRaw = $arrayResult['attributes']['premium']['items']; + } else { + $this->resultRaw = $arrayResult; // Null if there are no premium domains + } + + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/lookup/suggestDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/lookup/suggestDomain.php new file mode 100644 index 000000000..393522ec5 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/lookup/suggestDomain.php @@ -0,0 +1,110 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $domain = ""; + $arraSelected = array (); + $arraAll = array (); + $arraCall = array (); + + if (isSet($this->_dataObject->data->domain)) { + // Grab domain name + $domain = $this->_dataObject->data->domain; + // $domain = htmlspecialchars($domain); + } else { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Select non empty one + if (isSet($this->_dataObject->data->selected) && $this->_dataObject->data->selected != "") $arraSelected = explode (";", $this->_dataObject->data->selected); + if (isSet($this->_dataObject->data->defaulttld) && $this->_dataObject->data->defaulttld != "") $arraAll = explode (";", $this->_dataObject->data->defaulttld); + if (count($arraSelected) == 0) { + if (count($arraAll) == 0){ + $arraCall = array (".com",".net",".org"); + } else { + $arraCall = $arraAll; + } + } else { + $arraCall = $arraSelected; + } + + // Call function + if ($allPassed) { + $resObject = $this->_domainTLD ($domain, $arraCall); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Selected / all TLD options + private function _domainTLD($domain, $request){ + $cmd = array( + "protocol" => "XCP", + "action" => "name_suggest", + "object" => "domain", + "attributes" => array( + "searchstring" => $domain, + "service_override" => array( + "suggestion" => array( + "tlds" => $request + ) + ), + "services" => array( + "suggestion" + ) + ) + ); + + if(isSet($this->_dataObject->data->maximum) && $this->_dataObject->data->maximum != ""){ + $cmd['attributes']['service_override']['suggestion']['maximum'] = $this->_dataObject->data->maximum; + } + +// print_r ($cmd); +// echo ("\n\n\n"); + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML +// echo ($xmlCMD); +// echo ("\n\n\n"); + $XMLresult = $this->send_cmd($xmlCMD); // Send XML +// echo ($XMLresult); +// echo ("\n\n\n"); + $arrayResult = $this->_opsHandler->decode($XMLresult); // FLip XML to Array +// print_r ($arrayResult); +// echo ("\n\n\n"); + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes']['suggestion']['items'])){ + $this->resultRaw = $arrayResult['attributes']['suggestion']['items']; + } else { + $this->resultRaw = $arrayResult; + } + + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsAdvancedUpdt.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsAdvancedUpdt.php new file mode 100644 index 000000000..9f90f05e1 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsAdvancedUpdt.php @@ -0,0 +1,94 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->op_type) || $this->_dataObject->data->op_type == "") { + trigger_error ("oSRS Error - op_type is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'advanced_update_nameservers', + 'object' => 'domain', +// 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array ( + 'op_type' => $this->_dataObject->data->op_type + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + // Command optional values + if (isSet($this->_dataObject->data->add_ns) && $this->_dataObject->data->add_ns != "") { + $tempAdd = explode (",", $this->_dataObject->data->add_ns); + $cmd['attributes']['add_ns'] = $tempAdd; + } + if (isSet($this->_dataObject->data->assign_ns) && $this->_dataObject->data->assign_ns != "") { + $tempAdd = explode (",", $this->_dataObject->data->assign_ns); + $cmd['attributes']['assign_ns'] = $tempAdd; + } + if (isSet($this->_dataObject->data->remove_ns) && $this->_dataObject->data->remove_ns != "") { + $tempAdd = explode (",", $this->_dataObject->data->remove_ns); + $cmd['attributes']['remove_ns'] = $tempAdd; + } + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsCreate.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsCreate.php new file mode 100644 index 000000000..af83423e6 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsCreate.php @@ -0,0 +1,89 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->name) || $this->_dataObject->data->name == "") { + trigger_error ("oSRS Error - name is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->ipaddress) || $this->_dataObject->data->ipaddress == "") { + trigger_error ("oSRS Error - ipaddress is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'create', + 'object' => 'nameserver', +// 'cookie' => $this->_dataObject->data->cookie, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'name' => $this->_dataObject->data->name, + 'ipaddress' => $this->_dataObject->data->ipaddress + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + // Command optional values + if (isSet($this->_dataObject->data->add_to_all_registry) && $this->_dataObject->data->add_to_all_registry != "") $cmd['attributes']['add_to_all_registry'] = $this->_dataObject->data->add_to_all_registry; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsDelete.php new file mode 100644 index 000000000..6eeeb3412 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsDelete.php @@ -0,0 +1,82 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->name) || $this->_dataObject->data->name == "") { + trigger_error ("oSRS Error - name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'delete', + 'object' => 'nameserver', +// 'cookie' => $this->_dataObject->data->cookie, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'name' => $this->_dataObject->data->name, + 'ipaddress' => $this->_dataObject->data->ipaddress + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsGet.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsGet.php new file mode 100644 index 000000000..86ce02f50 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsGet.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->name) || $this->_dataObject->data->name == "") { + trigger_error ("oSRS Error - name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'get', + 'object' => 'nameserver', +// 'cookie' => $this->_dataObject->data->cookie, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'name' => $this->_dataObject->data->name + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsModify.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsModify.php new file mode 100644 index 000000000..62169af82 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsModify.php @@ -0,0 +1,89 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->ipaddress) || $this->_dataObject->data->ipaddress == "") { + trigger_error ("oSRS Error - ipaddress is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->name) || $this->_dataObject->data->name == "") { + trigger_error ("oSRS Error - name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'modify', + 'object' => 'nameserver', +// 'cookie' => $this->_dataObject->data->cookie, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'ipaddress' => $this->_dataObject->data->ipaddress, + 'name' => $this->_dataObject->data->name + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + // Command optional values + if (isSet($this->_dataObject->data->new_name) && $this->_dataObject->data->new_name != "") $cmd['attributes']['new_name'] = $this->_dataObject->data->new_name; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryAdd.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryAdd.php new file mode 100644 index 000000000..9927fcb63 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryAdd.php @@ -0,0 +1,80 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->fqdn) || $this->_dataObject->data->fqdn == "") { + trigger_error ("oSRS Error - fqdn is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->tld) || $this->_dataObject->data->tld == "") { + trigger_error ("oSRS Error - tld is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->all) || $this->_dataObject->data->all == "") { + trigger_error ("oSRS Error - all is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'registry_add_ns', + 'object' => 'nameserver', + 'attributes' => array ( + 'fqdn' => $this->_dataObject->data->fqdn, + 'tld' => $this->_dataObject->data->tld, + 'all' => $this->_dataObject->data->all + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryCheck.php b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryCheck.php new file mode 100644 index 000000000..32c9f9a47 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/nameserver/nsRegistryCheck.php @@ -0,0 +1,71 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->fqdn) || $this->_dataObject->data->fqdn == "") { + trigger_error ("oSRS Error - fqdn is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->tld) || $this->_dataObject->data->tld == "") { + trigger_error ("oSRS Error - tld is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'REGISTRY_CHECK_NAMESERVER', + 'object' => 'NAMESERVER', + 'attributes' => array ( + 'fqdn' => $this->_dataObject->data->fqdn, + 'tld' => $this->_dataObject->data->tld + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persDelete.php new file mode 100644 index 000000000..9624a959f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persDelete.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'DELETE', + 'object' => 'SURNAME', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persNameSuggest.php b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persNameSuggest.php new file mode 100644 index 000000000..4779c50fd --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persNameSuggest.php @@ -0,0 +1,70 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->searchstring) || $this->_dataObject->data->searchstring == "") { + trigger_error ("oSRS Error - searchstring is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'object' => 'SURNAME', + 'action' => 'NAME_SUGGEST', + 'attributes' => array ( + 'searchstring' => $this->_dataObject->data->searchstring + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persQuery.php b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persQuery.php new file mode 100644 index 000000000..178c70d31 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persQuery.php @@ -0,0 +1,70 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'QUERY', + 'object' => 'SURNAME', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->query_dns) && $this->_dataObject->data->query_dns != "") $cmd['attributes']['query_dns'] = $this->_dataObject->data->query_dns; + if (isSet($this->_dataObject->data->query_email) && $this->_dataObject->data->query_email != "") $cmd['attributes']['query_email'] = $this->_dataObject->data->query_email; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persSUregister.php b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persSUregister.php new file mode 100644 index 000000000..52568cca1 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persSUregister.php @@ -0,0 +1,92 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->mailbox_type) || $this->_dataObject->data->mailbox_type == "") { + trigger_error ("oSRS Error - mailbox_type is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + trigger_error ("oSRS Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'SU_REGISTER', + 'object' => 'SURNAME', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + 'mailbox' => array ( + 'mailbox_type' => $this->_dataObject->data->mailbox_type, + 'password' => $this->_dataObject->data->password + ) + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->forward_email) && $this->_dataObject->data->forward_email != "") $cmd['attributes']['mailbox']['forward_email'] = $this->_dataObject->data->forward_email; + $content = ""; + $name = ""; + $type = ""; + if (isSet($this->_dataObject->data->content) && $this->_dataObject->data->content != "") $content = $this->_dataObject->data->content; + if (isSet($this->_dataObject->data->name) && $this->_dataObject->data->name != "") $name = $this->_dataObject->data->name; + if (isSet($this->_dataObject->data->type) && $this->_dataObject->data->type != "") $type = $this->_dataObject->data->type; + if ($content != "" && $name != "" && $type != ""){ + $cmd['attributes']['dnsRecords']['content'] = $content; + $cmd['attributes']['dnsRecords']['name'] = $name; + $cmd['attributes']['dnsRecords']['type'] = $type; + } + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persUpdate.php b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persUpdate.php new file mode 100644 index 000000000..70d398d86 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/personalnames/persUpdate.php @@ -0,0 +1,75 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'UPDATE', + 'object' => 'SURNAME', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->mailbox_type) && $this->_dataObject->data->mailbox_type != "") $cmd['attributes']['mailbox']['mailbox_type'] = $this->_dataObject->data->mailbox_type; + if (isSet($this->_dataObject->data->password) && $this->_dataObject->data->password != "") $cmd['attributes']['mailbox']['password'] = $this->_dataObject->data->password; + if (isSet($this->_dataObject->data->disable_forward_email) && $this->_dataObject->data->disable_forward_email != "") $cmd['attributes']['mailbox']['disable_forward_email'] = $this->_dataObject->data->disable_forward_email; + if (isSet($this->_dataObject->data->forward_email) && $this->_dataObject->data->forward_email != "") $cmd['attributes']['mailbox']['forward_email'] = $this->_dataObject->data->forward_email; + if (isSet($this->_dataObject->data->type) && $this->_dataObject->data->type != "") $cmd['attributes']['dnsRecords'][0]['type'] = $this->_dataObject->data->type; + if (isSet($this->_dataObject->data->name) && $this->_dataObject->data->name != "") $cmd['attributes']['dnsRecords'][0]['name'] = $this->_dataObject->data->name; + if (isSet($this->_dataObject->data->content) && $this->_dataObject->data->content != "") $cmd['attributes']['dnsRecords'][0]['content'] = $this->_dataObject->data->content; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provActivate.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provActivate.php new file mode 100644 index 000000000..4a5524757 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provActivate.php @@ -0,0 +1,80 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->domainname)) { + trigger_error ("oSRS Error - domainname is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + "protocol" => "XCP", + "action" => "activate", + "object" => "domain", +// "cookie" => $this->_dataObject->data->cookie, + "attributes" => array ( + 'domainname' => $this->_dataObject->data->domainname + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelActivate.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelActivate.php new file mode 100644 index 000000000..80ec19c75 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelActivate.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->order_id)) { + trigger_error ("oSRS Error - order_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'cancel_active_process', + 'object' => 'domain', + 'attributes' => array ( + 'order_id' => $this->_dataObject->data->order_id + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelPending.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelPending.php new file mode 100644 index 000000000..7fe88de29 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provCancelPending.php @@ -0,0 +1,75 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->to_date) || $this->_dataObject->data->to_date == "") { + trigger_error ("oSRS Error - to_date is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'cancel_pending_orders', + 'object' => 'order', + 'attributes' => array ( + 'to_date' => $this->_dataObject->data->to_date + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->status) && $this->_dataObject->data->status != "") { + $cmd['attributes']['status'] = explode (",", $this->_dataObject->data->status); + } + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provModify.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provModify.php new file mode 100644 index 000000000..510f87045 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provModify.php @@ -0,0 +1,471 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->affect_domains) || $this->_dataObject->data->affect_domains == "") { + trigger_error ("oSRS Error - affect_domains is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->data) || $this->_dataObject->data->data == "") { + trigger_error ("oSRS Error - data variable that defines the modify type is not defined.", E_USER_WARNING); + $allPassed = false; + + }else{ + + switch($this->_dataObject->data->data){ + case "ced_info": + if(!$this->_allCedInfoCheck()) + $allPassed=false; + break; + case "rsp_whois_info": + if(!$this->_allRspWhoisInfoCheck()) + $allPassed=false; + break; + case "trademark": + if(!$this->_allTrademarkCheck()) + $allPassed=false; + break; + case "change_ips_tag": + if(!$this->_allChangeIpsTagCheck()) + $allPassed=false; + break; + case "contact_info": + if(!$this->_allContactInfoCheck()) + $allPassed=false; + break; + case "domain_auth_info": + if(!$this->_allDomainAuthInfoCheck()) + $allPassed=false; + break; + case "expire_action": + if(!$this->_allExpireActionCheck()) + $allPassed=false; + break; + case "forwarding_email": + if(!$this->_allForwardingEmailCheck()) + $allPassed=false; + break; + case "nexus_info": + if(!$this->_allNexusInfoCheck()) + $allPassed=false; + break; + case "parkpage_state": + if(!$this->_allParkpageStateCheck()) + $allPassed=false; + break; + case "status": + if(!$this->_allStatusCheck()) + $allPassed=false; + break; + case "uk_whois_opt": + if(!$this->_allUKWhoisOptCheck()) + $allPassed=false; + break; + case "whois_privacy_state": + if(!$this->_allWhoisPrivacyStateCheck()) + $allPassed=false; + break; + default: + trigger_error ("oSRS Error - Unknown change type.", E_USER_WARNING); + $allPassed = false; + break; + } + } + + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + private function _allCedInfoCheck(){ + $allCedInfo=true; + + if (!isSet($this->_dataObject->data->ced_info) || $this->_dataObject->data->ced_info == "") { + trigger_error ("oSRS Error - change type is ced_info but ced_info is not defined.", E_USER_WARNING); + $allCedInfo = false; + } + + if (!isSet($this->_dataObject->data->ced_info->contact_type) || $this->_dataObject->data->ced_info->contact_type == "") { + trigger_error ("oSRS Error - change type is ced_info but contact_type is not defined.", E_USER_WARNING); + $allCedInfo = false; + } + if (!isSet($this->_dataObject->data->ced_info->id_number) || $this->_dataObject->data->ced_info->id_number == "") { + trigger_error ("oSRS Error - change type is ced_info but id_number is not defined.", E_USER_WARNING); + $allCedInfo = false; + } + if (!isSet($this->_dataObject->data->ced_info->legal_entity_type) || $this->_dataObject->data->ced_info->legal_entity_type == "") { + trigger_error ("oSRS Error - change type is ced_info but legal_entity_type is not defined.", E_USER_WARNING); + $allCedInfo= false; + } + if (!isSet($this->_dataObject->data->ced_info->locality_country) || $this->_dataObject->data->ced_info->locality_country == "") { + trigger_error ("oSRS Error - change type is ced_info but locality_country is not defined.", E_USER_WARNING); + $allCedInfo = false; + } + if (!isSet($this->_dataObject->data->ced_info->locality_state_prov) || $this->_dataObject->data->ced_info->locality_state_prov == "") { + trigger_error ("oSRS Error - change type is ced_info but locality_state_prov is not defined.", E_USER_WARNING); + $allCedInfo = false; + } + + return $allCedInfo; + } + + + private function _allRspWhoisInfoCheck(){ + $allRspWhoisInfo=true; + + if (!isSet($this->_dataObject->data->all) || $this->_dataObject->data->all == "") { + trigger_error ("oSRS Error - change type is change_rsp_whois_info but all is not defined.", E_USER_WARNING); + $allRspWhoisInfo = false; + } + if (!isSet($this->_dataObject->data->flag) || $this->_dataObject->data->flag == "") { + trigger_error ("oSRS Error - change type is rsp_whois_info but flag is not defined.", E_USER_WARNING); + $allRspWhoisInfo = false; + } + + return $allRspWhoisInfo; + } + + private function _allTrademarkCheck(){ + $allTrademarkInfo=true; + if (!isSet($this->_dataObject->data->trademark) || $this->_dataObject->data->trademark == "") { + trigger_error ("oSRS Error - change type is trademark but trademark is not defined.", E_USER_WARNING); + $allTrademarkInfo = false; + } + return $allTrademarkInfo; + } + + private function _allChangeIpsTagCheck(){ + $allChangeIpsTagInfo=true; + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - change type is change_ips_tag but domain is not defined.", E_USER_WARNING); + $allChangeIpsTagInfo = false; + } + if (!isSet($this->_dataObject->data->gaining_registrar_tag) || $this->_dataObject->data->gaining_registrar_tag == "") { + trigger_error ("oSRS Error - change type is change_ips_tag but gaining_registrar_tag is not defined.", E_USER_WARNING); + $allChangeIpsTagInfo = false; + } + return $allChangeIpsTagInfo; + } + + private function _allContactInfoCheck(){ + $allContactInfo=true; + if (!isSet($this->_dataObject->personal) || $this->_dataObject->personal == "") { + trigger_error ("oSRS Error - change type is contact_info but personal is not defined.", E_USER_WARNING); + $allContactInfo = false; + } + if (!isSet($this->_dataObject->data->contact_type) || $this->_dataObject->data->contact_type == "") { + trigger_error ("oSRS Error - change type is contact_info but contact_type is not defined.", E_USER_WARNING); + $allContactInfo = false; + } + + // Personal information + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - change type is contact_info but ". $reqPers[$i] ." is not defined in personal.", E_USER_WARNING); + $allContactInfo = false; + } + } + return $allContactInfo; + } + + private function _allDomainAuthInfoCheck(){ + $allDomainAuthInfo=true; + if (!isSet($this->_dataObject->data->domain_auth_info) || $this->_dataObject->data->domain_auth_info == "") { + trigger_error ("oSRS Error - data type is domain_auth_info but a domain_auth_info value is not defined.", E_USER_WARNING); + $allDomainAuthInfo = false; + } + return $allDomainAuthInfo; + } + + private function _allExpireActionCheck(){ + $allExpireActionInfo=true; + if (!isSet($this->_dataObject->data->auto_renew) || $this->_dataObject->data->auto_renew == "") { + trigger_error ("oSRS Error - data type is expire_action but auto_renew is not defined.", E_USER_WARNING); + $allExpireActionInfo = false; + } + if (!isSet($this->_dataObject->data->let_expire) || $this->_dataObject->data->let_expire == "") { + trigger_error ("oSRS Error - data type is expire_action but let_expire is not defined.", E_USER_WARNING); + $allExpireActionInfo = false; + } + return $allExpireActionInfo; + } + + private function _allForwardingEmailCheck(){ + $allForwardingEmailInfo=true; + if (!isSet($this->_dataObject->data->forwarding_email) || $this->_dataObject->data->forwarding_email == "") { + trigger_error ("oSRS Error - data type is forwarding_email but a forwarding_email is not defined.", E_USER_WARNING); + $allForwardingEmailInfo = false; + } + return $allForwardingEmailInfo; + } + + private function _allNexusInfoCheck(){ + $allNexusInfo=true; + if (!isSet($this->_dataObject->data->nexus) || $this->_dataObject->data->nexus == "") { + trigger_error ("oSRS Error - data type is nexus_info but nexus is not defined.", E_USER_WARNING); + $allNexusInfo = false; + } + if (!isSet($this->_dataObject->data->nexus->app_purpose) || $this->_dataObject->data->nexus->app_purpose == "") { + trigger_error ("oSRS Error - data type is nexus_info but app_purpose is not defined.", E_USER_WARNING); + $allNexusInfo = false; + } + if (!isSet($this->_dataObject->data->nexus->category) || $this->_dataObject->data->nexus->category == "") { + trigger_error ("oSRS Error - data type is nexus_info but category is not defined.", E_USER_WARNING); + $allNexusInfo = false; + } + return $allNexusInfo; + } + + private function _allParkpageStateCheck(){ + $allParkpageStateInfo=true; + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - data type is parkpage_state but domain is not defined.", E_USER_WARNING); + $allParkpageStateInfo = false; + } + if (!isSet($this->_dataObject->data->state) || $this->_dataObject->data->state == "") { + trigger_error ("oSRS Error - data type is parkpage_state but state is not defined.", E_USER_WARNING); + $allParkPageStateInfo = false; + } + return $allParkpageStateInfo; + } + + + private function _allUKWhoisOptCheck(){ + $allUKWhoisOptInfo=true; + if (!isSet($this->_dataObject->data->reg_type) || $this->_dataObject->data->reg_type == "") { + trigger_error ("oSRS Error - change type is uk_whois_opt but reg_type is not defined.", E_USER_WARNING); + $allUKWhoisOptInfo = false; + } + if (!isSet($this->_dataObject->data->uk_whois_opt) || $this->_dataObject->data->uk_whois_opt == "") { + trigger_error ("oSRS Error - change type is uk_whois_opt but uk_whois_opt is not defined.", E_USER_WARNING); + $allUKWhoisOptInfo = false; + } + return $allUKWhoisOptInfo; + } + + private function _allStatusCheck(){ + $allStatusInfo=true; + if (!isSet($this->_dataObject->data->lock_state) || $this->_dataObject->data->lock_state == "") { + trigger_error ("oSRS Error - data type is status but lock_state is not defined.", E_USER_WARNING); + $allStatusInfo = false; + } + if (!isSet($this->_dataObject->data->domain_name) || $this->_dataObject->data->domain_name == "") { + trigger_error ("oSRS Error - data type is status but domain_name is not defined.", E_USER_WARNING); + $allStatusInfo = false; + } + return $allStatusInfo; + } + + private function _allWhoisPrivacyStateCheck(){ + $allWhoisPrivacyStateInfo=true; + if (!isSet($this->_dataObject->data->state) || $this->_dataObject->data->state == "") { + trigger_error ("oSRS Error - change type is whois_privacy_state but state is not defined.", E_USER_WARNING); + $allWhoisPrivacyStateInfo = false; + } + return $allWhoisPrivacyStateInfo; + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'modify', + 'object' => 'DOMAIN', + 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array ( + 'affect_domains' => $this->_dataObject->data->affect_domains, + 'data' => $this->_dataObject->data->data + ) + ); + + // Command optional values + + switch($this->_dataObject->data->data){ + case "ced_info": + // ced_info data + if (isSet($this->_dataObject->data->ced_info->contact_type) && $this->_dataObject->data->ced_info->contact_type != "") + $cmd['attributes']['ced_info']['contact_type'] = $this->_dataObject->data->ced_info->contact_type; + if (isSet($this->_dataObject->data->ced_info->id_number) && $this->_dataObject->data->ced_info->id_number != "") + $cmd['attributes']['ced_info']['id_number'] = $this->_dataObject->data->ced_info->id_number; + if (isSet($this->_dataObject->data->ced_info->id_type) && $this->_dataObject->data->ced_info->id_type != "") + $cmd['attributes']['ced_info']['id_type'] = $this->_dataObject->data->ced_info->id_type; + if (isSet($this->_dataObject->data->ced_info->id_type_info) && $this->_dataObject->data->ced_info->id_type_info != "") + $cmd['attributes']['ced_info']['id_type_info'] = $this->_dataObject->data->ced_info->id_type_info; + if (isSet($this->_dataObject->data->ced_info->legal_entity_type) && $this->_dataObject->data->ced_info->legal_entity_type != "") + $cmd['attributes']['ced_info']['legal_entity_type'] = $this->_dataObject->data->ced_info->legal_entity_type; + if (isSet($this->_dataObject->data->ced_info->legal_entity_type_info) && $this->_dataObject->data->ced_info->legal_entity_type_info != "") + $cmd['attributes']['ced_info']['legal_entity_type_info'] = $this->_dataObject->data->ced_info->legal_entity_type_info; + if (isSet($this->_dataObject->data->ced_info->locality_city) && $this->_dataObject->data->ced_info->locality_city != "") + $cmd['attributes']['ced_info']['locality_city'] = $this->_dataObject->data->ced_info->locality_city; + if (isSet($this->_dataObject->data->ced_info->locality_country) && $this->_dataObject->data->ced_info->locality_country != "") + $cmd['attributes']['ced_info']['locality_country'] = $this->_dataObject->data->ced_info->locality_country; + if (isSet($this->_dataObject->data->ced_info->locality_state_prov) && $this->_dataObject->data->ced_info->locality_state_prov != "") + $cmd['attributes']['ced_info']['localicty_state_prov'] = $this->_dataObject->data->ced_info->locality_state_prov; + + break; + case "rsp_whois_info": + //rsp_whois_info data + if (isSet($this->_dataObject->data->all) && $this->_dataObject->data->all != "") + $cmd['attributes']['all'] = $this->_dataObject->data->all; + if (isSet($this->_dataObject->data->affect_domains) && $this->_dataObject->data->affect_domains != "") + $cmd['attributes']['affect_domains'] = $this->_dataObject->data->affect_domains; + if (isSet($this->_dataObject->data->flag) && $this->_dataObject->data->flag != "") + $cmd['attributes']['flag'] = $this->_dataObject->data->flag; + break; + case "trademark": + //trademark data + if (isSet($this->_dataObject->data->trademark) && $this->_dataObject->data->trademark != "") + $cmd['attributes']['trademark'] = $this->_dataObject->data->trademark; + break; + case "change_ips_tag": + //change_ips_tag data + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") + $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + if (isSet($this->_dataObject->data->change_tag_all) && $this->_dataObject->data->change_tag_all != "") + $cmd['attributes']['change_tag_all'] = $this->_dataObject->data->change_tag_all; + if (isSet($this->_dataObject->data->gaining_registrar_tag) && $this->_dataObject->data->gaining_registrar_tag != "") + $cmd['attributes']['gaining_registrar_tag'] = $this->_dataObject->data->gaining_registrar_tag; + if (isSet($this->_dataObject->data->rsp_override) && $this->_dataObject->data->rsp_override != "") + $cmd['attributes']['rsp_override'] = $this->_dataObject->data->rsp_override; + break; + case "contact_info": + //contact_info data + if (isSet($this->_dataObject->data->report_email) && $this->_dataObject->data->report_email != "") + $cmd['attributes']['report_email'] = $this->_dataObject->data->report_email; + if (isSet($this->_dataObject->data->contact_type) && $this->_dataObject->data->contact_type != ""){ + $contact_types=explode(",",$this->_dataObject->data->contact_type); + foreach($contact_types as $contact_type) + $cmd['attributes']['contact_set'][$contact_type] = $this->_createUserData(); + } + break; + case "domain_auth_info": + //domain_auth_info data + if (isSet($this->_dataObject->data->domain_auth_info) && $this->_dataObject->data->domain_auth_info != "") + $cmd['attributes']['domain_auth_info'] = $this->_dataObject->data->domain_auth_info; + break; + case "expire_action": + //expire_action data + if (isSet($this->_dataObject->data->auto_renew) && $this->_dataObject->data->auto_renew != "") + $cmd['attributes']['auto_renew'] = $this->_dataObject->data->auto_renew; + if (isSet($this->_dataObject->data->let_expire) && $this->_dataObject->data->let_expire != "") + $cmd['attributes']['let_expire'] = $this->_dataObject->data->let_expire; + break; + case "forwarding_email": + if (isSet($this->_dataObject->data->forwarding_email) && $this->_dataObject->data->forwarding_email != "") + $cmd['attributes']['forwarding_email'] = $this->_dataObject->data->forwarding_email; + break; + case "nexus_info": + //nexus_info data + if (isSet($this->_dataObject->data->nexus->app_purpose) && $this->_dataObject->data->nexus->app_purpose != "") + $cmd['attributes']['nexus']['app_purpose'] = $this->_dataObject->data->nexus->app_purpose; + if (isSet($this->_dataObject->data->nexus->category) && $this->_dataObject->data->nexus->category != "") + $cmd['attributes']['nexus']['category'] = $this->_dataObject->data->nexus->category; + if (isSet($this->_dataObject->data->nexus->validator) && $this->_dataObject->data->nexus->validator != "") + $cmd['attributes']['nexus']['validator'] = $this->_dataObject->data->nexus->validator; + break; + case "parkpage_state": + //parkpage_state + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") + $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + if (isSet($this->_dataObject->data->state) && $this->_dataObject->data->state != "") + $cmd['attributes']['state'] = $this->_dataObject->data->state; + break; + case "status": + //status data + if (isSet($this->_dataObject->data->lock_state) && $this->_dataObject->data->lock_state != "") + $cmd['attributes']['lock_state'] = $this->_dataObject->data->lock_state; + if (isSet($this->_dataObject->data->domain_name) && $this->_dataObject->data->domain_name != "") + $cmd['attributes']['domain_name'] = $this->_dataObject->data->domain_name; + break; + case "uk_whois_opt": + //uk_whois_opt + if (isSet($this->_dataObject->data->reg_type) && $this->_dataObject->data->reg_type != "") + $cmd['attributes']['reg_type'] = $this->_dataObject->data->reg_type; + if (isSet($this->_dataObject->data->uk_affect_domains) && $this->_dataObject->data->uk_affect_domains != "") + $cmd['attributes']['uk_affect_domains'] = $this->_dataObject->data->uk_affect_domains; + if (isSet($this->_dataObject->data->uk_whois_opt) && $this->_dataObject->data->uk_whois_opt != "") + $cmd['attributes']['uk_whois_opt'] = $this->_dataObject->data->uk_whois_opt; + break; + case "whois_privacy_state": + //whois_privacy_state + if (isSet($this->_dataObject->data->state) && $this->_dataObject->data->state != "") + $cmd['attributes']['state'] = $this->_dataObject->data->state; + if (isSet($this->_dataObject->data->affect_domains) && $this->_dataObject->data->affect_domains != "") + $cmd['attributes']['affect_domains'] = $this->_dataObject->data->affect_domains; + break; + default: + break; + } + + // Run the command + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + + + + } + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provProcessPending.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provProcessPending.php new file mode 100644 index 000000000..795aa64be --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provProcessPending.php @@ -0,0 +1,72 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->order_id) || $this->_dataObject->data->order_id == "") { + trigger_error ("oSRS Error - order_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'process_pending', + 'object' => 'domain', + 'attributes' => array ( + 'order_id' => $this->_dataObject->data->order_id + ) + + ); + + // Command optional values + if (isSet($this->_dataObject->data->owner_address) && $this->_dataObject->data->owner_address != "") $cmd['attributes']['owner_address'] = $this->_dataObject->data->owner_address; + if (isSet($this->_dataObject->data->command) && $this->_dataObject->data->command != "") $cmd['attributes']['command'] = $this->_dataObject->data->command; + if (isSet($this->_dataObject->data->fax_received) && $this->_dataObject->data->fax_received != "") $cmd['attributes']['fax_received'] = $this->_dataObject->data->fax_received; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provQueryQueuedRequest.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provQueryQueuedRequest.php new file mode 100644 index 000000000..5aa3c46a8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provQueryQueuedRequest.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->request_id) || $this->_dataObject->data->request_id == "") { + trigger_error ("oSRS Error - request_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'query_queued_request', + 'object' => 'domain', + 'attributes' => array ( + 'request_id' => $this->_dataObject->data->request_id + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRenew.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRenew.php new file mode 100644 index 000000000..4808938aa --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRenew.php @@ -0,0 +1,94 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->auto_renew) || $this->_dataObject->data->auto_renew == "") { + trigger_error ("oSRS Error - auto_renew is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->currentexpirationyear) || $this->_dataObject->data->currentexpirationyear == "") { + trigger_error ("oSRS Error - currentexpirationyear is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->handle) || $this->_dataObject->data->handle == "") { + trigger_error ("oSRS Error - handle is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->period) || $this->_dataObject->data->period == "") { + trigger_error ("oSRS Error - period is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'renew', + 'object' => 'DOMAIN', + 'attributes' => array ( + 'auto_renew' => $this->_dataObject->data->auto_renew, + 'currentexpirationyear' => $this->_dataObject->data->currentexpirationyear, + 'domain' => $this->_dataObject->data->domain, + 'handle' => $this->_dataObject->data->handle, + 'period' => $this->_dataObject->data->period + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->f_parkp) && $this->_dataObject->data->f_parkp != "") $cmd['attributes']['f_parkp'] = $this->_dataObject->data->f_parkp; + if (isSet($this->_dataObject->data->affiliate_id) && $this->_dataObject->data->affiliate_id != "") $cmd['attributes']['affiliate_id'] = $this->_dataObject->data->affiliate_id; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRevoke.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRevoke.php new file mode 100644 index 000000000..2ff8d9675 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provRevoke.php @@ -0,0 +1,74 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->reseller) || $this->_dataObject->data->reseller == "") { + trigger_error ("oSRS Error - reseller is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'revoke', + 'object' => 'domain', + 'attributes' => array ( + 'reseller' => $this->_dataObject->data->reseller, + 'domain' => $this->_dataObject->data->domain, + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->notes) && $this->_dataObject->data->notes != "") $cmd['attributes']['notes'] = $this->_dataObject->data->notes; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSWregister.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSWregister.php new file mode 100644 index 000000000..d3c1a374e --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSWregister.php @@ -0,0 +1,315 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validate (); + } + + public function __destruct () { + parent::__destruct(); + } + + private function _validate () { + // Command required values + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") { + // find the TLD + $this->_dataObject->data->domain = str_replace("www.", "", $this->_dataObject->data->domain); + $tld = explode (".", $this->_dataObject->data->domain); + + // Data validation with all the additional options + $allPassed = true; + $allPassed = $this->_allTimeRequired (); + if ($tld[1] == "ca") $allPassed = $this->_ccTLD_ca(); + if ($tld[1] == "asia") $allPassed = $this->_ccTLD_asia(); + if ($tld[1] == "be") $allPassed = $this->_ccTLD_be(); + if ($tld[1] == "de") $allPassed = $this->_ccTLD_de(); + if ($tld[1] == "eu") $allPassed = $this->_ccTLD_eu(); + if ($tld[1] == "name") $allPassed = $this->_ccTLD_name(); + if ($tld[1] == "us") $allPassed = $this->_ccTLD_us(); + + // Call the process function + if ($allPassed) { + $this->_processRequest ($tld[1]); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } else { + trigger_error ("oSRS Error - Domain is not defined.", E_USER_ERROR); + die(); + } + } + + // Personal Information + private function _allTimeRequired(){ + $subtest = true; + // + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + + $reqData = array ("reg_type", "reg_username", "reg_password", "domain", "custom_nameservers", "period", "custom_tech_contact", "custom_nameservers"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + + // ccTLD specific validation + private function _ccTLD_ca () { + $subtest = true; + $reqData = array ("isa_trademark", "lang_pref", "legal_type"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_asia () { + $subtest = true; + $reqData = array ("contact_type", "id_number", "id_type", "legal_entity_type", "locality_country"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->cedinfo->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_be () { + $subtest = true; + $reqData = array ("lang", "owner_confirm_address"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_de () { + $subtest = true; + $reqData = array ("owner_confirm_address"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_eu () { + $subtest = true; + $reqData = array ("country", "lang", "owner_confirm_address"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_us () { + $subtest = true; + $reqData = array ("app_purpose", "category"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->nexus->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + private function _ccTLD_name () { + $subtest = true; + $reqData = array ("forwarding_email"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $subtest = false; + } + } + return $subtest; + } + + + + + // Post validation functions + private function _processRequest ($ccTLD){ + // Compile the command + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'SW_REGISTER', + 'object' => 'DOMAIN', + 'attributes' => array( + 'reg_type' => $this->_dataObject->data->reg_type, + 'reg_username' => $this->_dataObject->data->reg_username, + 'reg_password' => $this->_dataObject->data->reg_password, + 'domain' => $this->_dataObject->data->domain, + 'custom_nameservers' => $this->_dataObject->data->custom_nameservers, + 'period' => $this->_dataObject->data->period, + 'custom_tech_contact' => $this->_dataObject->data->custom_tech_contact, + 'custom_nameservers' => $this->_dataObject->data->custom_nameservers, + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ) + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->affiliate_id) && $this->_dataObject->data->affiliate_id != "") $cmd['attributes']['affiliate_id'] = $this->_dataObject->data->affiliate_id; + if (isSet($this->_dataObject->data->auto_renew) && $this->_dataObject->data->auto_renew != "") $cmd['attributes']['auto_renew'] = $this->_dataObject->data->auto_renew; + if (isSet($this->_dataObject->data->change_contact) && $this->_dataObject->data->change_contact != "") $cmd['attributes']['change_contact'] = $this->_dataObject->data->change_contact; + if (isSet($this->_dataObject->data->custom_transfer_nameservers) && $this->_dataObject->data->custom_transfer_nameservers != "") $cmd['attributes']['custom_transfer_nameservers'] = $this->_dataObject->data->custom_transfer_nameservers; + if (isSet($this->_dataObject->data->dns_template) && $this->_dataObject->data->dns_template != "") $cmd['attributes']['dns_template'] = $this->_dataObject->data->dns_template; + if (isSet($this->_dataObject->data->encoding_type) && $this->_dataObject->data->encoding_type != "") $cmd['attributes']['encoding_type'] = $this->_dataObject->data->encoding_type; + if (isSet($this->_dataObject->data->f_lock_domain) && $this->_dataObject->data->f_lock_domain != "") $cmd['attributes']['f_lock_domain'] = $this->_dataObject->data->f_lock_domain; + if (isSet($this->_dataObject->data->f_parkp) && $this->_dataObject->data->f_parkp != "") $cmd['attributes']['f_parkp'] = $this->_dataObject->data->f_parkp; + if (isSet($this->_dataObject->data->f_whois_privacy) && $this->_dataObject->data->f_whois_privacy != "") $cmd['attributes']['f_whois_privacy'] = $this->_dataObject->data->f_whois_privacy; + if (isSet($this->_dataObject->data->handle) && $this->_dataObject->data->handle != "") $cmd['attributes']['handle'] = $this->_dataObject->data->handle; + if (isSet($this->_dataObject->data->link_domains) && $this->_dataObject->data->link_domains != "") $cmd['attributes']['link_domains'] = $this->_dataObject->data->link_domains; + if (isSet($this->_dataObject->data->master_order_id) && $this->_dataObject->data->master_order_id != "") $cmd['attributes']['master_order_id'] = $this->_dataObject->data->master_order_id; + if (isSet($this->_dataObject->data->nameserver_list) && $this->_dataObject->data->nameserver_list != "") $cmd['attributes']['nameserver_list'] = $this->_dataObject->data->nameserver_list; + if (isSet($this->_dataObject->data->premium_price_to_verify) && $this->_dataObject->data->premium_price_to_verify != "") $cmd['attributes']['premium_price_to_verify'] = $this->_dataObject->data->premium_price_to_verify; + if (isSet($this->_dataObject->data->reg_domain) && $this->_dataObject->data->reg_domain != "") $cmd['attributes']['reg_domain'] = $this->_dataObject->data->reg_domain; + + // NS records + if ($this->_dataObject->data->custom_nameservers == 1){ + for ($j=1; $j<=10; $j++){ + $tns = "name". $j; + $tso = "sortorder". $j; + + $passArray = array (); + $temHolder = array (); + if (isSet($this->_dataObject->data->$tns)){ + if ($this->_dataObject->data->$tns != ""){ + $temHolder['name'] = $this->_dataObject->data->$tns; + $temHolder['sortorder'] = $this->_dataObject->data->$tso; + array_push ($passArray, $temHolder); + } + } + } + + $cmd['attributes']['nameserver_list'] = $passArray; + } + + // ccTLD specific + if ($ccTLD == "ca") { + $cmd['attributes']['isa_trademark'] = $this->_dataObject->data->isa_trademark; + $cmd['attributes']['lang_pref'] = $this->_dataObject->data->lang_pref; + $cmd['attributes']['legal_type'] = strtoupper($this->_dataObject->data->legal_type); + if (isSet($this->_dataObject->data->ca_link_domain) && $this->_dataObject->data->ca_link_domain != "") $cmd['attributes']['ca_link_domain'] = $this->_dataObject->data->ca_link_domain; + if (isSet($this->_dataObject->data->cwa) && $this->_dataObject->data->cwa != "") $cmd['attributes']['cwa'] = $this->_dataObject->data->cwa; + if (isSet($this->_dataObject->data->domain_description) && $this->_dataObject->data->domain_description != "") $cmd['attributes']['domain_description'] = $this->_dataObject->data->domain_description; + if (isSet($this->_dataObject->data->rant_agrees) && $this->_dataObject->data->rant_agrees != "") $cmd['attributes']['rant_agrees'] = $this->_dataObject->data->rant_agrees; + if (isSet($this->_dataObject->data->rant_no) && $this->_dataObject->data->rant_no != "") $cmd['attributes']['rant_no'] = $this->_dataObject->data->rant_no; + } + + if ($ccTLD == "asia") { + $cmd['attributes']['tld_data']['ced_info']['contact_type'] = $this->_dataObject->cedinfo->contact_type; + $cmd['attributes']['tld_data']['ced_info']['id_number'] = $this->_dataObject->cedinfo->id_number; + $cmd['attributes']['tld_data']['ced_info']['id_type'] = $this->_dataObject->cedinfo->id_type; + $cmd['attributes']['tld_data']['ced_info']['legal_entity_type'] = $this->_dataObject->cedinfo->legal_entity_type; + $cmd['attributes']['tld_data']['ced_info']['locality_country'] = $this->_dataObject->cedinfo->locality_country; + if (isSet($this->_dataObject->cedinfo->id_type_info) && $this->_dataObject->cedinfo->id_type_info != "") $cmd['attributes']['tld_data']['ced_info']['id_type_info'] = $this->_dataObject->cedinfo->id_type_info; + if (isSet($this->_dataObject->cedinfo->legal_entity_type_info) && $this->_dataObject->cedinfo->legal_entity_type_info != "") $cmd['attributes']['tld_data']['ced_info']['legal_entity_type_info'] = $this->_dataObject->cedinfo->legal_entity_type_info; + if (isSet($this->_dataObject->cedinfo->locality_city) && $this->_dataObject->cedinfo->locality_city != "") $cmd['attributes']['tld_data']['ced_info']['locality_city'] = $this->_dataObject->cedinfo->locality_city; + if (isSet($this->_dataObject->cedinfo->locality_state_prov) && $this->_dataObject->cedinfo->locality_state_prov != "") $cmd['attributes']['tld_data']['ced_info']['locality_state_prov'] = $this->_dataObject->cedinfo->locality_state_prov; + } + + if ($ccTLD == "eu"){ + $cmd['attributes']['country'] = strtoupper($this->_dataObject->data->country); + $cmd['attributes']['lang'] = $this->_dataObject->data->lang; + $cmd['attributes']['owner_confirm_address'] = $this->_dataObject->data->owner_confirm_address; + } + + if ($ccTLD == "be"){ + $cmd['attributes']['lang'] = $this->_dataObject->data->lang; + $cmd['attributes']['owner_confirm_address'] = $this->_dataObject->data->owner_confirm_address; + } + + if ($ccTLD == "de"){ + $cmd['attributes']['owner_confirm_address'] = $this->_dataObject->data->owner_confirm_address; + } + + if ($ccTLD == "name") { + $cmd['attributes']['tld_data']['forwarding_email'] = $this->_dataObject->data->forwarding_email; + } + + if ($ccTLD == "us") { + $cmd['attributes']['tld_data']['nexus']['app_purpose'] = $this->_dataObject->nexus->app_purpose; + $cmd['attributes']['tld_data']['nexus']['category'] = $this->_dataObject->nexus->category; + if (isSet($this->_dataObject->nexus->validator) && $this->_dataObject->nexus->validator != "") $cmd['attributes']['tld_data']['nexus']['validator'] = $this->_dataObject->nexus->validator; + } + + + // Process the call + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSendCIRAapproval.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSendCIRAapproval.php new file mode 100644 index 000000000..2d15973dc --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provSendCIRAapproval.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'send_cira_approval_email', + 'object' => 'domain', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateAllInfo.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateAllInfo.php new file mode 100644 index 000000000..a9f87c0b5 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateAllInfo.php @@ -0,0 +1,225 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Check that the full contact set is there + if (!isSet($this->_dataObject->data->owner_contact) || $this->_dataObject->data->owner_contact == ""){ + trigger_error ("oSRS Error - owner_contact is not defined.", E_USER_WARNING); + $allPassed = false; + }else{ + if(!$this->_allRequired("owner_contact")) + $allPassed=false; + + } + if (!isSet($this->_dataObject->data->admin_contact) || $this->_dataObject->data->admin_contact == ""){ + trigger_error ("oSRS Error - admin_contact is not defined.", E_USER_WARNING); + $allPassed = false; + }else{ + if(!$this->_allRequired("admin_contact")) + $allPassed=false; + + } + if (!isSet($this->_dataObject->data->tech_contact) || $this->_dataObject->data->tech_contact == ""){ + trigger_error ("oSRS Error - tech_contact in is not defined.", E_USER_WARNING); + $allPassed = false; + }else{ + if(!$this->_allRequired("tech_contact")) + $allPassed=false; + } + if (!isSet($this->_dataObject->data->billing_contact) || $this->_dataObject->data->billing_contact == ""){ + trigger_error ("oSRS Error - billing_contact is not defined.", E_USER_WARNING); + $allPassed = false; + }else{ + if(!$this->_allRequired("billing_contact")) + $allPassed=false; + } + + //Check Nameserver Values + if (!isSet($this->_dataObject->data->nameserver_names) || $this->_dataObject->data->nameserver_names == "") { + trigger_error ("oSRS Error - The function requires at least one nameserver is provided.", E_USER_WARNING); + $allPassed = false; + } + + //Check there are the samenumber of Nameserver IP values are there are Nameserver Name values + if (isSet($this->_dataObject->data->nameserver_ips) && $this->_dataObject->data->nameserver_ips != "") { + if(count(explode(",",$this->_dataObject->data->nameserver_ips)) != count(explode(",",$this->_dataObject->data->nameserver_names))){ + trigger_error ("oSRS Error - The function requires the same number of Nameserver IP addresses as Nameserver names if you are defining Nameserver IP addresses.", E_USER_WARNING); + $allPassed = false; + } + } + + + // Run the command + if ($allPassed) { + + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + + private function _allRequired($contact){ + $allInfo = true; + // Check Contact information + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->data->$contact->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined in $contact contact set.", E_USER_WARNING); + $allInfo = false; + } + } + + return $allInfo; + } + + // Post validation functions + private function _processRequest (){ + + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'update_all_info', + 'object' => 'domain', + 'domain' => $this->_dataObject->data->domain, + 'attributes' => array ( + 'domain' =>$this->_dataObject->data->domain, + 'nameserver_list' => $name_servers, + 'contact_set' => array( + 'owner' => array( + "first_name" => $this->_dataObject->data->owner_contact->first_name, + "last_name" => $this->_dataObject->data->owner_contact->last_name, + "org_name" => $this->_dataObject->data->owner_contact->org_name, + "address1" => $this->_dataObject->data->owner_contact->address1, + "address2" => $this->_dataObject->data->owner_contact->address2, + "address3" => $this->_dataObject->data->owner_contact->address3, + "city" => $this->_dataObject->data->owner_contact->city, + "state" => $this->_dataObject->data->owner_contact->state, + "postal_code" => $this->_dataObject->data->owner_contact->postal_code, + "country" => $this->_dataObject->data->owner_contact->country, + "phone" => $this->_dataObject->data->owner_contact->phone, + "fax" => $this->_dataObject->data->owner_contact->fax, + "email" => $this->_dataObject->data->owner_contact->email, + "lang_pref" => $this->_dataObject->data->owner_contact->lang_pref + ), + + 'admin' => array( + "first_name" => $this->_dataObject->data->admin_contact->first_name, + "last_name" => $this->_dataObject->data->admin_contact->last_name, + "org_name" => $this->_dataObject->data->admin_contact->org_name, + "address1" => $this->_dataObject->data->admin_contact->address1, + "address2" => $this->_dataObject->data->admin_contact->address2, + "address3" => $this->_dataObject->data->admin_contact->address3, + "city" => $this->_dataObject->data->admin_contact->city, + "state" => $this->_dataObject->data->admin_contact->state, + "postal_code" => $this->_dataObject->data->admin_contact->postal_code, + "country" => $this->_dataObject->data->admin_contact->country, + "phone" => $this->_dataObject->data->admin_contact->phone, + "fax" => $this->_dataObject->data->admin_contact->fax, + "email" => $this->_dataObject->data->admin_contact->email, + "lang_pref" => $this->_dataObject->data->admin_contact->lang_pref + ), + + 'tech' => array( + "first_name" => $this->_dataObject->data->tech_contact->first_name, + "last_name" => $this->_dataObject->data->tech_contact->last_name, + "org_name" => $this->_dataObject->data->tech_contact->org_name, + "address1" => $this->_dataObject->data->tech_contact->address1, + "address2" => $this->_dataObject->data->tech_contact->address2, + "address3" => $this->_dataObject->data->tech_contact->address3, + "city" => $this->_dataObject->data->tech_contact->city, + "state" => $this->_dataObject->data->tech_contact->state, + "postal_code" => $this->_dataObject->data->tech_contact->postal_code, + "country" => $this->_dataObject->data->tech_contact->country, + "phone" => $this->_dataObject->data->tech_contact->phone, + "fax" => $this->_dataObject->data->tech_contact->fax, + "email" => $this->_dataObject->data->tech_contact->email, + "lang_pref" => $this->_dataObject->data->tech_contact->lang_pref + ), + 'billing' => array( + "first_name" => $this->_dataObject->data->billing_contact->first_name, + "last_name" => $this->_dataObject->data->billing_contact->last_name, + "org_name" => $this->_dataObject->data->billing_contact->org_name, + "address1" => $this->_dataObject->data->billing_contact->address1, + "address2" => $this->_dataObject->data->billing_contact->address2, + "address3" => $this->_dataObject->data->billing_contact->address3, + "city" => $this->_dataObject->data->billing_contact->city, + "state" => $this->_dataObject->data->billing_contact->state, + "postal_code" => $this->_dataObject->data->billing_contact->postal_code, + "country" => $this->_dataObject->data->billing_contact->country, + "phone" => $this->_dataObject->data->billing_contact->phone, + "fax" => $this->_dataObject->data->billing_contact->fax, + "email" => $this->_dataObject->data->billing_contact->email, + "lang_pref" => $this->_dataObject->data->billing_contact->lang_pref + ) + ) + ) + + ); + + // Command optional values + if (isSet($this->_dataObject->data->nameserver_names) && $this->_dataObject->data->nameserver_names != ""){ + + $nameServers=explode(",",$this->_dataObject->data->nameserver_names); + + if (isSet($this->_dataObject->data->nameserver_ips) && $this->_dataObject->data->nameserver_ips != "") + $ipAddresses=explode(",",$this->_dataObject->data->nameserver_ips); + + $i=0; + + foreach ($nameServers as $nameServer){ + $cmd['attributes']['nameserver_list'][$i]['fqdn'] = $nameServer; + + if(isSet($ipAddresses[$i])) + $cmd['attributes']['nameserver_list'][$i]['ipaddress'] = $ipAddresses[$i]; + + $i++; + } + + + } + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateContacts.php b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateContacts.php new file mode 100644 index 000000000..e6993449e --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/provisioning/provUpdateContacts.php @@ -0,0 +1,105 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Personal information + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + $reqData = array ("domain", "types"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } + + // Post validation functions + private function processRequest (){ + $this->_dataObject->data->types = explode (",", $this->_dataObject->data->types); + + // Compile the command + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'update_contacts', + 'object' => 'domain', + 'cookie' => $this->_dataObject->data->cookie, + 'attributes' => array( + 'domain' => $this->_dataObject->data->domain, + 'types' => $this->_dataObject->data->types, + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ) + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresActing.php b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresActing.php new file mode 100644 index 000000000..23ec834c4 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresActing.php @@ -0,0 +1,132 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + $reqData = array ("reg_username", "reg_password", "domain", "custom_nameservers", "as_subreseller", "bulk_order"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + // Run the command + if ($allPassed) { + + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'SW_REGISTER', + 'object' => 'DOMAIN', + 'attributes' => array( + 'reg_type' => 'new', + 'reg_username' => $this->_dataObject->data->reg_username, + 'reg_password' => $this->_dataObject->data->reg_password, + 'reg_domain' => $this->_dataObject->data->reg_domain, + 'affiliate_id' => $this->_dataObject->data->affiliate_id, + 'auto_renew' => $this->_dataObject->data->auto_renew, + 'domain' => $this->_dataObject->data->domain, + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ), + 'f_parkp' => $this->_dataObject->data->f_parkp, + 'f_whois_privacy' => $this->_dataObject->data->f_whois_privacy, + 'f_lock_domain' => $this->_dataObject->data->f_lock_domain, + 'period' => $this->_dataObject->data->period, + 'link_domains' => $this->_dataObject->data->link_domains, + 'custom_nameservers' => $this->_dataObject->data->custom_nameservers, + 'encoding_type' => $this->_dataObject->data->encoding_type, + 'custom_tech_contact' => $this->_dataObject->data->custom_tech_contact, + 'as_subreseller' => $this->_dataObject->data->as_subreseller, + 'bulk_order' => $this->_dataObject->data->bulk_order + ), + ); + + if ($this->_dataObject->data->custom_nameservers == 1){ + for ($j=1; $j<=10; $j++){ + $tns = "name". $j; + $tso = "sortorder". $j; + + $passArray = array (); + $temHolder = array (); + if (isSet($this->_dataObject->data->$tns)){ + if ($this->_dataObject->data->$tns != ""){ + $temHolder['name'] = $this->_dataObject->data->$tns; + $temHolder['sortorder'] = $this->_dataObject->data->$tso; + array_push ($passArray, $temHolder); + } + } + } + + $cmd['attributes']['nameserver_list'] = $passArray; + } + + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // FLip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } else { + echo ("Incorrect call data.
\n"); + } + } + + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresCreate.php b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresCreate.php new file mode 100644 index 000000000..372f50a31 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresCreate.php @@ -0,0 +1,125 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + $reqData = array ("ccp_enabled", "low_balance_email", "password", "pricing_plan", "status", "system_status_email", "username"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'CREATE', + 'object' => 'SUBRESELLER', + 'attributes' => array ( + 'ccp_enabled' => $this->_dataObject->data->ccp_enabled, + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ), + 'low_balance_email' => $this->_dataObject->data->low_balance_email, + 'password' => $this->_dataObject->data->password, + 'pricing_plan' => $this->_dataObject->data->pricing_plan, + 'status' => $this->_dataObject->data->status, + 'system_status_email' => $this->_dataObject->data->system_status_email, + 'username' => $this->_dataObject->data->username + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->payment_email) && $this->_dataObject->data->payment_email != "") $cmd['attributes']['payment_email'] = $this->_dataObject->data->payment_email; + if (isSet($this->_dataObject->data->url) && $this->_dataObject->data->url != "") $cmd['attributes']['url'] = $this->_dataObject->data->url; + if (isSet($this->_dataObject->data->nameservers) && $this->_dataObject->data->nameservers != "") { + // 'fqdn1' => 'parking1.mdnsservice.com' + $tmpArray = explode (",", $this->_dataObject->data->nameservers); + for ($i=0; $i_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresGet.php b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresGet.php new file mode 100644 index 000000000..605540d78 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresGet.php @@ -0,0 +1,70 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'object' => 'SUBRESELLER', + 'action' => 'GET', + 'attributes' => array ( + 'username' => $this->_dataObject->data->username + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresModify.php b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresModify.php new file mode 100644 index 000000000..b0f6a5c68 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresModify.php @@ -0,0 +1,122 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + $reqPers = array ("first_name", "last_name", "org_name", "address1", "city", "state", "country", "postal_code", "phone", "email", "lang_pref"); + for ($i = 0; $i < count($reqPers); $i++){ + if ($this->_dataObject->personal->$reqPers[$i] == "") { + trigger_error ("oSRS Error - ". $reqPers[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + $reqData = array ("ccp_enabled", "low_balance_email", "password", "pricing_plan", "status", "system_status_email", "username"); + for ($i = 0; $i < count($reqData); $i++){ + if ($this->_dataObject->data->$reqData[$i] == "") { + trigger_error ("oSRS Error - ". $reqData[$i] ." is not defined.", E_USER_WARNING); + $allPassed = false; + } + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'MODIFY', + 'object' => 'SUBRESELLER', + 'attributes' => array ( + 'ccp_enabled' => $this->_dataObject->data->ccp_enabled, + 'contact_set' => array( + 'owner' => $this->_createUserData(), + 'admin' => $this->_createUserData(), + 'billing' => $this->_createUserData(), + 'tech' => $this->_createUserData() + ), + 'low_balance_email' => $this->_dataObject->data->low_balance_email, + 'password' => $this->_dataObject->data->password, + 'pricing_plan' => $this->_dataObject->data->pricing_plan, + 'status' => $this->_dataObject->data->status, + 'system_status_email' => $this->_dataObject->data->system_status_email, + 'username' => $this->_dataObject->data->username + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->payment_email) && $this->_dataObject->data->payment_email != "") $cmd['attributes']['payment_email'] = $this->_dataObject->data->payment_email; + if (isSet($this->_dataObject->data->url) && $this->_dataObject->data->url != "") $cmd['attributes']['url'] = $this->_dataObject->data->url; + if (isSet($this->_dataObject->data->storefront_rwi) && $this->_dataObject->data->storefront_rwi != "") $cmd['attributes']['storefront_rwi'] = $this->_dataObject->data->storefront_rwi; + if (isSet($this->_dataObject->data->nameservers) && $this->_dataObject->data->nameservers != "") { + // 'fqdn1' => 'parking1.mdnsservice.com' + $tmpArray = explode (",", $this->_dataObject->data->nameservers); + for ($i=0; $i_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } + + + private function _createUserData(){ + $userArray = array( + "first_name" => $this->_dataObject->personal->first_name, + "last_name" => $this->_dataObject->personal->last_name, + "org_name" => $this->_dataObject->personal->org_name, + "address1" => $this->_dataObject->personal->address1, + "address2" => $this->_dataObject->personal->address2, + "address3" => $this->_dataObject->personal->address3, + "city" => $this->_dataObject->personal->city, + "state" => $this->_dataObject->personal->state, + "postal_code" => $this->_dataObject->personal->postal_code, + "country" => $this->_dataObject->personal->country, + "phone" => $this->_dataObject->personal->phone, + "fax" => $this->_dataObject->personal->fax, + "email" => $this->_dataObject->personal->email, + "url" => $this->_dataObject->personal->url, + "lang_pref" => $this->_dataObject->personal->lang_pref + ); + return $userArray; + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresPay.php b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresPay.php new file mode 100644 index 000000000..b529dce0a --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subreseller/subresPay.php @@ -0,0 +1,75 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->amount) || $this->_dataObject->data->amount == "") { + trigger_error ("oSRS Error - amount is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'object' => 'SUBRESELLER', + 'action' => 'PAY', + 'attributes' => array ( + 'amount' => $this->_dataObject->data->amount, + 'username' => $this->_dataObject->data->username + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserAdd.php b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserAdd.php new file mode 100644 index 000000000..267659523 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserAdd.php @@ -0,0 +1,96 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_username) || $this->_dataObject->data->sub_username == "") { + trigger_error ("oSRS Error - sub_username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_permission) || $this->_dataObject->data->sub_permission == "") { + trigger_error ("oSRS Error - sub_permission is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_password) || $this->_dataObject->data->sub_password == "") { + trigger_error ("oSRS Error - sub_password is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'add', + 'object' => 'subuser', +// 'cookie' => $this->_dataObject->data->cookie, + 'username' => $this->_dataObject->data->username, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'sub_username' => $this->_dataObject->data->sub_username, + 'sub_permission' => $this->_dataObject->data->sub_permission, + 'sub_password' => $this->_dataObject->data->sub_password + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserDelete.php b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserDelete.php new file mode 100644 index 000000000..5a2f7e196 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserDelete.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_id) || $this->_dataObject->data->sub_id == "") { + trigger_error ("oSRS Error - sub_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'delete', + 'object' => 'subuser', +// 'cookie' => $this->_dataObject->data->cookie, + 'username' => $this->_dataObject->data->username, + 'attributes' => array ( + 'sub_id' => $this->_dataObject->data->sub_id + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGet.php b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGet.php new file mode 100644 index 000000000..3d7ae6b17 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGet.php @@ -0,0 +1,79 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'get', + 'object' => 'subuser', +// 'registrant_ip' => '12.34.56.78', +// 'cookie' => $this->_dataObject->data->cookie, + 'username' => $this->_dataObject->data->username + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGetInfo.php b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGetInfo.php new file mode 100644 index 000000000..06d11b98e --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserGetInfo.php @@ -0,0 +1,73 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'GET', + 'object' => 'USERINFO', +// 'registrant_ip' => '216.40.46.115', +// 'cookie' => $this->_dataObject->data->cookie + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserModify.php b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserModify.php new file mode 100644 index 000000000..5d5b94be9 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/subuser/subuserModify.php @@ -0,0 +1,101 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if ((!isSet($this->_dataObject->data->cookie) || $this->_dataObject->data->cookie == "") && (!isSet($this->_dataObject->data->bypass) || $this->_dataObject->data->bypass == "")) { + trigger_error ("oSRS Error - cookie / bypass is not defined.", E_USER_WARNING); + $allPassed = false; + } + if ( $this->_dataObject->data->cookie != "" && $this->_dataObject->data->bypass != "" ) { + trigger_error ("oSRS Error - Both cookie and bypass cannot be set in one call.", E_USER_WARNING); + $allPassed = false; + } + + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + trigger_error ("oSRS Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_username) || $this->_dataObject->data->sub_username == "") { + trigger_error ("oSRS Error - sub_username is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_permission) || $this->_dataObject->data->sub_permission == "") { + trigger_error ("oSRS Error - sub_permission is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_password) || $this->_dataObject->data->sub_password == "") { + trigger_error ("oSRS Error - sub_password is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->sub_id) || $this->_dataObject->data->sub_id == "") { + trigger_error ("oSRS Error - sub_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'modify', + 'object' => 'subuser', +// 'cookie' => $this->_dataObject->data->cookie, + 'username' => $this->_dataObject->data->username, +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array ( + 'sub_username' => $this->_dataObject->data->sub_username, + 'sub_permission' => $this->_dataObject->data->sub_permission, + 'sub_password' => $this->_dataObject->data->sub_password, + 'sub_id' => $this->_dataObject->data->sub_id + ) + ); + + // Cookie / bypass + if (isSet($this->_dataObject->data->cookie) && $this->_dataObject->data->cookie != "") $cmd['cookie'] = $this->_dataObject->data->cookie; + if (isSet($this->_dataObject->data->bypass) && $this->_dataObject->data->bypass != "") $cmd['domain'] = $this->_dataObject->data->bypass; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCancel.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCancel.php new file mode 100644 index 000000000..1aefc79a8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCancel.php @@ -0,0 +1,70 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->reseller) || $this->_dataObject->data->reseller == "") { + trigger_error ("oSRS Error - reseller is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'cancel_transfer', + 'object' => 'transfer', + 'attributes' => array ( + 'reseller' => $this->_dataObject->data->reseller + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + if (isSet($this->_dataObject->data->order_id) && $this->_dataObject->data->order_id != "") $cmd['attributes']['order_id'] = $this->_dataObject->data->order_id; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCheck.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCheck.php new file mode 100644 index 000000000..774d2a2b2 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transCheck.php @@ -0,0 +1,74 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'CHECK_TRANSFER', + 'object' => 'DOMAIN', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->check_status) && $this->_dataObject->data->check_status != "") $cmd['attributes']['check_status'] = $this->_dataObject->data->check_status; + if (isSet($this->_dataObject->data->get_request_address) && $this->_dataObject->data->get_request_address != "") $cmd['attributes']['get_request_address'] = $this->_dataObject->data->get_request_address; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetAway.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetAway.php new file mode 100644 index 000000000..e1910cdb7 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetAway.php @@ -0,0 +1,78 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'GET_TRANSFERS_AWAY', + 'object' => 'domain', + 'attributes' => array () + ); + + // Command optional values + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + if (isSet($this->_dataObject->data->gaining_registrar) && $this->_dataObject->data->gaining_registrar != "") $cmd['attributes']['gaining_registrar'] = $this->_dataObject->data->gaining_registrar; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->owner_confirm_from) && $this->_dataObject->data->owner_confirm_from != "") $cmd['attributes']['owner_confirm_from'] = $this->_dataObject->data->owner_confirm_from; + if (isSet($this->_dataObject->data->owner_confirm_ip) && $this->_dataObject->data->owner_confirm_ip != "") $cmd['attributes']['owner_confirm_ip'] = $this->_dataObject->data->owner_confirm_ip; + if (isSet($this->_dataObject->data->owner_confirm_to) && $this->_dataObject->data->owner_confirm_to != "") $cmd['attributes']['owner_confirm_to'] = $this->_dataObject->data->owner_confirm_to; + if (isSet($this->_dataObject->data->owner_request_from) && $this->_dataObject->data->owner_request_from != "") $cmd['attributes']['owner_request_from'] = $this->_dataObject->data->owner_request_from; + if (isSet($this->_dataObject->data->owner_request_to) && $this->_dataObject->data->owner_request_to != "") $cmd['attributes']['owner_request_to'] = $this->_dataObject->data->owner_request_to; + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->req_from) && $this->_dataObject->data->req_from != "") $cmd['attributes']['req_from'] = $this->_dataObject->data->req_from; + if (isSet($this->_dataObject->data->req_to) && $this->_dataObject->data->req_to != "") $cmd['attributes']['req_to'] = $this->_dataObject->data->req_to; + if (isSet($this->_dataObject->data->status) && $this->_dataObject->data->status != "") $cmd['attributes']['status'] = $this->_dataObject->data->status; + if (isSet($this->_dataObject->data->registry_request_date) && $this->_dataObject->data->registry_request_date != "") $cmd['attributes']['registry_request_date'] = $this->_dataObject->data->registry_request_date; + if (isSet($this->_dataObject->data->request_address) && $this->_dataObject->data->request_address != "") $cmd['attributes']['request_address'] = $this->_dataObject->data->request_address; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetIn.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetIn.php new file mode 100644 index 000000000..2a0874778 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transGetIn.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'GET_TRANSFERS_IN', + 'object' => 'DOMAIN', +// 'registrant_ip' => '12.34.56.78', + 'attributes' => array () + ); + + // Command optional values + if (isSet($this->_dataObject->data->completed_from) && $this->_dataObject->data->completed_from != "") $cmd['attributes']['completed_from'] = $this->_dataObject->data->completed_from; + if (isSet($this->_dataObject->data->completed_to) && $this->_dataObject->data->completed_to != "") $cmd['attributes']['completed_to'] = $this->_dataObject->data->completed_to; + if (isSet($this->_dataObject->data->domain) && $this->_dataObject->data->domain != "") $cmd['attributes']['domain'] = $this->_dataObject->data->domain; + if (isSet($this->_dataObject->data->gaining_registrar) && $this->_dataObject->data->gaining_registrar != "") $cmd['attributes']['gaining_registrar'] = $this->_dataObject->data->gaining_registrar; + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != "") $cmd['attributes']['limit'] = $this->_dataObject->data->limit; + if (isSet($this->_dataObject->data->order_id) && $this->_dataObject->data->order_id != "") $cmd['attributes']['order_id'] = $this->_dataObject->data->order_id; + if (isSet($this->_dataObject->data->order_from) && $this->_dataObject->data->order_from != "") $cmd['attributes']['order_from'] = $this->_dataObject->data->order_from; + if (isSet($this->_dataObject->data->order_to) && $this->_dataObject->data->order_to != "") $cmd['attributes']['order_to'] = $this->_dataObject->data->order_to; + if (isSet($this->_dataObject->data->owner_confirm_from) && $this->_dataObject->data->owner_confirm_from != "") $cmd['attributes']['owner_confirm_from'] = $this->_dataObject->data->owner_confirm_from; + if (isSet($this->_dataObject->data->owner_confirm_ip) && $this->_dataObject->data->owner_confirm_ip != "") $cmd['attributes']['owner_confirm_ip'] = $this->_dataObject->data->owner_confirm_ip; + if (isSet($this->_dataObject->data->owner_confirm_to) && $this->_dataObject->data->owner_confirm_to != "") $cmd['attributes']['owner_confirm_to'] = $this->_dataObject->data->owner_confirm_to; + if (isSet($this->_dataObject->data->owner_request_from) && $this->_dataObject->data->owner_request_from != "") $cmd['attributes']['owner_request_from'] = $this->_dataObject->data->owner_request_from; + if (isSet($this->_dataObject->data->owner_request_to) && $this->_dataObject->data->owner_request_to != "") $cmd['attributes']['owner_request_to'] = $this->_dataObject->data->owner_request_to; + if (isSet($this->_dataObject->data->page) && $this->_dataObject->data->page != "") $cmd['attributes']['page'] = $this->_dataObject->data->page; + if (isSet($this->_dataObject->data->req_from) && $this->_dataObject->data->req_from != "") $cmd['attributes']['req_from'] = $this->_dataObject->data->req_from; + if (isSet($this->_dataObject->data->req_to) && $this->_dataObject->data->req_to != "") $cmd['attributes']['req_to'] = $this->_dataObject->data->req_to; + if (isSet($this->_dataObject->data->request_address) && $this->_dataObject->data->request_address != "") $cmd['attributes']['request_address'] = $this->_dataObject->data->request_address; + if (isSet($this->_dataObject->data->status) && $this->_dataObject->data->status != "") $cmd['attributes']['status'] = $this->_dataObject->data->status; + if (isSet($this->_dataObject->data->transfer_id) && $this->_dataObject->data->transfer_id != "") $cmd['attributes']['transfer_id'] = $this->_dataObject->data->transfer_id; + if (isSet($this->_dataObject->data->losing_registrar) && $this->_dataObject->data->losing_registrar != "") $cmd['attributes']['losing_registrar'] = $this->_dataObject->data->losing_registrar; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + if (isSet($arrayResult['attributes'])){ + $this->resultRaw = $arrayResult['attributes']; + } else { + $this->resultRaw = $arrayResult; + } + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transProcess.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transProcess.php new file mode 100644 index 000000000..5ab3e696d --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transProcess.php @@ -0,0 +1,71 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->order_id) || $this->_dataObject->data->order_id == "") { + trigger_error ("oSRS Error - order_id is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->reseller) || $this->_dataObject->data->reseller == "") { + trigger_error ("oSRS Error - reseller is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'PROCESS_TRANSFER', + 'object' => 'TRANSFER', + 'attributes' => array( + 'order_id' => $this->_dataObject->data->order_id, + 'reseller' => $this->_dataObject->data->reseller + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transRsp2Rsp.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transRsp2Rsp.php new file mode 100644 index 000000000..05c41641f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transRsp2Rsp.php @@ -0,0 +1,74 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->grsp) || $this->_dataObject->data->grsp == "") { + trigger_error ("oSRS Error - grsp is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'RSP2RSP_PUSH_TRANSFER', + 'attributes' => array ( + 'domain' => $this->_dataObject->data->domain, + 'grsp' => $this->_dataObject->data->grsp + ) + ); + + // Command optional values + if (isSet($this->_dataObject->data->username) && $this->_dataObject->data->username != "") $cmd['attributes']['username'] = $this->_dataObject->data->username; + if (isSet($this->_dataObject->data->password) && $this->_dataObject->data->password != "") $cmd['attributes']['password'] = $this->_dataObject->data->password; + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transSendPass.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transSendPass.php new file mode 100644 index 000000000..5bf3f6e9e --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transSendPass.php @@ -0,0 +1,66 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->domain_name) || $this->_dataObject->data->domain_name == "") { + trigger_error ("oSRS Error - domain_name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'send_password', + 'object' => 'transfer', + 'attributes' => array ( + 'domain_name' => $this->_dataObject->data->domain_name + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/domains/transfer/transTradeDomain.php b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transTradeDomain.php new file mode 100644 index 000000000..7ec7e9b31 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/domains/transfer/transTradeDomain.php @@ -0,0 +1,86 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + + // Command required values + if (!isSet($this->_dataObject->data->first_name) || $this->_dataObject->data->first_name == "") { + trigger_error ("oSRS Error - first_name is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->last_name) || $this->_dataObject->data->last_name == "") { + trigger_error ("oSRS Error - last_name is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->email) || $this->_dataObject->data->email == "") { + trigger_error ("oSRS Error - email is not defined.", E_USER_WARNING); + $allPassed = false; + } + if (!isSet($this->_dataObject->data->org_name) || $this->_dataObject->data->org_name == "") { + trigger_error ("oSRS Error - org_name is not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest (); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest (){ + $cmd = array( + 'protocol' => 'XCP', + 'action' => 'TRADE_DOMAIN', + 'object' => 'DOMAIN', + 'attributes' => array ( + 'first_name' => $this->_dataObject->data->first_name, + 'last_name' => $this->_dataObject->data->last_name, + 'domain' => $this->_dataObject->data->domain, + 'email' => $this->_dataObject->data->email, + 'org_name' => $this->_dataObject->data->org_name + ) + ); + + $xmlCMD = $this->_opsHandler->encode($cmd); // Flip Array to XML + $XMLresult = $this->send_cmd($xmlCMD); // Send XML + $arrayResult = $this->_opsHandler->decode($XMLresult); // Flip XML to Array + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/fastlookup/fastDomainLookup.php b/src/bb-library/Registrar/includes/opensrs/fastlookup/fastDomainLookup.php new file mode 100644 index 000000000..a9781a620 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/fastlookup/fastDomainLookup.php @@ -0,0 +1,86 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $domain = ""; + $arraSelected = array (); + $arraAll = array (); + $arraCall = array (); + + if (isSet($this->_dataObject->data->domain)) { + // Grab domain name + $domain = $this->_dataObject->data->domain; + } else { + trigger_error ("oSRS Error - Search domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (isSet($this->_dataObject->data->selected)) { + if ($this->_dataObject->data->selected != ""){ + $arraSelected = explode (";", $this->_dataObject->data->selected); + } + } else { + trigger_error ("oSRS Error - Selected domains are not defined.", E_USER_WARNING); + $allPassed = false; + } + + if (isSet($this->_dataObject->data->alldomains)) { + if ($this->_dataObject->data->alldomains != ""){ + $arraAll = explode (";", $this->_dataObject->data->alldomains); + } else { + $allPassed = false; + } + } else { + trigger_error ("oSRS Error - All domain strinng not defined.", E_USER_WARNING); + $allPassed = false; + } + + // Select non empty one + if (count($arraSelected) == 0) { + $arraCall = $arraAll; + } else { + $arraCall = $arraSelected; + } + + // Call function + if ($allPassed) { + $resObject = $this->_domainTLD ($domain, $arraCall); + } else { + trigger_error ("oSRS Error - Incorrect call.", E_USER_WARNING); + } + } + + // Selected / all TLD options + private function _domainTLD($domain, $request){ + $result = $this->checkDomainBunch($domain, $request); + + // Results + $this->resultFullRaw = $result; + $this->resultRaw = $result; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailAuthentication.php b/src/bb-library/Registrar/includes/opensrs/mail/mailAuthentication.php new file mode 100644 index 000000000..1839f806a --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailAuthentication.php @@ -0,0 +1,85 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailChangeDomain.php b/src/bb-library/Registrar/includes/opensrs/mail/mailChangeDomain.php new file mode 100644 index 000000000..510cc097f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailChangeDomain.php @@ -0,0 +1,113 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->language) && $this->_dataObject->data->language != "") + $compile .= " language=\"". $this->_dataObject->data->language ."\""; + + if (isSet($this->_dataObject->data->timezone) && $this->_dataObject->data->timezone != "") + $compile .= " timezone=\"". $this->_dataObject->data->timezone ."\""; + + if (isSet($this->_dataObject->data->filtermx) && $this->_dataObject->data->filtermx != "") + $compile .= " filtermx=\"". $this->_dataObject->data->filtermx ."\""; + + if (isSet($this->_dataObject->data->spam_tag) && $this->_dataObject->data->spam_tag != "") + $compile .= " spam_tag=\"". $this->_dataObject->data->spam_tag ."\""; + + if (isSet($this->_dataObject->data->spam_folder) && $this->_dataObject->data->spam_folder != "") + $compile .= " spam_folder=\"". $this->_dataObject->data->spam_folder ."\""; + + if (isSet($this->_dataObject->data->spam_level) && $this->_dataObject->data->spam_level != "") + $compile .= " spam_level=\"". $this->_dataObject->data->spam_level ."\""; + + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "change_domain". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomain.php b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomain.php new file mode 100644 index 000000000..09102f1d1 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomain.php @@ -0,0 +1,112 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - newdomain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->timezone) && $this->_dataObject->data->timezone != "") + $compile .= " timezone=\"". $this->_dataObject->data->timezone ."\""; + + if (isSet($this->_dataObject->data->language) && $this->_dataObject->data->language != "") + $compile .= " language=\"". $this->_dataObject->data->language ."\""; + + if (isSet($this->_dataObject->data->filtermx) && $this->_dataObject->data->filtermx != "") + $compile .= " filtermx=\"". $this->_dataObject->data->filtermx ."\""; + + if (isSet($this->_dataObject->data->spam_tag) && $this->_dataObject->data->spam_tag != "") + $compile .= " spam_tag=\"". $this->_dataObject->data->spam_tag ."\""; + + if (isSet($this->_dataObject->data->spam_folder) && $this->_dataObject->data->spam_folder != "") + $compile .= " spam_folder=\"". $this->_dataObject->data->spam_folder ."\""; + + if (isSet($this->_dataObject->data->spam_level) & $this->_dataObject->data->spam_level != "") + $compile .= " spam_level=\"". $this->_dataObject->data->spam_level ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "create_domain". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainAlias.php b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainAlias.php new file mode 100644 index 000000000..acda8026a --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainAlias.php @@ -0,0 +1,100 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + if (!isSet($this->_dataObject->data->alias) || $this->_dataObject->data->alias == "") { + trigger_error ("oSRS-eMail Error - alias is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " alias=\"". $this->_dataObject->data->alias ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "create_domain_alias". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainWelcomeEmail.php b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainWelcomeEmail.php new file mode 100644 index 000000000..2f4786dd6 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateDomainWelcomeEmail.php @@ -0,0 +1,129 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + if (!isSet($this->_dataObject->data->welcome_text) || $this->_dataObject->data->welcome_text == "") { + trigger_error ("oSRS-eMail Error - welcome_text is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " welcome_text=\"". $this->_dataObject->data->welcome_text ."\""; + } + if (!isSet($this->_dataObject->data->welcome_subject) || $this->_dataObject->data->welcome_subject == "") { + trigger_error ("oSRS-eMail Error - welcome_subject is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " welcome_subject=\"". $this->_dataObject->data->welcome_subject ."\""; + } + if (!isSet($this->_dataObject->data->from_name) || $this->_dataObject->data->from_name == "") { + trigger_error ("oSRS-eMail Error - from_name is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " from_name=\"". $this->_dataObject->data->from_name ."\""; + } + if (!isSet($this->_dataObject->data->from_address) || $this->_dataObject->data->from_address == "") { + trigger_error ("oSRS-eMail Error - from_address is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " from_address=\"". $this->_dataObject->data->from_address ."\""; + } + if (!isSet($this->_dataObject->data->charset) || $this->_dataObject->data->charset == "") { + trigger_error ("oSRS-eMail Error - charset is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " charset=\"". $this->_dataObject->data->charset ."\""; + } + if (!isSet($this->_dataObject->data->mime_type) || $this->_dataObject->data->mime_type == "") { + trigger_error ("oSRS-eMail Error - mime_type is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " mime_type=\"". $this->_dataObject->data->mime_type ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "create_domain_welcome_email". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailCreateMailbox.php b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateMailbox.php new file mode 100644 index 000000000..4482411a8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailCreateMailbox.php @@ -0,0 +1,148 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + if (!isSet($this->_dataObject->data->workgroup) || $this->_dataObject->data->workgroup == "") { + trigger_error ("oSRS-eMail Error - workgroup is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " workgroup=\"". $this->_dataObject->data->workgroup ."\""; + } + + if (!isSet($this->_dataObject->data->mailbox) || $this->_dataObject->data->mailbox == "") { + trigger_error ("oSRS-eMail Error - mailbox is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " mailbox=\"". $this->_dataObject->data->mailbox ."\""; + } + + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " password=\"". $this->_dataObject->data->password ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->first_name) && $this->_dataObject->data->first_name != "") + $compile .= " first_name=\"". $this->_dataObject->data->first_name ."\""; + + if (isSet($this->_dataObject->data->last_name) && $this->_dataObject->data->last_name != "") + $compile .= " last_name=\"". $this->_dataObject->data->last_name ."\""; + + if (isSet($this->_dataObject->data->title) && $this->_dataObject->data->title != "") + $compile .= " title=\"". $this->_dataObject->data->title ."\""; + + if (isSet($this->_dataObject->data->phone) && $this->_dataObject->data->phone != "") + $compile .= " phone=\"". $this->_dataObject->data->phone ."\""; + + if (isSet($this->_dataObject->data->fax) && $this->_dataObject->data->fax != "") + $compile .= " fax=\"". $this->_dataObject->data->fax ."\""; + + if (isSet($this->_dataObject->data->timezone) && $this->_dataObject->data->timezone != "") + $compile .= " timezone=\"". $this->_dataObject->data->timezone ."\""; + + if (isSet($this->_dataObject->data->language) && $this->_dataObject->data->language != "") + $compile .= " language=\"". $this->_dataObject->data->language ."\""; + + if (isSet($this->_dataObject->data->filteronly) && $this->_dataObject->data->filteronly != "") + $compile .= " filteronly=\"". $this->_dataObject->data->filteronly ."\""; + + if (isSet($this->_dataObject->data->spam_tag) && $this->_dataObject->data->spam_tag != "") + $compile .= " spam_tag=\"". $this->_dataObject->data->spam_tag ."\""; + + if (isSet($this->_dataObject->data->spam_folder) && $this->_dataObject->data->spam_folder != "") + $compile .= " spam_folder=\"". $this->_dataObject->data->spam_folder ."\""; + + if (isSet($this->_dataObject->data->spam_level) && $this->_dataObject->data->spam_level != "") + $compile .= " spam_level=\"". $this->_dataObject->data->spam_level ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->authusername ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->authpassword ."\"", + 2 => "create_mailbox". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomain.php b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomain.php new file mode 100644 index 000000000..9c70f63a0 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomain.php @@ -0,0 +1,96 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->cascade) || $this->_dataObject->data->cascade != "") $compile .= " cascade=\"". $this->_dataObject->data->cascade ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "delete_domain". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainAlias.php b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainAlias.php new file mode 100644 index 000000000..8511f0608 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainAlias.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->alias) || $this->_dataObject->data->alias == "") { + trigger_error ("oSRS-eMail Error - alias is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " alias=\"". $this->_dataObject->data->alias ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "delete_domain_alias". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainWelcomeEmail.php b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainWelcomeEmail.php new file mode 100644 index 000000000..c3d2f86bb --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteDomainWelcomeEmail.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "delete_domain_welcome_email". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteMailbox.php b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteMailbox.php new file mode 100644 index 000000000..2ed0fe0b0 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailDeleteMailbox.php @@ -0,0 +1,100 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->mailbox) || $this->_dataObject->data->mailbox == "") { + trigger_error ("oSRS-eMail Error - mailbox is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " mailbox=\"". $this->_dataObject->data->mailbox ."\""; + } + + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "delete_mailbox". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetCompanyDomains.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetCompanyDomains.php new file mode 100644 index 000000000..4323572ed --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetCompanyDomains.php @@ -0,0 +1,88 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command optional values + if (isSet($this->_dataObject->data->limit) || $this->_dataObject->data->limit != "") $compile .= " limit=\"". $this->_dataObject->data->limit ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_company_domains". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomain.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomain.php new file mode 100644 index 000000000..d17c4c2cd --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomain.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_domain". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainAllowList.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainAllowList.php new file mode 100644 index 000000000..1b5a04b07 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainAllowList.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_domain_allow_list". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainBlockList.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainBlockList.php new file mode 100644 index 000000000..e75bd3863 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainBlockList.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_domain_block_list". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxLimits.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxLimits.php new file mode 100644 index 000000000..a0fc74b11 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxLimits.php @@ -0,0 +1,93 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_domain_mailbox_limits". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxes.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxes.php new file mode 100644 index 000000000..85cb52fba --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetDomainMailboxes.php @@ -0,0 +1,97 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->limit) && $this->_dataObject->data->limit != ""){ + $compile .= " limit=\"". $this->_dataObject->data->limit ."\""; + } + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_domain_mailboxes". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailGetNumDomainMailboxes.php b/src/bb-library/Registrar/includes/opensrs/mail/mailGetNumDomainMailboxes.php new file mode 100644 index 000000000..18851e5e2 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailGetNumDomainMailboxes.php @@ -0,0 +1,92 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "get_num_domain_mailboxes". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAdmin.php b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAdmin.php new file mode 100644 index 000000000..85b1114cd --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAdmin.php @@ -0,0 +1,103 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + if (!isSet($this->_dataObject->data->mailbox) || $this->_dataObject->data->mailbox == "") { + trigger_error ("oSRS-eMail Error - mailbox is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " mailbox=\"". $this->_dataObject->data->mailbox ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->state) && $this->_dataObject->data->state != "") + $compile .= " state=\"". $this->_dataObject->data->state ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "set_domain_admin". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAllowList.php b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAllowList.php new file mode 100644 index 000000000..ca40af3c8 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainAllowList.php @@ -0,0 +1,99 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + if (!isSet($this->_dataObject->data->list) || $this->_dataObject->data->list == "") { + trigger_error ("oSRS-eMail Error - list is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " list=\"". $this->_dataObject->data->list ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "set_domain_allow_list". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainBlockList.php b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainBlockList.php new file mode 100644 index 000000000..d23fe6698 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainBlockList.php @@ -0,0 +1,99 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + if (!isSet($this->_dataObject->data->list) || $this->_dataObject->data->list == "") { + trigger_error ("oSRS-eMail Error - list is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " list=\"". $this->_dataObject->data->list ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "set_domain_block_list". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainDisabledStatus.php b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainDisabledStatus.php new file mode 100644 index 000000000..c9d1d6723 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainDisabledStatus.php @@ -0,0 +1,97 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + if (!isSet($this->_dataObject->data->disabled) || $this->_dataObject->data->disabled == "") { + trigger_error ("oSRS-eMail Error - disabled is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " disabled=\"". $this->_dataObject->data->disabled ."\""; + } + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "set_domain_disabled_status". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultRaw = $arrayResult; + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainMailboxLimits.php b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainMailboxLimits.php new file mode 100644 index 000000000..fdc1e51d3 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/mail/mailSetDomainMailboxLimits.php @@ -0,0 +1,100 @@ +_dataObject = $dataObject; + $this->_formatHolder = $formatString; + $this->_validateObject (); + } + + public function __destruct () { + parent::__destruct(); + } + + // Validate the object + private function _validateObject (){ + $allPassed = true; + $compile = ""; + + // Command required values - authentication + if (!isSet($this->_dataObject->data->username) || $this->_dataObject->data->username == "") { + if ($this->osrs_mailuser == ""){ + trigger_error ("oSRS-eMail Error - username is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->username = $this->osrs_mailuser; + } + } + if (!isSet($this->_dataObject->data->password) || $this->_dataObject->data->password == "") { + if ($this->osrs_mailpassword == ""){ + trigger_error ("oSRS-eMail Error - password is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->password = $this->osrs_mailpassword; + } + } + if (!isSet($this->_dataObject->data->authdomain) || $this->_dataObject->data->authdomain == "") { + if ($this->osrs_maildomain == ""){ + trigger_error ("oSRS-eMail Error - authentication domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $this->_dataObject->data->authdomain = $this->osrs_maildomain; + } + } + + // Command required values + if (!isSet($this->_dataObject->data->domain) || $this->_dataObject->data->domain == "") { + trigger_error ("oSRS-eMail Error - domain is not defined.", E_USER_WARNING); + $allPassed = false; + } else { + $compile .= " domain=\"". $this->_dataObject->data->domain ."\""; + } + + // Command optional values + if (isSet($this->_dataObject->data->mailbox) || $this->_dataObject->data->mailbox != "") $compile .= " mailbox=\"". $this->_dataObject->data->mailbox ."\""; + if (isSet($this->_dataObject->data->filter_only) || $this->_dataObject->data->filter_only != "") $compile .= " filter_only=\"". $this->_dataObject->data->filter_only ."\""; + if (isSet($this->_dataObject->data->alias) || $this->_dataObject->data->alias != "") $compile .= " alias=\"". $this->_dataObject->data->alias ."\""; + if (isSet($this->_dataObject->data->forward_only) || $this->_dataObject->data->forward_only != "") $compile .= " forward_only=\"". $this->_dataObject->data->forward_only ."\""; + if (isSet($this->_dataObject->data->mailing_list) || $this->_dataObject->data->mailing_list != "") $compile .= " mailing_list=\"". $this->_dataObject->data->mailing_list ."\""; + + // Run the command + if ($allPassed) { + // Execute the command + $this->_processRequest ($compile); + } else { + trigger_error ("oSRS-eMail Error - Missing data.", E_USER_WARNING); + } + } + + // Post validation functions + private function _processRequest ($command = ""){ + $sequence = array ( + 0 => "ver ver=\"3.4\"", + 1 => "login user=\"". $this->_dataObject->data->username ."\" domain=\"". $this->_dataObject->data->authdomain ."\" password=\"". $this->_dataObject->data->password ."\"", + 2 => "set_domain_mailbox_limits". $command, + 3 => "quit" + ); + $tucRes = $this->makeCall($sequence); + $arrayResult = $this->parseResults($tucRes); + + // Results + $this->resultFullRaw = $arrayResult; + $this->resultRaw = $arrayResult; + $this->resultFullFormated = convertArray2Formated ($this->_formatHolder, $this->resultFullRaw); + $this->resultFormated = convertArray2Formated ($this->_formatHolder, $this->resultRaw); + } +} \ No newline at end of file diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_base.php b/src/bb-library/Registrar/includes/opensrs/openSRS_base.php new file mode 100644 index 000000000..99f805efa --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_base.php @@ -0,0 +1,416 @@ +_pullConfigVariables (); + $this->_verifySystemProperties (); + $this->_opsHandler = new openSRS_ops; + $this->osrs_username = $dataObject->user; + $this->osrs_key = $dataObject->key; + $this->osrs_host = $dataObject->host; + } + + // Class destructor + public function __destruct () { + } + + + // Private functions + private function _pullConfigVariables () { + $xmlHand = new class_xml; + + // Load and read active config file + $actConfig = $xmlHand->xml2array(ACTIVECONFIG); + if ($actConfig != false){ + $actFileArray = $xmlHand->getValueByPath ($actConfig, "config/file"); + $actFile = $actFileArray['value']; + + // Load active Config + $fileConfig = $xmlHand->xml2array(OPENSRSURI . OPENSRSCONFINGS . $actFile); + if ($fileConfig != false){ + $fileFileArray = $xmlHand->getValueByPath ($fileConfig, "config/osrsRegular"); + + foreach ($fileFileArray as $ffa){ + if ($ffa['name'] == "osrs_username" && isSet($ffa['value'])) $this->osrs_username = $ffa['value']; + if ($ffa['name'] == "osrs_password" && isSet($ffa['value'])) $this->osrs_password = $ffa['value']; + if ($ffa['name'] == "osrs_key" && isSet($ffa['value'])) $this->osrs_key = $ffa['value']; + if ($ffa['name'] == "osrs_environment" && isSet($ffa['value'])) $this->osrs_environment = $ffa['value']; + if ($ffa['name'] == "osrs_protocol" && isSet($ffa['value'])) $this->osrs_protocol = $ffa['value']; + if ($ffa['name'] == "osrs_host" && isSet($ffa['value'])) $this->osrs_host = $ffa['value']; + if ($ffa['name'] == "osrs_port" && isSet($ffa['value'])) $this->osrs_port = $ffa['value']; + if ($ffa['name'] == "osrs_sslPort" && isSet($ffa['value'])) $this->osrs_sslPort = $ffa['value']; + if ($ffa['name'] == "osrs_baseClassVersion" && isSet($ffa['value'])) $this->osrs_baseClassVersion = $ffa['value']; + if ($ffa['name'] == "osrs_version" && isSet($ffa['value'])) $this->osrs_version = $ffa['value']; + } + + // Verify all the variables + if ($this->osrs_username == "" || $this->osrs_key == "" || $this->osrs_environment == "" || $this->osrs_protocol == ""){ + if ($this->osrs_username == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_username", E_USER_WARNING); + if ($this->osrs_key == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_key", E_USER_WARNING); + if ($this->osrs_environment == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_environment", E_USER_WARNING); + if ($this->osrs_protocol == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_protocol", E_USER_WARNING); + die (); + } + if ($this->osrs_host == "" || $this->osrs_port == "" || $this->osrs_sslPort == "" || $this->osrs_baseClassVersion == "" || $this->osrs_version == ""){ + if ($this->osrs_host == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_host", E_USER_WARNING); + if ($this->osrs_port == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_port", E_USER_WARNING); + if ($this->osrs_sslPort == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_sslPort", E_USER_WARNING); + if ($this->osrs_baseClassVersion == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_baseClassVersion", E_USER_WARNING); + if ($this->osrs_version == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_version", E_USER_WARNING); + die (); + } + + // Some variables should be in upper case + if ($this->osrs_environment != "") $this->osrs_environment = strtoupper($this->osrs_environment); + if ($this->osrs_protocol) $this->osrs_protocol = strtoupper($this->osrs_protocol); + } + } + } + + private function _verifySystemProperties () { + // Encryption verification + if ('SSL' == $this->crypt_type) { + if (!function_exists('version_compare') || version_compare('4.3', phpversion(), '>=')) { + $error_message = "PHP version must be v4.3+ (current version is ". phpversion() .") to use \"SSL\" encryption"; + trigger_error ($error_message, E_USER_WARNING); + die(); + } elseif (!function_exists('openssl_open')) { + $error_message = "PHP must be compiled using --with-openssl to use \"SSL\" encryption"; + trigger_error ($error_message, E_USER_WARNING); + die(); + } + } + } + +// Send a command to the server + public function send_cmd($request) { + // make or get the socket filehandle + if (!$this->init_socket() ) { + trigger_error ("oSRS Error - Unable to establish socket: (". $this->_socketErrorNum .") ". $this->_socketErrorMsg, E_USER_WARNING); + die(); + } + + // Authenticate user + $auth = $this->authenticate(); + + if (!$auth) { + if ($this->_socket) $this->close_socket(); + trigger_error ("oSRS Error - Authentication Error: ". $auth['error'], E_USER_WARNING); + die(); + } + + $this->send_data($request); + $data = $this->read_data(); + + $num_matches = preg_match('/401<\/item>/', $data, $matches); + + if ($num_matches > 0) + trigger_error("oSRS Error - Reseller username or osrs_key is incorrect, please check your config file."); + + return $data; + } + + +// Initialize a socket connection to the OpenSRS server + private function init_socket() { + if ($this->_socket) return true; + if (!$this->osrs_environment) return false; + + if ($this->crypt_type == 'SSL') { + $tempPortHand = $this->osrs_sslPort; + $conType = 'ssl://'; + } else { + $tempPortHand = $this->osrs_port; + $conType = ''; + } + + $this->_socket = fsockopen($conType . $this->osrs_host, $tempPortHand, $this->_socketErrorNum, $this->_socketErrorMsg, $this->_socketTimeout); + if (!$this->_socket) { + return false; + } else { + return true; + } + } + + +// Authenticate the connection with the username/private key + private function authenticate() { + if ($this->_authenticated || 'SSL' == $this->crypt_type) { + return array('is_success' => true); + } + + $promptXML = $this->read_data(); + $prompt = $this->_opsHandler->decode($promptXML); + if (isSet($prompt['response_code'])) { + if ($prompt['response_code'] == 555 ) { + // the ip address from which we are connecting is not accepted + return array( + 'is_success' => false, + 'error' => $prompt['response_text'] + ); + } + } else if ( !preg_match('/OpenSRS\sSERVER/', $prompt['attributes']['sender']) || + substr($prompt['attributes']['version'],0,3) != 'XML' ) { + return array( + 'is_success' => false, + 'error' => 'Unrecognized Peer' + ); + } + + // first response is server version + $cmd = array( + 'protocol' => $this->osrs_protocol, + 'action' => 'check', + 'object' => 'version', + 'attributes' => array( + 'sender' => 'OpenSRS CLIENT', + 'version' => $this->osrs_version, + 'state' => 'ready' + ) + ); + $xmlCMD = $this->_opsHandler->encode($cmd); + $this->send_data($xmlCMD); + + $cmd = array( + 'protocol' => $this->osrs_protocol, + 'action' => 'authenticate', + 'object' => 'user', + 'attributes' => array( + 'crypt_type' => strtolower($this->crypt_type), + 'username' => $this->osrs_username, + 'password' => $this->osrs_username + ) + ); + $xmlCMD = $this->_opsHandler->encode($cmd); + $this->send_data( $xmlCMD ); + + $challenge = $this->read_data(); + + // Sanity check to make sure that the osrs_key is all hex values + $hex_check = ctype_xdigit($this->osrs_key); + + // Respond to the challenge with the MD5 checksum of the challenge. + // ... and PHP's md5() doesn't return binary data, so + // we need to pack that too + + if ($hex_check){ + $this->_CBC = new openSRS_crypt(pack('H*', $this->osrs_key), $this->crypt_type); + $response = pack('H*',md5($challenge)); + $this->send_data($response); + + // Read the server's response to our login attempt (XML) + $answerXML = $this->read_data(); + $answer = $this->_opsHandler->decode($answerXML); + + if (substr($answer['response_code'],0,1)== '2') { + $this->_authenticated = true; + return true; + } else { + return false; + } + } else { + trigger_error("oSRS Error - Please check the osrs_key value in the config file, it contains a non hexidecimal character."); + } + } + +// Close the socket connection + private function close_socket() { + fclose($this->_socket); + if ($this->_CBC) $this->_CBC->_openSRS_crypt(); /* destructor */ + $this->_CBC = false; + $this->_authenticated = false; + $this->_socket = false; + } + + + private function read_data() { + $buf = $this->readData($this->_socket, $this->_socketReadTimeout); + if (!$buf) { + trigger_error ("oSRS Error - Read buffer is empty. Please make sure IP is whitelisted in RWI. Check the osrs_key and osrs_username in the config file as well.", E_USER_WARNING); + $data = ""; + } else { + $data = $this->_CBC ? $this->_CBC->decrypt($buf) : $buf; + } + return $data; + } + + private function send_data($message) { + if ($this->_CBC) $message = $this->_CBC->encrypt($message); + return $this->writeData( $this->_socket, $message ); + } + +// Regex check for valid email + private function check_email_syntax($email) { + if (preg_match('/(@.*@)|(\.\.)|(@\.)|(\.@)|(^\.)/', $email) || !preg_match('/^\S+\@(\[?)[a-zA-Z0-9\-\.]+\.([a-zA-Z]{2,3}|[0-9]{1,3})(\]?)$/', $email)) { + return false; + } else { + return true; + } + } + + +/** +* Writes a message to a socket (buffered IO) +* @param int socket handle +* @param string message to write +*/ + private function writeData(&$fh,$msg) { + $header = ""; + $len = strlen($msg); + switch ($this->crypt_type) { + case 'SSL': + $signature = md5(md5($msg.$this->osrs_key).$this->osrs_key); + $header .= "POST / HTTP/1.0". $this->CRLF; + $header .= "Content-Type: text/xml" . $this->CRLF; + $header .= "X-Username: " . $this->osrs_username . $this->CRLF; + $header .= "X-Signature: " . $signature . $this->CRLF; + $header .= "Content-Length: " . $len . $this->CRLF . $this->CRLF; + break; + case 'BLOWFISH': + case 'DES': + default: + $header .= "Content-Length: " . $len . $this->CRLF . $this->CRLF; + break; + } + fputs($fh, $header); + fputs($fh, $msg, $len ); + } + + +/** +* Reads header data +* @param int socket handle +* @param int timeout for read +* @return hash hash containing header key/value pairs +*/ + private function readHeader($fh, $timeout=5) { + $header = array(); + switch ($this->crypt_type) { + case 'SSL': + /* HTTP/SSL connection method */ + $http_log =''; + $line = fgets($fh, 4000); + $http_log .= $line; + if (!preg_match('/^HTTP\/1.1 ([0-9]{0,3}) (.*)\r\n$/',$line, $matches)) { + trigger_error ("oSRS Error - UNEXPECTED READ: Unable to parse HTTP response code. Please make sure IP is whitelisted in RWI.", E_USER_WARNING); + return false; + } + $header['http_response_code'] = $matches[1]; + $header['http_response_text'] = $matches[2]; + + while ($line != $this->CRLF) { + $line = fgets($fh, 4000); + $http_log .= $line; + if (feof($fh)) { + trigger_error ("oSRS Error - UNEXPECTED READ: Error reading HTTP header.", E_USER_WARNING); + return false; + } + $matches = explode(': ', $line, 2); + if (sizeof($matches) == 2) { + $header[trim(strtolower($matches[0]))] = $matches[1]; + } + } + $header['full_header'] = $http_log; + break; + case 'BLOWFISH': + case 'DES': + default: + /* socket (old-style) connection */ + $line = fgets($fh, 4000); + if ($this->_opsHandler->socketStatus($fh)) { + return false; + } + + if (preg_match('/^\s*Content-Length:\s+(\d+)\s*\r\n/i', $line, $matches ) ) { + $header{'content-length'} = (int)$matches[1]; + } else { + trigger_error ("oSRS Error - UNEXPECTED READ: No Content-Length.", E_USER_WARNING); + return false; + } + + /* read the empty line */ + $line = fread($fh, 2); + if ($this->_opsHandler->socketStatus($fh)) { + return false; + } + if ($line!=$this->CRLF) { + trigger_error ("oSRS Error - UNEXPECTED READ: No CRLF.", E_USER_WARNING); + return false; + } + break; + } + return $header; + } + + +/** +* Reads data from a socket +* @param int socket handle +* @param int timeout for read +* @return mixed buffer with data, or an error for a short read +*/ + private function readData(&$fh, $timeout=5) { + $len = 0; + /* PHP doesn't have timeout for fread ... we just set the timeout for the socket */ + socket_set_timeout($fh, $timeout); + $header = $this->readHeader($fh, $timeout); + if (!$header || !isset($header{'content-length'}) || (empty($header{'content-length'}))) { + if ($this->crypt_type == "SSL") + trigger_error ("oSRS Error - UNEXPECTED ERROR: No Content-Length header provided! Please make sure IP is whitelisted in RWI.", E_USER_WARNING); + else + trigger_error ("oSRS Error - No Content-Length header returned. Please make sure IP is whitelisted in RWI. Check the osrs_key and osrs_username in the config file as well.", E_USER_WARNING); + } + + $len = (int)$header{'content-length'}; + $line = ''; + while (strlen($line) < $len) { + $line .= fread($fh, $len); + if ($this->_opsHandler->socketStatus($fh)) { + return false; + } + } + + if ($line) { + $buf = $line; + } else { + $buf = false; + } + + if ('SSL' == $this->crypt_type) $this->close_socket(); + return $buf; + } + + // Helper functions + public function convertXML2array ($xml) { + $array = $this->_opsHandler->decode($xml); + return $array; + } + +} diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_config.php b/src/bb-library/Registrar/includes/opensrs/openSRS_config.php new file mode 100644 index 000000000..5b7d2ca27 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_config.php @@ -0,0 +1,13 @@ + MCRYPT_DES, + 'BLOWFISH' => MCRYPT_BLOWFISH, + 'BLOWFISH-COMPAT' => MCRYPT_BLOWFISH_COMPAT, + ); + + + var $cipher; // used cipher - @var string + var $TD; // crypt resource, for 2.4.x @var string + var $deinit_function; // crypt deinit function, for backwards compatability - @var string + var $blocksize; // blocksize of cipher - @var string + var $keysize; // keysize of cipher - @var int + var $keyhash; // mangled key - @var string + var $rand_source = MCRYPT_RAND; // - source type of the initialization vector for creation - possible types are MCRYPT_RAND or MCRYPT_DEV_URANDOM or MCRYPT_DEV_RANDOM - @var int + var $header_spec = 'RandomIV'; // - header - @var string + var $_last_clear; // - debugging - @var string + var $_last_crypt; // - debugging - @var string + + + function openSRS_crypt ($key, $cipher='DES') { + if (!extension_loaded('mcrypt')) trigger_error ("oSRS Error - mcrypt module is not compiled into PHP", E_USER_ERROR); + if (!function_exists('mcrypt_module_open')) trigger_error ("oSRS Error - libmcrypt version insufficient", E_USER_ERROR); + + if (function_exists('mcrypt_generic_deinit')) { + $this->deinit_function = 'mcrypt_generic_deinit'; + } else if (function_exists('mcrypt_generic_end')) { + $this->deinit_function = 'mcrypt_generic_end'; + } else { + trigger_error ("oSRS Error - PHP version insufficient", E_USER_ERROR); + } + + srand ((double)microtime()*1000000); + $this->header_spec = 'RandomIV'; + if (!$key) trigger_error ("oSRS Error - no key specified", E_USER_ERROR); + + $cipher = strtoupper($cipher); // check for cipher + if (!isset($this->known_ciphers[$cipher])) trigger_error ("oSRS Error - unknown cipher - ". $cipher, E_USER_ERROR); + $this->cipher = $this->known_ciphers[$cipher]; + + // initialize cipher + $this->TD = mcrypt_module_open ($this->cipher, '', 'ecb', ''); + $this->blocksize = mcrypt_enc_get_block_size($this->TD); + $this->keysize = mcrypt_enc_get_key_size($this->TD); + + // mangle key with MD5 + $this->keyhash = $this->_md5perl($key); + while( strlen($this->keyhash) < $this->keysize ) { + $this->keyhash .= $this->_md5perl($this->keyhash); + } + $this->key = substr($this->keyhash, 0, $this->keysize); + return true; + } + + + // - Destructor + function _openSRS_crypt () { + @mcrypt_module_close($this->TD); + } + + + function encrypt($clear) { + $this->last_clear = $clear; + $iv = mcrypt_create_iv($this->blocksize, $this->rand_source); /* new IV for each message */ + $crypt = $this->header_spec . $iv; /* create the message header */ + $padsize = $this->blocksize - (strlen($clear) % $this->blocksize); /* pad the cleartext */ + $clear .= str_repeat(pack ('C*', $padsize), $padsize); + + // do the encryption + $start = 0; + while ( $block = substr($clear, $start, $this->blocksize) ) { + $start += $this->blocksize; + if (mcrypt_generic_init($this->TD, $this->key, $iv) < 0 ) trigger_error ("oSRS Error - mcrypt_generic_init failed", E_USER_ERROR); + $cblock = mcrypt_generic($this->TD, $iv^$block ); + $iv = $cblock; + $crypt .= $cblock; + call_user_func($this->deinit_function, $this->TD); + } + + $this->last_crypt = $crypt; + return $crypt; + } + + + function decrypt($crypt) { + $this->last_crypt = $crypt; + + $iv_offset = strlen($this->header_spec); /* get the IV from the message header */ + $header = substr($crypt, 0, $iv_offset); + $iv = substr ($crypt, $iv_offset, $this->blocksize); + if ( $header != $this->header_spec ) trigger_error ("oSRS Error - no initialization vector", E_USER_ERROR); + + $crypt = substr($crypt, $iv_offset+$this->blocksize); + + /* decrypt the message */ + $start = 0; + $clear = ''; + + while ( $cblock = substr($crypt, $start, $this->blocksize) ) { + $start += $this->blocksize; + if (mcrypt_generic_init($this->TD, $this->key, $iv) < 0 ) trigger_error ("oSRS Error - mcrypt_generic_init failed", E_USER_ERROR); + $block = $iv ^ mdecrypt_generic($this->TD, $cblock); + $iv = $cblock; + $clear .= $block; + call_user_func($this->deinit_function, $this->TD); + } + + /* remove the padding from the end of the cleartext */ + $padsize = ord(substr($clear, -1)); + $clear = substr($clear, 0, -$padsize); + + $this->last_clear = $clear; + return $clear; + } + + function _md5perl($string) { + return pack('H*', md5($string)); + } +} + diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php b/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php new file mode 100644 index 000000000..5e2038239 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php @@ -0,0 +1,152 @@ +_pullConfigVariables (); + } + + // Class destructor + public function __destruct () { + } + + + // Private functions + private function _pullConfigVariables () { + $xmlHand = new class_xml; + + // Load and read active config file + $actConfig = $xmlHand->xml2array(ACTIVECONFIG); + $actFileArray = $xmlHand->getValueByPath ($actConfig, "config/file"); + $actFile = $actFileArray['value']; + + // Load active Config + $fileConfig = $xmlHand->xml2array(OPENSRSURI . OPENSRSCONFINGS . $actFile); + $fileFileArray = $xmlHand->getValueByPath ($fileConfig, "config/osrsFastLookup"); + + foreach ($fileFileArray as $ffa){ + if ($ffa['name'] == "osrs_host" && isSet($ffa['value'])) $this->osrs_host = $ffa['value']; + if ($ffa['name'] == "osrs_port" && isSet($ffa['value'])) $this->osrs_port = $ffa['value']; + } + + if ($this->osrs_host == "" || $this->osrs_port == ""){ + if ($this->osrs_host == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_host", E_USER_WARNING); + if ($this->osrs_port == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_port", E_USER_WARNING); + die (); + } + } + + +// Send a command to the server + public function checkDomain($domain) { + // make or get the socket filehandle + if (!$this->init_socket() ) { + trigger_error ("oSRS Error - Unable to establish socket: (". $this->_socketErrorNum .") ". $this->_socketErrorMsg, E_USER_WARNING); + die(); + } + + // Send a check call + $callCheck = "check_domain ". $domain; + $callLength = strlen($callCheck); + fputs($this->_socket, $callCheck, $callLength ); + +// // wait 0.25 sec - Immediate socket read will result for wait loops and longer response +// usleep(250000); + + // Read result hand for parsing + $result = fread($this->_socket, 1024); + $data = $this->parseResult ($result); + + // Close the socket + $this->close_socket (); + + return $data; + } + + public function checkDomainBunch ($domain, $tlds){ + if (!$this->init_socket() ) { + trigger_error ("oSRS Error - Unable to establish socket: (". $this->_socketErrorNum .") ". $this->_socketErrorMsg, E_USER_WARNING); + die(); + } + + // check to see if the domain has a "." in it, if it does then take everything before the dot as the domain + // This is if someone puts in a domain name instead of just a name + + if(preg_match("/(^.+)\.(.+)\.(.+)/",$domain,$matches) > 0) + $domain=$matches[1]; + else if (preg_match("/(^.+)\.(.+)/",$domain,$matches) > 0) + $domain=$matches[1]; + + // Send a check call + $resultArray = array (); + foreach ($tlds as $tld) { + // check_domain / contact_info / update_all_info + + $callCheck = "check_domain ". $domain . $tld; + $callLength = strlen($callCheck); + fputs($this->_socket, $callCheck, $callLength ); + +// // wait 0.25 sec - Immediate socket read will result for wait loops and longer response +// usleep(250000); + + // Read result hand for parsing + $result = fread($this->_socket, 1024); + $checkRes = $this->parseResult ($result); + + // Sort out the results + $loopAray = array (); + $loopAray['domain'] = $domain; + $loopAray['tld'] = $tld; + $loopAray['result'] = $checkRes; + + // Final push + array_push ($resultArray, $loopAray); + } + + // Close the socket + $this->close_socket (); + + // And there you go!! That's it + return $resultArray; + } + + + private function parseResult ($resString) { + $resultReturn = ""; + + if ($resString != "") { + $temArra = explode (" ", $resString); + if ($temArra[0] == 210) $resultReturn = "Available"; + else if ($temArra[0] == 211) $resultReturn = "Taken"; + else if ($temArra[0] == 701) $resultReturn = "Unknown TLD"; + else $resultReturn = "Syntax error - ". $temArra[0]; + } else { + $resultReturn = "Read error"; + } + + return $resultReturn; + } + + private function init_socket() { + $this->_socket = pfsockopen($this->osrs_host, $this->osrs_port, $this->_socketErrorNum, $this->_socketErrorMsg, $this->_socketTimeout); + if (!$this->_socket) { + return false; + } else { + return true; + } + } + + private function close_socket() { + fclose($this->_socket); + $this->_socket = false; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php.old b/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php.old new file mode 100644 index 000000000..9a5f2897f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_fastlookup.php.old @@ -0,0 +1,143 @@ +_pullConfigVariables (); + } + + // Class destructor + public function __destruct () { + } + + + // Private functions + private function _pullConfigVariables () { + $xmlHand = new class_xml; + + // Load and read active config file + $actConfig = $xmlHand->xml2array(ACTIVECONFIG); + $actFileArray = $xmlHand->getValueByPath ($actConfig, "config/file"); + $actFile = $actFileArray['value']; + + // Load active Config + $fileConfig = $xmlHand->xml2array(OPENSRSURI . OPENSRSCONFINGS . $actFile); + $fileFileArray = $xmlHand->getValueByPath ($fileConfig, "config/osrsFastLookup"); + + foreach ($fileFileArray as $ffa){ + if ($ffa['name'] == "osrs_host" && isSet($ffa['value'])) $this->osrs_host = $ffa['value']; + if ($ffa['name'] == "osrs_port" && isSet($ffa['value'])) $this->osrs_port = $ffa['value']; + } + + if ($this->osrs_host == "" || $this->osrs_port == ""){ + if ($this->osrs_host == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_host", E_USER_WARNING); + if ($this->osrs_port == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_port", E_USER_WARNING); + die (); + } + } + + +// Send a command to the server + public function checkDomain($domain) { + // make or get the socket filehandle + if (!$this->init_socket() ) { + trigger_error ("oSRS Error - Unable to establish socket: (". $this->_socketErrorNum .") ". $this->_socketErrorMsg, E_USER_WARNING); + die(); + } + + // Send a check call + $callCheck = "check_domain ". $domain; + $callLength = strlen($callCheck); + fputs($this->_socket, $callCheck, $callLength ); + + // wait 0.25 sec - Immediate socket read will result for wait loops and longer response + usleep(250000); + + // Read result hand for parsing + $result = fread($this->_socket, 1000); + $data = $this->parseResult ($result); + + // Close the socket + $this->close_socket (); + + return $data; + } + + public function checkDomainBunch ($domain, $tlds){ + if (!$this->init_socket() ) { + trigger_error ("oSRS Error - Unable to establish socket: (". $this->_socketErrorNum .") ". $this->_socketErrorMsg, E_USER_WARNING); + die(); + } + + // Send a check call + $resultArray = array (); + foreach ($tlds as $tld) { + // check_domain / contact_info / update_all_info + $callCheck = "check_domain ". $domain . $tld; + $callLength = strlen($callCheck); + fputs($this->_socket, $callCheck, $callLength ); + + // wait 0.25 sec - Immediate socket read will result for wait loops and longer response + usleep(250000); + + // Read result hand for parsing + $result = fread($this->_socket, 1000); + $checkRes = $this->parseResult ($result); + + // Sort out the results + $loopAray = array (); + $loopAray['domain'] = $domain; + $loopAray['tld'] = $tld; + $loopAray['result'] = $checkRes; + + // Final push + array_push ($resultArray, $loopAray); + } + + // Close the socket + $this->close_socket (); + + // And there you go!! That's it + return $resultArray; + } + + + private function parseResult ($resString) { + $resultReturn = ""; + + if ($resString != "") { + $temArra = explode (" ", $resString); + if ($temArra[0] == 210) $resultReturn = "Available"; + else if ($temArra[0] == 211) $resultReturn = "Taken"; + else if ($temArra[0] == 701) $resultReturn = "Unknown TLD"; + else $resultReturn = "Syntax error"; + } else { + $resultReturn = "Read error"; + } + + return $resultReturn; + } + + private function init_socket() { + $this->_socket = fsockopen($this->osrs_host, $this->osrs_port, $this->_socketErrorNum, $this->_socketErrorMsg, $this->_socketTimeout); + if (!$this->_socket) { + return false; + } else { + return true; + } + } + + private function close_socket() { + fclose($this->_socket); + $this->_socket = false; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_loader.php b/src/bb-library/Registrar/includes/opensrs/openSRS_loader.php new file mode 100644 index 000000000..eb4a3973f --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_loader.php @@ -0,0 +1,119 @@ + Object -> Array conversion +function array2object($data) { + if(!is_array($data)) return $data; + $object = new stdClass(); + if (is_array($data) && count($data) > 0) { + foreach ($data as $name=>$value) { + $name = strtolower(trim($name)); + if (!empty($name)) { + $object->$name = array2object($value); + } + } + } + return $object; +} + +function object2array($data){ + if(!is_object($data) && !is_array($data)) return $data; + if(is_object($data)) $data = get_object_vars($data); + return array_map('object2array', $data); +} + + +// Call parsers and functions of openSRS +function processOpenSRS ($type="", $data="") { + if ($type != "" && $data != ""){ + if ($type == "array") $dataArray = $data; // ARRAY + if ($type == "json"){ // JSON + $json = str_replace("\\\"", "\"", $data); // Replace \" with " for JSON that comes from Javascript + $dataArray = json_decode($json, true); + } + if ($type == "yaml") $dataArray = Spyc::YAMLLoad($data); // YAML + + // Convert associative array to object + $dataObject = array2object($dataArray); + } + + // Call appropriate class + if (class_exists($dataObject->func)){ + $classCall = new $dataObject->func($type, $dataObject); + } else { + $classCall = null; + trigger_error("OSRS Error - Unable to find the function passed. Either the function is misspelled or there are incorrect file paths set in openSRS_config.php."); + } + return $classCall; +} + +function convertArray2Formated ($type="", $data="") { + $resultString = ""; + if ($type == "json") $resultString = json_encode($data); + if ($type == "yaml") $resultString = Spyc::YAMLDump($data); + return $resultString; +} + +function convertFormated2array ($type="", $data="") { + $resultArray = ""; + if ($type == "json") $resultArray = json_decode($data, true); + if ($type == "yaml") $resultArray = Spyc::YAMLLoad($data);; + return $resultArray; +} diff --git a/src/bb-library/Registrar/includes/opensrs/openSRS_mail.php b/src/bb-library/Registrar/includes/opensrs/openSRS_mail.php new file mode 100644 index 000000000..cf802904c --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/openSRS_mail.php @@ -0,0 +1,199 @@ +_pullConfigVariables (); + } + + // Class destructor + public function __destruct () { + } + + // Private functions + private function _pullConfigVariables () { + $xmlHand = new class_xml; + + // Load and read active config file + $actConfig = $xmlHand->xml2array(ACTIVECONFIG); + $actFileArray = $xmlHand->getValueByPath ($actConfig, "config/file"); + $actFile = $actFileArray['value']; + + // Load active Config + $fileConfig = $xmlHand->xml2array(OPENSRSURI . OPENSRSCONFINGS . $actFile); + $fileFileArray = $xmlHand->getValueByPath ($fileConfig, "config/osrsEmail"); + if($fileFileArray==NULL) + trigger_error("oSRS-eMail Error - Could not fine the osrsEmail section in current config, please check your config file", E_USER_WARNING); + else { + foreach ($fileFileArray as $ffa){ + if ($ffa['name'] == "osrs_username" && isSet($ffa['value'])) $this->osrs_mailuser = $ffa['value']; + if ($ffa['name'] == "osrs_password" && isSet($ffa['value'])) $this->osrs_mailpassword = $ffa['value']; + if ($ffa['name'] == "osrs_domain" && isSet($ffa['value'])) $this->osrs_maildomain = $ffa['value']; + if ($ffa['name'] == "osrs_host" && isSet($ffa['value'])) $this->osrs_host = $ffa['value']; + if ($ffa['name'] == "osrs_port" && isSet($ffa['value'])) $this->osrs_port = $ffa['value']; + if ($ffa['name'] == "osrs_portwait" && isSet($ffa['value'])) $this->osrs_portwait = $ffa['value']; + if ($ffa['name'] == "osrs_processdelay" && isSet($ffa['value'])) $this->osrs_processdelay = $ffa['value']; + } + + // Verify all the variables + if ($this->osrs_host == "" || $this->osrs_port == 0){ + if ($this->osrs_host == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_host", E_USER_WARNING); + if ($this->osrs_port == "") trigger_error ("oSRS Error - Incomplete config file - Missing osrs_port", E_USER_WARNING); + die (); + } + } + } + + // Class functions + public function makeCall ($sequence){ + $result = ''; + // Open the socket + // $fp = fsockopen ($this->osrs_host, $this->osrs_port, $errno, $errstr, $this->osrs_portwait); + $fp = pfsockopen ($this->osrs_host, $this->osrs_port, $errno, $errstr, $this->osrs_portwait); + + if (!$fp) { + trigger_error ("oSRS Error - $errstr ($errno)
\n"); // Something went wrong + } else { + // Send commands to tucows server + for ($i=0; $i "1", + "response_code" => "200", + "response_text" => "Command completed successfully" + ); + $i=1; + // Takes the rinsed result lines and forms it into an Associative array + foreach($resRinse as $resultLine){ + $okPattern='/^OK 0/'; + $arrayPattern = '/ ([\w\-\.\@]+)\=\"([\w\-\.\@\*\, ]*)\"/'; + $errorPattern = '/^ER ([0-9]+) (.+)$/'; + + // Checks to see if this line is an information line + $okLine = preg_match($okPattern, $resultLine, $matches); + + if ($okLine == 0){ + // If it's not an ok line, it's an error + $err_num_match=0; + $err_num_match = preg_match($errorPattern,$resultLine,$err_match); + + // Makes sure the error pattern matched and that there isn't an error that has already happened + if ($err_num_match==1 && $result['is_success']=="1"){ + $result['response_text']=$err_match[2]; + $result['response_code']=$err_match[1]; + $result['is_success']='0'; + } + + } else { + // If it's an OK line check to see if it's an Array of values + $arrayMatch=preg_match_all($arrayPattern, $resultLine, $arrayMatches); + if ($arrayMatch !=0){ + for($j=0;$j<$arrayMatch;$j++){ + if($arrayMatches[1][$j]=="LIST") + $result['attributes'][strtolower($arrayMatches[1][$j])]=explode("," , $arrayMatches[2][$j]); + else + $result['attributes'][strtolower($arrayMatches[1][$j])]=$arrayMatches[2][$j]; + } + } else { + + // If it's not an array line or an error it could be a table + $tableLines=explode(' , ', $resultLine); + if (count($tableLines)>1){ + $tableLines[0] = str_replace("OK 0 ", "", $tableLines[0]); + $tableHeaders=explode(' ',$tableLines[0]); + $result['attributes']['list']=Array(); + for($j=1;$j_OPT = 'compress'; + $this->_SPACER = ''; + $this->_CRLF = ''; + } + } + + $this->_SESSID = getmypid(); + $this->_MSGCNT = 0; + } + + /** + * Checks a socket for timeout or EOF + * @param int socket handle + * @return boolean true if the socket has timed out or is EOF + */ + function socketStatus(&$fh) { + $return = false; + if (is_resource($fh)) { + $temp = socket_get_status($fh); + if ($temp['timed_out']) $return = true; + if ($temp['eof']) $return = true; + unset($temp); + } + return $return; + } + + /** + * Accepts an OPS protocol message or an file handle + * and decodes the data into a PHP array + * @param string OPS message + * @return mixed PHP array, or error + */ + function decode($in) { + $ops_msg = ''; + /* determine if we were passed a string or file handle */ + if (is_resource($in)) { + # read the file into a string, then process as usual + while (!feof($in)) { + $ops_msg .= fgets($in, 400); + } + } else { + $ops_msg = $in; + } + return $this->XML2PHP($ops_msg); /* decode and return */ + } + + /** + * XML Parser that converts an OPS protocol message into a PHP array + * @param string OPS message + * @return mixed PHP array, or error + */ + function XML2PHP($msg) { + $this->_data = NULL; + + $xp = xml_parser_create(); + xml_parser_set_option($xp, XML_OPTION_CASE_FOLDING, false); + xml_parser_set_option($xp, XML_OPTION_SKIP_WHITE, true); + xml_parser_set_option($xp, XML_OPTION_TARGET_ENCODING, 'ISO-8859-1'); + + if (!xml_parse_into_struct($xp,$msg,$vals,$index)) { + $error = sprintf('XML error: %s at line %d', + xml_error_string(xml_get_error_code($xp)), + xml_get_current_line_number($xp) + ); + xml_parser_free($xp); + trigger_error ("oSRS Error - ". $error, E_USER_WARNING); + die(); + } + + xml_parser_free($xp); + $temp = $depth = array(); + + foreach($vals as $value) { + switch ($value['tag']) { + case 'OPS_envelope': + case 'header': + case 'body': + case 'data_block': + break; + case 'version': + case 'msg_id': + case 'msg_type': + $key = '_OPS_' . $value['tag']; + $temp[$key] = $value['value']; + break; + case 'item': + // Not every Item has attributes + if (isSet($value['attributes'])) { + $key = $value['attributes']['key']; + } else { + $key = ""; + } + + switch ($value['type']) { + case 'open': + array_push($depth, $key); + break; + case 'complete': + array_push($depth, $key); + $p = join('::',$depth); + + // enn_change - make sure that $value['value'] is defined + if (isSet($value['value'])){ + $temp[$p] = $value['value']; + } else { + $temp[$p] = ""; + } + + array_pop($depth); + break; + case 'close': + array_pop($depth); + break; + } + break; + case 'dt_assoc': + case 'dt_array': + break; + } + } + + foreach ($temp as $key=>$value) { + $levels = explode('::',$key); + $num_levels = count($levels); + + if ($num_levels==1) { + $this->_data[$levels[0]] = $value; + } else { + $pointer = &$this->_data; + for ($i=0; $i<$num_levels; $i++) { + if ( !isset( $pointer[$levels[$i]] ) ) { + $pointer[$levels[$i]] = array(); + } + $pointer = &$pointer[$levels[$i]]; + } + $pointer = $value; + } + } + return ($this->_data); + } + + + /** + * Converts a PHP array into an OPS message + * @param array PHP array + * @return string OPS XML message + */ + function encode($array) { + $this->_MSGCNT++; + $msg_id = $this->_SESSID + $this->_MSGCNT; /* addition removes the leading zero */ + $msg_type = $this->_MSGTYPE_STD; + + if ($array['protocol']) { + $array['protocol'] = strtoupper($array['protocol']); + } + if ($array['action']) { + $array['action'] = strtoupper($array['action']); + } + if ($array['object']) { + $array['object'] = strtoupper($array['object']); + } + + $xml_data_block = $this->PHP2XML($array); + $ops_msg = '' . $this->_CRLF . + '' . $this->_CRLF . + '' . $this->_CRLF . + $this->_SPACER . '
' . $this->_CRLF . + $this->_SPACER . $this->_SPACER . '' . $this->_OPS_VERSION . '' . $this->_CRLF . + $this->_SPACER . $this->_SPACER . '' . $msg_id . '' . $this->_CRLF . + $this->_SPACER . $this->_SPACER . '' . $msg_type . '' . $this->_CRLF . + $this->_SPACER . '
' . $this->_CRLF . + $this->_SPACER . '' . $this->_CRLF . + $xml_data_block . $this->_CRLF . + $this->_SPACER . '' . $this->_CRLF . + '
'; + + return $ops_msg; + } + + + /** + * Converts a PHP array into an OPS data_block tag + * @param array PHP array + * @return string OPS data_block tag + */ + function PHP2XML($data) { + return str_repeat($this->_SPACER,2) . '' . $this->_convertData($data, 3) . $this->_CRLF . str_repeat($this->_SPACER,2) . ''; + } + + + /** + * Recursivly converts PHP data into XML + * @param mixed PHP array or data + * @param int ident level + * @return string XML string + */ + function _convertData(&$array, $indent=0) { + $string = ''; + $IND = str_repeat($this->_SPACER,$indent); + + if (is_array($array)) { + if ($this->_is_assoc($array)) { # HASH REFERENCE + $string .= $this->_CRLF . $IND . ''; + $end = ''; + } else { # ARRAY REFERENCE + $string .= $this->_CRLF . $IND . ''; + $end = ''; + } + + foreach ($array as $k=>$v) { + $indent++; + /* don't encode some types of stuff */ + if ((gettype($v)=='resource') || (gettype($v)=='user function') || (gettype($v)=='unknown type')) { + continue; + } + + $string .= $this->_CRLF . $IND . '_convertData($v, $indent+1); + $string .= $this->_CRLF . $IND . ''; + } else { + $string .= $this->_quoteXMLChars($v) . '
'; + } + + $indent--; + } + $string .= $this->_CRLF . $IND . $end; + } else { # SCALAR + $string .= $this->_CRLF . $IND . '' . + $this->_quoteXMLChars($array) . ''; + } + return $string; + } + + + /** + * Quotes special XML characters + * @param string string to quote + * @return string quoted string + */ + function _quoteXMLChars($string) { + $search = array ('&', '<', '>', "'", '"'); + $replace = array ('&', '<', '>', ''', '"'); + $string = str_replace($search, $replace, $string); + $string = utf8_encode($string); + return $string; + } + + + /** + * Determines if an array is associative or not, since PHP + * doesn't really distinguish between the two, but Perl/OPS does + * @param array array to check + * @return boolean true if the array is associative + */ + function _is_assoc(&$array){ + if (is_array($array)) { + foreach ($array as $k=>$v) { + if (!is_int($k)) return true; + } + } + return false; + } +} diff --git a/src/bb-library/Registrar/includes/opensrs/spyc.php b/src/bb-library/Registrar/includes/opensrs/spyc.php new file mode 100644 index 000000000..cf5677234 --- /dev/null +++ b/src/bb-library/Registrar/includes/opensrs/spyc.php @@ -0,0 +1,1024 @@ + + * @author Chris Wanstrath + * @link http://code.google.com/p/spyc/ + * @copyright Copyright 2005-2006 Chris Wanstrath, 2006-2009 Vlad Andersen + * @license http://www.opensource.org/licenses/mit-license.php MIT License + * @package Spyc + */ + +if (!function_exists('spyc_load')) { + /** + * Parses YAML to array. + * @param string $string YAML string. + * @return array + */ + function spyc_load ($string) { + return Spyc::YAMLLoadString($string); + } +} + +if (!function_exists('spyc_load_file')) { + /** + * Parses YAML to array. + * @param string $file Path to YAML file. + * @return array + */ + function spyc_load_file ($file) { + return Spyc::YAMLLoad($file); + } +} + +/** + * The Simple PHP YAML Class. + * + * This class can be used to read a YAML file and convert its contents + * into a PHP array. It currently supports a very limited subsection of + * the YAML spec. + * + * Usage: + * + * $Spyc = new Spyc; + * $array = $Spyc->load($file); + * + * or: + * + * $array = Spyc::YAMLLoad($file); + * + * or: + * + * $array = spyc_load_file($file); + * + * @package Spyc + */ +class Spyc { + + // SETTINGS + + /** + * Setting this to true will force YAMLDump to enclose any string value in + * quotes. False by default. + * + * @var bool + */ + public $setting_dump_force_quotes = false; + + /** + * Setting this to true will forse YAMLLoad to use syck_load function when + * possible. False by default. + * @var bool + */ + public $setting_use_syck_is_possible = false; + + + + /**#@+ + * @access private + * @var mixed + */ + private $_dumpIndent; + private $_dumpWordWrap; + private $_containsGroupAnchor = false; + private $_containsGroupAlias = false; + private $path; + private $result; + private $LiteralPlaceHolder = '___YAML_Literal_Block___'; + private $SavedGroups = array(); + private $indent; + /** + * Path modifier that should be applied after adding current element. + * @var array + */ + private $delayedPath = array(); + + /**#@+ + * @access public + * @var mixed + */ + public $_nodeId; + +/** + * Load a valid YAML string to Spyc. + * @param string $input + * @return array + */ + public function load ($input) { + return $this->__loadString($input); + } + + /** + * Load a valid YAML file to Spyc. + * @param string $file + * @return array + */ + public function loadFile ($file) { + return $this->__load($file); + } + + /** + * Load YAML into a PHP array statically + * + * The load method, when supplied with a YAML stream (string or file), + * will do its best to convert YAML in a file into a PHP array. Pretty + * simple. + * Usage: + * + * $array = Spyc::YAMLLoad('lucky.yaml'); + * print_r($array); + * + * @access public + * @return array + * @param string $input Path of YAML file or string containing YAML + */ + public static function YAMLLoad($input) { + $Spyc = new Spyc; + return $Spyc->__load($input); + } + + /** + * Load a string of YAML into a PHP array statically + * + * The load method, when supplied with a YAML string, will do its best + * to convert YAML in a string into a PHP array. Pretty simple. + * + * Note: use this function if you don't want files from the file system + * loaded and processed as YAML. This is of interest to people concerned + * about security whose input is from a string. + * + * Usage: + * + * $array = Spyc::YAMLLoadString("---\n0: hello world\n"); + * print_r($array); + * + * @access public + * @return array + * @param string $input String containing YAML + */ + public static function YAMLLoadString($input) { + $Spyc = new Spyc; + return $Spyc->__loadString($input); + } + + /** + * Dump YAML from PHP array statically + * + * The dump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. Pretty simple. Feel free to + * save the returned string as nothing.yaml and pass it around. + * + * Oh, and you can decide how big the indent is and what the wordwrap + * for folding is. Pretty cool -- just pass in 'false' for either if + * you want to use the default. + * + * Indent's default is 2 spaces, wordwrap's default is 40 characters. And + * you can turn off wordwrap by passing in 0. + * + * @access public + * @return string + * @param array $array PHP array + * @param int $indent Pass in false to use the default, which is 2 + * @param int $wordwrap Pass in 0 for no wordwrap, false for default (40) + */ + public static function YAMLDump($array,$indent = false,$wordwrap = false) { + $spyc = new Spyc; + return $spyc->dump($array,$indent,$wordwrap); + } + + + /** + * Dump PHP array to YAML + * + * The dump method, when supplied with an array, will do its best + * to convert the array into friendly YAML. Pretty simple. Feel free to + * save the returned string as tasteful.yaml and pass it around. + * + * Oh, and you can decide how big the indent is and what the wordwrap + * for folding is. Pretty cool -- just pass in 'false' for either if + * you want to use the default. + * + * Indent's default is 2 spaces, wordwrap's default is 40 characters. And + * you can turn off wordwrap by passing in 0. + * + * @access public + * @return string + * @param array $array PHP array + * @param int $indent Pass in false to use the default, which is 2 + * @param int $wordwrap Pass in 0 for no wordwrap, false for default (40) + */ + public function dump($array,$indent = false,$wordwrap = false) { + // Dumps to some very clean YAML. We'll have to add some more features + // and options soon. And better support for folding. + + // New features and options. + if ($indent === false or !is_numeric($indent)) { + $this->_dumpIndent = 2; + } else { + $this->_dumpIndent = $indent; + } + + if ($wordwrap === false or !is_numeric($wordwrap)) { + $this->_dumpWordWrap = 40; + } else { + $this->_dumpWordWrap = $wordwrap; + } + + // New YAML document + $string = "---\n"; + + // Start at the base of the array and move through it. + if ($array) { + $array = (array)$array; + $first_key = key($array); + + $previous_key = -1; + foreach ($array as $key => $value) { + $string .= $this->_yamlize($key,$value,0,$previous_key, $first_key); + $previous_key = $key; + } + } + return $string; + } + + /** + * Attempts to convert a key / value array item to YAML + * @access private + * @return string + * @param $key The name of the key + * @param $value The value of the item + * @param $indent The indent of the current node + */ + private function _yamlize($key,$value,$indent, $previous_key = -1, $first_key = 0) { + if (is_array($value)) { + if (empty ($value)) + return $this->_dumpNode($key, array(), $indent, $previous_key, $first_key); + // It has children. What to do? + // Make it the right kind of item + $string = $this->_dumpNode($key, NULL, $indent, $previous_key, $first_key); + // Add the indent + $indent += $this->_dumpIndent; + // Yamlize the array + $string .= $this->_yamlizeArray($value,$indent); + } elseif (!is_array($value)) { + // It doesn't have children. Yip. + $string = $this->_dumpNode($key, $value, $indent, $previous_key, $first_key); + } + return $string; + } + + /** + * Attempts to convert an array to YAML + * @access private + * @return string + * @param $array The array you want to convert + * @param $indent The indent of the current level + */ + private function _yamlizeArray($array,$indent) { + if (is_array($array)) { + $string = ''; + $previous_key = -1; + $first_key = key($array); + foreach ($array as $key => $value) { + $string .= $this->_yamlize($key, $value, $indent, $previous_key, $first_key); + $previous_key = $key; + } + return $string; + } else { + return false; + } + } + + /** + * Returns YAML from a key and a value + * @access private + * @return string + * @param $key The name of the key + * @param $value The value of the item + * @param $indent The indent of the current node + */ + private function _dumpNode($key, $value, $indent, $previous_key = -1, $first_key = 0) { + // do some folding here, for blocks + if (is_string ($value) && ((strpos($value,"\n") !== false || strpos($value,": ") !== false || strpos($value,"- ") !== false || + strpos($value,"*") !== false || strpos($value,"#") !== false || strpos($value,"<") !== false || strpos($value,">") !== false || + strpos($value,"[") !== false || strpos($value,"]") !== false || strpos($value,"{") !== false || strpos($value,"}") !== false) || substr ($value, -1, 1) == ':')) { + $value = $this->_doLiteralBlock($value,$indent); + } else { + $value = $this->_doFolding($value,$indent); + if (is_bool($value)) { + $value = ($value) ? "true" : "false"; + } + } + + if ($value === array()) $value = '[ ]'; + + $spaces = str_repeat(' ',$indent); + + if (is_int($key) && $key - 1 == $previous_key && $first_key===0) { + // It's a sequence + $string = $spaces.'- '.$value."\n"; + } else { + if ($first_key===0) throw new Exception('Keys are all screwy. The first one was zero, now it\'s "'. $key .'"'); + // It's mapped + if (strpos($key, ":") !== false) { $key = '"' . $key . '"'; } + $string = $spaces.$key.': '.$value."\n"; + } + return $string; + } + + /** + * Creates a literal block for dumping + * @access private + * @return string + * @param $value + * @param $indent int The value of the indent + */ + private function _doLiteralBlock($value,$indent) { + if (strpos($value, "\n") === false && strpos($value, "'") === false) { + return sprintf ("'%s'", $value); + } + if (strpos($value, "\n") === false && strpos($value, '"') === false) { + return sprintf ('"%s"', $value); + } + $exploded = explode("\n",$value); + $newValue = '|'; + $indent += $this->_dumpIndent; + $spaces = str_repeat(' ',$indent); + foreach ($exploded as $line) { + $newValue .= "\n" . $spaces . trim($line); + } + return $newValue; + } + + /** + * Folds a string of text, if necessary + * @access private + * @return string + * @param $value The string you wish to fold + */ + private function _doFolding($value,$indent) { + // Don't do anything if wordwrap is set to 0 + + if ($this->_dumpWordWrap !== 0 && is_string ($value) && strlen($value) > $this->_dumpWordWrap) { + $indent += $this->_dumpIndent; + $indent = str_repeat(' ',$indent); + $wrapped = wordwrap($value,$this->_dumpWordWrap,"\n$indent"); + $value = ">\n".$indent.$wrapped; + } else { + if ($this->setting_dump_force_quotes && is_string ($value)) + $value = '"' . $value . '"'; + } + + + return $value; + } + +// LOADING FUNCTIONS + + private function __load($input) { + $Source = $this->loadFromSource($input); + return $this->loadWithSource($Source); + } + + private function __loadString($input) { + $Source = $this->loadFromString($input); + return $this->loadWithSource($Source); + } + + private function loadWithSource($Source) { + if (empty ($Source)) return array(); + if ($this->setting_use_syck_is_possible && function_exists ('syck_load')) { + $array = syck_load (implode ('', $Source)); + return is_array($array) ? $array : array(); + } + + $this->path = array(); + $this->result = array(); + + $cnt = count($Source); + for ($i = 0; $i < $cnt; $i++) { + $line = $Source[$i]; + + $this->indent = strlen($line) - strlen(ltrim($line)); + $tempPath = $this->getParentPathByIndent($this->indent); + $line = self::stripIndent($line, $this->indent); + if (self::isComment($line)) continue; + if (self::isEmpty($line)) continue; + $this->path = $tempPath; + + $literalBlockStyle = self::startsLiteralBlock($line); + if ($literalBlockStyle) { + $line = rtrim ($line, $literalBlockStyle . " \n"); + $literalBlock = ''; + $line .= $this->LiteralPlaceHolder; + + while (++$i < $cnt && $this->literalBlockContinues($Source[$i], $this->indent)) { + $literalBlock = $this->addLiteralLine($literalBlock, $Source[$i], $literalBlockStyle); + } + $i--; + } + + while (++$i < $cnt && self::greedilyNeedNextLine($line)) { + $line = rtrim ($line, " \n\t\r") . ' ' . ltrim ($Source[$i], " \t"); + } + $i--; + + + + if (strpos ($line, '#')) { + if (strpos ($line, '"') === false && strpos ($line, "'") === false) + $line = preg_replace('/\s+#(.+)$/','',$line); + } + + $lineArray = $this->_parseLine($line); + + if ($literalBlockStyle) + $lineArray = $this->revertLiteralPlaceHolder ($lineArray, $literalBlock); + + $this->addArray($lineArray, $this->indent); + + foreach ($this->delayedPath as $indent => $delayedPath) + $this->path[$indent] = $delayedPath; + + $this->delayedPath = array(); + + } + return $this->result; + } + + private function loadFromSource ($input) { + if (!empty($input) && strpos($input, "\n") === false && file_exists($input)) + return file($input); + + return $this->loadFromString($input); + } + + private function loadFromString ($input) { + $lines = explode("\n",$input); + foreach ($lines as $k => $_) { + $lines[$k] = rtrim ($_, "\r"); + } + return $lines; + } + + /** + * Parses YAML code and returns an array for a node + * @access private + * @return array + * @param string $line A line from the YAML file + */ + private function _parseLine($line) { + if (!$line) return array(); + $line = trim($line); + + if (!$line) return array(); + $array = array(); + + $group = $this->nodeContainsGroup($line); + if ($group) { + $this->addGroup($line, $group); + $line = $this->stripGroup ($line, $group); + } + + if ($this->startsMappedSequence($line)) + return $this->returnMappedSequence($line); + + if ($this->startsMappedValue($line)) + return $this->returnMappedValue($line); + + if ($this->isArrayElement($line)) + return $this->returnArrayElement($line); + + if ($this->isPlainArray($line)) + return $this->returnPlainArray($line); + + + return $this->returnKeyValuePair($line); + + } + + /** + * Finds the type of the passed value, returns the value as the new type. + * @access private + * @param string $value + * @return mixed + */ + private function _toType($value) { + if ($value === '') return null; + $first_character = $value[0]; + $last_character = substr($value, -1, 1); + + $is_quoted = false; + do { + if (!$value) break; + if ($first_character != '"' && $first_character != "'") break; + if ($last_character != '"' && $last_character != "'") break; + $is_quoted = true; + } while (0); + + if ($is_quoted) + return strtr(substr ($value, 1, -1), array ('\\"' => '"', '\'\'' => '\'', '\\\'' => '\'')); + + if (strpos($value, ' #') !== false) + $value = preg_replace('/\s+#(.+)$/','',$value); + + if ($first_character == '[' && $last_character == ']') { + // Take out strings sequences and mappings + $innerValue = trim(substr ($value, 1, -1)); + if ($innerValue === '') return array(); + $explode = $this->_inlineEscape($innerValue); + // Propagate value array + $value = array(); + foreach ($explode as $v) { + $value[] = $this->_toType($v); + } + return $value; + } + + if (strpos($value,': ')!==false && $first_character != '{') { + $array = explode(': ',$value); + $key = trim($array[0]); + array_shift($array); + $value = trim(implode(': ',$array)); + $value = $this->_toType($value); + return array($key => $value); + } + + if ($first_character == '{' && $last_character == '}') { + $innerValue = trim(substr ($value, 1, -1)); + if ($innerValue === '') return array(); + // Inline Mapping + // Take out strings sequences and mappings + $explode = $this->_inlineEscape($innerValue); + // Propagate value array + $array = array(); + foreach ($explode as $v) { + $SubArr = $this->_toType($v); + if (empty($SubArr)) continue; + if (is_array ($SubArr)) { + $array[key($SubArr)] = $SubArr[key($SubArr)]; continue; + } + $array[] = $SubArr; + } + return $array; + } + + if ($value == 'null' || $value == 'NULL' || $value == 'Null' || $value == '' || $value == '~') { + return null; + } + + if (intval($first_character) > 0 && preg_match ('/^[1-9]+[0-9]*$/', $value)) { + $intvalue = (int)$value; + if ($intvalue != PHP_INT_MAX) + $value = $intvalue; + return $value; + } + + if (in_array($value, + array('true', 'on', '+', 'yes', 'y', 'True', 'TRUE', 'On', 'ON', 'YES', 'Yes', 'Y'))) { + return true; + } + + if (in_array(strtolower($value), + array('false', 'off', '-', 'no', 'n'))) { + return false; + } + + if (is_numeric($value)) { + if ($value === '0') return 0; + if (trim ($value, 0) === $value) + $value = (float)$value; + return $value; + } + + return $value; + } + + /** + * Used in inlines to check for more inlines or quoted strings + * @access private + * @return array + */ + private function _inlineEscape($inline) { + // There's gotta be a cleaner way to do this... + // While pure sequences seem to be nesting just fine, + // pure mappings and mappings with sequences inside can't go very + // deep. This needs to be fixed. + + $seqs = array(); + $maps = array(); + $saved_strings = array(); + + // Check for strings + $regex = '/(?:(")|(?:\'))((?(1)[^"]+|[^\']+))(?(1)"|\')/'; + if (preg_match_all($regex,$inline,$strings)) { + $saved_strings = $strings[0]; + $inline = preg_replace($regex,'YAMLString',$inline); + } + unset($regex); + + $i = 0; + do { + + // Check for sequences + while (preg_match('/\[([^{}\[\]]+)\]/U',$inline,$matchseqs)) { + $seqs[] = $matchseqs[0]; + $inline = preg_replace('/\[([^{}\[\]]+)\]/U', ('YAMLSeq' . (count($seqs) - 1) . 's'), $inline, 1); + } + + // Check for mappings + while (preg_match('/{([^\[\]{}]+)}/U',$inline,$matchmaps)) { + $maps[] = $matchmaps[0]; + $inline = preg_replace('/{([^\[\]{}]+)}/U', ('YAMLMap' . (count($maps) - 1) . 's'), $inline, 1); + } + + if ($i++ >= 10) break; + + } while (strpos ($inline, '[') !== false || strpos ($inline, '{') !== false); + + $explode = explode(', ',$inline); + $stringi = 0; $i = 0; + + while (1) { + + // Re-add the sequences + if (!empty($seqs)) { + foreach ($explode as $key => $value) { + if (strpos($value,'YAMLSeq') !== false) { + foreach ($seqs as $seqk => $seq) { + $explode[$key] = str_replace(('YAMLSeq'.$seqk.'s'),$seq,$value); + $value = $explode[$key]; + } + } + } + } + + // Re-add the mappings + if (!empty($maps)) { + foreach ($explode as $key => $value) { + if (strpos($value,'YAMLMap') !== false) { + foreach ($maps as $mapk => $map) { + $explode[$key] = str_replace(('YAMLMap'.$mapk.'s'), $map, $value); + $value = $explode[$key]; + } + } + } + } + + + // Re-add the strings + if (!empty($saved_strings)) { + foreach ($explode as $key => $value) { + while (strpos($value,'YAMLString') !== false) { + $explode[$key] = preg_replace('/YAMLString/',$saved_strings[$stringi],$value, 1); + unset($saved_strings[$stringi]); + ++$stringi; + $value = $explode[$key]; + } + } + } + + $finished = true; + foreach ($explode as $key => $value) { + if (strpos($value,'YAMLSeq') !== false) { + $finished = false; break; + } + if (strpos($value,'YAMLMap') !== false) { + $finished = false; break; + } + if (strpos($value,'YAMLString') !== false) { + $finished = false; break; + } + } + if ($finished) break; + + $i++; + if ($i > 10) + break; // Prevent infinite loops. + } + + return $explode; + } + + private function literalBlockContinues ($line, $lineIndent) { + if (!trim($line)) return true; + if (strlen($line) - strlen(ltrim($line)) > $lineIndent) return true; + return false; + } + + private function referenceContentsByAlias ($alias) { + do { + if (!isset($this->SavedGroups[$alias])) { echo "Bad group name: $alias."; break; } + $groupPath = $this->SavedGroups[$alias]; + $value = $this->result; + foreach ($groupPath as $k) { + $value = $value[$k]; + } + } while (false); + return $value; + } + + private function addArrayInline ($array, $indent) { + $CommonGroupPath = $this->path; + if (empty ($array)) return false; + + foreach ($array as $k => $_) { + $this->addArray(array($k => $_), $indent); + $this->path = $CommonGroupPath; + } + return true; + } + + private function addArray ($incoming_data, $incoming_indent) { + + // print_r ($incoming_data); + + if (count ($incoming_data) > 1) + return $this->addArrayInline ($incoming_data, $incoming_indent); + + $key = key ($incoming_data); + $value = isset($incoming_data[$key]) ? $incoming_data[$key] : null; + if ($key === '__!YAMLZero') $key = '0'; + + if ($incoming_indent == 0 && !$this->_containsGroupAlias && !$this->_containsGroupAnchor) { // Shortcut for root-level values. + if ($key || $key === '' || $key === '0') { + $this->result[$key] = $value; + } else { + $this->result[] = $value; end ($this->result); $key = key ($this->result); + } + $this->path[$incoming_indent] = $key; + return; + } + + + + $history = array(); + // Unfolding inner array tree. + $history[] = $_arr = $this->result; + foreach ($this->path as $k) { + $history[] = $_arr = $_arr[$k]; + } + + if ($this->_containsGroupAlias) { + $value = $this->referenceContentsByAlias($this->_containsGroupAlias); + $this->_containsGroupAlias = false; + } + + + // Adding string or numeric key to the innermost level or $this->arr. + if (is_string($key) && $key == '<<') { + if (!is_array ($_arr)) { $_arr = array (); } + + $_arr = array_merge ($_arr, $value); + } else if ($key || $key === '' || $key === '0') { + $_arr[$key] = $value; + } else { + if (!is_array ($_arr)) { $_arr = array ($value); $key = 0; } + else { $_arr[] = $value; end ($_arr); $key = key ($_arr); } + } + + $reverse_path = array_reverse($this->path); + $reverse_history = array_reverse ($history); + $reverse_history[0] = $_arr; + $cnt = count($reverse_history) - 1; + for ($i = 0; $i < $cnt; $i++) { + $reverse_history[$i+1][$reverse_path[$i]] = $reverse_history[$i]; + } + $this->result = $reverse_history[$cnt]; + + $this->path[$incoming_indent] = $key; + + if ($this->_containsGroupAnchor) { + $this->SavedGroups[$this->_containsGroupAnchor] = $this->path; + if (is_array ($value)) { + $k = key ($value); + if (!is_int ($k)) { + $this->SavedGroups[$this->_containsGroupAnchor][$incoming_indent + 2] = $k; + } + } + $this->_containsGroupAnchor = false; + } + + } + + private static function startsLiteralBlock ($line) { + $lastChar = substr (trim($line), -1); + if ($lastChar != '>' && $lastChar != '|') return false; + if ($lastChar == '|') return $lastChar; + // HTML tags should not be counted as literal blocks. + if (preg_match ('#<.*?>$#', $line)) return false; + return $lastChar; + } + + private static function greedilyNeedNextLine($line) { + $line = trim ($line); + if (!strlen($line)) return false; + if (substr ($line, -1, 1) == ']') return false; + if ($line[0] == '[') return true; + if (preg_match ('#^[^:]+?:\s*\[#', $line)) return true; + return false; + } + + private function addLiteralLine ($literalBlock, $line, $literalBlockStyle) { + $line = self::stripIndent($line); + $line = rtrim ($line, "\r\n\t ") . "\n"; + if ($literalBlockStyle == '|') { + return $literalBlock . $line; + } + if (strlen($line) == 0) + return rtrim($literalBlock, ' ') . "\n"; + if ($line == "\n" && $literalBlockStyle == '>') { + return rtrim ($literalBlock, " \t") . "\n"; + } + if ($line != "\n") + $line = trim ($line, "\r\n ") . " "; + return $literalBlock . $line; + } + + function revertLiteralPlaceHolder ($lineArray, $literalBlock) { + foreach ($lineArray as $k => $_) { + if (is_array($_)) + $lineArray[$k] = $this->revertLiteralPlaceHolder ($_, $literalBlock); + else if (substr($_, -1 * strlen ($this->LiteralPlaceHolder)) == $this->LiteralPlaceHolder) + $lineArray[$k] = rtrim ($literalBlock, " \r\n"); + } + return $lineArray; + } + + private static function stripIndent ($line, $indent = -1) { + if ($indent == -1) $indent = strlen($line) - strlen(ltrim($line)); + return substr ($line, $indent); + } + + private function getParentPathByIndent ($indent) { + if ($indent == 0) return array(); + $linePath = $this->path; + do { + end($linePath); $lastIndentInParentPath = key($linePath); + if ($indent <= $lastIndentInParentPath) array_pop ($linePath); + } while ($indent <= $lastIndentInParentPath); + return $linePath; + } + + + private function clearBiggerPathValues ($indent) { + + + if ($indent == 0) $this->path = array(); + if (empty ($this->path)) return true; + + foreach ($this->path as $k => $_) { + if ($k > $indent) unset ($this->path[$k]); + } + + return true; + } + + + private static function isComment ($line) { + if (!$line) return false; + if ($line[0] == '#') return true; + if (trim($line, " \r\n\t") == '---') return true; + return false; + } + + private static function isEmpty ($line) { + return (trim ($line) === ''); + } + + + private function isArrayElement ($line) { + if (!$line) return false; + if ($line[0] != '-') return false; + if (strlen ($line) > 3) + if (substr($line,0,3) == '---') return false; + + return true; + } + + private function isHashElement ($line) { + return strpos($line, ':'); + } + + private function isLiteral ($line) { + if ($this->isArrayElement($line)) return false; + if ($this->isHashElement($line)) return false; + return true; + } + + + private static function unquote ($value) { + if (!$value) return $value; + if (!is_string($value)) return $value; + if ($value[0] == '\'') return trim ($value, '\''); + if ($value[0] == '"') return trim ($value, '"'); + return $value; + } + + private function startsMappedSequence ($line) { + return ($line[0] == '-' && substr ($line, -1, 1) == ':'); + } + + private function returnMappedSequence ($line) { + $array = array(); + $key = self::unquote(trim(substr($line,1,-1))); + $array[$key] = array(); + $this->delayedPath = array(strpos ($line, $key) + $this->indent => $key); + return array($array); + } + + private function returnMappedValue ($line) { + $array = array(); + $key = self::unquote (trim(substr($line,0,-1))); + $array[$key] = ''; + return $array; + } + + private function startsMappedValue ($line) { + return (substr ($line, -1, 1) == ':'); + } + + private function isPlainArray ($line) { + return ($line[0] == '[' && substr ($line, -1, 1) == ']'); + } + + private function returnPlainArray ($line) { + return $this->_toType($line); + } + + private function returnKeyValuePair ($line) { + $array = array(); + $key = ''; + if (strpos ($line, ':')) { + // It's a key/value pair most likely + // If the key is in double quotes pull it out + if (($line[0] == '"' || $line[0] == "'") && preg_match('/^(["\'](.*)["\'](\s)*:)/',$line,$matches)) { + $value = trim(str_replace($matches[1],'',$line)); + $key = $matches[2]; + } else { + // Do some guesswork as to the key and the value + $explode = explode(':',$line); + $key = trim($explode[0]); + array_shift($explode); + $value = trim(implode(':',$explode)); + } + // Set the type of the value. Int, string, etc + $value = $this->_toType($value); + if ($key === '0') $key = '__!YAMLZero'; + $array[$key] = $value; + } else { + $array = array ($line); + } + return $array; + + } + + + private function returnArrayElement ($line) { + if (strlen($line) <= 1) return array(array()); // Weird %) + $array = array(); + $value = trim(substr($line,1)); + $value = $this->_toType($value); + $array[] = $value; + return $array; + } + + + private function nodeContainsGroup ($line) { + $symbolsForReference = 'A-z0-9_\-'; + if (strpos($line, '&') === false && strpos($line, '*') === false) return false; // Please die fast ;-) + if ($line[0] == '&' && preg_match('/^(&['.$symbolsForReference.']+)/', $line, $matches)) return $matches[1]; + if ($line[0] == '*' && preg_match('/^(\*['.$symbolsForReference.']+)/', $line, $matches)) return $matches[1]; + if (preg_match('/(&['.$symbolsForReference.']+)$/', $line, $matches)) return $matches[1]; + if (preg_match('/(\*['.$symbolsForReference.']+$)/', $line, $matches)) return $matches[1]; + if (preg_match ('#^\s*<<\s*:\s*(\*[^\s]+).*$#', $line, $matches)) return $matches[1]; + return false; + + } + + private function addGroup ($line, $group) { + if ($group[0] == '&') $this->_containsGroupAnchor = substr ($group, 1); + if ($group[0] == '*') $this->_containsGroupAlias = substr ($group, 1); + //print_r ($this->path); + } + + private function stripGroup ($line, $group) { + $line = trim(str_replace($group, '', $line)); + return $line; + } +} + +// Enable use of Spyc from command line +// The syntax is the following: php spyc.php spyc.yaml + +define ('SPYC_FROM_COMMAND_LINE', false); + +do { + if (!SPYC_FROM_COMMAND_LINE) break; + if (empty ($_SERVER['argc']) || $_SERVER['argc'] < 2) break; + if (empty ($_SERVER['PHP_SELF']) || $_SERVER['PHP_SELF'] != 'spyc.php') break; + $file = $argv[1]; + printf ("Spyc loading file: %s\n", $file); + print_r (spyc_load_file ($file)); +} while (0); \ No newline at end of file diff --git a/src/bb-library/Server/Account.php b/src/bb-library/Server/Account.php new file mode 100644 index 000000000..3e9906316 --- /dev/null +++ b/src/bb-library/Server/Account.php @@ -0,0 +1,177 @@ +username = $param; + return $this; + } + + public function getUsername() + { + return $this->username; + } + + public function setPassword($param) + { + $this->password = $param; + return $this; + } + + public function getPassword() + { + return $this->password; + } + + public function setDomain($param) + { + $this->domain = $param; + return $this; + } + + public function getDomain() + { + return $this->domain; + } + + public function setIp($param) + { + $this->ip = $param; + return $this; + } + + public function getIp() + { + return $this->ip; + } + + public function setClient(Server_Client $param) + { + $this->client = $param; + return $this; + } + + public function getClient() + { + return $this->client; + } + + public function setPackage(Server_Package $param) + { + $this->package = $param; + return $this; + } + + public function getPackage() + { + return $this->package; + } + + public function setNote($param) + { + $this->note = $param; + return $this; + } + + public function getNote() + { + return $this->note; + } + + public function setReseller($param) + { + $this->reseller = (bool)$param; + return $this; + } + + public function getReseller() + { + return $this->reseller; + } + + public function setSuspended($param) + { + $this->suspended = (bool)$param; + return $this; + } + + public function getSuspended() + { + return $this->suspended; + } + + public function setNs1($param) + { + $this->ns_1 = $param; + return $this; + } + + public function getNs1() + { + return $this->ns_1; + } + + public function setNs2($param) + { + $this->ns_2 = $param; + return $this; + } + + public function getNs2() + { + return $this->ns_2; + } + + public function setNs3($param) + { + $this->ns_3 = $param; + return $this; + } + + public function getNs3() + { + return $this->ns_3; + } + + public function setNs4($param) + { + $this->ns_4 = $param; + return $this; + } + + public function getNs4() + { + return $this->ns_4; + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Client.php b/src/bb-library/Server/Client.php new file mode 100644 index 000000000..b95b029b7 --- /dev/null +++ b/src/bb-library/Server/Client.php @@ -0,0 +1,189 @@ +id = $id; + return $this; + } + + public function getId() + { + return $this->id; + } + + public function setFullName($param) + { + $this->full_name = $param; + return $this; + } + + public function getFullName() + { + return $this->full_name; + } + + public function setCompany($company) + { + $this->company = $company; + return $this; + } + + public function getCompany() + { + return $this->company; + } + + public function setEmail($param) + { + $this->email = $param; + return $this; + } + + public function getEmail() + { + return $this->email; + } + + public function setAddress1($param) + { + $this->address_1 = $param; + return $this; + } + + public function getAddress1() + { + return $this->address_1; + } + + public function setAddress2($param) + { + $this->address_2 = $param; + return $this; + } + + public function getAddress2() + { + return $this->address_2; + } + + public function setStreet($param) + { + $this->street = $param; + return $this; + } + + public function getStreet() + { + return $this->street; + } + + public function setCity($param) + { + $this->city = $param; + return $this; + } + + public function getCity() + { + return $this->city; + } + + public function setState($param) + { + $this->state = $param; + return $this; + } + + public function getState() + { + return $this->state; + } + + public function setCountry($param) + { + $this->country = $param; + return $this; + } + + public function getCountry() + { + return $this->country; + } + + public function setZip($param) + { + $this->zip = $param; + return $this; + } + + public function getZip() + { + return $this->zip; + } + + public function setTelephone($param) + { + $this->telephone = $param; + return $this; + } + + public function getTelephone() + { + return $this->telephone; + } + + public function setFax($param) + { + $this->fax = $param; + return $this; + } + + public function getFax() + { + return $this->fax; + } + + public function setWww($param) + { + $this->www = $param; + return $this; + } + + public function getWww() + { + return $this->www; + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Exception.php b/src/bb-library/Server/Exception.php new file mode 100644 index 000000000..8c31526de --- /dev/null +++ b/src/bb-library/Server/Exception.php @@ -0,0 +1,22 @@ + NULL, + 'host' => NULL, + 'secure' => FALSE, + 'username' => NULL, + 'password' => NULL, + 'accesshash'=> NULL, + 'port' => NULL, + ); + + public function __construct($options) + { + if(isset($options['ip'])) { + $this->_config['ip'] = $options['ip']; + } + + if(isset($options['host'])) { + $this->_config['host'] = $options['host']; + } + + if(isset($options['secure'])) { + $this->_config['secure'] = (bool)$options['secure']; + } + + if(isset($options['username'])) { + $this->_config['username'] = $options['username']; + } + + if(isset($options['password'])) { + $this->_config['password'] = $options['password']; + } + + if(isset($options['accesshash'])) { + $this->_config['accesshash'] = $options['accesshash']; + } + + /** + * Custom connection port to API. + * If not provided, using default server manager port + */ + if(isset($options['port'])) { + $this->_config['port'] = $options['port']; + } + + $this->init(); + } + + public function setLog(Box_Log $value) + { + $this->_log = $value; + return $this; + } + + public function getLog() + { + if(!$this->_log instanceof Box_Log) { + $log = new Box_Log(); + $log->addWriter(new Box_LogDb('Model_ActivitySystem')); + return $log; + } + return $this->_log; + } + + protected function init(){} + + /** + * @return string + */ + abstract public function getLoginUrl(); + + /** + * @return string + */ + abstract public function getResellerLoginUrl(); + + /** + * @return bool + * @throws Server_Exception + */ + abstract public function testConnection(); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function createAccount(Server_Account $a); + + /** + * @param Server_Account + * @return Server_Account + * @throws Server_Exception + */ + abstract public function synchronizeAccount(Server_Account $a); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function suspendAccount(Server_Account $a); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function unsuspendAccount(Server_Account $a); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function cancelAccount(Server_Account $a); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function changeAccountPassword(Server_Account $a, $new_password); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function changeAccountUsername(Server_Account $a, $new_username); + + /** + * @param Server_Account + * @return bool + * @throws Server_Exception + */ + abstract public function changeAccountDomain(Server_Account $a, $new_domain); + + /** + * @param Server_Account + * @param string - new ip + * @return bool + * @throws Server_Exception + */ + abstract public function changeAccountIp(Server_Account $a, $new_ip); + + /** + * @param Server_Account + * @param Server_Package - new package + * @return bool + * @throws Server_Exception + */ + abstract public function changeAccountPackage(Server_Account $a, Server_Package $p); +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Custom.php b/src/bb-library/Server/Manager/Custom.php new file mode 100644 index 000000000..1985c3351 --- /dev/null +++ b/src/bb-library/Server/Manager/Custom.php @@ -0,0 +1,220 @@ + 'Custom Server Manager', + ); + } + + /** + * Returns link to account management page + * + * @return string + */ + public function getLoginUrl() + { + return 'http://www.google.com?q=cpanel'; + } + + /** + * Returns link to reseller account management + * @return string + */ + public function getResellerLoginUrl() + { + return 'http://www.google.com?q=whm'; + } + + /** + * This method is called to check if configuration is correct + * and class can connect to server + * + * @return boolean + */ + public function testConnection() + { + return TRUE; + } + + /** + * MEthods retrieves information from server, assignes new values to + * cloned Server_Account object and returns it. + * @param Server_Account $a + * @return Server_Account + */ + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info('Synchronizing account with server '.$a->getUsername()); + $new = clone $a; + //@example - retrieve username from server and set it to cloned object + //$new->setUsername('newusername'); + return $new; + } + + /** + * Create new account on server + * + * @param Server_Account $a + */ + public function createAccount(Server_Account $a) + { + if($a->getReseller()) { + $this->getLog()->info('Creating reseller hosting account'); + } else { + $this->getLog()->info('Creating shared hosting account'); + } + } + + /** + * Suspend account on server + * @param Server_Account $a + */ + public function suspendAccount(Server_Account $a) + { + if($a->getReseller()) { + $this->getLog()->info('Suspending reseller hosting account'); + } else { + $this->getLog()->info('Suspending shared hosting account'); + } + } + + /** + * Unsuspend account on server + * @param Server_Account $a + */ + public function unsuspendAccount(Server_Account $a) + { + if($a->getReseller()) { + $this->getLog()->info('Unsuspending reseller hosting account'); + } else { + $this->getLog()->info('Unsuspending shared hosting account'); + } + } + + /** + * Cancel account on server + * @param Server_Account $a + */ + public function cancelAccount(Server_Account $a) + { + if($a->getReseller()) { + $this->getLog()->info('Canceling reseller hosting account'); + } else { + $this->getLog()->info('Canceling shared hosting account'); + } + } + + /** + * Change account package on server + * @param Server_Account $a + * @param Server_Package $p + */ + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + if($a->getReseller()) { + $this->getLog()->info('Updating reseller hosting account'); + } else { + $this->getLog()->info('Updating shared hosting account'); + } + + $p->getName(); + $p->getQuota(); + $p->getBandwidth(); + $p->getMaxSubdomains(); + $p->getMaxParkedDomains(); + $p->getMaxDomains(); + $p->getMaxFtp(); + $p->getMaxSql(); + $p->getMaxPop(); + + $p->getCustomValue('param_name'); + } + + /** + * Change account username on server + * @param Server_Account $a + * @param type $new - new account username + */ + public function changeAccountUsername(Server_Account $a, $new) + { + if($a->getReseller()) { + $this->getLog()->info('Changing reseller hosting account username'); + } else { + $this->getLog()->info('Changing shared hosting account username'); + } + } + + /** + * Change account domain on server + * @param Server_Account $a + * @param type $new - new domain name + */ + public function changeAccountDomain(Server_Account $a, $new) + { + if($a->getReseller()) { + $this->getLog()->info('Changing reseller hosting account domain'); + } else { + $this->getLog()->info('Changing shared hosting account domain'); + } + } + + /** + * Change account password on server + * @param Server_Account $a + * @param type $new - new password + */ + public function changeAccountPassword(Server_Account $a, $new) + { + if($a->getReseller()) { + $this->getLog()->info('Changing reseller hosting account password'); + } else { + $this->getLog()->info('Changing shared hosting account password'); + } + } + + /** + * Change account IP on server + * @param Server_Account $a + * @param type $new - account IP + */ + public function changeAccountIp(Server_Account $a, $new) + { + if($a->getReseller()) { + $this->getLog()->info('Changing reseller hosting account ip'); + } else { + $this->getLog()->info('Changing shared hosting account ip'); + } + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Directadmin.php b/src/bb-library/Server/Manager/Directadmin.php new file mode 100644 index 000000000..76091982d --- /dev/null +++ b/src/bb-library/Server/Manager/Directadmin.php @@ -0,0 +1,439 @@ +_config['host'])) { + throw new Server_Exception('Server manager "Direct Admin" is not configured properly. Hostname is not set'); + } + + if(empty($this->_config['username'])) { + throw new Server_Exception('Server manager "Direct Admin" is not configured properly. Username is not set'); + } + + if(empty($this->_config['password'])) { + throw new Server_Exception('Server manager "Direct Admin" is not configured properly. Password is not set'); + } + } + + public static function getForm() + { + return array( + 'label' => 'Direct Admin', + ); + } + + public function getLoginUrl() + { + $host = $this->_config['host']; + return 'http://'.$host.':2222'; + } + + public function getResellerLoginUrl() + { + return $this->getLoginUrl(); + } + + public function testConnection() + { + $results = $this->_request('CMD_API_SHOW_RESELLER_IPS'); + return is_array($results); + } + + public function synchronizeAccount(Server_Account $a) + { + return $a; + } + + public function createAccount(Server_Account $a) + { + $ips = $this->getIps(); + if(empty($ips)) { + throw new Server_Exception(sprintf('Server Manager DirectAdmin Error: "%s" ', 'There are no IPs on DirectAdmin server')); + } + $ip = $ips[array_rand($ips)]; + + $package = $a->getPackage(); + $client = $a->getClient(); + + $fields = array (); + $fields['action'] = 'create'; + $fields['add'] = 'Submit'; + $fields['username'] = $a->getUsername(); + $fields['email'] = $client->getEmail(); + $fields['passwd'] = $a->getPassword(); + $fields['passwd2'] = $a->getPassword(); + $fields['domain'] = $a->getDomain(); + + // do not create new package +// $packages = $this->getPackages(); +// $fields['package'] = $package->getName(); + + $fields['ip'] = $ip; + $fields['notify'] = 'no'; + + $fields['bandwidth'] = $package->getBandwidth(); //Amount of bandwidth User will be allowed to use. Number, in Megabytes + if ($package->getBandwidth() == 'unlimited') { + $fields['ubandwidth'] = 'ON'; //ON or OFF. If ON, bandwidth is ignored and no limit is set + } + $fields['quota'] = $package->getQuota(); //Amount of disk space User will be allowed to use. Number, in Megabytes + if ($package->getQuota() == 'unlimited') { + $fields['uquota'] = 'ON'; //ON or OFF. If ON, quota is ignored and no limit is set + } + $fields['vdomains'] = $package->getMaxDomains(); //Number of domains the User will be allowed to create + if ($package->getMaxDomains() == 'unlimited') { + $fields['uvdomains'] = 'ON'; //ON or OFF. If ON, vdomains is ignored and no limit is set + } + $fields['nsubdomains'] = $package->getMaxSubdomains(); //Number of subdomains the User will be allowed to create + if ($package->getMaxSubdomains() == 'unlimited') { + $fields['unsubdomains'] = 'ON'; //ON or OFF. If ON, nsubdomains is ignored and no limit is set + } + $fields['domainptr'] = $package->getMaxParkedDomains(); //Number of domain pointers the User will be allowed to create + if ($package->getMaxParkedDomains() == 'unlimited') { + $fields['udomainptr'] = 'ON'; //ON or OFF Unlimited option for domainptr + } + $fields['nemails'] = $package->getMaxPop(); //Number of pop accounts the User will be allowed to create + if ($package->getMaxPop() == 'unlimited') { + $fields['unemails'] = 'ON'; //ON or OFF Unlimited option for nemails + } + $fields['mysql'] = $package->getMaxSql(); //Number of MySQL databases the User will be allowed to create + if ($package->getMaxSql() == 'unlimited') { + $fields['umysql'] = 'ON'; //ON or OFF Unlimited option for mysql + } + $fields['ftp'] = $package->getMaxFtp(); //Number of ftp accounts the User will be allowed to create + if ($package->getMaxFtp() == 'unlimited') { + $fields['uftp'] = 'ON'; //ON or OFF Unlimited option for ftp + } + $fields['nemailf'] = $package->getCustomValue('nemailf'); //Number of forwarders the User will be allowed to create + if ($fields['nemailf'] == 'unlimited') { + $fields['unemailf'] = 'ON'; //ON or OFF Unlimited option for nemailf + } + $fields['nemailml'] = $package->getCustomValue('nemailml'); //Number of mailing lists the User will be allowed to create + if ($fields['nemailml'] == 'unlimited') { + $fields['unemailml'] = 'ON'; //ON or OFF Unlimited option for nemailml + } + $fields['nemailr'] = $package->getCustomValue('nemailr'); //Number of autoresponders the User will be allowed to create + if ($fields['nemailr'] == 'unlimited') { + $fields['unemailr'] = 'ON'; //ON or OFF Unlimited option for nemailr + } + + $fields['aftp'] = $package->getCustomValue('aftp') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will be able to have anonymous ftp accounts. + $fields['cgi'] = $package->getCustomValue('cgi') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run cgi scripts in their cgi-bin. + $fields['php'] = $package->getCustomValue('php') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run php scripts. + $fields['spam'] = $package->getCustomValue('spam') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run scan email with SpamAssassin. + $fields['cron'] = $package->getCustomValue('cron') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to creat cronjobs. + $fields['catchall'] = $package->getCustomValue('catchall') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to enable and customize a catch-all email (*@domain.com). + $fields['ssl'] = $package->getCustomValue('ssl') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to access their websites through secure https://. + $fields['ssh'] = $package->getCustomValue('ssh') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have an ssh account. + $fields['sysinfo'] = $package->getCustomValue('sysinfo') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have access to a page that shows the system information. + $fields['dnscontrol'] = $package->getCustomValue('dnscontrol') ? 'ON' : 'OFF'; //ON or OFF If ON, the User will be able to modify his/her dns records. + $command = 'CMD_API_ACCOUNT_USER'; + + if ($a->getReseller()) { + $command = 'CMD_ACCOUNT_RESELLER'; + + $fields['ips'] = 1; //Number of ips that will be allocated to the Reseller upon account during account + $fields['ip'] = 'assign'; + } + + try { + $results = $this->_request($command, $fields); + } catch (Exception $e) { + if (strtolower($e->getMessage()) == strtolower(sprintf('Server Manager DirectAdmin Error: "%s" ', 'That domain already exists'))) { + return true; + } else { + throw new Server_Exception($e->getMessage()); + } + } + + if (strpos(implode('', $results), 'Unable to assign the Reseller ANY ips') !== false) { + throw new Server_Exception('Unable to assign the Reseller ANY ips. Make sure to have free, un-assigned ips.'); + } + + if (strpos(implode('', $results), 'Error Creating User') !== false) { + throw new Server_Exception('Error Creating User'); + } + + return true; + } + + public function suspendAccount(Server_Account $a) + { + $info = $this->getAccountInfo($a); + if($info['suspended'] == 'yes') { + return true; + } + + $fields = array(); + $fields['location'] = 'CMD_USER_SHOW'; + $fields['suspend'] = 'Suspend'; + $fields['select0'] = $a->getUsername(); + $result = $this->_request('CMD_API_SELECT_USERS', $fields); + + return true; + } + + public function unsuspendAccount(Server_Account $a) + { + $info = $this->getAccountInfo($a); + if($info['suspended'] == 'no') { + throw new Server_Exception('Server Manager DirectAdmin Error: "Account is not suspended"'); + } + + $fields = array(); + $fields['location'] = 'CMD_USER_SHOW'; + $fields['suspend'] = 'Unsuspend'; + $fields['select0'] = $a->getUsername(); + $this->_request('CMD_API_SELECT_USERS', $fields); + return true; + } + + public function cancelAccount(Server_Account $a) + { + $fields = array(); + $fields['confirmed'] = 'Confirm'; + $fields['delete'] = 'yes'; + $fields['select0'] = $a->getUsername(); + $this->_request('CMD_API_SELECT_USERS', $fields); + return true; + } + + public function modifyAccount(Server_Account $a) + { + $package = $a->getPackage(); + + $fields = array (); + $fields['action'] = 'customize'; + $fields['user'] = $a->getUsername(); + + $fields['bandwidth'] = $package->getBandwidth(); //Amount of bandwidth User will be allowed to use. Number, in Megabytes + if ($package->getBandwidth() == 'unlimited') { + $fields['ubandwidth'] = 'ON'; //ON or OFF. If ON, bandwidth is ignored and no limit is set + } + $fields['quota'] = $package->getQuota(); //Amount of disk space User will be allowed to use. Number, in Megabytes + if ($package->getQuota() == 'unlimited') { + $fields['uquota'] = 'ON'; //ON or OFF. If ON, quota is ignored and no limit is set + } + $fields['vdomains'] = $package->getMaxDomains(); //Number of domains the User will be allowed to create + if ($package->getMaxDomains() == 'unlimited') { + $fields['uvdomains'] = 'ON'; //ON or OFF. If ON, vdomains is ignored and no limit is set + } + $fields['nsubdomains'] = $package->getMaxSubdomains(); //Number of subdomains the User will be allowed to create + if ($package->getMaxSubdomains() == 'unlimited') { + $fields['unsubdomains'] = 'ON'; //ON or OFF. If ON, nsubdomains is ignored and no limit is set + } + $fields['nemails'] = $package->getMaxPop(); //Number of pop accounts the User will be allowed to create + if ($package->getMaxPop() == 'unlimited') { + $fields['unemails'] = 'ON'; //ON or OFF Unlimited option for nemails + } + $fields['nemailf'] = $package->getMaxEmailForwarders(); //Number of forwarders the User will be allowed to create + if ($package->getMaxEmailForwarders() == 'unlimited') { + $fields['unemailf'] = 'ON'; //ON or OFF Unlimited option for nemailf + } + $fields['nemailml'] = $package->getMaxEmailLists(); //Number of mailing lists the User will be allowed to create + if ($package->getMaxEmailLists() == 'unlimited') { + $fields['unemailml'] = 'ON'; //ON or OFF Unlimited option for nemailml + } + $fields['nemailr'] = $package->getMaxEmailAutoresponders(); //Number of autoresponders the User will be allowed to create + if ($package->getMaxEmailAutoresponders() == 'unlimited') { + $fields['unemailr'] = 'ON'; //ON or OFF Unlimited option for nemailr + } + $fields['mysql'] = $package->getMaxSql(); //Number of MySQL databases the User will be allowed to create + if ($package->getMaxSql() == 'unlimited') { + $fields['umysql'] = 'ON'; //ON or OFF Unlimited option for mysql + } + $fields['domainptr'] = $package->getMaxParkedDomains(); //Number of domain pointers the User will be allowed to create + if ($package->getMaxParkedDomains() == 'unlimited') { + $fields['udomainptr'] = 'ON'; //ON or OFF Unlimited option for domainptr + } + $fields['ftp'] = $package->getMaxFtp(); //Number of ftp accounts the User will be allowed to create + if ($package->getMaxFtp() == 'unlimited') { + $fields['uftp'] = 'ON'; //ON or OFF Unlimited option for ftp + } + $fields['aftp'] = $package->getHasAnonymousFtp() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will be able to have anonymous ftp accounts. + $fields['cgi'] = $package->getHasCgi() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run cgi scripts in their cgi-bin. + $fields['php'] = $package->getHasPhp() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run php scripts. + $fields['spam'] = $package->getHasSpamFilter() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to run scan email with SpamAssassin. + $fields['cron'] = $package->getHasCron() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to creat cronjobs. + $fields['catchall'] = $package->getHasCatchAll() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to enable and customize a catch-all email (*@domain.com). + $fields['ssl'] = $package->getHasSll() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have the ability to access their websites through secure https://. + $fields['ssh'] = $package->getHasShell() ? 'ON' : 'OFF'; //ON or OFF If ON, the User will have an ssh account. + $fields['sysinfo'] = 'ON'; //ON or OFF If ON, the User will have access to a page that shows the system information. + $fields['dnscontrol'] = 'ON'; //ON or OFF If ON, the User will be able to modify his/her dns records. + + $fields['ns1'] = $a->getNs1(); + $fields['ns2'] = $a->getNs2(); + + $this->_request('CMD_API_MODIFY_USER', $fields); + return true; + } + + public function changeAccountPassword(Server_Account $a, $new) + { + $fields = array (); + $fields['username'] = $a->getUsername(); + $fields['passwd'] = $a->getPassword(); + $fields['passwd2'] = $a->getPassword(); + $this->_request('CMD_API_USER_PASSWD', $fields); + return true; + } + + public function changeAccountUsername(Server_Account $a, $new) + { + throw new Server_Exception('DirectAdmin do not support username changes'); + } + + public function changeAccountDomain(Server_Account $a, $new) + { + throw new Server_Exception('DirectAdmin do not support domain changes'); + } + + public function changeAccountIp(Server_Account $a, $new) + { + throw new Server_Exception('DirectAdmin do not support ip changes'); + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + $fields = array (); + $fields['action'] = 'package'; + $fields['user'] = $a->getUsername(); + $fields['package'] = $a->getPackage()->getName(); + $this->_request('CMD_API_MODIFY_USER', $fields); + return true; + } + + private function getAccountInfo(Server_Account $a) + { + $fields = array(); + $fields['action'] = 'create'; + $fields['add'] = 'Submit'; + $fields['user'] = $a->getUsername(); + return $this->_request('CMD_API_SHOW_USER_CONFIG', $fields); + } + + private function getUserInfo(Server_Account $a) + { + $fields = array(); + $fields['user'] = $a->getUsername(); + $result = $this->_request('CMD_API_SHOW_USER_CONFIG', $fields); + return ; + } + + private function checkAuth() + { + $r = $this->_request('CMD_API_VERIFY_PASSWORD', + array( + 'user' => $this->_config['username'], + 'passwd' => $this->_config['password'], + )); + + return true; + } + + private function getPackages() + { + return $this->_request('CMD_API_PACKAGES_USER'); + } + + private function getIps() + { + $results = $this->_request('CMD_API_SHOW_RESELLER_IPS'); + return isset($results['list']) ? $results['list'] : array(); + } + + private function _request($command, $fields = array(), $post = true) + { + $host = $this->_config['host']; + $usessl = $this->_config['secure']; + $authstr = $this->_config['username'] . ':' . $this->_config['password']; + + $fieldstring = http_build_query($fields); + + $ch = curl_init (); + if ($usessl) { + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0); + curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); + $url = 'https://' . $host . ':2222/' . $command . '?' . $fieldstring; + } else { + $url = 'http://' . $host . ':2222/' . $command . '?' . $fieldstring; + } + + curl_setopt ($ch, CURLOPT_URL, $url); + if ($post) { + curl_setopt ($ch, CURLOPT_POSTFIELDS, $fieldstring); + } + + $this->getLog()->debug($url); + + curl_setopt ($ch, CURLOPT_HEADER, 0); + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); + $curlheaders[0] = 'Authorization: Basic ' . base64_encode ($authstr); + curl_setopt ($ch, CURLOPT_HTTPHEADER, $curlheaders); + curl_setopt ($ch, CURLOPT_TIMEOUT, 60); + $data = curl_exec ($ch); + + // $headers = curl_getinfo($ch); + + if (curl_errno ($ch)) { + $e = new Server_Exception(curl_error ($ch), curl_errno ($ch)); + curl_close ($ch); + throw $e; + } + curl_close ($ch); + + if (strlen(strstr($data, 'DirectAdmin Login'))>0) { + throw new Server_Exception('Server Manager DirectAdmin Error: "Login failed"'); + } + + if (strlen(strstr($data, "The request you've made cannot be executed because it does not exist in your authority level"))>0) { + throw new Server_Exception('Server Manager DirectAdmin Error: "The request you have made cannot be executed because it does not exist in your authority level"'); + } + + $r = $this->_parseResponse($data); + + if(isset($r['error']) && $r['error'] == 1) { + throw new Server_Exception(sprintf('Server Manager DirectAdmin Error: "%s" ', $r['details'])); + } + + $response = empty($r) ? array() : $r; + return $response; + } + + private function _parseResponse($data) + { + $this->getLog()->debug('Raw Response: '.$data); + + // add more replacers if needed + $data = str_replace(''', '"', $data); + + $data = preg_replace('|(\&\#\d+)|', '$1;', $data); + $data = html_entity_decode($data); + + parse_str($data, $r); + + $this->getLog()->debug('Parsed Response: '.print_r($r, 1)); + return $r; + } +} diff --git a/src/bb-library/Server/Manager/Ispconfig3.php b/src/bb-library/Server/Manager/Ispconfig3.php new file mode 100644 index 000000000..c0e113bf8 --- /dev/null +++ b/src/bb-library/Server/Manager/Ispconfig3.php @@ -0,0 +1,626 @@ +_c instanceof SoapClient && $this->_session) { + $this->_request('logout'); + unset($this->_c, $this->_session); + } + } + + public static function getForm() + { + return array( + 'label' => 'ISPConfig 3', + ); + } + + public function getLoginUrl() + { + $host = $this->_config['host']; + return 'http://'.$host.':8080'; + } + + public function getResellerLoginUrl() + { + return $this->getLoginUrl(); + } + + public function testConnection() + { + $this->_load(); + return true; + } + + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info('Synchronizing account with server '.$a->getUsername()); + return $a; + } + + public function createAccount(Server_Account $a) + { + $ci = $this->getClient($a); + try { + if (!$ci) + { + if ($a->getReseller()) + $id = $this->createClient($a, 1); + else + $id = $this->createClient($a, 0); + } + else + { + $id = $ci['client_id']; + } + + $client = $a->getClient(); + $client->setAId($id); + + $this->createSite($a); + $this->dnsCreateZone($a); + } catch (Exception $e) { + if (strpos(strtolower($e->getMessage()), strtolower('domain_error_unique')) === false) { + throw new Server_Exception($e->getMessage()); + } else { + return true; + } + } + return true; + } + + public function suspendAccount(Server_Account $a) + { + $params = array( + 'primary_id' => $this->getSiteId($a) + ); + + $result = $this->_request('sites_web_domain_inactive', $params); + + return (bool) $result; + } + + public function unsuspendAccount(Server_Account $a) + { + $params = array( + 'primary_id' => $this->getSiteId($a) + ); + + $result = $this->_request('sites_web_domain_active', $params); + + return (bool) $result; + } + + public function cancelAccount(Server_Account $a) + { + $ci = $this->getClient($a); + + $params = array( + 'client_id' => $ci['client_id'] + ); + + $result = $this->_request('client_delete', $params); + + return (bool) $result; + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + $client = $a->getClient(); + + $ci = $this->getClient($a); + + $params = array( + 'reseller_id' => 1, + 'client_id' => $ci['client_id'], + + 'server_id' => $this->getServerId(), + 'company_name' => $client->getCompany(), + 'contact_name' => $client->getFullName(), + 'username' =>$a->getUsername(), + 'password' =>$a->getPassword(), + 'language' =>$p->getLanguage(), + 'usertheme' =>$p->getTheme(), + 'street' =>$client->getStreet(), + 'zip' =>$client->getZip(), + 'city' =>$client->getCity(), + 'state' =>$client->getState(), + 'country' =>$client->getCountry(), + 'telephone' =>$client->getTelephone(), + 'mobile' =>$client->getTelephone(), + 'fax' =>$client->getTelephone(), + 'email' =>$a->getEmail(), + 'internet' =>$a->getWww(), + 'icq' =>'', + 'notes' =>$a->getNote(), + ); + + $result = $this->_request('client_update', $params); + + return (bool) $result; + } + + public function changeAccountPassword(Server_Account $a, $new) + { + $ci = $this->getClient($a); + + $params = array( + 'client_id' => $ci['client_id'], + 'password' => $new + ); + + $result = $this->_request('client_change_password', $params); + + return (bool) $result; + } + + public function changeAccountUsername(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support username changes'); + } + + public function changeAccountDomain(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support domain changes'); + } + + public function changeAccountIp(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support ip changes'); + } + + private function createSite(Server_Account &$a) + { + if($this->isSiteCreated($a)) { + return true; + } + + $client = $a->getClient(); + $package = $a->getPackage(); + $server = $this->getServerInfo(); + + $site_params['client_id'] = $a->getAId(); + $site_params['domain'] = $a->getDomain(); + $site_params['type'] = 'vhost'; // harcoded in ISPConfig vhost + $site_params['vhost_type'] = 'name'; // harcoded in ISPConfig vhost + + $site_params['system_user'] = 1;//1; force to the admin + $site_params['system_group'] = 1; //as added by the admin + + $site_params['client_group_id'] = $client->getAid() + 1; //always will be this groupd id + 1 + $site_params['server_id'] = $this->getServerId(); + + //Set the defaults + $site_params['hd_quota'] = $package->getQuota(); + $site_params['traffic_quota'] = $package->getBandwidth(); + + //Hardcoded values + $site_params['allow_override'] = 'All'; + $site_params['errordocs'] = 1; + + $site_params['document_root'] = $server['website_path']; + $site_params['php_open_basedir'] = $server['php_open_basedir']; + + //PHP Configuration + $site_params['php'] = 'suphp'; //php available posible values + $site_params['ip_address'] = '*'; //important + $site_params['active'] = 'y'; + + //Creating a site + $result = $this->_request('sites_web_domain_add', $site_params); + return $result; + } + + private function dnsCreateZone(Server_Account &$a) + { + $client = $a->getClient(); + + //Adding the DNS record A + $dns_a_params['server_id'] = $this->getServerId(); + $dns_a_params['client_id'] = $client->getAid(); + $dns_a_params['zone'] = '90'; + $dns_a_params['name'] = $a->getDomain().'.'; //adding a final dot + $dns_a_params['type'] = 'A'; + $dns_a_params['data'] = $a->getIp(); + $dns_a_params['ttl'] = '86400'; + $dns_a_params['active'] = 'Y'; + + $this->_request('dns_a_add', $dns_a_params); + /* + // ---- Setting up the mail domain + $mail_domain_params['client_id'] = $client->getAId(); + $mail_domain_params['server_id'] = $this->getServerId(); + $mail_domain_params['domain'] = $a->getDomain(); + $mail_domain_params['active'] = 'y'; + + $domain_id = $this->_request('mail_domain_add', $mail_domain_params); + + // ---- Setting up the DNS ZONE + $dns_domain_params['client_id'] = $client->getAId(); + $dns_domain_params['server_id'] = $this->getServerId(); + $dns_domain_params['origin'] = $a->getDomain(); + + $dns_domain_params['ns'] = '8.8.8.8'; + $dns_domain_params['mbox'] = 'mbox.beeznest.com.';//@todo + $dns_domain_params['refresh'] = 28800; + $dns_domain_params['retry'] = 7200; + $dns_domain_params['expire'] = 604800; + $dns_domain_params['minimum'] = 604800; + $dns_domain_params['ttl'] = 604800; + $dns_domain_params['active'] = 'y'; + $result = $this->remote('dns_zone_add', $dns_domain_params); + */ + + return true; + } + + private function createClient(Server_Account &$a, $type) + { + $client = $a->getClient(); + $package = $a->getPackage(); + $params = array( + 'server_id' => $this->getServerId(), + 'company_name' => $client->getCompany(), + 'contact_name' => $client->getFullName(), + 'username' =>$a->getUsername(), + 'password' =>$a->getPassword(), + 'language' =>$package->getLanguage(), + 'usertheme' =>$package->getTheme(), + 'street' =>$client->getStreet(), + 'zip' =>$client->getZip(), + 'city' =>$client->getCity(), + 'state' =>$client->getState(), + 'country' =>$client->getCountry(), + 'telephone' =>$client->getTelephone(), + 'mobile' =>$client->getTelephone(), + 'fax' =>$client->getTelephone(), + 'email' =>$a->getEmail(), + 'internet' =>$a->getWww(), + 'icq' =>'', + 'notes' =>$a->getNote(), + + 'template_master' => '0', + 'template_additional' =>'', + + 'default_mailserver' =>'1', + 'limit_maildomain' =>'1', + 'limit_mailbox' =>'-1', + 'limit_mailalias' =>'-1', + 'limit_mailforward' =>'-1', + 'limit_mailcatchall' =>'-1', + 'limit_mailrouting' => '-1', + 'limit_mailfilter' =>'-1', + 'limit_fetchmail' =>'-1', + 'limit_mailquota' =>'-1', + 'limit_spamfilter_wblist' =>'-1', + 'limit_spamfilter_user' =>'-1', + 'limit_spamfilter_policy' =>'-1', + + 'default_webserver' =>'1', + 'limit_web_domain' =>'-1', + 'web_php_options' =>"SuPHP", + 'limit_web_aliasdomain' =>'-1', + 'limit_web_subdomain' =>'-1', + 'limit_ftp_user' =>'-1', + 'limit_shell_user' =>'-1', + 'ssh_chroot' =>'None', + + 'default_dnsserver' =>'1', + 'limit_dns_zone' =>'-1', + 'limit_dns_record' =>'-1', + 'limit_client' => $type, + + 'default_dbserver' =>'1', + 'limit_database' =>'-1', + 'limit_cron' =>'0', + 'limit_cron_type' =>'', + 'limit_cron_frequency' =>'-1', + ); + $action = 'client_add'; + $result = $this->_request($action, $params); + + return $result; + } + + private function getClient(Server_Account $a) + { + $params['username'] = $a->getUsername(); + $result = $this->_request('client_get_by_username',$params); + return $result; + } + + private function isSiteCreated(Server_Account $a) + { + $sites = $this->getClientSites($a); + if (is_array($sites) ) { + foreach($sites as $key=>$domain) { + if ($a->getDomain() == $domain['domain']) { + $my_domain = $domain; + return true; + } + } + } + return false; + } + + private function getClientSites(Server_Account $a) + { + $user_info = $this->getClient($a); + $site_params['sys_userid'] = $user_info['userid']; + $site_params['groups'] = $user_info['groups']; + + $site_info = $this->_request('client_get_sites_by_user', $site_params); + return $site_info; + } + + + private function getSiteId(Server_Account $a) + { + $sites = $this->getClientSites($a); + if (is_array($sites) ) { + foreach($sites as $key=>$domain) { + if ($a->getDomain() == $domain['domain']) { + return $domain['domain_id']; + } + } + } + return false; + } + + private function getSiteInfo(Server_Account $a) + { + $server_params['server_id'] = $this->getServerId(); + $server_params['section'] = $section; + return $this->_request('server_get',$server_params); + } + + private function getServerInfo($section = 'web') + { + $server_params['server_id'] = $this->getServerId(); + $server_params['section'] = $section; + return $this->_request('server_get',$server_params); + } + + private function getServerId() + { + return 1; +// return $this->_config['server_id']; + } + + private function _load() + { + $usessl = $this->_config['secure']; + $host = $this->_config['host']; + $username = $this->_config['username']; + $password = $this->_config['password']; + $host = ($usessl) ? 'https://'.$host : 'http://'.$host; + + $soap_location = $host.':8080/remote/index.php'; + $soap_uri = $host.':8080/remote/'; + + if(!$this->_c instanceof SoapClient ) { + // Create the SOAP Client + $this->_c = new SoapClient(null, array('location' => $soap_location, + 'uri' => $soap_uri)); + } + + //* Login to the remote server + if($this->_session === null) { + try { + $this->_session = $this->_c->login($username, $password); + } catch(Exception $e) { + throw new Server_Exception($e->getMessage(), $e->getCode()); + } + } + + if(!$this->_c instanceof SoapClient) { + throw new Server_Exception('Could not load Soap client'); + } + if(!$this->_session) { + throw new Server_Exception('Could not retrieve session'); + } + + return $this; + } + + private function _request($action, $params = array()) + { + $this->getLog()->debug(sprintf('ISP Config 3 action "%s" called with params: "%s" ', $action, print_r($params,1))); + + $this->_load(); + $soap_client = $this->_c; + + try { + switch($action) { + case 'client_add': + $reseller_id = 1; + $soap_result = $soap_client->client_add($this->_session, $reseller_id, $params); + break; + case 'client_get': + $soap_result = $soap_client->client_get($this->_session, $params['client_id']); + break; + case 'client_get_by_username': + $soap_result = $soap_client->client_get_by_username($this->_session, $params['username']); + break; + case 'client_get_sites_by_user': + $soap_result = $soap_client->client_get_sites_by_user($this->_session, $params['sys_userid'], $params['groups']); + break; + case 'client_delete': + $soap_result = $soap_client->client_delete($this->_session, $params['client_id']); + break; + case 'client_update': + $soap_result = $soap_client->client_update($this->_session, $params['client_id'], $params['reseller_id'], $params); + break; + case 'client_change_password': + $soap_result = $soap_client->client_change_password($this->_session, $params['client_id'], $params['password']); + break; + case 'sites_cron_add': + //$soap_result = $soap_client->sites_cron_add($this->_session, $reseller_id, $site); + break; + case 'sites_web_domain_update': + $client_id = $params['client_id']; // client id + $primary_id = $params['primary_id']; //site id + $params['client_id'] = $params['primary_id'] = null; + $soap_result = $soap_client->sites_web_domain_update($this->_session, $client_id, $primary_id, $params); + break; + case 'sites_web_domain_active': + $primary_id = $params['primary_id']; //site id + $soap_result = $soap_client->sites_web_domain_set_status($this->_session, $primary_id, 'active'); + break; + case 'sites_web_domain_inactive': + $primary_id = $params['primary_id']; //site id + $soap_result = $soap_client->sites_web_domain_set_status($this->_session, $primary_id,'inactive'); + break; + case 'sites_web_domain_add': + $client_id = $params['client_id']; + $params['client_id'] = null; + $soap_result = $soap_client->sites_web_domain_add($this->_session, $client_id , $params); + break; + case 'sites_web_domain_update': + $client_id = $params['client_id']; + $params['client_id'] = null; + $soap_result = $soap_client->sites_web_domain_update($this->_session, $client_id , $params); + break; + case 'sites_web_subdomain_add': + $client_id = $params['client_id']; + $params['client_id'] = null; + $soap_result = $soap_client->sites_web_subdomain_add($this->_session, $client_id , $params); + break; + //Get domain info + case 'sites_web_domain_get': + $soap_result = $soap_client->sites_web_domain_get($this->_session, $params['primary_id']); + break; + //Get server info + case 'server_get': + $soap_result = $soap_client->server_get($this->_session, $params['server_id'], $params['section']);//Section Could be 'web', 'dns', 'mail', 'dns', 'cron', etc + break; + //Adds a DNS zone + case 'dns_zone_add': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->dns_zone_add($this->_session, $client_id, $params); + break; + case 'dns_zone_get': + $soap_result = $soap_client->dns_zone_get($this->_session, $client_id, $params); + break; + case 'dns_zone_get_by_user': + $client_id = $params['client_id']; // client id + $soap_result = $soap_client->dns_zone_get_by_user($this->_session, $client_id, $params); + break; + case 'dns_zone_update': + /*$client_id = $params['client_id']; // client id + $primary_id = $params['primary_id']; // client id + $params['client_id'] = null; + $params['primary_id'] = null; + $soap_result = $soap_client->dns_zone_update($this->_session, $client_id, $primary_id, $params);*/ + break; + case 'dns_zone_inactive': + $primary_id = $params['primary_id']; // client id + $soap_result = $soap_client->dns_zone_set_status($this->_session, $primary_id, 'inactive'); + break; + case 'dns_zone_active': + $primary_id = $params['primary_id']; // client id + $soap_result = $soap_client->dns_zone_set_status($this->_session, $primary_id, 'active'); + break; + + case 'dns_a_add': + $client_id = $params['client_id']; // client id + $soap_result = $soap_client->dns_a_add($this->_session, $client_id, $params); + break; + + case 'mail_domain_add': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->mail_domain_add($this->_session, $client_id, $params); + break; + //Add an email domain + case 'mail_domain_update': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->mail_domain_update($this->_session, $client_id, $params); + break; + //Change domain status + case 'mail_domain_active': + $primary_id = $params['primary_id']; + $soap_result = $soap_client->mail_domain_set_status($this->_session, $primary_id, 'active'); + break; + //Change domain status + case 'mail_domain_inactive': + $primary_id = $params['primary_id']; + $soap_result = $soap_client->mail_domain_set_status($this->_session, $primary_id, 'inactive'); + break; + case 'mail_domain_get_by_domain': + $domain = $params['domain']; + $soap_result = $soap_client->mail_domain_get_by_domain($this->_session, $domain); + break; + //Creates a mySQL database + case 'sites_database_add': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->sites_database_add($this->_session, $client_id, $params); + break; + case 'sites_database_get': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->sites_database_get($this->_session, $client_id, $params); + break; + case 'sites_database_get_all_by_user': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->sites_database_get_all_by_user($this->_session, $client_id, $params); + break; + case 'install_chamilo': + $client_id = $params['client_id']; // client id + $params['client_id'] = null; + $soap_result = $soap_client->install_chamilo($this->_session, $client_id, $params); + break; + case 'client_templates_get_all': + $soap_result = $soap_client->client_templates_get_all($this->_session); + break; + case 'logout' : + $soap_result = $soap_client->logout($this->_session); + break; + + default: + + break; + } + } catch (SoapFault $e) { + throw new Server_Exception($e->getMessage(), $e->getCode(), $e); + } + + return $soap_result; + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Kloxo.php b/src/bb-library/Server/Manager/Kloxo.php new file mode 100644 index 000000000..cdf90c93c --- /dev/null +++ b/src/bb-library/Server/Manager/Kloxo.php @@ -0,0 +1,248 @@ +_config['secure']) { + $this->_config['port'] = 7777; + } else { + $this->_config['port'] = 7778; + } + } + + public static function getForm() + { + return array( + 'label' => 'Kloxo', + ); + } + + public function getLoginUrl() + { + $host = $this->_config['host']; + return 'http://'.$host.':' . $this->_config['port'] . '/login/'; + } + + public function getResellerLoginUrl() + { + return $this->getLoginUrl(); + } + + private function _makeRequest($params) + { + $host = 'http'; + if ($this->_config['secure']) { + $host .= 's'; + } + $host .= '://' . $this->_config['host'] . ':'.$this->_config['port'].'/webcommand.php'; + $host .= '?login-class=client&login-name=' . urlencode($this->_config['username']); + $host .= '&login-password=' . urlencode($this->_config['password']); + $host .= '&output-type=json'; + + foreach ($params as $key => $value) { + $host .= '&' . $key . '=' . urlencode($value); + } + + $ch = curl_init (); + curl_setopt ($ch, CURLOPT_URL, $host); + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt ($ch, CURLOPT_TIMEOUT, 1); + $result = curl_exec($ch); + + if (curl_errno ($ch)) { + throw new Server_Exception('Error connecting to Kloxo server: ' . curl_errno ($ch) . ' - ' . curl_error ($ch)); + } + + return json_decode(trim($result), 1); + } + + public function testConnection() + { + $params = array( + 'action' => 'simplelist', + 'resource' => 'process', + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'success') { + return true; + } + + return false; + } + + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info('Synchronizing account with server '.$a->getUsername()); + return $a; + } + + public function createAccount(Server_Account $a) { + $p = $a->getPackage(); + $resourcePlan = $this->_getResourcePlan($p); + $dnsTemplate = $this->_getDnsTemplate($p); + + $params = array( + 'action' => 'add', + 'class' => 'client', + 'name' => $a->getUsername(), + 'v-plan_name' => $resourcePlan, + 'v-type' => $a->getReseller() ? 'reseller' : 'customer', + 'v-contactemail' => $a->getEmail(), + 'v-send_welcome_f' => 'off', + 'v-domain_name' => $a->getDomain(), + 'v-dnstemplate_name'=> $dnsTemplate, + 'v-password' => $a->getPassword(), + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Kloxo error: ' . $result['message']); + } + + return true; + } + + public function suspendAccount(Server_Account $a, $suspend = true) { + $params = array( + 'class' => 'client', + 'name' => $a->getUsername(), + 'action' => 'update', + 'subaction' => $suspend ? 'disable' : 'enable', + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Kloxo error: ' . $result['message']); + } + + return true; + } + + public function unsuspendAccount(Server_Account $a) { + return $this->suspendAccount($a, false); + } + + public function cancelAccount(Server_Account $a) { + $params = array( + 'action' => 'delete', + 'class' => 'client', + 'name' => $a->getUsername(), + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Kloxo error: ' . $result['message']); + } + + return true; + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + throw new Server_Exception('Changes to account can only be made in Kloxo'); + } + + public function changeAccountPassword(Server_Account $a, $new) { + $params = array( + 'class' => 'client', + 'name' => $a->getUsername(), + 'action' => 'update', + 'subaction' => 'change_password', + 'v-password'=> $new, + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Kloxo error: ' . $result['message']); + } + + return true; + } + + public function changeAccountUsername(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support username changes'); + } + + public function changeAccountDomain(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support domain changes'); + } + + public function changeAccountIp(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support ip changes'); + } + + private function _getResourcePlan(Server_Package $p) + { + $params = array( + 'action' => 'simplelist', + 'resource' => 'resourceplan', + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Can\'t find resource plan with name "' . $p->getName() .'". Go to Kloxo and create Resource Plan with this name'); + } + + $name = str_replace(' ', '_', $p->getName()); + foreach ($result['result'] as $key => $value) { + if ($value == $name) { + return $key; + } + } + + throw new Server_Exception('Can\'t find resource plan with name "' . $p->getName() .'". Go to Kloxo and create Resource Plan with this name'); + } + + private function _getDnsTemplate(Server_Package $p) { + $params = array( + 'action' => 'simplelist', + 'resource' => 'dnstemplate', + ); + + $result = $this->_makeRequest($params); + + if (isset($result['return']) && $result['return'] == 'error') { + throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() .'". Go to Kloxo and create Dns template with this name'); + } + + $name = str_replace(' ', '_', $p->getName()); + foreach ($result['result'] as $key => $value) { + if ($value == $name . '.dnst') { + return $key; + } + } + + throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() .'". Go to Kloxo and create Dns template with this name'); + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Plesk.php b/src/bb-library/Server/Manager/Plesk.php new file mode 100644 index 000000000..16d8fce56 --- /dev/null +++ b/src/bb-library/Server/Manager/Plesk.php @@ -0,0 +1,1041 @@ +_config['version'] = '1.6.0.0'; + } + + public static function getForm() + { + return array( + 'label' => 'Plesk', + ); + } + + public function getLoginUrl() + { + if ($this->_config['secure']) { + return 'http://'.$this->_config['host'] . ':8443/enterprise/control/agent.php'; + } else { + return 'https://'.$this->_config['host'] . ':8443/enterprise/control/agent.php'; + } + } + + public function getResellerLoginUrl() + { + return $this->getLoginUrl(); + } + + public function testConnection() + { + $params = array ( + 'server' => array( + 'get' => array( + 'stat' => '', + ), + ), + ); + + $params = array( + 'client' => array( + 'get' => array( + 'filter' => '', + 'dataset' => array( + 'stat' => '', + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->client->get->result->status) && $response->client->get->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->client->get->result->errcode . ' - ' . + $response->client->get->result->errtext); + } + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->client->get->result->status) && $response->client->get->result->status == 'ok') { + return true; + } + + throw new Server_Exception('Connection to server failed'); + + return false; + } + + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info('Synchronizing account with server '.$a->getUsername()); + return $a; + } + + public function createAccount(Server_Account $a) + { + $this->getLog()->info('Creating account '.$a->getUsername()); + + if ($a->getReseller()) { + $ips = $this->_getIps(); + foreach($ips['exclusive'] as $key => $ip) { + if (!$ip['empty']) { + unset ($ips['exclusive'][$key]); + } + } + + if (count($ips['exclusive']) == 0) { + throw new Server_Exception('Out of free IP adresses'); + } + + $ips['exclusive'] = array_values($ips['exclusive']); + $rand = array_rand($ips['exclusive']); + $a->setIp($ips['exclusive'][$rand]['ip']); + } + + $id = $this->_creatClient($a); + if (!$id) { + throw new Server_Exception('Failed to create new account'); + } else { + $a->setId((string)$id); + } + + $this->_setPermissions($a); + $this->_setLimits($a); + + if ($a->getReseller()) { + $this->_setIp($a); + $this->_changeIpType($a); + } + + $domainId = $this->_addDomain($a); + if (!$domainId) { + throw new Server_Exception('Failed to add domain'); + } + + if ($a->getReseller()) { + $this->_addNs($a, $domainId); + } + + return true; + } + + public function suspendAccount(Server_Account $a, $suspend = true) + { + if ($a->getReseller()) { + $type = 'reseller'; + $genInfo = 'gen-info'; + } else { + $type = 'client'; + $genInfo = 'gen_info'; + } + + $params = array ( + $type => array( + 'set' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + 'values' => array( + $genInfo => array( + 'status' => $suspend ? 16 : 0, + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->set->result->errcode . ' - ' . + $response->{$type}->set->result->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'ok') { + return true; + } else { + return false; + } + } + + public function unsuspendAccount(Server_Account $a) + { + return $this->suspendAccount($a, false); + } + + public function cancelAccount(Server_Account $a) + { + if ($a->getReseller()) { + $type = 'reseller'; + } else { + $type = 'client'; + } + $params = array( + $type => array( + 'del' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->del->result->status) && $response->{$type}->del->result->status == 'error') { + throw new Server_Exception('Plesk error:' . $response->{$type}->del->result->errcode . ' - ' . + $response->{$type}->del->result->errtext); + } + + if (isset($response->{$type}->del->result->status) && $response->{$type}->del->result->status == 'ok') { + return true; + } else { + return false; + } + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + $id = $this->_modifyClient($a); + if (!$id) { + throw new Server_Exception('Can\'t modify client'); + } else { + $a->setId($id); + } + + $this->_setPermissions($a); + $this->_setLimits($a); + + $domainId = $this->_modifyDomain($a); + if (!$domainId) { + throw new Server_Exception('Failed to add domain'); + } + + if ($a->getReseller()) { + $this->_addNs($a, $domainId); + } + + return true; + } + + public function changeAccountPassword(Server_Account $a, $new) + { + if ($a->reseller) { + $type = 'reseller'; + $genInfo = 'gen-info'; + } else { + $type = 'client'; + $genInfo = 'gen_info'; + } + + $params = array( + $type => array( + 'set' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + 'values' => array( + $genInfo => array( + 'passwd' => $a->getPassword(), + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->set->result->errcode . ' - ' . + $response->{$type}->set->result->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'ok') { + return true; + } else { + return false; + } + } + + public function changeAccountUsername(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support username changes'); + } + + public function changeAccountDomain(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support domain changes'); + } + + public function changeAccountIp(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support ip changes'); + } + + private function _makeRequest($params) { + $headers = array( + 'HTTP_AUTH_LOGIN: ' . $this->_config['username'], + 'HTTP_AUTH_PASSWD: ' . $this->_config['password'], + 'HTTP_PRETTY_PRINT: TRUE', + 'Content-Type: text/xml' + ); + + $xml = $this->_arrayToXml($params, new SimpleXMLElement('')) + ->asXML(); + + $ch = curl_init (); + curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt ($ch, CURLOPT_HTTPHEADER, $headers); + curl_setopt ($ch, CURLOPT_URL, $this->getLoginUrl()); + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt ($ch, CURLOPT_TIMEOUT, 60); + curl_setopt ($ch, CURLOPT_POSTFIELDS, $xml); + //debug + //curl_setopt($ch, CURLOPT_VERBOSE, true); + + $result = curl_exec($ch); + + if (curl_errno ($ch)) { + throw new Server_Exception('cURL error: ' . curl_errno ($ch) . ' - ' . curl_error ($ch)); + } + + return $this->_parseResponse($result); + } + + private function _arrayToXml(array $arr, SimpleXMLElement $xml) { + $numbers = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); + foreach ($arr as $k => $v) { + if (is_array($v)) { + $this->_arrayToXml($v, $xml->addChild(str_replace($numbers, '', $k))); + } else { + $xml->addChild(str_replace($numbers, '', $k), $v); + } + } + return $xml; + } + + private function _parseResponse($result) { + try { + $xml = simplexml_load_string($result, 'SimpleXMLElement', LIBXML_NOCDATA); + } catch (Exception $e) { + throw new Server_Exception('simpleXmlException: '.$e->getMessage()); + } + + return $xml; + } + + /** + * + * Creates new client account + * @param Server_Account $a + * @throws Server_Exception + * @return integer client's plesk id + */ + private function _creatClient(Server_Account $a) { + if ($a->getReseller()) { + $type = 'reseller'; + $genInfo = 'gen-info'; + } else { + $type = 'client'; + $genInfo = 'gen_info'; + } + + $client = $a->getClient(); + $p = $a->getPackage(); + $params = array( + $type => array( + 'add' => array( + $genInfo => array ( + 'cname' => $client->getCompany(), + 'pname' => $client->getFullname(), + 'login' => $a->getUsername(), + 'passwd' => $a->getPassword(), + 'status' => 0, //active + 'phone' => $client->getTelephone(), + 'fax' => $client->getFax(), + 'email' => $a->getEmail(), + 'address' => $client->getAddress1(), + 'city' => $client->getCity(), + 'state' => $client->getState(), + 'pcode' => $client->getZip(), + 'country' => $client->getCountry(), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->add->result->status) && $response->{$type}->add->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->add->result->errcode . ' - ' . + $response->{$type}->add->result->errtext); + } + + if (isset($response->{$type}->add->result->status) && $response->{$type}->add->result->status == 'ok') { + return $response->{$type}->add->result->id; + } + + return 0; + } + + private function _getIps() { + $params = array( + 'ip' => array( + 'get' => '', + ), + ); + + $response = $this->_makeRequest($params); + if (isset($response->system->status) && $response->system->status = 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + if (isset($response->ip->get->result->status) && $response->ip->get->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->ip->get->result->errcode . ' - ' . + $response->ip->get->result->errtext); + } + + $ips = array('shared' => array(), 'exclusive' => array()); + foreach($response->ip->get->result->addresses->ip_info as $ip) { + $ips[(string)$ip->type][] = array( + 'ip' => (string)$ip->ip_address, + 'empty' => empty($ip->default) ? true : false, + ); + } + + return $ips; + } + + private function _setIp(Server_Account $a) { + if ($a->getReseller()) { + $type = 'reseller'; + } else { + $type = 'client'; + } + + $params = array( + 'client' => array( + 'ippool_add_ip' => array( + 'client_id' => $a->getId(), + 'ip_address' => $a->getIp(), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->ippool_add_ip->result->status) && $response->{$type}->ippool_add_ip->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->ippool_add_ip->result->errcode . ' - ' . + $response->{$type}->ippool_add_ip->result->errtext); + } + + if (isset($response->{$type}->ippool_add_ip->result->status) && $response->{$type}->ippool_add_ip->result->status == 'ok') { + return true; + } else { + return false; + } + } + + private function _setLimits(Server_Account $a) { + if ($a->reseller) { + $type = 'reseller'; + } else { + $type = 'client'; + } + + $p = $a->getPackage(); + + $params = array( + $type => array( + 'set' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + 'values' => array( + 'limits' => array( + //The max_db node is optional. Specifies the maximum number of MySQL databases available for the client. Data type: string. + '1limit' => array( + 'name' => 'max_db', + 'value' => $p->getMaxSql() ? $p->getMaxSql() : 0, + ), //The max_maillists node is optional. Specifies the maximum number of mailing lists available for the client. Data type: string. + '2limit' => array( + 'name' => 'max_maillists', + 'value' => $p->getMaxEmailLists() ? $p->getMaxEmailLists() : 0, + ), //The max_box node is optional. Specifies the maximum number of mailboxes allowed for the client. Data type: string. + '3limit' => array( + 'name' => 'max_box', + 'value' => $p->getMaxPop() ? $p->getMaxPop() : 0, + ), //The max_traffic node is optional. Specifies the limit (in bytes) on the traffic for the client. Data type: string. + '4limit' => array( + 'name' => 'max_traffic', + 'value' => $p->getBandwidth() ? $p->getBandwidth() * 1024 * 1024: 0, + ), //The disk_space node is optional. Specifies the limit on disk space (in bytes) for the client. Data type: string. + '5limit' => array( + 'name' => 'disk_space', + 'value' => $p->getQuota() ? $p->getQuota() * 1024 * 1024 : 0, + ), //The max_subdom node is optional. Specifies the maximum number of subdomains available for the client. Data type: string. + '6limit' => array( + 'name' => 'max_subdom', + 'value' => $p->getMaxSubdomains() ? $p->getMaxSubdomains() : 0, + ), //The max_dom node is optional. Specifies the limit on the number of domains for the client. Data type: string. + '7limit' => array( + 'name' => 'max_dom', + 'value' => $p->getMaxDomains() ? $p->getMaxDomains() : -1, + ), + '8limit' => array( + 'name' => 'max_subftp_users', + 'value' => $p->getMaxFtp() ? $p->getMaxFtp() : 0, + ), + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->set->result->errcode . ' - ' . + $response->{$type}->set->result->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'ok') { + return true; + } else { + return false; + } + } + + private function _setPermissions(Server_Account $a) { + if ($a->reseller) { + $type = 'reseller'; + } else { + $type = 'client'; + } + + $p = $a->getPackage(); + + $params = array( + $type => array( + 'set' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + 'values' => array( + 'permissions' => array( + //The manage_subdomains node is optional. It allows/disallows the client to manage subdomains. Data type: Boolean. + '1permission' => array( + 'name' => 'manage_subdomains', + 'value' => $p->getMaxSubdomains() ? 'true' : 'false', + ), //The change_limits node is optional. It allows/disallows the client to change the domain limits. Data type: Boolean. + '2permission' => array( + 'name' => 'change_limits', + 'value' => $a->getReseller() ? 'true' : 'false', + ), //The manage_dns node is optional. It allows/disallows the client to manage DNS settings. Data type: Boolean. + '3permission' => array( + 'name' => 'manage_dns', + 'value' => 'true' + ), //The manage_crontab node is optional. It allows/disallows the client to manage the task scheduler. Data type: Boolean. + '4permission' => array( + 'name' => 'manage_crontab', + 'value' => $p->getHasCron() ? 'true' : 'false', + ), //The manage_anonftp node is optional. It allows/disallows the client to manage Anonymous FTP. Data type: Boolean. + '5permission' => array( + 'name' => 'manage_anonftp', + 'value' => $p->getHasAnonymousFtp() ? 'true' : 'false', + ), //The manage_sh_access node is optional. It allows/disallows the client to use shell access and provide it to users. Data type: Boolean. + '6permission' => array( + 'name' => 'manage_sh_access', + 'value' => $p->getHasShell() ? 'true' : 'false', + ), //The manage_maillists node is optional. It allows/disallows the client to manage mailing lists. Data type: Boolean. + '7permission' => array( + 'name' => 'manage_maillists', + 'value' => $p->getMaxEmailLists() ? 'true' : 'false', + ), + '8permission' => array( + 'name' => 'remote_access_interface', + 'value' => 'true' + ), //The create_domains node is optional. It allows/disallows the client to create domains. Data type: Boolean. + '9permission' => array( + 'name' => 'create_domains', + 'value' => 'true', + ), //The manage_phosting node is optional. It allows/disallows the client to manage physical hosting. Data type: Boolean. + '10permission' => array( + 'name' => 'manage_phosting', + 'value' => 'true', + ), //The manage_quota node is optional. It allows/disallows the client to change the hard disk limit. Data type: Boolean. + '11permission' => array( + 'name' => 'manage_quota', + 'value' => $a->reseller ? 'true' : 'false', + ), //The manage_not_chroot_shell node is optional. It allows/disallows the client to manage shell without changing the mount point of the UNIX root. Data type: Boolean. + '12permission' => array( + 'name' => 'manage_not_chroot_shell', + 'value' => $p->getHasShell() ? 'true' : 'false', + ), //The manage_domain_aliases node is optional. It allows/disallows the client to manage domain aliases. Is used in Plesk for UNIX only. Data type: Boolean. Supported in API RPC 1.4.0.0 and higher. + '13permission' => array( + 'name' => 'manage_domain_aliases', + 'value' => 'true', + ), //The manage_subftp node is optional. It allows/disallows the client to manage additional FTP accounts (with access to the specified domain folders only) created on domains. Data type: Boolean. Supported beginning with version 1.4.1.0 of API RPC. + '14permission' => array( + 'name' => 'manage_subftp', + 'value' => $p->getMaxFtp() ? 'true' : 'false', + ), //The manage_spamfilter node is optional. It allows/disallows Plesk Client to manage spam filter settings. Data type: Boolean. Makes sense for Plesk for UNIX only. The feature is supported by API RPC 1.4.2.0 and later. + '15permission' => array( + 'name' => 'manage_spamfilter', + 'value' => $p->getHasSpamFilter() ? 'true' : 'false', + ), + '16permission' => array( + 'name' => 'create_clients', + 'value' => $a->getReseller() ? 'true' : 'false', + ), + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->set->result->errcode . ' - ' . + $response->{$type}->set->result->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'ok') { + return true; + } else { + return false; + } + } + + private function _addDomain(Server_Account $a) { + $p = $a->getPackage(); + $params = array( + 'domain' => array( + 'add' => array( + 'gen_setup' => array( + 'name' => $a->getDomain(), //The name node is required. It holds the domain name. Data type: domainName (string, 1 to 255 characters long). + 'status' => 0, //The status node is required. It holds the current status of the specified domain. Data type: objectStatus (bitmask, plesk_common.xsd). Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk Client) | 256 (expired). + 'owner-id' => $a->getId(), //The client_id node is required. It holds the identifier of Plesk Client who owns this domain account. Data type: id_type (integer). + 'htype' => 'vrt_hst', //The htype node is required. It specifies the type of hosting set on the domain. Data type: DomainHType (string). Allowed values: vrt_hst | std_fwd | frm_fwd | none. + 'ip_address' => $a->getIp(), + //'owner-login' => $a->getUsername(), + ), + 'hosting' => array( + 'vrt_hst' => array( + 'property1' => array( + 'name' => 'ftp_login', + 'value' => $a->getUsername(), + ), + 'property2' => array( + 'name' => 'ftp_password', + 'value' => $a->getPassword(), + ), + 'property3' => array( + 'name' => 'php', + 'value' => $p->getHasPhp(), + ), + 'property4' => array( + 'name' => 'ssl', + 'value' => $p->getHasSsl(), + ), + 'property5' => array( + 'name' => 'cgi', + 'value' => $p->getHasCgi(), + ), + 'ip_address' => $a->getIp(), + ), + ), + 'limits' => array( + //The max_db node is optional. Specifies the maximum number of MySQL databases available for the client. Data type: string. + '1limit' => array( + 'name' => 'max_db', + 'value' => $p->getMaxSql() ? $p->getMaxSql() : 0, + ), //The max_maillists node is optional. Specifies the maximum number of mailing lists available for the client. Data type: string. + '2limit' => array( + 'name' => 'max_maillists', + 'value' => $p->getMaxEmailLists() ? $p->getMaxEmailLists() : 0, + ), //The max_box node is optional. Specifies the maximum number of mailboxes allowed for the client. Data type: string. + '3limit' => array( + 'name' => 'max_box', + 'value' => $p->getMaxPop() ? $p->getMaxPop() : 0, + ), //The max_traffic node is optional. Specifies the limit (in bytes) on the traffic for the client. Data type: string. + '4limit' => array( + 'name' => 'max_traffic', + 'value' => $p->getBandwidth() ? $p->getBandwidth() * 1024 * 1024: 0, + ), //The disk_space node is optional. Specifies the limit on disk space (in bytes) for the client. Data type: string. + '5limit' => array( + 'name' => 'disk_space', + 'value' => $p->getQuota() ? $p->getQuota() * 1024 * 1024 : 0, + ), //The max_subdom node is optional. Specifies the maximum number of subdomains available for the client. Data type: string. + '6limit' => array( + 'name' => 'max_subdom', + 'value' => $p->getMaxSubdomains() ? $p->getMaxSubdomains() : 0, + ), //The max_dom node is optional. Specifies the limit on the number of domains for the client. Data type: string. + '7limit' => array( + 'name' => 'max_subftp_users', + 'value' => $p->getMaxFtp() ? $p->getMaxFtp() : 0, + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->domain->add->result->status) && $response->domain->add->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->domain->add->result->errcode . ' - ' . + $response->domain->add->result->errtext); + } + + if (isset($response->domain->add->result->status) && $response->domain->add->result->status == 'ok') { + return (string)$response->domain->add->result->id; + } else { + return 0; + } + } + + private function _addNs(Server_Account $a, $domainId) { + $params = array ( + 'dns' => array( + ), + ); + if ($a->getNs1()) { + $params['dns']['add_rec1'] = array( + 'domain_id' => $domainId, + 'type' => 'NS', + 'host' => '', + 'value' => $a->getNs1(), + ); + } + if ($a->getNs2()) { + $params['dns']['add_rec2'] = array( + 'domain_id' => $domainId, + 'type' => 'NS', + 'host' => '', + 'value' => $a->getNs2(), + ); + } + if ($a->getNs3()) { + $params['dns']['add_rec3'] = array( + 'domain_id' => $domainId, + 'type' => 'NS', + 'host' => '', + 'value' => $a->getNs3(), + ); + } + if ($a->getNs4()) { + $params['dns']['add_rec4'] = array( + 'domain_id' => $domainId, + 'type' => 'NS', + 'host' => '', + 'value' => $a->getNs4(), + ); + } + + if (empty($params['dns'])) { + return true; + } + + $oldNs = $this->_getNs($a, $domainId); + $this->_removeDns($oldNs); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + foreach($response->dns->add_rec as $ns) { + if (isset($ns->result->status) && $ns->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $ns->result->errcode . ' - ' . + $ns->result->errtext); + } + } + + return true; + } + + private function _getNs(Server_Account $a, $domainId) { + $params = array( + 'dns' => array( + 'get_rec' => array( + 'filter' => array( + 'domain_id' => $domainId, + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + $ns = array(); + foreach($response->dns->get_rec->result as $dns) { + if ($dns->data->type == 'NS') { + $ns[] = (string)$dns->id; + } + } + + return $ns; + } + + private function _removeDns($ns) { + foreach($ns as $key => $id) { + $params['dns']['del_rec']['filter']['id' . $key] = $id; + } + if (empty($params)) { + return true; + } + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + foreach ($response->dns->del_rec->result as $result) { + if (isset($result->status) && $result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $result->errcode . ' - ' . + $result->errtext); + } + } + + return true; + } + + private function _modifyClient(Server_Account $a) { + if ($a->getReseller()) { + $type = 'reseller'; + $genInfo = 'gen-info'; + } else { + $type = 'client'; + $genInfo = 'gen_info'; + } + + $client = $a->getClient(); + $p = $a->getPackage(); + $params = array( + $type => array( + 'set' => array( + 'filter' => array( + 'login' => $a->getUsername(), + ), + 'values' => array( + $genInfo => array ( + 'cname' => $client->getCompany(), + 'pname' => $client->getFullname(), + 'login' => $a->getUsername(), + 'passwd' => $a->getPassword(), + 'status' => 0, //active + 'phone' => $client->getTelephone(), + 'fax' => $client->getFax(), + 'email' => $a->getEmail(), + 'address' => $client->getAddress1(), + 'city' => $client->getCity(), + 'state' => $client->getState(), + 'pcode' => $client->getZip(), + 'country' => $client->getCountry(), + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->{$type}->set->result->errcode . ' - ' . + $response->{$type}->set->result->errtext); + } + + if (isset($response->{$type}->set->result->status) && $response->{$type}->set->result->status == 'ok') { + return $response->{$type}->set->result->id; + } + + return 0; + } + + private function _modifyDomain(Server_Account $a) { + $p = $a->getPackage(); + $params = array( + 'domain' => array( + 'set' => array( + 'filter' => array( + 'domain-name' => $a->getDomain(), + ), + 'values' => array( + 'gen_setup' => array( + 'name' => $a->getDomain(), //The name node is required. It holds the domain name. Data type: domainName (string, 1 to 255 characters long). + 'status' => 0, //The status node is required. It holds the current status of the specified domain. Data type: objectStatus (bitmask, plesk_common.xsd). Allowed values: 0 (active) | 4 (under backup/restore) | 16 (disabled by Plesk Administrator) | 64 (disabled by Plesk Client) | 256 (expired). + 'owner-id' => $a->getId(), //The client_id node is required. It holds the identifier of Plesk Client who owns this domain account. Data type: id_type (integer). + 'ip_address' => $a->getIp(), //The dns_ip_address node is optional. It holds the domain's IP address shown in the DNS record. Data type: ip_address (string, pattern: ([01]?\p{Nd}{1,2}|2([0-4]\p{Nd}|5[0-5]))(\.([01]?\p{Nd}{1,2}|2([0-4]\p{Nd}|5[0-5]))){3}). + ), + 'hosting' => array( + 'vrt_hst' => array( + 'property1' => array( + 'name' => 'ftp_login', + 'value' => $a->getUsername(), + ), + 'property2' => array( + 'name' => 'ftp_password', + 'value' => $a->getPassword(), + ), + 'property3' => array( + 'name' => 'php', + 'value' => $p->getHasPhp(), + ), + 'property4' => array( + 'name' => 'ssl', + 'value' => $p->getHasSsl(), + ), + 'property5' => array( + 'name' => 'cgi', + 'value' => $p->getHasCgi(), + ), + 'ip_address' => $a->getIp(), + ), + ), + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->domain->set->result->status) && $response->domain->set->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->domain->set->result->errcode . ' - ' . + $response->domain->set->result->errtext); + } + + if (isset($response->domain->set->result->status) && $response->domain->set->result->status == 'ok') { + return (string)$response->domain->set->result->id; + } else { + return 0; + } + } + + private function _changeIpType(Server_Account $a) { + $params = array( + 'reseller' => array( + 'ippool-set-ip' => array( + 'reseller-id' => $a->getId(), + 'filter' => array( + 'ip-address' => $a->getIp(), + ), + 'values' => array( + 'ip-type' => 'shared', + ), + ), + ), + ); + + $response = $this->_makeRequest($params); + + if (isset($response->system->status) && $response->system->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->system->errcode . ' - ' . + $response->system->errtext); + } + + if (isset($response->reseller->{'ippool-set-ip'}->result->status) && + $response->reseller->{'ippool-set-ip'}->result->status == 'error') { + throw new Server_Exception('Plesk error: ' . $response->reseller->{'ippool-set-ip'}->result->errcode . ' - ' . + $response->reseller->{'ippool-set-ip'}->result->errtext); + } + + if (isset($response->reseller->{'ippool-set-ip'}->result->status) && + $response->reseller->{'ippool-set-ip'}->result->status == 'ok') { + return true; + } else { + return false; + } + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Virtualmin.php b/src/bb-library/Server/Manager/Virtualmin.php new file mode 100644 index 000000000..911d0580c --- /dev/null +++ b/src/bb-library/Server/Manager/Virtualmin.php @@ -0,0 +1,709 @@ +_config['port'] = 20000; + } + + public static function getForm() + { + return array( + 'label' => 'Virtualmin', + ); + } + + public function getLoginUrl() + { + if ($this->_config['secure']) { + return 'http://'.$this->_config['host'] . ':' . $this->_config['port'] . '/'; + } else { + return 'https://'.$this->_config['host'] . ':' . $this->_config['port'] . '/'; + } + } + + public function getResellerLoginUrl() + { + return $this->getLoginUrl(); + } + + public function testConnection() + { + $result = $this->_makeRequest('list-commands'); + + if (isset($result['status']) && $result['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Connection to server failed'); + } + } + + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info('Synchronizing account with server '.$a->getUsername()); + return $a; + } + + public function createAccount(Server_Account $a) + { + try { + if ($a->getReseller()) { + if (!$this->_createReseller($a)) { + return false; + } + } else { + if (!$this->_createUser($a)) { + return false; + } + } + } catch (Exception $e) { + if (strpos(strtolower($e->getMessage()), strtolower('You are already hosting this domain')) === false) { + throw new Server_Exception($e->getMessage()); + } else { + return true; + } + } + + return true; + } + + public function suspendAccount(Server_Account $a) + { + if ($a->getReseller()) { + throw new Server_Exception('Virtualmin can\'t suspend/unsuspend reseller\'s account'); + } else { + if (!$this->_suspendUser($a)) { + return false; + } + } + + return true; + } + + public function unsuspendAccount(Server_Account $a) + { + if ($a->getReseller()) { + throw new Server_Exception('Virtualmin can\'t suspend/unsuspend reseller\'s account'); + } else { + if (!$this->_unsuspendUser($a)) { + return false; + } + } + + return true; + } + + public function cancelAccount(Server_Account $a) + { + if ($a->getReseller()) { + if (!$this->_cancelReseller($a)) { + return false; + } + } else { + if (!$this->_cancelUser($a)) { + return false; + } + } + + return true; + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + if ($a->getReseller()) { + if (!$this->_modifyReseller($a)) { + return false; + } + } else { + if (!$this->_modifyDomain($a)) { + return false; + } + if (!$this->_disableFeatures($a)) { + return false; + } + if (!$this->_enableFeatures($a)) { + return false; + } + } + + return true; + } + + public function changeAccountPassword(Server_Account $a, $new) + { + if ($a->getReseller()) { + if (!$this->_changeResellerPassword($a)) { + return false; + } + } else { + if (!$this->_changeUserPassword($a)) { + return false; + } + } + + return true; + } + + public function changeAccountUsername(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support username changes'); + } + + public function changeAccountDomain(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support domain changes'); + } + + public function changeAccountIp(Server_Account $a, $new) + { + throw new Server_Exception('Server manager does not support ip changes'); + } + + /** + * + * Makes request to virtualmin server + * @param string $command + * @param array $params + * @param string $format + * @return array + */ + private function _makeRequest($command, $params = array(), $format = 'json') + { + $url = $this->_getUrl() . '?program=' . $command . '&' . $format . '=1'; + + $numbers = array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9); + foreach ($params as $key => $param) { + $key = str_replace($numbers, '', $key); + $url .= '&' . $key . '=' . $param; + } + + $ch = curl_init (); + curl_setopt ($ch, CURLOPT_SSL_VERIFYHOST, 0); + curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, false); + curl_setopt ($ch, CURLOPT_URL, $url); + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, true); + curl_setopt ($ch, CURLOPT_TIMEOUT, 60); + curl_setopt ($ch, CURLOPT_USERPWD, $this->_config['username'] . ':' . $this->_config['password']); + //debug + //curl_setopt($ch, CURLOPT_VERBOSE, true); + + $result = curl_exec($ch); + + $json = json_decode($result, 1); + if (isset($json['full_error'])) { + throw new Server_Exception($json['full_error']); + } + return $json; + } + + /** + * + * Forms server url + * @return string + */ + private function _getUrl() + { + $url = $this->_config['ssl'] ? 'https://' : 'http://'; + $url .= $this->_config['host'] . ' : ' . $this->_config['port'] . '/virtual-server/remote.cgi'; + + return $url; + } + + /** + * + * Parses html to extract error. If string is not html returns same string + * @param string $result + * @return string + */ + private function _extractError($result) + { + $html = new DOMDocument(); + try { + $html->loadHTML($result); + } catch (Exception $e) { + return $result; + } + + $h1 = $html->getElementsByTagName('h1') + ->item(0); + + if (!isset($h1->nodeValue)) { + return $result; + } + + $error = $h1->nodeValue; + + $body = $html->getElementsByTagName('body') + ->item(0); + + $body->removeChild($h1); + + if (!empty($body->nodeValue)) { + $error .= ' - ' . $body->nodeValue; + } + + return $error; + } + + /** + * + * Creates reseller + * @param Box_ServerAccount $a + * @throws Server_Exception + * @return boolean + */ + private function _createReseller(Server_Account $a) + { + if (!$this->_checkCommand('create-reseller')) { + throw new Server_Exception('Create reseller command is only available in Virtualmin PRO version'); + } + + $p = $a->getPackage(); + $params = array( + 'name' => $a->getUsername(), + 'pass' => $a->getPassword(), + 'email' => $a->getEmail(), + 'max-doms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxDomains(), + 'max-aliasdoms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxDomains(), + 'max-realdoms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxDomains(), + 'max-quota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getQuota() * 1024, + 'max-mailboxes' => (int)$p->getPop(), + 'max-aliases' => (int)$p->getMaxDomains() ? $p->getMaxDomains() : 1, + 'max-dbs' => ($p->getMaxDb() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxDb(), + 'max-bw' => ($p->getBandwidth() == 'unlimited') ? 'UNLIMITED' : (int)$p->getBandwidth() * 1024 * 1024, + 'allow1' => 'dns', //BIND DNS domain + 'allow2' => 'web', //Apache website + 'allow3' => 'webmin', //Webmin login + 'allow4' => 'dir', //Home directory + 'allow5' => 'virt', //Virtual IP address + 'nameserver1' => $a->getNs1(), + 'nameserver2' => $a->getNs2(), + 'nameserver3' => $a->getNs3(), + 'nameserver4' => $a->getNs4(), + ); + if ($p->getMaxPop()) { + $params['allow6'] = 'mail'; + } + if ($p->getHasSsl()) { + $params['allow7'] = 'ssl'; + } + if ($p->getMaxFtp() > 0) { + $params['allow8'] = 'ftp'; + } + if ($p->getHasSpamFilter()) { + $params['allow9'] = 'spam'; + } + if ($p->getMaxSql() > 0) { + $params['allow10'] = 'mysql'; + } + + $response = $this->_makeRequest('create-reseller', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to create reseller\'s account'); + } + + return false; + } + + /** + * + * Get available commands list + */ + private function _getCommands() { + $response = $this->_makeRequest('list-commands'); + + return $response['output']; + } + + /** + * + * Checks if command is available + * @param string $command + * @return boolean + */ + private function _checkCommand($command) { + $commands = $this->_getCommands(); + + if (strpos($commands, $command) === false) { + return false; + } else { + return true; + } + } + + /** + * + * Creates user's account + * @param Server_Account $a + * @throws Server_Exception + * @returns boolean + */ + private function _createUser(Server_Account $a) + { + $p = $a->getPackage(); + $params = array( + 'domain' => $a->getDomain(), + 'pass' => $a->getPassword(), + 'email' => $a->getEmail(), + 'user' => $a->getUsername(), + 'dns' => '', + 'web' => '', + 'webmin' => '', + 'max-doms' => (int)$p->getMaxDomains() ? $p->getMaxDomains() : 1, + 'max-aliasdoms' => (int)$p->getMaxDomains() ? $p->getMaxDomains() : 1, + 'max-realdoms' => (int)$p->getMaxDomains() ? $p->getMaxDomains() : 1, + 'max-mailboxes' => (int)$p->getMaxPop() ? $p->getMaxPop() : 1, + 'unix' => '', + 'dir' => '', + 'quota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxQuota(), + 'uquota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxQuota(), + 'bandwidth' => ($p->getBandwidth() == 'unlimited') ? 'UNLIMITED' : (int)$p->getBandwidth() * 1024 * 1024, + 'mysql-pass' => $a->getPassword(), + ); + if ($p->getMaxPop()) { + $params['mail'] = ''; + } + if ($p->getHasSsl()) { + $params['ssl'] = ''; + } + if ($p->getMaxFtp() > 0) { + $params['ftp'] = ''; + } + if ($p->getHasSpamFilter()) { + $params['spam'] = ''; + } + if ($p->getMaxSql() > 0) { + $params['mysql'] = ''; + } + if (!$a->getIp()) { + $params['alocate-ip'] = ''; + } else { + $params['ip'] = $a->getIp(); + $params['ip-already'] = ''; + } + + $response = $this->_makeRequest('create-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to create account'); + } + + return false; + } + + /** + * + * Suspends user's account + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _suspendUser(Server_Account $a) + { + $params = array( + 'domain' => $a->getDomain(), + ); + + $response = $this->_makeRequest('disable-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to suspend user\'s account'); + } + + return false; + } + + /** + * + * Unsuspends user's account + * @param Server_Account $a + * @throws Server_Exception + * @return booblean + */ + private function _unsuspendUser(Server_Account $a) + { + $params = array( + 'domain' => $a->getDomain(), + ); + + $response = $this->_makeRequest('enable-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to unsuspend user\'s account'); + } + + return false; + } + + /** + * + * Changes user's password + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _changeUserPassword(Server_Account $a) + { + $params = array( + 'domain' => $a->getDomain(), + 'pass' => $a->getPassword(), + ); + + $response = $this->_makeRequest('modify-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to change user\'s password'); + } + + return false; + } + + /** + * + * Cancels user's account + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _cancelUser(Server_Account $a) + { + $params = array( + 'domain' => $a->getDomain(), + ); + + $response = $this->_makeRequest('delete-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to delete user\'s account'); + } + + return false; + } + + /** + * + * Modifies domain + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _modifyDomain(Server_Account $a) + { + $p = $a->getPackage(); + $params = array( + 'domain' => $a->getDomain(), + 'pass' => $a->getPassword(), + 'email' => $a->getEmail(), + 'quota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxQuota(), + 'uquota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxQuota(), + 'bw' => ($p->getBandwidth() == 'unlimited') ? 'UNLIMITED' : (int)$p->getBandwidth(), + ); + + $response = $this->_makeRequest('modify-domain', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to modify domain details'); + } + + return false; + } + + /** + * + * Enables features for user + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _enableFeatures(Server_Account $a) + { + $p = $a->getPackage(); + $params = array( + 'domain' => $a->getDomain(), + ); + + if ($p->getMaxPop() > 0) $params['mail'] = ''; + if ($p->getHasSsl()) $params['ssl'] = ''; + if ($p->getMaxSql() > 0) $params['mysql'] = ''; + if ($p->getMaxFtp() > 0) $params['ftp'] = ''; + if ($p->getHasSpamFilter()) $params['spam'] = ''; + + $response = $this->_makeRequest('enable-feature', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to enable features'); + } + + return false; + } + + /** + * + * Disable not needed features for user + * @param Server_Account $a + * @throws Server_Exception + * @return boolean + */ + private function _disableFeatures(Server_Account $a) + { + $p = $a->getPackage(); + $params = array( + 'domain' => $a->getDomain(), + ); + + if (!$p->getMaxPop() == 0) $params['mail'] = ''; + if (!$p->getHasSsl()) $params['ssl'] = ''; + if ($p->getMaxSql() == 0) $params['mysql'] = ''; + if ($p->getMaxFtp() == 0) $params['ftp'] = ''; + if (!$p->getHasSpamFilter()) $params['spam'] = ''; + + $response = $this->_makeRequest('disable-feature', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to disable features'); + } + + return false; + } + + private function _cancelReseller(Server_Account $a) + { + if (!$this->_checkCommand('create-reseller')) { + throw new Server_Exception('Cancel reseller command only available in Virtualmin PRO version'); + } + $params = array( + 'name' => $a->getUsername(), + ); + + $response = $this->_makeRequest('delete-reseller', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to delete reseller'); + } + + return false; + } + + private function _changeResellerPassword(Server_Account $a) + { + if (!$this->_checkCommand('modify-reseller')) { + throw new Server_Exception('Modify reseller comand is only available in Virtualmin PRO version'); + } + + $params = array( + 'name' => $a->getUsername(), + 'pass' => $a->getPassword(), + ); + + $response = $this->_makeRequest('modify-reseller', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to change reseller\'s password'); + } + + return false; + } + + private function _modifyReseller(Server_Account $a) + { + if (!$this->_checkCommand('modify-reseller')) { + throw new Server_Exception('Modify reseller command is only available in Virtualmin PRO version'); + } + + $p = $a->getPackage(); + $params = array( + 'name' => $a->getUsername(), + 'pass' => $a->getPassword(), + 'email' => $a->getEmail(), + 'max-doms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : $p->getMaxDomains(), + 'max-aliasdoms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : $p->getMaxDomains(), + 'max-realdoms' => ($p->getMaxDomains() == 'unlimited') ? 'UNLIMITED' : $p->getMaxDomains(), + 'max-quota' => ($p->getQuota() == 'unlimited') ? 'UNLIMITED' : (int)$p->getQuota() * 1024, + 'max-mailboxes' => (int)$p->getPop(), + 'max-aliases' => (int)$p->getMaxDomains() ? $p->getMaxDomains() : 1, + 'max-dbs' => ($p->getMaxDb() == 'unlimited') ? 'UNLIMITED' : (int)$p->getMaxDb(), + 'max-bw' => ($p->getBandwidth() == 'unlimited') ? 'UNLIMITED' : (int)$p->getBandwidth() * 1024 * 1024, + 'allow1' => 'dns', //BIND DNS domain + 'allow2' => 'web', //Apache website + 'allow3' => 'webmin', //Webmin login + 'allow4' => 'dir', //Home directory + 'allow5' => 'virt', //Virtual IP address + 'nameserver1' => $a->getNs1(), + 'nameserver2' => $a->getNs2(), + 'nameserver3' => $a->getNs3(), + 'nameserver4' => $a->getNs4(), + ); + if ($p->getMaxPop()) { + $params['allow6'] = 'mail'; + } + if ($p->getHasSsl()) { + $params['allow7'] = 'ssl'; + } + if ($p->getMaxFtp() > 0) { + $params['allow8'] = 'ftp'; + } + if ($p->getHasSpamFilter()) { + $params['allow9'] = 'spam'; + } + if ($p->getMaxSql() > 0) { + $params['allow10'] = 'mysql'; + } + + $response = $this->_makeRequest('modify-reseller', $params); + + if (isset($response['status']) && $response['status'] == 'success') { + return true; + } else { + throw new Server_Exception('Failed to create reseller\'s account'); + } + + return false; + } +} \ No newline at end of file diff --git a/src/bb-library/Server/Manager/Whm.php b/src/bb-library/Server/Manager/Whm.php new file mode 100644 index 000000000..f0e90d59e --- /dev/null +++ b/src/bb-library/Server/Manager/Whm.php @@ -0,0 +1,2687 @@ +_config['host'])) { + throw new Server_Exception('Server manager "cPanel WHM" is not configured properly. Hostname is not set'); + } + + if(empty($this->_config['username'])) { + throw new Server_Exception('Server manager "cPanel WHM" is not configured properly. Username is not set'); + } + + if(empty($this->_config['password']) && empty($this->_config['accesshash'])) { + throw new Server_Exception('Server manager "cPanel WHM" is not configured properly. Authentication is not set'); + } + + if(!empty($this->_config['accesshash'])) { + $auth = preg_replace("'(\r|\n)'","",$this->_config['accesshash']); + $type = 'hash'; + } else { + $auth = $this->_config['password']; + $type = 'pass'; + } + + $this->_api = new xmlapi( + $this->_config['host'], + $this->_config['username'], + $auth + ); + + $this->_api->set_auth_type($type); + $this->_api->set_output('json'); + + if($this->_config['secure']) { + $this->_api->set_protocol('https'); + } else { + $this->_api->set_protocol('http'); + } + } + + public function getLoginUrl() + { + $host = $this->_config['host']; + return 'http://'.$host.'/cpanel'; + } + + public function getResellerLoginUrl() + { + $host = $this->_config['host']; + return 'http://'.$host.'/whm'; + } + + public static function getForm() + { + return array( + 'label' => 'cPanel WHM', + ); + } + + public function testConnection() + { + $json = $this->_request('version'); + return true; + } + + public function synchronizeAccount(Server_Account $a) + { + $this->getLog()->info(sprintf('Synchronizing account %s %s with server', $a->getDomain(), $a->getUsername())); + + $action = 'accountsummary'; + $var_hash = Array( + 'user' => $a->getUsername(), + ); + $result = $this->_request($action, $var_hash); + if(!isset($result->acct[0])) { + error_log('Could not synchronize account with cPanel server. Account does not exist.'); + return $a; + } + + $acc = $result->acct[0]; + + $new = clone $a; + $new->setSuspended($acc->suspended); + $new->setDomain($acc->domain); + $new->setUsername($acc->user); + $new->setIp($acc->ip); + + return $new; + } + + public function createAccount(Server_Account $a) + { + $this->getLog()->info('Creating account '.$a->getUsername()); + + $client = $a->getClient(); + $package = $a->getPackage(); + + $this->_checkPackageExists($package, true); + + $action = 'createacct'; + $var_hash = array( + 'username' => $a->getUsername(), + 'domain' => $a->getDomain(), + 'password' => $a->getPassword(), + 'contactemail' => $client->getEmail(), + 'plan' => $this->_getPackageName($package), + 'useregns' => 0, + ); + + if($a->getReseller()) { + $var_hash['reseller'] = 1; + } + + $json = $this->_request($action, $var_hash); + $result = ($json->result[0]->status == 1); + + // if this account is reseller account set ACL list + if($result && $a->getReseller()) { + + $params = array( + 'user' => $a->getUsername(), + 'makeowner' => 0, + ); + $this->_request('setupreseller', $params); + + $params = array( + 'reseller' => $a->getUsername(), + 'acllist' => $package->getAcllist(), + ); + $this->_request('setacls', $params); + } + + return $result; + } + + public function suspendAccount(Server_Account $a) + { + $this->getLog()->info('Suspending account '.$a->getUsername()); + + $action = 'suspendacct'; + $var_hash = Array( + 'user' => $a->getUsername(), + 'reason' => $a->getNote(), + ); + + $this->_request($action, $var_hash); + return true; + } + + public function unsuspendAccount(Server_Account $a) + { + $this->getLog()->info('Activating account '.$a->getUsername()); + + $action = 'unsuspendacct'; + $var_hash = Array( + 'user' => $a->getUsername(), + ); + + $this->_request($action, $var_hash); + return true; + } + + public function cancelAccount(Server_Account $a) + { + $this->getLog()->info('Canceling account '.$a->getUsername()); + + $action = 'removeacct'; + $var_hash = Array( + 'user' => $a->getUsername(), + 'keepdns' => 0, + ); + + $this->_request($action, $var_hash); + return true; + } + + public function changeAccountPackage(Server_Account $a, Server_Package $p) + { + $this->getLog()->info('Changing account '.$a->getUsername().' package'); + $this->_checkPackageExists($p, true); + + $var_hash = array( + 'user' => $a->getUsername(), + 'pkg' => $this->_getPackageName($p), + ); + + $this->_request('changepackage', $var_hash); + return true; + } + + public function changeAccountPassword(Server_Account $a, $new) + { + $this->getLog()->info('Changing account '.$a->getUsername().' password'); + + $action = 'passwd'; + + $var_hash = array( + 'user' => $a->getUsername(), + 'pass' => $new, + 'db_pass_update' => false, + ); + + $result = $this->_request($action, $var_hash); + if(isset($result->passwd[0]) && $result->passwd[0]->status == 0) { + throw new Server_Exception($result->passwd[0]->statusmsg); + } + return true; + } + + public function changeAccountUsername(Server_Account $a, $new) + { + $this->getLog()->info('Changing account '.$a->getUsername().' username'); + + $action = 'modifyacct'; + $var_hash = array( + 'user' => $a->getUsername(), + 'newuser' => $new, + ); + + $this->_request($action, $var_hash); + return true; + } + + public function changeAccountDomain(Server_Account $a, $new) + { + $this->getLog()->info('Changing account '.$a->getUsername().' domain'); + + $action = 'modifyacct'; + $var_hash = array( + 'user' => $a->getUsername(), + 'domain' => $new, + ); + + $this->_request($action, $var_hash); + return true; + } + + public function changeAccountIp(Server_Account $a, $new) + { + $this->getLog()->info('Changing account '.$a->getUsername().' ip'); + + $action = 'setsiteip'; + $var_hash = array( + 'domain' => $a->getDomain(), + 'ip' => $new, + ); + + $this->_request($action, $var_hash); + return true; + } + + /** + * Check if Package exists + * @param Server_Account $a + * @return bool + */ + private function _checkPackageExists(Server_Package $package, $create = false) + { + $name = $this->_getPackageName($package); + + $json = $this->_request('listpkgs'); + $packages = $json->package; + + $exists = false; + foreach ($packages as $p) { + if($p->name == $name) { + $exists = true; + break; + } + } + + if(!$create) { + return $exists; + } + + if (!$exists) { + $var_hash['name'] = $name; + $var_hash['quota'] = $package->getQuota(); + $var_hash['bwlimit'] = $package->getBandwidth(); + $var_hash['maxsub'] = $package->getMaxSubdomains(); + $var_hash['maxpark'] = $package->getMaxParkedDomains(); + $var_hash['maxaddon'] = $package->getMaxDomains(); + $var_hash['maxftp'] = $package->getMaxFtp(); + $var_hash['maxsql'] = $package->getMaxSql(); + $var_hash['maxpop'] = $package->getMaxPop(); + + $var_hash['cgi'] = $package->getCustomValue('cgi'); + $var_hash['frontpage'] = $package->getCustomValue('frontpage'); + $var_hash['cpmod'] = $package->getCustomValue('cpmod'); + $var_hash['maxlst'] = $package->getCustomValue('maxlst'); + $var_hash['hasshell'] = $package->getCustomValue('hasshell'); + + $this->_request('addpkg', $var_hash); + } + + return $exists; + } + + private function _getPackageName(Server_Package $package) + { + $name = $package->getName(); + if($this->_config['username'] != 'root') { + $name = $this->_config['username'].'_'.$name; + } + + return $name; + } + + private function modifyAccountPackage(Server_Account $a, Server_Package $p) + { + $this->getLog()->info('Midifying account '.$a->getUsername()); + + $package = $p; + $action = 'modifyacct'; + + $var_hash = array( + 'user' => $a->getUsername(), + 'domain' => $a->getDomain(), + 'HASCGI' => $package->getHasCgi(), + 'CPTHEME' => $package->getTheme(), + 'LANG' => $package->getLanguage(), + 'MAXPOP' => $package->getMaxPop(), + 'MAXFTP' => $package->getMaxFtp(), + 'MAXLST' => $package->getMaxEmailLists(), + 'MAXSUB' => $package->getMaxSubdomains(), + 'MAXPARK' => $package->getMaxParkedDomains(), + 'MAXADDON' => $package->getMaxAddons(), + 'MAXSQL' => $package->getMaxSql(), + 'shell' => $package->getHasShell(), + ); + + $this->_request($action, $var_hash); + return true; + } + + public function getPkgs() + { + $pkgs = $this->_request('listpkgs'); + + $return = array(); + $i = 0; + foreach ($pkgs->package as $pkg) + { + $return[$i]['title'] = $pkg->name; + $return[$i]['name'] = $pkg->name; + $return[$i]['feature_list'] = $pkg->FEATURELIST; + $return[$i]['theme'] = $pkg->CPMOD; + $return[$i]['quota'] = $pkg->QUOTA; + $return[$i]['bandwidth'] = $pkg->BWLIMIT; + $return[$i]['max_ftp'] = $pkg->MAXFTP; + $return[$i]['max_sql'] = $pkg->MAXSQL; + $return[$i]['max_emails'] = $pkg->MAXLST; + $return[$i]['max_sub'] = $pkg->MAXSUB; + $return[$i]['max_pop'] = $pkg->MAXPOP; + $return[$i]['max_park'] = $pkg->MAXPARK; + $return[$i]['max_addon'] = $pkg->MAXADDON; + + $return[$i]['has_shell'] = ($pkg->HASSHELL == 'n' ? 0 : 1); + $return[$i]['has_ip'] = ($pkg->IP == 'n' ? 0 : 1); + $return[$i]['has_cgi'] = ($pkg->CGI == 'n' ? 0 : 1); + $return[$i]['has_frontpage'] = ($pkg->FRONTPAGE == 'n' ? 0 : 1); + + $return[$i]['free_registration'] = 0; + $return[$i]['free_transfer'] = 0; + $return[$i++]['free_renewal'] = 0; + } + + return $return; + } + + private function _request($action, $params = array()) + { + $this->getLog()->debug(sprintf('Requesting WHM server action "%s" with params "%s" ', $action, print_r($params, true))); + $body = $this->_api->xmlapi_query($action, $params); + + $this->getLog()->debug('Response: '.$body); + $this->getLog()->debug('Auth type: ' . $this->_api->get_auth_type()); + + $json = json_decode($body); + + if(!is_object($json)) { + $msg = sprintf('Function call "%s" response is not valid, body: %s', $action, $body); + $this->getLog()->crit($msg); + throw new Server_Exception($msg); + } + + if(isset($json->cpanelresult) && isset($json->cpanelresult->error)) { + $msg = sprintf('WHM server response error calling action %s: "%s"', $action, $json->cpanelresult->error); + $this->getLog()->crit($msg); + throw new Server_Exception($msg); + } + + if(isset($json->data) && isset($json->data->result) && $json->data->result == '0') { + $msg = sprintf('WHM server response error calling action %s: "%s"', $action, $json->data->reason); + $this->getLog()->crit($msg); + throw new Server_Exception($msg); + } + + if(isset($json->result) && is_array($json->result) && $json->result[0]->status == 0) { + $msg = sprintf('WHM server response error calling action %s: "%s"',$action, $json->result[0]->statusmsg); + $this->getLog()->crit($msg); + throw new Server_Exception($msg); + } + + if(isset($json->status) && $json->status != '1') { + $msg = sprintf('WHM server response error calling action %s: "%s"',$action, $json->statusmsg); + $this->getLog()->crit($msg); + throw new Server_Exception($msg); + } + + return $json; + } +} + + +/** +* cPanel XMLAPI Client Class +* +* This class allows for easy interaction with cPanel's XML-API allow functions within the XML-API to be called +* by calling funcions within this class +* +* LICENSE: +* +* Copyright (c) 2011, cPanel, Inc. +* All rights reserved. +* +* Redistribution and use in source and binary forms, with or without modification, are permitted provided +* that the following conditions are met: +* +* * Redistributions of source code must retain the above copyright notice, this list of conditions and the +* following disclaimer. +* * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the +* following disclaimer in the documentation and/or other materials provided with the distribution. +* * Neither the name of the cPanel, Inc. nor the names of its contributors may be used to endorse or promote +* products derived from this software without specific prior written permission. +* +* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED +* WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR +* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED +* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING +* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE +* POSSIBILITY OF SUCH DAMAGE. +* +* Version: 1.0.12 +* Last updated: 23 July 2011 +* +* Changes +* +* 1.0.12: +* github#2 - [Bugfix]: typo related to environment variable XMLAPI_USE_SSL +* +* 1.0.11: +* [Feature]: Remove value requirement for park()'s 'topdomain' argument +* (Case 51116) +* +* 1.0.10: +* github#1 - [Bugfix]: setresellerpackagelimits() does not properly prepare +* input arguments for query (Case 51076) +* +* 1.0.9: +* added input argument to servicestatus method which allows single service +* filtering (Case 50804) +* +* 1.0.8: +* correct unpark bug as reported by Randall Kent +* +* 1.0.7: +* Corrected typo for setrellerlimits where xml_query incorrectly called xml-api's setresellerips +* +* 1.0.6: +* Changed 'user' URL parameter for API1/2 calls to 'cpanel_xmlapi_user'/'cpanel_jsonapi_user' to resolve conflicts with API2 functions that use 'user' as a parameter +* Relocated exmaple script to Example subdirectory +* Modified example scripts to take remote server IP and root password from environment variables REMOTE_HOST and REMOTE_PASSWORD, respectively +* Created subdirectory Tests for PHPUnit tests +* Add PHPUnit test BasicParseTest.php +* +* 1.0.5: +* fix bug where api1_query and api2_query would not return JSON data +* +* 1.0.4: +* set_port will now convert non-int values to ints +* +* 1.0.3: +* Fixed issue with set_auth_type using incorrect logic for determining acceptable auth types +* Suppress non-UTF8 encoding when using curl +* +* 1.0.2: +* Increased curl buffer size to 128kb from 16kb +* Fix double encoding issue in terminateresellers() +* +* 1.0.1: +* Fixed use of wrong variable name in curl error checking +* adjust park() to use api2 rather than API1 +* +* 1.0 +* Added in 11.25 functions +* Changed the constructor to allow for either the "DEFINE" config setting method or using parameters +* Removed used of the gui setting +* Added fopen support +* Added auto detection for fopen or curl (uses curl by default) +* Added ability to return in multiple formats: associative array, simplexml, xml, json +* Added PHP Documentor documentation for all necessary functions +* Changed submission from GET to POST +* +* +* @copyright 2011 cPanel, Inc +* @license http://sdk.cpanel.net/license/bsd.html +* @version 1.0.11 +* @link http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi +* @since File available since release 0.1 +**/ + +/** +* The base XML-API class +* +* The XML-API class allows for easy execution of cPanel XML-API calls. The goal of this project is to create +* an open source library that can be used for multiple types of applications. This class relies on PHP5 compiled +* with both curl and simplexml support. +* +* Making Calls with this class are done in the following steps: +* +* 1.) Instaniating the class: +* $xmlapi = new xmlapi($host); +* +* 2.) Setting access credentials within the class via either set_password or set_hash: +* $xmlapi->set_hash("username", $accessHash); +* $xmlapi->set_password("username", "password"); +* +* 3.) Execute a function +* $xmlapi->listaccts(); +* +* @category Cpanel +* @package xmlapi +* @copyright 2011 cPanel, Inc. +* @license http://sdk.cpanel.net/license/bsd.html +* @version Release: 1.0.11 +* @link http://twiki.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/XmlApi +* @since Class available since release 0.1 +**/ + +class xmlapi { + // should debugging statements be printed? + private $debug = false; + + // The host to connect to + private $host = '127.0.0.1'; + + // the port to connect to + private $port = '2087'; + + // should be the literal strings http or https + private $protocol = 'https'; + + // output that should be given by the xml-api + private $output = 'simplexml'; + + // literal strings hash or password + private $auth_type = null; + + // the actual password or hash + private $auth = null; + + // username to authenticate as + private $user = null; + + // The HTTP Client to use + + private $http_client = 'curl'; + + /** + * Instantiate the XML-API Object + * All parameters to this function are optional and can be set via the accessor functions or constants + * This defaults to password auth, however set_hash can be used to use hash authentication + * + * @param string $host The host to perform queries on + * @param string $user The username to authenticate as + * @param string $password The password to authenticate with + * @return Xml_Api object + */ + public function __construct($host = null, $user = null, $password = null ) { + + // Check if debugging must be enabled + if ( (defined('XMLAPI_DEBUG')) && (XMLAPI_DEBUG == '1') ) { + $this->debug = true; + } + + // Check if raw xml output must be enabled + if ( (defined('XMLAPI_RAW_XML')) && (XMLAPI_RAW_XML == '1') ) { + $this->raw_xml = true; + } + + /** + * Authentication + * This can either be passed at this point or by using the set_hash or set_password functions + **/ + + if ( ( defined('XMLAPI_USER') ) && ( strlen(XMLAPI_USER) > 0 ) ) { + $this->user = XMLAPI_USER; + + // set the authtype to pass and place the password in $this->pass + if ( ( defined('XMLAPI_PASS') ) && ( strlen(XMLAPI_PASS) > 0 ) ) { + $this->auth_type = 'pass'; + $this->auth = XMLAPI_PASS; + } + + // set the authtype to hash and place the hash in $this->auth + if ( ( defined('XMLAPI_HASH') ) && ( strlen(XMLAPI_HASH) > 0 ) ) { + $this->auth_type = 'hash'; + $this->auth = preg_replace("/(\n|\r|\s)/", '', XMLAPI_HASH); + } + + // Throw warning if XMLAPI_HASH and XMLAPI_PASS are defined + if ( ( ( defined('XMLAPI_HASH') ) && ( strlen(XMLAPI_HASH) > 0 ) ) + && ( ( defined('XMLAPI_PASS') ) && ( strlen(XMLAPI_PASS) > 0 ) ) ) { + error_log('warning: both XMLAPI_HASH and XMLAPI_PASS are defined, defaulting to XMLAPI_HASH'); + } + + + // Throw a warning if XMLAPI_HASH and XMLAPI_PASS are undefined and XMLAPI_USER is defined + if ( !(defined('XMLAPI_HASH') ) || !defined('XMLAPI_PASS') ) { + error_log('warning: XMLAPI_USER set but neither XMLAPI_HASH or XMLAPI_PASS have not been defined'); + } + + } + + if ( ( $user != null ) && ( strlen( $user ) < 9 ) ) { + $this->user = $user; + } + + if ($password != null ) { + $this->set_password($password); + } + + /** + * Connection + * + * $host/XMLAPI_HOST should always be equal to either the IP of the server or it's hostname + */ + + // Set the host, error if not defined + if ( $host == null ) { + if ( (defined('XMLAPI_HOST')) && (strlen(XMLAPI_HOST) > 0) ) { + $this->host = XMLAPI_HOST; + } else { + throw new Exception("No host defined"); + } + } else { + $this->host = $host; + } + + + // disabling SSL is probably a bad idea.. just saying. + if ( defined('XMLAPI_USE_SSL' ) && (XMLAPI_USE_SSL == '0' ) ) { + $this->protocol = "http"; + } + + // Detemine what the default http client should be. + if ( function_exists('curl_setopt') ) { + $this->http_client = "curl"; + } elseif ( ini_get('allow_url_fopen') ) { + $this->http_client = "fopen"; + } else { + throw new Exception('allow_url_fopen and curl are neither available in this PHP configuration'); + } + + } + + /** + * Accessor Functions + **/ + /** + * Return whether the debug option is set within the object + * + * @return boolean + * @see set_debug() + */ + public function get_debug() { + return $this->debug; + } + + /** + * Turn on debug mode + * + * Enabling this option will cause this script to print debug information such as + * the queries made, the response XML/JSON and other such pertinent information. + * Calling this function without any parameters will enable debug mode. + * + * @param bool $debug turn on or off debug mode + * @see get_debug() + */ + public function set_debug( $debug = 1 ) { + $this->debug = $debug; + } + + /** + * Get the host being connected to + * + * This function will return the host being connected to + * @return string host + * @see set_host() + */ + public function get_host() { + return $this->host; + } + + /** + * Set the host to query + * + * Setting this will set the host to be queried + * @param string $host The host to query + * @see get_host() + */ + public function set_host( $host ) { + $this->host = $host; + } + + /** + * Get the port to connect to + * + * This will return which port the class is connecting to + * @return int $port + * @see set_port() + */ + public function get_port() { + return $this->port; + } + + /** + * Set the port to connect to + * + * This will allow a user to define which port needs to be connected to. + * The default port set within the class is 2087 (WHM-SSL) however other ports are optional + * this function will automatically set the protocol to http if the port is equal to: + * - 2082 + * - 2086 + * - 2095 + * - 80 + * @param int $port the port to connect to + * @see set_protocol() + * @see get_port() + */ + public function set_port( $port ) { + if ( !is_int( $port ) ) { + $port = intval($port); + } + + if ( $port < 1 || $port > 65535 ) { + throw new Exception('non integer or negative integer passed to set_port'); + } + + // Account for ports that are non-ssl + if ( $port == '2086' || $port == '2082' || $port == '80' || $port == '2095' ) { + $this->set_protocol('http'); + } + + $this->port = $port; + } + + /** + * Return the protocol being used to query + * + * This will return the protocol being connected to + * @return string + * @see set_protocol() + */ + public function get_protocol() { + return $this->protocol; + } + + /** + * Set the protocol to use to query + * + * This will allow you to set the protocol to query cpsrvd with. The only to acceptable values + * to be passed to this function are 'http' or 'https'. Anything else will cause the class to throw + * an Exception. + * @param string $proto the protocol to use to connect to cpsrvd + * @see get_protocol() + */ + public function set_protocol( $proto ) { + if ( $proto != 'https' && $proto != 'http' ) { + throw new Exception('https and http are the only protocols that can be passed to set_protocol'); + } + $this->protocol = $proto; + } + + /** + * Return what format calls with be returned in + * + * This function will return the currently set output format + * @see set_output() + * @return string + */ + public function get_output() { + return $this->output; + } + + /** + * Set the output format for call functions + * + * This class is capable of returning data in numerous formats including: + * - json + * - xml + * - {@link http://php.net/simplexml SimpleXML} + * - {@link http://us.php.net/manual/en/language.types.array.php Associative Arrays} + * + * These can be set by passing this class any of the following values: + * - json - return JSON string + * - xml - return XML string + * - simplexml - return SimpleXML object + * - array - Return an associative array + * + * Passing any value other than these to this class will cause an Exception to be thrown. + * @param string $output the output type to be set + * @see get_output() + */ + public function set_output( $output ) { + if ( $output != 'json' && $output != 'xml' && $output != 'array' && $output != 'simplexml' ) { + throw new Exception('json, xml, array and simplexml are the only allowed values for set_output'); + } + $this->output = $output; + } + + /** + * Return the auth_type being used + * + * This function will return a string containing the auth type in use + * @return string auth type + * @see set_auth_type() + */ + public function get_auth_type() { + return $this->auth_type; + } + + /** + * Set the auth type + * + * This class is capable of authenticating with both hash auth and password auth + * This function will allow you to manually set which auth_type you are using. + * + * the only accepted parameters for this function are "hash" and "pass" anything else will cuase + * an exception to be thrown + * + * @see set_password() + * @see set_hash() + * @see get_auth_type() + * @param string auth_type the auth type to be set + */ + public function set_auth_type( $auth_type ) { + if ( $auth_type != 'hash' && $auth_type != 'pass') { + throw new Exception('the only two allowable auth types arehash and path'); + } + $this->auth_type = $auth_type; + } + + /** + * Set the password to be autenticated with + * + * This will set the password to be authenticated with, the auth_type will be automatically adjusted + * when this function is used + * + * @param string $pass the password to authenticate with + * @see set_hash() + * @see set_auth_type() + * @see set_user() + */ + public function set_password( $pass ) { + $this->auth_type = 'pass'; + $this->auth = $pass; + } + + /** + * Set the hash to authenticate with + * + * This will set the hash to authenticate with, the auth_type will automatically be set when this function + * is used. This function will automatically strip the newlines from the hash. + * @param string $hash the hash to autenticate with + * @see set_password() + * @see set_auth_type() + * @see set_user() + */ + public function set_hash( $hash ) { + $this->auth_type = 'hash'; + $this->auth = preg_replace("/(\n|\r|\s)/", '', $hash); + } + + /** + * Return the user being used for authtication + * + * This will return the username being authenticated against. + * + * @return string + */ + public function get_user() { + return $this->user; + } + + /** + * Set the user to authenticate against + * + * This will set the user being authenticated against. + * @param string $user username + * @see set_password() + * @see set_hash() + * @see get_user() + */ + public function set_user( $user ) { + $this->user = $user; + } + + /** + * Set the user and hash to be used for authentication + * + * This function will allow one to set the user AND hash to be authenticated with + * + * @param string $user username + * @param string $hash WHM Access Hash + * @see set_hash() + * @see set_user() + */ + public function hash_auth( $user, $hash ) { + $this->set_hash( $hash ); + $this->set_user( $user ); + } + + /** + * Set the user and password to be used for authentication + * + * This function will allow one to set the user AND password to be authenticated with + * @param string $user username + * @param string $pass password + * @see set_pass() + * @see set_user() + */ + public function password_auth( $user, $pass ) { + $this->set_password( $pass ); + $this->set_user( $user ); + } + + /** + * Return XML format + * + * this function will cause call functions to return XML format, this is the same as doing: + * set_output('xml') + * + * @see set_output() + */ + public function return_xml() { + $this->set_output('xml'); + } + + /** + * Return simplexml format + * + * this function will cause all call functions to return simplexml format, this is the same as doing: + * set_output('simplexml') + * + * @see set_output() + */ + public function return_object() { + $this->set_output('simplexml'); + } + + + /** + * Set the HTTP client to use + * + * This class is capable of two types of HTTP Clients: + * - curl + * - fopen + * + * When using allow url fopen the class will use get_file_contents to perform the query + * The only two acceptable parameters for this function are 'curl' and 'fopen'. + * This will default to fopen, however if allow_url_fopen is disabled inside of php.ini + * it will switch to curl + * + * @param string client The http client to use + * @see get_http_client() + */ + + public function set_http_client( $client ) { + if ( ( $client != 'curl' ) && ( $client != 'fopen' ) ) { + throw new Exception('only curl and fopen and allowed http clients'); + } + $this->http_client = $client; + } + + /** + * Get the HTTP Client in use + * + * This will return a string containing the HTTP client currently in use + * + * @see set_http_client() + * @return string + */ + public function get_http_client() { + return $this->http_client; + } + + /* + * Query Functions + * -- + * This is where the actual calling of the XML-API, building API1 & API2 calls happens + */ + + /** + * Perform an XML-API Query + * + * This function will perform an XML-API Query and return the specified output format of the call being made + * + * @param string $function The XML-API call to execute + * @param array $vars An associative array of the parameters to be passed to the XML-API Calls + * @return mixed + */ + public function xmlapi_query( $function, $vars = array() ) { + + // Check to make sure all the data needed to perform the query is in place + if (!$function) { + throw new Exception('xmlapi_query() requires a function to be passed to it'); + } + + if ($this->user == null ) { + throw new Exception('no user has been set'); + } + + if ($this->auth ==null) { + throw new Exception('no authentication information has been set'); + } + + // Build the query: + + $query_type = '/xml-api/'; + + if ( $this->output == 'json' ) { + $query_type = '/json-api/'; + } + + $args = http_build_query($vars, '', '&'); + $url = $this->protocol . '://' . $this->host . ':' . $this->port . $query_type . $function; + + if ($this->debug) { + error_log('URL: ' . $url); + error_log('DATA: ' . $args); + } + + // Set the $auth string + + $authstr; + if ( $this->auth_type == 'hash' ) { + $authstr = 'Authorization: WHM ' . $this->user . ':' . $this->auth . "\r\n"; + } elseif ($this->auth_type == 'pass' ) { + $authstr = 'Authorization: Basic ' . base64_encode($this->user .':'. $this->auth) . "\r\n"; + } else { + throw new Exception('invalid auth_type set'); + } + + if ($this->debug) { + error_log("Authentication Header: " . $authstr ."\n"); + } + + // Perform the query (or pass the info to the functions that actually do perform the query) + + $response; + if ( $this->http_client == 'curl' ) { + $response = $this->curl_query($url, $args, $authstr); + } elseif ( $this->http_client == 'fopen' ) { + $response = $this->fopen_query($url, $args, $authstr); + } + + + + /* + * Post-Query Block + * Handle response, return proper data types, debug, etc + */ + + // print out the response if debug mode is enabled. + if ($this->debug) { + error_log("RESPONSE:\n " . $response); + } + + //@see https://github.com/CpanelInc/xmlapi-php/pull/5 + if ( $this->output == 'json') { + return $response; + } + + // The only time a response should contain is in the case of authentication error + // cPanel 11.25 fixes this issue, but if is in the response, we'll error out. + + if (stristr($response, '') == true) { + if (stristr($response, 'Login Attempt Failed') == true) { + error_log("Login Attempt Failed"); + return; + } + if (stristr($response, 'action="/login/"') == true) { + error_log("Authentication Error"); + return; + } + return; + } + + + // perform simplexml transformation (array relies on this) + if ( ($this->output == 'simplexml') || $this->output == 'array') { + $response = simplexml_load_string($response, null, LIBXML_NOERROR | LIBXML_NOWARNING); + if (!$response){ + error_log("Some error message here"); + return; + } + if ( $this->debug ) { + error_log("SimpleXML var_dump:\n" . print_r($response, true)); + } + } + + // perform array tranformation + if ($this->output == 'array') { + $response = $this->unserialize_xml($response); + if ( $this->debug ) { + error_log("Associative Array var_dump:\n" . print_r($response, true)); + } + } + return $response; + } + + private function curl_query( $url, $postdata, $authstr ) { + $curl = curl_init(); + curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 0); + // Return contents of transfer on curl_exec + curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1); + // Allow self-signed certs + curl_setopt($curl, CURLOPT_SSL_VERIFYHOST, 0); + + curl_setopt($curl, CURLOPT_CONNECTTIMEOUT, 30); + + // Set the URL + curl_setopt($curl, CURLOPT_URL, $url); + // Increase buffer size to avoid "funny output" exception + curl_setopt($curl, CURLOPT_BUFFERSIZE, 131072); + + // Pass authentication header + $header[0] =$authstr . + "Content-Type: application/x-www-form-urlencoded\r\n" . + "Content-Length: " . strlen($postdata) . "\r\n" . "\r\n" . $postdata; + + curl_setopt($curl, CURLOPT_HTTPHEADER, $header); + + curl_setopt($curl, CURLOPT_POST, 1); + curl_setopt($curl, CURLOPT_POSTFIELDS, ""); + + $result = curl_exec($curl); + if ($result == false) { + throw new Exception("curl_exec threw error \"" . curl_error($curl) . "\" for " . $url . "?" . $postdata ); + } + curl_close($curl); + return $result; + } + + private function fopen_query( $url, $postdata, $authstr ) { + if ( !(ini_get('allow_url_fopen') ) ) { + throw new Exception('fopen_query called on system without allow_url_fopen enabled in php.ini'); + } + + $opts = array( + 'http' => array( + 'allow_self_signed' => true, + 'method' => 'POST', + 'header' => $authstr . + "Content-Type: application/x-www-form-urlencoded\r\n" . + "Content-Length: " . strlen($postdata) . "\r\n" . + "\r\n" . $postdata + ) + ); + $context = stream_context_create($opts); + return file_get_contents($url, false, $context); + } + + + /* + * Convert simplexml to associative arrays + * + * This function will convert simplexml to associative arrays. + */ + private function unserialize_xml($input, $callback = null, $recurse = false) { + // Get input, loading an xml string with simplexml if its the top level of recursion + $data = ( (!$recurse) && is_string($input) ) ? simplexml_load_string($input) : $input; + // Convert SimpleXMLElements to array + if ($data instanceof SimpleXMLElement) { + $data = (array) $data; + } + // Recurse into arrays + if (is_array($data)) { + foreach ($data as &$item) { + $item = $this->unserialize_xml($item, $callback, true); + } + } + // Run callback and return + return (!is_array($data) && is_callable($callback)) ? call_user_func($callback, $data) : $data; + } + + + /* TO DO: + Implement API1 and API2 query functions!!!!! + */ + /** + * Call an API1 function + * + * This function allows you to call API1 from within the XML-API, This allowes a user to peform actions + * such as adding ftp accounts, etc + * + * @param string $user The username of the account to perform API1 actions on + * @param string $module The module of the API1 call to use + * @param string $function The function of the API1 call + * @param array $args The arguments for the API1 function, this should be a non-associative array + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CallingAPIFunctions XML API Call documentation + * @link http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiRef/WebHome API1 & API2 Call documentation + * @link http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiBasics/CallingApiOne API1 Documentation + */ + public function api1_query($user, $module, $function, $args = array() ) { + if ( !isset($module) || !isset($function) || !isset($user) ) { + error_log("api1_query requires that a module and function are passed to it"); + return false; + } + + if (!is_array($args)) { + error_log('api1_query requires that it is passed an array as the 4th parameter'); + return false; + } + + $cpuser = 'cpanel_xmlapi_user'; + $module_type = 'cpanel_xmlapi_module'; + $func_type = 'cpanel_xmlapi_func'; + $api_type = 'cpanel_xmlapi_apiversion'; + + if ( $this->get_output() == 'json' ) { + $cpuser = 'cpanel_jsonapi_user'; + $module_type = 'cpanel_jsonapi_module'; + $func_type = 'cpanel_jsonapi_func'; + $api_type = 'cpanel_jsonapi_apiversion'; + } + + $call = array( + $cpuser => $user, + $module_type => $module, + $func_type => $function, + $api_type => '1' + ); + for ($int = 0; $int < count($args); $int++) { + $call['arg-' . $int] = $args[$int]; + } + return $this->xmlapi_query('cpanel', $call); + } + + /** + * Call an API2 Function + * + * This function allows you to call an API2 function, this is the modern API for cPanel and should be used in preference over + * API1 when possible + * + * @param string $user The username of the account to perform API2 actions on + * @param string $module The module of the API2 call to use + * @param string $function The function of the API2 call + * @param array $args An associative array containing the arguments for the API2 call + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CallingAPIFunctions XML API Call documentation + * @link http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiRef/WebHome API1 & API2 Call documentation + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ApiTwo Legacy API2 Documentation + * @link http://docs.cpanel.net/twiki/bin/view/DeveloperResources/ApiBasics/CallingApiTwo API2 Documentation + */ + + public function api2_query($user, $module, $function, $args = array()) { + if (!isset($user) || !isset($module) || !isset($function) ) { + error_log("api2_query requires that a username, module and function are passed to it"); + return false; + } + if (!is_array($args)) { + error_log("api2_query requires that an array is passed to it as the 4th parameter"); + return false; + } + + $cpuser = 'cpanel_xmlapi_user'; + $module_type = 'cpanel_xmlapi_module'; + $func_type = 'cpanel_xmlapi_func'; + $api_type = 'cpanel_xmlapi_apiversion'; + + if ( $this->get_output() == 'json' ) { + $cpuser = 'cpanel_jsonapi_user'; + $module_type = 'cpanel_jsonapi_module'; + $func_type = 'cpanel_jsonapi_func'; + $api_type = 'cpanel_jsonapi_apiversion'; + } + + $args[$cpuser] = $user; + $args[$module_type] = $module; + $args[$func_type] = $function; + $args[$api_type] = '2'; + return $this->xmlapi_query('cpanel', $args); + } + + #### + # XML API Functions + #### + + /** + * Return a list of available XML-API calls + * + * This function will return an array containing all applications available within the XML-API + * + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListAvailableCalls XML API Call documentation + */ + public function applist() { + return $this->xmlapi_query('applist'); + } + + #### + # Account functions + #### + + /** + * Create a cPanel Account + * + * This function will allow one to create an account, the $acctconf parameter requires that the follow + * three associations are defined: + * - username + * - password + * - domain + * + * Failure to prive these will cause an error to be logged. Any other key/value pairs as defined by the createaccount call + * documentation are allowed parameters for this call. + * + * @param array $acctconf + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CreateAccount XML API Call documentation + */ + + public function createacct($acctconf) { + if (!is_array($acctconf)) { + error_log("createacct requires that first parameter passed to it is an array"); + return false; + } + if (!isset($acctconf['username']) || !isset($acctconf['password']) || !isset($acctconf['domain'])) { + error_log("createacct requires that username, password & domain elements are in the array passed to it"); + return false; + } + return $this->xmlapi_query('createacct', $acctconf); + } + + /** + * Change a cPanel Account's Password + * + * This function will allow you to change the password of a cpanel account + * + * @param string $username The username to change the password of + * @param string $pass The new password for the cPanel Account + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ChangePassword XML API Call documentation + */ + public function passwd($username, $pass){ + if (!isset($username) || !isset($pass)) { + error_log("passwd requires that an username and password are passed to it"); + return false; + } + return $this->xmlapi_query('passwd', array('user' => $username, 'pass' => $pass)); + } + + /** + * Limit an account's monthly bandwidth usage + * + * This function will set an account's bandwidth limit. + * + * @param string $username The username of the cPanel account to modify + * @param int $bwlimit The new bandwidth limit in megabytes + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/LimitBandwidth XML API Call documentation + */ + public function limitbw($username, $bwlimit) { + if (!isset($username) || !isset($bwlimit)) { + error_log("limitbw requires that an username and bwlimit are passed to it"); + return false; + } + return $this->xmlapi_query('limitbw', array('user' => $username, 'bwlimit' => $bwlimit)); + } + + /** + * List accounts on Server + * + * This call will return a list of account on a server, either no parameters or both parameters may be passed to this function. + * + * @param string $searchtype Type of account search to use, allowed values: domain, owner, user, ip or package + * @param string $search the string to search against + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListAccounts XML API Call documentation + */ + public function listaccts($searchtype = null, $search = null) { + if ($search) { + return $this->xmlapi_query('listaccts', array('searchtype' => $searchtype, 'search' => $search )); + } + return $this->xmlapi_query('listaccts'); + } + + /** + * Modify a cPanel account + * + * This call will allow you to change limitations and information about an account. See the XML API call documentation for a list of + * acceptable values for args. + * + * @param string $username The username to modify + * @param array $args the new values for the modified account (see {@link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ModifyAccount modifyacct documentation}) + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ModifyAccount XML API Call documentation + */ + public function modifyacct($username, $args = array()) { + if (!isset($username)) { + error_log("modifyacct requires that username is passed to it"); + return false; + } + $args['user'] = $username; + if (sizeof($args) < 2) { + error_log("modifyacct requires that at least one attribute is passed to it"); + return false; + } + return $this->xmlapi_query('modifyacct', $args); + } + + /** + * Edit a cPanel Account's Quota + * + * This call will allow you to change a cPanel account's quota + * + * @param string $username The username of the account to modify the quota. + * @param int $quota the new quota in megabytes + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/EditQuota XML API Call documentation + */ + public function editquota($username, $quota) { + if (!isset($username) || !isset($quota)) { + error_log("editquota requires that an username and quota are passed to it"); + return false; + } + return $this->xmlapi_query('editquota', array('user' => $username, 'quota' => $quota)); + } + + /** + * Return a summary of the account's information + * + * This call will return a brief report of information about an account, such as: + * - Disk Limit + * - Disk Used + * - Domain + * - Account Email + * - Theme + * - Start Data + * + * Please see the XML API Call documentation for more information on what is returned by this call + * + * @param string $username The username to retrieve a summary of + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ShowAccountInformation XML API Call documenation + */ + public function accountsummary($username) { + if (!isset($username)) { + error_log("accountsummary requires that an username is passed to it"); + return false; + } + return $this->xmlapi_query('accountsummary', array('user' => $username)); + } + + /** + * Suspend a User's Account + * + * This function will suspend the specified cPanel users account. + * The $reason parameter is optional, but can contain a string of any length + * + * @param string $username The username to suspend + * @param string $reason The reason for the suspension + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SuspendAccount XML API Call documentation + */ + public function suspendacct($username, $reason = null) { + if (!isset($username)) { + error_log("suspendacct requires that an username is passed to it"); + return false; + } + if ($reason) { + return $this->xmlapi_query('suspendacct', array('user' => $username, 'reason' => $reason )); + } + return $this->xmlapi_query('suspendacct', array('user' => $username)); + } + + /** + * List suspended accounts on a server + * + * This function will return an array containing all the suspended accounts on a server + * + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListSuspended XML API Call documentation + */ + public function listsuspended() { + return $this->xmlapi_query('listsuspended'); + } + + /** + * Remove an Account + * + * This XML API call will remove an account on the server + * The $keepdns parameter is optional, when enabled this will leave the DNS zone on the server + * + * @param string $username The usename to delete + * @param bool $keepdns When pass a true value, the DNS zone will be retained + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/TerminateAccount + */ + public function removeacct($username, $keepdns = false) { + if (!isset($username)) { + error_log("removeacct requires that a username is passed to it"); + return false; + } + if ($keepdns) { + return $this->xmlapi_query('removeacct', array('user' => $username, 'keepdns' => '1')); + } + return $this->xmlapi_query('removeacct', array('user' => $username)); + } + + /** + * Unsuspend an Account + * + * This XML API call will unsuspend an account + * + * @param string $username The username to unsuspend + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/UnsuspendAcount XML API Call documentation + */ + public function unsuspendacct($username){ + if (!isset($username)) { + error_log("unsuspendacct requires that a username is passed to it"); + return false; + } + return $this->xmlapi_query('unsuspendacct', array('user' => $username)); + } + + /** + * Change an Account's Package + * + * This XML API will change the package associated account. + * + * @param string $username the username to change the package of + * @param string $pkg The package to change the account to. + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ChangePackage XML API Call documentation + */ + public function changepackage($username, $pkg) { + if (!isset($username) || !isset($pkg)) { + error_log("changepackage requires that username and pkg are passed to it"); + return false; + } + return $this->xmlapi_query('changepackage', array('user' => $username, 'pkg' => $pkg)); + } + + /** + * Return the privileges a reseller has in WHM + * + * This will return a list of the privileges that a reseller has to WHM + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ViewPrivileges XML API Call documentation + */ + public function myprivs() { + return $this->xmlapi_query('myprivs'); + } + + + /** + * Display Data about a Virtual Host + * + * This function will return information about a specific domain. This data is essentially a representation of the data + * Contained in the httpd.conf VirtualHost for the domain. + * + * @return mixed + * @param string $domain The domain to fetch information for + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DomainUserData + */ + + public function domainuserdata( $domain ) { + if (!isset( $domain ) ) { + error_log("domainuserdata requires that domain is passed to it"); + return false; + } + return $this->xmlapi_query("domainuserdata", array( 'domain' => $domain ) ); + } + + /** + * Change a site's IP Address + * + * This function will allow you to change the IP address that a domain listens on. + * In order to properly call this function Either $user or $domain parameters must be defined + * @param string $ip The $ip address to change the account or domain to + * @param string $user The username to change the IP of + * @param string $domain The domain to change the IP of + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetSiteIp XML API Call documentation + */ + public function setsiteip ( $ip, $user = null, $domain = null ) { + + if ( !isset($ip) ) { + error_log("setsiteip requires that ip is passed to it"); + return false; + } + + if ( $user == null && $domain == null ) { + error_log("setsiteip requires that either domain or user is passed to it"); + return false; + } + + if ($user == null ) { + return $this->xmlapi_query( "setsiteip", array( "ip" => $ip, "domain" => $domain ) ); + } else { + return $this->xmlapi_query( "setsiteip", array( "ip" => $ip, "user" => $user ) ); + } + } + + #### + # DNS Functions + #### + + // This API function lets you create a DNS zone. + /** + * Add a DNS Zone + * + * This XML API function will create a DNS Zone. This will use the "standard" template when + * creating the zone. + * + * @param string $domain The DNS Domain that you wish to create a zone for + * @param string $ip The IP you want the domain to resolve to + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddDNSZone XML API Call documentation + */ + public function adddns($domain, $ip) { + if (!isset($domain) || !isset($ip)) { + error_log("adddns require that domain, ip are passed to it"); + return false; + } + return $this->xmlapi_query('adddns', array('domain' => $domain, 'ip' => $ip)); + } + + /** + * Add a record to a zone + * + * This will append a record to a DNS Zone. The $args argument to this function + * must be an associative array containing information about the DNS zone, please + * see the XML API Call documentation for more info + * + * @param string $zone The DNS zone that you want to add the record to + * @param array $args Associative array representing the record to be added + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddZoneRecord XML API Call documentation + */ + public function addzonerecord( $zone, $args ) { + if (!is_array($args)) { + error_log("addzonerecord requires that $args passed to it is an array"); + return; + } + + $args['zone'] = $zone; + return $this->xmlapi_query('addzonerecord', $args); + } + + /** + * Edit a Zone Record + * + * This XML API Function will allow you to edit an existing DNS Zone Record. + * This works by passing in the line number of the record you wish to edit. + * Line numbers can be retrieved with dumpzone() + * + * @param string $zone The zone to edit + * @param int $line The line number of the zone to edit + * @param array $args An associative array representing the zone record + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/EditZoneRecord XML API Call documentation + * @see dumpzone() + */ + + public function editzonerecord( $zone, $line, $args ) { + if (!is_array($args)) { + error_log("editzone requires that $args passed to it is an array"); + return; + } + + $args['domain'] = $zone; + $args['Line'] = $line; + return $this->xmlapi_query('editzonerecord', $args); + } + + /** + * Retrieve a DNS Record + * + * This function will return a data structure representing a DNS record, to + * retrieve all lines see dumpzone. + * @param string $zone The zone that you want to retrieve a record from + * @param string $line The line of the zone that you want to retrieve + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/GetZoneRecord XML API Call documentation + */ + public function getzonerecord( $zone, $line ) { + return $this->xmlapi_query('getzonerecord', array( 'domain' => $zone, 'Line' => $line ) ); + } + + /** + * Remove a DNS Zone + * + * This function will remove a DNS Zone from the server + * + * @param string $domain The domain to be remove + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DeleteDNSZone XML API Call documentation + */ + public function killdns($domain) { + if (!isset($domain)) { + error_log("killdns requires that domain is passed to it"); + return false; + } + return $this->xmlapi_query('killdns', array('domain' => $domain)); + } + + /** + * Return a List of all DNS Zones on the server + * + * This XML API function will return an array containing all the DNS Zones on the server + * + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListDNSZone XML API Call documentation + */ + public function listzones() { + return $this->xmlapi_query('listzones'); + } + + /** + * Return all records in a zone + * + * This function will return all records within a zone. + * @param string $domain The domain to return the records from. + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListOneZone XML API Call documentation + * @see editdnsrecord() + * @see getdnsrecord() + */ + public function dumpzone($domain) { + if (!isset($domain)) { + error_log("dumpzone requires that a domain is passed to it"); + return false; + } + return $this->xmlapi_query('dumpzone', array('domain' => $domain)); + } + + /** + * Return a Nameserver's IP + * + * This function will return a nameserver's IP + * + * @param string $nameserver The nameserver to lookup + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/LookupIP XML API Call documentation + */ + public function lookupnsip($nameserver) { + if (!isset($nameserver)) { + error_log("lookupnsip requres that a nameserver is passed to it"); + return false; + } + return $this->xmlapi_query('lookupnsip', array('nameserver' => $nameserver)); + } + + /** + * Remove a line from a zone + * + * This function will remove the specified line from a zone + * @param string $zone The zone to remove a line from + * @param int $line The line to remove from the zone + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/RemoveZone XML API Call documentation + */ + public function removezonerecord($zone, $line) { + if ( !isset($zone) || !isset($line) ) { + error_log("removezone record requires that a zone and line number is passed to it"); + return false; + } + return $this->xmlapi_query('removezonerecord', array('zone' => $zone, 'Line' => $line) ); + } + + /** + * Reset a zone + * + * This function will reset a zone removing all custom records. Subdomain records will be readded by scanning the userdata datastore. + * @param string $domain the domain name of the zone to reset + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ResetZone XML API Call documentation + */ + public function resetzone($domain) { + if ( !isset($domain) ) { + error_log("resetzone requires that a domain name is passed to it"); + return false; + } + return $this->xmlapi_query('resetzone', array('domain' => $domain)); + } + + #### + # Package Functions + #### + + /** + * Add a new package + * + * This function will allow you to add a new package + * This function should be passed an associative array containing elements that define package parameters. + * These variables map directly to the parameters for the XML-API Call, please refer to the link below for a complete + * list of possible variable. The "name" element is required. + * @param array $pkg an associative array containing package parameters + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddPackage XML API Call documentation + */ + public function addpkg($pkg) { + if (!isset($pkg['name'])) { + error_log("addpkg requires that name is defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('addpkg', $pkg); + } + + /** + * Remove a package + * + * This function allow you to delete a package + * @param string $pkgname The package you wish to delete + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DeletePackage XML API Call documentation + */ + public function killpkg($pkgname) { + if(!isset($pkgname)) { + error_log("killpkg requires that the package name is passed to it"); + return false; + } + return $this->xmlapi_query('killpkg', array('pkg' => $pkgname)); + } + + /** + * Edit a package + * + * This function allows you to change a package's paremeters. This is passed an associative array defining + * the parameters for the package. The keys within this array map directly to the XML-API call, please see the link + * below for a list of possible keys within this package. The name element is required. + * @param array $pkg An associative array containing new parameters for the package + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/EditPackage XML API Call documentation + */ + public function editpkg($pkg) { + if (!$isset($pkg['name'])) { + error_log("editpkg requires that name is defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('editpkg', $pkg); + } + + /** + * List Packages + * + * This function will list all packages available to the user + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListPackages XML API Call documentation + */ + public function listpkgs() { + return $this->xmlapi_query('listpkgs'); + } + + #### + # Reseller functions + #### + + /** + * Make a user a reseller + * + * This function will allow you to mark an account as having reseller privileges + * @param string $username The username of the account you wish to add reseller privileges to + * @param int $makeowner Boolean 1 or 0 defining whether the account should own itself or not + * @see setacls() + * @see setresellerlimits() + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddResellerPrivileges XML API Call documentation + */ + public function setupreseller($username, $makeowner = true) { + if (!isset($username)) { + error_log("setupreseller requires that username is passed to it"); + return false; + } + if ($makeowner) { + return $this->xmlapi_query('setupreseller', array('user' => $username, 'makeowner' => '1')); + } + return $this->xmlapi_query('setupreseller', array('user' => $username, 'makeowner' => '0')); + } + + /** + * Create a New ACL List + * + * This function allows you to create a new privilege set for reseller accounts. This is passed an + * Associative Array containing the configuration information for this variable. Please see the XML API Call documentation + * For more information. "acllist" is a required element within this array + * @param array $acl an associative array describing the parameters for the ACL to be create + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/CreateResellerACLList XML API Call documentation + */ + public function saveacllist($acl) { + if (!isset($acl['acllist'])) { + error_log("saveacllist requires that acllist is defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('saveacllist', $acl); + } + + + /** + * List available saved ACLs + * + * This function will return a list of Saved ACLs for reseller accounts + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListCurrentResellerACLLists XML API Call documentation + */ + public function listacls() { + return $this->xmlapi_query('listacls'); + } + + /** + * List Resellers + * + * This function will return a list of resellers on the server + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListResellerAccounts XML API Call documentation + */ + public function listresellers() { + return $this->xmlapi_query('listresellers'); + } + + /** + * Get a reseller's statistics + * + * This function will return general information on a reseller and all it's account individually such as disk usage and bandwidth usage + * + * @param string $username The reseller to be checked + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListResellersAccountsInformation XML API Call documentation + */ + public function resellerstats($username) { + if (!isset($username)) { + error_log("resellerstats requires that a username is passed to it"); + return false; + } + return $this->xmlapi_query('resellerstats', array('reseller' => $username)); + } + + /** + * Remove Reseller Privileges + * + * This function will remove an account's reseller privileges, this does not remove the account. + * + * @param string $username The username to remove reseller privileges from + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/RemoveResellerPrivileges XML API Call documentation + */ + public function unsetupreseller($username) { + if (!isset($username)) { + error_log("unsetupreseller requires that a username is passed to it"); + return false; + } + return $this->xmlapi_query('unsetupreseller', array('user' => $username)); + } + + /** + * Set a reseller's privileges + * + * This function will allow you to set what parts of WHM a reseller has access to. This is passed an associative array + * containing the privleges that this reseller should have access to. These map directly to the parameters passed to the XML API Call + * Please view the XML API Call documentation for more information. "reseller" is the only required element within this array + * @param array $acl An associative array containing all the ACL information for the reseller + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellersACLList XML API Call documentation + */ + public function setacls($acl) { + if (!isset($acl['reseller'])) { + error_log("setacls requires that reseller is defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('setacls', $acl); + } + + /** + * Terminate a Reseller's Account + * + * This function will terminate a reseller's account and all accounts owned by the reseller + * + * @param string $reseller the name of the reseller to terminate + * @param boolean $terminatereseller Passing this as true will terminate the the reseller's account as well as all the accounts owned by the reseller + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/TerminateResellerandAccounts XML API Call documentation + * + **/ + public function terminatereseller($reseller, $terminatereseller = true) { + if (!isset($reseller)) { + error_log("terminatereseller requires that username is passed to it"); + return false; + } + $verify = 'I understand this will irrevocably remove all the accounts owned by the reseller ' . $reseller; + if ($terminatereseller) { + return $this->xmlapi_query('terminatereseller', array('reseller' => $reseller, 'terminatereseller' => '1', 'verify' => $verify)); + } + return $this->xmlapi_query('terminatereseller', array('reseller' => $reseller, 'terminatereseller' => '0', 'verify' => $verify)); + } + + /** + * Set a reseller's dedicated IP addresses + * + * This function will set a reseller's dedicated IP addresses. If an IP is not passed to this function, + * it will reset the reseller to use the server's main shared IP address. + * @param string $user The username of the reseller to change dedicated IPs for + * @param string $ip The IP to assign to the reseller, this can be a comma-seperated list of IPs to allow for multiple IP addresses + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerIps XML API Call documentation + */ + public function setresellerips($user, $ip = null) { + if (!isset($user) ) { + error_log("setresellerips requires that a username is passed to it"); + return false; + } + $params = array("user" => $user); + if ( $ip != null ) { + $params['ip'] = $ip; + } + return $this->xmlapi_query('setresellerips',$params); + } + + /** + * Set Accounting Limits for a reseller account + * + * This function allows you to define limits for reseller accounts not included with in access control such as + * the number of accounts a reseller is allowed to create, the amount of disk space to use. + * This function is passed an associative array defining these limits, these map directly to the parameters for the XML API + * Call, please refer to the XML API Call documentation for more information. The only required parameters is "user" + * + * @param array $reseller_cfg An associative array containing configuration information for the specified reseller + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerLimits XML API Call documentation + * + */ + public function setresellerlimits( $reseller_cfg ) { + if ( !isset($reseller_cfg['user'] ) ) { + error_log("setresellerlimits requires that a user is defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('setresellerlimits',$reseller_cfg); + } + + /** + * Set a reseller's main IP + * + * This function will allow you to set a reseller's main IP. By default all accounts created by this reseller + * will be created on this IP + * @param string $reseller the username of the reseller to change the main IP of + * @param string $ip The ip you would like this reseller to create accounts on by default + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerMainIp XML API Call documentation + */ + public function setresellermainip($reseller, $ip) { + if ( !isset($reseller) || !isset($ip) ) { + error_log("setresellermainip requires that an reseller and ip are passed to it"); + return false; + } + return $this->xmlapi_query("setresellermainip", array('user' => $reseller, 'ip' => $ip)); + } + + /** + * Set reseller package limits + * + * This function allows you to define which packages a reseller has access to use + * @param string $user The reseller you wish to define package limits for + * @param boolean $no_limit Whether or not you wish this reseller to have packages limits + * @param string $package if $no_limit is false, then the package you wish to modify privileges for + * @param boolean $allowed if $no_limit is false, then defines if the reseller should have access to the package or not + * @param int $number if $no_limit is false, then defines the number of account a reseller can create of a specific package + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerPkgLimit XML API Call documentation + */ + public function setresellerpackagelimits($user, $no_limit, $package = null, $allowed = null, $number = null) { + if (!isset($user) || !isset($no_limit) ) { + error_log("setresellerpackagelimits requires that a username and no_limit are passed to it by default"); + return false; + } + if ($no_limit) { + return $this->xmlapi_query("setresellerpackagelimits", array( 'user' => $user, "no_limit" => '1') ); + } else { + if ( is_null($package) || is_null($allowed) ) { + error_log('setresellerpackagelimits requires that package and allowed are passed to it if no_limit eq 0'); + return false; + } + $params = array( + 'user' => $user, + 'no_limit' => '0', + 'package' => $package, + ); + if ($allowed) { + $params['allowed'] = 1; + } else { + $params['allowed'] = 0; + } + if ( !is_null($number) ) { + $params['number'] = $number; + } + return $this->xmlapi_query('setresellerpackagelimits', $params); + } + } + + /** + * Suspend a reseller and all accounts owned by a reseller + * + * This function, when called will suspend a reseller account and all account owned by said reseller + * @param string $reseller The reseller account to be suspended + * @param string $reason (optional) The reason for suspending the reseller account + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SuspendReseller XML API Call documentation + */ + public function suspendreseller($reseller, $reason = null) { + if (!isset($reseller) ) { + error_log("suspendreseller requires that the reseller's username is passed to it"); + return false; + } + $params = array("user" => $reseller); + if ($reason) { + $params['reason'] = $reason; + } + return $this->xmlapi_query('suspendreseller', $params); + } + + + /** + * Unsuspend a Reseller Account + * + * This function will unsuspend a reseller account and all accounts owned by the reseller in question + * @param string $user The username of the reseller to be unsuspended + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/UnsuspendReseller XML API Call documentation + */ + public function unsuspendreseller($user) { + if (!isset($user) ) { + error_log("unsuspendreseller requires that a username is passed to it"); + return false; + } + return $this->xmlapi_query('unsuspendreseller', array('user' => $user)); + } + + /** + * Get the number of accounts owned by a reseller + * + * This function will return the number of accounts owned by a reseller account, along with information such as the number of active, suspended and accounting limits + * @param string $user The username of the reseller to get account information from + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AcctCounts XML API Call documentation + */ + public function acctcounts($user) { + if (!isset($user)) { + error_log('acctcounts requires that a username is passed to it'); + return false; + } + return $this->xmlapi_query('acctcounts', array('user' => $user) ); + } + + /** + * Set a reseller's nameservers + * + * This function allows you to change the nameservers that account created by a specific reseller account will use. + * If this function is not passed a $nameservers parameter, it will reset the nameservers for the reseller to the servers's default + * @param string $user The username of the reseller account to grab reseller accounts from + * @param string $nameservers A comma seperate list of nameservers + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResellerNameservers XML API Call documentation + */ + public function setresellernameservers($user, $nameservers = null) { + if (!isset($user)) { + error_log("setresellernameservers requires that a username is passed to it"); + return false; + } + $params = array('user' => $user); + if($nameservers) { + $params['nameservers'] = $nameservers; + } + return $this->xmlapi_query('setresellernameservers', $params); + } + + #### + # Server information + #### + + /** + * Get a server's hostname + * + * This function will return a server's hostname + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DisplayServerHostname XML API Call documentation + */ + public function gethostname() { + return $this->xmlapi_query('gethostname'); + } + + /** + * Get the version of cPanel running on the server + * + * This function will return the version of cPanel/WHM running on the remote system + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DisplaycPanelWHMVersion XML API Call documentation + */ + public function version() { + return $this->xmlapi_query('version'); + } + + + /** + * Get Load Average + * + * This function will return the loadavg of the remote system + * + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/LoadAvg XML API Call documentation + */ + public function loadavg() { + return $this->xmlapi_query('loadavg'); + } + + /** + * Get a list of languages on the remote system + * + * This function will return a list of available langauges for the cPanel interface + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/GetLangList XML API Call documentation + * + */ + public function getlanglist() { + return $this->xmlapi_query('getlanglist'); + } + + #### + # Server administration + #### + + /** + * Reboot server + * + * This function will reboot the server + * @param boolean $force This will determine if the server should be given a graceful or forceful reboot + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/RebootServer XML API Call documentation + */ + public function reboot($force = false) { + if ($force) { + return $this->xmlapi_query('reboot', array('force' => '1')); + } + return $this->xmlapi_query('reboot'); + } + + /** + * Add an IP to a server + * + * This function will add an IP alias to your server + * @param string $ip The IP to be added + * @param string $netmask The netmask of the IP to be added + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/AddIPAddress XML API Call documentation + */ + public function addip($ip, $netmask) { + if (!isset($ip) || !isset($netmask)) { + error_log("addip requires that an IP address and Netmask are passed to it"); + return false; + } + return $this->xmlapi_query('addip', array('ip' => $ip, 'netmask' => $netmask)); + } + + // This function allows you to delete an IP address from your server. + /** + * Delete an IP from a server + * + * Remove an IP from the server + * @param string $ip The IP to remove + * @param string $ethernetdev The ethernet device that the IP is bound to + * @param bool $skipifshutdown Whether the function should remove the IP even if the ethernet interface is down + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DeleteIPAddress XML API Call documentation + */ + public function delip($ip, $ethernetdev = null, $skipifshutdown = false) { + $args = array(); + if (!isset($ip)) { + error_log("delip requires that an IP is defined in the array passed to it"); + return false; + } + $args['ip'] = $ip; + if ($ethernetdev) { + $args['ethernetdev'] = $ethernetdev; + } + $args['skipifshutdown'] = ($skipifshutdown) ? '1' : '0'; + return $this->xmlapi_query('delip', $args); + } + + /** + * List IPs + * + * This should return a list of IPs on a server + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/DeleteIPAddress XML API Call documentation + */ + public function listips() { + return $this->xmlapi_query('listips'); + } + + /** + * Set Hostname + * + * This function will allow you to set the hostname of the server + * @param string $hostname the hostname that should be assigned to the serve + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetHostname XML API Call documentation + */ + public function sethostname($hostname) { + if (!isset($hostname)) { + error_log("sethostname requires that hostname is passed to it"); + return false; + } + return $this->xmlapi_query('sethostname', array('hostname' => $hostname)); + } + + /** + * Set the resolvers used by the server + * + * This function will set the resolvers in /etc/resolv.conf for the server + * @param string $nameserver1 The IP of the first nameserver to use + * @param string $nameserver2 The IP of the second namesever to use + * @param string $nameserver3 The IP of the third nameserver to use + * @param string $nameserver4 The IP of the forth nameserver to use + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/SetResolvers XML API Call documentation + */ + public function setresolvers($nameserver1, $nameserver2 = null, $nameserver3 = null) { + $args = array(); + if (!isset($nameserver1)) { + error_log("setresolvers requires that nameserver1 is defined in the array passed to it"); + return false; + } + $args['nameserver1'] = $nameserver1; + if ($nameserver2) { + $args['nameserver2'] = $nameserver2; + } + if ($nameserver3) { + $args['nameserver3'] = $nameserver3; + } + return $this->xmlapi_query('setresolvers', $args); + } + + /** + * Display bandwidth Usage + * + * This function will return all bandwidth usage information for the server, + * The arguments for this can be passed in via an associative array, the elements of this array map directly to the + * parameters of the call, please see the XML API Call documentation for more information + * @param array $args The configuration for what bandwidth information to display + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ShowBw XML API Call documentation + */ + public function showbw($args = null) { + if (is_array($args)) { + return $this->xmlapi_query('showbw', $args); + } + return $this->xmlapi_query('showbw'); + } + + public function nvset($key, $value) { + if (!isset($key) || !isset($value)) { + error_log("nvset requires that key and value are passed to it"); + return false; + } + return $this->xmlapi_query('nvset', array('key' => $key, 'value' => $value)); + } + + // This function allows you to retrieve and view a non-volatile variable's value. + public function nvget($key) { + if (!isset($key)) { + error_log("nvget requires that key is passed to it"); + return false; + } + return $this->xmlapi_query('nvget', array('key' => $key)); + } + + #### + # Service functions + #### + + /** + * Restart a Service + * + * This function allows you to restart a service on the server + * @param string $service the service that you wish to restart please view the XML API Call documentation for acceptable values to this parameters + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/RestartService XML API Call documentation + */ + public function restartsrv($service) { + if (!isset($service)) { + error_log("restartsrv requires that service is passed to it"); + return false; + } + return $this->xmlapi_query('restartservice', array('service' => $service)); + } + + /** + * Service Status + * + * This function will return the status of all services on the and whether they are running or not + * @param string $service A single service to filter for. + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ServiceStatus XML API Call documentation + */ + public function servicestatus($args=array()) + { + if(!empty($args) && !is_array($args)){ + $args = array('service'=>$args); + } elseif (!is_array($args)) { + $args = array(); + } + return $this->xmlapi_query('servicestatus', $args); + } + + /** + * Configure A Service + * + * This function will allow you to enabled or disable services along with their monitoring by chkservd + * @param string $service The service to be monitored + * @param bool $enabled Whether the service should be enabled or not + * @param bool $monitored Whether the service should be monitored or not + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ConfigureService XML API Call documentation + */ + public function configureservice($service, $enabled = true, $monitored = true) { + if (!isset($service)) { + error_log("configure service requires that a service is passed to it"); + return false; + } + $params = array('service' => $service); + + if ($enabled) { + $params['enabled'] = 1; + } else { + $params['enabled'] = 0; + } + + if ($monitored) { + $params['monitored'] = 1; + } else { + $params['monitored'] = 0; + } + + return $this->xmlapi_query('configureservice', $params); + + } + + #### + # SSL functions + #### + + /** + * Display information on an SSL host + * + * This function will return information on an SSL Certificate, CSR, cabundle and SSL key for a specified domain + * @param array $args Configuration information for the SSL certificate, please see XML API Call documentation for required values + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/FetchSSL XML API Call documentation + */ + public function fetchsslinfo($args) { + if ( (isset($args['domain']) && isset($args['crtdata'])) || (!isset($args['domain']) && !isset($args['crtdata'])) ) { + error_log("fetchsslinfo requires domain OR crtdata is passed to it"); + } + if (isset($args['crtdata'])) { + // crtdata must be URL-encoded! + $args['crtdata'] = urlencode(trim($args['crtdata'])); + } + return $this->xmlapi_query('fetchsslinfo', $args); + } + + /** + * Generate an SSL Certificate + * + * This function will generate an SSL Certificate, the arguments for this map directly to the call for the XML API call. Please consult the XML API Call documentation for more information + * @param array $args the configuration for the SSL Certificate being generated + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/GenerateSSL XML API Call documentation + */ + public function generatessl($args) { + if (!isset($args['xemail']) || !isset($args['host']) || !isset($args['country']) || !isset($args['state']) || !isset($args['city']) || !isset($args['co']) || !isset($args['cod']) || !isset($args['email']) || !isset($args['pass'])) { + error_log("generatessl requires that xemail, host, country, state, city, co, cod, email and pass are defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('generatessl', $args); + } + + /** + * Install an SSL certificate + * + * This function will allow you to install an SSL certificate that is uploaded via the $argument parameter to this call. The arguments for this call map directly to the parameters for the XML API call, + * please consult the XML API Call documentation for more information. + * @param array $args The configuration for the SSL certificate + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/InstallSSL XML API Call documentation + */ + public function installssl($args) { + if (!isset($args['user']) || !isset($args['domain']) || !isset($args['cert']) || !isset($args['key']) || !isset($args['cab']) || !isset($args['ip'])) { + error_log("installssl requires that user, domain, cert, key, cab and ip are defined in the array passed to it"); + return false; + } + return $this->xmlapi_query('installssl', $args); + } + + /** + * List SSL Certs + * + * This function will list all SSL certificates installed on the server + * @return mixed + * @link http://docs.cpanel.net/twiki/bin/view/AllDocumentation/AutomationIntegration/ListSSL XML API Call documentation + */ + public function listcrts() { + return $this->xmlapi_query('listcrts'); + } + + #### + # cPanel API1 functions + # Note: A cPanel account username is required + # Some cPanel features must be enabled to be able to use some function (f.e. park, unpark) + #### + + // This API1 function adds a emailaccount for a specific user. + public function addpop($username, $args) { + if (!isset($username) || !isset($args)) { + error_log("addpop requires that a user and args are passed to it"); + return false; + } + if (is_array($args) && (sizeof($args) < 3)) { + error_log("addpop requires that args at least contains an email_username, email_password and email_domain"); + return false; + } + return $this->api1_query($username, 'Email', 'addpop', $args); + } + + // This API function displays a list of all parked domains for a specific user. + public function park($username, $newdomain, $topdomain) { + $args = array(); + if ( (!isset($username)) && (!isset($newdomain)) ) { + error_log("park requires that a username and new domain are passed to it"); + return false; + } + $args['domain'] = $newdomain; + if ($topdomain) { + $args['topdomain'] = $topdomain; + } + return $this->api2_query($username, 'Park', 'park', $args); + } + + // This API function displays a list of all parked domains for a specific user. + public function unpark($username, $domain) { + $args = array(); + if ( (!isset($username)) && (!isset($domain)) ) { + error_log("unpark requires that a username and domain are passed to it"); + return false; + } + $args['domain'] = $domain; + return $this->api2_query($username, 'Park', 'unpark', $args); + } + + #### + # cPanel API2 functions + # Note: A cPanel account username is required + # Some cPanel features must be enabled to be able to use some function + #### + + // This API2 function allows you to view the diskusage of a emailaccount. + public function getdiskusage($username, $args) { + if (!isset($username) || !isset($args)) { + error_log("getdiskusage requires that a username and args are passed to it"); + return false; + } + if (is_array($args) && (!isset($args['domain']) || !isset($args['login']))) { + error_log("getdiskusage requires that args at least contains an email_domain and email_username"); + return false; + } + return $this->api2_query($username, 'Email', 'getdiskusage', $args); + } + + // This API2 function allows you to list ftp-users associated with a cPanel account including disk information. + public function listftpwithdisk($username) { + if (!isset($username)) { + error_log("listftpwithdisk requires that user is passed to it"); + return false; + } + return $this->api2_query($username, 'Ftp', 'listftpwithdisk'); + } + + // This API2 function allows you to list ftp-users associated with a cPanel account. + public function listftp($username) { + if (!isset($username)) { + error_log("listftp requires that user is passed to it"); + return false; + } + return $this->api2_query($username, 'Ftp', 'listftp'); + } + + // This API function displays a list of all parked domains for a specific user. + public function listparkeddomains($username, $domain = null) { + $args = array(); + if (!isset($username)) { + error_log("listparkeddomains requires that a user is passed to it"); + return false; + } + if (isset($domain)) { + $args['regex'] = $domain; + return $this->api2_query($username, 'Park', 'listparkeddomains', $args); + } + return $this->api2_query($username, 'Park', 'listparkeddomains'); + } + + // This API function displays a list of all addon domains for a specific user. + public function listaddondomains($username, $domain = null) { + $args = array(); + if (!isset($username)) { + error_log("listaddondomains requires that a user is passed to it"); + return false; + } + if (isset($domain)) { + $args['regex'] = $domain; + return $this->api2_query($username, 'AddonDomain', 'listaddondomains', $args); + } + return $this->api2_query($username, 'Park', 'listaddondomains'); + } + + // This API function displays a list of all selected stats for a specific user. + public function stat($username, $args = null) { + if ( (!isset($username)) || (!isset($args)) ) { + error_log("stat requires that a username and options are passed to it"); + return false; + } + if (is_array($args)) { + $display = ''; + foreach($args as $key => $value){ + $display .= $value . '|'; + } + $values['display'] = substr($display, 0, -1); + } + else { + $values['display'] = substr($args, 0, -1); + } + return $this->api2_query($username, 'StatsBar', 'stat', $values); + } + + +} \ No newline at end of file diff --git a/src/bb-library/Server/Package.php b/src/bb-library/Server/Package.php new file mode 100755 index 000000000..087f9a535 --- /dev/null +++ b/src/bb-library/Server/Package.php @@ -0,0 +1,149 @@ +custom = $param; + return $this; + } + + public function setCustomValue($param, $value) + { + $this->custom[$param] = $value; + return $this; + } + + public function getCustomValue($param) + { + return isset($this->custom[$param]) ? $this->custom[$param] : NULL; + } + + public function setName($param) + { + $this->name = $param; + return $this; + } + + public function getName() + { + return $this->name; + } + + public function setQuota($param) + { + $this->quota = $param; + return $this; + } + + public function getQuota() + { + return $this->quota; + } + + public function setBandwidth($param) + { + $this->bandwidth = $param; + return $this; + } + + public function getBandwidth() + { + return $this->bandwidth; + } + + public function setMaxDomains($param) + { + $this->maxdomains = $param; + return $this; + } + + public function getMaxDomains() + { + return $this->maxdomains; + } + + public function setMaxSubdomains($param) + { + $this->maxsubdomains = $param; + return $this; + } + + public function getMaxSubdomains() + { + return $this->maxsubdomains; + } + + public function setMaxParkedDomains($param) + { + $this->maxparkeddomains = $param; + return $this; + } + + public function getMaxParkedDomains() + { + return $this->maxparkeddomains; + } + + public function setMaxFtp($param) + { + $this->maxftp = $param; + return $this; + } + + public function getMaxFtp() + { + return $this->maxftp; + } + + public function setMaxSql($param) + { + $this->maxsql = $param; + return $this; + } + + public function getMaxSql() + { + return $this->maxsql; + } + + public function setMaxPop($param) + { + $this->maxpop = $param; + return $this; + } + + public function getMaxPop() + { + return $this->maxpop; + } +} \ No newline at end of file diff --git a/src/bb-library/index.html b/src/bb-library/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-library/php-gettext/AUTHORS b/src/bb-library/php-gettext/AUTHORS new file mode 100644 index 000000000..da6ade7b6 --- /dev/null +++ b/src/bb-library/php-gettext/AUTHORS @@ -0,0 +1,3 @@ +Danilo Segan +Nico Kaiser (contributed most changes between 1.0.2 and 1.0.3, bugfix for 1.0.5) +Steven Armstrong (gettext.inc, leading to 1.0.6) diff --git a/src/bb-library/php-gettext/COPYING b/src/bb-library/php-gettext/COPYING new file mode 100644 index 000000000..5b6e7c66c --- /dev/null +++ b/src/bb-library/php-gettext/COPYING @@ -0,0 +1,340 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +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 +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the 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 a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE 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. + + 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 +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/src/bb-library/php-gettext/README b/src/bb-library/php-gettext/README new file mode 100644 index 000000000..bca4f916d --- /dev/null +++ b/src/bb-library/php-gettext/README @@ -0,0 +1,161 @@ +PHP-gettext 1.0 (https://launchpad.net/php-gettext) + +Copyright 2003, 2006, 2009 -- Danilo "angry with PHP[1]" Segan +Licensed under GPLv2 (or any later version, see COPYING) + +[1] PHP is actually cyrillic, and translates roughly to + "works-doesn't-work" (UTF-8: Ради-Не-Ради) + + +Introduction + + How many times did you look for a good translation tool, and + found out that gettext is best for the job? Many times. + + How many times did you try to use gettext in PHP, but failed + miserably, because either your hosting provider didn't support + it, or the server didn't have adequate locale? Many times. + + Well, this is a solution to your needs. It allows using gettext + tools for managing translations, yet it doesn't require gettext + library at all. It parses generated MO files directly, and thus + might be a bit slower than the (maybe provided) gettext library. + + PHP-gettext is a simple reader for GNU gettext MO files. Those + are binary containers for translations, produced by GNU msgfmt. + +Why? + + I got used to having gettext work even without gettext + library. It's there in my favourite language Python, so I was + surprised that I couldn't find it in PHP. I even Googled for it, + but to no avail. + + So, I said, what the heck, I'm going to write it for this + disguisting language of PHP, because I'm often constrained to it. + +Features + + o Support for simple translations + Just define a simple alias for translate() function (suggested + use of _() or gettext(); see provided example). + + o Support for ngettext calls (plural forms, see a note under bugs) + You may also use plural forms. Translations in MO files need to + provide this, and they must also provide "plural-forms" header. + Please see 'info gettext' for more details. + + o Support for reading straight files, or strings (!!!) + Since I can imagine many different backends for reading in the MO + file data, I used imaginary abstract class StreamReader to do all + the input (check streams.php). For your convenience, I've already + provided two classes for reading files: FileReader and + StringReader (CachedFileReader is a combination of the two: it + loads entire file contents into a string, and then works on that). + See example below for usage. You can for instance use StringReader + when you read in data from a database, or you can create your own + derivative of StreamReader for anything you like. + + +Bugs + + Report them on https://bugs.launchpad.net/php-gettext + +Usage + + Put files streams.php and gettext.php somewhere you can load them + from, and require 'em in where you want to use them. + + Then, create one 'stream reader' (a class that provides functions + like read(), seekto(), currentpos() and length()) which will + provide data for the 'gettext_reader', with eg. + $streamer = new FileStream('data.mo'); + + Then, use that as a parameter to gettext_reader constructor: + $wohoo = new gettext_reader($streamer); + + If you want to disable pre-loading of entire message catalog in + memory (if, for example, you have a multi-thousand message catalog + which you'll use only occasionally), use "false" for second + parameter to gettext_reader constructor: + $wohoo = new gettext_reader($streamer, false); + + From now on, you have all the benefits of gettext data at your + disposal, so may run: + print $wohoo->translate("This is a test"); + print $wohoo->ngettext("%d bird", "%d birds", $birds); + + You might need to pass parameter "-k" to xgettext to make it + extract all the strings. In above example, try with + xgettext -ktranslate -kngettext:1,2 file.php + what should create messages.po which contains two messages for + translation. + + I suggest creating simple aliases for these functions (see + example/pigs.php for how do I do it, which means it's probably a + bad way). + + +Usage with gettext.inc (standard gettext interfaces emulation) + + Check example in examples/pig_dropin.php, basically you include + gettext.inc and use all the standard gettext interfaces as + documented on: + + http://www.php.net/gettext + + The only catch is that you can check return value of setlocale() + to see if your locale is system supported or not. + + +Example + + See in examples/ subdirectory. There are a couple of files. + pigs.php is an example, serbian.po is a translation to Serbian + language, and serbian.mo is generated with + msgfmt -o serbian.mo serbian.po + There is also simple "update" script that can be used to generate + POT file and to update the translation using msgmerge. + +TODO: + + o Improve speed to be even more comparable to the native gettext + implementation. + + o Try to use hash tables in MO files: with pre-loading, would it + be useful at all? + +Never-asked-questions: + + o Why did you mark this as version 1.0 when this is the first code + release? + + Well, it's quite simple. I consider that the first released thing + should be labeled "version 1" (first, right?). Zero is there to + indicate that there's zero improvement and/or change compared to + "version 1". + + I plan to use version numbers 1.0.* for small bugfixes, and to + release 1.1 as "first stable release of version 1". + + This may trick someone that this is actually useful software, but + as with any other free software, I take NO RESPONSIBILITY for + creating such a masterpiece that will smoke crack, trash your + hard disk, and make lasers in your CD device dance to the tune of + Mozart's 40th Symphony (there is one like that, right?). + + o Can I...? + + Yes, you can. This is free software (as in freedom, free speech), + and you might do whatever you wish with it, provided you do not + limit freedom of others (GPL). + + I'm considering licensing this under LGPL, but I *do* want + *every* PHP-gettext user to contribute and respect ideas of free + software, so don't count on it happening anytime soon. + + I'm sorry that I'm taking away your freedom of taking others' + freedom away, but I believe that's neglible as compared to what + freedoms you could take away. ;-) + + Uhm, whatever. diff --git a/src/bb-library/php-gettext/gettext.inc b/src/bb-library/php-gettext/gettext.inc new file mode 100644 index 000000000..b3b422945 --- /dev/null +++ b/src/bb-library/php-gettext/gettext.inc @@ -0,0 +1,540 @@ + + Copyright (c) 2009 Danilo Segan + + Drop in replacement for native gettext. + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ +/* +LC_CTYPE 0 +LC_NUMERIC 1 +LC_TIME 2 +LC_COLLATE 3 +LC_MONETARY 4 +LC_MESSAGES 5 +LC_ALL 6 +*/ + +// LC_MESSAGES is not available if php-gettext is not loaded +// while the other constants are already available from session extension. +if (!defined('LC_MESSAGES')) { + define('LC_MESSAGES', 5); +} +if (!defined('LC_TIME')) { + define('LC_TIME', 2); +} + +require('streams.php'); +require('gettext.php'); + + +// Variables + +global $text_domains, $default_domain, $LC_CATEGORIES, $EMULATEGETTEXT, $CURRENTLOCALE; +$text_domains = array(); +$default_domain = 'messages'; +$LC_CATEGORIES = array('LC_CTYPE', 'LC_NUMERIC', 'LC_TIME', 'LC_COLLATE', 'LC_MONETARY', 'LC_MESSAGES', 'LC_ALL'); +$EMULATEGETTEXT = 0; +$CURRENTLOCALE = ''; + +/* Class to hold a single domain included in $text_domains. */ +class domain { + var $l10n; + var $path; + var $codeset; +} + +// Utility functions + +/** + * Return a list of locales to try for any POSIX-style locale specification. + */ +function get_list_of_locales($locale) { + /* Figure out all possible locale names and start with the most + * specific ones. I.e. for sr_CS.UTF-8@latin, look through all of + * sr_CS.UTF-8@latin, sr_CS@latin, sr@latin, sr_CS.UTF-8, sr_CS, sr. + */ + $locale_names = array(); + $lang = NULL; + $country = NULL; + $charset = NULL; + $modifier = NULL; + if ($locale) { + if (preg_match("/^(?P[a-z]{2,3})" // language code + ."(?:_(?P[A-Z]{2}))?" // country code + ."(?:\.(?P[-A-Za-z0-9_]+))?" // charset + ."(?:@(?P[-A-Za-z0-9_]+))?$/", // @ modifier + $locale, $matches)) { + + if (isset($matches["lang"])) $lang = $matches["lang"]; + if (isset($matches["country"])) $country = $matches["country"]; + if (isset($matches["charset"])) $charset = $matches["charset"]; + if (isset($matches["modifier"])) $modifier = $matches["modifier"]; + + if ($modifier) { + if ($country) { + if ($charset) + array_push($locale_names, "${lang}_$country.$charset@$modifier"); + array_push($locale_names, "${lang}_$country@$modifier"); + } elseif ($charset) + array_push($locale_names, "${lang}.$charset@$modifier"); + array_push($locale_names, "$lang@$modifier"); + } + if ($country) { + if ($charset) + array_push($locale_names, "${lang}_$country.$charset"); + array_push($locale_names, "${lang}_$country"); + } elseif ($charset) + array_push($locale_names, "${lang}.$charset"); + array_push($locale_names, $lang); + } + + // If the locale name doesn't match POSIX style, just include it as-is. + if (!in_array($locale, $locale_names)) + array_push($locale_names, $locale); + } + return $locale_names; +} + +/** + * Utility function to get a StreamReader for the given text domain. + */ +function _get_reader($domain=null, $category=5, $enable_cache=true) { + global $text_domains, $default_domain, $LC_CATEGORIES; + if (!isset($domain)) $domain = $default_domain; + if (!isset($text_domains[$domain]->l10n)) { + // get the current locale + $locale = _setlocale(LC_MESSAGES, 0); + $bound_path = isset($text_domains[$domain]->path) ? + $text_domains[$domain]->path : './'; + $subpath = $LC_CATEGORIES[$category] ."/$domain.mo"; + + $locale_names = get_list_of_locales($locale); + $input = null; + foreach ($locale_names as $locale) { + $full_path = $bound_path . $locale . "/" . $subpath; + if (file_exists($full_path)) { + $input = new FileReader($full_path); + break; + } + } + + if (!array_key_exists($domain, $text_domains)) { + // Initialize an empty domain object. + $text_domains[$domain] = new domain(); + } + $text_domains[$domain]->l10n = new gettext_reader($input, + $enable_cache); + } + return $text_domains[$domain]->l10n; +} + +/** + * Returns whether we are using our emulated gettext API or PHP built-in one. + */ +function locale_emulation() { + global $EMULATEGETTEXT; + return $EMULATEGETTEXT; +} + +/** + * Checks if the current locale is supported on this system. + */ +function _check_locale_and_function($function=false) { + global $EMULATEGETTEXT; + if ($function and !function_exists($function)) + return false; + return !$EMULATEGETTEXT; +} + +/** + * Get the codeset for the given domain. + */ +function _get_codeset($domain=null) { + global $text_domains, $default_domain, $LC_CATEGORIES; + if (!isset($domain)) $domain = $default_domain; + return (isset($text_domains[$domain]->codeset))? $text_domains[$domain]->codeset : ini_get('mbstring.internal_encoding'); +} + +/** + * Convert the given string to the encoding set by bind_textdomain_codeset. + */ +function _encode($text) { + $source_encoding = mb_detect_encoding($text); + $target_encoding = _get_codeset(); + if ($source_encoding != $target_encoding) { + return mb_convert_encoding($text, $target_encoding, $source_encoding); + } + else { + return $text; + } +} + + +// Custom implementation of the standard gettext related functions + +/** + * Returns passed in $locale, or environment variable $LANG if $locale == ''. + */ +function _get_default_locale($locale) { + if ($locale == '') // emulate variable support + return getenv('LANG'); + else + return $locale; +} + +/** + * Sets a requested locale, if needed emulates it. + */ +function _setlocale($category, $locale) { + global $CURRENTLOCALE, $EMULATEGETTEXT; + if ($locale === 0) { // use === to differentiate between string "0" + if ($CURRENTLOCALE != '') + return $CURRENTLOCALE; + else + // obey LANG variable, maybe extend to support all of LC_* vars + // even if we tried to read locale without setting it first + return _setlocale($category, $CURRENTLOCALE); + } else { + if (function_exists('setlocale')) { + $ret = setlocale($category, $locale); + if (($locale == '' and !$ret) or // failed setting it by env + ($locale != '' and $ret != $locale)) { // failed setting it + // Failed setting it according to environment. + $CURRENTLOCALE = _get_default_locale($locale); + $EMULATEGETTEXT = 1; + } else { + $CURRENTLOCALE = $ret; + $EMULATEGETTEXT = 0; + } + } else { + // No function setlocale(), emulate it all. + $CURRENTLOCALE = _get_default_locale($locale); + $EMULATEGETTEXT = 1; + } + // Allow locale to be changed on the go for one translation domain. + global $text_domains, $default_domain; + if (array_key_exists($default_domain, $text_domains)) { + unset($text_domains[$default_domain]->l10n); + } + return $CURRENTLOCALE; + } +} + +/** + * Sets the path for a domain. + */ +function _bindtextdomain($domain, $path) { + global $text_domains; + // ensure $path ends with a slash ('/' should work for both, but lets still play nice) + if (substr(php_uname(), 0, 7) == "Windows") { + if ($path[strlen($path)-1] != '\\' and $path[strlen($path)-1] != '/') + $path .= '\\'; + } else { + if ($path[strlen($path)-1] != '/') + $path .= '/'; + } + if (!array_key_exists($domain, $text_domains)) { + // Initialize an empty domain object. + $text_domains[$domain] = new domain(); + } + $text_domains[$domain]->path = $path; +} + +/** + * Specify the character encoding in which the messages from the DOMAIN message catalog will be returned. + */ +function _bind_textdomain_codeset($domain, $codeset) { + global $text_domains; + $text_domains[$domain]->codeset = $codeset; +} + +/** + * Sets the default domain. + */ +function _textdomain($domain) { + global $default_domain; + $default_domain = $domain; +} + +/** + * Lookup a message in the current domain. + */ +function _gettext($msgid) { + $l10n = _get_reader(); + return _encode($l10n->translate($msgid)); +} + +/** + * Alias for gettext. + */ +function __($msgid, array $values = NULL) { + $string = _gettext($msgid); + return empty($values) ? $string : strtr($string, $values); +} + +/** + * Plural version of gettext. + */ +function _ngettext($singular, $plural, $number) { + $l10n = _get_reader(); + return _encode($l10n->ngettext($singular, $plural, $number)); +} + +/** + * Override the current domain. + */ +function _dgettext($domain, $msgid) { + $l10n = _get_reader($domain); + return _encode($l10n->translate($msgid)); +} + +/** + * Plural version of dgettext. + */ +function _dngettext($domain, $singular, $plural, $number) { + $l10n = _get_reader($domain); + return _encode($l10n->ngettext($singular, $plural, $number)); +} + +/** + * Overrides the domain and category for a single lookup. + */ +function _dcgettext($domain, $msgid, $category) { + $l10n = _get_reader($domain, $category); + return _encode($l10n->translate($msgid)); +} +/** + * Plural version of dcgettext. + */ +function _dcngettext($domain, $singular, $plural, $number, $category) { + $l10n = _get_reader($domain, $category); + return _encode($l10n->ngettext($singular, $plural, $number)); +} + +/** + * Context version of gettext. + */ +function _pgettext($context, $msgid) { + $l10n = _get_reader(); + return _encode($l10n->pgettext($context, $msgid)); +} + +/** + * Override the current domain in a context gettext call. + */ +function _dpgettext($domain, $context, $msgid) { + $l10n = _get_reader($domain); + return _encode($l10n->pgettext($context, $msgid)); +} + +/** + * Overrides the domain and category for a single context-based lookup. + */ +function _dcpgettext($domain, $context, $msgid, $category) { + $l10n = _get_reader($domain, $category); + return _encode($l10n->pgettext($context, $msgid)); +} + +/** + * Context version of ngettext. + */ +function _npgettext($context, $singular, $plural) { + $l10n = _get_reader(); + return _encode($l10n->npgettext($context, $singular, $plural)); +} + +/** + * Override the current domain in a context ngettext call. + */ +function _dnpgettext($domain, $context, $singular, $plural) { + $l10n = _get_reader($domain); + return _encode($l10n->npgettext($context, $singular, $plural)); +} + +/** + * Overrides the domain and category for a plural context-based lookup. + */ +function _dcnpgettext($domain, $context, $singular, $plural, $category) { + $l10n = _get_reader($domain, $category); + return _encode($l10n->npgettext($context, $singular, $plural)); +} + + + +// Wrappers to use if the standard gettext functions are available, +// but the current locale is not supported by the system. +// Use the standard impl if the current locale is supported, use the +// custom impl otherwise. + +function T_setlocale($category, $locale) { + return _setlocale($category, $locale); +} + +function T_bindtextdomain($domain, $path) { + if (_check_locale_and_function()) return bindtextdomain($domain, $path); + else return _bindtextdomain($domain, $path); +} +function T_bind_textdomain_codeset($domain, $codeset) { + // bind_textdomain_codeset is available only in PHP 4.2.0+ + if (_check_locale_and_function('bind_textdomain_codeset')) + return bind_textdomain_codeset($domain, $codeset); + else return _bind_textdomain_codeset($domain, $codeset); +} +function T_textdomain($domain) { + if (_check_locale_and_function()) return textdomain($domain); + else return _textdomain($domain); +} +function T_gettext($msgid) { + if (_check_locale_and_function()) return gettext($msgid); + else return _gettext($msgid); +} +function T_($msgid) { + if (_check_locale_and_function()) return _($msgid); + return __($msgid); +} +function T_ngettext($singular, $plural, $number) { + if (_check_locale_and_function()) + return ngettext($singular, $plural, $number); + else return _ngettext($singular, $plural, $number); +} +function T_dgettext($domain, $msgid) { + if (_check_locale_and_function()) return dgettext($domain, $msgid); + else return _dgettext($domain, $msgid); +} +function T_dngettext($domain, $singular, $plural, $number) { + if (_check_locale_and_function()) + return dngettext($domain, $singular, $plural, $number); + else return _dngettext($domain, $singular, $plural, $number); +} +function T_dcgettext($domain, $msgid, $category) { + if (_check_locale_and_function()) + return dcgettext($domain, $msgid, $category); + else return _dcgettext($domain, $msgid, $category); +} +function T_dcngettext($domain, $singular, $plural, $number, $category) { + if (_check_locale_and_function()) + return dcngettext($domain, $singular, $plural, $number, $category); + else return _dcngettext($domain, $singular, $plural, $number, $category); +} + +function T_pgettext($context, $msgid) { + if (_check_locale_and_function('pgettext')) + return pgettext($context, $msgid); + else + return _pgettext($context, $msgid); +} + +function T_dpgettext($domain, $context, $msgid) { + if (_check_locale_and_function('dpgettext')) + return dpgettext($domain, $context, $msgid); + else + return _dpgettext($domain, $context, $msgid); +} + +function T_dcpgettext($domain, $context, $msgid, $category) { + if (_check_locale_and_function('dcpgettext')) + return dcpgettext($domain, $context, $msgid, $category); + else + return _dcpgettext($domain, $context, $msgid, $category); +} + +function T_npgettext($context, $singular, $plural, $number) { + if (_check_locale_and_function('npgettext')) + return npgettext($context, $singular, $plural, $number); + else + return _npgettext($context, $singular, $plural, $number); +} + +function T_dnpgettext($domain, $context, $singular, $plural, $number) { + if (_check_locale_and_function('dnpgettext')) + return dnpgettext($domain, $context, $singular, $plural, $number); + else + return _dnpgettext($domain, $context, $singular, $plural, $number); +} + +function T_dcnpgettext($domain, $context, $singular, $plural, + $number, $category) { + if (_check_locale_and_function('dcnpgettext')) + return dcnpgettext($domain, $context, $singular, + $plural, $number, $category); + else + return _dcnpgettext($domain, $context, $singular, + $plural, $number, $category); +} + + + +// Wrappers used as a drop in replacement for the standard gettext functions + +if (!function_exists('gettext')) { + function bindtextdomain($domain, $path) { + return _bindtextdomain($domain, $path); + } + function bind_textdomain_codeset($domain, $codeset) { + return _bind_textdomain_codeset($domain, $codeset); + } + function textdomain($domain) { + return _textdomain($domain); + } + function gettext($msgid) { + return _gettext($msgid); + } + function _($msgid) { + return __($msgid); + } + function ngettext($singular, $plural, $number) { + return _ngettext($singular, $plural, $number); + } + function dgettext($domain, $msgid) { + return _dgettext($domain, $msgid); + } + function dngettext($domain, $singular, $plural, $number) { + return _dngettext($domain, $singular, $plural, $number); + } + function dcgettext($domain, $msgid, $category) { + return _dcgettext($domain, $msgid, $category); + } + function dcngettext($domain, $singular, $plural, $number, $category) { + return _dcngettext($domain, $singular, $plural, $number, $category); + } + function pgettext($context, $msgid) { + return _pgettext($context, $msgid); + } + function npgettext($context, $singular, $plural, $number) { + return _npgettext($context, $singular, $plural, $number); + } + function dpgettext($domain, $context, $msgid) { + return _dpgettext($domain, $context, $msgid); + } + function dnpgettext($domain, $context, $singular, $plural, $number) { + return _dnpgettext($domain, $context, $singular, $plural, $number); + } + function dcpgettext($domain, $context, $msgid, $category) { + return _dcpgettext($domain, $context, $msgid, $category); + } + function dcnpgettext($domain, $context, $singular, $plural, + $number, $category) { + return _dcnpgettext($domain, $context, $singular, $plural, + $number, $category); + } +} + +?> diff --git a/src/bb-library/php-gettext/gettext.php b/src/bb-library/php-gettext/gettext.php new file mode 100755 index 000000000..5064047cb --- /dev/null +++ b/src/bb-library/php-gettext/gettext.php @@ -0,0 +1,432 @@ +. + Copyright (c) 2005 Nico Kaiser + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + +/** + * Provides a simple gettext replacement that works independently from + * the system's gettext abilities. + * It can read MO files and use them for translating strings. + * The files are passed to gettext_reader as a Stream (see streams.php) + * + * This version has the ability to cache all strings and translations to + * speed up the string lookup. + * While the cache is enabled by default, it can be switched off with the + * second parameter in the constructor (e.g. whenusing very large MO files + * that you don't want to keep in memory) + */ +class gettext_reader { + //public: + var $error = 0; // public variable that holds error code (0 if no error) + + //private: + var $BYTEORDER = 0; // 0: low endian, 1: big endian + var $STREAM = NULL; + var $short_circuit = false; + var $enable_cache = false; + var $originals = NULL; // offset of original table + var $translations = NULL; // offset of translation table + var $pluralheader = NULL; // cache header field for plural forms + var $total = 0; // total string count + var $table_originals = NULL; // table for original strings (offsets) + var $table_translations = NULL; // table for translated strings (offsets) + var $cache_translations = NULL; // original -> translation mapping + + + /* Methods */ + + + /** + * Reads a 32bit Integer from the Stream + * + * @access private + * @return Integer from the Stream + */ + function readint() { + if ($this->BYTEORDER == 0) { + // low endian + $input=unpack('V', $this->STREAM->read(4)); + return array_shift($input); + } else { + // big endian + $input=unpack('N', $this->STREAM->read(4)); + return array_shift($input); + } + } + + function read($bytes) { + return $this->STREAM->read($bytes); + } + + /** + * Reads an array of Integers from the Stream + * + * @param int count How many elements should be read + * @return Array of Integers + */ + function readintarray($count) { + if ($this->BYTEORDER == 0) { + // low endian + return unpack('V'.$count, $this->STREAM->read(4 * $count)); + } else { + // big endian + return unpack('N'.$count, $this->STREAM->read(4 * $count)); + } + } + + /** + * Constructor + * + * @param object Reader the StreamReader object + * @param boolean enable_cache Enable or disable caching of strings (default on) + */ + function gettext_reader($Reader, $enable_cache = true) { + // If there isn't a StreamReader, turn on short circuit mode. + if (! $Reader || isset($Reader->error) ) { + $this->short_circuit = true; + return; + } + + // Caching can be turned off + $this->enable_cache = $enable_cache; + + $MAGIC1 = "\x95\x04\x12\xde"; + $MAGIC2 = "\xde\x12\x04\x95"; + + $this->STREAM = $Reader; + $magic = $this->read(4); + if ($magic == $MAGIC1) { + $this->BYTEORDER = 1; + } elseif ($magic == $MAGIC2) { + $this->BYTEORDER = 0; + } else { + $this->error = 1; // not MO file + return false; + } + + // FIXME: Do we care about revision? We should. + $revision = $this->readint(); + + $this->total = $this->readint(); + $this->originals = $this->readint(); + $this->translations = $this->readint(); + } + + /** + * Loads the translation tables from the MO file into the cache + * If caching is enabled, also loads all strings into a cache + * to speed up translation lookups + * + * @access private + */ + function load_tables() { + if (is_array($this->cache_translations) && + is_array($this->table_originals) && + is_array($this->table_translations)) + return; + + /* get original and translations tables */ + if (!is_array($this->table_originals)) { + $this->STREAM->seekto($this->originals); + $this->table_originals = $this->readintarray($this->total * 2); + } + if (!is_array($this->table_translations)) { + $this->STREAM->seekto($this->translations); + $this->table_translations = $this->readintarray($this->total * 2); + } + + if ($this->enable_cache) { + $this->cache_translations = array (); + /* read all strings in the cache */ + for ($i = 0; $i < $this->total; $i++) { + $this->STREAM->seekto($this->table_originals[$i * 2 + 2]); + $original = $this->STREAM->read($this->table_originals[$i * 2 + 1]); + $this->STREAM->seekto($this->table_translations[$i * 2 + 2]); + $translation = $this->STREAM->read($this->table_translations[$i * 2 + 1]); + $this->cache_translations[$original] = $translation; + } + } + } + + /** + * Returns a string from the "originals" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_original_string($num) { + $length = $this->table_originals[$num * 2 + 1]; + $offset = $this->table_originals[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Returns a string from the "translations" table + * + * @access private + * @param int num Offset number of original string + * @return string Requested string if found, otherwise '' + */ + function get_translation_string($num) { + $length = $this->table_translations[$num * 2 + 1]; + $offset = $this->table_translations[$num * 2 + 2]; + if (! $length) + return ''; + $this->STREAM->seekto($offset); + $data = $this->STREAM->read($length); + return (string)$data; + } + + /** + * Binary search for string + * + * @access private + * @param string string + * @param int start (internally used in recursive function) + * @param int end (internally used in recursive function) + * @return int string number (offset in originals table) + */ + function find_string($string, $start = -1, $end = -1) { + if (($start == -1) or ($end == -1)) { + // find_string is called with only one parameter, set start end end + $start = 0; + $end = $this->total; + } + if (abs($start - $end) <= 1) { + // We're done, now we either found the string, or it doesn't exist + $txt = $this->get_original_string($start); + if ($string == $txt) + return $start; + else + return -1; + } else if ($start > $end) { + // start > end -> turn around and start over + return $this->find_string($string, $end, $start); + } else { + // Divide table in two parts + $half = (int)(($start + $end) / 2); + $cmp = strcmp($string, $this->get_original_string($half)); + if ($cmp == 0) + // string is exactly in the middle => return it + return $half; + else if ($cmp < 0) + // The string is in the upper half + return $this->find_string($string, $start, $half); + else + // The string is in the lower half + return $this->find_string($string, $half, $end); + } + } + + /** + * Translates a string + * + * @access public + * @param string string to be translated + * @return string translated string (or original, if not found) + */ + function translate($string) { + if ($this->short_circuit) + return $string; + $this->load_tables(); + + if ($this->enable_cache) { + // Caching enabled, get translated string from cache + if (array_key_exists($string, $this->cache_translations)) + return $this->cache_translations[$string]; + else + return $string; + } else { + // Caching not enabled, try to find string + $num = $this->find_string($string); + if ($num == -1) + return $string; + else + return $this->get_translation_string($num); + } + } + + /** + * Sanitize plural form expression for use in PHP eval call. + * + * @access private + * @return string sanitized plural form expression + */ + function sanitize_plural_expression($expr) { + // Get rid of disallowed characters. + $expr = preg_replace('@[^a-zA-Z0-9_:;\(\)\?\|\&=!<>+*/\%-]@', '', $expr); + + // Add parenthesis for tertiary '?' operator. + $expr .= ';'; + $res = ''; + $p = 0; + for ($i = 0; $i < strlen($expr); $i++) { + $ch = $expr[$i]; + switch ($ch) { + case '?': + $res .= ' ? ('; + $p++; + break; + case ':': + $res .= ') : ('; + break; + case ';': + $res .= str_repeat( ')', $p) . ';'; + $p = 0; + break; + default: + $res .= $ch; + } + } + return $res; + } + + /** + * Parse full PO header and extract only plural forms line. + * + * @access private + * @return string verbatim plural form header field + */ + function extract_plural_forms_header_from_po_header($header) { + if (preg_match("/(^|\n)plural-forms: ([^\n]*)\n/i", $header, $regs)) + $expr = $regs[2]; + else + $expr = "nplurals=2; plural=n == 1 ? 0 : 1;"; + return $expr; + } + + /** + * Get possible plural forms from MO header + * + * @access private + * @return string plural form header + */ + function get_plural_forms() { + // lets assume message number 0 is header + // this is true, right? + $this->load_tables(); + + // cache header field for plural forms + if (! is_string($this->pluralheader)) { + if ($this->enable_cache) { + $header = $this->cache_translations[""]; + } else { + $header = $this->get_translation_string(0); + } + $expr = $this->extract_plural_forms_header_from_po_header($header); + $this->pluralheader = $this->sanitize_plural_expression($expr); + } + return $this->pluralheader; + } + + /** + * Detects which plural form to take + * + * @access private + * @param n count + * @return int array index of the right plural form + */ + function select_string($n) { + $string = $this->get_plural_forms(); + $string = str_replace('nplurals',"\$total",$string); + $string = str_replace("n",$n,$string); + $string = str_replace('plural',"\$plural",$string); + + $total = 0; + $plural = 0; + + eval("$string"); + if ($plural >= $total) $plural = $total - 1; + return $plural; + } + + /** + * Plural version of gettext + * + * @access public + * @param string single + * @param string plural + * @param string number + * @return translated plural form + */ + function ngettext($single, $plural, $number) { + if ($this->short_circuit) { + if ($number != 1) + return $plural; + else + return $single; + } + + // find out the appropriate form + $select = $this->select_string($number); + + // this should contains all strings separated by NULLs + $key = $single . chr(0) . $plural; + + + if ($this->enable_cache) { + if (! array_key_exists($key, $this->cache_translations)) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->cache_translations[$key]; + $list = explode(chr(0), $result); + return $list[$select]; + } + } else { + $num = $this->find_string($key); + if ($num == -1) { + return ($number != 1) ? $plural : $single; + } else { + $result = $this->get_translation_string($num); + $list = explode(chr(0), $result); + return $list[$select]; + } + } + } + + function pgettext($context, $msgid) { + $key = $context . chr(4) . $msgid; + $ret = $this->translate($key); + if (strpos($ret, "\004") !== FALSE) { + return $msgid; + } else { + return $ret; + } + } + + function npgettext($context, $singular, $plural, $number) { + $key = $context . chr(4) . $singular; + $ret = $this->ngettext($key, $plural, $number); + if (strpos($ret, "\004") !== FALSE) { + return $singular; + } else { + return $ret; + } + + } +} + +?> diff --git a/src/bb-library/php-gettext/streams.php b/src/bb-library/php-gettext/streams.php new file mode 100644 index 000000000..3cdc1584e --- /dev/null +++ b/src/bb-library/php-gettext/streams.php @@ -0,0 +1,167 @@ +. + + This file is part of PHP-gettext. + + PHP-gettext is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + PHP-gettext is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with PHP-gettext; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + +*/ + + + // Simple class to wrap file streams, string streams, etc. + // seek is essential, and it should be byte stream +class StreamReader { + // should return a string [FIXME: perhaps return array of bytes?] + function read($bytes) { + return false; + } + + // should return new position + function seekto($position) { + return false; + } + + // returns current position + function currentpos() { + return false; + } + + // returns length of entire stream (limit for seekto()s) + function length() { + return false; + } +}; + +class StringReader { + var $_pos; + var $_str; + + function StringReader($str='') { + $this->_str = $str; + $this->_pos = 0; + } + + function read($bytes) { + $data = substr($this->_str, $this->_pos, $bytes); + $this->_pos += $bytes; + if (strlen($this->_str)<$this->_pos) + $this->_pos = strlen($this->_str); + + return $data; + } + + function seekto($pos) { + $this->_pos = $pos; + if (strlen($this->_str)<$this->_pos) + $this->_pos = strlen($this->_str); + return $this->_pos; + } + + function currentpos() { + return $this->_pos; + } + + function length() { + return strlen($this->_str); + } + +}; + + +class FileReader { + var $_pos; + var $_fd; + var $_length; + + function FileReader($filename) { + if (file_exists($filename)) { + + $this->_length=filesize($filename); + $this->_pos = 0; + $this->_fd = fopen($filename,'rb'); + if (!$this->_fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + } else { + $this->error = 2; // File doesn't exist + return false; + } + } + + function read($bytes) { + if ($bytes) { + fseek($this->_fd, $this->_pos); + + // PHP 5.1.1 does not read more than 8192 bytes in one fread() + // the discussions at PHP Bugs suggest it's the intended behaviour + $data = ''; + while ($bytes > 0) { + $chunk = fread($this->_fd, $bytes); + $data .= $chunk; + $bytes -= strlen($chunk); + } + $this->_pos = ftell($this->_fd); + + return $data; + } else return ''; + } + + function seekto($pos) { + fseek($this->_fd, $pos); + $this->_pos = ftell($this->_fd); + return $this->_pos; + } + + function currentpos() { + return $this->_pos; + } + + function length() { + return $this->_length; + } + + function close() { + fclose($this->_fd); + } + +}; + +// Preloads entire file in memory first, then creates a StringReader +// over it (it assumes knowledge of StringReader internals) +class CachedFileReader extends StringReader { + function CachedFileReader($filename) { + if (file_exists($filename)) { + + $length=filesize($filename); + $fd = fopen($filename,'rb'); + + if (!$fd) { + $this->error = 3; // Cannot read file, probably permissions + return false; + } + $this->_str = fread($fd, $length); + fclose($fd); + + } else { + $this->error = 2; // File doesn't exist + return false; + } + } +}; + + +?> diff --git a/src/bb-load.php b/src/bb-load.php new file mode 100644 index 000000000..e6c1d0ed5 --- /dev/null +++ b/src/bb-load.php @@ -0,0 +1,185 @@ +getMessage() . PHP_EOL; + return ; + } + error_log($e->getMessage()); + + if(defined('BB_MODE_API')) { + $code = $e->getCode() ? $e->getCode() : 9998; + $result = array('result'=>NULL, 'error'=>array('message'=>$e->getMessage(), 'code'=>$code)); + print json_encode($result); + return false; + } + + $page = " + + + Error + + BoxBilling + "; + $page = str_replace(PHP_EOL, "", $page); + print $page; + if($e->getCode()) { + print sprintf('

Code: %s

', $e->getCode()); + } + print sprintf('

%s

', $e->getMessage()); + print sprintf('

Look for detailed error explanation

', urlencode($e->getMessage())); + + //if(defined('BB_DEBUG') && BB_DEBUG) { + print sprintf('%s', 'Set BB_DEBUG to FALSE, to hide the message below'); + print sprintf('

Class: "%s"

', get_class($e)); + print sprintf('

File: "%s"

', $e->getFile()); + print sprintf('

Line: "%s"

', $e->getLine()); + print sprintf('Trace:
%s
', $e->getTraceAsString()); + //} +} + +set_exception_handler("handler_exception"); +set_error_handler('handler_error'); + +// multisite support. Load new config depending on current host +// if run from cli first param must be hostname +$configPath = BB_PATH_ROOT.'/bb-config.php'; +if((isset($_SERVER['HTTP_HOST']) && $_SERVER['HTTP_HOST']) || (php_sapi_name() == 'cli' && isset($argv[1]) ) ) { + if(php_sapi_name() == 'cli') { + $host = $argv[1]; + } else { + $host = $_SERVER['HTTP_HOST']; + } + + $predictConfigPath = BB_PATH_ROOT.'/bb-config-'.$host.'.php'; + if(file_exists($predictConfigPath)) { + $configPath = $predictConfigPath; + } +} + +// check if config is available +if(!file_exists($configPath) || 0 == filesize( $configPath )) { + + //try create empty config file + @file_put_contents($configPath, ''); + + $base_url = "http://".$_SERVER['HTTP_HOST']; + $base_url .= preg_replace('@/+$@','',dirname($_SERVER['SCRIPT_NAME'])).'/'; + $url = $base_url . 'install/index.php'; + $configFile = pathinfo($configPath, PATHINFO_BASENAME); + $msg = sprintf("There doesn't seem to be a $configFile file or bb-config.php file does not contain required configuration parameters. I need this before we can get started. Need more help? We got it. You can create a $configFile file through a web interface, but this doesn't work for all server setups. The safest way is to manually create the file.

Continue with BoxBilling installation", $url); + throw new Exception($msg, 101); +} + +$config = require_once $configPath; +require BB_PATH_VENDOR . '/autoload.php'; + +define('BB_DEBUG', $config['debug']); +define('BB_URL', $config['url']); +define('BB_SEF_URLS', $config['sef_urls']); +define('BB_PATH_CACHE', $config['path_data'] . '/cache'); +define('BB_PATH_LOG', $config['path_data'] . '/log'); +define('BB_SSL', (substr($config['url'], 0, 5) === 'https')); + +if($config['sef_urls']) { + define('BB_URL_API', $config['url'] . 'api/'); +} else { + define('BB_URL_API', $config['url'] . 'index.php/api/'); +} + +if($config['debug']) { + error_reporting( E_ALL ); + ini_set('display_errors', '1'); + ini_set('display_startup_errors', '1'); +} else { + error_reporting( E_RECOVERABLE_ERROR ); + ini_set('display_errors', '0'); + ini_set('display_startup_errors', '0'); +} + +ini_set('log_errors', '1'); +ini_set('html_errors', FALSE); +ini_set('error_log', BB_PATH_LOG . '/php_error.log'); + +$lang = (isset($_COOKIE) && isset($_COOKIE['BBLANG']) && !empty($_COOKIE['BBLANG'])) ? $_COOKIE['BBLANG'] : $config['locale']; +$domain = 'messages'; +$codeset = "UTF-8"; +if(!function_exists('gettext')) { + require_once BB_PATH_LIBRARY . '/php-gettext/gettext.inc'; + T_setlocale(LC_MESSAGES, $lang.'.'.$codeset); + T_setlocale(LC_TIME, $lang.'.'.$codeset); + T_bindtextdomain($domain, BB_PATH_LANGS); + T_bind_textdomain_codeset($domain, $codeset); + T_textdomain($domain); +} else { + @putenv('LANG='.$lang.'.'.$codeset); + @putenv('LANGUAGE='.$lang.'.'.$codeset); + // set locale + if (!defined('LC_MESSAGES')) define('LC_MESSAGES', 5); + if (!defined('LC_TIME')) define('LC_TIME', 2); + setlocale(LC_MESSAGES, $lang.'.'.$codeset); + setlocale(LC_TIME, $lang.'.'.$codeset); + bindtextdomain($domain, BB_PATH_LANGS); + if(function_exists('bind_textdomain_codeset')) bind_textdomain_codeset($domain, $codeset); + textdomain($domain); + + function __($msgid, array $values = NULL) + { + if(empty($msgid)) return null; + $string = gettext($msgid); + return empty($values) ? $string : strtr($string, $values); + } +} + +// Strip magic quotes from request data. +if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) { + // Create lamba style unescaping function (for portability) + $quotes_sybase = strtolower(ini_get('magic_quotes_sybase')); + $unescape_function = (empty($quotes_sybase) || $quotes_sybase === 'off') ? 'stripslashes($value)' : 'str_replace("\'\'","\'",$value)'; + $stripslashes_deep = create_function('&$value, $fn', ' + if (is_string($value)) { + $value = ' . $unescape_function . '; + } else if (is_array($value)) { + foreach ($value as &$v) $fn($v, $fn); + } + '); + + // Unescape data + $stripslashes_deep($_POST, $stripslashes_deep); + $stripslashes_deep($_GET, $stripslashes_deep); + $stripslashes_deep($_COOKIE, $stripslashes_deep); + $stripslashes_deep($_REQUEST, $stripslashes_deep); +} diff --git a/src/bb-locale/admin.pot b/src/bb-locale/admin.pot new file mode 100644 index 000000000..c333b7e6d --- /dev/null +++ b/src/bb-locale/admin.pot @@ -0,0 +1,3260 @@ +msgid "Home" +msgstr "" + +msgid "Products" +msgstr "" + +msgid "Product promotions" +msgstr "" + +msgid "Manage coupon code" +msgstr "" + +msgid "Code" +msgstr "" + +msgid "Discount type" +msgstr "" + +msgid "Recurring" +msgstr "" + +msgid "Active" +msgstr "" + +msgid "Free setup" +msgstr "" + +msgid "Promo code limitations" +msgstr "" + +msgid "Once per client" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "Max uses (zero for unlimited)" +msgstr "" + +msgid "Used" +msgstr "" + +msgid "Period when code is valid" +msgstr "" + +msgid "Periods (Select none to apply to all periods)" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "System activity" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Ip" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "Are you sure?" +msgstr "" + +msgid "The list is empty" +msgstr "" + +msgid "Promo" +msgstr "" + +msgid "New promo" +msgstr "" + +msgid "Discount" +msgstr "" + +msgid "Applies to" +msgstr "" + +msgid "Valid period" +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "Usage" +msgstr "" + +msgid "Create new coupon code" +msgstr "" + +msgid "Create special offers for your clients by creating coupon codes." +msgstr "" + +msgid "Absolute" +msgstr "" + +msgid "Percentage" +msgstr "" + +msgid "Valid time (Leave blank for undefined time)" +msgstr "" + +msgid "Products (Select none to apply to all products)" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "Details" +msgstr "" + +msgid "Manage" +msgstr "" + +msgid "Forum" +msgstr "" + +msgid "Title" +msgstr "" + +msgid "Started by" +msgstr "" + +msgid "Views" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Sticky" +msgstr "" + +msgid "Created at" +msgstr "" + +msgid "Updated at" +msgstr "" + +msgid "Slug" +msgstr "" + +msgid "Reply" +msgstr "" + +msgid "Quote" +msgstr "" + +msgid "Post" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "IP" +msgstr "" + +msgid "Email history" +msgstr "" + +msgid "To" +msgstr "" + +msgid "From" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "Categories" +msgstr "" + +msgid "Category updated" +msgstr "" + +msgid "Icon" +msgstr "" + +msgid "Browse" +msgstr "" + +msgid "Select icon and click OK" +msgstr "" + +msgid "Hosting settings" +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Hosting plan" +msgstr "" + +msgid "Reseller hosting" +msgstr "" + +msgid "Free domain registration" +msgstr "" + +msgid "Free domain transfer" +msgstr "" + +msgid "Hosting plans" +msgstr "" + +msgid "Servers" +msgstr "" + +msgid "Redirects" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "The list is empty." +msgstr "" + +msgid "Create new redirect" +msgstr "" + +msgid "Add" +msgstr "" + +msgid "Hosting plans and servers" +msgstr "" + +msgid "New server" +msgstr "" + +msgid "New hosting plan" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Server manager" +msgstr "" + +msgid "Addon domains" +msgstr "" + +msgid "Disk space" +msgstr "" + +msgid "Bandwidth" +msgstr "" + +msgid "Unique name to identify this server" +msgstr "" + +msgid "Hostname" +msgstr "" + +msgid "server1.yourserverdomain.com" +msgstr "" + +msgid "" +"Primary IP address of the server used to connect to it like: 123.123.123.123" +msgstr "" + +msgid "Assigned IP Addresses" +msgstr "" + +msgid "List the IP Addresses assigned to the server (One per line)" +msgstr "" + +msgid "Enable/Disable" +msgstr "" + +msgid "Nameserver 1" +msgstr "" + +msgid "ns1.yourdomain.com" +msgstr "" + +msgid "Nameserver 2" +msgstr "" + +msgid "ns2.yourdomain.com" +msgstr "" + +msgid "Nameserver 3" +msgstr "" + +msgid "ns3.yourdomain.com" +msgstr "" + +msgid "Nameserver 4" +msgstr "" + +msgid "ns4.yourdomain.com" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Login username to your server: root/reseller" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Login password to your server" +msgstr "" + +msgid "Access Hash (Insted of password for cPanel servers)" +msgstr "" + +msgid "Use Secure connection" +msgstr "" + +msgid "Add server" +msgstr "" + +msgid "Adding new hosting plan" +msgstr "" + +msgid "" +"Depending on server manager used to setup hosting account you may require " +"provide additional parameters in next step. In this step provide basic " +"hosting plan information." +msgstr "" + +msgid "Unique name to identify this hosting plan" +msgstr "" + +msgid "Disk quota (MB)" +msgstr "" + +msgid "Bandwidth (MB)" +msgstr "" + +msgid "Create hosting plan" +msgstr "" + +msgid "File" +msgstr "" + +msgid "Currently uploaded file" +msgstr "" + +msgid "Upload new file" +msgstr "" + +msgid "Upload" +msgstr "" + +msgid "Client area languages" +msgstr "" + +msgid "New language" +msgstr "" + +msgid "Language" +msgstr "" + +msgid "BoxBilling in your language" +msgstr "" + +msgid "" +"Although BoxBilling displays in U.S. English by default, the software has " +"the built-in capability to be used in any language. Follow instructions " +"bellow to install new language." +msgstr "" + +msgid "Check if your language translation file is available at" +msgstr "" + +msgid "BoxBilling extensions site" +msgstr "" + +msgid "Download language files and place them to" +msgstr "" + +msgid "" +"Language will be automatically available and can be changed in client area" +msgstr "" + +msgid "Read" +msgstr "" + +msgid "Installing BoxBilling in Your Language" +msgstr "" + +msgid "" +"to learn how to install files that will transform BoxBilling so it displays " +"in your language." +msgstr "" + +msgid "Translations can be made with" +msgstr "" + +msgid "software" +msgstr "" + +msgid "Changing default language" +msgstr "" + +msgid "Default language can be set in" +msgstr "" + +msgid "Removing language" +msgstr "" + +msgid "" +"Removing languages from BoxBilling is really simple. Just delete language " +"folder you wish from" +msgstr "" + +msgid "SEO settings" +msgstr "" + +msgid "Configuration updated" +msgstr "" + +msgid "Ping sitemap to Google" +msgstr "" + +msgid "Ping sitemap to Yahoo" +msgstr "" + +msgid "Ping sitemap to Bing" +msgstr "" + +msgid "Domain type" +msgstr "" + +msgid "Host subdomain" +msgstr "" + +msgid "subdomain" +msgstr "" + +msgid "Host domain" +msgstr "" + +msgid "domain.com" +msgstr "" + +msgid "Information" +msgstr "" + +msgid "Mass Mail Messages" +msgstr "" + +msgid "Create new mass mail message" +msgstr "" + +msgid "Mass Mail Settings" +msgstr "" + +msgid "Client ID to send test email while creating message" +msgstr "" + +msgid "Staff Group management" +msgstr "" + +msgid "Staff" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "Manage staff member details" +msgstr "" + +msgid "Staff group updated" +msgstr "" + +msgid "License details" +msgstr "" + +msgid "Key" +msgstr "" + +msgid "Plugin" +msgstr "" + +msgid "Last ping" +msgstr "" + +msgid "Validate IP" +msgstr "" + +msgid "Valid IPs (one per line)" +msgstr "" + +msgid "Validate host" +msgstr "" + +msgid "Valid hosts (one per line)" +msgstr "" + +msgid "Validate path" +msgstr "" + +msgid "Valid paths (one per line)" +msgstr "" + +msgid "Validate version" +msgstr "" + +msgid "Valid versions (one per line)" +msgstr "" + +msgid "Quantity" +msgstr "" + +msgid "Client settings" +msgstr "" + +msgid "General" +msgstr "" + +msgid "Allow new signups" +msgstr "" + +msgid "Require email confirmation" +msgstr "" + +msgid "Allow email change" +msgstr "" + +msgid "Required fields" +msgstr "" + +msgid "Select required fields" +msgstr "" + +msgid "Last Name" +msgstr "" + +msgid "Company" +msgstr "" + +msgid "Gender" +msgstr "" + +msgid "Birthday" +msgstr "" + +msgid "City" +msgstr "" + +msgid "State" +msgstr "" + +msgid "Address Line 1" +msgstr "" + +msgid "Address Line 2" +msgstr "" + +msgid "Post code" +msgstr "" + +msgid "Phone" +msgstr "" + +msgid "Themes" +msgstr "" + +msgid "Settings for" +msgstr "" + +msgid "IMPORTANT" +msgstr "" + +msgid "INFORMATION" +msgstr "" + +msgid "" +"Switch to a predefined set of theme settings from the dropdown. Adjust each " +"section and apply the changes once you're done." +msgstr "" + +msgid "delete this preset" +msgstr "" + +msgid "Save current settings as a new preset called" +msgstr "" + +msgid "Apply changes" +msgstr "" + +msgid "Payment gateways" +msgstr "" + +msgid "New payment gateway" +msgstr "" + +msgid "Allow one time payments" +msgstr "" + +msgid "Allow subscriptions" +msgstr "" + +msgid "Adding new payment gateway" +msgstr "" + +msgid "" +"Although BoxBilling ships with most popular payment gateways, you can " +"install other gateways." +msgstr "" + +msgid "Follow these instructions to install new payment gateway." +msgstr "" + +msgid "Check for payment gateway at" +msgstr "" + +msgid "for more payment gateways" +msgstr "" + +msgid "Download payment gateway extension file and place it to" +msgstr "" + +msgid "After file is uploaded in place, reload this page." +msgstr "" + +msgid "Select uploaded file name and click on install." +msgstr "" + +msgid "" +"Payment gateway will be installed in BoxBilling and can be configured in " +"\"Payment gateways\" tab." +msgstr "" + +msgid "For developers. Read" +msgstr "" + +msgid "" +"to learn how to create your own payment gateway and share it with community" +msgstr "" + +msgid "Install" +msgstr "" + +msgid "All payment gateways installed" +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Create main administrator account" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Enter your email address" +msgstr "" + +msgid "Enter your password" +msgstr "" + +msgid "Create administrator account" +msgstr "" + +msgid "Remember me" +msgstr "" + +msgid "Log me in" +msgstr "" + +msgid "License" +msgstr "" + +msgid "Module settings" +msgstr "" + +msgid "" +"After purchase you have received an e-mail with license key. Update license " +"key to unlock all features of BoxBilling" +msgstr "" + +msgid "" +"To change license key, change BB_LICENSE value in bb-config." +"php file" +msgstr "" + +msgid "Edit bb-config.php file" +msgstr "" + +msgid "Licensed to" +msgstr "" + +msgid "Expires at" +msgstr "" + +msgid "Domain" +msgstr "" + +msgid "Server Name" +msgstr "" + +msgid "Server IP" +msgstr "" + +msgid "Account IP" +msgstr "" + +msgid "per month" +msgstr "" + +msgid "Disk quota" +msgstr "" + +msgid "Jump to cPanel" +msgstr "" + +msgid "Reseller control panel" +msgstr "" + +msgid "Change hosting plan" +msgstr "" + +msgid "Hosting plan changed" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "Change account password" +msgstr "" + +msgid "Account password changed" +msgstr "" + +msgid "Password Confirm" +msgstr "" + +msgid "Change IP" +msgstr "" + +msgid "Account IP changed" +msgstr "" + +msgid "Change username" +msgstr "" + +msgid "Account username changed" +msgstr "" + +msgid "Change domain" +msgstr "" + +msgid "Account domain changed" +msgstr "" + +msgid "Template" +msgstr "" + +msgid "Variables" +msgstr "" + +msgid "Template Settings" +msgstr "" + +msgid "Reset template" +msgstr "" + +msgid "Examples" +msgstr "" + +msgid "Manage email template" +msgstr "" + +msgid "" +"Most email templates receives parameters from BoxBilling. You can browse " +"them on \"Variables\" tab. Copy variable name to email template and hit " +"preview to see parsed content. Please note that values will be different " +"when actual email is sent." +msgstr "" + +msgid "Template updated" +msgstr "" + +msgid "Preview" +msgstr "" + +msgid "Preview mode is disabled until first event occurrence" +msgstr "" + +msgid "Template settings" +msgstr "" + +msgid "Enable or disable this email template." +msgstr "" + +msgid "Category" +msgstr "" + +msgid "List of variables used in this email" +msgstr "" + +msgid "" +"These values will change when real email is sent. You can pass these " +"variables to admin or guest API to get additional information from database." +msgstr "" + +msgid "Variable" +msgstr "" + +msgid "Example value" +msgstr "" + +msgid "This template does not receive any parameters" +msgstr "" + +msgid "Reset email template to default" +msgstr "" + +msgid "Reset to default" +msgstr "" + +msgid "Email templates examples" +msgstr "" + +msgid "" +"Email template playground. Use this tool to try rendering email templates." +msgstr "" + +msgid "Invoice settings" +msgstr "" + +msgid "Number of days to generate new invoice before order expiration" +msgstr "" + +msgid "Invoice due days" +msgstr "" + +msgid "Auto invoice approval" +msgstr "" + +msgid "Proforma Invoicing / Sequential Invoice Numbering" +msgstr "" + +msgid "Proforma invoice prefix/series" +msgstr "" + +msgid "Paid invoice prefix/series" +msgstr "" + +msgid "Next paid invoice number" +msgstr "" + +msgid "Refunds settings" +msgstr "" + +msgid "Refunds logic" +msgstr "" + +msgid "Add funds settings" +msgstr "" + +msgid "Minimum amount for add funds invoice" +msgstr "" + +msgid "Unlimited" +msgstr "" + +msgid "Maximum amount for add funds invoice" +msgstr "" + +msgid "Update settings" +msgstr "" + +msgid "New staff member" +msgstr "" + +msgid "Manage groups" +msgstr "" + +msgid "New group" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "Check login IP" +msgstr "" + +msgid "Allowed IPs. One per line" +msgstr "" + +msgid "Signature" +msgstr "" + +msgid "Inactive" +msgstr "" + +msgid "Create group" +msgstr "" + +msgid "Domain action" +msgstr "" + +msgid "Register domain" +msgstr "" + +msgid "Domain name to register" +msgstr "" + +msgid "Years" +msgstr "" + +msgid "Transfer domain" +msgstr "" + +msgid "Domain name to transfer" +msgstr "" + +msgid "Domain transfer code" +msgstr "" + +msgid "Centova Cast product settings" +msgstr "" + +msgid "Max clients" +msgstr "" + +msgid "Max bitrate" +msgstr "" + +msgid "Transfer limit" +msgstr "" + +msgid "Autostart" +msgstr "" + +msgid "SolusVM configuration" +msgstr "" + +msgid "Virtualization type" +msgstr "" + +msgid "Node" +msgstr "" + +msgid "" +"Make sure BoxBilling can connect to SolusVM master server and check if nodes " +"are configured for selected virtualizator type. Refresh page if you have " +"changed virtualization type to see new nodes." +msgstr "" + +msgid "Plan" +msgstr "" + +msgid "" +"Make sure BoxBilling can connect to SolusVM master server and check if plans " +"are configured for selected virtualizator type." +msgstr "" + +msgid "Plan parameters" +msgstr "" + +msgid "IPs amount" +msgstr "" + +msgid "Guaranteed RAM" +msgstr "" + +msgid "Hdd Space" +msgstr "" + +msgid "CPU cores" +msgstr "" + +msgid "Custom extraip" +msgstr "" + +msgid "HVMT" +msgstr "" + +msgid "Issue cPanel License" +msgstr "" + +msgid "Dedicated CPU" +msgstr "" + +msgid "Dedicated RAM" +msgstr "" + +msgid "Network transfer" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Invoices" +msgstr "" + +msgid "Filter invoices" +msgstr "" + +msgid "Nr" +msgstr "" + +msgid "Currency" +msgstr "" + +msgid "All statuses" +msgstr "" + +msgid "Paid" +msgstr "" + +msgid "Unpaid" +msgstr "" + +msgid "Refunded" +msgstr "" + +msgid "Issue date" +msgstr "" + +msgid "Filter" +msgstr "" + +msgid "Unpaid invoices" +msgstr "" + +msgid "Refunded invoices" +msgstr "" + +msgid "Paid invoices" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "New Invoice" +msgstr "" + +msgid "Invoice" +msgstr "" + +msgid "Amount" +msgstr "" + +msgid "Issued at" +msgstr "" + +msgid "Paid at" +msgstr "" + +msgid "Client" +msgstr "" + +msgid "Start typing clients name, email or ID" +msgstr "" + +msgid "Prepare" +msgstr "" + +msgid "Centova Cast order details" +msgstr "" + +msgid "Changing settings does not send actions to CentovaCast server." +msgstr "" + +msgid "Reconfigure" +msgstr "" + +msgid "Changing CentovaCast server settings." +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Source password" +msgstr "" + +msgid "Max BitRate" +msgstr "" + +msgid "Organization" +msgstr "" + +msgid "URL" +msgstr "" + +msgid "Auto rebuild list" +msgstr "" + +msgid "Account details" +msgstr "" + +msgid "Parameter" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "Payment type" +msgstr "" + +msgid "Setup price" +msgstr "" + +msgid "Price" +msgstr "" + +msgid "One time" +msgstr "" + +msgid "Price for period" +msgstr "" + +msgid "First payment sum" +msgstr "" + +msgid "On" +msgstr "" + +msgid "Weekly" +msgstr "" + +msgid "Monthly" +msgstr "" + +msgid "Every 3 months" +msgstr "" + +msgid "Every 6 months" +msgstr "" + +msgid "Every year" +msgstr "" + +msgid "Every 2 years" +msgstr "" + +msgid "Every 3 years" +msgstr "" + +msgid "Profile" +msgstr "" + +msgid "" +"This staff member is used by BoxBilling to perform system tasks and can not " +"be removed." +msgstr "" + +msgid "Permissions" +msgstr "" + +msgid "API" +msgstr "" + +msgid "%member_name% permissions" +msgstr "" + +msgid "Administrator account is allowed to do everything" +msgstr "" + +msgid "Permissions updated" +msgstr "" + +msgid "Module" +msgstr "" + +msgid "Save" +msgstr "" + +msgid "Change staff member password" +msgstr "" + +msgid "Staff member password changed" +msgstr "" + +msgid "Repeat same password" +msgstr "" + +msgid "Submit" +msgstr "" + +msgid "Api key is used to manage system via other interfaces." +msgstr "" + +msgid "API key" +msgstr "" + +msgid "Generate new key" +msgstr "" + +msgid "Number" +msgstr "" + +msgid "Due at" +msgstr "" + +msgid "Reminded at" +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "Approved" +msgstr "" + +msgid "Serie and number" +msgstr "" + +msgid "Tax" +msgstr "" + +msgid "Payment method" +msgstr "" + +msgid "Text before invoice items table" +msgstr "" + +msgid "Text after invoice items table" +msgstr "" + +msgid "Company VAT" +msgstr "" + +msgid "Company Number" +msgstr "" + +msgid "Address" +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Last name" +msgstr "" + +msgid "Zip" +msgstr "" + +msgid "Invoice items" +msgstr "" + +msgid "Transactions" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Gateway" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Print" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Support settings" +msgstr "" + +msgid "Help desks" +msgstr "" + +msgid "New help desk" +msgstr "" + +msgid "Auto responder settings" +msgstr "" + +msgid "Enable auto responder" +msgstr "" + +msgid "Auto respond message" +msgstr "" + +msgid "" +"Delay message - selected canned response message will be added to default " +"reply message" +msgstr "" + +msgid "Enable delay message" +msgstr "" + +msgid "Delay hours" +msgstr "" + +msgid "Delay reply" +msgstr "" + +msgid "Close tickets after" +msgstr "" + +msgid "Close after" +msgstr "" + +msgid "Can reopen" +msgstr "" + +msgid "Forum settings" +msgstr "" + +msgid "Forum points" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "Give points for posting in selected forums" +msgstr "" + +msgid "Domains management" +msgstr "" + +msgid "Support" +msgstr "" + +msgid "Canned responses" +msgstr "" + +msgid "Canned category" +msgstr "" + +msgid "Knowledge Base" +msgstr "" + +msgid "Articles" +msgstr "" + +msgid "New article" +msgstr "" + +msgid "New category" +msgstr "" + +msgid "Manage categories" +msgstr "" + +msgid "Draft" +msgstr "" + +msgid "Content" +msgstr "" + +msgid "Category created" +msgstr "" + +msgid "Top level domains" +msgstr "" + +msgid "New top level domain" +msgstr "" + +msgid "Registrars" +msgstr "" + +msgid "New domain registrar" +msgstr "" + +msgid "Nameservers" +msgstr "" + +msgid "Manage TLDs" +msgstr "" + +msgid "" +"Setup domain pricing and allowed operations. Assign specific domain " +"registrars for each Top Level Domain (TLD)" +msgstr "" + +msgid "TLD" +msgstr "" + +msgid "Registration" +msgstr "" + +msgid "Renew" +msgstr "" + +msgid "Transfer" +msgstr "" + +msgid "Operations" +msgstr "" + +msgid "Registrar" +msgstr "" + +msgid "Allow register:" +msgstr "" + +msgid "Allow transfer:" +msgstr "" + +msgid "Active:" +msgstr "" + +msgid "Add new top level domain" +msgstr "" + +msgid "Setup new TLD prices and properties" +msgstr "" + +msgid "Tld" +msgstr "" + +msgid "Registration price" +msgstr "" + +msgid "Renewal price" +msgstr "" + +msgid "Transfer price" +msgstr "" + +msgid "Minimum years of registration" +msgstr "" + +msgid "Allow registration" +msgstr "" + +msgid "Allow transfer" +msgstr "" + +msgid "Domain registrars" +msgstr "" + +msgid "Manage domain registrars" +msgstr "" + +msgid "" +"Setup default nameservers that will be used for new domain registrations if " +"client have not provided his own nameservers in order form" +msgstr "" + +msgid "Update nameservers" +msgstr "" + +msgid "Adding new domain registrar" +msgstr "" + +msgid "Follow instrunctions bellow to install new domain registrar." +msgstr "" + +msgid "Check domain registrar you are looking for is available at" +msgstr "" + +msgid "Download domain registrar file and place to" +msgstr "" + +msgid "Reload this page to see newly detected domain registrar" +msgstr "" + +msgid "" +"Click on install button. Now you will be able to create top level domains " +"with new domain registrar" +msgstr "" + +msgid "BoxBilling documentation" +msgstr "" + +msgid "to learn how to create your own domain registrar." +msgstr "" + +msgid "News and announcements" +msgstr "" + +msgid "New announcement" +msgstr "" + +msgid "Orders" +msgstr "" + +msgid "Filter orders" +msgstr "" + +msgid "Product" +msgstr "" + +msgid "Period" +msgstr "" + +msgid "Invoice option" +msgstr "" + +msgid "Creation date" +msgstr "" + +msgid "Pending setup" +msgstr "" + +msgid "Supended" +msgstr "" + +msgid "New order" +msgstr "" + +msgid "Continue" +msgstr "" + +msgid "Hi," +msgstr "" + +msgid "Loading ..." +msgstr "" + +msgid "New" +msgstr "" + +msgid "All settings" +msgstr "" + +msgid "Theme settings" +msgstr "" + +msgid "Help" +msgstr "" + +msgid "Visit site" +msgstr "" + +msgid "Logout" +msgstr "" + +msgid "Notifications" +msgstr "" + +msgid "Inquiries" +msgstr "" + +msgid "Tickets" +msgstr "" + +msgid "Clients" +msgstr "" + +msgid "Dashboard" +msgstr "" + +msgid "Clients logins history" +msgstr "" + +msgid "Search:" +msgstr "" + +msgid "Enter search text.." +msgstr "" + +msgid "Import existing" +msgstr "" + +msgid "Domain name" +msgstr "" + +msgid "Domain TLD" +msgstr "" + +msgid "Create new order" +msgstr "" + +msgid "for" +msgstr "" + +msgid "Activate order" +msgstr "" + +msgid "Place new order" +msgstr "" + +msgid "SolusVM" +msgstr "" + +msgid "API configuration" +msgstr "" + +msgid "Getting started with SolusVM" +msgstr "" + +msgid "" +"This guide will help you to get started selling SolusVM virtual servers with " +"BoxBilling." +msgstr "" + +msgid "1. Configure your SolusVm server" +msgstr "" + +msgid "2. Configure API" +msgstr "" + +msgid "3. Create new product category" +msgstr "" + +msgid "4. Create SolusVM products" +msgstr "" + +msgid "5. Import data from SolusVM server" +msgstr "" + +msgid "Connect to SolusVM master server via API" +msgstr "" + +msgid "" +"To create an API user login to SolusVM admin area and click Configuration > " +"API Access from the top menu then select Add API User." +msgstr "" + +msgid "Master server IP" +msgstr "" + +msgid "Secure connection" +msgstr "" + +msgid "Custom port" +msgstr "" + +msgid "Leave blank to use default port 5353 and 5656 for secure connection" +msgstr "" + +msgid "Test connection" +msgstr "" + +msgid "Error" +msgstr "" + +msgid "Something went wrong here" +msgstr "" + +msgid "Back to Dashboard" +msgstr "" + +msgid "Membership details" +msgstr "" + +msgid "Filter clients" +msgstr "" + +msgid "Company name" +msgstr "" + +msgid "All" +msgstr "" + +msgid "Suspended" +msgstr "" + +msgid "Canceled" +msgstr "" + +msgid "Registration date" +msgstr "" + +msgid "New client" +msgstr "" + +msgid "Postcode" +msgstr "" + +msgid "Helpdesk -" +msgstr "" + +msgid "Support help desk" +msgstr "" + +msgid "" +"Help desk name will be visible for clients when submitting new ticket. " +"Define very large number of hours to disable auto close ticket option" +msgstr "" + +msgid "Product configuration" +msgstr "" + +msgid "General settings" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Addons" +msgstr "" + +msgid "Upgrades" +msgstr "" + +msgid "Links" +msgstr "" + +msgid "Hidden" +msgstr "" + +msgid "Activation" +msgstr "" + +msgid "Icon/Image URL" +msgstr "" + +msgid "Product / service description" +msgstr "" + +msgid "Choose which addons you would like to offer with" +msgstr "" + +msgid "Choose which products can client upgrade to" +msgstr "" + +msgid "Product Upgrades" +msgstr "" + +msgid "No additional configuration for this product is required" +msgstr "" + +msgid "Product links" +msgstr "" + +msgid "Product ID" +msgstr "" + +msgid "Order page with ID" +msgstr "" + +msgid "Order page with slug" +msgstr "" + +msgid "Order management" +msgstr "" + +msgid "Edit order" +msgstr "" + +msgid "Service management" +msgstr "" + +msgid "History" +msgstr "" + +msgid "Order" +msgstr "" + +msgid "Payment amount" +msgstr "" + +msgid "Order status" +msgstr "" + +msgid "Order created" +msgstr "" + +msgid "Activated" +msgstr "" + +msgid "Renewal date" +msgstr "" + +msgid "Order notes" +msgstr "" + +msgid "Order group ID" +msgstr "" + +msgid "Order promo code" +msgstr "" + +msgid "Active support tickets" +msgstr "" + +msgid "Reason of suspendation" +msgstr "" + +msgid "Suspendation reason" +msgstr "" + +msgid "Reason of cancelation" +msgstr "" + +msgid "Cancelation reason" +msgstr "" + +msgid "Changes status without performing action" +msgstr "" + +msgid "Activated at" +msgstr "" + +msgid "Addons you have ordered with this service" +msgstr "" + +msgid "Product/Service" +msgstr "" + +msgid "Billing Cycle" +msgstr "" + +msgid "Next due date" +msgstr "" + +msgid "Order invoices" +msgstr "" + +msgid "Order status change history" +msgstr "" + +msgid "Note" +msgstr "" + +msgid "Support tickets regarding this order" +msgstr "" + +msgid "Help desk" +msgstr "" + +msgid "News" +msgstr "" + +msgid "Post updated" +msgstr "" + +msgid "Image" +msgstr "" + +msgid "http://www.yourdomain.com/image.jpg" +msgstr "" + +msgid "Post created" +msgstr "" + +msgid "Last update" +msgstr "" + +msgid "Go back" +msgstr "" + +msgid "System settings" +msgstr "" + +msgid "Company details" +msgstr "" + +msgid "FTP layer" +msgstr "" + +msgid "Countries" +msgstr "" + +msgid "Cache" +msgstr "" + +msgid "Logo URL" +msgstr "" + +msgid "Company number, chamber of commerce number" +msgstr "" + +msgid "VAT number" +msgstr "" + +msgid "Bank Account number" +msgstr "" + +msgid "Company terms of service, legal regulation" +msgstr "" + +msgid "Company privacy policy" +msgstr "" + +msgid "Countries updated" +msgstr "" + +msgid "List of countries" +msgstr "" + +msgid "Cache folder cleared" +msgstr "" + +msgid "Invalidate cache" +msgstr "" + +msgid "FTP layer for BoxBilling" +msgstr "" + +msgid "FTP is used to manage BoxBilling modules and updates." +msgstr "" + +msgid "FTP settings updated" +msgstr "" + +msgid "" +"FTP Hostname - can be a numerical URL 127.0.0.1 is the " +"default address for a locally hosted server, it might be this, it might be " +"the full URL as my example above with the File Transfer Protocol (FTP) " +"prefix, it might be the http:// protocol it might be SFTP (secure FTP) even " +"secure http (https). Your host will be able to advise you on the correct " +"format." +msgstr "" + +msgid "" +"FTP port - is nearly always 21 unless the host has changed " +"this they will have notified you of this. Secure FTP generally uses port 22." +msgstr "" + +msgid "" +"FTP user - In most cases, this is the specific user name " +"your host has set up for you to access your Web site via FTP- It is the name " +"you use in your FTP client. This could be an alphanumeric, it could be your " +"name, even your e-mail address, If you don't know this speak to your host. " +"You may have the facility on your Web account to set up additional FTP users " +"if that is the case (and it's more secure) you are recommended to do this" +msgstr "" + +msgid "" +"FTP password - this is the password you enter in your FTP " +"client." +msgstr "" + +msgid "" +"FTP root - This is generally the directory in which " +"BoxBilling is installed. This setting is very important to be setup " +"correctly as it very specifically depends on the Host server settings. In " +"can be just / BUT it might be htdocs/boxbilling, public_html/, /public_html/" +"boxbilling or other. It is a variable that BoxBilling has absolutely no " +"control over. You will need to clarify this with your host." +msgstr "" + +msgid "New Addon" +msgstr "" + +msgid "After order is placed" +msgstr "" + +msgid "After payment is received" +msgstr "" + +msgid "Manual activation" +msgstr "" + +msgid "Email templates" +msgstr "" + +msgid "New template" +msgstr "" + +msgid "Email settings" +msgstr "" + +msgid "Extension" +msgstr "" + +msgid "" +"The list is empty. Depending on modules enabled email templates will be " +"inserted after first event occurrence." +msgstr "" + +msgid "Configure email options" +msgstr "" + +msgid "" +"BoxBilling sends emails using sendmail by default or you can " +"configure your own SMTP server" +msgstr "" + +msgid "Email transport" +msgstr "" + +msgid "SendMail" +msgstr "" + +msgid "SMTP" +msgstr "" + +msgid "SMTP Hostname" +msgstr "" + +msgid "SMTP Port" +msgstr "" + +msgid "SMTP Username" +msgstr "" + +msgid "SMTP Password" +msgstr "" + +msgid "SMTP Security" +msgstr "" + +msgid "Update email settings" +msgstr "" + +msgid "Send test email to staff members" +msgstr "" + +msgid "Where I can use new email template?" +msgstr "" + +msgid "Newly created email templates can be used in custom event hooks." +msgstr "" + +msgid "Action code" +msgstr "" + +msgid "Subscription" +msgstr "" + +msgid "Subscription details" +msgstr "" + +msgid "Payment gateway" +msgstr "" + +msgid "Subscription ID on payment gateway" +msgstr "" + +msgid "Payment Gateway" +msgstr "" + +msgid "Custom forms" +msgstr "" + +msgid "Import form" +msgstr "" + +msgid "Create new form" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "Dropdown" +msgstr "" + +msgid "Radio" +msgstr "" + +msgid "Yes/No" +msgstr "" + +msgid "Textarea" +msgstr "" + +msgid "Optional" +msgstr "" + +msgid "Required" +msgstr "" + +msgid "Done editing" +msgstr "" + +msgid "Access Hash (Instead of password for cPanel servers)" +msgstr "" + +msgid "Connection port" +msgstr "" + +msgid "Update and test connection" +msgstr "" + +msgid "Update server" +msgstr "" + +msgid "File information" +msgstr "" + +msgid "Filename" +msgstr "" + +msgid "Location" +msgstr "" + +msgid "Downloads" +msgstr "" + +msgid "Upload new file for this order" +msgstr "" + +msgid "" +"Use this function to update existing order file. Client will be able to " +"download new file from client area" +msgstr "" + +msgid "Forum details" +msgstr "" + +msgid "Locked" +msgstr "" + +msgid "New note" +msgstr "" + +msgid "Delete all messages" +msgstr "" + +msgid "Add note or todo task" +msgstr "" + +msgid "Add note" +msgstr "" + +msgid "Support tickets" +msgstr "" + +msgid "Filter support tickets" +msgstr "" + +msgid "Client ID" +msgstr "" + +msgid "Order ID" +msgstr "" + +msgid "Ticket subject" +msgstr "" + +msgid "Ticket messages" +msgstr "" + +msgid "Priority" +msgstr "" + +msgid "Tickets waiting for staff reply" +msgstr "" + +msgid "Tickets waiting for client reply" +msgstr "" + +msgid "Solved tickets" +msgstr "" + +msgid "New ticket" +msgstr "" + +msgid "New email" +msgstr "" + +msgid "Helpdesk" +msgstr "" + +msgid "ago" +msgstr "" + +msgid "Open ticket for existing client" +msgstr "" + +msgid "Open public ticket for non client" +msgstr "" + +msgid "Receivers name" +msgstr "" + +msgid "John Smith" +msgstr "" + +msgid "to@gmail.com" +msgstr "" + +msgid "Email subject" +msgstr "" + +msgid "Posts" +msgstr "" + +msgid "Topics" +msgstr "" + +msgid "Forums" +msgstr "" + +msgid "New topic" +msgstr "" + +msgid "New forum" +msgstr "" + +msgid "Replies" +msgstr "" + +msgid "Sorting" +msgstr "" + +msgid "Support ticket" +msgstr "" + +msgid "Staff member" +msgstr "" + +msgid "Announcement" +msgstr "" + +msgid "Forum topic" +msgstr "" + +msgid "Example module settings" +msgstr "" + +msgid "Example extension settings" +msgstr "" + +msgid "" +"Every extension can have settings page. Only requirement is to have " +"mod_example_settings.phtml page in html_admin folder" +msgstr "" + +msgid "Parameter title" +msgstr "" + +msgid "Example custom value" +msgstr "" + +msgid "Recent posts" +msgstr "" + +msgid "Enable forum points feature in extension configuration page" +msgstr "" + +msgid "Main website" +msgstr "" + +msgid "Send Email Message" +msgstr "" + +msgid "From name" +msgstr "" + +msgid "From email" +msgstr "" + +msgid "Recipients filter. Select none to send message to all clients" +msgstr "" + +msgid "Client status and group" +msgstr "" + +msgid "Has order" +msgstr "" + +msgid "Message content" +msgstr "" + +msgid "Update and preview" +msgstr "" + +msgid "Send test message" +msgstr "" + +msgid "Send message to clients" +msgstr "" + +msgid "Back to list" +msgstr "" + +msgid "BoxBilling license" +msgstr "" + +msgid "1. Configure API" +msgstr "" + +msgid "Update API key" +msgstr "" + +msgid "2. Become partner" +msgstr "" + +msgid "3. Create license product" +msgstr "" + +msgid "License settings" +msgstr "" + +msgid "Prefix" +msgstr "" + +msgid "Length" +msgstr "" + +msgid "Validate Hostname" +msgstr "" + +msgid "Validate Version" +msgstr "" + +msgid "Validate Path" +msgstr "" + +msgid "License plugins" +msgstr "" + +msgid "" +"BoxBilling gives you ability to provide your own license generation script. " +"Follow instructions bellow to install new license plugin" +msgstr "" + +msgid "License plugin is PHP class \"License_PluginName\" with one method" +msgstr "" + +msgid "Take a look at default plugin at" +msgstr "" + +msgid "Create your plugin and place it to" +msgstr "" + +msgid "BoxBilling will automatically detect new plugin" +msgstr "" + +msgid "for more information." +msgstr "" + +msgid "Orders settings" +msgstr "" + +msgid "Expiration date" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Payments" +msgstr "" + +msgid "Logins" +msgstr "" + +msgid "Emails" +msgstr "" + +msgid "Client profile details" +msgstr "" + +msgid "Client Profile updated" +msgstr "" + +msgid "Individual" +msgstr "" + +msgid "Other/Unknown" +msgstr "" + +msgid "Address and contact details" +msgstr "" + +msgid "Additional settings" +msgstr "" + +msgid "Alternative ID" +msgstr "" + +msgid "Used to identify client on foreign system. Usually used by importers" +msgstr "" + +msgid "Exempt from tax" +msgstr "" + +msgid "Signed up time" +msgstr "" + +msgid "Update profile" +msgstr "" + +msgid "Change password" +msgstr "" + +msgid "Password changed" +msgstr "" + +msgid "Password confirm" +msgstr "" + +msgid "Custom fields" +msgstr "" + +msgid "Use these fields to define custom client details" +msgstr "" + +msgid "Client Profile custom fields updated" +msgstr "" + +msgid "Custom field" +msgstr "" + +msgid "Client payments history" +msgstr "" + +msgid "Balance" +msgstr "" + +msgid "Add funds for client" +msgstr "" + +msgid "Funds added" +msgstr "" + +msgid "Add funds" +msgstr "" + +msgid "Client orders" +msgstr "" + +msgid "Client invoices" +msgstr "" + +msgid "Client support tickets" +msgstr "" + +msgid "Logins history" +msgstr "" + +msgid "Emails sent to client" +msgstr "" + +msgid "Date sent" +msgstr "" + +msgid "Transactions received" +msgstr "" + +msgid "File manager" +msgstr "" + +msgid "Full screen" +msgstr "" + +msgid "Canned response" +msgstr "" + +msgid "Import SolusVM clients" +msgstr "" + +msgid "Created" +msgstr "" + +msgid "Import selected SolusVM clients to BoxBilling" +msgstr "" + +msgid "No icons available" +msgstr "" + +msgid "Transaction" +msgstr "" + +msgid "IPN" +msgstr "" + +msgid "Transaction details" +msgstr "" + +msgid "" +"If you are sure that this transaction is valid you can update transaction " +"details in "Manage" tab and try processing transaction again" +msgstr "" + +msgid "Invoice Id" +msgstr "" + +msgid "Transaction ID on payment gateway" +msgstr "" + +msgid "Transaction status on payment gateway" +msgstr "" + +msgid "Received at" +msgstr "" + +msgid "Process" +msgstr "" + +msgid "Invoice ID" +msgstr "" + +msgid "Transaction processing information" +msgstr "" + +msgid "Validate IPN" +msgstr "" + +msgid "Transaction information on payment gateway" +msgstr "" + +msgid "Transaction type" +msgstr "" + +msgid "Transaction status on Payment Gateway" +msgstr "" + +msgid "Transaction ID on Payment Gateway" +msgstr "" + +msgid "Note about this transaction" +msgstr "" + +msgid "GET" +msgstr "" + +msgid "No GET parameters received" +msgstr "" + +msgid "POST" +msgstr "" + +msgid "No POST parameters received" +msgstr "" + +msgid "SERVER" +msgstr "" + +msgid "No SERVER parameters logged" +msgstr "" + +msgid "Tax rules" +msgstr "" + +msgid "New tax rule" +msgstr "" + +msgid "Tax settings" +msgstr "" + +msgid "EU VAT" +msgstr "" + +msgid "State/Region" +msgstr "" + +msgid "Tax rate" +msgstr "" + +msgid "Applies to any country" +msgstr "" + +msgid "Applies to any state" +msgstr "" + +msgid "Enable tax support" +msgstr "" + +msgid "Automatic VAT Tax Rules Setup" +msgstr "" + +msgid "" +"If you would like BoxBilling to automatically setup the EU VAT tax rules for " +"you for all EU Member States then simply enter your VAT Label & local VAT " +"rate below and click the submit button. This action will delete any existing " +"tax rules and configure the VAT rates for all EU countries." +msgstr "" + +msgid "VAT Label" +msgstr "" + +msgid "VAT" +msgstr "" + +msgid "VAT rate" +msgstr "" + +msgid "21" +msgstr "" + +msgid "Create EU VAT Rules" +msgstr "" + +msgid "Tax title" +msgstr "" + +msgid "sales Tax" +msgstr "" + +msgid "18" +msgstr "" + +msgid "Leave empty to apply to all states" +msgstr "" + +msgid "Filter transactions" +msgstr "" + +msgid "ID on payment gateway" +msgstr "" + +msgid "Processed" +msgstr "" + +msgid "Statistics" +msgstr "" + +msgid "Metric" +msgstr "" + +msgid "Today" +msgstr "" + +msgid "Yesterday" +msgstr "" + +msgid "This month so far" +msgstr "" + +msgid "Last month" +msgstr "" + +msgid "Income" +msgstr "" + +msgid "Latest orders" +msgstr "" + +msgid "Product sales" +msgstr "" + +msgid "No active orders available" +msgstr "" + +msgid "Define date interval for graphs" +msgstr "" + +msgid "Update graphs" +msgstr "" + +msgid "Recent clients activity" +msgstr "" + +msgid "Recent staff activity" +msgstr "" + +msgid "Public tickets" +msgstr "" + +msgid "Ticket ID" +msgstr "" + +msgid "Author" +msgstr "" + +msgid "Time opened" +msgstr "" + +msgid "Last updated" +msgstr "" + +msgid "Reply as" +msgstr "" + +msgid "Currency management" +msgstr "" + +msgid "Currency settings" +msgstr "" + +msgid "Edit currency information" +msgstr "" + +msgid "Conversion rate" +msgstr "" + +msgid "Format" +msgstr "" + +msgid "Price format" +msgstr "" + +msgid "Domain management" +msgstr "" + +msgid "Registrar configuration" +msgstr "" + +msgid "Enable test mode" +msgstr "" + +msgid "Registrar title" +msgstr "" + +msgid "Payment gateway configuration" +msgstr "" + +msgid "Payment gateway title" +msgstr "" + +msgid "" +"Select which currencies can accept this payment gateway (Select none to " +"allow all currencies)" +msgstr "" + +msgid "Allow subscription payments" +msgstr "" + +msgid "IPN Callback URL" +msgstr "" + +msgid "Queues" +msgstr "" + +msgid "Example module" +msgstr "" + +msgid "Example module title" +msgstr "" + +msgid "This is an example extension content" +msgstr "" + +msgid "Parameters from Controller" +msgstr "" + +msgid "Parameters from URL" +msgstr "" + +msgid "API example" +msgstr "" + +msgid "README" +msgstr "" + +msgid "management" +msgstr "" + +msgid "Extensions" +msgstr "" + +msgid "Update BoxBilling" +msgstr "" + +msgid "Learn more about extensions" +msgstr "" + +msgid "Hooks" +msgstr "" + +msgid "Activate or deactivate extensions" +msgstr "" + +msgid "Deactivate" +msgstr "" + +msgid "Hook" +msgstr "" + +msgid "Automatic update" +msgstr "" + +msgid "" +"Automatic updater is a tool to update BoxBilling to latest version in one " +"click. Works on these hosting environments where PHP has permissions to " +"overwrite files uploaded via FTP." +msgstr "" + +msgid "Manual update" +msgstr "" + +msgid "" +"Manual update is a solution when auto updater can not work on current " +"installation environment" +msgstr "" + +msgid "Extending BoxBilling" +msgstr "" + +msgid "" +"BoxBilling gives developers all the capabilities to customize, integrate & " +"extend the core system into your own website & applications." +msgstr "" + +msgid "Currencies" +msgstr "" + +msgid "Add new currency" +msgstr "" + +msgid "Manage currencies" +msgstr "" + +msgid "" +"Default currency is the one you manage all your prices in admin area. If " +"your client in client area chooses other than default currency, prices will " +"be recalculated according to conversion rate. You can have only one default " +"currency. You can not add same currency once again. Changing default " +"currency is not recommended when active orders are available. Nothing is " +"recalculated on default currency change. Your income is calculated in " +"default currency. Changing default currency after you have paid invoices " +"will distort income statistics. Currency rates are taken from Google." +msgstr "" + +msgid "ISO code" +msgstr "" + +msgid "Example price" +msgstr "" + +msgid "Update Rates" +msgstr "" + +msgid "Result" +msgstr "" + +msgid "Client area themes" +msgstr "" + +msgid "Set as default" +msgstr "" + +msgid "Staff members logins history" +msgstr "" + +msgid "Admin" +msgstr "" + +msgid "Membership settings" +msgstr "" + +msgid "Membership service does not have any configuration options" +msgstr "" + +msgid "Import SolusVM servers" +msgstr "" + +msgid "Read before importing servers" +msgstr "" + +msgid "VServer ID" +msgstr "" + +msgid "Import selected SolusVM virtual server to BoxBilling" +msgstr "" + +msgid "Client groups" +msgstr "" + +msgid "Account Id" +msgstr "" + +msgid "message(s)" +msgstr "" + +msgid "Ticket" +msgstr "" + +msgid "Task" +msgstr "" + +msgid "Client tickets" +msgstr "" + +msgid "Task status" +msgstr "" + +msgid "Related to" +msgstr "" + +msgid "Upgrade to" +msgstr "" + +msgid "BoxBilling license management" +msgstr "" + +msgid "License order ID" +msgstr "" + +msgid "License key" +msgstr "" + +msgid "Valid IPs" +msgstr "" + +msgid "Valid hostnames" +msgstr "" + +msgid "Valid versions" +msgstr "" + +msgid "Valid install paths" +msgstr "" + +msgid "Order is not activated or not found" +msgstr "" + +msgid "Node / ID / VMID" +msgstr "" + +msgid "Operating System" +msgstr "" + +msgid "IP address" +msgstr "" + +msgid "Additional IP addresses" +msgstr "" + +msgid "Root password" +msgstr "" + +msgid "Client area username / password" +msgstr "" + +msgid "Console user / password" +msgstr "" + +msgid "Client area" +msgstr "" + +msgid "Admin area" +msgstr "" + +msgid "Change root password" +msgstr "" + +msgid "New password" +msgstr "" + +msgid "Change hostname" +msgstr "" + +msgid "New hostname" +msgstr "" + +msgid "Change plan" +msgstr "" + +msgid "New plan" +msgstr "" + +msgid "Rebuild" +msgstr "" + +msgid "Usage statistics" +msgstr "" + +msgid "Free" +msgstr "" + +msgid "Memory" +msgstr "" + +msgid "Disk usage" +msgstr "" + +msgid "Traffic" +msgstr "" + +msgid "Load" +msgstr "" + +msgid "" +"Master node is offline, order is not yet activated or API is not configured " +"properly." +msgstr "" + +msgid "Changing settings does not send actions to SolusVM server." +msgstr "" + +msgid "Main IP address" +msgstr "" + +msgid "Sent" +msgstr "" + +msgid "Resend" +msgstr "" + +msgid "Max Addon domains" +msgstr "" + +msgid "Max FTP accounts" +msgstr "" + +msgid "Max SQL Databases" +msgstr "" + +msgid "Max Email Accounts" +msgstr "" + +msgid "Max Subdomains" +msgstr "" + +msgid "Max Parked Domains" +msgstr "" + +msgid "Server manager specific parameters" +msgstr "" + +msgid "Update hosting plan" +msgstr "" + +msgid "Hosting plan additional parameters" +msgstr "" + +msgid "" +"Depending on server manager used to setup hosting account you may require " +"provide additional parameters. List of parameters server managers requires " +"you can find on extensions page." +msgstr "" + +msgid "Add new configuration field" +msgstr "" + +msgid "Centova Cast" +msgstr "" + +msgid "Centova Cast settings" +msgstr "" + +msgid "Server URL" +msgstr "" + +msgid "Server Hostname" +msgstr "" + +msgid "Register new server" +msgstr "" + +msgid "Edit server" +msgstr "" + +msgid "CentovaCast URL" +msgstr "" + +msgid "Administrator password" +msgstr "" + +msgid "Register Centova Cast server" +msgstr "" + +msgid "Server added" +msgstr "" + +msgid "Back to settings" +msgstr "" + +msgid "Create CentovaCast product" +msgstr "" + +msgid "Staff members" +msgstr "" + +msgid "New response" +msgstr "" + +msgid "Subscriptions" +msgstr "" + +msgid "New subscription" +msgstr "" + +msgid "Cron settings" +msgstr "" + +msgid "Use Web-Cron" +msgstr "" + +msgid "Setup scheduled tasks to be executed once a day" +msgstr "" + +msgid "" +"Scheduled tasks must be enabled immediately after installation. Cron is " +"responsible for sending your clients reminder about payments, domain renewal " +"notices and many more." +msgstr "" + +msgid "Timezone" +msgstr "" + +msgid "Time on server" +msgstr "" + +msgid "Last time scheduled tasks were executed" +msgstr "" + +msgid "Scheduled tasks were never executed" +msgstr "" + +msgid "Unix crontab setup:" +msgstr "" + +msgid "Execute scheduled tasks from browser" +msgstr "" + +msgid "Execute now" +msgstr "" + +msgid "Gravatar" +msgstr "" + +msgid "Profile updated" +msgstr "" + +msgid "API Key" +msgstr "" + +msgid "" +"API key allows integration with external applications. You will need this " +"key for authentication." +msgstr "" + +msgid "" +"External application can control every aspect of BoxBilling using this API " +"key." +msgstr "" + +msgid "Warning! Resetting the key will break existing applications using it." +msgstr "" + +msgid "Change your avatar at" +msgstr "" + +msgid "New product" +msgstr "" + +msgid "Update priority" +msgstr "" + +msgid "Icon URL" +msgstr "" + +msgid "Stock control settings" +msgstr "" + +msgid "Enable stock control" +msgstr "" + +msgid "Allow quantity select on order form" +msgstr "" + +msgid "Quantity in stock" +msgstr "" + +msgid "Plugin name" +msgstr "" + +msgid "Update configuration fields" +msgstr "" + +msgid "YouHosting settings" +msgstr "" + +msgid "Advanced" +msgstr "" + +msgid "Your IP" +msgstr "" + +msgid "WebHook URL" +msgstr "" + +msgid "Api Key" +msgstr "" + +msgid "Check connection" +msgstr "" + +msgid "Import clients" +msgstr "" + +msgid "Import clients, accounts and products" +msgstr "" + +msgid "Allowed IPs for Webhook listener" +msgstr "" + +msgid "YouHosting specifict settings" +msgstr "" + +msgid "Article updated" +msgstr "" + +msgid "Article details" +msgstr "" + +msgid "Edit product addon" +msgstr "" + +msgid "Domain details" +msgstr "" + +msgid "Transfer code" +msgstr "" + +msgid "Privacy protected" +msgstr "" + +msgid "Registration/Renewal years" +msgstr "" + +msgid "Unlock" +msgstr "" + +msgid "Lock" +msgstr "" + +msgid "Disable privacy protection" +msgstr "" + +msgid "Enable privacy protection" +msgstr "" + +msgid "Update domain contact details" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Phone Country Code" +msgstr "" + +msgid "Phone number" +msgstr "" + +msgid "SpamChecker settings" +msgstr "" + +msgid "Recaptcha settings" +msgstr "" + +msgid "Enable captcha for client registration and contact us forms" +msgstr "" + +msgid "Sign up for Recaptcha key for your domain at" +msgstr "" + +msgid "Recaptcha Enabled" +msgstr "" + +msgid "ReCaptcha Public key" +msgstr "" + +msgid "ReCaptcha Private key" +msgstr "" + +msgid "Akismet settings" +msgstr "" + +msgid "" +"Enable forum messages checking on http://www.akismet.com database" +msgstr "" + +msgid "Enable check" +msgstr "" + +msgid "Akismet API key" +msgstr "" + +msgid "StopForumSpam.com settings" +msgstr "" + +msgid "" +"If enabled, client ip will be checked on http://www.stopforumspam.com database before " +"registration" +msgstr "" + +msgid "Top level domain management" +msgstr "" diff --git a/src/bb-locale/en_US/LC_MESSAGES/admin.mo b/src/bb-locale/en_US/LC_MESSAGES/admin.mo new file mode 100644 index 000000000..c6473c9f7 Binary files /dev/null and b/src/bb-locale/en_US/LC_MESSAGES/admin.mo differ diff --git a/src/bb-locale/en_US/LC_MESSAGES/admin.po b/src/bb-locale/en_US/LC_MESSAGES/admin.po new file mode 100644 index 000000000..f083c4c62 --- /dev/null +++ b/src/bb-locale/en_US/LC_MESSAGES/admin.po @@ -0,0 +1,3123 @@ +msgid "" +msgstr "" +"Project-Id-Version: BoxBilling\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2012-08-02 09:37+0300\n" +"Last-Translator: BoxBilling \n" +"Language-Team: BoxBilling \n" +"Language: English\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: _;gettext;gettext_noop\n" +"X-Poedit-Basepath: .\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-SourceCharset: utf-8\n" + +msgid "General settings" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Addons" +msgstr "" + +msgid "Upgrades" +msgstr "" + +msgid "Links" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Category" +msgstr "" + +msgid "Custom order form" +msgstr "" + +msgid "Preview" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Hidden" +msgstr "" + +msgid "Activation" +msgstr "" + +msgid "Icon URL" +msgstr "" + +msgid "Browse" +msgstr "" + +msgid "Title" +msgstr "" + +msgid "Slug" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "Payment options" +msgstr "" + +msgid "Product / service description" +msgstr "" + +msgid "Choose which addons you would like to offer with" +msgstr "" + +msgid "The list is empty" +msgstr "" + +msgid "Choose which products can client upgrade to" +msgstr "" + +msgid "Product Upgrades" +msgstr "" + +msgid "No additional configuration for this product is required" +msgstr "" + +msgid "Product links" +msgstr "" + +msgid "Product ID" +msgstr "" + +msgid "Order page with ID" +msgstr "" + +msgid "Order page with slug" +msgstr "" + +msgid "Select icon and click OK" +msgstr "" + +msgid "Payment type" +msgstr "" + +msgid "Setup price" +msgstr "" + +msgid "Price" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "One time" +msgstr "" + +msgid "Price for period" +msgstr "" + +msgid "First payment sum" +msgstr "" + +msgid "On" +msgstr "" + +msgid "Weekly" +msgstr "" + +msgid "Monthly" +msgstr "" + +msgid "Every 3 months" +msgstr "" + +msgid "Every 6 months" +msgstr "" + +msgid "Every year" +msgstr "" + +msgid "Every 2 years" +msgstr "" + +msgid "Every 3 years" +msgstr "" + +msgid "Centova Cast order details" +msgstr "" + +msgid "Changing settings does not send actions to CentovaCast server." +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Reconfigure" +msgstr "" + +msgid "Changing CentovaCast server settings." +msgstr "" + +msgid "Hostname" +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Max clients" +msgstr "" + +msgid "Source password" +msgstr "" + +msgid "Max BitRate" +msgstr "" + +msgid "Transfer limit" +msgstr "" + +msgid "Disk quota" +msgstr "" + +msgid "Organization" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "URL" +msgstr "" + +msgid "Auto rebuild list" +msgstr "" + +msgid "Account details" +msgstr "" + +msgid "Parameter" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "Mass Mail Messages" +msgstr "" + +msgid "Create new mass mail message" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "From" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "Mass Mail Settings" +msgstr "" + +msgid "Configuration updated" +msgstr "" + +msgid "Client ID to send test email while creating message" +msgstr "" + +msgid "Custom forms" +msgstr "" + +msgid "Import form" +msgstr "" + +msgid "Create new form" +msgstr "" + +msgid "Import" +msgstr "" + +msgid "Text" +msgstr "" + +msgid "Dropdown" +msgstr "" + +msgid "Radio" +msgstr "" + +msgid "Yes/No" +msgstr "" + +msgid "Textarea" +msgstr "" + +msgid "Optional" +msgstr "" + +msgid "Required" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "Save" +msgstr "" + +msgid "Done editing" +msgstr "" + +msgid "Hi," +msgstr "" + +msgid "Loading ..." +msgstr "" + +msgid "New" +msgstr "" + +msgid "Visit site" +msgstr "" + +msgid "Help" +msgstr "" + +msgid "Logout" +msgstr "" + +msgid "Notifications" +msgstr "" + +msgid "Orders" +msgstr "" + +msgid "Invoices" +msgstr "" + +msgid "Inquiries" +msgstr "" + +msgid "Tickets" +msgstr "" + +msgid "Clients" +msgstr "" + +msgid "Dashboard" +msgstr "" + +msgid "Profile" +msgstr "" + +msgid "Payments" +msgstr "" + +msgid "Logins" +msgstr "" + +msgid "Emails" +msgstr "" + +msgid "Profile details" +msgstr "" + +msgid "Client profile details" +msgstr "" + +msgid "Client Profile updated" +msgstr "" + +msgid "Active" +msgstr "" + +msgid "Suspended" +msgstr "" + +msgid "Canceled" +msgstr "" + +msgid "Individual" +msgstr "" + +msgid "Company" +msgstr "" + +msgid "Other/Unknown" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Company details" +msgstr "" + +msgid "Address and contact details" +msgstr "" + +msgid "Address Line 1" +msgstr "" + +msgid "Address Line 2" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "State" +msgstr "" + +msgid "City" +msgstr "" + +msgid "Postcode" +msgstr "" + +msgid "Phone" +msgstr "" + +msgid "Additional settings" +msgstr "" + +msgid "Alternative ID" +msgstr "" + +msgid "Used to identify client on foreign system. Usually used by importers" +msgstr "" + +msgid "Currency" +msgstr "" + +msgid "Exempt from tax" +msgstr "" + +msgid "Signed up time" +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "Update profile" +msgstr "" + +msgid "Change password" +msgstr "" + +msgid "Password changed" +msgstr "" + +msgid "Password confirm" +msgstr "" + +msgid "Custom fields" +msgstr "" + +msgid "Use these fields to define custom client details" +msgstr "" + +msgid "Client Profile custom fields updated" +msgstr "" + +msgid "Custom field" +msgstr "" + +msgid "Client payments history" +msgstr "" + +msgid "Amount" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "Balance" +msgstr "" + +msgid "Add funds for client" +msgstr "" + +msgid "Funds added" +msgstr "" + +msgid "Add funds" +msgstr "" + +msgid "Client orders" +msgstr "" + +msgid "Client invoices" +msgstr "" + +msgid "Client support tickets" +msgstr "" + +msgid "Logins history" +msgstr "" + +msgid "IP" +msgstr "" + +msgid "Emails sent to client" +msgstr "" + +msgid "Email subject" +msgstr "" + +msgid "To" +msgstr "" + +msgid "Date sent" +msgstr "" + +msgid "Category updated" +msgstr "" + +msgid "Icon" +msgstr "" + +msgid "Domains management" +msgstr "" + +msgid "System settings" +msgstr "" + +msgid "Invoice" +msgstr "" + +msgid "Order" +msgstr "" + +msgid "FTP layer" +msgstr "" + +msgid "Scheduled tasks" +msgstr "" + +msgid "License" +msgstr "" + +msgid "Address" +msgstr "" + +msgid "Logo URL" +msgstr "" + +msgid "Company number, chamber of commerce number" +msgstr "" + +msgid "VAT number" +msgstr "" + +msgid "Bank Account number" +msgstr "" + +msgid "Signature" +msgstr "" + +msgid "Update settings" +msgstr "" + +msgid "Company terms of service, legal regulation" +msgstr "" + +msgid "Company privacy policy" +msgstr "" + +msgid "Orders settings" +msgstr "" + +msgid "Expiration date" +msgstr "" + +msgid "Invoice settings" +msgstr "" + +msgid "Number of days to generate new invoice before order expiration" +msgstr "" + +msgid "Invoice due days" +msgstr "" + +msgid "Auto invoice approval" +msgstr "" + +msgid "Proforma Invoicing / Sequential Invoice Numbering" +msgstr "" + +msgid "Proforma invoice prefix/series" +msgstr "" + +msgid "Paid invoice prefix/series" +msgstr "" + +msgid "Next paid invoice number" +msgstr "" + +msgid "Refunds settings" +msgstr "" + +msgid "Refunds logic" +msgstr "" + +msgid "Add funds settings" +msgstr "" + +msgid "Minimum amount for add funds invoice" +msgstr "" + +msgid "Unlimited" +msgstr "" + +msgid "Maximum amount for add funds invoice" +msgstr "" + +msgid "FTP layer for BoxBilling" +msgstr "" + +msgid "FTP is used to manage BoxBilling modules and updates." +msgstr "" + +msgid "FTP settings updated" +msgstr "" + +msgid "FTP Hostname - can be a numerical URL 127.0.0.1 is the default address for a locally hosted server, it might be this, it might be the full URL as my example above with the File Transfer Protocol (FTP) prefix, it might be the http:// protocol it might be SFTP (secure FTP) even secure http (https). Your host will be able to advise you on the correct format." +msgstr "" + +msgid "FTP port - is nearly always 21 unless the host has changed this they will have notified you of this. Secure FTP generally uses port 22." +msgstr "" + +msgid "FTP user - In most cases, this is the specific user name your host has set up for you to access your Web site via FTP- It is the name you use in your FTP client. This could be an alphanumeric, it could be your name, even your e-mail address, If you don't know this speak to your host. You may have the facility on your Web account to set up additional FTP users if that is the case (and it's more secure) you are recommended to do this" +msgstr "" + +msgid "FTP password - this is the password you enter in your FTP client." +msgstr "" + +msgid "FTP root - This is generally the directory in which BoxBilling is installed. This setting is very important to be setup correctly as it very specifically depends on the Host server settings. In can be just / BUT it might be htdocs/boxbilling, public_html/, /public_html/boxbilling or other. It is a variable that BoxBilling has absolutely no control over. You will need to clarify this with your host." +msgstr "" + +msgid "Setup scheduled tasks to be executed once a day" +msgstr "" + +msgid "Scheduled tasks must be enabled immediately after installation. Cron is responsible for sending your clients reminder about payments, domain renewal notices and many more." +msgstr "" + +msgid "Timezone" +msgstr "" + +msgid "Time on server" +msgstr "" + +msgid "Last time scheduled tasks were executed" +msgstr "" + +msgid "Scheduled tasks were never executed" +msgstr "" + +msgid "Unix crontab setup:" +msgstr "" + +msgid "Execute scheduled tasks from browser" +msgstr "" + +msgid "Execute now" +msgstr "" + +msgid "After purchase you have received an e-mail with license key. Update license key to unlock all features of BoxBilling" +msgstr "" + +msgid "To change license key, change BB_LICENSE value in bb-config.php file" +msgstr "" + +msgid "Licensed to" +msgstr "" + +msgid "Key" +msgstr "" + +msgid "Expires at" +msgstr "" + +msgid "Centova Cast product settings" +msgstr "" + +msgid "Template" +msgstr "" + +msgid "Max bitrate" +msgstr "" + +msgid "Autostart" +msgstr "" + +msgid "News and announcements" +msgstr "" + +msgid "New announcement" +msgstr "" + +msgid "Draft" +msgstr "" + +msgid "Content" +msgstr "" + +msgid "Edit product addon" +msgstr "" + +msgid "Canned category" +msgstr "" + +msgid "Queues" +msgstr "" + +msgid "Extension" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "Created" +msgstr "" + +msgid "The list is empty." +msgstr "" + +msgid "Domain details" +msgstr "" + +msgid "Domain" +msgstr "" + +msgid "Registrar" +msgstr "" + +msgid "Nameserver 1" +msgstr "" + +msgid "Nameserver 2" +msgstr "" + +msgid "Nameserver 3" +msgstr "" + +msgid "Nameserver 4" +msgstr "" + +msgid "Transfer code" +msgstr "" + +msgid "Privacy protected" +msgstr "" + +msgid "Locked" +msgstr "" + +msgid "Registration/Renewal years" +msgstr "" + +msgid "Registration date" +msgstr "" + +msgid "Unlock" +msgstr "" + +msgid "Lock" +msgstr "" + +msgid "Disable privacy protection" +msgstr "" + +msgid "Enable privacy protection" +msgstr "" + +msgid "Nameservers" +msgstr "" + +msgid "Update domain contact details" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Last Name" +msgstr "" + +msgid "Zip" +msgstr "" + +msgid "Phone Country Code" +msgstr "" + +msgid "Phone number" +msgstr "" + +msgid "System activity" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Ip" +msgstr "" + +msgid "Are you sure?" +msgstr "" + +msgid "Variables" +msgstr "" + +msgid "Template Settings" +msgstr "" + +msgid "Reset template" +msgstr "" + +msgid "Examples" +msgstr "" + +msgid "Manage email template" +msgstr "" + +msgid "Most email templates receives parameters from BoxBilling. You can browse them on \"Variables\" tab. Copy variable name to email template and hit preview to see parsed content. Please note that values will be different when actual email is sent." +msgstr "" + +msgid "Template updated" +msgstr "" + +msgid "Template settings" +msgstr "" + +msgid "Enable or disable this email template." +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "List of variables used in this email" +msgstr "" + +msgid "These values will change when real email is sent. You can pass these variables to admin or guest API to get additional information from database." +msgstr "" + +msgid "Variable" +msgstr "" + +msgid "Example value" +msgstr "" + +msgid "This template does not receive any parameters" +msgstr "" + +msgid "Reset email template to default" +msgstr "" + +msgid "Reset to default" +msgstr "" + +msgid "Email templates examples" +msgstr "" + +msgid "Email template playground. Use this tool to try rendering email templates." +msgstr "" + +msgid "Details" +msgstr "" + +msgid "Manage" +msgstr "" + +msgid "Forum" +msgstr "" + +msgid "Started by" +msgstr "" + +msgid "Views" +msgstr "" + +msgid "Sticky" +msgstr "" + +msgid "Created at" +msgstr "" + +msgid "Updated at" +msgstr "" + +msgid "Reply" +msgstr "" + +msgid "Quote" +msgstr "" + +msgid "Post" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "Transactions" +msgstr "" + +msgid "Filter transactions" +msgstr "" + +msgid "ID on payment gateway" +msgstr "" + +msgid "Invoice Id" +msgstr "" + +msgid "Payment Gateway" +msgstr "" + +msgid "Received at" +msgstr "" + +msgid "Filter" +msgstr "" + +msgid "Processed" +msgstr "" + +msgid "Approved" +msgstr "" + +msgid "Error" +msgstr "" + +msgid "Gateway" +msgstr "" + +msgid "Filter invoices" +msgstr "" + +msgid "Nr" +msgstr "" + +msgid "All statuses" +msgstr "" + +msgid "Paid" +msgstr "" + +msgid "Unpaid" +msgstr "" + +msgid "Refunded" +msgstr "" + +msgid "Issue date" +msgstr "" + +msgid "Unpaid invoices" +msgstr "" + +msgid "Refunded invoices" +msgstr "" + +msgid "Paid invoices" +msgstr "" + +msgid "New Invoice" +msgstr "" + +msgid "Issued at" +msgstr "" + +msgid "Paid at" +msgstr "" + +msgid "Client" +msgstr "" + +msgid "Start typing clients name, email or ID" +msgstr "" + +msgid "Prepare" +msgstr "" + +msgid "Payment gateway configuration" +msgstr "" + +msgid "Payment gateway title" +msgstr "" + +msgid "Select which currencies can accept this payment gateway (Select none to allow all currencies)" +msgstr "" + +msgid "Allow one time payments" +msgstr "" + +msgid "Allow subscription payments" +msgstr "" + +msgid "Enable test mode" +msgstr "" + +msgid "IPN Callback URL" +msgstr "" + +msgid "Go back" +msgstr "" + +msgid "Tickets waiting for staff reply" +msgstr "" + +msgid "Tickets waiting for client reply" +msgstr "" + +msgid "Solved tickets" +msgstr "" + +msgid "Public tickets" +msgstr "" + +msgid "Import SolusVM servers" +msgstr "" + +msgid "Read before importing servers" +msgstr "" + +msgid "VServer ID" +msgstr "" + +msgid "Client ID" +msgstr "" + +msgid "Import selected SolusVM virtual server to BoxBilling" +msgstr "" + +msgid "Ticket ID" +msgstr "" + +msgid "Author" +msgstr "" + +msgid "Time opened" +msgstr "" + +msgid "Last updated" +msgstr "" + +msgid "SolusVM configuration" +msgstr "" + +msgid "Virtualization type" +msgstr "" + +msgid "Node" +msgstr "" + +msgid "Make sure BoxBilling can connect to SolusVM master server and check if nodes are configured for selected virtualizator type. Refresh page if you have changed virtualization type to see new nodes." +msgstr "" + +msgid "Plan" +msgstr "" + +msgid "Make sure BoxBilling can connect to SolusVM master server and check if plans are configured for selected virtualizator type." +msgstr "" + +msgid "Plan parameters" +msgstr "" + +msgid "IPs amount" +msgstr "" + +msgid "Guaranteed RAM" +msgstr "" + +msgid "Hdd Space" +msgstr "" + +msgid "Bandwidth" +msgstr "" + +msgid "CPU cores" +msgstr "" + +msgid "Custom extraip" +msgstr "" + +msgid "HVMT" +msgstr "" + +msgid "Issue cPanel License" +msgstr "" + +msgid "Dedicated CPU" +msgstr "" + +msgid "Dedicated RAM" +msgstr "" + +msgid "Disk space" +msgstr "" + +msgid "Network transfer" +msgstr "" + +msgid "Info" +msgstr "" + +msgid "BoxBilling version settings" +msgstr "" + +msgid "Version" +msgstr "" + +msgid "Size" +msgstr "" + +msgid "Release date" +msgstr "" + +msgid "Back to extensions" +msgstr "" + +msgid "Download latest" +msgstr "" + +msgid "Download latest update" +msgstr "" + +msgid "Staff members logins history" +msgstr "" + +msgid "Admin" +msgstr "" + +msgid "Currency management" +msgstr "" + +msgid "Currencies" +msgstr "" + +msgid "Add new currency" +msgstr "" + +msgid "Manage currencies" +msgstr "" + +msgid "Default currency is the one you manage all your prices in admin area. If your client in client area chooses other than default currency, prices will be recalculated according to conversion rate. You can have only one default currency. You can not add same currency once again. Changing default currency is not recommended when active orders are available. Nothing is recalculated on default currency change. Your income is calculated in default currency. Changing default currency after you have paid invoices will distort income statistics. Currency rates are taken from Google." +msgstr "" + +msgid "ISO code" +msgstr "" + +msgid "Conversion rate" +msgstr "" + +msgid "Example price" +msgstr "" + +msgid "Update Rates" +msgstr "" + +msgid "Code" +msgstr "" + +msgid "Format" +msgstr "" + +msgid "Add" +msgstr "" + +msgid "Articles" +msgstr "" + +msgid "New article" +msgstr "" + +msgid "New category" +msgstr "" + +msgid "Manage categories" +msgstr "" + +msgid "Category created" +msgstr "" + +msgid "Getting started with SolusVM" +msgstr "" + +msgid "API configuration" +msgstr "" + +msgid "This guide will help you to get started selling SolusVM virtual servers with BoxBilling." +msgstr "" + +msgid "1. Configure your SolusVm server" +msgstr "" + +msgid "2. Configure API" +msgstr "" + +msgid "3. Create new product category" +msgstr "" + +msgid "4. Create SolusVM products" +msgstr "" + +msgid "5. Import data from SolusVM server" +msgstr "" + +msgid "Connect to SolusVM master server via API" +msgstr "" + +msgid "To create an API user login to SolusVM admin area and click Configuration > API Access from the top menu then select Add API User." +msgstr "" + +msgid "INFORMATION" +msgstr "" + +msgid "Master server IP" +msgstr "" + +msgid "Secure connection" +msgstr "" + +msgid "Custom port" +msgstr "" + +msgid "Leave blank to use default port 5353 and 5656 for secure connection" +msgstr "" + +msgid "Test connection" +msgstr "" + +msgid "Support help desks" +msgstr "" + +msgid "New help desk" +msgstr "" + +msgid "Close tickets after" +msgstr "" + +msgid "Close after" +msgstr "" + +msgid "Can reopen" +msgstr "" + +msgid "Pending approval amount" +msgstr "" + +msgid "Total approved amount" +msgstr "" + +msgid "Total paid amount" +msgstr "" + +msgid "Balance amount" +msgstr "" + +msgid "Total clicks" +msgstr "" + +msgid "Unique clicks" +msgstr "" + +msgid "Commisions" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Main website" +msgstr "" + +msgid "Membership settings" +msgstr "" + +msgid "Membership service does not have any configuration options" +msgstr "" + +msgid "File information" +msgstr "" + +msgid "Filename" +msgstr "" + +msgid "Location" +msgstr "" + +msgid "Downloads" +msgstr "" + +msgid "Upload new file for this order" +msgstr "" + +msgid "Use this function to update existing order file. Client will be able to download new file from client area" +msgstr "" + +msgid "Upload new file" +msgstr "" + +msgid "Upload" +msgstr "" + +msgid "Enable/Disable" +msgstr "" + +msgid "Server manager" +msgstr "" + +msgid "Access Hash (Instead of password for cPanel servers)" +msgstr "" + +msgid "Connection port" +msgstr "" + +msgid "Use Secure connection" +msgstr "" + +msgid "Update and test connection" +msgstr "" + +msgid "Update server" +msgstr "" + +msgid "Staff members" +msgstr "" + +msgid "New staff member" +msgstr "" + +msgid "Manage groups" +msgstr "" + +msgid "New group" +msgstr "" + +msgid "Inactive" +msgstr "" + +msgid "Create group" +msgstr "" + +msgid "License details" +msgstr "" + +msgid "Plugin" +msgstr "" + +msgid "Last ping" +msgstr "" + +msgid "Validate IP" +msgstr "" + +msgid "Valid IPs (one per line)" +msgstr "" + +msgid "Validate host" +msgstr "" + +msgid "Valid hosts (one per line)" +msgstr "" + +msgid "Validate path" +msgstr "" + +msgid "Valid paths (one per line)" +msgstr "" + +msgid "Validate version" +msgstr "" + +msgid "Valid versions (one per line)" +msgstr "" + +msgid "Topics" +msgstr "" + +msgid "Forums" +msgstr "" + +msgid "New topic" +msgstr "" + +msgid "New forum" +msgstr "" + +msgid "Replies" +msgstr "" + +msgid "Sorting" +msgstr "" + +msgid "API" +msgstr "" + +msgid "Gravatar" +msgstr "" + +msgid "Profile updated" +msgstr "" + +msgid "API Key" +msgstr "" + +msgid "API key allows integration with external applications. You will need this key for authentication." +msgstr "" + +msgid "External application can control every aspect of BoxBilling using this API key." +msgstr "" + +msgid "Warning! Resetting the key will break existing applications using it." +msgstr "" + +msgid "Generate new key" +msgstr "" + +msgid "Change your avatar at" +msgstr "" + +msgid "Staff Group management" +msgstr "" + +msgid "Manage staff member details" +msgstr "" + +msgid "Change staff member password" +msgstr "" + +msgid "Staff member password changed" +msgstr "" + +msgid "Repeat same password" +msgstr "" + +msgid "Submit" +msgstr "" + +msgid "Api key is used to manage system via other interfaces." +msgstr "" + +msgid "API key" +msgstr "" + +msgid "Edit currency information" +msgstr "" + +msgid "Price format" +msgstr "" + +msgid "Send Email Message" +msgstr "" + +msgid "From name" +msgstr "" + +msgid "From email" +msgstr "" + +msgid "Recipients filter. Select none to send message to all clients" +msgstr "" + +msgid "Client status and group" +msgstr "" + +msgid "Has order" +msgstr "" + +msgid "Message content" +msgstr "" + +msgid "Update and preview" +msgstr "" + +msgid "Send test message" +msgstr "" + +msgid "Send message to clients" +msgstr "" + +msgid "Back to list" +msgstr "" + +msgid "Sell BoxBilling licenses" +msgstr "" + +msgid "1. Configure API" +msgstr "" + +msgid "Update API key" +msgstr "" + +msgid "2. Become partner" +msgstr "" + +msgid "3. Create license product" +msgstr "" + +msgid "Article updated" +msgstr "" + +msgid "Article details" +msgstr "" + +msgid "Payment gateways" +msgstr "" + +msgid "New payment gateway" +msgstr "" + +msgid "Allow subscriptions" +msgstr "" + +msgid "Adding new payment gateway" +msgstr "" + +msgid "Although BoxBilling ships with most popular payment gateways, you can install other gateways." +msgstr "" + +msgid "Follow these instructions to install new payment gateway." +msgstr "" + +msgid "Check for payment gateway at" +msgstr "" + +msgid "for more payment gateways" +msgstr "" + +msgid "Download payment gateway extension file and place it to" +msgstr "" + +msgid "After file is uploaded in place, reload this page." +msgstr "" + +msgid "Select uploaded file name and click on install." +msgstr "" + +msgid "Payment gateway will be installed in BoxBilling and can be configured in \"Payment gateways\" tab." +msgstr "" + +msgid "For developers. Read" +msgstr "" + +msgid "to learn how to create your own payment gateway and share it with community" +msgstr "" + +msgid "Install" +msgstr "" + +msgid "All payment gateways installed" +msgstr "" + +msgid "New Addon" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "After order is placed" +msgstr "" + +msgid "After payment is received" +msgstr "" + +msgid "Manual activation" +msgstr "" + +msgid "Tld management" +msgstr "" + +msgid "Top level domain management" +msgstr "" + +msgid "Registration price" +msgstr "" + +msgid "Renewal price" +msgstr "" + +msgid "Transfer price" +msgstr "" + +msgid "Minimum years of registration" +msgstr "" + +msgid "Allow registration" +msgstr "" + +msgid "Allow transfer" +msgstr "" + +msgid "Create new coupon code" +msgstr "" + +msgid "Discount type" +msgstr "" + +msgid "Recurring" +msgstr "" + +msgid "Free setup" +msgstr "" + +msgid "Promo code limitations" +msgstr "" + +msgid "Once per client" +msgstr "" + +msgid "Max uses (zero for unlimited)" +msgstr "" + +msgid "Used" +msgstr "" + +msgid "Period when code is valid" +msgstr "" + +msgid "Products" +msgstr "" + +msgid "Periods (Select none to apply to all periods)" +msgstr "" + +msgid "Max Addon domains" +msgstr "" + +msgid "Max FTP accounts" +msgstr "" + +msgid "Max SQL Databases" +msgstr "" + +msgid "Max Email Accounts" +msgstr "" + +msgid "Max Subdomains" +msgstr "" + +msgid "Max Parked Domains" +msgstr "" + +msgid "Server manager specific parameters" +msgstr "" + +msgid "Update hosting plan" +msgstr "" + +msgid "Hosting plan additional parameters" +msgstr "" + +msgid "Depending on server manager used to setup hosting account you may require provide additional parameters. List of parameters server managers requires you can find on extensions page." +msgstr "" + +msgid "Add new configuration field" +msgstr "" + +msgid "Pending approval" +msgstr "" + +msgid "Affiliates" +msgstr "" + +msgid "Clicks" +msgstr "" + +msgid "Joined at" +msgstr "" + +msgid "Affiliate module settings" +msgstr "" + +msgid "Offer your clients become affiliates of your services." +msgstr "" + +msgid "Commission from order" +msgstr "" + +msgid "Days from order activation to admit commission" +msgstr "" + +msgid "Bonus amount for becoming affiliate in" +msgstr "" + +msgid "Minimum withdraw amount." +msgstr "" + +msgid "Redirect Url. Where is your client redirected after visiting refferal link" +msgstr "" + +msgid "Hosting settings" +msgstr "" + +msgid "Hosting plan" +msgstr "" + +msgid "Reseller hosting" +msgstr "" + +msgid "Free domain registration" +msgstr "" + +msgid "Free domain transfer" +msgstr "" + +msgid "Hosting plans" +msgstr "" + +msgid "Servers" +msgstr "" + +msgid "Statistics" +msgstr "" + +msgid "Website statistic" +msgstr "" + +msgid "Metric" +msgstr "" + +msgid "This Month" +msgstr "" + +msgid "Today" +msgstr "" + +msgid "Income" +msgstr "" + +msgid "Define date interval for graphs " +msgstr "" + +msgid "Update graphs" +msgstr "" + +msgid "Support tickets" +msgstr "" + +msgid "Orders by status" +msgstr "" + +msgid "Income vs Refund" +msgstr "" + +msgid "Hosting plans and servers" +msgstr "" + +msgid "New server" +msgstr "" + +msgid "New hosting plan" +msgstr "" + +msgid "New server manager" +msgstr "" + +msgid "Addon domains" +msgstr "" + +msgid "Unique name to identify this server" +msgstr "" + +msgid "server1.yourserverdomain.com" +msgstr "" + +msgid "Primary IP address of the server used to connect to it like: 123.123.123.123" +msgstr "" + +msgid "Assigned IP Addresses" +msgstr "" + +msgid "List the IP Addresses assigned to the server (One per line)" +msgstr "" + +msgid "ns1.yourdomain.com" +msgstr "" + +msgid "ns2.yourdomain.com" +msgstr "" + +msgid "ns3.yourdomain.com" +msgstr "" + +msgid "ns4.yourdomain.com" +msgstr "" + +msgid "Login username to your server: root/reseller" +msgstr "" + +msgid "Login password to your server" +msgstr "" + +msgid "Access Hash (Insted of password for cPanel servers)" +msgstr "" + +msgid "Add server" +msgstr "" + +msgid "Adding new hosting plan" +msgstr "" + +msgid "Depending on server manager used to setup hosting account you may require provide additional parameters in next step. In this step provide basic hosting plan information." +msgstr "" + +msgid "Unique name to identify this hosting plan" +msgstr "" + +msgid "Disk quota (MB)" +msgstr "" + +msgid "Bandwidth (MB)" +msgstr "" + +msgid "Create hosting plan" +msgstr "" + +msgid "Adding new server manager" +msgstr "" + +msgid "Follow these instructions to install new hosting server manager." +msgstr "" + +msgid "Check for server manager extensions at" +msgstr "" + +msgid "BoxBilling extensions site" +msgstr "" + +msgid "Download server manager extension file and place it to" +msgstr "" + +msgid "Server manager gateway will be automatically detected." +msgstr "" + +msgid "You can now create/edit servers with new server manager." +msgstr "" + +msgid "BoxBilling documentation" +msgstr "" + +msgid "to learn how to create your own server manager and share it with community" +msgstr "" + +msgid "Import SolusVM clients" +msgstr "" + +msgid "Import selected SolusVM clients to BoxBilling" +msgstr "" + +msgid "Listed in public" +msgstr "" + +msgid "Partner status" +msgstr "" + +msgid "Partner product" +msgstr "" + +msgid "Override price" +msgstr "" + +msgid "Website URL" +msgstr "" + +msgid "Promo" +msgstr "" + +msgid "New promo" +msgstr "" + +msgid "Discount" +msgstr "" + +msgid "Applies to" +msgstr "" + +msgid "Valid period" +msgstr "" + +msgid "Usage" +msgstr "" + +msgid "Create special offers for your clients by creating coupon codes." +msgstr "" + +msgid "Absolute" +msgstr "" + +msgid "Percentage" +msgstr "" + +msgid "Valid time (Leave blank for undefined time)" +msgstr "" + +msgid "Products (Select none to apply to all products)" +msgstr "" + +msgid "Forum details" +msgstr "" + +msgid "Clients logins history" +msgstr "" + +msgid "Search:" +msgstr "" + +msgid "Enter search text.." +msgstr "" + +msgid "Membership details" +msgstr "" + +msgid "Node / ID / VMID" +msgstr "" + +msgid "Operating System" +msgstr "" + +msgid "IP address" +msgstr "" + +msgid "Additional IP addresses" +msgstr "" + +msgid "Root password" +msgstr "" + +msgid "Client area username / password" +msgstr "" + +msgid "Console user / password" +msgstr "" + +msgid "Client area" +msgstr "" + +msgid "Admin area" +msgstr "" + +msgid "Change root password" +msgstr "" + +msgid "New password" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "Change hostname" +msgstr "" + +msgid "New hostname" +msgstr "" + +msgid "Change plan" +msgstr "" + +msgid "New plan" +msgstr "" + +msgid "Rebuild" +msgstr "" + +msgid "New template" +msgstr "" + +msgid "Usage statistics" +msgstr "" + +msgid "Free" +msgstr "" + +msgid "Memory" +msgstr "" + +msgid "Disk usage" +msgstr "" + +msgid "Traffic" +msgstr "" + +msgid "Load" +msgstr "" + +msgid "Master node is offline, order is not yet activated or API is not configured properly." +msgstr "" + +msgid "Service management" +msgstr "" + +msgid "Changing settings does not send actions to SolusVM server." +msgstr "" + +msgid "Main IP address" +msgstr "" + +msgid "SpamChecker settings" +msgstr "" + +msgid "Enable captcha for client registration and contact us forms" +msgstr "" + +msgid "Sign up for Recaptcha key for your domain at" +msgstr "" + +msgid "Recaptcha Enabled" +msgstr "" + +msgid "ReCaptcha Public key" +msgstr "" + +msgid "ReCaptcha Private key" +msgstr "" + +msgid "Akismet settings" +msgstr "" + +msgid "Enable forum messages checking on http://www.akismet.com database" +msgstr "" + +msgid "Enable check" +msgstr "" + +msgid "Akismet API key" +msgstr "" + +msgid "StopForumSpam.com settings" +msgstr "" + +msgid "If enabled, client ip will be checked on http://www.stopforumspam.com database before registration" +msgstr "" + +msgid "Canned responses" +msgstr "" + +msgid "New response" +msgstr "" + +msgid "Categories" +msgstr "" + +msgid "Example extension settings" +msgstr "" + +msgid "Every extension can have settings page. Only requirement is to have mod_example_settings.phtml page in html_admin folder" +msgstr "" + +msgid "Parameter title" +msgstr "" + +msgid "Example custom value" +msgstr "" + +msgid "New note" +msgstr "" + +msgid "Delete all messages" +msgstr "" + +msgid "Add note or todo task" +msgstr "" + +msgid "Add note" +msgstr "" + +msgid "Stock control settings" +msgstr "" + +msgid "Enable stock control" +msgstr "" + +msgid "Allow quantity select on order form" +msgstr "" + +msgid "Quantity in stock" +msgstr "" + +msgid "Plugin name" +msgstr "" + +msgid "Update configuration fields" +msgstr "" + +msgid "Centova Cast" +msgstr "" + +msgid "Centova Cast settings" +msgstr "" + +msgid "Server URL" +msgstr "" + +msgid "Server Hostname" +msgstr "" + +msgid "Server IP" +msgstr "" + +msgid "Register new server" +msgstr "" + +msgid "Edit server" +msgstr "" + +msgid "CentovaCast URL" +msgstr "" + +msgid "Administrator password" +msgstr "" + +msgid "Register Centova Cast server" +msgstr "" + +msgid "Server added" +msgstr "" + +msgid "Create CentovaCast product" +msgstr "" + +msgid "Email templates" +msgstr "" + +msgid "Email settings" +msgstr "" + +msgid "The list is empty. Depending on modules enabled email templates will be inserted after first event occurrence." +msgstr "" + +msgid "Configure email options" +msgstr "" + +msgid "BoxBilling sends emails using sendmail by default or you can configure your own SMTP server" +msgstr "" + +msgid "Email transport" +msgstr "" + +msgid "SendMail" +msgstr "" + +msgid "SMTP" +msgstr "" + +msgid "SMTP Hostname" +msgstr "" + +msgid "SMTP Port" +msgstr "" + +msgid "SMTP Username" +msgstr "" + +msgid "SMTP Password" +msgstr "" + +msgid "SMTP Security" +msgstr "" + +msgid "Update email settings" +msgstr "" + +msgid "Send test email to staff members" +msgstr "" + +msgid "Where I can use new email template?" +msgstr "" + +msgid "Newly created email templates can be used in custom event hooks." +msgstr "" + +msgid "Action code" +msgstr "" + +msgid "Number" +msgstr "" + +msgid "Due at" +msgstr "" + +msgid "Reminded at" +msgstr "" + +msgid "Serie and number" +msgstr "" + +msgid "Tax" +msgstr "" + +msgid "Text before invoice items table" +msgstr "" + +msgid "Text after invoice items table" +msgstr "" + +msgid "Company VAT" +msgstr "" + +msgid "Company Number" +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Last name" +msgstr "" + +msgid "Invoice items" +msgstr "" + +msgid "Transaction Date" +msgstr "" + +msgid "Transaction ID" +msgstr "" + +msgid "Print" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Client area themes" +msgstr "" + +msgid "Admin area themes" +msgstr "" + +msgid "New theme" +msgstr "" + +msgid "Adding new client area theme" +msgstr "" + +msgid "Follow these instructions to install new client area theme." +msgstr "" + +msgid "Check for client area themes at" +msgstr "" + +msgid "Upload new theme files to" +msgstr "" + +msgid "and reload this page" +msgstr "" + +msgid "Client area theme will appear in "Client area themes" tab. And you can select it as default" +msgstr "" + +msgid "For theme designers. Read" +msgstr "" + +msgid "to learn how to create your own theme" +msgstr "" + +msgid "Adding new admin area theme" +msgstr "" + +msgid "Admin area follows same logic as client area themes with one additional rule: admin theme directory must be prefixed with "admin_"." +msgstr "" + +msgid "Quantity" +msgstr "" + +msgid "Canned response" +msgstr "" + +msgid "New product" +msgstr "" + +msgid "Priority" +msgstr "" + +msgid "Update priority" +msgstr "" + +msgid "Sent emails" +msgstr "" + +msgid "Subscriptions" +msgstr "" + +msgid "New subscription" +msgstr "" + +msgid "Subscription ID on payment gateway" +msgstr "" + +msgid "Period" +msgstr "" + +msgid "Import existing" +msgstr "" + +msgid "Domain name" +msgstr "" + +msgid "Domain TLD" +msgstr "" + +msgid "File" +msgstr "" + +msgid "Currently uploaded file" +msgstr "" + +msgid "No icons available" +msgstr "" + +msgid "Filter clients" +msgstr "" + +msgid "All" +msgstr "" + +msgid "New client" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "Ticket" +msgstr "" + +msgid "Task" +msgstr "" + +msgid "Client tickets" +msgstr "" + +msgid "Help desk" +msgstr "" + +msgid "Total responses" +msgstr "" + +msgid "Task status" +msgstr "" + +msgid "Related to" +msgstr "" + +msgid "Upgrade to" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Something went wrong here" +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Back to Dashboard" +msgstr "" + +msgid "Transaction" +msgstr "" + +msgid "IPN" +msgstr "" + +msgid "Transaction details" +msgstr "" + +msgid "If you are sure that this transaction is valid you can update transaction details in "Manage" tab and try processing transaction again" +msgstr "" + +msgid "Payment gateway" +msgstr "" + +msgid "Transaction ID on payment gateway" +msgstr "" + +msgid "Transaction status on payment gateway" +msgstr "" + +msgid "Note" +msgstr "" + +msgid "Process" +msgstr "" + +msgid "Invoice ID" +msgstr "" + +msgid "Transaction processing information" +msgstr "" + +msgid "Validate IPN" +msgstr "" + +msgid "Transaction information on payment gateway" +msgstr "" + +msgid "Transaction type" +msgstr "" + +msgid "Transaction status on Payment Gateway" +msgstr "" + +msgid "Transaction ID on Payment Gateway" +msgstr "" + +msgid "Note about this transaction" +msgstr "" + +msgid "GET" +msgstr "" + +msgid "No GET parameters received" +msgstr "" + +msgid "POST" +msgstr "" + +msgid "No POST parameters received" +msgstr "" + +msgid "SERVER" +msgstr "" + +msgid "No SERVER parameters logged" +msgstr "" + +msgid "Braunstein extension settings" +msgstr "" + +msgid "Required fields for client" +msgstr "" + +msgid "Select which fields are required to be filled up by client on signup form" +msgstr "" + +msgid "Company name" +msgstr "" + +msgid "Gender" +msgstr "" + +msgid "Birthday" +msgstr "" + +msgid "Address details" +msgstr "" + +msgid "Address line 1" +msgstr "" + +msgid "Address line 2" +msgstr "" + +msgid "Postcode/Zip" +msgstr "" + +msgid "My Products & Services" +msgstr "" + +msgid "Filter orders" +msgstr "" + +msgid "Product" +msgstr "" + +msgid "Invoice option" +msgstr "" + +msgid "Creation date" +msgstr "" + +msgid "Pending setup" +msgstr "" + +msgid "Supended" +msgstr "" + +msgid "New order" +msgstr "" + +msgid "Continue" +msgstr "" + +msgid "Domain action" +msgstr "" + +msgid "Register domain" +msgstr "" + +msgid "Domain name to register" +msgstr "" + +msgid "Years" +msgstr "" + +msgid "Transfer domain" +msgstr "" + +msgid "Domain name to transfer" +msgstr "" + +msgid "Domain transfer code" +msgstr "" + +msgid "License settings" +msgstr "" + +msgid "Prefix" +msgstr "" + +msgid "Length" +msgstr "" + +msgid "Validate Hostname" +msgstr "" + +msgid "Validate Version" +msgstr "" + +msgid "Validate Path" +msgstr "" + +msgid "License plugins" +msgstr "" + +msgid "BoxBilling gives you ability to provide your own license generation script. Follow instructions bellow to install new license plugin" +msgstr "" + +msgid "License plugin is PHP class \"License_PluginName\" with one method" +msgstr "" + +msgid "Take a look at default plugin at" +msgstr "" + +msgid "Create your plugin and place it to" +msgstr "" + +msgid "BoxBilling will automatically detect new plugin" +msgstr "" + +msgid "Read" +msgstr "" + +msgid "for more information." +msgstr "" + +msgid "Filter support tickets" +msgstr "" + +msgid "Order ID" +msgstr "" + +msgid "Ticket subject" +msgstr "" + +msgid "Ticket messages" +msgstr "" + +msgid "New ticket" +msgstr "" + +msgid "New email" +msgstr "" + +msgid "Last message" +msgstr "" + +msgid "ago" +msgstr "" + +msgid "Open ticket for existing client" +msgstr "" + +msgid "Open public ticket for non client" +msgstr "" + +msgid "Receivers name" +msgstr "" + +msgid "John Smith" +msgstr "" + +msgid "to@gmail.com" +msgstr "" + +msgid "Sent" +msgstr "" + +msgid "Resend" +msgstr "" + +msgid "Top level domains" +msgstr "" + +msgid "New top level domain" +msgstr "" + +msgid "Registrars" +msgstr "" + +msgid "New domain registrar" +msgstr "" + +msgid "Manage TLDs" +msgstr "" + +msgid "Setup domain pricing and allowed operations. Assign specific domain registrars for each Top Level Domain (TLD)" +msgstr "" + +msgid "TLD" +msgstr "" + +msgid "Registration" +msgstr "" + +msgid "Renew" +msgstr "" + +msgid "Transfer" +msgstr "" + +msgid "Operations" +msgstr "" + +msgid "Allow register:" +msgstr "" + +msgid "Allow transfer:" +msgstr "" + +msgid "Active:" +msgstr "" + +msgid "Add new top level domain" +msgstr "" + +msgid "Setup new TLD prices and properties" +msgstr "" + +msgid "Tld" +msgstr "" + +msgid "Domain registrars" +msgstr "" + +msgid "Manage domain registrars" +msgstr "" + +msgid "Setup default nameservers that will be used for new domain registrations if client have not provided his own nameservers in order form" +msgstr "" + +msgid "Update nameservers" +msgstr "" + +msgid "Adding new domain registrar" +msgstr "" + +msgid "Follow instrunctions bellow to install new domain registrar." +msgstr "" + +msgid "Check domain registrar you are looking for is available at" +msgstr "" + +msgid "Download domain registrar file and place to" +msgstr "" + +msgid "Reload this page to see newly detected domain registrar" +msgstr "" + +msgid "Click on install button. Now you will be able to create top level domains with new domain registrar" +msgstr "" + +msgid "to learn how to create your own domain registrar." +msgstr "" + +msgid "SEO settings" +msgstr "" + +msgid "Ping sitemap to Google" +msgstr "" + +msgid "Ping sitemap to Yahoo" +msgstr "" + +msgid "Ping sitemap to Bing" +msgstr "" + +msgid "management" +msgstr "" + +msgid "Support ticket" +msgstr "" + +msgid "Staff member" +msgstr "" + +msgid "Announcement" +msgstr "" + +msgid "Knowledge base article" +msgstr "" + +msgid "Forum topic" +msgstr "" + +msgid "Tax rules" +msgstr "" + +msgid "New tax rule" +msgstr "" + +msgid "Tax settings" +msgstr "" + +msgid "EU VAT" +msgstr "" + +msgid "State/Region" +msgstr "" + +msgid "Tax rate" +msgstr "" + +msgid "Applies to any country" +msgstr "" + +msgid "Applies to any state" +msgstr "" + +msgid "Enable tax support" +msgstr "" + +msgid "Automatic VAT Tax Rules Setup" +msgstr "" + +msgid "If you would like BoxBilling to automatically setup the EU VAT tax rules for you for all EU Member States then simply enter your VAT Label & local VAT rate below and click the submit button. This action will delete any existing tax rules and configure the VAT rates for all EU countries." +msgstr "" + +msgid "VAT Label" +msgstr "" + +msgid "VAT" +msgstr "" + +msgid "VAT rate" +msgstr "" + +msgid "21" +msgstr "" + +msgid "Create EU VAT Rules" +msgstr "" + +msgid "Tax title" +msgstr "" + +msgid "sales Tax" +msgstr "" + +msgid "18" +msgstr "" + +msgid "Leave empty to apply to all states" +msgstr "" + +msgid "Yesterday" +msgstr "" + +msgid "This month so far" +msgstr "" + +msgid "Latest orders" +msgstr "" + +msgid "Product sales" +msgstr "" + +msgid "Product/Service" +msgstr "" + +msgid "No active orders available" +msgstr "" + +msgid "Define date interval for graphs" +msgstr "" + +msgid "Recent clients activity" +msgstr "" + +msgid "Recent staff activity" +msgstr "" + +msgid "Create new order" +msgstr "" + +msgid "for" +msgstr "" + +msgid "Activate order" +msgstr "" + +msgid "Place new order" +msgstr "" + +msgid "Order management" +msgstr "" + +msgid "Edit order" +msgstr "" + +msgid "History" +msgstr "" + +msgid "Support" +msgstr "" + +msgid "Payment amount" +msgstr "" + +msgid "Order status" +msgstr "" + +msgid "Order created" +msgstr "" + +msgid "Activated at" +msgstr "" + +msgid "Renewal date" +msgstr "" + +msgid "Order notes" +msgstr "" + +msgid "Order group ID" +msgstr "" + +msgid "Order promo code" +msgstr "" + +msgid "Active support tickets" +msgstr "" + +msgid "Reason of suspendation" +msgstr "" + +msgid "Suspendation reason" +msgstr "" + +msgid "Reason of cancelation" +msgstr "" + +msgid "Cancelation reason" +msgstr "" + +msgid "Changes status without performing action" +msgstr "" + +msgid "Addons you have ordered with this service" +msgstr "" + +msgid "Billing Cycle" +msgstr "" + +msgid "Next due date" +msgstr "" + +msgid "Order invoices" +msgstr "" + +msgid "Order status change history" +msgstr "" + +msgid "Support tickets regarding this order" +msgstr "" + +msgid "BoxBilling license management" +msgstr "" + +msgid "License order ID" +msgstr "" + +msgid "License key" +msgstr "" + +msgid "Valid IPs" +msgstr "" + +msgid "Valid hostnames" +msgstr "" + +msgid "Valid versions" +msgstr "" + +msgid "Valid install paths" +msgstr "" + +msgid "Order is not activated or not found" +msgstr "" + +msgid "Example module" +msgstr "" + +msgid "Example module title" +msgstr "" + +msgid "This is an example extension content" +msgstr "" + +msgid "Parameters from Controller" +msgstr "" + +msgid "Parameters from URL" +msgstr "" + +msgid "API example" +msgstr "" + +msgid "README" +msgstr "" + +msgid "Subscription" +msgstr "" + +msgid "Subscription details" +msgstr "" + +msgid "Support help desk" +msgstr "" + +msgid "Help desk name will be visible for clients when submitting new ticket. Define very large number of hours to disable auto close ticket option" +msgstr "" + +msgid "Server Name" +msgstr "" + +msgid "Account IP" +msgstr "" + +msgid "per month" +msgstr "" + +msgid "Jump to cPanel" +msgstr "" + +msgid "Reseller control panel" +msgstr "" + +msgid "Change hosting plan" +msgstr "" + +msgid "Hosting plan changed" +msgstr "" + +msgid "Change account password" +msgstr "" + +msgid "Account password changed" +msgstr "" + +msgid "Password Confirm" +msgstr "" + +msgid "Change IP" +msgstr "" + +msgid "Account IP changed" +msgstr "" + +msgid "Change username" +msgstr "" + +msgid "Account username changed" +msgstr "" + +msgid "Change domain" +msgstr "" + +msgid "Account domain changed" +msgstr "" + +msgid "Client area languages" +msgstr "" + +msgid "New language" +msgstr "" + +msgid "Language" +msgstr "" + +msgid "BoxBilling in your language" +msgstr "" + +msgid "Although BoxBilling displays in U.S. English by default, the software has the built-in capability to be used in any language. Follow instructions bellow to install new language." +msgstr "" + +msgid "Check if your language translation file is available at" +msgstr "" + +msgid "Download language files and place them to" +msgstr "" + +msgid "Language will be automatically available and can be changed in client area" +msgstr "" + +msgid "Installing BoxBilling in Your Language" +msgstr "" + +msgid "to learn how to install files that will transform BoxBilling so it displays in your language." +msgstr "" + +msgid "Translations can be made with" +msgstr "" + +msgid "software" +msgstr "" + +msgid "Changing default language" +msgstr "" + +msgid "Default language can be set in" +msgstr "" + +msgid "Removing language" +msgstr "" + +msgid "Removing languages from BoxBilling is really simple. Just delete language folder you wish from" +msgstr "" + +msgid "Partners list" +msgstr "" + +msgid "Logo" +msgstr "" + +msgid "Sales" +msgstr "" + +msgid "Signup Date" +msgstr "" + +msgid "Global partners limits and settings" +msgstr "" + +msgid "Default product which partners are reselling." +msgstr "" + +msgid "Default order limit for partner per day. Used to prevent API abuse" +msgstr "" + +msgid "Optional rules for becoming partner" +msgstr "" + +msgid "Product which must be ordered before becoming partner" +msgstr "" + +msgid "Check partners balance before creating new order for available amount" +msgstr "" + +msgid "How much money must be on clients balance to become a partner" +msgstr "" + +msgid "Registrar configuration" +msgstr "" + +msgid "Registrar title" +msgstr "" + +msgid "Post updated" +msgstr "" + +msgid "Post created" +msgstr "" + +msgid "Last update" +msgstr "" + +msgid "Create main administrator account" +msgstr "" + +msgid "Enter your email address" +msgstr "" + +msgid "Enter your password" +msgstr "" + +msgid "Create administrator account" +msgstr "" + +msgid "Remember me" +msgstr "" + +msgid "Log me in" +msgstr "" + +msgid "Extensions" +msgstr "" + +msgid "Update BoxBilling" +msgstr "" + +msgid "Learn more about extensions" +msgstr "" + +msgid "Hooks" +msgstr "" + +msgid "Activate or deactivate extensions" +msgstr "" + +msgid "Deactivate" +msgstr "" + +msgid "Module settings" +msgstr "" + +msgid "Hook" +msgstr "" + +msgid "Automatic update" +msgstr "" + +msgid "Automatic updater is a tool to update BoxBilling to latest version in one click. Works on these hosting environments where PHP has permissions to overwrite files uploaded via FTP." +msgstr "" + +msgid "Manual update" +msgstr "" + +msgid "Manual update is a solution when auto updater can not work on current installation environment" +msgstr "" + +msgid "Extending BoxBilling" +msgstr "" + +msgid "BoxBilling gives developers all the capabilities to customize, integrate & extend the core system into your own website & applications." +msgstr "" + +msgid "File manager" +msgstr "" + +msgid "Full screen" +msgstr "" + diff --git a/src/bb-locale/en_US/LC_MESSAGES/index.html b/src/bb-locale/en_US/LC_MESSAGES/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-locale/en_US/LC_MESSAGES/messages.mo b/src/bb-locale/en_US/LC_MESSAGES/messages.mo new file mode 100644 index 000000000..f7c6b9835 Binary files /dev/null and b/src/bb-locale/en_US/LC_MESSAGES/messages.mo differ diff --git a/src/bb-locale/en_US/LC_MESSAGES/messages.po b/src/bb-locale/en_US/LC_MESSAGES/messages.po new file mode 100644 index 000000000..9638c8fb3 --- /dev/null +++ b/src/bb-locale/en_US/LC_MESSAGES/messages.po @@ -0,0 +1,5537 @@ +msgid "" +msgstr "" +"Project-Id-Version: BoxBilling\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: \n" +"PO-Revision-Date: 2012-08-02 09:38+0300\n" +"Last-Translator: BoxBilling \n" +"Language-Team: BoxBilling \n" +"Language: English\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"X-Poedit-KeywordsList: __;gettext;Box_Exception\n" +"X-Poedit-Basepath: ../../../\n" +"X-Poedit-Language: English\n" +"X-Poedit-Country: UNITED STATES\n" +"X-Poedit-SourceCharset: utf-8\n" +"X-Poedit-SearchPath-0: bb-library/Api\n" +"X-Poedit-SearchPath-1: bb-library/Box\n" +"X-Poedit-SearchPath-2: bb-library/License\n" +"X-Poedit-SearchPath-3: bb-library/Model\n" +"X-Poedit-SearchPath-4: bb-modules\n" + +msgid "sq_AL" +msgstr "Albanian (Albania)" + +msgid "ar_DZ" +msgstr "Arabic (Algeria)" + +msgid "ar_BH" +msgstr "Arabic (Bahrain)" + +msgid "ar_EG" +msgstr "Arabic (Egypt)" + +msgid "ar_IQ" +msgstr "Arabic (Iraq)" + +msgid "ar_JO" +msgstr "Arabic (Jordan)" + +msgid "ar_KW" +msgstr "Arabic (Kuwait)" + +msgid "ar_LB" +msgstr "Arabic (Lebanon)" + +msgid "ar_LY" +msgstr "Arabic (Libya)" + +msgid "ar_MA" +msgstr "Arabic (Morocco)" + +msgid "ar_OM" +msgstr "Arabic (Oman)" + +msgid "ar_QA" +msgstr "Arabic (Qatar)" + +msgid "ar_SA" +msgstr "Arabic (Saudi Arabia)" + +msgid "ar_SD" +msgstr "Arabic (Sudan)" + +msgid "ar_SY" +msgstr "Arabic (Syria)" + +msgid "ar_TN" +msgstr "Arabic (Tunisia)" + +msgid "ar_AE" +msgstr "Arabic (United Arab Emirates)" + +msgid "ar_YE" +msgstr "Arabic (Yemen)" + +msgid "be_BY" +msgstr "Belarusian (Belarus)" + +msgid "bg_BG" +msgstr "Bulgarian (Bulgaria)" + +msgid "ca_ES" +msgstr "Catalan (Spain)" + +msgid "zh_CN" +msgstr "Chinese (China)" + +msgid "zh_HK" +msgstr "Chinese (Hong Kong)" + +msgid "zh_SG" +msgstr "Chinese (Singapore)" + +msgid "zh_TW" +msgstr "Chinese (Taiwan)" + +msgid "hr_HR" +msgstr "Croatian (Croatia)" + +msgid "cs_CZ" +msgstr "Czech (Czech Republic)" + +msgid "da_DK" +msgstr "Danish (Denmark)" + +msgid "nl_BE" +msgstr "Dutch (Belgium)" + +msgid "nl_NL" +msgstr "Dutch (Netherlands)" + +msgid "en_AU" +msgstr "English (Australia)" + +msgid "en_CA" +msgstr "English (Canada)" + +msgid "en_IN" +msgstr "English (India)" + +msgid "en_IE" +msgstr "English (Ireland)" + +msgid "en_MT" +msgstr "English (Malta)" + +msgid "en_NZ" +msgstr "English (New Zealand)" + +msgid "en_PH" +msgstr "English (Philippines)" + +msgid "en_SG" +msgstr "English (Singapore)" + +msgid "en_ZA" +msgstr "English (South Africa)" + +msgid "en_GB" +msgstr "English (United Kingdom)" + +msgid "en_US" +msgstr "English (United States)" + +msgid "et_EE" +msgstr "Estonian (Estonia)" + +msgid "fi_FI" +msgstr "Finnish (Finland)" + +msgid "fr_BE" +msgstr "French (Belgium)" + +msgid "fr_CA" +msgstr "French (Canada)" + +msgid "fr_FR" +msgstr "French (France)" + +msgid "fr_LU" +msgstr "French (Luxembourg)" + +msgid "fr_CH" +msgstr "French (Switzerland)" + +msgid "de_AT" +msgstr "German (Austria)" + +msgid "de_DE" +msgstr "German (Germany)" + +msgid "de_LU" +msgstr "German (Luxembourg)" + +msgid "de_CH" +msgstr "German (Switzerland)" + +msgid "el_CY" +msgstr "Greek (Cyprus)" + +msgid "el_GR" +msgstr "Greek (Greece)" + +msgid "iw_IL" +msgstr "Hebrew (Israel)" + +msgid "hi_IN" +msgstr "Hindi (India)" + +msgid "hu_HU" +msgstr "Hungarian (Hungary)" + +msgid "is_IS" +msgstr "Icelandic (Iceland)" + +msgid "in_ID" +msgstr "Indonesian (Indonesia)" + +msgid "ga_IE" +msgstr "Irish (Ireland)" + +msgid "it_IT" +msgstr "Italian (Italy)" + +msgid "it_CH" +msgstr "Italian (Switzerland)" + +msgid "ja_JP" +msgstr "Japanese (Japan)" + +msgid "ja_JP_JP" +msgstr "Japanese (Japan,JP)" + +msgid "ko_KR" +msgstr "Korean (South Korea)" + +msgid "lv_LV" +msgstr "Latvian (Latvia)" + +msgid "lt_LT" +msgstr "Lithuanian (Lithuania)" + +msgid "mk_MK" +msgstr "Macedonian (Macedonia)" + +msgid "ms_MY" +msgstr "Malay (Malaysia)" + +msgid "mt_MT" +msgstr "Maltese (Malta)" + +msgid "no_NO" +msgstr "Norwegian (Norway)" + +msgid "no_NO_NY" +msgstr "Norwegian (Norway,Nynorsk)" + +msgid "pl_PL" +msgstr "Polish (Poland)" + +msgid "pt_BR" +msgstr "Portuguese (Brazil)" + +msgid "pt_PT" +msgstr "Portuguese (Portugal)" + +msgid "ro_RO" +msgstr "Romanian (Romania)" + +msgid "ru_RU" +msgstr "Russian (Russia)" + +msgid "sr_BA" +msgstr "Serbian (Bosnia and Herzegovina)" + +msgid "sr_ME" +msgstr "Serbian (Montenegro)" + +msgid "sr_CS" +msgstr "Serbian (Serbia and Montenegro)" + +msgid "sr_RS" +msgstr "Serbian (Serbia)" + +msgid "sk_SK" +msgstr "Slovak (Slovakia)" + +msgid "sl_SI" +msgstr "Slovenian (Slovenia)" + +msgid "es_AR" +msgstr "Spanish (Argentina)" + +msgid "es_BO" +msgstr "Spanish (Bolivia)" + +msgid "es_CL" +msgstr "Spanish (Chile)" + +msgid "es_CO" +msgstr "Spanish (Colombia)" + +msgid "es_CR" +msgstr "Spanish (Costa Rica)" + +msgid "es_DO" +msgstr "Spanish (Dominican Republic)" + +msgid "es_EC" +msgstr "Spanish (Ecuador)" + +msgid "es_SV" +msgstr "Spanish (El Salvador)" + +msgid "es_GT" +msgstr "Spanish (Guatemala)" + +msgid "es_HN" +msgstr "Spanish (Honduras)" + +msgid "es_MX" +msgstr "Spanish (Mexico)" + +msgid "es_NI" +msgstr "Spanish (Nicaragua)" + +msgid "es_PA" +msgstr "Spanish (Panama)" + +msgid "es_PY" +msgstr "Spanish (Paraguay)" + +msgid "es_PE" +msgstr "Spanish (Peru)" + +msgid "es_PR" +msgstr "Spanish (Puerto Rico)" + +msgid "es_ES" +msgstr "Spanish (Spain)" + +msgid "es_US" +msgstr "Spanish (United States)" + +msgid "es_UY" +msgstr "Spanish (Uruguay)" + +msgid "es_VE" +msgstr "Spanish (Venezuela)" + +msgid "sv_SE" +msgstr "Swedish (Sweden)" + +msgid "th_TH" +msgstr "Thai (Thailand)" + +msgid "tr_TR" +msgstr "Turkish (Turkey)" + +msgid "uk_UA" +msgstr "Ukrainian (Ukraine)" + +msgid "vi_VN" +msgstr "Vietnamese (Vietnam)" + +msgid "Thread / Thread Starter" +msgstr "" + +msgid "Last post" +msgstr "" + +msgid "Replies" +msgstr "" + +msgid "Views" +msgstr "" + +msgid "by" +msgstr "" + +msgid "The list is empty" +msgstr "" + +msgid "Forum list" +msgstr "" + +msgid "New topic" +msgstr "" + +msgid "Register" +msgstr "" + +msgid "Start new topic in" +msgstr "" + +msgid "Start new topic" +msgstr "" + +msgid "Topic title" +msgstr "" + +msgid "Topic message" +msgstr "" + +msgid "Create new topic" +msgstr "" + +msgid "Login / Sign up" +msgstr "" + +msgid "Sign In / Create new account" +msgstr "" + +msgid "Become a member to participate in forum, contact support, order new services" +msgstr "" + +msgid "Sign in" +msgstr "" + +msgid "Login to client area" +msgstr "" + +msgid "Email Address" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Reset password" +msgstr "" + +msgid "Do not have an account yet?" +msgstr "" + +msgid "Enter your details below" +msgstr "" + +msgid "Create new profile" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Last Name" +msgstr "" + +msgid "Company" +msgstr "" + +msgid "Password confirm" +msgstr "" + +msgid "Thank you" +msgstr "" + +msgid "Payment for invoice received" +msgstr "" + +msgid "Your payment is being processed right now. This takes about 5 minutes to complete." +msgstr "" + +msgid "You will be automatically redirected to invoice page after 5 minutes." +msgstr "" + +msgid "Invoices" +msgstr "" + +msgid "List of invoices" +msgstr "" + +msgid "Invoice management" +msgstr "" + +msgid "Unpaid" +msgstr "" + +msgid "Paid" +msgstr "" + +msgid "Title" +msgstr "" + +msgid "Issue Date" +msgstr "" + +msgid "Due Date" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "Pay" +msgstr "" + +msgid "Paid at" +msgstr "" + +msgid "Forum" +msgstr "" + +msgid "Welcome to our forums. If you wish to become a member and post, you have to be registered member." +msgstr "" + +msgid "Threads" +msgstr "" + +msgid "Posts" +msgstr "" + +msgid "Forums are closed" +msgstr "" + +msgid "Favorite topics" +msgstr "" + +msgid "VPS management" +msgstr "" + +msgid "Details" +msgstr "" + +msgid "Statistics" +msgstr "" + +msgid "Manage" +msgstr "" + +msgid "Control panel" +msgstr "" + +msgid "State" +msgstr "" + +msgid "Refresh" +msgstr "" + +msgid "Hostname" +msgstr "" + +msgid "Plan" +msgstr "" + +msgid "Operating system" +msgstr "" + +msgid "IP address" +msgstr "" + +msgid "Additional IP addresses" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Root password" +msgstr "" + +msgid "Change status" +msgstr "" + +msgid "VPS rebooting. Refresh page after a few moments." +msgstr "" + +msgid "Reboot" +msgstr "" + +msgid "VPS booting. Refresh page after a few moments." +msgstr "" + +msgid "Boot" +msgstr "" + +msgid "VPS shutdown" +msgstr "" + +msgid "Shutdown" +msgstr "" + +msgid "Change hostname" +msgstr "" + +msgid "Hostname changed" +msgstr "" + +msgid "New hostname" +msgstr "" + +msgid "Enter new hostname" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "Change operating system" +msgstr "" + +msgid "Operating system is being changed" +msgstr "" + +msgid "New operating system" +msgstr "" + +msgid "Change root password" +msgstr "" + +msgid "Root password changed" +msgstr "" + +msgid "New password" +msgstr "" + +msgid "Enter new root password" +msgstr "" + +msgid "Bandwidth" +msgstr "" + +msgid "Used" +msgstr "" + +msgid "Free" +msgstr "" + +msgid "Memory" +msgstr "" + +msgid "Disk usage" +msgstr "" + +msgid "Boot up server to see statistics" +msgstr "" + +msgid "Are you sure?" +msgstr "" + +msgid "VPS booting. Reload page after a few moments." +msgstr "" + +msgid "Login details" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Open control panel" +msgstr "" + +msgid "Change password" +msgstr "" + +msgid "Change client area password" +msgstr "" + +msgid "Client area password changed" +msgstr "" + +msgid "Enter new password" +msgstr "" + +msgid "Dashboard" +msgstr "" + +msgid "Shopping cart" +msgstr "" + +msgid "Profile" +msgstr "" + +msgid "Sign out" +msgstr "" + +msgid "Email address" +msgstr "" + +msgid "Select language" +msgstr "" + +msgid "Popular articles" +msgstr "" + +msgid "Recent posts" +msgstr "" + +msgid "About us" +msgstr "" + +msgid "Terms and conditions" +msgstr "" + +msgid "Privacy policy" +msgstr "" + +msgid "Loading .." +msgstr "" + +msgid "Incorrect please try again" +msgstr "" + +msgid "Enter the words above" +msgstr "" + +msgid "Support tickets" +msgstr "" + +msgid "Need an answer? We are here to help" +msgstr "" + +msgid "Id" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "Help desk" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Submitted" +msgstr "" + +msgid "ago" +msgstr "" + +msgid "Submit new ticket" +msgstr "" + +msgid "Submit new support ticket" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Submit" +msgstr "" + +msgid "Knowledge base" +msgstr "" + +msgid "Blog" +msgstr "" + +msgid "News & Announcements" +msgstr "" + +msgid "Track our latest posts" +msgstr "" + +msgid "Read more.." +msgstr "" + +msgid "Centova Cast server" +msgstr "" + +msgid "Recent tracks" +msgstr "" + +msgid "Unable to connect to server" +msgstr "" + +msgid "No recent tracks are available" +msgstr "" + +msgid "Download file" +msgstr "" + +msgid "Download" +msgstr "" + +msgid "Back to emails" +msgstr "" + +msgid "From" +msgstr "" + +msgid "To" +msgstr "" + +msgid "Sent" +msgstr "" + +msgid "Resend" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "Back to list" +msgstr "" + +msgid "Topic information" +msgstr "" + +msgid "Topic" +msgstr "" + +msgid "Started By" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "Since" +msgstr "" + +msgid "Back to threads list" +msgstr "" + +msgid "Reply" +msgstr "" + +msgid "Quote" +msgstr "" + +msgid "Post new message in forum" +msgstr "" + +msgid "Post" +msgstr "" + +msgid "No replies in this topic" +msgstr "" + +msgid "Processing payment ..." +msgstr "" + +msgid "Redirecting to payment gateway.." +msgstr "" + +msgid "Please click here to continue if this page does not redirect automatically in 5 seconds" +msgstr "" + +msgid "Quantity:" +msgstr "" + +msgid "Total price:" +msgstr "" + +msgid "Price" +msgstr "" + +msgid "Setup Price" +msgstr "" + +msgid "Continue" +msgstr "" + +msgid "Order now" +msgstr "" + +msgid "Proforma invoice" +msgstr "" + +msgid "Proforma Invoice" +msgstr "" + +msgid "Please choose payment type and pay for your chosen products." +msgstr "" + +msgid "Invoice" +msgstr "" + +msgid "Invoice is paid" +msgstr "" + +msgid "Account" +msgstr "" + +msgid "Company number" +msgstr "" + +msgid "VAT" +msgstr "" + +msgid "Discount" +msgstr "" + +msgid "Pay by" +msgstr "" + +msgid "Subscribe with" +msgstr "" + +msgid "Total:" +msgstr "" + +msgid "Pay now" +msgstr "" + +msgid "Transactions" +msgstr "" + +msgid "Transaction Date" +msgstr "" + +msgid "Transaction ID" +msgstr "" + +msgid "Gateway" +msgstr "" + +msgid "Amount" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Print" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "CPU" +msgstr "" + +msgid "RAM" +msgstr "" + +msgid "Disk space" +msgstr "" + +msgid "Monthly price" +msgstr "" + +msgid "Order confirm" +msgstr "" + +msgid "Order confirmation" +msgstr "" + +msgid "These are the products you have selected" +msgstr "" + +msgid "Product" +msgstr "" + +msgid "Period" +msgstr "" + +msgid "setup" +msgstr "" + +msgid "Have a promo code?" +msgstr "" + +msgid "Apply" +msgstr "" + +msgid "Reset" +msgstr "" + +msgid "Checkout" +msgstr "" + +msgid "You have not selected any product" +msgstr "" + +msgid "Order new service" +msgstr "" + +msgid "Home" +msgstr "" + +msgid "Order" +msgstr "" + +msgid "Knowledge Base" +msgstr "" + +msgid "Contact us" +msgstr "" + +msgid "Support" +msgstr "" + +msgid "Services" +msgstr "" + +msgid "Emails" +msgstr "" + +msgid "Payment history" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Send" +msgstr "" + +msgid "Affiliate statistics" +msgstr "" + +msgid "#" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "by " +msgstr "" + +msgid "Configure" +msgstr "" + +msgid "The product/service you have chosen has the following configuration options for you to choose from." +msgstr "" + +msgid "Payments history" +msgstr "" + +msgid "Here you can track your payments you have made and what you have been charged for" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Add Funds" +msgstr "" + +msgid "Balance" +msgstr "" + +msgid "Add funds in advance" +msgstr "" + +msgid "You can add funds to your account if you have active order." +msgstr "" + +msgid "Add funds" +msgstr "" + +msgid "Similiar articles" +msgstr "" + +msgid "Knowledge base categories" +msgstr "" + +msgid "Terms and Conditions" +msgstr "" + +msgid "Ticket ID" +msgstr "" + +msgid "Time opened" +msgstr "" + +msgid "Related to" +msgstr "" + +msgid "Service #" +msgstr "" + +msgid "Tickets list" +msgstr "" + +msgid "Close ticket" +msgstr "" + +msgid "Manage hosting account" +msgstr "" + +msgid "Domain" +msgstr "" + +msgid "Server IP" +msgstr "" + +msgid "Server Hostname" +msgstr "" + +msgid "Hosting plan" +msgstr "" + +msgid "per month" +msgstr "" + +msgid "Disk quota" +msgstr "" + +msgid "Manage domain" +msgstr "" + +msgid "Jump to cPanel" +msgstr "" + +msgid "Reseller control panel" +msgstr "" + +msgid "Nameservers" +msgstr "" + +msgid "Nameserver 1" +msgstr "" + +msgid "Nameserver 2" +msgstr "" + +msgid "Nameserver 3" +msgstr "" + +msgid "Nameserver 4" +msgstr "" + +msgid "FTP details" +msgstr "" + +msgid "Use these details to connect to your FTP account." +msgstr "" + +msgid "FTP IP" +msgstr "" + +msgid "FTP Username" +msgstr "" + +msgid "FTP Password" +msgstr "" + +msgid "Change account password" +msgstr "" + +msgid "Change your FTP cPanel SSH password." +msgstr "" + +msgid "Password Confirm" +msgstr "" + +msgid "Change username" +msgstr "" + +msgid "Change domain" +msgstr "" + +msgid "Vps hostname" +msgstr "" + +msgid "Enter hostname for VPS: mydomain.com" +msgstr "" + +msgid "OS template" +msgstr "" + +msgid "Become Partner" +msgstr "" + +msgid "Login and become partner" +msgstr "" + +msgid "Manage profile" +msgstr "" + +msgid "Allow to be listed in partners list" +msgstr "" + +msgid "Your website where you sell BoxBilling licenses" +msgstr "" + +msgid "URL to your logo" +msgstr "" + +msgid "Update partner information" +msgstr "" + +msgid "Public profile" +msgstr "" + +msgid "Purchase License" +msgstr "" + +msgid "License key" +msgstr "" + +msgid "Valid IPs" +msgstr "" + +msgid "Valid hostnames" +msgstr "" + +msgid "Valid versions" +msgstr "" + +msgid "Valid install paths" +msgstr "" + +msgid "Profile details" +msgstr "" + +msgid "Keep your profile up to date" +msgstr "" + +msgid "Change Password" +msgstr "" + +msgid "Gravatar" +msgstr "" + +msgid "Currency" +msgstr "" + +msgid "API" +msgstr "" + +msgid "Update profile" +msgstr "" + +msgid "Company Name" +msgstr "" + +msgid "Phone Country Code" +msgstr "" + +msgid "Phone Number" +msgstr "" + +msgid "Address" +msgstr "" + +msgid "Address 2" +msgstr "" + +msgid "City" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "Zip/Postal Code" +msgstr "" + +msgid "API key" +msgstr "" + +msgid "API key allows integration with external applications. You will need this key for authentication." +msgstr "" + +msgid "Warning! Resetting the key will break existing applications using it." +msgstr "" + +msgid "Your API key" +msgstr "" + +msgid "Reset key" +msgstr "" + +msgid "Please register with" +msgstr "" + +msgid "at " +msgstr "" + +msgid "to change your profile image. Gravatar image updates may not appear immediately." +msgstr "" + +msgid "Your profile currency is" +msgstr "" + +msgid "Create new client profile if you want to manage your money in other currency" +msgstr "" + +msgid "Your profile currency will be defined after your first order. Once your currency is set, all your profile accounting will be managed in that currency and can not be changed." +msgstr "" + +msgid "Addons & extras" +msgstr "" + +msgid "Domain management" +msgstr "" + +msgid "Domain details" +msgstr "" + +msgid "Registration date" +msgstr "" + +msgid "Expires at" +msgstr "" + +msgid "Domain Secret" +msgstr "" + +msgid "All domain names (except a .EU, .UK domain name) have a Domain (Transfer) Secret Key/Authorization Code (EPP Code) associated with them. This would be required if you want to transfer service." +msgstr "" + +msgid "Get EPP code" +msgstr "" + +msgid "Domain Protection" +msgstr "" + +msgid "Domain locking is a security enhancement to prevent unauthorized transfers of your domain to another registrar or web host by \"locking\" your domain name servers." +msgstr "" + +msgid "Unlock" +msgstr "" + +msgid "Lock" +msgstr "" + +msgid "Domain Privacy Settings" +msgstr "" + +msgid "If you would like to hide domain contact information which is shown on WHOIS you can enable privacy protection. Once domain privacy protection is enabled no one will know who registered this service. And once you decide to disable privacy protection, information that is listed above on \"Update Domain Contact Details\" section will be seen on domain WHOIS again." +msgstr "" + +msgid "Disable Privacy protection" +msgstr "" + +msgid "Enable Privacy protection" +msgstr "" + +msgid "Domain Nameservers" +msgstr "" + +msgid "If you would like to host this domain with another company you can update nameservers." +msgstr "" + +msgid "Update nameservers" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "Domain Contact Details" +msgstr "" + +msgid "Domain contact details will be displayed once someone will check WHOIS output (which is public) of your service. This will update Technical, Billing and Admin contacts for this service. You can enable domain privacy protection if you want to hide your public WHOIS information." +msgstr "" + +msgid "Update domain contact details" +msgstr "" + +msgid "Address Line 1" +msgstr "" + +msgid "Address Line 2" +msgstr "" + +msgid "Zip" +msgstr "" + +msgid "Phone number" +msgstr "" + +msgid "How to reset my password?" +msgstr "" + +msgid "Enter your email to reset password. You will receive new password after reset link is confirmed." +msgstr "" + +msgid "Password reset confirmation email was sent" +msgstr "" + +msgid "License details" +msgstr "" + +msgid "Key" +msgstr "" + +msgid "All ips" +msgstr "" + +msgid "Valid Domains" +msgstr "" + +msgid "All hosts" +msgstr "" + +msgid "Valid Versions" +msgstr "" + +msgid "All versions" +msgstr "" + +msgid "Valid Install paths" +msgstr "" + +msgid "All paths" +msgstr "" + +msgid "Reset license" +msgstr "" + +msgid "You can reset your license parameters if you have changed your server" +msgstr "" + +msgid "Ticket details" +msgstr "" + +msgid "Author" +msgstr "" + +msgid "Please configure domain for your hosting account" +msgstr "" + +msgid "Use own" +msgstr "" + +msgid "Transfer" +msgstr "" + +msgid "I will use my existing domain and update nameservers" +msgstr "" + +msgid "Enter your domain name" +msgstr "" + +msgid "Register a new domain" +msgstr "" + +msgid "Check" +msgstr "" + +msgid "Transfer your domain from another registrar" +msgstr "" + +msgid "Transfer price" +msgstr "" + +msgid "Enter domain transfer code" +msgstr "" + +msgid " Year/s @ " +msgstr "" + +msgid "My Products & Services" +msgstr "" + +msgid "Ordered Services" +msgstr "" + +msgid "Product/Service" +msgstr "" + +msgid "Next due date" +msgstr "" + +msgid "Service details" +msgstr "" + +msgid "All information about your service" +msgstr "" + +msgid "Product name" +msgstr "" + +msgid "Payment amount" +msgstr "" + +msgid "Billing cycle" +msgstr "" + +msgid "Order status" +msgstr "" + +msgid "Order created" +msgstr "" + +msgid "Activated at" +msgstr "" + +msgid "Renewal date" +msgstr "" + +msgid "Order notes" +msgstr "" + +msgid "Active support tickets" +msgstr "" + +msgid "Renew now" +msgstr "" + +msgid "Request Upgrade" +msgstr "" + +msgid "Open ticket" +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Request Cancellation" +msgstr "" + +msgid "I would like to cancel" +msgstr "" + +msgid "Reason" +msgstr "" + +msgid "Open new support ticket regarding this order" +msgstr "" + +msgid "Submit new support ticket. Ticket will be visible in support section after submission" +msgstr "" + +msgid "Request upgrade" +msgstr "" + +msgid "I would like to upgrade" +msgstr "" + +msgid "Upgrade to" +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "Request" +msgstr "" + +msgid "Addons you have ordered with this service" +msgstr "" + +msgid "Billing Cycle" +msgstr "" + +msgid "Back to services" +msgstr "" + +msgid "Error" +msgstr "" + +msgid "Select Product" +msgstr "" + +msgid "Choose products we offer for selling" +msgstr "" + +msgid "Starting from:" +msgstr "" + +msgid "View products" +msgstr "" + +msgid "Select product" +msgstr "" + +msgid "Confirm" +msgstr "" + +msgid "What are you looking for?" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Try using other keyword. No matches not for keyword:" +msgstr "" + +msgid "Affiliates" +msgstr "" + +msgid "Client Area" +msgstr "" + +msgid "Tickets waiting your reply" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "All Invoices" +msgstr "" + +msgid "Active" +msgstr "" + +msgid "Soon expires" +msgstr "" + +msgid "All services" +msgstr "" + +msgid "New order" +msgstr "" + +msgid "Tickets" +msgstr "" + +msgid "Open" +msgstr "" + +msgid "On Hold" +msgstr "" + +msgid "All tickets" +msgstr "" + +msgid "New ticket" +msgstr "" + +msgid "Recent orders" +msgstr "" + +msgid "Recent emails" +msgstr "" + +msgid "Order products and services" +msgstr "" + +msgid "Become a member and manage services" +msgstr "" + +msgid "Contact Us" +msgstr "" + +msgid "Contact us for more information" +msgstr "" + +msgid "Announcements" +msgstr "" + +msgid "Latest news & announcements" +msgstr "" + +msgid "Browse our KB for answers and FAQs" +msgstr "" + +msgid "Invoicing Software" +msgstr "" + +msgid "Powered by BoxBilling invoicing software" +msgstr "" + +msgid "Example module" +msgstr "" + +msgid "Example module title" +msgstr "" + +msgid "See protected content" +msgstr "" + +msgid "This content can be seen only if client is logged in" +msgstr "" + +msgid "Your protected content" +msgstr "" + +msgid "Register new domain" +msgstr "" + +msgid "Transfer my domain" +msgstr "" + +msgid "Check domain availability" +msgstr "" + +msgid "Enter new domain name to register" +msgstr "" + +msgid "I want to use my nameservers" +msgstr "" + +msgid "Enter your domain name to transfer" +msgstr "" + +msgid "Select currency" +msgstr "" + +msgid "Emails we have sent you" +msgstr "" + +msgid "Here you can track emails we have sent you" +msgstr "" + +msgid "Email subject" +msgstr "" + +msgid "Date sent" +msgstr "" + +msgid "Could not connect to whois :server server" +msgstr "" + +msgid "Error creating " +msgstr "" + +msgid "Only active orders can be suspended" +msgstr "" + +msgid "Can not cancel " +msgstr "" + +msgid "Service " +msgstr "" + +msgid "Can not remove hosting plan which has active accounts" +msgstr "" + +msgid "Invoice item title is missing" +msgstr "" + +msgid ":product setup" +msgstr "" + +msgid "Could not activate proforma item. Order :id not found" +msgstr "" + +msgid "Filename is missing in product config." +msgstr "" + +msgid "Parameter :param does not exist" +msgstr "" + +msgid "Theme was not found in path :path" +msgstr "" + +msgid "Theme manifest file :file was not found" +msgstr "" + +msgid "Unable to decode theme manifest file :file" +msgstr "" + +msgid "Please check if you have configured FTP layer properly in Configuration > General settings > FTP layer." +msgstr "" + +msgid "Please make sure that FTP Root is defined properly. Could not find bb-config.php file in :path" +msgstr "" + +msgid "You have reached free version limit. Upgrade to PRO version of BoxBilling if you want this limit removed." +msgstr "" + +msgid "BoxBilling license key must be defined in bb-config.php file as BB_LICENSE constant." +msgstr "" + +msgid "PHP curl extension is disabled on your server. Please enable php curl extension." +msgstr "" + +msgid "Can not remove group with clients" +msgstr "" + +msgid "Could not find main domain product" +msgstr "" + +msgid "Hosting product must have domain configuration" +msgstr "" + +msgid "Domain action is missing" +msgstr "" + +msgid "Hosting product must have defined register_sld parameter" +msgstr "" + +msgid "Hosting product must have defined register_tld parameter" +msgstr "" + +msgid "Hosting product must have defined transfer_sld parameter" +msgstr "" + +msgid "Hosting product must have defined transfer_tld parameter" +msgstr "" + +msgid "Can not remove category which has articles" +msgstr "" + +msgid "Hosting product is not configured completely. Configure server for hosting product." +msgstr "" + +msgid "Hosting product is not configured completely. Configure hosting plan for hosting product." +msgstr "" + +msgid "Domain name is not valid." +msgstr "" + +msgid "Domain extension is not valid." +msgstr "" + +msgid "Server from order configuration was not found" +msgstr "" + +msgid "Hosting plan from order configuration was not found" +msgstr "" + +msgid "Could not activate order. Service was not created" +msgstr "" + +msgid "Order :id has no active service" +msgstr "" + +msgid "Account password is missing or is not valid" +msgstr "" + +msgid "Account ip is missing or is not valid" +msgstr "" + +msgid "Domain sld or tld is missing" +msgstr "" + +msgid "Can not refund invoice with negative amount" +msgstr "" + +msgid "You must have at least one active order before you can add funds so you cannot proceed at the current time!" +msgstr "" + +msgid "Amount is not valid" +msgstr "" + +msgid "Payment for invoice :serie:id [:title]" +msgstr "" + +msgid "Payment for invoice :serie:id" +msgstr "" + +msgid "Can not remove invoice. It was paid but services were not activated" +msgstr "" + +msgid "License plugin :plugin was not found" +msgstr "" + +msgid "License plugin do not have generate method" +msgstr "" + +msgid "Custom plugin method :method is forbidden" +msgstr "" + +msgid "Plugin class file :file was not found" +msgstr "" + +msgid "Plugin :plugin does not support action :action" +msgstr "" + +msgid "Can not remove helpdesk which has tickets" +msgstr "" + +msgid "Currency conversion rate can be zero" +msgstr "" + +msgid "Can not remove default currency" +msgstr "" + +msgid "This administrator account is protected and can not be removed" +msgstr "" + +msgid ":product_title" +msgstr "" + +msgid "Can not remove product category with products" +msgstr "" + +msgid "Module :mod manifest file is missing" +msgstr "" + +msgid "Module :mod manifest file is not valid. Check file syntax and permissions." +msgstr "" + +msgid "BoxBilling module :module not found. Was it installed?" +msgstr "" + +msgid "BoxBilling core modules can not be installed or removed" +msgstr "" + +msgid "Module can not be installed. It requires at least :min version of BoxBilling. You are using :v" +msgstr "" + +msgid "Could not retrieve version information for extension :ext" +msgstr "" + +msgid "Latest :mod version installed. No need to update" +msgstr "" + +msgid "Could not retrieve :ext information" +msgstr "" + +msgid "Visit extension site for update information." +msgstr "" + +msgid "BoxBilling core modules can not be managed" +msgstr "" + +msgid "Could not extract extension zip file" +msgstr "" + +msgid "Module already installed." +msgstr "" + +msgid "Extension can not be moved. Make sure your server write permissions to bb-modules folder." +msgstr "" + +msgid "Extension can not be moved. Make sure your server write permissions to bb-themes folder." +msgstr "" + +msgid "Extension can not be moved. Make sure your server write permissions to bb-locale folder." +msgstr "" + +msgid "Extension does not support auto-install deature. Extension must be installed manually" +msgstr "" + +msgid "Unable to connect to BoxBilling extensiosn site." +msgstr "" + +msgid "Administrators group can not be removed" +msgstr "" + +msgid "Can not remove group which has staff members" +msgstr "" + +msgid "This is a last message in topic. Remove topic in order to remove this message." +msgstr "" + +msgid "Payment gateway :adapter was not found" +msgstr "" + +msgid "Invalid payment adapter :adapter" +msgstr "" + +msgid "Are you registering new domain or transfering existing? Action parameter missing." +msgstr "" + +msgid "Invalid domain action." +msgstr "" + +msgid "Order data must contain :field configuration field" +msgstr "" + +msgid "Domain name :domain is not valid" +msgstr "" + +msgid "Domain TLD is not valid." +msgstr "" + +msgid "Domain name is required." +msgstr "" + +msgid "Transfer domain type (tld) is required." +msgstr "" + +msgid "Transfer domain name (sld) is required." +msgstr "" + +msgid "Transfer code is required for domains transfers." +msgstr "" + +msgid "TLD not found" +msgstr "" + +msgid ":domain can not be transfered!" +msgstr "" + +msgid "Domain registration tld parameter missing." +msgstr "" + +msgid "Domain registration sld parameter missing." +msgstr "" + +msgid "Years parameter is missing for domain configuration." +msgstr "" + +msgid ":tld can be registered for at least :years years" +msgstr "" + +msgid ":domain is already registered!" +msgstr "" + +msgid "Default domain nameservers are not configured" +msgstr "" + +msgid "Nameserver 1 is required" +msgstr "" + +msgid "Nameserver 2 is required" +msgstr "" + +msgid "Required field contact is missing" +msgstr "" + +msgid "Required field :field is missing" +msgstr "" + +msgid "Domain name is not valid" +msgstr "" + +msgid "Domain can not be transfered" +msgstr "" + +msgid "Domain can not be registered" +msgstr "" + +msgid "Period parameter not passed" +msgstr "" + +msgid "I'm afraid we are out of stock." +msgstr "" + +msgid "Addon period parameter not passed" +msgstr "" + +msgid "Product not found" +msgstr "" + +msgid "Add products to cart before applying promo code" +msgstr "" + +msgid "Currency can not be changed. Client already have invoices issued." +msgstr "" + +msgid "Currency can not be changed. Client already have orders." +msgstr "" + +msgid "Could not determine domain price. Domain action is missing" +msgstr "" + +msgid "Unknown TLD. Could not determine registration price" +msgstr "" + +msgid "Domain product can not be removed." +msgstr "" + +msgid "Unknown transaction #:id type: :type" +msgstr "" + +msgid "Could not determine transaction origin. Transaction payment gateway is unknown." +msgstr "" + +msgid "Can not handle transaction received from unknown payment gateway: :id" +msgstr "" + +msgid "Transaction :id is not associated with an invoice." +msgstr "" + +msgid "Invoice #:id not found" +msgstr "" + +msgid "Instant payment notification (IPN) did not pass gateway :id validation" +msgstr "" + +msgid "Payment gateway :id method getTransaction should return Payment_Transaction object" +msgstr "" + +msgid "Can not create subscription. Subscription id from payment gateway was not received" +msgstr "" + +msgid "Subscription #:id was not found. Could not unsusbscribe" +msgstr "" + +msgid "Only approved transaction can be processed" +msgstr "" + +msgid "Transaction currency :code do not match required currency :required" +msgstr "" + +msgid "Transaction status on payment gateway is Pending. Only Complete or Unknown transactions can be processed." +msgstr "" + +msgid "Define clients currency before adding funds." +msgstr "" + +msgid "Funds amount is not valid" +msgstr "" + +msgid "Funds description is not valid" +msgstr "" + +msgid "Client currency do not match invoice currency" +msgstr "" + +msgid "Can not add negative amount to client balance for debit transaction" +msgstr "" + +msgid "Conversion rate can't be 0" +msgstr "" + +msgid "Product pricing could not be determined. " +msgstr "" + +msgid "Repo class for product was not found" +msgstr "" + +msgid "Unknown Period selected for setup price" +msgstr "" + +msgid "Product :id payment type is recurrent, but period was not selected" +msgstr "" + +msgid "Unknown Period selected for price" +msgstr "" + +msgid "Can not remove product which has active orders." +msgstr "" + +msgid "Invalid server manager. Server was not configured properly." +msgstr "" + +msgid "Server manager :adapter is not valid" +msgstr "" + +msgid "Can not remove server which has active accounts" +msgstr "" + +msgid "Domain registrar :adapter was not found" +msgstr "" + +msgid "Registrar :adapter was not found" +msgstr "" + +msgid "Registrar adapter :adapter should extend Registrar_AdapterAbstract" +msgstr "" + +msgid "Can not remove registrar which has domains" +msgstr "" + +msgid "Invalid identity" +msgstr "" + +msgid ":module method toApiArray not found" +msgstr "" + +msgid "Client api can not be invoked from guest or admin role" +msgstr "" + +msgid "Invalid identity. Clear browser cookies" +msgstr "" + +msgid "Method :method must contain underscore" +msgstr "" + +msgid "BoxBilling module :mod is not installed/activated" +msgstr "" + +msgid "Module api file :file is not available" +msgstr "" + +msgid "Api class must be instance of Api_Abstract" +msgstr "" + +msgid ":type API call :method does not exist in module :module" +msgstr "" + +msgid "second" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "day" +msgstr "" + +msgid "week" +msgstr "" + +msgid "month" +msgstr "" + +msgid "year" +msgstr "" + +msgid "decade" +msgstr "" + +msgid "Period Error. Unit :unit is not defined" +msgstr "" + +msgid "Invalid period quantity :qty for unit :unit. Allowed range is from :from to :to" +msgstr "" + +msgid "Every week" +msgstr "" + +msgid "Every month" +msgstr "" + +msgid "Every 3 months" +msgstr "" + +msgid "Every 6 months" +msgstr "" + +msgid "Every year" +msgstr "" + +msgid "Every 2 years" +msgstr "" + +msgid "Every 3 years" +msgstr "" + +msgid "Every :number day" +msgstr "" + +msgid "Every :number week(s)" +msgstr "" + +msgid "Every :number months" +msgstr "" + +msgid "Every :number years" +msgstr "" + +msgid "Unit not defined" +msgstr "" + +msgid "Can not determine months amount from unit" +msgstr "" + +msgid "CURL extension is not enabled" +msgstr "" + +msgid "Service class :class was not found in :path" +msgstr "" + +msgid "Client controller class :class was not found in :path" +msgstr "" + +msgid "Admin controller class :class was not found in :path" +msgstr "" + +msgid "Core module can not be updated" +msgstr "" + +msgid "FTP extension is not enabled in PHP. You will not be able to use automatic updates and other automation." +msgstr "" + +msgid "The ftp PHP extension is not available" +msgstr "" + +msgid "FTP hostname is required" +msgstr "" + +msgid "FTP username is required" +msgstr "" + +msgid "FTP password is required" +msgstr "" + +msgid "Failed to connect to FTP Server :host : :port" +msgstr "" + +msgid "FTP Username/Password incorrect for :usernmae" +msgstr "" + +msgid "Resource is not a stream" +msgstr "" + +msgid "Mode cannot be changed on existing streams" +msgstr "" + +msgid ":stream cannot be opened with mode :mode" +msgstr "" + +msgid "Unable to write to stream" +msgstr "" + +msgid ":module method getSearchQuery not found" +msgstr "" + +msgid "Invalid :module method getSearchQuery return" +msgstr "" + +msgid "Page :url not found" +msgstr "" + +msgid "Page not found" +msgstr "" + +msgid "File :file does not exist" +msgstr "" + +msgid "Invalid zip file" +msgstr "" + +msgid "Zip extraction failed" +msgstr "" + +msgid "Unknown mail transport: :transport" +msgstr "" + +msgid "SMTP host not configured" +msgstr "" + +msgid "SMTP port not configured" +msgstr "" + +msgid "SMTP hostname is not configured." +msgstr "" + +msgid "Missing log message" +msgstr "" + +msgid "Bad log priority" +msgstr "" + +msgid "Email is not valid" +msgstr "" + +msgid "Password too short!" +msgstr "" + +msgid "Password must include at least one number!" +msgstr "" + +msgid "Password must include at least one letter!" +msgstr "" + +msgid "Clients logins history" +msgstr "" + +msgid "Client" +msgstr "" + +msgid "IP" +msgstr "" + +msgid "Number" +msgstr "" + +msgid "Created at" +msgstr "" + +msgid "Due at" +msgstr "" + +msgid "Reminded at" +msgstr "" + +msgid "Approved" +msgstr "" + +msgid "Serie and number" +msgstr "" + +msgid "Tax" +msgstr "" + +msgid "Text before invoice items table" +msgstr "" + +msgid "Text after invoice items table" +msgstr "" + +msgid "Company VAT" +msgstr "" + +msgid "Company Number" +msgstr "" + +msgid "Phone" +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Last name" +msgstr "" + +msgid "Invoice items" +msgstr "" + +msgid "Droid Tweak settings" +msgstr "" + +msgid "Configuration updated" +msgstr "" + +msgid "Payment gateway" +msgstr "" + +msgid "Default Help desk" +msgstr "" + +msgid "Default Ticket subject" +msgstr "" + +msgid "Default ticket subject" +msgstr "" + +msgid "Ticket content" +msgstr "" + +msgid "Filter transactions" +msgstr "" + +msgid "ID on payment gateway" +msgstr "" + +msgid "Invoice Id" +msgstr "" + +msgid "Payment Gateway" +msgstr "" + +msgid "Received at" +msgstr "" + +msgid "Filter" +msgstr "" + +msgid "Processed" +msgstr "" + +msgid "System activity" +msgstr "" + +msgid "Ip" +msgstr "" + +msgid "Birthday" +msgstr "" + +msgid "You are" +msgstr "" + +msgid "Partners list" +msgstr "" + +msgid "Configuration" +msgstr "" + +msgid "Logo" +msgstr "" + +msgid "Sales" +msgstr "" + +msgid "Signup Date" +msgstr "" + +msgid "Global partners limits and settings" +msgstr "" + +msgid "Default product which partners are reselling." +msgstr "" + +msgid "Default order limit for partner per day. Used to prevent API abuse" +msgstr "" + +msgid "Optional rules for becoming partner" +msgstr "" + +msgid "Product which must be ordered before becoming partner" +msgstr "" + +msgid "Check partners balance before creating new order for available amount" +msgstr "" + +msgid "How much money must be on clients balance to become a partner" +msgstr "" + +msgid "License settings" +msgstr "" + +msgid "Prefix" +msgstr "" + +msgid "Length" +msgstr "" + +msgid "Plugin" +msgstr "" + +msgid "Validate IP" +msgstr "" + +msgid "Validate Hostname" +msgstr "" + +msgid "Validate Version" +msgstr "" + +msgid "Validate Path" +msgstr "" + +msgid "License plugins" +msgstr "" + +msgid "BoxBilling gives you ability to provide your own license generation script. Follow instructions bellow to install new license plugin" +msgstr "" + +msgid "License plugin is PHP class \"License_PluginName\" with one method" +msgstr "" + +msgid "Take a look at default plugin at" +msgstr "" + +msgid "Create your plugin and place it to" +msgstr "" + +msgid "BoxBilling will automatically detect new plugin" +msgstr "" + +msgid "Read" +msgstr "" + +msgid "BoxBilling documentation" +msgstr "" + +msgid "for more information." +msgstr "" + +msgid "Import existing" +msgstr "" + +msgid "Domain name" +msgstr "" + +msgid "Domain TLD" +msgstr "" + +msgid "News and announcements" +msgstr "" + +msgid "New announcement" +msgstr "" + +msgid "Draft" +msgstr "" + +msgid "Content" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "Email templates" +msgstr "" + +msgid "New template" +msgstr "" + +msgid "Email settings" +msgstr "" + +msgid "Code" +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "The list is empty. Depending on modules enabled email templates will be inserted after first event occurrence." +msgstr "" + +msgid "Configure email options" +msgstr "" + +msgid "BoxBilling sends emails using sendmail by default or you can configure your own SMTP server" +msgstr "" + +msgid "Email transport" +msgstr "" + +msgid "SendMail" +msgstr "" + +msgid "SMTP" +msgstr "" + +msgid "SMTP Hostname" +msgstr "" + +msgid "SMTP Port" +msgstr "" + +msgid "SMTP Username" +msgstr "" + +msgid "SMTP Password" +msgstr "" + +msgid "SMTP Security" +msgstr "" + +msgid "Update email settings" +msgstr "" + +msgid "Send test email to staff members" +msgstr "" + +msgid "Where I can use new email template?" +msgstr "" + +msgid "Newly created email templates can be used in custom event hooks." +msgstr "" + +msgid "Category" +msgstr "" + +msgid "Action code" +msgstr "" + +msgid "Filter support tickets" +msgstr "" + +msgid "Client ID" +msgstr "" + +msgid "Order ID" +msgstr "" + +msgid "Ticket subject" +msgstr "" + +msgid "Ticket messages" +msgstr "" + +msgid "Priority" +msgstr "" + +msgid "Tickets waiting for staff reply" +msgstr "" + +msgid "Tickets waiting for client reply" +msgstr "" + +msgid "Solved tickets" +msgstr "" + +msgid "New email" +msgstr "" + +msgid "Last message" +msgstr "" + +msgid "Open ticket for existing client" +msgstr "" + +msgid "Start typing clients name, email or ID" +msgstr "" + +msgid "Open public ticket for non client" +msgstr "" + +msgid "Receivers name" +msgstr "" + +msgid "John Smith" +msgstr "" + +msgid "to@gmail.com" +msgstr "" + +msgid "Features" +msgstr "" + +msgid "Demo" +msgstr "" + +msgid "Documentation" +msgstr "" + +msgid "Forums" +msgstr "" + +msgid "Earn money" +msgstr "" + +msgid "Partners" +msgstr "" + +msgid "My Account" +msgstr "" + +msgid "Support Tickets" +msgstr "" + +msgid "Logout" +msgstr "" + +msgid "INFORMATION" +msgstr "" + +msgid "Website statistic" +msgstr "" + +msgid "Metric" +msgstr "" + +msgid "Today" +msgstr "" + +msgid "Yesterday" +msgstr "" + +msgid "This month so far" +msgstr "" + +msgid "Income" +msgstr "" + +msgid "Clients" +msgstr "" + +msgid "Orders" +msgstr "" + +msgid "Latest orders" +msgstr "" + +msgid "Product sales" +msgstr "" + +msgid "No active orders available" +msgstr "" + +msgid "Define date interval for graphs" +msgstr "" + +msgid "Update graphs" +msgstr "" + +msgid "Recent clients activity" +msgstr "" + +msgid "Recent staff activity" +msgstr "" + +msgid "Public tickets" +msgstr "" + +msgid "Centova Cast" +msgstr "" + +msgid "Centova Cast settings" +msgstr "" + +msgid "Server URL" +msgstr "" + +msgid "Register new server" +msgstr "" + +msgid "Edit server" +msgstr "" + +msgid "CentovaCast URL" +msgstr "" + +msgid "IP Address" +msgstr "" + +msgid "Administrator password" +msgstr "" + +msgid "Register Centova Cast server" +msgstr "" + +msgid "Server added" +msgstr "" + +msgid "Add" +msgstr "" + +msgid "Back to extensions" +msgstr "" + +msgid "Create CentovaCast product" +msgstr "" + +msgid "File information" +msgstr "" + +msgid "Filename" +msgstr "" + +msgid "Location" +msgstr "" + +msgid "Downloads" +msgstr "" + +msgid "Upload new file for this order" +msgstr "" + +msgid "Use this function to update existing order file. Client will be able to download new file from client area" +msgstr "" + +msgid "Upload new file" +msgstr "" + +msgid "Upload" +msgstr "" + +msgid "Top level domains" +msgstr "" + +msgid "New top level domain" +msgstr "" + +msgid "Registrars" +msgstr "" + +msgid "New domain registrar" +msgstr "" + +msgid "Manage TLDs" +msgstr "" + +msgid "Setup domain pricing and allowed operations. Assign specific domain registrars for each Top Level Domain (TLD)" +msgstr "" + +msgid "TLD" +msgstr "" + +msgid "Registration" +msgstr "" + +msgid "Renew" +msgstr "" + +msgid "Operations" +msgstr "" + +msgid "Registrar" +msgstr "" + +msgid "Allow register:" +msgstr "" + +msgid "Allow transfer:" +msgstr "" + +msgid "Active:" +msgstr "" + +msgid "Add new top level domain" +msgstr "" + +msgid "Setup new TLD prices and properties" +msgstr "" + +msgid "Tld" +msgstr "" + +msgid "Registration price" +msgstr "" + +msgid "Renewal price" +msgstr "" + +msgid "Minimum years of registration" +msgstr "" + +msgid "Allow registration" +msgstr "" + +msgid "Allow transfer" +msgstr "" + +msgid "Domain registrars" +msgstr "" + +msgid "Manage domain registrars" +msgstr "" + +msgid "Setup default nameservers that will be used for new domain registrations if client have not provided his own nameservers in order form" +msgstr "" + +msgid "Adding new domain registrar" +msgstr "" + +msgid "Follow instrunctions bellow to install new domain registrar." +msgstr "" + +msgid "Check domain registrar you are looking for is available at" +msgstr "" + +msgid "Download domain registrar file and place to" +msgstr "" + +msgid "Reload this page to see newly detected domain registrar" +msgstr "" + +msgid "Click on install button. Now you will be able to create top level domains with new domain registrar" +msgstr "" + +msgid "For developers. Read" +msgstr "" + +msgid "to learn how to create your own domain registrar." +msgstr "" + +msgid "Install" +msgstr "" + +msgid "All payment gateways installed" +msgstr "" + +msgid "Subscription" +msgstr "" + +msgid "Subscription details" +msgstr "" + +msgid "Subscription ID on payment gateway" +msgstr "" + +msgid "Updated at" +msgstr "" + +msgid "Filter orders" +msgstr "" + +msgid "Invoice option" +msgstr "" + +msgid "Creation date" +msgstr "" + +msgid "Pending setup" +msgstr "" + +msgid "Supended" +msgstr "" + +msgid "Max Addon domains" +msgstr "" + +msgid "Max FTP accounts" +msgstr "" + +msgid "Max SQL Databases" +msgstr "" + +msgid "Max Email Accounts" +msgstr "" + +msgid "Max Subdomains" +msgstr "" + +msgid "Max Parked Domains" +msgstr "" + +msgid "Server manager specific parameters" +msgstr "" + +msgid "Update hosting plan" +msgstr "" + +msgid "Hosting plan additional parameters" +msgstr "" + +msgid "Depending on server manager used to setup hosting account you may require provide additional parameters. List of parameters server managers requires you can find on extensions page." +msgstr "" + +msgid "Add new configuration field" +msgstr "" + +msgid "Something went wrong here" +msgstr "" + +msgid "Back to Dashboard" +msgstr "" + +msgid "Get BoxBilling license" +msgstr "" + +msgid "Newsletters" +msgstr "" + +msgid "Create New" +msgstr "" + +msgid "Articles" +msgstr "" + +msgid "New article" +msgstr "" + +msgid "New category" +msgstr "" + +msgid "Manage categories" +msgstr "" + +msgid "Category created" +msgstr "" + +msgid "File manager" +msgstr "" + +msgid "Full screen" +msgstr "" + +msgid "Extensions" +msgstr "" + +msgid "Update BoxBilling" +msgstr "" + +msgid "Learn more about extensions" +msgstr "" + +msgid "Hooks" +msgstr "" + +msgid "Activate or deactivate extensions" +msgstr "" + +msgid "Extension" +msgstr "" + +msgid "Deactivate" +msgstr "" + +msgid "Module settings" +msgstr "" + +msgid "Hook" +msgstr "" + +msgid "Automatic update" +msgstr "" + +msgid "Automatic updater is a tool to update BoxBilling to latest version in one click. Works on these hosting environments where PHP has permissions to overwrite files uploaded via FTP." +msgstr "" + +msgid "Manual update" +msgstr "" + +msgid "Manual update is a solution when auto updater can not work on current installation environment" +msgstr "" + +msgid "Extending BoxBilling" +msgstr "" + +msgid "BoxBilling gives developers all the capabilities to customize, integrate & extend the core system into your own website & applications." +msgstr "" + +msgid "Submited" +msgstr "" + +msgid "Manage services" +msgstr "" + +msgid "Search:" +msgstr "" + +msgid "Enter search text.." +msgstr "" + +msgid "Centova Cast product settings" +msgstr "" + +msgid "Server" +msgstr "" + +msgid "Template" +msgstr "" + +msgid "Max clients" +msgstr "" + +msgid "Max bitrate" +msgstr "" + +msgid "Transfer limit" +msgstr "" + +msgid "Autostart" +msgstr "" + +msgid "Products" +msgstr "" + +msgid "New product" +msgstr "" + +msgid "Update priority" +msgstr "" + +msgid "Icon URL" +msgstr "" + +msgid "Queues" +msgstr "" + +msgid "Created" +msgstr "" + +msgid "The list is empty." +msgstr "" + +msgid "Order management" +msgstr "" + +msgid "Edit order" +msgstr "" + +msgid "Service management" +msgstr "" + +msgid "Addons" +msgstr "" + +msgid "History" +msgstr "" + +msgid "Order group ID" +msgstr "" + +msgid "Order promo code" +msgstr "" + +msgid "Reason of suspendation" +msgstr "" + +msgid "Suspendation reason" +msgstr "" + +msgid "Reason of cancelation" +msgstr "" + +msgid "Cancelation reason" +msgstr "" + +msgid "Changes status without performing action" +msgstr "" + +msgid "Order invoices" +msgstr "" + +msgid "Issued at" +msgstr "" + +msgid "Order status change history" +msgstr "" + +msgid "Note" +msgstr "" + +msgid "Support tickets regarding this order" +msgstr "" + +msgid "Server Name" +msgstr "" + +msgid "Account IP" +msgstr "" + +msgid "Change hosting plan" +msgstr "" + +msgid "Hosting plan changed" +msgstr "" + +msgid "New hosting plan" +msgstr "" + +msgid "Account password changed" +msgstr "" + +msgid "Change IP" +msgstr "" + +msgid "Account IP changed" +msgstr "" + +msgid "Account username changed" +msgstr "" + +msgid "Account domain changed" +msgstr "" + +msgid "Client area languages" +msgstr "" + +msgid "New language" +msgstr "" + +msgid "Language" +msgstr "" + +msgid "BoxBilling in your language" +msgstr "" + +msgid "Although BoxBilling displays in U.S. English by default, the software has the built-in capability to be used in any language. Follow instructions bellow to install new language." +msgstr "" + +msgid "Check if your language translation file is available at" +msgstr "" + +msgid "BoxBilling extensions site" +msgstr "" + +msgid "Download language files and place them to" +msgstr "" + +msgid "Language will be automatically available and can be changed in client area" +msgstr "" + +msgid "Installing BoxBilling in Your Language" +msgstr "" + +msgid "to learn how to install files that will transform BoxBilling so it displays in your language." +msgstr "" + +msgid "Translations can be made with" +msgstr "" + +msgid "software" +msgstr "" + +msgid "Changing default language" +msgstr "" + +msgid "Default language can be set in" +msgstr "" + +msgid "Removing language" +msgstr "" + +msgid "Removing languages from BoxBilling is really simple. Just delete language folder you wish from" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "Info" +msgstr "" + +msgid "BoxBilling version settings" +msgstr "" + +msgid "Version" +msgstr "" + +msgid "Size" +msgstr "" + +msgid "Release date" +msgstr "" + +msgid "Download latest" +msgstr "" + +msgid "Download latest update" +msgstr "" + +msgid "Staff members logins history" +msgstr "" + +msgid "Admin" +msgstr "" + +msgid "Filter clients" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "All" +msgstr "" + +msgid "Suspended" +msgstr "" + +msgid "Canceled" +msgstr "" + +msgid "New client" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "New group" +msgstr "" + +msgid "Postcode" +msgstr "" + +msgid "Your Balance" +msgstr "" + +msgid "Ticket" +msgstr "" + +msgid "Task" +msgstr "" + +msgid "Client tickets" +msgstr "" + +msgid "Total responses" +msgstr "" + +msgid "Add note" +msgstr "" + +msgid "Task status" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "management" +msgstr "" + +msgid "Variables" +msgstr "" + +msgid "Template Settings" +msgstr "" + +msgid "Reset template" +msgstr "" + +msgid "Examples" +msgstr "" + +msgid "Manage email template" +msgstr "" + +msgid "Most email templates receives parameters from BoxBilling. You can browse them on \"Variables\" tab. Copy variable name to email template and hit preview to see parsed content. Please note that values will be different when actual email is sent." +msgstr "" + +msgid "Template updated" +msgstr "" + +msgid "Preview" +msgstr "" + +msgid "Template settings" +msgstr "" + +msgid "Enable or disable this email template." +msgstr "" + +msgid "List of variables used in this email" +msgstr "" + +msgid "These values will change when real email is sent. You can pass these variables to admin or guest API to get additional information from database." +msgstr "" + +msgid "Variable" +msgstr "" + +msgid "Example value" +msgstr "" + +msgid "This template does not receive any parameters" +msgstr "" + +msgid "Reset email template to default" +msgstr "" + +msgid "Reset to default" +msgstr "" + +msgid "Email templates examples" +msgstr "" + +msgid "Email template playground. Use this tool to try rendering email templates." +msgstr "" + +msgid "Affiliate settings" +msgstr "" + +msgid "Affiliate module settings" +msgstr "" + +msgid "Offer your clients become affiliates of your services." +msgstr "" + +msgid "Commission from order" +msgstr "" + +msgid "Days from order activation to admit commission" +msgstr "" + +msgid "Bonus amount for becoming affiliate in" +msgstr "" + +msgid "Minimum withdraw amount." +msgstr "" + +msgid "Redirect Url. Where is your client redirected after visiting refferal link" +msgstr "" + +msgid "Email content" +msgstr "" + +msgid "Email details" +msgstr "" + +msgid "Sent emails" +msgstr "" + +msgid "Subscriptions" +msgstr "" + +msgid "New subscription" +msgstr "" + +msgid "Create main administrator account" +msgstr "" + +msgid "Enter your email address" +msgstr "" + +msgid "Enter your password" +msgstr "" + +msgid "Create administrator account" +msgstr "" + +msgid "Remember me" +msgstr "" + +msgid "Log me in" +msgstr "" + +msgid "Create new order" +msgstr "" + +msgid "for" +msgstr "" + +msgid "Activate order" +msgstr "" + +msgid "Place new order" +msgstr "" + +msgid "BoxBilling members area" +msgstr "" + +msgid "Registering as" +msgstr "" + +msgid "Individual" +msgstr "" + +msgid "Company registration number" +msgstr "" + +msgid "Company VAT number" +msgstr "" + +msgid "Tax rules" +msgstr "" + +msgid "New tax rule" +msgstr "" + +msgid "Tax settings" +msgstr "" + +msgid "EU VAT" +msgstr "" + +msgid "State/Region" +msgstr "" + +msgid "Tax rate" +msgstr "" + +msgid "Applies to any country" +msgstr "" + +msgid "Applies to any state" +msgstr "" + +msgid "Enable tax support" +msgstr "" + +msgid "Automatic VAT Tax Rules Setup" +msgstr "" + +msgid "If you would like BoxBilling to automatically setup the EU VAT tax rules for you for all EU Member States then simply enter your VAT Label & local VAT rate below and click the submit button. This action will delete any existing tax rules and configure the VAT rates for all EU countries." +msgstr "" + +msgid "VAT Label" +msgstr "" + +msgid "VAT rate" +msgstr "" + +msgid "21" +msgstr "" + +msgid "Create EU VAT Rules" +msgstr "" + +msgid "Tax title" +msgstr "" + +msgid "sales Tax" +msgstr "" + +msgid "18" +msgstr "" + +msgid "Leave empty to apply to all states" +msgstr "" + +msgid "Profile updated" +msgstr "" + +msgid "Listed in public" +msgstr "" + +msgid "Partner status" +msgstr "" + +msgid "Partner product" +msgstr "" + +msgid "Override price" +msgstr "" + +msgid "Logo URL" +msgstr "" + +msgid "Website URL" +msgstr "" + +msgid "Payment gateway configuration" +msgstr "" + +msgid "Payment gateway title" +msgstr "" + +msgid "Select which currencies can accept this payment gateway (Select none to allow all currencies)" +msgstr "" + +msgid "Allow one time payments" +msgstr "" + +msgid "Allow subscription payments" +msgstr "" + +msgid "Enable test mode" +msgstr "" + +msgid "IPN Callback URL" +msgstr "" + +msgid "Go back" +msgstr "" + +msgid "Send Email Message" +msgstr "" + +msgid "Newsletter updated" +msgstr "" + +msgid "From name" +msgstr "" + +msgid "From email" +msgstr "" + +msgid "Send message" +msgstr "" + +msgid "Back to newsletters" +msgstr "" + +msgid "Recipients filter. Select none to send message to all clients" +msgstr "" + +msgid "Client status and group" +msgstr "" + +msgid "Has order" +msgstr "" + +msgid "Message content" +msgstr "" + +msgid "Update and preview" +msgstr "" + +msgid "Send test message" +msgstr "" + +msgid "Send message to clients" +msgstr "" + +msgid "Topics" +msgstr "" + +msgid "New forum" +msgstr "" + +msgid "Sticky" +msgstr "" + +msgid "Locked" +msgstr "" + +msgid "Sorting" +msgstr "" + +msgid "Last ping" +msgstr "" + +msgid "Valid IPs (one per line)" +msgstr "" + +msgid "Validate host" +msgstr "" + +msgid "Valid hosts (one per line)" +msgstr "" + +msgid "Validate path" +msgstr "" + +msgid "Valid paths (one per line)" +msgstr "" + +msgid "Validate version" +msgstr "" + +msgid "Valid versions (one per line)" +msgstr "" + +msgid "Existing member" +msgstr "" + +msgid "Payment gateways" +msgstr "" + +msgid "New payment gateway" +msgstr "" + +msgid "Allow subscriptions" +msgstr "" + +msgid "Adding new payment gateway" +msgstr "" + +msgid "Although BoxBilling ships with most popular payment gateways, you can install other gateways." +msgstr "" + +msgid "Follow these instructions to install new payment gateway." +msgstr "" + +msgid "Check for payment gateway at" +msgstr "" + +msgid "for more payment gateways" +msgstr "" + +msgid "Download payment gateway extension file and place it to" +msgstr "" + +msgid "After file is uploaded in place, reload this page." +msgstr "" + +msgid "Select uploaded file name and click on install." +msgstr "" + +msgid "Payment gateway will be installed in BoxBilling and can be configured in \"Payment gateways\" tab." +msgstr "" + +msgid "to learn how to create your own payment gateway and share it with community" +msgstr "" + +msgid "Main website" +msgstr "" + +msgid "Loading ..." +msgstr "" + +msgid "Help" +msgstr "" + +msgid "Pending approval amount" +msgstr "" + +msgid "Total approved amount" +msgstr "" + +msgid "Total paid amount" +msgstr "" + +msgid "Balance amount" +msgstr "" + +msgid "Total clicks" +msgstr "" + +msgid "Unique clicks" +msgstr "" + +msgid "Commisions" +msgstr "" + +msgid "Invoices waiting for your payment" +msgstr "" + +msgid "Paid invoices" +msgstr "" + +msgid "Canned responses" +msgstr "" + +msgid "New response" +msgstr "" + +msgid "Categories" +msgstr "" + +msgid "oAuth for BoxBilling" +msgstr "" + +msgid "Google" +msgstr "" + +msgid "Facebook" +msgstr "" + +msgid "Github" +msgstr "" + +msgid "Use third party logins" +msgstr "" + +msgid "Google.com authorization settings" +msgstr "" + +msgid "Enable Google login" +msgstr "" + +msgid "Client secret" +msgstr "" + +msgid "Instructions to create Google.com API access" +msgstr "" + +msgid "Github.com authorization settings" +msgstr "" + +msgid "Enable Github login" +msgstr "" + +msgid "Client Secret" +msgstr "" + +msgid "Instructions to register new oAuth application on Github" +msgstr "" + +msgid "Facebook.com authorization settings" +msgstr "" + +msgid "Enable Facebook login" +msgstr "" + +msgid "App ID" +msgstr "" + +msgid "Secret" +msgstr "" + +msgid "Instructions to create Facebook application" +msgstr "" + +msgid "BoxBilling live demo" +msgstr "" + +msgid "Payments" +msgstr "" + +msgid "Logins" +msgstr "" + +msgid "Client profile details" +msgstr "" + +msgid "Client Profile updated" +msgstr "" + +msgid "Other/Unknown" +msgstr "" + +msgid "Company details" +msgstr "" + +msgid "Address and contact details" +msgstr "" + +msgid "Additional settings" +msgstr "" + +msgid "Alternative ID" +msgstr "" + +msgid "Used to identify client on foreign system. Usually used by importers" +msgstr "" + +msgid "Exempt from tax" +msgstr "" + +msgid "Signed up time" +msgstr "" + +msgid "Password changed" +msgstr "" + +msgid "Custom fields" +msgstr "" + +msgid "Use these fields to define custom client details" +msgstr "" + +msgid "Client Profile custom fields updated" +msgstr "" + +msgid "Custom field" +msgstr "" + +msgid "Client payments history" +msgstr "" + +msgid "Add funds for client" +msgstr "" + +msgid "Funds added" +msgstr "" + +msgid "Client orders" +msgstr "" + +msgid "Client invoices" +msgstr "" + +msgid "Client support tickets" +msgstr "" + +msgid "Logins history" +msgstr "" + +msgid "Emails sent to client" +msgstr "" + +msgid "Download BoxBilling" +msgstr "" + +msgid "Edit product addon" +msgstr "" + +msgid "Activation" +msgstr "" + +msgid "Icon" +msgstr "" + +msgid "System settings" +msgstr "" + +msgid "FTP layer" +msgstr "" + +msgid "Scheduled tasks" +msgstr "" + +msgid "License" +msgstr "" + +msgid "Company number, chamber of commerce number" +msgstr "" + +msgid "VAT number" +msgstr "" + +msgid "Bank Account number" +msgstr "" + +msgid "Signature" +msgstr "" + +msgid "Update settings" +msgstr "" + +msgid "Company terms of service, legal regulation" +msgstr "" + +msgid "Company privacy policy" +msgstr "" + +msgid "Orders settings" +msgstr "" + +msgid "Expiration date" +msgstr "" + +msgid "Invoice settings" +msgstr "" + +msgid "Number of days to generate new invoice before order expiration" +msgstr "" + +msgid "Invoice due days" +msgstr "" + +msgid "Auto invoice approval" +msgstr "" + +msgid "Proforma Invoicing / Sequential Invoice Numbering" +msgstr "" + +msgid "Proforma invoice prefix/series" +msgstr "" + +msgid "Paid invoice prefix/series" +msgstr "" + +msgid "Next paid invoice number" +msgstr "" + +msgid "Refunds settings" +msgstr "" + +msgid "Refunds logic" +msgstr "" + +msgid "Add funds settings" +msgstr "" + +msgid "Minimum amount for add funds invoice" +msgstr "" + +msgid "Unlimited" +msgstr "" + +msgid "Maximum amount for add funds invoice" +msgstr "" + +msgid "FTP layer for BoxBilling" +msgstr "" + +msgid "FTP is used to manage BoxBilling modules and updates." +msgstr "" + +msgid "FTP settings updated" +msgstr "" + +msgid "FTP Hostname - can be a numerical URL 127.0.0.1 is the default address for a locally hosted server, it might be this, it might be the full URL as my example above with the File Transfer Protocol (FTP) prefix, it might be the http:// protocol it might be SFTP (secure FTP) even secure http (https). Your host will be able to advise you on the correct format." +msgstr "" + +msgid "FTP port - is nearly always 21 unless the host has changed this they will have notified you of this. Secure FTP generally uses port 22." +msgstr "" + +msgid "FTP user - In most cases, this is the specific user name your host has set up for you to access your Web site via FTP- It is the name you use in your FTP client. This could be an alphanumeric, it could be your name, even your e-mail address, If you don't know this speak to your host. You may have the facility on your Web account to set up additional FTP users if that is the case (and it's more secure) you are recommended to do this" +msgstr "" + +msgid "FTP password - this is the password you enter in your FTP client." +msgstr "" + +msgid "FTP root - This is generally the directory in which BoxBilling is installed. This setting is very important to be setup correctly as it very specifically depends on the Host server settings. In can be just / BUT it might be htdocs/boxbilling, public_html/, /public_html/boxbilling or other. It is a variable that BoxBilling has absolutely no control over. You will need to clarify this with your host." +msgstr "" + +msgid "Setup scheduled tasks to be executed once a day" +msgstr "" + +msgid "Scheduled tasks must be enabled immediately after installation. Cron is responsible for sending your clients reminder about payments, domain renewal notices and many more." +msgstr "" + +msgid "Timezone" +msgstr "" + +msgid "Time on server" +msgstr "" + +msgid "Last time scheduled tasks were executed" +msgstr "" + +msgid "Scheduled tasks were never executed" +msgstr "" + +msgid "Unix crontab setup:" +msgstr "" + +msgid "Execute scheduled tasks from browser" +msgstr "" + +msgid "Execute now" +msgstr "" + +msgid "After purchase you have received an e-mail with license key. Update license key to unlock all features of BoxBilling" +msgstr "" + +msgid "To change license key, change BB_LICENSE value in bb-config.php file" +msgstr "" + +msgid "Licensed to" +msgstr "" + +msgid "New Addon" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "After order is placed" +msgstr "" + +msgid "After payment is received" +msgstr "" + +msgid "Manual activation" +msgstr "" + +msgid "Sell BoxBilling licenses" +msgstr "" + +msgid "1. Configure API" +msgstr "" + +msgid "Test connection" +msgstr "" + +msgid "Update API key" +msgstr "" + +msgid "2. Become partner" +msgstr "" + +msgid "3. Create license product" +msgstr "" + +msgid "Refer and earn recurring commission" +msgstr "" + +msgid "Partners profile" +msgstr "" + +msgid "Issue License" +msgstr "" + +msgid "Manage licenses" +msgstr "" + +msgid "Licenses you have issued" +msgstr "" + +msgid "Reissue" +msgstr "" + +msgid "Generate new API key" +msgstr "" + +msgid "Centova Cast order details" +msgstr "" + +msgid "Changing settings does not send actions to CentovaCast server." +msgstr "" + +msgid "Reconfigure" +msgstr "" + +msgid "Changing CentovaCast server settings." +msgstr "" + +msgid "Port" +msgstr "" + +msgid "Source password" +msgstr "" + +msgid "Max BitRate" +msgstr "" + +msgid "Organization" +msgstr "" + +msgid "URL" +msgstr "" + +msgid "Auto rebuild list" +msgstr "" + +msgid "Account details" +msgstr "" + +msgid "Parameter" +msgstr "" + +msgid "Value" +msgstr "" + +msgid "Mass Mail Messages" +msgstr "" + +msgid "Create new mass mail message" +msgstr "" + +msgid "Mass Mail Settings" +msgstr "" + +msgid "Client ID to send test email while creating message" +msgstr "" + +msgid "Hi," +msgstr "" + +msgid "New" +msgstr "" + +msgid "Visit site" +msgstr "" + +msgid "Notifications" +msgstr "" + +msgid "Inquiries" +msgstr "" + +msgid "Anouncements" +msgstr "" + +msgid "Become a member and discuss in forums" +msgstr "" + +msgid "Braunstein extension settings" +msgstr "" + +msgid "Required fields for client" +msgstr "" + +msgid "Select which fields are required to be filled up by client on signup form" +msgstr "" + +msgid "Company name" +msgstr "" + +msgid "Gender" +msgstr "" + +msgid "Address details" +msgstr "" + +msgid "Address line 1" +msgstr "" + +msgid "Address line 2" +msgstr "" + +msgid "Postcode/Zip" +msgstr "" + +msgid "BoxBilling full feature list" +msgstr "" + +msgid "Select Slots" +msgstr "" + +msgid "Earnings" +msgstr "" + +msgid "API Key" +msgstr "" + +msgid "External application can control every aspect of BoxBilling using this API key." +msgstr "" + +msgid "Generate new key" +msgstr "" + +msgid "Change your avatar at" +msgstr "" + +msgid "Enable/Disable" +msgstr "" + +msgid "Server manager" +msgstr "" + +msgid "Access Hash (Instead of password for cPanel servers)" +msgstr "" + +msgid "Connection port" +msgstr "" + +msgid "Use Secure connection" +msgstr "" + +msgid "Update and test connection" +msgstr "" + +msgid "Update server" +msgstr "" + +msgid "Hosting plans and servers" +msgstr "" + +msgid "New server" +msgstr "" + +msgid "New server manager" +msgstr "" + +msgid "Servers" +msgstr "" + +msgid "Hosting plans" +msgstr "" + +msgid "Addon domains" +msgstr "" + +msgid "Unique name to identify this server" +msgstr "" + +msgid "server1.yourserverdomain.com" +msgstr "" + +msgid "Primary IP address of the server used to connect to it like: 123.123.123.123" +msgstr "" + +msgid "Assigned IP Addresses" +msgstr "" + +msgid "List the IP Addresses assigned to the server (One per line)" +msgstr "" + +msgid "ns1.yourdomain.com" +msgstr "" + +msgid "ns2.yourdomain.com" +msgstr "" + +msgid "ns3.yourdomain.com" +msgstr "" + +msgid "ns4.yourdomain.com" +msgstr "" + +msgid "Login username to your server: root/reseller" +msgstr "" + +msgid "Login password to your server" +msgstr "" + +msgid "Access Hash (Insted of password for cPanel servers)" +msgstr "" + +msgid "Add server" +msgstr "" + +msgid "Adding new hosting plan" +msgstr "" + +msgid "Depending on server manager used to setup hosting account you may require provide additional parameters in next step. In this step provide basic hosting plan information." +msgstr "" + +msgid "Unique name to identify this hosting plan" +msgstr "" + +msgid "Disk quota (MB)" +msgstr "" + +msgid "Bandwidth (MB)" +msgstr "" + +msgid "Create hosting plan" +msgstr "" + +msgid "Adding new server manager" +msgstr "" + +msgid "Follow these instructions to install new hosting server manager." +msgstr "" + +msgid "Check for server manager extensions at" +msgstr "" + +msgid "Download server manager extension file and place it to" +msgstr "" + +msgid "Server manager gateway will be automatically detected." +msgstr "" + +msgid "You can now create/edit servers with new server manager." +msgstr "" + +msgid "to learn how to create your own server manager and share it with community" +msgstr "" + +msgid "Client area themes" +msgstr "" + +msgid "Admin area themes" +msgstr "" + +msgid "New theme" +msgstr "" + +msgid "Adding new client area theme" +msgstr "" + +msgid "Follow these instructions to install new client area theme." +msgstr "" + +msgid "Check for client area themes at" +msgstr "" + +msgid "Upload new theme files to" +msgstr "" + +msgid "and reload this page" +msgstr "" + +msgid "Client area theme will appear in "Client area themes" tab. And you can select it as default" +msgstr "" + +msgid "For theme designers. Read" +msgstr "" + +msgid "to learn how to create your own theme" +msgstr "" + +msgid "Adding new admin area theme" +msgstr "" + +msgid "Admin area follows same logic as client area themes with one additional rule: admin theme directory must be prefixed with "admin_"." +msgstr "" + +msgid "Support ticket" +msgstr "" + +msgid "Staff member" +msgstr "" + +msgid "Announcement" +msgstr "" + +msgid "Knowledge base article" +msgstr "" + +msgid "Forum topic" +msgstr "" + +msgid "Filter invoices" +msgstr "" + +msgid "Nr" +msgstr "" + +msgid "All statuses" +msgstr "" + +msgid "Refunded" +msgstr "" + +msgid "Issue date" +msgstr "" + +msgid "Unpaid invoices" +msgstr "" + +msgid "Refunded invoices" +msgstr "" + +msgid "New Invoice" +msgstr "" + +msgid "Prepare" +msgstr "" + +msgid "New note" +msgstr "" + +msgid "Delete all messages" +msgstr "" + +msgid "Add note or todo task" +msgstr "" + +msgid "Transaction" +msgstr "" + +msgid "IPN" +msgstr "" + +msgid "Transaction details" +msgstr "" + +msgid "If you are sure that this transaction is valid you can update transaction details in "Manage" tab and try processing transaction again" +msgstr "" + +msgid "Transaction ID on payment gateway" +msgstr "" + +msgid "Transaction status on payment gateway" +msgstr "" + +msgid "Process" +msgstr "" + +msgid "Invoice ID" +msgstr "" + +msgid "Transaction processing information" +msgstr "" + +msgid "Validate IPN" +msgstr "" + +msgid "Transaction information on payment gateway" +msgstr "" + +msgid "Transaction type" +msgstr "" + +msgid "Transaction status on Payment Gateway" +msgstr "" + +msgid "Transaction ID on Payment Gateway" +msgstr "" + +msgid "Note about this transaction" +msgstr "" + +msgid "GET" +msgstr "" + +msgid "No GET parameters received" +msgstr "" + +msgid "POST" +msgstr "" + +msgid "No POST parameters received" +msgstr "" + +msgid "SERVER" +msgstr "" + +msgid "No SERVER parameters logged" +msgstr "" + +msgid "BoxBilling forum" +msgstr "" + +msgid "My favorite topics" +msgstr "" + +msgid "Payment type" +msgstr "" + +msgid "Setup price" +msgstr "" + +msgid "One time" +msgstr "" + +msgid "Price for period" +msgstr "" + +msgid "First payment sum" +msgstr "" + +msgid "On" +msgstr "" + +msgid "Weekly" +msgstr "" + +msgid "Monthly" +msgstr "" + +msgid "General settings" +msgstr "" + +msgid "Upgrades" +msgstr "" + +msgid "Links" +msgstr "" + +msgid "Custom order form" +msgstr "" + +msgid "Hidden" +msgstr "" + +msgid "Browse" +msgstr "" + +msgid "Slug" +msgstr "" + +msgid "Payment options" +msgstr "" + +msgid "Product / service description" +msgstr "" + +msgid "Choose which addons you would like to offer with" +msgstr "" + +msgid "Choose which products can client upgrade to" +msgstr "" + +msgid "Product Upgrades" +msgstr "" + +msgid "No additional configuration for this product is required" +msgstr "" + +msgid "Product links" +msgstr "" + +msgid "Product ID" +msgstr "" + +msgid "Order page with ID" +msgstr "" + +msgid "Order page with slug" +msgstr "" + +msgid "Select icon and click OK" +msgstr "" + +msgid "Lock topic" +msgstr "" + +msgid "Unlock topic" +msgstr "" + +msgid "Hosting settings" +msgstr "" + +msgid "Reseller hosting" +msgstr "" + +msgid "Free domain registration" +msgstr "" + +msgid "Free domain transfer" +msgstr "" + +msgid "Pending approval" +msgstr "" + +msgid "Clicks" +msgstr "" + +msgid "Joined at" +msgstr "" + +msgid "Parameter key is missing" +msgstr "" + +msgid "_tpl parameter not passed" +msgstr "" + +msgid "ID is required" +msgstr "" + +msgid "Event not found" +msgstr "" + +msgid "Order id is required" +msgstr "" + +msgid "Centova Cast order not found" +msgstr "" + +msgid "Order :id is not activated" +msgstr "" + +msgid "CentovaCast product is not configured properly. Field :field is missing" +msgstr "" + +msgid "Could not suspend order. Service was not created" +msgstr "" + +msgid "Could not unsuspend order. Service was not created" +msgstr "" + +msgid "Message from name can not be empty" +msgstr "" + +msgid "Message subject not passed" +msgstr "" + +msgid "Add some content before sending message" +msgstr "" + +msgid "Client ID needs to be configured in mass mailer settings." +msgstr "" + +msgid "Message id not passed" +msgstr "" + +msgid "Message not found" +msgstr "" + +msgid "Queue message id is missing" +msgstr "" + +msgid "Queue message not found" +msgstr "" + +msgid "Queue name not provided" +msgstr "" + +msgid "Module name not provided" +msgstr "" + +msgid "Message handler function :method does not exists" +msgstr "" + +msgid "ID or slug is missing" +msgstr "" + +msgid "News item not found" +msgstr "" + +msgid "Post id not passed" +msgstr "" + +msgid "Post not found" +msgstr "" + +msgid "Post title not passed" +msgstr "" + +msgid "Form title was not provided" +msgstr "" + +msgid "Form id was not passed" +msgstr "" + +msgid "Form is not valid" +msgstr "" + +msgid "Form field type was not passed" +msgstr "" + +msgid "Theme code is missing" +msgstr "" + +msgid "You have latest version of BoxBilling. You do not need to update." +msgstr "" + +msgid "Extension id was not passed" +msgstr "" + +msgid "Extension type was not passed" +msgstr "" + +msgid "Parameter ext was not passed" +msgstr "" + +msgid "Extension not found" +msgstr "" + +msgid "Can not change email. It is already registered." +msgstr "" + +msgid "Password required" +msgstr "" + +msgid "Password confiration required" +msgstr "" + +msgid "Passwords do not match." +msgstr "" + +msgid "Client ID or email is required" +msgstr "" + +msgid "Client not found" +msgstr "" + +msgid "ID required" +msgstr "" + +msgid "Email required" +msgstr "" + +msgid "First name is required" +msgstr "" + +msgid "Email is already registered." +msgstr "" + +msgid "Client id is missing" +msgstr "" + +msgid "Id required" +msgstr "" + +msgid "Client ID is required" +msgstr "" + +msgid "Password confirmation required" +msgstr "" + +msgid "Passwords do not match" +msgstr "" + +msgid "Balance line not found" +msgstr "" + +msgid "Amount is required" +msgstr "" + +msgid "Description is required" +msgstr "" + +msgid "Id not passed" +msgstr "" + +msgid "Group title is missing" +msgstr "" + +msgid "Group id is missing" +msgstr "" + +msgid "Group not found" +msgstr "" + +msgid "First name required" +msgstr "" + +msgid "Email is already registered. You may want to login instead of registering." +msgstr "" + +msgid "Please check your login details" +msgstr "" + +msgid "Email not found in our database" +msgstr "" + +msgid "Hash required" +msgstr "" + +msgid "The link have expired or you have already confirmed password reset." +msgstr "" + +msgid "Country code is required" +msgstr "" + +msgid "Title is required" +msgstr "" + +msgid "Type is required" +msgstr "" + +msgid "Product Category Id is required" +msgstr "" + +msgid "You have already created domain product." +msgstr "" + +msgid "Pricing type is required" +msgstr "" + +msgid "priority params is missing" +msgstr "" + +msgid "Addon id is required" +msgstr "" + +msgid "Addon not found" +msgstr "" + +msgid "Category id is missing" +msgstr "" + +msgid "Category not found" +msgstr "" + +msgid "Category title is missing" +msgstr "" + +msgid "Promo code is missing" +msgstr "" + +msgid "Promo type is missing" +msgstr "" + +msgid "Promo value is missing" +msgstr "" + +msgid "Promo id is missing" +msgstr "" + +msgid "Promo not found" +msgstr "" + +msgid "Product id not passed" +msgstr "" + +msgid "Product ID or slug is missing" +msgstr "" + +msgid "Email ID is required" +msgstr "" + +msgid "Email not found" +msgstr "" + +msgid "Receiver Email is required" +msgstr "" + +msgid "Receiver Name is required" +msgstr "" + +msgid "Sender Name is required" +msgstr "" + +msgid "Sender email is required" +msgstr "" + +msgid "Email subject is required" +msgstr "" + +msgid "Email content is required" +msgstr "" + +msgid "Email template ID is required" +msgstr "" + +msgid "Email template not found" +msgstr "" + +msgid "Email template code is required" +msgstr "" + +msgid "Email template subject is required" +msgstr "" + +msgid "Email template content is required" +msgstr "" + +msgid "Template code not passed" +msgstr "" + +msgid "Receiver is not defined. Define to or to_client or to_staff parameter" +msgstr "" + +msgid "Email template code was not passed" +msgstr "" + +msgid "Email template :code was not found" +msgstr "" + +msgid "Akismet detected this message is spam" +msgstr "" + +msgid "To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create" +msgstr "" + +msgid "Captcha verification failed." +msgstr "" + +msgid "Your Username is blacklisted in global database" +msgstr "" + +msgid "Your Email is blacklisted in global database" +msgstr "" + +msgid "Your IP is blacklisted in global database" +msgstr "" + +msgid "path parameter is missing" +msgstr "" + +msgid "Data parameter is missing" +msgstr "" + +msgid "Path parameter is missing" +msgstr "" + +msgid "Type parameter is missing" +msgstr "" + +msgid "Unknow item type" +msgstr "" + +msgid "To parameter is missing" +msgstr "" + +msgid "File does not exist" +msgstr "" + +msgid "Ticket id required" +msgstr "" + +msgid "Ticket not found" +msgstr "" + +msgid "Ticket content required" +msgstr "" + +msgid "Ticket subject required" +msgstr "" + +msgid "Ticket support_helpdesk_id required" +msgstr "" + +msgid "Helpdesk invalid" +msgstr "" + +msgid "We have already received this request." +msgstr "" + +msgid "Ticket ID required" +msgstr "" + +msgid "Ticket can not be reopened." +msgstr "" + +msgid "Ticket id is missing" +msgstr "" + +msgid "Ticket message id is missing" +msgstr "" + +msgid "Ticket message content is missing" +msgstr "" + +msgid "Ticket message not found" +msgstr "" + +msgid "Client name parameter is missing" +msgstr "" + +msgid "Client email parameter is missing" +msgstr "" + +msgid "Subject parameter is missing" +msgstr "" + +msgid "Ticket message is missing" +msgstr "" + +msgid "Help desk id is missing" +msgstr "" + +msgid "Help desk not found" +msgstr "" + +msgid "Help desk title is missing" +msgstr "" + +msgid "Canned reply id is missing" +msgstr "" + +msgid "Canned reply not found" +msgstr "" + +msgid "Canned reply title is missing" +msgstr "" + +msgid "Canned reply category id is missing" +msgstr "" + +msgid "Canned category id is missing" +msgstr "" + +msgid "Canned category not found" +msgstr "" + +msgid "Canned category title is missing" +msgstr "" + +msgid "ticket_id is missing" +msgstr "" + +msgid "note is missing" +msgstr "" + +msgid "Note id is missing" +msgstr "" + +msgid "Note not found" +msgstr "" + +msgid "Please enter your name" +msgstr "" + +msgid "Please enter your email" +msgstr "" + +msgid "Please enter your subject" +msgstr "" + +msgid "Please enter your message" +msgstr "" + +msgid "Public ticket hash required" +msgstr "" + +msgid "Public ticket not found" +msgstr "" + +msgid "message required" +msgstr "" + +msgid "Message can not be blank" +msgstr "" + +msgid "ID is missing" +msgstr "" + +msgid "Staff member not found" +msgstr "" + +msgid "Email param is missing" +msgstr "" + +msgid "Password param is missing" +msgstr "" + +msgid "Name param is missing" +msgstr "" + +msgid "Staff group is missing" +msgstr "" + +msgid "Administrator account already exists" +msgstr "" + +msgid "Administrator email is missing." +msgstr "" + +msgid "Administrator password is missing." +msgstr "" + +msgid "Check your login details" +msgstr "" + +msgid "BoxBilling license order not found" +msgstr "" + +msgid "Order is not activated" +msgstr "" + +msgid "Forum not found" +msgstr "" + +msgid "Forum Topic not found" +msgstr "" + +msgid "Forum ID not passed" +msgstr "" + +msgid "Forum topic not passed" +msgstr "" + +msgid "Forum message not passed" +msgstr "" + +msgid "Your message is too short" +msgstr "" + +msgid "Forum is locked. No new topics can be started" +msgstr "" + +msgid "Forum Topic ID not passed" +msgstr "" + +msgid "Topic message not passed" +msgstr "" + +msgid "Forum topic is locked. No new message can be posted" +msgstr "" + +msgid "Forum id missing" +msgstr "" + +msgid "Forum title is missing" +msgstr "" + +msgid "Topic id is missing" +msgstr "" + +msgid "Forum topic title not passed" +msgstr "" + +msgid "Forum topic message not passed" +msgstr "" + +msgid "Forum topic id missing" +msgstr "" + +msgid "Forum Topic message ID not passed" +msgstr "" + +msgid "Forum Topic Message not found" +msgstr "" + +msgid "Forum Topic message not found" +msgstr "" + +msgid "Enter some keywords for search" +msgstr "" + +msgid "Search keyword must be longer than 3 characters" +msgstr "" + +msgid "File can not be downloaded at the moment. Please contact support" +msgstr "" + +msgid "Order not found" +msgstr "" + +msgid "File was not uploaded" +msgstr "" + +msgid "Error uploading file" +msgstr "" + +msgid "Product is not configured completely." +msgstr "" + +msgid "plan_id is missing" +msgstr "" + +msgid "Hosting plan not found" +msgstr "" + +msgid "Server name is missing" +msgstr "" + +msgid "Server IP is missing" +msgstr "" + +msgid "Server manager is missing" +msgstr "" + +msgid "Server id is missing" +msgstr "" + +msgid "Server not found" +msgstr "" + +msgid "Hosting plan id is missing" +msgstr "" + +msgid "Hosting plan name is missing" +msgstr "" + +msgid "Hoting plan name can not be empty" +msgstr "" + +msgid ":hosting for :domain" +msgstr "" + +msgid "Notification id is missing" +msgstr "" + +msgid "Notification message was not found" +msgstr "" + +msgid "Unknown API call :call" +msgstr "" + +msgid "Unauthorized IP" +msgstr "" + +msgid "Request limit reached" +msgstr "" + +msgid "Unknow API call" +msgstr "" + +msgid "Authentication Failed" +msgstr "" + +msgid "Client API can be initiated" +msgstr "" + +msgid "Hook event not passed" +msgstr "" + +msgid "Param mod not passed" +msgstr "" + +msgid "Article id not passed" +msgstr "" + +msgid "Article not found" +msgstr "" + +msgid "Article category id not passed" +msgstr "" + +msgid "Article title not passed" +msgstr "" + +msgid "Article id is missing" +msgstr "" + +msgid "Caegory id not passed" +msgstr "" + +msgid "Article Category not found" +msgstr "" + +msgid "Category title not passed" +msgstr "" + +msgid "Article item not found" +msgstr "" + +msgid "Category ID or slug is missing" +msgstr "" + +msgid "Knowledge base category not found" +msgstr "" + +msgid "Invoice hash not passed" +msgstr "" + +msgid "Invoice was not found" +msgstr "" + +msgid "Order id required" +msgstr "" + +msgid "Order :id is free. No need to generate invoice." +msgstr "" + +msgid "Invoice is related to order #:id. Please cancel order first." +msgstr "" + +msgid "Invoice id not passed" +msgstr "" + +msgid "Invoice item id not passed" +msgstr "" + +msgid "Invoice item was not found" +msgstr "" + +msgid "Transaction id is missing" +msgstr "" + +msgid "Transaction not found" +msgstr "" + +msgid "Transaction invoice id is missing" +msgstr "" + +msgid "Payment gateway id is missing" +msgstr "" + +msgid "Gateway was not found" +msgstr "" + +msgid "Payment gateway code is missing" +msgstr "" + +msgid "Payment gateway is not available for installation." +msgstr "" + +msgid "Gateway id not passed" +msgstr "" + +msgid "Gateway not found" +msgstr "" + +msgid "Client id not passed" +msgstr "" + +msgid "Payment gateway id not passed" +msgstr "" + +msgid "Subscription currency not passed" +msgstr "" + +msgid "Payment gateway not found" +msgstr "" + +msgid "Client currency must match subscription currency. Check if clients currency is defined." +msgstr "" + +msgid "Subscription id not passed" +msgstr "" + +msgid "Subscription not found" +msgstr "" + +msgid "Tax id is missing" +msgstr "" + +msgid "Tax rule not found" +msgstr "" + +msgid "Tax name is missing" +msgstr "" + +msgid "Tax rate is missing or is not valid" +msgstr "" + +msgid "Invoice hash not passed. Missing param hash" +msgstr "" + +msgid "Payment method not found. Missing param gateway_id" +msgstr "" + +msgid "Invoice not found" +msgstr "" + +msgid "Payment method not found" +msgstr "" + +msgid "This invoice can't be subscribed" +msgstr "" + +msgid "API call is missing arguments" +msgstr "" + +msgid "Currency code is missing" +msgstr "" + +msgid "Currency not found" +msgstr "" + +msgid "Currency format is missing" +msgstr "" + +msgid "Currency already registered" +msgstr "" + +msgid "Currency code is not valid" +msgstr "" + +msgid "Currency rate is not valid" +msgstr "" + +msgid "You have already used this promo code. Please remove promo code and checkout again." +msgstr "" + +msgid "Can not checkout empty cart." +msgstr "" + +msgid "Selected currency :selected does not match your profile currency :code. Please change cart currency to continue." +msgstr "" + +msgid "Shopping cart id is missing" +msgstr "" + +msgid "Shopping cart not found" +msgstr "" + +msgid "Currency code not passed" +msgstr "" + +msgid "Promo code not passed" +msgstr "" + +msgid "Promo code is expired or does not exist" +msgstr "" + +msgid "Cart item id not passed" +msgstr "" + +msgid "Solusvm order not found" +msgstr "" + +msgid "Node is not selected for import." +msgstr "" + +msgid "No servers selected for import." +msgstr "" + +msgid "Select product for orders." +msgstr "" + +msgid "Product is not configured completely. Please provide solusvm node in product configuration page." +msgstr "" + +msgid "Product is not configured completely. Please provide solusvm plan in product configuration page." +msgstr "" + +msgid "No clients selected for import." +msgstr "" + +msgid "No clients found on SolusVM server." +msgstr "" + +msgid "Virtual private server :title" +msgstr "" + +msgid "Please enter VPS hostname." +msgstr "" + +msgid "Hostname :hostname is not valid." +msgstr "" + +msgid "Please select VPS template." +msgstr "" + +msgid "SolusVM API ID is missing." +msgstr "" + +msgid "SolusVM API KEY is missing." +msgstr "" + +msgid "SolusVM API ipaddress is missing." +msgstr "" + +msgid "SolusVM API secure is missing." +msgstr "" + +msgid "SolusVM API port is missing." +msgstr "" + +msgid "Could not activate order because ordered product does not exists" +msgstr "" + +msgid "Could not activate order. Product :id configuration is missing node parameter" +msgstr "" + +msgid "Could not activate order. Product :id configuration is missing plan parameter" +msgstr "" + +msgid "Could not activate order. Product :id configuration is missing virtualization type parameter" +msgstr "" + +msgid "Could not activate order. Product :id configuration is missing ips amount parameter" +msgstr "" + +msgid "Root password must be longer than 4 symbols" +msgstr "" + +msgid "Plan name must not be empty" +msgstr "" + +msgid "Hostname must not be empty" +msgstr "" + +msgid "Template must not be empty" +msgstr "" + +msgid "Password must be longer than 4 symbols" +msgstr "" + +msgid "TLD is missing" +msgstr "" + +msgid "Tld already registered" +msgstr "" + +msgid "TLD registrar id is missing" +msgstr "" + +msgid "Registration price is missing" +msgstr "" + +msgid "Renewal price is missing" +msgstr "" + +msgid "Transfer price is missing" +msgstr "" + +msgid "Registrar code not passed" +msgstr "" + +msgid "Registrar is not available for installation." +msgstr "" + +msgid "Registrar id not passed" +msgstr "" + +msgid "Registrar not found" +msgstr "" + +msgid "Registrar id is missing" +msgstr "" + +msgid "Domain order is not activated" +msgstr "" + +msgid "Tld is required" +msgstr "" + +msgid "Sld is required" +msgstr "" + +msgid "Domain :domain is not valid" +msgstr "" + +msgid "Domain availability could not be determined. TLD is not active." +msgstr "" + +msgid "Domain is not available." +msgstr "" + +msgid "TLD is not active." +msgstr "" + +msgid "Domain can not be transferred." +msgstr "" + +msgid "Domain :domain registration" +msgstr "" + +msgid "Domain :domain transfer" +msgstr "" + +msgid "Only pending setup orders can be deleted." +msgstr "" + +msgid "This feature is available in BoxBilling PRO version." +msgstr "" + +msgid "Currency :code not found" +msgstr "" + +msgid "Product :id is out of stock." +msgstr "" + +msgid "Group ID parameter is missing for addon product order" +msgstr "" + +msgid "Parent order :group_id was not found" +msgstr "" + +msgid "Only pending setup or failed orders can be activated" +msgstr "" + +msgid "Only suspended orders can be unsuspended" +msgstr "" + +msgid "Only canceled orders can be uncanceled" +msgstr "" + +msgid "Order config not passed" +msgstr "" + +msgid "Order status was not passed" +msgstr "" + +msgid "Order history line id not passed" +msgstr "" + +msgid "Order history line not found" +msgstr "" + +msgid "Automatically issue renewal invoices" +msgstr "" + +msgid "Issue invoices manually" +msgstr "" + +msgid "Order id not passed" +msgstr "" + diff --git a/src/bb-locale/en_US/index.html b/src/bb-locale/en_US/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-locale/index.html b/src/bb-locale/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-locale/messages.pot b/src/bb-locale/messages.pot new file mode 100644 index 000000000..78a7ce51f --- /dev/null +++ b/src/bb-locale/messages.pot @@ -0,0 +1,4509 @@ +msgid "sq_AL" +msgstr "Albanian (Albania)" + +msgid "ar_DZ" +msgstr "Arabic (Algeria)" + +msgid "ar_BH" +msgstr "Arabic (Bahrain)" + +msgid "ar_EG" +msgstr "Arabic (Egypt)" + +msgid "ar_IQ" +msgstr "Arabic (Iraq)" + +msgid "ar_JO" +msgstr "Arabic (Jordan)" + +msgid "ar_KW" +msgstr "Arabic (Kuwait)" + +msgid "ar_LB" +msgstr "Arabic (Lebanon)" + +msgid "ar_LY" +msgstr "Arabic (Libya)" + +msgid "ar_MA" +msgstr "Arabic (Morocco)" + +msgid "ar_OM" +msgstr "Arabic (Oman)" + +msgid "ar_QA" +msgstr "Arabic (Qatar)" + +msgid "ar_SA" +msgstr "Arabic (Saudi Arabia)" + +msgid "ar_SD" +msgstr "Arabic (Sudan)" + +msgid "ar_SY" +msgstr "Arabic (Syria)" + +msgid "ar_TN" +msgstr "Arabic (Tunisia)" + +msgid "ar_AE" +msgstr "Arabic (United Arab Emirates)" + +msgid "ar_YE" +msgstr "Arabic (Yemen)" + +msgid "be_BY" +msgstr "Belarusian (Belarus)" + +msgid "bg_BG" +msgstr "Bulgarian (Bulgaria)" + +msgid "ca_ES" +msgstr "Catalan (Spain)" + +msgid "zh_CN" +msgstr "Chinese (China)" + +msgid "zh_HK" +msgstr "Chinese (Hong Kong)" + +msgid "zh_SG" +msgstr "Chinese (Singapore)" + +msgid "zh_TW" +msgstr "Chinese (Taiwan)" + +msgid "hr_HR" +msgstr "Croatian (Croatia)" + +msgid "cs_CZ" +msgstr "Czech (Czech Republic)" + +msgid "da_DK" +msgstr "Danish (Denmark)" + +msgid "nl_BE" +msgstr "Dutch (Belgium)" + +msgid "nl_NL" +msgstr "Dutch (Netherlands)" + +msgid "en_AU" +msgstr "English (Australia)" + +msgid "en_CA" +msgstr "English (Canada)" + +msgid "en_IN" +msgstr "English (India)" + +msgid "en_IE" +msgstr "English (Ireland)" + +msgid "en_MT" +msgstr "English (Malta)" + +msgid "en_NZ" +msgstr "English (New Zealand)" + +msgid "en_PH" +msgstr "English (Philippines)" + +msgid "en_SG" +msgstr "English (Singapore)" + +msgid "en_ZA" +msgstr "English (South Africa)" + +msgid "en_GB" +msgstr "English (United Kingdom)" + +msgid "en_US" +msgstr "English (United States)" + +msgid "et_EE" +msgstr "Estonian (Estonia)" + +msgid "fi_FI" +msgstr "Finnish (Finland)" + +msgid "fr_BE" +msgstr "French (Belgium)" + +msgid "fr_CA" +msgstr "French (Canada)" + +msgid "fr_FR" +msgstr "French (France)" + +msgid "fr_LU" +msgstr "French (Luxembourg)" + +msgid "fr_CH" +msgstr "French (Switzerland)" + +msgid "de_AT" +msgstr "German (Austria)" + +msgid "de_DE" +msgstr "German (Germany)" + +msgid "de_LU" +msgstr "German (Luxembourg)" + +msgid "de_CH" +msgstr "German (Switzerland)" + +msgid "el_CY" +msgstr "Greek (Cyprus)" + +msgid "el_GR" +msgstr "Greek (Greece)" + +msgid "iw_IL" +msgstr "Hebrew (Israel)" + +msgid "hi_IN" +msgstr "Hindi (India)" + +msgid "hu_HU" +msgstr "Hungarian (Hungary)" + +msgid "is_IS" +msgstr "Icelandic (Iceland)" + +msgid "in_ID" +msgstr "Indonesian (Indonesia)" + +msgid "ga_IE" +msgstr "Irish (Ireland)" + +msgid "it_IT" +msgstr "Italian (Italy)" + +msgid "it_CH" +msgstr "Italian (Switzerland)" + +msgid "ja_JP" +msgstr "Japanese (Japan)" + +msgid "ja_JP_JP" +msgstr "Japanese (Japan,JP)" + +msgid "ko_KR" +msgstr "Korean (South Korea)" + +msgid "lv_LV" +msgstr "Latvian (Latvia)" + +msgid "lt_LT" +msgstr "Lithuanian (Lithuania)" + +msgid "mk_MK" +msgstr "Macedonian (Macedonia)" + +msgid "ms_MY" +msgstr "Malay (Malaysia)" + +msgid "mt_MT" +msgstr "Maltese (Malta)" + +msgid "no_NO" +msgstr "Norwegian (Norway)" + +msgid "no_NO_NY" +msgstr "Norwegian (Norway,Nynorsk)" + +msgid "pl_PL" +msgstr "Polish (Poland)" + +msgid "pt_BR" +msgstr "Portuguese (Brazil)" + +msgid "pt_PT" +msgstr "Portuguese (Portugal)" + +msgid "ro_RO" +msgstr "Romanian (Romania)" + +msgid "ru_RU" +msgstr "Russian (Russia)" + +msgid "sr_BA" +msgstr "Serbian (Bosnia and Herzegovina)" + +msgid "sr_ME" +msgstr "Serbian (Montenegro)" + +msgid "sr_CS" +msgstr "Serbian (Serbia and Montenegro)" + +msgid "sr_RS" +msgstr "Serbian (Serbia)" + +msgid "sk_SK" +msgstr "Slovak (Slovakia)" + +msgid "sl_SI" +msgstr "Slovenian (Slovenia)" + +msgid "es_AR" +msgstr "Spanish (Argentina)" + +msgid "es_BO" +msgstr "Spanish (Bolivia)" + +msgid "es_CL" +msgstr "Spanish (Chile)" + +msgid "es_CO" +msgstr "Spanish (Colombia)" + +msgid "es_CR" +msgstr "Spanish (Costa Rica)" + +msgid "es_DO" +msgstr "Spanish (Dominican Republic)" + +msgid "es_EC" +msgstr "Spanish (Ecuador)" + +msgid "es_SV" +msgstr "Spanish (El Salvador)" + +msgid "es_GT" +msgstr "Spanish (Guatemala)" + +msgid "es_HN" +msgstr "Spanish (Honduras)" + +msgid "es_MX" +msgstr "Spanish (Mexico)" + +msgid "es_NI" +msgstr "Spanish (Nicaragua)" + +msgid "es_PA" +msgstr "Spanish (Panama)" + +msgid "es_PY" +msgstr "Spanish (Paraguay)" + +msgid "es_PE" +msgstr "Spanish (Peru)" + +msgid "es_PR" +msgstr "Spanish (Puerto Rico)" + +msgid "es_ES" +msgstr "Spanish (Spain)" + +msgid "es_US" +msgstr "Spanish (United States)" + +msgid "es_UY" +msgstr "Spanish (Uruguay)" + +msgid "es_VE" +msgstr "Spanish (Venezuela)" + +msgid "sv_SE" +msgstr "Swedish (Sweden)" + +msgid "th_TH" +msgstr "Thai (Thailand)" + +msgid "tr_TR" +msgstr "Turkish (Turkey)" + +msgid "uk_UA" +msgstr "Ukrainian (Ukraine)" + +msgid "vi_VN" +msgstr "Vietnamese (Vietnam)" + +msgid "Thread / Thread Starter" +msgstr "" + +msgid "Last post" +msgstr "" + +msgid "Replies" +msgstr "" + +msgid "Views" +msgstr "" + +msgid "by" +msgstr "" + +msgid "The list is empty" +msgstr "" + +msgid "Forum list" +msgstr "" + +msgid "New topic" +msgstr "" + +msgid "Register" +msgstr "" + +msgid "Start new topic in" +msgstr "" + +msgid "Start new topic" +msgstr "" + +msgid "Topic title" +msgstr "" + +msgid "Topic message" +msgstr "" + +msgid "Create new topic" +msgstr "" + +msgid "My Products & Services" +msgstr "" + +msgid "Ordered Services" +msgstr "" + +msgid "Product/Service" +msgstr "" + +msgid "Price" +msgstr "" + +msgid "Next due date" +msgstr "" + +msgid "Status" +msgstr "" + +msgid "Order new service" +msgstr "" + +msgid "Order confirm" +msgstr "" + +msgid "Order confirmation" +msgstr "" + +msgid "These are the products you have selected" +msgstr "" + +msgid "Product" +msgstr "" + +msgid "Period" +msgstr "" + +msgid "setup" +msgstr "" + +msgid "Have a promo code?" +msgstr "" + +msgid "Reset" +msgstr "" + +msgid "Apply" +msgstr "" + +msgid "Total:" +msgstr "" + +msgid "Pay by" +msgstr "" + +msgid "Checkout" +msgstr "" + +msgid "Sign in" +msgstr "" + +msgid "Login to client area" +msgstr "" + +msgid "Email Address" +msgstr "" + +msgid "Password" +msgstr "" + +msgid "Login" +msgstr "" + +msgid "Reset password" +msgstr "" + +msgid "Do not have an account yet?" +msgstr "" + +msgid "Enter your details below" +msgstr "" + +msgid "Create new profile" +msgstr "" + +msgid "First Name" +msgstr "" + +msgid "Last Name" +msgstr "" + +msgid "Company" +msgstr "" + +msgid "Birthday" +msgstr "" + +msgid "You are" +msgstr "" + +msgid "Address" +msgstr "" + +msgid "Address 2" +msgstr "" + +msgid "City" +msgstr "" + +msgid "Country" +msgstr "" + +msgid "State" +msgstr "" + +msgid "Zip/Postal Code" +msgstr "" + +msgid "Phone" +msgstr "" + +msgid "Password confirm" +msgstr "" + +msgid "You have not selected any product" +msgstr "" + +msgid "Login / Sign up" +msgstr "" + +msgid "Sign In / Create new account" +msgstr "" + +msgid "" +"Become a member to participate in forum, contact support, order new services" +msgstr "" + +msgid "Phone Number" +msgstr "" + +msgid "Centova Cast server" +msgstr "" + +msgid "Details" +msgstr "" + +msgid "Recent tracks" +msgstr "" + +msgid "Username" +msgstr "" + +msgid "Unable to connect to server" +msgstr "" + +msgid "No recent tracks are available" +msgstr "" + +msgid "Invoices" +msgstr "" + +msgid "List of invoices" +msgstr "" + +msgid "Invoice management" +msgstr "" + +msgid "Unpaid" +msgstr "" + +msgid "Paid" +msgstr "" + +msgid "Title" +msgstr "" + +msgid "Issue Date" +msgstr "" + +msgid "Due Date" +msgstr "" + +msgid "Total" +msgstr "" + +msgid "Pay" +msgstr "" + +msgid "Paid at" +msgstr "" + +msgid "Order activation process will start after confirmation" +msgstr "" + +msgid "Solve captcha to activate order" +msgstr "" + +msgid "Action required" +msgstr "" + +msgid "Activate" +msgstr "" + +msgid "Order activation captcha" +msgstr "" + +msgid "Hosting management" +msgstr "" + +msgid "FTP Details" +msgstr "" + +msgid "Nameservers" +msgstr "" + +msgid "Hostname" +msgstr "" + +msgid "Account status" +msgstr "" + +msgid "Account ID" +msgstr "" + +msgid "IP" +msgstr "" + +msgid "Open Control Panel" +msgstr "" + +msgid "Configure" +msgstr "" + +msgid "" +"The product/service you have chosen has the following configuration options " +"for you to choose from." +msgstr "" + +msgid "Reply" +msgstr "" + +msgid "Quote" +msgstr "" + +msgid "Post" +msgstr "" + +msgid "Ticket details" +msgstr "" + +msgid "Subject" +msgstr "" + +msgid "Author" +msgstr "" + +msgid "Email" +msgstr "" + +msgid "Time opened" +msgstr "" + +msgid "Close ticket" +msgstr "" + +msgid "Privacy policy" +msgstr "" + +msgid "Service details" +msgstr "" + +msgid "All information about your service" +msgstr "" + +msgid "Order" +msgstr "" + +msgid "Product name" +msgstr "" + +msgid "Payment amount" +msgstr "" + +msgid "Billing cycle" +msgstr "" + +msgid "Order status" +msgstr "" + +msgid "Order created" +msgstr "" + +msgid "Activated at" +msgstr "" + +msgid "Renewal date" +msgstr "" + +msgid "Order notes" +msgstr "" + +msgid "Active support tickets" +msgstr "" + +msgid "Renew now" +msgstr "" + +msgid "Request Upgrade" +msgstr "" + +msgid "Open ticket" +msgstr "" + +msgid "Cancel" +msgstr "" + +msgid "Request Cancellation" +msgstr "" + +msgid "Help desk" +msgstr "" + +msgid "I would like to cancel" +msgstr "" + +msgid "Reason" +msgstr "" + +msgid "Submit" +msgstr "" + +msgid "Open new support ticket regarding this order" +msgstr "" + +msgid "" +"Submit new support ticket. Ticket will be visible in support section after " +"submission" +msgstr "" + +msgid "Message" +msgstr "" + +msgid "Request upgrade" +msgstr "" + +msgid "I would like to upgrade" +msgstr "" + +msgid "Upgrade to" +msgstr "" + +msgid "Notes" +msgstr "" + +msgid "Request" +msgstr "" + +msgid "Addons you have ordered with this service" +msgstr "" + +msgid "Billing Cycle" +msgstr "" + +msgid "Back to services" +msgstr "" + +msgid "Addons & extras" +msgstr "" + +msgid "Order now" +msgstr "" + +msgid "Contact us" +msgstr "" + +msgid "Name" +msgstr "" + +msgid "Send" +msgstr "" + +msgid "Select currency" +msgstr "" + +msgid "Error" +msgstr "" + +msgid "Quantity:" +msgstr "" + +msgid "Total price:" +msgstr "" + +msgid "Setup Price" +msgstr "" + +msgid "Continue" +msgstr "" + +msgid "Blog" +msgstr "" + +msgid "News & Announcements" +msgstr "" + +msgid "Track our latest posts" +msgstr "" + +msgid "Read more.." +msgstr "" + +msgid "Support tickets" +msgstr "" + +msgid "Need an answer? We are here to help" +msgstr "" + +msgid "Id" +msgstr "" + +msgid "Submitted" +msgstr "" + +msgid "ago" +msgstr "" + +msgid "Submit new ticket" +msgstr "" + +msgid "Submit new support ticket" +msgstr "" + +msgid "Knowledge base" +msgstr "" + +msgid "Download file" +msgstr "" + +msgid "Download" +msgstr "" + +msgid "Select product" +msgstr "" + +msgid "Confirm" +msgstr "" + +msgid "Incorrect please try again" +msgstr "" + +msgid "Enter the words above" +msgstr "" + +msgid "Please configure domain for your hosting account" +msgstr "" + +msgid "Use own" +msgstr "" + +msgid "Transfer" +msgstr "" + +msgid "I will use my existing domain and update nameservers" +msgstr "" + +msgid "Enter your domain name" +msgstr "" + +msgid "Register a new domain" +msgstr "" + +msgid "Check" +msgstr "" + +msgid "Transfer your domain from another registrar" +msgstr "" + +msgid "Transfer price" +msgstr "" + +msgid "Enter domain transfer code" +msgstr "" + +msgid " Year/s @ " +msgstr "" + +msgid "Back to list" +msgstr "" + +msgid "Similiar articles" +msgstr "" + +msgid "Knowledge base categories" +msgstr "" + +msgid "Proforma invoice" +msgstr "" + +msgid "Proforma Invoice" +msgstr "" + +msgid "Please choose payment type and pay for your chosen products." +msgstr "" + +msgid "Invoice" +msgstr "" + +msgid "Invoice is paid" +msgstr "" + +msgid "Account" +msgstr "" + +msgid "Company number" +msgstr "" + +msgid "VAT" +msgstr "" + +msgid "Discount" +msgstr "" + +msgid "Pay now" +msgstr "" + +msgid "Transactions" +msgstr "" + +msgid "Transaction Date" +msgstr "" + +msgid "Transaction ID" +msgstr "" + +msgid "Gateway" +msgstr "" + +msgid "Amount" +msgstr "" + +msgid "Actions" +msgstr "" + +msgid "Change payment method" +msgstr "" + +msgid "Client Area" +msgstr "" + +msgid "Tickets waiting your reply" +msgstr "" + +msgid "Profile" +msgstr "" + +msgid "ID" +msgstr "" + +msgid "Balance" +msgstr "" + +msgid "Manage profile" +msgstr "" + +msgid "All Invoices" +msgstr "" + +msgid "Services" +msgstr "" + +msgid "Active" +msgstr "" + +msgid "Soon expires" +msgstr "" + +msgid "All services" +msgstr "" + +msgid "New order" +msgstr "" + +msgid "Tickets" +msgstr "" + +msgid "Open" +msgstr "" + +msgid "On Hold" +msgstr "" + +msgid "All tickets" +msgstr "" + +msgid "New ticket" +msgstr "" + +msgid "Recent orders" +msgstr "" + +msgid "Recent emails" +msgstr "" + +msgid "Order products and services" +msgstr "" + +msgid "Become a member and manage services" +msgstr "" + +msgid "Contact Us" +msgstr "" + +msgid "Contact us for more information" +msgstr "" + +msgid "Announcements" +msgstr "" + +msgid "Latest news & announcements" +msgstr "" + +msgid "Knowledge Base" +msgstr "" + +msgid "Browse our KB for answers and FAQs" +msgstr "" + +msgid "Invoicing Software" +msgstr "" + +msgid "Powered by BoxBilling invoicing software" +msgstr "" + +msgid "Register new domain" +msgstr "" + +msgid "Transfer my domain" +msgstr "" + +msgid "Check domain availability" +msgstr "" + +msgid "Enter new domain name to register" +msgstr "" + +msgid "I want to use my nameservers" +msgstr "" + +msgid "Nameserver 1" +msgstr "" + +msgid "Nameserver 2" +msgstr "" + +msgid "Nameserver 3" +msgstr "" + +msgid "Nameserver 4" +msgstr "" + +msgid "Enter your domain name to transfer" +msgstr "" + +msgid "License key" +msgstr "" + +msgid "Valid IPs" +msgstr "" + +msgid "Valid hostnames" +msgstr "" + +msgid "Valid versions" +msgstr "" + +msgid "Valid install paths" +msgstr "" + +msgid "Processing payment ..." +msgstr "" + +msgid "Redirecting to payment gateway.." +msgstr "" + +msgid "" +"Please click here to continue if this page does not redirect automatically " +"in 5 seconds" +msgstr "" + +msgid "Profile details" +msgstr "" + +msgid "Keep your profile up to date" +msgstr "" + +msgid "Change Password" +msgstr "" + +msgid "Gravatar" +msgstr "" + +msgid "Currency" +msgstr "" + +msgid "API" +msgstr "" + +msgid "Update profile" +msgstr "" + +msgid "Company Name" +msgstr "" + +msgid "Phone Country Code" +msgstr "" + +msgid "Change password" +msgstr "" + +msgid "Enter new password" +msgstr "" + +msgid "API key" +msgstr "" + +msgid "" +"API key allows integration with external applications. You will need this " +"key for authentication." +msgstr "" + +msgid "Warning! Resetting the key will break existing applications using it." +msgstr "" + +msgid "Your API key" +msgstr "" + +msgid "Reset key" +msgstr "" + +msgid "Please register with" +msgstr "" + +msgid "at " +msgstr "" + +msgid "" +"to change your profile image. Gravatar image updates may not appear " +"immediately." +msgstr "" + +msgid "Your profile currency is" +msgstr "" + +msgid "" +"Create new client profile if you want to manage your money in other currency" +msgstr "" + +msgid "" +"Your profile currency will be defined after your first order. Once your " +"currency is set, all your profile accounting will be managed in that " +"currency and can not be changed." +msgstr "" + +msgid "What are you looking for?" +msgstr "" + +msgid "Search" +msgstr "" + +msgid "Try using other keyword. No matches not for keyword:" +msgstr "" + +msgid "Back to emails" +msgstr "" + +msgid "From" +msgstr "" + +msgid "To" +msgstr "" + +msgid "Sent" +msgstr "" + +msgid "Resend" +msgstr "" + +msgid "Delete" +msgstr "" + +msgid "VPS management" +msgstr "" + +msgid "Statistics" +msgstr "" + +msgid "Manage" +msgstr "" + +msgid "Control panel" +msgstr "" + +msgid "Refresh" +msgstr "" + +msgid "Plan" +msgstr "" + +msgid "Operating system" +msgstr "" + +msgid "IP address" +msgstr "" + +msgid "Additional IP addresses" +msgstr "" + +msgid "Type" +msgstr "" + +msgid "Root password" +msgstr "" + +msgid "Change status" +msgstr "" + +msgid "VPS rebooting. Refresh page after a few moments." +msgstr "" + +msgid "Reboot" +msgstr "" + +msgid "VPS booting. Refresh page after a few moments." +msgstr "" + +msgid "Boot" +msgstr "" + +msgid "VPS shutdown" +msgstr "" + +msgid "Shutdown" +msgstr "" + +msgid "Change hostname" +msgstr "" + +msgid "Hostname changed" +msgstr "" + +msgid "New hostname" +msgstr "" + +msgid "Enter new hostname" +msgstr "" + +msgid "Change" +msgstr "" + +msgid "Change operating system" +msgstr "" + +msgid "Operating system is being changed" +msgstr "" + +msgid "New operating system" +msgstr "" + +msgid "Change root password" +msgstr "" + +msgid "Root password changed" +msgstr "" + +msgid "New password" +msgstr "" + +msgid "Enter new root password" +msgstr "" + +msgid "Bandwidth" +msgstr "" + +msgid "Used" +msgstr "" + +msgid "Free" +msgstr "" + +msgid "Memory" +msgstr "" + +msgid "Disk usage" +msgstr "" + +msgid "Boot up server to see statistics" +msgstr "" + +msgid "Are you sure?" +msgstr "" + +msgid "VPS booting. Reload page after a few moments." +msgstr "" + +msgid "Login details" +msgstr "" + +msgid "Open control panel" +msgstr "" + +msgid "Change client area password" +msgstr "" + +msgid "Client area password changed" +msgstr "" + +msgid "Home" +msgstr "" + +msgid "Forum" +msgstr "" + +msgid "Support" +msgstr "" + +msgid "Emails" +msgstr "" + +msgid "Payment history" +msgstr "" + +msgid "Domain management" +msgstr "" + +msgid "Domain details" +msgstr "" + +msgid "Domain" +msgstr "" + +msgid "Registration date" +msgstr "" + +msgid "Expires at" +msgstr "" + +msgid "Domain Secret" +msgstr "" + +msgid "" +"All domain names (except a .EU, .UK domain name) have a Domain (Transfer) " +"Secret Key/Authorization Code (EPP Code) associated with them. This would be " +"required if you want to transfer service." +msgstr "" + +msgid "Get EPP code" +msgstr "" + +msgid "Domain Protection" +msgstr "" + +msgid "" +"Domain locking is a security enhancement to prevent unauthorized transfers " +"of your domain to another registrar or web host by \"locking\" your domain " +"name servers." +msgstr "" + +msgid "Unlock" +msgstr "" + +msgid "Lock" +msgstr "" + +msgid "Domain Privacy Settings" +msgstr "" + +msgid "" +"If you would like to hide domain contact information which is shown on WHOIS " +"you can enable privacy protection. Once domain privacy protection is enabled " +"no one will know who registered this service. And once you decide to disable " +"privacy protection, information that is listed above on \"Update Domain " +"Contact Details\" section will be seen on domain WHOIS again." +msgstr "" + +msgid "Disable Privacy protection" +msgstr "" + +msgid "Enable Privacy protection" +msgstr "" + +msgid "Domain Nameservers" +msgstr "" + +msgid "" +"If you would like to host this domain with another company you can update " +"nameservers." +msgstr "" + +msgid "Update nameservers" +msgstr "" + +msgid "Update" +msgstr "" + +msgid "Domain Contact Details" +msgstr "" + +msgid "" +"Domain contact details will be displayed once someone will check WHOIS " +"output (which is public) of your service. This will update Technical, " +"Billing and Admin contacts for this service. You can enable domain privacy " +"protection if you want to hide your public WHOIS information." +msgstr "" + +msgid "Update domain contact details" +msgstr "" + +msgid "Address Line 1" +msgstr "" + +msgid "Address Line 2" +msgstr "" + +msgid "Zip" +msgstr "" + +msgid "Phone number" +msgstr "" + +msgid "Vps hostname" +msgstr "" + +msgid "Enter hostname for VPS: mydomain.com" +msgstr "" + +msgid "OS template" +msgstr "" + +msgid "Yes" +msgstr "" + +msgid "No" +msgstr "" + +msgid "Topic information" +msgstr "" + +msgid "Topic" +msgstr "" + +msgid "Started By" +msgstr "" + +msgid "Messages" +msgstr "" + +msgid "Since" +msgstr "" + +msgid "Back to threads list" +msgstr "" + +msgid "Post new message in forum" +msgstr "" + +msgid "No replies in this topic" +msgstr "" + +msgid "Select Product" +msgstr "" + +msgid "Choose products we offer for selling" +msgstr "" + +msgid "Starting from:" +msgstr "" + +msgid "View products" +msgstr "" + +msgid "Manage hosting account" +msgstr "" + +msgid "Server IP" +msgstr "" + +msgid "Server Hostname" +msgstr "" + +msgid "Hosting plan" +msgstr "" + +msgid "per month" +msgstr "" + +msgid "Disk quota" +msgstr "" + +msgid "Manage domain" +msgstr "" + +msgid "Jump to cPanel" +msgstr "" + +msgid "Reseller control panel" +msgstr "" + +msgid "FTP details" +msgstr "" + +msgid "Use these details to connect to your FTP account." +msgstr "" + +msgid "FTP IP" +msgstr "" + +msgid "FTP Username" +msgstr "" + +msgid "FTP Password" +msgstr "" + +msgid "Change account password" +msgstr "" + +msgid "Change your FTP cPanel SSH password." +msgstr "" + +msgid "Password Confirm" +msgstr "" + +msgid "Change username" +msgstr "" + +msgid "Change domain" +msgstr "" + +msgid "About us" +msgstr "" + +msgid "by " +msgstr "" + +msgid "" +"Welcome to our forums. If you wish to become a member and post, you have to " +"be registered member." +msgstr "" + +msgid "Threads" +msgstr "" + +msgid "Posts" +msgstr "" + +msgid "Favorite topics" +msgstr "" + +msgid "Dashboard" +msgstr "" + +msgid "Shopping cart" +msgstr "" + +msgid "Sign out" +msgstr "" + +msgid "Email address" +msgstr "" + +msgid "Select language" +msgstr "" + +msgid "Popular articles" +msgstr "" + +msgid "Recent posts" +msgstr "" + +msgid "Terms and conditions" +msgstr "" + +msgid "Loading .." +msgstr "" + +msgid "All" +msgstr "" + +msgid "License details" +msgstr "" + +msgid "Key" +msgstr "" + +msgid "All ips" +msgstr "" + +msgid "Valid Domains" +msgstr "" + +msgid "All hosts" +msgstr "" + +msgid "Valid Versions" +msgstr "" + +msgid "All versions" +msgstr "" + +msgid "Valid Install paths" +msgstr "" + +msgid "All paths" +msgstr "" + +msgid "Reset license" +msgstr "" + +msgid "You can reset your license parameters if you have changed your server" +msgstr "" + +msgid "Payments history" +msgstr "" + +msgid "" +"Here you can track your payments you have made and what you have been " +"charged for" +msgstr "" + +msgid "Description" +msgstr "" + +msgid "Date" +msgstr "" + +msgid "Add Funds" +msgstr "" + +msgid "Add funds in advance" +msgstr "" + +msgid "You can add funds to your account if you have active order." +msgstr "" + +msgid "Add funds" +msgstr "" + +msgid "Host my own domain" +msgstr "" + +msgid "Subdomain" +msgstr "" + +msgid "CPU" +msgstr "" + +msgid "RAM" +msgstr "" + +msgid "Disk space" +msgstr "" + +msgid "Monthly price" +msgstr "" + +msgid "Ticket ID" +msgstr "" + +msgid "Related to" +msgstr "" + +msgid "Service #" +msgstr "" + +msgid "Tickets list" +msgstr "" + +msgid "Terms and Conditions" +msgstr "" + +msgid "Emails we have sent you" +msgstr "" + +msgid "Here you can track emails we have sent you" +msgstr "" + +msgid "Email subject" +msgstr "" + +msgid "Date sent" +msgstr "" + +msgid "How to reset my password?" +msgstr "" + +msgid "" +"Enter your email to reset password. You will receive new password after " +"reset link is confirmed." +msgstr "" + +msgid "Password reset confirmation email was sent" +msgstr "" + +msgid "Thank you" +msgstr "" + +msgid "Payment for invoice received" +msgstr "" + +msgid "" +"Your payment is being processed right now. This takes about 5 minutes to " +"complete." +msgstr "" + +msgid "You will be automatically redirected to invoice page after 5 minutes." +msgstr "" + +msgid "Example module" +msgstr "" + +msgid "Example module title" +msgstr "" + +msgid "See protected content" +msgstr "" + +msgid "This content can be seen only if client is logged in" +msgstr "" + +msgid "Your protected content" +msgstr "" + +msgid "Payment for invoice :serie:id [:title]" +msgstr "" + +msgid "Card number" +msgstr "" + +msgid "CVV2" +msgstr "" + +msgid "Expiration Date" +msgstr "" + +msgid "Zipcode" +msgstr "" + +msgid "Redirecting to 2Checkout.com" +msgstr "" + +msgid "Redirecting to PayPal.com" +msgstr "" + +msgid "Could not connect to whois :server server" +msgstr "" + +msgid "Error creating " +msgstr "" + +msgid "Only active orders can be suspended" +msgstr "" + +msgid "Can not cancel " +msgstr "" + +msgid "Service " +msgstr "" + +msgid "Can not remove hosting plan which has active accounts" +msgstr "" + +msgid "Invoice item title is missing" +msgstr "" + +msgid ":product setup" +msgstr "" + +msgid "Could not activate proforma item. Order :id not found" +msgstr "" + +msgid "Filename is missing in product config." +msgstr "" + +msgid "Parameter :param does not exist" +msgstr "" + +msgid "Theme was not found in path :path" +msgstr "" + +msgid "Unable to decode theme manifest file :file" +msgstr "" + +msgid "" +"Please check if you have configured FTP layer properly in Configuration > " +"General settings > FTP layer." +msgstr "" + +msgid "" +"Please make sure that FTP Root is defined properly. Could not find bb-config." +"php file in :path" +msgstr "" + +msgid "" +"You have reached free version limit. Upgrade to PRO version of BoxBilling if " +"you want this limit removed." +msgstr "" + +msgid "" +"BoxBilling license key must be defined in bb-config.php file as BB_LICENSE " +"constant." +msgstr "" + +msgid "" +"PHP curl extension is disabled on your server. Please enable php curl " +"extension." +msgstr "" + +msgid "Can not remove group with clients" +msgstr "" + +msgid "Could not find main domain product" +msgstr "" + +msgid "Hosting product must have domain configuration" +msgstr "" + +msgid "Domain action is missing" +msgstr "" + +msgid "Hosting product must have defined register_sld parameter" +msgstr "" + +msgid "Hosting product must have defined register_tld parameter" +msgstr "" + +msgid "Hosting product must have defined transfer_sld parameter" +msgstr "" + +msgid "Hosting product must have defined transfer_tld parameter" +msgstr "" + +msgid "Can not remove category which has articles" +msgstr "" + +msgid "" +"Hosting product is not configured completely. Configure server for hosting " +"product." +msgstr "" + +msgid "" +"Hosting product is not configured completely. Configure hosting plan for " +"hosting product." +msgstr "" + +msgid "Domain name is not valid." +msgstr "" + +msgid "Domain extension is not valid." +msgstr "" + +msgid "Server from order configuration was not found" +msgstr "" + +msgid "Hosting plan from order configuration was not found" +msgstr "" + +msgid "Could not activate order. Service was not created" +msgstr "" + +msgid "Order :id has no active service" +msgstr "" + +msgid "Account password is missing or is not valid" +msgstr "" + +msgid "Account ip is missing or is not valid" +msgstr "" + +msgid "Domain sld or tld is missing" +msgstr "" + +msgid "Can not refund invoice with negative amount" +msgstr "" + +msgid "" +"You must have at least one active order before you can add funds so you " +"cannot proceed at the current time!" +msgstr "" + +msgid "Amount is not valid" +msgstr "" + +msgid "Invoices are not generated for 0 amount orders" +msgstr "" + +msgid "Payment for invoice :serie:id" +msgstr "" + +msgid "Can not remove invoice. It was paid but services were not activated" +msgstr "" + +msgid "License plugin :plugin was not found" +msgstr "" + +msgid "License plugin do not have generate method" +msgstr "" + +msgid "Custom plugin method :method is forbidden" +msgstr "" + +msgid "Plugin class file :file was not found" +msgstr "" + +msgid "Plugin :plugin does not support action :action" +msgstr "" + +msgid "Can not remove helpdesk which has tickets" +msgstr "" + +msgid "Currency conversion rate can not be zero" +msgstr "" + +msgid "Can not remove default currency" +msgstr "" + +msgid "This administrator account is protected and can not be removed" +msgstr "" + +msgid ":product_title" +msgstr "" + +msgid "Can not remove product category with products" +msgstr "" + +msgid "BoxBilling core modules can not be installed or removed" +msgstr "" + +msgid "" +"Module can not be installed. It requires at least :min version of " +"BoxBilling. You are using :v" +msgstr "" + +msgid "Could not retrieve version information for extension :ext" +msgstr "" + +msgid "Latest :mod version installed. No need to update" +msgstr "" + +msgid "Could not retrieve :ext information" +msgstr "" + +msgid "Visit extension site for update information." +msgstr "" + +msgid "BoxBilling core modules can not be managed" +msgstr "" + +msgid "Could not extract extension zip file" +msgstr "" + +msgid "Module already installed." +msgstr "" + +msgid "" +"Extension can not be moved. Make sure your server write permissions to bb-" +"modules folder." +msgstr "" + +msgid "" +"Extension can not be moved. Make sure your server write permissions to bb-" +"themes folder." +msgstr "" + +msgid "" +"Extension can not be moved. Make sure your server write permissions to bb-" +"locale folder." +msgstr "" + +msgid "" +"Extension does not support auto-install deature. Extension must be installed " +"manually" +msgstr "" + +msgid "Unable to connect to BoxBilling extensiosn site." +msgstr "" + +msgid "Administrators group can not be removed" +msgstr "" + +msgid "Can not remove group which has staff members" +msgstr "" + +msgid "" +"This is a last message in topic. Remove topic in order to remove this " +"message." +msgstr "" + +msgid "Payment gateway :adapter was not found" +msgstr "" + +msgid "" +"Are you registering new domain or transfering existing? Action parameter " +"missing." +msgstr "" + +msgid "Invalid domain action." +msgstr "" + +msgid "Order data must contain :field configuration field" +msgstr "" + +msgid "Domain name :domain is not valid" +msgstr "" + +msgid "Domain TLD is not valid." +msgstr "" + +msgid "Domain name is required." +msgstr "" + +msgid "Transfer domain type (tld) is required." +msgstr "" + +msgid "Transfer domain name (sld) is required." +msgstr "" + +msgid "Transfer code is required for domains transfers." +msgstr "" + +msgid "TLD not found" +msgstr "" + +msgid ":domain can not be transferred!" +msgstr "" + +msgid "Domain registration tld parameter missing." +msgstr "" + +msgid "Domain registration sld parameter missing." +msgstr "" + +msgid "Years parameter is missing for domain configuration." +msgstr "" + +msgid ":tld can be registered for at least :years years" +msgstr "" + +msgid ":domain is already registered!" +msgstr "" + +msgid "Default domain nameservers are not configured" +msgstr "" + +msgid "Nameserver 1 is required" +msgstr "" + +msgid "Nameserver 2 is required" +msgstr "" + +msgid "Required field contact is missing" +msgstr "" + +msgid "Required field :field is missing" +msgstr "" + +msgid "Domain name is not valid" +msgstr "" + +msgid "Domain can not be transferred" +msgstr "" + +msgid "Domain can not be registered" +msgstr "" + +msgid "Period parameter not passed" +msgstr "" + +msgid "I'm afraid we are out of stock." +msgstr "" + +msgid "Addon period parameter not passed" +msgstr "" + +msgid "Product not found" +msgstr "" + +msgid "Add products to cart before applying promo code" +msgstr "" + +msgid "Currency can not be changed. Client already have invoices issued." +msgstr "" + +msgid "Currency can not be changed. Client already have orders." +msgstr "" + +msgid "Could not determine domain price. Domain action is missing" +msgstr "" + +msgid "Unknown TLD. Could not determine registration price" +msgstr "" + +msgid "Domain product can not be removed." +msgstr "" + +msgid "Unknown transaction #:id type: :type" +msgstr "" + +msgid "" +"Could not determine transaction origin. Transaction payment gateway is " +"unknown." +msgstr "" + +msgid "Can not handle transaction received from unknown payment gateway: :id" +msgstr "" + +msgid "Transaction :id is not associated with an invoice." +msgstr "" + +msgid "Invoice #:id not found" +msgstr "" + +msgid "Instant payment notification (IPN) did not pass gateway :id validation" +msgstr "" + +msgid "" +"Payment gateway :id method getTransaction should return Payment_Transaction " +"object" +msgstr "" + +msgid "" +"Can not create subscription. Subscription id from payment gateway was not " +"received" +msgstr "" + +msgid "Subscription #:id was not found. Could not unsusbscribe" +msgstr "" + +msgid "Only approved transaction can be processed" +msgstr "" + +msgid "Transaction currency :code do not match required currency :required" +msgstr "" + +msgid "" +"Transaction status on payment gateway is Pending. Only Complete or Unknown " +"transactions can be processed." +msgstr "" + +msgid "Define clients currency before adding funds." +msgstr "" + +msgid "Funds amount is not valid" +msgstr "" + +msgid "Funds description is not valid" +msgstr "" + +msgid "Client currency do not match invoice currency" +msgstr "" + +msgid "Can not add negative amount to client balance for debit transaction" +msgstr "" + +msgid "Conversion rate can't be 0" +msgstr "" + +msgid "Product pricing could not be determined. " +msgstr "" + +msgid "Repo class for product was not found" +msgstr "" + +msgid "Unknown Period selected for setup price" +msgstr "" + +msgid "Product :id payment type is recurrent, but period was not selected" +msgstr "" + +msgid "Unknown Period selected for price" +msgstr "" + +msgid "Can not remove product which has active orders." +msgstr "" + +msgid "Invalid server manager. Server was not configured properly." +msgstr "" + +msgid "Server manager :adapter is not valid" +msgstr "" + +msgid "Can not remove server which has active accounts" +msgstr "" + +msgid "Domain registrar :adapter was not found" +msgstr "" + +msgid "Registrar :adapter was not found" +msgstr "" + +msgid "Registrar adapter :adapter should extend Registrar_AdapterAbstract" +msgstr "" + +msgid "Can not remove registrar which has domains" +msgstr "" + +msgid "Invalid identity" +msgstr "" + +msgid ":module method toApiArray not found" +msgstr "" + +msgid "Client api can not be invoked from guest or admin role" +msgstr "" + +msgid "Invalid identity. Clear browser cookies" +msgstr "" + +msgid "Method :method must contain underscore" +msgstr "" + +msgid "Invalid module name" +msgstr "" + +msgid "BoxBilling module :mod is not installed/activated" +msgstr "" + +msgid "Module api file :file is not available" +msgstr "" + +msgid "You do not have access to :mod module" +msgstr "" + +msgid "Api class must be instance of Api_Abstract" +msgstr "" + +msgid ":type API call :method does not exist in module :module" +msgstr "" + +msgid "second" +msgstr "" + +msgid "minute" +msgstr "" + +msgid "hour" +msgstr "" + +msgid "day" +msgstr "" + +msgid "week" +msgstr "" + +msgid "month" +msgstr "" + +msgid "year" +msgstr "" + +msgid "decade" +msgstr "" + +msgid "Period Error. Unit :unit is not defined" +msgstr "" + +msgid "" +"Invalid period quantity :qty for unit :unit. Allowed range is from :from to :" +"to" +msgstr "" + +msgid "Every week" +msgstr "" + +msgid "Every month" +msgstr "" + +msgid "Every 3 months" +msgstr "" + +msgid "Every 6 months" +msgstr "" + +msgid "Every year" +msgstr "" + +msgid "Every 2 years" +msgstr "" + +msgid "Every 3 years" +msgstr "" + +msgid "Every :number day" +msgstr "" + +msgid "Every :number week(s)" +msgstr "" + +msgid "Every :number months" +msgstr "" + +msgid "Every :number years" +msgstr "" + +msgid "Unit not defined" +msgstr "" + +msgid "Can not determine months amount from unit" +msgstr "" + +msgid "CURL extension is not enabled" +msgstr "" + +msgid "Module :mod manifest file is missing" +msgstr "" + +msgid "" +"Module :mod manifest file is not valid. Check file syntax and permissions." +msgstr "" + +msgid "Service class :class was not found in :path" +msgstr "" + +msgid "Client controller class :class was not found in :path" +msgstr "" + +msgid "Admin controller class :class was not found in :path" +msgstr "" + +msgid "Core module can not be updated" +msgstr "" + +msgid "" +"FTP extension is not enabled in PHP. You will not be able to use automatic " +"updates and other automation." +msgstr "" + +msgid "The ftp PHP extension is not available" +msgstr "" + +msgid "FTP hostname is required" +msgstr "" + +msgid "FTP username is required" +msgstr "" + +msgid "FTP password is required" +msgstr "" + +msgid "Failed to connect to FTP Server :host : :port" +msgstr "" + +msgid "FTP Username/Password incorrect for :usernmae" +msgstr "" + +msgid "Resource is not a stream" +msgstr "" + +msgid "Mode cannot be changed on existing streams" +msgstr "" + +msgid ":stream cannot be opened with mode :mode" +msgstr "" + +msgid "Unable to write to stream" +msgstr "" + +msgid ":module method getSearchQuery not found" +msgstr "" + +msgid "Invalid :module method getSearchQuery return" +msgstr "" + +msgid "Page :url not found" +msgstr "" + +msgid "Page not found" +msgstr "" + +msgid "File :file does not exist" +msgstr "" + +msgid "Invalid zip file" +msgstr "" + +msgid "Zip extraction failed" +msgstr "" + +msgid "Unknown mail transport: :transport" +msgstr "" + +msgid "SMTP host not configured" +msgstr "" + +msgid "SMTP port not configured" +msgstr "" + +msgid "SMTP hostname is not configured." +msgstr "" + +msgid "Missing log message" +msgstr "" + +msgid "Bad log priority" +msgstr "" + +msgid "Email is not valid" +msgstr "" + +msgid "Password too short!" +msgstr "" + +msgid "Password must include at least one number!" +msgstr "" + +msgid "Password must include at least one letter!" +msgstr "" + +msgid "Client" +msgstr "" + +msgid "Support ticket" +msgstr "" + +msgid "Staff member" +msgstr "" + +msgid "Announcement" +msgstr "" + +msgid "Forum topic" +msgstr "" + +msgid "Filter invoices" +msgstr "" + +msgid "Nr" +msgstr "" + +msgid "All statuses" +msgstr "" + +msgid "Refunded" +msgstr "" + +msgid "Issue date" +msgstr "" + +msgid "Filter" +msgstr "" + +msgid "Unpaid invoices" +msgstr "" + +msgid "Refunded invoices" +msgstr "" + +msgid "Paid invoices" +msgstr "" + +msgid "New Invoice" +msgstr "" + +msgid "Issued at" +msgstr "" + +msgid "Start typing clients name, email or ID" +msgstr "" + +msgid "Prepare" +msgstr "" + +msgid "Settings" +msgstr "" + +msgid "YouHosting settings" +msgstr "" + +msgid "Advanced" +msgstr "" + +msgid "Your IP" +msgstr "" + +msgid "WebHook URL" +msgstr "" + +msgid "Api Key" +msgstr "" + +msgid "Update settings" +msgstr "" + +msgid "Check connection" +msgstr "" + +msgid "Import clients" +msgstr "" + +msgid "Import clients, accounts and products" +msgstr "" + +msgid "Allowed IPs for Webhook listener" +msgstr "" + +msgid "Redirects" +msgstr "" + +msgid "The list is empty." +msgstr "" + +msgid "Create new redirect" +msgstr "" + +msgid "Add" +msgstr "" + +msgid "Number" +msgstr "" + +msgid "Created at" +msgstr "" + +msgid "Due at" +msgstr "" + +msgid "Reminded at" +msgstr "" + +msgid "Approved" +msgstr "" + +msgid "Serie and number" +msgstr "" + +msgid "Tax" +msgstr "" + +msgid "Payment method" +msgstr "" + +msgid "Text before invoice items table" +msgstr "" + +msgid "Text after invoice items table" +msgstr "" + +msgid "Company VAT" +msgstr "" + +msgid "Company Number" +msgstr "" + +msgid "First name" +msgstr "" + +msgid "Last name" +msgstr "" + +msgid "Invoice items" +msgstr "" + +msgid "Print" +msgstr "" + +msgid "Staff" +msgstr "" + +msgid "New staff member" +msgstr "" + +msgid "Manage groups" +msgstr "" + +msgid "New group" +msgstr "" + +msgid "Group" +msgstr "" + +msgid "Configuration updated" +msgstr "" + +msgid "Check login IP" +msgstr "" + +msgid "Allowed IPs. One per line" +msgstr "" + +msgid "Signature" +msgstr "" + +msgid "Inactive" +msgstr "" + +msgid "Create" +msgstr "" + +msgid "Create group" +msgstr "" + +msgid "Registrar" +msgstr "" + +msgid "Transfer code" +msgstr "" + +msgid "Privacy protected" +msgstr "" + +msgid "Locked" +msgstr "" + +msgid "Registration/Renewal years" +msgstr "" + +msgid "Disable privacy protection" +msgstr "" + +msgid "Enable privacy protection" +msgstr "" + +msgid "management" +msgstr "" + +msgid "Clients" +msgstr "" + +msgid "Edit" +msgstr "" + +msgid "Orders" +msgstr "" + +msgid "Payments" +msgstr "" + +msgid "Logins" +msgstr "" + +msgid "Client profile details" +msgstr "" + +msgid "Client Profile updated" +msgstr "" + +msgid "Suspended" +msgstr "" + +msgid "Canceled" +msgstr "" + +msgid "Individual" +msgstr "" + +msgid "Other/Unknown" +msgstr "" + +msgid "Company details" +msgstr "" + +msgid "Address and contact details" +msgstr "" + +msgid "Postcode" +msgstr "" + +msgid "Additional settings" +msgstr "" + +msgid "Alternative ID" +msgstr "" + +msgid "Used to identify client on foreign system. Usually used by importers" +msgstr "" + +msgid "Exempt from tax" +msgstr "" + +msgid "Signed up time" +msgstr "" + +msgid "Password changed" +msgstr "" + +msgid "Custom fields" +msgstr "" + +msgid "Use these fields to define custom client details" +msgstr "" + +msgid "Client Profile custom fields updated" +msgstr "" + +msgid "Custom field" +msgstr "" + +msgid "Client payments history" +msgstr "" + +msgid "Add funds for client" +msgstr "" + +msgid "Funds added" +msgstr "" + +msgid "Client orders" +msgstr "" + +msgid "Client invoices" +msgstr "" + +msgid "Client support tickets" +msgstr "" + +msgid "Logins history" +msgstr "" + +msgid "Emails sent to client" +msgstr "" + +msgid "Transactions received" +msgstr "" + +msgid "Create new order" +msgstr "" + +msgid "for" +msgstr "" + +msgid "Invoice option" +msgstr "" + +msgid "Activate order" +msgstr "" + +msgid "Place new order" +msgstr "" + +msgid "Themes" +msgstr "" + +msgid "Client area themes" +msgstr "" + +msgid "Set as default" +msgstr "" + +msgid "Filter clients" +msgstr "" + +msgid "Company name" +msgstr "" + +msgid "New client" +msgstr "" + +msgid "Groups" +msgstr "" + +msgid "Tax rules" +msgstr "" + +msgid "New tax rule" +msgstr "" + +msgid "Tax settings" +msgstr "" + +msgid "EU VAT" +msgstr "" + +msgid "State/Region" +msgstr "" + +msgid "Tax rate" +msgstr "" + +msgid "Applies to any country" +msgstr "" + +msgid "Applies to any state" +msgstr "" + +msgid "Enable tax support" +msgstr "" + +msgid "Automatic VAT Tax Rules Setup" +msgstr "" + +msgid "" +"If you would like BoxBilling to automatically setup the EU VAT tax rules for " +"you for all EU Member States then simply enter your VAT Label & local VAT " +"rate below and click the submit button. This action will delete any existing " +"tax rules and configure the VAT rates for all EU countries." +msgstr "" + +msgid "VAT Label" +msgstr "" + +msgid "VAT rate" +msgstr "" + +msgid "21" +msgstr "" + +msgid "Create EU VAT Rules" +msgstr "" + +msgid "Tax title" +msgstr "" + +msgid "sales Tax" +msgstr "" + +msgid "18" +msgstr "" + +msgid "Leave empty to apply to all states" +msgstr "" + +msgid "Filter orders" +msgstr "" + +msgid "Creation date" +msgstr "" + +msgid "Pending setup" +msgstr "" + +msgid "Supended" +msgstr "" + +msgid "File manager" +msgstr "" + +msgid "Full screen" +msgstr "" + +msgid "License" +msgstr "" + +msgid "Module settings" +msgstr "" + +msgid "" +"After purchase you have received an e-mail with license key. Update license " +"key to unlock all features of BoxBilling" +msgstr "" + +msgid "" +"To change license key, change BB_LICENSE value in bb-config." +"php file" +msgstr "" + +msgid "Edit bb-config.php file" +msgstr "" + +msgid "Licensed to" +msgstr "" + +msgid "Hi," +msgstr "" + +msgid "Loading ..." +msgstr "" + +msgid "New" +msgstr "" + +msgid "All settings" +msgstr "" + +msgid "Theme settings" +msgstr "" + +msgid "Help" +msgstr "" + +msgid "Visit site" +msgstr "" + +msgid "Logout" +msgstr "" + +msgid "Notifications" +msgstr "" + +msgid "Inquiries" +msgstr "" + +msgid "INFORMATION" +msgstr "" + +msgid "Metric" +msgstr "" + +msgid "Today" +msgstr "" + +msgid "Yesterday" +msgstr "" + +msgid "This month so far" +msgstr "" + +msgid "Last month" +msgstr "" + +msgid "Income" +msgstr "" + +msgid "Latest orders" +msgstr "" + +msgid "Product sales" +msgstr "" + +msgid "No active orders available" +msgstr "" + +msgid "Define date interval for graphs" +msgstr "" + +msgid "Update graphs" +msgstr "" + +msgid "Recent clients activity" +msgstr "" + +msgid "Recent staff activity" +msgstr "" + +msgid "Forum settings" +msgstr "" + +msgid "Forum points" +msgstr "" + +msgid "Enabled" +msgstr "" + +msgid "Disabled" +msgstr "" + +msgid "Give points for posting in selected forums" +msgstr "" + +msgid "Top level domain management" +msgstr "" + +msgid "Registration price" +msgstr "" + +msgid "Renewal price" +msgstr "" + +msgid "Minimum years of registration" +msgstr "" + +msgid "Allow registration" +msgstr "" + +msgid "Allow transfer" +msgstr "" + +msgid "Invoice settings" +msgstr "" + +msgid "Number of days to generate new invoice before order expiration" +msgstr "" + +msgid "Invoice due days" +msgstr "" + +msgid "Auto invoice approval" +msgstr "" + +msgid "Proforma Invoicing / Sequential Invoice Numbering" +msgstr "" + +msgid "Proforma invoice prefix/series" +msgstr "" + +msgid "Paid invoice prefix/series" +msgstr "" + +msgid "Next paid invoice number" +msgstr "" + +msgid "Refunds settings" +msgstr "" + +msgid "Refunds logic" +msgstr "" + +msgid "Add funds settings" +msgstr "" + +msgid "Minimum amount for add funds invoice" +msgstr "" + +msgid "Unlimited" +msgstr "" + +msgid "Maximum amount for add funds invoice" +msgstr "" + +msgid "Client area languages" +msgstr "" + +msgid "New language" +msgstr "" + +msgid "Language" +msgstr "" + +msgid "Code" +msgstr "" + +msgid "BoxBilling in your language" +msgstr "" + +msgid "" +"Although BoxBilling displays in U.S. English by default, the software has " +"the built-in capability to be used in any language. Follow instructions " +"bellow to install new language." +msgstr "" + +msgid "Check if your language translation file is available at" +msgstr "" + +msgid "BoxBilling extensions site" +msgstr "" + +msgid "Download language files and place them to" +msgstr "" + +msgid "" +"Language will be automatically available and can be changed in client area" +msgstr "" + +msgid "Read" +msgstr "" + +msgid "Installing BoxBilling in Your Language" +msgstr "" + +msgid "" +"to learn how to install files that will transform BoxBilling so it displays " +"in your language." +msgstr "" + +msgid "Translations can be made with" +msgstr "" + +msgid "software" +msgstr "" + +msgid "Changing default language" +msgstr "" + +msgid "Default language can be set in" +msgstr "" + +msgid "Removing language" +msgstr "" + +msgid "" +"Removing languages from BoxBilling is really simple. Just delete language " +"folder you wish from" +msgstr "" + +msgid "Order management" +msgstr "" + +msgid "Edit order" +msgstr "" + +msgid "Service management" +msgstr "" + +msgid "Addons" +msgstr "" + +msgid "History" +msgstr "" + +msgid "Activated" +msgstr "" + +msgid "Order group ID" +msgstr "" + +msgid "Order promo code" +msgstr "" + +msgid "Reason of suspendation" +msgstr "" + +msgid "Suspendation reason" +msgstr "" + +msgid "Reason of cancelation" +msgstr "" + +msgid "Cancelation reason" +msgstr "" + +msgid "Changes status without performing action" +msgstr "" + +msgid "Order invoices" +msgstr "" + +msgid "Order status change history" +msgstr "" + +msgid "Note" +msgstr "" + +msgid "Support tickets regarding this order" +msgstr "" + +msgid "Something went wrong here" +msgstr "" + +msgid "Back to Dashboard" +msgstr "" + +msgid "Main website" +msgstr "" + +msgid "Extensions" +msgstr "" + +msgid "Update BoxBilling" +msgstr "" + +msgid "Learn more about extensions" +msgstr "" + +msgid "Hooks" +msgstr "" + +msgid "Activate or deactivate extensions" +msgstr "" + +msgid "Extension" +msgstr "" + +msgid "Deactivate" +msgstr "" + +msgid "Hook" +msgstr "" + +msgid "Automatic update" +msgstr "" + +msgid "" +"Automatic updater is a tool to update BoxBilling to latest version in one " +"click. Works on these hosting environments where PHP has permissions to " +"overwrite files uploaded via FTP." +msgstr "" + +msgid "Manual update" +msgstr "" + +msgid "" +"Manual update is a solution when auto updater can not work on current " +"installation environment" +msgstr "" + +msgid "Extending BoxBilling" +msgstr "" + +msgid "" +"BoxBilling gives developers all the capabilities to customize, integrate & " +"extend the core system into your own website & applications." +msgstr "" + +msgid "Hosting plans and servers" +msgstr "" + +msgid "New server" +msgstr "" + +msgid "New hosting plan" +msgstr "" + +msgid "Servers" +msgstr "" + +msgid "Server manager" +msgstr "" + +msgid "Hosting plans" +msgstr "" + +msgid "Addon domains" +msgstr "" + +msgid "Unique name to identify this server" +msgstr "" + +msgid "server1.yourserverdomain.com" +msgstr "" + +msgid "" +"Primary IP address of the server used to connect to it like: 123.123.123.123" +msgstr "" + +msgid "Assigned IP Addresses" +msgstr "" + +msgid "List the IP Addresses assigned to the server (One per line)" +msgstr "" + +msgid "Enable/Disable" +msgstr "" + +msgid "ns1.yourdomain.com" +msgstr "" + +msgid "ns2.yourdomain.com" +msgstr "" + +msgid "ns3.yourdomain.com" +msgstr "" + +msgid "ns4.yourdomain.com" +msgstr "" + +msgid "Login username to your server: root/reseller" +msgstr "" + +msgid "Login password to your server" +msgstr "" + +msgid "Access Hash (Insted of password for cPanel servers)" +msgstr "" + +msgid "Use Secure connection" +msgstr "" + +msgid "Add server" +msgstr "" + +msgid "Adding new hosting plan" +msgstr "" + +msgid "" +"Depending on server manager used to setup hosting account you may require " +"provide additional parameters in next step. In this step provide basic " +"hosting plan information." +msgstr "" + +msgid "Unique name to identify this hosting plan" +msgstr "" + +msgid "Disk quota (MB)" +msgstr "" + +msgid "Bandwidth (MB)" +msgstr "" + +msgid "Create hosting plan" +msgstr "" + +msgid "Submited" +msgstr "" + +msgid "Manage services" +msgstr "" + +msgid "Features" +msgstr "" + +msgid "Demo" +msgstr "" + +msgid "Documentation" +msgstr "" + +msgid "Forums" +msgstr "" + +msgid "Partners" +msgstr "" + +msgid "My Account" +msgstr "" + +msgid "Support Tickets" +msgstr "" + +msgid "Get BoxBilling license" +msgstr "" + +msgid "Quantity" +msgstr "" + +msgid "Top level domains" +msgstr "" + +msgid "New top level domain" +msgstr "" + +msgid "Registrars" +msgstr "" + +msgid "New domain registrar" +msgstr "" + +msgid "Manage TLDs" +msgstr "" + +msgid "" +"Setup domain pricing and allowed operations. Assign specific domain " +"registrars for each Top Level Domain (TLD)" +msgstr "" + +msgid "TLD" +msgstr "" + +msgid "Registration" +msgstr "" + +msgid "Renew" +msgstr "" + +msgid "Operations" +msgstr "" + +msgid "Allow register:" +msgstr "" + +msgid "Allow transfer:" +msgstr "" + +msgid "Active:" +msgstr "" + +msgid "Add new top level domain" +msgstr "" + +msgid "Setup new TLD prices and properties" +msgstr "" + +msgid "Tld" +msgstr "" + +msgid "Domain registrars" +msgstr "" + +msgid "Manage domain registrars" +msgstr "" + +msgid "" +"Setup default nameservers that will be used for new domain registrations if " +"client have not provided his own nameservers in order form" +msgstr "" + +msgid "Adding new domain registrar" +msgstr "" + +msgid "Follow instrunctions bellow to install new domain registrar." +msgstr "" + +msgid "Check domain registrar you are looking for is available at" +msgstr "" + +msgid "Download domain registrar file and place to" +msgstr "" + +msgid "Reload this page to see newly detected domain registrar" +msgstr "" + +msgid "" +"Click on install button. Now you will be able to create top level domains " +"with new domain registrar" +msgstr "" + +msgid "For developers. Read" +msgstr "" + +msgid "BoxBilling documentation" +msgstr "" + +msgid "to learn how to create your own domain registrar." +msgstr "" + +msgid "Install" +msgstr "" + +msgid "All payment gateways installed" +msgstr "" + +msgid "Orders settings" +msgstr "" + +msgid "Expiration date" +msgstr "" + +msgid "Predefined suspendation or cancelation reasons. One per line" +msgstr "" + +msgid "Account Id" +msgstr "" + +msgid "Search:" +msgstr "" + +msgid "Enter search text.." +msgstr "" + +msgid "Parameter key is missing" +msgstr "" + +msgid "_tpl parameter not passed" +msgstr "" + +msgid "mod parameter not passed" +msgstr "" + +msgid "Country :code phone code is not registered" +msgstr "" + +msgid "ID is required" +msgstr "" + +msgid "Event not found" +msgstr "" + +msgid "Order id is required" +msgstr "" + +msgid "Centova Cast order not found" +msgstr "" + +msgid "Order :id is not activated" +msgstr "" + +msgid "CentovaCast product is not configured properly. Field :field is missing" +msgstr "" + +msgid "Could not suspend order. Service was not created" +msgstr "" + +msgid "Could not unsuspend order. Service was not created" +msgstr "" + +msgid "Message from name can not be empty" +msgstr "" + +msgid "Message subject not passed" +msgstr "" + +msgid "Add some content before sending message" +msgstr "" + +msgid "Client ID needs to be configured in mass mailer settings." +msgstr "" + +msgid "Message id not passed" +msgstr "" + +msgid "Message not found" +msgstr "" + +msgid "Queue message id is missing" +msgstr "" + +msgid "Queue message not found" +msgstr "" + +msgid "Queue name not provided" +msgstr "" + +msgid "Module name not provided" +msgstr "" + +msgid "Message handler function :method does not exists" +msgstr "" + +msgid "ID or slug is missing" +msgstr "" + +msgid "News item not found" +msgstr "" + +msgid "Post id not passed" +msgstr "" + +msgid "Post not found" +msgstr "" + +msgid "Post title not passed" +msgstr "" + +msgid "Form title was not provided" +msgstr "" + +msgid "Form id was not passed" +msgstr "" + +msgid "Form is not valid" +msgstr "" + +msgid "Form field type was not passed" +msgstr "" + +msgid "You have latest version of BoxBilling. You do not need to update." +msgstr "" + +msgid "Extension id was not passed" +msgstr "" + +msgid "Extension type was not passed" +msgstr "" + +msgid "Parameter ext was not passed" +msgstr "" + +msgid "Extension not found" +msgstr "" + +msgid "Email can not be changed" +msgstr "" + +msgid "Can not change email. It is already registered." +msgstr "" + +msgid "Password required" +msgstr "" + +msgid "Password confiration required" +msgstr "" + +msgid "Passwords do not match." +msgstr "" + +msgid "Client ID or email is required" +msgstr "" + +msgid "Client not found" +msgstr "" + +msgid "ID required" +msgstr "" + +msgid "Email required" +msgstr "" + +msgid "First name is required" +msgstr "" + +msgid "Email is already registered." +msgstr "" + +msgid "Client id is missing" +msgstr "" + +msgid "Id required" +msgstr "" + +msgid "Client ID is required" +msgstr "" + +msgid "Password confirmation required" +msgstr "" + +msgid "Passwords do not match" +msgstr "" + +msgid "Balance line not found" +msgstr "" + +msgid "Amount is required" +msgstr "" + +msgid "Description is required" +msgstr "" + +msgid "Id not passed" +msgstr "" + +msgid "Group title is missing" +msgstr "" + +msgid "Group id is missing" +msgstr "" + +msgid "Group not found" +msgstr "" + +msgid "New registrations are temporary disabled" +msgstr "" + +msgid "First name required" +msgstr "" + +msgid "It is required that you provide details for field \":field\"" +msgstr "" + +msgid "" +"Email is already registered. You may want to login instead of registering." +msgstr "" + +msgid "Please check your login details" +msgstr "" + +msgid "Email not found in our database" +msgstr "" + +msgid "Hash required" +msgstr "" + +msgid "The link have expired or you have already confirmed password reset." +msgstr "" + +msgid "Country code is required" +msgstr "" + +msgid "Invalid email confirmation link" +msgstr "" + +msgid "Title is required" +msgstr "" + +msgid "Type is required" +msgstr "" + +msgid "You have already created domain product." +msgstr "" + +msgid "Product type :type is not registered" +msgstr "" + +msgid "Pricing type is required" +msgstr "" + +msgid "priority params is missing" +msgstr "" + +msgid "Addon id is required" +msgstr "" + +msgid "Addon not found" +msgstr "" + +msgid "Category id is missing" +msgstr "" + +msgid "Category not found" +msgstr "" + +msgid "Category title is missing" +msgstr "" + +msgid "Promo code is missing" +msgstr "" + +msgid "Promo type is missing" +msgstr "" + +msgid "Promo value is missing" +msgstr "" + +msgid "Promo id is missing" +msgstr "" + +msgid "Promo not found" +msgstr "" + +msgid "Product id not passed" +msgstr "" + +msgid "Product ID or slug is missing" +msgstr "" + +msgid "Please enter subdomain" +msgstr "" + +msgid "Please select master domain" +msgstr "" + +msgid "Please enter domain value" +msgstr "" + +msgid ":product for :domain" +msgstr "" + +msgid "Unknown domain type." +msgstr "" + +msgid "Email ID is required" +msgstr "" + +msgid "Email not found" +msgstr "" + +msgid "Receiver Email is required" +msgstr "" + +msgid "Receiver Name is required" +msgstr "" + +msgid "Sender Name is required" +msgstr "" + +msgid "Sender email is required" +msgstr "" + +msgid "Email subject is required" +msgstr "" + +msgid "Email content is required" +msgstr "" + +msgid "Email template ID is required" +msgstr "" + +msgid "Email template not found" +msgstr "" + +msgid "Email template code is required" +msgstr "" + +msgid "Email template subject is required" +msgstr "" + +msgid "Email template content is required" +msgstr "" + +msgid "Template code not passed" +msgstr "" + +msgid "Receiver is not defined. Define to or to_client or to_staff parameter" +msgstr "" + +msgid "Email template code was not passed" +msgstr "" + +msgid "Email template :code was not found" +msgstr "" + +msgid "Akismet detected this message is spam" +msgstr "" + +msgid "" +"To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create" +msgstr "" + +msgid "Captcha verification failed." +msgstr "" + +msgid "Your Username is blacklisted in global database" +msgstr "" + +msgid "Your Email is blacklisted in global database" +msgstr "" + +msgid "Your IP is blacklisted in global database" +msgstr "" + +msgid "path parameter is missing" +msgstr "" + +msgid "Data parameter is missing" +msgstr "" + +msgid "Path parameter is missing" +msgstr "" + +msgid "Type parameter is missing" +msgstr "" + +msgid "Unknow item type" +msgstr "" + +msgid "To parameter is missing" +msgstr "" + +msgid "File does not exist" +msgstr "" + +msgid "Ticket id required" +msgstr "" + +msgid "Ticket not found" +msgstr "" + +msgid "Ticket content required" +msgstr "" + +msgid "Ticket subject required" +msgstr "" + +msgid "Ticket support_helpdesk_id required" +msgstr "" + +msgid "Helpdesk invalid" +msgstr "" + +msgid "We have already received this request." +msgstr "" + +msgid "Ticket ID required" +msgstr "" + +msgid "Ticket can not be reopened." +msgstr "" + +msgid "Ticket id is missing" +msgstr "" + +msgid "Ticket message id is missing" +msgstr "" + +msgid "Ticket message content is missing" +msgstr "" + +msgid "Ticket message not found" +msgstr "" + +msgid "Client name parameter is missing" +msgstr "" + +msgid "Client email parameter is missing" +msgstr "" + +msgid "Subject parameter is missing" +msgstr "" + +msgid "Ticket message is missing" +msgstr "" + +msgid "Help desk id is missing" +msgstr "" + +msgid "Help desk not found" +msgstr "" + +msgid "Help desk title is missing" +msgstr "" + +msgid "Canned reply id is missing" +msgstr "" + +msgid "Canned reply not found" +msgstr "" + +msgid "Canned reply title is missing" +msgstr "" + +msgid "Canned reply category id is missing" +msgstr "" + +msgid "Canned category id is missing" +msgstr "" + +msgid "Canned category not found" +msgstr "" + +msgid "Canned category title is missing" +msgstr "" + +msgid "ticket_id is missing" +msgstr "" + +msgid "note is missing" +msgstr "" + +msgid "Note id is missing" +msgstr "" + +msgid "Note not found" +msgstr "" + +msgid "Please enter your name" +msgstr "" + +msgid "Please enter your email" +msgstr "" + +msgid "Please enter your subject" +msgstr "" + +msgid "Please enter your message" +msgstr "" + +msgid "Public ticket hash required" +msgstr "" + +msgid "Public ticket not found" +msgstr "" + +msgid "message required" +msgstr "" + +msgid "Message can not be blank" +msgstr "" + +msgid "ID is missing" +msgstr "" + +msgid "Staff member not found" +msgstr "" + +msgid "Email param is missing" +msgstr "" + +msgid "Password param is missing" +msgstr "" + +msgid "Name param is missing" +msgstr "" + +msgid "Staff member with email :email is already registered" +msgstr "" + +msgid "Permissions parameter missing" +msgstr "" + +msgid "Staff group is missing" +msgstr "" + +msgid "Administrator account already exists" +msgstr "" + +msgid "Administrator email is missing." +msgstr "" + +msgid "Administrator password is missing." +msgstr "" + +msgid "You are not allowed to login to admin area from :ip address" +msgstr "" + +msgid "Check your login details" +msgstr "" + +msgid "BoxBilling license order not found" +msgstr "" + +msgid "Order is not activated" +msgstr "" + +msgid "Forum not found" +msgstr "" + +msgid "Forum Topic not found" +msgstr "" + +msgid "Forum ID not passed" +msgstr "" + +msgid "Forum topic not passed" +msgstr "" + +msgid "Forum message not passed" +msgstr "" + +msgid "Your message is too short" +msgstr "" + +msgid "Forum is locked. No new topics can be started" +msgstr "" + +msgid "Forum Topic ID not passed" +msgstr "" + +msgid "Topic message not passed" +msgstr "" + +msgid "Forum topic is locked. No new message can be posted" +msgstr "" + +msgid "Forum id missing" +msgstr "" + +msgid "Forum title is missing" +msgstr "" + +msgid "Topic id is missing" +msgstr "" + +msgid "Forum topic title not passed" +msgstr "" + +msgid "Forum topic message not passed" +msgstr "" + +msgid "Forum topic id missing" +msgstr "" + +msgid "Forum Topic message ID not passed" +msgstr "" + +msgid "Forum Topic Message not found" +msgstr "" + +msgid "Forum Topic message not found" +msgstr "" + +msgid "Message ID not passed" +msgstr "" + +msgid "Client ID not passed" +msgstr "" + +msgid "Amount not passed" +msgstr "" + +msgid "Enter some keywords for search" +msgstr "" + +msgid "Search keyword must be longer than 3 characters" +msgstr "" + +msgid "File can not be downloaded at the moment. Please contact support" +msgstr "" + +msgid "Order not found" +msgstr "" + +msgid "File was not uploaded" +msgstr "" + +msgid "Error uploading file" +msgstr "" + +msgid "Product is not configured completely." +msgstr "" + +msgid "plan_id is missing" +msgstr "" + +msgid "Hosting plan not found" +msgstr "" + +msgid "Server name is missing" +msgstr "" + +msgid "Server IP is missing" +msgstr "" + +msgid "Server manager is missing" +msgstr "" + +msgid "Server id is missing" +msgstr "" + +msgid "Server not found" +msgstr "" + +msgid "Hosting plan id is missing" +msgstr "" + +msgid "Hosting plan name is missing" +msgstr "" + +msgid "Hoting plan name can not be empty" +msgstr "" + +msgid ":hosting for :domain" +msgstr "" + +msgid "Notification id is missing" +msgstr "" + +msgid "Notification message was not found" +msgstr "" + +msgid "Redirect id not passed" +msgstr "" + +msgid "Redirect path not passed" +msgstr "" + +msgid "Redirect target not passed" +msgstr "" + +msgid "Redirect not found" +msgstr "" + +msgid "Unknown API call :call" +msgstr "" + +msgid "Unauthorized IP" +msgstr "" + +msgid "Request limit reached" +msgstr "" + +msgid "Unknow API call" +msgstr "" + +msgid "Authentication Failed" +msgstr "" + +msgid "Client API can be initiated" +msgstr "" + +msgid "Hook event not passed" +msgstr "" + +msgid "Param mod not passed" +msgstr "" + +msgid "Article id not passed" +msgstr "" + +msgid "Article not found" +msgstr "" + +msgid "Article category id not passed" +msgstr "" + +msgid "Article title not passed" +msgstr "" + +msgid "Article id is missing" +msgstr "" + +msgid "Caegory id not passed" +msgstr "" + +msgid "Article Category not found" +msgstr "" + +msgid "Category title not passed" +msgstr "" + +msgid "Article item not found" +msgstr "" + +msgid "Category ID or slug is missing" +msgstr "" + +msgid "Knowledge base category not found" +msgstr "" + +msgid "Invoice hash not passed" +msgstr "" + +msgid "Invoice was not found" +msgstr "" + +msgid "Paid Invoice can not be modified" +msgstr "" + +msgid "Order id required" +msgstr "" + +msgid "Order :id is free. No need to generate invoice." +msgstr "" + +msgid "Invoice is related to order #:id. Please cancel order first." +msgstr "" + +msgid "Invoice id not passed" +msgstr "" + +msgid "Invoice item id not passed" +msgstr "" + +msgid "Invoice item was not found" +msgstr "" + +msgid "Transaction id is missing" +msgstr "" + +msgid "Transaction not found" +msgstr "" + +msgid "Transaction invoice id is missing" +msgstr "" + +msgid "Payment gateway id is missing" +msgstr "" + +msgid "Gateway was not found" +msgstr "" + +msgid "Payment gateway code is missing" +msgstr "" + +msgid "Payment gateway is not available for installation." +msgstr "" + +msgid "Gateway id not passed" +msgstr "" + +msgid "Gateway not found" +msgstr "" + +msgid "Client id not passed" +msgstr "" + +msgid "Payment gateway id not passed" +msgstr "" + +msgid "Subscription currency not passed" +msgstr "" + +msgid "Payment gateway not found" +msgstr "" + +msgid "" +"Client currency must match subscription currency. Check if clients currency " +"is defined." +msgstr "" + +msgid "Subscription id not passed" +msgstr "" + +msgid "Subscription not found" +msgstr "" + +msgid "Subscription id or sid not passed" +msgstr "" + +msgid "Tax id is missing" +msgstr "" + +msgid "Tax rule not found" +msgstr "" + +msgid "Tax name is missing" +msgstr "" + +msgid "Tax rate is missing or is not valid" +msgstr "" + +msgid "Invoice hash not passed. Missing param hash" +msgstr "" + +msgid "Payment method not found. Missing param gateway_id" +msgstr "" + +msgid "Invoice not found" +msgstr "" + +msgid "Payment method not found" +msgstr "" + +msgid "Payment method not enabled" +msgstr "" + +msgid "Payment method can not perform single payment" +msgstr "" + +msgid "Payment method can not perform reccurent payment" +msgstr "" + +msgid "This invoice can't be subscribed" +msgstr "" + +msgid "Transaction :id not found." +msgstr "" + +msgid "Payment adapter :adapter does not support action :action" +msgstr "" + +msgid "API call is missing arguments" +msgstr "" + +msgid "Currency code is missing" +msgstr "" + +msgid "Currency not found" +msgstr "" + +msgid "Currency format is missing" +msgstr "" + +msgid "Currency already registered" +msgstr "" + +msgid "Currency code is not valid" +msgstr "" + +msgid "Currency rate is not valid" +msgstr "" + +msgid "" +"You have already used this promo code. Please remove promo code and checkout " +"again." +msgstr "" + +msgid "Can not checkout empty cart." +msgstr "" + +msgid "" +"Selected currency :selected does not match your profile currency :code. " +"Please change cart currency to continue." +msgstr "" + +msgid "Shopping cart id is missing" +msgstr "" + +msgid "Shopping cart not found" +msgstr "" + +msgid "Currency code not passed" +msgstr "" + +msgid "Promo code not passed" +msgstr "" + +msgid "Promo code is expired or does not exist" +msgstr "" + +msgid "Cart item id not passed" +msgstr "" + +msgid "Solusvm order not found" +msgstr "" + +msgid "Node is not selected for import." +msgstr "" + +msgid "No servers selected for import." +msgstr "" + +msgid "Select product for orders." +msgstr "" + +msgid "" +"Product is not configured completely. Please provide solusvm node in product " +"configuration page." +msgstr "" + +msgid "" +"Product is not configured completely. Please provide solusvm plan in product " +"configuration page." +msgstr "" + +msgid "No clients selected for import." +msgstr "" + +msgid "No clients found on SolusVM server." +msgstr "" + +msgid "Virtual private server :title" +msgstr "" + +msgid "Please enter VPS hostname." +msgstr "" + +msgid "Hostname :hostname is not valid." +msgstr "" + +msgid "Please select VPS template." +msgstr "" + +msgid "SolusVM API ID is missing." +msgstr "" + +msgid "SolusVM API KEY is missing." +msgstr "" + +msgid "SolusVM API ipaddress is missing." +msgstr "" + +msgid "SolusVM API secure is missing." +msgstr "" + +msgid "SolusVM API port is missing." +msgstr "" + +msgid "Could not activate order because ordered product does not exists" +msgstr "" + +msgid "" +"Could not activate order. Product :id configuration is missing node parameter" +msgstr "" + +msgid "" +"Could not activate order. Product :id configuration is missing plan parameter" +msgstr "" + +msgid "" +"Could not activate order. Product :id configuration is missing " +"virtualization type parameter" +msgstr "" + +msgid "" +"Could not activate order. Product :id configuration is missing ips amount " +"parameter" +msgstr "" + +msgid "Root password must be longer than 4 symbols" +msgstr "" + +msgid "Plan name must not be empty" +msgstr "" + +msgid "Hostname must not be empty" +msgstr "" + +msgid "Template must not be empty" +msgstr "" + +msgid "Password must be longer than 4 symbols" +msgstr "" + +msgid "TLD is missing" +msgstr "" + +msgid "Tld already registered" +msgstr "" + +msgid "TLD registrar id is missing" +msgstr "" + +msgid "Registration price is missing" +msgstr "" + +msgid "Renewal price is missing" +msgstr "" + +msgid "Transfer price is missing" +msgstr "" + +msgid "Registrar code not passed" +msgstr "" + +msgid "Registrar is not available for installation." +msgstr "" + +msgid "Registrar id not passed" +msgstr "" + +msgid "Registrar not found" +msgstr "" + +msgid "Registrar id is missing" +msgstr "" + +msgid "Domain order is not activated" +msgstr "" + +msgid "Tld is required" +msgstr "" + +msgid "Sld is required" +msgstr "" + +msgid "Domain :domain is not valid" +msgstr "" + +msgid "Domain availability could not be determined. TLD is not active." +msgstr "" + +msgid "Domain is not available." +msgstr "" + +msgid "TLD is not active." +msgstr "" + +msgid "Domain can not be transferred." +msgstr "" + +msgid "Domain :domain registration" +msgstr "" + +msgid "Domain :domain transfer" +msgstr "" + +msgid "Only pending and failed setup orders can be deleted." +msgstr "" + +msgid "This feature is available in BoxBilling PRO version." +msgstr "" + +msgid "Currency could not be determined for order" +msgstr "" + +msgid "Product :id is out of stock." +msgstr "" + +msgid "Group ID parameter is missing for addon product order" +msgstr "" + +msgid "Parent order :group_id was not found" +msgstr "" + +msgid "Only pending setup or failed orders can be activated" +msgstr "" + +msgid "Only suspended orders can be unsuspended" +msgstr "" + +msgid "Only canceled orders can be uncanceled" +msgstr "" + +msgid "Order config not passed" +msgstr "" + +msgid "Order status was not passed" +msgstr "" + +msgid "Order history line id not passed" +msgstr "" + +msgid "Order history line not found" +msgstr "" + +msgid "Automatically issue renewal invoices" +msgstr "" + +msgid "Issue invoices manually" +msgstr "" + +msgid "Order id not passed" +msgstr "" + +msgid "Theme code is missing" +msgstr "" + +msgid "Theme preset name is missing" +msgstr "" + +msgid "" +"Theme \":name\" assets folder is not writable. Files can not be uploaded and " +"settings can not be saved. Set folder permissions to 777" +msgstr "" + +msgid "" +"Theme \":name\" assets folder is not writable. Set folder :folder " +"permissions to 777" +msgstr "" + +msgid "Theme \":name\" is not configurable" +msgstr "" + +msgid "Theme \":name\" does not exists" +msgstr "" + +msgid "Error uploading file :file Error code: :error" +msgstr "" diff --git a/src/bb-modules/Activity/Api/Admin.php b/src/bb-modules/Activity/Api/Admin.php new file mode 100644 index 000000000..8ce82d8e8 --- /dev/null +++ b/src/bb-modules/Activity/Api/Admin.php @@ -0,0 +1,120 @@ +di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach ($pager['list'] as $key => $item) { + if (isset($item['staff_id'])) { + $pager['list'][$key]['staff']['id'] = $item['staff_id']; + $pager['list'][$key]['staff']['name'] = $item['staff_name']; + $pager['list'][$key]['staff']['email'] = $item['staff_email']; + } + if (isset($item['client_id'])) { + $pager['list'][$key]['client']['id'] = $item['client_id']; + $pager['list'][$key]['client']['name'] = $item['client_name']; + $pager['list'][$key]['client']['email'] = $item['client_email']; + } + } + + return $pager; + } + + /** + * Add message to log + * + * @param string $m - Message text + * @optional int $admin_id - admin id + * @optional int $client_id - client id + * @optional string $priority - log priority + * + * @return bool + */ + public function log($data) + { + if(!isset($data['m'])) { + return false; + } + + $priority = isset($data['priority']) ? (int)$data['priority'] : 6; + + $entry = $this->di['db']->dispense('ActivitySystem'); + $entry->client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $entry->admin_id = isset($data['admin_id']) ? $data['admin_id'] : NULL; + $entry->priority = $priority; + $entry->message = $data['m']; + $entry->created_at = date('c'); + $entry->updated_at = date('c'); + $entry->ip = $this->di['request']->getClientAddress(); + $this->di['db']->store($entry); + + return true; + } + + /** + * Add email to log + * + * @return bool + */ + public function log_email($data) + { + if (!isset($data['subject'])) { + error_log('Email was not logged. Subject not passed'); + return false; + } + + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $sender = isset($data['sender']) ? $data['sender'] : NULL; + $recipients = isset($data['recipients']) ? $data['recipients'] : NULL; + $subject = isset($data['subject']) ? $data['subject'] : NULL; + $content_html = isset($data['content_html']) ? $data['content_html'] : NULL; + $content_text = isset($data['content_text']) ? $data['content_text'] : NULL; + + return $this->getService()->logEmail($subject, $client_id, $sender, $recipients, $subject, $content_html, $content_text); + } + + /** + * Remove activity message + * + * @param int $id - Message ID + */ + public function log_delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('ID is required'); + } + + $database = $this->di['db']; + $model = $database->load('ActivitySystem', $data['id']); + if(!$model instanceof \Model_ActivitySystem) { + throw new \Box_Exception('Event not found'); + } + + $database->trash($model); + return true; + } +} diff --git a/src/bb-modules/Activity/Controller/Admin.php b/src/bb-modules/Activity/Controller/Admin.php new file mode 100644 index 000000000..ddcb23031 --- /dev/null +++ b/src/bb-modules/Activity/Controller/Admin.php @@ -0,0 +1,67 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group'=> array( + 'index' => 700, + 'location' => 'activity', + 'label' => 'Activity', + 'class' => 'graphs', + ), + 'subpages'=> array( + array( + 'location' => 'activity', + 'label' => 'Events history', + 'index' => 100, + 'uri' => $this->di['url']->adminLink('activity'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/activity', 'get_index', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_activity_index'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Activity/Service.php b/src/bb-modules/Activity/Service.php new file mode 100644 index 000000000..25eef59f8 --- /dev/null +++ b/src/bb-modules/Activity/Service.php @@ -0,0 +1,179 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function logEvent($data) + { + $entry = $this->di['db']->dispense('ActivityClientEmail'); + $entry->client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $entry->sender = isset($data['sender']) ? $data['sender'] : NULL; + $entry->recipients = isset($data['recipients']) ? $data['recipients'] : NULL; + $entry->subject = isset($data['subject']) ? $data['subject'] : NULL; + $entry->content_html = isset($data['content_html']) ? $data['content_html'] : NULL; + $entry->content_text = isset($data['content_text']) ? $data['content_text'] : NULL; + $entry->created_at = isset($data['timestamp']) ? $data['timestamp'] : NULL; + $entry->updated_at = isset($data['timestamp']) ? $data['timestamp'] : NULL; + $this->di['db']->store($entry); + } + + /** EVENTS **/ + + /* + public static function onEventAdminLoginFailed(Box_Event $event) + { + $api = $event->getApiAdmin(); + $params = $event->getParameters(); + $ip = $params['ip']; + throw new Exception('Wait 2 minutes'); + } + */ + + public static function onAfterClientLogin(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + $log = $di['db']->dispense('ActivityClientHistory'); + $log->client_id = $params['id']; + $log->ip = $params['ip']; + $log->created_at = date('c'); + $log->updated_at = date('c'); + + $di['db']->store($log); + } + + public static function onAfterAdminLogin(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + $log= $di['db']->dispense('ActivityAdminHistory'); + $log->admin_id = $params['id']; + $log->ip = $params['ip']; + $log->created_at = date('c'); + $log->updated_at = date('c'); + + $di['db']->store($log); + } + + public function getSearchQuery($data) + { + + $sql = 'SELECT m.*, a.id as staff_id, a.email as staff_email, a.name as staff_name, c.id as client_id, CONCAT(c.first_name, " ", c.last_name) as client_name, c.email as client_email + FROM activity_system as m + left join admin as a on a.id = m.admin_id + left join client as c on c.id = m.client_id'; + + $params = array(); + $search = isset($data['search']) ? $data['search'] : NULL; + $priority = isset($data['priority']) ? $data['priority'] : NULL; + $only_staff = isset($data['only_staff']) ? $data['only_staff'] : NULL; + $only_clients = isset($data['only_clients']) ? $data['only_clients'] : NULL; + $no_info = isset($data['no_info']) ? $data['no_info'] : NULL; + $no_debug = isset($data['no_debug']) ? $data['no_debug'] : NULL; + $where = array (); + if($priority) { + $where[] = 'm.priority = :priority'; + $params[':priority'] = $priority; + } + + if($no_info) { + $where[] = 'm.priority < :priority'; + $params[':priority'] = \Box_Log::INFO; + } + + if($no_debug) { + $where[] = 'm.priority < :priority'; + $params[':priority'] = \Box_Log::DEBUG; + } + + if($only_staff) { + $where[] = 'm.admin_id IS NOT NULL'; + } + + if($only_clients) { + $where[] = 'm.client_id IS NOT NULL'; + } + + if($search) { + $where[] = 'm.message LIKE :search OR m.ip LIKE :search2'; + $params[':search'] = $search; + $params[':search2'] = $search; + } + + if (count ($where) > 0){ + $whereStatment = implode(' and ', $where); + $sql .= ' WHERE '.$whereStatment; + } + + $sql .= ' ORDER by m.id desc'; + return array($sql, $params); + } + + public function logEmail($subject, $clientId = null, $sender = null, $recipients = null, $subject = null, $content_html = null, $content_text = null) + { + $entry = $this->di['db']->dispense('ActivityClientEmail'); + + $entry->client_id = $clientId; + $entry->sender = $sender; + $entry->recipients = $recipients; + $entry->subject = $subject; + $entry->content_html = $content_html; + $entry->content_text = $content_text; + $entry->created_at = date('c'); + $entry->updated_at = date('c'); + + $this->di['db']->store($entry); + + return true; + } + + public function toApiArray(\Model_ActivityClientHistory $model) + { + $client = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); + return array( + 'id' => $model->id, + 'ip' => $model->ip, + 'created_at' => $model->created_at, + 'client' => array( + 'id' => $client->id, + 'first_name' => $client->first_name, + 'last_name' => $client->last_name, + 'email' => $client->email, + ) + ); + } + + public function rmByClient(\Model_Client $client) + { + $models = $this->di['db']->find('ActivitySystem', 'client_id = ?', array($client->id)); + foreach($models as $model){ + $this->di['db']->trash($model); + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Activity/manifest.json b/src/bb-modules/Activity/manifest.json new file mode 100644 index 000000000..c3a3df6ed --- /dev/null +++ b/src/bb-modules/Activity/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "activity", + "type": "mod", + "name": "Activity", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Api/Controller/Client.php b/src/bb-modules/Api/Controller/Client.php new file mode 100644 index 000000000..9cddb1e4f --- /dev/null +++ b/src/bb-modules/Api/Controller/Client.php @@ -0,0 +1,165 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->post('/api/:role/:class/:method', 'post_method', array('role', 'class', 'method'), get_class($this)); + $app->get('/api/:role/:class/:method', 'get_method', array('role', 'class', 'method'), get_class($this)); + + //all other requests are error requests + $app->get('/api/:page', 'show_error', array('page' => '(.?)+'), get_class($this)); + $app->post('/api/:page', 'show_error', array('page' => '(.?)+'), get_class($this)); + } + + public function show_error(\Box_App $app, $page) + { + $exc = new \Box_Exception('Unknown API call :call', array(':call'=>$page), 879); + return $this->renderJson(null, $exc); + } + + public function get_method(\Box_App $app, $role, $class, $method) + { + $call = $class.'_'.$method; + return $this->tryCall($role, $call, $_GET); + } + + public function post_method(\Box_App $app, $role, $class, $method) + { + $p = $_POST; + + // adding support for raw post input with json string + $input = file_get_contents("php://input"); + if(empty($p) && !empty($input)) { + $p = @json_decode($input, 1); + } + + $call = $class.'_'.$method; + return $this->tryCall($role, $call, $p); + } + + private function tryCall($role, $call, $p) + { + try { + $this->_apiCall($role, $call, $p); + } catch (\Exception $exc) { + $this->renderJson(null, $exc); + } + } + + private function _loadConfig() + { + if(is_null($this->_api_config)) { + $this->_api_config = $this->di['config']['api']; + } + } + + private function _apiCall($role, $method, $params) + { + $this->_loadConfig(); + + $ips = $this->_api_config['allowed_ips']; + if(!empty($ips) && !in_array($this->_getIp(), $ips)) { + throw new \Box_Exception('Unauthorized IP', null, 1002); + } + + $this->di['license']->check(); + + $service = $this->di['mod_service']('api'); + $service->logRequest(); + + // Rate limit + $rate_span = $this->_api_config['rate_span']; + $rate_limit = $this->_api_config['rate_limit']; + $requests = $service->getRequestCount(time() - $rate_span, $this->_getIp()); + $requests_left = $rate_limit - $requests; + $this->_requests_left = $requests_left; + if ($requests_left < 0) { + throw new \Box_Exception('Request limit reached', null, 1003); + } + + // snake oil: check request is from the same domain as boxbilling is installed if present + $check_referer_header = isset($this->_api_config['require_referrer_header']) ? (bool)$this->_api_config['require_referrer_header'] : false; + if($check_referer_header) { + $url = strtolower(BB_URL); + $referer = isset($_SERVER['HTTP_REFERER']) ? strtolower($_SERVER['HTTP_REFERER']) : null ; + if(!$referer || $url != substr($referer, 0, strlen($url))) { + throw new \Box_Exception('Invalid request. Make sure request origin is :from', array(':from'=>BB_URL), 1004); + } + } + + $api = $this->di['api']($role); + $result = $api->$method($params); + return $this->renderJson($result); + } + + public function renderJson($data = NULL, \Exception $e = NULL) + { + // do not emit response if headers already sent + if (headers_sent()) { + return ; + } + + $this->_loadConfig(); + + header('Cache-Control: no-cache, must-revalidate'); + header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); + header('Content-type: application/json; charset=utf-8'); + header('X-BoxBilling-Version: '.\Box_Version::VERSION); + header('X-RateLimit-Span: '.$this->_api_config['rate_span']); + header('X-RateLimit-Limit: '.$this->_api_config['rate_limit']); + header('X-RateLimit-Remaining: '.$this->_requests_left); + if(NULL !== $e) { + error_log($e->getMessage().' '.$e->getCode()); + $code = $e->getCode() ? $e->getCode() : 9999; + $result = array('result'=>NULL, 'error'=>array('message'=>$e->getMessage(), 'code'=>$code)); + } else { + $result = array('result'=>$data, 'error'=> NULL); + } + print json_encode($result); + exit; + } + + private function _getIp() + { + return $this->di['request']->getClientAddress(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Api/Service.php b/src/bb-modules/Api/Service.php new file mode 100644 index 000000000..a1c366f8e --- /dev/null +++ b/src/bb-modules/Api/Service.php @@ -0,0 +1,104 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + /** + * @return int - 1 + */ + public function logRequest() + { + $request = $this->di['request']; + $sql=" + INSERT INTO api_request (ip, request, created_at) + VALUES(:ip, :request, NOW()) + "; + $values = array( + 'ip' => $request->getClientAddress(), + 'request' => $request->getURI(), + ); + return $this->di['db']->exec($sql, $values); + } + + /** + * @param int $since - timestamp + * @param string|null $ip + * @return int + */ + public function getRequestCount($since, $ip = null) + { + if (!is_numeric($since)){ + $since = strtotime($since); + } + $sinceIso = date('c', $since); + $values = array( + 'since' => $sinceIso, + ); + $sql=" + SELECT COUNT(id) as cc + FROM api_request + WHERE created_at > :since + "; + + if(null != $ip) { + $sql .= " AND ip = :ip"; + $values['ip'] = $ip; + } + + return (int)$this->di['db']->getCell($sql, $values); + } + + /** + * @deprecated use DI + */ + public function getApiGuest() + { + return $this->di['api_guest']; + } + + + /** + * @deprecated use DI + */ + public function getApiClient($id) + { + return $this->di['api_client']; + } + + /** + * @deprecated use DI + */ + public function getApiAdmin($id = null) + { + return $this->di['api_admin']; + } +} \ No newline at end of file diff --git a/src/bb-modules/Api/manifest.json b/src/bb-modules/Api/manifest.json new file mode 100644 index 000000000..8dd8e6913 --- /dev/null +++ b/src/bb-modules/Api/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "api", + "type": "mod", + "name": "API", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Branding/Service.php b/src/bb-modules/Branding/Service.php new file mode 100644 index 000000000..bc1d5afb2 --- /dev/null +++ b/src/bb-modules/Branding/Service.php @@ -0,0 +1,44 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function uninstall() + { + if(!$this->di['license']->isPro()) { + throw new \Exception('Branding module can only be disabled for PRO license owners', 509); + } + return true; + } + +} \ No newline at end of file diff --git a/src/bb-modules/Branding/manifest.json b/src/bb-modules/Branding/manifest.json new file mode 100644 index 000000000..a621c2a8b --- /dev/null +++ b/src/bb-modules/Branding/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "branding", + "type": "mod", + "name": "Branding", + "description": "BoxBilling branding module. Can be deactivated by PRO license owners only.", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "http://www.boxbilling.com/license.txt", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Cart/Api/Admin.php b/src/bb-modules/Cart/Api/Admin.php new file mode 100644 index 000000000..cbef8b45a --- /dev/null +++ b/src/bb-modules/Cart/Api/Admin.php @@ -0,0 +1,78 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach ($pager['list'] as $key => $cartArr){ + $cart = $this->di['db']->getExistingModelById('Cart', $cartArr['id'], 'Cart not found'); + $pager['list'][$key] = $this->getService()->toApiArray($cart); + } + + return $pager; + } + + /** + * Get shopping cart contents by id + * @param int $id - shoppoing cart id + * @return array - shopping cart contents + */ + public function get($data) + { + $required = array( + 'id' => 'Shopping cart id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $cart = $this->di['db']->getExistingModelById('Cart', $data['id'], 'Shopping cart not found'); + + return $this->getService()->toApiArray($cart); + } + + /** + * Remove shopping carts that are older than a week and was not ordered + * + * @BOXBILLING_CRON + * @return bool + */ + public function batch_expire($data) + { + $this->di['logger']->info('Executed action to clear expired shopping carts from database'); + + $query = "SELECT id, created_at FROM `cart` WHERE DATEDIFF(CURDATE(), created_at) > 7;"; + $list = $this->di['db']->getAssoc($query); + if ($list) { + foreach ($list as $id => $created_at) { + $this->di['db']->exec('DELETE FROM `cart_product` WHERE cart_id = :id', array(':id' => $id)); + $this->di['db']->exec('DELETE FROM `cart` WHERE id = :id', array(':id' => $id)); + } + $this->di['logger']->info('Removed %s expired shopping carts', count($list)); + } + + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/Cart/Api/Client.php b/src/bb-modules/Cart/Api/Client.php new file mode 100644 index 000000000..32e60d187 --- /dev/null +++ b/src/bb-modules/Cart/Api/Client.php @@ -0,0 +1,35 @@ +getService()->getSessionCart(); + $client = $this->getIdentity(); + return $this->getService()->checkoutCart($cart, $client, $gateway_id); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cart/Api/Guest.php b/src/bb-modules/Cart/Api/Guest.php new file mode 100644 index 000000000..e57465fee --- /dev/null +++ b/src/bb-modules/Cart/Api/Guest.php @@ -0,0 +1,178 @@ +getService()->getSessionCart(); + + return $this->getService()->toApiArray($cart); + } + + /** + * Completely remove shopping cart contents + * + * @return bool + */ + public function reset() + { + $cart = $this->getService()->getSessionCart(); + + return $this->getService()->resetCart($cart); + } + + /** + * Set shopping cart currency + * + * @param string $currency - New currency code to applied to shopping cart + * + * @return bool + */ + public function set_currency($data) + { + $required = array( + 'currency' => 'Currency code not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $currencyService = $this->di['mod_service']('currency'); + $currency = $currencyService->getByCode($data['currency']); + if (!$currency instanceof \Model_Currency) { + throw new \Box_Exception('Currency not found'); + } + $cart = $this->getService()->getSessionCart(); + + return $this->getService()->changeCartCurrency($cart, $currency); + } + + /** + * Retrieve information about currently selected shopping cart currency + * + * @return array - Currency details + */ + public function get_currency() + { + $cart = $this->getService()->getSessionCart(); + + $currencyService = $this->di['mod_service']('currency'); + $currency = $this->di['db']->load('Currency', $cart->currency_id); + if (!$currency instanceof \Model_Currency) { + $currency = $currencyService->getDefault(); + } + + return $currencyService->toApiArray($currency); + } + + /** + * Apply Promo code to shopping cart + * + * @param string $promocode - Promo code string + * + * @return bool + */ + public function apply_promo($data) + { + $required = array( + 'promocode' => 'Promo code not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + + $promo = $this->getService()->findActivePromoByCode($data['promocode']); + if (!$promo instanceof \Model_Promo) { + throw new \Box_Exception('Promo code is expired or does not exist'); + } + + if (!$this->getService()->promoCanBeApplied($promo)) { + throw new \Box_Exception('Promo code is expired or does not exist'); + } + + $cart = $this->getService()->getSessionCart(); + + return $this->getService()->applyPromo($cart, $promo); + } + + /** + * Removes promo from shopping cart and resets discounted prices if any + * + * @return bool + */ + public function remove_promo() + { + $cart = $this->getService()->getSessionCart(); + + return $this->getService()->removePromo($cart); + } + + /** + * Removes product from shoping cart + * + * @param int $id - Shopping cart item id + * + * @return bool + */ + public function remove_item($data) + { + $required = array( + 'id' => 'Cart item id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $cart = $this->getService()->getSessionCart(); + + return $this->getService()->removeProduct($cart, $data['id']); + } + + /** + * Adds product to shopping cart + * + * @param int $id - Product ID + * + * @optional bool $multiple - Default false. Allow multiple items in cart + * @optional string $period - Billing period + * @optional int $quantity - Products quantity + * @optional array $config - Product configuration options + * @optional array $addons - List of addons ids + * + * @return bool + */ + public function add_item($data) + { + $required = array( + 'id' => 'Product id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $cart = $this->getService()->getSessionCart(); + + $product = $this->di['db']->getExistingModelById('Product', $data['id'], 'Product not found'); + + //reset cart by default + if (!isset($data['multiple']) || !$data['multiple']) { + $this->reset(); + } + + return $this->getService()->addItem($cart, $product, $data); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cart/Controller/Client.php b/src/bb-modules/Cart/Controller/Client.php new file mode 100644 index 000000000..524fd04d4 --- /dev/null +++ b/src/bb-modules/Cart/Controller/Client.php @@ -0,0 +1,45 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/cart', 'get_cart', array(), get_class($this)); + } + + public function get_cart(\Box_App $app) + { + return $app->render('mod_cart_index'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cart/Service.php b/src/bb-modules/Cart/Service.php new file mode 100644 index 000000000..035bbd177 --- /dev/null +++ b/src/bb-modules/Cart/Service.php @@ -0,0 +1,719 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($data) + { + $sql = " + SELECT cart.id FROM cart + LEFT JOIN currency ON cart.currency_id = currency.id + LEFT JOIN promo ON cart.promo_id = promo.id"; + + return array($sql, array()); + } + + public function getSessionCart() + { + $sqlBindings = array(':session_id' => $this->di['session']->getId()); + $cart = $this->di['db']->findOne('Cart', 'session_id = :session_id', $sqlBindings); + + if ($cart instanceof \Model_Cart) { + return $cart; + } + + $cc = $this->di['mod_service']('currency'); + + if ($this->di['session']->get('client_id')) { + $client_id = $this->di['session']->get('client_id'); + $currency = $cc->getCurrencyByClientId($client_id); + } else { + $currency = $cc->getDefault(); + } + + $cart = $this->di['db']->dispense('Cart'); + $cart->session_id = $this->di['session']->getId(); + $cart->currency_id = $currency->id; + $cart->created_at = date('c'); + $cart->updated_at = date('c'); + $this->di['db']->store($cart); + + return $cart; + } + + public function addItem(\Model_Cart $cart, \Model_Product $product, array $data) + { + $event_params = array_merge($data, array('cart_id' => $cart->id, 'product_id' => $product->id)); + $this->di['events_manager']->fire(array('event' => 'onBeforeProductAddedToCart', 'params' => $event_params)); + + $productService = $product->getService(); + + if ($this->isRecurrentPricing($product)) { + if (!isset($data['period'])) { + throw new \Box_Exception('Period parameter not passed'); + } + + if (!$this->isPeriodEnabledForProduct($product, $data['period'])) { + throw new \Box_Exception('Selected billing period is not valid'); + } + } + + $qty = isset($data['quantity']) ? $data['quantity'] : 1; + // check stock + if (!$this->isStockAvailable($product, $qty)) { + throw new \Box_Exception("I'm afraid we are out of stock."); + } + + $addons = isset($data['addons']) ? $data['addons'] : array(); + unset($data['id']); + unset($data['addons']); + + $list = array(); + $list[] = array( + 'product' => $product, + 'config' => $data, + ); + + //check for required domain product + if (method_exists($productService, 'getDomainProductFromConfig')) { + $dc = $productService->getDomainProductFromConfig($product, $data); + if (isset($dc['config']) && $dc['product'] && $dc['product'] instanceof \Model_Product) { + $list[] = $dc; + } + } + + $productService = $this->di['mod_service']('Product'); + foreach ($addons as $id => $ac) { + if (isset($ac['selected']) && (bool)$ac['selected']) { + $addon = $productService->getAddonById($id); + if ($addon instanceof \Model_Product) { + if ($this->isRecurrentPricing($addon)) { + if (!isset($ac['period'])) { + throw new \Box_Exception('Addon period parameter not passed'); + } + + if (!$this->isPeriodEnabledForProduct($addon, $ac['period'])) { + throw new \Box_Exception('Selected billing period is not valid for addon'); + } + } + + $list[] = array( + 'product' => $addon, + 'config' => $ac, + ); + } else { + error_log('Addon not found by id ' . $id); + } + } + } + + foreach ($list as $c) { + $productFromList = $c['product']; + $productFromListConfig = $c['config']; + + $productServiceFromList = $productFromList->getService(); + + //@deprecated logic + if (method_exists($productServiceFromList, 'prependOrderConfig')) { + $productFromListConfig = $productServiceFromList->prependOrderConfig($productFromList, $productFromListConfig); + } + + if (method_exists($productServiceFromList, 'attachOrderConfig')) { + $model = $this->di['db']->load('Product', $productFromList->id); + $productFromListConfig = $productServiceFromList->attachOrderConfig($model, $productFromListConfig); + } + if (method_exists($productServiceFromList, 'validateOrderData')) { + $productServiceFromList->validateOrderData($productFromListConfig); + } + if (method_exists($productServiceFromList, 'validateCustomForm')) { + $productServiceFromList->validateCustomForm($productFromListConfig, $this->di['db']->toArray($productFromList)); + } + $this->addProduct($cart, $productFromList, $productFromListConfig); + } + + $this->di['logger']->info('Added "%s" to shopping cart', $product->title); + + $this->di['events_manager']->fire(array('event' => 'onAfterProductAddedToCart', 'params' => $event_params)); + + return true; + } + + public function isStockAvailable(\Model_Product $product, $qty) + { + if ($product->stock_control) { + return ($product->quantity_in_stock >= $qty); + } + + return TRUE; + } + + public function isRecurrentPricing(\Model_Product $model) + { + $productTable = $model->getTable(); + $pricing = $productTable->getPricingArray($model); + return (isset($pricing['type']) && $pricing['type'] == \Model_ProductPayment::RECURRENT); + } + + public function isPeriodEnabledForProduct(\Model_Product $model, $period) + { + $productTable = $model->getTable(); + $pricing = $productTable->getPricingArray($model); + if ($pricing['type'] == \Model_ProductPayment::RECURRENT) { + return (bool)$pricing['recurrent'][$period]['enabled']; + } + + return true; + } + + protected function addProduct(\Model_Cart $cart, \Model_Product $product, array $data) + { + $item = $this->di['db']->dispense('CartProduct'); + $item->cart_id = $cart->id; + $item->product_id = $product->id; + $item->config = json_encode($data); + $this->di['db']->store($item); + + return true; + } + + public function removeProduct(\Model_Cart $cart, $id) + { + $bindings = array( + ':cart_id' => $cart->id, + ':id' => $id + ); + + $cartProduct = $this->di['db']->findOne('CartProduct', 'id = :id AND cart_id = :cart_id', $bindings); + if (!$cartProduct instanceof \Model_CartProduct) { + throw new \Box_Exception('Product not found'); + } + $this->di['db']->trash($cartProduct); + + $this->di['logger']->info('Removed product from shopping cart'); + + return true; + } + + public function changeCartCurrency(\Model_Cart $cart, \Model_Currency $currency) + { + $cart->currency_id = $currency->id; + $this->di['db']->store($cart); + + $this->di['logger']->info('Changed shopping cart #%s currency to %s', $cart->id, $currency->title); + + return true; + } + + public function resetCart(\Model_Cart $cart) + { + $cartProducts = $this->di['db']->find('CartProduct', 'cart_id = :cart_id', array(':cart_id' => $cart->id)); + foreach ($cartProducts as $cartProduct) { + $this->di['db']->trash($cartProduct); + } + $cart->promo_id = NULL; + $cart->updated_at = date('c'); + $this->di['db']->store($cart); + + return true; + } + + public function removePromo(\Model_Cart $cart) + { + $cart->promo_id = NULL; + $cart->updated_at = date('c'); + $this->di['db']->store($cart); + + $this->di['logger']->info('Removed promo code from shopping cart #%s', $cart->id); + + return true; + } + + public function applyPromo(\Model_Cart $cart, \Model_Promo $promo) + { + if ($cart->promo_id == $promo->id) { + return true; + } + + if ($this->isEmptyCart($cart)) { + throw new \Box_Exception('Add products to cart before applying promo code'); + } + + $cart->promo_id = $promo->id; + $this->di['db']->store($cart); + + $this->di['logger']->info('Applied promo code %s to shopping cart', $promo->code); + + return true; + } + + protected function isEmptyCart(\Model_Cart $cart) + { + $cartProducts = $this->di['db']->find('CartProduct', 'cart_id = :cart_id', array(':cart_id' => $cart->id)); + + return (count($cartProducts) == 0); + } + + public function rm(\Model_Cart $cart) + { + $cartProducts = $this->di['db']->find('CartProduct', 'cart_id = :cart_id', array(':cart_id' => $cart->id)); + + foreach ($cartProducts as $cartProduct) { + $this->di['db']->trash($cartProduct); + } + + $this->di['db']->trash($cart); + + return true; + } + + public function toApiArray(\Model_Cart $model, $deep = false, $identity = null) + { + $products = $this->getCartProducts($model); + + $currency = $this->di['db']->getExistingModelById('Currency', $model->currency_id); + + $items = array(); + $total = 0; + $cart_discount = 0; + $items_discount = 0; + foreach ($products as $product) { + $p = $this->cartProductToApiArray($product); + $total += $p['total']; + $items_discount += $p['discount']; + $items[] = $p; + } + + if ($model->promo_id) { + $promo = $this->di['db']->getExistingModelById('Promo', $model->promo_id, 'Promo not found'); + $promocode = $promo->code; + } else { + $promocode = NULL; + } + + $currencyService = $this->di['mod_service']('currency'); + $result = array( + 'promocode' => $promocode, + 'discount' => $items_discount, + 'total' => $total, + 'items' => $items, + 'currency' => $currencyService->toApiArray($currency), + ); + + return $result; + } + + public function isClientAbleToUsePromo(\Model_Client $client, \Model_Promo $promo) + { + if (!$this->promoCanBeApplied($promo)) { + return false; + } + + if (!$promo->once_per_client) { + return true; + } + + return !$this->clientHadUsedPromo($client, $promo); + } + + public function promoCanBeApplied(\Model_Promo $promo) + { + if (!$promo->active) { + return false; + } + + if ($promo->maxuses && $promo->maxuses <= $promo->used) { + return false; + } + + if ($promo->start_at && (strtotime($promo->start_at) - time() > 0)) { + return false; + } + + if ($promo->end_at && (strtotime($promo->end_at) - time() < 0)) { + return false; + } + + return true; + } + + protected function clientHadUsedPromo(\Model_Client $client, \Model_Promo $promo) + { + $sql = "SELECT id FROM client_order WHERE promo_id = :promo AND client_id = :cid LIMIT 1"; + $promoId = $this->di['db']->getCell($sql, array(':promo' => $promo->id, ':cid' => $client->id)); + + return ($promoId !== null); + } + + public function getCartProducts(\Model_Cart $model) + { + return $this->di['db']->find('CartProduct', 'cart_id = :cart_id ORDER BY id ASC', array(':cart_id' => $model->id)); + } + + public function checkoutCart(\Model_Cart $cart, \Model_Client $client, $gateway_id = null) + { + if ($cart->promo_id) { + $promo = $this->di['db']->load('Promo', $cart->promo_id); + if(!$promo instanceof \Model_Promo){ + throw new \Box_Exception('Promo not found'); + } + if (!$this->isClientAbleToUsePromo($client, $promo)) { + throw new \Box_Exception('You have already used this promo code. Please remove promo code and checkout again.', null, 9874); + } + } + + $this->di['events_manager']->fire( + array( + 'event' => 'onBeforeClientCheckout', + 'params' => array( + 'ip' => $this->di['request']->getClientAddress(), + 'client_id' => $client->id, + 'cart_id' => $cart->id) + ) + ); + + list($order, $invoice_id, $orders) = $this->createFromCart($client, $gateway_id); + + $this->rm($cart); + + $this->di['logger']->info('Checked out shopping cart'); + + $this->di['events_manager']->fire( + array( + 'event' => 'onAfterClientOrderCreate', + 'params' => array( + 'ip' => $this->di['request']->getClientAddress(), + 'client_id' => $client->id, + 'id' => $order->id + ) + ) + ); + + $result = array( + 'gateway_id' => $gateway_id, + 'invoice_hash' => null, + 'order_id' => $order->id, + 'orders' => $orders, + ); + + // invoice may not be created if total is 0 + if ($invoice_id) { + $idata = $this->di['db']->getExistingModelById('Invoice', $invoice_id, 'Invoice not found'); + $result['invoice_hash'] = $idata->hash; + } + + return $result; + } + + public function createFromCart(\Model_Client $client, $gateway_id = null) + { + $cart = $this->getSessionCart(); + $cartProducts = $this->di['db']->find('CartProduct', 'cart_id = :cart_id', array(':cart_id' => $cart->id)); + if (count($cartProducts) == 0) { + throw new \Box_Exception('Can not checkout empty cart.'); + } + + $ca = $this->toApiArray($cart); + + $create_invoice = true; + if ($ca['total'] == 0) { + $create_invoice = false; + } + + $currency = $this->di['db']->getExistingModelById('Currency', $cart->currency_id, 'Currency not found.'); + + //set default client currency + if (!$client->currency) { + $client->currency = $currency->code; + $this->di['db']->store($client); + } + + if ($client->currency != $currency->code) { + throw new \Box_Exception('Selected currency :selected does not match your profile currency :code. Please change cart currency to continue.', + array(':selected' => $currency->code, ':code' => $client->currency)); + } + + $clientService = $this->di['mod_service']('client'); + $taxed = $clientService->isClientTaxable($client); + + $orders = array(); + $invoice_items = array(); + $master_order = null; + $i = 0; + + foreach ($this->getCartProducts($cart) as $p) { + $item = $this->cartProductToApiArray($p); + + $order = $this->di['db']->dispense('ClientOrder'); + $order->client_id = $client->id; + $order->promo_id = $cart->promo_id; + $order->product_id = $item['product_id']; + $order->form_id = $item['form_id']; + + $order->group_id = $cart->id; + $order->group_master = ($i == 0); + $order->invoice_option = 'issue-invoice'; + $order->title = $item['title']; + $order->currency = $currency->code; + $order->service_type = $item['type']; + $order->unit = isset($item['unit']) ? $item['unit'] : NULL; + $order->period = isset($item['period']) ? $item['period'] : NULL; + $order->quantity = isset($item['quantity']) ? $item['quantity'] : NULL; + $order->price = $item['price'] * $currency->conversion_rate; + $order->discount = $item['discount_price'] * $currency->conversion_rate; + $order->status = \Model_ClientOrder::STATUS_PENDING_SETUP; + $order->notes = isset($item['notes']) ? $item['notes'] : NULL; + $order->config = json_encode($item); + $order->created_at = date('c'); + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $orders[] = $order->id; + + // mark promo as used + if ($cart->promo_id) { + $promo = $this->di['db']->getExistingModelById('Promo', $cart->promo_id, 'Promo not found.'); + $this->usePromo($promo); + + //set promo info for later use + $order->promo_recurring = $promo->recurring; + $order->promo_used = 1; + $this->di['db']->store($order); + } + + $orderService = $this->di['mod_service']('order'); + $orderService->saveStatusChange($order, 'Order created'); + + $invoice_items[] = array( + 'title' => $order->title, + 'price' => $order->price - ($order->discount), + 'quantity' => $order->quantity, + 'unit' => $order->unit, + 'period' => $order->period, + 'taxed' => $taxed, + 'type' => \Model_InvoiceItem::TYPE_ORDER, + 'rel_id' => $order->id, + 'task' => \Model_InvoiceItem::TASK_ACTIVATE, + ); + + if ($item['setup_price'] > 0) { + $setup_price = ($item['setup_price'] * $currency->conversion_rate) - ($item['discount_setup'] * $currency->conversion_rate); + $invoice_items[] = array( + 'title' => __(':product setup', array(':product' => $order->title)), + 'price' => $setup_price, + 'quantity' => 1, + 'unit' => 'service', + 'taxed' => $taxed, + ); + } + + //define master order to be returned + if (null === $master_order) { + $master_order = $order; + } + + $i++; + } + + if ($create_invoice) { + + $invoiceService = $this->di['mod_service']('Invoice'); + $invoice_id = $invoiceService->prepareInvoice($client, array('client_id' => $client->id, 'items' => $invoice_items, 'gateway_id' => $gateway_id)); + $invoiceModel = $this->di['db']->load('Invoice', $invoice_id); + $invoiceService->approveInvoice($invoiceModel, array('id' => $invoice_id, 'use_credits' => true)); + + foreach ($orders as $oid) { + $o = $this->di['db']->load('ClientOrder', $oid); + $o->unpaid_invoice_id = $invoice_id; + $this->di['db']->store($o); + } + + $result = array($master_order, $invoice_id, $orders); + } else { + $result = array($master_order, null, $orders); + } + + //activate orders if product is setup to be activated after order place or order total is $0 + $orderService = $this->di['mod_service']('Order'); + foreach ($orders as $oid) { + + $order = $this->di['db']->load('ClientOrder', $oid); + $oa = $orderService->toApiArray($order, false, $client); + $product = $this->di['db']->getExistingModelById('Product', $oa['product_id']); + if ($product->setup == \Model_ProductTable::SETUP_AFTER_ORDER || ($product->setup == \Model_ProductTable::SETUP_AFTER_PAYMENT && $oa['total'] - $oa['discount'] <= 0)) { + try { + $orderService->activateOrder($order); + } catch (\Exception $e) { + error_log($e->getMessage()); + $status = 'error'; + $notes = 'Order could not be activated after checkout due to error: ' . $e->getMessage(); + $orderService->orderStatusAdd($order, $status, $notes); + } + } + } + + return $result; + } + + public function usePromo(\Model_Promo $promo) + { + $promo->used++; + $promo->updated_at = date('c'); + $this->di['db']->store($promo); + } + + public function findActivePromoByCode($code) + { + return $this->di['db']->findOne('Promo', 'code = :code AND active = 1 ORDER BY id ASC', array(':code' => $code)); + } + + private function getItemPrice(\Model_CartProduct $model) + { + $product = $this->di['db']->load('Product', $model->product_id); + $config = $this->getItemConfig($model); + $repo = $product->getTable(); + return $repo->getProductPrice($product, $config); + } + + private function getItemSetupPrice(\Model_CartProduct $model) + { + $product = $this->di['db']->load('Product', $model->product_id); + $config = $this->getItemConfig($model); + $repo = $product->getTable(); + return $repo->getProductSetupPrice($product, $config); + } + + /** + * Function checks if product is related to other products in cart + * If relation exists then count discount for this + * + * @param Model_Cart $cart + * @param Model_CartProduct $model + * @return type + */ + protected function getRelatedItemsDiscount(\Model_Cart $cart, \Model_CartProduct $model) + { + $product = $this->di['db']->load('Product', $model->product_id); + $repo = $product->getTable(); + $config = $this->getItemConfig($model); + + $discount = 0; + if(method_exists($repo, 'getRelatedDiscount')) { + $list = array(); + $products = $this->getCartProducts($cart); + foreach($products as $p) { + $item = $this->di['db']->toArray($p); + $item['config'] = $this->getItemConfig($p); + $list[] = $item; + } + $discount = $repo->getRelatedDiscount($list, $product, $config); + } + return $discount; + } + + private function getItemTitle(\Model_CartProduct $model) + { + $product = $this->di['db']->load('Product', $model->product_id); + $config = $this->getItemConfig($model); + $service = $product->getService(); + if(method_exists($service, 'getCartProductTitle')) { + return $service->getCartProductTitle($product, $config); + } else { + return __(':product_title', array(':product_title'=>$product->title)); + } + } + + protected function getItemPromoDiscount(\Model_CartProduct $model, \Model_Promo $promo) + { + $product = $this->di['db']->load('Product', $model->product_id); + $repo = $this->di['mod_service']('product'); + $config = $this->getItemConfig($model); + return $repo->getProductDiscount($product, $promo, $config); + } + + public function getItemConfig(\Model_CartProduct $model) + { + return $this->di['tools']->decodeJ($model->config); + } + + public function cartProductToApiArray(\Model_CartProduct $model) + { + $product = $this->di['db']->load('Product', $model->product_id); + $repo = $product->getTable(); + $config = $this->getItemConfig($model); + $setup = $repo->getProductSetupPrice($product, $config); + $price = $repo->getProductPrice($product, $config); + $qty = isset($config['quantity']) ? $config['quantity'] : 1 ; + + list ($discount_price, $discount_setup) = $this->getProductDiscount($model, $setup); + + $discount_total = $discount_price + $discount_setup; + + $subtotal = ($price * $qty) + $setup; + if(abs($discount_total) > $subtotal ) { + $discount_total = $subtotal; + $discount_price = $subtotal; + } + + $data = array_merge($config, array( + 'id' => $model->id, + 'product_id' => $product->id, + 'form_id' => $product->form_id, + 'title' => $this->getItemTitle($model), + 'type' => $product->type, + 'quantity' => $qty, + 'unit' => $repo->getUnit($product), + 'price' => $price, + 'setup_price' => $setup, + 'discount' => $discount_total, + 'discount_price'=> $discount_price, + 'discount_setup'=> $discount_setup, + 'total' => $subtotal - $discount_total, + )); + return $data; + } + + public function getProductDiscount(\Model_CartProduct $cartProduct, $setup) + { + $config = $this->getItemConfig($cartProduct); + $qty = isset($config['quantity']) ? $config['quantity'] : 1 ; + + $cart = $this->di['db']->load('Cart', $cartProduct->cart_id); + $discount_price = $this->getRelatedItemsDiscount($cart, $cartProduct); + $discount_setup = 0; // discount for setup price + if($cart->promo_id) { + $promo = $this->di['db']->getExistingModelById('Promo', $cart->promo_id, 'Promo not found'); + $discount_price += $this->getItemPromoDiscount($cartProduct, $promo); + + if($promo->freesetup) { + $discount_setup = $setup; + } + } + return array($discount_price, $discount_setup); + } +} diff --git a/src/bb-modules/Cart/manifest.json b/src/bb-modules/Cart/manifest.json new file mode 100644 index 000000000..aaa567496 --- /dev/null +++ b/src/bb-modules/Cart/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "cart", + "type": "mod", + "name": "Shopping cart", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Client/Api/Admin.php b/src/bb-modules/Client/Api/Admin.php new file mode 100644 index 000000000..6a23a927b --- /dev/null +++ b/src/bb-modules/Client/Api/Admin.php @@ -0,0 +1,722 @@ +di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach($pager['list'] as $key => $clientArr){ + $client = $this->di['db']->getExistingModelById('Client', $clientArr['id'], 'Client not found'); + $pager['list'][$key] = $this->getService()->toApiArray($client, true, $this->getIdentity()); + } + + return $pager; + } + + /** + * Get clients index + * + * @return array - list of clients in id => full name pair + */ + public function get_pairs($data) + { + $service = $this->di['mod_service']('client'); + return $service->getPairs($data); + } + + /** + * Get client by id or email. Email is also unique in database + * + * @param int $id - client ID + * + * @optional string $email - client email + * + * @return array - client details + */ + public function get($data) + { + $service = $this->getService(); + $client = $service->get($data); + return $service->toApiArray($client, true, $this->getIdentity()); + } + + /** + * Login to clients area with client id + * + * @param int $id - client ID + * + * @return array - client details + */ + public function login($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('ID required'); + } + + $db = $this->di['db']; + $client = $db->load('Client', $data['id']); + if(!$client instanceof \Model_Client ) { + throw new \Box_Exception('Client not found'); + } + + $service = $this->di['mod_service']('client'); + $result = $service->toSessionArray($client); + + $session = $this->di['session']; + $session->set('client_id', $client->id); + $this->di['logger']->info('Logged in as client #%s', $client->id); + return $result; + } + + /** + * Creates new client + * + * @param string $email - client email, must not be registered on system + * @param string $first_name - client first name + * + * @optional string $password - client password + * @optional string $auth_type - client authorization type. Default null + * @optional string $last_name - client last name + * @optional string $aid - alternative ID. If you import cients from other systems you can use this field to store foreign system ID + * @optional string $group_id - client group id + * @optional string $status - client status: "active, suspended, canceled" + * @optional string $created_at - ISO 8601 date for client creation date + * @optional string $last_name - last name + * @optional string $aid - Alternative id. Usually used by import tools. + * @optional string $gender - Gender - values: male|female + * @optional string $country - Country + * @optional string $city - city + * @optional string $birthday - Birthday + * @optional string $company - Company + * @optional string $company_vat - Company VAT number + * @optional string $company_number - Company number + * @optional string $type - Identifies client type: company or individual + * @optional string $address_1 - Address line 1 + * @optional string $address_2 - Address line 2 + * @optional string $postcode - zip or postcode + * @optional string $state - country state + * @optional string $phone - Phone number + * @optional string $phone_cc - Phone country code + * @optional string $document_type - Related document type, ie: passpord, driving license + * @optional string $document_nr - Related document number, ie: passport number: LC45698122 + * @optional string $notes - Notes about client. Visible for admin only + * @optional string $lang - Client language + * @optional string $custom_1 - Custom field 1 + * @optional string $custom_2 - Custom field 2 + * @optional string $custom_3 - Custom field 3 + * @optional string $custom_4 - Custom field 4 + * @optional string $custom_5 - Custom field 5 + * @optional string $custom_6 - Custom field 6 + * @optional string $custom_7 - Custom field 7 + * @optional string $custom_8 - Custom field 8 + * @optional string $custom_9 - Custom field 9 + * @optional string $custom_10 - Custom field 10 + * + * @return int - client id + */ + public function create($data) + { + if(!isset($data['email']) || empty($data['email'])) { + throw new \Box_Exception('Email required'); + } + + if(!isset($data['first_name'])) { + throw new \Box_Exception('First name is required'); + } + + $validator = $this->di['validator']; + $validator->isEmailValid($data['email']); + + $service = $this->getService(); + if($service->emailAreadyRegistered($data['email'])) { + throw new \Box_Exception('Email is already registered.'); + } + + return $service->adminCreateClient($data); + } + + /** + * Deletes client from system + * + * @param string $id - client ID + * + * @return bool + */ + public function delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Client id is missing'); + } + + $model = $this->di['db']->load('Client', $data['id']); + if(!$model instanceof \Model_Client) { + throw new \Box_Exception('Client not found'); + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminClientDelete', 'params'=>array('id'=>$model->id))); + + $id = $model->id; + $this->getService()->remove($model); + $this->di['events_manager']->fire(array('event'=>'onAfterAdminClientDelete', 'params'=>array('id'=>$id))); + + $this->di['logger']->info('Removed client #%s', $id); + return true; + } + + /** + * Update client profile + * + * @param string $id - client ID + * + * @optional string $email - client email + * @optional string $first_name - client first_name + * @optional string $last_name - client last_name + * @optional string $status - client status + * @optional string $last_name - last name + * @optional string $aid - Alternative id. Usually used by import tools. + * @optional string $gender - Gender - values: male|female + * @optional string $country - Country + * @optional string $city - city + * @optional string $birthday - Birthday + * @optional string $company - Company + * @optional string $company_vat - Company VAT number + * @optional string $company_number - Company number + * @optional string $type - Identifies client type: company or individual + * @optional string $address_1 - Address line 1 + * @optional string $address_2 - Address line 2 + * @optional string $postcode - zip or postcode + * @optional string $state - country state + * @optional string $phone - Phone number + * @optional string $phone_cc - Phone country code + * @optional string $document_type - Related document type, ie: passpord, driving license + * @optional string $document_nr - Related document number, ie: passport number: LC45698122 + * @optional string $lang - Client language + * @optional string $notes - Notes about client. Visible for admin only + * @optional string $custom_1 - Custom field 1 + * @optional string $custom_2 - Custom field 2 + * @optional string $custom_3 - Custom field 3 + * @optional string $custom_4 - Custom field 4 + * @optional string $custom_5 - Custom field 5 + * @optional string $custom_6 - Custom field 6 + * @optional string $custom_7 - Custom field 7 + * @optional string $custom_8 - Custom field 8 + * @optional string $custom_9 - Custom field 9 + * @optional string $custom_10 - Custom field 10 + * + * @return bool + */ + public function update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Id required'); + } + + $client = $this->di['db']->load('Client', $data['id']); + if(!$client instanceof \Model_Client ) { + throw new \Box_Exception('Client not found'); + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminClientUpdate', 'params'=>$data)); + $service = $this->di['mod_service']('client'); + + $email = isset($data['email']) ? $data['email'] : NULL ; + $first_name = isset($data['first_name']) ? $data['first_name'] : NULL ; + $last_name = isset($data['last_name']) ? $data['last_name'] : NULL ; + $aid = isset($data['aid']) ? $data['aid'] : NULL ; + $gender = isset($data['gender']) ? $data['gender'] : NULL ; + $birthday = isset($data['birthday']) ? $data['birthday'] : NULL ; + $company = isset($data['company']) ? $data['company'] : NULL ; + $company_vat = isset($data['company_vat']) ? $data['company_vat'] : NULL ; + $address_1 = isset($data['address_1']) ? $data['address_1'] : NULL ; + $address_2 = isset($data['address_2']) ? $data['address_2'] : NULL ; + $phone_cc = isset($data['phone_cc']) ? $data['phone_cc'] : NULL ; + $phone = isset($data['phone']) ? $data['phone'] : NULL ; + $document_type = isset($data['document_type']) ? $data['document_type'] : NULL ; + $document_nr = isset($data['document_nr']) ? $data['document_nr'] : NULL ; + $notes = isset($data['notes']) ? $data['notes'] : NULL ; + $country = isset($data['country']) ? $data['country'] : NULL ; + $postcode = isset($data['postcode']) ? $data['postcode'] : NULL ; + $state = isset($data['state']) ? $data['state'] : NULL ; + $city = isset($data['city']) ? $data['city'] : NULL ; + $currency = isset($data['currency']) ? $data['currency'] : NULL ; + $status = isset($data['status']) ? $data['status'] : NULL ; + $tax_exempt = isset($data['tax_exempt']) ? (bool)$data['tax_exempt'] : NULL; + $created_at = isset($data['created_at']) ? $data['created_at'] : NULL; + + $c1 = isset($data['custom_1']) ? $data['custom_1'] : NULL ; + $c2 = isset($data['custom_2']) ? $data['custom_2'] : NULL ; + $c3 = isset($data['custom_3']) ? $data['custom_3'] : NULL ; + $c4 = isset($data['custom_4']) ? $data['custom_4'] : NULL ; + $c5 = isset($data['custom_5']) ? $data['custom_5'] : NULL ; + $c6 = isset($data['custom_6']) ? $data['custom_6'] : NULL ; + $c7 = isset($data['custom_7']) ? $data['custom_7'] : NULL ; + $c8 = isset($data['custom_8']) ? $data['custom_8'] : NULL ; + $c9 = isset($data['custom_9']) ? $data['custom_9'] : NULL ; + $c10 = isset($data['custom_10']) ? $data['custom_10'] : NULL ; + + if($currency && $service->canChangeCurrency($client, $currency)) { + $client->currency = $currency; + } + + if(isset($data['group_id'])) { + $client->client_group_id = $data['group_id']; + } + + if(!is_null($email)) { + $this->di['validator']->isEmailValid($email); + if($service->emailAreadyRegistered($email, $client)) { + throw new \Box_Exception('Can not change email. It is already registered.'); + } + $client->email = $email; + } + + if(!is_null($aid)) { + $client->aid = $aid; + } + if(!is_null($first_name)) { + $client->first_name = $first_name; + } + if(!is_null($last_name)) { + $client->last_name = $last_name; + } + if(!is_null($status)) { + $client->status = $status; + } + if(!is_null($gender)) { + $client->gender = $gender; + } + if(!is_null($birthday)) { + $client->birthday = $birthday; + } + if(!is_null($phone_cc)) { + $client->phone_cc = $phone_cc; + } + if(!is_null($phone)) { + $client->phone = $phone; + } + if(!is_null($company)) { + $client->company = $company; + } + if(!is_null($company_vat)) { + $client->company_vat = $company_vat; + } + if(isset($data['company_number'])) { + $client->company_number = $data['company_number']; + } + if(isset($data['type'])) { + $client->type = $data['type']; + } + if(isset($data['lang'])) { + $client->lang = $data['lang']; + } + if(!is_null($address_1)) { + $client->address_1 = $address_1; + } + if(!is_null($address_2)) { + $client->address_2 = $address_2; + } + if(!is_null($city)) { + $client->city = $city; + } + if(!is_null($state)) { + $client->state = $state; + } + if(!is_null($postcode)) { + $client->postcode = $postcode; + } + if(!is_null($country)) { + $client->country = $country; + } + if(!is_null($document_type)) { + $client->document_type = $document_type; + } + if(!is_null($document_nr)) { + $client->document_nr = $document_nr; + } + if(!is_null($notes)) { + $client->notes = $notes; + } + if(!is_null($tax_exempt)) { + $client->tax_exempt = $tax_exempt; + } + if(!is_null($created_at)) { + $client->created_at = date('c', strtotime($created_at)); + } + + if(!is_null($c1)) { + $client->custom_1 = $c1; + } + if(!is_null($c2)) { + $client->custom_2 = $c2; + } + if(!is_null($c3)) { + $client->custom_3 = $c3; + } + if(!is_null($c4)) { + $client->custom_4 = $c4; + } + if(!is_null($c5)) { + $client->custom_5 = $c5; + } + if(!is_null($c6)) { + $client->custom_6 = $c6; + } + if(!is_null($c7)) { + $client->custom_7 = $c7; + } + if(!is_null($c8)) { + $client->custom_8 = $c8; + } + if(!is_null($c9)) { + $client->custom_9 = $c9; + } + if(!is_null($c10)) { + $client->custom_10 = $c10; + } + + $client->updated_at = date('c'); + $this->di['db']->store($client); + $this->di['events_manager']->fire(array('event'=>'onAfterAdminClientUpdate', 'params'=>array('id'=>$client->id))); + + $this->di['logger']->info('Updated client #%s profile', $client->id); + return true; + } + + /** + * Change client password + * + * @param int $id - Client ID + * @param string $password - new client password + * @param string $password_confirm - repeast same new client password + * + * @return bool + */ + public function change_password($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Client ID is required'); + } + + if(!isset($data['password'])) { + throw new \Box_Exception('Password required'); + } + if(!isset($data['password_confirm'])) { + throw new \Box_Exception('Password confirmation required'); + } + + if($data['password'] != $data['password_confirm']) { + throw new \Box_Exception('Passwords do not match'); + } + + $client = $this->di['db']->load('Client', $data['id']); + if(!$client instanceof \Model_Client ) { + throw new \Box_Exception('Client not found'); + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminClientPasswordChange', 'params'=>$data)); + + $client->pass = sha1($data['password']); + $client->updated_at = date('c'); + $this->di['db']->store($client); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminClientPasswordChange', 'params'=>array('id'=>$client->id, 'password'=>$data['password']))); + + $this->di['logger']->info('Changed client #%s password', $client->id); + return true; + } + + /** + * Returns list of client payments + * + * @return array + */ + public function balance_get_list($data) + { + $service = $this->di['mod_service']('Client', 'Balance'); + list($q, $params) = $service->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($q, $params, $per_page); + + foreach($pager['list'] as $key => $item){ + $pager['list'][$key] = array( + 'id' => isset($item['id']) ? $item['id'] : '', + 'description' => isset($item['description']) ? $item['description'] : '', + 'amount' => isset($item['amount']) ? $item['amount'] : '', + 'currency' => isset($item['currency']) ? $item['currency'] : '', + 'created_at' => isset($item['created_at']) ? $item['created_at'] : '', + ); + } + + return $pager; + } + + /** + * Remove row from clients balance + * + * @param int $id - Balance line id + * + * @return bool + */ + public function balance_delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Client ID is required'); + } + $model = $this->di['db']->load('ClientBalance', $data['id']); + if(!$model instanceof \Model_ClientBalance) { + throw new \Box_Exception('Balance line not found'); + } + + $id = $model->id; + $client_id = $model->client_id; + $amount = $model->amount; + + $this->di['db']->trash($model); + + $this->di['logger']->info('Removed line %s from client #%s balance for %s', $id, $client_id, $amount); + return true; + } + + /** + * Adds funds to clients balance + * + * @param int $id - Client ID + * @param int $amount - Amount of clients currency to added to balance + * @param int $description - Descrition of this transaction + * + * @optional string $type - Related item type + * @optional string $rel_id - Related item id + * + * @return bool + */ + public function balance_add_funds($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Client ID is required'); + } + + if(!isset($data['amount'])) { + throw new \Box_Exception('Amount is required'); + } + + if(!isset($data['description'])) { + throw new \Box_Exception('Description is required'); + } + + $client = $this->di['db']->load('Client', $data['id']); + if(!$client instanceof \Model_Client ) { + throw new \Box_Exception('Client not found'); + } + + $service = $this->di['mod_service']('client'); + $service->addFunds($client, $data['amount'], $data['description'], $data); + return true; + } + + /** + * Remove password reminders which were not confirmed in 2 hours + * + * @return bool + */ + public function batch_expire_password_reminders() + { + $service = $this->di['mod_service']('client'); + $expired = $service->getExpiredPasswordReminders(); + foreach($expired as $model) { + $this->di['db']->trash($model); + } + + $this->di['logger']->info('Executed action to delete expired clients password reminders'); + return TRUE; + } + + /** + * Get list of clients logins history + * + * @optional int $client_id - filter by client + * + * @return array + */ + public function login_history_get_list($data) + { + list($q, $params) = $this->getService()->getHistorySearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($q, $params, $per_page); + + foreach($pager['list'] as $key => $item){ + $pager['list'][$key] = array( + 'id' => isset($item['id']) ? $item['id'] : '', + 'ip' => isset($item['ip']) ? $item['ip'] : '', + 'created_at' => isset($item['created_at']) ? $item['created_at'] : '', + 'client' => array( + 'id' => isset($item['client_id']) ? $item['client_id'] : '', + 'first_name' => isset($item['first_name']) ? $item['first_name'] : '', + 'last_name' => isset($item['last_name']) ? $item['last_name'] : '', + 'email' => isset($item['email']) ? $item['email'] : '', + ) + ); + } + + return $pager; + } + + /** + * Remove log entry form clients logins history + * + * @param int $id - Log entry ID + * + * @return bool + */ + public function login_history_delete($data) + { + + $required = array( + 'id' => 'Id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('ActivityClientHistory', $data['id']); + + if(!$model instanceof \Model_ActivityClientHistory) { + throw new \Box_Exception('Event not found'); + } + $this->di['db']->trash($model); + return true; + } + + /** + * Return client statuses with counter. + * + * @return array + */ + public function get_statuses($data) + { + $service = $this->di['mod_service']('client'); + return $service->counter(); + } + + /** + * Return client groups. Id and title pairs + * + * @return array + */ + public function group_get_pairs($data) + { + $service = $this->di['mod_service']('client'); + return $service->getGroupPairs(); + } + + /** + * Create new clients group + * + * @param string $title - New group title + * + * @return int $id - newly created group id + */ + public function group_create($data) + { + if(!isset($data['title']) || empty($data['title'])) { + throw new \Box_Exception('Group title is missing'); + } + + return $this->getService()->createGroup($data); + } + + /** + * Update client group + * + * @param int $id - client group ID + * @optional string $title - new group title + * + * @return bool + * @throws ErrorException + */ + public function group_update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Group id is missing'); + } + + $model = $this->di['db']->load('ClientGroup', $data['id']); + if(!$model instanceof \Model_ClientGroup) { + throw new \Box_Exception('Group not found'); + } + + if(isset($data['title'])) { + $model->title = $data['title']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + return true; + } + + /** + * Delete client group + * + * @param int $id - client group ID + * + * @return bool + * @throws ErrorException + */ + public function group_delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Group id is missing'); + } + + $model = $this->di['db']->load('ClientGroup', $data['id']); + if(!$model instanceof \Model_ClientGroup) { + throw new \Box_Exception('Group not found'); + } + return $this->getService()->deleteGroup($model); + } + + /** + * Get client group details + * + * @param int $id - client group ID + * + * @return array + * @throws ErrorException + */ + public function group_get($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Group id is missing'); + } + + $model = $this->di['db']->load('ClientGroup', $data['id']); + if(!$model instanceof \Model_ClientGroup) { + throw new \Box_Exception('Group not found'); + } + + return $this->di['db']->toArray($model); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Client/Api/Client.php b/src/bb-modules/Client/Api/Client.php new file mode 100644 index 000000000..f026d1c93 --- /dev/null +++ b/src/bb-modules/Client/Api/Client.php @@ -0,0 +1,309 @@ +getService()->toApiArray($this->getIdentity(), true, $this->getIdentity()); + } + + /** + * Update currencty logged in client details + * + * @optional string $email - new client email. Must not exist on system + * @optional string $last_name - last name + * @optional string $aid - Alternative id. Usually used by import tools. + * @optional string $gender - Gender - values: male|female + * @optional string $country - Country + * @optional string $city - city + * @optional string $birthday - Birthday + * @optional string $company - Company + * @optional string $company_vat - Company VAT number + * @optional string $company_number - Company number + * @optional string $type - Identifies client type: company or individual + * @optional string $address_1 - Address line 1 + * @optional string $address_2 - Address line 2 + * @optional string $postcode - zip or postcode + * @optional string $state - country state + * @optional string $phone - Phone number + * @optional string $phone_cc - Phone country code + * @optional string $document_type - Related document type, ie: passpord, driving license + * @optional string $document_nr - Related document number, ie: passport number: LC45698122 + * @optional string $notes - Notes about client. Visible for admin only + * @optional string $custom_1 - Custom field 1 + * @optional string $custom_2 - Custom field 2 + * @optional string $custom_3 - Custom field 3 + * @optional string $custom_4 - Custom field 4 + * @optional string $custom_5 - Custom field 5 + * @optional string $custom_6 - Custom field 6 + * @optional string $custom_7 - Custom field 7 + * @optional string $custom_8 - Custom field 8 + * @optional string $custom_9 - Custom field 9 + * @optional string $custom_10 - Custom field 10 + * + * @return boolean + * @throws Exception + * @deprecated moved to profile module + */ + public function update($data) + { + $client = $this->getIdentity(); + + $event_params = $data; + $event_params['id'] = $client->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeClientProfileUpdate', 'params'=>$event_params)); + + $mod = $this->di['mod']('client'); + $config = $mod->getConfig(); + if(isset($data['email']) + && $client->email != $data['email'] + && isset($config['allow_change_email']) + && !$config['allow_change_email']) { + throw new \Box_Exception('Email can not be changed'); + } + + if(isset($data['email'])) { + $this->di['validator']->isEmailValid($data['email']); + + if($this->getService()->emailAreadyRegistered($data['email'], $client)) { + throw new \Box_Exception('Can not change email. It is already registered.'); + } + + $client->email = strtolower(trim($data['email'])); + } + + if(isset($data['first_name'])) { + $client->first_name = $data['first_name']; + } + + if(isset($data['last_name'])) { + $client->last_name = $data['last_name']; + } + + if(isset($data['gender'])) { + $client->gender = $data['gender']; + } + + if(isset($data['birthday'])) { + $client->birthday = $data['birthday']; + } + + if(isset($data['company'])) { + $client->company = $data['company']; + } + + if(isset($data['company_vat'])) { + $client->company_vat = $data['company_vat']; + } + + if(isset($data['company_number'])) { + $client->company_number = $data['company_number']; + } + + if(isset($data['type'])) { + $client->type = $data['type']; + } + + if(isset($data['address_1'])) { + $client->address_1 = $data['address_1']; + } + + if(isset($data['address_2'])) { + $client->address_2 = $data['address_2']; + } + + if(isset($data['phone_cc'])) { + $client->phone_cc = $data['phone_cc']; + } + + if(isset($data['phone'])) { + $client->phone = $data['phone']; + } + + if(isset($data['country'])) { + $client->country = $data['country']; + } + + if(isset($data['postcode'])) { + $client->postcode = $data['postcode']; + } + + if(isset($data['city'])) { + $client->city = $data['city']; + } + + if(isset($data['state'])) { + $client->state = $data['state']; + } + + if(isset($data['document_type'])) { + $client->document_type = $data['document_type']; + } + + if(isset($data['document_nr'])) { + $client->document_nr = $data['document_nr']; + } + + if(isset($data['notes'])) { + $client->notes = $data['notes']; + } + + if(isset($data['custom_1'])) { + $client->custom_1 = $data['custom_1']; + } + if(isset($data['custom_2'])) { + $client->custom_2 = $data['custom_2']; + } + if(isset($data['custom_3'])) { + $client->custom_3 = $data['custom_3']; + } + if(isset($data['custom_4'])) { + $client->custom_4 = $data['custom_4']; + } + if(isset($data['custom_5'])) { + $client->custom_5 = $data['custom_5']; + } + if(isset($data['custom_6'])) { + $client->custom_6 = $data['custom_6']; + } + if(isset($data['custom_7'])) { + $client->custom_7 = $data['custom_7']; + } + if(isset($data['custom_8'])) { + $client->custom_8 = $data['custom_8']; + } + if(isset($data['custom_9'])) { + $client->custom_9 = $data['custom_9']; + } + if(isset($data['custom_10'])) { + $client->custom_10 = $data['custom_10']; + } + + $client->updated_at = date('c'); + $this->di['db']->store($client); + + $this->di['events_manager']->fire(array('event'=>'onAfterClientProfileUpdate', 'params'=>array('id'=>$client->id))); + + $this->di['logger']->info('Updated profile'); + return true; + } + + /** + * Retrieve current API key + * @deprecated moved to profile module + */ + public function api_key_get($data) + { + $client = $this->getIdentity(); + return $client->api_token; + } + + /** + * Generate new API key + * @deprecated moved to profile module + */ + public function api_key_reset($data) + { + $client = $this->getIdentity(); + + $client->api_token = $this->di['tools']->generatePassword(32); + $client->updated_at = date('c'); + $this->di['db']->store($client); + + $this->di['logger']->info('Generated new API key'); + return $client->api_token; + } + + /** + * Change client area password + * @deprecated moved to profile module + */ + public function change_password($data) + { + if(!isset($data['password'])) { + throw new \Box_Exception('Password required'); + } + + if(!isset($data['password_confirm'])) { + throw new \Box_Exception('Password confirmation required'); + } + + if($data['password'] != $data['password_confirm']) { + throw new \Box_Exception('Passwords do not match.'); + } + + $event_params = $data; + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeClientProfilePasswordChange', 'params'=>$event_params)); + + $this->di['validator']->isPasswordStrong($data['password']); + + $client = $this->getIdentity(); + $client->pass = sha1($data['password']); + $this->di['db']->store($client); + + $this->di['events_manager']->fire(array('event'=>'onAfterClientProfilePasswordChange', 'params'=>array('id'=>$client->id))); + + $this->di['logger']->info('Changed profile password'); + + return true; + } + + /** + * Clear session and logout + * @return boolean + * @deprecated moved to profile module + */ + public function logout() + { + if($_COOKIE) { // testing env fix + $this->di['cookie']->set('BOXCLR', "", time() - 3600, '/'); + } + $this->di['session']->delete('client'); + $this->di['session']->delete('client_id'); + $this->di['logger']->info('Logged out'); + return true; + } + + /** + * Get payments information + * @return array + */ + public function balance_get_list($data) + { + $service = $this->di['mod_service']('Client', 'Balance'); + $data['client_id'] = $this->identity->id; + + list($q, $params) = $service->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($q, $params, $per_page); + + foreach ($pager['list'] as $key => $item) { + $balance = $this->di['db']->getExistingModelById('ClientBalance', $item['id'], 'Balance not found'); + $pager['list'][$key] = $service->toApiArray($balance); + } + + return $pager; + } + +} \ No newline at end of file diff --git a/src/bb-modules/Client/Api/Guest.php b/src/bb-modules/Client/Api/Guest.php new file mode 100644 index 000000000..969cccc9a --- /dev/null +++ b/src/bb-modules/Client/Api/Guest.php @@ -0,0 +1,281 @@ +di['mod_config']('client'); + + if(isset($config['allow_signup']) && !$config['allow_signup']) { + throw new \Box_Exception('New registrations are temporary disabled'); + } + + if(!isset($data['email'])) { + throw new \Box_Exception('Email required'); + } + + if(!isset($data['first_name'])) { + throw new \Box_Exception('First name required'); + } + + if(!isset($data['password'])) { + throw new \Box_Exception('Password required'); + } + + if(!isset($data['password_confirm'])) { + throw new \Box_Exception('Password confirmation required'); + } + + if($data['password'] != $data['password_confirm']) { + throw new \Box_Exception('Passwords do not match'); + } + + if(isset($config['required']) && is_array($config['required'])) { + foreach($config['required'] as $field) { + if(!isset($data[$field]) || empty($data[$field])) { + $name = ucwords(str_replace('_', ' ', $field)); + throw new \Box_Exception('It is required that you provide details for field ":field"', array(':field'=>$name)); + } + } + } + + $this->di['validator']->isPasswordStrong($data['password']); + $this->di['validator']->isEmailValid($data['email']); + + $service = $this->getService(); + $email = strtolower(trim($data['email'])); + if($service->clientAlreadyExists($email)) { + throw new \Box_Exception('Email is already registered. You may want to login instead of registering.'); + } + + $client = $service->guestCreateClient($data); + + if(isset($data['auto_login']) && $data['auto_login']) { + try { + $this->login(array('email'=>$client->email, 'password' => $client->pass)); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + + return (int) $client->id; + } + + /** + * Client login action + * + * @param string $email - client email + * @param string $password - client password + * + * @return array - session data + * @throws Box_Exception + */ + public function login($data) + { + if(!isset($data['email'])) { + throw new \Box_Exception('Email required'); + } + + if(!isset($data['password'])) { + throw new \Box_Exception('Password required'); + } + + $event_params = $data; + $event_params['ip'] = $this->ip; + $this->di['events_manager']->fire(array('event'=>'onBeforeClientLogin', 'params'=>$event_params)); + + $service = $this->getService(); + $client = $service->getByLoginDetails($data['email'], sha1($data['password'])); + if(!$client instanceof \Model_Client ) { + + $this->di['events_manager']->fire(array('event'=>'onEventClientLoginFailed', 'params'=>$event_params)); + + throw new \Box_Exception('Please check your login details', array(), 403); + } + + if(isset($data['remember'])) { + $email = $data['email']; + $pass = $data['password']; + $cookie_time = (3600 * 24 * 30); // 30 days + $this->di['cookie']->set('BOXCLR', 'e='.base64_encode($email).'&p='.base64_encode(sha1($pass)), time() + $cookie_time, '/'); + } + + $this->di['events_manager']->fire(array('event'=>'onAfterClientLogin', 'params'=>array('id'=>$client->id, 'ip'=>$this->ip))); + + $result = $service->toSessionArray($client); + $this->di['session']->set('client_id', $client->id); + + $this->di['logger']->info('Client #%s logged in', $client->id); + return $result; + } + + /** + * Password reset confirmation email will be sent to email. + * + * @param string $email - client email + * @return boolean + * @throws Box_Exception + */ + public function reset_password($data) + { + if(!isset($data['email'])) { + throw new \Box_Exception('Email required'); + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeGuestPasswordResetRequest', 'params'=>$data)); + + $c = $this->di['db']->findOne('Client', 'email = ?', array($data['email'])); + if(!$c instanceof \Model_Client ) { + throw new \Box_Exception('Email not found in our database'); + } + + $hash = sha1(time() . uniqid()); + + $reset = $this->di['db']->dispense('ClientPasswordReset'); + $reset->client_id = $c->id; + $reset->ip = $this->ip; + $reset->hash = $hash; + $reset->created_at = date('c'); + $reset->updated_at = date('c'); + $this->di['db']->store($reset); + + //send email + $email = array(); + $email['to_client'] = $c->id; + $email['code'] = 'mod_client_password_reset_request'; + $email['hash'] = $hash; + $emailSerivce = $this->di['mod_service']('email'); + $emailSerivce->sendTemplate($email); + + $this->di['logger']->info('Client requested password reset. Sent to email %s', $c->email); + return true; + } + + /** + * Confirm password reset action + * + * @param string $hash - hash received in email + * @return boolean + * @throws Box_Exception + */ + public function confirm_reset($data) + { + if(!isset($data['hash'])) { + throw new \Box_Exception('Hash required'); + } + + $reset = $this->di['db']->findOne('ClientPasswordReset', 'hash = ?', array($data['hash'])); + if(!$reset instanceof \Model_ClientPasswordReset) { + throw new \Box_Exception('The link have expired or you have already confirmed password reset.'); + } + + $new_pass = substr(md5(time() . uniqid()), 0, 10); + + $c = $this->di['db']->load('Client', $reset->client_id); + $c->pass = $new_pass; + $this->di['db']->store($c); + + //send email + $email = array(); + $email['to_client'] = $reset->client_id; + $email['code'] = 'mod_client_password_reset_approve'; + $email['password'] = $new_pass; + $emailService = $this->di['mod_service']('email'); + $emailService->sendTemplate($email); + + $this->di['db']->trash($reset); + $this->di['logger']->info('Client password reset request was approved'); + return true; + } + + /** + * Check if given vat number is valid EU country VAT number + * This method uses http://isvat.appspot.com/ method to validate VAT + * + * @param string $country - Country CODE: FR - France etc. + * @param string $vat - VAT number + * + * @return bool- true if VAT is valid, false if not + */ + public function is_vat($data) + { + if(!isset($data['country'])) { + throw new \Box_Exception('Country code is required'); + } + + if(!isset($data['vat'])) { + throw new \Box_Exception('Country code is required'); + } + + $cc = $data['country']; + $vatnum = $data['vat']; + $url = 'http://isvat.appspot.com/'.rawurlencode($cc).'/'.rawurlencode($vatnum).'/'; + $result = $this->di['guzzle_client']->get($url); + return ($result == 'true'); + } + + /** + * List of required fields for client registration + */ + public function required() + { + $config = $this->di['mod_config']('client'); + return isset($config['required']) ? $config['required'] : array(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Client/Controller/Admin.php b/src/bb-modules/Client/Controller/Admin.php new file mode 100644 index 000000000..129f72c79 --- /dev/null +++ b/src/bb-modules/Client/Controller/Admin.php @@ -0,0 +1,125 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 200, + 'location' => 'client', + 'label' => 'Clients', + 'uri' => $this->di['url']->adminLink('client'), + 'class' => 'contacts', + ), + 'subpages' => array( + array( + 'location' => 'client', + 'label' => 'Overview', + 'uri' => $this->di['url']->adminLink('client'), + 'index' => 100, + 'class' => '', + ), + array( + 'location' => 'client', + 'label' => 'Advanced search', + 'uri' => $this->di['url']->adminLink('client', array('show_filter' => 1)), + 'index' => 200, + 'class' => '', + ), + array( + 'location' => 'activity', + 'index' => 900, + 'label' => 'Client logins history', + 'uri' => $this->di['url']->adminLink('client/logins'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/client', 'get_index', array(), get_class($this)); + $app->get('/client/', 'get_index', array(), get_class($this)); + $app->get('/client/index', 'get_index', array(), get_class($this)); + $app->get('/client/login/:id', 'get_login', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/client/manage/:id', 'get_manage', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/client/group/:id', 'get_group', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/client/create', 'get_create', array(), get_class($this)); + $app->get('/client/logins', 'get_history', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_client_index'); + } + + public function get_manage(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $client = $api->client_get(array('id'=>$id)); + return $app->render('mod_client_manage', array('client'=>$client)); + } + + public function get_group(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $model = $api->client_group_get(array('id'=>$id)); + return $app->render('mod_client_group', array('group'=>$model)); + } + + public function get_history(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_client_login_history'); + } + + public function get_login(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $api->client_login(array('id'=>$id)); + + $redirect_to = '/'; + if ($this->di['request']->getQuery('r')) { + $r = $this->di['request']->getQuery('r'); + $redirect_to = '/' . trim($r, '/'); + } + + Header( "HTTP/1.1 301 Moved Permanently" ); + Header( "Location: ".$this->di['tools']->url($redirect_to) ); + exit; + } +} \ No newline at end of file diff --git a/src/bb-modules/Client/Controller/Client.php b/src/bb-modules/Client/Controller/Client.php new file mode 100644 index 000000000..31ffdc398 --- /dev/null +++ b/src/bb-modules/Client/Controller/Client.php @@ -0,0 +1,104 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + //@deprecated + $app->get('/client/me', 'get_profile', array(), get_class($this)); + + $app->get('/client/reset-password-confirm/:hash', 'get_reset_password_confirm', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->get('/client', 'get_client_index', array(), get_class($this)); + $app->get('/client/logout', 'get_client_logout', array(), get_class($this)); + $app->get('/client/:page', 'get_client_page', array('page'=>'[a-z0-9-]+'), get_class($this)); + $app->get('/client/confirm-email/:hash', 'get_client_confirmation', array('page'=>'[a-z0-9-]+'), get_class($this)); + } + + /** + * @param Box_App $app + * @deprecated + */ + public function get_profile(\Box_App $app) + { + return $app->redirect('/client/profile'); + } + + /** + * @param Box_App $app + * @deprecated + */ + public function get_balance(\Box_App $app) + { + return $app->redirect('/client/balance'); + } + + public function get_client_index(\Box_App $app) + { + $api = $app->getApiClient(); + return $app->render('mod_client_index'); + } + + public function get_client_confirmation(\Box_App $app, $hash) + { + $mod = new Box_Mod('client'); + $service = $mod->getService(); + $service->approveClientEmailByHash($hash); + $app->redirect('/'); + } + + public function get_client_logout(\Box_App $app) + { + $api = $app->getApiClient(); + $api->profile_logout(); + $app->redirect('/'); + } + + public function get_client_page(\Box_App $app, $page) + { + $api = $app->getApiClient(); + $template = 'mod_client_'.$page; + return $app->render($template); + } + + public function get_reset_password_confirm(\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $api->client_confirm_reset($data); + $app->redirect('/login'); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Client/Service.php b/src/bb-modules/Client/Service.php new file mode 100644 index 000000000..778257873 --- /dev/null +++ b/src/bb-modules/Client/Service.php @@ -0,0 +1,586 @@ +di = $di; + } + + /** + * @return null + */ + public function getDi() + { + return $this->di; + } + + public function approveClientEmailByHash($hash) + { + $db = $this->di['db']; + $result = $db->getRow('SELECT id, client_id FROM extension_meta WHERE extension = "mod_client" AND meta_key = "confirm_email" AND meta_value = :hash', array(':hash'=>$hash)); + if(!$result) { + throw new \Box_Exception('Invalid email confirmation link'); + } + $db->exec('UPDATE client SET email_approved = 1 WHERE id = :id', array('id'=>$result['client_id'])); + $db->exec('DELETE FROM extension_meta WHERE id = :id', array('id'=>$result['id'])); + return true; + } + + public function generateEmailConfirmationLink($client_id) + { + $hash = strtolower($this->di['tools']->generatePassword(50)); + $db = $this->di['db']; + + $meta = $db->dispense('ExtensionMeta'); + $meta->extension = 'mod_client'; + $meta->client_id = $client_id; + $meta->meta_key = 'confirm_email'; + $meta->meta_value = $hash; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $db->store($meta); + + return $this->di['tools']->url('/client/confirm-email/'.$hash); + } + + public static function onAfterClientSignUp(\Box_Event $event) + { + $di = $event->getDi(); + $params = $event->getParameters(); + $config = $di['mod_config']('client'); + $emailService = $di['mod_service']('email'); + try { + $email = array(); + $email['to_client'] = $params['id']; + $email['code'] = 'mod_client_signup'; + $email['password'] = $params['password']; + $email['require_email_confirmation'] = false; + if(isset($config['require_email_confirmation']) && $config['require_email_confirmation']) { + $clientService = $di['mod_service']('client'); + $email['require_email_confirmation'] = true; + $email['email_confirmation_link'] = $clientService->generateEmailConfirmationLink($params['id']); + } + + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + + return true; + } + + public function getSearchQuery($data, $selectStmt = 'SELECT c.*') + { + $sql = $selectStmt; + $sql .= ' FROM client as c left join client_group as cg on c.client_group_id = cg.id'; + + $search = (isset($data['search']) && !empty($data['search'])) ? $data['search'] : NULL; + $client_id = (isset($data['client_id']) && !empty($data['client_id'])) ? $data['client_id'] : NULL; + $group_id = (isset($data['group_id']) && !empty($data['group_id'])) ? $data['group_id'] : NULL; + $id = (isset($data['id']) && !empty($data['id'])) ? $data['id'] : NULL; + $status = (isset($data['status']) && !empty($data['status'])) ? $data['status'] : NULL; + $name = (isset($data['name']) && !empty($data['name'])) ? $data['name'] : NULL; + $company = (isset($data['company']) && !empty($data['company'])) ? $data['company'] : NULL; + $email = (isset($data['email']) && !empty($data['email'])) ? $data['email'] : NULL; + $created_at = (isset($data['created_at']) && !empty($data['created_at'])) ? $data['created_at'] : NULL; + $date_from = (isset($data['date_from']) && !empty($data['date_from'])) ? $data['date_from'] : NULL; + $date_to = (isset($data['date_to']) && !empty($data['date_to'])) ? $data['date_to'] : NULL; + + $where = array(); + $params = array(); + if($id) { + $where[] = 'c.id = :client_id or c.aid = :alt_client_id'; + $params[':client_id'] = $id; + $params[':alt_client_id'] = $id; + } + + if($name) { + $where[] = '(c.first_name LIKE :first_name or c.last_name LIKE :last_name )'; + $name = "%" . $name . "%"; + $params[':first_name'] = $name; + $params[':last_name'] = $name; + } + + if($email) { + $where[] = 'c.email LIKE :email'; + $params[':email'] = "%" . $email . "%"; + } + + if($company) { + $where[] = 'c.company LIKE :company'; + $params[':company'] = "%" . $company . "%"; + } + + if($status) { + $where[] = 'c.status = :status'; + $params[':status'] = $status; + } + + if($group_id) { + $where[] = 'c.client_group_id = :group_id'; + $params[':group_id'] = $group_id; + } + + if($created_at) { + $where[] = "DATE_FORMAT(c.created_at, '%Y-%m-%d') = :created_at"; + $params[':created_at'] = date('Y-m-d', strtotime($created_at)) ; + } + + if($date_from) { + $where[] = 'UNIX_TIMESTAMP(c.created_at) >= :date_from'; + $params[':date_from'] = strtotime($date_from); + } + + if($date_to) { + $where[] = 'UNIX_TIMESTAMP(c.created_at) <= :date_from'; + $params[':date_to'] = strtotime($date_to); + } + + //smartSearch + if($search) { + if(is_numeric($search)) { + $where[] = 'c.id = :cid or c.aid = :caid'; + $params[':cid'] = $search; + $params[':caid'] = $search; + } else { + $where[] = "c.company LIKE :s_company OR c.first_name LIKE :s_first_time OR c.last_name LIKE :s_last_name OR c.email LIKE :s_email OR CONCAT(c.first_name, ' ', c.last_name ) LIKE :full_name"; + $search = "%" . $search . "%"; + $params[':s_company'] = $search; + $params[':s_first_time'] = $search; + $params[':s_last_name'] = $search; + $params[':s_email'] = $search; + $params[':full_name'] = $search; + } + } + + if (!empty($where)){ + $sql .= ' WHERE '.implode(' AND ', $where); + } + $sql = $sql.' ORDER BY c.created_at desc'; + + return array($sql, $params); + } + + public function getPairs($data) + { + $limit = isset($data['per_page']) ? $data['per_page'] : 30; + list($sql, $params) = $this->getSearchQuery($data, "SELECT c.id, CONCAT(c.first_name, ' ', c.last_name) as full_name"); + $sql = $sql.' LIMIT '.$limit; + return $this->di['db']->getAssoc($sql, $params); + } + + public function toSessionArray(\Model_Client $model) + { + return array( + 'id' => $model->id, + 'email' => $model->email, + 'name' => $model->getFullName(), + 'role' => $model->role, + ); + } + + public function emailAreadyRegistered($new_email, \Model_Client $model = null) + { + if($model && $model->email == $new_email) { + return false; + } + + $result = $this->di['db']->findOne('Client', 'email = ?', array($new_email)); + + return ($result) ? true : false; + } + + public function canChangeCurrency(\Model_Client $model, $currency = null) + { + if(!$model->currency) { + return true; + } + + if($model->currency == $currency) { + return false; + } + + $invoice = $this->di['db']->load('Invoice', 'client_id = ?', $model->client_id); + if($invoice) { + throw new \Box_Exception('Currency can not be changed. Client already have invoices issued.'); + } + + $order = $this->di['db']->load('ClientOrder', 'client_id = ?', $model->client_id); + if($order) { + throw new \Box_Exception('Currency can not be changed. Client already have orders.'); + } + + /* + if($model->ClientBalance->count() > 0) { + throw new \Box_Exception('Currency can not be changed. Client have money in balance.'); + } + */ + return true; + } + + public function addFunds(\Model_Client $client, $amount, $description, array $data = null) + { + if(!$client->currency) { + throw new \Box_Exception('Define clients currency before adding funds.'); + } + + if(!is_numeric($amount)) { + throw new \Box_Exception('Funds amount is not valid'); + } + + if(empty($description)) { + throw new \Box_Exception('Funds description is not valid'); + } + + $credit = $this->di['db']->dispense('ClientBalance'); + + $credit->client_id = $client->id; + $credit->type = isset($data['type']) ? $data['type'] : 'gift'; + $credit->rel_id = isset($data['rel_id']) ? $data['rel_id'] : null; + $credit->description = $description; + $credit->amount = $amount; + $credit->created_at = date('c'); + $credit->updated_at = date('c'); + + $this->di['db']->store($credit); + return true; + } + + public function getExpiredPasswordReminders() + { + $expire_after_hours = 2; + $expired = $this->di['db']->find('ClientPasswordReset', 'UNIX_TIMESTAMP() - ? > created_at', array($expire_after_hours * 60 * 60)); + return $expired; + } + + public function getHistorySearchQuery($data) + { + $q = 'SELECT ach.*, c.first_name, c.last_name, c.email + FROM activity_client_history as ach + LEFT JOIN client as c on ach.client_id = c.id '; + + $search = isset($data['search']) ? $data['search'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + + $where = array(); + $params = array(); + if($search) { + $where[] = 'c.first_name LIKE %:first_name% OR c.last_name LIKE %:last_name% OR c.id LIKE :id'; + $params[':first_name'] = $search; + $params[':last_name'] = $search; + $params[':id'] = $search; + } + + if($client_id) { + $where[] = 'ach.client_id = :client_id'; + $params[':client_id'] = $client_id; + } + + if (!empty($where)){ + $q .= ' WHERE '.implode(' AND ', $where); + } + + $q .= ' ORDER BY ach.id desc'; + + return array($q, $params); + } + + public function counter() + { + $sql = 'SELECT status, COUNT(id) as counter + FROM client + group by status'; + $data = $this->di['db']->getAssoc($sql); + return array( + 'total' => array_sum($data), + \Model_Client::ACTIVE => isset($data[\Model_Client::ACTIVE]) ? $data[\Model_Client::ACTIVE] : 0, + \Model_Client::SUSPENDED => isset($data[\Model_Client::SUSPENDED]) ? $data[\Model_Client::SUSPENDED] : 0, + \Model_Client::CANCELED => isset($data[\Model_Client::CANCELED]) ? $data[\Model_Client::CANCELED] : 0, + ); + } + + public function getGroupPairs() + { + $sql = 'SELECT id, title + FROM client_group'; + return $this->di['db']->getAssoc($sql); + } + + public function clientAlreadyExists($email) + { + $client = $this->di['db']->findOne('Client', 'email = :email ', array(':email' => $email)); + + return ($client instanceof \Model_Client); + } + + public function getByLoginDetails($email, $password) + { + $client = $this->di['db']->findOne('Client', 'email = ? and pass = ? and status = ?', array($email, $password, \Model_Client::ACTIVE)); + return $client; + } + + public function toApiArray(\Model_Client $model, $deep = false, $identity = null) + { + $details = array( + 'id' => $model->id, + 'aid' => $model->aid, + 'email' => $model->email, + 'type' => $model->type, + 'group_id' => $model->client_group_id, + 'company' => $model->company, + 'company_vat' => $model->company_vat, + 'company_number' => $model->company_number, + 'first_name' => $model->first_name, + 'last_name' => $model->last_name, + 'gender' => $model->gender, + 'birthday' => $model->birthday, + 'phone_cc' => $model->phone_cc, + 'phone' => $model->phone, + 'address_1' => $model->address_1, + 'address_2' => $model->address_2, + 'city' => $model->city, + 'state' => $model->state, + 'postcode' => $model->postcode, + 'country' => $model->country, + 'currency' => $model->currency, + 'notes' => $model->notes, + 'created_at' => $model->created_at, + ); + + if($deep) { + $details['balance'] = $this->getClientBalance($model); + } + + $m = $this->di['db']->toArray($model); + for ($i = 1; $i < 11; $i++) { + $k = 'custom_'.$i; + if(isset($m[$k]) && !empty($m[$k])) { + $details[$k] = $m[$k]; + } + } + + $clientGroup = $this->di['db']->load('ClientGroup', $model->client_group_id); + + if($identity instanceof \Model_Admin) { + $details['auth_type'] = $model->auth_type; + $details['api_token'] = $model->api_token; + $details['ip'] = $model->ip; + $details['status'] = $model->status; + $details['tax_exempt'] = $model->tax_exempt; + $details['group'] = ($clientGroup) ? $clientGroup->title : NULL; + $details['updated_at'] = $model->updated_at; + } + + return $details; + } + + public function getClientBalance(\Model_Client $c) + { + $sql = 'SELECT SUM(amount) as client_total + FROM client_balance + WHERE client_id = ? + GROUP BY client_id'; + + $balance = $this->di['db']->getCell($sql, array($c->id)); + + return $balance; + } + + public function get($data) + { + if(!isset($data['id']) && !isset($data['email'])) { + throw new \Box_Exception('Client ID or email is required'); + } + + $db = $this->di['db']; + $client = null; + if(isset($data['id'])) { + $client = $db->findOne('Client', 'id = ?', array($data['id'])); + } + + if(!$client && isset($data['email'])) { + $client = $db->findOne('Client', 'email = ?', array($data['email'])); + } + + if(!$client instanceof \Model_Client ) { + throw new \Box_Exception('Client not found'); + } + return $client; + } + + public function isClientTaxable(\Model_Client $model) + { + $systemService = $this->di['mod_service']('system'); + + if (!$systemService->getParamValue('tax_enabled', false)) { + return false; + } + + if ($model->tax_exempt) { + return false; + } + + return true; + } + + public function createGroup(array $data) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_ClientGroup', 2); + + $model = $this->di['db']->dispense('ClientGroup'); + + $model->title = $data['title']; + $model->updated_at = date('c'); + $model->created_at = date('c'); + + $group_id = $this->di['db']->store($model); + + $this->di['logger']->info('Created new client group #%s', $model->id); + return $group_id; + } + + public function deleteGroup(\Model_ClientGroup $model) + { + $client = $this->di['db']->findOne('Client', 'client_group_id = ?', array($model->id)); + if($client) { + throw new \Box_Exception('Can not remove group with clients'); + } + + $this->di['db']->trash($model); + $this->di['logger']->info('Removed client group #%s', $model->id); + return true; + } + + private function createClient(array $data) + { + $password = isset($data['password']) ? $data['password'] : uniqid(); + + $client = $this->di['db']->dispense('Client'); + $client->auth_type = isset($data['auth_type']) ? $data['auth_type'] : NULL; + $client->email = strtolower(trim($data['email'])); + $client->first_name = ucwords($data['first_name']); + $client->pass = sha1($password); + + $client->aid = isset($data['aid']) ? $data['aid'] : NULL ; + $client->last_name = isset($data['last_name']) ? $data['last_name'] : NULL ; + $client->client_group_id = isset($data['group_id']) ? $data['group_id'] : NULL ; + $client->status = isset($data['status']) ? $data['status'] : NULL ; + $client->gender = isset($data['gender']) ? $data['gender'] : NULL ; + $client->birthday = isset($data['birthday']) ? $data['birthday'] : NULL ; + $client->phone_cc = isset($data['phone_cc']) ? $data['phone_cc'] : NULL ; + $client->phone = isset($data['phone']) ? $data['phone'] : NULL ; + $client->company = isset($data['company']) ? $data['company'] : NULL ; + $client->company_vat = isset($data['company_vat']) ? $data['company_vat'] : NULL ; + $client->company_number = isset($data['company_number']) ? $data['company_number'] : NULL ; + $client->type = isset($data['type']) ? $data['type'] : NULL ; + $client->address_1 = isset($data['address_1']) ? $data['address_1'] : NULL ; + $client->address_2 = isset($data['address_2']) ? $data['address_2'] : NULL ; + $client->city = isset($data['city']) ? $data['city'] : NULL ; + $client->state = isset($data['state']) ? $data['state'] : NULL ; + $client->postcode = isset($data['postcode']) ? $data['postcode'] : NULL ; + $client->country = isset($data['country']) ? $data['country'] : NULL ; + $client->document_type = isset($data['document_type']) ? $data['document_type'] : NULL ; + $client->document_nr = isset($data['document_nr']) ? $data['document_nr'] : NULL ; + $client->notes = isset($data['notes']) ? $data['notes'] : NULL ; + $client->lang = isset($data['lang']) ? $data['lang'] : NULL ; + $client->currency = isset($data['currency']) ? $data['currency'] : NULL ; + + $client->custom_1 = isset($data['custom_1']) ? $data['custom_1'] : NULL ; + $client->custom_2 = isset($data['custom_2']) ? $data['custom_2'] : NULL ; + $client->custom_3 = isset($data['custom_3']) ? $data['custom_3'] : NULL ; + $client->custom_4 = isset($data['custom_4']) ? $data['custom_4'] : NULL ; + $client->custom_5 = isset($data['custom_5']) ? $data['custom_5'] : NULL ; + $client->custom_6 = isset($data['custom_6']) ? $data['custom_6'] : NULL ; + $client->custom_7 = isset($data['custom_7']) ? $data['custom_7'] : NULL ; + $client->custom_8 = isset($data['custom_8']) ? $data['custom_8'] : NULL ; + $client->custom_9 = isset($data['custom_9']) ? $data['custom_9'] : NULL ; + $client->custom_10 = isset($data['custom_10']) ? $data['custom_10'] : NULL ; + + $client->ip = isset($data['ip']) ? $data['ip'] : NULL; + $client->created_at = isset($data['created_at']) ? date('c', strtotime($data['created_at'])) : date('c'); + $client->updated_at = date('c'); + $this->di['db']->store($client); + return $client; + } + + public function adminCreateClient(array $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminCreateClient', 'params'=>$data)); + $client = $this->createClient($data); + $this->di['events_manager']->fire(array('event'=>'onAfterAdminCreateClient', 'params'=>array('id'=>$client->id, 'password'=>$client->pass))); + $this->di['logger']->info('Created new client #%s', $client->id); + + return $client->id; + } + + public function guestCreateClient(array $data) + { + $event_params = $data; + $event_params['ip'] = $this->di['request']->getClientAddress(); + $this->di['events_manager']->fire(array('event'=>'onBeforeClientSignUp', 'params'=>$event_params)); + + $data['ip'] = $this->di['request']->getClientAddress(); + $data['status'] = \Model_Client::ACTIVE; + $client = $this->createClient($data); + + $this->di['events_manager']->fire(array('event'=>'onAfterClientSignUp', 'params'=>array('id'=>$client->id, 'password'=>$client->pass))); + $this->di['logger']->info('Client #%s signed up', $client->id); + + return $client; + } + + public function remove(\Model_Client $model) + { + $service = $this->di['mod_service']('Order'); + $service->rmByClient($model); + $service = $this->di['mod_service']('Invoice'); + $service->rmByClient($model); + $service = $this->di['mod_service']('Support'); + $service->rmByClient($model); + $service = $this->di['mod_service']('Client', 'Balance'); + + $table = $this->di['table']('ActivityClientHistory'); + $table->rmByClient($model); + + $service->rmByClient($model); + $service = $this->di['mod_service']('Email'); + $service->rmByClient($model); + $service = $this->di['mod_service']('Activity'); + $service->rmByClient($model); + + $table = $this->di['table']('ForumTopicMessage'); + $table->rmByClient($model); + + $table = $this->di['table']('ClientPasswordReset'); + $table->rmByClient($model); + + + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare('DELETE FROM extension_meta WHERE client_id = :id'); + $stmt->execute(array('id'=>$model->id)); + + $this->di['db']->trash($model); + } +} \ No newline at end of file diff --git a/src/bb-modules/Client/ServiceBalance.php b/src/bb-modules/Client/ServiceBalance.php new file mode 100644 index 000000000..5aed393d3 --- /dev/null +++ b/src/bb-modules/Client/ServiceBalance.php @@ -0,0 +1,121 @@ +di = $di; + } + + /** + * @return null + */ + public function getDi() + { + return $this->di; + } + + public function getClientBalance(\Model_Client $c) + { + return (float)$this->clientTotal($c); + } + + public function clientTotal(\Model_Client $c) + { + $sql=" + SELECT SUM(amount) as client_total + FROM client_balance + WHERE client_id = ? + GROUP BY client_id + ORDER BY id DESC + "; + return $this->di['db']->getCell($sql, array($c->id)); + } + + public function rmByClient(\Model_Client $client) + { + $clientBalances = $this->di['db']->find('ClientBalance', 'client_id', array($client->id)); + foreach ($clientBalances as $balanceModel){ + $this->di['db']->trash($balanceModel); + } + } + + public function rm(\Model_ClientBalance $model) + { + $this->di['db']->trash($model); + } + + public function toApiArray(\Model_ClientBalance $model) + { + $client = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); + return array( + 'id' => $model->id, + 'description' => $model->description, + 'amount' => $model->amount, + 'currency' => $client->currency, + 'created_at' => $model->created_at, + ); + } + + public function getSearchQuery($data) + { + $q = 'SELECT m.*, c.currency as currency + FROM client_balance as m + LEFT JOIN client as c on c.id = m.client_id'; + + $id = isset($data['id']) ? $data['id'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + + $where = array(); + $params = array(); + + if(NULL !== $id) { + $where[] = 'm.id = :id'; + $params[':id'] = $id; + } + + if(NULL !== $client_id) { + $where[] = 'm.client_id = :client_id'; + $params[':client_id'] = $client_id; + } + + if(NULL !== $date_from) { + $where[] = 'm.created_at >= :date_from'; + $params[':date_from'] = strtotime($date_from); + } + + if(NULL !== $date_to) { + $where[] = 'm.created_at <= :date_to'; + $params[':date_to'] = strtotime($date_to); + } + + if (!empty($where)){ + $q .= ' WHERE '.implode(' AND ', $where); + } + $q .= ' ORDER by m.id DESC'; + + return array($q, $params); + } +} \ No newline at end of file diff --git a/src/bb-modules/Client/html_admin/mod_client_settings.phtml b/src/bb-modules/Client/html_admin/mod_client_settings.phtml new file mode 100644 index 000000000..11965a502 --- /dev/null +++ b/src/bb-modules/Client/html_admin/mod_client_settings.phtml @@ -0,0 +1,105 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Client settings{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} +

+{% endblock %} + +{% block content %} + +{% set params = admin.extension_config_get({"ext":"mod_client"}) %} +
+ +
+ + + +
+
+
+ +
+
+ +
+ + +
+
+
+
+ +
+ + +
+
+
+ +
+ +
+ + +
+
+
+ +
+ +
+ + +
+
+
+ +
+ +
+
+
+ + +
+{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Client/html_client/mod_client_balance.phtml b/src/bb-modules/Client/html_client/mod_client_balance.phtml new file mode 100644 index 000000000..4518dc9f9 --- /dev/null +++ b/src/bb-modules/Client/html_client/mod_client_balance.phtml @@ -0,0 +1,82 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Payments history' %}{% endblock %} +{% block breadcrumb %}
  • {% trans 'Payments history' %}
  • {% endblock %} +{% set profile = client.client_get %} + +{% block content %} +
    +
    +
    + +
    +

    {% trans 'Payments history'%}

    +

    {% trans 'Here you can track what you have been charged for and add more funds to your account' %}

    +
    + +
    + + + + + + + + + + {% set transactions = client.client_balance_get_list({"per_page":10, "page":request.page}) %} + {% for i, tx in transactions.list %} + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
    {% trans 'Description' %}{% trans 'Date' %}{% trans 'Amount' %}
    {{tx.description}}{{tx.created_at|bb_date}}{{ tx.amount | money(tx.currency) }}
    {% trans 'The list is empty' %}
    {% trans 'Total:' %}{{ profile.balance | money(profile.currency) }}
    + {% include "partial_pagination.phtml" with {'list': transactions} %} + +
    + +
    +
    +
    +
    +
    +
    + +
    +
    +
    +
    +
    +
    + +
    + +
    + +
    +
    + +{% endblock %} + +{% block js %} + +{% endblock %} + diff --git a/src/bb-modules/Client/html_client/mod_client_profile.phtml b/src/bb-modules/Client/html_client/mod_client_profile.phtml new file mode 100644 index 000000000..5819515a0 --- /dev/null +++ b/src/bb-modules/Client/html_client/mod_client_profile.phtml @@ -0,0 +1,263 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Profile details' %}{% endblock %} +{% block page_header %}{% trans 'User profile settings' %}{% endblock %} +{% block breadcrumb %}
  • {% trans 'Profile' %}
  • {% endblock %} + +{% block content %} + +
    + +
    +
    + +
    + +
    + + +
    + + +
    + +
    +
    +

    {% trans 'Update details' %}

    +

    {% trans 'Keep your personal data up to date.' %}

    +
    +
    +
    +
    +
    +
    Gravatar
    +
    {% trans 'Please register with'%} {{ profile.email }} {% trans 'at ' %}Gravatar.com {% trans 'to change your profile image. Gravatar image updates may not appear immediately.' %}
    +
    +
    +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    + {# mf.selectbox('state', guest.system_states, profile.state, 0, 'Select state') #} + +

    +
    +
    + +
    + +
    + +

    +
    +
    + +
    + +
    +
    +
    +
    +
    +
    +

    {% trans 'New password' %}

    +

    {% trans 'Please enter new password two times in order avoid mistypes' %}

    +
    +
    +
    +
    + +
    + +

    +
    +
    + +
    + +
    + +

    +
    +
    +
    + +
    +
    +
    +
    +

    {% trans 'API key' %}

    +

    {% trans 'API key allows integration with external applications. You will need this key for authentication.' %}

    +
    +
    +
    +
    +

    {% trans 'Warning! Resetting the key will break existing applications using it!' %}

    +
    +
    + +
    + +
    +
    + +
    +
    +
    +
    +
    +

    {% trans 'Currency' %}

    +

    {% trans 'Your profile currency is defined after your first order. Once your currency is set, all your profile accounting will be managed in that currency and can not be changed.' %}

    +
    + {% if profile.currency %} +

    {% trans 'Your profile currency is' %} {{ profile.currency }}

    +

    {% trans 'Create new client profile if you want to manage your money in other currency' %}

    + {% endif %} + +
    +
    +
    + +
    + +
    +
    +
    + +
    + +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Client/html_email/mod_client_password_reset_approve.phtml b/src/bb-modules/Client/html_email/mod_client_password_reset_approve.phtml new file mode 100644 index 000000000..8c6f7ed2a --- /dev/null +++ b/src/bb-modules/Client/html_email/mod_client_password_reset_approve.phtml @@ -0,0 +1,22 @@ +{% block subject %}[{{ guest.system_company.name }}] Password Changed{% endblock %} +{% block content %} +{% filter markdown %} + +Hello {{ c.first_name }} {{ c.last_name }}, + +As you requested, your password for our client area has now been reset. +Your new login details are as follows: + +Login at: {{'login'|link({'email' : c.email }) }} +Email: {{ c.email }} +Password: {{ password }} + +To change your password to something more memorable, after logging in go to +Profile > Change Password. + +Edit your profile at {{ 'client/me'|link }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Client/html_email/mod_client_password_reset_request.phtml b/src/bb-modules/Client/html_email/mod_client_password_reset_request.phtml new file mode 100644 index 000000000..366ef4d73 --- /dev/null +++ b/src/bb-modules/Client/html_email/mod_client_password_reset_request.phtml @@ -0,0 +1,23 @@ +{% block subject %}[{{ guest.system_company.name }}] Confirm Password Reset{% endblock %} +{% block content %} +{% filter markdown %} + +Hello {{ c.first_name }} {{ c.last_name }}, + +Recently a request was submitted to reset your password for the client area. +If you did not request this, please ignore this email. It will expire and will not work in 2 hours time. + +To reset your password, please visit the url below: +{{'client/reset-password-confirm'|link}}/{{ hash }} + + +When you visit the link above, your password will be reset and a new +password will be emailed to you. + +To login, visit {{'login'|link({'email' : c.email }) }} +Edit your profile at {{'client/me'|link}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Client/html_email/mod_client_signup.phtml b/src/bb-modules/Client/html_email/mod_client_signup.phtml new file mode 100644 index 000000000..704aa5c8e --- /dev/null +++ b/src/bb-modules/Client/html_email/mod_client_signup.phtml @@ -0,0 +1,26 @@ +{% block subject %}[{{ guest.system_company.name }}] Welcome {{ c.first_name }}{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +Thank you for signing up with us. Your new account has been setup and you can now login to our client area using the details below. + + +Email: {{c.email}} +Password: {{password}} + +{% if require_email_confirmation %} + +Approve your email by clicking on the link below: + +{{email_confirmation_link}} + +{% endif %} + +To login, visit {{'login'|link({'email' : c.email }) }} +Edit your profile at {{'client/me'|link}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Client/icon.png b/src/bb-modules/Client/icon.png new file mode 100644 index 000000000..219d8fa0c Binary files /dev/null and b/src/bb-modules/Client/icon.png differ diff --git a/src/bb-modules/Client/manifest.json b/src/bb-modules/Client/manifest.json new file mode 100644 index 000000000..0b7bc25d4 --- /dev/null +++ b/src/bb-modules/Client/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "client", + "type": "mod", + "name": "Client", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Cron/Api/Admin.php b/src/bb-modules/Cron/Api/Admin.php new file mode 100644 index 000000000..5cdb12647 --- /dev/null +++ b/src/bb-modules/Cron/Api/Admin.php @@ -0,0 +1,41 @@ +getService()->getCronInfo(); + } + + /** + * Run cron + * + * @return bool + */ + public function run($data) + { + return $this->getService()->runCrons(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cron/Api/Guest.php b/src/bb-modules/Cron/Api/Guest.php new file mode 100644 index 000000000..bb59e5392 --- /dev/null +++ b/src/bb-modules/Cron/Api/Guest.php @@ -0,0 +1,56 @@ +getMod()->getConfig(); + $service = $this->getService(); + if(isset($config['use_web_cron']) && $config['use_web_cron'] && $service->isLate()) { + $service->runCrons(); + return true; + } + return false; + } + + /** + * Get cron settings + * + * @return array + */ + public function settings() + { + return $this->getMod()->getConfig(); + } + + /** + * Tells if cron is late + * + * @return bool + */ + public function is_late() + { + return $this->getService()->isLate(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cron/Service.php b/src/bb-modules/Cron/Service.php new file mode 100644 index 000000000..375b66b76 --- /dev/null +++ b/src/bb-modules/Cron/Service.php @@ -0,0 +1,101 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getCronInfo() + { + $service = $this->di['mod_service']('system'); + + $result = array( + 'cron_url' => BB_URL . 'bb-cron.php', + 'cron_path' => BB_PATH_ROOT . DIRECTORY_SEPARATOR . 'bb-cron.php', + 'last_cron_exec' => $service->getParamValue('last_cron_exec'), + ); + return $result; + } + + /** + * @param null $interval - parameter from CLI, pass to filter crons to run + * @return bool + * @todo finish fixing, time to sleep + */ + public function runCrons($interval = null) + { + $api = $this->di['api_admin']; + $this->di['logger']->info('- Started executing cron'); + + //@core tasks + $this->_exec($api, 'hook_batch_connect'); + $this->_exec($api, 'invoice_batch_pay_with_credits'); + $this->_exec($api, 'invoice_batch_activate_paid'); + $this->_exec($api, 'invoice_batch_send_reminders'); + $this->_exec($api, 'invoice_batch_generate'); + $this->_exec($api, 'invoice_batch_invoke_due_event'); + $this->_exec($api, 'order_batch_suspend_expired'); + $this->_exec($api, 'order_batch_cancel_suspended'); + $this->_exec($api, 'support_batch_ticket_auto_close'); + $this->_exec($api, 'support_batch_public_ticket_auto_close'); + $this->_exec($api, 'client_batch_expire_password_reminders'); + $this->_exec($api, 'cart_batch_expire'); + + $create = (APPLICATION_ENV == 'production'); + $ss = $this->di['mod_service']('system'); + $ss->setParamValue('last_cron_exec', date('c'), $create); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminCronRun')); + + $this->di['logger']->info('- Finished executing cron'); + return true; + } + + protected function _exec($api, $method, $params = null) + { + try { + $api->{$method}($params); + } catch(\Exception $e) { + error_log($e); + } + } + + public function getLastExecutionTime() + { + $service = $this->di['mod_service']('system'); + $last_exec = $service->getParamValue('last_cron_exec'); + return $last_exec; + } + + public function isLate() + { + $t1 = new \DateTime($this->getLastExecutionTime()); + $t2 = new \DateTime('-6min'); + return ($t1 < $t2); + } +} \ No newline at end of file diff --git a/src/bb-modules/Cron/html_admin/mod_cron_settings.phtml b/src/bb-modules/Cron/html_admin/mod_cron_settings.phtml new file mode 100644 index 000000000..88d069fa1 --- /dev/null +++ b/src/bb-modules/Cron/html_admin/mod_cron_settings.phtml @@ -0,0 +1,87 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Cron settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
    +
    +
    {% trans 'Cron settings' %}
    +
    + + {% set params = admin.extension_config_get({"ext":"mod_cron"}) %} +
    +
    +
    + +
    + + +
    +
    +
    + + + +
    +
    + +
    +

    {% trans 'Setup scheduled tasks to be executed once a day' %}

    +

    {% trans 'Scheduled tasks must be enabled immediately after installation. Cron is responsible for sending your clients reminder about payments, domain renewal notices and many more.' %}

    +
    + + {% set cron = admin.cron_info %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    {% trans 'Timezone' %}{{ "now"|date('e') }}
    {% trans 'Time on server' %}{{ "now"|date('Y-m-d H:i:s') }}
    {% trans 'Last time scheduled tasks were executed' %} + {% if cron.last_cron_exec %} + {{ cron.last_cron_exec|date('Y-m-d H:i:s') }} + ({{cron.last_cron_exec|timeago }} ago) + {% else %} + {% trans 'Scheduled tasks were never executed' %} + {% endif %} +
    {% trans 'Unix crontab setup:' %}
    */5 * * * * php {{ cron.cron_path}}
    {% trans 'Execute scheduled tasks from browser' %}
    {{ cron.cron_url}}
    + +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Cron/html_client/mod_cron_check.phtml b/src/bb-modules/Cron/html_client/mod_cron_check.phtml new file mode 100644 index 000000000..f61777b45 --- /dev/null +++ b/src/bb-modules/Cron/html_client/mod_cron_check.phtml @@ -0,0 +1,11 @@ +{% if guest.cron_settings.use_web_cron and guest.cron_is_late %} + +{% endif %} \ No newline at end of file diff --git a/src/bb-modules/Cron/icon.png b/src/bb-modules/Cron/icon.png new file mode 100644 index 000000000..1a215512e Binary files /dev/null and b/src/bb-modules/Cron/icon.png differ diff --git a/src/bb-modules/Cron/manifest.json b/src/bb-modules/Cron/manifest.json new file mode 100644 index 000000000..788586f48 --- /dev/null +++ b/src/bb-modules/Cron/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "cron", + "type": "mod", + "name": "Scheduled tasks", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Currency/Api/Admin.php b/src/bb-modules/Currency/Api/Admin.php new file mode 100644 index 000000000..3faae0114 --- /dev/null +++ b/src/bb-modules/Currency/Api/Admin.php @@ -0,0 +1,195 @@ +getService()->getSearchQuery(); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($query, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $currency = $this->di['db']->getExistingModelById('Currency', $item['id'], 'Currency not found'); + $pager['list'][$key] = $this->getService()->toApiArray($currency); + } + + return $pager; + } + + /** + * Get code title pairs of currencies + * + * @return array + */ + public function get_pairs() + { + $service = $this->getService(); + return $service->getAvailableCurrencies(); + } + + /** + * Return currency details by cde + * + * @param string $code - currency code USD + * @return array + * @throws Exception + */ + public function get($data) + { + if(!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Currency code is missing'); + } + + $service = $this->getService(); + $curency = $service->getByCode($data['code']); + + return $curency; + } + + /** + * Return default system currency + * + * @return array + */ + public function get_default($data) + { + $service = $this->getService(); + $currency = $service->getDefault(); + return $service->toApiArray($currency); + } + + /** + * Add new currency to system + * + * @param string $code - currency ISO 4217 code + * @param string $format - must have {{price}} tag. + * + * @optional string $title - custom currency title + * + * @return string - currency code + * + * @throws Exception + */ + public function create($data) + { + if(!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Currency code is missing'); + } + + if(!isset($data['format']) || empty($data['format'])) { + throw new \Box_Exception('Currency format is missing'); + } + + $service = $this->getService(); + + if($service->getByCode($data['code'])) { + throw new \Box_Exception('Currency already registered'); + } + + if(!array_key_exists($data['code'], $service->getAvailableCurrencies())) { + throw new \Box_Exception('Currency code is not valid'); + } + + $title = isset($data['title']) ? $data['title'] : NULL; + $conversionRate = isset($data['conversion_rate']) ? $data['conversion_rate'] : 1; + + return $service->createCurrency($data['code'], $data['format'], $title, $conversionRate); + } + + /** + * Updates system currency settings + * + * @param string $code - currency ISO 4217 code + * + * @optional string $title - new currency title + * @optional string $format - new currency format + * @optional float $conversion_rate - new currency conversion rate + * + * @return bool + * + * @throws Exception + */ + public function update($data) + { + if (!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Currency code is missing'); + } + + $format = isset($data['format']) ? $data['format'] : null; + $title = isset($data['title']) ? $data['title'] : null; + $priceFormat = isset($data['price_format']) ? $data['price_format'] : null; + $conversionRate = isset($data['conversion_rate']) ? $data['conversion_rate'] : null; + + return $this->getService()->updateCurrency($data['code'], $format, $title, $priceFormat, $conversionRate); + } + + /** + * Automatically update all currency rates by Google exchange rates + * + * @return bool + */ + public function update_rates($data) + { + return $this->service->updateCurrencyRates($data); + } + + /** + * Remove currency. Default currency can not be removed. + * + * @param string $code - currency ISO 4217 code + * + * @return bool + * @throws Exception + */ + public function delete($data) + { + if (!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Currency code is missing'); + } + + return $this->getService()->deleteCurrencyByCode($data['code']); + } + + /** + * Set default currency. If you have active orders or invoices + * not recalculation on profits and refunds are made. + * + * @param string $code - currency ISO 4217 code + * + * @return bool + * @throws Exception + */ + public function set_default($data) + { + if (!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Currency code is missing'); + } + + $service = $this->getService(); + $model = $service->getByCode($data['code']); + if (!$model instanceof \Model_currency) { + throw new \Box_Exception('Currency not found'); + } + + return $service->setAsDefault($model); + } +} diff --git a/src/bb-modules/Currency/Api/Guest.php b/src/bb-modules/Currency/Api/Guest.php new file mode 100644 index 000000000..1e81cbe69 --- /dev/null +++ b/src/bb-modules/Currency/Api/Guest.php @@ -0,0 +1,104 @@ +getService(); + return $service->getPairs(); + } + + /** + * Get currency by code + * + * @param string $code - currency code, ie: USD + * @return array + */ + public function get($data) + { + $service = $this->getService(); + if(isset($data['code']) && !empty($data['code'])) { + $model = $service->getByCode($data['code']); + } else { + $model = $service->getDefault(); + } + + if(!$model instanceof \Model_Currency) { + throw new \Box_Exception('Currency not found'); + } + return $service->toApiArray($model); + } + + /** + * Format price by currency settings + * + * @optional bool $convert - covert to default currency rate. Default - true; + * @optional bool $without_currency - Show only number. No symbols are attached Default - false; + * @optional float $price - Price to be formated. Default 0 + * @optional string $code - currency code, ie: USD. Default - default currency + * + * @return string - formated string + */ + public function format($data) + { + $c = $this->get($data); + $price = (isset($data['price'])) ? $data['price'] : 0; + $convert = (isset($data['convert'])) ? (bool)$data['convert'] : true; + $without_currency = (isset($data['without_currency'])) ? (bool)$data['without_currency'] : false; + + if($convert) { + $p = $price * $c['conversion_rate']; + } else { + $p = $price; + } + switch ($c['price_format']) { + case 2: + $p = number_format($p, 2, '.', ','); + break; + + case 3: + $p = number_format($p, 2, ',', '.'); + break; + + case 4: + $p = number_format($p, 0, '', ','); + break; + + case 5: + $p = number_format($p, 0, '', ''); + break; + + case 1: + default: + $p = number_format($p, 2, '.', ''); + break; + } + + if($without_currency) { + return $p; + } else { + return str_replace('{{price}}', $p, $c['format']); + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Currency/Controller/Admin.php b/src/bb-modules/Currency/Controller/Admin.php new file mode 100644 index 000000000..3b0eb4471 --- /dev/null +++ b/src/bb-modules/Currency/Controller/Admin.php @@ -0,0 +1,48 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/currency/manage/:code', 'get_manage', array('code'=>'[a-zA-Z]+'), get_class($this)); + } + + public function get_manage(\Box_App $app, $code) + { + $api = $app->getApiAdmin(); + $guest_api = $app->getApiGuest(); + $currency = $guest_api->currency_get(array('code'=>$code)); + return $app->render('mod_currency_manage', array('currency'=>$currency)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Currency/Service.php b/src/bb-modules/Currency/Service.php new file mode 100644 index 000000000..3a75645fa --- /dev/null +++ b/src/bb-modules/Currency/Service.php @@ -0,0 +1,471 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getSearchQuery() + { + $sql = "SELECT * FROM currency WHERE 1"; + $filter = array(); + + return array($sql, $filter); + } + + /** + * Convert foreign price back to default currency + */ + public function toBaseCurrency($foreign_code, $amount) + { + $default = $this->getDefault(); + + if ($default->code == $foreign_code) { + return $amount; + } + + $rate = $this->getBaseCurrencyRate($foreign_code); + + return $amount * $rate; + } + + public function getBaseCurrencyRate($foreign_code) + { + $f_rate = $this->getRateByCode($foreign_code); + if ($f_rate == 0) { + throw new \Box_Exception('Currency conversion rate can not be zero'); + } + + return 1 / $f_rate; + } + + public function getCurrencyByClientId($client_id) + { + $sql = "SELECT currency FROM client WHERE id = :client_id"; + $values = array(':client_id' => $client_id); + + $db = $this->di['db']; + $currency = $db->getCell($sql, $values); + + if (NULL === $currency) { + return $this->getDefault(); + } + + $currency = $this->getByCode($currency); + if ($currency instanceof \Model_Currency) { + return $currency; + } + + return $this->getDefault(); + } + + public function getByCode($code) + { + return $this->di['db']->findOne('Currency', 'code = :code', array(':code' => $code)); + } + + public function getRateByCode($code) + { + $sql = "SELECT conversion_rate FROM currency WHERE code = :code"; + $values = array(':code' => $code); + + $db = $this->di['db']; + $rate = $db->getCell($sql, $values); + + return is_numeric($rate) ? $rate : 1; + } + + public function getDefault() + { + $db = $this->di['db']; + $default = $db->findOne('Currency', 'is_default = 1'); + + if (count($default) == 0) { + $default = $db->load('Currency', '1'); + } + + return $default; + } + + public function setAsDefault(\Model_Currency $currency) + { + + $db = $this->di['db']; + + if ($currency->is_default) { + return true; + } + + if ($currency->code === null || empty($currency->code)) { + throw new \Box_Exception('Currency code not provided'); + } + + $sql1 = "UPDATE currency SET is_default = 0 WHERE 1"; + $sql2 = "UPDATE currency SET is_default = 1 WHERE code = :code"; + $values2 = array(':code' => $currency->code); + + $db->exec($sql1); + $db->exec($sql2, $values2); + + $this->di['logger']->info('Set currency %s as default', $currency->code); + + return true; + } + + public function getPairs() + { + $sql = "SELECT code, title FROM currency"; + $db = $this->di['db']; + + $pairs = $db->getAssoc($sql); + + return $pairs; + } + + public function getAvailableCurrencies() + { + $options = array( + 'AED' => 'United Arab Emirates dirham', + 'AFN' => 'Afghan afghani', + 'ALL' => 'Albanian lek', + 'AMD' => 'Armenian dram', + 'ANG' => 'Netherlands Antillean guilder', + 'AOA' => 'Angolan kwanza', + 'ARS' => 'Argentine peso', + 'AUD' => 'Australian dollar', + 'AWG' => 'Aruban florin', + 'AZN' => 'Azerbaijani manat', + 'BAM' => 'Bosnia and Herzegovina convertible mark', + 'BBD' => 'Barbados dollar', + 'BDT' => 'Bangladeshi taka', + 'BGN' => 'Bulgarian lev', + 'BHD' => 'Bahraini dinar', + 'BIF' => 'Burundian franc', + 'BMD' => 'Bermudian dollar', + 'BND' => 'Brunei dollar', + 'BOB' => 'Boliviano', + 'BRL' => 'Brazilian real', + 'BSD' => 'Bahamian dollar', + 'BTN' => 'Bhutanese ngultrum', + 'BWP' => 'Botswana pula', + 'BYR' => 'Belarusian ruble', + 'BZD' => 'Belize dollar', + 'CAD' => 'Canadian dollar', + 'CDF' => 'Congolese franc', + 'CHF' => 'Swiss franc', + 'CLP' => 'Chilean peso', + 'CNY' => 'Chinese yuan', + 'COP' => 'Colombian peso', + 'COU' => 'Unidad de Valor Real', + 'CRC' => 'Costa Rican colon', + 'CUC' => 'Cuban convertible peso', + 'CUP' => 'Cuban peso', + 'CVE' => 'Cape Verde escudo', + 'CZK' => 'Czech koruna', + 'DJF' => 'Djiboutian franc', + 'DKK' => 'Danish krone', + 'DOP' => 'Dominican peso', + 'DZD' => 'Algerian dinar', + 'EGP' => 'Egyptian pound', + 'ERN' => 'Eritrean nakfa', + 'ETB' => 'Ethiopian birr', + 'EUR' => 'Euro', + 'FJD' => 'Fiji dollar', + 'FKP' => 'Falkland Islands pound', + 'GBP' => 'Pound sterling', + 'GEL' => 'Georgian lari', + 'GHS' => 'Ghanaian cedi', + 'GIP' => 'Gibraltar pound', + 'GMD' => 'Gambian dalasi', + 'GNF' => 'Guinean franc', + 'GTQ' => 'Guatemalan quetzal', + 'GYD' => 'Guyanese dollar', + 'HKD' => 'Hong Kong dollar', + 'HNL' => 'Honduran lempira', + 'HRK' => 'Croatian kuna', + 'HTG' => 'Haitian gourde', + 'HUF' => 'Hungarian forint', + 'IDR' => 'Indonesian rupiah', + 'ILS' => 'Israeli new sheqel', + 'INR' => 'Indian rupee', + 'IQD' => 'Iraqi dinar', + 'IRR' => 'Iranian rial', + 'ISK' => 'Icelandic króna', + 'JMD' => 'Jamaican dollar', + 'JOD' => 'Jordanian dinar', + 'JPY' => 'Japanese yen', + 'KES' => 'Kenyan shilling', + 'KGS' => 'Kyrgyzstani som', + 'KHR' => 'Cambodian riel', + 'KMF' => 'Comoro franc', + 'KPW' => 'North Korean won', + 'KRW' => 'South Korean won', + 'KWD' => 'Kuwaiti dinar', + 'KYD' => 'Cayman Islands dollar', + 'KZT' => 'Kazakhstani tenge', + 'LAK' => 'Lao kip', + 'LBP' => 'Lebanese pound', + 'LKR' => 'Sri Lanka rupee', + 'LRD' => 'Liberian dollar', + 'LSL' => 'Lesotho loti', + 'LTL' => 'Lithuanian litas', + 'LYD' => 'Libyan dinar', + 'MAD' => 'Moroccan dirham', + 'MDL' => 'Moldovan leu', + 'MGA' => 'Malagasy ariary', + 'MKD' => 'Macedonian denar', + 'MMK' => 'Myanma kyat', + 'MNT' => 'Mongolian tugrik', + 'MOP' => 'Macanese pataca', + 'MRO' => 'Mauritanian ouguiya', + 'MUR' => 'Mauritian rupee', + 'MVR' => 'Maldivian rufiyaa', + 'MWK' => 'Malawian kwacha', + 'MXN' => 'Mexican peso', + 'MYR' => 'Malaysian ringgit', + 'MZN' => 'Mozambican metical', + 'NAD' => 'Namibian dollar', + 'NGN' => 'Nigerian naira', + 'NIO' => 'Cordoba oro', + 'NOK' => 'Norwegian krone', + 'NPR' => 'Nepalese rupee', + 'NZD' => 'New Zealand dollar', + 'OMR' => 'Omani rial', + 'PAB' => 'Panamanian balboa', + 'PEN' => 'Peruvian nuevo sol', + 'PGK' => 'Papua New Guinean kina', + 'PHP' => 'Philippine peso', + 'PKR' => 'Pakistani rupee', + 'PLN' => 'Polish złoty', + 'PYG' => 'Paraguayan guaraní', + 'QAR' => 'Qatari rial', + 'RON' => 'Romanian new leu', + 'RSD' => 'Serbian dinar', + 'RUB' => 'Russian rouble', + 'RWF' => 'Rwandan franc', + 'SAR' => 'Saudi riyal', + 'SBD' => 'Solomon Islands dollar', + 'SCR' => 'Seychelles rupee', + 'SDG' => 'Sudanese pound', + 'SEK' => 'Swedish krona/kronor', + 'SGD' => 'Singapore dollar', + 'SHP' => 'Saint Helena pound', + 'SLL' => 'Sierra Leonean leone', + 'SOS' => 'Somali shilling', + 'SRD' => 'Surinamese dollar', + 'STD' => 'São Tomé and Príncipe dobra', + 'SYP' => 'Syrian pound', + 'SZL' => 'Lilangeni', + 'THB' => 'Thai baht', + 'TJS' => 'Tajikistani somoni', + 'TMT' => 'Turkmenistani manat', + 'TND' => 'Tunisian dinar', + 'TOP' => 'Tongan paʻanga', + 'TRY' => 'Turkish lira', + 'TTD' => 'Trinidad and Tobago dollar', + 'TWD' => 'New Taiwan dollar', + 'TZS' => 'Tanzanian shilling', + 'UAH' => 'Ukrainian hryvnia', + 'UGX' => 'Ugandan shilling', + 'USD' => 'United States dollar', + 'UYU' => 'Uruguayan peso', + 'UZS' => 'Uzbekistan som', + 'VEF' => 'Venezuelan bolívar fuerte', + 'VND' => 'Vietnamese đồng', + 'VUV' => 'Vanuatu vatu', + 'WST' => 'Samoan tala', + 'XOF' => 'West African CFA franc', + 'YER' => 'Yemeni rial', + 'ZAR' => 'South African rand', + 'ZMK' => 'Zambian kwacha', + 'ZWL' => 'Zimbabwe dollar', + ); + + foreach ($options as $key => &$name) { + $name = $key . ' - ' . $name; + } + + return $options; + } + + public function rm(\Model_Currency $model) + { + if ($model->is_default) { + throw new \Box_Exception('Can not remove default currency'); + } + + if ($model->code === null || empty($model->code)) { + throw new \Box_Exception('Currency code not found'); + } + + $sql = "DELETE FROM currency WHERE code = :code"; + $values = array(':code' => $model->code); + + $db = $this->di['db']; + $db->exec($sql, $values); + } + + public function toApiArray(\Model_Currency $model) + { + return array( + 'code' => $model->code, + 'title' => $model->title, + 'conversion_rate' => (float)$model->conversion_rate, + 'format' => $model->format, + 'price_format' => $model->price_format, + 'default' => $model->is_default, + ); + } + + public function createCurrency($code, $format, $title = null, $conversionRate = 1) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_Currency', 2); + + $this->validateCurrencyFormat($format); + + $model = $this->di['db']->dispense('Currency'); + $model->code = $code; + $model->title = $title; + $model->format = $format; + $model->conversion_rate = $conversionRate; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Added new currency %s', $model->code); + + return $model->code; + } + + public function validateCurrencyFormat($format) + { + if (strpos($format, '{{price}}') === false) { + throw new \Exception('Currency format must include {{price}} tag', 3569); + } + } + + public function updateCurrency($code, $format = null, $title = null, $priceFormat = null, $conversionRate = null) + { + $db = $this->di['db']; + + $model = $this->getByCode($code); + if (!$model instanceof \Model_currency) { + throw new \Box_Exception('Currency not found'); + } + + if (isset($title)) { + $model->title = $title; + } + + if (isset($format)) { + $this->validateCurrencyFormat($format); + $model->format = $format; + } + + if (isset($priceFormat)) { + $model->price_format = $priceFormat; + } + + if (isset($conversionRate)) { + if (!is_numeric($conversionRate) || $conversionRate <= 0) { + throw new \Box_Exception('Currency rate is not valid', null, 151); + } + $model->conversion_rate = $conversionRate; + } + + $model->updated_at = date('c'); + $db->store($model); + + $this->di['logger']->info('Updated currency %s', $model->code); + + return true; + } + + public function updateCurrencyRates($data) + { + $dc = $this->getDefault(); + + $db = $this->di['db']; + + $all = $db->find('Currency'); // should return Array of beans + + foreach ($all as $currency) { + if ($currency->is_default) { + $rate = 1; + } else { + $rate = $this->_getRate($dc->code, $currency->code); + } + + if (!is_numeric($rate)) { + continue; + } + + $currency->conversion_rate = $rate; + $db->store($currency); + } + + $this->di['logger']->info('Updated currency rates'); + + return true; + } + + protected function _getRate($from, $to) + { + $from_Currency = urlencode($from); + $to_Currency = urlencode($to); + $url = "http://query.yahooapis.com/v1/public/yql?q=select%20rate%2Cname%20from%20csv%20where%20url%3D'http%3A%2F%2Fdownload.finance.yahoo.com%2Fd%2Fquotes%3Fs%3D".$from_Currency.$to_Currency."%253DX%26f%3Dl1n'%20and%20columns%3D'rate%2Cname'&format=json"; + $ch = curl_init(); + curl_setopt ($ch, CURLOPT_URL, $url); + curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1); + curl_setopt($ch, CURLOPT_USERAGENT , "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)"); + curl_setopt ($ch, CURLOPT_CONNECTTIMEOUT, 10); + $json = curl_exec($ch); + $array = json_decode($json, true); + return (float)$array['query']['results']['row']['rate']; + } + + public function deleteCurrencyByCode($code) + { + $model = $this->getByCode($code); + + if (!$model instanceof \Model_currency) { + throw new \Box_Exception('Currency not found'); + } + $code = $model->code; + + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminDeleteCurrency', 'params' => array('code' => $code))); + + $this->rm($model); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminDeleteCurrency', 'params' => array('code' => $code))); + + $this->di['logger']->info('Removed currency %s', $code); + + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/Currency/html_admin/mod_currency_manage.phtml b/src/bb-modules/Currency/html_admin/mod_currency_manage.phtml new file mode 100644 index 000000000..e8a0f8400 --- /dev/null +++ b/src/bb-modules/Currency/html_admin/mod_currency_manage.phtml @@ -0,0 +1,63 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'system' %} +{% block meta_title %}{% trans 'Currency management' %}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
    + +
    +
    {% trans 'Edit currency information' %} {{currency.code}}
    +
    + +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + + + + + +
    +
    +
    + + +
    +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Currency/html_admin/mod_currency_settings.phtml b/src/bb-modules/Currency/html_admin/mod_currency_settings.phtml new file mode 100644 index 000000000..1d9465fbc --- /dev/null +++ b/src/bb-modules/Currency/html_admin/mod_currency_settings.phtml @@ -0,0 +1,158 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'system' %} +{% block meta_title %}{% trans 'Currency settings' %}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + +
    + + + +
    +
    +
    + +
    +

    {% trans 'Manage currencies' %}

    +

    {% trans 'Default currency is the one you manage all your prices in admin area. If your client in client area chooses other than default currency, prices will be recalculated according to conversion rate. You can have only one default currency. You can not add same currency once again. Changing default currency is not recommended when active orders are available. Nothing is recalculated on default currency change. Your income is calculated in default currency. Changing default currency after you have paid invoices will distort income statistics. Currency rates are taken from Yahoo.' %}

    +
    + + + + + + + + + + + + + + {% for currency in admin.currency_get_list.list %} + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
    {% trans 'ISO code' %}{% trans 'Title' %}{% trans 'Conversion rate' %}{% trans 'Example price' %} 
    {% if currency.default %}{{ currency.code }}{% else %}{{ currency.code }}{% endif %}{{ currency.title }}{{ currency.conversion_rate }}{{ mf.currency_format(1) }} = {{ mf.currency(1, currency.code) }} + + + {% if not currency.default %} + + {% endif %} +
    + {% trans 'The list is empty' %} +
    + +
    +
    + +
    + +
    +
    +
    + +
    + {{ mf.selectbox('code', admin.currency_get_pairs, 'USD', 1) }} +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    + + +
    + +
    + +
    +
    +
    +
    +
      +
    • +
    • {{ guest.currency_get.code }} =
    • +
    • +
    • +
    • +
    • {{ mf.selectbox('to', guest.currency_get_pairs) }}
    • +
    +
    +
    +
    +
    +
    + +
    +
    +
    + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-modules/Currency/icon.png b/src/bb-modules/Currency/icon.png new file mode 100644 index 000000000..42cc70747 Binary files /dev/null and b/src/bb-modules/Currency/icon.png differ diff --git a/src/bb-modules/Currency/manifest.json b/src/bb-modules/Currency/manifest.json new file mode 100644 index 000000000..a31316c37 --- /dev/null +++ b/src/bb-modules/Currency/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "currency", + "type": "mod", + "name": "Currency", + "icon_url": "icon.png", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Email/Api/Admin.php b/src/bb-modules/Email/Api/Admin.php new file mode 100644 index 000000000..c414598d0 --- /dev/null +++ b/src/bb-modules/Email/Api/Admin.php @@ -0,0 +1,409 @@ +di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach ($pager['list'] as $key => $item) { + $pager['list'][$key] = array( + 'id' => isset($item['id']) ? $item['id'] : '', + 'client_id' => isset($item['client_id']) ? $item['client_id'] : '', + 'sender' => isset($item['sender']) ? $item['sender'] : '', + 'recipients' => isset($item['recipients']) ? $item['recipients'] : '', + 'subject' => isset($item['subject']) ? $item['subject'] : '', + 'content_html' => isset($item['content_html']) ? $item['content_html'] : '', + 'content_text' => isset($item['content_text']) ? $item['content_text'] : '', + 'created_at' => isset($item['created_at']) ? $item['created_at'] : '', + 'updated_at' => isset($item['updated_at']) ? $item['updated_at'] : '', + ); + } + + return $pager; + } + + /** + * Get sent email details + * + * @param int $id - email ID + * @return array + * @throws Exception + * @throws LogicException + */ + public function email_get($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $service = $this->getService(); + $model = $service->getEmailById($data['id']); + return $service->toApiArray($model); + } + + /** + * Email send + * + * @param string $to - email to + * @param string $to_name - to name + * @param string $from_name - from name + * @param string $from - from email + * @param string $subject - from email + * @param string $content - from email + * + * @optional int $client_id - log this message to client history + * + * @return bool + * @throws Exception + */ + public function send($data) + { + if (!isset($data['to'])) { + throw new \Box_Exception('Receiver Email is required'); + } + + if (!isset($data['to_name'])) { + throw new \Box_Exception('Receiver Name is required'); + } + + if (!isset($data['from'])) { + throw new \Box_Exception('Sender Name is required'); + } + + if (!isset($data['from_name'])) { + throw new \Box_Exception('Sender email is required'); + } + + if (!isset($data['subject'])) { + throw new \Box_Exception('Email subject is required'); + } + + if (!isset($data['content'])) { + throw new \Box_Exception('Email content is required'); + } + + $client_id = isset($data['client_id']) ? $data['client_id'] : null; + + $emailService = $this->getService(); + + return $emailService->sendMail($data['to'], $data['from'], $data['subject'], $data['content'], $data['to_name'], $data['from_name'], $client_id); + } + + /** + * Resend email + * + * @param int $id - email ID + * @return bool + * @throws Exception + * @throws LogicException + */ + public function email_resend($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $model = $this->di['db']->findOne('ActivityClientEmail', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + return $this->getService()->resend($model); + } + + /** + * Delete sent email from logs + * + * @param int $id - email ID + * @return bool + * @throws Exception + * @throws LogicException + */ + public function email_delete($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $model = $this->di['db']->findOne('ActivityClientEmail', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + $id = $model->id; + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted email #%s', $id); + + return true; + } + + /** + * Return list of email templates + * + * @return array + */ + public function template_get_list($data) + { + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->templateGetSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach ($pager['list'] as $key => $item) { + $pager['list'][$key] = array( + 'id' => isset($item['id']) ? $item['id'] : '', + 'action_code' => isset($item['action_code']) ? $item['action_code'] : '', + 'category' => isset($item['category']) ? $item['category'] : '', + 'enabled' => isset($item['enabled']) ? $item['enabled'] : '', + 'subject' => isset($item['subject']) ? $item['subject'] : '', + 'description' => isset($item['description']) ? $item['description'] : '', + ); + + } + + return $pager; + } + + /** + * Get email template full details + * + * @param int $id - template id + * @return array + * @throws Exception + * @throws LogicException + */ + public function template_get($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email template ID is required'); + } + + $model = $this->di['db']->getExistingModelById('EmailTemplate', $data['id'], 'Email template not found'); + + return $this->getService()->templateToApiArray($model, true); + } + + /** + * Delete email template + * + * @param int $id - email template ID + * @return bool + * @throws Exception + * @throws LogicException + */ + public function template_delete($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $model = $this->di['db']->findOne('EmailTemplate', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_EmailTemplate) { + throw new \Box_Exception('Email template not found'); + } + + $id = $model->id; + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted email template #%s', $id); + + return true; + } + + /** + * Create new email template. Creating new email template can be + * combined with custom event hook. + * + * @param string $action_code - template action code + * @param string $subject - Email subject + * @param string $content - Email body + * + * @return int - newly created template id + * @throws Exception + */ + public function template_create($data) + { + if (!isset($data['action_code'])) { + throw new \Box_Exception('Email template code is required'); + } + + if (!isset($data['subject'])) { + throw new \Box_Exception('Email template subject is required'); + } + + if (!isset($data['content'])) { + throw new \Box_Exception('Email template content is required'); + } + + $enabled = isset($data['enabled']) ? $data['enabled'] : 0; + $category = isset($data['category']) ? $data['category'] : NULL; + + return $this->getService()->templateCreate($data['action_code'], $data['subject'], $data['content'], $enabled, $category); + } + + /** + * Update email template + * + * @param int $id - template id + * @return boolean + * @throws Exception + * @throws LogicException + */ + public function template_update($data) + { + if (!isset($data['id']) || empty($data['id'])) { + throw new \Box_Exception('Email template ID is required'); + } + + $enabled = isset($data['enabled']) ? $data['id'] : null; + $category = isset($data['category']) ? $data['category'] : null; + $subject = isset($data['subject']) ? $data['subject'] : null; + $content = isset($data['content']) ? $data['content'] : null; + + $model = $this->di['db']->getExistingModelById('EmailTemplate', $data['id'], 'Email template not found'); + + return $this->getService()->updateTemplate($model, $enabled, $category, $subject, $content); + } + + + /** + * Reset email template to default + * + * @param string $code - template code + * @return boolean + */ + public function template_reset($data) + { + if (!isset($data['code']) || empty($data['code'])) { + throw new \Box_Exception('Email template code was not passed'); + } + return $this->getService()->resetTemplateByCode($data['code']); + } + + /** + * Generates email template preview + * + * @param int $id - template id + * @optional string $_tpl - string to be rendered. Default is email template. + * @return boolean + */ + public function template_render($data) + { + $t = $this->template_get($data); + $vars = $t['vars']; + $vars['_tpl'] = isset($data['_tpl']) ? $data['_tpl'] : $t['content']; + + return $this->di['twig']->render($vars['_tpl'], $vars); + } + + /** + * Generate email templates according to enabled extensions + * + * @return boolean + */ + public function batch_template_generate() + { + return $this->getService()->templateBatchGenerate(); + } + + /** + * Disable all email templates at once. + * + * @return boolean + */ + public function batch_template_disable($data) + { + return $this->getService()->templateBatchDisable(); + } + + /** + * Enable all email templates at once + * + * @return boolean + */ + public function batch_template_enable($data) + { + return $this->getService()->templateBatchEnable(); + } + + /** + * Sends test email to admins + * + * @param type $data + * @return bool + */ + public function send_test($data) + { + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_email_test'; + + return $this->getService()->sendTemplate($email); + } + + public function batch_sendmail() + { + return $this->getService()->batchSend(); + } + + + /** + * Send email template to email, client or staff members. If template with code does not exist, + * it will be created. Default email template file must exist at mod_example/html_email/mod_example_code.phtml file + * + * @param string $code - Template code to send. Must be mod_%s_%s structure + * + * @optional string $to_staff - True to send to all active staff members. Default false + * @optional string $to_client - Set client ID to send email to client. Default null + * @optional string $to - receivers email + * + * @optional string $from - from email. Default - company email + * @optional string $from_name - from name. Default - company name + * + * @optional string $default_subject - Default email subject if template does not exist + * @optional string $default_template - Default email content if template does not exist + * @optional string $default_description - Default template description if template does not exist. + * + * @optional mixed $custom - All parameters passed to this method are also available in email template: {{ custom }} + * + * @return bool + */ + public function template_send($data) + { + if (!isset($data['code'])) { + throw new \Box_Exception('Template code not passed'); + } + if (!isset($data['to']) && !isset($data['to_staff']) && !isset($data['to_client'])) { + throw new \Box_Exception('Receiver is not defined. Define to or to_client or to_staff parameter'); + } + + return $this->getService()->sendTemplate($data); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Email/Api/Client.php b/src/bb-modules/Email/Api/Client.php new file mode 100644 index 000000000..a19f8181f --- /dev/null +++ b/src/bb-modules/Email/Api/Client.php @@ -0,0 +1,113 @@ +getIdentity(); + $data['client_id'] = $client->id; + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + + foreach ($pager['list'] as $key => $item) { + $pager['list'][$key] = array( + 'id' => isset($item['id']) ? $item['id'] : '', + 'client_id' => isset($item['client_id']) ? $item['client_id'] : '', + 'sender' => isset($item['sender']) ? $item['sender'] : '', + 'recipients' => isset($item['recipients']) ? $item['recipients'] : '', + 'subject' => isset($item['subject']) ? $item['subject'] : '', + 'content_html' => isset($item['content_html']) ? $item['content_html'] : '', + 'content_text' => isset($item['content_text']) ? $item['content_text'] : '', + 'created_at' => isset($item['created_at']) ? $item['created_at'] : '', + 'updated_at' => isset($item['updated_at']) ? $item['updated_at'] : '', + ); + } + + return $pager; + } + + /** + * Get email details + * @param int $id - Email id + * @return array + * @throws Exception + * @throws LogicException + */ + public function get($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + $model = $this->getService()->findOneForClientById($this->getIdentity(), $data['id']); + + if (!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + return $this->getService()->toApiArray($model); + } + + /** + * Resend email to client once again + * + * @param int $id - Email id + * @return type + * @throws Exception + * @throws LogicException + */ + public function resend($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $model = $this->getService()->findOneForClientById($this->getIdentity(), $data['id']); + if(!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + return $this->getService()->resend($model); + } + + /** + * Remove email from system. + * @param int $id - Email id + * @return type + * @throws Exception + * @throws LogicException + */ + public function delete($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Email ID is required'); + } + + $model = $this->getService()->findOneForClientById($this->getIdentity(), $data['id']); + if (!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + return $this->getService()->rm($model); + } +} \ No newline at end of file diff --git a/src/bb-modules/Email/Controller/Admin.php b/src/bb-modules/Email/Controller/Admin.php new file mode 100644 index 000000000..fd62fae85 --- /dev/null +++ b/src/bb-modules/Email/Controller/Admin.php @@ -0,0 +1,79 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages' => array( + array( + 'location' => 'activity', + 'index' => 200, + 'label' => 'Email history', + 'uri' => $this->di['url']->adminLink('email/history'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/email/history/', 'get_history', array(), get_class($this)); + $app->get('/email/history', 'get_history', array(), get_class($this)); + $app->get('/email/templates', 'get_index', array(), get_class($this)); + $app->get('/email/template/:id', 'get_template', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/email/:id', 'get_email', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_history(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_email_history'); + } + + public function get_template(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $template = $api->email_template_get(array('id'=>$id)); + return $app->render('mod_email_template', array('template'=>$template)); + } + + public function get_email(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $template = $api->email_email_get(array('id'=>$id)); + return $app->render('mod_email_details', array('email'=>$template)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Email/Controller/Client.php b/src/bb-modules/Email/Controller/Client.php new file mode 100644 index 000000000..2d72761df --- /dev/null +++ b/src/bb-modules/Email/Controller/Client.php @@ -0,0 +1,55 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/email', 'get_emails', array(), get_class($this)); + $app->get('/email/:id', 'get_email', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_emails(\Box_App $app) + { + $api = $app->getApiClient(); + return $app->render('mod_email_index'); + } + public function get_email(\Box_App $app, $id) + { + $api = $app->getApiClient(); + $data = array('id'=>$id); + $email = $api->email_get($data); + return $app->render('mod_email_email', array('email'=>$email)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Email/Service.php b/src/bb-modules/Email/Service.php new file mode 100644 index 000000000..8b38262a3 --- /dev/null +++ b/src/bb-modules/Email/Service.php @@ -0,0 +1,622 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($data) + { + $query = 'SELECT * FROM activity_client_email'; + + $search = isset($data['search']) ? $data['search'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + + $where = array(); + $bindings = array(); + + if($search) { + $search = "%$search%"; + $where[] = '(m.sender LIKE :sender OR m.recipients LIKE :recipient OR m.subject LIKE :subject OR m.content_text LIKE :context_text)'; + $bindings[':sender'] = $search; + $bindings[':recipient'] = $search; + $bindings[':subject'] = $search; + $bindings[':content_text'] = $search; + } + + if(NULL !== $client_id) { + $where[] = "client_id = :client_id"; + $bindings[':client_id'] = $client_id; + } + + if (!empty($where)){ + $query = $query . ' WHERE '.implode(' AND ', $where); + } + $query .= ' ORDER BY id DESC'; + + return array($query, $bindings); + } + + public function findOneForClientById(\Model_Client $client, $id) + { + $bindings = array( + ':id' => $id, + ':client_id' => $client->id + ); + + $db = $this->di['db']; + return $db->findOne('ActivityClientEmail', 'id = :id AND client_id = :client_id ORDER BY id DESC', $bindings); + } + + public function rmByClient(\Model_Client $client) + { + $models = $this->di['db']->find('ActivityClientEmail', 'client_id = ?', array($client->id)); + foreach($models as $model) + { + $this->di['db']->trash($model); + } + return true; + } + + public function rm(\Model_ActivityClientEmail $email) + { + $db = $this->di['db']; + $db->trash($email); + return true; + } + + public function toApiArray(\Model_ActivityClientEmail $model, $deep = true) + { + $data = array( + 'id' => $model->id, + 'client_id' => $model->client_id, + 'sender' => $model->sender, + 'recipients' => $model->recipients, + 'subject' => $model->subject, + 'content_html' => $model->content_html, + 'content_text' => $model->content_text, + 'created_at' => $model->created_at, + 'updated_at' => $model->updated_at, + ); + return $data; + } + + public function setVars($t, $vars) + { + $t->vars = $this->di['crypt']->encrypt(json_encode($vars), 'v8JoWZph12DYSY4aq8zpvWdzC'); + $this->di['db']->store($t); + + return true; + } + + public function getVars($t) + { + $json = $this->di['crypt']->decrypt($t->vars, 'v8JoWZph12DYSY4aq8zpvWdzC'); + + return $this->di['tools']->decodeJ($json); + } + + public function sendTemplate($data) + { + if (!isset($data['code'])) { + throw new \Box_Exception('Template code not passed'); + } + + if (!isset($data['to']) && !isset($data['to_staff']) && !isset($data['to_client'])) { + throw new \Box_Exception('Receiver is not defined. Define to or to_client or to_staff parameter'); + } + $vars = $data; + unset($vars['to'], $vars['to_client'], $vars['to_staff'], $vars['to_name'], $vars['from'], $vars['from_name']); + unset($vars['default_description'], $vars['default_subject'], $vars['default_template'], $vars['code']); + + //add aditional variables to template + if (isset($data['to_staff']) && $data['to_staff']) { + $staffService = $this->di['mod_service']('staff'); + $staff = $staffService->getList(array('status' => 'active', 'no_cron' => true)); + $vars['staff'] = $staff['list'][0]; + } + + //add aditional variables to template + if (isset($data['to_client']) && $data['to_client'] > 0) { + $clientService = $this->di['mod_service']('client'); + $customer = $clientService->get(array('id' => $data['to_client'])); + $customer = $clientService->toApiArray($customer); + $vars['c'] = $customer; + } + + $db = $this->di['db']; + + $t = $db->findOne('EmailTemplate', 'action_code = :action', array(':action' => $data['code'])); + if (!is_object($t)) { + //if(BB_DEBUG) error_log('Email template '.$data['code'] . ' not found. Creating new template'); + + list($s, $c, $desc, $enabled, $mod) = $this->_getDefaults($data); + $t = $db->dispense('EmailTemplate'); + $t->enabled = $enabled; + $t->action_code = $data['code']; + $t->category = $mod; + $t->subject = $s; + $t->content = $c; + $t->description = $desc; + $db->store($t); + } + + //update template vars with latest variables + $this->setVars($t, $vars); + + // do not send inactive template + if (!$t->enabled) { + return false; + } + $systemService = $this->di['mod_service']('system'); + + list($subject, $content) = $this->_parse($t, $vars); + $from = isset($data['from']) ? $data['from'] : $systemService->getParamValue('company_email'); + $from_name = isset($data['from_name']) ? $data['from_name'] : $systemService->getParamValue('company_name'); + $sent = false; + + if (!$from){ + throw new \Box_Exception('From email address can not be empty'); + } + + if (isset($staff)) { + foreach ($staff['list'] as $staff) { + $to = $staff['email']; + $to_name = $staff['name']; + $sent = $this->sendMail($to, $from, $subject, $content, $to_name, $from_name, null, $staff['id']); + } + } else if (isset($customer)) { + $to = $customer['email']; + $to_name = $customer['first_name'] . ' ' . $customer['last_name']; + $sent = $this->sendMail($to, $from, $subject, $content, $to_name, $from_name, $customer['id']); + } else { + $to = $data['to']; + $to_name = isset($data['to_name']) ? $data['to_name'] : null; + $sent = $this->sendMail($to, $from, $subject, $content, $to_name, $from_name); + } + + return $sent; + } + + public function sendMail($to, $from, $subject, $content, $to_name = null, $from_name = null, $client_id = null, $admin_id = null) + { + return $this->_queue($to, $from, $subject, $content, $to_name, $from_name, $client_id, $admin_id); + } + + private function _getDefaults($data) + { + $code = $data['code']; + + $enabled = false; + $subject = isset($data['default_subject']) ? $data['default_subject'] : ucwords(str_replace('_', ' ', $code)); + $content = isset($data['default_template']) ? $data['default_template'] : $this->_getVarsString(); + $description = isset($data['default_description']) ? $data['default_description'] : null; + + $matches = array(); + preg_match("/mod_([a-zA-Z0-9]+)_([a-zA-Z0-9]+)/i", $code, $matches); + $mod = $matches[1]; + $path = BB_PATH_MODS . '/' . ucfirst($mod) . '/html_email/' . $code . '.phtml'; + + if (file_exists($path)) { + $tpl = file_get_contents($path); + + $ms = array(); + preg_match('#{%.?block subject.?%}((.*?)+){%.?endblock.?%}#', $tpl, $ms); + if (isset($ms[1])) { + $subject = $ms[1]; + } else { + //if(BB_DEBUG) error_log(sprintf('Default email template %s does not have subject block', $code)); + } + + $mc = array(); + preg_match('/{%.?block content.?%}((.*?\n)+){%.?endblock.?%}/m', $tpl, $mc); + if (isset($mc[1])) { + $content = $mc[1]; + $enabled = true; + } else { + //if(BB_DEBUG) error_log(sprintf('Default email template %s does not have content block', $code)); + } + } + + return array($subject, $content, $description, $enabled, $mod); + } + + private function _queue($to, $from, $subject, $content, $to_name = null, $from_name = null, $client_id = null, $admin_id = null) + { + $db = $this->di['db']; + + $queue = $db->dispense('ModEmailQueue'); + $queue->to = $to; + $queue->from = $from; + $queue->subject = $subject; + $queue->content = $content; + $queue->to_name = $to_name; + $queue->from_name = $from_name; + $queue->client_id = $client_id; + $queue->admin_id = $admin_id; + $queue->status = 'unsent'; + $queue->created_at = date('c'); + $queue->updated_at = date('c'); + $queue->priority = 1; + $queue->tries = 0; + try { + $db->store($queue); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + + return true; + } + + private function _getVarsString() + { + $str = '{% filter markdown %}' . PHP_EOL . PHP_EOL; + $str .= 'This email template was automatically generated by BoxBilling extension. ' . PHP_EOL; + $str .= 'Template is ready to be modified. ' . PHP_EOL; + $str .= 'Email template is just like BoxBilling theme file. ' . PHP_EOL; + $str .= 'Use **admin** and **guest** API calls to get additional information using variables passed to template.' . PHP_EOL . PHP_EOL; + $str .= 'Example API usage in email template:' . PHP_EOL . PHP_EOL; + $str .= '{{ guest.system_version }}' . PHP_EOL . PHP_EOL; + $str .= "{{ now|date('Y-m-d') }}" . PHP_EOL . PHP_EOL; + $str .= '{% endfilter %}'; + return $str; + } + + private function _parse($t, $vars) + { + $dd = $vars; + $pc = $this->di['twig']->render($t->content); + + $dd = $vars; + $ps = $this->di['twig']->render($t->subject); + + return array($ps, $pc); + } + + + public function resend(\Model_ActivityClientEmail $email) + { + $di = $this->getDi(); + + $mail = $di['mail']; + $mail->setBodyHtml($email->content_html); + $mail->setFrom($email->sender); + $mail->setSubject($email->subject); + $mail->addTo($email->recipients); + + $this->_logEmailToDb($email); //Logging to DB + + $systemService = $this->di['mod_service']('system'); + $settings = $systemService->getEmailSettings(); + $transport = isset($settings['mailer']) ? $settings['mailer'] : 'sendmail'; + + if (APPLICATION_ENV == 'testing') { + //print $mail->getSubject() . PHP_EOL . $mail->getBody(); + if (BB_DEBUG) error_log('Skipping email sending in test environment'); + return true; + } + + try { + $mail->send($transport, $settings); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + + $this->di['logger']->info('Resent email #%s', $email->id); + + return true; + } + + private function _logEmailToDb(\Model_ActivityClientEmail $email) + { + $query = "INSERT INTO activity_client_email + SET client_id = :client_id, + sender = :sender, + recipients = :recipients, + subject = :subject, + content_html = :content_html, + content_text = :content_text + "; + + $bindings = array( + ':client_id' => $email->client_id, + ':sender' => $email->sender, + ':recipients' => $email->recipients, + ':subject' => $email->subject, + ':content_html' => $email->content_html, + ':content_text' => $email->content_text + ); + + $di = $this->getDi(); + $db = $di['db']; + $db->exec($query, $bindings); + } + + public function templateGetSearchQuery($data) + { + $query = "SELECT * FROM email_template"; + + $code = isset($data['code']) ? $data['code'] : NULL; + $search = isset($data['search']) ? $data['search'] : NULL; + + $where = array(); + $bindings = array(); + + if ($code) { + $where[] = "action_code LIKE :code"; + + $bindings[':code'] = "%$code%"; + } + + if ($search) { + $search = "%$search%"; + + $where[] = "(action_code LIKE :action_code OR subject LIKE :subject OR content LIKE :content)"; + + $bindings[':action_code'] = $search; + $bindings[':subject'] = $search; + $bindings[':content'] = $search; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " ORDER BY category ASC"; + + return array($query, $bindings); + } + + public function templateToApiArray(\Model_EmailTemplate $model, $deep = false) + { + $data = array( + 'id' => $model->id, + 'action_code' => $model->action_code, + 'category' => $model->category, + 'enabled' => $model->enabled, + 'subject' => $model->subject, + 'description' => $model->description, + ); + if ($deep) { + $data['content'] = $model->content; + $data['vars'] = $this->getVars($model); + } + + return $data; + } + + public function updateTemplate(\Model_EmailTemplate $model, $enabled = null, $category = null, $subject = null, $content = null) + { + if (isset($enabled)) { + $model->enabled = $enabled; + } + + if (isset($category)) { + $model->category = $category; + } + + $vars = $this->getVars($model); + + if (isset($subject)) { + // check subject syntax before saving + // should throw exception if render fails + //$this->template_render(array('id' => $model->id, '_tpl' => $subject)); + $vars['_tpl'] = $subject; + $this->di['twig']->render($subject, $vars); + $model->subject = $subject; + } + + if (isset($content)) { + // check content syntax before saving + // should throw exception if render fails + //$this->template_render(array('id' => $model->id, '_tpl' => $content)); + $vars['_tpl'] = $content; + $this->di['twig']->render($content, $vars); + + $model->content = $content; + } + + $this->di['db']->store($model); + $this->di['logger']->info('Updated email template #%s', $model->id); + + return true; + } + + public function resetTemplateByCode($code) + { + $t = $this->di['db']->findOne('EmailTemplate', 'action_code = :action', array(':action' => $code)); + + if (!$t instanceof \Model_EmailTemplate) { + throw new \Box_Exception('Email template :code was not found', array(':code' => $code)); + } + + $d = array('code' => $code); + list($s, $c) = $this->_getDefaults($d); + /* $new = array( + 'id' => $t->id, + 'subject' => $s, + 'content' => $c, + );*/ + $this->updateTemplate($t, null, null, $s, $c); + $this->di['logger']->info('Reset email template: %s', $t->action_code); + + return true; + } + + + public function getEmailById($id) + { + $model = $this->di['db']->findOne('ActivityClientEmail', 'id = ?', array($id)); + if (!$model instanceof \Model_ActivityClientEmail) { + throw new \Box_Exception('Email not found'); + } + + return $model; + } + + public function templateCreate($actionCode, $subject, $content, $enabled = 0, $category = null) + { + $model = $this->di['db']->dispense('EmailTemplate'); + $model->action_code = $actionCode; + $model->subject = $subject; + $model->enabled = $enabled; + $model->category = $category; + $model->content = $content; + + $modelId = $this->di['db']->store($model); + + $this->di['logger']->info('Added new email template #%s', $modelId); + + return $modelId; + } + + public function templateBatchGenerate() + { + $pattern = BB_PATH_MODS . '/*/html_email/*.phtml'; + $list = glob($pattern); + foreach ($list as $path) { + $code = pathinfo($path, PATHINFO_FILENAME); + $dir = pathinfo($path, PATHINFO_DIRNAME); + $dir = pathinfo($dir, PATHINFO_DIRNAME); + $dir = pathinfo($dir, PATHINFO_FILENAME); + $mod = strtolower($dir); + + //skip if disableda + $extensionService = $this->di['mod_service']('extension'); + + + if (!$extensionService->isExtensionActive('mod', $mod)) { + continue; + } + + // skip if already exists + if ($this->di['db']->findOne('EmailTemplate', 'action_code = :code', array(':code' => $code))) { + continue; + } + + list($s, $c, $desc, $enabled, $mod) = $this->_getDefaults(array('code' => $code)); + $t = $this->di['db']->dispense('EmailTemplate'); + $t->enabled = $enabled; + $t->action_code = $code; + $t->category = $mod; + $t->subject = $s; + $t->content = $c; + $t->description = $desc; + $this->di['db']->store($t); + } + + $this->di['logger']->info('Generated email templates for installed extensions'); + + return true; + } + + public function templateBatchDisable() + { + $sql = "UPDATE email_template SET enabled = 0 WHERE 1"; + $this->di['db']->exec($sql); + $this->di['logger']->info('Disabled all email templates'); + + return true; + } + + public function templateBatchEnable() + { + $sql = "UPDATE email_template SET enabled = 1 WHERE 1"; + $this->di['db']->exec($sql); + $this->di['logger']->info('Enabled all email templates'); + + return true; + } + + public function batchSend(){ + $mod = $this->di['mod']('email'); + $settings = $mod->getConfig(); + $tries = 0; + $time_limit = (isset($settings['time_limit']) ? $settings['time_limit'] : 5) * 60; + $start = time(); + while ($this->_sendFromQueue()) { + $tries++; + if (isset($settings['queue_once']) && $settings['queue_once'] && $settings['queue_once'] <= $tries) break; + if ($time_limit && time() - $start > $time_limit) break; + } + } + + private function _sendFromQueue() + { + $queue = $this->di['db']->findOne('ModEmailQueue', ' status = \'unsent\' ORDER BY updated_at '); + if (!$queue) return false; + + $queue->status = 'sending'; + $this->di['db']->store($queue); + + //@demoVersionLimit + if (!$this->di['license']->isPro()) { + $queue->content .= PHP_EOL; + $queue->content .= 'Powered by BoxBilling. Client management, invoicing and support software. http://www.boxbilling.com/'; + $queue->content .= PHP_EOL; + } + + $mod = $this->di['mod']('email'); + $settings = $mod->getConfig(); + + if (isset($settings['log_enabled']) && $settings['log_enabled']) { + $activityService = $this->di['mod_service']('activity'); + $activityService->logEmail($queue->subject, $queue->client_id, $queue->from, $queue->to, $queue->subject, $queue->content); + } + + $transport = isset($settings['mailer']) ? $settings['mailer'] : 'sendmail'; + + try { + $mail = $this->di['mail']; + $mail->setSubject($queue->subject); + $mail->setBodyHtml($queue->content); + $mail->setFrom($queue->from, $queue->from_name); + $mail->addTo($queue->to, $queue->to_name); + + if (APPLICATION_ENV != 'production') { + //if(BB_DEBUG) error_log('Skip email sending'); + return true; + } + + $mail->send($transport, $settings); + try { + $this->di['db']->trash($queue); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } catch (\Exception $e) { + error_log($e->getMessage()); + if ($queue->priority) $queue->priority--; + $queue->status = 'unsent'; + $queue->tries++; + $queue->updated_at = date('c'); + $this->di['db']->store($queue); + if ($settings['cancel_after'] && $queue->tries > $settings['cancel_after']) $this->di['db']->trash($queue); + } + return true; + } + + + +} \ No newline at end of file diff --git a/src/bb-modules/Email/html_admin/mod_email_details.phtml b/src/bb-modules/Email/html_admin/mod_email_details.phtml new file mode 100644 index 000000000..a63eac7f2 --- /dev/null +++ b/src/bb-modules/Email/html_admin/mod_email_details.phtml @@ -0,0 +1,54 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% set active_menu = 'activity' %} +{% block meta_title %}{{email.subject}}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
    +
    +
    {{email.subject}}
    +
    + + + + + + + + + + + + + + + + + + + + + + + +
    {% trans 'From' %}{{email.sender}}
    {% trans 'To' %}{{email.recipients}}
    {% trans 'Sent' %}{{email.created_at|date('l, d F Y')}}
    + +
    + +
    + {{email.content_html|raw}} +
    + +
    + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Email/html_admin/mod_email_history.phtml b/src/bb-modules/Email/html_admin/mod_email_history.phtml new file mode 100644 index 000000000..1383e100e --- /dev/null +++ b/src/bb-modules/Email/html_admin/mod_email_history.phtml @@ -0,0 +1,50 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Email history' %}{% endblock %} +{% set active_menu = 'activity' %} + +{% block content %} +
    +
    {% trans 'Email history' %}
    + +{{ mf.table_search }} + + + + + + + + + + + + + {% set emails = admin.email_email_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, email in emails.list %} + + + + + + + + {% else %} + + + + + {% endfor %} + +
    {% trans 'To' %}{% trans 'From' %}{% trans 'Subject' %}{% trans 'Date' %} 
    {{ email.recipients }}{{ email.sender }}{{ email.subject|truncate(40) }}{{ email.created_at|date('Y-m-d') }} + + +
    + {% trans 'The list is empty' %} +
    + +
    + +{% include "partial_pagination.phtml" with {'list': emails, 'url':'email/history'} %} + +{% endblock %} diff --git a/src/bb-modules/Email/html_admin/mod_email_settings.phtml b/src/bb-modules/Email/html_admin/mod_email_settings.phtml new file mode 100644 index 000000000..43fa4a334 --- /dev/null +++ b/src/bb-modules/Email/html_admin/mod_email_settings.phtml @@ -0,0 +1,248 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Email' %}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% set active_menu = 'system' %} +{% block content %} +
    + + + +
    +
    +
    + + {{ mf.table_search }} + + + + + + + + + + + + + {% set templates = admin.email_template_get_list({"per_page":100, "page":request.page}|merge(request)) %} + {% for i, template in templates.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + +
    {% trans 'Title' %}{% trans 'Extension' %}{% trans 'Code' %}{% trans 'Enabled' %} 
    {{ template.subject }}{{ template.category }}{{ template.action_code }}{{ mf.q(template.enabled) }} + + +
    + {% trans 'The list is empty. Depending on modules enabled email templates will be inserted after first event occurrence.' %} +
    + +
    +
    + + {% set params = admin.extension_config_get({"ext":"mod_email"}) %} +
    +
    +

    {% trans 'Configure email options' %}

    +

    {% trans 'BoxBilling sends emails using sendmail by default or you can configure your own SMTP server' %}

    +
    + +
    +
    + +
    + +
    + + +
    +
    +
    + +
    + +
    + + + +
    +
    +
    + +
    + +
    + + +
    +
    +
    + +
    + +
    + + +
    +
    +
    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + +
    + +
    + + + +
    +
    +
    +
    + +
    + + + +
    +
    +
    + +
    +
    +

    {% trans 'Where I can use new email template?' %}

    +

    {% trans 'Newly created email templates can be used in custom event hooks.' %}

    +
    + +
    +
    +
    + +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    +
    +
    +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-modules/Email/html_admin/mod_email_template.phtml b/src/bb-modules/Email/html_admin/mod_email_template.phtml new file mode 100644 index 000000000..ec62c47b8 --- /dev/null +++ b/src/bb-modules/Email/html_admin/mod_email_template.phtml @@ -0,0 +1,224 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Email template{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +{# if template.vars|length == 0 %} +
    +

    {% trans 'INFORMATION' %}: {% trans 'This email template is deprecated' %}

    +
    +{% endif #} + +
    + + +
    +
    +
    +

    {% trans 'Manage email template' %}

    +

    {% trans 'Most email templates receives parameters from BoxBilling. You can browse them on "Variables" tab. Copy variable name to email template and hit preview to see parsed content. Please note that values will be different when actual email is sent.' %}

    +
    +
    +
    +
    +
    + +
    +
    + +
    + + {% if template.vars %}{% else %}{% trans 'Preview mode is disabled until first event occurrence' %}{% endif %} + + +
    +
    +
    + + +
    +
    + +
    +
    +

    {% trans 'Template settings' %}

    +

    {% trans 'Enable or disable this email template.' %}

    +
    +
    +
    +
    + +
    + + +
    +
    +
    +
    + +
    + +
    +
    +
    + + +
    +
    +
    + +
    +
    +

    {% trans 'List of variables used in this email' %}

    +

    {% trans 'These values will change when real email is sent. You can pass these variables to admin or guest API to get additional information from database.' %}

    +
    + + + + + + + + + + + {% for k,var in template.vars %} + {% if var|keys|length > 0 %} + {% for subkey,subvalue in var %} + + + + + + {% endfor %} + {% else %} + + + + + {% endif %} + + {% else %} + + + + {% endfor %} + +
    {% trans 'Variable' %}{% trans 'Example value' %}
    {{ '{{' }} {{ k }}.{{subkey}} {{ '}}' }}{{ subvalue }}
    {{ '{{' }} {{ k }} {{ '}}' }}{{ var }}
    {% trans 'This template does not receive any parameters' %}
    +
    + +
    +
    +

    {% trans 'Reset email template to default' %}

    +
    + +
    +
    + + +
    +
    +
    + +
    +
    +

    {% trans 'Email templates examples' %}

    +

    {% trans 'Email template playground. Use this tool to try rendering email templates.' %}

    +
    + +
    +
    + + + +
    +
    + +
    +
    +
    +
    + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Email/html_client/mod_email_email.phtml b/src/bb-modules/Email/html_client/mod_email_email.phtml new file mode 100644 index 000000000..904147d5b --- /dev/null +++ b/src/bb-modules/Email/html_client/mod_email_email.phtml @@ -0,0 +1,81 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Email' %}{% endblock %} +{% block breadcrumb %} +
  • {% trans 'Emails' %}/
  • +{{ email.subject }} +{% endblock %} +{% block content %} +
    + +
    + +{% endblock %} +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Email/html_client/mod_email_index.phtml b/src/bb-modules/Email/html_client/mod_email_index.phtml new file mode 100644 index 000000000..b41d257f4 --- /dev/null +++ b/src/bb-modules/Email/html_client/mod_email_index.phtml @@ -0,0 +1,94 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Emails' %}{% endblock %} +{% block breadcrumb %}
  • {% trans 'Emails' %}
  • {% endblock %} + +{% set emails = client.email_get_list({"per_page":10, "page":request.page}) %} + +{% block content %} +
    +
    +
    +
    +

    {% trans 'Emails' %}

    +

    {% trans 'Here you can find all the emails we sent you. Please click on email topic in left column and it will be displayed in right side.' %}

    +
    +
    + {% if emails.list is empty %} +
    {% trans 'There are no emails to display' %}
    + {% else %} +
    + +
    + {% for i, email in emails.list %} +
    +
    +

    {% trans 'From:' %} {{email.sender}}

    +

    {% trans 'To:' %} {{email.recipients}}

    +

    {% trans 'Created at:' %} {{email.created_at|bb_date}}

    +
    +
    +

    {{ email.subject }}

    +

    {{email.content_html | raw}}

    +
    + + +
    + {% endfor %} +
    +
    + {% include "partial_pagination.phtml" with {'list': emails} %} + {% endif %} +
    +
    +
    + +{% endblock %} +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Email/html_email/mod_email_test.phtml b/src/bb-modules/Email/html_email/mod_email_test.phtml new file mode 100644 index 000000000..825e8d6d6 --- /dev/null +++ b/src/bb-modules/Email/html_email/mod_email_test.phtml @@ -0,0 +1,12 @@ +{% block subject %}[{{ guest.system_company.name }}] BoxBilling Email Test{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + +If you are reading this email, BoxBilling is **configured properly** +and is **able to send emails**. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Email/icon.png b/src/bb-modules/Email/icon.png new file mode 100644 index 000000000..f8a3307ff Binary files /dev/null and b/src/bb-modules/Email/icon.png differ diff --git a/src/bb-modules/Email/manifest.json b/src/bb-modules/Email/manifest.json new file mode 100644 index 000000000..8804f845b --- /dev/null +++ b/src/bb-modules/Email/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "email", + "type": "mod", + "name": "Email", + "icon_url": "icon.png", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Embed/Controller/Admin.php b/src/bb-modules/Embed/Controller/Admin.php new file mode 100644 index 000000000..2ac2c654e --- /dev/null +++ b/src/bb-modules/Embed/Controller/Admin.php @@ -0,0 +1,60 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages'=> array( + array( + 'location' => 'extensions', + 'label' => 'Embed and integrate', + 'index' => 1500, + 'uri' => $this->di['url']->adminLink('embed'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/embed', 'get_index', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_embed_index'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Embed/Controller/Client.php b/src/bb-modules/Embed/Controller/Client.php new file mode 100644 index 000000000..84ec95390 --- /dev/null +++ b/src/bb-modules/Embed/Controller/Client.php @@ -0,0 +1,53 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + /** + * Methods maps client areas urls to corresponding methods + * Always use your module prefix to avoid conflicts with other modules + * in future + * + * @param Box_App $app - returned by reference + */ + public function register(\Box_App &$app) + { + $app->get('/embed/:what', 'get_object', array('what' => '[a-z0-9-]+'), get_class($this)); + } + + public function get_object(\Box_App $app, $what) + { + $api = $app->getApiGuest(); + $tpl = 'mod_embed_'.$what; + return $app->render($tpl); + } +} \ No newline at end of file diff --git a/src/bb-modules/Embed/README.md b/src/bb-modules/Embed/README.md new file mode 100644 index 000000000..85e9084bf --- /dev/null +++ b/src/bb-modules/Embed/README.md @@ -0,0 +1,4 @@ +# Embed and integrate parts of BoxBilling to your website + +Module purpose is to give ability for users to include parts of BoxBilling +to other websites. \ No newline at end of file diff --git a/src/bb-modules/Embed/html_admin/mod_embed_index.phtml b/src/bb-modules/Embed/html_admin/mod_embed_index.phtml new file mode 100644 index 000000000..88abab973 --- /dev/null +++ b/src/bb-modules/Embed/html_admin/mod_embed_index.phtml @@ -0,0 +1,48 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}Embed parts of BoxBilling{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} + +
    +
    Client area login form
    + + +
    Domain checker form
    + + +
    Contact us form
    + +
    +
    + +{% endblock %} + + +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Embed/html_client/mod_embed_contact.phtml b/src/bb-modules/Embed/html_client/mod_embed_contact.phtml new file mode 100644 index 000000000..fcb0fad11 --- /dev/null +++ b/src/bb-modules/Embed/html_client/mod_embed_contact.phtml @@ -0,0 +1,122 @@ + + + + Login + + + + + +
    +
    +

    + + +

    + +

    + + +

    + +

    + + +

    + +

    + + +

    + + {% if guest.extension_is_on({"mod":"spamchecker"}) %} + {% set rc = guest.spamchecker_recaptcha %} + {% if rc.enabled %} + {% set server = "http://www.google.com/recaptcha/api" %} + + + + + + + + + {% endif %} + {% endif %} + + + +
    + + +
    + + + + + \ No newline at end of file diff --git a/src/bb-modules/Embed/html_client/mod_embed_domainchecker.phtml b/src/bb-modules/Embed/html_client/mod_embed_domainchecker.phtml new file mode 100644 index 000000000..ad28898be --- /dev/null +++ b/src/bb-modules/Embed/html_client/mod_embed_domainchecker.phtml @@ -0,0 +1,85 @@ + + + + Check domain + + + + + +
    +
    +

    + + + +

    +
    +
    + + + + + \ No newline at end of file diff --git a/src/bb-modules/Embed/html_client/mod_embed_loginform.phtml b/src/bb-modules/Embed/html_client/mod_embed_loginform.phtml new file mode 100644 index 000000000..cafb9044f --- /dev/null +++ b/src/bb-modules/Embed/html_client/mod_embed_loginform.phtml @@ -0,0 +1,63 @@ + + + + Login + + + + + +
    +
    + Login to client area +

    + +

    +

    + +

    + +
    +
    + + + + + \ No newline at end of file diff --git a/src/bb-modules/Embed/manifest.json b/src/bb-modules/Embed/manifest.json new file mode 100644 index 000000000..ff79fcad3 --- /dev/null +++ b/src/bb-modules/Embed/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "embed", + "type": "mod", + "name": "Embed parts", + "description": "Provides ability to embed parts of BoxBilling to other websites", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", + "version": "1.0.1" +} \ No newline at end of file diff --git a/src/bb-modules/Example/Api/Admin.php b/src/bb-modules/Example/Api/Admin.php new file mode 100644 index 000000000..acbf56ed6 --- /dev/null +++ b/src/bb-modules/Example/Api/Admin.php @@ -0,0 +1,42 @@ +di['events_manager']->fire(array('event'=>'onAfterClientCalledExampleModule', 'params'=>array('key'=>'value'))); + + // Log message + $this->di['logger']->info('Log message to log file'); + + $systemService = $this->di['mod_service']('System'); + $clientService = $this->di['mod_service']('Client'); + + $type = isset($data['type']) ? $data['type'] : 'info'; + + return array( + 'data' => $data, + 'version' => $systemService->getVersion(), + 'profile' => $clientService->toApiArray($this->di['loggedin_client']), + 'messages' => $systemService->getMessages($type) + ); + } +} \ No newline at end of file diff --git a/src/bb-modules/Example/Api/Guest.php b/src/bb-modules/Example/Api/Guest.php new file mode 100644 index 000000000..970ff0092 --- /dev/null +++ b/src/bb-modules/Example/Api/Guest.php @@ -0,0 +1,77 @@ +di['tools']->file_get_contents(BB_PATH_MODS . '/Example/README.md'); + return $readme; + } + + /** + * Get Top Songs from iTunes Store + * @param int $limit - define songs limit + */ + public function top_songs($data) + { + $limit = isset($data['limit']) ? $data['limit'] : 10; + $feed = "http://ax.itunes.apple.com/WebObjects/MZStoreServices.woa/ws/RSS/topsongs/limit=$limit/xml"; + $top_songs = $this->di['tools']->file_get_contents($feed); + $xml = simplexml_load_string($top_songs); + $array = array(); + $this->_convertXmlObjToArr($xml, $array); + return $array; + } + + private function _convertXmlObjToArr($obj, &$arr) + { + $children = $obj->children(); + foreach ($children as $elementName => $node) + { + $nextIdx = count($arr); + $arr[$nextIdx] = array(); + $arr[$nextIdx]['_name'] = strtolower((string)$elementName); + $arr[$nextIdx]['_attributes'] = array(); + $attributes = $node->attributes(); + foreach ($attributes as $attributeName => $attributeValue) + { + $attribName = strtolower(trim((string)$attributeName)); + $attribVal = trim((string)$attributeValue); + $arr[$nextIdx]['_attributes'][$attribName] = $attribVal; + } + $text = (string)$node; + $text = trim($text); + if (strlen($text) > 0) + { + $arr[$nextIdx]['_text'] = $text; + } + $arr[$nextIdx]['_children'] = array(); + $this->_convertXmlObjToArr($node, $arr[$nextIdx]['_children']); + } + return; + } +} \ No newline at end of file diff --git a/src/bb-modules/Example/Controller/Admin.php b/src/bb-modules/Example/Controller/Admin.php new file mode 100644 index 000000000..970c46474 --- /dev/null +++ b/src/bb-modules/Example/Controller/Admin.php @@ -0,0 +1,126 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + /** + * This method registers menu items in admin area navigation block + * This navigation is cached in bb-data/cache/{hash}. To see changes please + * remove the file + * + * @return array + */ + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 1500, // menu sort order + 'location' => 'example', // menu group identificator for subitems + 'label' => 'Example module', // menu group title + 'class' => 'example', // used for css styling menu item + ), + 'subpages'=> array( + array( + 'location' => 'example', // place this module in extensions group + 'label' => 'Example module submenu', + 'index' => 1500, + 'uri' => $this->di['url']->adminLink('example'), + 'class' => '', + ), + ), + ); + } + + /** + * Methods maps admin areas urls to corresponding methods + * Always use your module prefix to avoid conflicts with other modules + * in future + * + * + * @example $app->get('/example/test', 'get_test', null, get_class($this)); // calls get_test method on this class + * @example $app->get('/example/:id', 'get_index', array('id'=>'[0-9]+'), get_class($this)); + * @param Box_App $app + */ + public function register(\Box_App &$app) + { + $app->get('/example', 'get_index', array(), get_class($this)); + $app->get('/example/test', 'get_test', array(), get_class($this)); + $app->get('/example/user/:id', 'get_user', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/example/api', 'get_api', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + // always call this method to validate if admin is logged in + $api = $app->getApiAdmin(); + return $app->render('mod_example_index'); + } + + public function get_test(\Box_App $app) + { + // always call this method to validate if admin is logged in + $api = $app->getApiAdmin(); + + $params = array(); + $params['youparamname'] = 'yourparamvalue'; + + return $app->render('mod_example_index', $params); + } + + public function get_user(\Box_App $app, $id) + { + // always call this method to validate if admin is logged in + $api = $app->getApiAdmin(); + + $params = array(); + $params['userid'] = $id; + return $app->render('mod_example_index', $params); + } + + public function get_api(\Box_App $app, $id) + { + // always call this method to validate if admin is logged in + $api = $app->getApiAdmin(); + $list_from_controller = $api->example_get_something(); + + $params = array(); + $params['api_example'] = true; + $params['list_from_controller'] = $list_from_controller; + + return $app->render('mod_example_index', $params); + } +} \ No newline at end of file diff --git a/src/bb-modules/Example/Controller/Client.php b/src/bb-modules/Example/Controller/Client.php new file mode 100644 index 000000000..891a0858d --- /dev/null +++ b/src/bb-modules/Example/Controller/Client.php @@ -0,0 +1,65 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + /** + * Methods maps client areas urls to corresponding methods + * Always use your module prefix to avoid conflicts with other modules + * in future + * + * @param Box_App $app - returned by reference + */ + public function register(\Box_App &$app) + { + $app->get('/example', 'get_index', array(), get_class($this)); + $app->get('/example/protected', 'get_protected', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiGuest(); + return $app->render('mod_example_index'); + } + + public function get_protected(\Box_App $app) + { + // call $app->getApiClient() method to validate if client is logged in + $api = $app->getApiClient(); + return $app->render('mod_example_index', array('show_protected'=>true)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Example/README.md b/src/bb-modules/Example/README.md new file mode 100644 index 000000000..2606574df --- /dev/null +++ b/src/bb-modules/Example/README.md @@ -0,0 +1,38 @@ +# Example extension readme file + +Module purpose is to provide a starting point for developer to get started +creating his own BoxBilling module. + +Explore the files and comments in the code to better understand the structure +of module. Contact Development helpdesk at www.boxbilling.com if you need more +information. + +In general modules are used to extend BoxBilling basic functionality. + +All modules can access other modules via API or database + +More about extensions at https://extensions.boxbilling.com/article/getting-started + +# BoxBilling module requirements + +## Required + +* Folder must contain **manifest.json** file to describe itself + +## Optional + +* **README.md** - file for installation and getting started instructions +* Folder **html_admin** - for admin area templates, to store custom *.phtml files +* Folder **html_client** - for client area templates, to store custom *.phtml files +###### Controller folder +* **Admin.php** - if module has install/uninstall instructions or + admin area interface +* **Client.php** - if module has client area interface +###### Api folder +* **Admin.php** - file for Admin API +* **Client.php** - file for Client API +* **Guest.php** - file for Guest API + +# Tips + +We recommend to host your extensions on public [github.com](http://github.com) repository \ No newline at end of file diff --git a/src/bb-modules/Example/Service.php b/src/bb-modules/Example/Service.php new file mode 100644 index 000000000..dde6ff92b --- /dev/null +++ b/src/bb-modules/Example/Service.php @@ -0,0 +1,238 @@ +di = $di; + } + + /** + * Method to install module. In most cases you will provide your own + * database table or tables to store extension related data. + * + * If your extension is not very complicated then extension_meta + * database table might be enough. + * + * @return bool + * @throws Box_Exception + */ + public function install() + { + // execute sql script if needed + $db = $this->di['db']; + $db->exec("SELECT NOW()"); + + //throw new \Box_Exception("Throw exception to terminate module installation process with a message", array(), 123); + return true; + } + + /** + * Method to uninstall module. + * + * @return bool + * @throws Box_Exception + */ + public function uninstall() + { + //throw new \Box_Exception("Throw exception to terminate module uninstallation process with a message", array(), 124); + return true; + } + + /** + * Method to update module. When you release new version to + * extensions.boxbilling.com then this method will be called + * after new files are placed. + * + * @param array $manifest - information about new module version + * @return bool + * @throws Box_Exception + */ + public function update($manifest) + { + //throw new \Box_Exception("Throw exception to terminate module update process with a message", array(), 125); + return true; + } + + /** + * Method is used to create search query for paginated list. + * Usually there is one paginated list per module + * + * @param array $data + * @return array() = list of 2 parameters: array($sql, $params) + */ + public function getSearchQuery($data) + { + $params = array(); + $sql="SELECT meta_key, meta_value + FROM extension_meta + WHERE extension = 'example' "; + + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + + if(NULL !== $client_id) { + $sql .= ' AND client_id = :client_id'; + $params[':client_id'] = $client_id; + } + + $sql .= ' ORDER BY created_at DESC'; + return array($sql, $params); + } + + /** + * Methods is a delegate for one database row. + * + * @param array $row - array representing one database row + * @param string $role - guest|client|admin who is calling this method + * @param bool $deep - true|false deep or light version of result to return to API + */ + public function toApiArray($row, $role = 'guest', $deep = true) + { + return $row; + } + + /** + * Example event hook. Any module can hook to any BoxBilling event and perform actions + * + * Make sure extension is enabled before testing this event. + * + * NOTE: IF you have BB_DEBUG mode set to TRUE then all events with params + * are logged to bb-data/log/hook_*.log file. Check this file to see what + * kind of parameters are passed to event. + * + * In this example we are going to count how many times client failed + * to enter correct login details + * + * @param Box_Event $event + * @return type + */ + public function onEventClientLoginFailed(\Box_Event $event) + { + //getting Dependency Injector + $di = $event->getDi(); + + //@note almost in all cases you will need Admin API + $api = $di['api_admin']; + + //sometimes you may need guest API + //$api_guest = $di['api_guest']; + $params = $event->getParameters(); + + //@note To debug parameters by throw an exception + //throw new Exception(print_r($params, 1)); + + // Use RedBean ORM in any place of BoxBilling where API call is not enough + // First we need to find if we already have a counter for this IP + // We will use extension_meta table to store this data. + $values = array( + 'ext' => 'example', + 'rel_type' => 'ip', + 'rel_id' => $params['ip'], + 'meta_key' => 'counter', + ); + $meta = $di['db']->findOne('extension_meta', 'extension = :ext AND rel_type = :rel_type AND rel_id = :rel_id AND meta_key = :meta_key', $values); + if(!$meta) { + $meta = $di['db']->dispense('extension_meta'); + //$count->client_id = null; // client id is not known in this situation + $meta->extension = 'mod_example'; + $meta->rel_type = 'ip'; + $meta->rel_id = $params['ip']; + $meta->meta_key = 'counter'; + $meta->created_at = date('c'); + } + $meta->meta_value = $meta->meta_value + 1; + $meta->updated_at = date('c'); + $di['db']->store($meta); + + // Now we can perform task depending on how many times wrong details were entered + + // We can log event if it repeats for 2 time + if($meta->meta_value > 2) { + $api->activity_log(array('m'=>'Client failed to enter correct login details '.$meta->meta_value.' time(s)')); + } + + // if client gets funky, we block him + if($meta->meta_value > 30) { + throw new \Exception('You have failed to login too many times. Contact support.'); + } + } + + /** + * This event hook is registered in example module client API call + * @param Box_Event $event + */ + public static function onAfterClientCalledExampleModule(\Box_Event $event) + { + //error_log('Called event from example module'); + + $di = $event->getDi(); + $params = $event->getParameters(); + + $meta = $di['db']->dispense('extension_meta'); + $meta->extension = 'mod_example'; + $meta->meta_key = 'event_params'; + $meta->meta_value = json_encode($params); + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $di['db']->store($meta); + } + + /** + * Example event hook for public ticket and set event return value + * @param Box_Event $event + */ + public static function onBeforeGuestPublicTicketOpen(\Box_Event $event) + { + $data = $event->getParameters(); + $data['status'] = 'closed'; + $data['subject'] = 'Altered subject'; + $data['message'] = 'Altered text'; + $event->setReturnValue($data); + } + + /** + * Example email sending + * @param Box_Event $event + */ + public static function onAfterClientOrderCreate(\Box_Event $event) + { + $di = $event->getDi(); + $api = $di['api_admin']; + $params = $event->getParameters(); + + $email = array(); + $email['to_client'] = $params['client_id']; + $email['code'] = 'mod_example_email'; //@see bb-modules/mod_example/html_email/mod_example_email.phtml + + // these parameters are available in email template + $email['order'] = $api->order_get(array('id'=>$params['id'])); + $email['other'] = 'any other value'; + + $api->email_template_send($email); + } +} \ No newline at end of file diff --git a/src/bb-modules/Example/html_admin/mod_example_index.phtml b/src/bb-modules/Example/html_admin/mod_example_index.phtml new file mode 100644 index 000000000..66c5b8b58 --- /dev/null +++ b/src/bb-modules/Example/html_admin/mod_example_index.phtml @@ -0,0 +1,76 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Example module' %}{% endblock %} + +{% set active_menu = 'example' %} + +{% block content %} + +
    +
    +
    {% trans 'Example module title' %}
    +
    + +
    +

    {% trans 'This is an example extension content' %}

    +
    + + + {# Check if example parameters passed to template file #} + {% if youparamname %} +
    +

    {% trans 'Parameters from Controller' %}

    +
    +
    +

    You have passed parameter youparamname: {{ youparamname }}

    +
    + {% endif %} + + + + {# Check if example parameters passed to template file #} + {% if userid %} +
    +

    {% trans 'Parameters from URL' %}

    +
    +
    +

    You have passed parameter userid: {{ userid }}

    +
    + {% endif %} + + {% if api_example %} + {# API example #} +
    +

    {% trans 'API example' %}

    +
    +
    +
    Data from API and passed to template from controller
    +
    {% debug list_from_controller %}
    + +
    Data from API accessed directly from template file
    + {% set list = admin.example_get_something({"microsoft":1}) %} +
    {% debug list %}
    +
    + {% endif %} +
    + +
    +
    +
    {% trans 'README' %}
    +
    + +
    + {{ guest.example_readme|markdown }} +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Example/html_admin/mod_example_settings.phtml b/src/bb-modules/Example/html_admin/mod_example_settings.phtml new file mode 100644 index 000000000..12dd2dd39 --- /dev/null +++ b/src/bb-modules/Example/html_admin/mod_example_settings.phtml @@ -0,0 +1,53 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Example extension settings{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
    +
    +
    {% trans 'Example extension settings' %}
    +
    + +{% set params = admin.extension_config_get({"ext":"mod_example"}) %} + +
    + +
    +

    {% trans 'Example extension settings' %}

    +

    {% trans 'Every extension can have settings page. Only requirement is to have mod_example_settings.phtml page in html_admin folder' %}

    +
    + +
    +
    + +
    + +
    +
    +
    + +
    + +
    + +
    +
    +
    + + + +
    +
    +
    + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Example/html_client/mod_example_index.phtml b/src/bb-modules/Example/html_client/mod_example_index.phtml new file mode 100644 index 000000000..130ec6a10 --- /dev/null +++ b/src/bb-modules/Example/html_client/mod_example_index.phtml @@ -0,0 +1,48 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Example module' %}{% endblock %} +{% block breadcrumb %}
  • {% trans 'Example module' %}
  • {% endblock %} +{% block page_header %} + +{% endblock%} +{% block content %} +
    + +
    + + + + +{% if show_protected %} +
    +
    +
    +
    +

    {% trans 'This content can be seen only if client is logged in' %}

    +
    +
    +

    {% trans 'Your protected content' %}

    +

    {% trans 'Manage profile' %}

    +
    +
    +
    +
    +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Example/html_email/mod_example_email.phtml b/src/bb-modules/Example/html_email/mod_example_email.phtml new file mode 100644 index 000000000..470bdce04 --- /dev/null +++ b/src/bb-modules/Example/html_email/mod_example_email.phtml @@ -0,0 +1,11 @@ +{% block subject %}Example Email Subject{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ c.first_name }}, + +This is a test message from BoxBilling.com + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Example/icon.png b/src/bb-modules/Example/icon.png new file mode 100644 index 000000000..de9d28933 Binary files /dev/null and b/src/bb-modules/Example/icon.png differ diff --git a/src/bb-modules/Example/manifest.json b/src/bb-modules/Example/manifest.json new file mode 100644 index 000000000..1731d7cd3 --- /dev/null +++ b/src/bb-modules/Example/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "example", + "type": "mod", + "name": "Example module", + "description": "Open source extension for BoxBilling developer to get started.", + "icon_url": "icon.png", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "GPL version 2 or later - http://www.gnu.org/licenses/old-licenses/gpl-2.0.html", + "version": "2.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Extension/Api/Admin.php b/src/bb-modules/Extension/Api/Admin.php new file mode 100644 index 000000000..a74acd122 --- /dev/null +++ b/src/bb-modules/Extension/Api/Admin.php @@ -0,0 +1,295 @@ +getService(); + return $service->getExtensionsList($data); + } + + /** + * Get list of extensions from extensions.boxbilling.com + * which can be installed on current version of BoxBilling + * + * @param string $type - mod, gateway ... + * @return array + */ + public function get_latest($data) + { + //@todo enable when extensions are available + return array(); + /* + $type = isset($data['type']) ? $data['type'] : null; + try { + $list = $this->di['extension']->getLatest($type); + } catch(\Exception $e) { + $list = array(); + } + return $list; + */ + } + + /** + * Get admin area navigation + * + * @return array + */ + public function get_navigation($data) + { + $url = null; + if(isset($data['url'])) { + $url = $data['url']; + } + $service = $this->getService(); + return $service->getAdminNavigation($this->identity, $url); + } + + /** + * Get list of available languages on the system + * + * @return array + */ + public function languages() + { + $systemService = $this->di['mod_service']('system'); + return $systemService->getLanguages(true); + } + + /** + * Update BoxBilling core + * + * + * @return bool + * + * @throws Box_Exception + * @throws Exception + */ + public function update_core($data) + { + + $updater = $this->di['updater']; + if(!$updater->getCanUpdate()) { + throw new \Box_Exception('You have latest version of BoxBilling. You do not need to update.', null, 930); + } + + $new_version = $updater->getLatestVersion(); + $updater->performUpdate(); + + $this->di['logger']->info('Updated BoxBilling from %s to %s', \Box_Version::VERSION, $new_version); + return true; + } + + /** + * Update existing extension + * + * @param string $type - extensions type: mod, theme, gateway ... + * @param string $id - extension id + * + * @return array + * + * @throws Box_Exception + * @throws Exception + */ + public function update($data) + { + + $ext = $this->_getExtension($data); + $service = $this->getService(); + return $service->update($ext); + } + + /** + * Activate existing extension + * + * @param string $type - extensions type: mod, theme, gateway ... + * @param string $id - extension id + * + * @return array + * + * @throws Box_Exception + * @throws Exception + */ + public function activate($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Extension id was not passed'); + } + + if(!isset($data['type'])) { + throw new \Box_Exception('Extension type was not passed'); + } + + $service = $this->getService(); + $result = $service->activateExistingExtension($data); + return $result; + } + + /** + * Deactivate existing extension + * + * @param string $type - extensions type: mod, theme, gateway ... + * @param string $id - extension id + * + * @return bool - true + * + * @throws Box_Exception + * @throws Exception + */ + public function deactivate($data) + { + $ext = $this->_getExtension($data); + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminDeactivateExtension', 'params'=>array('id'=>$ext->id))); + + $service = $this->getService(); + $service->deactivate($ext); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminDeactivateExtension', 'params'=>array('id'=>$data['id'], 'type'=>$data['type']))); + + $this->di['logger']->info('Deactivated extension "%s"', $data['type'].' '.$data['id']); + return true; + } + + /** + * Completely remove extension from BoxBilling + * + * @param string $type - extensions type: mod, theme, gateway ... + * @param string $id - extension id + * + * @return boolean + */ + public function uninstall($data) + { + $ext = $this->_getExtension($data); + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminUninstallExtension', 'params'=>array('id'=>$ext->id))); + + $service = $this->getService(); + $service->uninstall($ext); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminUninstallExtension', 'params'=>array('id'=>$ext->id))); + return true; + } + + /** + * Install new extension from extensions site + * + * @param string $type - extensions type: mod, theme, gateway ... + * @param string $id - extension id + * @return array + * @throws Box_Exception + */ + public function install($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Extension id was not passed'); + } + + if(!isset($data['type'])) { + throw new \Box_Exception('Extension type was not passed'); + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInstallExtension', 'params'=>$data)); + + $service = $this->getService(); + $service->downloadAndExtract($data['type'], $data['id']); + + try { + $this->activate($data); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInstallExtension', 'params'=>$data)); + return array( + 'success' => true, + 'id' => $data['id'], + 'type' => $data['type'], + ); + } + + /** + * Universal method for BoxBilling extensions + * to retrieve configuration from database + * It is recommended to store your extension configuration + * using this method. Automatic decryption is available + * All parameters in "public" array will be accessible by guest API + * + * @param string $ext - extension name, ie: mod_news + * @return array - configuration parameters + * @throws \Box_Exception + */ + public function config_get($data) + { + if(!isset($data['ext'])) { + throw new \Box_Exception('Parameter ext was not passed'); + } + $service = $this->getService(); + $config = $service->getConfig($data['ext']); + return $config; + } + + /** + * Universal method for BoxBilling extensions + * to update or save extension configuration to database + * Always pass all configuration parameters to this method. + * + * Config is automatically encrypted and stored in database + * + * @param string $ext - extension name, ie: mod_news + * @optional string $any - Any variable passed to this method is config parameter + * + * @return bool + * @throws Box_Exception + */ + public function config_save($data) + { + if (!isset($data['ext'])) { + throw new \Box_Exception('Parameter ext was not passed'); + } + + return $this->getService()->setConfig($data); + } + + private function _getExtension($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Extension id was not passed'); + } + + if(!isset($data['type'])) { + throw new \Box_Exception('Extension type was not passed'); + } + + $service = $this->getService(); + $ext = $service->findExtension($data['type'], $data['id']); + if(!$ext instanceof \Model_Extension) { + throw new \Box_Exception('Extension not found'); + } + + return $ext; + } +} \ No newline at end of file diff --git a/src/bb-modules/Extension/Api/Guest.php b/src/bb-modules/Extension/Api/Guest.php new file mode 100644 index 000000000..1948e0a2d --- /dev/null +++ b/src/bb-modules/Extension/Api/Guest.php @@ -0,0 +1,76 @@ +getService(); + if(isset($data['mod']) && !empty($data['mod'])) { + return $service->isExtensionActive('mod', $data['mod']); + } + + if(isset($data['id']) && !empty($data['type'])) { + return $service->isExtensionActive($data['type'], $data['id']); + } + return true; + } + + /** + * Return active theme info + * @return array + */ + public function theme() + { + $systemService = $this->di['mod_service']('theme'); + return $systemService->getThemeConfig(true, null); + } + + /** + * Retrieve extension public settings + * + * @param string $ext - extension name + * @throws Box_Exception + * @return array + */ + public function settings($data) + { + if(!isset($data['ext'])) { + throw new \Box_Exception('Parameter ext is missing'); + } + $service = $this->getService(); + $config = $service->getConfig($data['ext']); + return (isset($config['public']) and is_array($config['public'])) ? $config['public'] : array(); + } + + /** + * Retrieve list of available languages + * @return array + */ + public function languages() + { + $service = $this->di['mod_service']('system'); + return $service->getLanguages(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Extension/Controller/Admin.php b/src/bb-modules/Extension/Controller/Admin.php new file mode 100644 index 000000000..f8cbb710a --- /dev/null +++ b/src/bb-modules/Extension/Controller/Admin.php @@ -0,0 +1,89 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'location' => 'extensions', + 'index' => 1000, + 'label' => 'Extensions', + 'class' => 'iPlugin', + ), + 'subpages' => array( + array( + 'location' => 'extensions', + 'label' => 'Overview', + 'uri' => $this->di['url']->adminLink('extension'), + 'index' => 100, + 'class' => '', + ), + array( + 'location' => 'extensions', + 'label' => 'Languages', + 'index' => 200, + 'uri' => $this->di['url']->adminLink('extension/languages'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/extension', 'get_index', array(), get_class($this)); + $app->get('/extension/settings/:mod', 'get_settings', array('mod' => '[a-z0-9-]+'), get_class($this)); + $app->get('/extension/languages', 'get_langs', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_extension_index'); + } + + public function get_langs(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_extension_languages'); + } + + public function get_settings(\Box_App $app, $mod) + { + $api = $app->getApiAdmin(); + $file = 'mod_'.$mod.'_settings'; + return $app->render($file); + } +} \ No newline at end of file diff --git a/src/bb-modules/Extension/Service.php b/src/bb-modules/Extension/Service.php new file mode 100644 index 000000000..1757dbab8 --- /dev/null +++ b/src/bb-modules/Extension/Service.php @@ -0,0 +1,624 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function isCoreModule($mod) + { + $core = $this->di['mod']('extension')->getCoreModules(); + return in_array($mod, $core); + } + + public function isExtensionActive($type, $id) + { + if($type == 'mod' && $this->isCoreModule($id)) { + return true; + } + + $query = "SELECT id + FROM extension + WHERE type = :type + AND status = 'installed' + AND name = :id + LIMIT 1 + "; + + $id_or_null = $this->di['db']->getCell($query, array('type'=>$type, 'id'=>$id)); + return (bool)$id_or_null; + } + + public static function onBeforeAdminCronRun(\Box_Event $event) + { + $api = $event->getApiAdmin(); + + try { + $api->extension_get_list(); + } catch(Exception $e) { + error_log($e); + } + + return true; + } + + public function removeNotExistingModules() + { + $list = $this->di['db']->find('Extension', "type = 'mod'"); + $removedItems = 0; + foreach($list as $ext) { + try { + $mod = $this->di['mod']($ext->name); + $mod->getManifest(); + } catch(\Exception $e) { + $this->di['db']->trash($ext); + $removedItems++; + } + } + return $removedItems == 0 ? true : $removedItems; + } + + public function getSearchQuery($filter) + { + $search = isset($filter['search']) ? $filter['search'] : NULL; + $type = isset($filter['type']) ? $filter['type'] : NULL; + + $params = array(); + $sql="SELECT * FROM extension + WHERE status = 'installed' "; + + if(NULL !== $type) { + $sql .= ' AND type = :type'; + $params[':type'] = $type; + } + + if(NULL !== $search) { + $sql .= ' AND name LIKE :search'; + $params[':search'] = '%'.$search.'%'; + } + + $sql .= ' ORDER BY type ASC, status DESC, id ASC'; + return array($sql, $params); + } + + public function getExtensionsList($filter) + { + $this->removeNotExistingModules(); + + list($sql, $params) = $this->getSearchQuery($filter); + $installed = $this->di['db']->getAll($sql, $params); + + $has_settings = isset($filter['has_settings']) ? (bool)$filter['has_settings'] : NULL; + $only_installed = isset($filter['installed']) ? (bool)$filter['installed'] : NULL; + $installed_and_core = isset($filter['active']) ? (bool)$filter['active'] : NULL; + $result = array(); + + if($installed_and_core) { + $core = $this->di['mod']('extension')->getCoreModules(); + foreach($core as $core_mod) { + $m = $this->di['mod']($core_mod); + $manifest = $m->getManifest(); + $manifest['status'] = 'core'; + $manifest['has_settings'] = $m->hasSettingsPage(); + $result[] = $manifest; + } + } + + foreach($installed as $im) { + $manifest = json_decode($im['manifest'], 1); + if(!is_array($manifest)) { + error_log('Error decoding module json file. '.$im['name']); + continue; + } + $m = $this->di['mod']($im['name']); + $manifest['version'] = $im['version']; + + $manifest['status'] = $im['status']; + if($im['type'] == 'mod' && $im['status'] == 'installed' && $m->hasSettingsPage()) { + $manifest['has_settings'] = true; + } else { + $manifest['has_settings'] = false; + } + + $result[] = $manifest; + } + + if(!$only_installed && !$installed_and_core) { + //add inactive modules + $a = $this->_getAvailable(); + + //unset installed modules + foreach($installed as $ins) { + if(in_array($ins['name'], $a)) { + $key = array_search($ins['name'], $a); + unset($a[$key]); + } + } + + foreach($a as $mod) { + $m = $this->di['mod']($mod); + $manifest = $m->getManifest(); + $manifest['status'] = null; + $manifest['has_settings'] = false; + + $result[] = $manifest; + } + } + + if($has_settings) { + foreach ($result as $idx=>$mod) { + if(!$mod['has_settings']) { + unset($result[$idx]); + } + } + $result = array_values($result); + } + return $result; + } + + private function _getAvailable() + { + $mods = array(); + $handle = opendir(BB_PATH_MODS); + while($name = readdir($handle)) { + if(ctype_alnum($name)) { + $m = $name; + $mod = $this->di['mod']($m); + if($mod->isCore()) { + continue; + } + + if(!$mod->hasManifest()) { + error_log('Module '.$m.' manifest file is missing or is not readable.'); + continue; + } + + $mods[] = strtolower($m); + } + } + closedir($handle); + return $mods; + } + + public function getAdminNavigation($admin, $url = null) + { + $staff_service = $this->di['mod_service']('staff'); + $current_mod = null; + $current_url = null; + if($url) { + $p = parse_url($url); + $path = $p['path']; + //@todo + } + $nav = array(); + $subpages = array(); + + $modules = $this->di['mod']('extension')->getCoreModules(); + $installed = $this->getInstalledMods(); + $list = array_merge($modules, $installed); + foreach ($list as $mod) { + if(!$staff_service->hasPermission($admin, $mod)) { + continue; + } + + try { + $m = $this->di['mod']($mod); + $obj = $m->getAdminController(); + } catch(\Exception $e) { + + continue; + } + if(method_exists($obj, 'fetchNavigation')) { + $n = $obj->fetchNavigation(); + + if(isset($n['group'])) { + $l = $n['group']['location']; + unset($n['group']['location']); + $n['group']['active'] = false; + $nav[$l] = $n['group']; + } + + if(isset($n['subpages'])) { + foreach($n['subpages'] as $nn) { + if(is_array($nn)) { + $nn['active'] = false; + array_push($subpages, $nn); + } + } + } + } + } + // groups sorting + $nav = $this->di['tools']->sortByOneKey($nav, 'index'); + foreach ($subpages as $page) { + if(!isset($page['location'])) { + error_log('Invalid module menu item: '.print_r($page, 1)); + continue; + } + + if(!isset($nav[$page['location']])) { + error_log('Submenu item belongs to not existing location: '.$page['location']); + continue; + } + + $l = $page['location']; + unset($page['location']); + $nav[$l]['subpages'][] = $page; + } + + // submenu sorting + foreach($nav as &$group){ + $group['subpages'] = $this->di['tools']->sortByOneKey($group['subpages'], 'index'); + } + + return $nav; + } + + public function findExtension($type, $id) + { + $extension = $this->di['db']->findOne('Extension', 'type = ? and name = ? ', array($type, $id)); + return $extension; + } + + public function update(\Model_Extension $model) + { + $result = array(); + + if($model->type == 'mod') { + + $ext = $this->di['extension']; + $latest = $ext->getLatestExtensionVersion($model->name); + if(empty($latest)) { + throw new \Box_Exception('Could not retrieve version information for extension :ext', array(':ext'=>$model->name), 745); + } + $haveUpdate = (version_compare($model->version, $latest) < 0); + if(!$haveUpdate) { + throw new \Box_Exception('Latest :mod version installed. No need to update', array(':mod'=>$model->name), 785); + } + + $extension = $ext->getExtension($model->name); + if(empty($extension)) { + throw new \Box_Exception('Could not retrieve :ext information', array(':ext'=>$model->name), 744); + } + + throw new \Box_Exception('Visit extension site for update information.', null, 252); + + /* + //@todo perform module update here + if(empty($extension->download_url)) { + throw new \Box_Exception('Extension :mod does not have download url', array(':mod'=>$data['mod']), 786); + } + */ + $result = array( + 'version_old' => $model->version, + 'version_new' => $latest, + ); + } + + return $result; + } + + public function activate(\Model_Extension $ext) + { + $result = array( + 'id' => $ext->name, + 'type' => $ext->type, + 'redirect' => false, + 'has_settings' => false, + ); + + switch ($ext->type) { + case \Box_Extension::TYPE_MOD: + $mod = $this->di['mod']($ext->name); + $manifest = $mod->getManifest(); + $this->installModule($ext); + $ext->version = $manifest['version']; + $ext->manifest = json_encode($manifest); + $result['redirect'] = $mod->hasAdminController(); + $result['has_settings'] = $mod->hasSettingsPage(); + break; + + default: + break; + } + + $ext->status = 'installed'; + $this->di['db']->store($ext); + + return $result; + } + + public function deactivate(\Model_Extension $ext) + { + switch ($ext->type) { + case \Box_Extension::TYPE_HOOK: + $file = ucfirst($ext->name).'.php'; + $destination = BB_PATH_LIBRARY . '/Hook/'.$file; + if(file_exists($destination)) { + unlink($destination); + } + break; + + case \Box_Extension::TYPE_MOD: + $mod = $ext->name; + if($this->isCoreModule($mod)) { + throw new \Box_Exception("BoxBilling core modules can not be managed"); + } + + try { + $mm = $this->di['mod']($mod); + $mm->uninstall(); + } catch (\Box_Exception $e) { + if($e->getCode() != 408) { + throw $e; + } + } + + break; + + default: + break; + } + + $this->di['db']->trash($ext); + return true; + } + + public function uninstall(\Model_Extension $ext) + { + $this->deactivate($ext); + + switch ($ext->type) { + case \Box_Extension::TYPE_MOD: + + break; + + default: + break; + } + + $this->di['db']->trash($ext); + return true; + } + + public function downloadAndExtract($type, $id) + { + $ext = $this->di['extension']; + $manifest = $ext->getExtension($id, $type); + + if(!isset($manifest['download_url'])) { + throw new \Exception('Extensions download url is not valid'); + } + + $extracted = BB_PATH_CACHE.'/'.md5(uniqid()); + $zip = BB_PATH_CACHE.'/'.md5(uniqid()).'.zip'; + + $curl = $this->di['curl']($manifest['download_url']); + $curl->downloadTo($zip); + + $em = $this->di['zip_archive']; + $res = $em->open($zip); + if ($res === TRUE) { + $em->extractTo($extracted); + $em->close(); + } else { + throw new \Box_Exception('Could not extract extension zip file'); + } + + //install by type + switch ($type) { + case \Box_Extension::TYPE_MOD: + $destination = BB_PATH_MODS . '/mod_'.$id; + if($this->di['tools']->fileExists($destination)) { + throw new \Box_Exception('Module already installed.', null, 436); + } + if(!$this->di['tools']->rename($extracted, $destination)) { + throw new \Box_Exception('Extension can not be moved. Make sure your server write permissions to bb-modules folder.', null, 437); + } + break; + + case \Box_Extension::TYPE_THEME: + $destination = BB_PATH_THEMES . '/'.$id; + if(!$this->di['tools']->fileExists($destination)) { + if(!$this->di['tools']->rename($extracted, $destination)) { + throw new \Box_Exception('Extension can not be moved. Make sure your server write permissions to bb-themes folder.', null, 439); + } + } + break; + + case \Box_Extension::TYPE_TRANSLATION: + $destination = BB_PATH_LANGS . '/'.$id.'/LC_MESSAGES'; + $this->di['tools']->emptyFolder($destination); + if(!$this->di['tools']->fileExists($destination)) { + $this->di['tools']->mkdir($destination, 0777, true); + } + if(!$this->di['tools']->rename($extracted, $destination)) { + throw new \Box_Exception('Extension can not be moved. Make sure your server write permissions to bb-locale folder.', null, 440); + } + break; + + default: + throw new \Box_Exception('Extension does not support auto-install deature. Extension must be installed manually'); + break; + } + + if (file_exists($zip)){ + unlink($zip); + } + $this->di['tools']->emptyFolder($extracted); + + return true; + } + + + public function getInstalledMods() + { + $query = "SELECT name + FROM extension + WHERE type = 'mod' + AND status = 'installed' + "; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($query); + $stmt->execute(); + return $stmt->fetchAll(\PDO::FETCH_COLUMN); + + } + + private function installModule(\Model_Extension $ext) + { + $mod = $this->di['mod']($ext->name); + + if($mod->isCore()) { + throw new \Box_Exception("BoxBilling core modules can not be installed or removed"); + } + + $info = $mod->getManifest(); + if(isset($info['minimum_boxbilling_version']) && Box_Version::compareVersion($info['minimum_boxbilling_version']) > 0) { + throw new \Box_Exception('Module can not be installed. It requires at least :min version of BoxBilling. You are using :v', array(':min'=>$info['minimum_boxbilling_version'], ':v'=>Box_Version::VERSION)); + } + + // Allow install module even if no installer exists + // as it can be simple module + // perform install script if available + try { + $mod->install(); + } catch (\Box_Exception $e) { + if($e->getCode() != 408) { + throw $e; + } + } + + $ext->version = $info['version']; + $this->di['db']->store($ext); + return true; + } + + public function activateExistingExtension($data) + { + $ext = $this->findExtension($data['type'], $data['id']); + if(!$ext instanceof \Model_Extension) { + $ext = $this->di['db']->dispense('Extension'); + $ext->name = $data['id']; + $ext->type = $data['type']; + $ext->version = null; + $ext->status = 'deactivated'; + $ext->manifest = null; + $ext_id = $this->di['db']->store($ext); + } + $ext_id = isset($ext_id) ? $ext_id : $ext->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminActivateExtension', 'params'=>array('id'=>$ext_id))); + try { + $result = $this->activate($ext); + } catch(\Exception $e) { + $this->di['db']->trash($ext); + throw $e; + } + $this->di['events_manager']->fire(array('event'=>'onAfterAdminActivateExtension', 'params'=>array('id'=>$ext_id))); + $this->di['logger']->info('Activated extension "%s"', $data['id']); + + return $result; + } + + public function getConfig($ext) + { + $c = $this->di['db']->findOne('ExtensionMeta', 'extension = :ext AND meta_key = :key', array(':ext'=>$ext, ':key'=>'config')); + if(is_null($c)) { + $c = $this->di['db']->dispense('ExtensionMeta'); + $c->extension = $ext; + $c->meta_key = 'config'; + $c->meta_value = null; + $c->created_at = date('c'); + $c->updated_at = date('c'); + $this->di['db']->store($c); + $config = array(); + } else { + $config = $this->di['crypt']->decrypt($c->meta_value, $this->_getSalt()); + $config = $this->di['tools']->decodeJ($config); + } + return $config; + } + + public function setConfig($data) + { + $this->getConfig($data['ext']); //Creates new config if it does not exist in DB + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminExtensionConfigSave', 'params'=>$data)); + $sql=" + UPDATE extension_meta + SET meta_value = :config + WHERE extension = :ext + AND meta_key = 'config' + LIMIT 1; + ";; + + $config = json_encode($data); + $config = $this->di['crypt']->encrypt($config, $this->_getSalt()); + + $params = array( + 'ext' => $data['ext'], + 'config' => $config, + ); + $this->di['db']->exec($sql, $params); + $this->di['events_manager']->fire(array('event'=>'onAfterAdminExtensionConfigSave', 'params'=>$data)); + $this->di['logger']->info('Updated extension "%s" configuration', $data); + + return true; + } + + private function _getSalt() + { + return $this->di['config']['salt']; + } + + public function getCoreAndActiveModules() + { + $query = "SELECT name, name + FROM extension + WHERE `type` = 'mod' + AND status = 'installed' + "; + $stmt = $this->di['pdo']->prepare($query); + $stmt->execute(); + $extensions = $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + + if(!$extensions) { + $list = array(); + } else { + $list = array_values($extensions); + } + + $extensionMod = $this->di['mod']('extension'); + $mods = $extensionMod->getCoreModules(); + + $result = array_merge($mods, $list); + sort($result); + + + return $result; + } +} \ No newline at end of file diff --git a/src/bb-modules/Extension/manifest.json b/src/bb-modules/Extension/manifest.json new file mode 100644 index 000000000..7574be111 --- /dev/null +++ b/src/bb-modules/Extension/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "extension", + "type": "mod", + "name": "Extensions", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/Api/Admin.php b/src/bb-modules/Filemanager/Api/Admin.php new file mode 100644 index 000000000..5f7264653 --- /dev/null +++ b/src/bb-modules/Filemanager/Api/Admin.php @@ -0,0 +1,103 @@ +getService()->saveFile($data['path'], $content); + } + + /** + * Create new file or directory + * + * @param string $path - item save path + * @param string $type - item type: dir|file + * + * @return bool + */ + public function new_item($data) + { + if (!isset($data['path'])) { + throw new \Box_Exception('Path parameter is missing'); + } + + if (!isset($data['type'])) { + throw new \Box_Exception('Type parameter is missing'); + } + + return $this->getService()->create($data['path'], $data['type']); + } + + /** + * Move/Rename file + * + * @param string $path - filepath to file which is going to be moved + * @param string $to - new folder path. Do not iclude basename + * + * @return boolean + */ + public function move_file($data) + { + if (!isset($data['path'])) { + throw new \Box_Exception('Path parameter is missing'); + } + + if (!isset($data['to'])) { + throw new \Box_Exception('To parameter is missing'); + } + + return $this->getService()->move($data['path'], $data['to']); + } + + /** + * Get list of files in folder + * + * @optional string $path - directory path to be listed + * + * @return boolean + */ + public function get_list($data) + { + $dir = isset($data['path']) ? (string)$data['path'] : DIRECTORY_SEPARATOR; + + return $this->getService()->getFiles($dir); + } + + +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/Controller/Admin.php b/src/bb-modules/Filemanager/Controller/Admin.php new file mode 100644 index 000000000..699de5330 --- /dev/null +++ b/src/bb-modules/Filemanager/Controller/Admin.php @@ -0,0 +1,175 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages'=>array( + array( + 'location' => 'extensions', + 'index' => 5000, + 'label' => 'File editor', + 'uri' => $this->di['url']->adminLink('filemanager'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/filemanager', 'get_index', array(), get_class($this)); + $app->get('/filemanager/ide', 'get_ide', array(), get_class($this)); + $app->get('/filemanager/editor', 'get_editor', array(), get_class($this)); + $app->get('/filemanager/icons', 'get_icons', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_filemanager_index'); + } + + public function get_ide(\Box_App $app) + { + $api = $app->getApiAdmin(); + $dir = BB_PATH_ROOT . DIRECTORY_SEPARATOR; + $data = array('dir'=>$dir); + if(isset($_GET['inline'])) { + $data['show_full_screen'] = true; + } + if(isset($_GET['open'])) { + $data['open'] = $_GET['open']; + } + return $app->render('mod_filemanager_ide', $data); + } + + public function get_editor(\Box_App $app) + { + $api = $app->getApiAdmin(); + + $file = $_GET['file']; + if(!$file || !$this->di['tools']->fileExists($file)) { + throw new \Box_Exception('File does not exist', null, 404); + } + + // check if file is from BoxBilling folder + $p = substr($file, 0, strlen(BB_PATH_ROOT)); + if($p != BB_PATH_ROOT) { + throw new \Box_Exception('File does not exist', null, 405); + } + + $type = 'file'; + $info = pathinfo($file); + switch(strtolower($info['extension'])){ + case 'jpeg': + case 'jpg': + case 'jpe': + case 'tif': + case 'tiff': + case 'xbm': + case 'png': + case 'gif': + case 'ico': + $type = 'image'; + break; + case 'htm': + case 'html': + case 'shtml': + case 'phtml': + case 'twig': + $js = "mode-html.js"; + $mode = "ace/mode/html"; + break; + case 'js': + $js = "mode-javascript.js"; + $mode = "ace/mode/javascript"; + break; + case 'css': + $js = "mode-css.js"; + $mode = "ace/mode/css"; + break; + case 'php': + $js = "mode-php.js"; + $mode = "ace/mode/php"; + break; + case 'json': + $js = "mode-json.js"; + $mode = "ace/mode/json"; + break; + case 'pl': + case 'pm': + $js = "mode-pearl.js"; + $mode = "ace/mode/php"; + break; + default: + $js = "mode-html.js"; + $mode = "ace/mode/html"; + break; + } + if($type == 'file') { + $content = $this->di['tools']->file_get_contents($file); + $d = array( + 'info' => $info, + 'file' => $file, + 'file_content'=>htmlentities($content), + 'js' =>$js, + 'mode' =>$mode + ); + return $app->render('mod_filemanager_editor', $d); + } else { + $d = array( + 'info' => $info, + 'file' => $file, + 'src' => BB_URL . substr($file, strlen($p)), + ); + return $app->render('mod_filemanager_image', $d); + } + } + + public function get_icons(\Box_App $app) + { + $api = $app->getApiAdmin(); + $location = BB_PATH_UPLOADS.'/icons/*'; + $list = array(); + $files = glob($location); + foreach($files as $f) { + $name = pathinfo($f, PATHINFO_BASENAME); + $list[] = BB_URL . 'bb-uploads/icons/'.$name; + } + + return $app->render('mod_filemanager_icons', array('icons'=>$list)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/Service.php b/src/bb-modules/Filemanager/Service.php new file mode 100644 index 000000000..f55a702f3 --- /dev/null +++ b/src/bb-modules/Filemanager/Service.php @@ -0,0 +1,109 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function saveFile($path, $content = PHP_EOL) + { + $path = $this->_getPath($path); + $bytes = $this->di['tools']->file_put_contents($content, $path); + + return ($bytes > 0); + } + + public function create($path, $type) + { + $path = $this->_getPath($path); + $res = false; + switch ($type) { + case 'dir': + if (!$this->di['tools']->fileExists($path)) { + $res = $this->di['tools']->mkdir($path, 0755); + } else { + throw new \Box_Exception('Directory already exists'); + } + break; + + case 'file': + $res = $this->saveFile($path, ' '); + break; + + default: + throw new \Box_Exception('Unknown item type'); + break; + } + return $res; + } + + public function move($from, $to) + { + $from = $this->_getPath($from); + $to = $this->_getPath($to) . DIRECTORY_SEPARATOR . basename($from); + return $this->di['tools']->rename($from, $to); + } + + public function getFiles($dir = DIRECTORY_SEPARATOR) + { + $dir = ($dir == DIRECTORY_SEPARATOR) ? DIRECTORY_SEPARATOR : (string)$dir; + $dir = trim($dir, DIRECTORY_SEPARATOR); + $dir = $this->_getPath($dir); + $getdir = realpath($dir); + if (empty($getdir)) { + return array( + 'filecount' => 0, + 'files' => null, + ); + } + + $sd = @scandir($getdir); + $sd = array_diff($sd, array('.', '..', '.svn', '.git')); + + $files = $dirs = array(); + foreach ($sd as $file) { + $path = $getdir . '/' . $file; + if (is_file($path)) { + $files[] = array('filename' => $file, 'type' => 'file', 'path' => $path, 'size' => filesize($path)); + } else { + $dirs[] = array('filename' => $file, 'type' => 'dir', 'path' => $path, 'size' => filesize($path)); + } + } + $files = array_merge($dirs, $files); + $out = array('files' => $files); + $out['filecount'] = count($sd); + + return $out; + } + + private function _getPath($path) + { + $_path = BB_PATH_ROOT . DIRECTORY_SEPARATOR; + $path = str_replace($_path, '', $path); + $path = trim($path, DIRECTORY_SEPARATOR); + $path = str_replace('//', DIRECTORY_SEPARATOR, $_path . $path); + + return $path; + } +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/html_admin/mod_filemanager_editor.phtml b/src/bb-modules/Filemanager/html_admin/mod_filemanager_editor.phtml new file mode 100644 index 000000000..33b8e7dfc --- /dev/null +++ b/src/bb-modules/Filemanager/html_admin/mod_filemanager_editor.phtml @@ -0,0 +1,115 @@ +{% set mod = constant('BB_URL') ~ 'bb-modules/Filemanager' %} + + + + + + + {{ info.basename }} + + + + + +
    {{ file_content|raw }}
    + + + + + + + + + \ No newline at end of file diff --git a/src/bb-modules/Filemanager/html_admin/mod_filemanager_icons.phtml b/src/bb-modules/Filemanager/html_admin/mod_filemanager_icons.phtml new file mode 100644 index 000000000..4b760088c --- /dev/null +++ b/src/bb-modules/Filemanager/html_admin/mod_filemanager_icons.phtml @@ -0,0 +1,23 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block content %} + +
      +{% for icon in icons %} +
    • icon
    • +{% else %} +
    • {% trans 'No icons available' %}
    • +{% endfor %} +
    + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/html_admin/mod_filemanager_ide.phtml b/src/bb-modules/Filemanager/html_admin/mod_filemanager_ide.phtml new file mode 100644 index 000000000..e04f47c8f --- /dev/null +++ b/src/bb-modules/Filemanager/html_admin/mod_filemanager_ide.phtml @@ -0,0 +1,96 @@ +{% set mod = constant('BB_URL') ~ 'bb-modules/Filemanager' %} + + + + {% trans 'File manager' %} + + + + + + + + + + +
    +
    + Hint: Use Ctrl+S to save file | + {% if show_full_screen %} + {% trans 'Full screen' %} + {% else %} + {% trans 'Dashboard' %} + {% endif %} +
    + + +
    +
    +
    + +
    /
    +
    +
      +
    • /
    • +
    +
    + new dir + new dir +
    +
      +
      +
      +
        +
        + + +
        + +
        + +
        + +
        + +
        +
        + + \ No newline at end of file diff --git a/src/bb-modules/Filemanager/html_admin/mod_filemanager_image.phtml b/src/bb-modules/Filemanager/html_admin/mod_filemanager_image.phtml new file mode 100644 index 000000000..3d2dd1750 --- /dev/null +++ b/src/bb-modules/Filemanager/html_admin/mod_filemanager_image.phtml @@ -0,0 +1,13 @@ + + + + + + {{ info.basename }} + + + + {{ info.basename }} + + + \ No newline at end of file diff --git a/src/bb-modules/Filemanager/html_admin/mod_filemanager_index.phtml b/src/bb-modules/Filemanager/html_admin/mod_filemanager_index.phtml new file mode 100644 index 000000000..8283c92bc --- /dev/null +++ b/src/bb-modules/Filemanager/html_admin/mod_filemanager_index.phtml @@ -0,0 +1,9 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Filemanager{% endblock %} +{% set active_menu = 'system' %} +{% set hide_menu = '1' %} + +{% block content_wide %} + +{% endblock %} diff --git a/src/bb-modules/Filemanager/manifest.json b/src/bb-modules/Filemanager/manifest.json new file mode 100644 index 000000000..1ae82f02c --- /dev/null +++ b/src/bb-modules/Filemanager/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "filemanager", + "type": "mod", + "name": "File manager", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/ace-uncompressed.js b/src/bb-modules/Filemanager/src/ace/ace-uncompressed.js new file mode 100644 index 000000000..ccdb165e9 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/ace-uncompressed.js @@ -0,0 +1,17616 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +/** + * Define a module along with a payload + * @param module a name for the payload + * @param payload a function to call with (require, exports, module) params + */ + +(function() { + +var global = (function() { + return this; +})(); + +// if we find an existing require function use it. +if (global.require && global.define) { + require.packaged = true; + return; +} + +var _define = function(module, deps, payload) { + if (typeof module !== 'string') { + if (_define.original) + _define.original.apply(window, arguments); + else { + console.error('dropping module because define wasn\'t a string.'); + console.trace(); + } + return; + } + + if (arguments.length == 2) + payload = deps; + + if (!define.modules) + define.modules = {}; + + define.modules[module] = payload; +}; +if (global.define) + _define.original = global.define; + +global.define = _define; + + +/** + * Get at functionality define()ed using the function above + */ +var _require = function(module, callback) { + if (Object.prototype.toString.call(module) === "[object Array]") { + var params = []; + for (var i = 0, l = module.length; i < l; ++i) { + var dep = lookup(module[i]); + if (!dep && _require.original) + return _require.original.apply(window, arguments); + params.push(dep); + } + if (callback) { + callback.apply(null, params); + } + } + else if (typeof module === 'string') { + var payload = lookup(module); + if (!payload && _require.original) + return _require.original.apply(window, arguments); + + if (callback) { + callback(); + } + + return payload; + } + else { + if (_require.original) + return _require.original.apply(window, arguments); + } +}; + +if (global.require) + _require.original = global.require; + +global.require = _require; +require.packaged = true; + +/** + * Internal function to lookup moduleNames and resolve them by calling the + * definition function if needed. + */ +var lookup = function(moduleName) { + var module = define.modules[moduleName]; + if (module == null) { + console.error('Missing module: ' + moduleName); + return null; + } + + if (typeof module === 'function') { + var exports = {}; + module(require, exports, { id: moduleName, uri: '' }); + // cache the resulting module object for next time + define.modules[moduleName] = exports; + return exports; + } + + return module; +}; + +})();// vim:set ts=4 sts=4 sw=4 st: +// -- kriskowal Kris Kowal Copyright (C) 2009-2010 MIT License +// -- tlrobinson Tom Robinson Copyright (C) 2009-2010 MIT License (Narwhal Project) +// -- dantman Daniel Friesen Copyright(C) 2010 XXX No License Specified +// -- fschaefer Florian Schäfer Copyright (C) 2010 MIT License +// -- Irakli Gozalishvili Copyright (C) 2010 MIT License + +/*! + Copyright (c) 2009, 280 North Inc. http://280north.com/ + MIT License. http://github.com/280north/narwhal/blob/master/README.md +*/ + +define('pilot/fixoldbrowsers', ['require', 'exports', 'module' ], function(require, exports, module) { + +/** + * Brings an environment as close to ECMAScript 5 compliance + * as is possible with the facilities of erstwhile engines. + * + * ES5 Draft + * http://www.ecma-international.org/publications/files/drafts/tc39-2009-050.pdf + * + * NOTE: this is a draft, and as such, the URL is subject to change. If the + * link is broken, check in the parent directory for the latest TC39 PDF. + * http://www.ecma-international.org/publications/files/drafts/ + * + * Previous ES5 Draft + * http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf + * This is a broken link to the previous draft of ES5 on which most of the + * numbered specification references and quotes herein were taken. Updating + * these references and quotes to reflect the new document would be a welcome + * volunteer project. + * + * @module + */ + +/*whatsupdoc*/ + +// +// Function +// ======== +// + +// ES-5 15.3.4.5 +// http://www.ecma-international.org/publications/files/drafts/tc39-2009-025.pdf + +if (!Function.prototype.bind) { + var slice = Array.prototype.slice; + Function.prototype.bind = function bind(that) { // .length is 1 + // 1. Let Target be the this value. + var target = this; + // 2. If IsCallable(Target) is false, throw a TypeError exception. + // XXX this gets pretty close, for all intents and purposes, letting + // some duck-types slide + if (typeof target.apply !== "function" || typeof target.call !== "function") + return new TypeError(); + // 3. Let A be a new (possibly empty) internal list of all of the + // argument values provided after thisArg (arg1, arg2 etc), in order. + var args = slice.call(arguments); + // 4. Let F be a new native ECMAScript object. + // 9. Set the [[Prototype]] internal property of F to the standard + // built-in Function prototype object as specified in 15.3.3.1. + // 10. Set the [[Call]] internal property of F as described in + // 15.3.4.5.1. + // 11. Set the [[Construct]] internal property of F as described in + // 15.3.4.5.2. + // 12. Set the [[HasInstance]] internal property of F as described in + // 15.3.4.5.3. + // 13. The [[Scope]] internal property of F is unused and need not + // exist. + var bound = function bound() { + + if (this instanceof bound) { + // 15.3.4.5.2 [[Construct]] + // When the [[Construct]] internal method of a function object, + // F that was created using the bind function is called with a + // list of arguments ExtraArgs the following steps are taken: + // 1. Let target be the value of F's [[TargetFunction]] + // internal property. + // 2. If target has no [[Construct]] internal method, a + // TypeError exception is thrown. + // 3. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 4. Let args be a new list containing the same values as the + // list boundArgs in the same order followed by the same + // values as the list ExtraArgs in the same order. + + var self = Object.create(target.prototype); + target.apply(self, args.concat(slice.call(arguments))); + return self; + + } else { + // 15.3.4.5.1 [[Call]] + // When the [[Call]] internal method of a function object, F, + // which was created using the bind function is called with a + // this value and a list of arguments ExtraArgs the following + // steps are taken: + // 1. Let boundArgs be the value of F's [[BoundArgs]] internal + // property. + // 2. Let boundThis be the value of F's [[BoundThis]] internal + // property. + // 3. Let target be the value of F's [[TargetFunction]] internal + // property. + // 4. Let args be a new list containing the same values as the list + // boundArgs in the same order followed by the same values as + // the list ExtraArgs in the same order. 5. Return the + // result of calling the [[Call]] internal method of target + // providing boundThis as the this value and providing args + // as the arguments. + + // equiv: target.call(this, ...boundArgs, ...args) + return target.call.apply( + target, + args.concat(slice.call(arguments)) + ); + + } + + }; + bound.length = ( + // 14. If the [[Class]] internal property of Target is "Function", then + typeof target === "function" ? + // a. Let L be the length property of Target minus the length of A. + // b. Set the length own property of F to either 0 or L, whichever is larger. + Math.max(target.length - args.length, 0) : + // 15. Else set the length own property of F to 0. + 0 + ) + // 16. The length own property of F is given attributes as specified in + // 15.3.5.1. + // TODO + // 17. Set the [[Extensible]] internal property of F to true. + // TODO + // 18. Call the [[DefineOwnProperty]] internal method of F with + // arguments "caller", PropertyDescriptor {[[Value]]: null, + // [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: + // false}, and false. + // TODO + // 19. Call the [[DefineOwnProperty]] internal method of F with + // arguments "arguments", PropertyDescriptor {[[Value]]: null, + // [[Writable]]: false, [[Enumerable]]: false, [[Configurable]]: + // false}, and false. + // TODO + // NOTE Function objects created using Function.prototype.bind do not + // have a prototype property. + // XXX can't delete it in pure-js. + return bound; + }; +} + +// Shortcut to an often accessed properties, in order to avoid multiple +// dereference that costs universally. +// _Please note: Shortcuts are defined after `Function.prototype.bind` as we +// us it in defining shortcuts. +var call = Function.prototype.call; +var prototypeOfArray = Array.prototype; +var prototypeOfObject = Object.prototype; +var owns = call.bind(prototypeOfObject.hasOwnProperty); + +var defineGetter, defineSetter, lookupGetter, lookupSetter, supportsAccessors; +// If JS engine supports accessors creating shortcuts. +if ((supportsAccessors = owns(prototypeOfObject, '__defineGetter__'))) { + defineGetter = call.bind(prototypeOfObject.__defineGetter__); + defineSetter = call.bind(prototypeOfObject.__defineSetter__); + lookupGetter = call.bind(prototypeOfObject.__lookupGetter__); + lookupSetter = call.bind(prototypeOfObject.__lookupSetter__); +} + + +// +// Array +// ===== +// + +// ES5 15.4.3.2 +if (!Array.isArray) { + Array.isArray = function isArray(obj) { + return Object.prototype.toString.call(obj) === "[object Array]"; + }; +} + +// ES5 15.4.4.18 +if (!Array.prototype.forEach) { + Array.prototype.forEach = function forEach(block, thisObject) { + var len = +this.length; + for (var i = 0; i < len; i++) { + if (i in this) { + block.call(thisObject, this[i], i, this); + } + } + }; +} + +// ES5 15.4.4.19 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/map +if (!Array.prototype.map) { + Array.prototype.map = function map(fun /*, thisp*/) { + var len = +this.length; + if (typeof fun !== "function") + throw new TypeError(); + + var res = new Array(len); + var thisp = arguments[1]; + for (var i = 0; i < len; i++) { + if (i in this) + res[i] = fun.call(thisp, this[i], i, this); + } + + return res; + }; +} + +// ES5 15.4.4.20 +if (!Array.prototype.filter) { + Array.prototype.filter = function filter(block /*, thisp */) { + var values = []; + var thisp = arguments[1]; + for (var i = 0; i < this.length; i++) + if (block.call(thisp, this[i])) + values.push(this[i]); + return values; + }; +} + +// ES5 15.4.4.16 +if (!Array.prototype.every) { + Array.prototype.every = function every(block /*, thisp */) { + var thisp = arguments[1]; + for (var i = 0; i < this.length; i++) + if (!block.call(thisp, this[i])) + return false; + return true; + }; +} + +// ES5 15.4.4.17 +if (!Array.prototype.some) { + Array.prototype.some = function some(block /*, thisp */) { + var thisp = arguments[1]; + for (var i = 0; i < this.length; i++) + if (block.call(thisp, this[i])) + return true; + return false; + }; +} + +// ES5 15.4.4.21 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduce +if (!Array.prototype.reduce) { + Array.prototype.reduce = function reduce(fun /*, initial*/) { + var len = +this.length; + if (typeof fun !== "function") + throw new TypeError(); + + // no value to return if no initial value and an empty array + if (len === 0 && arguments.length === 1) + throw new TypeError(); + + var i = 0; + if (arguments.length >= 2) { + var rv = arguments[1]; + } else { + do { + if (i in this) { + rv = this[i++]; + break; + } + + // if array contains no values, no initial value to return + if (++i >= len) + throw new TypeError(); + } while (true); + } + + for (; i < len; i++) { + if (i in this) + rv = fun.call(null, rv, this[i], i, this); + } + + return rv; + }; +} + +// ES5 15.4.4.22 +// https://developer.mozilla.org/en/Core_JavaScript_1.5_Reference/Objects/Array/reduceRight +if (!Array.prototype.reduceRight) { + Array.prototype.reduceRight = function reduceRight(fun /*, initial*/) { + var len = +this.length; + if (typeof fun !== "function") + throw new TypeError(); + + // no value to return if no initial value, empty array + if (len === 0 && arguments.length === 1) + throw new TypeError(); + + var i = len - 1; + if (arguments.length >= 2) { + var rv = arguments[1]; + } else { + do { + if (i in this) { + rv = this[i--]; + break; + } + + // if array contains no values, no initial value to return + if (--i < 0) + throw new TypeError(); + } while (true); + } + + for (; i >= 0; i--) { + if (i in this) + rv = fun.call(null, rv, this[i], i, this); + } + + return rv; + }; +} + +// ES5 15.4.4.14 +if (!Array.prototype.indexOf) { + Array.prototype.indexOf = function indexOf(value /*, fromIndex */ ) { + var length = this.length; + if (!length) + return -1; + var i = arguments[1] || 0; + if (i >= length) + return -1; + if (i < 0) + i += length; + for (; i < length; i++) { + if (!owns(this, i)) + continue; + if (value === this[i]) + return i; + } + return -1; + }; +} + +// ES5 15.4.4.15 +if (!Array.prototype.lastIndexOf) { + Array.prototype.lastIndexOf = function lastIndexOf(value /*, fromIndex */) { + var length = this.length; + if (!length) + return -1; + var i = arguments[1] || length; + if (i < 0) + i += length; + i = Math.min(i, length - 1); + for (; i >= 0; i--) { + if (!owns(this, i)) + continue; + if (value === this[i]) + return i; + } + return -1; + }; +} + +// +// Object +// ====== +// + +// ES5 15.2.3.2 +if (!Object.getPrototypeOf) { + // https://github.com/kriskowal/es5-shim/issues#issue/2 + // http://ejohn.org/blog/objectgetprototypeof/ + // recommended by fschaefer on github + Object.getPrototypeOf = function getPrototypeOf(object) { + return object.__proto__ || object.constructor.prototype; + // or undefined if not available in this engine + }; +} + +// ES5 15.2.3.3 +if (!Object.getOwnPropertyDescriptor) { + var ERR_NON_OBJECT = "Object.getOwnPropertyDescriptor called on a " + + "non-object: "; + Object.getOwnPropertyDescriptor = function getOwnPropertyDescriptor(object, property) { + if ((typeof object !== "object" && typeof object !== "function") || object === null) + throw new TypeError(ERR_NON_OBJECT + object); + // If object does not owns property return undefined immediately. + if (!owns(object, property)) + return undefined; + + var despriptor, getter, setter; + + // If object has a property then it's for sure both `enumerable` and + // `configurable`. + despriptor = { enumerable: true, configurable: true }; + + // If JS engine supports accessor properties then property may be a + // getter or setter. + if (supportsAccessors) { + // Unfortunately `__lookupGetter__` will return a getter even + // if object has own non getter property along with a same named + // inherited getter. To avoid misbehavior we temporary remove + // `__proto__` so that `__lookupGetter__` will return getter only + // if it's owned by an object. + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + + var getter = lookupGetter(object, property); + var setter = lookupSetter(object, property); + + // Once we have getter and setter we can put values back. + object.__proto__ = prototype; + + if (getter || setter) { + if (getter) descriptor.get = getter; + if (setter) descriptor.set = setter; + + // If it was accessor property we're done and return here + // in order to avoid adding `value` to the descriptor. + return descriptor; + } + } + + // If we got this far we know that object has an own property that is + // not an accessor so we set it as a value and return descriptor. + descriptor.value = object[property]; + return descriptor; + }; +} + +// ES5 15.2.3.4 +if (!Object.getOwnPropertyNames) { + Object.getOwnPropertyNames = function getOwnPropertyNames(object) { + return Object.keys(object); + }; +} + +// ES5 15.2.3.5 +if (!Object.create) { + Object.create = function create(prototype, properties) { + var object; + if (prototype === null) { + object = { "__proto__": null }; + } else { + if (typeof prototype !== "object") + throw new TypeError("typeof prototype["+(typeof prototype)+"] != 'object'"); + var Type = function () {}; + Type.prototype = prototype; + object = new Type(); + // IE has no built-in implementation of `Object.getPrototypeOf` + // neither `__proto__`, but this manually setting `__proto__` will + // guarantee that `Object.getPrototypeOf` will work as expected with + // objects created using `Object.create` + object.__proto__ = prototype; + } + if (typeof properties !== "undefined") + Object.defineProperties(object, properties); + return object; + }; +} + +// ES5 15.2.3.6 +if (!Object.defineProperty) { + var ERR_NON_OBJECT_DESCRIPTOR = "Property description must be an object: "; + var ERR_NON_OBJECT_TARGET = "Object.defineProperty called on non-object: " + var ERR_ACCESSORS_NOT_SUPPORTED = "getters & setters can not be defined " + + "on this javascript engine"; + + Object.defineProperty = function defineProperty(object, property, descriptor) { + if (typeof object !== "object" && typeof object !== "function") + throw new TypeError(ERR_NON_OBJECT_TARGET + object); + if (typeof object !== "object" || object === null) + throw new TypeError(ERR_NON_OBJECT_DESCRIPTOR + descriptor); + + // If it's a data property. + if (owns(descriptor, "value")) { + // fail silently if "writable", "enumerable", or "configurable" + // are requested but not supported + /* + // alternate approach: + if ( // can't implement these features; allow false but not true + !(owns(descriptor, "writable") ? descriptor.writable : true) || + !(owns(descriptor, "enumerable") ? descriptor.enumerable : true) || + !(owns(descriptor, "configurable") ? descriptor.configurable : true) + ) + throw new RangeError( + "This implementation of Object.defineProperty does not " + + "support configurable, enumerable, or writable." + ); + */ + + if (supportsAccessors && (lookupGetter(object, property) || + lookupSetter(object, property))) + { + // As accessors are supported only on engines implementing + // `__proto__` we can safely override `__proto__` while defining + // a property to make sure that we don't hit an inherited + // accessor. + var prototype = object.__proto__; + object.__proto__ = prototypeOfObject; + // Deleting a property anyway since getter / setter may be + // defined on object itself. + delete object[property]; + object[property] = descriptor.value; + // Setting original `__proto__` back now. + object.prototype; + } else { + object[property] = descriptor.value; + } + } else { + if (!supportsAccessors) + throw new TypeError(ERR_ACCESSORS_NOT_SUPPORTED); + // If we got that far then getters and setters can be defined !! + if (owns(descriptor, "get")) + defineGetter(object, property, descriptor.get); + if (owns(descriptor, "set")) + defineSetter(object, property, descriptor.set); + } + + return object; + }; +} + +// ES5 15.2.3.7 +if (!Object.defineProperties) { + Object.defineProperties = function defineProperties(object, properties) { + for (var property in properties) { + if (owns(properties, property)) + Object.defineProperty(object, property, properties[property]); + } + return object; + }; +} + +// ES5 15.2.3.8 +if (!Object.seal) { + Object.seal = function seal(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// ES5 15.2.3.9 +if (!Object.freeze) { + Object.freeze = function freeze(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// detect a Rhino bug and patch it +try { + Object.freeze(function () {}); +} catch (exception) { + Object.freeze = (function freeze(freezeObject) { + return function freeze(object) { + if (typeof object === "function") { + return object; + } else { + return freezeObject(object); + } + }; + })(Object.freeze); +} + +// ES5 15.2.3.10 +if (!Object.preventExtensions) { + Object.preventExtensions = function preventExtensions(object) { + // this is misleading and breaks feature-detection, but + // allows "securable" code to "gracefully" degrade to working + // but insecure code. + return object; + }; +} + +// ES5 15.2.3.11 +if (!Object.isSealed) { + Object.isSealed = function isSealed(object) { + return false; + }; +} + +// ES5 15.2.3.12 +if (!Object.isFrozen) { + Object.isFrozen = function isFrozen(object) { + return false; + }; +} + +// ES5 15.2.3.13 +if (!Object.isExtensible) { + Object.isExtensible = function isExtensible(object) { + return true; + }; +} + +// ES5 15.2.3.14 +// http://whattheheadsaid.com/2010/10/a-safer-object-keys-compatibility-implementation +if (!Object.keys) { + + var hasDontEnumBug = true, + dontEnums = [ + 'toString', + 'toLocaleString', + 'valueOf', + 'hasOwnProperty', + 'isPrototypeOf', + 'propertyIsEnumerable', + 'constructor' + ], + dontEnumsLength = dontEnums.length; + + for (var key in {"toString": null}) + hasDontEnumBug = false; + + Object.keys = function keys(object) { + + if ( + typeof object !== "object" && typeof object !== "function" + || object === null + ) + throw new TypeError("Object.keys called on a non-object"); + + var keys = []; + for (var name in object) { + if (owns(object, name)) { + keys.push(name); + } + } + + if (hasDontEnumBug) { + for (var i = 0, ii = dontEnumsLength; i < ii; i++) { + var dontEnum = dontEnums[i]; + if (owns(object, dontEnum)) { + keys.push(dontEnum); + } + } + } + + return keys; + }; + +} + +// +// Date +// ==== +// + +// ES5 15.9.5.43 +// Format a Date object as a string according to a subset of the ISO-8601 standard. +// Useful in Atom, among other things. +if (!Date.prototype.toISOString) { + Date.prototype.toISOString = function toISOString() { + return ( + this.getUTCFullYear() + "-" + + (this.getUTCMonth() + 1) + "-" + + this.getUTCDate() + "T" + + this.getUTCHours() + ":" + + this.getUTCMinutes() + ":" + + this.getUTCSeconds() + "Z" + ); + } +} + +// ES5 15.9.4.4 +if (!Date.now) { + Date.now = function now() { + return new Date().getTime(); + }; +} + +// ES5 15.9.5.44 +if (!Date.prototype.toJSON) { + Date.prototype.toJSON = function toJSON(key) { + // This function provides a String representation of a Date object for + // use by JSON.stringify (15.12.3). When the toJSON method is called + // with argument key, the following steps are taken: + + // 1. Let O be the result of calling ToObject, giving it the this + // value as its argument. + // 2. Let tv be ToPrimitive(O, hint Number). + // 3. If tv is a Number and is not finite, return null. + // XXX + // 4. Let toISO be the result of calling the [[Get]] internal method of + // O with argument "toISOString". + // 5. If IsCallable(toISO) is false, throw a TypeError exception. + if (typeof this.toISOString !== "function") + throw new TypeError(); + // 6. Return the result of calling the [[Call]] internal method of + // toISO with O as the this value and an empty argument list. + return this.toISOString(); + + // NOTE 1 The argument is ignored. + + // NOTE 2 The toJSON function is intentionally generic; it does not + // require that its this value be a Date object. Therefore, it can be + // transferred to other kinds of objects for use as a method. However, + // it does require that any such object have a toISOString method. An + // object is free to use the argument key to filter its + // stringification. + }; +} + +// 15.9.4.2 Date.parse (string) +// 15.9.1.15 Date Time String Format +// Date.parse +// based on work shared by Daniel Friesen (dantman) +// http://gist.github.com/303249 +if (isNaN(Date.parse("T00:00"))) { + // XXX global assignment won't work in embeddings that use + // an alternate object for the context. + Date = (function(NativeDate) { + + // Date.length === 7 + var Date = function(Y, M, D, h, m, s, ms) { + var length = arguments.length; + if (this instanceof NativeDate) { + var date = length === 1 && String(Y) === Y ? // isString(Y) + // We explicitly pass it through parse: + new NativeDate(Date.parse(Y)) : + // We have to manually make calls depending on argument + // length here + length >= 7 ? new NativeDate(Y, M, D, h, m, s, ms) : + length >= 6 ? new NativeDate(Y, M, D, h, m, s) : + length >= 5 ? new NativeDate(Y, M, D, h, m) : + length >= 4 ? new NativeDate(Y, M, D, h) : + length >= 3 ? new NativeDate(Y, M, D) : + length >= 2 ? new NativeDate(Y, M) : + length >= 1 ? new NativeDate(Y) : + new NativeDate(); + // Prevent mixups with unfixed Date object + date.constructor = Date; + return date; + } + return NativeDate.apply(this, arguments); + }; + + // 15.9.1.15 Date Time String Format + var isoDateExpression = new RegExp("^" + + "(?:" + // optional year-month-day + "(" + // year capture + "(?:[+-]\\d\\d)?" + // 15.9.1.15.1 Extended years + "\\d\\d\\d\\d" + // four-digit year + ")" + + "(?:-" + // optional month-day + "(\\d\\d)" + // month capture + "(?:-" + // optional day + "(\\d\\d)" + // day capture + ")?" + + ")?" + + ")?" + + "(?:T" + // hour:minute:second.subsecond + "(\\d\\d)" + // hour capture + ":(\\d\\d)" + // minute capture + "(?::" + // optional :second.subsecond + "(\\d\\d)" + // second capture + "(?:\\.(\\d\\d\\d))?" + // milisecond capture + ")?" + + ")?" + + "(?:" + // time zone + "Z|" + // UTC capture + "([+-])(\\d\\d):(\\d\\d)" + // timezone offset + // capture sign, hour, minute + ")?" + + "$"); + + // Copy any custom methods a 3rd party library may have added + for (var key in NativeDate) + Date[key] = NativeDate[key]; + + // Copy "native" methods explicitly; they may be non-enumerable + Date.now = NativeDate.now; + Date.UTC = NativeDate.UTC; + Date.prototype = NativeDate.prototype; + Date.prototype.constructor = Date; + + // Upgrade Date.parse to handle the ISO dates we use + // TODO review specification to ascertain whether it is + // necessary to implement partial ISO date strings. + Date.parse = function parse(string) { + var match = isoDateExpression.exec(string); + if (match) { + match.shift(); // kill match[0], the full match + // recognize times without dates before normalizing the + // numeric values, for later use + var timeOnly = match[0] === undefined; + // parse numerics + for (var i = 0; i < 10; i++) { + // skip + or - for the timezone offset + if (i === 7) + continue; + // Note: parseInt would read 0-prefix numbers as + // octal. Number constructor or unary + work better + // here: + match[i] = +(match[i] || (i < 3 ? 1 : 0)); + // match[1] is the month. Months are 0-11 in JavaScript + // Date objects, but 1-12 in ISO notation, so we + // decrement. + if (i === 1) + match[i]--; + } + // if no year-month-date is provided, return a milisecond + // quantity instead of a UTC date number value. + if (timeOnly) + return ((match[3] * 60 + match[4]) * 60 + match[5]) * 1000 + match[6]; + + // account for an explicit time zone offset if provided + var offset = (match[8] * 60 + match[9]) * 60 * 1000; + if (match[6] === "-") + offset = -offset; + + return NativeDate.UTC.apply(this, match.slice(0, 7)) + offset; + } + return NativeDate.parse.apply(this, arguments); + }; + + return Date; + })(Date); +} + +// +// String +// ====== +// + +// ES5 15.5.4.20 +if (!String.prototype.trim) { + // http://blog.stevenlevithan.com/archives/faster-trim-javascript + var trimBeginRegexp = /^\s\s*/; + var trimEndRegexp = /\s\s*$/; + String.prototype.trim = function trim() { + return String(this).replace(trimBeginRegexp, '').replace(trimEndRegexp, ''); + }; +} + +});/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/ace', ['require', 'exports', 'module' , 'pilot/index', 'pilot/fixoldbrowsers', 'pilot/plugin_manager', 'pilot/dom', 'pilot/event', 'ace/editor', 'ace/edit_session', 'ace/undomanager', 'ace/virtual_renderer', 'ace/theme/textmate', 'pilot/environment'], function(require, exports, module) { + + require("pilot/index"); + require("pilot/fixoldbrowsers"); + var catalog = require("pilot/plugin_manager").catalog; + catalog.registerPlugins([ "pilot/index" ]); + + var Dom = require("pilot/dom"); + var Event = require("pilot/event"); + + var Editor = require("ace/editor").Editor; + var EditSession = require("ace/edit_session").EditSession; + var UndoManager = require("ace/undomanager").UndoManager; + var Renderer = require("ace/virtual_renderer").VirtualRenderer; + + exports.edit = function(el) { + if (typeof(el) == "string") { + el = document.getElementById(el); + } + + var doc = new EditSession(Dom.getInnerText(el)); + doc.setUndoManager(new UndoManager()); + el.innerHTML = ''; + + var editor = new Editor(new Renderer(el, require("ace/theme/textmate"))); + editor.setSession(doc); + + var env = require("pilot/environment").create(); + catalog.startupPlugins({ env: env }).then(function() { + env.document = doc; + env.editor = editor; + editor.resize(); + Event.addListener(window, "resize", function() { + editor.resize(); + }); + el.env = env; + }); + // Store env on editor such that it can be accessed later on from + // the returned object. + editor.env = env; + return editor; + }; +});/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/index', ['require', 'exports', 'module' , 'pilot/fixoldbrowsers', 'pilot/types/basic', 'pilot/types/command', 'pilot/types/settings', 'pilot/commands/settings', 'pilot/commands/basic', 'pilot/settings/canon', 'pilot/canon'], function(require, exports, module) { + +exports.startup = function(data, reason) { + require('pilot/fixoldbrowsers'); + + require('pilot/types/basic').startup(data, reason); + require('pilot/types/command').startup(data, reason); + require('pilot/types/settings').startup(data, reason); + require('pilot/commands/settings').startup(data, reason); + require('pilot/commands/basic').startup(data, reason); + // require('pilot/commands/history').startup(data, reason); + require('pilot/settings/canon').startup(data, reason); + require('pilot/canon').startup(data, reason); +}; + +exports.shutdown = function(data, reason) { + require('pilot/types/basic').shutdown(data, reason); + require('pilot/types/command').shutdown(data, reason); + require('pilot/types/settings').shutdown(data, reason); + require('pilot/commands/settings').shutdown(data, reason); + require('pilot/commands/basic').shutdown(data, reason); + // require('pilot/commands/history').shutdown(data, reason); + require('pilot/settings/canon').shutdown(data, reason); + require('pilot/canon').shutdown(data, reason); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/types/basic', ['require', 'exports', 'module' , 'pilot/types'], function(require, exports, module) { + +var types = require("pilot/types"); +var Type = types.Type; +var Conversion = types.Conversion; +var Status = types.Status; + +/** + * These are the basic types that we accept. They are vaguely based on the + * Jetpack settings system (https://wiki.mozilla.org/Labs/Jetpack/JEP/24) + * although clearly more restricted. + * + *

        In addition to these types, Jetpack also accepts range, member, password + * that we are thinking of adding. + * + *

        This module probably should not be accessed directly, but instead used + * through types.js + */ + +/** + * 'text' is the default if no type is given. + */ +var text = new Type(); + +text.stringify = function(value) { + return value; +}; + +text.parse = function(value) { + if (typeof value != 'string') { + throw new Error('non-string passed to text.parse()'); + } + return new Conversion(value); +}; + +text.name = 'text'; + +/** + * We don't currently plan to distinguish between integers and floats + */ +var number = new Type(); + +number.stringify = function(value) { + if (!value) { + return null; + } + return '' + value; +}; + +number.parse = function(value) { + if (typeof value != 'string') { + throw new Error('non-string passed to number.parse()'); + } + + if (value.replace(/\s/g, '').length === 0) { + return new Conversion(null, Status.INCOMPLETE, ''); + } + + var reply = new Conversion(parseInt(value, 10)); + if (isNaN(reply.value)) { + reply.status = Status.INVALID; + reply.message = 'Can\'t convert "' + value + '" to a number.'; + } + + return reply; +}; + +number.decrement = function(value) { + return value - 1; +}; + +number.increment = function(value) { + return value + 1; +}; + +number.name = 'number'; + +/** + * One of a known set of options + */ +function SelectionType(typeSpec) { + if (!Array.isArray(typeSpec.data) && typeof typeSpec.data !== 'function') { + throw new Error('instances of SelectionType need typeSpec.data to be an array or function that returns an array:' + JSON.stringify(typeSpec)); + } + Object.keys(typeSpec).forEach(function(key) { + this[key] = typeSpec[key]; + }, this); +}; + +SelectionType.prototype = new Type(); + +SelectionType.prototype.stringify = function(value) { + return value; +}; + +SelectionType.prototype.parse = function(str) { + if (typeof str != 'string') { + throw new Error('non-string passed to parse()'); + } + if (!this.data) { + throw new Error('Missing data on selection type extension.'); + } + var data = (typeof(this.data) === 'function') ? this.data() : this.data; + + // The matchedValue could be the boolean value false + var hasMatched = false; + var matchedValue; + var completions = []; + data.forEach(function(option) { + if (str == option) { + matchedValue = this.fromString(option); + hasMatched = true; + } + else if (option.indexOf(str) === 0) { + completions.push(this.fromString(option)); + } + }, this); + + if (hasMatched) { + return new Conversion(matchedValue); + } + else { + // This is something of a hack it basically allows us to tell the + // setting type to forget its last setting hack. + if (this.noMatch) { + this.noMatch(); + } + + if (completions.length > 0) { + var msg = 'Possibilities' + + (str.length === 0 ? '' : ' for \'' + str + '\''); + return new Conversion(null, Status.INCOMPLETE, msg, completions); + } + else { + var msg = 'Can\'t use \'' + str + '\'.'; + return new Conversion(null, Status.INVALID, msg, completions); + } + } +}; + +SelectionType.prototype.fromString = function(str) { + return str; +}; + +SelectionType.prototype.decrement = function(value) { + var data = (typeof this.data === 'function') ? this.data() : this.data; + var index; + if (value == null) { + index = data.length - 1; + } + else { + var name = this.stringify(value); + var index = data.indexOf(name); + index = (index === 0 ? data.length - 1 : index - 1); + } + return this.fromString(data[index]); +}; + +SelectionType.prototype.increment = function(value) { + var data = (typeof this.data === 'function') ? this.data() : this.data; + var index; + if (value == null) { + index = 0; + } + else { + var name = this.stringify(value); + var index = data.indexOf(name); + index = (index === data.length - 1 ? 0 : index + 1); + } + return this.fromString(data[index]); +}; + +SelectionType.prototype.name = 'selection'; + +/** + * SelectionType is a base class for other types + */ +exports.SelectionType = SelectionType; + +/** + * true/false values + */ +var bool = new SelectionType({ + name: 'bool', + data: [ 'true', 'false' ], + stringify: function(value) { + return '' + value; + }, + fromString: function(str) { + return str === 'true' ? true : false; + } +}); + + +/** + * A we don't know right now, but hope to soon. + */ +function DeferredType(typeSpec) { + if (typeof typeSpec.defer !== 'function') { + throw new Error('Instances of DeferredType need typeSpec.defer to be a function that returns a type'); + } + Object.keys(typeSpec).forEach(function(key) { + this[key] = typeSpec[key]; + }, this); +}; + +DeferredType.prototype = new Type(); + +DeferredType.prototype.stringify = function(value) { + return this.defer().stringify(value); +}; + +DeferredType.prototype.parse = function(value) { + return this.defer().parse(value); +}; + +DeferredType.prototype.decrement = function(value) { + var deferred = this.defer(); + return (deferred.decrement ? deferred.decrement(value) : undefined); +}; + +DeferredType.prototype.increment = function(value) { + var deferred = this.defer(); + return (deferred.increment ? deferred.increment(value) : undefined); +}; + +DeferredType.prototype.name = 'deferred'; + +/** + * DeferredType is a base class for other types + */ +exports.DeferredType = DeferredType; + + +/** + * A set of objects of the same type + */ +function ArrayType(typeSpec) { + if (typeSpec instanceof Type) { + this.subtype = typeSpec; + } + else if (typeof typeSpec === 'string') { + this.subtype = types.getType(typeSpec); + if (this.subtype == null) { + throw new Error('Unknown array subtype: ' + typeSpec); + } + } + else { + throw new Error('Can\' handle array subtype'); + } +}; + +ArrayType.prototype = new Type(); + +ArrayType.prototype.stringify = function(values) { + // TODO: Check for strings with spaces and add quotes + return values.join(' '); +}; + +ArrayType.prototype.parse = function(value) { + return this.defer().parse(value); +}; + +ArrayType.prototype.name = 'array'; + +/** + * Registration and de-registration. + */ +var isStarted = false; +exports.startup = function() { + if (isStarted) { + return; + } + isStarted = true; + types.registerType(text); + types.registerType(number); + types.registerType(bool); + types.registerType(SelectionType); + types.registerType(DeferredType); + types.registerType(ArrayType); +}; + +exports.shutdown = function() { + isStarted = false; + types.unregisterType(text); + types.unregisterType(number); + types.unregisterType(bool); + types.unregisterType(SelectionType); + types.unregisterType(DeferredType); + types.unregisterType(ArrayType); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/types', ['require', 'exports', 'module' ], function(require, exports, module) { + +/** + * Some types can detect validity, that is to say they can distinguish between + * valid and invalid values. + * TODO: Change these constants to be numbers for more performance? + */ +var Status = { + /** + * The conversion process worked without any problem, and the value is + * valid. There are a number of failure states, so the best way to check + * for failure is (x !== Status.VALID) + */ + VALID: { + toString: function() { return 'VALID'; }, + valueOf: function() { return 0; } + }, + + /** + * A conversion process failed, however it was noted that the string + * provided to 'parse()' could be VALID by the addition of more characters, + * so the typing may not be actually incorrect yet, just unfinished. + * @see Status.INVALID + */ + INCOMPLETE: { + toString: function() { return 'INCOMPLETE'; }, + valueOf: function() { return 1; } + }, + + /** + * The conversion process did not work, the value should be null and a + * reason for failure should have been provided. In addition some completion + * values may be available. + * @see Status.INCOMPLETE + */ + INVALID: { + toString: function() { return 'INVALID'; }, + valueOf: function() { return 2; } + }, + + /** + * A combined status is the worser of the provided statuses + */ + combine: function(statuses) { + var combined = Status.VALID; + for (var i = 0; i < statuses.length; i++) { + if (statuses[i].valueOf() > combined.valueOf()) { + combined = statuses[i]; + } + } + return combined; + } +}; +exports.Status = Status; + +/** + * The type.parse() method returns a Conversion to inform the user about not + * only the result of a Conversion but also about what went wrong. + * We could use an exception, and throw if the conversion failed, but that + * seems to violate the idea that exceptions should be exceptional. Typos are + * not. Also in order to store both a status and a message we'd still need + * some sort of exception type... + */ +function Conversion(value, status, message, predictions) { + /** + * The result of the conversion process. Will be null if status != VALID + */ + this.value = value; + + /** + * The status of the conversion. + * @see Status + */ + this.status = status || Status.VALID; + + /** + * A message to go with the conversion. This could be present for any status + * including VALID in the case where we want to note a warning for example. + * I18N: On the one hand this nasty and un-internationalized, however with + * a command line it is hard to know where to start. + */ + this.message = message; + + /** + * A array of strings which are the systems best guess at better inputs than + * the one presented. + * We generally expect there to be about 7 predictions (to match human list + * comprehension ability) however it is valid to provide up to about 20, + * or less. It is the job of the predictor to decide a smart cut-off. + * For example if there are 4 very good matches and 4 very poor ones, + * probably only the 4 very good matches should be presented. + */ + this.predictions = predictions || []; +} +exports.Conversion = Conversion; + +/** + * Most of our types are 'static' e.g. there is only one type of 'text', however + * some types like 'selection' and 'deferred' are customizable. The basic + * Type type isn't useful, but does provide documentation about what types do. + */ +function Type() { +}; +Type.prototype = { + /** + * Convert the given value to a string representation. + * Where possible, there should be round-tripping between values and their + * string representations. + */ + stringify: function(value) { throw new Error("not implemented"); }, + + /** + * Convert the given str to an instance of this type. + * Where possible, there should be round-tripping between values and their + * string representations. + * @return Conversion + */ + parse: function(str) { throw new Error("not implemented"); }, + + /** + * The plug-in system, and other things need to know what this type is + * called. The name alone is not enough to fully specify a type. Types like + * 'selection' and 'deferred' need extra data, however this function returns + * only the name, not the extra data. + *

        In old bespin, equality was based on the name. This may turn out to be + * important in Ace too. + */ + name: undefined, + + /** + * If there is some concept of a higher value, return it, + * otherwise return undefined. + */ + increment: function(value) { + return undefined; + }, + + /** + * If there is some concept of a lower value, return it, + * otherwise return undefined. + */ + decrement: function(value) { + return undefined; + }, + + /** + * There is interesting information (like predictions) in a conversion of + * nothing, the output of this can sometimes be customized. + * @return Conversion + */ + getDefault: function() { + return this.parse(''); + } +}; +exports.Type = Type; + +/** + * Private registry of types + * Invariant: types[name] = type.name + */ +var types = {}; + +/** + * Add a new type to the list available to the system. + * You can pass 2 things to this function - either an instance of Type, in + * which case we return this instance when #getType() is called with a 'name' + * that matches type.name. + * Also you can pass in a constructor (i.e. function) in which case when + * #getType() is called with a 'name' that matches Type.prototype.name we will + * pass the typeSpec into this constructor. See #reconstituteType(). + */ +exports.registerType = function(type) { + if (typeof type === 'object') { + if (type instanceof Type) { + if (!type.name) { + throw new Error('All registered types must have a name'); + } + types[type.name] = type; + } + else { + throw new Error('Can\'t registerType using: ' + type); + } + } + else if (typeof type === 'function') { + if (!type.prototype.name) { + throw new Error('All registered types must have a name'); + } + types[type.prototype.name] = type; + } + else { + throw new Error('Unknown type: ' + type); + } +}; + +exports.registerTypes = function registerTypes(types) { + Object.keys(types).forEach(function (name) { + var type = types[name]; + type.name = name; + exports.registerType(type); + }); +}; + +/** + * Remove a type from the list available to the system + */ +exports.deregisterType = function(type) { + delete types[type.name]; +}; + +/** + * See description of #exports.registerType() + */ +function reconstituteType(name, typeSpec) { + if (name.substr(-2) === '[]') { // i.e. endsWith('[]') + var subtypeName = name.slice(0, -2); + return new types['array'](subtypeName); + } + + var type = types[name]; + if (typeof type === 'function') { + type = new type(typeSpec); + } + return type; +} + +/** + * Find a type, previously registered using #registerType() + */ +exports.getType = function(typeSpec) { + if (typeof typeSpec === 'string') { + return reconstituteType(typeSpec); + } + + if (typeof typeSpec === 'object') { + if (!typeSpec.name) { + throw new Error('Missing \'name\' member to typeSpec'); + } + return reconstituteType(typeSpec.name, typeSpec); + } + + throw new Error('Can\'t extract type from ' + typeSpec); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/types/command', ['require', 'exports', 'module' , 'pilot/canon', 'pilot/types/basic', 'pilot/types'], function(require, exports, module) { + +var canon = require("pilot/canon"); +var SelectionType = require("pilot/types/basic").SelectionType; +var types = require("pilot/types"); + + +/** + * Select from the available commands + */ +var command = new SelectionType({ + name: 'command', + data: function() { + return canon.getCommandNames(); + }, + stringify: function(command) { + return command.name; + }, + fromString: function(str) { + return canon.getCommand(str); + } +}); + + +/** + * Registration and de-registration. + */ +exports.startup = function() { + types.registerType(command); +}; + +exports.shutdown = function() { + types.unregisterType(command); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/canon', ['require', 'exports', 'module' , 'pilot/console', 'pilot/stacktrace', 'pilot/oop', 'pilot/useragent', 'pilot/keys', 'pilot/event_emitter', 'pilot/typecheck', 'pilot/catalog', 'pilot/types', 'pilot/lang'], function(require, exports, module) { + +var console = require('pilot/console'); +var Trace = require('pilot/stacktrace').Trace; +var oop = require('pilot/oop'); +var useragent = require('pilot/useragent'); +var keyUtil = require('pilot/keys'); +var EventEmitter = require('pilot/event_emitter').EventEmitter; +var typecheck = require('pilot/typecheck'); +var catalog = require('pilot/catalog'); +var Status = require('pilot/types').Status; +var types = require('pilot/types'); +var lang = require('pilot/lang'); + +/* +// TODO: this doesn't belong here - or maybe anywhere? +var dimensionsChangedExtensionSpec = { + name: 'dimensionsChanged', + description: 'A dimensionsChanged is a way to be notified of ' + + 'changes to the dimension of Skywriter' +}; +exports.startup = function(data, reason) { + catalog.addExtensionSpec(commandExtensionSpec); +}; +exports.shutdown = function(data, reason) { + catalog.removeExtensionSpec(commandExtensionSpec); +}; +*/ + +var commandExtensionSpec = { + name: 'command', + description: 'A command is a bit of functionality with optional ' + + 'typed arguments which can do something small like moving ' + + 'the cursor around the screen, or large like cloning a ' + + 'project from VCS.', + indexOn: 'name' +}; + +exports.startup = function(data, reason) { + // TODO: this is probably all kinds of evil, but we need something working + catalog.addExtensionSpec(commandExtensionSpec); +}; + +exports.shutdown = function(data, reason) { + catalog.removeExtensionSpec(commandExtensionSpec); +}; + +/** + * Manage a list of commands in the current canon + */ + +/** + * A Command is a discrete action optionally with a set of ways to customize + * how it happens. This is here for documentation purposes. + * TODO: Document better + */ +var thingCommand = { + name: 'thing', + description: 'thing is an example command', + params: [{ + name: 'param1', + description: 'an example parameter', + type: 'text', + defaultValue: null + }], + exec: function(env, args, request) { + thing(); + } +}; + +/** + * A lookup hash of our registered commands + */ +var commands = {}; + +/** + * A lookup has for command key bindings that use a string as sender. + */ +var commmandKeyBinding = {}; + +/** + * Array with command key bindings that use a function to determ the sender. + */ +var commandKeyBindingFunc = { }; + +function splitSafe(s, separator, limit, bLowerCase) { + return (bLowerCase && s.toLowerCase() || s) + .replace(/(?:^\s+|\n|\s+$)/g, "") + .split(new RegExp("[\\s ]*" + separator + "[\\s ]*", "g"), limit || 999); +} + +function parseKeys(keys, val, ret) { + var key, + hashId = 0, + parts = splitSafe(keys, "\\-", null, true), + i = 0, + l = parts.length; + + for (; i < l; ++i) { + if (keyUtil.KEY_MODS[parts[i]]) + hashId = hashId | keyUtil.KEY_MODS[parts[i]]; + else + key = parts[i] || "-"; //when empty, the splitSafe removed a '-' + } + + if (ret == null) { + return { + key: key, + hashId: hashId + } + } else { + (ret[hashId] || (ret[hashId] = {}))[key] = val; + } +} + +var platform = useragent.isMac ? "mac" : "win"; +function buildKeyHash(command) { + var binding = command.bindKey, + key = binding[platform], + ckb = commmandKeyBinding, + ckbf = commandKeyBindingFunc + + if (!binding.sender) { + throw new Error('All key bindings must have a sender'); + } + if (!binding.mac && binding.mac !== null) { + throw new Error('All key bindings must have a mac key binding'); + } + if (!binding.win && binding.win !== null) { + throw new Error('All key bindings must have a windows key binding'); + } + if(!binding[platform]) { + // No keymapping for this platform. + return; + } + if (typeof binding.sender == 'string') { + var targets = splitSafe(binding.sender, "\\|", null, true); + targets.forEach(function(target) { + if (!ckb[target]) { + ckb[target] = { }; + } + key.split("|").forEach(function(keyPart) { + parseKeys(keyPart, command, ckb[target]); + }); + }); + } else if (typecheck.isFunction(binding.sender)) { + var val = { + command: command, + sender: binding.sender + }; + + keyData = parseKeys(key); + if (!ckbf[keyData.hashId]) { + ckbf[keyData.hashId] = { }; + } + if (!ckbf[keyData.hashId][keyData.key]) { + ckbf[keyData.hashId][keyData.key] = [ val ]; + } else { + ckbf[keyData.hashId][keyData.key].push(val); + } + } else { + throw new Error('Key binding must have a sender that is a string or function'); + } +} + +function findKeyCommand(env, sender, hashId, textOrKey) { + // Convert keyCode to the string representation. + if (typecheck.isNumber(textOrKey)) { + textOrKey = keyUtil.keyCodeToString(textOrKey); + } + + // Check bindings with functions as sender first. + var bindFuncs = (commandKeyBindingFunc[hashId] || {})[textOrKey] || []; + for (var i = 0; i < bindFuncs.length; i++) { + if (bindFuncs[i].sender(env, sender, hashId, textOrKey)) { + return bindFuncs[i].command; + } + } + + var ckbr = commmandKeyBinding[sender]; + return ckbr && ckbr[hashId] && ckbr[hashId][textOrKey]; +} + +function execKeyCommand(env, sender, hashId, textOrKey) { + var command = findKeyCommand(env, sender, hashId, textOrKey); + if (command) { + return exec(command, env, sender, { }); + } else { + return false; + } +} + +/** + * A sorted list of command names, we regularly want them in order, so pre-sort + */ +var commandNames = []; + +/** + * This registration method isn't like other Ace registration methods because + * it doesn't return a decorated command because there is no functional + * decoration to be done. + * TODO: Are we sure that in the future there will be no such decoration? + */ +function addCommand(command) { + if (!command.name) { + throw new Error('All registered commands must have a name'); + } + if (command.params == null) { + command.params = []; + } + if (!Array.isArray(command.params)) { + throw new Error('command.params must be an array in ' + command.name); + } + // Replace the type + command.params.forEach(function(param) { + if (!param.name) { + throw new Error('In ' + command.name + ': all params must have a name'); + } + upgradeType(command.name, param); + }, this); + commands[command.name] = command; + + if (command.bindKey) { + buildKeyHash(command); + } + + commandNames.push(command.name); + commandNames.sort(); +}; + +function upgradeType(name, param) { + var lookup = param.type; + param.type = types.getType(lookup); + if (param.type == null) { + throw new Error('In ' + name + '/' + param.name + + ': can\'t find type for: ' + JSON.stringify(lookup)); + } +} + +function removeCommand(command) { + var name = (typeof command === 'string' ? command : command.name); + command = commands[name]; + delete commands[name]; + lang.arrayRemove(commandNames, name); + + // exaustive search is a little bit brute force but since removeCommand is + // not a performance critical operation this should be OK + var ckb = commmandKeyBinding; + for (var k1 in ckb) { + for (var k2 in ckb[k1]) { + for (var k3 in ckb[k1][k2]) { + if (ckb[k1][k2][k3] == command) + delete ckb[k1][k2][k3]; + } + } + } + + var ckbf = commandKeyBindingFunc; + for (var k1 in ckbf) { + for (var k2 in ckbf[k1]) { + ckbf[k1][k2].forEach(function(cmd, i) { + if (cmd.command == command) { + ckbf[k1][k2].splice(i, 1); + } + }) + } + } +}; + +function getCommand(name) { + return commands[name]; +}; + +function getCommandNames() { + return commandNames; +}; + +/** + * Default ArgumentProvider that is used if no ArgumentProvider is provided + * by the command's sender. + */ +function defaultArgsProvider(request, callback) { + var args = request.args, + params = request.command.params; + + for (var i = 0; i < params.length; i++) { + var param = params[i]; + + // If the parameter is already valid, then don't ask for it anymore. + if (request.getParamStatus(param) != Status.VALID || + // Ask for optional parameters as well. + param.defaultValue === null) + { + var paramPrompt = param.description; + if (param.defaultValue === null) { + paramPrompt += " (optional)"; + } + var value = prompt(paramPrompt, param.defaultValue || ""); + // No value but required -> nope. + if (!value) { + callback(); + return; + } else { + args[param.name] = value; + } + } + } + callback(); +} + +/** + * Entry point for keyboard accelerators or anything else that wants to execute + * a command. A new request object is created and a check performed, if the + * passed in arguments are VALID/INVALID or INCOMPLETE. If they are INCOMPLETE + * the ArgumentProvider on the sender is called or otherwise the default + * ArgumentProvider to get the still required arguments. + * If they are valid (or valid after the ArgumentProvider is done), the command + * is executed. + * + * @param command Either a command, or the name of one + * @param env Current environment to execute the command in + * @param sender String that should be the same as the senderObject stored on + * the environment in env[sender] + * @param args Arguments for the command + * @param typed (Optional) + */ +function exec(command, env, sender, args, typed) { + if (typeof command === 'string') { + command = commands[command]; + } + if (!command) { + // TODO: Should we complain more than returning false? + return false; + } + + var request = new Request({ + sender: sender, + command: command, + args: args || {}, + typed: typed + }); + + /** + * Executes the command and ensures request.done is called on the request in + * case it's not marked to be done already or async. + */ + function execute() { + command.exec(env, request.args, request); + + // If the request isn't asnync and isn't done, then make it done. + if (!request.isAsync && !request.isDone) { + request.done(); + } + } + + + if (request.getStatus() == Status.INVALID) { + console.error("Canon.exec: Invalid parameter(s) passed to " + + command.name); + return false; + } + // If the request isn't complete yet, try to complete it. + else if (request.getStatus() == Status.INCOMPLETE) { + // Check if the sender has a ArgsProvider, otherwise use the default + // build in one. + var argsProvider; + var senderObj = env[sender]; + if (!senderObj || !senderObj.getArgsProvider || + !(argsProvider = senderObj.getArgsProvider())) + { + argsProvider = defaultArgsProvider; + } + + // Ask the paramProvider to complete the request. + argsProvider(request, function() { + if (request.getStatus() == Status.VALID) { + execute(); + } + }); + return true; + } else { + execute(); + return true; + } +}; + +exports.removeCommand = removeCommand; +exports.addCommand = addCommand; +exports.getCommand = getCommand; +exports.getCommandNames = getCommandNames; +exports.findKeyCommand = findKeyCommand; +exports.exec = exec; +exports.execKeyCommand = execKeyCommand; +exports.upgradeType = upgradeType; + + +/** + * We publish a 'output' event whenever new command begins output + * TODO: make this more obvious + */ +oop.implement(exports, EventEmitter); + + +/** + * Current requirements are around displaying the command line, and provision + * of a 'history' command and cursor up|down navigation of history. + *

        Future requirements could include: + *

          + *
        • Multiple command lines + *
        • The ability to recall key presses (i.e. requests with no output) which + * will likely be needed for macro recording or similar + *
        • The ability to store the command history either on the server or in the + * browser local storage. + *
        + *

        The execute() command doesn't really live here, except as part of that + * last future requirement, and because it doesn't really have anywhere else to + * live. + */ + +/** + * The array of requests that wish to announce their presence + */ +var requests = []; + +/** + * How many requests do we store? + */ +var maxRequestLength = 100; + +/** + * To create an invocation, you need to do something like this (all the ctor + * args are optional): + *

        + * var request = new Request({
        + *     command: command,
        + *     args: args,
        + *     typed: typed
        + * });
        + * 
        + * @constructor + */ +function Request(options) { + options = options || {}; + + // Will be used in the keyboard case and the cli case + this.command = options.command; + + // Will be used only in the cli case + this.args = options.args; + this.typed = options.typed; + + // Have we been initialized? + this._begunOutput = false; + + this.start = new Date(); + this.end = null; + this.completed = false; + this.error = false; +}; + +oop.implement(Request.prototype, EventEmitter); + +/** + * Return the status of a parameter on the request object. + */ +Request.prototype.getParamStatus = function(param) { + var args = this.args || {}; + + // Check if there is already a value for this parameter. + if (param.name in args) { + // If there is no value set and then the value is VALID if it's not + // required or INCOMPLETE if not set yet. + if (args[param.name] == null) { + if (param.defaultValue === null) { + return Status.VALID; + } else { + return Status.INCOMPLETE; + } + } + + // Check if the parameter value is valid. + var reply, + // The passed in value when parsing a type is a string. + argsValue = args[param.name].toString(); + + // Type.parse can throw errors. + try { + reply = param.type.parse(argsValue); + } catch (e) { + return Status.INVALID; + } + + if (reply.status != Status.VALID) { + return reply.status; + } + } + // Check if the param is marked as required. + else if (param.defaultValue === undefined) { + // The parameter is not set on the args object but it's required, + // which means, things are invalid. + return Status.INCOMPLETE; + } + + return Status.VALID; +} + +/** + * Return the status of a parameter name on the request object. + */ +Request.prototype.getParamNameStatus = function(paramName) { + var params = this.command.params || []; + + for (var i = 0; i < params.length; i++) { + if (params[i].name == paramName) { + return this.getParamStatus(params[i]); + } + } + + throw "Parameter '" + paramName + + "' not defined on command '" + this.command.name + "'"; +} + +/** + * Checks if all required arguments are set on the request such that it can + * get executed. + */ +Request.prototype.getStatus = function() { + var args = this.args || {}, + params = this.command.params; + + // If there are not parameters, then it's valid. + if (!params || params.length == 0) { + return Status.VALID; + } + + var status = []; + for (var i = 0; i < params.length; i++) { + status.push(this.getParamStatus(params[i])); + } + + return Status.combine(status); +} + +/** + * Lazy init to register with the history should only be done on output. + * init() is expensive, and won't be used in the majority of cases + */ +Request.prototype._beginOutput = function() { + this._begunOutput = true; + this.outputs = []; + + requests.push(this); + // This could probably be optimized with some maths, but 99.99% of the + // time we will only be off by one, and I'm feeling lazy. + while (requests.length > maxRequestLength) { + requests.shiftObject(); + } + + exports._dispatchEvent('output', { requests: requests, request: this }); +}; + +/** + * Sugar for: + *
        request.error = true; request.done(output);
        + */ +Request.prototype.doneWithError = function(content) { + this.error = true; + this.done(content); +}; + +/** + * Declares that this function will not be automatically done when + * the command exits + */ +Request.prototype.async = function() { + this.isAsync = true; + if (!this._begunOutput) { + this._beginOutput(); + } +}; + +/** + * Complete the currently executing command with successful output. + * @param output Either DOM node, an SproutCore element or something that + * can be used in the content of a DIV to create a DOM node. + */ +Request.prototype.output = function(content) { + if (!this._begunOutput) { + this._beginOutput(); + } + + if (typeof content !== 'string' && !(content instanceof Node)) { + content = content.toString(); + } + + this.outputs.push(content); + this.isDone = true; + this._dispatchEvent('output', {}); + + return this; +}; + +/** + * All commands that do output must call this to indicate that the command + * has finished execution. + */ +Request.prototype.done = function(content) { + this.completed = true; + this.end = new Date(); + this.duration = this.end.getTime() - this.start.getTime(); + + if (content) { + this.output(content); + } + + // Ensure to finish the request only once. + if (!this.isDone) { + this.isDone = true; + this._dispatchEvent('output', {}); + } +}; +exports.Request = Request; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * Patrick Walton (pwalton@mozilla.com) + * Julian Viereck (jviereck@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ +define('pilot/console', ['require', 'exports', 'module' ], function(require, exports, module) { + +/** + * This object represents a "safe console" object that forwards debugging + * messages appropriately without creating a dependency on Firebug in Firefox. + */ + +var noop = function() {}; + +// These are the functions that are available in Chrome 4/5, Safari 4 +// and Firefox 3.6. Don't add to this list without checking browser support +var NAMES = [ + "assert", "count", "debug", "dir", "dirxml", "error", "group", "groupEnd", + "info", "log", "profile", "profileEnd", "time", "timeEnd", "trace", "warn" +]; + +if (typeof(window) === 'undefined') { + // We're in a web worker. Forward to the main thread so the messages + // will show up. + NAMES.forEach(function(name) { + exports[name] = function() { + var args = Array.prototype.slice.call(arguments); + var msg = { op: 'log', method: name, args: args }; + postMessage(JSON.stringify(msg)); + }; + }); +} else { + // For each of the console functions, copy them if they exist, stub if not + NAMES.forEach(function(name) { + if (window.console && window.console[name]) { + exports[name] = Function.prototype.bind.call(window.console[name], window.console); + } else { + exports[name] = noop; + } + }); +} + +}); +define('pilot/stacktrace', ['require', 'exports', 'module' , 'pilot/useragent', 'pilot/console'], function(require, exports, module) { + +var ua = require("pilot/useragent"); +var console = require('pilot/console'); + +// Changed to suit the specific needs of running within Skywriter + +// Domain Public by Eric Wendelin http://eriwen.com/ (2008) +// Luke Smith http://lucassmith.name/ (2008) +// Loic Dachary (2008) +// Johan Euphrosine (2008) +// Øyvind Sean Kinsey http://kinsey.no/blog +// +// Information and discussions +// http://jspoker.pokersource.info/skin/test-printstacktrace.html +// http://eriwen.com/javascript/js-stack-trace/ +// http://eriwen.com/javascript/stacktrace-update/ +// http://pastie.org/253058 +// http://browsershots.org/http://jspoker.pokersource.info/skin/test-printstacktrace.html +// + +// +// guessFunctionNameFromLines comes from firebug +// +// Software License Agreement (BSD License) +// +// Copyright (c) 2007, Parakey Inc. +// All rights reserved. +// +// Redistribution and use of this software in source and binary forms, with or without modification, +// are permitted provided that the following conditions are met: +// +// * Redistributions of source code must retain the above +// copyright notice, this list of conditions and the +// following disclaimer. +// +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the +// following disclaimer in the documentation and/or other +// materials provided with the distribution. +// +// * Neither the name of Parakey Inc. nor the names of its +// contributors may be used to endorse or promote products +// derived from this software without specific prior +// written permission of Parakey Inc. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR +// IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND +// FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR +// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER +// IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +// OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +/** + * Different browsers create stack traces in different ways. + * Feature Browser detection baby ;). + */ +var mode = (function() { + + // We use SC's browser detection here to avoid the "break on error" + // functionality provided by Firebug. Firebug tries to do the right + // thing here and break, but it happens every time you load the page. + // bug 554105 + if (ua.isGecko) { + return 'firefox'; + } else if (ua.isOpera) { + return 'opera'; + } else { + return 'other'; + } + + // SC doesn't do any detection of Chrome at this time. + + // this is the original feature detection code that is used as a + // fallback. + try { + (0)(); + } catch (e) { + if (e.arguments) { + return 'chrome'; + } + if (e.stack) { + return 'firefox'; + } + if (window.opera && !('stacktrace' in e)) { //Opera 9- + return 'opera'; + } + } + return 'other'; +})(); + +/** + * + */ +function stringifyArguments(args) { + for (var i = 0; i < args.length; ++i) { + var argument = args[i]; + if (typeof argument == 'object') { + args[i] = '#object'; + } else if (typeof argument == 'function') { + args[i] = '#function'; + } else if (typeof argument == 'string') { + args[i] = '"' + argument + '"'; + } + } + return args.join(','); +} + +/** + * Extract a stack trace from the format emitted by each browser. + */ +var decoders = { + chrome: function(e) { + var stack = e.stack; + if (!stack) { + console.log(e); + return []; + } + return stack.replace(/^.*?\n/, ''). + replace(/^.*?\n/, ''). + replace(/^.*?\n/, ''). + replace(/^[^\(]+?[\n$]/gm, ''). + replace(/^\s+at\s+/gm, ''). + replace(/^Object.\s*\(/gm, '{anonymous}()@'). + split('\n'); + }, + + firefox: function(e) { + var stack = e.stack; + if (!stack) { + console.log(e); + return []; + } + // stack = stack.replace(/^.*?\n/, ''); + stack = stack.replace(/(?:\n@:0)?\s+$/m, ''); + stack = stack.replace(/^\(/gm, '{anonymous}('); + return stack.split('\n'); + }, + + // Opera 7.x and 8.x only! + opera: function(e) { + var lines = e.message.split('\n'), ANON = '{anonymous}', + lineRE = /Line\s+(\d+).*?script\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i, i, j, len; + + for (i = 4, j = 0, len = lines.length; i < len; i += 2) { + if (lineRE.test(lines[i])) { + lines[j++] = (RegExp.$3 ? RegExp.$3 + '()@' + RegExp.$2 + RegExp.$1 : ANON + '()@' + RegExp.$2 + ':' + RegExp.$1) + + ' -- ' + + lines[i + 1].replace(/^\s+/, ''); + } + } + + lines.splice(j, lines.length - j); + return lines; + }, + + // Safari, Opera 9+, IE, and others + other: function(curr) { + var ANON = '{anonymous}', fnRE = /function\s*([\w\-$]+)?\s*\(/i, stack = [], j = 0, fn, args; + + var maxStackSize = 10; + while (curr && stack.length < maxStackSize) { + fn = fnRE.test(curr.toString()) ? RegExp.$1 || ANON : ANON; + args = Array.prototype.slice.call(curr['arguments']); + stack[j++] = fn + '(' + stringifyArguments(args) + ')'; + + //Opera bug: if curr.caller does not exist, Opera returns curr (WTF) + if (curr === curr.caller && window.opera) { + //TODO: check for same arguments if possible + break; + } + curr = curr.caller; + } + return stack; + } +}; + +/** + * + */ +function NameGuesser() { +} + +NameGuesser.prototype = { + + sourceCache: {}, + + ajax: function(url) { + var req = this.createXMLHTTPObject(); + if (!req) { + return; + } + req.open('GET', url, false); + req.setRequestHeader('User-Agent', 'XMLHTTP/1.0'); + req.send(''); + return req.responseText; + }, + + createXMLHTTPObject: function() { + // Try XHR methods in order and store XHR factory + var xmlhttp, XMLHttpFactories = [ + function() { + return new XMLHttpRequest(); + }, function() { + return new ActiveXObject('Msxml2.XMLHTTP'); + }, function() { + return new ActiveXObject('Msxml3.XMLHTTP'); + }, function() { + return new ActiveXObject('Microsoft.XMLHTTP'); + } + ]; + for (var i = 0; i < XMLHttpFactories.length; i++) { + try { + xmlhttp = XMLHttpFactories[i](); + // Use memoization to cache the factory + this.createXMLHTTPObject = XMLHttpFactories[i]; + return xmlhttp; + } catch (e) {} + } + }, + + getSource: function(url) { + if (!(url in this.sourceCache)) { + this.sourceCache[url] = this.ajax(url).split('\n'); + } + return this.sourceCache[url]; + }, + + guessFunctions: function(stack) { + for (var i = 0; i < stack.length; ++i) { + var reStack = /{anonymous}\(.*\)@(\w+:\/\/([-\w\.]+)+(:\d+)?[^:]+):(\d+):?(\d+)?/; + var frame = stack[i], m = reStack.exec(frame); + if (m) { + var file = m[1], lineno = m[4]; //m[7] is character position in Chrome + if (file && lineno) { + var functionName = this.guessFunctionName(file, lineno); + stack[i] = frame.replace('{anonymous}', functionName); + } + } + } + return stack; + }, + + guessFunctionName: function(url, lineNo) { + try { + return this.guessFunctionNameFromLines(lineNo, this.getSource(url)); + } catch (e) { + return 'getSource failed with url: ' + url + ', exception: ' + e.toString(); + } + }, + + guessFunctionNameFromLines: function(lineNo, source) { + var reFunctionArgNames = /function ([^(]*)\(([^)]*)\)/; + var reGuessFunction = /['"]?([0-9A-Za-z_]+)['"]?\s*[:=]\s*(function|eval|new Function)/; + // Walk backwards from the first line in the function until we find the line which + // matches the pattern above, which is the function definition + var line = '', maxLines = 10; + for (var i = 0; i < maxLines; ++i) { + line = source[lineNo - i] + line; + if (line !== undefined) { + var m = reGuessFunction.exec(line); + if (m) { + return m[1]; + } + else { + m = reFunctionArgNames.exec(line); + } + if (m && m[1]) { + return m[1]; + } + } + } + return '(?)'; + } +}; + +var guesser = new NameGuesser(); + +var frameIgnorePatterns = [ + /http:\/\/localhost:4020\/sproutcore.js:/ +]; + +exports.ignoreFramesMatching = function(regex) { + frameIgnorePatterns.push(regex); +}; + +/** + * Create a stack trace from an exception + * @param ex {Error} The error to create a stacktrace from (optional) + * @param guess {Boolean} If we should try to resolve the names of anonymous functions + */ +exports.Trace = function Trace(ex, guess) { + this._ex = ex; + this._stack = decoders[mode](ex); + + if (guess) { + this._stack = guesser.guessFunctions(this._stack); + } +}; + +/** + * Log to the console a number of lines (default all of them) + * @param lines {number} Maximum number of lines to wrote to console + */ +exports.Trace.prototype.log = function(lines) { + if (lines <= 0) { + // You aren't going to have more lines in your stack trace than this + // and it still fits in a 32bit integer + lines = 999999999; + } + + var printed = 0; + for (var i = 0; i < this._stack.length && printed < lines; i++) { + var frame = this._stack[i]; + var display = true; + frameIgnorePatterns.forEach(function(regex) { + if (regex.test(frame)) { + display = false; + } + }); + if (display) { + console.debug(frame); + printed++; + } + } +}; + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/useragent', ['require', 'exports', 'module' ], function(require, exports, module) { + +var os = (navigator.platform.match(/mac|win|linux/i) || ["other"])[0].toLowerCase(); +var ua = navigator.userAgent; +var av = navigator.appVersion; + +/** Is the user using a browser that identifies itself as Windows */ +exports.isWin = (os == "win"); + +/** Is the user using a browser that identifies itself as Mac OS */ +exports.isMac = (os == "mac"); + +/** Is the user using a browser that identifies itself as Linux */ +exports.isLinux = (os == "linux"); + +exports.isIE = ! + "\v1"; + +/** Is this Firefox or related? */ +exports.isGecko = exports.isMozilla = window.controllers && window.navigator.product === "Gecko"; + +/** oldGecko == rev < 2.0 **/ +exports.isOldGecko = exports.isGecko && /rv\:1/.test(navigator.userAgent); + +/** Is this Opera */ +exports.isOpera = window.opera && Object.prototype.toString.call(window.opera) == "[object Opera]"; + +/** Is the user using a browser that identifies itself as WebKit */ +exports.isWebKit = parseFloat(ua.split("WebKit/")[1]) || undefined; + +exports.isChrome = parseFloat(ua.split(" Chrome/")[1]) || undefined; + +exports.isAIR = ua.indexOf("AdobeAIR") >= 0; + +exports.isIPad = ua.indexOf("iPad") >= 0; + +/** + * I hate doing this, but we need some way to determine if the user is on a Mac + * The reason is that users have different expectations of their key combinations. + * + * Take copy as an example, Mac people expect to use CMD or APPLE + C + * Windows folks expect to use CTRL + C + */ +exports.OS = { + LINUX: 'LINUX', + MAC: 'MAC', + WINDOWS: 'WINDOWS' +}; + +/** + * Return an exports.OS constant + */ +exports.getOS = function() { + if (exports.isMac) { + return exports.OS['MAC']; + } else if (exports.isLinux) { + return exports.OS['LINUX']; + } else { + return exports.OS['WINDOWS']; + } +}; + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/oop', ['require', 'exports', 'module' ], function(require, exports, module) { + +exports.inherits = (function() { + var tempCtor = function() {}; + return function(ctor, superCtor) { + tempCtor.prototype = superCtor.prototype; + ctor.super_ = superCtor.prototype; + ctor.prototype = new tempCtor(); + ctor.prototype.constructor = ctor; + } +}()); + +exports.mixin = function(obj, mixin) { + for (var key in mixin) { + obj[key] = mixin[key]; + } +}; + +exports.implement = function(proto, mixin) { + exports.mixin(proto, mixin); +}; + +}); +/*! @license +========================================================================== +SproutCore -- JavaScript Application Framework +copyright 2006-2009, Sprout Systems Inc., Apple Inc. and contributors. + +Permission is hereby granted, free of charge, to any person obtaining a +copy of this software and associated documentation files (the "Software"), +to deal in the Software without restriction, including without limitation +the rights to use, copy, modify, merge, publish, distribute, sublicense, +and/or sell copies of the Software, and to permit persons to whom the +Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING +FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER +DEALINGS IN THE SOFTWARE. + +SproutCore and the SproutCore logo are trademarks of Sprout Systems, Inc. + +For more information about SproutCore, visit http://www.sproutcore.com + + +========================================================================== +@license */ + +// Most of the following code is taken from SproutCore with a few changes. + +define('pilot/keys', ['require', 'exports', 'module' , 'pilot/oop'], function(require, exports, module) { + +var oop = require("pilot/oop"); + +/** + * Helper functions and hashes for key handling. + */ +var Keys = (function() { + var ret = { + MODIFIER_KEYS: { + 16: 'Shift', 17: 'Ctrl', 18: 'Alt', 224: 'Meta' + }, + + KEY_MODS: { + "ctrl": 1, "alt": 2, "option" : 2, + "shift": 4, "meta": 8, "command": 8 + }, + + FUNCTION_KEYS : { + 8 : "Backspace", + 9 : "Tab", + 13 : "Return", + 19 : "Pause", + 27 : "Esc", + 32 : "Space", + 33 : "PageUp", + 34 : "PageDown", + 35 : "End", + 36 : "Home", + 37 : "Left", + 38 : "Up", + 39 : "Right", + 40 : "Down", + 44 : "Print", + 45 : "Insert", + 46 : "Delete", + 112: "F1", + 113: "F2", + 114: "F3", + 115: "F4", + 116: "F5", + 117: "F6", + 118: "F7", + 119: "F8", + 120: "F9", + 121: "F10", + 122: "F11", + 123: "F12", + 144: "Numlock", + 145: "Scrolllock" + }, + + PRINTABLE_KEYS: { + 32: ' ', 48: '0', 49: '1', 50: '2', 51: '3', 52: '4', 53: '5', + 54: '6', 55: '7', 56: '8', 57: '9', 59: ';', 61: '=', 65: 'a', + 66: 'b', 67: 'c', 68: 'd', 69: 'e', 70: 'f', 71: 'g', 72: 'h', + 73: 'i', 74: 'j', 75: 'k', 76: 'l', 77: 'm', 78: 'n', 79: 'o', + 80: 'p', 81: 'q', 82: 'r', 83: 's', 84: 't', 85: 'u', 86: 'v', + 87: 'w', 88: 'x', 89: 'y', 90: 'z', 107: '+', 109: '-', 110: '.', + 188: ',', 190: '.', 191: '/', 192: '`', 219: '[', 220: '\\', + 221: ']', 222: '\"' + } + }; + + // A reverse map of FUNCTION_KEYS + for (i in ret.FUNCTION_KEYS) { + var name = ret.FUNCTION_KEYS[i].toUpperCase(); + ret[name] = parseInt(i, 10); + } + + // Add the MODIFIER_KEYS, FUNCTION_KEYS and PRINTABLE_KEYS to the KEY + // variables as well. + oop.mixin(ret, ret.MODIFIER_KEYS); + oop.mixin(ret, ret.PRINTABLE_KEYS); + oop.mixin(ret, ret.FUNCTION_KEYS); + + return ret; +})(); +oop.mixin(exports, Keys); + +exports.keyCodeToString = function(keyCode) { + return (Keys[keyCode] || String.fromCharCode(keyCode)).toLowerCase(); +} + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/event_emitter', ['require', 'exports', 'module' ], function(require, exports, module) { + +var EventEmitter = {}; + +EventEmitter._emit = +EventEmitter._dispatchEvent = function(eventName, e) { + this._eventRegistry = this._eventRegistry || {}; + + var listeners = this._eventRegistry[eventName]; + if (!listeners || !listeners.length) return; + + var e = e || {}; + e.type = eventName; + + for (var i=0; i + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/lang', ['require', 'exports', 'module' ], function(require, exports, module) { + +exports.stringReverse = function(string) { + return string.split("").reverse().join(""); +}; + +exports.stringRepeat = function (string, count) { + return new Array(count + 1).join(string); +}; + +var trimBeginRegexp = /^\s\s*/; +var trimEndRegexp = /\s\s*$/; + +exports.stringTrimLeft = function (string) { + return string.replace(trimBeginRegexp, '') +}; + +exports.stringTrimRight = function (string) { + return string.replace(trimEndRegexp, ''); +}; + +exports.copyObject = function(obj) { + var copy = {}; + for (var key in obj) { + copy[key] = obj[key]; + } + return copy; +}; + +exports.copyArray = function(array){ + var copy = []; + for (i=0, l=array.length; i (http://jeditoolkit.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/settings', ['require', 'exports', 'module' , 'pilot/console', 'pilot/oop', 'pilot/types', 'pilot/event_emitter', 'pilot/catalog'], function(require, exports, module) { + +/** + * This plug-in manages settings. + */ + +var console = require('pilot/console'); +var oop = require('pilot/oop'); +var types = require('pilot/types'); +var EventEmitter = require('pilot/event_emitter').EventEmitter; +var catalog = require('pilot/catalog'); + +var settingExtensionSpec = { + name: 'setting', + description: 'A setting is something that the application offers as a ' + + 'way to customize how it works', + register: 'env.settings.addSetting', + indexOn: 'name' +}; + +exports.startup = function(data, reason) { + catalog.addExtensionSpec(settingExtensionSpec); +}; + +exports.shutdown = function(data, reason) { + catalog.removeExtensionSpec(settingExtensionSpec); +}; + + +/** + * Create a new setting. + * @param settingSpec An object literal that looks like this: + * { + * name: 'thing', + * description: 'Thing is an example setting', + * type: 'string', + * defaultValue: 'something' + * } + */ +function Setting(settingSpec, settings) { + this._settings = settings; + + Object.keys(settingSpec).forEach(function(key) { + this[key] = settingSpec[key]; + }, this); + + this.type = types.getType(this.type); + if (this.type == null) { + throw new Error('In ' + this.name + + ': can\'t find type for: ' + JSON.stringify(settingSpec.type)); + } + + if (!this.name) { + throw new Error('Setting.name == undefined. Ignoring.', this); + } + + if (!this.defaultValue === undefined) { + throw new Error('Setting.defaultValue == undefined', this); + } + + if (this.onChange) { + this.on('change', this.onChange.bind(this)) + } + + this.set(this.defaultValue); +} +Setting.prototype = { + get: function() { + return this.value; + }, + + set: function(value) { + if (this.value === value) { + return; + } + + this.value = value; + if (this._settings.persister) { + this._settings.persister.persistValue(this._settings, this.name, value); + } + + this._dispatchEvent('change', { setting: this, value: value }); + }, + + /** + * Reset the value of the key setting to it's default + */ + resetValue: function() { + this.set(this.defaultValue); + }, + toString: function () { + return this.name; + } +}; +oop.implement(Setting.prototype, EventEmitter); + + +/** + * A base class for all the various methods of storing settings. + *

        Usage: + *

        + * // Create manually, or require 'settings' from the container.
        + * // This is the manual version:
        + * var settings = plugins.catalog.getObject('settings');
        + * // Add a new setting
        + * settings.addSetting({ name:'foo', ... });
        + * // Display the default value
        + * alert(settings.get('foo'));
        + * // Alter the value, which also publishes the change etc.
        + * settings.set('foo', 'bar');
        + * // Reset the value to the default
        + * settings.resetValue('foo');
        + * 
        + * @constructor + */ +function Settings(persister) { + // Storage for deactivated values + this._deactivated = {}; + + // Storage for the active settings + this._settings = {}; + // We often want sorted setting names. Cache + this._settingNames = []; + + if (persister) { + this.setPersister(persister); + } +}; + +Settings.prototype = { + /** + * Function to add to the list of available settings. + *

        Example usage: + *

        +     * var settings = plugins.catalog.getObject('settings');
        +     * settings.addSetting({
        +     *     name: 'tabsize', // For use in settings.get('X')
        +     *     type: 'number',  // To allow value checking.
        +     *     defaultValue: 4  // Default value for use when none is directly set
        +     * });
        +     * 
        + * @param {object} settingSpec Object containing name/type/defaultValue members. + */ + addSetting: function(settingSpec) { + var setting = new Setting(settingSpec, this); + this._settings[setting.name] = setting; + this._settingNames.push(setting.name); + this._settingNames.sort(); + }, + + addSettings: function addSettings(settings) { + Object.keys(settings).forEach(function (name) { + var setting = settings[name]; + if (!('name' in setting)) setting.name = name; + this.addSetting(setting); + }, this); + }, + + removeSetting: function(setting) { + var name = (typeof setting === 'string' ? setting : setting.name); + setting = this._settings[name]; + delete this._settings[name]; + util.arrayRemove(this._settingNames, name); + settings.removeAllListeners('change'); + }, + + removeSettings: function removeSettings(settings) { + Object.keys(settings).forEach(function(name) { + var setting = settings[name]; + if (!('name' in setting)) setting.name = name; + this.removeSettings(setting); + }, this); + }, + + getSettingNames: function() { + return this._settingNames; + }, + + getSetting: function(name) { + return this._settings[name]; + }, + + /** + * A Persister is able to store settings. It is an object that defines + * two functions: + * loadInitialValues(settings) and persistValue(settings, key, value). + */ + setPersister: function(persister) { + this._persister = persister; + if (persister) { + persister.loadInitialValues(this); + } + }, + + resetAll: function() { + this.getSettingNames().forEach(function(key) { + this.resetValue(key); + }, this); + }, + + /** + * Retrieve a list of the known settings and their values + */ + _list: function() { + var reply = []; + this.getSettingNames().forEach(function(setting) { + reply.push({ + 'key': setting, + 'value': this.getSetting(setting).get() + }); + }, this); + return reply; + }, + + /** + * Prime the local cache with the defaults. + */ + _loadDefaultValues: function() { + this._loadFromObject(this._getDefaultValues()); + }, + + /** + * Utility to load settings from an object + */ + _loadFromObject: function(data) { + // We iterate over data rather than keys so we don't forget values + // which don't have a setting yet. + for (var key in data) { + if (data.hasOwnProperty(key)) { + var setting = this._settings[key]; + if (setting) { + var value = setting.type.parse(data[key]); + this.set(key, value); + } else { + this.set(key, data[key]); + } + } + } + }, + + /** + * Utility to grab all the settings and export them into an object + */ + _saveToObject: function() { + return this.getSettingNames().map(function(key) { + return this._settings[key].type.stringify(this.get(key)); + }.bind(this)); + }, + + /** + * The default initial settings + */ + _getDefaultValues: function() { + return this.getSettingNames().map(function(key) { + return this._settings[key].spec.defaultValue; + }.bind(this)); + } +}; +exports.settings = new Settings(); + +/** + * Save the settings in a cookie + * This code has not been tested since reboot + * @constructor + */ +function CookiePersister() { +}; + +CookiePersister.prototype = { + loadInitialValues: function(settings) { + settings._loadDefaultValues(); + var data = cookie.get('settings'); + settings._loadFromObject(JSON.parse(data)); + }, + + persistValue: function(settings, key, value) { + try { + var stringData = JSON.stringify(settings._saveToObject()); + cookie.set('settings', stringData); + } catch (ex) { + console.error('Unable to JSONify the settings! ' + ex); + return; + } + } +}; + +exports.CookiePersister = CookiePersister; + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Skywriter Team (skywriter@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/commands/settings', ['require', 'exports', 'module' , 'pilot/canon'], function(require, exports, module) { + + +var setCommandSpec = { + name: 'set', + params: [ + { + name: 'setting', + type: 'setting', + description: 'The name of the setting to display or alter', + defaultValue: null + }, + { + name: 'value', + type: 'settingValue', + description: 'The new value for the chosen setting', + defaultValue: null + } + ], + description: 'define and show settings', + exec: function(env, args, request) { + var html; + if (!args.setting) { + // 'set' by itself lists all the settings + var names = env.settings.getSettingNames(); + html = ''; + // first sort the settingsList based on the name + names.sort(function(name1, name2) { + return name1.localeCompare(name2); + }); + + names.forEach(function(name) { + var setting = env.settings.getSetting(name); + var url = 'https://wiki.mozilla.org/Labs/Skywriter/Settings#' + + setting.name; + html += '' + + setting.name + + ' = ' + + setting.value + + '
        '; + }); + } else { + // set with only a setting, shows the value for that setting + if (args.value === undefined) { + html = '' + setting.name + ' = ' + + setting.get(); + } else { + // Actually change the setting + args.setting.set(args.value); + html = 'Setting: ' + args.setting.name + ' = ' + + args.setting.get(); + } + } + request.done(html); + } +}; + +var unsetCommandSpec = { + name: 'unset', + params: [ + { + name: 'setting', + type: 'setting', + description: 'The name of the setting to return to defaults' + } + ], + description: 'unset a setting entirely', + exec: function(env, args, request) { + var setting = env.settings.get(args.setting); + if (!setting) { + request.doneWithError('No setting with the name ' + + args.setting + '.'); + return; + } + + setting.reset(); + request.done('Reset ' + setting.name + ' to default: ' + + env.settings.get(args.setting)); + } +}; + +var canon = require('pilot/canon'); + +exports.startup = function(data, reason) { + canon.addCommand(setCommandSpec); + canon.addCommand(unsetCommandSpec); +}; + +exports.shutdown = function(data, reason) { + canon.removeCommand(setCommandSpec); + canon.removeCommand(unsetCommandSpec); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Skywriter Team (skywriter@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/commands/basic', ['require', 'exports', 'module' , 'pilot/typecheck', 'pilot/canon'], function(require, exports, module) { + + +var checks = require("pilot/typecheck"); +var canon = require('pilot/canon'); + +/** + * 'help' command + */ +var helpCommandSpec = { + name: 'help', + params: [ + { + name: 'search', + type: 'text', + description: 'Search string to narrow the output.', + defaultValue: null + } + ], + description: 'Get help on the available commands.', + exec: function(env, args, request) { + var output = []; + + var command = canon.getCommand(args.search); + if (command && command.exec) { + // caught a real command + output.push(command.description ? + command.description : + 'No description for ' + args.search); + } else { + var showHidden = false; + + if (command) { + // We must be looking at sub-commands + output.push('

        Sub-Commands of ' + command.name + '

        '); + output.push('

        ' + command.description + '

        '); + } + else if (args.search) { + if (args.search == 'hidden') { // sneaky, sneaky. + args.search = ''; + showHidden = true; + } + output.push('

        Commands starting with \'' + args.search + '\':

        '); + } + else { + output.push('

        Available Commands:

        '); + } + + var commandNames = canon.getCommandNames(); + commandNames.sort(); + + output.push(''); + for (var i = 0; i < commandNames.length; i++) { + command = canon.getCommand(commandNames[i]); + if (!showHidden && command.hidden) { + continue; + } + if (command.description === undefined) { + // Ignore editor actions + continue; + } + if (args.search && command.name.indexOf(args.search) !== 0) { + // Filtered out by the user + continue; + } + if (!args.search && command.name.indexOf(' ') != -1) { + // sub command + continue; + } + if (command && command.name == args.search) { + // sub command, and we've already given that help + continue; + } + + // todo add back a column with parameter information, perhaps? + + output.push(''); + output.push(''); + output.push(''); + output.push(''); + } + output.push('
        ' + command.name + '' + command.description + '
        '); + } + + request.done(output.join('')); + } +}; + +/** + * 'eval' command + */ +var evalCommandSpec = { + name: 'eval', + params: [ + { + name: 'javascript', + type: 'text', + description: 'The JavaScript to evaluate' + } + ], + description: 'evals given js code and show the result', + hidden: true, + exec: function(env, args, request) { + var result; + var javascript = args.javascript; + try { + result = eval(javascript); + } catch (e) { + result = 'Error: ' + e.message + ''; + } + + var msg = ''; + var type = ''; + var x; + + if (checks.isFunction(result)) { + // converts the function to a well formated string + msg = (result + '').replace(/\n/g, '
        ').replace(/ /g, ' '); + type = 'function'; + } else if (checks.isObject(result)) { + if (Array.isArray(result)) { + type = 'array'; + } else { + type = 'object'; + } + + var items = []; + var value; + + for (x in result) { + if (result.hasOwnProperty(x)) { + if (checks.isFunction(result[x])) { + value = '[function]'; + } else if (checks.isObject(result[x])) { + value = '[object]'; + } else { + value = result[x]; + } + + items.push({name: x, value: value}); + } + } + + items.sort(function(a,b) { + return (a.name.toLowerCase() < b.name.toLowerCase()) ? -1 : 1; + }); + + for (x = 0; x < items.length; x++) { + msg += '' + items[x].name + ': ' + items[x].value + '
        '; + } + + } else { + msg = result; + type = typeof result; + } + + request.done('Result for eval \'' + javascript + '\'' + + ' (type: '+ type+'):

        '+ msg); + } +}; + +var canon = require('pilot/canon'); + +exports.startup = function(data, reason) { + canon.addCommand(helpCommandSpec); + canon.addCommand(evalCommandSpec); +}; + +exports.shutdown = function(data, reason) { + canon.removeCommand(helpCommandSpec); + canon.removeCommand(evalCommandSpec); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/settings/canon', ['require', 'exports', 'module' ], function(require, exports, module) { + + +var historyLengthSetting = { + name: "historyLength", + description: "How many typed commands do we recall for reference?", + type: "number", + defaultValue: 50 +}; + +exports.startup = function(data, reason) { + data.env.settings.addSetting(historyLengthSetting); +}; + +exports.shutdown = function(data, reason) { + data.env.settings.removeSetting(historyLengthSetting); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/plugin_manager', ['require', 'exports', 'module' , 'pilot/promise'], function(require, exports, module) { + +var Promise = require("pilot/promise").Promise; + +exports.REASONS = { + APP_STARTUP: 1, + APP_SHUTDOWN: 2, + PLUGIN_ENABLE: 3, + PLUGIN_DISABLE: 4, + PLUGIN_INSTALL: 5, + PLUGIN_UNINSTALL: 6, + PLUGIN_UPGRADE: 7, + PLUGIN_DOWNGRADE: 8 +}; + +exports.Plugin = function(name) { + this.name = name; + this.status = this.INSTALLED; +}; + +exports.Plugin.prototype = { + /** + * constants for the state + */ + NEW: 0, + INSTALLED: 1, + REGISTERED: 2, + STARTED: 3, + UNREGISTERED: 4, + SHUTDOWN: 5, + + install: function(data, reason) { + var pr = new Promise(); + if (this.status > this.NEW) { + pr.resolve(this); + return pr; + } + require([this.name], function(pluginModule) { + if (pluginModule.install) { + pluginModule.install(data, reason); + } + this.status = this.INSTALLED; + pr.resolve(this); + }.bind(this)); + return pr; + }, + + register: function(data, reason) { + var pr = new Promise(); + if (this.status != this.INSTALLED) { + pr.resolve(this); + return pr; + } + require([this.name], function(pluginModule) { + if (pluginModule.register) { + pluginModule.register(data, reason); + } + this.status = this.REGISTERED; + pr.resolve(this); + }.bind(this)); + return pr; + }, + + startup: function(data, reason) { + reason = reason || exports.REASONS.APP_STARTUP; + var pr = new Promise(); + if (this.status != this.REGISTERED) { + pr.resolve(this); + return pr; + } + require([this.name], function(pluginModule) { + if (pluginModule.startup) { + pluginModule.startup(data, reason); + } + this.status = this.STARTED; + pr.resolve(this); + }.bind(this)); + return pr; + }, + + shutdown: function(data, reason) { + if (this.status != this.STARTED) { + return; + } + pluginModule = require(this.name); + if (pluginModule.shutdown) { + pluginModule.shutdown(data, reason); + } + } +}; + +exports.PluginCatalog = function() { + this.plugins = {}; +}; + +exports.PluginCatalog.prototype = { + registerPlugins: function(pluginList, data, reason) { + var registrationPromises = []; + pluginList.forEach(function(pluginName) { + var plugin = this.plugins[pluginName]; + if (plugin === undefined) { + plugin = new exports.Plugin(pluginName); + this.plugins[pluginName] = plugin; + registrationPromises.push(plugin.register(data, reason)); + } + }.bind(this)); + return Promise.group(registrationPromises); + }, + + startupPlugins: function(data, reason) { + var startupPromises = []; + for (var pluginName in this.plugins) { + var plugin = this.plugins[pluginName]; + startupPromises.push(plugin.startup(data, reason)); + } + return Promise.group(startupPromises); + } +}; + +exports.catalog = new exports.PluginCatalog(); + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/promise', ['require', 'exports', 'module' , 'pilot/console', 'pilot/stacktrace'], function(require, exports, module) { + +var console = require("pilot/console"); +var Trace = require('pilot/stacktrace').Trace; + +/** + * A promise can be in one of 2 states. + * The ERROR and SUCCESS states are terminal, the PENDING state is the only + * start state. + */ +var ERROR = -1; +var PENDING = 0; +var SUCCESS = 1; + +/** + * We give promises and ID so we can track which are outstanding + */ +var _nextId = 0; + +/** + * Debugging help if 2 things try to complete the same promise. + * This can be slow (especially on chrome due to the stack trace unwinding) so + * we should leave this turned off in normal use. + */ +var _traceCompletion = false; + +/** + * Outstanding promises. Handy list for debugging only. + */ +var _outstanding = []; + +/** + * Recently resolved promises. Also for debugging only. + */ +var _recent = []; + +/** + * Create an unfulfilled promise + */ +Promise = function () { + this._status = PENDING; + this._value = undefined; + this._onSuccessHandlers = []; + this._onErrorHandlers = []; + + // Debugging help + this._id = _nextId++; + //this._createTrace = new Trace(new Error()); + _outstanding[this._id] = this; +}; + +/** + * Yeay for RTTI. + */ +Promise.prototype.isPromise = true; + +/** + * Have we either been resolve()ed or reject()ed? + */ +Promise.prototype.isComplete = function() { + return this._status != PENDING; +}; + +/** + * Have we resolve()ed? + */ +Promise.prototype.isResolved = function() { + return this._status == SUCCESS; +}; + +/** + * Have we reject()ed? + */ +Promise.prototype.isRejected = function() { + return this._status == ERROR; +}; + +/** + * Take the specified action of fulfillment of a promise, and (optionally) + * a different action on promise rejection. + */ +Promise.prototype.then = function(onSuccess, onError) { + if (typeof onSuccess === 'function') { + if (this._status === SUCCESS) { + onSuccess.call(null, this._value); + } else if (this._status === PENDING) { + this._onSuccessHandlers.push(onSuccess); + } + } + + if (typeof onError === 'function') { + if (this._status === ERROR) { + onError.call(null, this._value); + } else if (this._status === PENDING) { + this._onErrorHandlers.push(onError); + } + } + + return this; +}; + +/** + * Like then() except that rather than returning this we return + * a promise which + */ +Promise.prototype.chainPromise = function(onSuccess) { + var chain = new Promise(); + chain._chainedFrom = this; + this.then(function(data) { + try { + chain.resolve(onSuccess(data)); + } catch (ex) { + chain.reject(ex); + } + }, function(ex) { + chain.reject(ex); + }); + return chain; +}; + +/** + * Supply the fulfillment of a promise + */ +Promise.prototype.resolve = function(data) { + return this._complete(this._onSuccessHandlers, SUCCESS, data, 'resolve'); +}; + +/** + * Renege on a promise + */ +Promise.prototype.reject = function(data) { + return this._complete(this._onErrorHandlers, ERROR, data, 'reject'); +}; + +/** + * Internal method to be called on resolve() or reject(). + * @private + */ +Promise.prototype._complete = function(list, status, data, name) { + // Complain if we've already been completed + if (this._status != PENDING) { + console.group('Promise already closed'); + console.error('Attempted ' + name + '() with ', data); + console.error('Previous status = ', this._status, + ', previous value = ', this._value); + console.trace(); + + if (this._completeTrace) { + console.error('Trace of previous completion:'); + this._completeTrace.log(5); + } + console.groupEnd(); + return this; + } + + if (_traceCompletion) { + this._completeTrace = new Trace(new Error()); + } + + this._status = status; + this._value = data; + + // Call all the handlers, and then delete them + list.forEach(function(handler) { + handler.call(null, this._value); + }, this); + this._onSuccessHandlers.length = 0; + this._onErrorHandlers.length = 0; + + // Remove the given {promise} from the _outstanding list, and add it to the + // _recent list, pruning more than 20 recent promises from that list. + delete _outstanding[this._id]; + _recent.push(this); + while (_recent.length > 20) { + _recent.shift(); + } + + return this; +}; + +/** + * Takes an array of promises and returns a promise that that is fulfilled once + * all the promises in the array are fulfilled + * @param group The array of promises + * @return the promise that is fulfilled when all the array is fulfilled + */ +Promise.group = function(promiseList) { + if (!(promiseList instanceof Array)) { + promiseList = Array.prototype.slice.call(arguments); + } + + // If the original array has nothing in it, return now to avoid waiting + if (promiseList.length === 0) { + return new Promise().resolve([]); + } + + var groupPromise = new Promise(); + var results = []; + var fulfilled = 0; + + var onSuccessFactory = function(index) { + return function(data) { + results[index] = data; + fulfilled++; + // If the group has already failed, silently drop extra results + if (groupPromise._status !== ERROR) { + if (fulfilled === promiseList.length) { + groupPromise.resolve(results); + } + } + }; + }; + + promiseList.forEach(function(promise, index) { + var onSuccess = onSuccessFactory(index); + var onError = groupPromise.reject.bind(groupPromise); + promise.then(onSuccess, onError); + }); + + return groupPromise; +}; + +exports.Promise = Promise; +exports._outstanding = _outstanding; +exports._recent = _recent; + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/dom', ['require', 'exports', 'module' ], function(require, exports, module) { + +var XHTML_NS = "http://www.w3.org/1999/xhtml"; + +exports.createElement = function(tag, ns) { + return document.createElementNS ? + document.createElementNS(ns || XHTML_NS, tag) : + document.createElement(tag); +}; + +exports.setText = function(elem, text) { + if (elem.innerText !== undefined) { + elem.innerText = text; + } + if (elem.textContent !== undefined) { + elem.textContent = text; + } +}; + +if (!document.documentElement.classList) { + exports.hasCssClass = function(el, name) { + var classes = el.className.split(/\s+/g); + return classes.indexOf(name) !== -1; + }; + + /** + * Add a CSS class to the list of classes on the given node + */ + exports.addCssClass = function(el, name) { + if (!exports.hasCssClass(el, name)) { + el.className += " " + name; + } + }; + + /** + * Remove a CSS class from the list of classes on the given node + */ + exports.removeCssClass = function(el, name) { + var classes = el.className.split(/\s+/g); + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + classes.splice(index, 1); + } + el.className = classes.join(" "); + }; + + exports.toggleCssClass = function(el, name) { + var classes = el.className.split(/\s+/g), add = true; + while (true) { + var index = classes.indexOf(name); + if (index == -1) { + break; + } + add = false; + classes.splice(index, 1); + } + if(add) + classes.push(name); + + el.className = classes.join(" "); + return add; + }; +} else { + exports.hasCssClass = function(el, name) { + return el.classList.contains(name); + }; + + exports.addCssClass = function(el, name) { + el.classList.add(name); + }; + + exports.removeCssClass = function(el, name) { + el.classList.remove(name); + }; + + exports.toggleCssClass = function(el, name) { + return el.classList.toggle(name); + }; +} + +/** + * Add or remove a CSS class from the list of classes on the given node + * depending on the value of include + */ +exports.setCssClass = function(node, className, include) { + if (include) { + exports.addCssClass(node, className); + } else { + exports.removeCssClass(node, className); + } +}; + +exports.importCssString = function(cssText, doc){ + doc = doc || document; + + if (doc.createStyleSheet) { + var sheet = doc.createStyleSheet(); + sheet.cssText = cssText; + } + else { + var style = doc.createElementNS ? + doc.createElementNS(XHTML_NS, "style") : + doc.createElement("style"); + + style.appendChild(doc.createTextNode(cssText)); + + var head = doc.getElementsByTagName("head")[0] || doc.documentElement; + head.appendChild(style); + } +}; + +exports.getInnerWidth = function(element) { + return (parseInt(exports.computedStyle(element, "paddingLeft")) + + parseInt(exports.computedStyle(element, "paddingRight")) + element.clientWidth); +}; + +exports.getInnerHeight = function(element) { + return (parseInt(exports.computedStyle(element, "paddingTop")) + + parseInt(exports.computedStyle(element, "paddingBottom")) + element.clientHeight); +}; + +if (window.pageYOffset !== undefined) { + exports.getPageScrollTop = function() { + return window.pageYOffset; + }; + + exports.getPageScrollLeft = function() { + return window.pageXOffset; + }; +} +else { + exports.getPageScrollTop = function() { + return document.body.scrollTop; + }; + + exports.getPageScrollLeft = function() { + return document.body.scrollLeft; + }; +} + +if (window.getComputedStyle) + exports.computedStyle = function(element, style) { + if (style) + return (window.getComputedStyle(element, "") || {})[style] || ""; + return window.getComputedStyle(element, "") || {} + }; +else + exports.computedStyle = function(element, style) { + if (style) + return element.currentStyle[style]; + return element.currentStyle + }; + +exports.scrollbarWidth = function() { + + var inner = exports.createElement("p"); + inner.style.width = "100%"; + inner.style.minWidth = "0px"; + inner.style.height = "200px"; + + var outer = exports.createElement("div"); + var style = outer.style; + + style.position = "absolute"; + style.left = "-10000px"; + style.overflow = "hidden"; + style.width = "200px"; + style.minWidth = "0px"; + style.height = "150px"; + + outer.appendChild(inner); + + var body = document.body || document.documentElement; + body.appendChild(outer); + + var noScrollbar = inner.offsetWidth; + + style.overflow = "scroll"; + var withScrollbar = inner.offsetWidth; + + if (noScrollbar == withScrollbar) { + withScrollbar = outer.clientWidth; + } + + body.removeChild(outer); + + return noScrollbar-withScrollbar; +}; + +/** + * Optimized set innerHTML. This is faster than plain innerHTML if the element + * already contains a lot of child elements. + * + * See http://blog.stevenlevithan.com/archives/faster-than-innerhtml for details + */ +exports.setInnerHtml = function(el, innerHtml) { + var element = el.cloneNode(false);//document.createElement("div"); + element.innerHTML = innerHtml; + el.parentNode.replaceChild(element, el); + return element; +}; + +exports.setInnerText = function(el, innerText) { + if (document.body && "textContent" in document.body) + el.textContent = innerText; + else + el.innerText = innerText; + +}; + +exports.getInnerText = function(el) { + if (document.body && "textContent" in document.body) + return el.textContent; + else + return el.innerText || el.textContent || ""; +}; + +exports.getParentWindow = function(document) { + return document.defaultView || document.parentWindow; +}; + +exports.getSelectionStart = function(textarea) { + // TODO IE + var start; + try { + start = textarea.selectionStart || 0; + } catch (e) { + start = 0; + } + return start; +}; + +exports.setSelectionStart = function(textarea, start) { + // TODO IE + return textarea.selectionStart = start; +}; + +exports.getSelectionEnd = function(textarea) { + // TODO IE + var end; + try { + end = textarea.selectionEnd || 0; + } catch (e) { + end = 0; + } + return end; +}; + +exports.setSelectionEnd = function(textarea, end) { + // TODO IE + return textarea.selectionEnd = end; +}; + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/event', ['require', 'exports', 'module' , 'pilot/keys', 'pilot/useragent', 'pilot/dom'], function(require, exports, module) { + +var keys = require("pilot/keys"); +var useragent = require("pilot/useragent"); +var dom = require("pilot/dom"); + +exports.addListener = function(elem, type, callback) { + if (elem.addEventListener) { + return elem.addEventListener(type, callback, false); + } + if (elem.attachEvent) { + var wrapper = function() { + callback(window.event); + }; + callback._wrapper = wrapper; + elem.attachEvent("on" + type, wrapper); + } +}; + +exports.removeListener = function(elem, type, callback) { + if (elem.removeEventListener) { + return elem.removeEventListener(type, callback, false); + } + if (elem.detachEvent) { + elem.detachEvent("on" + type, callback._wrapper || callback); + } +}; + +/** +* Prevents propagation and clobbers the default action of the passed event +*/ +exports.stopEvent = function(e) { + exports.stopPropagation(e); + exports.preventDefault(e); + return false; +}; + +exports.stopPropagation = function(e) { + if (e.stopPropagation) + e.stopPropagation(); + else + e.cancelBubble = true; +}; + +exports.preventDefault = function(e) { + if (e.preventDefault) + e.preventDefault(); + else + e.returnValue = false; +}; + +exports.getDocumentX = function(e) { + if (e.clientX) { + return e.clientX + dom.getPageScrollLeft(); + } else { + return e.pageX; + } +}; + +exports.getDocumentY = function(e) { + if (e.clientY) { + return e.clientY + dom.getPageScrollTop(); + } else { + return e.pageY; + } +}; + +/** + * @return {Number} 0 for left button, 1 for middle button, 2 for right button + */ +exports.getButton = function(e) { + if (e.type == "dblclick") + return 0; + else if (e.type == "contextmenu") + return 2; + + // DOM Event + if (e.preventDefault) { + return e.button; + } + // old IE + else { + return {1:0, 2:2, 4:1}[e.button]; + } +}; + +if (document.documentElement.setCapture) { + exports.capture = function(el, eventHandler, releaseCaptureHandler) { + function onMouseMove(e) { + eventHandler(e); + return exports.stopPropagation(e); + } + + function onReleaseCapture(e) { + eventHandler && eventHandler(e); + releaseCaptureHandler && releaseCaptureHandler(); + + exports.removeListener(el, "mousemove", eventHandler); + exports.removeListener(el, "mouseup", onReleaseCapture); + exports.removeListener(el, "losecapture", onReleaseCapture); + + el.releaseCapture(); + } + + exports.addListener(el, "mousemove", eventHandler); + exports.addListener(el, "mouseup", onReleaseCapture); + exports.addListener(el, "losecapture", onReleaseCapture); + el.setCapture(); + }; +} +else { + exports.capture = function(el, eventHandler, releaseCaptureHandler) { + function onMouseMove(e) { + eventHandler(e); + e.stopPropagation(); + } + + function onMouseUp(e) { + eventHandler && eventHandler(e); + releaseCaptureHandler && releaseCaptureHandler(); + + document.removeEventListener("mousemove", onMouseMove, true); + document.removeEventListener("mouseup", onMouseUp, true); + + e.stopPropagation(); + } + + document.addEventListener("mousemove", onMouseMove, true); + document.addEventListener("mouseup", onMouseUp, true); + }; +} + +exports.addMouseWheelListener = function(el, callback) { + var listener = function(e) { + if (e.wheelDelta !== undefined) { + if (e.wheelDeltaX !== undefined) { + e.wheelX = -e.wheelDeltaX / 8; + e.wheelY = -e.wheelDeltaY / 8; + } else { + e.wheelX = 0; + e.wheelY = -e.wheelDelta / 8; + } + } + else { + if (e.axis && e.axis == e.HORIZONTAL_AXIS) { + e.wheelX = (e.detail || 0) * 5; + e.wheelY = 0; + } else { + e.wheelX = 0; + e.wheelY = (e.detail || 0) * 5; + } + } + callback(e); + }; + exports.addListener(el, "DOMMouseScroll", listener); + exports.addListener(el, "mousewheel", listener); +}; + +exports.addMultiMouseDownListener = function(el, button, count, timeout, callback) { + var clicks = 0; + var startX, startY; + + var listener = function(e) { + clicks += 1; + if (clicks == 1) { + startX = e.clientX; + startY = e.clientY; + + setTimeout(function() { + clicks = 0; + }, timeout || 600); + } + + var isButton = exports.getButton(e) == button; + if (!isButton || Math.abs(e.clientX - startX) > 5 || Math.abs(e.clientY - startY) > 5) + clicks = 0; + + if (clicks == count) { + clicks = 0; + callback(e); + } + + if (isButton) + return exports.preventDefault(e); + }; + + exports.addListener(el, "mousedown", listener); + useragent.isIE && exports.addListener(el, "dblclick", listener); +}; + +function normalizeCommandKeys(callback, e, keyCode) { + var hashId = 0; + if (useragent.isOpera && useragent.isMac) { + hashId = 0 | (e.metaKey ? 1 : 0) | (e.altKey ? 2 : 0) + | (e.shiftKey ? 4 : 0) | (e.ctrlKey ? 8 : 0); + } else { + hashId = 0 | (e.ctrlKey ? 1 : 0) | (e.altKey ? 2 : 0) + | (e.shiftKey ? 4 : 0) | (e.metaKey ? 8 : 0); + } + + if (keyCode in keys.MODIFIER_KEYS) { + switch (keys.MODIFIER_KEYS[keyCode]) { + case "Alt": + hashId = 2; + break; + case "Shift": + hashId = 4; + break + case "Ctrl": + hashId = 1; + break; + default: + hashId = 8; + break; + } + keyCode = 0; + } + + if (hashId & 8 && (keyCode == 91 || keyCode == 93)) { + keyCode = 0; + } + + // If there is no hashID and the keyCode is not a function key, then + // we don't call the callback as we don't handle a command key here + // (it's a normal key/character input). + if (hashId == 0 && !(keyCode in keys.FUNCTION_KEYS)) { + return false; + } + + return callback(e, hashId, keyCode); +} + +exports.addCommandKeyListener = function(el, callback) { + var addListener = exports.addListener; + if (useragent.isOldGecko) { + // Old versions of Gecko aka. Firefox < 4.0 didn't repeat the keydown + // event if the user pressed the key for a longer time. Instead, the + // keydown event was fired once and later on only the keypress event. + // To emulate the 'right' keydown behavior, the keyCode of the initial + // keyDown event is stored and in the following keypress events the + // stores keyCode is used to emulate a keyDown event. + var lastKeyDownKeyCode = null; + addListener(el, "keydown", function(e) { + lastKeyDownKeyCode = e.keyCode; + }); + addListener(el, "keypress", function(e) { + return normalizeCommandKeys(callback, e, lastKeyDownKeyCode); + }); + } else { + var lastDown = null; + + addListener(el, "keydown", function(e) { + lastDown = e.keyIdentifier || e.keyCode; + return normalizeCommandKeys(callback, e, e.keyCode); + }); + + // repeated keys are fired as keypress and not keydown events + if (useragent.isMac && useragent.isOpera) { + addListener(el, "keypress", function(e) { + var keyId = e.keyIdentifier || e.keyCode; + if (lastDown !== keyId) { + return normalizeCommandKeys(callback, e, e.keyCode); + } else { + lastDown = null; + } + }); + } + } +}; + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/editor', ['require', 'exports', 'module' , 'pilot/fixoldbrowsers', 'pilot/oop', 'pilot/event', 'pilot/lang', 'pilot/useragent', 'ace/keyboard/textinput', 'ace/mouse_handler', 'ace/keyboard/keybinding', 'ace/edit_session', 'ace/search', 'ace/range', 'pilot/event_emitter'], function(require, exports, module) { + +require("pilot/fixoldbrowsers"); + +var oop = require("pilot/oop"); +var event = require("pilot/event"); +var lang = require("pilot/lang"); +var useragent = require("pilot/useragent"); +var TextInput = require("ace/keyboard/textinput").TextInput; +var MouseHandler = require("ace/mouse_handler").MouseHandler; +//var TouchHandler = require("ace/touch_handler").TouchHandler; +var KeyBinding = require("ace/keyboard/keybinding").KeyBinding; +var EditSession = require("ace/edit_session").EditSession; +var Search = require("ace/search").Search; +var Range = require("ace/range").Range; +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +var Editor =function(renderer, session) { + var container = renderer.getContainerElement(); + this.container = container; + this.renderer = renderer; + + this.textInput = new TextInput(renderer.getTextAreaContainer(), this); + this.keyBinding = new KeyBinding(this); + + // TODO detect touch event support + if (useragent.isIPad) { + //this.$mouseHandler = new TouchHandler(this); + } else { + this.$mouseHandler = new MouseHandler(this); + } + + this.$blockScrolling = 0; + this.$search = new Search().set({ + wrap: true + }); + + this.setSession(session || new EditSession("")); +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.$forwardEvents = { + gutterclick: 1, + gutterdblclick: 1 + }; + + this.$originalAddEventListener = this.addEventListener; + this.$originalRemoveEventListener = this.removeEventListener; + + this.addEventListener = function(eventName, callback) { + if (this.$forwardEvents[eventName]) { + return this.renderer.addEventListener(eventName, callback); + } else { + return this.$originalAddEventListener(eventName, callback); + } + }; + + this.removeEventListener = function(eventName, callback) { + if (this.$forwardEvents[eventName]) { + return this.renderer.removeEventListener(eventName, callback); + } else { + return this.$originalRemoveEventListener(eventName, callback); + } + }; + + this.setKeyboardHandler = function(keyboardHandler) { + this.keyBinding.setKeyboardHandler(keyboardHandler); + }; + + this.getKeyboardHandler = function() { + return this.keyBinding.getKeyboardHandler(); + }; + + this.setSession = function(session) { + if (this.session == session) + return; + + if (this.session) { + var oldSession = this.session; + this.session.removeEventListener("change", this.$onDocumentChange); + this.session.removeEventListener("changeMode", this.$onChangeMode); + this.session.removeEventListener("tokenizerUpdate", this.$onTokenizerUpdate); + this.session.removeEventListener("changeTabSize", this.$onChangeTabSize); + this.session.removeEventListener("changeWrapLimit", this.$onChangeWrapLimit); + this.session.removeEventListener("changeWrapMode", this.$onChangeWrapMode); + this.session.removeEventListener("onChangeFold", this.$onChangeFold); + this.session.removeEventListener("changeFrontMarker", this.$onChangeFrontMarker); + this.session.removeEventListener("changeBackMarker", this.$onChangeBackMarker); + this.session.removeEventListener("changeBreakpoint", this.$onChangeBreakpoint); + this.session.removeEventListener("changeAnnotation", this.$onChangeAnnotation); + this.session.removeEventListener("changeOverwrite", this.$onCursorChange); + + var selection = this.session.getSelection(); + selection.removeEventListener("changeCursor", this.$onCursorChange); + selection.removeEventListener("changeSelection", this.$onSelectionChange); + + this.session.setScrollTopRow(this.renderer.getScrollTopRow()); + } + + this.session = session; + + this.$onDocumentChange = this.onDocumentChange.bind(this); + session.addEventListener("change", this.$onDocumentChange); + this.renderer.setSession(session); + + this.$onChangeMode = this.onChangeMode.bind(this); + session.addEventListener("changeMode", this.$onChangeMode); + + this.$onTokenizerUpdate = this.onTokenizerUpdate.bind(this); + session.addEventListener("tokenizerUpdate", this.$onTokenizerUpdate); + + this.$onChangeTabSize = this.renderer.updateText.bind(this.renderer); + session.addEventListener("changeTabSize", this.$onChangeTabSize); + + this.$onChangeWrapLimit = this.onChangeWrapLimit.bind(this); + session.addEventListener("changeWrapLimit", this.$onChangeWrapLimit); + + this.$onChangeWrapMode = this.onChangeWrapMode.bind(this); + session.addEventListener("changeWrapMode", this.$onChangeWrapMode); + + this.$onChangeFold = this.onChangeFold.bind(this); + session.addEventListener("changeFold", this.$onChangeFold); + + this.$onChangeFrontMarker = this.onChangeFrontMarker.bind(this); + this.session.addEventListener("changeFrontMarker", this.$onChangeFrontMarker); + + this.$onChangeBackMarker = this.onChangeBackMarker.bind(this); + this.session.addEventListener("changeBackMarker", this.$onChangeBackMarker); + + this.$onChangeBreakpoint = this.onChangeBreakpoint.bind(this); + this.session.addEventListener("changeBreakpoint", this.$onChangeBreakpoint); + + this.$onChangeAnnotation = this.onChangeAnnotation.bind(this); + this.session.addEventListener("changeAnnotation", this.$onChangeAnnotation); + + this.$onCursorChange = this.onCursorChange.bind(this); + this.session.addEventListener("changeOverwrite", this.$onCursorChange); + + this.selection = session.getSelection(); + this.selection.addEventListener("changeCursor", this.$onCursorChange); + + this.$onSelectionChange = this.onSelectionChange.bind(this); + this.selection.addEventListener("changeSelection", this.$onSelectionChange); + + this.onChangeMode(); + + this.onCursorChange(); + this.onSelectionChange(); + this.onChangeFrontMarker(); + this.onChangeBackMarker(); + this.onChangeBreakpoint(); + this.onChangeAnnotation(); + this.session.getUseWrapMode() && this.renderer.adjustWrapLimit(); + this.renderer.scrollToRow(session.getScrollTopRow()); + this.renderer.updateFull(); + + this._dispatchEvent("changeSession", { + session: session, + oldSession: oldSession + }); + }; + + this.getSession = function() { + return this.session; + }; + + this.getSelection = function() { + return this.selection; + }; + + this.resize = function() { + this.renderer.onResize(); + }; + + this.setTheme = function(theme) { + this.renderer.setTheme(theme); + }; + + this.getTheme = function() { + return this.renderer.getTheme(); + }; + + this.setStyle = function(style) { + this.renderer.setStyle(style); + }; + + this.unsetStyle = function(style) { + this.renderer.unsetStyle(style); + }; + + this.setFontSize = function(size) { + this.container.style.fontSize = size; + }; + + this.$highlightBrackets = function() { + if (this.session.$bracketHighlight) { + this.session.removeMarker(this.session.$bracketHighlight); + this.session.$bracketHighlight = null; + } + + if (this.$highlightPending) { + return; + } + + // perform highlight async to not block the browser during navigation + var self = this; + this.$highlightPending = true; + setTimeout(function() { + self.$highlightPending = false; + + var pos = self.session.findMatchingBracket(self.getCursorPosition()); + if (pos) { + var range = new Range(pos.row, pos.column, pos.row, pos.column+1); + self.session.$bracketHighlight = self.session.addMarker(range, "ace_bracket", "text"); + } + }, 10); + }; + + this.focus = function() { + // Safari needs the timeout + // iOS and Firefox need it called immediately + // to be on the save side we do both + // except for IE + var _self = this; + if (!useragent.isIE) { + setTimeout(function() { + _self.textInput.focus(); + }); + } + this.textInput.focus(); + }; + + this.isFocused = function() { + return this.textInput.isFocused(); + }; + + this.blur = function() { + this.textInput.blur(); + }; + + this.onFocus = function() { + this.renderer.showCursor(); + this.renderer.visualizeFocus(); + this._dispatchEvent("focus"); + }; + + this.onBlur = function() { + this.renderer.hideCursor(); + this.renderer.visualizeBlur(); + this._dispatchEvent("blur"); + }; + + this.onDocumentChange = function(e) { + var delta = e.data; + var range = delta.range; + + if (range.start.row == range.end.row && delta.action != "insertLines" && delta.action != "removeLines") + var lastRow = range.end.row; + else + lastRow = Infinity; + this.renderer.updateLines(range.start.row, lastRow); + + // update cursor because tab characters can influence the cursor position + this.renderer.updateCursor(); + }; + + this.onTokenizerUpdate = function(e) { + var rows = e.data; + this.renderer.updateLines(rows.first, rows.last); + }; + + this.onCursorChange = function(e) { + this.renderer.updateCursor(); + + if (!this.$blockScrolling) { + this.renderer.scrollCursorIntoView(); + } + + // move text input over the cursor + // this is required for iOS and IME + this.renderer.moveTextAreaToCursor(this.textInput.getElement()); + + this.$highlightBrackets(); + this.$updateHighlightActiveLine(); + }; + + this.$updateHighlightActiveLine = function() { + var session = this.getSession(); + + if (session.$highlightLineMarker) { + session.removeMarker(session.$highlightLineMarker); + } + session.$highlightLineMarker = null; + + if (this.getHighlightActiveLine() && (this.getSelectionStyle() != "line" || !this.selection.isMultiLine())) { + var cursor = this.getCursorPosition(), + foldLine = this.session.getFoldLine(cursor.row); + var range; + if (foldLine) { + range = new Range(foldLine.start.row, 0, foldLine.end.row + 1, 0); + } else { + range = new Range(cursor.row, 0, cursor.row+1, 0); + } + session.$highlightLineMarker = session.addMarker(range, "ace_active_line", "background"); + } + }; + + this.onSelectionChange = function(e) { + var session = this.getSession(); + + if (session.$selectionMarker) { + session.removeMarker(session.$selectionMarker); + } + session.$selectionMarker = null; + + if (!this.selection.isEmpty()) { + var range = this.selection.getRange(); + var style = this.getSelectionStyle(); + session.$selectionMarker = session.addMarker(range, "ace_selection", style); + } else { + this.$updateHighlightActiveLine(); + } + + if (this.$highlightSelectedWord) + this.session.getMode().highlightSelection(this); + }; + + this.onChangeFrontMarker = function() { + this.renderer.updateFrontMarkers(); + }; + + this.onChangeBackMarker = function() { + this.renderer.updateBackMarkers(); + }; + + this.onChangeBreakpoint = function() { + this.renderer.setBreakpoints(this.session.getBreakpoints()); + }; + + this.onChangeAnnotation = function() { + this.renderer.setAnnotations(this.session.getAnnotations()); + }; + + this.onChangeMode = function() { + this.renderer.updateText() + }; + + this.onChangeWrapLimit = function() { + this.renderer.updateFull(); + }; + + this.onChangeWrapMode = function() { + this.renderer.onResize(true); + }; + + this.onChangeFold = function() { + // Update the active line marker as due to folding changes the current + // line range on the screen might have changed. + this.$updateHighlightActiveLine(); + // TODO: This might be too much updating. Okay for now. + this.renderer.updateFull(); + }; + + this.getCopyText = function() { + if (!this.selection.isEmpty()) { + return this.session.getTextRange(this.getSelectionRange()); + } + else { + return ""; + } + }; + + this.onCut = function() { + if (this.$readOnly) + return; + + if (!this.selection.isEmpty()) { + this.session.remove(this.getSelectionRange()) + this.clearSelection(); + } + }; + + this.insert = function(text) { + if (this.$readOnly) + return; + + var session = this.session; + var mode = session.getMode(); + + var cursor = this.getCursorPosition(); + + if (this.getBehavioursEnabled()) { + // Get a transform if the current mode wants one. + var transform = mode.transformAction(session.getState(cursor.row), 'insertion', this, session, text); + if (transform) + text = transform.text; + } + + text = text.replace("\t", this.session.getTabString()); + + // remove selected text + if (!this.selection.isEmpty()) { + var cursor = this.session.remove(this.getSelectionRange()); + this.clearSelection(); + } + else if (this.session.getOverwrite()) { + var range = new Range.fromPoints(cursor, cursor); + range.end.column += text.length; + this.session.remove(range); + } + + this.clearSelection(); + + var start = cursor.column; + var lineState = session.getState(cursor.row); + var shouldOutdent = mode.checkOutdent(lineState, session.getLine(cursor.row), text); + var line = session.getLine(cursor.row); + var lineIndent = mode.getNextLineIndent(lineState, line.slice(0, cursor.column), session.getTabString()); + var end = session.insert(cursor, text); + + if (transform && transform.selection) { + if (transform.selection.length == 2) { // Transform relative to the current column + this.selection.setSelectionRange( + new Range(cursor.row, start + transform.selection[0], + cursor.row, start + transform.selection[1])); + } else { // Transform relative to the current row. + this.selection.setSelectionRange( + new Range(cursor.row + transform.selection[0], + transform.selection[1], + cursor.row + transform.selection[2], + transform.selection[3])); + } + } + + var lineState = session.getState(cursor.row); + + // TODO disabled multiline auto indent + // possibly doing the indent before inserting the text + // if (cursor.row !== end.row) { + if (session.getDocument().isNewLine(text)) { + this.moveCursorTo(cursor.row+1, 0); + + var size = session.getTabSize(); + var minIndent = Number.MAX_VALUE; + + for (var row = cursor.row + 1; row <= end.row; ++row) { + var indent = 0; + + line = session.getLine(row); + for (var i = 0; i < line.length; ++i) + if (line.charAt(i) == '\t') + indent += size; + else if (line.charAt(i) == ' ') + indent += 1; + else + break; + if (/[^\s]/.test(line)) + minIndent = Math.min(indent, minIndent); + } + + for (var row = cursor.row + 1; row <= end.row; ++row) { + var outdent = minIndent; + + line = session.getLine(row); + for (var i = 0; i < line.length && outdent > 0; ++i) + if (line.charAt(i) == '\t') + outdent -= size; + else if (line.charAt(i) == ' ') + outdent -= 1; + session.remove(new Range(row, 0, row, i)); + } + session.indentRows(cursor.row + 1, end.row, lineIndent); + } else { + if (shouldOutdent) { + mode.autoOutdent(lineState, session, cursor.row); + } + } + }; + + this.onTextInput = function(text, notPasted) { + // In case the text was not pasted and we got only one character, then + // handel it as a command key stroke. + if (notPasted && text.length == 1) { + // Note: The `null` as `keyCode` is important here, as there are + // some checks in the code for `keyCode == 0` meaning the text comes + // from the keyBinding.onTextInput code path. + var handled = this.keyBinding.onCommandKey({}, 0, null, text); + + // Check if the text was handled. If not, then handled it as "normal" + // text and insert it to the editor directly. This shouldn't be done + // using the this.keyBinding.onTextInput(text) function, as it would + // make the `text` get sent to the keyboardHandler twice, which might + // turn out to be a bad thing in case there is a custome keyboard + // handler like the StateHandler. + if (!handled) { + this.insert(text); + } + } else { + this.keyBinding.onTextInput(text); + } + }; + + this.onCommandKey = function(e, hashId, keyCode) { + this.keyBinding.onCommandKey(e, hashId, keyCode); + }; + + this.setOverwrite = function(overwrite) { + this.session.setOverwrite(overwrite); + }; + + this.getOverwrite = function() { + return this.session.getOverwrite(); + }; + + this.toggleOverwrite = function() { + this.session.toggleOverwrite(); + }; + + this.setScrollSpeed = function(speed) { + this.$mouseHandler.setScrollSpeed(speed); + }; + + this.getScrollSpeed = function() { + return this.$mouseHandler.getScrollSpeed() + }; + + this.$selectionStyle = "line"; + this.setSelectionStyle = function(style) { + if (this.$selectionStyle == style) return; + + this.$selectionStyle = style; + this.onSelectionChange(); + this._dispatchEvent("changeSelectionStyle", {data: style}); + }; + + this.getSelectionStyle = function() { + return this.$selectionStyle; + }; + + this.$highlightActiveLine = true; + this.setHighlightActiveLine = function(shouldHighlight) { + if (this.$highlightActiveLine == shouldHighlight) return; + + this.$highlightActiveLine = shouldHighlight; + this.$updateHighlightActiveLine(); + }; + + this.getHighlightActiveLine = function() { + return this.$highlightActiveLine; + }; + + this.$highlightSelectedWord = true; + this.setHighlightSelectedWord = function(shouldHighlight) { + if (this.$highlightSelectedWord == shouldHighlight) + return; + + this.$highlightSelectedWord = shouldHighlight; + if (shouldHighlight) + this.session.getMode().highlightSelection(this); + else + this.session.getMode().clearSelectionHighlight(this); + }; + + this.getHighlightSelectedWord = function() { + return this.$highlightSelectedWord; + }; + + this.setShowInvisibles = function(showInvisibles) { + if (this.getShowInvisibles() == showInvisibles) + return; + + this.renderer.setShowInvisibles(showInvisibles); + }; + + this.getShowInvisibles = function() { + return this.renderer.getShowInvisibles(); + }; + + this.setShowPrintMargin = function(showPrintMargin) { + this.renderer.setShowPrintMargin(showPrintMargin); + }; + + this.getShowPrintMargin = function() { + return this.renderer.getShowPrintMargin(); + }; + + this.setPrintMarginColumn = function(showPrintMargin) { + this.renderer.setPrintMarginColumn(showPrintMargin); + }; + + this.getPrintMarginColumn = function() { + return this.renderer.getPrintMarginColumn(); + }; + + this.$readOnly = false; + this.setReadOnly = function(readOnly) { + this.$readOnly = readOnly; + }; + + this.getReadOnly = function() { + return this.$readOnly; + }; + + this.$modeBehaviours = true; + this.setBehavioursEnabled = function (enabled) { + this.$modeBehaviours = enabled; + } + + this.getBehavioursEnabled = function () { + return this.$modeBehaviours; + } + + this.removeRight = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) { + this.selection.selectRight(); + } + this.session.remove(this.getSelectionRange()) + this.clearSelection(); + }; + + this.removeLeft = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) + this.selection.selectLeft(); + + var range = this.getSelectionRange(); + if (this.getBehavioursEnabled()) { + var session = this.session; + var state = session.getState(range.start.row); + var new_range = session.getMode().transformAction(state, 'deletion', this, session, range); + if (new_range !== false) { + range = new_range; + } + } + + this.session.remove(range); + this.clearSelection(); + }; + + this.removeWordRight = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) + this.selection.selectWordRight(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + + this.removeWordLeft = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) + this.selection.selectWordLeft(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + + this.removeToLineStart = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) + this.selection.selectLineStart(); + + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + }; + + this.removeToLineEnd = function() { + if (this.$readOnly) + return; + + if (this.selection.isEmpty()) + this.selection.selectLineEnd(); + + var range = this.getSelectionRange(); + if (range.start.column == range.end.column && range.start.row == range.end.row) { + range.end.column = 0; + range.end.row++; + } + + this.session.remove(range); + this.clearSelection(); + }; + + this.splitLine = function() { + if (this.$readOnly) + return; + + if (!this.selection.isEmpty()) { + this.session.remove(this.getSelectionRange()); + this.clearSelection(); + } + + var cursor = this.getCursorPosition(); + this.insert("\n"); + this.moveCursorToPosition(cursor); + }; + + this.transposeLetters = function() { + if (this.$readOnly) + return; + + if (!this.selection.isEmpty()) { + return; + } + + var cursor = this.getCursorPosition(); + var column = cursor.column; + if (column == 0) + return; + + var line = this.session.getLine(cursor.row); + if (column < line.length) { + var swap = line.charAt(column) + line.charAt(column-1); + var range = new Range(cursor.row, column-1, cursor.row, column+1) + } + else { + var swap = line.charAt(column-1) + line.charAt(column-2); + var range = new Range(cursor.row, column-2, cursor.row, column) + } + this.session.replace(range, swap); + }; + + this.indent = function() { + if (this.$readOnly) + return; + + var session = this.session; + var range = this.getSelectionRange(); + + if (range.start.row < range.end.row || range.start.column < range.end.column) { + var rows = this.$getSelectedRows(); + session.indentRows(rows.first, rows.last, "\t"); + } else { + var indentString; + + if (this.session.getUseSoftTabs()) { + var size = session.getTabSize(), + position = this.getCursorPosition(), + column = session.documentToScreenColumn(position.row, position.column), + count = (size - column % size); + + indentString = lang.stringRepeat(" ", count); + } else + indentString = "\t"; + return this.onTextInput(indentString); + } + }; + + this.blockOutdent = function() { + if (this.$readOnly) + return; + + var selection = this.session.getSelection(); + this.session.outdentRows(selection.getRange()); + }; + + this.toggleCommentLines = function() { + if (this.$readOnly) + return; + + var state = this.session.getState(this.getCursorPosition().row); + var rows = this.$getSelectedRows() + this.session.getMode().toggleCommentLines(state, this.session, rows.first, rows.last); + }; + + this.removeLines = function() { + if (this.$readOnly) + return; + + var rows = this.$getSelectedRows(); + if (rows.last == 0 || rows.last+1 < this.session.getLength()) + var range = new Range(rows.first, 0, rows.last+1, 0) + else + var range = new Range( + rows.first-1, this.session.getLine(rows.first).length, + rows.last, this.session.getLine(rows.last).length + ); + this.session.remove(range); + this.clearSelection(); + }; + + this.moveLinesDown = function() { + if (this.$readOnly) + return; + + this.$moveLines(function(firstRow, lastRow) { + return this.session.moveLinesDown(firstRow, lastRow); + }); + }; + + this.moveLinesUp = function() { + if (this.$readOnly) + return; + + this.$moveLines(function(firstRow, lastRow) { + return this.session.moveLinesUp(firstRow, lastRow); + }); + }; + + this.moveText = function(range, toPosition) { + if (this.$readOnly) + return null; + + return this.session.moveText(range, toPosition); + }; + + this.copyLinesUp = function() { + if (this.$readOnly) + return; + + this.$moveLines(function(firstRow, lastRow) { + this.session.duplicateLines(firstRow, lastRow); + return 0; + }); + }; + + this.copyLinesDown = function() { + if (this.$readOnly) + return; + + this.$moveLines(function(firstRow, lastRow) { + return this.session.duplicateLines(firstRow, lastRow); + }); + }; + + + this.$moveLines = function(mover) { + var rows = this.$getSelectedRows(); + + var linesMoved = mover.call(this, rows.first, rows.last); + + var selection = this.selection; + selection.setSelectionAnchor(rows.last+linesMoved+1, 0); + selection.$moveSelection(function() { + selection.moveCursorTo(rows.first+linesMoved, 0); + }); + }; + + this.$getSelectedRows = function() { + var range = this.getSelectionRange().collapseRows(); + + return { + first: range.start.row, + last: range.end.row + }; + }; + + this.onCompositionStart = function(text) { + this.renderer.showComposition(this.getCursorPosition()); + }; + + this.onCompositionUpdate = function(text) { + this.renderer.setCompositionText(text); + }; + + this.onCompositionEnd = function() { + this.renderer.hideComposition(); + }; + + + this.getFirstVisibleRow = function() { + return this.renderer.getFirstVisibleRow(); + }; + + this.getLastVisibleRow = function() { + return this.renderer.getLastVisibleRow(); + }; + + this.isRowVisible = function(row) { + return (row >= this.getFirstVisibleRow() && row <= this.getLastVisibleRow()); + }; + + this.$getVisibleRowCount = function() { + return this.renderer.getScrollBottomRow() - this.renderer.getScrollTopRow() + 1; + }; + + this.$getPageDownRow = function() { + return this.renderer.getScrollBottomRow(); + }; + + this.$getPageUpRow = function() { + var firstRow = this.renderer.getScrollTopRow(); + var lastRow = this.renderer.getScrollBottomRow(); + + return firstRow - (lastRow - firstRow); + }; + + this.selectPageDown = function() { + var row = this.$getPageDownRow() + Math.floor(this.$getVisibleRowCount() / 2); + + this.scrollPageDown(); + + var selection = this.getSelection(); + var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead()); + var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column); + selection.selectTo(dest.row, dest.column); + }; + + this.selectPageUp = function() { + var visibleRows = this.renderer.getScrollTopRow() - this.renderer.getScrollBottomRow(); + var row = this.$getPageUpRow() + Math.round(visibleRows / 2); + + this.scrollPageUp(); + + var selection = this.getSelection(); + var leadScreenPos = this.session.documentToScreenPosition(selection.getSelectionLead()); + var dest = this.session.screenToDocumentPosition(row, leadScreenPos.column); + selection.selectTo(dest.row, dest.column); + }; + + this.gotoPageDown = function() { + var row = this.$getPageDownRow(); + var column = this.getCursorPositionScreen().column; + + this.scrollToRow(row); + this.getSelection().moveCursorToScreen(row, column); + }; + + this.gotoPageUp = function() { + var row = this.$getPageUpRow(); + var column = this.getCursorPositionScreen().column; + + this.scrollToRow(row); + this.getSelection().moveCursorToScreen(row, column); + }; + + this.scrollPageDown = function() { + this.scrollToRow(this.$getPageDownRow()); + }; + + this.scrollPageUp = function() { + this.renderer.scrollToRow(this.$getPageUpRow()); + }; + + this.scrollToRow = function(row) { + this.renderer.scrollToRow(row); + }; + + this.scrollToLine = function(line, center) { + this.renderer.scrollToLine(line, center); + }; + + this.centerSelection = function() { + var range = this.getSelectionRange(); + var line = Math.floor(range.start.row + (range.end.row - range.start.row) / 2); + this.renderer.scrollToLine(line, true); + }; + + this.getCursorPosition = function() { + return this.selection.getCursor(); + }; + + this.getCursorPositionScreen = function() { + return this.session.documentToScreenPosition(this.getCursorPosition()); + }; + + this.getSelectionRange = function() { + return this.selection.getRange(); + }; + + + this.selectAll = function() { + this.$blockScrolling += 1; + this.selection.selectAll(); + this.$blockScrolling -= 1; + }; + + this.clearSelection = function() { + this.selection.clearSelection(); + }; + + this.moveCursorTo = function(row, column) { + this.selection.moveCursorTo(row, column); + }; + + this.moveCursorToPosition = function(pos) { + this.selection.moveCursorToPosition(pos); + }; + + + this.gotoLine = function(lineNumber, column) { + this.selection.clearSelection(); + + this.$blockScrolling += 1; + this.moveCursorTo(lineNumber-1, column || 0); + this.$blockScrolling -= 1; + + if (!this.isRowVisible(this.getCursorPosition().row)) { + this.scrollToLine(lineNumber, true); + } + }, + + this.navigateTo = function(row, column) { + this.clearSelection(); + this.moveCursorTo(row, column); + }; + + this.navigateUp = function(times) { + this.selection.clearSelection(); + times = times || 1; + this.selection.moveCursorBy(-times, 0); + }; + + this.navigateDown = function(times) { + this.selection.clearSelection(); + times = times || 1; + this.selection.moveCursorBy(times, 0); + }; + + this.navigateLeft = function(times) { + if (!this.selection.isEmpty()) { + var selectionStart = this.getSelectionRange().start; + this.moveCursorToPosition(selectionStart); + } + else { + times = times || 1; + while (times--) { + this.selection.moveCursorLeft(); + } + } + this.clearSelection(); + }; + + this.navigateRight = function(times) { + if (!this.selection.isEmpty()) { + var selectionEnd = this.getSelectionRange().end; + this.moveCursorToPosition(selectionEnd); + } + else { + times = times || 1; + while (times--) { + this.selection.moveCursorRight(); + } + } + this.clearSelection(); + }; + + this.navigateLineStart = function() { + this.selection.moveCursorLineStart(); + this.clearSelection(); + }; + + this.navigateLineEnd = function() { + this.selection.moveCursorLineEnd(); + this.clearSelection(); + }; + + this.navigateFileEnd = function() { + this.selection.moveCursorFileEnd(); + this.clearSelection(); + }; + + this.navigateFileStart = function() { + this.selection.moveCursorFileStart(); + this.clearSelection(); + }; + + this.navigateWordRight = function() { + this.selection.moveCursorWordRight(); + this.clearSelection(); + }; + + this.navigateWordLeft = function() { + this.selection.moveCursorWordLeft(); + this.clearSelection(); + }; + + this.replace = function(replacement, options) { + if (options) + this.$search.set(options); + + var range = this.$search.find(this.session); + if (!range) + return; + + this.$tryReplace(range, replacement); + if (range !== null) + this.selection.setSelectionRange(range); + }, + + this.replaceAll = function(replacement, options) { + if (options) { + this.$search.set(options); + } + + var ranges = this.$search.findAll(this.session); + if (!ranges.length) + return; + + var selection = this.getSelectionRange(); + this.clearSelection(); + this.selection.moveCursorTo(0, 0); + + this.$blockScrolling += 1; + for (var i = ranges.length - 1; i >= 0; --i) + this.$tryReplace(ranges[i], replacement); + + this.selection.setSelectionRange(selection); + this.$blockScrolling -= 1; + }, + + this.$tryReplace = function(range, replacement) { + var input = this.session.getTextRange(range); + var replacement = this.$search.replace(input, replacement); + if (replacement !== null) { + range.end = this.session.replace(range, replacement); + return range; + } else { + return null; + } + }; + + this.getLastSearchOptions = function() { + return this.$search.getOptions(); + }; + + this.find = function(needle, options) { + this.clearSelection(); + options = options || {}; + options.needle = needle; + this.$search.set(options); + this.$find(); + }, + + this.findNext = function(options) { + options = options || {}; + if (typeof options.backwards == "undefined") + options.backwards = false; + this.$search.set(options); + this.$find(); + }; + + this.findPrevious = function(options) { + options = options || {}; + if (typeof options.backwards == "undefined") + options.backwards = true; + this.$search.set(options); + this.$find(); + }; + + this.$find = function(backwards) { + if (!this.selection.isEmpty()) { + this.$search.set({needle: this.session.getTextRange(this.getSelectionRange())}); + } + + if (typeof backwards != "undefined") + this.$search.set({backwards: backwards}); + + var range = this.$search.find(this.session); + if (range) { + this.gotoLine(range.end.row+1, range.end.column); + this.selection.setSelectionRange(range); + } + }; + + this.undo = function() { + this.session.getUndoManager().undo(); + }; + + this.redo = function() { + this.session.getUndoManager().redo(); + }; + + this.destroy = function() { + this.renderer.destroy(); + } + +}).call(Editor.prototype); + + +exports.Editor = Editor; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/keyboard/textinput', ['require', 'exports', 'module' , 'pilot/event', 'pilot/useragent', 'pilot/dom'], function(require, exports, module) { + +var event = require("pilot/event"); +var useragent = require("pilot/useragent"); +var dom = require("pilot/dom"); + +var TextInput = function(parentNode, host) { + + var text = dom.createElement("textarea"); + text.style.left = "-10000px"; + parentNode.appendChild(text); + + var PLACEHOLDER = String.fromCharCode(0); + sendText(); + + var inCompostion = false; + var copied = false; + var pasted = false; + var tempStyle = ''; + + function sendText(valueToSend) { + if (!copied) { + var value = valueToSend || text.value; + if (value) { + if (value.charCodeAt(value.length-1) == PLACEHOLDER.charCodeAt(0)) { + value = value.slice(0, -1); + if (value) + host.onTextInput(value, !pasted); + } + else { + host.onTextInput(value, !pasted); + } + + // If editor is no longer focused we quit immediately, since + // it means that something else is in charge now. + if (!isFocused()) + return false; + } + } + + copied = false; + pasted = false; + + // Safari doesn't fire copy events if no text is selected + text.value = PLACEHOLDER; + text.select(); + } + + var onTextInput = function(e) { + setTimeout(function () { + if (!inCompostion) + sendText(e.data); + }, 0); + }; + + var onKeyPress = function(e) { + if (useragent.isIE && text.value.charCodeAt(0) > 128) return; + setTimeout(function() { + if (!inCompostion) + sendText(); + }, 0); + }; + + var onCompositionStart = function(e) { + inCompostion = true; + host.onCompositionStart(); + if (!useragent.isGecko) setTimeout(onCompositionUpdate, 0); + }; + + var onCompositionUpdate = function() { + if (!inCompostion) return; + host.onCompositionUpdate(text.value); + }; + + var onCompositionEnd = function(e) { + inCompostion = false; + host.onCompositionEnd(); + }; + + var onCopy = function(e) { + copied = true; + var copyText = host.getCopyText(); + if(copyText) + text.value = copyText; + else + e.preventDefault(); + text.select(); + setTimeout(function () { + sendText(); + }, 0); + }; + + var onCut = function(e) { + copied = true; + var copyText = host.getCopyText(); + if(copyText) { + text.value = copyText; + host.onCut(); + } else + e.preventDefault(); + text.select(); + setTimeout(function () { + sendText(); + }, 0); + }; + + event.addCommandKeyListener(text, host.onCommandKey.bind(host)); + if (useragent.isIE) { + var keytable = { 13:1, 27:1 }; + event.addListener(text, "keyup", function (e) { + if (inCompostion && (!text.value || keytable[e.keyCode])) + setTimeout(onCompositionEnd, 0); + if ((text.value.charCodeAt(0)|0) < 129) { + return; + }; + inCompostion ? onCompositionUpdate() : onCompositionStart(); + }); + }; + + if (text.attachEvent) { + // Old IE + Opera + event.addListener(text, "propertychange", onKeyPress); + } + else { + if (useragent.isChrome || useragent.isSafari) + event.addListener(text, "textInput", onTextInput); + else if (useragent.isIE) + // IE9 + event.addListener(text, "textinput", onTextInput); + else + // All browsers except old IE + event.addListener(text, "input", onTextInput); + } + + + event.addListener(text, "paste", function(e) { + // Mark that the next input text comes from past. + pasted = true; + // Some browsers support the event.clipboardData API. Use this to get + // the pasted content which increases speed if pasting a lot of lines. + if (e.clipboardData && e.clipboardData.getData) { + sendText(e.clipboardData.getData("text/plain")); + e.preventDefault(); + } + else { + // If a browser doesn't support any of the things above, use the regular + // method to detect the pasted input. + onKeyPress(); + } + }); + + if (useragent.isIE) { + event.addListener(text, "beforecopy", function(e) { + var copyText = host.getCopyText(); + if(copyText) + clipboardData.setData("Text", copyText); + else + e.preventDefault(); + }); + event.addListener(parentNode, "keydown", function(e) { + if (e.ctrlKey && e.keyCode == 88) { + var copyText = host.getCopyText(); + if (copyText) { + clipboardData.setData("Text", copyText); + host.onCut(); + } + event.preventDefault(e) + } + }); + } + else { + event.addListener(text, "copy", onCopy); + event.addListener(text, "cut", onCut); + } + + event.addListener(text, "compositionstart", onCompositionStart); + if (useragent.isGecko) { + event.addListener(text, "text", onCompositionUpdate); + }; + if (useragent.isWebKit) { + event.addListener(text, "keyup", onCompositionUpdate); + }; + event.addListener(text, "compositionend", onCompositionEnd); + + event.addListener(text, "blur", function() { + host.onBlur(); + }); + + event.addListener(text, "focus", function() { + host.onFocus(); + text.select(); + }); + + this.focus = function() { + host.onFocus(); + text.select(); + text.focus(); + }; + + this.blur = function() { + text.blur(); + }; + + function isFocused() { + return document.activeElement === text; + }; + this.isFocused = isFocused; + + this.getElement = function() { + return text; + }; + + this.onContextMenu = function(mousePos, isEmpty){ + if (mousePos) { + if(!tempStyle) + tempStyle = text.style.cssText; + text.style.cssText = 'position:fixed; z-index:1000;' + + 'left:' + (mousePos.x - 2) + 'px; top:' + (mousePos.y - 2) + 'px;' + + } + if (isEmpty) + text.value=''; + } + + this.onContextMenuClose = function(){ + setTimeout(function () { + if (tempStyle) { + text.style.cssText = tempStyle; + tempStyle = ''; + } + sendText(); + }, 0); + } +}; + +exports.TextInput = TextInput; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/mouse_handler', ['require', 'exports', 'module' , 'pilot/event', 'pilot/dom', 'pilot/browser_focus'], function(require, exports, module) { + +var event = require("pilot/event"); +var dom = require("pilot/dom"); +var BrowserFocus = require("pilot/browser_focus").BrowserFocus; + +var STATE_UNKNOWN = 0; +var STATE_SELECT = 1; +var STATE_DRAG = 2; + +var DRAG_TIMER = 250; // milliseconds +var DRAG_OFFSET = 5; // pixels + +var MouseHandler = function(editor) { + this.editor = editor; + + this.browserFocus = new BrowserFocus(); + event.addListener(editor.container, "mousedown", function(e) { + editor.focus(); + return event.preventDefault(e); + }); + event.addListener(editor.container, "selectstart", function(e) { + return event.preventDefault(e); + }); + + var mouseTarget = editor.renderer.getMouseEventTarget(); + event.addListener(mouseTarget, "mousedown", this.onMouseDown.bind(this)); + event.addMultiMouseDownListener(mouseTarget, 0, 2, 500, this.onMouseDoubleClick.bind(this)); + event.addMultiMouseDownListener(mouseTarget, 0, 3, 600, this.onMouseTripleClick.bind(this)); + event.addMultiMouseDownListener(mouseTarget, 0, 4, 600, this.onMouseQuadClick.bind(this)); + event.addMouseWheelListener(mouseTarget, this.onMouseWheel.bind(this)); +}; + +(function() { + + this.$scrollSpeed = 1; + this.setScrollSpeed = function(speed) { + this.$scrollSpeed = speed; + }; + + this.getScrollSpeed = function() { + return this.$scrollSpeed; + }; + + this.$getEventPosition = function(e) { + var pageX = event.getDocumentX(e); + var pageY = event.getDocumentY(e); + var pos = this.editor.renderer.screenToTextCoordinates(pageX, pageY); + pos.row = Math.max(0, Math.min(pos.row, this.editor.session.getLength()-1)); + return pos; + }; + + this.$distance = function(ax, ay, bx, by) { + return Math.sqrt(Math.pow(bx - ax, 2) + Math.pow(by - ay, 2)); + }; + + this.onMouseDown = function(e) { + // if this click caused the editor to be focused ignore the click + // for selection and cursor placement + if ( + !this.browserFocus.isFocused() + || new Date().getTime() - this.browserFocus.lastFocus < 20 + || !this.editor.isFocused() + ) + return; + + var pageX = event.getDocumentX(e); + var pageY = event.getDocumentY(e); + var pos = this.$getEventPosition(e); + var editor = this.editor; + var self = this; + var selectionRange = editor.getSelectionRange(); + var selectionEmpty = selectionRange.isEmpty(); + var state = STATE_UNKNOWN; + var inSelection = false; + + var button = event.getButton(e); + if (button !== 0) { + if (selectionEmpty) { + editor.moveCursorToPosition(pos); + } + if(button == 2) { + editor.textInput.onContextMenu({x: pageX, y: pageY}, selectionEmpty); + event.capture(editor.container, function(){}, editor.textInput.onContextMenuClose); + } + return; + } else { + // Select the fold as the user clicks it. + var fold = editor.session.getFoldAt(pos.row, pos.column, 1); + if (fold) { + editor.selection.setSelectionRange(fold.range); + return; + } + + inSelection = !editor.getReadOnly() + && !selectionEmpty + && selectionRange.contains(pos.row, pos.column); + } + + if (!inSelection) { + // Directly pick STATE_SELECT, since the user is not clicking inside + // a selection. + onStartSelect(pos); + } + + var mousePageX, mousePageY; + var overwrite = editor.getOverwrite(); + var mousedownTime = (new Date()).getTime(); + var dragCursor, dragRange; + + var onMouseSelection = function(e) { + mousePageX = event.getDocumentX(e); + mousePageY = event.getDocumentY(e); + }; + + var onMouseSelectionEnd = function() { + clearInterval(timerId); + if (state == STATE_UNKNOWN) + onStartSelect(pos); + else if (state == STATE_DRAG) + onMouseDragSelectionEnd(); + + self.$clickSelection = null; + state = STATE_UNKNOWN; + }; + + var onMouseDragSelectionEnd = function() { + dom.removeCssClass(editor.container, "ace_dragging"); + editor.session.removeMarker(dragSelectionMarker); + + if (!self.$clickSelection) { + if (!dragCursor) { + editor.moveCursorToPosition(pos); + editor.selection.clearSelection(pos.row, pos.column); + } + } + + if (!dragCursor) + return; + + if (dragRange.contains(dragCursor.row, dragCursor.column)) { + dragCursor = null; + return; + } + + editor.clearSelection(); + var newRange = editor.moveText(dragRange, dragCursor); + if (!newRange) { + dragCursor = null; + return; + } + + editor.selection.setSelectionRange(newRange); + }; + + var onSelectionInterval = function() { + if (mousePageX === undefined || mousePageY === undefined) + return; + + if (state == STATE_UNKNOWN) { + var distance = self.$distance(pageX, pageY, mousePageX, mousePageY); + var time = (new Date()).getTime(); + + + if (distance > DRAG_OFFSET) { + state = STATE_SELECT; + var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY); + cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1)); + onStartSelect(cursor); + } else if ((time - mousedownTime) > DRAG_TIMER) { + state = STATE_DRAG; + dragRange = editor.getSelectionRange(); + var style = editor.getSelectionStyle(); + dragSelectionMarker = editor.session.addMarker(dragRange, "ace_selection", style); + editor.clearSelection(); + dom.addCssClass(editor.container, "ace_dragging"); + } + + } + + if (state == STATE_DRAG) + onDragSelectionInterval(); + else if (state == STATE_SELECT) + onUpdateSelectionInterval(); + }; + + function onStartSelect(pos) { + if (e.shiftKey) + editor.selection.selectToPosition(pos) + else { + if (!self.$clickSelection) { + editor.moveCursorToPosition(pos); + editor.selection.clearSelection(pos.row, pos.column); + } + } + state = STATE_SELECT; + } + + var onUpdateSelectionInterval = function() { + var cursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY); + cursor.row = Math.max(0, Math.min(cursor.row, editor.session.getLength()-1)); + + if (self.$clickSelection) { + if (self.$clickSelection.contains(cursor.row, cursor.column)) { + editor.selection.setSelectionRange(self.$clickSelection); + } else { + if (self.$clickSelection.compare(cursor.row, cursor.column) == -1) { + var anchor = self.$clickSelection.end; + } else { + var anchor = self.$clickSelection.start; + } + editor.selection.setSelectionAnchor(anchor.row, anchor.column); + editor.selection.selectToPosition(cursor); + } + } + else { + editor.selection.selectToPosition(cursor); + } + + editor.renderer.scrollCursorIntoView(); + }; + + var onDragSelectionInterval = function() { + dragCursor = editor.renderer.screenToTextCoordinates(mousePageX, mousePageY); + dragCursor.row = Math.max(0, Math.min(dragCursor.row, + editor.session.getLength() - 1)); + + editor.moveCursorToPosition(dragCursor); + }; + + event.capture(editor.container, onMouseSelection, onMouseSelectionEnd); + var timerId = setInterval(onSelectionInterval, 20); + + return event.preventDefault(e); + }; + + this.onMouseDoubleClick = function(e) { + var editor = this.editor; + var pos = this.$getEventPosition(e); + + // If the user dclicked on a fold, then expand it. + var fold = editor.session.getFoldAt(pos.row, pos.column, 1); + if (fold) { + editor.session.expandFold(fold); + } else { + editor.moveCursorToPosition(pos); + editor.selection.selectWord(); + this.$clickSelection = editor.getSelectionRange(); + } + }; + + this.onMouseTripleClick = function(e) { + var pos = this.$getEventPosition(e); + this.editor.moveCursorToPosition(pos); + this.editor.selection.selectLine(); + this.$clickSelection = this.editor.getSelectionRange(); + }; + + this.onMouseQuadClick = function(e) { + this.editor.selectAll(); + this.$clickSelection = this.editor.getSelectionRange(); + }; + + this.onMouseWheel = function(e) { + var speed = this.$scrollSpeed * 2; + + this.editor.renderer.scrollBy(e.wheelX * speed, e.wheelY * speed); + return event.preventDefault(e); + }; + + +}).call(MouseHandler.prototype); + +exports.MouseHandler = MouseHandler; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/browser_focus', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/event', 'pilot/event_emitter'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var event = require("pilot/event"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +/** + * This class keeps track of the focus state of the given window. + * Focus changes for example when the user switches a browser tab, + * goes to the location bar or switches to another application. + */ +var BrowserFocus = function(win) { + win = win || window; + + this.lastFocus = new Date().getTime(); + this._isFocused = true; + + var _self = this; + event.addListener(win, "blur", function(e) { + _self._setFocused(false); + }); + + event.addListener(win, "focus", function(e) { + _self._setFocused(true); + }); +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.isFocused = function() { + return this._isFocused; + }; + + this._setFocused = function(isFocused) { + if (this._isFocused == isFocused) + return; + + if (isFocused) + this.lastFocus = new Date().getTime(); + + this._isFocused = isFocused; + this._emit("changeFocus"); + }; + +}).call(BrowserFocus.prototype); + + +exports.BrowserFocus = BrowserFocus; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/keyboard/keybinding', ['require', 'exports', 'module' , 'pilot/useragent', 'pilot/keys', 'pilot/event', 'pilot/settings', 'pilot/canon', 'ace/commands/default_commands'], function(require, exports, module) { + +var useragent = require("pilot/useragent"); +var keyUtil = require("pilot/keys"); +var event = require("pilot/event"); +var settings = require("pilot/settings").settings; +var canon = require("pilot/canon"); +require("ace/commands/default_commands"); + +var KeyBinding = function(editor) { + this.$editor = editor; + this.$data = { }; + this.$keyboardHandler = null; +}; + +(function() { + this.setKeyboardHandler = function(keyboardHandler) { + if (this.$keyboardHandler != keyboardHandler) { + this.$data = { }; + this.$keyboardHandler = keyboardHandler; + } + }; + + this.getKeyboardHandler = function() { + return this.$keyboardHandler; + }; + + this.$callKeyboardHandler = function (e, hashId, keyOrText, keyCode) { + var env = {editor: this.$editor}, + toExecute; + + if (this.$keyboardHandler) { + toExecute = + this.$keyboardHandler.handleKeyboard(this.$data, hashId, keyOrText, keyCode, e); + } + + // If there is nothing to execute yet, then use the default keymapping. + if (!toExecute || !toExecute.command) { + if (hashId != 0 || keyCode != 0) { + toExecute = { + command: canon.findKeyCommand(env, "editor", hashId, keyOrText) + } + } else { + toExecute = { + command: "inserttext", + args: { + text: keyOrText + } + } + } + } + + var success = false; + if (toExecute) { + success = canon.exec(toExecute.command, + env, "editor", toExecute.args); + if (success) { + event.stopEvent(e); + } + } + return success; + }; + + this.onCommandKey = function(e, hashId, keyCode, keyString) { + // In case there is no keyString, try to interprete the keyCode. + if (!keyString) { + keyString = keyUtil.keyCodeToString(keyCode); + } + return this.$callKeyboardHandler(e, hashId, keyString, keyCode); + }; + + this.onTextInput = function(text) { + return this.$callKeyboardHandler({}, 0, text, 0); + } + +}).call(KeyBinding.prototype); + +exports.KeyBinding = KeyBinding; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/commands/default_commands', ['require', 'exports', 'module' , 'pilot/lang', 'pilot/canon'], function(require, exports, module) { + +var lang = require("pilot/lang"); +var canon = require("pilot/canon"); + +function bindKey(win, mac) { + return { + win: win, + mac: mac, + sender: "editor" + }; +} + +canon.addCommand({ + name: "null", + exec: function(env, args, request) { } +}); + +canon.addCommand({ + name: "selectall", + bindKey: bindKey("Ctrl-A", "Command-A"), + exec: function(env, args, request) { env.editor.selectAll(); } +}); +canon.addCommand({ + name: "removeline", + bindKey: bindKey("Ctrl-D", "Command-D"), + exec: function(env, args, request) { env.editor.removeLines(); } +}); +canon.addCommand({ + name: "gotoline", + bindKey: bindKey("Ctrl-L", "Command-L"), + exec: function(env, args, request) { + var line = parseInt(prompt("Enter line number:")); + if (!isNaN(line)) { + env.editor.gotoLine(line); + } + } +}); +canon.addCommand({ + name: "togglecomment", + bindKey: bindKey("Ctrl-7", "Command-7"), + exec: function(env, args, request) { env.editor.toggleCommentLines(); } +}); +canon.addCommand({ + name: "findnext", + bindKey: bindKey("Ctrl-K", "Command-G"), + exec: function(env, args, request) { env.editor.findNext(); } +}); +canon.addCommand({ + name: "findprevious", + bindKey: bindKey("Ctrl-Shift-K", "Command-Shift-G"), + exec: function(env, args, request) { env.editor.findPrevious(); } +}); +canon.addCommand({ + name: "find", + bindKey: bindKey("Ctrl-F", "Command-F"), + exec: function(env, args, request) { + var needle = prompt("Find:"); + env.editor.find(needle); + } +}); +canon.addCommand({ + name: "replace", + bindKey: bindKey("Ctrl-R", "Command-Option-F"), + exec: function(env, args, request) { + var needle = prompt("Find:"); + if (!needle) + return; + var replacement = prompt("Replacement:"); + if (!replacement) + return; + env.editor.replace(replacement, {needle: needle}); + } +}); +canon.addCommand({ + name: "replaceall", + bindKey: bindKey("Ctrl-Shift-R", "Command-Shift-Option-F"), + exec: function(env, args, request) { + var needle = prompt("Find:"); + if (!needle) + return; + var replacement = prompt("Replacement:"); + if (!replacement) + return; + env.editor.replaceAll(replacement, {needle: needle}); + } +}); +canon.addCommand({ + name: "undo", + bindKey: bindKey("Ctrl-Z", "Command-Z"), + exec: function(env, args, request) { env.editor.undo(); } +}); +canon.addCommand({ + name: "redo", + bindKey: bindKey("Ctrl-Shift-Z|Ctrl-Y", "Command-Shift-Z|Command-Y"), + exec: function(env, args, request) { env.editor.redo(); } +}); +canon.addCommand({ + name: "overwrite", + bindKey: bindKey("Insert", "Insert"), + exec: function(env, args, request) { env.editor.toggleOverwrite(); } +}); +canon.addCommand({ + name: "copylinesup", + bindKey: bindKey("Ctrl-Alt-Up", "Command-Option-Up"), + exec: function(env, args, request) { env.editor.copyLinesUp(); } +}); +canon.addCommand({ + name: "movelinesup", + bindKey: bindKey("Alt-Up", "Option-Up"), + exec: function(env, args, request) { env.editor.moveLinesUp(); } +}); +canon.addCommand({ + name: "selecttostart", + bindKey: bindKey("Ctrl-Shift-Home|Alt-Shift-Up", "Command-Shift-Up"), + exec: function(env, args, request) { env.editor.getSelection().selectFileStart(); } +}); +canon.addCommand({ + name: "gotostart", + bindKey: bindKey("Ctrl-Home|Ctrl-Up", "Command-Home|Command-Up"), + exec: function(env, args, request) { env.editor.navigateFileStart(); } +}); +canon.addCommand({ + name: "selectup", + bindKey: bindKey("Shift-Up", "Shift-Up"), + exec: function(env, args, request) { env.editor.getSelection().selectUp(); } +}); +canon.addCommand({ + name: "golineup", + bindKey: bindKey("Up", "Up|Ctrl-P"), + exec: function(env, args, request) { env.editor.navigateUp(args.times); } +}); +canon.addCommand({ + name: "copylinesdown", + bindKey: bindKey("Ctrl-Alt-Down", "Command-Option-Down"), + exec: function(env, args, request) { env.editor.copyLinesDown(); } +}); +canon.addCommand({ + name: "movelinesdown", + bindKey: bindKey("Alt-Down", "Option-Down"), + exec: function(env, args, request) { env.editor.moveLinesDown(); } +}); +canon.addCommand({ + name: "selecttoend", + bindKey: bindKey("Ctrl-Shift-End|Alt-Shift-Down", "Command-Shift-Down"), + exec: function(env, args, request) { env.editor.getSelection().selectFileEnd(); } +}); +canon.addCommand({ + name: "gotoend", + bindKey: bindKey("Ctrl-End|Ctrl-Down", "Command-End|Command-Down"), + exec: function(env, args, request) { env.editor.navigateFileEnd(); } +}); +canon.addCommand({ + name: "selectdown", + bindKey: bindKey("Shift-Down", "Shift-Down"), + exec: function(env, args, request) { env.editor.getSelection().selectDown(); } +}); +canon.addCommand({ + name: "golinedown", + bindKey: bindKey("Down", "Down|Ctrl-N"), + exec: function(env, args, request) { env.editor.navigateDown(args.times); } +}); +canon.addCommand({ + name: "selectwordleft", + bindKey: bindKey("Ctrl-Shift-Left", "Option-Shift-Left"), + exec: function(env, args, request) { env.editor.getSelection().selectWordLeft(); } +}); +canon.addCommand({ + name: "gotowordleft", + bindKey: bindKey("Ctrl-Left", "Option-Left"), + exec: function(env, args, request) { env.editor.navigateWordLeft(); } +}); +canon.addCommand({ + name: "selecttolinestart", + bindKey: bindKey("Alt-Shift-Left", "Command-Shift-Left"), + exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } +}); +canon.addCommand({ + name: "gotolinestart", + bindKey: bindKey("Alt-Left|Home", "Command-Left|Home|Ctrl-A"), + exec: function(env, args, request) { env.editor.navigateLineStart(); } +}); +canon.addCommand({ + name: "selectleft", + bindKey: bindKey("Shift-Left", "Shift-Left"), + exec: function(env, args, request) { env.editor.getSelection().selectLeft(); } +}); +canon.addCommand({ + name: "gotoleft", + bindKey: bindKey("Left", "Left|Ctrl-B"), + exec: function(env, args, request) { env.editor.navigateLeft(args.times); } +}); +canon.addCommand({ + name: "selectwordright", + bindKey: bindKey("Ctrl-Shift-Right", "Option-Shift-Right"), + exec: function(env, args, request) { env.editor.getSelection().selectWordRight(); } +}); +canon.addCommand({ + name: "gotowordright", + bindKey: bindKey("Ctrl-Right", "Option-Right"), + exec: function(env, args, request) { env.editor.navigateWordRight(); } +}); +canon.addCommand({ + name: "selecttolineend", + bindKey: bindKey("Alt-Shift-Right", "Command-Shift-Right"), + exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } +}); +canon.addCommand({ + name: "gotolineend", + bindKey: bindKey("Alt-Right|End", "Command-Right|End|Ctrl-E"), + exec: function(env, args, request) { env.editor.navigateLineEnd(); } +}); +canon.addCommand({ + name: "selectright", + bindKey: bindKey("Shift-Right", "Shift-Right"), + exec: function(env, args, request) { env.editor.getSelection().selectRight(); } +}); +canon.addCommand({ + name: "gotoright", + bindKey: bindKey("Right", "Right|Ctrl-F"), + exec: function(env, args, request) { env.editor.navigateRight(args.times); } +}); +canon.addCommand({ + name: "selectpagedown", + bindKey: bindKey("Shift-PageDown", "Shift-PageDown"), + exec: function(env, args, request) { env.editor.selectPageDown(); } +}); +canon.addCommand({ + name: "pagedown", + bindKey: bindKey(null, "PageDown"), + exec: function(env, args, request) { env.editor.scrollPageDown(); } +}); +canon.addCommand({ + name: "gotopagedown", + bindKey: bindKey("PageDown", "Option-PageDown|Ctrl-V"), + exec: function(env, args, request) { env.editor.gotoPageDown(); } +}); +canon.addCommand({ + name: "selectpageup", + bindKey: bindKey("Shift-PageUp", "Shift-PageUp"), + exec: function(env, args, request) { env.editor.selectPageUp(); } +}); +canon.addCommand({ + name: "pageup", + bindKey: bindKey(null, "PageUp"), + exec: function(env, args, request) { env.editor.scrollPageUp(); } +}); +canon.addCommand({ + name: "gotopageup", + bindKey: bindKey("PageUp", "Option-PageUp"), + exec: function(env, args, request) { env.editor.gotoPageUp(); } +}); +canon.addCommand({ + name: "selectlinestart", + bindKey: bindKey("Shift-Home", "Shift-Home"), + exec: function(env, args, request) { env.editor.getSelection().selectLineStart(); } +}); +canon.addCommand({ + name: "selectlineend", + bindKey: bindKey("Shift-End", "Shift-End"), + exec: function(env, args, request) { env.editor.getSelection().selectLineEnd(); } +}); +canon.addCommand({ + name: "del", + bindKey: bindKey("Delete", "Delete|Ctrl-D"), + exec: function(env, args, request) { env.editor.removeRight(); } +}); +canon.addCommand({ + name: "backspace", + bindKey: bindKey( + "Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace", + "Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H" + ), + exec: function(env, args, request) { env.editor.removeLeft(); } +}); +canon.addCommand({ + name: "removetolinestart", + bindKey: bindKey(null, "Option-Backspace"), + exec: function(env, args, request) { env.editor.removeToLineStart(); } +}); +canon.addCommand({ + name: "removetolineend", + bindKey: bindKey(null, "Ctrl-K"), + exec: function(env, args, request) { env.editor.removeToLineEnd(); } +}); +canon.addCommand({ + name: "removewordleft", + bindKey: bindKey("Ctrl-Backspace", "Alt-Backspace|Ctrl-Alt-Backspace"), + exec: function(env, args, request) { env.editor.removeWordLeft(); } +}); +canon.addCommand({ + name: "removewordright", + bindKey: bindKey(null, "Alt-Delete"), + exec: function(env, args, request) { env.editor.removeWordRight(); } +}); +canon.addCommand({ + name: "outdent", + bindKey: bindKey("Shift-Tab", "Shift-Tab"), + exec: function(env, args, request) { env.editor.blockOutdent(); } +}); +canon.addCommand({ + name: "indent", + bindKey: bindKey("Tab", "Tab"), + exec: function(env, args, request) { env.editor.indent(); } +}); +canon.addCommand({ + name: "inserttext", + exec: function(env, args, request) { + env.editor.insert(lang.stringRepeat(args.text || "", args.times || 1)); + } +}); +canon.addCommand({ + name: "centerselection", + bindKey: bindKey(null, "Ctrl-L"), + exec: function(env, args, request) { env.editor.centerSelection(); } +}); +canon.addCommand({ + name: "splitline", + bindKey: bindKey(null, "Ctrl-O"), + exec: function(env, args, request) { env.editor.splitLine(); } +}); +canon.addCommand({ + name: "transposeletters", + bindKey: bindKey("Ctrl-T", "Ctrl-T"), + exec: function(env, args, request) { env.editor.transposeLetters(); } +}); + +});/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/edit_session', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/lang', 'pilot/event_emitter', 'ace/selection', 'ace/mode/text', 'ace/range', 'ace/document', 'ace/background_tokenizer', 'ace/edit_session/folding'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var lang = require("pilot/lang"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; +var Selection = require("ace/selection").Selection; +var TextMode = require("ace/mode/text").Mode; +var Range = require("ace/range").Range; +var Document = require("ace/document").Document; +var BackgroundTokenizer = require("ace/background_tokenizer").BackgroundTokenizer; + +var EditSession = function(text, mode) { + this.$modified = true; + this.$breakpoints = []; + this.$frontMarkers = {}; + this.$backMarkers = {}; + this.$markerId = 1; + this.$rowCache = []; + this.$wrapData = []; + this.$foldData = []; + this.$foldData.toString = function() { + var str = ""; + this.forEach(function(foldLine) { + str += "\n" + foldLine.toString(); + }); + return str; + } + + if (text instanceof Document) { + this.setDocument(text); + } else { + this.setDocument(new Document(text)); + } + + this.selection = new Selection(this); + if (mode) + this.setMode(mode); + else + this.setMode(new TextMode()); +}; + + +(function() { + + oop.implement(this, EventEmitter); + + this.setDocument = function(doc) { + if (this.doc) + throw new Error("Document is already set"); + + this.doc = doc; + doc.on("change", this.onChange.bind(this)); + this.on("changeFold", this.onChangeFold.bind(this)); + }; + + this.getDocument = function() { + return this.doc; + }; + + this.$resetRowCache = function(row) { + if (row == 0) { + this.$rowCache = []; + return; + } + var rowCache = this.$rowCache; + for (var i = 0; i < rowCache.length; i++) { + if (rowCache[i].docRow >= row) { + rowCache.splice(i, rowCache.length); + return; + } + } + }; + + this.onChangeFold = function(e) { + var fold = e.data; + this.$resetRowCache(fold.start.row); + }; + + this.onChange = function(e) { + var delta = e.data; + this.$modified = true; + + this.$resetRowCache(delta.range.start.row); + + var removedFolds = this.$updateInternalDataOnChange(e); + if (!this.$fromUndo && this.$undoManager && !delta.ignore) { + this.$deltasDoc.push(delta); + if (removedFolds && removedFolds.length != 0) { + this.$deltasFold.push({ + action: "removeFolds", + folds: removedFolds + }); + } + + this.$informUndoManager.schedule(); + } + + this.bgTokenizer.start(delta.range.start.row); + this._dispatchEvent("change", e); + }; + + this.setValue = function(text) { + this.doc.setValue(text); + this.selection.moveCursorTo(0, 0); + this.selection.clearSelection(); + + this.$resetRowCache(0); + this.$deltas = []; + this.$deltasDoc = []; + this.$deltasFold = []; + this.getUndoManager().reset(); + }; + + this.getValue = + this.toString = function() { + return this.doc.getValue(); + }; + + this.getSelection = function() { + return this.selection; + }; + + this.getState = function(row) { + return this.bgTokenizer.getState(row); + }; + + this.getTokens = function(firstRow, lastRow) { + return this.bgTokenizer.getTokens(firstRow, lastRow); + }; + + this.setUndoManager = function(undoManager) { + this.$undoManager = undoManager; + this.$resetRowCache(0); + this.$deltas = []; + this.$deltasDoc = []; + this.$deltasFold = []; + + if (this.$informUndoManager) + this.$informUndoManager.cancel(); + + if (undoManager) { + var self = this; + this.$syncInformUndoManager = function() { + self.$informUndoManager.cancel(); + + if (self.$deltasFold.length) { + self.$deltas.push({ + group: "fold", + deltas: self.$deltasFold + }); + self.$deltasFold = []; + } + + if (self.$deltasDoc.length) { + self.$deltas.push({ + group: "doc", + deltas: self.$deltasDoc + }); + self.$deltasDoc = []; + } + + if (self.$deltas.length > 0) { + undoManager.execute({ + action: "aceupdate", + args: [self.$deltas, self] + }); + } + + self.$deltas = []; + } + this.$informUndoManager = + lang.deferredCall(this.$syncInformUndoManager); + } + }; + + this.$defaultUndoManager = { + undo: function() {}, + redo: function() {}, + reset: function() {} + }; + + this.getUndoManager = function() { + return this.$undoManager || this.$defaultUndoManager; + }, + + this.getTabString = function() { + if (this.getUseSoftTabs()) { + return lang.stringRepeat(" ", this.getTabSize()); + } else { + return "\t"; + } + }; + + this.$useSoftTabs = true; + this.setUseSoftTabs = function(useSoftTabs) { + if (this.$useSoftTabs === useSoftTabs) return; + + this.$useSoftTabs = useSoftTabs; + }; + + this.getUseSoftTabs = function() { + return this.$useSoftTabs; + }; + + this.$tabSize = 4; + this.setTabSize = function(tabSize) { + if (isNaN(tabSize) || this.$tabSize === tabSize) return; + + this.$modified = true; + this.$tabSize = tabSize; + this._dispatchEvent("changeTabSize"); + }; + + this.getTabSize = function() { + return this.$tabSize; + }; + + this.isTabStop = function(position) { + return this.$useSoftTabs && (position.column % this.$tabSize == 0); + }; + + this.$overwrite = false; + this.setOverwrite = function(overwrite) { + if (this.$overwrite == overwrite) return; + + this.$overwrite = overwrite; + this._dispatchEvent("changeOverwrite"); + }; + + this.getOverwrite = function() { + return this.$overwrite; + }; + + this.toggleOverwrite = function() { + this.setOverwrite(!this.$overwrite); + }; + + this.getBreakpoints = function() { + return this.$breakpoints; + }; + + this.setBreakpoints = function(rows) { + this.$breakpoints = []; + for (var i=0; i 0) { + inToken = !!line.charAt(column - 1).match(this.tokenRe); + } + + if (!inToken) { + inToken = !!line.charAt(column).match(this.tokenRe); + } + + var re = inToken ? this.tokenRe : this.nonTokenRe; + + var start = column; + if (start > 0) { + do { + start--; + } + while (start >= 0 && line.charAt(start).match(re)); + start++; + } + + var end = column; + while (end < line.length && line.charAt(end).match(re)) { + end++; + } + + return new Range(row, start, row, end); + }; + + this.setNewLineMode = function(newLineMode) { + this.doc.setNewLineMode(newLineMode); + }; + + this.getNewLineMode = function() { + return this.doc.getNewLineMode(); + }; + + this.$useWorker = true; + this.setUseWorker = function(useWorker) { + if (this.$useWorker == useWorker) + return; + + this.$useWorker = useWorker; + + this.$stopWorker(); + if (useWorker) + this.$startWorker(); + }; + + this.getUseWorker = function() { + return this.$useWorker; + }; + + this.onReloadTokenizer = function(e) { + var rows = e.data; + this.bgTokenizer.start(rows.first); + this._dispatchEvent("tokenizerUpdate", e); + }; + + this.$mode = null; + this.setMode = function(mode) { + if (this.$mode === mode) return; + this.$mode = mode; + + this.$stopWorker(); + + if (this.$useWorker) + this.$startWorker(); + + var tokenizer = mode.getTokenizer(); + + if(tokenizer.addEventListener !== undefined) { + var onReloadTokenizer = this.onReloadTokenizer.bind(this); + tokenizer.addEventListener("update", onReloadTokenizer); + } + + if (!this.bgTokenizer) { + this.bgTokenizer = new BackgroundTokenizer(tokenizer); + var _self = this; + this.bgTokenizer.addEventListener("update", function(e) { + _self._dispatchEvent("tokenizerUpdate", e); + }); + } else { + this.bgTokenizer.setTokenizer(tokenizer); + } + + this.bgTokenizer.setDocument(this.getDocument()); + this.bgTokenizer.start(0); + + this.tokenRe = mode.tokenRe; + this.nonTokenRe = mode.nonTokenRe; + + this._dispatchEvent("changeMode"); + }; + + this.$stopWorker = function() { + if (this.$worker) + this.$worker.terminate(); + + this.$worker = null; + }; + + this.$startWorker = function() { + if (typeof Worker !== "undefined" && !require.noWorker) { + try { + this.$worker = this.$mode.createWorker(this); + } catch (e) { + console.log("Could not load worker"); + console.log(e); + this.$worker = null; + } + } + else + this.$worker = null; + }; + + this.getMode = function() { + return this.$mode; + }; + + this.$scrollTop = 0; + this.setScrollTopRow = function(scrollTopRow) { + if (this.$scrollTop === scrollTopRow) return; + + this.$scrollTop = scrollTopRow; + this._dispatchEvent("changeScrollTop"); + }; + + this.getScrollTopRow = function() { + return this.$scrollTop; + }; + + this.getWidth = function() { + this.$computeWidth(); + return this.width; + }; + + this.getScreenWidth = function() { + this.$computeWidth(); + return this.screenWidth; + }; + + this.$computeWidth = function(force) { + if (this.$modified || force) { + this.$modified = false; + + var lines = this.doc.getAllLines(); + var longestLine = 0; + var longestScreenLine = 0; + + for ( var i = 0; i < lines.length; i++) { + var foldLine = this.getFoldLine(i), + line, len; + + line = lines[i]; + if (foldLine) { + var end = foldLine.range.end; + line = this.getFoldDisplayLine(foldLine); + // Continue after the foldLine.end.row. All the lines in + // between are folded. + i = end.row; + } + len = line.length; + longestLine = Math.max(longestLine, len); + if (!this.$useWrapMode) { + longestScreenLine = Math.max( + longestScreenLine, + this.$getStringScreenWidth(line)[0] + ); + } + } + this.width = longestLine; + + if (this.$useWrapMode) { + this.screenWidth = this.$wrapLimit; + } else { + this.screenWidth = longestScreenLine; + } + } + }; + + /** + * Get a verbatim copy of the given line as it is in the document + */ + this.getLine = function(row) { + return this.doc.getLine(row); + }; + + this.getLines = function(firstRow, lastRow) { + return this.doc.getLines(firstRow, lastRow); + }; + + this.getLength = function() { + return this.doc.getLength(); + }; + + this.getTextRange = function(range) { + return this.doc.getTextRange(range); + }; + + this.findMatchingBracket = function(position) { + if (position.column == 0) return null; + + var charBeforeCursor = this.getLine(position.row).charAt(position.column-1); + if (charBeforeCursor == "") return null; + + var match = charBeforeCursor.match(/([\(\[\{])|([\)\]\}])/); + if (!match) { + return null; + } + + if (match[1]) { + return this.$findClosingBracket(match[1], position); + } else { + return this.$findOpeningBracket(match[2], position); + } + }; + + this.$brackets = { + ")": "(", + "(": ")", + "]": "[", + "[": "]", + "{": "}", + "}": "{" + }; + + this.$findOpeningBracket = function(bracket, position) { + var openBracket = this.$brackets[bracket]; + + var column = position.column - 2; + var row = position.row; + var depth = 1; + + var line = this.getLine(row); + + while (true) { + while(column >= 0) { + var ch = line.charAt(column); + if (ch == openBracket) { + depth -= 1; + if (depth == 0) { + return {row: row, column: column}; + } + } + else if (ch == bracket) { + depth +=1; + } + column -= 1; + } + row -=1; + if (row < 0) break; + + var line = this.getLine(row); + var column = line.length-1; + } + return null; + }; + + this.$findClosingBracket = function(bracket, position) { + var closingBracket = this.$brackets[bracket]; + + var column = position.column; + var row = position.row; + var depth = 1; + + var line = this.getLine(row); + var lineCount = this.getLength(); + + while (true) { + while(column < line.length) { + var ch = line.charAt(column); + if (ch == closingBracket) { + depth -= 1; + if (depth == 0) { + return {row: row, column: column}; + } + } + else if (ch == bracket) { + depth +=1; + } + column += 1; + } + row +=1; + if (row >= lineCount) break; + + var line = this.getLine(row); + var column = 0; + } + return null; + }; + + this.insert = function(position, text) { + return this.doc.insert(position, text); + }; + + this.remove = function(range) { + return this.doc.remove(range); + }; + + this.undoChanges = function(deltas, dontSelect) { + if (!deltas.length) + return; + + this.$fromUndo = true; + var lastUndoRange = null; + for (var i = deltas.length - 1; i != -1; i--) { + delta = deltas[i]; + if (delta.group == "doc") { + this.doc.revertDeltas(delta.deltas); + lastUndoRange = + this.$getUndoSelection(delta.deltas, true, lastUndoRange); + } else { + delta.deltas.forEach(function(foldDelta) { + this.addFolds(foldDelta.folds); + }, this); + } + } + this.$fromUndo = false; + lastUndoRange && + !dontSelect && + this.selection.setSelectionRange(lastUndoRange); + return lastUndoRange; + }, + + this.redoChanges = function(deltas, dontSelect) { + if (!deltas.length) + return; + + this.$fromUndo = true; + var lastUndoRange = null; + for (var i = 0; i < deltas.length; i++) { + delta = deltas[i]; + if (delta.group == "doc") { + this.doc.applyDeltas(delta.deltas); + lastUndoRange = + this.$getUndoSelection(delta.deltas, false, lastUndoRange); + } + } + this.$fromUndo = false; + lastUndoRange && + !dontSelect && + this.selection.setSelectionRange(lastUndoRange); + return lastUndoRange; + }, + + this.$getUndoSelection = function(deltas, isUndo, lastUndoRange) { + function isInsert(delta) { + var insert = + delta.action == "insertText" || delta.action == "insertLines"; + return isUndo ? !insert : insert; + } + + var delta = deltas[0]; + var range, point; + var lastDeltaIsInsert = false; + if (isInsert(delta)) { + range = delta.range.clone(); + lastDeltaIsInsert = true; + } else { + range = Range.fromPoints(delta.range.start, delta.range.start); + lastDeltaIsInsert = false; + } + + for (var i = 1; i < deltas.length; i++) { + delta = deltas[i]; + if (isInsert(delta)) { + point = delta.range.start; + if (range.compare(point.row, point.column) == -1) { + range.setStart(delta.range.start); + } + point = delta.range.end; + if (range.compare(point.row, point.column) == 1) { + range.setEnd(delta.range.end); + } + lastDeltaIsInsert = true; + } else { + point = delta.range.start; + if (range.compare(point.row, point.column) == -1) { + range = + Range.fromPoints(delta.range.start, delta.range.start); + } + lastDeltaIsInsert = false; + } + } + + // Check if this range and the last undo range has something in common. + // If true, merge the ranges. + if (lastUndoRange != null) { + var cmp = lastUndoRange.compareRange(range); + if (cmp == 1) { + range.setStart(lastUndoRange.start); + } else if (cmp == -1) { + range.setEnd(lastUndoRange.end); + } + } + + return range; + }, + + this.replace = function(range, text) { + return this.doc.replace(range, text); + }; + + /** + * Move a range of text from the given range to the given position. + * + * @param fromRange {Range} The range of text you want moved within the + * document. + * @param toPosition {Object} The location (row and column) where you want + * to move the text to. + * @return {Range} The new range where the text was moved to. + */ + this.moveText = function(fromRange, toPosition) { + var text = this.getTextRange(fromRange); + this.remove(fromRange); + + var toRow = toPosition.row; + var toColumn = toPosition.column; + + // Make sure to update the insert location, when text is removed in + // front of the chosen point of insertion. + if (!fromRange.isMultiLine() && fromRange.start.row == toRow && + fromRange.end.column < toColumn) + toColumn -= text.length; + + if (fromRange.isMultiLine() && fromRange.end.row < toRow) { + var lines = this.doc.$split(text); + toRow -= lines.length - 1; + } + + var endRow = toRow + fromRange.end.row - fromRange.start.row; + var endColumn = fromRange.isMultiLine() ? + fromRange.end.column : + toColumn + fromRange.end.column - fromRange.start.column; + + var toRange = new Range(toRow, toColumn, endRow, endColumn); + + this.insert(toRange.start, text); + + return toRange; + }; + + this.indentRows = function(startRow, endRow, indentString) { + indentString = indentString.replace(/\t/g, this.getTabString()); + for (var row=startRow; row<=endRow; row++) { + this.insert({row: row, column:0}, indentString); + } + }; + + this.outdentRows = function (range) { + var rowRange = range.collapseRows(); + var deleteRange = new Range(0, 0, 0, 0); + var size = this.getTabSize(); + + for (var i = rowRange.start.row; i <= rowRange.end.row; ++i) { + var line = this.getLine(i); + + deleteRange.start.row = i; + deleteRange.end.row = i; + for (var j = 0; j < size; ++j) + if (line.charAt(j) != ' ') + break; + if (j < size && line.charAt(j) == '\t') { + deleteRange.start.column = j; + deleteRange.end.column = j + 1; + } else { + deleteRange.start.column = 0; + deleteRange.end.column = j; + } + this.remove(deleteRange); + } + }; + + this.moveLinesUp = function(firstRow, lastRow) { + if (firstRow <= 0) return 0; + + var removed = this.doc.removeLines(firstRow, lastRow); + this.doc.insertLines(firstRow - 1, removed); + return -1; + }; + + this.moveLinesDown = function(firstRow, lastRow) { + if (lastRow >= this.doc.getLength()-1) return 0; + + var removed = this.doc.removeLines(firstRow, lastRow); + this.doc.insertLines(firstRow+1, removed); + return 1; + }; + + this.duplicateLines = function(firstRow, lastRow) { + var firstRow = this.$clipRowToDocument(firstRow); + var lastRow = this.$clipRowToDocument(lastRow); + + var lines = this.getLines(firstRow, lastRow); + this.doc.insertLines(firstRow, lines); + + var addedRows = lastRow - firstRow + 1; + return addedRows; + }; + + this.$clipRowToDocument = function(row) { + return Math.max(0, Math.min(row, this.doc.getLength()-1)); + }; + + this.$clipPositionToDocument = function(row, column) { + column = Math.max(0, column); + + if (row < 0) { + row = 0; + column = 0; + } else { + var len = this.doc.getLength(); + if (row >= len) { + row = len - 1; + column = this.doc.getLine(len-1).length; + } else { + column = Math.min(this.doc.getLine(row).length, column); + } + } + + return { + row: row, + column: column + }; + }; + + // WRAPMODE + this.$wrapLimit = 80; + this.$useWrapMode = false; + this.$wrapLimitRange = { + min : null, + max : null + }; + + this.setUseWrapMode = function(useWrapMode) { + if (useWrapMode != this.$useWrapMode) { + this.$useWrapMode = useWrapMode; + this.$modified = true; + this.$resetRowCache(0); + + // If wrapMode is activaed, the wrapData array has to be initialized. + if (useWrapMode) { + var len = this.getLength(); + this.$wrapData = []; + for (i = 0; i < len; i++) { + this.$wrapData.push([]); + } + this.$updateWrapData(0, len - 1); + } + + this._dispatchEvent("changeWrapMode"); + } + }; + + this.getUseWrapMode = function() { + return this.$useWrapMode; + }; + + // Allow the wrap limit to move freely between min and max. Either + // parameter can be null to allow the wrap limit to be unconstrained + // in that direction. Or set both parameters to the same number to pin + // the limit to that value. + this.setWrapLimitRange = function(min, max) { + if (this.$wrapLimitRange.min !== min || this.$wrapLimitRange.max !== max) { + this.$wrapLimitRange.min = min; + this.$wrapLimitRange.max = max; + this.$modified = true; + // This will force a recalculation of the wrap limit + this._dispatchEvent("changeWrapMode"); + } + }; + + // This should generally only be called by the renderer when a resize + // is detected. + this.adjustWrapLimit = function(desiredLimit) { + var wrapLimit = this.$constrainWrapLimit(desiredLimit); + if (wrapLimit != this.$wrapLimit && wrapLimit > 0) { + this.$wrapLimit = wrapLimit; + this.$modified = true; + if (this.$useWrapMode) { + this.$updateWrapData(0, this.getLength() - 1); + this.$resetRowCache(0) + this._dispatchEvent("changeWrapLimit"); + } + return true; + } + return false; + }; + + this.$constrainWrapLimit = function(wrapLimit) { + var min = this.$wrapLimitRange.min; + if (min) + wrapLimit = Math.max(min, wrapLimit); + + var max = this.$wrapLimitRange.max; + if (max) + wrapLimit = Math.min(max, wrapLimit); + + // What would a limit of 0 even mean? + return Math.max(1, wrapLimit); + }; + + this.getWrapLimit = function() { + return this.$wrapLimit; + }; + + this.getWrapLimitRange = function() { + // Avoid unexpected mutation by returning a copy + return { + min : this.$wrapLimitRange.min, + max : this.$wrapLimitRange.max + }; + }; + + this.$updateInternalDataOnChange = function(e) { + var useWrapMode = this.$useWrapMode; + var len; + var action = e.data.action; + var firstRow = e.data.range.start.row, + lastRow = e.data.range.end.row, + start = e.data.range.start, + end = e.data.range.end; + var removedFolds = null; + + if (action.indexOf("Lines") != -1) { + if (action == "insertLines") { + lastRow = firstRow + (e.data.lines.length); + } else { + lastRow = firstRow; + } + len = e.data.lines.length; + } else { + len = lastRow - firstRow; + } + + if (len != 0) { + if (action.indexOf("remove") != -1) { + useWrapMode && this.$wrapData.splice(firstRow, len); + + var foldLines = this.$foldData; + removedFolds = this.getFoldsInRange(e.data.range); + this.removeFolds(removedFolds); + + var foldLine = this.getFoldLine(end.row); + var idx = 0; + if (foldLine) { + foldLine.addRemoveChars(end.row, end.column, start.column - end.column); + foldLine.shiftRow(-len); + + var foldLineBefore = this.getFoldLine(firstRow); + if (foldLineBefore && foldLineBefore !== foldLine) { + foldLineBefore.merge(foldLine); + foldLine = foldLineBefore; + } + idx = foldLines.indexOf(foldLine) + 1; + } + + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= end.row) { + foldLine.shiftRow(-len); + } + } + + lastRow = firstRow; + } else { + var args; + if (useWrapMode) { + args = [firstRow, 0]; + for (var i = 0; i < len; i++) args.push([]); + this.$wrapData.splice.apply(this.$wrapData, args); + } + + // If some new line is added inside of a foldLine, then split + // the fold line up. + var foldLines = this.$foldData; + var foldLine = this.getFoldLine(firstRow); + var idx = 0; + if (foldLine) { + var cmp = foldLine.range.compareInside(start.row, start.column) + // Inside of the foldLine range. Need to split stuff up. + if (cmp == 0) { + foldLine = foldLine.split(start.row, start.column); + foldLine.shiftRow(len); + foldLine.addRemoveChars( + lastRow, 0, end.column - start.column); + } else + // Infront of the foldLine but same row. Need to shift column. + if (cmp == -1) { + foldLine.addRemoveChars(firstRow, 0, end.column - start.column); + foldLine.shiftRow(len); + } + // Nothing to do if the insert is after the foldLine. + idx = foldLines.indexOf(foldLine) + 1; + } + + for (idx; idx < foldLines.length; idx++) { + var foldLine = foldLines[idx]; + if (foldLine.start.row >= firstRow) { + foldLine.shiftRow(len); + } + } + } + } else { + // Realign folds. E.g. if you add some new chars before a fold, the + // fold should "move" to the right. + var column; + len = Math.abs(e.data.range.start.column - e.data.range.end.column); + if (action.indexOf("remove") != -1) { + // Get all the folds in the change range and remove them. + removedFolds = this.getFoldsInRange(e.data.range); + this.removeFolds(removedFolds); + + len = -len; + } + var foldLine = this.getFoldLine(firstRow); + if (foldLine) { + foldLine.addRemoveChars(firstRow, start.column, len); + } + } + + if (useWrapMode && this.$wrapData.length != this.doc.getLength()) { + console.error("doc.getLength() and $wrapData.length have to be the same!"); + } + + useWrapMode && this.$updateWrapData(firstRow, lastRow); + + return removedFolds; + }; + + this.$updateWrapData = function(firstRow, lastRow) { + var lines = this.doc.getAllLines(); + var tabSize = this.getTabSize(); + var wrapData = this.$wrapData; + var wrapLimit = this.$wrapLimit; + var tokens; + var foldLine; + + var row = firstRow; + lastRow = Math.min(lastRow, lines.length - 1); + while (row <= lastRow) { + foldLine = this.getFoldLine(row); + if (!foldLine) { + tokens = this.$getDisplayTokens(lang.stringTrimRight(lines[row])); + } else { + tokens = []; + foldLine.walk( + function(placeholder, row, column, lastColumn) { + var walkTokens; + if (placeholder) { + walkTokens = this.$getDisplayTokens( + placeholder, tokens.length); + walkTokens[0] = PLACEHOLDER_START; + for (var i = 1; i < walkTokens.length; i++) { + walkTokens[i] = PLACEHOLDER_BODY; + } + } else { + walkTokens = this.$getDisplayTokens( + lines[row].substring(lastColumn, column), + tokens.length); + } + tokens = tokens.concat(walkTokens); + }.bind(this), + foldLine.end.row, + lines[foldLine.end.row].length + 1 + ); + // Remove spaces/tabs from the back of the token array. + while (tokens.length != 0 + && tokens[tokens.length - 1] >= SPACE) + { + tokens.pop(); + } + } + wrapData[row] = + this.$computeWrapSplits(tokens, wrapLimit, tabSize); + + row = this.getRowFoldEnd(row) + 1; + } + }; + + // "Tokens" + var CHAR = 1, + CHAR_EXT = 2, + PLACEHOLDER_START = 3, + PLACEHOLDER_BODY = 4, + SPACE = 10, + TAB = 11, + TAB_SPACE = 12; + + this.$computeWrapSplits = function(tokens, wrapLimit, tabSize) { + if (tokens.length == 0) { + return []; + } + + var tabSize = this.getTabSize(); + var splits = []; + var displayLength = tokens.length; + var lastSplit = 0, lastDocSplit = 0; + + function addSplit(screenPos) { + var displayed = tokens.slice(lastSplit, screenPos); + + // The document size is the current size - the extra width for tabs + // and multipleWidth characters. + var len = displayed.length; + displayed.join(""). + // Get all the TAB_SPACEs. + replace(/12/g, function(m) { + len -= 1; + }). + // Get all the CHAR_EXT/multipleWidth characters. + replace(/2/g, function(m) { + len -= 1; + }); + + lastDocSplit += len; + splits.push(lastDocSplit); + lastSplit = screenPos; + } + + while (displayLength - lastSplit > wrapLimit) { + // This is, where the split should be. + var split = lastSplit + wrapLimit; + + // If there is a space or tab at this split position, then making + // a split is simple. + if (tokens[split] >= SPACE) { + // Include all following spaces + tabs in this split as well. + while (tokens[split] >= SPACE) { + split ++; + } + addSplit(split); + continue; + } + + // === ELSE === + // Check if split is inside of a placeholder. Placeholder are + // not splitable. Therefore, seek the beginning of the placeholder + // and try to place the split beofre the placeholder's start. + if (tokens[split] == PLACEHOLDER_START + || tokens[split] == PLACEHOLDER_BODY) + { + // Seek the start of the placeholder and do the split + // before the placeholder. By definition there always + // a PLACEHOLDER_START between split and lastSplit. + for (split; split != lastSplit - 1; split--) { + if (tokens[split] == PLACEHOLDER_START) { + // split++; << No incremental here as we want to + // have the position before the Placeholder. + break; + } + } + + // If the PLACEHOLDER_START is not the index of the + // last split, then we can do the split + if (split > lastSplit) { + addSplit(split); + continue; + } + + // If the PLACEHOLDER_START IS the index of the last + // split, then we have to place the split after the + // placeholder. So, let's seek for the end of the placeholder. + split = lastSplit + wrapLimit; + for (split; split < tokens.length; split++) { + if (tokens[split] != PLACEHOLDER_BODY) + { + break; + } + } + + // If spilt == tokens.length, then the placeholder is the last + // thing in the line and adding a new split doesn't make sense. + if (split == tokens.length) { + break; // Breaks the while-loop. + } + + // Finally, add the split... + addSplit(split); + continue; + } + + // === ELSE === + // Search for the first non space/tab/placeholder token backwards. + for (split; split != lastSplit - 1; split--) { + if (tokens[split] >= PLACEHOLDER_START) { + split++; + break; + } + } + // If we found one, then add the split. + if (split > lastSplit) { + addSplit(split); + continue; + } + + // === ELSE === + split = lastSplit + wrapLimit; + // The split is inside of a CHAR or CHAR_EXT token and no space + // around -> force a split. + addSplit(lastSplit + wrapLimit); + } + return splits; + } + + /** + * @param + * offset: The offset in screenColumn at which position str starts. + * Important for calculating the realTabSize. + */ + this.$getDisplayTokens = function(str, offset) { + var arr = []; + var tabSize; + offset = offset || 0; + + for (var i = 0; i < str.length; i++) { + var c = str.charCodeAt(i); + // Tab + if (c == 9) { + tabSize = this.getScreenTabSize(arr.length + offset); + arr.push(TAB); + for (var n = 1; n < tabSize; n++) { + arr.push(TAB_SPACE); + } + } + // Space + else if(c == 32) { + arr.push(SPACE); + } + // full width characters + else if (isFullWidth(c)) { + arr.push(CHAR, CHAR_EXT); + } else { + arr.push(CHAR); + } + } + return arr; + } + + /** + * Calculates the width of the a string on the screen while assuming that + * the string starts at the first column on the screen. + * + * @param string str String to calculate the screen width of + * @return array + * [0]: number of columns for str on screen. + * [1]: docColumn position that was read until (useful with screenColumn) + */ + this.$getStringScreenWidth = function(str, maxScreenColumn, screenColumn) { + if (maxScreenColumn == 0) { + return [0, 0]; + } + if (maxScreenColumn == null) { + maxScreenColumn = screenColumn + + str.length * Math.max(this.getTabSize(), 2); + } + screenColumn = screenColumn || 0; + + var c, column; + for (column = 0; column < str.length; column++) { + c = str.charCodeAt(column); + // tab + if (c == 9) { + screenColumn += this.getScreenTabSize(screenColumn); + } + // full width characters + else if (isFullWidth(c)) { + screenColumn += 2; + } else { + screenColumn += 1; + } + if (screenColumn > maxScreenColumn) { + break + } + } + + return [screenColumn, column]; + } + + /** + * Returns the number of rows required to render this row on the screen + */ + this.getRowLength = function(row) { + if (!this.$useWrapMode || !this.$wrapData[row]) { + return 1; + } else { + return this.$wrapData[row].length + 1; + } + } + + /** + * Returns the height in pixels required to render this row on the screen + **/ + this.getRowHeight = function(config, row) { + return this.getRowLength(row) * config.lineHeight; + } + + this.getScreenLastRowColumn = function(screenRow) { + //return this.screenToDocumentColumn(screenRow, Number.MAX_VALUE / 10) + return this.documentToScreenColumn(screenRow, this.doc.getLine(screenRow).length); + }; + + this.getDocumentLastRowColumn = function(docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.getScreenLastRowColumn(screenRow); + }; + + this.getDocumentLastRowColumnPosition = function(docRow, docColumn) { + var screenRow = this.documentToScreenRow(docRow, docColumn); + return this.screenToDocumentPosition(screenRow, Number.MAX_VALUE / 10); + }; + + this.getRowSplitData = function(row) { + if (!this.$useWrapMode) { + return undefined; + } else { + return this.$wrapData[row]; + } + }; + + /** + * Returns the width of a tab character at screenColumn. + */ + this.getScreenTabSize = function(screenColumn) { + return this.$tabSize - screenColumn % this.$tabSize; + }; + + this.screenToDocumentRow = function(screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).row; + }; + + this.screenToDocumentColumn = function(screenRow, screenColumn) { + return this.screenToDocumentPosition(screenRow, screenColumn).column; + }; + + this.screenToDocumentPosition = function(screenRow, screenColumn) { + if (screenRow < 0) { + return { + row: 0, + column: 0 + } + } + + var line; + var docRow = 0; + var docColumn = 0; + var column; + var foldLineRowLength; + var row = 0; + var rowLength = 0; + + var rowCache = this.$rowCache; + for (var i = 0; i < rowCache.length; i++) { + if (rowCache[i].screenRow < screenRow) { + row = rowCache[i].screenRow; + docRow = rowCache[i].docRow; + } + else { + break; + } + } + var doCache = !rowCache.length || i == rowCache.length; + + // clamp row before clamping column, for selection on last line + var maxRow = this.getLength() - 1; + + var foldLine = this.getNextFold(docRow); + var foldStart = foldLine ? foldLine.start.row : Infinity; + + while (row <= screenRow) { + rowLength = this.getRowLength(docRow); + if (row + rowLength - 1 >= screenRow || docRow >= maxRow) { + break; + } else { + row += rowLength; + docRow++; + if (docRow > foldStart) { + docRow = foldLine.end.row+1; + foldLine = this.getNextFold(docRow); + foldStart = foldLine ? foldLine.start.row : Infinity; + } + } + if (doCache) { + rowCache.push({ + docRow: docRow, + screenRow: row + }); + } + } + + if (foldLine && foldLine.start.row <= docRow) + line = this.getFoldDisplayLine(foldLine); + else { + line = this.getLine(docRow); + foldLine = null; + } + + var splits = []; + if (this.$useWrapMode) { + splits = this.$wrapData[docRow]; + if (splits) { + column = splits[screenRow - row] + if(screenRow > row && splits.length) { + docColumn = splits[screenRow - row - 1] || splits[splits.length - 1]; + line = line.substring(docColumn); + } + } + } + + docColumn += this.$getStringScreenWidth(line, screenColumn)[1]; + + // clip row at the end of the document + if (row + splits.length < screenRow) + docColumn = Number.MAX_VALUE; + + // Need to do some clamping action here. + if (this.$useWrapMode) { + if (docColumn >= column) { + // We remove one character at the end such that the docColumn + // position returned is not associated to the next row on the + // screen. + docColumn = column - 1; + } + } else { + docColumn = Math.min(docColumn, line.length); + } + + if (foldLine) { + return foldLine.idxToPosition(docColumn); + } + + return { + row: docRow, + column: docColumn + } + }; + + this.documentToScreenPosition = function(docRow, docColumn) { + // Normalize the passed in arguments. + if (typeof docColumn === "undefined") + var pos = this.$clipPositionToDocument(docRow.row, docRow.column); + else + pos = this.$clipPositionToDocument(docRow, docColumn); + + docRow = pos.row; + docColumn = pos.column; + + var LL = this.$rowCache.length; + + var wrapData; + // Special case in wrapMode if the doc is at the end of the document. + if (this.$useWrapMode) { + wrapData = this.$wrapData; + if (docRow > wrapData.length - 1) { + return { + row: this.getScreenLength(), + column: wrapData.length == 0 + ? 0 + : (wrapData[wrapData.length - 1].length - 1) + }; + } + } + + var screenRow = 0; + var screenColumn = 0; + var foldStartRow = null; + var fold = null; + + // Clamp the docRow position in case it's inside of a folded block. + fold = this.getFoldAt(docRow, docColumn, 1); + if (fold) { + docRow = fold.start.row; + docColumn = fold.start.column; + } + + var rowEnd, row = 0; + var rowCache = this.$rowCache; + + for (var i = 0; i < rowCache.length; i++) { + if (rowCache[i].docRow < docRow) { + screenRow = rowCache[i].screenRow; + row = rowCache[i].docRow; + } else { + break; + } + } + var doCache = !rowCache.length || i == rowCache.length; + + var foldLine = this.getNextFold(row); + var foldStart = foldLine ?foldLine.start.row :Infinity; + + while (row < docRow) { + if (row >= foldStart) { + rowEnd = foldLine.end.row + 1; + if (rowEnd > docRow) + break; + foldLine = this.getNextFold(rowEnd); + foldStart = foldLine ?foldLine.start.row :Infinity; + } + else { + rowEnd = row + 1; + } + + screenRow += this.getRowLength(row); + row = rowEnd; + + if (doCache) { + rowCache.push({ + docRow: row, + screenRow: screenRow + }); + } + } + + // Calculate the text line that is displayed in docRow on the screen. + var textLine = ""; + // Check if the final row we want to reach is inside of a fold. + if (foldLine && row >= foldStart) { + textLine = this.getFoldDisplayLine(foldLine, docRow, docColumn); + foldStartRow = foldLine.start.row; + } else { + textLine = this.getLine(docRow).substring(0, docColumn); + foldStartRow = docRow; + } + // Clamp textLine if in wrapMode. + if (this.$useWrapMode) { + var wrapRow = wrapData[foldStartRow]; + var screenRowOffset = 0; + while (textLine.length >= wrapRow[screenRowOffset]) { + screenRow ++; + screenRowOffset++; + } + textLine = textLine.substring( + wrapRow[screenRowOffset - 1] || 0, textLine.length + ); + } + + return { + row: screenRow, + column: this.$getStringScreenWidth(textLine)[0] + }; + }; + + this.documentToScreenColumn = function(row, docColumn) { + return this.documentToScreenPosition(row, docColumn).column; + }; + + this.documentToScreenRow = function(docRow, docColumn) { + return this.documentToScreenPosition(docRow, docColumn).row; + }; + + this.getScreenLength = function() { + var screenRows = 0; + var lastFoldLine = null; + var foldLine = null; + if (!this.$useWrapMode) { + screenRows = this.getLength(); + + // Remove the folded lines again. + var foldData = this.$foldData; + for (var i = 0; i < foldData.length; i++) { + foldLine = foldData[i]; + screenRows -= foldLine.end.row - foldLine.start.row; + } + } else { + for (var row = 0; row < this.$wrapData.length; row++) { + if (foldLine = this.getFoldLine(row, lastFoldLine)) { + row = foldLine.end.row; + screenRows += 1; + } else { + screenRows += this.$wrapData[row].length + 1; + } + } + } + + return screenRows; + } + + // For every keystroke this gets called once per char in the whole doc!! + // Wouldn't hurt to make it a bit faster for c >= 0x1100 + function isFullWidth(c) { + if (c < 0x1100) + return false; + return c >= 0x1100 && c <= 0x115F || + c >= 0x11A3 && c <= 0x11A7 || + c >= 0x11FA && c <= 0x11FF || + c >= 0x2329 && c <= 0x232A || + c >= 0x2E80 && c <= 0x2E99 || + c >= 0x2E9B && c <= 0x2EF3 || + c >= 0x2F00 && c <= 0x2FD5 || + c >= 0x2FF0 && c <= 0x2FFB || + c >= 0x3000 && c <= 0x303E || + c >= 0x3041 && c <= 0x3096 || + c >= 0x3099 && c <= 0x30FF || + c >= 0x3105 && c <= 0x312D || + c >= 0x3131 && c <= 0x318E || + c >= 0x3190 && c <= 0x31BA || + c >= 0x31C0 && c <= 0x31E3 || + c >= 0x31F0 && c <= 0x321E || + c >= 0x3220 && c <= 0x3247 || + c >= 0x3250 && c <= 0x32FE || + c >= 0x3300 && c <= 0x4DBF || + c >= 0x4E00 && c <= 0xA48C || + c >= 0xA490 && c <= 0xA4C6 || + c >= 0xA960 && c <= 0xA97C || + c >= 0xAC00 && c <= 0xD7A3 || + c >= 0xD7B0 && c <= 0xD7C6 || + c >= 0xD7CB && c <= 0xD7FB || + c >= 0xF900 && c <= 0xFAFF || + c >= 0xFE10 && c <= 0xFE19 || + c >= 0xFE30 && c <= 0xFE52 || + c >= 0xFE54 && c <= 0xFE66 || + c >= 0xFE68 && c <= 0xFE6B || + c >= 0xFF01 && c <= 0xFF60 || + c >= 0xFFE0 && c <= 0xFFE6; + }; + +}).call(EditSession.prototype); + +require("ace/edit_session/folding").Folding.call(EditSession.prototype); + +exports.EditSession = EditSession; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/selection', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/lang', 'pilot/event_emitter', 'ace/range'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var lang = require("pilot/lang"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; +var Range = require("ace/range").Range; + +/** + * Keeps cursor position and the text selection of an edit session. + * + * The row/columns used in the selection are in document coordinates + * representing ths coordinates as thez appear in the document + * before applying soft wrap and folding. + */ +var Selection = function(session) { + this.session = session; + this.doc = session.getDocument(); + + this.clearSelection(); + this.selectionLead = this.doc.createAnchor(0, 0); + this.selectionAnchor = this.doc.createAnchor(0, 0); + + var _self = this; + this.selectionLead.on("change", function(e) { + _self._dispatchEvent("changeCursor"); + if (!_self.$isEmpty) + _self._dispatchEvent("changeSelection"); + if (!_self.$preventUpdateDesiredColumnOnChange && e.old.column != e.value.column) + _self.$updateDesiredColumn(); + }); + + this.selectionAnchor.on("change", function() { + if (!_self.$isEmpty) + _self._dispatchEvent("changeSelection"); + }); +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.isEmpty = function() { + return (this.$isEmpty || ( + this.selectionAnchor.row == this.selectionLead.row && + this.selectionAnchor.column == this.selectionLead.column + )); + }; + + this.isMultiLine = function() { + if (this.isEmpty()) { + return false; + } + + return this.getRange().isMultiLine(); + }; + + this.getCursor = function() { + return this.selectionLead.getPosition(); + }; + + this.setSelectionAnchor = function(row, column) { + this.selectionAnchor.setPosition(row, column); + + if (this.$isEmpty) { + this.$isEmpty = false; + this._dispatchEvent("changeSelection"); + } + }; + + this.getSelectionAnchor = function() { + if (this.$isEmpty) + return this.getSelectionLead() + else + return this.selectionAnchor.getPosition(); + }; + + this.getSelectionLead = function() { + return this.selectionLead.getPosition(); + }; + + this.shiftSelection = function(columns) { + if (this.$isEmpty) { + this.moveCursorTo(this.selectionLead.row, this.selectionLead.column + columns); + return; + }; + + var anchor = this.getSelectionAnchor(); + var lead = this.getSelectionLead(); + + var isBackwards = this.isBackwards(); + + if (!isBackwards || anchor.column !== 0) + this.setSelectionAnchor(anchor.row, anchor.column + columns); + + if (isBackwards || lead.column !== 0) { + this.$moveSelection(function() { + this.moveCursorTo(lead.row, lead.column + columns); + }); + } + }; + + this.isBackwards = function() { + var anchor = this.selectionAnchor; + var lead = this.selectionLead; + return (anchor.row > lead.row || (anchor.row == lead.row && anchor.column > lead.column)); + }; + + this.getRange = function() { + var anchor = this.selectionAnchor; + var lead = this.selectionLead; + + if (this.isEmpty()) + return Range.fromPoints(lead, lead); + + if (this.isBackwards()) { + return Range.fromPoints(lead, anchor); + } + else { + return Range.fromPoints(anchor, lead); + } + }; + + this.clearSelection = function() { + if (!this.$isEmpty) { + this.$isEmpty = true; + this._dispatchEvent("changeSelection"); + } + }; + + this.selectAll = function() { + var lastRow = this.doc.getLength() - 1; + this.setSelectionAnchor(lastRow, this.doc.getLine(lastRow).length); + this.moveCursorTo(0, 0); + }; + + this.setSelectionRange = function(range, reverse) { + if (reverse) { + this.setSelectionAnchor(range.end.row, range.end.column); + this.selectTo(range.start.row, range.start.column); + } else { + this.setSelectionAnchor(range.start.row, range.start.column); + this.selectTo(range.end.row, range.end.column); + } + this.$updateDesiredColumn(); + }; + + this.$updateDesiredColumn = function() { + var cursor = this.getCursor(); + this.$desiredColumn = this.session.documentToScreenColumn(cursor.row, cursor.column); + }; + + this.$moveSelection = function(mover) { + var lead = this.selectionLead; + if (this.$isEmpty) + this.setSelectionAnchor(lead.row, lead.column); + + mover.call(this); + }; + + this.selectTo = function(row, column) { + this.$moveSelection(function() { + this.moveCursorTo(row, column); + }); + }; + + this.selectToPosition = function(pos) { + this.$moveSelection(function() { + this.moveCursorToPosition(pos); + }); + }; + + this.selectUp = function() { + this.$moveSelection(this.moveCursorUp); + }; + + this.selectDown = function() { + this.$moveSelection(this.moveCursorDown); + }; + + this.selectRight = function() { + this.$moveSelection(this.moveCursorRight); + }; + + this.selectLeft = function() { + this.$moveSelection(this.moveCursorLeft); + }; + + this.selectLineStart = function() { + this.$moveSelection(this.moveCursorLineStart); + }; + + this.selectLineEnd = function() { + this.$moveSelection(this.moveCursorLineEnd); + }; + + this.selectFileEnd = function() { + this.$moveSelection(this.moveCursorFileEnd); + }; + + this.selectFileStart = function() { + this.$moveSelection(this.moveCursorFileStart); + }; + + this.selectWordRight = function() { + this.$moveSelection(this.moveCursorWordRight); + }; + + this.selectWordLeft = function() { + this.$moveSelection(this.moveCursorWordLeft); + }; + + this.selectWord = function() { + var cursor = this.getCursor(); + var range = this.session.getWordRange(cursor.row, cursor.column); + this.setSelectionRange(range); + }; + + this.selectLine = function() { + var rowStart = this.selectionLead.row; + var rowEnd; + + var foldLine = this.session.getFoldLine(rowStart); + if (foldLine) { + rowStart = foldLine.start.row; + rowEnd = foldLine.end.row; + } else { + rowEnd = rowStart; + } + this.setSelectionAnchor(rowStart, 0); + this.$moveSelection(function() { + this.moveCursorTo(rowEnd + 1, 0); + }); + }; + + this.moveCursorUp = function() { + this.moveCursorBy(-1, 0); + }; + + this.moveCursorDown = function() { + this.moveCursorBy(1, 0); + }; + + this.moveCursorLeft = function() { + var cursor = this.selectionLead.getPosition(), + fold; + + if (fold = this.session.getFoldAt(cursor.row, cursor.column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + } else if (cursor.column == 0) { + // cursor is a line (start + if (cursor.row > 0) { + this.moveCursorTo(cursor.row - 1, this.doc.getLine(cursor.row - 1).length); + } + } + else { + var tabSize = this.session.getTabSize(); + if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column-tabSize, cursor.column).split(" ").length-1 == tabSize) + this.moveCursorBy(0, -tabSize); + else + this.moveCursorBy(0, -1); + } + }; + + this.moveCursorRight = function() { + var cursor = this.selectionLead.getPosition(), + fold; + if (fold = this.session.getFoldAt(cursor.row, cursor.column, 1)) { + this.moveCursorTo(fold.end.row, fold.end.column); + } + else if (this.selectionLead.column == this.doc.getLine(this.selectionLead.row).length) { + if (this.selectionLead.row < this.doc.getLength() - 1) { + this.moveCursorTo(this.selectionLead.row + 1, 0); + } + } + else { + var tabSize = this.session.getTabSize(); + var cursor = this.selectionLead; + if (this.session.isTabStop(cursor) && this.doc.getLine(cursor.row).slice(cursor.column, cursor.column+tabSize).split(" ").length-1 == tabSize) + this.moveCursorBy(0, tabSize); + else + this.moveCursorBy(0, 1); + } + }; + + this.moveCursorLineStart = function() { + var row = this.selectionLead.row; + var column = this.selectionLead.column; + var screenRow = this.session.documentToScreenRow(row, column); + + // Determ the doc-position of the first character at the screen line. + var firstColumnPosition = this.session.screenToDocumentPosition(screenRow, 0); + + // Determ the line + var beforeCursor = this.session.getDisplayLine( + row, null, + firstColumnPosition.row, firstColumnPosition.column + ); + + var leadingSpace = beforeCursor.match(/^\s*/); + if (leadingSpace[0].length == column) { + this.moveCursorTo( + firstColumnPosition.row, firstColumnPosition.column + ); + } + else { + this.moveCursorTo( + firstColumnPosition.row, + firstColumnPosition.column + leadingSpace[0].length + ); + } + }; + + this.moveCursorLineEnd = function() { + var lead = this.selectionLead; + var lastRowColumnPosition = + this.session.getDocumentLastRowColumnPosition(lead.row, lead.column); + this.moveCursorTo( + lastRowColumnPosition.row, + lastRowColumnPosition.column + ); + }; + + this.moveCursorFileEnd = function() { + var row = this.doc.getLength() - 1; + var column = this.doc.getLine(row).length; + this.moveCursorTo(row, column); + }; + + this.moveCursorFileStart = function() { + this.moveCursorTo(0, 0); + }; + + this.moveCursorWordRight = function() { + var row = this.selectionLead.row; + var column = this.selectionLead.column; + var line = this.doc.getLine(row); + var rightOfCursor = line.substring(column); + + var match; + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + + var fold; + if (fold = this.session.getFoldAt(row, column, 1)) { + this.moveCursorTo(fold.end.row, fold.end.column); + return; + } else if (column == line.length) { + this.moveCursorRight(); + return; + } + else if (match = this.session.nonTokenRe.exec(rightOfCursor)) { + column += this.session.nonTokenRe.lastIndex; + this.session.nonTokenRe.lastIndex = 0; + } + else if (match = this.session.tokenRe.exec(rightOfCursor)) { + column += this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + + this.moveCursorTo(row, column); + }; + + this.moveCursorWordLeft = function() { + var row = this.selectionLead.row; + var column = this.selectionLead.column; + + var fold; + if (fold = this.session.getFoldAt(row, column, -1)) { + this.moveCursorTo(fold.start.row, fold.start.column); + return; + } + + if (column == 0) { + this.moveCursorLeft(); + return; + } + + var str = this.session.getFoldStringAt(row, column, -1); + if (str == null) { + str = this.doc.getLine(row).substring(0, column) + } + var leftOfCursor = lang.stringReverse(str); + + var match; + this.session.nonTokenRe.lastIndex = 0; + this.session.tokenRe.lastIndex = 0; + + if (match = this.session.nonTokenRe.exec(leftOfCursor)) { + column -= this.session.nonTokenRe.lastIndex; + this.session.nonTokenRe.lastIndex = 0; + } + else if (match = this.session.tokenRe.exec(leftOfCursor)) { + column -= this.session.tokenRe.lastIndex; + this.session.tokenRe.lastIndex = 0; + } + + this.moveCursorTo(row, column); + }; + + this.moveCursorBy = function(rows, chars) { + var screenPos = this.session.documentToScreenPosition( + this.selectionLead.row, + this.selectionLead.column + ); + var screenCol = (chars == 0 && this.$desiredColumn) || screenPos.column; + var docPos = this.session.screenToDocumentPosition(screenPos.row + rows, screenCol); + this.moveCursorTo(docPos.row, docPos.column + chars, chars == 0); + }; + + this.moveCursorToPosition = function(position) { + this.moveCursorTo(position.row, position.column); + }; + + this.moveCursorTo = function(row, column, preventUpdateDesiredColumn) { + // Ensure the row/column is not inside of a fold. + var fold = this.session.getFoldAt(row, column, 1); + if (fold) { + row = fold.start.row; + column = fold.start.column; + } + + this.$preventUpdateDesiredColumnOnChange = true; + this.selectionLead.setPosition(row, column); + this.$preventUpdateDesiredColumnOnChange = false; + + if (!preventUpdateDesiredColumn) + this.$updateDesiredColumn(this.selectionLead.column); + }; + + this.moveCursorToScreen = function(row, column, preventUpdateDesiredColumn) { + var pos = this.session.screenToDocumentPosition(row, column); + row = pos.row; + column = pos.column; + this.moveCursorTo(row, column, preventUpdateDesiredColumn); + }; + +}).call(Selection.prototype); + +exports.Selection = Selection; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/range', ['require', 'exports', 'module' ], function(require, exports, module) { + +var Range = function(startRow, startColumn, endRow, endColumn) { + this.start = { + row: startRow, + column: startColumn + }; + + this.end = { + row: endRow, + column: endColumn + }; +}; + +(function() { + + this.toString = function() { + return ("Range: [" + this.start.row + "/" + this.start.column + + "] -> [" + this.end.row + "/" + this.end.column + "]"); + }; + + this.contains = function(row, column) { + return this.compare(row, column) == 0; + }; + + /** + * Compares this range (A) with another range (B), where B is the passed in + * range. + * + * Return values: + * -2: (B) is infront of (A) and doesn't intersect with (A) + * -1: (B) begins before (A) but ends inside of (A) + * 0: (B) is completly inside of (A) OR (A) is complety inside of (B) + * +1: (B) begins inside of (A) but ends outside of (A) + * +2: (B) is after (A) and doesn't intersect with (A) + * + * 42: FTW state: (B) ends in (A) but starts outside of (A) + */ + this.compareRange = function(range) { + var cmp, + end = range.end, + start = range.start; + + cmp = this.compare(end.row, end.column); + if (cmp == 1) { + cmp = this.compare(start.row, start.column); + if (cmp == 1) { + return 2; + } else if (cmp == 0) { + return 1; + } else { + return 0; + } + } else if (cmp == -1) { + return -2; + } else { + cmp = this.compare(start.row, start.column); + if (cmp == -1) { + return -1; + } else if (cmp == 1) { + return 42; + } else { + return 0; + } + } + } + + this.containsRange = function(range) { + var cmp = this.compareRange(range); + return (cmp == -1 || cmp == 0 || cmp == 1); + } + + this.isEnd = function(row, column) { + return this.end.row == row && this.end.column == column; + } + + this.isStart = function(row, column) { + return this.start.row == row && this.start.column == column; + } + + this.setStart = function(row, column) { + if (typeof row == "object") { + this.start.column = row.column; + this.start.row = row.row; + } else { + this.start.row = row; + this.start.column = column; + } + } + + this.setEnd = function(row, column) { + if (typeof row == "object") { + this.end.column = row.column; + this.end.row = row.row; + } else { + this.end.row = row; + this.end.column = column; + } + } + + this.inside = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column) || this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + } + + this.insideStart = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isEnd(row, column)) { + return false; + } else { + return true; + } + } + return false; + } + + this.insideEnd = function(row, column) { + if (this.compare(row, column) == 0) { + if (this.isStart(row, column)) { + return false; + } else { + return true; + } + } + return false; + } + + this.compare = function(row, column) { + if (!this.isMultiLine()) { + if (row === this.start.row) { + return column < this.start.column ? -1 : (column > this.end.column ? 1 : 0); + }; + } + + if (row < this.start.row) + return -1; + + if (row > this.end.row) + return 1; + + if (this.start.row === row) + return column >= this.start.column ? 0 : -1; + + if (this.end.row === row) + return column <= this.end.column ? 0 : 1; + + return 0; + }; + + /** + * Like .compare(), but if isStart is true, return -1; + */ + this.compareStart = function(row, column) { + if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + } + + /** + * Like .compare(), but if isEnd is true, return 1; + */ + this.compareEnd = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else { + return this.compare(row, column); + } + } + + this.compareInside = function(row, column) { + if (this.end.row == row && this.end.column == column) { + return 1; + } else if (this.start.row == row && this.start.column == column) { + return -1; + } else { + return this.compare(row, column); + } + } + + this.clipRows = function(firstRow, lastRow) { + if (this.end.row > lastRow) { + var end = { + row: lastRow+1, + column: 0 + }; + } + + if (this.start.row > lastRow) { + var start = { + row: lastRow+1, + column: 0 + }; + } + + if (this.start.row < firstRow) { + var start = { + row: firstRow, + column: 0 + }; + } + + if (this.end.row < firstRow) { + var end = { + row: firstRow, + column: 0 + }; + } + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.extend = function(row, column) { + var cmp = this.compare(row, column); + + if (cmp == 0) + return this; + else if (cmp == -1) + var start = {row: row, column: column}; + else + var end = {row: row, column: column}; + + return Range.fromPoints(start || this.start, end || this.end); + }; + + this.isEmpty = function() { + return (this.start.row == this.end.row && this.start.column == this.end.column); + }; + + this.isMultiLine = function() { + return (this.start.row !== this.end.row); + }; + + this.clone = function() { + return Range.fromPoints(this.start, this.end); + }; + + this.collapseRows = function() { + if (this.end.column == 0) + return new Range(this.start.row, 0, Math.max(this.start.row, this.end.row-1), 0) + else + return new Range(this.start.row, 0, this.end.row, 0) + }; + + this.toScreenRange = function(session) { + var screenPosStart = + session.documentToScreenPosition(this.start); + var screenPosEnd = + session.documentToScreenPosition(this.end); + + return new Range( + screenPosStart.row, screenPosStart.column, + screenPosEnd.row, screenPosEnd.column + ); + }; + +}).call(Range.prototype); + + +Range.fromPoints = function(start, end) { + return new Range(start.row, start.column, end.row, end.column); +}; + +exports.Range = Range; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * Chris Spencer + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/mode/text', ['require', 'exports', 'module' , 'ace/tokenizer', 'ace/mode/text_highlight_rules', 'ace/mode/behaviour', 'ace/unicode'], function(require, exports, module) { + +var Tokenizer = require("ace/tokenizer").Tokenizer; +var TextHighlightRules = require("ace/mode/text_highlight_rules").TextHighlightRules; +var Behaviour = require("ace/mode/behaviour").Behaviour; +var unicode = require("ace/unicode"); + +var Mode = function() { + this.$tokenizer = new Tokenizer(new TextHighlightRules().getRules()); + this.$behaviour = new Behaviour(); +}; + +(function() { + + this.tokenRe = new RegExp("^[" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\\$_]+", "g" + ); + + this.nonTokenRe = new RegExp("^(?:[^" + + unicode.packages.L + + unicode.packages.Mn + unicode.packages.Mc + + unicode.packages.Nd + + unicode.packages.Pc + "\\$_]|\s])+", "g" + ); + + this.getTokenizer = function() { + return this.$tokenizer; + }; + + this.toggleCommentLines = function(state, doc, startRow, endRow) { + }; + + this.getNextLineIndent = function(state, line, tab) { + return ""; + }; + + this.checkOutdent = function(state, line, input) { + return false; + }; + + this.autoOutdent = function(state, doc, row) { + }; + + this.$getIndent = function(line) { + var match = line.match(/^(\s+)/); + if (match) { + return match[1]; + } + + return ""; + }; + + this.createWorker = function(session) { + return null; + }; + + this.highlightSelection = function(editor) { + var session = editor.session; + if (!session.$selectionOccurrences) + session.$selectionOccurrences = []; + + if (session.$selectionOccurrences.length) + this.clearSelectionHighlight(editor); + + var selection = editor.getSelectionRange(); + if (selection.isEmpty() || selection.isMultiLine()) + return; + + var startOuter = selection.start.column - 1; + var endOuter = selection.end.column + 1; + var line = session.getLine(selection.start.row); + var lineCols = line.length; + var needle = line.substring(Math.max(startOuter, 0), + Math.min(endOuter, lineCols)); + + // Make sure the outer characters are not part of the word. + if ((startOuter >= 0 && /^[\w\d]/.test(needle)) || + (endOuter <= lineCols && /[\w\d]$/.test(needle))) + return; + + needle = line.substring(selection.start.column, selection.end.column); + if (!/^[\w\d]+$/.test(needle)) + return; + + var cursor = editor.getCursorPosition(); + + var newOptions = { + wrap: true, + wholeWord: true, + caseSensitive: true, + needle: needle + }; + + var currentOptions = editor.$search.getOptions(); + editor.$search.set(newOptions); + + var ranges = editor.$search.findAll(session); + ranges.forEach(function(range) { + if (!range.contains(cursor.row, cursor.column)) { + var marker = session.addMarker(range, "ace_selected_word", "text"); + session.$selectionOccurrences.push(marker); + } + }); + + editor.$search.set(currentOptions); + }; + + this.clearSelectionHighlight = function(editor) { + if (!editor.session.$selectionOccurrences) + return; + + editor.session.$selectionOccurrences.forEach(function(marker) { + editor.session.removeMarker(marker); + }); + + editor.session.$selectionOccurrences = []; + }; + + this.createModeDelegates = function (mapping) { + if (!this.$embeds) { + return; + } + this.$modes = {}; + for (var i = 0; i < this.$embeds.length; i++) { + if (mapping[this.$embeds[i]]) { + this.$modes[this.$embeds[i]] = new mapping[this.$embeds[i]](); + } + } + + var delegations = ['toggleCommentLines', 'getNextLineIndent', 'checkOutdent', 'autoOutdent', 'transformAction']; + + for (var i = 0; i < delegations.length; i++) { + (function(scope) { + var functionName = delegations[i]; + var defaultHandler = scope[functionName]; + scope[delegations[i]] = function() { + return this.$delegator(functionName, arguments, defaultHandler); + } + } (this)); + } + } + + this.$delegator = function(method, args, defaultHandler) { + var state = args[0]; + + for (var i = 0; i < this.$embeds.length; i++) { + if (!this.$modes[this.$embeds[i]]) continue; + + var split = state.split(this.$embeds[i]); + if (!split[0] && split[1]) { + args[0] = split[1]; + var mode = this.$modes[this.$embeds[i]]; + return mode[method].apply(mode, args); + } + } + var ret = defaultHandler.apply(this, args); + return defaultHandler ? ret : undefined; + }; + + this.transformAction = function(state, action, editor, session, param) { + if (this.$behaviour) { + var behaviours = this.$behaviour.getBehaviours(); + for (var key in behaviours) { + if (behaviours[key][action]) { + var ret = behaviours[key][action].apply(this, arguments); + if (ret !== false) { + return ret; + } + } + } + } + return false; + } + +}).call(Mode.prototype); + +exports.Mode = Mode; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/tokenizer', ['require', 'exports', 'module' ], function(require, exports, module) { + +var Tokenizer = function(rules) { + this.rules = rules; + + this.regExps = {}; + this.matchMappings = {}; + for ( var key in this.rules) { + var rule = this.rules[key]; + var state = rule; + var ruleRegExps = []; + var matchTotal = 0; + var mapping = this.matchMappings[key] = {}; + + for ( var i = 0; i < state.length; i++) { + // Count number of matching groups. 2 extra groups from the full match + // And the catch-all on the end (used to force a match); + var matchcount = new RegExp("(?:(" + state[i].regex + ")|(.))").exec("a").length - 2; + + // Replace any backreferences and offset appropriately. + var adjustedregex = state[i].regex.replace(/\\([0-9]+)/g, function (match, digit) { + return "\\" + (parseInt(digit, 10) + matchTotal + 1); + }); + + mapping[matchTotal] = { + rule: i, + len: matchcount + }; + matchTotal += matchcount; + + ruleRegExps.push(adjustedregex); + } + + this.regExps[key] = new RegExp("(?:(" + ruleRegExps.join(")|(") + ")|(.))", "g"); + } +}; + +(function() { + + this.getLineTokens = function(line, startState) { + var currentState = startState; + var state = this.rules[currentState]; + var mapping = this.matchMappings[currentState]; + var re = this.regExps[currentState]; + re.lastIndex = 0; + + var match, tokens = []; + + var lastIndex = 0; + + var token = { + type: null, + value: "" + }; + + while (match = re.exec(line)) { + var type = "text"; + var rule = null; + var value = [match[0]]; + + for (var i = 0; i < match.length-2; i++) { + if (match[i + 1] !== undefined) { + rule = state[mapping[i].rule]; + + if (mapping[i].len > 1) { + value = match.slice(i+2, i+1+mapping[i].len); + } + + // compute token type + if (typeof rule.token == "function") + type = rule.token.apply(this, value); + else + type = rule.token; + + var next = rule.next; + if (next && next !== currentState) { + currentState = next; + state = this.rules[currentState]; + mapping = this.matchMappings[currentState]; + lastIndex = re.lastIndex; + + re = this.regExps[currentState]; + re.lastIndex = lastIndex; + } + break; + } + }; + + if (value[0]) { + if (typeof type == "string") { + value = [value.join("")]; + type = [type]; + } + for (var i = 0; i < value.length; i++) { + if ((!rule || rule.merge || type[i] === "text") && token.type === type[i]) { + token.value += value[i]; + } else { + if (token.type) { + tokens.push(token); + } + + token = { + type: type[i], + value: value[i] + } + } + } + } + + if (lastIndex == line.length) + break; + + lastIndex = re.lastIndex; + }; + + if (token.type) + tokens.push(token); + + return { + tokens : tokens, + state : currentState + }; + }; + +}).call(Tokenizer.prototype); + +exports.Tokenizer = Tokenizer; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/mode/text_highlight_rules', ['require', 'exports', 'module' , 'pilot/lang'], function(require, exports, module) { + +var lang = require("pilot/lang"); + +var TextHighlightRules = function() { + + // regexp must not have capturing parentheses + // regexps are ordered -> the first match is used + + this.$rules = { + "start" : [{ + token : "empty_line", + regex : '^$' + }, { + token : "text", + regex : ".+" + }] + }; +}; + +(function() { + + this.addRules = function(rules, prefix) { + for (var key in rules) { + var state = rules[key]; + for (var i=0; i + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/mode/behaviour', ['require', 'exports', 'module' ], function(require, exports, module) { + +var Behaviour = function() { + this.$behaviours = {}; +}; + +(function () { + + this.add = function (name, action, callback) { + switch (undefined) { + case this.$behaviours: + this.$behaviours = {}; + case this.$behaviours[name]: + this.$behaviours[name] = {}; + } + this.$behaviours[name][action] = callback; + } + + this.addBehaviours = function (behaviours) { + for (var key in behaviours) { + for (var action in behaviours[key]) { + this.add(key, action, behaviours[key][action]); + } + } + } + + this.remove = function (name) { + if (this.$behaviours && this.$behaviours[name]) { + delete this.$behaviours[name]; + } + } + + this.inherit = function (mode, filter) { + if (typeof mode === "function") { + var behaviours = new mode().getBehaviours(filter); + } else { + var behaviours = mode.getBehaviours(filter); + } + this.addBehaviours(behaviours); + } + + this.getBehaviours = function (filter) { + if (!filter) { + return this.$behaviours; + } else { + var ret = {} + for (var i = 0; i < filter.length; i++) { + if (this.$behaviours[filter[i]]) { + ret[filter[i]] = this.$behaviours[filter[i]]; + } + } + return ret; + } + } + +}).call(Behaviour.prototype); + +exports.Behaviour = Behaviour; +});define('ace/unicode', ['require', 'exports', 'module' ], function(require, exports, module) { + +/* +XRegExp Unicode plugin pack: Categories 1.0 +(c) 2010 Steven Levithan +MIT License + +Uses the Unicode 5.2 character database + +This package for the XRegExp Unicode plugin enables the following Unicode categories (aka properties): + +L - Letter (the top-level Letter category is included in the Unicode plugin base script) + Ll - Lowercase letter + Lu - Uppercase letter + Lt - Titlecase letter + Lm - Modifier letter + Lo - Letter without case +M - Mark + Mn - Non-spacing mark + Mc - Spacing combining mark + Me - Enclosing mark +N - Number + Nd - Decimal digit + Nl - Letter number + No - Other number +P - Punctuation + Pd - Dash punctuation + Ps - Open punctuation + Pe - Close punctuation + Pi - Initial punctuation + Pf - Final punctuation + Pc - Connector punctuation + Po - Other punctuation +S - Symbol + Sm - Math symbol + Sc - Currency symbol + Sk - Modifier symbol + So - Other symbol +Z - Separator + Zs - Space separator + Zl - Line separator + Zp - Paragraph separator +C - Other + Cc - Control + Cf - Format + Co - Private use + Cs - Surrogate + Cn - Unassigned + +Example usage: + + \p{N} + \p{Cn} +*/ + + +// will be populated by addUnicodePackage +exports.packages = {}; + +addUnicodePackage({ + L: "0041-005A0061-007A00AA00B500BA00C0-00D600D8-00F600F8-02C102C6-02D102E0-02E402EC02EE0370-037403760377037A-037D03860388-038A038C038E-03A103A3-03F503F7-0481048A-05250531-055605590561-058705D0-05EA05F0-05F20621-064A066E066F0671-06D306D506E506E606EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA07F407F507FA0800-0815081A082408280904-0939093D09500958-0961097109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E460E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EC60EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10A0-10C510D0-10FA10FC1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317D717DC1820-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541AA71B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C7D1CE9-1CEC1CEE-1CF11D00-1DBF1E00-1F151F18-1F1D1F20-1F451F48-1F4D1F50-1F571F591F5B1F5D1F5F-1F7D1F80-1FB41FB6-1FBC1FBE1FC2-1FC41FC6-1FCC1FD0-1FD31FD6-1FDB1FE0-1FEC1FF2-1FF41FF6-1FFC2071207F2090-209421022107210A-211321152119-211D212421262128212A-212D212F-2139213C-213F2145-2149214E218321842C00-2C2E2C30-2C5E2C60-2CE42CEB-2CEE2D00-2D252D30-2D652D6F2D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE2E2F300530063031-3035303B303C3041-3096309D-309F30A1-30FA30FC-30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A48CA4D0-A4FDA500-A60CA610-A61FA62AA62BA640-A65FA662-A66EA67F-A697A6A0-A6E5A717-A71FA722-A788A78BA78CA7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2A9CFAA00-AA28AA40-AA42AA44-AA4BAA60-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADB-AADDABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB00-FB06FB13-FB17FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF21-FF3AFF41-FF5AFF66-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", + Ll: "0061-007A00AA00B500BA00DF-00F600F8-00FF01010103010501070109010B010D010F01110113011501170119011B011D011F01210123012501270129012B012D012F01310133013501370138013A013C013E014001420144014601480149014B014D014F01510153015501570159015B015D015F01610163016501670169016B016D016F0171017301750177017A017C017E-0180018301850188018C018D019201950199-019B019E01A101A301A501A801AA01AB01AD01B001B401B601B901BA01BD-01BF01C601C901CC01CE01D001D201D401D601D801DA01DC01DD01DF01E101E301E501E701E901EB01ED01EF01F001F301F501F901FB01FD01FF02010203020502070209020B020D020F02110213021502170219021B021D021F02210223022502270229022B022D022F02310233-0239023C023F0240024202470249024B024D024F-02930295-02AF037103730377037B-037D039003AC-03CE03D003D103D5-03D703D903DB03DD03DF03E103E303E503E703E903EB03ED03EF-03F303F503F803FB03FC0430-045F04610463046504670469046B046D046F04710473047504770479047B047D047F0481048B048D048F04910493049504970499049B049D049F04A104A304A504A704A904AB04AD04AF04B104B304B504B704B904BB04BD04BF04C204C404C604C804CA04CC04CE04CF04D104D304D504D704D904DB04DD04DF04E104E304E504E704E904EB04ED04EF04F104F304F504F704F904FB04FD04FF05010503050505070509050B050D050F05110513051505170519051B051D051F0521052305250561-05871D00-1D2B1D62-1D771D79-1D9A1E011E031E051E071E091E0B1E0D1E0F1E111E131E151E171E191E1B1E1D1E1F1E211E231E251E271E291E2B1E2D1E2F1E311E331E351E371E391E3B1E3D1E3F1E411E431E451E471E491E4B1E4D1E4F1E511E531E551E571E591E5B1E5D1E5F1E611E631E651E671E691E6B1E6D1E6F1E711E731E751E771E791E7B1E7D1E7F1E811E831E851E871E891E8B1E8D1E8F1E911E931E95-1E9D1E9F1EA11EA31EA51EA71EA91EAB1EAD1EAF1EB11EB31EB51EB71EB91EBB1EBD1EBF1EC11EC31EC51EC71EC91ECB1ECD1ECF1ED11ED31ED51ED71ED91EDB1EDD1EDF1EE11EE31EE51EE71EE91EEB1EED1EEF1EF11EF31EF51EF71EF91EFB1EFD1EFF-1F071F10-1F151F20-1F271F30-1F371F40-1F451F50-1F571F60-1F671F70-1F7D1F80-1F871F90-1F971FA0-1FA71FB0-1FB41FB61FB71FBE1FC2-1FC41FC61FC71FD0-1FD31FD61FD71FE0-1FE71FF2-1FF41FF61FF7210A210E210F2113212F21342139213C213D2146-2149214E21842C30-2C5E2C612C652C662C682C6A2C6C2C712C732C742C76-2C7C2C812C832C852C872C892C8B2C8D2C8F2C912C932C952C972C992C9B2C9D2C9F2CA12CA32CA52CA72CA92CAB2CAD2CAF2CB12CB32CB52CB72CB92CBB2CBD2CBF2CC12CC32CC52CC72CC92CCB2CCD2CCF2CD12CD32CD52CD72CD92CDB2CDD2CDF2CE12CE32CE42CEC2CEE2D00-2D25A641A643A645A647A649A64BA64DA64FA651A653A655A657A659A65BA65DA65FA663A665A667A669A66BA66DA681A683A685A687A689A68BA68DA68FA691A693A695A697A723A725A727A729A72BA72DA72F-A731A733A735A737A739A73BA73DA73FA741A743A745A747A749A74BA74DA74FA751A753A755A757A759A75BA75DA75FA761A763A765A767A769A76BA76DA76FA771-A778A77AA77CA77FA781A783A785A787A78CFB00-FB06FB13-FB17FF41-FF5A", + Lu: "0041-005A00C0-00D600D8-00DE01000102010401060108010A010C010E01100112011401160118011A011C011E01200122012401260128012A012C012E01300132013401360139013B013D013F0141014301450147014A014C014E01500152015401560158015A015C015E01600162016401660168016A016C016E017001720174017601780179017B017D018101820184018601870189-018B018E-0191019301940196-0198019C019D019F01A001A201A401A601A701A901AC01AE01AF01B1-01B301B501B701B801BC01C401C701CA01CD01CF01D101D301D501D701D901DB01DE01E001E201E401E601E801EA01EC01EE01F101F401F6-01F801FA01FC01FE02000202020402060208020A020C020E02100212021402160218021A021C021E02200222022402260228022A022C022E02300232023A023B023D023E02410243-02460248024A024C024E03700372037603860388-038A038C038E038F0391-03A103A3-03AB03CF03D2-03D403D803DA03DC03DE03E003E203E403E603E803EA03EC03EE03F403F703F903FA03FD-042F04600462046404660468046A046C046E04700472047404760478047A047C047E0480048A048C048E04900492049404960498049A049C049E04A004A204A404A604A804AA04AC04AE04B004B204B404B604B804BA04BC04BE04C004C104C304C504C704C904CB04CD04D004D204D404D604D804DA04DC04DE04E004E204E404E604E804EA04EC04EE04F004F204F404F604F804FA04FC04FE05000502050405060508050A050C050E05100512051405160518051A051C051E0520052205240531-055610A0-10C51E001E021E041E061E081E0A1E0C1E0E1E101E121E141E161E181E1A1E1C1E1E1E201E221E241E261E281E2A1E2C1E2E1E301E321E341E361E381E3A1E3C1E3E1E401E421E441E461E481E4A1E4C1E4E1E501E521E541E561E581E5A1E5C1E5E1E601E621E641E661E681E6A1E6C1E6E1E701E721E741E761E781E7A1E7C1E7E1E801E821E841E861E881E8A1E8C1E8E1E901E921E941E9E1EA01EA21EA41EA61EA81EAA1EAC1EAE1EB01EB21EB41EB61EB81EBA1EBC1EBE1EC01EC21EC41EC61EC81ECA1ECC1ECE1ED01ED21ED41ED61ED81EDA1EDC1EDE1EE01EE21EE41EE61EE81EEA1EEC1EEE1EF01EF21EF41EF61EF81EFA1EFC1EFE1F08-1F0F1F18-1F1D1F28-1F2F1F38-1F3F1F48-1F4D1F591F5B1F5D1F5F1F68-1F6F1FB8-1FBB1FC8-1FCB1FD8-1FDB1FE8-1FEC1FF8-1FFB21022107210B-210D2110-211221152119-211D212421262128212A-212D2130-2133213E213F214521832C00-2C2E2C602C62-2C642C672C692C6B2C6D-2C702C722C752C7E-2C802C822C842C862C882C8A2C8C2C8E2C902C922C942C962C982C9A2C9C2C9E2CA02CA22CA42CA62CA82CAA2CAC2CAE2CB02CB22CB42CB62CB82CBA2CBC2CBE2CC02CC22CC42CC62CC82CCA2CCC2CCE2CD02CD22CD42CD62CD82CDA2CDC2CDE2CE02CE22CEB2CEDA640A642A644A646A648A64AA64CA64EA650A652A654A656A658A65AA65CA65EA662A664A666A668A66AA66CA680A682A684A686A688A68AA68CA68EA690A692A694A696A722A724A726A728A72AA72CA72EA732A734A736A738A73AA73CA73EA740A742A744A746A748A74AA74CA74EA750A752A754A756A758A75AA75CA75EA760A762A764A766A768A76AA76CA76EA779A77BA77DA77EA780A782A784A786A78BFF21-FF3A", + Lt: "01C501C801CB01F21F88-1F8F1F98-1F9F1FA8-1FAF1FBC1FCC1FFC", + Lm: "02B0-02C102C6-02D102E0-02E402EC02EE0374037A0559064006E506E607F407F507FA081A0824082809710E460EC610FC17D718431AA71C78-1C7D1D2C-1D611D781D9B-1DBF2071207F2090-20942C7D2D6F2E2F30053031-3035303B309D309E30FC-30FEA015A4F8-A4FDA60CA67FA717-A71FA770A788A9CFAA70AADDFF70FF9EFF9F", + Lo: "01BB01C0-01C3029405D0-05EA05F0-05F20621-063F0641-064A066E066F0671-06D306D506EE06EF06FA-06FC06FF07100712-072F074D-07A507B107CA-07EA0800-08150904-0939093D09500958-096109720979-097F0985-098C098F09900993-09A809AA-09B009B209B6-09B909BD09CE09DC09DD09DF-09E109F009F10A05-0A0A0A0F0A100A13-0A280A2A-0A300A320A330A350A360A380A390A59-0A5C0A5E0A72-0A740A85-0A8D0A8F-0A910A93-0AA80AAA-0AB00AB20AB30AB5-0AB90ABD0AD00AE00AE10B05-0B0C0B0F0B100B13-0B280B2A-0B300B320B330B35-0B390B3D0B5C0B5D0B5F-0B610B710B830B85-0B8A0B8E-0B900B92-0B950B990B9A0B9C0B9E0B9F0BA30BA40BA8-0BAA0BAE-0BB90BD00C05-0C0C0C0E-0C100C12-0C280C2A-0C330C35-0C390C3D0C580C590C600C610C85-0C8C0C8E-0C900C92-0CA80CAA-0CB30CB5-0CB90CBD0CDE0CE00CE10D05-0D0C0D0E-0D100D12-0D280D2A-0D390D3D0D600D610D7A-0D7F0D85-0D960D9A-0DB10DB3-0DBB0DBD0DC0-0DC60E01-0E300E320E330E40-0E450E810E820E840E870E880E8A0E8D0E94-0E970E99-0E9F0EA1-0EA30EA50EA70EAA0EAB0EAD-0EB00EB20EB30EBD0EC0-0EC40EDC0EDD0F000F40-0F470F49-0F6C0F88-0F8B1000-102A103F1050-1055105A-105D106110651066106E-10701075-1081108E10D0-10FA1100-1248124A-124D1250-12561258125A-125D1260-1288128A-128D1290-12B012B2-12B512B8-12BE12C012C2-12C512C8-12D612D8-13101312-13151318-135A1380-138F13A0-13F41401-166C166F-167F1681-169A16A0-16EA1700-170C170E-17111720-17311740-17511760-176C176E-17701780-17B317DC1820-18421844-18771880-18A818AA18B0-18F51900-191C1950-196D1970-19741980-19AB19C1-19C71A00-1A161A20-1A541B05-1B331B45-1B4B1B83-1BA01BAE1BAF1C00-1C231C4D-1C4F1C5A-1C771CE9-1CEC1CEE-1CF12135-21382D30-2D652D80-2D962DA0-2DA62DA8-2DAE2DB0-2DB62DB8-2DBE2DC0-2DC62DC8-2DCE2DD0-2DD62DD8-2DDE3006303C3041-3096309F30A1-30FA30FF3105-312D3131-318E31A0-31B731F0-31FF3400-4DB54E00-9FCBA000-A014A016-A48CA4D0-A4F7A500-A60BA610-A61FA62AA62BA66EA6A0-A6E5A7FB-A801A803-A805A807-A80AA80C-A822A840-A873A882-A8B3A8F2-A8F7A8FBA90A-A925A930-A946A960-A97CA984-A9B2AA00-AA28AA40-AA42AA44-AA4BAA60-AA6FAA71-AA76AA7AAA80-AAAFAAB1AAB5AAB6AAB9-AABDAAC0AAC2AADBAADCABC0-ABE2AC00-D7A3D7B0-D7C6D7CB-D7FBF900-FA2DFA30-FA6DFA70-FAD9FB1DFB1F-FB28FB2A-FB36FB38-FB3CFB3EFB40FB41FB43FB44FB46-FBB1FBD3-FD3DFD50-FD8FFD92-FDC7FDF0-FDFBFE70-FE74FE76-FEFCFF66-FF6FFF71-FF9DFFA0-FFBEFFC2-FFC7FFCA-FFCFFFD2-FFD7FFDA-FFDC", + M: "0300-036F0483-04890591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DE-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0903093C093E-094E0951-0955096209630981-098309BC09BE-09C409C709C809CB-09CD09D709E209E30A01-0A030A3C0A3E-0A420A470A480A4B-0A4D0A510A700A710A750A81-0A830ABC0ABE-0AC50AC7-0AC90ACB-0ACD0AE20AE30B01-0B030B3C0B3E-0B440B470B480B4B-0B4D0B560B570B620B630B820BBE-0BC20BC6-0BC80BCA-0BCD0BD70C01-0C030C3E-0C440C46-0C480C4A-0C4D0C550C560C620C630C820C830CBC0CBE-0CC40CC6-0CC80CCA-0CCD0CD50CD60CE20CE30D020D030D3E-0D440D46-0D480D4A-0D4D0D570D620D630D820D830DCA0DCF-0DD40DD60DD8-0DDF0DF20DF30E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F3E0F3F0F71-0F840F860F870F90-0F970F99-0FBC0FC6102B-103E1056-1059105E-10601062-10641067-106D1071-10741082-108D108F109A-109D135F1712-17141732-1734175217531772177317B6-17D317DD180B-180D18A91920-192B1930-193B19B0-19C019C819C91A17-1A1B1A55-1A5E1A60-1A7C1A7F1B00-1B041B34-1B441B6B-1B731B80-1B821BA1-1BAA1C24-1C371CD0-1CD21CD4-1CE81CED1CF21DC0-1DE61DFD-1DFF20D0-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66F-A672A67CA67DA6F0A6F1A802A806A80BA823-A827A880A881A8B4-A8C4A8E0-A8F1A926-A92DA947-A953A980-A983A9B3-A9C0AA29-AA36AA43AA4CAA4DAA7BAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE3-ABEAABECABEDFB1EFE00-FE0FFE20-FE26", + Mn: "0300-036F0483-04870591-05BD05BF05C105C205C405C505C70610-061A064B-065E067006D6-06DC06DF-06E406E706E806EA-06ED07110730-074A07A6-07B007EB-07F30816-0819081B-08230825-08270829-082D0900-0902093C0941-0948094D0951-095509620963098109BC09C1-09C409CD09E209E30A010A020A3C0A410A420A470A480A4B-0A4D0A510A700A710A750A810A820ABC0AC1-0AC50AC70AC80ACD0AE20AE30B010B3C0B3F0B41-0B440B4D0B560B620B630B820BC00BCD0C3E-0C400C46-0C480C4A-0C4D0C550C560C620C630CBC0CBF0CC60CCC0CCD0CE20CE30D41-0D440D4D0D620D630DCA0DD2-0DD40DD60E310E34-0E3A0E47-0E4E0EB10EB4-0EB90EBB0EBC0EC8-0ECD0F180F190F350F370F390F71-0F7E0F80-0F840F860F870F90-0F970F99-0FBC0FC6102D-10301032-10371039103A103D103E10581059105E-10601071-1074108210851086108D109D135F1712-17141732-1734175217531772177317B7-17BD17C617C9-17D317DD180B-180D18A91920-19221927192819321939-193B1A171A181A561A58-1A5E1A601A621A65-1A6C1A73-1A7C1A7F1B00-1B031B341B36-1B3A1B3C1B421B6B-1B731B801B811BA2-1BA51BA81BA91C2C-1C331C361C371CD0-1CD21CD4-1CE01CE2-1CE81CED1DC0-1DE61DFD-1DFF20D0-20DC20E120E5-20F02CEF-2CF12DE0-2DFF302A-302F3099309AA66FA67CA67DA6F0A6F1A802A806A80BA825A826A8C4A8E0-A8F1A926-A92DA947-A951A980-A982A9B3A9B6-A9B9A9BCAA29-AA2EAA31AA32AA35AA36AA43AA4CAAB0AAB2-AAB4AAB7AAB8AABEAABFAAC1ABE5ABE8ABEDFB1EFE00-FE0FFE20-FE26", + Mc: "0903093E-09400949-094C094E0982098309BE-09C009C709C809CB09CC09D70A030A3E-0A400A830ABE-0AC00AC90ACB0ACC0B020B030B3E0B400B470B480B4B0B4C0B570BBE0BBF0BC10BC20BC6-0BC80BCA-0BCC0BD70C01-0C030C41-0C440C820C830CBE0CC0-0CC40CC70CC80CCA0CCB0CD50CD60D020D030D3E-0D400D46-0D480D4A-0D4C0D570D820D830DCF-0DD10DD8-0DDF0DF20DF30F3E0F3F0F7F102B102C10311038103B103C105610571062-10641067-106D108310841087-108C108F109A-109C17B617BE-17C517C717C81923-19261929-192B193019311933-193819B0-19C019C819C91A19-1A1B1A551A571A611A631A641A6D-1A721B041B351B3B1B3D-1B411B431B441B821BA11BA61BA71BAA1C24-1C2B1C341C351CE11CF2A823A824A827A880A881A8B4-A8C3A952A953A983A9B4A9B5A9BAA9BBA9BD-A9C0AA2FAA30AA33AA34AA4DAA7BABE3ABE4ABE6ABE7ABE9ABEAABEC", + Me: "0488048906DE20DD-20E020E2-20E4A670-A672", + N: "0030-003900B200B300B900BC-00BE0660-066906F0-06F907C0-07C90966-096F09E6-09EF09F4-09F90A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BF20C66-0C6F0C78-0C7E0CE6-0CEF0D66-0D750E50-0E590ED0-0ED90F20-0F331040-10491090-10991369-137C16EE-16F017E0-17E917F0-17F91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C5920702074-20792080-20892150-21822185-21892460-249B24EA-24FF2776-27932CFD30073021-30293038-303A3192-31953220-32293251-325F3280-328932B1-32BFA620-A629A6E6-A6EFA830-A835A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", + Nd: "0030-00390660-066906F0-06F907C0-07C90966-096F09E6-09EF0A66-0A6F0AE6-0AEF0B66-0B6F0BE6-0BEF0C66-0C6F0CE6-0CEF0D66-0D6F0E50-0E590ED0-0ED90F20-0F291040-10491090-109917E0-17E91810-18191946-194F19D0-19DA1A80-1A891A90-1A991B50-1B591BB0-1BB91C40-1C491C50-1C59A620-A629A8D0-A8D9A900-A909A9D0-A9D9AA50-AA59ABF0-ABF9FF10-FF19", + Nl: "16EE-16F02160-21822185-218830073021-30293038-303AA6E6-A6EF", + No: "00B200B300B900BC-00BE09F4-09F90BF0-0BF20C78-0C7E0D70-0D750F2A-0F331369-137C17F0-17F920702074-20792080-20892150-215F21892460-249B24EA-24FF2776-27932CFD3192-31953220-32293251-325F3280-328932B1-32BFA830-A835", + P: "0021-00230025-002A002C-002F003A003B003F0040005B-005D005F007B007D00A100AB00B700BB00BF037E0387055A-055F0589058A05BE05C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F3A-0F3D0F850FD0-0FD4104A-104F10FB1361-13681400166D166E169B169C16EB-16ED1735173617D4-17D617D8-17DA1800-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD32010-20272030-20432045-20512053-205E207D207E208D208E2329232A2768-277527C527C627E6-27EF2983-299829D8-29DB29FC29FD2CF9-2CFC2CFE2CFF2E00-2E2E2E302E313001-30033008-30113014-301F3030303D30A030FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFD3EFD3FFE10-FE19FE30-FE52FE54-FE61FE63FE68FE6AFE6BFF01-FF03FF05-FF0AFF0C-FF0FFF1AFF1BFF1FFF20FF3B-FF3DFF3FFF5BFF5DFF5F-FF65", + Pd: "002D058A05BE140018062010-20152E172E1A301C303030A0FE31FE32FE58FE63FF0D", + Ps: "0028005B007B0F3A0F3C169B201A201E2045207D208D23292768276A276C276E27702772277427C527E627E827EA27EC27EE2983298529872989298B298D298F299129932995299729D829DA29FC2E222E242E262E283008300A300C300E3010301430163018301A301DFD3EFE17FE35FE37FE39FE3BFE3DFE3FFE41FE43FE47FE59FE5BFE5DFF08FF3BFF5BFF5FFF62", + Pe: "0029005D007D0F3B0F3D169C2046207E208E232A2769276B276D276F27712773277527C627E727E927EB27ED27EF298429862988298A298C298E2990299229942996299829D929DB29FD2E232E252E272E293009300B300D300F3011301530173019301B301E301FFD3FFE18FE36FE38FE3AFE3CFE3EFE40FE42FE44FE48FE5AFE5CFE5EFF09FF3DFF5DFF60FF63", + Pi: "00AB2018201B201C201F20392E022E042E092E0C2E1C2E20", + Pf: "00BB2019201D203A2E032E052E0A2E0D2E1D2E21", + Pc: "005F203F20402054FE33FE34FE4D-FE4FFF3F", + Po: "0021-00230025-0027002A002C002E002F003A003B003F0040005C00A100B700BF037E0387055A-055F058905C005C305C605F305F40609060A060C060D061B061E061F066A-066D06D40700-070D07F7-07F90830-083E0964096509700DF40E4F0E5A0E5B0F04-0F120F850FD0-0FD4104A-104F10FB1361-1368166D166E16EB-16ED1735173617D4-17D617D8-17DA1800-18051807-180A1944194519DE19DF1A1E1A1F1AA0-1AA61AA8-1AAD1B5A-1B601C3B-1C3F1C7E1C7F1CD3201620172020-20272030-2038203B-203E2041-20432047-205120532055-205E2CF9-2CFC2CFE2CFF2E002E012E06-2E082E0B2E0E-2E162E182E192E1B2E1E2E1F2E2A-2E2E2E302E313001-3003303D30FBA4FEA4FFA60D-A60FA673A67EA6F2-A6F7A874-A877A8CEA8CFA8F8-A8FAA92EA92FA95FA9C1-A9CDA9DEA9DFAA5C-AA5FAADEAADFABEBFE10-FE16FE19FE30FE45FE46FE49-FE4CFE50-FE52FE54-FE57FE5F-FE61FE68FE6AFE6BFF01-FF03FF05-FF07FF0AFF0CFF0EFF0FFF1AFF1BFF1FFF20FF3CFF61FF64FF65", + S: "0024002B003C-003E005E0060007C007E00A2-00A900AC00AE-00B100B400B600B800D700F702C2-02C502D2-02DF02E5-02EB02ED02EF-02FF03750384038503F604820606-0608060B060E060F06E906FD06FE07F609F209F309FA09FB0AF10B700BF3-0BFA0C7F0CF10CF20D790E3F0F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-139917DB194019E0-19FF1B61-1B6A1B74-1B7C1FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE20442052207A-207C208A-208C20A0-20B8210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B2140-2144214A-214D214F2190-2328232B-23E82400-24262440-244A249C-24E92500-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE27C0-27C427C7-27CA27CC27D0-27E527F0-29822999-29D729DC-29FB29FE-2B4C2B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F309B309C319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A700-A716A720A721A789A78AA828-A82BA836-A839AA77-AA79FB29FDFCFDFDFE62FE64-FE66FE69FF04FF0BFF1C-FF1EFF3EFF40FF5CFF5EFFE0-FFE6FFE8-FFEEFFFCFFFD", + Sm: "002B003C-003E007C007E00AC00B100D700F703F60606-060820442052207A-207C208A-208C2140-2144214B2190-2194219A219B21A021A321A621AE21CE21CF21D221D421F4-22FF2308-230B23202321237C239B-23B323DC-23E125B725C125F8-25FF266F27C0-27C427C7-27CA27CC27D0-27E527F0-27FF2900-29822999-29D729DC-29FB29FE-2AFF2B30-2B442B47-2B4CFB29FE62FE64-FE66FF0BFF1C-FF1EFF5CFF5EFFE2FFE9-FFEC", + Sc: "002400A2-00A5060B09F209F309FB0AF10BF90E3F17DB20A0-20B8A838FDFCFE69FF04FFE0FFE1FFE5FFE6", + Sk: "005E006000A800AF00B400B802C2-02C502D2-02DF02E5-02EB02ED02EF-02FF0375038403851FBD1FBF-1FC11FCD-1FCF1FDD-1FDF1FED-1FEF1FFD1FFE309B309CA700-A716A720A721A789A78AFF3EFF40FFE3", + So: "00A600A700A900AE00B000B60482060E060F06E906FD06FE07F609FA0B700BF3-0BF80BFA0C7F0CF10CF20D790F01-0F030F13-0F170F1A-0F1F0F340F360F380FBE-0FC50FC7-0FCC0FCE0FCF0FD5-0FD8109E109F13601390-1399194019E0-19FF1B61-1B6A1B74-1B7C210021012103-21062108210921142116-2118211E-2123212521272129212E213A213B214A214C214D214F2195-2199219C-219F21A121A221A421A521A7-21AD21AF-21CD21D021D121D321D5-21F32300-2307230C-231F2322-2328232B-237B237D-239A23B4-23DB23E2-23E82400-24262440-244A249C-24E92500-25B625B8-25C025C2-25F72600-266E2670-26CD26CF-26E126E326E8-26FF2701-27042706-2709270C-27272729-274B274D274F-27522756-275E2761-276727942798-27AF27B1-27BE2800-28FF2B00-2B2F2B452B462B50-2B592CE5-2CEA2E80-2E992E9B-2EF32F00-2FD52FF0-2FFB300430123013302030363037303E303F319031913196-319F31C0-31E33200-321E322A-32503260-327F328A-32B032C0-32FE3300-33FF4DC0-4DFFA490-A4C6A828-A82BA836A837A839AA77-AA79FDFDFFE4FFE8FFEDFFEEFFFCFFFD", + Z: "002000A01680180E2000-200A20282029202F205F3000", + Zs: "002000A01680180E2000-200A202F205F3000", + Zl: "2028", + Zp: "2029", + C: "0000-001F007F-009F00AD03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-0605061C061D0620065F06DD070E070F074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17B417B517DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF200B-200F202A-202E2060-206F20722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-F8FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFD-FF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFFBFFFEFFFF", + Cc: "0000-001F007F-009F", + Cf: "00AD0600-060306DD070F17B417B5200B-200F202A-202E2060-2064206A-206FFEFFFFF9-FFFB", + Co: "E000-F8FF", + Cs: "D800-DFFF", + Cn: "03780379037F-0383038B038D03A20526-05300557055805600588058B-059005C8-05CF05EB-05EF05F5-05FF06040605061C061D0620065F070E074B074C07B2-07BF07FB-07FF082E082F083F-08FF093A093B094F095609570973-097809800984098D098E0991099209A909B109B3-09B509BA09BB09C509C609C909CA09CF-09D609D8-09DB09DE09E409E509FC-0A000A040A0B-0A0E0A110A120A290A310A340A370A3A0A3B0A3D0A43-0A460A490A4A0A4E-0A500A52-0A580A5D0A5F-0A650A76-0A800A840A8E0A920AA90AB10AB40ABA0ABB0AC60ACA0ACE0ACF0AD1-0ADF0AE40AE50AF00AF2-0B000B040B0D0B0E0B110B120B290B310B340B3A0B3B0B450B460B490B4A0B4E-0B550B58-0B5B0B5E0B640B650B72-0B810B840B8B-0B8D0B910B96-0B980B9B0B9D0BA0-0BA20BA5-0BA70BAB-0BAD0BBA-0BBD0BC3-0BC50BC90BCE0BCF0BD1-0BD60BD8-0BE50BFB-0C000C040C0D0C110C290C340C3A-0C3C0C450C490C4E-0C540C570C5A-0C5F0C640C650C70-0C770C800C810C840C8D0C910CA90CB40CBA0CBB0CC50CC90CCE-0CD40CD7-0CDD0CDF0CE40CE50CF00CF3-0D010D040D0D0D110D290D3A-0D3C0D450D490D4E-0D560D58-0D5F0D640D650D76-0D780D800D810D840D97-0D990DB20DBC0DBE0DBF0DC7-0DC90DCB-0DCE0DD50DD70DE0-0DF10DF5-0E000E3B-0E3E0E5C-0E800E830E850E860E890E8B0E8C0E8E-0E930E980EA00EA40EA60EA80EA90EAC0EBA0EBE0EBF0EC50EC70ECE0ECF0EDA0EDB0EDE-0EFF0F480F6D-0F700F8C-0F8F0F980FBD0FCD0FD9-0FFF10C6-10CF10FD-10FF1249124E124F12571259125E125F1289128E128F12B112B612B712BF12C112C612C712D7131113161317135B-135E137D-137F139A-139F13F5-13FF169D-169F16F1-16FF170D1715-171F1737-173F1754-175F176D17711774-177F17DE17DF17EA-17EF17FA-17FF180F181A-181F1878-187F18AB-18AF18F6-18FF191D-191F192C-192F193C-193F1941-1943196E196F1975-197F19AC-19AF19CA-19CF19DB-19DD1A1C1A1D1A5F1A7D1A7E1A8A-1A8F1A9A-1A9F1AAE-1AFF1B4C-1B4F1B7D-1B7F1BAB-1BAD1BBA-1BFF1C38-1C3A1C4A-1C4C1C80-1CCF1CF3-1CFF1DE7-1DFC1F161F171F1E1F1F1F461F471F4E1F4F1F581F5A1F5C1F5E1F7E1F7F1FB51FC51FD41FD51FDC1FF01FF11FF51FFF2065-206920722073208F2095-209F20B9-20CF20F1-20FF218A-218F23E9-23FF2427-243F244B-245F26CE26E226E4-26E727002705270A270B2728274C274E2753-2755275F27602795-279727B027BF27CB27CD-27CF2B4D-2B4F2B5A-2BFF2C2F2C5F2CF2-2CF82D26-2D2F2D66-2D6E2D70-2D7F2D97-2D9F2DA72DAF2DB72DBF2DC72DCF2DD72DDF2E32-2E7F2E9A2EF4-2EFF2FD6-2FEF2FFC-2FFF3040309730983100-3104312E-3130318F31B8-31BF31E4-31EF321F32FF4DB6-4DBF9FCC-9FFFA48D-A48FA4C7-A4CFA62C-A63FA660A661A674-A67BA698-A69FA6F8-A6FFA78D-A7FAA82C-A82FA83A-A83FA878-A87FA8C5-A8CDA8DA-A8DFA8FC-A8FFA954-A95EA97D-A97FA9CEA9DA-A9DDA9E0-A9FFAA37-AA3FAA4EAA4FAA5AAA5BAA7C-AA7FAAC3-AADAAAE0-ABBFABEEABEFABFA-ABFFD7A4-D7AFD7C7-D7CAD7FC-D7FFFA2EFA2FFA6EFA6FFADA-FAFFFB07-FB12FB18-FB1CFB37FB3DFB3FFB42FB45FBB2-FBD2FD40-FD4FFD90FD91FDC8-FDEFFDFEFDFFFE1A-FE1FFE27-FE2FFE53FE67FE6C-FE6FFE75FEFDFEFEFF00FFBF-FFC1FFC8FFC9FFD0FFD1FFD8FFD9FFDD-FFDFFFE7FFEF-FFF8FFFEFFFF" +}); + +function addUnicodePackage (pack) { + var codePoint = /\w{4}/g; + for (var name in pack) + exports.packages[name] = pack[name].replace(codePoint, "\\u$&"); +}; + +});/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/document', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/event_emitter', 'ace/range', 'ace/anchor'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; +var Range = require("ace/range").Range; +var Anchor = require("ace/anchor").Anchor; + +var Document = function(text) { + this.$lines = []; + + if (Array.isArray(text)) { + this.insertLines(0, text); + } + // There has to be one line at least in the document. If you pass an empty + // string to the insert function, nothing will happen. Workaround. + else if (text.length == 0) { + this.$lines = [""]; + } else { + this.insert({row: 0, column:0}, text); + } +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.setValue = function(text) { + var len = this.getLength(); + this.remove(new Range(0, 0, len, this.getLine(len-1).length)); + this.insert({row: 0, column:0}, text); + }; + + this.getValue = function() { + return this.getAllLines().join(this.getNewLineCharacter()); + }; + + this.createAnchor = function(row, column) { + return new Anchor(this, row, column); + }; + + // check for IE split bug + if ("aaa".split(/a/).length == 0) + this.$split = function(text) { + return text.replace(/\r\n|\r/g, "\n").split("\n"); + } + else + this.$split = function(text) { + return text.split(/\r\n|\r|\n/); + }; + + + this.$detectNewLine = function(text) { + var match = text.match(/^.*?(\r?\n)/m); + if (match) { + this.$autoNewLine = match[1]; + } else { + this.$autoNewLine = "\n"; + } + }; + + this.getNewLineCharacter = function() { + switch (this.$newLineMode) { + case "windows": + return "\r\n"; + + case "unix": + return "\n"; + + case "auto": + return this.$autoNewLine; + } + }, + + this.$autoNewLine = "\n"; + this.$newLineMode = "auto"; + this.setNewLineMode = function(newLineMode) { + if (this.$newLineMode === newLineMode) return; + + this.$newLineMode = newLineMode; + }; + + this.getNewLineMode = function() { + return this.$newLineMode; + }; + + this.isNewLine = function(text) { + return (text == "\r\n" || text == "\r" || text == "\n"); + }; + + /** + * Get a verbatim copy of the given line as it is in the document + */ + this.getLine = function(row) { + return this.$lines[row] || ""; + }; + + this.getLines = function(firstRow, lastRow) { + return this.$lines.slice(firstRow, lastRow + 1); + }; + + /** + * Returns all lines in the document as string array. Warning: The caller + * should not modify this array! + */ + this.getAllLines = function() { + return this.getLines(0, this.getLength()); + }; + + this.getLength = function() { + return this.$lines.length; + }; + + this.getTextRange = function(range) { + if (range.start.row == range.end.row) { + return this.$lines[range.start.row].substring(range.start.column, + range.end.column); + } + else { + var lines = []; + lines.push(this.$lines[range.start.row].substring(range.start.column)); + lines.push.apply(lines, this.getLines(range.start.row+1, range.end.row-1)); + lines.push(this.$lines[range.end.row].substring(0, range.end.column)); + return lines.join(this.getNewLineCharacter()); + } + }; + + this.$clipPosition = function(position) { + var length = this.getLength(); + if (position.row >= length) { + position.row = Math.max(0, length - 1); + position.column = this.getLine(length-1).length; + } + return position; + } + + this.insert = function(position, text) { + if (text.length == 0) + return position; + + position = this.$clipPosition(position); + + if (this.getLength() <= 1) + this.$detectNewLine(text); + + var lines = this.$split(text); + var firstLine = lines.splice(0, 1)[0]; + var lastLine = lines.length == 0 ? null : lines.splice(lines.length - 1, 1)[0]; + + position = this.insertInLine(position, firstLine); + if (lastLine !== null) { + position = this.insertNewLine(position); // terminate first line + position = this.insertLines(position.row, lines); + position = this.insertInLine(position, lastLine || ""); + } + return position; + }; + + this.insertLines = function(row, lines) { + if (lines.length == 0) + return {row: row, column: 0}; + + var args = [row, 0]; + args.push.apply(args, lines); + this.$lines.splice.apply(this.$lines, args); + + var range = new Range(row, 0, row + lines.length, 0); + var delta = { + action: "insertLines", + range: range, + lines: lines + }; + this._dispatchEvent("change", { data: delta }); + return range.end; + }, + + this.insertNewLine = function(position) { + position = this.$clipPosition(position); + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column); + this.$lines.splice(position.row + 1, 0, line.substring(position.column, line.length)); + + var end = { + row : position.row + 1, + column : 0 + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: this.getNewLineCharacter() + }; + this._dispatchEvent("change", { data: delta }); + + return end; + }; + + this.insertInLine = function(position, text) { + if (text.length == 0) + return position; + + var line = this.$lines[position.row] || ""; + + this.$lines[position.row] = line.substring(0, position.column) + text + + line.substring(position.column); + + var end = { + row : position.row, + column : position.column + text.length + }; + + var delta = { + action: "insertText", + range: Range.fromPoints(position, end), + text: text + }; + this._dispatchEvent("change", { data: delta }); + + return end; + }; + + this.remove = function(range) { + // clip to document + range.start = this.$clipPosition(range.start); + range.end = this.$clipPosition(range.end); + + if (range.isEmpty()) + return range.start; + + var firstRow = range.start.row; + var lastRow = range.end.row; + + if (range.isMultiLine()) { + var firstFullRow = range.start.column == 0 ? firstRow : firstRow + 1; + var lastFullRow = lastRow - 1; + + if (range.end.column > 0) + this.removeInLine(lastRow, 0, range.end.column); + + if (lastFullRow >= firstFullRow) + this.removeLines(firstFullRow, lastFullRow); + + if (firstFullRow != firstRow) { + this.removeInLine(firstRow, range.start.column, this.getLine(firstRow).length); + this.removeNewLine(range.start.row); + } + } + else { + this.removeInLine(firstRow, range.start.column, range.end.column); + } + return range.start; + }; + + this.removeInLine = function(row, startColumn, endColumn) { + if (startColumn == endColumn) + return; + + var range = new Range(row, startColumn, row, endColumn); + var line = this.getLine(row); + var removed = line.substring(startColumn, endColumn); + var newLine = line.substring(0, startColumn) + line.substring(endColumn, line.length); + this.$lines.splice(row, 1, newLine); + + var delta = { + action: "removeText", + range: range, + text: removed + }; + this._dispatchEvent("change", { data: delta }); + return range.start; + }; + + /** + * Removes a range of full lines + * + * @param firstRow {Integer} The first row to be removed + * @param lastRow {Integer} The last row to be removed + * @return {String[]} The removed lines + */ + this.removeLines = function(firstRow, lastRow) { + var range = new Range(firstRow, 0, lastRow + 1, 0); + var removed = this.$lines.splice(firstRow, lastRow - firstRow + 1); + + var delta = { + action: "removeLines", + range: range, + nl: this.getNewLineCharacter(), + lines: removed + }; + this._dispatchEvent("change", { data: delta }); + return removed; + }; + + this.removeNewLine = function(row) { + var firstLine = this.getLine(row); + var secondLine = this.getLine(row+1); + + var range = new Range(row, firstLine.length, row+1, 0); + var line = firstLine + secondLine; + + this.$lines.splice(row, 2, line); + + var delta = { + action: "removeText", + range: range, + text: this.getNewLineCharacter() + }; + this._dispatchEvent("change", { data: delta }); + }; + + this.replace = function(range, text) { + if (text.length == 0 && range.isEmpty()) + return range.start; + + // Shortcut: If the text we want to insert is the same as it is already + // in the document, we don't have to replace anything. + if (text == this.getTextRange(range)) + return range.end; + + this.remove(range); + if (text) { + var end = this.insert(range.start, text); + } + else { + end = range.start; + } + + return end; + }; + + this.applyDeltas = function(deltas) { + for (var i=0; i=0; i--) { + var delta = deltas[i]; + + var range = Range.fromPoints(delta.range.start, delta.range.end); + + if (delta.action == "insertLines") + this.removeLines(range.start.row, range.end.row - 1) + else if (delta.action == "insertText") + this.remove(range) + else if (delta.action == "removeLines") + this.insertLines(range.start.row, delta.lines) + else if (delta.action == "removeText") + this.insert(range.start, delta.text) + } + }; + +}).call(Document.prototype); + +exports.Document = Document; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/anchor', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/event_emitter'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +/** + * An Anchor is a floating pointer in the document. Whenever text is inserted or + * deleted before the cursor, the position of the cursor is updated + */ +var Anchor = exports.Anchor = function(doc, row, column) { + this.document = doc; + + if (typeof column == "undefined") + this.setPosition(row.row, row.column); + else + this.setPosition(row, column); + + this.$onChange = this.onChange.bind(this); + doc.on("change", this.$onChange); +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.getPosition = function() { + return this.$clipPositionToDocument(this.row, this.column); + }; + + this.getDocument = function() { + return this.document; + }; + + this.onChange = function(e) { + var delta = e.data; + var range = delta.range; + + if (range.start.row == range.end.row && range.start.row != this.row) + return; + + if (range.start.row > this.row) + return; + + if (range.start.row == this.row && range.start.column > this.column) + return; + + var row = this.row; + var column = this.column; + + if (delta.action === "insertText") { + if (range.start.row === row && range.start.column <= column) { + if (range.start.row === range.end.row) { + column += range.end.column - range.start.column; + } + else { + column -= range.start.column; + row += range.end.row - range.start.row; + } + } + else if (range.start.row !== range.end.row && range.start.row < row) { + row += range.end.row - range.start.row; + } + } else if (delta.action === "insertLines") { + if (range.start.row <= row) { + row += range.end.row - range.start.row; + } + } + else if (delta.action == "removeText") { + if (range.start.row == row && range.start.column < column) { + if (range.end.column >= column) + column = range.start.column; + else + column = Math.max(0, column - (range.end.column - range.start.column)); + + } else if (range.start.row !== range.end.row && range.start.row < row) { + if (range.end.row == row) { + column = Math.max(0, column - range.end.column) + range.start.column; + } + row -= (range.end.row - range.start.row); + } + else if (range.end.row == row) { + row -= range.end.row - range.start.row; + column = Math.max(0, column - range.end.column) + range.start.column; + } + } else if (delta.action == "removeLines") { + if (range.start.row <= row) { + if (range.end.row <= row) + row -= range.end.row - range.start.row; + else { + row = range.start.row; + column = 0; + } + } + } + + this.setPosition(row, column, true); + }; + + this.setPosition = function(row, column, noClip) { + var pos; + if (noClip) { + pos = { + row: row, + column: column + }; + } + else { + pos = this.$clipPositionToDocument(row, column); + } + + if (this.row == pos.row && this.column == pos.column) + return; + + var old = { + row: this.row, + column: this.column + }; + + this.row = pos.row; + this.column = pos.column; + this._dispatchEvent("change", { + old: old, + value: pos + }); + }; + + this.detach = function() { + this.document.removeEventListener("change", this.$onChange); + }; + + this.$clipPositionToDocument = function(row, column) { + var pos = {}; + + if (row >= this.document.getLength()) { + pos.row = Math.max(0, this.document.getLength() - 1); + pos.column = this.document.getLine(pos.row).length; + } + else if (row < 0) { + pos.row = 0; + pos.column = 0; + } + else { + pos.row = row; + pos.column = Math.min(this.document.getLine(pos.row).length, Math.max(0, column)); + } + + if (column < 0) + pos.column = 0; + + return pos; + }; + +}).call(Anchor.prototype); + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/background_tokenizer', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/event_emitter'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +var BackgroundTokenizer = function(tokenizer, editor) { + this.running = false; + this.lines = []; + this.currentLine = 0; + this.tokenizer = tokenizer; + + var self = this; + + this.$worker = function() { + if (!self.running) { return; } + + var workerStart = new Date(); + var startLine = self.currentLine; + var doc = self.doc; + + var processedLines = 0; + + var len = doc.getLength(); + while (self.currentLine < len) { + self.lines[self.currentLine] = self.$tokenizeRows(self.currentLine, self.currentLine)[0]; + self.currentLine++; + + // only check every 5 lines + processedLines += 1; + if ((processedLines % 5 == 0) && (new Date() - workerStart) > 20) { + self.fireUpdateEvent(startLine, self.currentLine-1); + self.running = setTimeout(self.$worker, 20); + return; + } + } + + self.running = false; + + self.fireUpdateEvent(startLine, len - 1); + }; +}; + +(function(){ + + oop.implement(this, EventEmitter); + + this.setTokenizer = function(tokenizer) { + this.tokenizer = tokenizer; + this.lines = []; + + this.start(0); + }; + + this.setDocument = function(doc) { + this.doc = doc; + this.lines = []; + + this.stop(); + }; + + this.fireUpdateEvent = function(firstRow, lastRow) { + var data = { + first: firstRow, + last: lastRow + }; + this._dispatchEvent("update", {data: data}); + }; + + this.start = function(startRow) { + this.currentLine = Math.min(startRow || 0, this.currentLine, + this.doc.getLength()); + + // remove all cached items below this line + this.lines.splice(this.currentLine, this.lines.length); + + this.stop(); + // pretty long delay to prevent the tokenizer from interfering with the user + this.running = setTimeout(this.$worker, 700); + }; + + this.stop = function() { + if (this.running) + clearTimeout(this.running); + this.running = false; + }; + + this.getTokens = function(firstRow, lastRow) { + return this.$tokenizeRows(firstRow, lastRow); + }; + + this.getState = function(row) { + return this.$tokenizeRows(row, row)[0].state; + }; + + this.$tokenizeRows = function(firstRow, lastRow) { + if (!this.doc) + return []; + + var rows = []; + + // determine start state + var state = "start"; + var doCache = false; + if (firstRow > 0 && this.lines[firstRow - 1]) { + state = this.lines[firstRow - 1].state; + doCache = true; + } else if (firstRow == 0) { + state = "start"; + doCache = true; + } else if (this.lines.length > 0) { + // Guess that we haven't changed state. + state = this.lines[this.lines.length-1].state; + } + + var lines = this.doc.getLines(firstRow, lastRow); + for (var row=firstRow; row<=lastRow; row++) { + if (!this.lines[row]) { + var tokens = this.tokenizer.getLineTokens(lines[row-firstRow] || "", state); + var state = tokens.state; + rows.push(tokens); + + if (doCache) { + this.lines[row] = tokens; + } + } + else { + var tokens = this.lines[row]; + state = tokens.state; + rows.push(tokens); + } + } + return rows; + }; + +}).call(BackgroundTokenizer.prototype); + +exports.BackgroundTokenizer = BackgroundTokenizer; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/edit_session/folding', ['require', 'exports', 'module' , 'ace/range', 'ace/edit_session/fold_line', 'ace/edit_session/fold'], function(require, exports, module) { + +var Range = require("ace/range").Range; +var FoldLine = require("ace/edit_session/fold_line").FoldLine; +var Fold = require("ace/edit_session/fold").Fold; + +function Folding() { + /** + * Looks up a fold at a given row/column. Possible values for side: + * -1: ignore a fold if fold.start = row/column + * +1: ignore a fold if fold.end = row/column + */ + this.getFoldAt = function(row, column, side) { + var foldLine = this.getFoldLine(row); + if (!foldLine) + return null; + + var folds = foldLine.folds; + for (var i = 0; i < folds.length; i++) { + var fold = folds[i]; + if (fold.range.contains(row, column)) { + if (side == 1 && fold.range.isEnd(row, column)) { + continue; + } else if (side == -1 && fold.range.isStart(row, column)) { + continue; + } + return fold; + } + } + }; + + /** + * Returns all folds in the given range. Note, that this will return folds + * + */ + this.getFoldsInRange = function(range) { + range = range.clone(); + var start = range.start; + var end = range.end; + var foldLines = this.$foldData; + var foundFolds = []; + + start.column += 1; + end.column -= 1; + + for (var i = 0; i < foldLines.length; i++) { + var cmp = foldLines[i].range.compareRange(range); + if (cmp == 2) { + // Range is before foldLine. No intersection. This means, + // there might be other foldLines that intersect. + continue; + } + else if (cmp == -2) { + // Range is after foldLine. There can't be any other foldLines then, + // so let's give up. + break; + } + + var folds = foldLines[i].folds; + for (var j = 0; j < folds.length; j++) { + var fold = folds[j]; + cmp = fold.range.compareRange(range); + if (cmp == -2) { + break; + } else if (cmp == 2) { + continue; + } else + // WTF-state: Can happen due to -1/+1 to start/end column. + if (cmp == 42) { + break; + } + foundFolds.push(fold); + } + } + return foundFolds; + } + + /** + * Returns the string between folds at the given position. + * E.g. + * foob|arwolrd -> "bar" + * foobarwol|rd -> "world" + * foobarwolrd -> + * + * where | means the position of row/column + * + * The trim option determs if the return string should be trimed according + * to the "side" passed with the trim value: + * + * E.g. + * foob|arwolrd -trim=-1> "b" + * foobarwol|rd -trim=+1> "rld" + * fo|obarwolrd -trim=00> "foo" + */ + this.getFoldStringAt = function(row, column, trim, foldLine) { + var foldLine = foldLine || this.getFoldLine(row); + if (!foldLine) + return null; + + var lastFold = { + end: { column: 0 } + }; + // TODO: Refactor to use getNextFoldTo function. + for (var i = 0; i < foldLine.folds.length; i++) { + var fold = foldLine.folds[i]; + var cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + var str = this + .getLine(fold.start.row) + .substring(lastFold.end.column, fold.start.column); + break; + } + else if (cmp == 0) { + return null; + } + lastFold = fold; + } + if (!str) + str = this.getLine(fold.start.row).substring(lastFold.end.column); + + if (trim == -1) + return str.substring(0, column - lastFold.end.column); + else if (trim == 1) + return str.substring(column - lastFold.end.column) + else + return str; + } + + this.getFoldLine = function(docRow, startFoldLine) { + var foldData = this.$foldData; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.start.row <= docRow && foldLine.end.row >= docRow) { + return foldLine; + } else if (foldLine.end.row > docRow) { + return null; + } + } + return null; + } + + // returns the fold which starts after or contains docRow + this.getNextFold = function(docRow, startFoldLine) { + var foldData = this.$foldData, ans; + var i = 0; + if (startFoldLine) + i = foldData.indexOf(startFoldLine); + if (i == -1) + i = 0; + for (i; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (foldLine.end.row >= docRow) { + return foldLine; + } + } + return null; + } + + this.getFoldedRowCount = function(first, last) { + var foldData = this.$foldData, rowCount = last-first+1; + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i], + end = foldLine.end.row, + start = foldLine.start.row; + if (end >= last) { + if(start < last) { + if(start >= first) + rowCount -= last-start; + else + rowCount = 0;//in one fold + } + break; + } else if(end >= first){ + if (start >= first) //fold inside range + rowCount -= end-start; + else + rowCount -= end-first+1; + } + } + return rowCount; + } + + this.$addFoldLine = function(foldLine) { + this.$foldData.push(foldLine); + this.$foldData.sort(function(a, b) { + return a.start.row - b.start.row; + }); + return foldLine; + } + + /** + * Adds a new fold. + * + * @returns + * The new created Fold object or an existing fold object in case the + * passed in range fits an existing fold exactly. + */ + this.addFold = function(placeholder, range) { + var foldData = this.$foldData; + var added = false; + + if (placeholder instanceof Fold) + var fold = placeholder; + else + fold = new Fold(range, placeholder); + + var startRow = fold.start.row; + var startColumn = fold.start.column; + var endRow = fold.end.row; + var endColumn = fold.end.column; + + // --- Some checking --- + if (fold.placeholder.length < 2) + throw "Placeholder has to be at least 2 characters"; + + if (startRow == endRow && endColumn - startColumn < 2) + throw "The range has to be at least 2 characters width"; + + var existingFold = this.getFoldAt(startRow, startColumn, 1); + if ( + existingFold + && existingFold.range.isEnd(endRow, endColumn) + && existingFold.range.isStart(startRow, startColumn) + ) { + return fold; + } + + existingFold = this.getFoldAt(startRow, startColumn, 1); + if (existingFold && !existingFold.range.isStart(startRow, startColumn)) + throw "A fold can't start inside of an already existing fold"; + + existingFold = this.getFoldAt(endRow, endColumn, -1); + if (existingFold && !existingFold.range.isEnd(endRow, endColumn)) + throw "A fold can't end inside of an already existing fold"; + + if (endRow >= this.doc.getLength()) + throw "End of fold is outside of the document."; + + if (endColumn > this.getLine(endRow).length || startColumn > this.getLine(startRow).length) + throw "End of fold is outside of the document."; + + // Check if there are folds in the range we create the new fold for. + var folds = this.getFoldsInRange(fold.range); + if (folds.length > 0) { + // Remove the folds from fold data. + this.removeFolds(folds); + // Add the removed folds as subfolds on the new fold. + fold.subFolds = folds; + } + + for (var i = 0; i < foldData.length; i++) { + var foldLine = foldData[i]; + if (endRow == foldLine.start.row) { + foldLine.addFold(fold); + added = true; + break; + } + else if (startRow == foldLine.end.row) { + foldLine.addFold(fold); + added = true; + if (!fold.sameRow) { + // Check if we might have to merge two FoldLines. + foldLineNext = foldData[i + 1]; + if (foldLineNext && foldLineNext.start.row == endRow) { + // We need to merge! + foldLine.merge(foldLineNext); + break; + } + } + break; + } + else if (endRow <= foldLine.start.row) { + break; + } + } + + if (!added) + foldLine = this.$addFoldLine(new FoldLine(this.$foldData, fold)); + + if (this.$useWrapMode) + this.$updateWrapData(foldLine.start.row, foldLine.start.row); + + // Notify that fold data has changed. + this.$modified = true; + this._dispatchEvent("changeFold", { data: fold }); + + return fold; + }; + + this.addFolds = function(folds) { + folds.forEach(function(fold) { + this.addFold(fold); + }, this); + }; + + this.removeFold = function(fold) { + var foldLine = fold.foldLine; + var startRow = foldLine.start.row; + var endRow = foldLine.end.row; + + var foldLines = this.$foldData, + folds = foldLine.folds; + // Simple case where there is only one fold in the FoldLine such that + // the entire fold line can get removed directly. + if (folds.length == 1) { + foldLines.splice(foldLines.indexOf(foldLine), 1); + } else + // If the fold is the last fold of the foldLine, just remove it. + if (foldLine.range.isEnd(fold.end.row, fold.end.column)) { + folds.pop(); + foldLine.end.row = folds[folds.length - 1].end.row; + foldLine.end.column = folds[folds.length - 1].end.column; + } else + // If the fold is the first fold of the foldLine, just remove it. + if (foldLine.range.isStart(fold.start.row, fold.start.column)) { + folds.shift(); + foldLine.start.row = folds[0].start.row; + foldLine.start.column = folds[0].start.column; + } else + // We know there are more then 2 folds and the fold is not at the edge. + // This means, the fold is somewhere in between. + // + // If the fold is in one row, we just can remove it. + if (fold.sameRow) { + folds.splice(folds.indexOf(fold), 1); + } else + // The fold goes over more then one row. This means remvoing this fold + // will cause the fold line to get splitted up. + { + var newFoldLine = foldLine.split(fold.start.row, fold.start.column); + newFoldLine.folds.shift(); + foldLine.start.row = folds[0].start.row; + foldLine.start.column = folds[0].start.column; + this.$addFoldLine(newFoldLine); + } + + if (this.$useWrapMode) { + this.$updateWrapData(startRow, endRow); + } + + // Notify that fold data has changed. + this.$modified = true; + this._dispatchEvent("changeFold", { data: fold }); + } + + this.removeFolds = function(folds) { + // We need to clone the folds array passed in as it might be the folds + // array of a fold line and as we call this.removeFold(fold), folds + // are removed from folds and changes the current index. + var cloneFolds = []; + for (var i = 0; i < folds.length; i++) { + cloneFolds.push(folds[i]); + } + + cloneFolds.forEach(function(fold) { + this.removeFold(fold); + }, this); + this.$modified = true; + } + + this.expandFold = function(fold) { + this.removeFold(fold); + fold.subFolds.forEach(function(fold) { + this.addFold(fold); + }, this); + fold.subFolds = []; + } + + this.expandFolds = function(folds) { + folds.forEach(function(fold) { + this.expandFold(fold); + }, this); + } + + /** + * Checks if a given documentRow is folded. This is true if there are some + * folded parts such that some parts of the line is still visible. + **/ + this.isRowFolded = function(docRow, startFoldRow) { + return !!this.getFoldLine(docRow, startFoldRow); + }; + + this.getRowFoldEnd = function(docRow, startFoldRow) { + var foldLine = this.getFoldLine(docRow, startFoldRow); + return (foldLine + ? foldLine.end.row + : docRow) + }; + + this.getFoldDisplayLine = function(foldLine, endRow, endColumn, startRow, startColumn) { + if (startRow == null) { + startRow = foldLine.start.row; + startColumn = 0; + } + + if (endRow == null) { + endRow = foldLine.end.row; + endColumn = this.getLine(endRow).length; + } + + // Build the textline using the FoldLine walker. + var line = ""; + var doc = this.doc; + var textLine = ""; + + foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { + if (row < startRow) { + return; + } else if (row == startRow) { + if (column < startColumn) { + return; + } + lastColumn = Math.max(startColumn, lastColumn); + } + if (placeholder) { + textLine += placeholder; + } else { + textLine += doc.getLine(row).substring(lastColumn, column); + } + }.bind(this), endRow, endColumn); + return textLine; + }; + + this.getDisplayLine = function(row, endColumn, startRow, startColumn) { + var foldLine = this.getFoldLine(row); + + if (!foldLine) { + var line; + line = this.doc.getLine(row); + return line.substring(startColumn || 0, endColumn || line.length); + } else { + return this.getFoldDisplayLine( + foldLine, row, endColumn, startRow, startColumn); + } + }; + + this.$cloneFoldData = function() { + var foldData = this.$foldData; + var fd = []; + fd = this.$foldData.map(function(foldLine) { + var folds = foldLine.folds.map(function(fold) { + return fold.clone(); + }); + return new FoldLine(fd, folds); + }); + + return fd; + }; +} + +exports.Folding = Folding; + +});/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/edit_session/fold_line', ['require', 'exports', 'module' , 'ace/range'], function(require, exports, module) { + +var Range = require("ace/range").Range; + +/** + * If the an array is passed in, the folds are expected to be sorted already. + */ +function FoldLine(foldData, folds) { + this.foldData = foldData; + if (Array.isArray(folds)) { + this.folds = folds; + } else { + folds = this.folds = [ folds ]; + } + + var last = folds[folds.length - 1] + this.range = new Range(folds[0].start.row, folds[0].start.column, + last.end.row, last.end.column); + this.start = this.range.start; + this.end = this.range.end; + + this.folds.forEach(function(fold) { + fold.setFoldLine(this); + }, this); +} + +(function() { + /** + * Note: This doesn't update wrapData! + */ + this.shiftRow = function(shift) { + this.start.row += shift; + this.end.row += shift; + this.folds.forEach(function(fold) { + fold.start.row += shift; + fold.end.row += shift; + }); + } + + this.addFold = function(fold) { + if (fold.sameRow) { + if (fold.start.row < this.startRow || fold.endRow > this.endRow) { + throw "Can't add a fold to this FoldLine as it has no connection"; + } + this.folds.push(fold); + this.folds.sort(function(a, b) { + return -a.range.compareEnd(b.start.row, b.start.column); + }); + if (this.range.compareEnd(fold.start.row, fold.start.column) > 0) { + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } else if (this.range.compareStart(fold.end.row, fold.end.column) < 0) { + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } + } else if (fold.start.row == this.end.row) { + this.folds.push(fold); + this.end.row = fold.end.row; + this.end.column = fold.end.column; + } else if (fold.end.row == this.start.row) { + this.folds.unshift(fold); + this.start.row = fold.start.row; + this.start.column = fold.start.column; + } else { + throw "Trying to add fold to FoldRow that doesn't have a matching row"; + } + fold.foldLine = this; + } + + this.containsRow = function(row) { + return row >= this.start.row && row <= this.end.row; + } + + this.walk = function(callback, endRow, endColumn) { + var lastEnd = 0, + folds = this.folds, + fold, + comp, stop, isNewRow = true; + + if (endRow == null) { + endRow = this.end.row; + endColumn = this.end.column; + } + + for (var i = 0; i < folds.length; i++) { + fold = folds[i]; + + comp = fold.range.compareStart(endRow, endColumn); + // This fold is after the endRow/Column. + if (comp == -1) { + callback(null, endRow, endColumn, lastEnd, isNewRow); + return; + } + + stop = callback(null, fold.start.row, fold.start.column, lastEnd, isNewRow); + stop = !stop && callback(fold.placeholder, fold.start.row, fold.start.column, lastEnd); + + // If the user requested to stop the walk or endRow/endColumn is + // inside of this fold (comp == 0), then end here. + if (stop || comp == 0) { + return; + } + + // Note the new lastEnd might not be on the same line. However, + // it's the callback's job to recognize this. + isNewRow = !fold.sameRow; + lastEnd = fold.end.column; + } + callback(null, endRow, endColumn, lastEnd, isNewRow); + } + + this.getNextFoldTo = function(row, column) { + var fold, cmp; + for (var i = 0; i < this.folds.length; i++) { + fold = this.folds[i]; + cmp = fold.range.compareEnd(row, column); + if (cmp == -1) { + return { + fold: fold, + kind: "after" + }; + } else if (cmp == 0) { + return { + fold: fold, + kind: "inside" + } + } + } + return null; + } + + this.addRemoveChars = function(row, column, len) { + var ret = this.getNextFoldTo(row, column), + fold, folds; + if (ret) { + fold = ret.fold; + if (ret.kind == "inside" + && fold.start.column != column + && fold.start.row != row) + { + throw "Moving characters inside of a fold should never be reached"; + } else if (fold.start.row == row) { + folds = this.folds; + var i = folds.indexOf(fold); + if (i == 0) { + this.start.column += len; + } + for (i; i < folds.length; i++) { + fold = folds[i]; + fold.start.column += len; + if (!fold.sameRow) { + return; + } + fold.end.column += len; + } + this.end.column += len; + } + } + } + + this.split = function(row, column) { + var fold = this.getNextFoldTo(row, column).fold, + folds = this.folds; + var foldData = this.foldData; + + if (!fold) { + return null; + } + var i = folds.indexOf(fold); + var foldBefore = folds[i - 1]; + this.end.row = foldBefore.end.row; + this.end.column = foldBefore.end.column; + + // Remove the folds after row/column and create a new FoldLine + // containing these removed folds. + folds = folds.splice(i, folds.length - i); + + var newFoldLine = new FoldLine(foldData, folds); + foldData.splice(foldData.indexOf(this) + 1, 0, newFoldLine); + return newFoldLine; + } + + this.merge = function(foldLineNext) { + var folds = foldLineNext.folds; + for (var i = 0; i < folds.length; i++) { + this.addFold(folds[i]); + } + // Remove the foldLineNext - no longer needed, as + // it's merged now with foldLineNext. + var foldData = this.foldData; + foldData.splice(foldData.indexOf(foldLineNext), 1); + } + + this.toString = function() { + var ret = [this.range.toString() + ": [" ]; + + this.folds.forEach(function(fold) { + ret.push(" " + fold.toString()); + }); + ret.push("]") + return ret.join("\n"); + } + + this.idxToPosition = function(idx) { + var lastFoldEndColumn = 0; + var fold; + + for (var i = 0; i < this.folds.length; i++) { + var fold = this.folds[i]; + + idx -= fold.start.column - lastFoldEndColumn; + if (idx < 0) { + return { + row: fold.start.row, + column: fold.start.column + idx + }; + } + + idx -= fold.placeholder.length; + if (idx < 0) { + return fold.start; + } + + lastFoldEndColumn = fold.end.column; + } + + return { + row: this.end.row, + column: this.end.column + idx + }; + } +}).call(FoldLine.prototype); + +exports.FoldLine = FoldLine; +});/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/edit_session/fold', ['require', 'exports', 'module' ], function(require, exports, module) { + +/** + * Simple fold-data struct. + **/ +var Fold = exports.Fold = function(range, placeholder) { + this.foldLine = null; + this.placeholder = placeholder; + this.range = range; + this.start = range.start; + this.end = range.end; + + this.sameRow = range.start.row == range.end.row; + this.subFolds = []; +}; + +(function() { + + this.toString = function() { + return '"' + this.placeholder + '" ' + this.range.toString(); + }; + + this.setFoldLine = function(foldLine) { + this.foldLine = foldLine; + this.subFolds.forEach(function(fold) { + fold.setFoldLine(foldLine); + }); + }; + + this.clone = function() { + var range = this.range.clone(); + var fold = new Fold(range, this.placeholder); + this.subFolds.forEach(function(subFold) { + fold.subFolds.push(subFold.clone()); + }); + return fold; + }; + +}).call(Fold.prototype); + +});/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/search', ['require', 'exports', 'module' , 'pilot/lang', 'pilot/oop', 'ace/range'], function(require, exports, module) { + +var lang = require("pilot/lang"); +var oop = require("pilot/oop"); +var Range = require("ace/range").Range; + +var Search = function() { + this.$options = { + needle: "", + backwards: false, + wrap: false, + caseSensitive: false, + wholeWord: false, + scope: Search.ALL, + regExp: false + }; +}; + +Search.ALL = 1; +Search.SELECTION = 2; + +(function() { + + this.set = function(options) { + oop.mixin(this.$options, options); + return this; + }; + + this.getOptions = function() { + return lang.copyObject(this.$options); + }; + + this.find = function(session) { + if (!this.$options.needle) + return null; + + if (this.$options.backwards) { + var iterator = this.$backwardMatchIterator(session); + } else { + iterator = this.$forwardMatchIterator(session); + } + + var firstRange = null; + iterator.forEach(function(range) { + firstRange = range; + return true; + }); + + return firstRange; + }; + + this.findAll = function(session) { + if (!this.$options.needle) + return []; + + if (this.$options.backwards) { + var iterator = this.$backwardMatchIterator(session); + } else { + iterator = this.$forwardMatchIterator(session); + } + + var ranges = []; + iterator.forEach(function(range) { + ranges.push(range); + }); + + return ranges; + }; + + this.replace = function(input, replacement) { + var re = this.$assembleRegExp(); + var match = re.exec(input); + if (match && match[0].length == input.length) { + if (this.$options.regExp) { + return input.replace(re, replacement); + } else { + return replacement; + } + } else { + return null; + } + }; + + this.$forwardMatchIterator = function(session) { + var re = this.$assembleRegExp(); + var self = this; + + return { + forEach: function(callback) { + self.$forwardLineIterator(session).forEach(function(line, startIndex, row) { + if (startIndex) { + line = line.substring(startIndex); + } + + var matches = []; + + line.replace(re, function(str) { + var offset = arguments[arguments.length-2]; + matches.push({ + str: str, + offset: startIndex + offset + }); + return str; + }); + + for (var i=0; i= 0; i--) { + var match = matches[i]; + var range = self.$rangeFromMatch(row, match.offset, match.str.length); + if (callback(range)) + return true; + } + }); + } + }; + }; + + this.$rangeFromMatch = function(row, column, length) { + return new Range(row, column, row, column+length); + }; + + this.$assembleRegExp = function() { + if (this.$options.regExp) { + var needle = this.$options.needle; + } else { + needle = lang.escapeRegExp(this.$options.needle); + } + + if (this.$options.wholeWord) { + needle = "\\b" + needle + "\\b"; + } + + var modifier = "g"; + if (!this.$options.caseSensitive) { + modifier += "i"; + } + + var re = new RegExp(needle, modifier); + return re; + }; + + this.$forwardLineIterator = function(session) { + var searchSelection = this.$options.scope == Search.SELECTION; + + var range = session.getSelection().getRange(); + var start = session.getSelection().getCursor(); + + var firstRow = searchSelection ? range.start.row : 0; + var firstColumn = searchSelection ? range.start.column : 0; + var lastRow = searchSelection ? range.end.row : session.getLength() - 1; + + var wrap = this.$options.wrap; + var inWrap = false; + + function getLine(row) { + var line = session.getLine(row); + if (searchSelection && row == range.end.row) { + line = line.substring(0, range.end.column); + } + if (inWrap && row == start.row) { + line = line.substring(0, start.column); + } + return line; + } + + return { + forEach: function(callback) { + var row = start.row; + + var line = getLine(row); + var startIndex = start.column; + + var stop = false; + inWrap = false; + + while (!callback(line, startIndex, row)) { + + if (stop) { + return; + } + + row++; + startIndex = 0; + + if (row > lastRow) { + if (wrap) { + row = firstRow; + startIndex = firstColumn; + inWrap = true; + } else { + return; + } + } + + if (row == start.row) + stop = true; + + line = getLine(row); + } + } + }; + }; + + this.$backwardLineIterator = function(session) { + var searchSelection = this.$options.scope == Search.SELECTION; + + var range = session.getSelection().getRange(); + var start = searchSelection ? range.end : range.start; + + var firstRow = searchSelection ? range.start.row : 0; + var firstColumn = searchSelection ? range.start.column : 0; + var lastRow = searchSelection ? range.end.row : session.getLength() - 1; + + var wrap = this.$options.wrap; + + return { + forEach : function(callback) { + var row = start.row; + + var line = session.getLine(row).substring(0, start.column); + var startIndex = 0; + var stop = false; + var inWrap = false; + + while (!callback(line, startIndex, row)) { + + if (stop) + return; + + row--; + startIndex = 0; + + if (row < firstRow) { + if (wrap) { + row = lastRow; + inWrap = true; + } else { + return; + } + } + + if (row == start.row) + stop = true; + + line = session.getLine(row); + if (searchSelection) { + if (row == firstRow) + startIndex = firstColumn; + else if (row == lastRow) + line = line.substring(0, range.end.column); + } + + if (inWrap && row == start.row) + startIndex = start.column; + } + } + }; + }; + +}).call(Search.prototype); + +exports.Search = Search; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/undomanager', ['require', 'exports', 'module' ], function(require, exports, module) { + +var UndoManager = function() { + this.reset(); +}; + +(function() { + + this.execute = function(options) { + var deltas = options.args[0]; + this.$doc = options.args[1]; + this.$undoStack.push(deltas); + this.$redoStack = []; + }; + + this.undo = function(dontSelect) { + var deltas = this.$undoStack.pop(); + var undoSelectionRange = null; + if (deltas) { + undoSelectionRange = + this.$doc.undoChanges(deltas, dontSelect); + this.$redoStack.push(deltas); + } + return undoSelectionRange; + }; + + this.redo = function(dontSelect) { + var deltas = this.$redoStack.pop(); + var redoSelectionRange = null; + if (deltas) { + redoSelectionRange = + this.$doc.redoChanges(deltas, dontSelect); + this.$undoStack.push(deltas); + } + return redoSelectionRange; + }; + + this.reset = function() { + this.$undoStack = []; + this.$redoStack = []; + }; + + this.hasUndo = function() { + return this.$undoStack.length > 0; + }; + + this.hasRedo = function() { + return this.$redoStack.length > 0; + }; + +}).call(UndoManager.prototype); + +exports.UndoManager = UndoManager; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Irakli Gozalishvili (http://jeditoolkit.com) + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/virtual_renderer', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/dom', 'pilot/event', 'pilot/useragent', 'ace/layer/gutter', 'ace/layer/marker', 'ace/layer/text', 'ace/layer/cursor', 'ace/scrollbar', 'ace/renderloop', 'pilot/event_emitter', 'text/ace/css/editor.css'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var dom = require("pilot/dom"); +var event = require("pilot/event"); +var useragent = require("pilot/useragent"); +var GutterLayer = require("ace/layer/gutter").Gutter; +var MarkerLayer = require("ace/layer/marker").Marker; +var TextLayer = require("ace/layer/text").Text; +var CursorLayer = require("ace/layer/cursor").Cursor; +var ScrollBar = require("ace/scrollbar").ScrollBar; +var RenderLoop = require("ace/renderloop").RenderLoop; +var EventEmitter = require("pilot/event_emitter").EventEmitter; +var editorCss = require("text/ace/css/editor.css"); + +// import CSS once +dom.importCssString(editorCss); + +var VirtualRenderer = function(container, theme) { + this.container = container; + dom.addCssClass(this.container, "ace_editor"); + + this.setTheme(theme); + + this.$gutter = dom.createElement("div"); + this.$gutter.className = "ace_gutter"; + this.container.appendChild(this.$gutter); + + this.scroller = dom.createElement("div"); + this.scroller.className = "ace_scroller"; + this.container.appendChild(this.scroller); + + this.content = dom.createElement("div"); + this.content.className = "ace_content"; + this.scroller.appendChild(this.content); + + this.$gutterLayer = new GutterLayer(this.$gutter); + this.$markerBack = new MarkerLayer(this.content); + + var textLayer = this.$textLayer = new TextLayer(this.content); + this.canvas = textLayer.element; + + this.$markerFront = new MarkerLayer(this.content); + + this.characterWidth = textLayer.getCharacterWidth(); + this.lineHeight = textLayer.getLineHeight(); + + this.$cursorLayer = new CursorLayer(this.content); + this.$cursorPadding = 8; + + // Indicates whether the horizontal scrollbar is visible + this.$horizScroll = true; + this.$horizScrollAlwaysVisible = true; + + this.scrollBar = new ScrollBar(container); + this.scrollBar.addEventListener("scroll", this.onScroll.bind(this)); + + this.scrollTop = 0; + + this.cursorPos = { + row : 0, + column : 0 + }; + + var _self = this; + this.$textLayer.addEventListener("changeCharaterSize", function() { + _self.characterWidth = textLayer.getCharacterWidth(); + _self.lineHeight = textLayer.getLineHeight(); + _self.$updatePrintMargin(); + _self.onResize(true); + + _self.$loop.schedule(_self.CHANGE_FULL); + }); + event.addListener(this.$gutter, "click", this.$onGutterClick.bind(this)); + event.addListener(this.$gutter, "dblclick", this.$onGutterClick.bind(this)); + + this.$size = { + width: 0, + height: 0, + scrollerHeight: 0, + scrollerWidth: 0 + }; + + this.layerConfig = { + width : 1, + padding : 0, + firstRow : 0, + firstRowScreen: 0, + lastRow : 0, + lineHeight : 1, + characterWidth : 1, + minHeight : 1, + maxHeight : 1, + offset : 0, + height : 1 + }; + + this.$loop = new RenderLoop(this.$renderChanges.bind(this)); + this.$loop.schedule(this.CHANGE_FULL); + + this.setPadding(4); + this.$updatePrintMargin(); +}; + +(function() { + this.showGutter = true; + + this.CHANGE_CURSOR = 1; + this.CHANGE_MARKER = 2; + this.CHANGE_GUTTER = 4; + this.CHANGE_SCROLL = 8; + this.CHANGE_LINES = 16; + this.CHANGE_TEXT = 32; + this.CHANGE_SIZE = 64; + this.CHANGE_MARKER_BACK = 128; + this.CHANGE_MARKER_FRONT = 256; + this.CHANGE_FULL = 512; + + oop.implement(this, EventEmitter); + + this.setSession = function(session) { + this.session = session; + this.$cursorLayer.setSession(session); + this.$markerBack.setSession(session); + this.$markerFront.setSession(session); + this.$gutterLayer.setSession(session); + this.$textLayer.setSession(session); + this.$loop.schedule(this.CHANGE_FULL); + }; + + /** + * Triggers partial update of the text layer + */ + this.updateLines = function(firstRow, lastRow) { + if (lastRow === undefined) + lastRow = Infinity; + + if (!this.$changedLines) { + this.$changedLines = { + firstRow: firstRow, + lastRow: lastRow + }; + } + else { + if (this.$changedLines.firstRow > firstRow) + this.$changedLines.firstRow = firstRow; + + if (this.$changedLines.lastRow < lastRow) + this.$changedLines.lastRow = lastRow; + } + + this.$loop.schedule(this.CHANGE_LINES); + }; + + /** + * Triggers full update of the text layer + */ + this.updateText = function() { + this.$loop.schedule(this.CHANGE_TEXT); + }; + + /** + * Triggers a full update of all layers + */ + this.updateFull = function() { + this.$loop.schedule(this.CHANGE_FULL); + }; + + this.updateFontSize = function() { + this.$textLayer.checkForSizeChanges(); + }; + + /** + * Triggers resize of the editor + */ + this.onResize = function(force) { + var changes = this.CHANGE_SIZE; + var size = this.$size; + + var height = dom.getInnerHeight(this.container); + if (force || size.height != height) { + size.height = height; + + this.scroller.style.height = height + "px"; + size.scrollerHeight = this.scroller.clientHeight; + this.scrollBar.setHeight(size.scrollerHeight); + + if (this.session) { + this.scrollToY(this.getScrollTop()); + changes = changes | this.CHANGE_FULL; + } + } + + var width = dom.getInnerWidth(this.container); + if (force || size.width != width) { + size.width = width; + + var gutterWidth = this.showGutter ? this.$gutter.offsetWidth : 0; + this.scroller.style.left = gutterWidth + "px"; + size.scrollerWidth = Math.max(0, width - gutterWidth - this.scrollBar.getWidth()) + this.scroller.style.width = size.scrollerWidth + "px"; + + if (this.session.getUseWrapMode() && this.adjustWrapLimit() || force) + changes = changes | this.CHANGE_FULL; + } + + this.$loop.schedule(changes); + }; + + this.adjustWrapLimit = function(){ + var availableWidth = this.$size.scrollerWidth - this.$padding * 2; + var limit = Math.floor(availableWidth / this.characterWidth) - 1; + return this.session.adjustWrapLimit(limit); + }; + + this.$onGutterClick = function(e) { + var pageX = event.getDocumentX(e); + var pageY = event.getDocumentY(e); + + this._dispatchEvent("gutter" + e.type, { + row: this.screenToTextCoordinates(pageX, pageY).row, + htmlEvent: e + }); + }; + + this.setShowInvisibles = function(showInvisibles) { + if (this.$textLayer.setShowInvisibles(showInvisibles)) + this.$loop.schedule(this.CHANGE_TEXT); + }; + + this.getShowInvisibles = function() { + return this.$textLayer.showInvisibles; + }; + + this.$showPrintMargin = true; + this.setShowPrintMargin = function(showPrintMargin) { + this.$showPrintMargin = showPrintMargin; + this.$updatePrintMargin(); + }; + + this.getShowPrintMargin = function() { + return this.$showPrintMargin; + }; + + this.$printMarginColumn = 80; + this.setPrintMarginColumn = function(showPrintMargin) { + this.$printMarginColumn = showPrintMargin; + this.$updatePrintMargin(); + }; + + this.getPrintMarginColumn = function() { + return this.$printMarginColumn; + }; + + this.getShowGutter = function(){ + return this.showGutter; + }; + + this.setShowGutter = function(show){ + if(this.showGutter === show) + return; + this.$gutter.style.display = show ? "block" : "none"; + this.showGutter = show; + this.onResize(true); + }; + + this.$updatePrintMargin = function() { + var containerEl; + + if (!this.$showPrintMargin && !this.$printMarginEl) + return; + + if (!this.$printMarginEl) { + containerEl = dom.createElement("div"); + containerEl.className = "ace_print_margin_layer"; + this.$printMarginEl = dom.createElement("div"); + this.$printMarginEl.className = "ace_print_margin"; + containerEl.appendChild(this.$printMarginEl); + this.content.insertBefore(containerEl, this.$textLayer.element); + } + + var style = this.$printMarginEl.style; + style.left = ((this.characterWidth * this.$printMarginColumn) + this.$padding * 2) + "px"; + style.visibility = this.$showPrintMargin ? "visible" : "hidden"; + }; + + this.getContainerElement = function() { + return this.container; + }; + + this.getMouseEventTarget = function() { + return this.content; + }; + + this.getTextAreaContainer = function() { + return this.container; + }; + + this.moveTextAreaToCursor = function(textarea) { + // in IE the native cursor always shines through + if (useragent.isIE) + return; + + var pos = this.$cursorLayer.getPixelPosition(); + if (!pos) + return; + + var bounds = this.content.getBoundingClientRect(); + var offset = this.layerConfig.offset; + + textarea.style.left = (bounds.left + pos.left + this.$padding) + "px"; + textarea.style.top = (bounds.top + pos.top - this.scrollTop + offset) + "px"; + }; + + this.getFirstVisibleRow = function() { + return this.layerConfig.firstRow; + }; + + this.getFirstFullyVisibleRow = function() { + return this.layerConfig.firstRow + (this.layerConfig.offset === 0 ? 0 : 1); + }; + + this.getLastFullyVisibleRow = function() { + var flint = Math.floor((this.layerConfig.height + this.layerConfig.offset) / this.layerConfig.lineHeight); + return this.layerConfig.firstRow - 1 + flint; + }; + + this.getLastVisibleRow = function() { + return this.layerConfig.lastRow; + }; + + this.$padding = null; + this.setPadding = function(padding) { + this.$padding = padding; + this.$textLayer.setPadding(padding); + this.$cursorLayer.setPadding(padding); + this.$markerFront.setPadding(padding); + this.$markerBack.setPadding(padding); + this.$loop.schedule(this.CHANGE_FULL); + this.$updatePrintMargin(); + }; + + this.getHScrollBarAlwaysVisible = function() { + return this.$horizScrollAlwaysVisible; + }; + + this.setHScrollBarAlwaysVisible = function(alwaysVisible) { + if (this.$horizScrollAlwaysVisible != alwaysVisible) { + this.$horizScrollAlwaysVisible = alwaysVisible; + if (!this.$horizScrollAlwaysVisible || !this.$horizScroll) + this.$loop.schedule(this.CHANGE_SCROLL); + } + }; + + this.onScroll = function(e) { + this.scrollToY(e.data); + }; + + this.$updateScrollBar = function() { + this.scrollBar.setInnerHeight(this.layerConfig.maxHeight); + this.scrollBar.setScrollTop(this.scrollTop); + }; + + this.$renderChanges = function(changes) { + if (!changes || !this.session) + return; + + // text, scrolling and resize changes can cause the view port size to change + if (changes & this.CHANGE_FULL || + changes & this.CHANGE_SIZE || + changes & this.CHANGE_TEXT || + changes & this.CHANGE_LINES || + changes & this.CHANGE_SCROLL + ) + this.$computeLayerConfig(); + + // full + if (changes & this.CHANGE_FULL) { + this.$textLayer.update(this.layerConfig); + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + this.$markerBack.update(this.layerConfig); + this.$markerFront.update(this.layerConfig); + this.$cursorLayer.update(this.layerConfig); + this.$updateScrollBar(); + return; + } + + // scrolling + if (changes & this.CHANGE_SCROLL) { + if (changes & this.CHANGE_TEXT || changes & this.CHANGE_LINES) + this.$textLayer.update(this.layerConfig); + else + this.$textLayer.scrollLines(this.layerConfig); + + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + this.$markerBack.update(this.layerConfig); + this.$markerFront.update(this.layerConfig); + this.$cursorLayer.update(this.layerConfig); + this.$updateScrollBar(); + return; + } + + if (changes & this.CHANGE_TEXT) { + this.$textLayer.update(this.layerConfig); + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + } + else if (changes & this.CHANGE_LINES) { + this.$updateLines(); + this.$updateScrollBar(); + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + } else if (changes & this.CHANGE_GUTTER) { + if (this.showGutter) + this.$gutterLayer.update(this.layerConfig); + } + + if (changes & this.CHANGE_CURSOR) + this.$cursorLayer.update(this.layerConfig); + + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_FRONT)) { + this.$markerFront.update(this.layerConfig); + } + + if (changes & (this.CHANGE_MARKER | this.CHANGE_MARKER_BACK)) { + this.$markerBack.update(this.layerConfig); + } + + if (changes & this.CHANGE_SIZE) + this.$updateScrollBar(); + }; + + this.$computeLayerConfig = function() { + var session = this.session; + + var offset = this.scrollTop % this.lineHeight; + var minHeight = this.$size.scrollerHeight + this.lineHeight; + + var longestLine = this.$getLongestLine(); + var widthChanged = this.layerConfig.width != longestLine; + + var horizScroll = this.$horizScrollAlwaysVisible || this.$size.scrollerWidth - longestLine < 0; + var horizScrollChanged = this.$horizScroll !== horizScroll; + this.$horizScroll = horizScroll; + if (horizScrollChanged) + this.scroller.style.overflowX = horizScroll ? "scroll" : "hidden"; + + var maxHeight = this.session.getScreenLength() * this.lineHeight; + this.scrollTop = Math.max(0, Math.min(this.scrollTop, maxHeight - this.$size.scrollerHeight)); + + var lineCount = Math.ceil(minHeight / this.lineHeight) - 1; + var firstRow = Math.max(0, Math.round((this.scrollTop - offset) / this.lineHeight)); + var lastRow = firstRow + lineCount; + + // Map lines on the screen to lines in the document. + var firstRowScreen, firstRowHeight; + var lineHeight = { lineHeight: this.lineHeight }; + firstRow = session.screenToDocumentRow(firstRow, 0); + + // Check if firstRow is inside of a foldLine. If true, then use the first + // row of the foldLine. + var foldLine = session.getFoldLine(firstRow); + if (foldLine) { + firstRow = foldLine.start.row; + } + + firstRowScreen = session.documentToScreenRow(firstRow, 0); + firstRowHeight = session.getRowHeight(lineHeight, firstRow); + + lastRow = Math.min(session.screenToDocumentRow(lastRow, 0), session.getLength() - 1); + minHeight = this.$size.scrollerHeight + session.getRowHeight(lineHeight, lastRow)+ + firstRowHeight; + + offset = this.scrollTop - firstRowScreen * this.lineHeight; + + this.layerConfig = { + width : longestLine, + padding : this.$padding, + firstRow : firstRow, + firstRowScreen: firstRowScreen, + lastRow : lastRow, + lineHeight : this.lineHeight, + characterWidth : this.characterWidth, + minHeight : minHeight, + maxHeight : maxHeight, + offset : offset, + height : this.$size.scrollerHeight + }; + + // For debugging. + // console.log(JSON.stringify(this.layerConfig)); + + this.$gutterLayer.element.style.marginTop = (-offset) + "px"; + this.content.style.marginTop = (-offset) + "px"; + this.content.style.width = longestLine + "px"; + this.content.style.height = minHeight + "px"; + + // scroller.scrollWidth was smaller than scrollLeft we needed + if (this.$desiredScrollLeft) { + this.scrollToX(this.$desiredScrollLeft); + this.$desiredScrollLeft = 0; + } + + // Horizontal scrollbar visibility may have changed, which changes + // the client height of the scroller + if (horizScrollChanged) + this.onResize(true); + }; + + this.$updateLines = function() { + var firstRow = this.$changedLines.firstRow; + var lastRow = this.$changedLines.lastRow; + this.$changedLines = null; + + var layerConfig = this.layerConfig; + + // if the update changes the width of the document do a full redraw + if (layerConfig.width != this.$getLongestLine()) + return this.$textLayer.update(layerConfig); + + if (firstRow > layerConfig.lastRow + 1) { return; } + if (lastRow < layerConfig.firstRow) { return; } + + // if the last row is unknown -> redraw everything + if (lastRow === Infinity) { + if (this.showGutter) + this.$gutterLayer.update(layerConfig); + this.$textLayer.update(layerConfig); + return; + } + + // else update only the changed rows + this.$textLayer.updateLines(layerConfig, firstRow, lastRow); + }; + + this.$getLongestLine = function() { + var charCount = this.session.getScreenWidth() + 1; + if (this.$textLayer.showInvisibles) + charCount += 1; + + return Math.max(this.$size.scrollerWidth, Math.round(charCount * this.characterWidth)); + }; + + this.updateFrontMarkers = function() { + this.$markerFront.setMarkers(this.session.getMarkers(true)); + this.$loop.schedule(this.CHANGE_MARKER_FRONT); + }; + + this.updateBackMarkers = function() { + this.$markerBack.setMarkers(this.session.getMarkers()); + this.$loop.schedule(this.CHANGE_MARKER_BACK); + }; + + this.addGutterDecoration = function(row, className){ + this.$gutterLayer.addGutterDecoration(row, className); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + + this.removeGutterDecoration = function(row, className){ + this.$gutterLayer.removeGutterDecoration(row, className); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + + this.setBreakpoints = function(rows) { + this.$gutterLayer.setBreakpoints(rows); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + + this.setAnnotations = function(annotations) { + this.$gutterLayer.setAnnotations(annotations); + this.$loop.schedule(this.CHANGE_GUTTER); + }; + + this.updateCursor = function() { + this.$loop.schedule(this.CHANGE_CURSOR); + }; + + this.hideCursor = function() { + this.$cursorLayer.hideCursor(); + }; + + this.showCursor = function() { + this.$cursorLayer.showCursor(); + }; + + this.scrollCursorIntoView = function() { + // the editor is not visible + if (this.$size.scrollerHeight === 0) + return; + + var pos = this.$cursorLayer.getPixelPosition(); + + var left = pos.left + this.$padding; + var top = pos.top; + + if (this.scrollTop > top) { + this.scrollToY(top); + } + + if (this.scrollTop + this.$size.scrollerHeight < top + this.lineHeight) { + this.scrollToY(top + this.lineHeight - this.$size.scrollerHeight); + } + + var scrollLeft = this.scroller.scrollLeft; + + if (scrollLeft > left) { + this.scrollToX(left); + } + + if (scrollLeft + this.$size.scrollerWidth < left + this.characterWidth) { + if (left > this.layerConfig.width) + this.$desiredScrollLeft = left + 2 * this.characterWidth; + else + this.scrollToX(Math.round(left + this.characterWidth - this.$size.scrollerWidth)); + } + }; + + this.getScrollTop = function() { + return this.scrollTop; + }; + + this.getScrollLeft = function() { + return this.scroller.scrollLeft; + }; + + this.getScrollTopRow = function() { + return this.scrollTop / this.lineHeight; + }; + + this.getScrollBottomRow = function() { + return Math.max(0, Math.floor((this.scrollTop + this.$size.scrollerHeight) / this.lineHeight) - 1); + }; + + this.scrollToRow = function(row) { + this.scrollToY(row * this.lineHeight); + }; + + this.scrollToLine = function(line, center) { + var lineHeight = { lineHeight: this.lineHeight }; + var offset = 0; + for (var l = 1; l < line; l++) { + offset += this.session.getRowHeight(lineHeight, l-1); + } + + if (center) { + offset -= this.$size.scrollerHeight / 2; + } + this.scrollToY(offset); + }; + + this.scrollToY = function(scrollTop) { + // after calling scrollBar.setScrollTop + // scrollbar sends us event with same scrollTop. ignore it + scrollTop = Math.max(0, scrollTop); + if (this.scrollTop !== scrollTop) { + this.$loop.schedule(this.CHANGE_SCROLL); + this.scrollTop = scrollTop; + } + }; + + this.scrollToX = function(scrollLeft) { + if (scrollLeft <= this.$padding) + scrollLeft = 0; + + this.scroller.scrollLeft = scrollLeft; + }; + + this.scrollBy = function(deltaX, deltaY) { + deltaY && this.scrollToY(this.scrollTop + deltaY); + deltaX && this.scrollToX(this.scroller.scrollLeft + deltaX); + }; + + this.screenToTextCoordinates = function(pageX, pageY) { + var canvasPos = this.scroller.getBoundingClientRect(); + + var col = Math.round((pageX + this.scroller.scrollLeft - canvasPos.left - this.$padding - dom.getPageScrollLeft()) + / this.characterWidth); + var row = Math.floor((pageY + this.scrollTop - canvasPos.top - dom.getPageScrollTop()) + / this.lineHeight); + + return this.session.screenToDocumentPosition(row, Math.max(col, 0)); + }; + + this.textToScreenCoordinates = function(row, column) { + var canvasPos = this.scroller.getBoundingClientRect(); + var pos = this.session.documentToScreenPosition(row, column); + + var x = this.$padding + Math.round(pos.column * this.characterWidth); + var y = pos.row * this.lineHeight; + + return { + pageX: canvasPos.left + x - this.getScrollLeft(), + pageY: canvasPos.top + y - this.getScrollTop() + }; + }; + + this.visualizeFocus = function() { + dom.addCssClass(this.container, "ace_focus"); + }; + + this.visualizeBlur = function() { + dom.removeCssClass(this.container, "ace_focus"); + }; + + this.showComposition = function(position) { + if (!this.$composition) { + this.$composition = dom.createElement("div"); + this.$composition.className = "ace_composition"; + this.content.appendChild(this.$composition); + } + + this.$composition.innerHTML = " "; + + var pos = this.$cursorLayer.getPixelPosition(); + var style = this.$composition.style; + style.top = pos.top + "px"; + style.left = (pos.left + this.$padding) + "px"; + style.height = this.lineHeight + "px"; + + this.hideCursor(); + }; + + this.setCompositionText = function(text) { + dom.setInnerText(this.$composition, text); + }; + + this.hideComposition = function() { + this.showCursor(); + + if (!this.$composition) + return; + + var style = this.$composition.style; + style.top = "-10000px"; + style.left = "-10000px"; + }; + + this.setTheme = function(theme) { + var _self = this; + + this.$themeValue = theme; + if (!theme || typeof theme == "string") { + theme = theme || "ace/theme/textmate"; + require([theme], function(theme) { + afterLoad(theme); + }); + } else { + afterLoad(theme); + } + + function afterLoad(theme) { + if (_self.$theme) + dom.removeCssClass(_self.container, _self.$theme); + + _self.$theme = theme ? theme.cssClass : null; + + if (_self.$theme) + dom.addCssClass(_self.container, _self.$theme); + + // force re-measure of the gutter width + if (_self.$size) { + _self.$size.width = 0; + _self.onResize(); + } + } + }; + + this.getTheme = function() { + return this.$themeValue; + }; + + // Methods allows to add / remove CSS classnames to the editor element. + // This feature can be used by plug-ins to provide a visual indication of + // a certain mode that editor is in. + + this.setStyle = function setStyle(style) { + dom.addCssClass(this.container, style); + }; + + this.unsetStyle = function unsetStyle(style) { + dom.removeCssClass(this.container, style); + }; + + this.destroy = function() { + this.$textLayer.destroy(); + this.$cursorLayer.destroy(); + }; + +}).call(VirtualRenderer.prototype); + +exports.VirtualRenderer = VirtualRenderer; +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/layer/gutter', ['require', 'exports', 'module' , 'pilot/dom'], function(require, exports, module) { + +var dom = require("pilot/dom"); + +var Gutter = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_gutter-layer"; + parentEl.appendChild(this.element); + + this.$breakpoints = []; + this.$annotations = []; + this.$decorations = []; +}; + +(function() { + + this.setSession = function(session) { + this.session = session; + }; + + this.addGutterDecoration = function(row, className){ + if (!this.$decorations[row]) + this.$decorations[row] = ""; + this.$decorations[row] += " ace_" + className; + } + + this.removeGutterDecoration = function(row, className){ + this.$decorations[row] = this.$decorations[row].replace(" ace_" + className, ""); + }; + + this.setBreakpoints = function(rows) { + this.$breakpoints = rows.concat(); + }; + + this.setAnnotations = function(annotations) { + // iterate over sparse array + this.$annotations = []; + for (var row in annotations) if (annotations.hasOwnProperty(row)) { + var rowAnnotations = annotations[row]; + if (!rowAnnotations) + continue; + + var rowInfo = this.$annotations[row] = { + text: [] + }; + for (var i=0; i foldStart) { + i = fold.end.row + 1; + fold = this.session.getNextFold(i); + foldStart = fold ?fold.start.row :Infinity; + } + if(i > lastRow) + break; + + var annotation = this.$annotations[i] || emptyAnno; + html.push("
        ", (i+1)); + + var wrappedRowLength = this.session.getRowLength(i) - 1; + while (wrappedRowLength--) { + html.push("
        ¦
        "); + } + + html.push(""); + + i++; + } + this.element = dom.setInnerHtml(this.element, html.join("")); + this.element.style.height = config.minHeight + "px"; + }; + +}).call(Gutter.prototype); + +exports.Gutter = Gutter; + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/layer/marker', ['require', 'exports', 'module' , 'ace/range', 'pilot/dom'], function(require, exports, module) { + +var Range = require("ace/range").Range; +var dom = require("pilot/dom"); + +var Marker = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_marker-layer"; + parentEl.appendChild(this.element); +}; + +(function() { + + this.$padding = 0; + + this.setPadding = function(padding) { + this.$padding = padding; + }; + this.setSession = function(session) { + this.session = session; + }; + + this.setMarkers = function(markers) { + this.markers = markers; + }; + + this.update = function(config) { + var config = config || this.config; + if (!config) + return; + + this.config = config; + + + var html = []; + for ( var key in this.markers) { + var marker = this.markers[key]; + + var range = marker.range.clipRows(config.firstRow, config.lastRow); + if (range.isEmpty()) continue; + + range = range.toScreenRange(this.session); + if (marker.renderer) { + var top = this.$getTop(range.start.row, config); + var left = Math.round( + this.$padding + range.start.column * config.characterWidth + ); + marker.renderer(html, range, left, top, config); + } + else if (range.isMultiLine()) { + if (marker.type == "text") { + this.drawTextMarker(html, range, marker.clazz, config); + } else { + this.drawMultiLineMarker( + html, range, marker.clazz, config, + marker.type + ); + } + } + else { + this.drawSingleLineMarker( + html, range, marker.clazz, config, + null, marker.type + ); + } + } + this.element = dom.setInnerHtml(this.element, html.join("")); + }; + + this.$getTop = function(row, layerConfig) { + return (row - layerConfig.firstRowScreen) * layerConfig.lineHeight; + }; + + /** + * Draws a marker, which spans a range of text in a single line + */ + this.drawTextMarker = function(stringBuilder, range, clazz, layerConfig) { + // selection start + var row = range.start.row; + + var lineRange = new Range( + row, range.start.column, + row, this.session.getScreenLastRowColumn(row) + ); + this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text"); + + // selection end + row = range.end.row; + lineRange = new Range(row, 0, row, range.end.column); + this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 0, "text"); + + for (row = range.start.row + 1; row < range.end.row; row++) { + lineRange.start.row = row; + lineRange.end.row = row; + lineRange.end.column = this.session.getScreenLastRowColumn(row); + this.drawSingleLineMarker(stringBuilder, lineRange, clazz, layerConfig, 1, "text"); + } + }; + + /** + * Draws a multi line marker, where lines span the full width + */ + this.drawMultiLineMarker = function(stringBuilder, range, clazz, layerConfig, type) { + // from selection start to the end of the line + var padding = type === "background" ? 0 : this.$padding; + var height = layerConfig.lineHeight; + var width = Math.round(layerConfig.width - (range.start.column * layerConfig.characterWidth)); + var top = this.$getTop(range.start.row, layerConfig); + var left = Math.round( + padding + range.start.column * layerConfig.characterWidth + ); + + stringBuilder.push( + "
        " + ); + + // from start of the last line to the selection end + top = this.$getTop(range.end.row, layerConfig); + width = Math.round(range.end.column * layerConfig.characterWidth); + + stringBuilder.push( + "
        " + ); + + // all the complete lines + height = (range.end.row - range.start.row - 1) * layerConfig.lineHeight; + if (height < 0) + return; + top = this.$getTop(range.start.row + 1, layerConfig); + width = layerConfig.width; + + stringBuilder.push( + "
        " + ); + }; + + /** + * Draws a marker which covers one single full line + */ + this.drawSingleLineMarker = function(stringBuilder, range, clazz, layerConfig, extraLength, type) { + var padding = type === "background" ? 0 : this.$padding; + var height = layerConfig.lineHeight; + + if (type === "background") + var width = layerConfig.width; + else + width = Math.round((range.end.column + (extraLength || 0) - range.start.column) * layerConfig.characterWidth); + + var top = this.$getTop(range.start.row, layerConfig); + var left = Math.round( + padding + range.start.column * layerConfig.characterWidth + ); + + stringBuilder.push( + "
        " + ); + }; + +}).call(Marker.prototype); + +exports.Marker = Marker; + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * Mihai Sucan + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/layer/text', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/dom', 'pilot/lang', 'pilot/useragent', 'pilot/event_emitter'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var dom = require("pilot/dom"); +var lang = require("pilot/lang"); +var useragent = require("pilot/useragent"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +var Text = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_text-layer"; + this.element.style.width = "auto"; + parentEl.appendChild(this.element); + + this.$characterSize = this.$measureSizes() || {width: 0, height: 0}; + this.$pollSizeChanges(); +}; + +(function() { + + oop.implement(this, EventEmitter); + + this.EOF_CHAR = "¶"; + this.EOL_CHAR = "¬"; + this.TAB_CHAR = "→"; + this.SPACE_CHAR = "·"; + this.$padding = 0; + + this.setPadding = function(padding) { + this.$padding = padding; + this.element.style.padding = "0 " + padding + "px"; + }; + + this.getLineHeight = function() { + return this.$characterSize.height || 1; + }; + + this.getCharacterWidth = function() { + return this.$characterSize.width || 1; + }; + + this.checkForSizeChanges = function() { + var size = this.$measureSizes(); + if (size && (this.$characterSize.width !== size.width || this.$characterSize.height !== size.height)) { + this.$characterSize = size; + this._dispatchEvent("changeCharaterSize", {data: size}); + } + }; + + this.$pollSizeChanges = function() { + var self = this; + this.$pollSizeChangesTimer = setInterval(function() { + self.checkForSizeChanges(); + }, 500); + }; + + this.$fontStyles = { + fontFamily : 1, + fontSize : 1, + fontWeight : 1, + fontStyle : 1, + lineHeight : 1 + }; + + this.$measureSizes = function() { + var n = 1000; + if (!this.$measureNode) { + var measureNode = this.$measureNode = dom.createElement("div"); + var style = measureNode.style; + + style.width = style.height = "auto"; + style.left = style.top = (-n * 40) + "px"; + + style.visibility = "hidden"; + style.position = "absolute"; + style.overflow = "visible"; + style.whiteSpace = "nowrap"; + + // in FF 3.6 monospace fonts can have a fixed sub pixel width. + // that's why we have to measure many characters + // Note: characterWidth can be a float! + measureNode.innerHTML = lang.stringRepeat("Xy", n); + + if (document.body) { + document.body.appendChild(measureNode); + } else { + var container = this.element.parentNode; + while (!dom.hasCssClass(container, "ace_editor")) + container = container.parentNode; + container.appendChild(measureNode); + } + + } + + var style = this.$measureNode.style; + var computedStyle = dom.computedStyle(this.element); + for (var prop in this.$fontStyles) + style[prop] = computedStyle[prop]; + + var size = { + height: this.$measureNode.offsetHeight, + width: this.$measureNode.offsetWidth / (n * 2) + }; + + // Size and width can be null if the editor is not visible or + // detached from the document + if (size.width == 0 && size.height == 0) + return null; + + return size; + }; + + this.setSession = function(session) { + this.session = session; + }; + + this.showInvisibles = false; + this.setShowInvisibles = function(showInvisibles) { + if (this.showInvisibles == showInvisibles) + return false; + + this.showInvisibles = showInvisibles; + return true; + }; + + this.$tabStrings = []; + this.$computeTabString = function() { + var tabSize = this.session.getTabSize(); + var tabStr = this.$tabStrings = [0]; + for (var i = 1; i < tabSize + 1; i++) { + if (this.showInvisibles) { + tabStr.push("" + + this.TAB_CHAR + + new Array(i).join(" ") + + ""); + } else { + tabStr.push(new Array(i+1).join(" ")); + } + } + + }; + + this.updateLines = function(config, firstRow, lastRow) { + this.$computeTabString(); + // Due to wrap line changes there can be new lines if e.g. + // the line to updated wrapped in the meantime. + if (this.config.lastRow != config.lastRow || + this.config.firstRow != config.firstRow) { + this.scrollLines(config); + } + this.config = config; + + var first = Math.max(firstRow, config.firstRow); + var last = Math.min(lastRow, config.lastRow); + + var lineElements = this.element.childNodes; + var lineElementsIdx = 0; + + for (var row = config.firstRow; row < first; row++) { + var foldLine = this.session.getFoldLine(row); + if (foldLine) { + if (foldLine.containsRow(first)) { + break; + } else { + row = foldLine.end.row; + } + } + lineElementsIdx ++; + } + + for (var i=first; i<=last; i++) { + var lineElement = lineElements[lineElementsIdx++]; + if (!lineElement) + continue; + + var html = []; + var tokens = this.session.getTokens(i, i); + this.$renderLine(html, i, tokens[0].tokens, true); + lineElement = dom.setInnerHtml(lineElement, html.join("")); + + i = this.session.getRowFoldEnd(i); + } + }; + + this.scrollLines = function(config) { + this.$computeTabString(); + var oldConfig = this.config; + this.config = config; + + if (!oldConfig || oldConfig.lastRow < config.firstRow) + return this.update(config); + + if (config.lastRow < oldConfig.firstRow) + return this.update(config); + + var el = this.element; + if (oldConfig.firstRow < config.firstRow) + for (var row=this.session.getFoldedRowCount(oldConfig.firstRow, config.firstRow - 1); row>0; row--) + el.removeChild(el.firstChild); + + if (oldConfig.lastRow > config.lastRow) + for (var row=this.session.getFoldedRowCount(config.lastRow + 1, oldConfig.lastRow); row>0; row--) + el.removeChild(el.lastChild); + + if (config.firstRow < oldConfig.firstRow) { + var fragment = this.$renderLinesFragment(config, config.firstRow, oldConfig.firstRow - 1); + if (el.firstChild) + el.insertBefore(fragment, el.firstChild); + else + el.appendChild(fragment); + } + + if (config.lastRow > oldConfig.lastRow) { + var fragment = this.$renderLinesFragment(config, oldConfig.lastRow + 1, config.lastRow); + el.appendChild(fragment); + } + }; + + this.$renderLinesFragment = function(config, firstRow, lastRow) { + var fragment = document.createDocumentFragment(), + row = firstRow, + fold = this.session.getNextFold(row), + foldStart = fold ?fold.start.row :Infinity; + + while (true) { + if(row > foldStart) { + row = fold.end.row+1; + fold = this.session.getNextFold(row); + foldStart = fold ?fold.start.row :Infinity; + } + if(row > lastRow) + break; + + var container = dom.createElement("div"); + + var html = []; + // Get the tokens per line as there might be some lines in between + // beeing folded. + // OPTIMIZE: If there is a long block of unfolded lines, just make + // this call once for that big block of unfolded lines. + var tokens = this.session.getTokens(row, row); + if (tokens.length == 1) + this.$renderLine(html, row, tokens[0].tokens, false); + + // don't use setInnerHtml since we are working with an empty DIV + container.innerHTML = html.join(""); + var lines = container.childNodes + while(lines.length) + fragment.appendChild(lines[0]); + + row++; + } + return fragment; + }; + + this.update = function(config) { + this.$computeTabString(); + this.config = config; + + var html = []; + var firstRow = config.firstRow, lastRow = config.lastRow; + + var row = firstRow, + fold = this.session.getNextFold(row), + foldStart = fold ?fold.start.row :Infinity; + + while (true) { + if(row > foldStart) { + row = fold.end.row+1; + fold = this.session.getNextFold(row); + foldStart = fold ?fold.start.row :Infinity; + } + if(row > lastRow) + break; + + // Get the tokens per line as there might be some lines in between + // beeing folded. + // OPTIMIZE: If there is a long block of unfolded lines, just make + // this call once for that big block of unfolded lines. + var tokens = this.session.getTokens(row, row); + if (tokens.length == 1) + this.$renderLine(html, row, tokens[0].tokens, false); + + row++; + } + this.element = dom.setInnerHtml(this.element, html.join("")); + }; + + this.$textToken = { + "text": true, + "rparen": true, + "lparen": true + }; + + this.$renderToken = function(stringBuilder, screenColumn, token, value) { + var self = this; + var replaceReg = /\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g; + var replaceFunc = function(c, a, b, tabIdx, idx4) { + if (c.charCodeAt(0) == 32) { + return new Array(c.length+1).join(" "); + } else if (c == "\t") { + var tabSize = self.session.getScreenTabSize(screenColumn + tabIdx); + screenColumn += tabSize - 1; + return self.$tabStrings[tabSize]; + } else if (c == "&") { + if (useragent.isOldGecko) + return "&"; + else + return "&"; + } else if (c == "<") { + return "<"; + } else if (c.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)) { + if (self.showInvisibles) { + var space = new Array(c.length+1).join(self.SPACE_CHAR); + return "" + space + ""; + } else { + return " "; + } + } else { + screenColumn += 1; + return "" + c + ""; + } + }; + + var output = value.replace(replaceReg, replaceFunc); + + if (!this.$textToken[token.type]) { + var classes = "ace_" + token.type.replace(/\./g, " ace_"); + stringBuilder.push("", output, ""); + } + else { + stringBuilder.push(output); + } + return screenColumn + value.length; + }; + + this.$renderLineCore = function(stringBuilder, lastRow, tokens, splits, onlyContents) { + var chars = 0; + var split = 0; + var splitChars; + var characterWidth = this.config.characterWidth; + var screenColumn = 0; + var self = this; + + if (!splits || splits.length == 0) + splitChars = Number.MAX_VALUE; + else + splitChars = splits[0]; + + if (!onlyContents) { + stringBuilder.push("
        " + ); + } + + for (var i = 0; i < tokens.length; i++) { + var token = tokens[i]; + var value = token.value; + + if (chars + value.length < splitChars) { + screenColumn = self.$renderToken( + stringBuilder, screenColumn, token, value + ); + chars += value.length; + } + else { + while (chars + value.length >= splitChars) { + screenColumn = self.$renderToken( + stringBuilder, screenColumn, + token, value.substring(0, splitChars - chars) + ); + value = value.substring(splitChars - chars); + chars = splitChars; + + if (!onlyContents) { + stringBuilder.push("
        ", + "
        " + ); + } + + split ++; + screenColumn = 0; + splitChars = splits[split] || Number.MAX_VALUE; + } + if (value.length != 0) { + chars += value.length; + screenColumn = self.$renderToken( + stringBuilder, screenColumn, token, value + ); + } + } + } + + if (this.showInvisibles) { + if (lastRow !== this.session.getLength() - 1) + stringBuilder.push("" + this.EOL_CHAR + ""); + else + stringBuilder.push("" + this.EOF_CHAR + ""); + } + stringBuilder.push("
        "); + }; + + this.$renderLine = function(stringBuilder, row, tokens, onlyContents) { + // Check if the line to render is folded or not. If not, things are + // simple, otherwise, we need to fake some things... + if (!this.session.isRowFolded(row)) { + var splits = this.session.getRowSplitData(row); + this.$renderLineCore(stringBuilder, row, tokens, splits, onlyContents); + } else { + this.$renderFoldLine(stringBuilder, row, tokens, onlyContents); + } + }; + + this.$renderFoldLine = function(stringBuilder, row, tokens, onlyContents) { + var session = this.session, + foldLine = session.getFoldLine(row), + renderTokens = []; + + function addTokens(tokens, from, to) { + var idx = 0, col = 0; + while ((col + tokens[idx].value.length) < from) { + col += tokens[idx].value.length; + idx++; + + if (idx == tokens.length) { + return; + } + } + if (col != from) { + var value = tokens[idx].value.substring(from - col); + // Check if the token value is longer then the from...to spacing. + if (value.length > (to - from)) { + value = value.substring(0, to - from); + } + + renderTokens.push({ + type: tokens[idx].type, + value: value + }); + + col = from + value.length; + idx += 1; + } + + while (col < to) { + var value = tokens[idx].value; + if (value.length + col > to) { + value = value.substring(0, to - col); + } + renderTokens.push({ + type: tokens[idx].type, + value: value + }); + col += value.length; + idx += 1; + } + } + + foldLine.walk(function(placeholder, row, column, lastColumn, isNewRow) { + if (placeholder) { + renderTokens.push({ + type: "fold", + value: placeholder + }); + } else { + if (isNewRow) { + tokens = this.session.getTokens(row, row)[0].tokens; + } + if (tokens.length != 0) { + addTokens(tokens, lastColumn, column); + } + } + }.bind(this), foldLine.end.row, this.session.getLine(foldLine.end.row).length); + + // TODO: Build a fake splits array! + var splits = this.session.$useWrapMode?this.session.$wrapData[row]:null; + this.$renderLineCore(stringBuilder, row, renderTokens, splits, onlyContents); + }; + + this.destroy = function() { + clearInterval(this.$pollSizeChangesTimer); + if (this.$measureNode) + this.$measureNode.parentNode.removeChild(this.$measureNode); + delete this.$measureNode; + }; + +}).call(Text.prototype); + +exports.Text = Text; + +}); +/* vim:ts=4:sts=4:sw=4: + * ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * Julian Viereck + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/layer/cursor', ['require', 'exports', 'module' , 'pilot/dom'], function(require, exports, module) { + +var dom = require("pilot/dom"); + +var Cursor = function(parentEl) { + this.element = dom.createElement("div"); + this.element.className = "ace_layer ace_cursor-layer"; + parentEl.appendChild(this.element); + + this.cursor = dom.createElement("div"); + this.cursor.className = "ace_cursor ace_hidden"; + this.element.appendChild(this.cursor); + + this.isVisible = false; +}; + +(function() { + + this.$padding = 0; + this.setPadding = function(padding) { + this.$padding = padding; + }; + + this.setSession = function(session) { + this.session = session; + }; + + this.hideCursor = function() { + this.isVisible = false; + dom.addCssClass(this.cursor, "ace_hidden"); + clearInterval(this.blinkId); + }; + + this.showCursor = function() { + this.isVisible = true; + dom.removeCssClass(this.cursor, "ace_hidden"); + this.cursor.style.visibility = "visible"; + this.restartTimer(); + }; + + this.restartTimer = function() { + clearInterval(this.blinkId); + if (!this.isVisible) { + return; + } + + var cursor = this.cursor; + this.blinkId = setInterval(function() { + cursor.style.visibility = "hidden"; + setTimeout(function() { + cursor.style.visibility = "visible"; + }, 400); + }, 1000); + }; + + this.getPixelPosition = function(onScreen) { + if (!this.config || !this.session) { + return { + left : 0, + top : 0 + }; + } + + var position = this.session.selection.getCursor(); + var pos = this.session.documentToScreenPosition(position); + var cursorLeft = Math.round(this.$padding + + pos.column * this.config.characterWidth); + var cursorTop = (pos.row - (onScreen ? this.config.firstRowScreen : 0)) * + this.config.lineHeight; + + return { + left : cursorLeft, + top : cursorTop + }; + }; + + this.update = function(config) { + this.config = config; + + this.pixelPos = this.getPixelPosition(true); + + this.cursor.style.left = this.pixelPos.left + "px"; + this.cursor.style.top = this.pixelPos.top + "px"; + this.cursor.style.width = config.characterWidth + "px"; + this.cursor.style.height = config.lineHeight + "px"; + + var overwrite = this.session.getOverwrite() + if (overwrite != this.overwrite) { + this.overwrite = overwrite; + if (overwrite) + dom.addCssClass(this.cursor, "ace_overwrite"); + else + dom.removeCssClass(this.cursor, "ace_overwrite"); + } + + this.restartTimer(); + }; + + this.destroy = function() { + clearInterval(this.blinkId); + } + +}).call(Cursor.prototype); + +exports.Cursor = Cursor; + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/scrollbar', ['require', 'exports', 'module' , 'pilot/oop', 'pilot/dom', 'pilot/event', 'pilot/event_emitter'], function(require, exports, module) { + +var oop = require("pilot/oop"); +var dom = require("pilot/dom"); +var event = require("pilot/event"); +var EventEmitter = require("pilot/event_emitter").EventEmitter; + +var ScrollBar = function(parent) { + this.element = dom.createElement("div"); + this.element.className = "ace_sb"; + + this.inner = dom.createElement("div"); + this.element.appendChild(this.inner); + + parent.appendChild(this.element); + + // in OSX lion the scrollbars appear to have no width. In this case resize + // the to show the scrollbar but still pretend that the scrollbar has a width + // of 0px + this.width = dom.scrollbarWidth(); + this.element.style.width = (this.width || 15) + "px"; + + event.addListener(this.element, "scroll", this.onScroll.bind(this)); +}; + +(function() { + oop.implement(this, EventEmitter); + + this.onScroll = function() { + this._dispatchEvent("scroll", {data: this.element.scrollTop}); + }; + + this.getWidth = function() { + return this.width; + }; + + this.setHeight = function(height) { + this.element.style.height = height + "px"; + }; + + this.setInnerHeight = function(height) { + this.inner.style.height = height + "px"; + }; + + this.setScrollTop = function(scrollTop) { + this.element.scrollTop = scrollTop; + }; + +}).call(ScrollBar.prototype); + +exports.ScrollBar = ScrollBar; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/renderloop', ['require', 'exports', 'module' , 'pilot/event'], function(require, exports, module) { + +var event = require("pilot/event"); + +var RenderLoop = function(onRender) { + this.onRender = onRender; + this.pending = false; + this.changes = 0; +}; + +(function() { + + this.schedule = function(change) { + //this.onRender(change); + //return; + this.changes = this.changes | change; + if (!this.pending) { + this.pending = true; + var _self = this; + this.setTimeoutZero(function() { + _self.pending = false; + var changes = _self.changes; + _self.changes = 0; + _self.onRender(changes); + }) + } + }; + + this.setTimeoutZero = window.requestAnimationFrame || + window.webkitRequestAnimationFrame || + window.mozRequestAnimationFrame || + window.oRequestAnimationFrame || + window.msRequestAnimationFrame; + + if (this.setTimeoutZero) { + + this.setTimeoutZero = this.setTimeoutZero.bind(window) + } else if (window.postMessage) { + + this.messageName = "zero-timeout-message"; + + this.setTimeoutZero = function(callback) { + if (!this.attached) { + var _self = this; + event.addListener(window, "message", function(e) { + if (_self.callback && e.data == _self.messageName) { + event.stopPropagation(e); + _self.callback(); + } + }); + this.attached = true; + } + this.callback = callback; + window.postMessage(this.messageName, "*"); + } + + } else { + + this.setTimeoutZero = function(callback) { + setTimeout(callback, 0); + } + } + +}).call(RenderLoop.prototype); + +exports.RenderLoop = RenderLoop; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Ajax.org Code Editor (ACE). + * + * The Initial Developer of the Original Code is + * Ajax.org B.V. + * Portions created by the Initial Developer are Copyright (C) 2010 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Fabian Jakobs + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('ace/theme/textmate', ['require', 'exports', 'module' , 'pilot/dom'], function(require, exports, module) { + + var dom = require("pilot/dom"); + + var cssText = ".ace-tm .ace_editor {\ + border: 2px solid rgb(159, 159, 159);\ +}\ +\ +.ace-tm .ace_editor.ace_focus {\ + border: 2px solid #327fbd;\ +}\ +\ +.ace-tm .ace_gutter {\ + width: 50px;\ + background: #e8e8e8;\ + color: #333;\ + overflow : hidden;\ +}\ +\ +.ace-tm .ace_gutter-layer {\ + width: 100%;\ + text-align: right;\ +}\ +\ +.ace-tm .ace_gutter-layer .ace_gutter-cell {\ + padding-right: 6px;\ +}\ +\ +.ace-tm .ace_print_margin {\ + width: 1px;\ + background: #e8e8e8;\ +}\ +\ +.ace-tm .ace_text-layer {\ + cursor: text;\ +}\ +\ +.ace-tm .ace_cursor {\ + border-left: 2px solid black;\ +}\ +\ +.ace-tm .ace_cursor.ace_overwrite {\ + border-left: 0px;\ + border-bottom: 1px solid black;\ +}\ + \ +.ace-tm .ace_line .ace_invisible {\ + color: rgb(191, 191, 191);\ +}\ +\ +.ace-tm .ace_line .ace_keyword {\ + color: blue;\ +}\ +\ +.ace-tm .ace_line .ace_constant.ace_buildin {\ + color: rgb(88, 72, 246);\ +}\ +\ +.ace-tm .ace_line .ace_constant.ace_language {\ + color: rgb(88, 92, 246);\ +}\ +\ +.ace-tm .ace_line .ace_constant.ace_library {\ + color: rgb(6, 150, 14);\ +}\ +\ +.ace-tm .ace_line .ace_invalid {\ + background-color: rgb(153, 0, 0);\ + color: white;\ +}\ +\ +.ace-tm .ace_line .ace_fold {\ + background-color: #E4E4E4;\ + border-radius: 3px;\ +}\ +\ +.ace-tm .ace_line .ace_support.ace_function {\ + color: rgb(60, 76, 114);\ +}\ +\ +.ace-tm .ace_line .ace_support.ace_constant {\ + color: rgb(6, 150, 14);\ +}\ +\ +.ace-tm .ace_line .ace_support.ace_type,\ +.ace-tm .ace_line .ace_support.ace_class {\ + color: rgb(109, 121, 222);\ +}\ +\ +.ace-tm .ace_line .ace_keyword.ace_operator {\ + color: rgb(104, 118, 135);\ +}\ +\ +.ace-tm .ace_line .ace_string {\ + color: rgb(3, 106, 7);\ +}\ +\ +.ace-tm .ace_line .ace_comment {\ + color: rgb(76, 136, 107);\ +}\ +\ +.ace-tm .ace_line .ace_comment.ace_doc {\ + color: rgb(0, 102, 255);\ +}\ +\ +.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\ + color: rgb(128, 159, 191);\ +}\ +\ +.ace-tm .ace_line .ace_constant.ace_numeric {\ + color: rgb(0, 0, 205);\ +}\ +\ +.ace-tm .ace_line .ace_variable {\ + color: rgb(49, 132, 149);\ +}\ +\ +.ace-tm .ace_line .ace_xml_pe {\ + color: rgb(104, 104, 91);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_selection {\ + background: rgb(181, 213, 255);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_step {\ + background: rgb(252, 255, 0);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_stack {\ + background: rgb(164, 229, 101);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_bracket {\ + margin: -1px 0 0 -1px;\ + border: 1px solid rgb(192, 192, 192);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_active_line {\ + background: rgba(0, 0, 0, 0.07);\ +}\ +\ +.ace-tm .ace_marker-layer .ace_selected_word {\ + background: rgb(250, 250, 255);\ + border: 1px solid rgb(200, 200, 250);\ +}\ +\ +.ace-tm .ace_string.ace_regex {\ + color: rgb(255, 0, 0)\ +}"; + + // import CSS once + dom.importCssString(cssText); + + exports.cssClass = "ace-tm"; +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is DomTemplate. + * + * The Initial Developer of the Original Code is Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/environment', ['require', 'exports', 'module' , 'pilot/settings'], function(require, exports, module) { + + +var settings = require("pilot/settings").settings; + +/** + * Create an environment object + */ +function create() { + return { + settings: settings + }; +}; + +exports.create = create; + + +}); +define("text/cockpit/ui/cli_view.css", [], "" + + "#cockpitInput { padding-left: 16px; }" + + "" + + ".cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }" + + "" + + ".cptCompletion { padding: 0; position: absolute; z-index: -1000; }" + + ".cptCompletion.VALID { background: #FFF; }" + + ".cptCompletion.INCOMPLETE { background: #DDD; }" + + ".cptCompletion.INVALID { background: #DDD; }" + + ".cptCompletion span { color: #FFF; }" + + ".cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }" + + ".cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }" + + "span.cptPrompt { color: #66F; font-weight: bold; }" + + "" + + "" + + ".cptHints {" + + " color: #000;" + + " position: absolute;" + + " border: 1px solid rgba(230, 230, 230, 0.8);" + + " background: rgba(250, 250, 250, 0.8);" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 10px; border-top-right-radius: 10px;" + + " z-index: 1000;" + + " padding: 8px;" + + " display: none;" + + "}" + + "" + + ".cptFocusPopup { display: block; }" + + ".cptFocusPopup.cptNoPopup { display: none; }" + + "" + + ".cptHints ul { margin: 0; padding: 0 15px; }" + + "" + + ".cptGt { font-weight: bold; font-size: 120%; }" + + ""); + +define("text/cockpit/ui/request_view.css", [], "" + + ".cptRowIn {" + + " display: box; display: -moz-box; display: -webkit-box;" + + " box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal;" + + " box-align: center; -moz-box-align: center; -webkit-box-align: center;" + + " color: #333;" + + " background-color: #EEE;" + + " width: 100%;" + + " font-family: consolas, courier, monospace;" + + "}" + + ".cptRowIn > * { padding-left: 2px; padding-right: 2px; }" + + ".cptRowIn > img { cursor: pointer; }" + + ".cptHover { display: none; }" + + ".cptRowIn:hover > .cptHover { display: block; }" + + ".cptRowIn:hover > .cptHover.cptHidden { display: none; }" + + ".cptOutTyped {" + + " box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1;" + + " font-weight: bold; color: #000; font-size: 120%;" + + "}" + + ".cptRowOutput { padding-left: 10px; line-height: 1.2em; }" + + ".cptRowOutput strong," + + ".cptRowOutput b," + + ".cptRowOutput th," + + ".cptRowOutput h1," + + ".cptRowOutput h2," + + ".cptRowOutput h3 { color: #000; }" + + ".cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }" + + ".cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }" + + ".cptRowOutput input[type=password]," + + ".cptRowOutput input[type=text]," + + ".cptRowOutput textarea {" + + " color: #000; font-size: 120%;" + + " background: transparent; padding: 3px;" + + " border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;" + + "}" + + ".cptRowOutput table," + + ".cptRowOutput td," + + ".cptRowOutput th { border: 0; padding: 0 2px; }" + + ".cptRowOutput .right { text-align: right; }" + + ""); + +define("text/ace/css/editor.css", [], ".ace_editor {" + + " position: absolute;" + + " overflow: hidden;" + + " font-family: Monaco, \"Menlo\", \"Courier New\", monospace;" + + " font-size: 12px;" + + "}" + + "" + + ".ace_scroller {" + + " position: absolute;" + + " overflow-x: scroll;" + + " overflow-y: hidden;" + + "}" + + "" + + ".ace_content {" + + " position: absolute;" + + " box-sizing: border-box;" + + " -moz-box-sizing: border-box;" + + " -webkit-box-sizing: border-box;" + + "}" + + "" + + ".ace_composition {" + + " position: absolute;" + + " background: #555;" + + " color: #DDD;" + + " z-index: 4;" + + "}" + + "" + + ".ace_gutter {" + + " position: absolute;" + + " overflow-x: hidden;" + + " overflow-y: hidden;" + + " height: 100%;" + + "}" + + "" + + ".ace_gutter-cell.ace_error {" + + " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");" + + " background-repeat: no-repeat;" + + " background-position: 4px center;" + + "}" + + "" + + ".ace_gutter-cell.ace_warning {" + + " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");" + + " background-repeat: no-repeat;" + + " background-position: 4px center;" + + "}" + + "" + + ".ace_editor .ace_sb {" + + " position: absolute;" + + " overflow-x: hidden;" + + " overflow-y: scroll;" + + " right: 0;" + + "}" + + "" + + ".ace_editor .ace_sb div {" + + " position: absolute;" + + " width: 1px;" + + " left: 0;" + + "}" + + "" + + ".ace_editor .ace_print_margin_layer {" + + " z-index: 0;" + + " position: absolute;" + + " overflow: hidden;" + + " margin: 0;" + + " left: 0;" + + " height: 100%;" + + " width: 100%;" + + "}" + + "" + + ".ace_editor .ace_print_margin {" + + " position: absolute;" + + " height: 100%;" + + "}" + + "" + + ".ace_editor textarea {" + + " position: fixed;" + + " z-index: -1;" + + " width: 10px;" + + " height: 30px;" + + " opacity: 0;" + + " background: transparent;" + + " appearance: none;" + + " -moz-appearance: none;" + + " border: none;" + + " resize: none;" + + " outline: none;" + + " overflow: hidden;" + + "}" + + "" + + ".ace_layer {" + + " z-index: 1;" + + " position: absolute;" + + " overflow: hidden;" + + " white-space: nowrap;" + + " height: 100%;" + + " width: 100%;" + + "}" + + "" + + ".ace_text-layer {" + + " color: black;" + + "}" + + "" + + ".ace_cjk {" + + " display: inline-block;" + + " text-align: center;" + + "}" + + "" + + ".ace_cursor-layer {" + + " z-index: 4;" + + " cursor: text;" + + " /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */" + + "}" + + "" + + ".ace_cursor {" + + " z-index: 4;" + + " position: absolute;" + + "}" + + "" + + ".ace_cursor.ace_hidden {" + + " opacity: 0.2;" + + "}" + + "" + + ".ace_line {" + + " white-space: nowrap;" + + "}" + + "" + + ".ace_marker-layer {" + + " cursor: text;" + + " pointer-events: none;" + + "}" + + "" + + ".ace_marker-layer .ace_step {" + + " position: absolute;" + + " z-index: 3;" + + "}" + + "" + + ".ace_marker-layer .ace_selection {" + + " position: absolute;" + + " z-index: 4;" + + "}" + + "" + + ".ace_marker-layer .ace_bracket {" + + " position: absolute;" + + " z-index: 5;" + + "}" + + "" + + ".ace_marker-layer .ace_active_line {" + + " position: absolute;" + + " z-index: 2;" + + "}" + + "" + + ".ace_marker-layer .ace_selected_word {" + + " position: absolute;" + + " z-index: 6;" + + " box-sizing: border-box;" + + " -moz-box-sizing: border-box;" + + " -webkit-box-sizing: border-box;" + + "}" + + "" + + ".ace_line .ace_fold {" + + " cursor: pointer;" + + "}" + + "" + + ".ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer {" + + " cursor: move;" + + "}" + + ""); + +define("text/ace-0.2.0/demo/styles.css", [], "html {" + + " height: 100%;" + + " width: 100%;" + + " overflow: hidden;" + + "}" + + "" + + "body {" + + " overflow: hidden;" + + " margin: 0;" + + " padding: 0;" + + " height: 100%;" + + " width: 100%;" + + " font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;" + + " font-size: 12px;" + + " background: rgb(14, 98, 165);" + + " color: white;" + + "}" + + "" + + "#logo {" + + " padding: 15px;" + + " margin-left: 65px;" + + "}" + + "" + + "#editor {" + + " position: absolute;" + + " top: 0px;" + + " left: 280px;" + + " bottom: 0px;" + + " right: 0px;" + + " background: white;" + + "}" + + "" + + "#controls {" + + " padding: 5px;" + + "}" + + "" + + "#controls td {" + + " text-align: right;" + + "}" + + "" + + "#controls td + td {" + + " text-align: left;" + + "}" + + "" + + "#cockpitInput {" + + " position: absolute;" + + " left: 280px;" + + " right: 0px;" + + " bottom: 0;" + + "" + + " border: none; outline: none;" + + " font-family: consolas, courier, monospace;" + + " font-size: 120%;" + + "}" + + "" + + "#cockpitOutput {" + + " padding: 10px;" + + " margin: 0 15px;" + + " border: 1px solid #AAA;" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 4px; border-top-right-radius: 4px;" + + " background: #DDD; color: #000;" + + "}"); + +define("text/ace-0.2.0/textarea/style.css", [], "body {" + + " margin:0;" + + " padding:0;" + + " background-color:#e6f5fc;" + + " " + + "}" + + "" + + "H2, H3, H4 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " margin:0;" + + " padding:0;" + + "}" + + "" + + "H2 {" + + " font-size:28px;" + + " color:#263842;" + + " padding-bottom:6px;" + + "}" + + "" + + "H3 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " font-size:22px;" + + " color:#253741;" + + " margin-top:43px;" + + " margin-bottom:8px;" + + "}" + + "" + + "H4 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " font-size:21px;" + + " color:#222222;" + + " margin-bottom:4px;" + + "}" + + "" + + "P {" + + " padding:13px 0;" + + " margin:0;" + + " line-height:22px;" + + "}" + + "" + + "UL{" + + " line-height : 22px;" + + "}" + + "" + + "PRE{" + + " background : #333;" + + " color : white;" + + " padding : 10px;" + + "}" + + "" + + "#header {" + + " height : 227px;" + + " position:relative;" + + " overflow:hidden;" + + " background: url(images/background.png) repeat-x 0 0;" + + " border-bottom:1px solid #c9e8fa; " + + "}" + + "" + + "#header .content .signature {" + + " font-family:Trebuchet MS;" + + " font-size:11px;" + + " color:#ebe4d6;" + + " position:absolute;" + + " bottom:5px;" + + " right:42px;" + + " letter-spacing : 1px;" + + "}" + + "" + + ".content {" + + " width:970px;" + + " position:relative;" + + " overflow:hidden;" + + " margin:0 auto;" + + "}" + + "" + + "#header .content {" + + " height:184px;" + + " margin-top:22px;" + + "}" + + "" + + "#header .content .logo {" + + " width : 282px;" + + " height : 184px;" + + " background:url(images/logo.png) no-repeat 0 0;" + + " position:absolute;" + + " top:0;" + + " left:0;" + + "}" + + "" + + "#header .content .title {" + + " width : 605px;" + + " height : 58px;" + + " background:url(images/ace.png) no-repeat 0 0;" + + " position:absolute;" + + " top:98px;" + + " left:329px;" + + "}" + + "" + + "#wrapper {" + + " background:url(images/body_background.png) repeat-x 0 0;" + + " min-height:250px;" + + "}" + + "" + + "#wrapper .content {" + + " font-family:Arial;" + + " font-size:14px;" + + " color:#222222;" + + " width:1000px;" + + "}" + + "" + + "#wrapper .content .column1 {" + + " position:relative;" + + " overflow:hidden;" + + " float:left;" + + " width:315px;" + + " margin-right:31px;" + + "}" + + "" + + "#wrapper .content .column2 {" + + " position:relative;" + + " overflow:hidden;" + + " float:left;" + + " width:600px;" + + " padding-top:47px;" + + "}" + + "" + + ".fork_on_github {" + + " width:310px;" + + " height:80px;" + + " background:url(images/fork_on_github.png) no-repeat 0 0;" + + " position:relative;" + + " overflow:hidden;" + + " margin-top:49px;" + + " cursor:pointer;" + + "}" + + "" + + ".fork_on_github:hover {" + + " background-position:0 -80px;" + + "}" + + "" + + ".divider {" + + " height:3px;" + + " background-color:#bedaea;" + + " margin-bottom:3px;" + + "}" + + "" + + ".menu {" + + " padding:23px 0 0 24px;" + + "}" + + "" + + "UL.content-list {" + + " padding:15px;" + + " margin:0;" + + "}" + + "" + + "UL.menu-list {" + + " padding:0;" + + " margin:0 0 20px 0;" + + " list-style-type:none;" + + " line-height : 16px;" + + "}" + + "" + + "UL.menu-list LI {" + + " color:#2557b4;" + + " font-family:Trebuchet MS;" + + " font-size:14px;" + + " padding:7px 0;" + + " border-bottom:1px dotted #d6e2e7;" + + "}" + + "" + + "UL.menu-list LI:last-child {" + + " border-bottom:0;" + + "}" + + "" + + "A {" + + " color:#2557b4;" + + " text-decoration:none;" + + "}" + + "" + + "A:hover {" + + " text-decoration:underline;" + + "}" + + "" + + "P#first{" + + " background : rgba(255,255,255,0.5);" + + " padding : 20px;" + + " font-size : 16px;" + + " line-height : 24px;" + + " margin : 0 0 20px 0;" + + "}" + + "" + + "#footer {" + + " height:40px;" + + " position:relative;" + + " overflow:hidden;" + + " background:url(images/bottombar.png) repeat-x 0 0;" + + " position:relative;" + + " margin-top:40px;" + + "}" + + "" + + "UL.menu-footer {" + + " padding:0;" + + " margin:8px 11px 0 0;" + + " list-style-type:none;" + + " float:right;" + + "}" + + "" + + "UL.menu-footer LI {" + + " color:white;" + + " font-family:Arial;" + + " font-size:12px;" + + " display:inline-block;" + + " margin:0 1px;" + + "}" + + "" + + "UL.menu-footer LI A {" + + " color:#8dd0ff;" + + " text-decoration:none;" + + "}" + + "" + + "UL.menu-footer LI A:hover {" + + " text-decoration:underline;" + + "}" + + "" + + "" + + "" + + "" + + ""); + +define("text/build/demo/styles.css", [], "html {" + + " height: 100%;" + + " width: 100%;" + + " overflow: hidden;" + + "}" + + "" + + "body {" + + " overflow: hidden;" + + " margin: 0;" + + " padding: 0;" + + " height: 100%;" + + " width: 100%;" + + " font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;" + + " font-size: 12px;" + + " background: rgb(14, 98, 165);" + + " color: white;" + + "}" + + "" + + "#logo {" + + " padding: 15px;" + + " margin-left: 65px;" + + "}" + + "" + + "#editor {" + + " position: absolute;" + + " top: 0px;" + + " left: 280px;" + + " bottom: 0px;" + + " right: 0px;" + + " background: white;" + + "}" + + "" + + "#controls {" + + " padding: 5px;" + + "}" + + "" + + "#controls td {" + + " text-align: right;" + + "}" + + "" + + "#controls td + td {" + + " text-align: left;" + + "}" + + "" + + "#cockpitInput {" + + " position: absolute;" + + " left: 280px;" + + " right: 0px;" + + " bottom: 0;" + + "" + + " border: none; outline: none;" + + " font-family: consolas, courier, monospace;" + + " font-size: 120%;" + + "}" + + "" + + "#cockpitOutput {" + + " padding: 10px;" + + " margin: 0 15px;" + + " border: 1px solid #AAA;" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 4px; border-top-right-radius: 4px;" + + " background: #DDD; color: #000;" + + "}"); + +define("text/build_support/style.css", [], "body {" + + " margin:0;" + + " padding:0;" + + " background-color:#e6f5fc;" + + " " + + "}" + + "" + + "H2, H3, H4 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " margin:0;" + + " padding:0;" + + "}" + + "" + + "H2 {" + + " font-size:28px;" + + " color:#263842;" + + " padding-bottom:6px;" + + "}" + + "" + + "H3 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " font-size:22px;" + + " color:#253741;" + + " margin-top:43px;" + + " margin-bottom:8px;" + + "}" + + "" + + "H4 {" + + " font-family:Trebuchet MS;" + + " font-weight:bold;" + + " font-size:21px;" + + " color:#222222;" + + " margin-bottom:4px;" + + "}" + + "" + + "P {" + + " padding:13px 0;" + + " margin:0;" + + " line-height:22px;" + + "}" + + "" + + "UL{" + + " line-height : 22px;" + + "}" + + "" + + "PRE{" + + " background : #333;" + + " color : white;" + + " padding : 10px;" + + "}" + + "" + + "#header {" + + " height : 227px;" + + " position:relative;" + + " overflow:hidden;" + + " background: url(images/background.png) repeat-x 0 0;" + + " border-bottom:1px solid #c9e8fa; " + + "}" + + "" + + "#header .content .signature {" + + " font-family:Trebuchet MS;" + + " font-size:11px;" + + " color:#ebe4d6;" + + " position:absolute;" + + " bottom:5px;" + + " right:42px;" + + " letter-spacing : 1px;" + + "}" + + "" + + ".content {" + + " width:970px;" + + " position:relative;" + + " overflow:hidden;" + + " margin:0 auto;" + + "}" + + "" + + "#header .content {" + + " height:184px;" + + " margin-top:22px;" + + "}" + + "" + + "#header .content .logo {" + + " width : 282px;" + + " height : 184px;" + + " background:url(images/logo.png) no-repeat 0 0;" + + " position:absolute;" + + " top:0;" + + " left:0;" + + "}" + + "" + + "#header .content .title {" + + " width : 605px;" + + " height : 58px;" + + " background:url(images/ace.png) no-repeat 0 0;" + + " position:absolute;" + + " top:98px;" + + " left:329px;" + + "}" + + "" + + "#wrapper {" + + " background:url(images/body_background.png) repeat-x 0 0;" + + " min-height:250px;" + + "}" + + "" + + "#wrapper .content {" + + " font-family:Arial;" + + " font-size:14px;" + + " color:#222222;" + + " width:1000px;" + + "}" + + "" + + "#wrapper .content .column1 {" + + " position:relative;" + + " overflow:hidden;" + + " float:left;" + + " width:315px;" + + " margin-right:31px;" + + "}" + + "" + + "#wrapper .content .column2 {" + + " position:relative;" + + " overflow:hidden;" + + " float:left;" + + " width:600px;" + + " padding-top:47px;" + + "}" + + "" + + ".fork_on_github {" + + " width:310px;" + + " height:80px;" + + " background:url(images/fork_on_github.png) no-repeat 0 0;" + + " position:relative;" + + " overflow:hidden;" + + " margin-top:49px;" + + " cursor:pointer;" + + "}" + + "" + + ".fork_on_github:hover {" + + " background-position:0 -80px;" + + "}" + + "" + + ".divider {" + + " height:3px;" + + " background-color:#bedaea;" + + " margin-bottom:3px;" + + "}" + + "" + + ".menu {" + + " padding:23px 0 0 24px;" + + "}" + + "" + + "UL.content-list {" + + " padding:15px;" + + " margin:0;" + + "}" + + "" + + "UL.menu-list {" + + " padding:0;" + + " margin:0 0 20px 0;" + + " list-style-type:none;" + + " line-height : 16px;" + + "}" + + "" + + "UL.menu-list LI {" + + " color:#2557b4;" + + " font-family:Trebuchet MS;" + + " font-size:14px;" + + " padding:7px 0;" + + " border-bottom:1px dotted #d6e2e7;" + + "}" + + "" + + "UL.menu-list LI:last-child {" + + " border-bottom:0;" + + "}" + + "" + + "A {" + + " color:#2557b4;" + + " text-decoration:none;" + + "}" + + "" + + "A:hover {" + + " text-decoration:underline;" + + "}" + + "" + + "P#first{" + + " background : rgba(255,255,255,0.5);" + + " padding : 20px;" + + " font-size : 16px;" + + " line-height : 24px;" + + " margin : 0 0 20px 0;" + + "}" + + "" + + "#footer {" + + " height:40px;" + + " position:relative;" + + " overflow:hidden;" + + " background:url(images/bottombar.png) repeat-x 0 0;" + + " position:relative;" + + " margin-top:40px;" + + "}" + + "" + + "UL.menu-footer {" + + " padding:0;" + + " margin:8px 11px 0 0;" + + " list-style-type:none;" + + " float:right;" + + "}" + + "" + + "UL.menu-footer LI {" + + " color:white;" + + " font-family:Arial;" + + " font-size:12px;" + + " display:inline-block;" + + " margin:0 1px;" + + "}" + + "" + + "UL.menu-footer LI A {" + + " color:#8dd0ff;" + + " text-decoration:none;" + + "}" + + "" + + "UL.menu-footer LI A:hover {" + + " text-decoration:underline;" + + "}" + + "" + + "" + + "" + + "" + + ""); + +define("text/demo/styles.css", [], "html {" + + " height: 100%;" + + " width: 100%;" + + " overflow: hidden;" + + "}" + + "" + + "body {" + + " overflow: hidden;" + + " margin: 0;" + + " padding: 0;" + + " height: 100%;" + + " width: 100%;" + + " font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;" + + " font-size: 12px;" + + " background: rgb(14, 98, 165);" + + " color: white;" + + "}" + + "" + + "#logo {" + + " padding: 15px;" + + " margin-left: 65px;" + + "}" + + "" + + "#editor {" + + " position: absolute;" + + " top: 0px;" + + " left: 280px;" + + " bottom: 0px;" + + " right: 0px;" + + " background: white;" + + "}" + + "" + + "#controls {" + + " padding: 5px;" + + "}" + + "" + + "#controls td {" + + " text-align: right;" + + "}" + + "" + + "#controls td + td {" + + " text-align: left;" + + "}" + + "" + + "#cockpitInput {" + + " position: absolute;" + + " left: 280px;" + + " right: 0px;" + + " bottom: 0;" + + "" + + " border: none; outline: none;" + + " font-family: consolas, courier, monospace;" + + " font-size: 120%;" + + "}" + + "" + + "#cockpitOutput {" + + " padding: 10px;" + + " margin: 0 15px;" + + " border: 1px solid #AAA;" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 4px; border-top-right-radius: 4px;" + + " background: #DDD; color: #000;" + + "}"); + +define("text/deps/csslint/demos/demo.css", [], "@charset \"UTF-8\";" + + "" + + "@import url(\"booya.css\") print,screen;" + + "@import \"whatup.css\" screen;" + + "@import \"wicked.css\";" + + "" + + "@namespace \"http://www.w3.org/1999/xhtml\";" + + "@namespace svg \"http://www.w3.org/2000/svg\";" + + "" + + "li.inline #foo {" + + " background: url(\"something.png\");" + + " display: inline;" + + " padding-left: 3px;" + + " padding-right: 7px;" + + " border-right: 1px dotted #066;" + + "}" + + "" + + "li.last.first {" + + " display: inline;" + + " padding-left: 3px !important;" + + " padding-right: 3px;" + + " border-right: 0px;" + + "}" + + "" + + "@media print {" + + " li.inline {" + + " color: black;" + + " }" + + "" + + "" + + "@charset \"UTF-8\"; " + + "" + + "@page {" + + " margin: 10%;" + + " counter-increment: page;" + + "" + + " @top-center {" + + " font-family: sans-serif;" + + " font-weight: bold;" + + " font-size: 2em;" + + " content: counter(page);" + + " }" + + "}"); + +define("text/deps/requirejs/dist/ie.css", [], "" + + "body .sect {" + + " display: none;" + + "}" + + "" + + "" + + "#content ul.index {" + + " list-style: none;" + + "}" + + ""); + +define("text/deps/requirejs/dist/main.css", [], "@font-face {" + + " font-family: Inconsolata;" + + " src: url(\"fonts/Inconsolata.ttf\");" + + "}" + + "" + + "* {" + + " -moz-box-sizing: border-box;" + + " -webkit-box-sizing: border-box;" + + " box-sizing: border-box;" + + " margin: 0;" + + " padding: 0;" + + "}" + + "" + + "body {" + + " font-size: 12px;" + + " line-height: 21px;" + + " background-color: #fff;" + + " font-family: \"Helvetica Neue\", Helvetica, Arial, Verdana, sans-serif;" + + " color: #0a0a0a;" + + "}" + + "" + + "#wrapper {" + + " margin: 0;" + + "}" + + "" + + "#grid {" + + " position: fixed;" + + " top: 0;" + + " left: 0;" + + " width: 796px;" + + " background-image: url(\"i/grid.png\");" + + " z-index: 100;" + + "}" + + "" + + "pre {" + + " line-height: 18px;" + + " font-size: 13px;" + + " margin: 7px 0 21px;" + + " padding: 5px 10px;" + + " overflow: auto;" + + " background-color: #fafafa;" + + " border: 1px solid #e6e6e6;" + + " -moz-border-radius: 5px;" + + " -webkit-border-radius: 5px;" + + " border-radius: 5px;" + + " -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);" + + " -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);" + + " box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);" + + "}" + + "" + + "/*" + + " typography stuff" + + "*/" + + ".mono {" + + " font-family: \"Inconsolata\", Andale Mono, Monaco, Monospace;" + + "}" + + "" + + ".sans {" + + " font-family: \"Helvetica Neue\", Helvetica, Arial, Verdana, sans-serif;" + + "}" + + "" + + ".serif {" + + " font-family: \"Georgia\", Times New Roman, Times, serif;" + + "}" + + "" + + "a {" + + " color: #2e87dd;" + + " text-decoration: none;" + + "}" + + "" + + "a:hover {" + + " text-decoration: underline;" + + "}" + + "" + + "/*" + + " navigation" + + "*/" + + "" + + "#navBg {" + + " background-color: #f2f2f2;" + + " background-image: url(\"i/shadow.png\");" + + " background-position: right top;" + + " background-repeat: repeat-y;" + + " width: 220px;" + + " position: fixed;" + + " top: 0;" + + " left: 0;" + + " z-index: 0;" + + "}" + + "" + + "#nav {" + + " background-image: url(\"i/logo.png\");" + + " background-repeat: no-repeat;" + + " background-position: center 10px;" + + " width: 220px;" + + " float: left;" + + " margin: 0;" + + " padding: 150px 20px 0;" + + " font-size: 13px;" + + " text-shadow: 1px 1px #fff;" + + " position: relative;" + + " z-index: 1;" + + "}" + + "" + + "#nav .homeImageLink {" + + " position: absolute;" + + " display: block;" + + " top: 10px;" + + " left: 0;" + + " width: 220px;" + + " height: 138px;" + + "}" + + "#nav ul {" + + " list-style-type:none;" + + " padding: 0;" + + " margin: 21px 0 0 0;" + + "}" + + "" + + "#nav ul li {" + + " width: 100%;" + + "}" + + "" + + "#nav ul li.version {" + + " text-align: center;" + + " color: #4d4d4d;" + + "}" + + "" + + "#nav h1 {" + + " color: #4d4d4d;" + + " text-align: center;" + + " font-size: 15px;" + + " font-weight: normal;" + + " text-transform: uppercase;" + + " letter-spacing: 3px;" + + "}" + + "" + + "span.spacer {" + + " color: #2e87dd;" + + " margin: 0 3px 0 5px;" + + " background-image: url(\"i/dot.png\");" + + " background-repeat: repeat-x;" + + " background-position: left 13px;" + + "}" + + "" + + "/*" + + " icons" + + "*/" + + "" + + "span.icon {" + + " width: 16px;" + + " display: block;" + + " background-image: url(\"i/sprite.png\");" + + " background-repeat: no-repeat;" + + "}" + + "" + + "span.icon.home {" + + " background-position: center 5px;" + + "}" + + "" + + "span.icon.start {" + + " background-position: center -27px;" + + "}" + + "" + + "span.icon.download {" + + " background-position: center -59px;" + + "}" + + "" + + "span.icon.api {" + + " background-position: center -89px;" + + "}" + + "" + + "span.icon.optimize {" + + " background-position: center -119px;" + + "}" + + "" + + "span.icon.script {" + + " background-position: center -150px;" + + "}" + + "" + + "span.icon.question {" + + " background-position: center -182px;" + + "}" + + "" + + "span.icon.requirement {" + + " background-position: center -214px;" + + "}" + + "" + + "span.icon.history {" + + " background-position: center -247px;" + + "}" + + "" + + "span.icon.help {" + + " background-position: center -279px;" + + "}" + + "" + + "span.icon.blog {" + + " background-position: center -311px;" + + "}" + + "" + + "span.icon.twitter {" + + " background-position: center -343px;" + + "}" + + "" + + "span.icon.git {" + + " background-position: center -375px;" + + "}" + + "" + + "span.icon.fork {" + + " background-position: center -407px;" + + "}" + + "" + + "/*" + + " content" + + "*/" + + "" + + "#content {" + + " margin: 0 0 0 220px;" + + " padding: 0 20px;" + + " background-color: #fff;" + + " font-family: \"Georgia\", Times New Roman, Times, serif;" + + " position: relative;" + + "}" + + "" + + "#content p {" + + " padding: 7px 0;" + + " color: #333;" + + " font-size: 14px;" + + "}" + + "" + + "#content h1," + + "#content h2," + + "#content h3," + + "#content h4," + + "#content h5 {" + + " font-weight: normal;" + + " padding: 21px 0 7px;" + + "}" + + "" + + "#content h1 {" + + " font-size: 21px;" + + "}" + + "" + + "#content h2 {" + + " padding: 0 0 18px 0;" + + " margin: 0 0 7px 0;" + + " font-weight: normal;" + + " font-size: 21px;" + + " line-height: 24px;" + + " text-align: center;" + + " color: #222;" + + " background-image: url(\"i/arrow.png\");" + + " background-repeat: no-repeat;" + + " background-position: center bottom;" + + " font-family: \"Inconsolata\", Andale Mono, Monaco, Monospace;" + + " text-transform: uppercase;" + + " letter-spacing: 2px;" + + " text-shadow: 1px 1px 0 #fff;" + + "}" + + "" + + "#content h2 a {" + + " color: #222;" + + "}" + + "" + + "#content h2 a:hover," + + "#content h3 a:hover," + + "#content h4 a:hover {" + + " text-decoration: none;" + + "}" + + "" + + "span.sectionMark {" + + " display: block;" + + " color: #aaa;" + + " text-shadow: 1px 1px 0 #fff;" + + " font-size: 15px;" + + " font-family: \"Inconsolata\", Andale Mono, Monaco, Monospace;" + + "}" + + "" + + "#content h3 {" + + " font-size: 17px;" + + "}" + + "" + + "#content h4 {" + + " padding-top: 0;" + + " font-size: 15px;" + + "}" + + "" + + "#content h5 {" + + " font-size: 10px;" + + "}" + + "" + + "#content ul {" + + " list-style-type: disc;" + + "}" + + "" + + "#content ul," + + "#content ol {" + + " /* border-left: 1px solid #333; */" + + " color: #333;" + + " font-size: 14px;" + + " list-style-position: outside;" + + " margin: 7px 0 21px 0;" + + " /* padding: 0 0 0 28px; */" + + "}" + + "" + + "#content ul {" + + " font-style: italic;" + + "}" + + "" + + "#content ol {" + + " border: none;" + + " list-style-position: inside;" + + " padding: 0;" + + " font-family: \"Georgia\", Times New Roman, Times, serif;" + + "}" + + "" + + "#content ul ul," + + "#content ol ol {" + + " border: none;" + + " padding: 0;" + + " margin: 0 0 0 28px;" + + "}" + + "" + + "#content .section {" + + " padding: 48px 0;" + + " background-image: url(\"i/line.png\");" + + " background-repeat: no-repeat;" + + " background-position: center bottom;" + + " width: 576px;" + + " margin: 0 auto;" + + "}" + + "" + + "#content .section .subSection {" + + " padding: 0 0 0 48px;" + + " margin: 28px 0 0 0;" + + " display: block;" + + " border-left: 2px solid #ddd;" + + "}" + + "" + + "#content .section:last-child {" + + " background-image: none;" + + "}" + + "" + + "#content .note {" + + " color: #222;" + + " background-color: #ffff99;" + + " padding: 5px 10px;" + + " margin: 7px 0;" + + " display: inline-block;" + + "}" + + "" + + "/*" + + " page directory" + + "*/" + + "" + + "#content #directory.section {" + + " background-color: #fff;" + + " width: 576px;" + + "}" + + "" + + "#content #directory.section ul ul ul {" + + " margin: 0 0 0 48px;" + + "}" + + "" + + "#content #directory.section ul ul li {" + + " background-image: url(\"i/sprite.png\");" + + " background-repeat: no-repeat;" + + " background-position: left -437px;" + + " padding-left: 18px;" + + " font-style: normal;" + + "}" + + "" + + "#content #directory h1 {" + + " padding: 0 0 65px 0;" + + " margin: 0 0 14px 0;" + + " font-weight: normal;" + + " font-size: 21px;" + + " text-align: center;" + + " text-transform: uppercase;" + + " letter-spacing: 2px;" + + " color: #222;" + + " background-image: url(\"i/arrow-x.png\");" + + " background-repeat: no-repeat;" + + " background-position: center bottom;" + + " font-family: \"Inconsolata\", Andale Mono, Monaco, Monospace;" + + "}" + + "" + + "" + + "#content ul.index {" + + " padding: 0;" + + " background-color: transparent;" + + " border: none;" + + " -moz-box-shadow: none;" + + " font-style: normal;" + + " font-family: \"Inconsolata\", Andale Mono, Monaco, Monospace;" + + "}" + + "" + + "#content ul.index li {" + + " width: 100%;" + + " font-size: 15px;" + + " color: #333;" + + " padding: 0 0 7px 0;" + + "}" + + "" + + "" + + "/*" + + " intro page specific" + + "*/" + + "" + + "#content #intro {" + + " width: 576px;" + + " margin: 0 auto;" + + " padding: 21px 0;" + + "}" + + "" + + "#content #intro p," + + "#content #intro h1 {" + + " font-size: 19px;" + + " line-height: 28px;" + + " color: green;" + + " letter-spacing: 2px;" + + " padding: 0 0 28px 0;" + + "}" + + "" + + "#content #intro p:last-child," + + "#content #intro h1:last-child {" + + " padding: 0;" + + "}" + + "" + + "#content #intro p a {" + + " color: green;" + + " text-decoration: underline;" + + "}" + + "" + + "/*" + + " download page" + + "*/" + + "" + + "#content h4 a.download {" + + " -webkit-border-radius: 5px;" + + " -moz-border-radius: 5px;" + + " background-color: #F2F2F2;" + + " background-image: url(\"i/sprite.png\"), -moz-linear-gradient(center top , #FAFAFA 0%, #F2F2F2 100%);" + + " background-image: url(\"i/sprite.png\"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #f2f2f2));" + + " background-position: 7px -58px, center center;" + + " background-repeat: no-repeat, no-repeat;" + + " border: 1px solid #CCCCCC;" + + " color: #333333;" + + " font-size: 12px;" + + " margin: 0 0 0 5px;" + + " padding: 0 10px 0 25px;" + + " text-shadow: 1px 1px 0 #FFFFFF;" + + "}" + + "" + + "/*" + + " footer" + + "*/" + + "#footer {" + + " color: #4d4d4d;" + + " padding: 65px 20px 20px;" + + " margin: 20px 0 0 220px;" + + " text-align: center;" + + " display: block;" + + " font-size: 13px;" + + " background-image: url(\"i/arrow-x.png\");" + + " background-repeat: no-repeat;" + + " background-position: center top;" + + " background-color: #fff;" + + "}" + + "" + + "#footer .line {" + + " display: block;" + + "}" + + "" + + "#footer .line a {" + + " color: #4d4d4d;" + + " text-decoration: underline;" + + "}" + + "" + + "/*" + + " Pygments manni style" + + "*/" + + "" + + "code {background-color: #fafafa; color: #333;}" + + "" + + "code .comment {color: green; font-style: italic}" + + "code .comment.preproc {color: #099; font-style: normal}" + + "code .comment.special {font-weight: bold}" + + "" + + "code .keyword {color: #069; font-weight: bold}" + + "code .keyword.pseudo {font-weight: normal}" + + "code .keyword.type {color: #078}" + + "" + + "code .operator {color: #555}" + + "code .operator.word {color: #000; font-weight: bold}" + + "" + + "code .name.builtin {color: #366}" + + "code .name.function {color: #c0f}" + + "code .name.class {color: #0a8; font-weight: bold}" + + "code .name.namespace {color: #0cf; font-weight: bold}" + + "code .name.exception {color: #c00; font-weight: bold}" + + "code .name.variable {color: #033}" + + "code .name.constant {color: #360}" + + "code .name.label {color: #99f}" + + "code .name.entity {color: #999; font-weight: bold}" + + "code .name.attribute {color: #309}" + + "code .name.tag {color: #309; font-weight: bold}" + + "code .name.decorator {color: #99f}" + + "" + + "code .string {color: #c30}" + + "code .string.doc {font-style: italic}" + + "code .string.interpol {color: #a00}" + + "code .string.escape {color: #c30; font-weight: bold}" + + "code .string.regex {color: #3aa}" + + "code .string.symbol {color: #fc3}" + + "code .string.other {color: #c30}" + + "" + + "code .number {color: #f60}" + + "" + + "" + + "/*" + + " webkit scroll bars" + + "*/" + + "" + + "pre::-webkit-scrollbar {" + + " width: 6px;" + + " height: 6px;" + + "}" + + "" + + "pre::-webkit-scrollbar-button:start:decrement," + + "pre::-webkit-scrollbar-button:end:increment {" + + " display: block;" + + " height: 0;" + + " width: 0;" + + "}" + + "" + + "pre::-webkit-scrollbar-button:vertical:increment," + + "pre::-webkit-scrollbar-button:horizontal:increment {" + + " background-color: transparent;" + + " display: block;" + + " height: 0;" + + " width: 0;" + + "}" + + "" + + "pre::-webkit-scrollbar-track-piece {" + + " -webkit-border-radius: 3px;" + + "}" + + "" + + "pre::-webkit-scrollbar-thumb:vertical {" + + " background-color: #aaa;" + + " -webkit-border-radius: 3px;" + + "" + + "}" + + "" + + "pre::-webkit-scrollbar-thumb:horizontal {" + + " background-color: #aaa;" + + " -webkit-border-radius: 3px;" + + "}" + + "" + + "/*" + + " hbox" + + "*/" + + "" + + ".hbox {" + + " display: -webkit-box;" + + " -webkit-box-orient: horizontal;" + + " -webkit-box-align: stretch;" + + "" + + " display: -moz-box;" + + " -moz-box-orient: horizontal;" + + " -moz-box-align: stretch;" + + "" + + " display: box;" + + " box-orient: horizontal;" + + " box-align: stretch;" + + "" + + " width: 100%;" + + "}" + + "" + + ".hbox > * {" + + " -webkit-box-flex: 0;" + + " -moz-box-flex: 0;" + + " box-flex: 0;" + + " display: block;" + + "}" + + "" + + ".vbox {" + + " display: -webkit-box;" + + " -webkit-box-orient: vertical;" + + " -webkit-box-align: stretch;" + + "" + + " display: -moz-box;" + + " -moz-box-orient: vertical;" + + " -moz-box-align: stretch;" + + "" + + " display: box;" + + " box-orient: vertical;" + + " box-align: stretch;" + + "}" + + "" + + ".vbox > * {" + + " -webkit-box-flex: 0;" + + " -moz-box-flex: 0;" + + " box-flex: 0;" + + " display: block;" + + "}" + + "" + + ".spacer {" + + " -webkit-box-flex: 1;" + + " -moz-box-flex: 1;" + + " box-flex: 1;" + + "}" + + "" + + ".reverse {" + + " -webkit-box-direction: reverse;" + + " -moz-box-direction: reverse;" + + " box-direction: reverse;" + + "}" + + "" + + ".boxFlex0 {" + + " -webkit-box-flex: 0;" + + " -moz-box-flex: 0;" + + " box-flex: 0;" + + "}" + + "" + + ".boxFlex1, .boxFlex {" + + " -webkit-box-flex: 1;" + + " -moz-box-flex: 1;" + + " box-flex: 1;" + + "}" + + "" + + ".boxFlex2 {" + + " -webkit-box-flex: 2;" + + " -moz-box-flex: 2;" + + " box-flex: 2;" + + "}" + + "" + + ".boxGroup1 {" + + " -webkit-box-flex-group: 1;" + + " -moz-box-flex-group: 1;" + + " box-flex-group: 1;" + + "}" + + "" + + ".boxGroup2 {" + + " -webkit-box-flex-group: 2;" + + " -moz-box-flex-group: 2;" + + " box-flex-group: 2;" + + "}" + + "" + + ".start {" + + " -webkit-box-pack: start;" + + " -moz-box-pack: start;" + + " box-pack: start;" + + "}" + + "" + + ".end {" + + " -webkit-box-pack: end;" + + " -moz-box-pack: end;" + + " box-pack: end;" + + "}" + + "" + + ".center {" + + " -webkit-box-pack: center;" + + " -moz-box-pack: center;" + + " box-pack: center;" + + "}" + + "" + + "/*" + + " clearfix" + + "*/" + + "" + + ".clearfix:after {" + + " content: \".\";" + + " display: block;" + + " clear: both;" + + " visibility: hidden;" + + " line-height: 0;" + + " height: 0;" + + "}" + + "" + + "html[xmlns] .clearfix {" + + " display: block;" + + "}" + + "" + + "* html .clearfix {" + + " height: 1%;" + + "}"); + +define("text/lib/ace/css/editor.css", [], ".ace_editor {" + + " position: absolute;" + + " overflow: hidden;" + + " font-family: Monaco, \"Menlo\", \"Courier New\", monospace;" + + " font-size: 12px;" + + "}" + + "" + + ".ace_scroller {" + + " position: absolute;" + + " overflow-x: scroll;" + + " overflow-y: hidden;" + + "}" + + "" + + ".ace_content {" + + " position: absolute;" + + " box-sizing: border-box;" + + " -moz-box-sizing: border-box;" + + " -webkit-box-sizing: border-box;" + + "}" + + "" + + ".ace_composition {" + + " position: absolute;" + + " background: #555;" + + " color: #DDD;" + + " z-index: 4;" + + "}" + + "" + + ".ace_gutter {" + + " position: absolute;" + + " overflow-x: hidden;" + + " overflow-y: hidden;" + + " height: 100%;" + + "}" + + "" + + ".ace_gutter-cell.ace_error {" + + " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B\");" + + " background-repeat: no-repeat;" + + " background-position: 4px center;" + + "}" + + "" + + ".ace_gutter-cell.ace_warning {" + + " background-image: url(\"data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B\");" + + " background-repeat: no-repeat;" + + " background-position: 4px center;" + + "}" + + "" + + ".ace_editor .ace_sb {" + + " position: absolute;" + + " overflow-x: hidden;" + + " overflow-y: scroll;" + + " right: 0;" + + "}" + + "" + + ".ace_editor .ace_sb div {" + + " position: absolute;" + + " width: 1px;" + + " left: 0;" + + "}" + + "" + + ".ace_editor .ace_print_margin_layer {" + + " z-index: 0;" + + " position: absolute;" + + " overflow: hidden;" + + " margin: 0;" + + " left: 0;" + + " height: 100%;" + + " width: 100%;" + + "}" + + "" + + ".ace_editor .ace_print_margin {" + + " position: absolute;" + + " height: 100%;" + + "}" + + "" + + ".ace_editor textarea {" + + " position: fixed;" + + " z-index: -1;" + + " width: 10px;" + + " height: 30px;" + + " opacity: 0;" + + " background: transparent;" + + " appearance: none;" + + " -moz-appearance: none;" + + " border: none;" + + " resize: none;" + + " outline: none;" + + " overflow: hidden;" + + "}" + + "" + + ".ace_layer {" + + " z-index: 1;" + + " position: absolute;" + + " overflow: hidden;" + + " white-space: nowrap;" + + " height: 100%;" + + " width: 100%;" + + "}" + + "" + + ".ace_text-layer {" + + " color: black;" + + "}" + + "" + + ".ace_cjk {" + + " display: inline-block;" + + " text-align: center;" + + "}" + + "" + + ".ace_cursor-layer {" + + " z-index: 4;" + + " cursor: text;" + + " /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */" + + "}" + + "" + + ".ace_cursor {" + + " z-index: 4;" + + " position: absolute;" + + "}" + + "" + + ".ace_cursor.ace_hidden {" + + " opacity: 0.2;" + + "}" + + "" + + ".ace_line {" + + " white-space: nowrap;" + + "}" + + "" + + ".ace_marker-layer {" + + " cursor: text;" + + " pointer-events: none;" + + "}" + + "" + + ".ace_marker-layer .ace_step {" + + " position: absolute;" + + " z-index: 3;" + + "}" + + "" + + ".ace_marker-layer .ace_selection {" + + " position: absolute;" + + " z-index: 4;" + + "}" + + "" + + ".ace_marker-layer .ace_bracket {" + + " position: absolute;" + + " z-index: 5;" + + "}" + + "" + + ".ace_marker-layer .ace_active_line {" + + " position: absolute;" + + " z-index: 2;" + + "}" + + "" + + ".ace_marker-layer .ace_selected_word {" + + " position: absolute;" + + " z-index: 6;" + + " box-sizing: border-box;" + + " -moz-box-sizing: border-box;" + + " -webkit-box-sizing: border-box;" + + "}" + + "" + + ".ace_line .ace_fold {" + + " cursor: pointer;" + + "}" + + "" + + ".ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer {" + + " cursor: move;" + + "}" + + ""); + +define("text/node_modules/uglify-js/docstyle.css", [], "html { font-family: \"Lucida Grande\",\"Trebuchet MS\",sans-serif; font-size: 12pt; }" + + "body { max-width: 60em; }" + + ".title { text-align: center; }" + + ".todo { color: red; }" + + ".done { color: green; }" + + ".tag { background-color:lightblue; font-weight:normal }" + + ".target { }" + + ".timestamp { color: grey }" + + ".timestamp-kwd { color: CadetBlue }" + + "p.verse { margin-left: 3% }" + + "pre {" + + " border: 1pt solid #AEBDCC;" + + " background-color: #F3F5F7;" + + " padding: 5pt;" + + " font-family: monospace;" + + " font-size: 90%;" + + " overflow:auto;" + + "}" + + "pre.src {" + + " background-color: #eee; color: #112; border: 1px solid #000;" + + "}" + + "table { border-collapse: collapse; }" + + "td, th { vertical-align: top; }" + + "dt { font-weight: bold; }" + + "div.figure { padding: 0.5em; }" + + "div.figure p { text-align: center; }" + + ".linenr { font-size:smaller }" + + ".code-highlighted {background-color:#ffff00;}" + + ".org-info-js_info-navigation { border-style:none; }" + + "#org-info-js_console-label { font-size:10px; font-weight:bold;" + + " white-space:nowrap; }" + + ".org-info-js_search-highlight {background-color:#ffff00; color:#000000;" + + " font-weight:bold; }" + + "" + + "sup {" + + " vertical-align: baseline;" + + " position: relative;" + + " top: -0.5em;" + + " font-size: 80%;" + + "}" + + "" + + "sup a:link, sup a:visited {" + + " text-decoration: none;" + + " color: #c00;" + + "}" + + "" + + "sup a:before { content: \"[\"; color: #999; }" + + "sup a:after { content: \"]\"; color: #999; }" + + "" + + "h1.title { border-bottom: 4px solid #000; padding-bottom: 5px; margin-bottom: 2em; }" + + "" + + "#postamble {" + + " color: #777;" + + " font-size: 90%;" + + " padding-top: 1em; padding-bottom: 1em; border-top: 1px solid #999;" + + " margin-top: 2em;" + + " padding-left: 2em;" + + " padding-right: 2em;" + + " text-align: right;" + + "}" + + "" + + "#postamble p { margin: 0; }" + + "" + + "#footnotes { border-top: 1px solid #000; }" + + "" + + "h1 { font-size: 200% }" + + "h2 { font-size: 175% }" + + "h3 { font-size: 150% }" + + "h4 { font-size: 125% }" + + "" + + "h1, h2, h3, h4 { font-family: \"Bookman\",Georgia,\"Times New Roman\",serif; font-weight: normal; }" + + "" + + "@media print {" + + " html { font-size: 11pt; }" + + "}" + + ""); + +define("text/support/cockpit/lib/cockpit/ui/cli_view.css", [], "" + + "#cockpitInput { padding-left: 16px; }" + + "" + + ".cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }" + + "" + + ".cptCompletion { padding: 0; position: absolute; z-index: -1000; }" + + ".cptCompletion.VALID { background: #FFF; }" + + ".cptCompletion.INCOMPLETE { background: #DDD; }" + + ".cptCompletion.INVALID { background: #DDD; }" + + ".cptCompletion span { color: #FFF; }" + + ".cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }" + + ".cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }" + + "span.cptPrompt { color: #66F; font-weight: bold; }" + + "" + + "" + + ".cptHints {" + + " color: #000;" + + " position: absolute;" + + " border: 1px solid rgba(230, 230, 230, 0.8);" + + " background: rgba(250, 250, 250, 0.8);" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 10px; border-top-right-radius: 10px;" + + " z-index: 1000;" + + " padding: 8px;" + + " display: none;" + + "}" + + "" + + ".cptFocusPopup { display: block; }" + + ".cptFocusPopup.cptNoPopup { display: none; }" + + "" + + ".cptHints ul { margin: 0; padding: 0 15px; }" + + "" + + ".cptGt { font-weight: bold; font-size: 120%; }" + + ""); + +define("text/support/cockpit/lib/cockpit/ui/request_view.css", [], "" + + ".cptRowIn {" + + " display: box; display: -moz-box; display: -webkit-box;" + + " box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal;" + + " box-align: center; -moz-box-align: center; -webkit-box-align: center;" + + " color: #333;" + + " background-color: #EEE;" + + " width: 100%;" + + " font-family: consolas, courier, monospace;" + + "}" + + ".cptRowIn > * { padding-left: 2px; padding-right: 2px; }" + + ".cptRowIn > img { cursor: pointer; }" + + ".cptHover { display: none; }" + + ".cptRowIn:hover > .cptHover { display: block; }" + + ".cptRowIn:hover > .cptHover.cptHidden { display: none; }" + + ".cptOutTyped {" + + " box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1;" + + " font-weight: bold; color: #000; font-size: 120%;" + + "}" + + ".cptRowOutput { padding-left: 10px; line-height: 1.2em; }" + + ".cptRowOutput strong," + + ".cptRowOutput b," + + ".cptRowOutput th," + + ".cptRowOutput h1," + + ".cptRowOutput h2," + + ".cptRowOutput h3 { color: #000; }" + + ".cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }" + + ".cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }" + + ".cptRowOutput input[type=password]," + + ".cptRowOutput input[type=text]," + + ".cptRowOutput textarea {" + + " color: #000; font-size: 120%;" + + " background: transparent; padding: 3px;" + + " border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;" + + "}" + + ".cptRowOutput table," + + ".cptRowOutput td," + + ".cptRowOutput th { border: 0; padding: 0 2px; }" + + ".cptRowOutput .right { text-align: right; }" + + ""); + +define("text/tool/Theme.tmpl.css", [], ".%cssClass% .ace_editor {" + + " border: 2px solid rgb(159, 159, 159);" + + "}" + + "" + + ".%cssClass% .ace_editor.ace_focus {" + + " border: 2px solid #327fbd;" + + "}" + + "" + + ".%cssClass% .ace_gutter {" + + " width: 50px;" + + " background: #e8e8e8;" + + " color: #333;" + + " overflow : hidden;" + + "}" + + "" + + ".%cssClass% .ace_gutter-layer {" + + " width: 100%;" + + " text-align: right;" + + "}" + + "" + + ".%cssClass% .ace_gutter-layer .ace_gutter-cell {" + + " padding-right: 6px;" + + "}" + + "" + + ".%cssClass% .ace_print_margin {" + + " width: 1px;" + + " background: %printMargin%;" + + "}" + + "" + + ".%cssClass% .ace_scroller {" + + " background-color: %background%;" + + "}" + + "" + + ".%cssClass% .ace_text-layer {" + + " cursor: text;" + + " color: %foreground%;" + + "}" + + "" + + ".%cssClass% .ace_cursor {" + + " border-left: 2px solid %cursor%;" + + "}" + + "" + + ".%cssClass% .ace_cursor.ace_overwrite {" + + " border-left: 0px;" + + " border-bottom: 1px solid %overwrite%;" + + "}" + + " " + + ".%cssClass% .ace_marker-layer .ace_selection {" + + " background: %selection%;" + + "}" + + "" + + ".%cssClass% .ace_marker-layer .ace_step {" + + " background: %step%;" + + "}" + + "" + + ".%cssClass% .ace_marker-layer .ace_bracket {" + + " margin: -1px 0 0 -1px;" + + " border: 1px solid %bracket%;" + + "}" + + "" + + ".%cssClass% .ace_marker-layer .ace_active_line {" + + " background: %active_line%;" + + "}" + + "" + + " " + + ".%cssClass% .ace_invisible {" + + " %invisible%" + + "}" + + "" + + ".%cssClass% .ace_keyword {" + + " %keyword%" + + "}" + + "" + + ".%cssClass% .ace_keyword.ace_operator {" + + " %keyword.operator%" + + "}" + + "" + + ".%cssClass% .ace_constant {" + + " %constant%" + + "}" + + "" + + ".%cssClass% .ace_constant.ace_language {" + + " %constant.language%" + + "}" + + "" + + ".%cssClass% .ace_constant.ace_library {" + + " %constant.library%" + + "}" + + "" + + ".%cssClass% .ace_constant.ace_numeric {" + + " %constant.numeric%" + + "}" + + "" + + ".%cssClass% .ace_invalid {" + + " %invalid%" + + "}" + + "" + + ".%cssClass% .ace_invalid.ace_illegal {" + + " %invalid.illegal%" + + "}" + + "" + + ".%cssClass% .ace_invalid.ace_deprecated {" + + " %invalid.deprecated%" + + "}" + + "" + + ".%cssClass% .ace_support {" + + " %support%" + + "}" + + "" + + ".%cssClass% .ace_support.ace_function {" + + " %support.function%" + + "}" + + "" + + ".%cssClass% .ace_function.ace_buildin {" + + " %function.buildin%" + + "}" + + "" + + ".%cssClass% .ace_string {" + + " %string%" + + "}" + + "" + + ".%cssClass% .ace_string.ace_regexp {" + + " %string.regexp%" + + "}" + + "" + + ".%cssClass% .ace_comment {" + + " %comment%" + + "}" + + "" + + ".%cssClass% .ace_comment.ace_doc {" + + " %comment.doc%" + + "}" + + "" + + ".%cssClass% .ace_comment.ace_doc.ace_tag {" + + " %comment.doc.tag%" + + "}" + + "" + + ".%cssClass% .ace_variable {" + + " %variable%" + + "}" + + "" + + ".%cssClass% .ace_variable.ace_language {" + + " %variable.language%" + + "}" + + "" + + ".%cssClass% .ace_xml_pe {" + + " %xml_pe%" + + "}" + + "" + + ".%cssClass% .ace_collab.ace_user1 {" + + " %collab.user1% " + + "}"); + +define("text/styles.css", [], "html {" + + " height: 100%;" + + " width: 100%;" + + " overflow: hidden;" + + "}" + + "" + + "body {" + + " overflow: hidden;" + + " margin: 0;" + + " padding: 0;" + + " height: 100%;" + + " width: 100%;" + + " font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif;" + + " font-size: 12px;" + + " background: rgb(14, 98, 165);" + + " color: white;" + + "}" + + "" + + "#logo {" + + " padding: 15px;" + + " margin-left: 65px;" + + "}" + + "" + + "#editor {" + + " position: absolute;" + + " top: 0px;" + + " left: 280px;" + + " bottom: 0px;" + + " right: 0px;" + + " background: white;" + + "}" + + "" + + "#controls {" + + " padding: 5px;" + + "}" + + "" + + "#controls td {" + + " text-align: right;" + + "}" + + "" + + "#controls td + td {" + + " text-align: left;" + + "}" + + "" + + "#cockpitInput {" + + " position: absolute;" + + " left: 280px;" + + " right: 0px;" + + " bottom: 0;" + + "" + + " border: none; outline: none;" + + " font-family: consolas, courier, monospace;" + + " font-size: 120%;" + + "}" + + "" + + "#cockpitOutput {" + + " padding: 10px;" + + " margin: 0 15px;" + + " border: 1px solid #AAA;" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 4px; border-top-right-radius: 4px;" + + " background: #DDD; color: #000;" + + "}"); + +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +require(["ace/ace"], function(ace) { + window.ace = ace; +}); \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/ace.js b/src/bb-modules/Filemanager/src/ace/ace.js new file mode 100644 index 000000000..2e0b056b9 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/ace.js @@ -0,0 +1 @@ +(function(){var a=function(){return this}();if(a.require&&a.define)require.packaged=!0;else{var b=function(a,c,d){typeof a!="string"?b.original?b.original.apply(window,arguments):(console.error("dropping module because define wasn't a string."),console.trace()):(arguments.length==2&&(d=c),define.modules||(define.modules={}),define.modules[a]=d)};a.define&&(b.original=a.define),a.define=b;var c=function(a,b){if(Object.prototype.toString.call(a)==="[object Array]"){var e=[];for(var f=0,g=a.length;f=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=2)var d=arguments[1];else do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0);for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||0;if(c>=b)return-1;c<0&&(c+=b);for(;c=0;c--){if(!h(this,c))continue;if(a===this[c])return c}return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype});if(!Object.getOwnPropertyDescriptor){var n="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(n+a);if(!h(a,b))return undefined;var c,d,e;c={enumerable:!0,configurable:!0};if(m){var f=a.__proto__;a.__proto__=g;var d=k(a,b),e=l(a,b);a.__proto__=f;if(d||e){d&&(descriptor.get=d),e&&(descriptor.set=e);return descriptor}}descriptor.value=a[b];return descriptor}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}typeof b!="undefined"&&Object.defineProperties(c,b);return c});if(!Object.defineProperty){var o="Property description must be an object: ",p="Object.defineProperty called on non-object: ",q="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function")throw new TypeError(p+a);if(typeof a!="object"||a===null)throw new TypeError(o+c);if(h(c,"value"))if(m&&(k(a,b)||l(a,b))){var d=a.__proto__;a.__proto__=g,delete a[b],a[b]=c.value,a.prototype}else a[b]=c.value;else{if(!m)throw new TypeError(q);h(c,"get")&&i(a,b,c.get),h(c,"set")&&j(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)h(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(r){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){return!0});if(!Object.keys){var s=!0,t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=t.length;for(var v in{toString:null})s=!1;Object.keys=function W(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var W=[];for(var b in a)h(a,b)&&W.push(b);if(s)for(var c=0,d=u;c=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;k.constructor=b;return k}return a.apply(this,arguments)},c=new RegExp("^(?:((?:[+-]\\d\\d)?\\d\\d\\d\\d)(?:-(\\d\\d)(?:-(\\d\\d))?)?)?(?:T(\\d\\d):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?)?(?:Z|([+-])(\\d\\d):(\\d\\d))?$");for(var d in a)b[d]=a[d];b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function e(b){var d=c.exec(b);if(d){d.shift();var e=d[0]===undefined;for(var f=0;f<10;f++){if(f===7)continue;d[f]=+(d[f]||(f<3?1:0)),f===1&&d[f]--}if(e)return((d[3]*60+d[4])*60+d[5])*1e3+d[6];var g=(d[8]*60+d[9])*60*1e3;d[6]==="-"&&(g=-g);return a.UTC.apply(this,d.slice(0,7))+g}return a.parse.apply(this,arguments)};return b}(Date));if(!String.prototype.trim){var w=/^\s\s*/,x=/\s\s*$/;String.prototype.trim=function(){return String(this).replace(w,"").replace(x,"")}}}),define("ace/ace",["require","exports","module","pilot/index","pilot/fixoldbrowsers","pilot/plugin_manager","pilot/dom","pilot/event","ace/editor","ace/edit_session","ace/undomanager","ace/virtual_renderer","ace/theme/textmate","pilot/environment"],function(a,b,c){a("pilot/index"),a("pilot/fixoldbrowsers");var d=a("pilot/plugin_manager").catalog;d.registerPlugins(["pilot/index"]);var e=a("pilot/dom"),f=a("pilot/event"),g=a("ace/editor").Editor,h=a("ace/edit_session").EditSession,i=a("ace/undomanager").UndoManager,j=a("ace/virtual_renderer").VirtualRenderer;b.edit=function(b){typeof b=="string"&&(b=document.getElementById(b));var c=new h(e.getInnerText(b));c.setUndoManager(new i),b.innerHTML="";var k=new g(new j(b,a("ace/theme/textmate")));k.setSession(c);var l=a("pilot/environment").create();d.startupPlugins({env:l}).then(function(){l.document=c,l.editor=k,k.resize(),f.addListener(window,"resize",function(){k.resize()}),b.env=l}),k.env=l;return k}}),define("pilot/index",["require","exports","module","pilot/fixoldbrowsers","pilot/types/basic","pilot/types/command","pilot/types/settings","pilot/commands/settings","pilot/commands/basic","pilot/settings/canon","pilot/canon"],function(a,b,c){b.startup=function(b,c){a("pilot/fixoldbrowsers"),a("pilot/types/basic").startup(b,c),a("pilot/types/command").startup(b,c),a("pilot/types/settings").startup(b,c),a("pilot/commands/settings").startup(b,c),a("pilot/commands/basic").startup(b,c),a("pilot/settings/canon").startup(b,c),a("pilot/canon").startup(b,c)},b.shutdown=function(b,c){a("pilot/types/basic").shutdown(b,c),a("pilot/types/command").shutdown(b,c),a("pilot/types/settings").shutdown(b,c),a("pilot/commands/settings").shutdown(b,c),a("pilot/commands/basic").shutdown(b,c),a("pilot/settings/canon").shutdown(b,c),a("pilot/canon").shutdown(b,c)}}),define("pilot/types/basic",["require","exports","module","pilot/types"],function(a,b,c){function m(a){if(a instanceof e)this.subtype=a;else{if(typeof a!="string")throw new Error("Can' handle array subtype");this.subtype=d.getType(a);if(this.subtype==null)throw new Error("Unknown array subtype: "+a)}}function l(a){if(typeof a.defer!="function")throw new Error("Instances of DeferredType need typeSpec.defer to be a function that returns a type");Object.keys(a).forEach(function(b){this[b]=a[b]},this)}function j(a){if(!Array.isArray(a.data)&&typeof a.data!="function")throw new Error("instances of SelectionType need typeSpec.data to be an array or function that returns an array:"+JSON.stringify(a));Object.keys(a).forEach(function(b){this[b]=a[b]},this)}var d=a("pilot/types"),e=d.Type,f=d.Conversion,g=d.Status,h=new e;h.stringify=function(a){return a},h.parse=function(a){if(typeof a!="string")throw new Error("non-string passed to text.parse()");return new f(a)},h.name="text";var i=new e;i.stringify=function(a){return a?""+a:null},i.parse=function(a){if(typeof a!="string")throw new Error("non-string passed to number.parse()");if(a.replace(/\s/g,"").length===0)return new f(null,g.INCOMPLETE,"");var b=new f(parseInt(a,10));isNaN(b.value)&&(b.status=g.INVALID,b.message="Can't convert \""+a+'" to a number.');return b},i.decrement=function(a){return a-1},i.increment=function(a){return a+1},i.name="number",j.prototype=new e,j.prototype.stringify=function(a){return a},j.prototype.parse=function(a){if(typeof a!="string")throw new Error("non-string passed to parse()");if(!this.data)throw new Error("Missing data on selection type extension.");var b=typeof this.data=="function"?this.data():this.data,c=!1,d,e=[];b.forEach(function(b){a==b?(d=this.fromString(b),c=!0):b.indexOf(a)===0&&e.push(this.fromString(b))},this);if(c)return new f(d);this.noMatch&&this.noMatch();if(e.length>0){var h="Possibilities"+(a.length===0?"":" for '"+a+"'");return new f(null,g.INCOMPLETE,h,e)}var h="Can't use '"+a+"'.";return new f(null,g.INVALID,h,e)},j.prototype.fromString=function(a){return a},j.prototype.decrement=function(a){var b=typeof this.data=="function"?this.data():this.data,c;if(a==null)c=b.length-1;else{var d=this.stringify(a),c=b.indexOf(d);c=c===0?b.length-1:c-1}return this.fromString(b[c])},j.prototype.increment=function(a){var b=typeof this.data=="function"?this.data():this.data,c;if(a==null)c=0;else{var d=this.stringify(a),c=b.indexOf(d);c=c===b.length-1?0:c+1}return this.fromString(b[c])},j.prototype.name="selection",b.SelectionType=j;var k=new j({name:"bool",data:["true","false"],stringify:function(a){return""+a},fromString:function(a){return a==="true"?!0:!1}});l.prototype=new e,l.prototype.stringify=function(a){return this.defer().stringify(a)},l.prototype.parse=function(a){return this.defer().parse(a)},l.prototype.decrement=function(a){var b=this.defer();return b.decrement?b.decrement(a):undefined},l.prototype.increment=function(a){var b=this.defer();return b.increment?b.increment(a):undefined},l.prototype.name="deferred",b.DeferredType=l,m.prototype=new e,m.prototype.stringify=function(a){return a.join(" ")},m.prototype.parse=function(a){return this.defer().parse(a)},m.prototype.name="array";var n=!1;b.startup=function(){n||(n=!0,d.registerType(h),d.registerType(i),d.registerType(k),d.registerType(j),d.registerType(l),d.registerType(m))},b.shutdown=function(){n=!1,d.unregisterType(h),d.unregisterType(i),d.unregisterType(k),d.unregisterType(j),d.unregisterType(l),d.unregisterType(m)}}),define("pilot/types",["require","exports","module"],function(a,b,c){function h(a,b){if(a.substr(-2)==="[]"){var c=a.slice(0,-2);return new g.array(c)}var d=g[a];typeof d=="function"&&(d=new d(b));return d}function f(){}function e(a,b,c,e){this.value=a,this.status=b||d.VALID,this.message=c,this.predictions=e||[]}var d={VALID:{toString:function(){return"VALID"},valueOf:function(){return 0}},INCOMPLETE:{toString:function(){return"INCOMPLETE"},valueOf:function(){return 1}},INVALID:{toString:function(){return"INVALID"},valueOf:function(){return 2}},combine:function(a){var b=d.VALID;for(var c=0;cb.valueOf()&&(b=a[c]);return b}};b.Status=d,b.Conversion=e,f.prototype={stringify:function(a){throw new Error("not implemented")},parse:function(a){throw new Error("not implemented")},name:undefined,increment:function(a){return undefined},decrement:function(a){return undefined},getDefault:function(){return this.parse("")}},b.Type=f;var g={};b.registerType=function(a){if(typeof a=="object"){if(!(a instanceof f))throw new Error("Can't registerType using: "+a);if(!a.name)throw new Error("All registered types must have a name");g[a.name]=a}else{if(typeof a!="function")throw new Error("Unknown type: "+a);if(!a.prototype.name)throw new Error("All registered types must have a name");g[a.prototype.name]=a}},b.registerTypes=function(a){Object.keys(a).forEach(function(c){var d=a[c];d.name=c,b.registerType(d)})},b.deregisterType=function(a){delete g[a.name]},b.getType=function(a){if(typeof a=="string")return h(a);if(typeof a=="object"){if(!a.name)throw new Error("Missing 'name' member to typeSpec");return h(a.name,a)}throw new Error("Can't extract type from "+a)}}),define("pilot/types/command",["require","exports","module","pilot/canon","pilot/types/basic","pilot/types"],function(a,b,c){var d=a("pilot/canon"),e=a("pilot/types/basic").SelectionType,f=a("pilot/types"),g=new e({name:"command",data:function(){return d.getCommandNames()},stringify:function(a){return a.name},fromString:function(a){return d.getCommand(a)}});b.startup=function(){f.registerType(g)},b.shutdown=function(){f.unregisterType(g)}}),define("pilot/canon",["require","exports","module","pilot/console","pilot/stacktrace","pilot/oop","pilot/useragent","pilot/keys","pilot/event_emitter","pilot/typecheck","pilot/catalog","pilot/types","pilot/lang"],function(a,b,c){function J(a){a=a||{},this.command=a.command,this.args=a.args,this.typed=a.typed,this._begunOutput=!1,this.start=new Date,this.end=null,this.completed=!1,this.error=!1}function G(a,b,c,e,f){function h(){a.exec(b,g.args,g),!g.isAsync&&!g.isDone&&g.done()}typeof a=="string"&&(a=q[a]);if(!a)return!1;var g=new J({sender:c,command:a,args:e||{},typed:f});if(g.getStatus()==l.INVALID){d.error("Canon.exec: Invalid parameter(s) passed to "+a.name);return!1}if(g.getStatus()==l.INCOMPLETE){var i,j=b[c];if(!j||!j.getArgsProvider||!(i=j.getArgsProvider()))i=F;i(g,function(){g.getStatus()==l.VALID&&h()});return!0}h();return!0}function F(a,b){var c=a.args,d=a.command.params;for(var e=0;eI)H.shiftObject();b._dispatchEvent("output",{requests:H,request:this})},J.prototype.doneWithError=function(a){this.error=!0,this.done(a)},J.prototype.async=function(){this.isAsync=!0,this._begunOutput||this._beginOutput()},J.prototype.output=function(a){this._begunOutput||this._beginOutput(),typeof a!="string"&&!(a instanceof Node)&&(a=a.toString()),this.outputs.push(a),this.isDone=!0,this._dispatchEvent("output",{});return this},J.prototype.done=function(a){this.completed=!0,this.end=new Date,this.duration=this.end.getTime()-this.start.getTime(),a&&this.output(a),this.isDone||(this.isDone=!0,this._dispatchEvent("output",{}))},b.Request=J}),define("pilot/console",["require","exports","module"],function(a,b,c){var d=function(){},e=["assert","count","debug","dir","dirxml","error","group","groupEnd","info","log","profile","profileEnd","time","timeEnd","trace","warn"];typeof window=="undefined"?e.forEach(function(a){b[a]=function(){var b=Array.prototype.slice.call(arguments),c={op:"log",method:a,args:b};postMessage(JSON.stringify(c))}}):e.forEach(function(a){window.console&&window.console[a]?b[a]=Function.prototype.bind.call(window.console[a],window.console):b[a]=d})}),define("pilot/stacktrace",["require","exports","module","pilot/useragent","pilot/console"],function(a,b,c){function i(){}function g(a){for(var b=0;b\s*\(/gm,"{anonymous}()@").split("\n")},firefox:function(a){var b=a.stack;if(!b){e.log(a);return[]}b=b.replace(/(?:\n@:0)?\s+$/m,""),b=b.replace(/^\(/gm,"{anonymous}(");return b.split("\n")},opera:function(a){var b=a.message.split("\n"),c="{anonymous}",d=/Line\s+(\d+).*?script\s+(http\S+)(?:.*?in\s+function\s+(\S+))?/i,e,f,g;for(e=4,f=0,g=b.length;e=0,b.isIPad=e.indexOf("iPad")>=0,b.OS={LINUX:"LINUX",MAC:"MAC",WINDOWS:"WINDOWS"},b.getOS=function(){return b.isMac?b.OS.MAC:b.isLinux?b.OS.LINUX:b.OS.WINDOWS}}),define("pilot/oop",["require","exports","module"],function(a,b,c){b.inherits=function(){var a=function(){};return function(b,c){a.prototype=c.prototype,b.super_=c.prototype,b.prototype=new a,b.prototype.constructor=b}}(),b.mixin=function(a,b){for(var c in b)a[c]=b[c]},b.implement=function(a,c){b.mixin(a,c)}}),define("pilot/keys",["require","exports","module","pilot/oop"],function(a,b,c){var d=a("pilot/oop"),e=function(){var a={MODIFIER_KEYS:{16:"Shift",17:"Ctrl",18:"Alt",224:"Meta"},KEY_MODS:{ctrl:1,alt:2,option:2,shift:4,meta:8,command:8},FUNCTION_KEYS:{8:"Backspace",9:"Tab",13:"Return",19:"Pause",27:"Esc",32:"Space",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"Left",38:"Up",39:"Right",40:"Down",44:"Print",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"Numlock",145:"Scrolllock"},PRINTABLE_KEYS:{32:" ",48:"0",49:"1",50:"2",51:"3",52:"4",53:"5",54:"6",55:"7",56:"8",57:"9",59:";",61:"=",65:"a",66:"b",67:"c",68:"d",69:"e",70:"f",71:"g",72:"h",73:"i",74:"j",75:"k",76:"l",77:"m",78:"n",79:"o",80:"p",81:"q",82:"r",83:"s",84:"t",85:"u",86:"v",87:"w",88:"x",89:"y",90:"z",107:"+",109:"-",110:".",188:",",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:'"'}};for(i in a.FUNCTION_KEYS){var b=a.FUNCTION_KEYS[i].toUpperCase();a[b]=parseInt(i,10)}d.mixin(a,a.MODIFIER_KEYS),d.mixin(a,a.PRINTABLE_KEYS),d.mixin(a,a.FUNCTION_KEYS);return a}();d.mixin(b,e),b.keyCodeToString=function(a){return(e[a]||String.fromCharCode(a)).toLowerCase()}}),define("pilot/event_emitter",["require","exports","module"],function(a,b,c){var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!!c&&!!c.length){var b=b||{};b.type=a;for(var d=0;d'+c.name+" = "+c.value+"
        "})}else b.value===undefined?d=""+setting.name+" = "+setting.get():(b.setting.set(b.value),d="Setting: "+b.setting.name+" = "+b.setting.get());c.done(d)}},e={name:"unset",params:[{name:"setting",type:"setting",description:"The name of the setting to return to defaults"}],description:"unset a setting entirely",exec:function(a,b,c){var d=a.settings.get(b.setting);d?(d.reset(),c.done("Reset "+d.name+" to default: "+a.settings.get(b.setting))):c.doneWithError("No setting with the name "+b.setting+".")}},f=a("pilot/canon");b.startup=function(a,b){f.addCommand(d),f.addCommand(e)},b.shutdown=function(a,b){f.removeCommand(d),f.removeCommand(e)}}),define("pilot/commands/basic",["require","exports","module","pilot/typecheck","pilot/canon"],function(require,exports,module){var checks=require("pilot/typecheck"),canon=require("pilot/canon"),helpCommandSpec={name:"help",params:[{name:"search",type:"text",description:"Search string to narrow the output.",defaultValue:null}],description:"Get help on the available commands.",exec:function(a,b,c){var d=[],e=canon.getCommand(b.search);if(e&&e.exec)d.push(e.description?e.description:"No description for "+b.search);else{var f=!1;e?(d.push("

        Sub-Commands of "+e.name+"

        "),d.push("

        "+e.description+"

        ")):b.search?(b.search=="hidden"&&(b.search="",f=!0),d.push("

        Commands starting with '"+b.search+"':

        ")):d.push("

        Available Commands:

        ");var g=canon.getCommandNames();g.sort(),d.push("");for(var h=0;h"),d.push('"),d.push(""),d.push("")}d.push("
        '+e.name+""+e.description+"
        ")}c.done(d.join(""))}},evalCommandSpec={name:"eval",params:[{name:"javascript",type:"text",description:"The JavaScript to evaluate"}],description:"evals given js code and show the result",hidden:!0,exec:function(env,args,request){var result,javascript=args.javascript;try{result=eval(javascript)}catch(e){result="Error: "+e.message+""}var msg="",type="",x;if(checks.isFunction(result))msg=(result+"").replace(/\n/g,"
        ").replace(/ /g," "),type="function";else if(checks.isObject(result)){Array.isArray(result)?type="array":type="object";var items=[],value;for(x in result)result.hasOwnProperty(x)&&(checks.isFunction(result[x])?value="[function]":checks.isObject(result[x])?value="[object]":value=result[x],items.push({name:x,value:value}));items.sort(function(a,b){return a.name.toLowerCase()"+items[x].name+": "+items[x].value+"
        "}else msg=result,type=typeof result;request.done("Result for eval '"+javascript+"'"+" (type: "+type+"):

        "+msg)}},canon=require("pilot/canon");exports.startup=function(a,b){canon.addCommand(helpCommandSpec),canon.addCommand(evalCommandSpec)},exports.shutdown=function(a,b){canon.removeCommand(helpCommandSpec),canon.removeCommand(evalCommandSpec)}}),define("pilot/settings/canon",["require","exports","module"],function(a,b,c){var d={name:"historyLength",description:"How many typed commands do we recall for reference?",type:"number",defaultValue:50};b.startup=function(a,b){a.env.settings.addSetting(d)},b.shutdown=function(a,b){a.env.settings.removeSetting(d)}}),define("pilot/plugin_manager",["require","exports","module","pilot/promise"],function(a,b,c){var d=a("pilot/promise").Promise;b.REASONS={APP_STARTUP:1,APP_SHUTDOWN:2,PLUGIN_ENABLE:3,PLUGIN_DISABLE:4,PLUGIN_INSTALL:5,PLUGIN_UNINSTALL:6,PLUGIN_UPGRADE:7,PLUGIN_DOWNGRADE:8},b.Plugin=function(a){this.name=a,this.status=this.INSTALLED},b.Plugin.prototype={NEW:0,INSTALLED:1,REGISTERED:2,STARTED:3,UNREGISTERED:4,SHUTDOWN:5,install:function(b,c){var e=new d;if(this.status>this.NEW){e.resolve(this);return e}a([this.name],function(a){a.install&&a.install(b,c),this.status=this.INSTALLED,e.resolve(this)}.bind(this));return e},register:function(b,c){var e=new d;if(this.status!=this.INSTALLED){e.resolve(this);return e}a([this.name],function(a){a.register&&a.register(b,c),this.status=this.REGISTERED,e.resolve(this)}.bind(this));return e},startup:function(c,e){e=e||b.REASONS.APP_STARTUP;var f=new d;if(this.status!=this.REGISTERED){f.resolve(this);return f}a([this.name],function(a){a.startup&&a.startup(c,e),this.status=this.STARTED,f.resolve(this)}.bind(this));return f},shutdown:function(b,c){this.status==this.STARTED&&(pluginModule=a(this.name),pluginModule.shutdown&&pluginModule.shutdown(b,c))}},b.PluginCatalog=function(){this.plugins={}},b.PluginCatalog.prototype={registerPlugins:function(a,c,e){var f=[];a.forEach(function(a){var d=this.plugins[a];d===undefined&&(d=new b.Plugin(a),this.plugins[a]=d,f.push(d.register(c,e)))}.bind(this));return d.group(f)},startupPlugins:function(a,b){var c=[];for(var e in this.plugins){var f=this.plugins[e];c.push(f.startup(a,b))}return d.group(c)}},b.catalog=new b.PluginCatalog}),define("pilot/promise",["require","exports","module","pilot/console","pilot/stacktrace"],function(a,b,c){var d=a("pilot/console"),e=a("pilot/stacktrace").Trace,f=-1,g=0,h=1,i=0,j=!1,k=[],l=[];Promise=function(){this._status=g,this._value=undefined,this._onSuccessHandlers=[],this._onErrorHandlers=[],this._id=i++,k[this._id]=this},Promise.prototype.isPromise=!0,Promise.prototype.isComplete=function(){return this._status!=g},Promise.prototype.isResolved=function(){return this._status==h},Promise.prototype.isRejected=function(){return this._status==f},Promise.prototype.then=function(a,b){typeof a=="function"&&(this._status===h?a.call(null,this._value):this._status===g&&this._onSuccessHandlers.push(a)),typeof b=="function"&&(this._status===f?b.call(null,this._value):this._status===g&&this._onErrorHandlers.push(b));return this},Promise.prototype.chainPromise=function(a){var b=new Promise;b._chainedFrom=this,this.then(function(c){try{b.resolve(a(c))}catch(d){b.reject(d)}},function(a){b.reject(a)});return b},Promise.prototype.resolve=function(a){return this._complete(this._onSuccessHandlers,h,a,"resolve")},Promise.prototype.reject=function(a){return this._complete(this._onErrorHandlers,f,a,"reject")},Promise.prototype._complete=function(a,b,c,f){if(this._status!=g){d.group("Promise already closed"),d.error("Attempted "+f+"() with ",c),d.error("Previous status = ",this._status,", previous value = ",this._value),d.trace(),this._completeTrace&&(d.error("Trace of previous completion:"),this._completeTrace.log(5)),d.groupEnd();return this}j&&(this._completeTrace=new e(new Error)),this._status=b,this._value=c,a.forEach(function(a){a.call(null,this._value)},this),this._onSuccessHandlers.length=0,this._onErrorHandlers.length=0,delete k[this._id],l.push(this);while(l.length>20)l.shift();return this},Promise.group=function(a){a instanceof Array||(a=Array.prototype.slice.call(arguments));if(a.length===0)return(new Promise).resolve([]);var b=new Promise,c=[],d=0,e=function(e){return function(g){c[e]=g,d++,b._status!==f&&d===a.length&&b.resolve(c)}};a.forEach(function(a,c){var d=e(c),f=b.reject.bind(b);a.then(d,f)});return b},b.Promise=Promise,b._outstanding=k,b._recent=l}),define("pilot/dom",["require","exports","module"],function(a,b,c){var d="http://www.w3.org/1999/xhtml";b.createElement=function(a,b){return document.createElementNS?document.createElementNS(b||d,a):document.createElement(a)},b.setText=function(a,b){a.innerText!==undefined&&(a.innerText=b),a.textContent!==undefined&&(a.textContent=b)},document.documentElement.classList?(b.hasCssClass=function(a,b){return a.classList.contains(b)},b.addCssClass=function(a,b){a.classList.add(b)},b.removeCssClass=function(a,b){a.classList.remove(b)},b.toggleCssClass=function(a,b){return a.classList.toggle(b)}):(b.hasCssClass=function(a,b){var c=a.className.split(/\s+/g);return c.indexOf(b)!==-1},b.addCssClass=function(a,c){b.hasCssClass(a,c)||(a.className+=" "+c)},b.removeCssClass=function(a,b){var c=a.className.split(/\s+/g);for(;;){var d=c.indexOf(b);if(d==-1)break;c.splice(d,1)}a.className=c.join(" ")},b.toggleCssClass=function(a,b){var c=a.className.split(/\s+/g),d=!0;for(;;){var e=c.indexOf(b);if(e==-1)break;d=!1,c.splice(e,1)}d&&c.push(b),a.className=c.join(" ");return d}),b.setCssClass=function(a,c,d){d?b.addCssClass(a,c):b.removeCssClass(a,c)},b.importCssString=function(a,b){b=b||document;if(b.createStyleSheet){var c=b.createStyleSheet();c.cssText=a}else{var e=b.createElementNS?b.createElementNS(d,"style"):b.createElement("style");e.appendChild(b.createTextNode(a));var f=b.getElementsByTagName("head")[0]||b.documentElement;f.appendChild(e)}},b.getInnerWidth=function(a){return parseInt(b.computedStyle(a,"paddingLeft"))+parseInt(b.computedStyle(a,"paddingRight"))+a.clientWidth},b.getInnerHeight=function(a){return parseInt(b.computedStyle(a,"paddingTop"))+parseInt(b.computedStyle(a,"paddingBottom"))+a.clientHeight},window.pageYOffset!==undefined?(b.getPageScrollTop=function(){return window.pageYOffset},b.getPageScrollLeft=function(){return window.pageXOffset}):(b.getPageScrollTop=function(){return document.body.scrollTop},b.getPageScrollLeft=function(){return document.body.scrollLeft}),window.getComputedStyle?b.computedStyle=function(a,b){return b?(window.getComputedStyle(a,"")||{})[b]||"":window.getComputedStyle(a,"")||{}}:b.computedStyle=function(a,b){return b?a.currentStyle[b]:a.currentStyle},b.scrollbarWidth=function(){var a=b.createElement("p");a.style.width="100%",a.style.minWidth="0px",a.style.height="200px";var c=b.createElement("div"),d=c.style;d.position="absolute",d.left="-10000px",d.overflow="hidden",d.width="200px",d.minWidth="0px",d.height="150px",c.appendChild(a);var e=document.body||document.documentElement;e.appendChild(c);var f=a.offsetWidth;d.overflow="scroll";var g=a.offsetWidth;f==g&&(g=c.clientWidth),e.removeChild(c);return f-g},b.setInnerHtml=function(a,b){var c=a.cloneNode(!1);c.innerHTML=b,a.parentNode.replaceChild(c,a);return c},b.setInnerText=function(a,b){document.body&&"textContent"in document.body?a.textContent=b:a.innerText=b},b.getInnerText=function(a){return document.body&&"textContent"in document.body?a.textContent:a.innerText||a.textContent||""},b.getParentWindow=function(a){return a.defaultView||a.parentWindow},b.getSelectionStart=function(a){var b;try{b=a.selectionStart||0}catch(c){b=0}return b},b.setSelectionStart=function(a,b){return a.selectionStart=b},b.getSelectionEnd=function(a){var b;try{b=a.selectionEnd||0}catch(c){b=0}return b},b.setSelectionEnd=function(a,b){return a.selectionEnd=b}}),define("pilot/event",["require","exports","module","pilot/keys","pilot/useragent","pilot/dom"],function(a,b,c){function g(a,b,c){var f=0;e.isOpera&&e.isMac?f=0|(b.metaKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.ctrlKey?8:0):f=0|(b.ctrlKey?1:0)|(b.altKey?2:0)|(b.shiftKey?4:0)|(b.metaKey?8:0);if(c in d.MODIFIER_KEYS){switch(d.MODIFIER_KEYS[c]){case"Alt":f=2;break;case"Shift":f=4;break;case"Ctrl":f=1;break;default:f=8}c=0}f&8&&(c==91||c==93)&&(c=0);return f!=0||c in d.FUNCTION_KEYS?a(b,f,c):!1}var d=a("pilot/keys"),e=a("pilot/useragent"),f=a("pilot/dom");b.addListener=function(a,b,c){if(a.addEventListener)return a.addEventListener(b,c,!1);if(a.attachEvent){var d=function(){c(window.event)};c._wrapper=d,a.attachEvent("on"+b,d)}},b.removeListener=function(a,b,c){if(a.removeEventListener)return a.removeEventListener(b,c,!1);a.detachEvent&&a.detachEvent("on"+b,c._wrapper||c)},b.stopEvent=function(a){b.stopPropagation(a),b.preventDefault(a);return!1},b.stopPropagation=function(a){a.stopPropagation?a.stopPropagation():a.cancelBubble=!0},b.preventDefault=function(a){a.preventDefault?a.preventDefault():a.returnValue=!1},b.getDocumentX=function(a){return a.clientX?a.clientX+f.getPageScrollLeft():a.pageX},b.getDocumentY=function(a){return a.clientY?a.clientY+f.getPageScrollTop():a.pageY},b.getButton=function(a){if(a.type=="dblclick")return 0;if(a.type=="contextmenu")return 2;return a.preventDefault?a.button:{1:0,2:2,4:1}[a.button]},document.documentElement.setCapture?b.capture=function(a,c,d){function f(e){c&&c(e),d&&d(),b.removeListener(a,"mousemove",c),b.removeListener(a,"mouseup",f),b.removeListener(a,"losecapture",f),a.releaseCapture()}function e(a){c(a);return b.stopPropagation(a)}b.addListener(a,"mousemove",c),b.addListener(a,"mouseup",f),b.addListener(a,"losecapture",f),a.setCapture()}:b.capture=function(a,b,c){function e(a){b&&b(a),c&&c(),document.removeEventListener("mousemove",d,!0),document.removeEventListener("mouseup",e,!0),a.stopPropagation()}function d(a){b(a),a.stopPropagation()}document.addEventListener("mousemove",d,!0),document.addEventListener("mouseup",e,!0)},b.addMouseWheelListener=function(a,c){var d=function(a){a.wheelDelta!==undefined?a.wheelDeltaX!==undefined?(a.wheelX=-a.wheelDeltaX/8,a.wheelY=-a.wheelDeltaY/8):(a.wheelX=0,a.wheelY=-a.wheelDelta/8):a.axis&&a.axis==a.HORIZONTAL_AXIS?(a.wheelX=(a.detail||0)*5,a.wheelY=0):(a.wheelX=0,a.wheelY=(a.detail||0)*5),c(a)};b.addListener(a,"DOMMouseScroll",d),b.addListener(a,"mousewheel",d)},b.addMultiMouseDownListener=function(a,c,d,f,g){var h=0,i,j,k=function(a){h+=1,h==1&&(i=a.clientX,j=a.clientY,setTimeout(function(){h=0},f||600));var e=b.getButton(a)==c;if(!e||Math.abs(a.clientX-i)>5||Math.abs(a.clientY-j)>5)h=0;h==d&&(h=0,g(a));if(e)return b.preventDefault(a)};b.addListener(a,"mousedown",k),e.isIE&&b.addListener(a,"dblclick",k)},b.addCommandKeyListener=function(a,c){var d=b.addListener;if(e.isOldGecko){var f=null;d(a,"keydown",function(a){f=a.keyCode}),d(a,"keypress",function(a){return g(c,a,f)})}else{var h=null;d(a,"keydown",function(a){h=a.keyIdentifier||a.keyCode;return g(c,a,a.keyCode)}),e.isMac&&e.isOpera&&d(a,"keypress",function(a){var b=a.keyIdentifier||a.keyCode;if(h!==b)return g(c,a,a.keyCode);h=null})}}}),define("ace/editor",["require","exports","module","pilot/fixoldbrowsers","pilot/oop","pilot/event","pilot/lang","pilot/useragent","ace/keyboard/textinput","ace/mouse_handler","ace/keyboard/keybinding","ace/edit_session","ace/search","ace/range","pilot/event_emitter"],function(a,b,c){a("pilot/fixoldbrowsers");var d=a("pilot/oop"),e=a("pilot/event"),f=a("pilot/lang"),g=a("pilot/useragent"),h=a("ace/keyboard/textinput").TextInput,i=a("ace/mouse_handler").MouseHandler,j=a("ace/keyboard/keybinding").KeyBinding,k=a("ace/edit_session").EditSession,l=a("ace/search").Search,m=a("ace/range").Range,n=a("pilot/event_emitter").EventEmitter,o=function(a,b){var c=a.getContainerElement();this.container=c,this.renderer=a,this.textInput=new h(a.getTextAreaContainer(),this),this.keyBinding=new j(this),g.isIPad||(this.$mouseHandler=new i(this)),this.$blockScrolling=0,this.$search=(new l).set({wrap:!0}),this.setSession(b||new k(""))};(function(){d.implement(this,n),this.$forwardEvents={gutterclick:1,gutterdblclick:1},this.$originalAddEventListener=this.addEventListener,this.$originalRemoveEventListener=this.removeEventListener,this.addEventListener=function(a,b){return this.$forwardEvents[a]?this.renderer.addEventListener(a,b):this.$originalAddEventListener(a,b)},this.removeEventListener=function(a,b){return this.$forwardEvents[a]?this.renderer.removeEventListener(a,b):this.$originalRemoveEventListener(a,b)},this.setKeyboardHandler=function(a){this.keyBinding.setKeyboardHandler(a)},this.getKeyboardHandler=function(){return this.keyBinding.getKeyboardHandler()},this.setSession=function(a){if(this.session!=a){if(this.session){var b=this.session;this.session.removeEventListener("change",this.$onDocumentChange),this.session.removeEventListener("changeMode",this.$onChangeMode),this.session.removeEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.session.removeEventListener("changeTabSize",this.$onChangeTabSize),this.session.removeEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.session.removeEventListener("changeWrapMode",this.$onChangeWrapMode),this.session.removeEventListener("onChangeFold",this.$onChangeFold),this.session.removeEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.session.removeEventListener("changeBackMarker",this.$onChangeBackMarker),this.session.removeEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.session.removeEventListener("changeAnnotation",this.$onChangeAnnotation),this.session.removeEventListener("changeOverwrite",this.$onCursorChange);var c=this.session.getSelection();c.removeEventListener("changeCursor",this.$onCursorChange),c.removeEventListener("changeSelection",this.$onSelectionChange),this.session.setScrollTopRow(this.renderer.getScrollTopRow())}this.session=a,this.$onDocumentChange=this.onDocumentChange.bind(this),a.addEventListener("change",this.$onDocumentChange),this.renderer.setSession(a),this.$onChangeMode=this.onChangeMode.bind(this),a.addEventListener("changeMode",this.$onChangeMode),this.$onTokenizerUpdate=this.onTokenizerUpdate.bind(this),a.addEventListener("tokenizerUpdate",this.$onTokenizerUpdate),this.$onChangeTabSize=this.renderer.updateText.bind(this.renderer),a.addEventListener("changeTabSize",this.$onChangeTabSize),this.$onChangeWrapLimit=this.onChangeWrapLimit.bind(this),a.addEventListener("changeWrapLimit",this.$onChangeWrapLimit),this.$onChangeWrapMode=this.onChangeWrapMode.bind(this),a.addEventListener("changeWrapMode",this.$onChangeWrapMode),this.$onChangeFold=this.onChangeFold.bind(this),a.addEventListener("changeFold",this.$onChangeFold),this.$onChangeFrontMarker=this.onChangeFrontMarker.bind(this),this.session.addEventListener("changeFrontMarker",this.$onChangeFrontMarker),this.$onChangeBackMarker=this.onChangeBackMarker.bind(this),this.session.addEventListener("changeBackMarker",this.$onChangeBackMarker),this.$onChangeBreakpoint=this.onChangeBreakpoint.bind(this),this.session.addEventListener("changeBreakpoint",this.$onChangeBreakpoint),this.$onChangeAnnotation=this.onChangeAnnotation.bind(this),this.session.addEventListener("changeAnnotation",this.$onChangeAnnotation),this.$onCursorChange=this.onCursorChange.bind(this),this.session.addEventListener("changeOverwrite",this.$onCursorChange),this.selection=a.getSelection(),this.selection.addEventListener("changeCursor",this.$onCursorChange),this.$onSelectionChange=this.onSelectionChange.bind(this),this.selection.addEventListener("changeSelection",this.$onSelectionChange),this.onChangeMode(),this.onCursorChange(),this.onSelectionChange(),this.onChangeFrontMarker(),this.onChangeBackMarker(),this.onChangeBreakpoint(),this.onChangeAnnotation(),this.session.getUseWrapMode()&&this.renderer.adjustWrapLimit(),this.renderer.scrollToRow(a.getScrollTopRow()),this.renderer.updateFull(),this._dispatchEvent("changeSession",{session:a,oldSession:b})}},this.getSession=function(){return this.session},this.getSelection=function(){return this.selection},this.resize=function(){this.renderer.onResize()},this.setTheme=function(a){this.renderer.setTheme(a)},this.getTheme=function(){return this.renderer.getTheme()},this.setStyle=function(a){this.renderer.setStyle(a)},this.unsetStyle=function(a){this.renderer.unsetStyle(a)},this.setFontSize=function(a){this.container.style.fontSize=a},this.$highlightBrackets=function(){this.session.$bracketHighlight&&(this.session.removeMarker(this.session.$bracketHighlight),this.session.$bracketHighlight=null);if(!this.$highlightPending){var a=this;this.$highlightPending=!0,setTimeout(function(){a.$highlightPending=!1;var b=a.session.findMatchingBracket(a.getCursorPosition());if(b){var c=new m(b.row,b.column,b.row,b.column+1);a.session.$bracketHighlight=a.session.addMarker(c,"ace_bracket","text")}},10)}},this.focus=function(){var a=this;g.isIE||setTimeout(function(){a.textInput.focus()}),this.textInput.focus()},this.isFocused=function(){return this.textInput.isFocused()},this.blur=function(){this.textInput.blur()},this.onFocus=function(){this.renderer.showCursor(),this.renderer.visualizeFocus(),this._dispatchEvent("focus")},this.onBlur=function(){this.renderer.hideCursor(),this.renderer.visualizeBlur(),this._dispatchEvent("blur")},this.onDocumentChange=function(a){var b=a.data,c=b.range;if(c.start.row==c.end.row&&b.action!="insertLines"&&b.action!="removeLines")var d=c.end.row;else d=Infinity;this.renderer.updateLines(c.start.row,d),this.renderer.updateCursor()},this.onTokenizerUpdate=function(a){var b=a.data;this.renderer.updateLines(b.first,b.last)},this.onCursorChange=function(a){this.renderer.updateCursor(),this.$blockScrolling||this.renderer.scrollCursorIntoView(),this.renderer.moveTextAreaToCursor(this.textInput.getElement()),this.$highlightBrackets(),this.$updateHighlightActiveLine()},this.$updateHighlightActiveLine=function(){var a=this.getSession();a.$highlightLineMarker&&a.removeMarker(a.$highlightLineMarker),a.$highlightLineMarker=null;if(this.getHighlightActiveLine()&&(this.getSelectionStyle()!="line"||!this.selection.isMultiLine())){var b=this.getCursorPosition(),c=this.session.getFoldLine(b.row),d;c?d=new m(c.start.row,0,c.end.row+1,0):d=new m(b.row,0,b.row+1,0),a.$highlightLineMarker=a.addMarker(d,"ace_active_line","background")}},this.onSelectionChange=function(a){var b=this.getSession();b.$selectionMarker&&b.removeMarker(b.$selectionMarker),b.$selectionMarker=null;if(!this.selection.isEmpty()){var c=this.selection.getRange(),d=this.getSelectionStyle();b.$selectionMarker=b.addMarker(c,"ace_selection",d)}else this.$updateHighlightActiveLine();this.$highlightSelectedWord&&this.session.getMode().highlightSelection(this)},this.onChangeFrontMarker=function(){this.renderer.updateFrontMarkers()},this.onChangeBackMarker=function(){this.renderer.updateBackMarkers()},this.onChangeBreakpoint=function(){this.renderer.setBreakpoints(this.session.getBreakpoints())},this.onChangeAnnotation=function(){this.renderer.setAnnotations(this.session.getAnnotations())},this.onChangeMode=function(){this.renderer.updateText()},this.onChangeWrapLimit=function(){this.renderer.updateFull()},this.onChangeWrapMode=function(){this.renderer.onResize(!0)},this.onChangeFold=function(){this.$updateHighlightActiveLine(),this.renderer.updateFull()},this.getCopyText=function(){return this.selection.isEmpty()?"":this.session.getTextRange(this.getSelectionRange())},this.onCut=function(){this.$readOnly||this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection())},this.insert=function(a){if(!this.$readOnly){var b=this.session,c=b.getMode(),d=this.getCursorPosition();if(this.getBehavioursEnabled()){var e=c.transformAction(b.getState(d.row),"insertion",this,b,a);e&&(a=e.text)}a=a.replace("\t",this.session.getTabString());if(!this.selection.isEmpty()){var d=this.session.remove(this.getSelectionRange());this.clearSelection()}else if(this.session.getOverwrite()){var f=new m.fromPoints(d,d);f.end.column+=a.length,this.session.remove(f)}this.clearSelection();var g=d.column,h=b.getState(d.row),i=c.checkOutdent(h,b.getLine(d.row),a),j=b.getLine(d.row),k=c.getNextLineIndent(h,j.slice(0,d.column),b.getTabString()),l=b.insert(d,a);e&&e.selection&&(e.selection.length==2?this.selection.setSelectionRange(new m(d.row,g+e.selection[0],d.row,g+e.selection[1])):this.selection.setSelectionRange(new m(d.row+e.selection[0],e.selection[1],d.row+e.selection[2],e.selection[3])));var h=b.getState(d.row);if(b.getDocument().isNewLine(a)){this.moveCursorTo(d.row+1,0);var n=b.getTabSize(),o=Number.MAX_VALUE;for(var p=d.row+1;p<=l.row;++p){var q=0;j=b.getLine(p);for(var r=0;r0;++r)j.charAt(r)=="\t"?s-=n:j.charAt(r)==" "&&(s-=1);b.remove(new m(p,0,p,r))}b.indentRows(d.row+1,l.row,k)}else i&&c.autoOutdent(h,b,d.row)}},this.onTextInput=function(a,b){if(b&&a.length==1){var c=this.keyBinding.onCommandKey({},0,null,a);c||this.insert(a)}else this.keyBinding.onTextInput(a)},this.onCommandKey=function(a,b,c){this.keyBinding.onCommandKey(a,b,c)},this.setOverwrite=function(a){this.session.setOverwrite(a)},this.getOverwrite=function(){return this.session.getOverwrite()},this.toggleOverwrite=function(){this.session.toggleOverwrite()},this.setScrollSpeed=function(a){this.$mouseHandler.setScrollSpeed(a)},this.getScrollSpeed=function(){return this.$mouseHandler.getScrollSpeed()},this.$selectionStyle="line",this.setSelectionStyle=function(a){this.$selectionStyle!=a&&(this.$selectionStyle=a,this.onSelectionChange(),this._dispatchEvent("changeSelectionStyle",{data:a}))},this.getSelectionStyle=function(){return this.$selectionStyle},this.$highlightActiveLine=!0,this.setHighlightActiveLine=function(a){this.$highlightActiveLine!=a&&(this.$highlightActiveLine=a,this.$updateHighlightActiveLine())},this.getHighlightActiveLine=function(){return this.$highlightActiveLine},this.$highlightSelectedWord=!0,this.setHighlightSelectedWord=function(a){this.$highlightSelectedWord!=a&&(this.$highlightSelectedWord=a,a?this.session.getMode().highlightSelection(this):this.session.getMode().clearSelectionHighlight(this))},this.getHighlightSelectedWord=function(){return this.$highlightSelectedWord},this.setShowInvisibles=function(a){this.getShowInvisibles()!=a&&this.renderer.setShowInvisibles(a)},this.getShowInvisibles=function(){return this.renderer.getShowInvisibles()},this.setShowPrintMargin=function(a){this.renderer.setShowPrintMargin(a)},this.getShowPrintMargin=function(){return this.renderer.getShowPrintMargin()},this.setPrintMarginColumn=function(a){this.renderer.setPrintMarginColumn(a)},this.getPrintMarginColumn=function(){return this.renderer.getPrintMarginColumn()},this.$readOnly=!1,this.setReadOnly=function(a){this.$readOnly=a},this.getReadOnly=function(){return this.$readOnly},this.$modeBehaviours=!0,this.setBehavioursEnabled=function(a){this.$modeBehaviours=a},this.getBehavioursEnabled=function(){return this.$modeBehaviours},this.removeRight=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectRight(),this.session.remove(this.getSelectionRange()),this.clearSelection())},this.removeLeft=function(){if(!this.$readOnly){this.selection.isEmpty()&&this.selection.selectLeft();var a=this.getSelectionRange();if(this.getBehavioursEnabled()){var b=this.session,c=b.getState(a.start.row),d=b.getMode().transformAction(c,"deletion",this,b,a);d!==!1&&(a=d)}this.session.remove(a),this.clearSelection()}},this.removeWordRight=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectWordRight(),this.session.remove(this.getSelectionRange()),this.clearSelection())},this.removeWordLeft=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectWordLeft(),this.session.remove(this.getSelectionRange()),this.clearSelection())},this.removeToLineStart=function(){this.$readOnly||(this.selection.isEmpty()&&this.selection.selectLineStart(),this.session.remove(this.getSelectionRange()),this.clearSelection())},this.removeToLineEnd=function(){if(!this.$readOnly){this.selection.isEmpty()&&this.selection.selectLineEnd();var a=this.getSelectionRange();a.start.column==a.end.column&&a.start.row==a.end.row&&(a.end.column=0,a.end.row++),this.session.remove(a),this.clearSelection()}},this.splitLine=function(){if(!this.$readOnly){this.selection.isEmpty()||(this.session.remove(this.getSelectionRange()),this.clearSelection());var a=this.getCursorPosition();this.insert("\n"),this.moveCursorToPosition(a)}},this.transposeLetters=function(){if(!this.$readOnly){if(!this.selection.isEmpty())return;var a=this.getCursorPosition(),b=a.column;if(b==0)return;var c=this.session.getLine(a.row);if(b=this.getFirstVisibleRow()&&a<=this.getLastVisibleRow()},this.$getVisibleRowCount=function(){return this.renderer.getScrollBottomRow()-this.renderer.getScrollTopRow()+1},this.$getPageDownRow=function(){return this.renderer.getScrollBottomRow()},this.$getPageUpRow=function(){var a=this.renderer.getScrollTopRow(),b=this.renderer.getScrollBottomRow();return a-(b-a)},this.selectPageDown=function(){var a=this.$getPageDownRow()+Math.floor(this.$getVisibleRowCount()/2);this.scrollPageDown();var b=this.getSelection(),c=this.session.documentToScreenPosition(b.getSelectionLead()),d=this.session.screenToDocumentPosition(a,c.column);b.selectTo(d.row,d.column)},this.selectPageUp=function(){var a=this.renderer.getScrollTopRow()-this.renderer.getScrollBottomRow(),b=this.$getPageUpRow()+Math.round(a/2);this.scrollPageUp();var c=this.getSelection(),d=this.session.documentToScreenPosition(c.getSelectionLead()),e=this.session.screenToDocumentPosition(b,d.column);c.selectTo(e.row,e.column)},this.gotoPageDown=function(){var a=this.$getPageDownRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.gotoPageUp=function(){var a=this.$getPageUpRow(),b=this.getCursorPositionScreen().column;this.scrollToRow(a),this.getSelection().moveCursorToScreen(a,b)},this.scrollPageDown=function(){this.scrollToRow(this.$getPageDownRow())},this.scrollPageUp=function(){this.renderer.scrollToRow(this.$getPageUpRow())},this.scrollToRow=function(a){this.renderer.scrollToRow(a)},this.scrollToLine=function(a,b){this.renderer.scrollToLine(a,b)},this.centerSelection=function(){var a=this.getSelectionRange(),b=Math.floor(a.start.row+(a.end.row-a.start.row)/2);this.renderer.scrollToLine(b,!0)},this.getCursorPosition=function(){return this.selection.getCursor()},this.getCursorPositionScreen=function(){return this.session.documentToScreenPosition(this.getCursorPosition())},this.getSelectionRange=function(){return this.selection.getRange()},this.selectAll=function(){this.$blockScrolling+=1,this.selection.selectAll(),this.$blockScrolling-=1},this.clearSelection=function(){this.selection.clearSelection()},this.moveCursorTo=function(a,b){this.selection.moveCursorTo(a,b)},this.moveCursorToPosition=function(a){this.selection.moveCursorToPosition(a)},this.gotoLine=function(a,b){this.selection.clearSelection(),this.$blockScrolling+=1,this.moveCursorTo(a-1,b||0),this.$blockScrolling-=1,this.isRowVisible(this.getCursorPosition().row)||this.scrollToLine(a,!0)},this.navigateTo=function(a,b){this.clearSelection(),this.moveCursorTo(a,b)},this.navigateUp=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(-a,0)},this.navigateDown=function(a){this.selection.clearSelection(),a=a||1,this.selection.moveCursorBy(a,0)},this.navigateLeft=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().start;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorLeft()}this.clearSelection()},this.navigateRight=function(a){if(!this.selection.isEmpty()){var b=this.getSelectionRange().end;this.moveCursorToPosition(b)}else{a=a||1;while(a--)this.selection.moveCursorRight()}this.clearSelection()},this.navigateLineStart=function(){this.selection.moveCursorLineStart(),this.clearSelection()},this.navigateLineEnd=function(){this.selection.moveCursorLineEnd(),this.clearSelection()},this.navigateFileEnd=function(){this.selection.moveCursorFileEnd(),this.clearSelection()},this.navigateFileStart=function(){this.selection.moveCursorFileStart(),this.clearSelection()},this.navigateWordRight=function(){this.selection.moveCursorWordRight(),this.clearSelection()},this.navigateWordLeft=function(){this.selection.moveCursorWordLeft(),this.clearSelection()},this.replace=function(a,b){b&&this.$search.set(b);var c=this.$search.find(this.session);!c||(this.$tryReplace(c,a),c!==null&&this.selection.setSelectionRange(c))},this.replaceAll=function(a,b){b&&this.$search.set(b);var c=this.$search.findAll(this.session);if(!!c.length){var d=this.getSelectionRange();this.clearSelection(),this.selection.moveCursorTo(0,0),this.$blockScrolling+=1;for(var e=c.length-1;e>=0;--e)this.$tryReplace(c[e],a);this.selection.setSelectionRange(d),this.$blockScrolling-=1}},this.$tryReplace=function(a,b){var c=this.session.getTextRange(a),b=this.$search.replace(c,b);if(b!==null){a.end=this.session.replace(a,b);return a}return null},this.getLastSearchOptions=function(){return this.$search.getOptions()},this.find=function(a,b){this.clearSelection(),b=b||{},b.needle=a,this.$search.set(b),this.$find()},this.findNext=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!1),this.$search.set(a),this.$find()},this.findPrevious=function(a){a=a||{},typeof a.backwards=="undefined"&&(a.backwards=!0),this.$search.set(a),this.$find()},this.$find=function(a){this.selection.isEmpty()||this.$search.set({needle:this.session.getTextRange(this.getSelectionRange())}),typeof a!="undefined"&&this.$search.set({backwards:a});var b=this.$search.find(this.session);b&&(this.gotoLine(b.end.row+1,b.end.column),this.selection.setSelectionRange(b))},this.undo=function(){this.session.getUndoManager().undo()},this.redo=function(){this.session.getUndoManager().redo()},this.destroy=function(){this.renderer.destroy()}}).call(o.prototype),b.Editor=o}),define("ace/keyboard/textinput",["require","exports","module","pilot/event","pilot/useragent","pilot/dom"],function(a,b,c){var d=a("pilot/event"),e=a("pilot/useragent"),f=a("pilot/dom"),g=function(a,b){function u(){return document.activeElement===c}function l(a){if(!i){var d=a||c.value;if(d){d.charCodeAt(d.length-1)==g.charCodeAt(0)?(d=d.slice(0,-1),d&&b.onTextInput(d,!j)):b.onTextInput(d,!j);if(!u())return!1}}i=!1,j=!1,c.value=g,c.select()}var c=f.createElement("textarea");c.style.left="-10000px",a.appendChild(c);var g=String.fromCharCode(0);l();var h=!1,i=!1,j=!1,k="",m=function(a){setTimeout(function(){h||l(a.data)},0)},n=function(a){e.isIE&&c.value.charCodeAt(0)>128||setTimeout(function(){h||l()},0)},o=function(a){h=!0,b.onCompositionStart(),e.isGecko||setTimeout(p,0)},p=function(){!h||b.onCompositionUpdate(c.value)},q=function(a){h=!1,b.onCompositionEnd()},r=function(a){i=!0;var d=b.getCopyText();d?c.value=d:a.preventDefault(),c.select(),setTimeout(function(){l()},0)},s=function(a){i=!0;var d=b.getCopyText();d?(c.value=d,b.onCut()):a.preventDefault(),c.select(),setTimeout(function(){l()},0)};d.addCommandKeyListener(c,b.onCommandKey.bind(b));if(e.isIE){var t={13:1,27:1};d.addListener(c,"keyup",function(a){h&&(!c.value||t[a.keyCode])&&setTimeout(q,0);(c.value.charCodeAt(0)|0)<129||(h?p():o())})}c.attachEvent?d.addListener(c,"propertychange",n):e.isChrome||e.isSafari?d.addListener(c,"textInput",m):e.isIE?d.addListener(c,"textinput",m):d.addListener(c,"input",m),d.addListener(c,"paste",function(a){j=!0,a.clipboardData&&a.clipboardData.getData?(l(a.clipboardData.getData("text/plain")),a.preventDefault()):n()}),e.isIE?(d.addListener(c,"beforecopy",function(a){var c=b.getCopyText();c?clipboardData.setData("Text",c):a.preventDefault()}),d.addListener(a,"keydown",function(a){if(a.ctrlKey&&a.keyCode==88){var c=b.getCopyText();c&&(clipboardData.setData("Text",c),b.onCut()),d.preventDefault(a)}})):(d.addListener(c,"copy",r),d.addListener(c,"cut",s)),d.addListener(c,"compositionstart",o),e.isGecko&&d.addListener(c,"text",p),e.isWebKit&&d.addListener(c,"keyup",p),d.addListener(c,"compositionend",q),d.addListener(c,"blur",function(){b.onBlur()}),d.addListener(c,"focus",function(){b.onFocus(),c.select()}),this.focus=function(){b.onFocus(),c.select(),c.focus()},this.blur=function(){c.blur()},this.isFocused=u,this.getElement=function(){return c},this.onContextMenu=function(a,b){a&&(k||(k=c.style.cssText),c.style.cssText="position:fixed; z-index:1000;left:"+(a.x-2)+"px; top:"+(a.y-2)+"px;"),b&&(c.value="")},this.onContextMenuClose=function(){setTimeout(function(){k&&(c.style.cssText=k,k=""),l()},0)}};b.TextInput=g}),define("ace/mouse_handler",["require","exports","module","pilot/event","pilot/dom","pilot/browser_focus"],function(a,b,c){var d=a("pilot/event"),e=a("pilot/dom"),f=a("pilot/browser_focus").BrowserFocus,g=0,h=1,i=2,j=250,k=5,l=function(a){this.editor=a,this.browserFocus=new f,d.addListener(a.container,"mousedown",function(b){a.focus();return d.preventDefault(b)}),d.addListener(a.container,"selectstart",function(a){return d.preventDefault(a)});var b=a.renderer.getMouseEventTarget();d.addListener(b,"mousedown",this.onMouseDown.bind(this)),d.addMultiMouseDownListener(b,0,2,500,this.onMouseDoubleClick.bind(this)),d.addMultiMouseDownListener(b,0,3,600,this.onMouseTripleClick.bind(this)),d.addMultiMouseDownListener(b,0,4,600,this.onMouseQuadClick.bind(this)),d.addMouseWheelListener(b,this.onMouseWheel.bind(this))};(function(){this.$scrollSpeed=1,this.setScrollSpeed=function(a){this.$scrollSpeed=a},this.getScrollSpeed=function(){return this.$scrollSpeed},this.$getEventPosition=function(a){var b=d.getDocumentX(a),c=d.getDocumentY(a),e=this.editor.renderer.screenToTextCoordinates(b,c);e.row=Math.max(0,Math.min(e.row,this.editor.session.getLength()-1));return e},this.$distance=function(a,b,c,d){return Math.sqrt(Math.pow(c-a,2)+Math.pow(d-b,2))},this.onMouseDown=function(a){function D(b){a.shiftKey?l.selection.selectToPosition(b):m.$clickSelection||(l.moveCursorToPosition(b),l.selection.clearSelection(b.row,b.column)),p=h}if(!(!this.browserFocus.isFocused()||(new Date).getTime()-this.browserFocus.lastFocus<20||!this.editor.isFocused())){var b=d.getDocumentX(a),c=d.getDocumentY(a),f=this.$getEventPosition(a),l=this.editor,m=this,n=l.getSelectionRange(),o=n.isEmpty(),p=g,q=!1,r=d.getButton(a);if(r!==0){o&&l.moveCursorToPosition(f),r==2&&(l.textInput.onContextMenu({x:b,y:c},o),d.capture(l.container,function(){},l.textInput.onContextMenuClose));return}var s=l.session.getFoldAt(f.row,f.column,1);if(s){l.selection.setSelectionRange(s.range);return}q=!l.getReadOnly()&&!o&&n.contains(f.row,f.column),q||D(f);var t,u,v=l.getOverwrite(),w=(new Date).getTime(),x,y,z=function(a){t=d.getDocumentX(a),u=d.getDocumentY(a)},A=function(){clearInterval(G),p==g?D(f):p==i&&B(),m.$clickSelection=null,p=g},B=function(){e.removeCssClass(l.container,"ace_dragging"),l.session.removeMarker(dragSelectionMarker),m.$clickSelection||x||(l.moveCursorToPosition(f),l.selection.clearSelection(f.row,f.column));if(!!x){if(y.contains(x.row,x.column)){x=null;return}l.clearSelection();var a=l.moveText(y,x);if(!a){x=null;return}l.selection.setSelectionRange(a)}},C=function(){if(t!==undefined&&u!==undefined){if(p==g){var a=m.$distance(b,c,t,u),d=(new Date).getTime();if(a>k){p=h;var f=l.renderer.screenToTextCoordinates(t,u);f.row=Math.max(0,Math.min(f.row,l.session.getLength()-1)),D(f)}else if(d-w>j){p=i,y=l.getSelectionRange();var n=l.getSelectionStyle();dragSelectionMarker=l.session.addMarker(y,"ace_selection",n),l.clearSelection(),e.addCssClass(l.container,"ace_dragging")}}p==i?F():p==h&&E()}},E=function(){var a=l.renderer.screenToTextCoordinates(t,u);a.row=Math.max(0,Math.min(a.row,l.session.getLength()-1));if(m.$clickSelection)if(m.$clickSelection.contains(a.row,a.column))l.selection.setSelectionRange(m.$clickSelection);else{if(m.$clickSelection.compare(a.row,a.column)==-1)var b=m.$clickSelection.end;else var b=m.$clickSelection.start;l.selection.setSelectionAnchor(b.row,b.column),l.selection.selectToPosition(a)}else l.selection.selectToPosition(a);l.renderer.scrollCursorIntoView()},F=function(){x=l.renderer.screenToTextCoordinates(t,u),x.row=Math.max(0,Math.min(x.row,l.session.getLength()-1)),l.moveCursorToPosition(x)};d.capture(l.container,z,A);var G=setInterval(C,20);return d.preventDefault(a)}},this.onMouseDoubleClick=function(a){var b=this.editor,c=this.$getEventPosition(a),d=b.session.getFoldAt(c.row,c.column,1);d?b.session.expandFold(d):(b.moveCursorToPosition(c),b.selection.selectWord(),this.$clickSelection=b.getSelectionRange())},this.onMouseTripleClick=function(a){var b=this.$getEventPosition(a);this.editor.moveCursorToPosition(b),this.editor.selection.selectLine(),this.$clickSelection=this.editor.getSelectionRange()},this.onMouseQuadClick=function(a){this.editor.selectAll(),this.$clickSelection=this.editor.getSelectionRange()},this.onMouseWheel=function(a){var b=this.$scrollSpeed*2;this.editor.renderer.scrollBy(a.wheelX*b,a.wheelY*b);return d.preventDefault(a)}}).call(l.prototype),b.MouseHandler=l}),define("pilot/browser_focus",["require","exports","module","pilot/oop","pilot/event","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event"),f=a("pilot/event_emitter").EventEmitter,g=function(a){a=a||window,this.lastFocus=(new Date).getTime(),this._isFocused=!0;var b=this;e.addListener(a,"blur",function(a){b._setFocused(!1)}),e.addListener(a,"focus",function(a){b._setFocused(!0)})};(function(){d.implement(this,f),this.isFocused=function(){return this._isFocused},this._setFocused=function(a){this._isFocused!=a&&(a&&(this.lastFocus=(new Date).getTime()),this._isFocused=a,this._emit("changeFocus"))}}).call(g.prototype),b.BrowserFocus=g}),define("ace/keyboard/keybinding",["require","exports","module","pilot/useragent","pilot/keys","pilot/event","pilot/settings","pilot/canon","ace/commands/default_commands"],function(a,b,c){var d=a("pilot/useragent"),e=a("pilot/keys"),f=a("pilot/event"),g=a("pilot/settings").settings,h=a("pilot/canon");a("ace/commands/default_commands");var i=function(a){this.$editor=a,this.$data={},this.$keyboardHandler=null};(function(){this.setKeyboardHandler=function(a){this.$keyboardHandler!=a&&(this.$data={},this.$keyboardHandler=a)},this.getKeyboardHandler=function(){return this.$keyboardHandler},this.$callKeyboardHandler=function(a,b,c,d){var e={editor:this.$editor},g;this.$keyboardHandler&&(g=this.$keyboardHandler.handleKeyboard(this.$data,b,c,d,a));if(!g||!g.command)b!=0||d!=0?g={command:h.findKeyCommand(e,"editor",b,c)}:g={command:"inserttext",args:{text:c}};var i=!1;g&&(i=h.exec(g.command,e,"editor",g.args),i&&f.stopEvent(a));return i},this.onCommandKey=function(a,b,c,d){d||(d=e.keyCodeToString(c));return this.$callKeyboardHandler(a,b,d,c)},this.onTextInput=function(a){return this.$callKeyboardHandler({},0,a,0)}}).call(i.prototype),b.KeyBinding=i}),define("ace/commands/default_commands",["require","exports","module","pilot/lang","pilot/canon"],function(a,b,c){function f(a,b){return{win:a,mac:b,sender:"editor"}}var d=a("pilot/lang"),e=a("pilot/canon");e.addCommand({name:"null",exec:function(a,b,c){}}),e.addCommand({name:"selectall",bindKey:f("Ctrl-A","Command-A"),exec:function(a,b,c){a.editor.selectAll()}}),e.addCommand({name:"removeline",bindKey:f("Ctrl-D","Command-D"),exec:function(a,b,c){a.editor.removeLines()}}),e.addCommand({name:"gotoline",bindKey:f("Ctrl-L","Command-L"),exec:function(a,b,c){var d=parseInt(prompt("Enter line number:"));isNaN(d)||a.editor.gotoLine(d)}}),e.addCommand({name:"togglecomment",bindKey:f("Ctrl-7","Command-7"),exec:function(a,b,c){a.editor.toggleCommentLines()}}),e.addCommand({name:"findnext",bindKey:f("Ctrl-K","Command-G"),exec:function(a,b,c){a.editor.findNext()}}),e.addCommand({name:"findprevious",bindKey:f("Ctrl-Shift-K","Command-Shift-G"),exec:function(a,b,c){a.editor.findPrevious()}}),e.addCommand({name:"find",bindKey:f("Ctrl-F","Command-F"),exec:function(a,b,c){var d=prompt("Find:");a.editor.find(d)}}),e.addCommand({name:"replace",bindKey:f("Ctrl-R","Command-Option-F"),exec:function(a,b,c){var d=prompt("Find:");if(!!d){var e=prompt("Replacement:");if(!e)return;a.editor.replace(e,{needle:d})}}}),e.addCommand({name:"replaceall",bindKey:f("Ctrl-Shift-R","Command-Shift-Option-F"),exec:function(a,b,c){var d=prompt("Find:");if(!!d){var e=prompt("Replacement:");if(!e)return;a.editor.replaceAll(e,{needle:d})}}}),e.addCommand({name:"undo",bindKey:f("Ctrl-Z","Command-Z"),exec:function(a,b,c){a.editor.undo()}}),e.addCommand({name:"redo",bindKey:f("Ctrl-Shift-Z|Ctrl-Y","Command-Shift-Z|Command-Y"),exec:function(a,b,c){a.editor.redo()}}),e.addCommand({name:"overwrite",bindKey:f("Insert","Insert"),exec:function(a,b,c){a.editor.toggleOverwrite()}}),e.addCommand({name:"copylinesup",bindKey:f("Ctrl-Alt-Up","Command-Option-Up"),exec:function(a,b,c){a.editor.copyLinesUp()}}),e.addCommand({name:"movelinesup",bindKey:f("Alt-Up","Option-Up"),exec:function(a,b,c){a.editor.moveLinesUp()}}),e.addCommand({name:"selecttostart",bindKey:f("Ctrl-Shift-Home|Alt-Shift-Up","Command-Shift-Up"),exec:function(a,b,c){a.editor.getSelection().selectFileStart()}}),e.addCommand({name:"gotostart",bindKey:f("Ctrl-Home|Ctrl-Up","Command-Home|Command-Up"),exec:function(a,b,c){a.editor.navigateFileStart()}}),e.addCommand({name:"selectup",bindKey:f("Shift-Up","Shift-Up"),exec:function(a,b,c){a.editor.getSelection().selectUp()}}),e.addCommand({name:"golineup",bindKey:f("Up","Up|Ctrl-P"),exec:function(a,b,c){a.editor.navigateUp(b.times)}}),e.addCommand({name:"copylinesdown",bindKey:f("Ctrl-Alt-Down","Command-Option-Down"),exec:function(a,b,c){a.editor.copyLinesDown()}}),e.addCommand({name:"movelinesdown",bindKey:f("Alt-Down","Option-Down"),exec:function(a,b,c){a.editor.moveLinesDown()}}),e.addCommand({name:"selecttoend",bindKey:f("Ctrl-Shift-End|Alt-Shift-Down","Command-Shift-Down"),exec:function(a,b,c){a.editor.getSelection().selectFileEnd()}}),e.addCommand({name:"gotoend",bindKey:f("Ctrl-End|Ctrl-Down","Command-End|Command-Down"),exec:function(a,b,c){a.editor.navigateFileEnd()}}),e.addCommand({name:"selectdown",bindKey:f("Shift-Down","Shift-Down"),exec:function(a,b,c){a.editor.getSelection().selectDown()}}),e.addCommand({name:"golinedown",bindKey:f("Down","Down|Ctrl-N"),exec:function(a,b,c){a.editor.navigateDown(b.times)}}),e.addCommand({name:"selectwordleft",bindKey:f("Ctrl-Shift-Left","Option-Shift-Left"),exec:function(a,b,c){a.editor.getSelection().selectWordLeft()}}),e.addCommand({name:"gotowordleft",bindKey:f("Ctrl-Left","Option-Left"),exec:function(a,b,c){a.editor.navigateWordLeft()}}),e.addCommand({name:"selecttolinestart",bindKey:f("Alt-Shift-Left","Command-Shift-Left"),exec:function(a,b,c){a.editor.getSelection().selectLineStart()}}),e.addCommand({name:"gotolinestart",bindKey:f("Alt-Left|Home","Command-Left|Home|Ctrl-A"),exec:function(a,b,c){a.editor.navigateLineStart()}}),e.addCommand({name:"selectleft",bindKey:f("Shift-Left","Shift-Left"),exec:function(a,b,c){a.editor.getSelection().selectLeft()}}),e.addCommand({name:"gotoleft",bindKey:f("Left","Left|Ctrl-B"),exec:function(a,b,c){a.editor.navigateLeft(b.times)}}),e.addCommand({name:"selectwordright",bindKey:f("Ctrl-Shift-Right","Option-Shift-Right"),exec:function(a,b,c){a.editor.getSelection().selectWordRight()}}),e.addCommand({name:"gotowordright",bindKey:f("Ctrl-Right","Option-Right"),exec:function(a,b,c){a.editor.navigateWordRight()}}),e.addCommand({name:"selecttolineend",bindKey:f("Alt-Shift-Right","Command-Shift-Right"),exec:function(a,b,c){a.editor.getSelection().selectLineEnd()}}),e.addCommand({name:"gotolineend",bindKey:f("Alt-Right|End","Command-Right|End|Ctrl-E"),exec:function(a,b,c){a.editor.navigateLineEnd()}}),e.addCommand({name:"selectright",bindKey:f("Shift-Right","Shift-Right"),exec:function(a,b,c){a.editor.getSelection().selectRight()}}),e.addCommand({name:"gotoright",bindKey:f("Right","Right|Ctrl-F"),exec:function(a,b,c){a.editor.navigateRight(b.times)}}),e.addCommand({name:"selectpagedown",bindKey:f("Shift-PageDown","Shift-PageDown"),exec:function(a,b,c){a.editor.selectPageDown()}}),e.addCommand({name:"pagedown",bindKey:f(null,"PageDown"),exec:function(a,b,c){a.editor.scrollPageDown()}}),e.addCommand({name:"gotopagedown",bindKey:f("PageDown","Option-PageDown|Ctrl-V"),exec:function(a,b,c){a.editor.gotoPageDown()}}),e.addCommand({name:"selectpageup",bindKey:f("Shift-PageUp","Shift-PageUp"),exec:function(a,b,c){a.editor.selectPageUp()}}),e.addCommand({name:"pageup",bindKey:f(null,"PageUp"),exec:function(a,b,c){a.editor.scrollPageUp()}}),e.addCommand({name:"gotopageup",bindKey:f("PageUp","Option-PageUp"),exec:function(a,b,c){a.editor.gotoPageUp()}}),e.addCommand({name:"selectlinestart",bindKey:f("Shift-Home","Shift-Home"),exec:function(a,b,c){a.editor.getSelection().selectLineStart()}}),e.addCommand({name:"selectlineend",bindKey:f("Shift-End","Shift-End"),exec:function(a,b,c){a.editor.getSelection().selectLineEnd()}}),e.addCommand({name:"del",bindKey:f("Delete","Delete|Ctrl-D"),exec:function(a,b,c){a.editor.removeRight()}}),e.addCommand({name:"backspace",bindKey:f("Ctrl-Backspace|Command-Backspace|Option-Backspace|Shift-Backspace|Backspace","Ctrl-Backspace|Command-Backspace|Shift-Backspace|Backspace|Ctrl-H"),exec:function(a,b,c){a.editor.removeLeft()}}),e.addCommand({name:"removetolinestart",bindKey:f(null,"Option-Backspace"),exec:function(a,b,c){a.editor.removeToLineStart()}}),e.addCommand({name:"removetolineend",bindKey:f(null,"Ctrl-K"),exec:function(a,b,c){a.editor.removeToLineEnd()}}),e.addCommand({name:"removewordleft",bindKey:f("Ctrl-Backspace","Alt-Backspace|Ctrl-Alt-Backspace"),exec:function(a,b,c){a.editor.removeWordLeft()}}),e.addCommand({name:"removewordright",bindKey:f(null,"Alt-Delete"),exec:function(a,b,c){a.editor.removeWordRight()}}),e.addCommand({name:"outdent",bindKey:f("Shift-Tab","Shift-Tab"),exec:function(a,b,c){a.editor.blockOutdent()}}),e.addCommand({name:"indent",bindKey:f("Tab","Tab"),exec:function(a,b,c){a.editor.indent()}}),e.addCommand({name:"inserttext",exec:function(a,b,c){a.editor.insert(d.stringRepeat(b.text||"",b.times||1))}}),e.addCommand({name:"centerselection",bindKey:f(null,"Ctrl-L"),exec:function(a,b,c){a.editor.centerSelection()}}),e.addCommand({name:"splitline",bindKey:f(null,"Ctrl-O"),exec:function(a,b,c){a.editor.splitLine()}}),e.addCommand({name:"transposeletters",bindKey:f("Ctrl-T","Ctrl-T"),exec:function(a,b,c){a.editor.transposeLetters()}})}),define("ace/edit_session",["require","exports","module","pilot/oop","pilot/lang","pilot/event_emitter","ace/selection","ace/mode/text","ace/range","ace/document","ace/background_tokenizer","ace/edit_session/folding"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("pilot/event_emitter").EventEmitter,g=a("ace/selection").Selection,h=a("ace/mode/text").Mode,j=a("ace/range").Range,k=a("ace/document").Document,l=a("ace/background_tokenizer").BackgroundTokenizer,m=function(a,b){this.$modified=!0,this.$breakpoints=[],this.$frontMarkers={},this.$backMarkers={},this.$markerId=1,this.$rowCache=[],this.$wrapData=[],this.$foldData=[],this.$foldData.toString=function(){var a="";this.forEach(function(b){a+="\n"+b.toString()});return a},a instanceof k?this.setDocument(a):this.setDocument(new k(a)),this.selection=new g(this),b?this.setMode(b):this.setMode(new h)};(function(){function o(a){return a<4352?!1:a>=4352&&a<=4447||a>=4515&&a<=4519||a>=4602&&a<=4607||a>=9001&&a<=9002||a>=11904&&a<=11929||a>=11931&&a<=12019||a>=12032&&a<=12245||a>=12272&&a<=12283||a>=12288&&a<=12350||a>=12353&&a<=12438||a>=12441&&a<=12543||a>=12549&&a<=12589||a>=12593&&a<=12686||a>=12688&&a<=12730||a>=12736&&a<=12771||a>=12784&&a<=12830||a>=12832&&a<=12871||a>=12880&&a<=13054||a>=13056&&a<=19903||a>=19968&&a<=42124||a>=42128&&a<=42182||a>=43360&&a<=43388||a>=44032&&a<=55203||a>=55216&&a<=55238||a>=55243&&a<=55291||a>=63744&&a<=64255||a>=65040&&a<=65049||a>=65072&&a<=65106||a>=65108&&a<=65126||a>=65128&&a<=65131||a>=65281&&a<=65376||a>=65504&&a<=65510}d.implement(this,f),this.setDocument=function(a){if(this.doc)throw new Error("Document is already set");this.doc=a,a.on("change",this.onChange.bind(this)),this.on("changeFold",this.onChangeFold.bind(this))},this.getDocument=function(){return this.doc},this.$resetRowCache=function(a){if(a==0)this.$rowCache=[];else{var b=this.$rowCache;for(var c=0;c=a){b.splice(c,b.length);return}}},this.onChangeFold=function(a){var b=a.data;this.$resetRowCache(b.start.row)},this.onChange=function(a){var b=a.data;this.$modified=!0,this.$resetRowCache(b.range.start.row);var c=this.$updateInternalDataOnChange(a);!this.$fromUndo&&this.$undoManager&&!b.ignore&&(this.$deltasDoc.push(b),c&&c.length!=0&&this.$deltasFold.push({action:"removeFolds",folds:c}),this.$informUndoManager.schedule()),this.bgTokenizer.start(b.range.start.row),this._dispatchEvent("change",a)},this.setValue=function(a){this.doc.setValue(a),this.selection.moveCursorTo(0,0),this.selection.clearSelection(),this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.getUndoManager().reset()},this.getValue=this.toString=function(){return this.doc.getValue()},this.getSelection=function(){return this.selection},this.getState=function(a){return this.bgTokenizer.getState(a)},this.getTokens=function(a,b){return this.bgTokenizer.getTokens(a,b)},this.setUndoManager=function(a){this.$undoManager=a,this.$resetRowCache(0),this.$deltas=[],this.$deltasDoc=[],this.$deltasFold=[],this.$informUndoManager&&this.$informUndoManager.cancel();if(a){var b=this;this.$syncInformUndoManager=function(){b.$informUndoManager.cancel(),b.$deltasFold.length&&(b.$deltas.push({group:"fold",deltas:b.$deltasFold}),b.$deltasFold=[]),b.$deltasDoc.length&&(b.$deltas.push({group:"doc",deltas:b.$deltasDoc}),b.$deltasDoc=[]),b.$deltas.length>0&&a.execute({action:"aceupdate",args:[b.$deltas,b]}),b.$deltas=[]},this.$informUndoManager=e.deferredCall(this.$syncInformUndoManager)}},this.$defaultUndoManager={undo:function(){},redo:function(){},reset:function(){}},this.getUndoManager=function(){return this.$undoManager||this.$defaultUndoManager},this.getTabString=function(){return this.getUseSoftTabs()?e.stringRepeat(" ",this.getTabSize()):"\t"},this.$useSoftTabs=!0,this.setUseSoftTabs=function(a){this.$useSoftTabs!==a&&(this.$useSoftTabs=a)},this.getUseSoftTabs=function(){return this.$useSoftTabs},this.$tabSize=4,this.setTabSize=function(a){!isNaN(a)&&this.$tabSize!==a&&(this.$modified=!0,this.$tabSize=a,this._dispatchEvent("changeTabSize"))},this.getTabSize=function(){return this.$tabSize},this.isTabStop=function(a){return this.$useSoftTabs&&a.column%this.$tabSize==0},this.$overwrite=!1,this.setOverwrite=function(a){this.$overwrite!=a&&(this.$overwrite=a,this._dispatchEvent("changeOverwrite"))},this.getOverwrite=function(){return this.$overwrite},this.toggleOverwrite=function(){this.setOverwrite(!this.$overwrite)},this.getBreakpoints=function(){return this.$breakpoints},this.setBreakpoints=function(a){this.$breakpoints=[];for(var b=0;b0&&(d=!!c.charAt(b-1).match(this.tokenRe)),d||(d=!!c.charAt(b).match(this.tokenRe));var e=d?this.tokenRe:this.nonTokenRe,f=b;if(f>0){do f--;while(f>=0&&c.charAt(f).match(e));f++}var g=b;while(g=0){var h=g.charAt(d);if(h==c){f-=1;if(f==0)return{row:e,column:d}}else h==a&&(f+=1);d-=1}e-=1;if(e<0)break;var g=this.getLine(e),d=g.length-1}return null},this.$findClosingBracket=function(a,b){var c=this.$brackets[a],d=b.column,e=b.row,f=1,g=this.getLine(e),h=this.getLength();for(;;){while(d=h)break;var g=this.getLine(e),d=0}return null},this.insert=function(a,b){return this.doc.insert(a,b)},this.remove=function(a){return this.doc.remove(a)},this.undoChanges=function(a,b){if(!!a.length){this.$fromUndo=!0;var c=null;for(var d=a.length-1;d!=-1;d--)delta=a[d],delta.group=="doc"?(this.doc.revertDeltas(delta.deltas),c=this.$getUndoSelection(delta.deltas,!0,c)):delta.deltas.forEach(function(a){this.addFolds(a.folds)},this);this.$fromUndo=!1,c&&!b&&this.selection.setSelectionRange(c);return c}},this.redoChanges=function(a,b){if(!!a.length){this.$fromUndo=!0;var c=null;for(var d=0;d=this.doc.getLength()-1)return 0;var c=this.doc.removeLines(a,b);this.doc.insertLines(a+1,c);return 1},this.duplicateLines=function(a,b){var a=this.$clipRowToDocument(a),b=this.$clipRowToDocument(b),c=this.getLines(a,b);this.doc.insertLines(a,c);var d=b-a+1;return d},this.$clipRowToDocument=function(a){return Math.max(0,Math.min(a,this.doc.getLength()-1))},this.$clipPositionToDocument=function(a,b){b=Math.max(0,b);if(a<0)a=0,b=0;else{var c=this.doc.getLength();a>=c?(a=c-1,b=this.doc.getLine(c-1).length):b=Math.min(this.doc.getLine(a).length,b)}return{row:a,column:b}},this.$wrapLimit=80,this.$useWrapMode=!1,this.$wrapLimitRange={min:null,max:null},this.setUseWrapMode=function(a){if(a!=this.$useWrapMode){this.$useWrapMode=a,this.$modified=!0,this.$resetRowCache(0);if(a){var b=this.getLength();this.$wrapData=[];for(i=0;i0){this.$wrapLimit=b,this.$modified=!0,this.$useWrapMode&&(this.$updateWrapData(0,this.getLength()-1),this.$resetRowCache(0),this._dispatchEvent("changeWrapLimit"));return!0}return!1},this.$constrainWrapLimit=function(a){var b=this.$wrapLimitRange.min;b&&(a=Math.max(b,a));var c=this.$wrapLimitRange.max;c&&(a=Math.min(c,a));return Math.max(1,a)},this.getWrapLimit=function(){return this.$wrapLimit},this.getWrapLimitRange=function(){return{min:this.$wrapLimitRange.min,max:this.$wrapLimitRange.max}},this.$updateInternalDataOnChange=function(a){var b=this.$useWrapMode,c,d=a.data.action,e=a.data.range.start.row,f=a.data.range.end.row,g=a.data.range.start,h=a.data.range.end,i=null;d.indexOf("Lines")!=-1?(d=="insertLines"?f=e+a.data.lines.length:f=e,c=a.data.lines.length):c=f-e;if(c!=0)if(d.indexOf("remove")!=-1){b&&this.$wrapData.splice(e,c);var j=this.$foldData;i=this.getFoldsInRange(a.data.range),this.removeFolds(i);var k=this.getFoldLine(h.row),l=0;if(k){k.addRemoveChars(h.row,h.column,g.column-h.column),k.shiftRow(-c);var m=this.getFoldLine(e);m&&m!==k&&(m.merge(k),k=m),l=j.indexOf(k)+1}for(l;l=h.row&&k.shiftRow(-c)}f=e}else{var n;if(b){n=[e,0];for(var o=0;o=e&&k.shiftRow(c)}}else{var q;c=Math.abs(a.data.range.start.column-a.data.range.end.column),d.indexOf("remove")!=-1&&(i=this.getFoldsInRange(a.data.range),this.removeFolds(i),c=-c);var k=this.getFoldLine(e);k&&k.addRemoveChars(e,g.column,c)}b&&this.$wrapData.length!=this.doc.getLength()&&console.error("doc.getLength() and $wrapData.length have to be the same!"),b&&this.$updateWrapData(e,f);return i},this.$updateWrapData=function(a,b){var c=this.doc.getAllLines(),d=this.getTabSize(),f=this.$wrapData,i=this.$wrapLimit,j,l,m=a;b=Math.min(b,c.length-1);while(m<=b){l=this.getFoldLine(m);if(!l)j=this.$getDisplayTokens(e.stringTrimRight(c[m]));else{j=[],l.walk(function(a,b,d,e){var f;if(a){f=this.$getDisplayTokens(a,j.length),f[0]=g;for(var i=1;i=k)j.pop()}f[m]=this.$computeWrapSplits(j,i,d),m=this.getRowFoldEnd(m)+1}};var b=1,c=2,g=3,h=4,k=10,m=11,n=12;this.$computeWrapSplits=function(a,b,c){function j(b){var c=a.slice(f,b),e=c.length;c.join("").replace(/12/g,function(a){e-=1}).replace(/2/g,function(a){e-=1}),i+=e,d.push(i),f=b}if(a.length==0)return[];var c=this.getTabSize(),d=[],e=a.length,f=0,i=0;while(e-f>b){var l=f+b;if(a[l]>=k){while(a[l]>=k)l++;j(l);continue}if(a[l]==g||a[l]==h){for(l;l!=f-1;l--)if(a[l]==g)break;if(l>f){j(l);continue}l=f+b;for(l;l=g){l++;break}if(l>f){j(l);continue}l=f+b,j(f+b)}return d},this.$getDisplayTokens=function(a,d){var e=[],f;d=d||0;for(var g=0;gb)break}return[c,e]},this.getRowLength=function(a){return!this.$useWrapMode||!this.$wrapData[a]?1:this.$wrapData[a].length+1},this.getRowHeight=function(a,b){return this.getRowLength(b)*a.lineHeight},this.getScreenLastRowColumn=function(a){return this.documentToScreenColumn(a,this.doc.getLine(a).length)},this.getDocumentLastRowColumn=function(a,b){var c=this.documentToScreenRow(a,b);return this.getScreenLastRowColumn(c)},this.getDocumentLastRowColumnPosition=function(a,b){var c=this.documentToScreenRow(a,b);return this.screenToDocumentPosition(c,Number.MAX_VALUE/10)},this.getRowSplitData=function(a){return this.$useWrapMode?this.$wrapData[a]:undefined},this.getScreenTabSize=function(a){return this.$tabSize-a%this.$tabSize},this.screenToDocumentRow=function(a,b){return this.screenToDocumentPosition(a,b).row},this.screenToDocumentColumn=function(a,b){return this.screenToDocumentPosition(a,b).column},this.screenToDocumentPosition=function(a,b){if(a<0)return{row:0,column:0};var c,d=0,e=0,f,g,h=0,i=0,j=this.$rowCache;for(var k=0;k=a||d>=m)break;h+=i,d++,d>o&&(d=n.end.row+1,n=this.getNextFold(d),o=n?n.start.row:Infinity),l&&j.push({docRow:d,screenRow:h})}n&&n.start.row<=d?c=this.getFoldDisplayLine(n):(c=this.getLine(d),n=null);var p=[];this.$useWrapMode&&(p=this.$wrapData[d],p&&(f=p[a-h],a>h&&p.length&&(e=p[a-h-1]||p[p.length-1],c=c.substring(e)))),e+=this.$getStringScreenWidth(c,b)[1],h+p.length=f&&(e=f-1):e=Math.min(e,c.length);return n?n.idxToPosition(e):{row:d,column:e}},this.documentToScreenPosition=function(a,b){if(typeof b=="undefined")var c=this.$clipPositionToDocument(a.row,a.column);else c=this.$clipPositionToDocument(a,b);a=c.row,b=c.column;var d=this.$rowCache.length,e;if(this.$useWrapMode){e=this.$wrapData;if(a>e.length-1)return{row:this.getScreenLength(),column:e.length==0?0:e[e.length-1].length-1}}var f=0,g=0,h=null,i=null;i=this.getFoldAt(a,b,1),i&&(a=i.start.row,b=i.start.column);var j,k=0,l=this.$rowCache;for(var m=0;m=p){j=o.end.row+1;if(j>a)break;o=this.getNextFold(j),p=o?o.start.row:Infinity}else j=k+1;f+=this.getRowLength(k),k=j,n&&l.push({docRow:k,screenRow:f})}var q="";o&&k>=p?(q=this.getFoldDisplayLine(o,a,b),h=o.start.row):(q=this.getLine(a).substring(0,b),h=a);if(this.$useWrapMode){var r=e[h],s=0;while(q.length>=r[s])f++,s++;q=q.substring(r[s-1]||0,q.length)}return{row:f,column:this.$getStringScreenWidth(q)[0]}},this.documentToScreenColumn=function(a,b){return this.documentToScreenPosition(a,b).column},this.documentToScreenRow=function(a,b){return this.documentToScreenPosition(a,b).row},this.getScreenLength=function(){var a=0,b=null,c=null;if(!this.$useWrapMode){a=this.getLength();var d=this.$foldData;for(var e=0;eb.row||a.row==b.row&&a.column>b.column},this.getRange=function(){var a=this.selectionAnchor,b=this.selectionLead;return this.isEmpty()?g.fromPoints(b,b):this.isBackwards()?g.fromPoints(b,a):g.fromPoints(a,b)},this.clearSelection=function(){this.$isEmpty||(this.$isEmpty=!0,this._dispatchEvent("changeSelection"))},this.selectAll=function(){var a=this.doc.getLength()-1;this.setSelectionAnchor(a,this.doc.getLine(a).length),this.moveCursorTo(0,0)},this.setSelectionRange=function(a,b){b?(this.setSelectionAnchor(a.end.row,a.end.column),this.selectTo(a.start.row,a.start.column)):(this.setSelectionAnchor(a.start.row,a.start.column),this.selectTo(a.end.row,a.end.column)),this.$updateDesiredColumn()},this.$updateDesiredColumn=function(){var a=this.getCursor();this.$desiredColumn=this.session.documentToScreenColumn(a.row,a.column)},this.$moveSelection=function(a){var b=this.selectionLead;this.$isEmpty&&this.setSelectionAnchor(b.row,b.column),a.call(this)},this.selectTo=function(a,b){this.$moveSelection(function(){this.moveCursorTo(a,b)})},this.selectToPosition=function(a){this.$moveSelection(function(){this.moveCursorToPosition(a)})},this.selectUp=function(){this.$moveSelection(this.moveCursorUp)},this.selectDown=function(){this.$moveSelection(this.moveCursorDown)},this.selectRight=function(){this.$moveSelection(this.moveCursorRight)},this.selectLeft=function(){this.$moveSelection(this.moveCursorLeft)},this.selectLineStart=function(){this.$moveSelection(this.moveCursorLineStart)},this.selectLineEnd=function(){this.$moveSelection(this.moveCursorLineEnd)},this.selectFileEnd=function(){this.$moveSelection(this.moveCursorFileEnd)},this.selectFileStart=function(){this.$moveSelection(this.moveCursorFileStart)},this.selectWordRight=function(){this.$moveSelection(this.moveCursorWordRight)},this.selectWordLeft=function(){this.$moveSelection(this.moveCursorWordLeft)},this.selectWord=function(){var a=this.getCursor(),b=this.session.getWordRange(a.row,a.column);this.setSelectionRange(b)},this.selectLine=function(){var a=this.selectionLead.row,b,c=this.session.getFoldLine(a);c?(a=c.start.row,b=c.end.row):b=a,this.setSelectionAnchor(a,0),this.$moveSelection(function(){this.moveCursorTo(b+1,0)})},this.moveCursorUp=function(){this.moveCursorBy(-1,0)},this.moveCursorDown=function(){this.moveCursorBy(1,0)},this.moveCursorLeft=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,-1))this.moveCursorTo(b.start.row,b.start.column);else if(a.column==0)a.row>0&&this.moveCursorTo(a.row-1,this.doc.getLine(a.row-1).length);else{var c=this.session.getTabSize();this.session.isTabStop(a)&&this.doc.getLine(a.row).slice(a.column-c,a.column).split(" ").length-1==c?this.moveCursorBy(0,-c):this.moveCursorBy(0,-1)}},this.moveCursorRight=function(){var a=this.selectionLead.getPosition(),b;if(b=this.session.getFoldAt(a.row,a.column,1))this.moveCursorTo(b.end.row,b.end.column);else if(this.selectionLead.column==this.doc.getLine(this.selectionLead.row).length)this.selectionLead.row ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;b=this.compare(c.row,c.column);if(b==1){b=this.compare(d.row,d.column);return b==1?2:b==0?1:0}if(b==-1)return-2;b=this.compare(d.row,d.column);return b==-1?-1:b==1?42:0},this.containsRange=function(a){var b=this.compareRange(a);return b==-1||b==0||b==1},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)||this.isStart(a,b)?!1:!0;return!1},this.insideStart=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)?!1:!0;return!1},this.insideEnd=function(a,b){if(this.compare(a,b)==0)return this.isStart(a,b)?!1:!0;return!1},this.compare=function(a,b){if(!this.isMultiLine()&&a===this.start.row)return bthis.end.column?1:0;return athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.row=0&&/^[\w\d]/.test(h)||e<=g&&/[\w\d]$/.test(h))return;h=f.substring(c.start.column,c.end.column);if(!/^[\w\d]+$/.test(h))return;var i=a.getCursorPosition(),j={wrap:!0,wholeWord:!0,caseSensitive:!0,needle:h},k=a.$search.getOptions();a.$search.set(j);var l=a.$search.findAll(b);l.forEach(function(a){if(!a.contains(i.row,i.column)){var c=b.addMarker(a,"ace_selected_word","text");b.$selectionOccurrences.push(c)}}),a.$search.set(k)}},this.clearSelectionHighlight=function(a){!a.session.$selectionOccurrences||(a.session.$selectionOccurrences.forEach(function(b){a.session.removeMarker(b)}),a.session.$selectionOccurrences=[])},this.createModeDelegates=function(a){if(!!this.$embeds){this.$modes={};for(var b=0;b1&&(m=g.slice(n+2,n+1+e[n].len)),typeof l.token=="function"?k=l.token.apply(this,m):k=l.token;var o=l.next;o&&o!==c&&(c=o,d=this.rules[c],e=this.matchMappings[c],i=f.lastIndex,f=this.regExps[c],f.lastIndex=i);break}if(m[0]){typeof k=="string"&&(m=[m.join("")],k=[k]);for(var n=0;n=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||""));return a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};this._dispatchEvent("change",{data:e});return d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:d});return c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};this._dispatchEvent("change",{data:e});return d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};this._dispatchEvent("change",{data:i});return d.start}},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};this._dispatchEvent("change",{data:e});return d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}}).call(h.prototype),b.Document=h}),define("ace/anchor",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=b.Anchor=function(a,b,c){this.document=a,typeof c=="undefined"?this.setPosition(b.row,b.column):this.setPosition(b,c),this.$onChange=this.onChange.bind(this),a.on("change",this.$onChange)};(function(){d.implement(this,e),this.getPosition=function(){return this.$clipPositionToDocument(this.row,this.column)},this.getDocument=function(){return this.document},this.onChange=function(a){var b=a.data,c=b.range;if(c.start.row!=c.end.row||c.start.row==this.row){if(c.start.row>this.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0);return c}}).call(f.prototype)}),define("ace/background_tokenizer",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(a,b){this.running=!1,this.lines=[],this.currentLine=0,this.tokenizer=a;var c=this;this.$worker=function(){if(!!c.running){var a=new Date,b=c.currentLine,d=c.doc,e=0,f=d.getLength();while(c.currentLine20){c.fireUpdateEvent(b,c.currentLine-1),c.running=setTimeout(c.$worker,20);return}}c.running=!1,c.fireUpdateEvent(b,f-1)}}};(function(){d.implement(this,e),this.setTokenizer=function(a){this.tokenizer=a,this.lines=[],this.start(0)},this.setDocument=function(a){this.doc=a,this.lines=[],this.stop()},this.fireUpdateEvent=function(a,b){var c={first:a,last:b};this._dispatchEvent("update",{data:c})},this.start=function(a){this.currentLine=Math.min(a||0,this.currentLine,this.doc.getLength()),this.lines.splice(this.currentLine,this.lines.length),this.stop(),this.running=setTimeout(this.$worker,700)},this.stop=function(){this.running&&clearTimeout(this.running),this.running=!1},this.getTokens=function(a,b){return this.$tokenizeRows(a,b)},this.getState=function(a){return this.$tokenizeRows(a,a)[0].state},this.$tokenizeRows=function(a,b){if(!this.doc)return[];var c=[],d="start",e=!1;a>0&&this.lines[a-1]?(d=this.lines[a-1].state,e=!0):a==0?(d="start",e=!0):this.lines.length>0&&(d=this.lines[this.lines.length-1].state);var f=this.doc.getLines(a,b);for(var g=a;g<=b;g++)if(!this.lines[g]){var h=this.tokenizer.getLineTokens(f[g-a]||"",d),d=h.state;c.push(h),e&&(this.lines[g]=h)}else{var h=this.lines[g];d=h.state,c.push(h)}return c}}).call(f.prototype),b.BackgroundTokenizer=f}),define("ace/edit_session/folding",["require","exports","module","ace/range","ace/edit_session/fold_line","ace/edit_session/fold"],function(a,b,c){function g(){this.getFoldAt=function(a,b,c){var d=this.getFoldLine(a);if(!d)return null;var e=d.folds;for(var f=0;f=a)return e;if(e.end.row>a)return null}return null},this.getNextFold=function(a,b){var c=this.$foldData,d,e=0;b&&(e=c.indexOf(b)),e==-1&&(e=0);for(e;e=a)return f}return null},this.getFoldedRowCount=function(a,b){var c=this.$foldData,d=b-a+1;for(var e=0;e=b){h=a?d-=b-h:d=0);break}g>=a&&(h>=a?d-=g-h:d-=g-a+1)}return d},this.$addFoldLine=function(a){this.$foldData.push(a),this.$foldData.sort(function(a,b){return a.start.row-b.start.row});return a},this.addFold=function(a,b){var c=this.$foldData,d=!1;if(a instanceof f)var g=a;else g=new f(b,a);var h=g.start.row,i=g.start.column,j=g.end.row,k=g.end.column;if(g.placeholder.length<2)throw"Placeholder has to be at least 2 characters";if(h==j&&k-i<2)throw"The range has to be at least 2 characters width";var l=this.getFoldAt(h,i,1);if(l&&l.range.isEnd(j,k)&&l.range.isStart(h,i))return g;l=this.getFoldAt(h,i,1);if(l&&!l.range.isStart(h,i))throw"A fold can't start inside of an already existing fold";l=this.getFoldAt(j,k,-1);if(l&&!l.range.isEnd(j,k))throw"A fold can't end inside of an already existing fold";if(j>=this.doc.getLength())throw"End of fold is outside of the document.";if(k>this.getLine(j).length||i>this.getLine(h).length)throw"End of fold is outside of the document.";var m=this.getFoldsInRange(g.range);m.length>0&&(this.removeFolds(m),g.subFolds=m);for(var n=0;nthis.endRow)throw"Can't add a fold to this FoldLine as it has no connection";this.folds.push(a),this.folds.sort(function(a,b){return-a.range.compareEnd(b.start.row,b.start.column)}),this.range.compareEnd(a.start.row,a.start.column)>0?(this.end.row=a.end.row,this.end.column=a.end.column):this.range.compareStart(a.end.row,a.end.column)<0&&(this.start.row=a.start.row,this.start.column=a.start.column)}else if(a.start.row==this.end.row)this.folds.push(a),this.end.row=a.end.row,this.end.column=a.end.column;else if(a.end.row==this.start.row)this.folds.unshift(a),this.start.row=a.start.row,this.start.column=a.start.column;else throw"Trying to add fold to FoldRow that doesn't have a matching row";a.foldLine=this},this.containsRow=function(a){return a>=this.start.row&&a<=this.end.row},this.walk=function(a,b,c){var d=0,e=this.folds,f,g,h,i=!0;b==null&&(b=this.end.row,c=this.end.column);for(var j=0;j=0;h--){var i=g[h],j=c.$rangeFromMatch(f,i.offset,i.str.length);if(d(j))return!0}})}}},this.$rangeFromMatch=function(a,b,c){return new f(a,b,a,b+c)},this.$assembleRegExp=function(){if(this.$options.regExp)var a=this.$options.needle;else a=d.escapeRegExp(this.$options.needle);this.$options.wholeWord&&(a="\\b"+a+"\\b");var b="g";this.$options.caseSensitive||(b+="i");var c=new RegExp(a,b);return c},this.$forwardLineIterator=function(a){function k(e){var f=a.getLine(e);b&&e==c.end.row&&(f=f.substring(0,c.end.column)),j&&e==d.row&&(f=f.substring(0,d.column));return f}var b=this.$options.scope==g.SELECTION,c=a.getSelection().getRange(),d=a.getSelection().getCursor(),e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap,j=!1;return{forEach:function(a){var b=d.row,c=k(b),g=d.column,l=!1;j=!1;while(!a(c,g,b)){if(l)return;b++,g=0;if(b>h)if(i)b=e,g=f,j=!0;else return;b==d.row&&(l=!0),c=k(b)}}}},this.$backwardLineIterator=function(a){var b=this.$options.scope==g.SELECTION,c=a.getSelection().getRange(),d=b?c.end:c.start,e=b?c.start.row:0,f=b?c.start.column:0,h=b?c.end.row:a.getLength()-1,i=this.$options.wrap;return{forEach:function(g){var j=d.row,k=a.getLine(j).substring(0,d.column),l=0,m=!1,n=!1;while(!g(k,l,j)){if(m)return;j--,l=0;if(j0},this.hasRedo=function(){return this.$redoStack.length>0}}).call(d.prototype),b.UndoManager=d}),define("ace/virtual_renderer",["require","exports","module","pilot/oop","pilot/dom","pilot/event","pilot/useragent","ace/layer/gutter","ace/layer/marker","ace/layer/text","ace/layer/cursor","ace/scrollbar","ace/renderloop","pilot/event_emitter","text/ace/css/editor.css"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/dom"),f=a("pilot/event"),g=a("pilot/useragent"),h=a("ace/layer/gutter").Gutter,i=a("ace/layer/marker").Marker,j=a("ace/layer/text").Text,k=a("ace/layer/cursor").Cursor,l=a("ace/scrollbar").ScrollBar,m=a("ace/renderloop").RenderLoop,n=a("pilot/event_emitter").EventEmitter,o=a("text/ace/css/editor.css");e.importCssString(o);var p=function(a,b){this.container=a,e.addCssClass(this.container,"ace_editor"),this.setTheme(b),this.$gutter=e.createElement("div"),this.$gutter.className="ace_gutter",this.container.appendChild(this.$gutter),this.scroller=e.createElement("div"),this.scroller.className="ace_scroller",this.container.appendChild(this.scroller),this.content=e.createElement("div"),this.content.className="ace_content",this.scroller.appendChild(this.content),this.$gutterLayer=new h(this.$gutter),this.$markerBack=new i(this.content);var c=this.$textLayer=new j(this.content);this.canvas=c.element,this.$markerFront=new i(this.content),this.characterWidth=c.getCharacterWidth(),this.lineHeight=c.getLineHeight(),this.$cursorLayer=new k(this.content),this.$cursorPadding=8,this.$horizScroll=!0,this.$horizScrollAlwaysVisible=!0,this.scrollBar=new l(a),this.scrollBar.addEventListener("scroll",this.onScroll.bind(this)),this.scrollTop=0,this.cursorPos={row:0,column:0};var d=this;this.$textLayer.addEventListener("changeCharaterSize",function(){d.characterWidth=c.getCharacterWidth(),d.lineHeight=c.getLineHeight(),d.$updatePrintMargin(),d.onResize(!0),d.$loop.schedule(d.CHANGE_FULL)}),f.addListener(this.$gutter,"click",this.$onGutterClick.bind(this)),f.addListener(this.$gutter,"dblclick",this.$onGutterClick.bind(this)),this.$size={width:0,height:0,scrollerHeight:0,scrollerWidth:0},this.layerConfig={width:1,padding:0,firstRow:0,firstRowScreen:0,lastRow:0,lineHeight:1,characterWidth:1,minHeight:1,maxHeight:1,offset:0,height:1},this.$loop=new m(this.$renderChanges.bind(this)),this.$loop.schedule(this.CHANGE_FULL),this.setPadding(4),this.$updatePrintMargin()};(function(){this.showGutter=!0,this.CHANGE_CURSOR=1,this.CHANGE_MARKER=2,this.CHANGE_GUTTER=4,this.CHANGE_SCROLL=8,this.CHANGE_LINES=16,this.CHANGE_TEXT=32,this.CHANGE_SIZE=64,this.CHANGE_MARKER_BACK=128,this.CHANGE_MARKER_FRONT=256,this.CHANGE_FULL=512,d.implement(this,n),this.setSession=function(a){this.session=a,this.$cursorLayer.setSession(a),this.$markerBack.setSession(a),this.$markerFront.setSession(a),this.$gutterLayer.setSession(a),this.$textLayer.setSession(a),this.$loop.schedule(this.CHANGE_FULL)},this.updateLines=function(a,b){b===undefined&&(b=Infinity),this.$changedLines?(this.$changedLines.firstRow>a&&(this.$changedLines.firstRow=a),this.$changedLines.lastRowc.lastRow+1)){if(bc&&this.scrollToY(c),this.scrollTop+this.$size.scrollerHeightb&&this.scrollToX(b),d+this.$size.scrollerWidththis.layerConfig.width?this.$desiredScrollLeft=b+2*this.characterWidth:this.scrollToX(Math.round(b+this.characterWidth-this.$size.scrollerWidth)))}},this.getScrollTop=function(){return this.scrollTop},this.getScrollLeft=function(){return this.scroller.scrollLeft},this.getScrollTopRow=function(){return this.scrollTop/this.lineHeight},this.getScrollBottomRow=function(){return Math.max(0,Math.floor((this.scrollTop+this.$size.scrollerHeight)/this.lineHeight)-1)},this.scrollToRow=function(a){this.scrollToY(a*this.lineHeight)},this.scrollToLine=function(a,b){var c={lineHeight:this.lineHeight},d=0;for(var e=1;eh&&(e=g.end.row+1,g=this.session.getNextFold(e),h=g?g.start.row:Infinity);if(e>f)break;var i=this.$annotations[e]||b;c.push("
        ",e+1);var j=this.session.getRowLength(e)-1;while(j--)c.push("
        ¦
        ");c.push(""),e++}this.element=d.setInnerHtml(this.element,c.join("")),this.element.style.height=a.minHeight+"px"}}).call(e.prototype),b.Gutter=e}),define("ace/layer/marker",["require","exports","module","ace/range","pilot/dom"],function(a,b,c){var d=a("ace/range").Range,e=a("pilot/dom"),f=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_marker-layer",a.appendChild(this.element)};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.setMarkers=function(a){this.markers=a},this.update=function(a){var a=a||this.config;if(!!a){this.config=a;var b=[];for(var c in this.markers){var d=this.markers[c],f=d.range.clipRows(a.firstRow,a.lastRow);if(f.isEmpty())continue;f=f.toScreenRange(this.session);if(d.renderer){var g=this.$getTop(f.start.row,a),h=Math.round(this.$padding+f.start.column*a.characterWidth);d.renderer(b,f,h,g,a)}else f.isMultiLine()?d.type=="text"?this.drawTextMarker(b,f,d.clazz,a):this.drawMultiLineMarker(b,f,d.clazz,a,d.type):this.drawSingleLineMarker(b,f,d.clazz,a,null,d.type)}this.element=e.setInnerHtml(this.element,b.join(""))}},this.$getTop=function(a,b){return(a-b.firstRowScreen)*b.lineHeight},this.drawTextMarker=function(a,b,c,e){var f=b.start.row,g=new d(f,b.start.column,f,this.session.getScreenLastRowColumn(f));this.drawSingleLineMarker(a,g,c,e,1,"text"),f=b.end.row,g=new d(f,0,f,b.end.column),this.drawSingleLineMarker(a,g,c,e,0,"text");for(f=b.start.row+1;f"),i=this.$getTop(b.end.row,d),h=Math.round(b.end.column*d.characterWidth),a.push("
        "),g=(b.end.row-b.start.row-1)*d.lineHeight;g<0||(i=this.$getTop(b.start.row+1,d),h=d.width,a.push("
        "))},this.drawSingleLineMarker=function(a,b,c,d,e,f){var g=f==="background"?0:this.$padding,h=d.lineHeight;if(f==="background")var i=d.width;else i=Math.round((b.end.column+(e||0)-b.start.column)*d.characterWidth);var j=this.$getTop(b.start.row,d),k=Math.round(g+b.start.column*d.characterWidth);a.push("
        ")}}).call(f.prototype),b.Marker=f}),define("ace/layer/text",["require","exports","module","pilot/oop","pilot/dom","pilot/lang","pilot/useragent","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/dom"),f=a("pilot/lang"),g=a("pilot/useragent"),h=a("pilot/event_emitter").EventEmitter,i=function(a){this.element=e.createElement("div"),this.element.className="ace_layer ace_text-layer",this.element.style.width="auto",a.appendChild(this.element),this.$characterSize=this.$measureSizes()||{width:0,height:0},this.$pollSizeChanges()};(function(){d.implement(this,h),this.EOF_CHAR="¶",this.EOL_CHAR="¬",this.TAB_CHAR="→",this.SPACE_CHAR="·",this.$padding=0,this.setPadding=function(a){this.$padding=a,this.element.style.padding="0 "+a+"px"},this.getLineHeight=function(){return this.$characterSize.height||1},this.getCharacterWidth=function(){return this.$characterSize.width||1},this.checkForSizeChanges=function(){var a=this.$measureSizes();a&&(this.$characterSize.width!==a.width||this.$characterSize.height!==a.height)&&(this.$characterSize=a,this._dispatchEvent("changeCharaterSize",{data:a}))},this.$pollSizeChanges=function(){var a=this;this.$pollSizeChangesTimer=setInterval(function(){a.checkForSizeChanges()},500)},this.$fontStyles={fontFamily:1,fontSize:1,fontWeight:1,fontStyle:1,lineHeight:1},this.$measureSizes=function(){var a=1e3;if(!this.$measureNode){var b=this.$measureNode=e.createElement("div"),c=b.style;c.width=c.height="auto",c.left=c.top=-a*40+"px",c.visibility="hidden",c.position="absolute",c.overflow="visible",c.whiteSpace="nowrap",b.innerHTML=f.stringRepeat("Xy",a);if(document.body)document.body.appendChild(b);else{var d=this.element.parentNode;while(!e.hasCssClass(d,"ace_editor"))d=d.parentNode;d.appendChild(b)}}var c=this.$measureNode.style,g=e.computedStyle(this.element);for(var h in this.$fontStyles)c[h]=g[h];var i={height:this.$measureNode.offsetHeight,width:this.$measureNode.offsetWidth/(a*2)};return i.width==0&&i.height==0?null:i},this.setSession=function(a){this.session=a},this.showInvisibles=!1,this.setShowInvisibles=function(a){if(this.showInvisibles==a)return!1;this.showInvisibles=a;return!0},this.$tabStrings=[],this.$computeTabString=function(){var a=this.session.getTabSize(),b=this.$tabStrings=[0];for(var c=1;c"+this.TAB_CHAR+Array(c).join(" ")+""):b.push(Array(c+1).join(" "))},this.updateLines=function(a,b,c){this.$computeTabString(),(this.config.lastRow!=a.lastRow||this.config.firstRow!=a.firstRow)&&this.scrollLines(a),this.config=a;var d=Math.max(b,a.firstRow),f=Math.min(c,a.lastRow),g=this.element.childNodes,h=0;for(var i=a.firstRow;i0;d--)c.removeChild(c.firstChild);if(b.lastRow>a.lastRow)for(var d=this.session.getFoldedRowCount(a.lastRow+1,b.lastRow);d>0;d--)c.removeChild(c.lastChild);if(a.firstRowb.lastRow){var e=this.$renderLinesFragment(a,b.lastRow+1,a.lastRow);c.appendChild(e)}},this.$renderLinesFragment=function(a,b,c){var d=document.createDocumentFragment(),f=b,g=this.session.getNextFold(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFold(f),h=g?g.start.row:Infinity);if(f>c)break;var i=e.createElement("div"),j=[],k=this.session.getTokens(f,f);k.length==1&&this.$renderLine(j,f,k[0].tokens,!1),i.innerHTML=j.join("");var l=i.childNodes;while(l.length)d.appendChild(l[0]);f++}return d},this.update=function(a){this.$computeTabString(),this.config=a;var b=[],c=a.firstRow,d=a.lastRow,f=c,g=this.session.getNextFold(f),h=g?g.start.row:Infinity;for(;;){f>h&&(f=g.end.row+1,g=this.session.getNextFold(f),h=g?g.start.row:Infinity);if(f>d)break;var i=this.session.getTokens(f,f);i.length==1&&this.$renderLine(b,f,i[0].tokens,!1),f++}this.element=e.setInnerHtml(this.element,b.join(""))},this.$textToken={text:!0,rparen:!0,lparen:!0},this.$renderToken=function(a,b,c,d){var e=this,f=/\t|&|<|( +)|([\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000])|[\u1100-\u115F]|[\u11A3-\u11A7]|[\u11FA-\u11FF]|[\u2329-\u232A]|[\u2E80-\u2E99]|[\u2E9B-\u2EF3]|[\u2F00-\u2FD5]|[\u2FF0-\u2FFB]|[\u3000-\u303E]|[\u3041-\u3096]|[\u3099-\u30FF]|[\u3105-\u312D]|[\u3131-\u318E]|[\u3190-\u31BA]|[\u31C0-\u31E3]|[\u31F0-\u321E]|[\u3220-\u3247]|[\u3250-\u32FE]|[\u3300-\u4DBF]|[\u4E00-\uA48C]|[\uA490-\uA4C6]|[\uA960-\uA97C]|[\uAC00-\uD7A3]|[\uD7B0-\uD7C6]|[\uD7CB-\uD7FB]|[\uF900-\uFAFF]|[\uFE10-\uFE19]|[\uFE30-\uFE52]|[\uFE54-\uFE66]|[\uFE68-\uFE6B]|[\uFF01-\uFF60]|[\uFFE0-\uFFE6]/g,h=function(a,c,d,f,h){if(a.charCodeAt(0)==32)return Array(a.length+1).join(" ");if(a=="\t"){var i=e.session.getScreenTabSize(b+f);b+=i-1;return e.$tabStrings[i]}if(a=="&")return g.isOldGecko?"&":"&";if(a=="<")return"<";if(a.match(/[\v\f \u00a0\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u200b\u2028\u2029\u3000]/)){if(e.showInvisibles){var j=Array(a.length+1).join(e.SPACE_CHAR);return""+j+""}return" "}b+=1;return""+a+""},i=d.replace(f,h);if(!this.$textToken[c.type]){var j="ace_"+c.type.replace(/\./g," ace_");a.push("",i,"")}else a.push(i);return b+d.length},this.$renderLineCore=function(a,b,c,d,e){var f=0,g=0,h,i=this.config.characterWidth,j=0,k=this;!d||d.length==0?h=Number.MAX_VALUE:h=d[0],e||a.push("
        ");for(var l=0;l=h)j=k.$renderToken(a,j,m,n.substring(0,h-f)),n=n.substring(h-f),f=h,e||a.push("
        ","
        "),g++,j=0,h=d[g]||Number.MAX_VALUE;n.length!=0&&(f+=n.length,j=k.$renderToken(a,j,m,n))}}this.showInvisibles&&(b!==this.session.getLength()-1?a.push(""+this.EOL_CHAR+""):a.push(""+this.EOF_CHAR+"")),a.push("
        ")},this.$renderLine=function(a,b,c,d){if(!this.session.isRowFolded(b)){var e=this.session.getRowSplitData(b);this.$renderLineCore(a,b,c,e,d)}else this.$renderFoldLine(a,b,c,d)},this.$renderFoldLine=function(a,b,c,d){function h(a,b,c){var d=0,e=0;while(e+a[d].value.lengthc-b&&(f=f.substring(0,c-b)),g.push({type:a[d].type,value:f}),e=b+f.length,d+=1}while(ec&&(f=f.substring(0,c-e)),g.push({type:a[d].type,value:f}),e+=f.length,d+=1}}var e=this.session,f=e.getFoldLine(b),g=[];f.walk(function(a,b,d,e,f){a?g.push({type:"fold",value:a}):(f&&(c=this.session.getTokens(b,b)[0].tokens),c.length!=0&&h(c,e,d))}.bind(this),f.end.row,this.session.getLine(f.end.row).length);var i=this.session.$useWrapMode?this.session.$wrapData[b]:null;this.$renderLineCore(a,b,g,i,d)},this.destroy=function(){clearInterval(this.$pollSizeChangesTimer),this.$measureNode&&this.$measureNode.parentNode.removeChild(this.$measureNode),delete this.$measureNode}}).call(i.prototype),b.Text=i}),define("ace/layer/cursor",["require","exports","module","pilot/dom"],function(a,b,c){var d=a("pilot/dom"),e=function(a){this.element=d.createElement("div"),this.element.className="ace_layer ace_cursor-layer",a.appendChild(this.element),this.cursor=d.createElement("div"),this.cursor.className="ace_cursor ace_hidden",this.element.appendChild(this.cursor),this.isVisible=!1};(function(){this.$padding=0,this.setPadding=function(a){this.$padding=a},this.setSession=function(a){this.session=a},this.hideCursor=function(){this.isVisible=!1,d.addCssClass(this.cursor,"ace_hidden"),clearInterval(this.blinkId)},this.showCursor=function(){this.isVisible=!0,d.removeCssClass(this.cursor,"ace_hidden"),this.cursor.style.visibility="visible",this.restartTimer()},this.restartTimer=function(){clearInterval(this.blinkId);if(!!this.isVisible){var a=this.cursor;this.blinkId=setInterval(function(){a.style.visibility="hidden",setTimeout(function(){a.style.visibility="visible"},400)},1e3)}},this.getPixelPosition=function(a){if(!this.config||!this.session)return{left:0,top:0};var b=this.session.selection.getCursor(),c=this.session.documentToScreenPosition(b),d=Math.round(this.$padding+c.column*this.config.characterWidth),e=(c.row-(a?this.config.firstRowScreen:0))*this.config.lineHeight;return{left:d,top:e}},this.update=function(a){this.config=a,this.pixelPos=this.getPixelPosition(!0),this.cursor.style.left=this.pixelPos.left+"px",this.cursor.style.top=this.pixelPos.top+"px",this.cursor.style.width=a.characterWidth+"px",this.cursor.style.height=a.lineHeight+"px";var b=this.session.getOverwrite();b!=this.overwrite&&(this.overwrite=b,b?d.addCssClass(this.cursor,"ace_overwrite"):d.removeCssClass(this.cursor,"ace_overwrite")),this.restartTimer()},this.destroy=function(){clearInterval(this.blinkId)}}).call(e.prototype),b.Cursor=e}),define("ace/scrollbar",["require","exports","module","pilot/oop","pilot/dom","pilot/event","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/dom"),f=a("pilot/event"),g=a("pilot/event_emitter").EventEmitter,h=function(a){this.element=e.createElement("div"),this.element.className="ace_sb",this.inner=e.createElement("div"),this.element.appendChild(this.inner),a.appendChild(this.element),this.width=e.scrollbarWidth(),this.element.style.width=(this.width||15)+"px",f.addListener(this.element,"scroll",this.onScroll.bind(this))};(function(){d.implement(this,g),this.onScroll=function(){this._dispatchEvent("scroll",{data:this.element.scrollTop})},this.getWidth=function(){return this.width},this.setHeight=function(a){this.element.style.height=a+"px"},this.setInnerHeight=function(a){this.inner.style.height=a+"px"},this.setScrollTop=function(a){this.element.scrollTop=a}}).call(h.prototype),b.ScrollBar=h}),define("ace/renderloop",["require","exports","module","pilot/event"],function(a,b,c){var d=a("pilot/event"),e=function(a){this.onRender=a,this.pending=!1,this.changes=0};(function(){this.schedule=function(a){this.changes=this.changes|a;if(!this.pending){this.pending=!0;var b=this;this.setTimeoutZero(function(){b.pending=!1;var a=b.changes;b.changes=0,b.onRender(a)})}},this.setTimeoutZero=window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||window.oRequestAnimationFrame||window.msRequestAnimationFrame,this.setTimeoutZero?this.setTimeoutZero=this.setTimeoutZero.bind(window):window.postMessage?(this.messageName="zero-timeout-message",this.setTimeoutZero=function(a){if(!this.attached){var b=this;d.addListener(window,"message",function(a){b.callback&&a.data==b.messageName&&(d.stopPropagation(a),b.callback())}),this.attached=!0}this.callback=a,window.postMessage(this.messageName,"*")}):this.setTimeoutZero=function(a){setTimeout(a,0)}}).call(e.prototype),b.RenderLoop=e}),define("ace/theme/textmate",["require","exports","module","pilot/dom"],function(a,b,c){var d=a("pilot/dom"),e=".ace-tm .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-tm .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-tm .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-tm .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-tm .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-tm .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_text-layer {\n cursor: text;\n}\n\n.ace-tm .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-tm .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n \n.ace-tm .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-tm .ace_line .ace_fold {\n background-color: #E4E4E4;\n border-radius: 3px;\n}\n\n.ace-tm .ace_line .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_line .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_support.ace_type,\n.ace-tm .ace_line .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_line .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_line .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_line .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active_line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_marker-layer .ace_selected_word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}";d.importCssString(e),b.cssClass="ace-tm"}),define("pilot/environment",["require","exports","module","pilot/settings"],function(a,b,c){function e(){return{settings:d}}var d=a("pilot/settings").settings;b.create=e}),define("text/cockpit/ui/cli_view.css",[],"#cockpitInput { padding-left: 16px; }.cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }.cptCompletion { padding: 0; position: absolute; z-index: -1000; }.cptCompletion.VALID { background: #FFF; }.cptCompletion.INCOMPLETE { background: #DDD; }.cptCompletion.INVALID { background: #DDD; }.cptCompletion span { color: #FFF; }.cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }.cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }span.cptPrompt { color: #66F; font-weight: bold; }.cptHints { color: #000; position: absolute; border: 1px solid rgba(230, 230, 230, 0.8); background: rgba(250, 250, 250, 0.8); -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; z-index: 1000; padding: 8px; display: none;}.cptFocusPopup { display: block; }.cptFocusPopup.cptNoPopup { display: none; }.cptHints ul { margin: 0; padding: 0 15px; }.cptGt { font-weight: bold; font-size: 120%; }"),define("text/cockpit/ui/request_view.css",[],".cptRowIn { display: box; display: -moz-box; display: -webkit-box; box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal; box-align: center; -moz-box-align: center; -webkit-box-align: center; color: #333; background-color: #EEE; width: 100%; font-family: consolas, courier, monospace;}.cptRowIn > * { padding-left: 2px; padding-right: 2px; }.cptRowIn > img { cursor: pointer; }.cptHover { display: none; }.cptRowIn:hover > .cptHover { display: block; }.cptRowIn:hover > .cptHover.cptHidden { display: none; }.cptOutTyped { box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1; font-weight: bold; color: #000; font-size: 120%;}.cptRowOutput { padding-left: 10px; line-height: 1.2em; }.cptRowOutput strong,.cptRowOutput b,.cptRowOutput th,.cptRowOutput h1,.cptRowOutput h2,.cptRowOutput h3 { color: #000; }.cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }.cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }.cptRowOutput input[type=password],.cptRowOutput input[type=text],.cptRowOutput textarea { color: #000; font-size: 120%; background: transparent; padding: 3px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}.cptRowOutput table,.cptRowOutput td,.cptRowOutput th { border: 0; padding: 0 2px; }.cptRowOutput .right { text-align: right; }"),define("text/ace/css/editor.css",[],'.ace_editor { position: absolute; overflow: hidden; font-family: Monaco, "Menlo", "Courier New", monospace; font-size: 12px;}.ace_scroller { position: absolute; overflow-x: scroll; overflow-y: hidden;}.ace_content { position: absolute; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;}.ace_composition { position: absolute; background: #555; color: #DDD; z-index: 4;}.ace_gutter { position: absolute; overflow-x: hidden; overflow-y: hidden; height: 100%;}.ace_gutter-cell.ace_error { background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B"); background-repeat: no-repeat; background-position: 4px center;}.ace_gutter-cell.ace_warning { background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03\'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B"); background-repeat: no-repeat; background-position: 4px center;}.ace_editor .ace_sb { position: absolute; overflow-x: hidden; overflow-y: scroll; right: 0;}.ace_editor .ace_sb div { position: absolute; width: 1px; left: 0;}.ace_editor .ace_print_margin_layer { z-index: 0; position: absolute; overflow: hidden; margin: 0; left: 0; height: 100%; width: 100%;}.ace_editor .ace_print_margin { position: absolute; height: 100%;}.ace_editor textarea { position: fixed; z-index: -1; width: 10px; height: 30px; opacity: 0; background: transparent; appearance: none; -moz-appearance: none; border: none; resize: none; outline: none; overflow: hidden;}.ace_layer { z-index: 1; position: absolute; overflow: hidden; white-space: nowrap; height: 100%; width: 100%;}.ace_text-layer { color: black;}.ace_cjk { display: inline-block; text-align: center;}.ace_cursor-layer { z-index: 4; cursor: text; /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */}.ace_cursor { z-index: 4; position: absolute;}.ace_cursor.ace_hidden { opacity: 0.2;}.ace_line { white-space: nowrap;}.ace_marker-layer { cursor: text; pointer-events: none;}.ace_marker-layer .ace_step { position: absolute; z-index: 3;}.ace_marker-layer .ace_selection { position: absolute; z-index: 4;}.ace_marker-layer .ace_bracket { position: absolute; z-index: 5;}.ace_marker-layer .ace_active_line { position: absolute; z-index: 2;}.ace_marker-layer .ace_selected_word { position: absolute; z-index: 6; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;}.ace_line .ace_fold { cursor: pointer;}.ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer { cursor: move;}'),define("text/ace-0.2.0/demo/styles.css",[],"html { height: 100%; width: 100%; overflow: hidden;}body { overflow: hidden; margin: 0; padding: 0; height: 100%; width: 100%; font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif; font-size: 12px; background: rgb(14, 98, 165); color: white;}#logo { padding: 15px; margin-left: 65px;}#editor { position: absolute; top: 0px; left: 280px; bottom: 0px; right: 0px; background: white;}#controls { padding: 5px;}#controls td { text-align: right;}#controls td + td { text-align: left;}#cockpitInput { position: absolute; left: 280px; right: 0px; bottom: 0; border: none; outline: none; font-family: consolas, courier, monospace; font-size: 120%;}#cockpitOutput { padding: 10px; margin: 0 15px; border: 1px solid #AAA; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 4px; border-top-right-radius: 4px; background: #DDD; color: #000;}"),define("text/ace-0.2.0/textarea/style.css",[],"body { margin:0; padding:0; background-color:#e6f5fc; }H2, H3, H4 { font-family:Trebuchet MS; font-weight:bold; margin:0; padding:0;}H2 { font-size:28px; color:#263842; padding-bottom:6px;}H3 { font-family:Trebuchet MS; font-weight:bold; font-size:22px; color:#253741; margin-top:43px; margin-bottom:8px;}H4 { font-family:Trebuchet MS; font-weight:bold; font-size:21px; color:#222222; margin-bottom:4px;}P { padding:13px 0; margin:0; line-height:22px;}UL{ line-height : 22px;}PRE{ background : #333; color : white; padding : 10px;}#header { height : 227px; position:relative; overflow:hidden; background: url(images/background.png) repeat-x 0 0; border-bottom:1px solid #c9e8fa; }#header .content .signature { font-family:Trebuchet MS; font-size:11px; color:#ebe4d6; position:absolute; bottom:5px; right:42px; letter-spacing : 1px;}.content { width:970px; position:relative; overflow:hidden; margin:0 auto;}#header .content { height:184px; margin-top:22px;}#header .content .logo { width : 282px; height : 184px; background:url(images/logo.png) no-repeat 0 0; position:absolute; top:0; left:0;}#header .content .title { width : 605px; height : 58px; background:url(images/ace.png) no-repeat 0 0; position:absolute; top:98px; left:329px;}#wrapper { background:url(images/body_background.png) repeat-x 0 0; min-height:250px;}#wrapper .content { font-family:Arial; font-size:14px; color:#222222; width:1000px;}#wrapper .content .column1 { position:relative; overflow:hidden; float:left; width:315px; margin-right:31px;}#wrapper .content .column2 { position:relative; overflow:hidden; float:left; width:600px; padding-top:47px;}.fork_on_github { width:310px; height:80px; background:url(images/fork_on_github.png) no-repeat 0 0; position:relative; overflow:hidden; margin-top:49px; cursor:pointer;}.fork_on_github:hover { background-position:0 -80px;}.divider { height:3px; background-color:#bedaea; margin-bottom:3px;}.menu { padding:23px 0 0 24px;}UL.content-list { padding:15px; margin:0;}UL.menu-list { padding:0; margin:0 0 20px 0; list-style-type:none; line-height : 16px;}UL.menu-list LI { color:#2557b4; font-family:Trebuchet MS; font-size:14px; padding:7px 0; border-bottom:1px dotted #d6e2e7;}UL.menu-list LI:last-child { border-bottom:0;}A { color:#2557b4; text-decoration:none;}A:hover { text-decoration:underline;}P#first{ background : rgba(255,255,255,0.5); padding : 20px; font-size : 16px; line-height : 24px; margin : 0 0 20px 0;}#footer { height:40px; position:relative; overflow:hidden; background:url(images/bottombar.png) repeat-x 0 0; position:relative; margin-top:40px;}UL.menu-footer { padding:0; margin:8px 11px 0 0; list-style-type:none; float:right;}UL.menu-footer LI { color:white; font-family:Arial; font-size:12px; display:inline-block; margin:0 1px;}UL.menu-footer LI A { color:#8dd0ff; text-decoration:none;}UL.menu-footer LI A:hover { text-decoration:underline;}"),define("text/build/demo/styles.css",[],"html { height: 100%; width: 100%; overflow: hidden;}body { overflow: hidden; margin: 0; padding: 0; height: 100%; width: 100%; font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif; font-size: 12px; background: rgb(14, 98, 165); color: white;}#logo { padding: 15px; margin-left: 65px;}#editor { position: absolute; top: 0px; left: 280px; bottom: 0px; right: 0px; background: white;}#controls { padding: 5px;}#controls td { text-align: right;}#controls td + td { text-align: left;}#cockpitInput { position: absolute; left: 280px; right: 0px; bottom: 0; border: none; outline: none; font-family: consolas, courier, monospace; font-size: 120%;}#cockpitOutput { padding: 10px; margin: 0 15px; border: 1px solid #AAA; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 4px; border-top-right-radius: 4px; background: #DDD; color: #000;}"),define("text/build_support/style.css",[],"body { margin:0; padding:0; background-color:#e6f5fc; }H2, H3, H4 { font-family:Trebuchet MS; font-weight:bold; margin:0; padding:0;}H2 { font-size:28px; color:#263842; padding-bottom:6px;}H3 { font-family:Trebuchet MS; font-weight:bold; font-size:22px; color:#253741; margin-top:43px; margin-bottom:8px;}H4 { font-family:Trebuchet MS; font-weight:bold; font-size:21px; color:#222222; margin-bottom:4px;}P { padding:13px 0; margin:0; line-height:22px;}UL{ line-height : 22px;}PRE{ background : #333; color : white; padding : 10px;}#header { height : 227px; position:relative; overflow:hidden; background: url(images/background.png) repeat-x 0 0; border-bottom:1px solid #c9e8fa; }#header .content .signature { font-family:Trebuchet MS; font-size:11px; color:#ebe4d6; position:absolute; bottom:5px; right:42px; letter-spacing : 1px;}.content { width:970px; position:relative; overflow:hidden; margin:0 auto;}#header .content { height:184px; margin-top:22px;}#header .content .logo { width : 282px; height : 184px; background:url(images/logo.png) no-repeat 0 0; position:absolute; top:0; left:0;}#header .content .title { width : 605px; height : 58px; background:url(images/ace.png) no-repeat 0 0; position:absolute; top:98px; left:329px;}#wrapper { background:url(images/body_background.png) repeat-x 0 0; min-height:250px;}#wrapper .content { font-family:Arial; font-size:14px; color:#222222; width:1000px;}#wrapper .content .column1 { position:relative; overflow:hidden; float:left; width:315px; margin-right:31px;}#wrapper .content .column2 { position:relative; overflow:hidden; float:left; width:600px; padding-top:47px;}.fork_on_github { width:310px; height:80px; background:url(images/fork_on_github.png) no-repeat 0 0; position:relative; overflow:hidden; margin-top:49px; cursor:pointer;}.fork_on_github:hover { background-position:0 -80px;}.divider { height:3px; background-color:#bedaea; margin-bottom:3px;}.menu { padding:23px 0 0 24px;}UL.content-list { padding:15px; margin:0;}UL.menu-list { padding:0; margin:0 0 20px 0; list-style-type:none; line-height : 16px;}UL.menu-list LI { color:#2557b4; font-family:Trebuchet MS; font-size:14px; padding:7px 0; border-bottom:1px dotted #d6e2e7;}UL.menu-list LI:last-child { border-bottom:0;}A { color:#2557b4; text-decoration:none;}A:hover { text-decoration:underline;}P#first{ background : rgba(255,255,255,0.5); padding : 20px; font-size : 16px; line-height : 24px; margin : 0 0 20px 0;}#footer { height:40px; position:relative; overflow:hidden; background:url(images/bottombar.png) repeat-x 0 0; position:relative; margin-top:40px;}UL.menu-footer { padding:0; margin:8px 11px 0 0; list-style-type:none; float:right;}UL.menu-footer LI { color:white; font-family:Arial; font-size:12px; display:inline-block; margin:0 1px;}UL.menu-footer LI A { color:#8dd0ff; text-decoration:none;}UL.menu-footer LI A:hover { text-decoration:underline;}"),define("text/demo/styles.css",[],"html { height: 100%; width: 100%; overflow: hidden;}body { overflow: hidden; margin: 0; padding: 0; height: 100%; width: 100%; font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif; font-size: 12px; background: rgb(14, 98, 165); color: white;}#logo { padding: 15px; margin-left: 65px;}#editor { position: absolute; top: 0px; left: 280px; bottom: 0px; right: 0px; background: white;}#controls { padding: 5px;}#controls td { text-align: right;}#controls td + td { text-align: left;}#cockpitInput { position: absolute; left: 280px; right: 0px; bottom: 0; border: none; outline: none; font-family: consolas, courier, monospace; font-size: 120%;}#cockpitOutput { padding: 10px; margin: 0 15px; border: 1px solid #AAA; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 4px; border-top-right-radius: 4px; background: #DDD; color: #000;}"),define("text/deps/csslint/demos/demo.css",[],'@charset "UTF-8";@import url("booya.css") print,screen;@import "whatup.css" screen;@import "wicked.css";@namespace "http://www.w3.org/1999/xhtml";@namespace svg "http://www.w3.org/2000/svg";li.inline #foo { background: url("something.png"); display: inline; padding-left: 3px; padding-right: 7px; border-right: 1px dotted #066;}li.last.first { display: inline; padding-left: 3px !important; padding-right: 3px; border-right: 0px;}@media print { li.inline { color: black; }@charset "UTF-8"; @page { margin: 10%; counter-increment: page; @top-center { font-family: sans-serif; font-weight: bold; font-size: 2em; content: counter(page); }}'),define("text/deps/requirejs/dist/ie.css",[],"body .sect { display: none;}#content ul.index { list-style: none;}"),define("text/deps/requirejs/dist/main.css",[],'@font-face { font-family: Inconsolata; src: url("fonts/Inconsolata.ttf");}* { -moz-box-sizing: border-box; -webkit-box-sizing: border-box; box-sizing: border-box; margin: 0; padding: 0;}body { font-size: 12px; line-height: 21px; background-color: #fff; font-family: "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif; color: #0a0a0a;}#wrapper { margin: 0;}#grid { position: fixed; top: 0; left: 0; width: 796px; background-image: url("i/grid.png"); z-index: 100;}pre { line-height: 18px; font-size: 13px; margin: 7px 0 21px; padding: 5px 10px; overflow: auto; background-color: #fafafa; border: 1px solid #e6e6e6; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; -moz-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); -webkit-box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05); box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);}/* typography stuff*/.mono { font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}.sans { font-family: "Helvetica Neue", Helvetica, Arial, Verdana, sans-serif;}.serif { font-family: "Georgia", Times New Roman, Times, serif;}a { color: #2e87dd; text-decoration: none;}a:hover { text-decoration: underline;}/* navigation*/#navBg { background-color: #f2f2f2; background-image: url("i/shadow.png"); background-position: right top; background-repeat: repeat-y; width: 220px; position: fixed; top: 0; left: 0; z-index: 0;}#nav { background-image: url("i/logo.png"); background-repeat: no-repeat; background-position: center 10px; width: 220px; float: left; margin: 0; padding: 150px 20px 0; font-size: 13px; text-shadow: 1px 1px #fff; position: relative; z-index: 1;}#nav .homeImageLink { position: absolute; display: block; top: 10px; left: 0; width: 220px; height: 138px;}#nav ul { list-style-type:none; padding: 0; margin: 21px 0 0 0;}#nav ul li { width: 100%;}#nav ul li.version { text-align: center; color: #4d4d4d;}#nav h1 { color: #4d4d4d; text-align: center; font-size: 15px; font-weight: normal; text-transform: uppercase; letter-spacing: 3px;}span.spacer { color: #2e87dd; margin: 0 3px 0 5px; background-image: url("i/dot.png"); background-repeat: repeat-x; background-position: left 13px;}/* icons*/span.icon { width: 16px; display: block; background-image: url("i/sprite.png"); background-repeat: no-repeat;}span.icon.home { background-position: center 5px;}span.icon.start { background-position: center -27px;}span.icon.download { background-position: center -59px;}span.icon.api { background-position: center -89px;}span.icon.optimize { background-position: center -119px;}span.icon.script { background-position: center -150px;}span.icon.question { background-position: center -182px;}span.icon.requirement { background-position: center -214px;}span.icon.history { background-position: center -247px;}span.icon.help { background-position: center -279px;}span.icon.blog { background-position: center -311px;}span.icon.twitter { background-position: center -343px;}span.icon.git { background-position: center -375px;}span.icon.fork { background-position: center -407px;}/* content*/#content { margin: 0 0 0 220px; padding: 0 20px; background-color: #fff; font-family: "Georgia", Times New Roman, Times, serif; position: relative;}#content p { padding: 7px 0; color: #333; font-size: 14px;}#content h1,#content h2,#content h3,#content h4,#content h5 { font-weight: normal; padding: 21px 0 7px;}#content h1 { font-size: 21px;}#content h2 { padding: 0 0 18px 0; margin: 0 0 7px 0; font-weight: normal; font-size: 21px; line-height: 24px; text-align: center; color: #222; background-image: url("i/arrow.png"); background-repeat: no-repeat; background-position: center bottom; font-family: "Inconsolata", Andale Mono, Monaco, Monospace; text-transform: uppercase; letter-spacing: 2px; text-shadow: 1px 1px 0 #fff;}#content h2 a { color: #222;}#content h2 a:hover,#content h3 a:hover,#content h4 a:hover { text-decoration: none;}span.sectionMark { display: block; color: #aaa; text-shadow: 1px 1px 0 #fff; font-size: 15px; font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content h3 { font-size: 17px;}#content h4 { padding-top: 0; font-size: 15px;}#content h5 { font-size: 10px;}#content ul { list-style-type: disc;}#content ul,#content ol { /* border-left: 1px solid #333; */ color: #333; font-size: 14px; list-style-position: outside; margin: 7px 0 21px 0; /* padding: 0 0 0 28px; */}#content ul { font-style: italic;}#content ol { border: none; list-style-position: inside; padding: 0; font-family: "Georgia", Times New Roman, Times, serif;}#content ul ul,#content ol ol { border: none; padding: 0; margin: 0 0 0 28px;}#content .section { padding: 48px 0; background-image: url("i/line.png"); background-repeat: no-repeat; background-position: center bottom; width: 576px; margin: 0 auto;}#content .section .subSection { padding: 0 0 0 48px; margin: 28px 0 0 0; display: block; border-left: 2px solid #ddd;}#content .section:last-child { background-image: none;}#content .note { color: #222; background-color: #ffff99; padding: 5px 10px; margin: 7px 0; display: inline-block;}/* page directory*/#content #directory.section { background-color: #fff; width: 576px;}#content #directory.section ul ul ul { margin: 0 0 0 48px;}#content #directory.section ul ul li { background-image: url("i/sprite.png"); background-repeat: no-repeat; background-position: left -437px; padding-left: 18px; font-style: normal;}#content #directory h1 { padding: 0 0 65px 0; margin: 0 0 14px 0; font-weight: normal; font-size: 21px; text-align: center; text-transform: uppercase; letter-spacing: 2px; color: #222; background-image: url("i/arrow-x.png"); background-repeat: no-repeat; background-position: center bottom; font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content ul.index { padding: 0; background-color: transparent; border: none; -moz-box-shadow: none; font-style: normal; font-family: "Inconsolata", Andale Mono, Monaco, Monospace;}#content ul.index li { width: 100%; font-size: 15px; color: #333; padding: 0 0 7px 0;}/* intro page specific*/#content #intro { width: 576px; margin: 0 auto; padding: 21px 0;}#content #intro p,#content #intro h1 { font-size: 19px; line-height: 28px; color: green; letter-spacing: 2px; padding: 0 0 28px 0;}#content #intro p:last-child,#content #intro h1:last-child { padding: 0;}#content #intro p a { color: green; text-decoration: underline;}/* download page*/#content h4 a.download { -webkit-border-radius: 5px; -moz-border-radius: 5px; background-color: #F2F2F2; background-image: url("i/sprite.png"), -moz-linear-gradient(center top , #FAFAFA 0%, #F2F2F2 100%); background-image: url("i/sprite.png"), -webkit-gradient(linear, left top, left bottom, color-stop(0%, #fafafa), color-stop(100%, #f2f2f2)); background-position: 7px -58px, center center; background-repeat: no-repeat, no-repeat; border: 1px solid #CCCCCC; color: #333333; font-size: 12px; margin: 0 0 0 5px; padding: 0 10px 0 25px; text-shadow: 1px 1px 0 #FFFFFF;}/* footer*/#footer { color: #4d4d4d; padding: 65px 20px 20px; margin: 20px 0 0 220px; text-align: center; display: block; font-size: 13px; background-image: url("i/arrow-x.png"); background-repeat: no-repeat; background-position: center top; background-color: #fff;}#footer .line { display: block;}#footer .line a { color: #4d4d4d; text-decoration: underline;}/* Pygments manni style*/code {background-color: #fafafa; color: #333;}code .comment {color: green; font-style: italic}code .comment.preproc {color: #099; font-style: normal}code .comment.special {font-weight: bold}code .keyword {color: #069; font-weight: bold}code .keyword.pseudo {font-weight: normal}code .keyword.type {color: #078}code .operator {color: #555}code .operator.word {color: #000; font-weight: bold}code .name.builtin {color: #366}code .name.function {color: #c0f}code .name.class {color: #0a8; font-weight: bold}code .name.namespace {color: #0cf; font-weight: bold}code .name.exception {color: #c00; font-weight: bold}code .name.variable {color: #033}code .name.constant {color: #360}code .name.label {color: #99f}code .name.entity {color: #999; font-weight: bold}code .name.attribute {color: #309}code .name.tag {color: #309; font-weight: bold}code .name.decorator {color: #99f}code .string {color: #c30}code .string.doc {font-style: italic}code .string.interpol {color: #a00}code .string.escape {color: #c30; font-weight: bold}code .string.regex {color: #3aa}code .string.symbol {color: #fc3}code .string.other {color: #c30}code .number {color: #f60}/* webkit scroll bars*/pre::-webkit-scrollbar { width: 6px; height: 6px;}pre::-webkit-scrollbar-button:start:decrement,pre::-webkit-scrollbar-button:end:increment { display: block; height: 0; width: 0;}pre::-webkit-scrollbar-button:vertical:increment,pre::-webkit-scrollbar-button:horizontal:increment { background-color: transparent; display: block; height: 0; width: 0;}pre::-webkit-scrollbar-track-piece { -webkit-border-radius: 3px;}pre::-webkit-scrollbar-thumb:vertical { background-color: #aaa; -webkit-border-radius: 3px;}pre::-webkit-scrollbar-thumb:horizontal { background-color: #aaa; -webkit-border-radius: 3px;}/* hbox*/.hbox {\tdisplay: -webkit-box;\t-webkit-box-orient: horizontal;\t-webkit-box-align: stretch;\tdisplay: -moz-box;\t-moz-box-orient: horizontal;\t-moz-box-align: stretch;\tdisplay: box;\tbox-orient: horizontal;\tbox-align: stretch;\twidth: 100%;}.hbox > * {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;\tdisplay: block;}.vbox {\tdisplay: -webkit-box;\t-webkit-box-orient: vertical;\t-webkit-box-align: stretch;\tdisplay: -moz-box;\t-moz-box-orient: vertical;\t-moz-box-align: stretch;\tdisplay: box;\tbox-orient: vertical;\tbox-align: stretch;}.vbox > * {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;\tdisplay: block;}.spacer {\t-webkit-box-flex: 1;\t-moz-box-flex: 1;\tbox-flex: 1;}.reverse {\t-webkit-box-direction: reverse;\t-moz-box-direction: reverse;\tbox-direction: reverse;}.boxFlex0 {\t-webkit-box-flex: 0;\t-moz-box-flex: 0;\tbox-flex: 0;}.boxFlex1, .boxFlex {\t-webkit-box-flex: 1;\t-moz-box-flex: 1;\tbox-flex: 1;}.boxFlex2 {\t-webkit-box-flex: 2;\t-moz-box-flex: 2;\tbox-flex: 2;}.boxGroup1 {\t-webkit-box-flex-group: 1;\t-moz-box-flex-group: 1;\tbox-flex-group: 1;}.boxGroup2 {\t-webkit-box-flex-group: 2;\t-moz-box-flex-group: 2;\tbox-flex-group: 2;}.start {\t-webkit-box-pack: start;\t-moz-box-pack: start;\tbox-pack: start;}.end {\t-webkit-box-pack: end;\t-moz-box-pack: end;\tbox-pack: end;}.center {\t-webkit-box-pack: center;\t-moz-box-pack: center;\tbox-pack: center;}/* clearfix*/.clearfix:after {\tcontent: ".";\tdisplay: block;\tclear: both;\tvisibility: hidden;\tline-height: 0;\theight: 0;}html[xmlns] .clearfix {\tdisplay: block;}* html .clearfix {\theight: 1%;}'),define("text/lib/ace/css/editor.css",[],'.ace_editor { position: absolute; overflow: hidden; font-family: Monaco, "Menlo", "Courier New", monospace; font-size: 12px;}.ace_scroller { position: absolute; overflow-x: scroll; overflow-y: hidden;}.ace_content { position: absolute; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;}.ace_composition { position: absolute; background: #555; color: #DDD; z-index: 4;}.ace_gutter { position: absolute; overflow-x: hidden; overflow-y: hidden; height: 100%;}.ace_gutter-cell.ace_error { background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%F5or%F5%87%88%F5nr%F4ns%EBmq%F5z%7F%DDJT%DEKS%DFOW%F1Yc%F2ah%CE(7%CE)8%D18E%DD%40M%F2KZ%EBU%60%F4%60m%DCir%C8%16(%C8%19*%CE%255%F1%3FR%F1%3FS%E6%AB%B5%CA%5DI%CEn%5E%F7%A2%9A%C9G%3E%E0a%5B%F7%89%85%F5yy%F6%82%80%ED%82%80%FF%BF%BF%E3%C4%C4%FF%FF%FF%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%25%00%2C%00%00%00%00%10%00%10%00%00%06p%C0%92pH%2C%1A%8F%C8%D2H%93%E1d4%23%E4%88%D3%09mB%1DN%B48%F5%90%40%60%92G%5B%94%20%3E%22%D2%87%24%FA%20%24%C5%06A%00%20%B1%07%02B%A38%89X.v%17%82%11%13q%10%0Fi%24%0F%8B%10%7BD%12%0Ei%09%92%09%0EpD%18%15%24%0A%9Ci%05%0C%18F%18%0B%07%04%01%04%06%A0H%18%12%0D%14%0D%12%A1I%B3%B4%B5IA%00%3B"); background-repeat: no-repeat; background-position: 4px center;}.ace_gutter-cell.ace_warning { background-image: url("data:image/gif,GIF89a%10%00%10%00%D5%00%00%FF%DBr%FF%DE%81%FF%E2%8D%FF%E2%8F%FF%E4%96%FF%E3%97%FF%E5%9D%FF%E6%9E%FF%EE%C1%FF%C8Z%FF%CDk%FF%D0s%FF%D4%81%FF%D5%82%FF%D5%83%FF%DC%97%FF%DE%9D%FF%E7%B8%FF%CCl%7BQ%13%80U%15%82W%16%81U%16%89%5B%18%87%5B%18%8C%5E%1A%94d%1D%C5%83-%C9%87%2F%C6%84.%C6%85.%CD%8B2%C9%871%CB%8A3%CD%8B5%DC%98%3F%DF%9BB%E0%9CC%E1%A5U%CB%871%CF%8B5%D1%8D6%DB%97%40%DF%9AB%DD%99B%E3%B0p%E7%CC%AE%FF%FF%FF%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00%00!%F9%04%01%00%00%2F%00%2C%00%00%00%00%10%00%10%00%00%06a%C0%97pH%2C%1A%8FH%A1%ABTr%25%87%2B%04%82%F4%7C%B9X%91%08%CB%99%1C!%26%13%84*iJ9(%15G%CA%84%14%01%1A%97%0C%03%80%3A%9A%3E%81%84%3E%11%08%B1%8B%20%02%12%0F%18%1A%0F%0A%03\'F%1C%04%0B%10%16%18%10%0B%05%1CF%1D-%06%07%9A%9A-%1EG%1B%A0%A1%A0U%A4%A5%A6BA%00%3B"); background-repeat: no-repeat; background-position: 4px center;}.ace_editor .ace_sb { position: absolute; overflow-x: hidden; overflow-y: scroll; right: 0;}.ace_editor .ace_sb div { position: absolute; width: 1px; left: 0;}.ace_editor .ace_print_margin_layer { z-index: 0; position: absolute; overflow: hidden; margin: 0; left: 0; height: 100%; width: 100%;}.ace_editor .ace_print_margin { position: absolute; height: 100%;}.ace_editor textarea { position: fixed; z-index: -1; width: 10px; height: 30px; opacity: 0; background: transparent; appearance: none; -moz-appearance: none; border: none; resize: none; outline: none; overflow: hidden;}.ace_layer { z-index: 1; position: absolute; overflow: hidden; white-space: nowrap; height: 100%; width: 100%;}.ace_text-layer { color: black;}.ace_cjk { display: inline-block; text-align: center;}.ace_cursor-layer { z-index: 4; cursor: text; /* setting pointer-events: none; here will break mouse wheel scrolling in Safari */}.ace_cursor { z-index: 4; position: absolute;}.ace_cursor.ace_hidden { opacity: 0.2;}.ace_line { white-space: nowrap;}.ace_marker-layer { cursor: text; pointer-events: none;}.ace_marker-layer .ace_step { position: absolute; z-index: 3;}.ace_marker-layer .ace_selection { position: absolute; z-index: 4;}.ace_marker-layer .ace_bracket { position: absolute; z-index: 5;}.ace_marker-layer .ace_active_line { position: absolute; z-index: 2;}.ace_marker-layer .ace_selected_word { position: absolute; z-index: 6; box-sizing: border-box; -moz-box-sizing: border-box; -webkit-box-sizing: border-box;}.ace_line .ace_fold { cursor: pointer;}.ace_dragging .ace_marker-layer, .ace_dragging .ace_text-layer { cursor: move;}'),define("text/node_modules/uglify-js/docstyle.css",[],'html { font-family: "Lucida Grande","Trebuchet MS",sans-serif; font-size: 12pt; }body { max-width: 60em; }.title { text-align: center; }.todo { color: red; }.done { color: green; }.tag { background-color:lightblue; font-weight:normal }.target { }.timestamp { color: grey }.timestamp-kwd { color: CadetBlue }p.verse { margin-left: 3% }pre { border: 1pt solid #AEBDCC; background-color: #F3F5F7; padding: 5pt; font-family: monospace; font-size: 90%; overflow:auto;}pre.src { background-color: #eee; color: #112; border: 1px solid #000;}table { border-collapse: collapse; }td, th { vertical-align: top; }dt { font-weight: bold; }div.figure { padding: 0.5em; }div.figure p { text-align: center; }.linenr { font-size:smaller }.code-highlighted {background-color:#ffff00;}.org-info-js_info-navigation { border-style:none; }#org-info-js_console-label { font-size:10px; font-weight:bold; white-space:nowrap; }.org-info-js_search-highlight {background-color:#ffff00; color:#000000; font-weight:bold; }sup { vertical-align: baseline; position: relative; top: -0.5em; font-size: 80%;}sup a:link, sup a:visited { text-decoration: none; color: #c00;}sup a:before { content: "["; color: #999; }sup a:after { content: "]"; color: #999; }h1.title { border-bottom: 4px solid #000; padding-bottom: 5px; margin-bottom: 2em; }#postamble { color: #777; font-size: 90%; padding-top: 1em; padding-bottom: 1em; border-top: 1px solid #999; margin-top: 2em; padding-left: 2em; padding-right: 2em; text-align: right;}#postamble p { margin: 0; }#footnotes { border-top: 1px solid #000; }h1 { font-size: 200% }h2 { font-size: 175% }h3 { font-size: 150% }h4 { font-size: 125% }h1, h2, h3, h4 { font-family: "Bookman",Georgia,"Times New Roman",serif; font-weight: normal; }@media print { html { font-size: 11pt; }}'),define("text/support/cockpit/lib/cockpit/ui/cli_view.css",[],"#cockpitInput { padding-left: 16px; }.cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }.cptCompletion { padding: 0; position: absolute; z-index: -1000; }.cptCompletion.VALID { background: #FFF; }.cptCompletion.INCOMPLETE { background: #DDD; }.cptCompletion.INVALID { background: #DDD; }.cptCompletion span { color: #FFF; }.cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }.cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }span.cptPrompt { color: #66F; font-weight: bold; }.cptHints { color: #000; position: absolute; border: 1px solid rgba(230, 230, 230, 0.8); background: rgba(250, 250, 250, 0.8); -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; z-index: 1000; padding: 8px; display: none;}.cptFocusPopup { display: block; }.cptFocusPopup.cptNoPopup { display: none; }.cptHints ul { margin: 0; padding: 0 15px; }.cptGt { font-weight: bold; font-size: 120%; }"),define("text/support/cockpit/lib/cockpit/ui/request_view.css",[],".cptRowIn { display: box; display: -moz-box; display: -webkit-box; box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal; box-align: center; -moz-box-align: center; -webkit-box-align: center; color: #333; background-color: #EEE; width: 100%; font-family: consolas, courier, monospace;}.cptRowIn > * { padding-left: 2px; padding-right: 2px; }.cptRowIn > img { cursor: pointer; }.cptHover { display: none; }.cptRowIn:hover > .cptHover { display: block; }.cptRowIn:hover > .cptHover.cptHidden { display: none; }.cptOutTyped { box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1; font-weight: bold; color: #000; font-size: 120%;}.cptRowOutput { padding-left: 10px; line-height: 1.2em; }.cptRowOutput strong,.cptRowOutput b,.cptRowOutput th,.cptRowOutput h1,.cptRowOutput h2,.cptRowOutput h3 { color: #000; }.cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }.cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }.cptRowOutput input[type=password],.cptRowOutput input[type=text],.cptRowOutput textarea { color: #000; font-size: 120%; background: transparent; padding: 3px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}.cptRowOutput table,.cptRowOutput td,.cptRowOutput th { border: 0; padding: 0 2px; }.cptRowOutput .right { text-align: right; }"),define("text/tool/Theme.tmpl.css",[],".%cssClass% .ace_editor { border: 2px solid rgb(159, 159, 159);}.%cssClass% .ace_editor.ace_focus { border: 2px solid #327fbd;}.%cssClass% .ace_gutter { width: 50px; background: #e8e8e8; color: #333; overflow : hidden;}.%cssClass% .ace_gutter-layer { width: 100%; text-align: right;}.%cssClass% .ace_gutter-layer .ace_gutter-cell { padding-right: 6px;}.%cssClass% .ace_print_margin { width: 1px; background: %printMargin%;}.%cssClass% .ace_scroller { background-color: %background%;}.%cssClass% .ace_text-layer { cursor: text; color: %foreground%;}.%cssClass% .ace_cursor { border-left: 2px solid %cursor%;}.%cssClass% .ace_cursor.ace_overwrite { border-left: 0px; border-bottom: 1px solid %overwrite%;} .%cssClass% .ace_marker-layer .ace_selection { background: %selection%;}.%cssClass% .ace_marker-layer .ace_step { background: %step%;}.%cssClass% .ace_marker-layer .ace_bracket { margin: -1px 0 0 -1px; border: 1px solid %bracket%;}.%cssClass% .ace_marker-layer .ace_active_line { background: %active_line%;} .%cssClass% .ace_invisible { %invisible%}.%cssClass% .ace_keyword { %keyword%}.%cssClass% .ace_keyword.ace_operator { %keyword.operator%}.%cssClass% .ace_constant { %constant%}.%cssClass% .ace_constant.ace_language { %constant.language%}.%cssClass% .ace_constant.ace_library { %constant.library%}.%cssClass% .ace_constant.ace_numeric { %constant.numeric%}.%cssClass% .ace_invalid { %invalid%}.%cssClass% .ace_invalid.ace_illegal { %invalid.illegal%}.%cssClass% .ace_invalid.ace_deprecated { %invalid.deprecated%}.%cssClass% .ace_support { %support%}.%cssClass% .ace_support.ace_function { %support.function%}.%cssClass% .ace_function.ace_buildin { %function.buildin%}.%cssClass% .ace_string { %string%}.%cssClass% .ace_string.ace_regexp { %string.regexp%}.%cssClass% .ace_comment { %comment%}.%cssClass% .ace_comment.ace_doc { %comment.doc%}.%cssClass% .ace_comment.ace_doc.ace_tag { %comment.doc.tag%}.%cssClass% .ace_variable { %variable%}.%cssClass% .ace_variable.ace_language { %variable.language%}.%cssClass% .ace_xml_pe { %xml_pe%}.%cssClass% .ace_collab.ace_user1 { %collab.user1% }"),define("text/styles.css",[],"html { height: 100%; width: 100%; overflow: hidden;}body { overflow: hidden; margin: 0; padding: 0; height: 100%; width: 100%; font-family: Arial, Helvetica, sans-serif, Tahoma, Verdana, sans-serif; font-size: 12px; background: rgb(14, 98, 165); color: white;}#logo { padding: 15px; margin-left: 65px;}#editor { position: absolute; top: 0px; left: 280px; bottom: 0px; right: 0px; background: white;}#controls { padding: 5px;}#controls td { text-align: right;}#controls td + td { text-align: left;}#cockpitInput { position: absolute; left: 280px; right: 0px; bottom: 0; border: none; outline: none; font-family: consolas, courier, monospace; font-size: 120%;}#cockpitOutput { padding: 10px; margin: 0 15px; border: 1px solid #AAA; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 4px; border-top-right-radius: 4px; background: #DDD; color: #000;}"),require(["ace/ace"],function(a){window.ace=a}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/cockpit-uncompressed.js b/src/bb-modules/Filemanager/src/ace/cockpit-uncompressed.js new file mode 100644 index 000000000..ac7ef1ab1 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/cockpit-uncompressed.js @@ -0,0 +1,2504 @@ +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Kevin Dangoor (kdangoor@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/index', ['require', 'exports', 'module' , 'pilot/index', 'cockpit/cli', 'cockpit/ui/settings', 'cockpit/ui/cli_view', 'cockpit/commands/basic'], function(require, exports, module) { + + +exports.startup = function(data, reason) { + require('pilot/index'); + require('cockpit/cli').startup(data, reason); + // window.testCli = require('cockpit/test/testCli'); + + require('cockpit/ui/settings').startup(data, reason); + require('cockpit/ui/cli_view').startup(data, reason); + require('cockpit/commands/basic').startup(data, reason); +}; + +/* +exports.shutdown(data, reason) { +}; +*/ + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/cli', ['require', 'exports', 'module' , 'pilot/console', 'pilot/lang', 'pilot/oop', 'pilot/event_emitter', 'pilot/types', 'pilot/canon'], function(require, exports, module) { + + +var console = require('pilot/console'); +var lang = require('pilot/lang'); +var oop = require('pilot/oop'); +var EventEmitter = require('pilot/event_emitter').EventEmitter; + +//var keyboard = require('keyboard/keyboard'); +var types = require('pilot/types'); +var Status = require('pilot/types').Status; +var Conversion = require('pilot/types').Conversion; +var canon = require('pilot/canon'); + +/** + * Normally type upgrade is done when the owning command is registered, but + * out commandParam isn't part of a command, so it misses out. + */ +exports.startup = function(data, reason) { + canon.upgradeType('command', commandParam); +}; + +/** + * The information required to tell the user there is a problem with their + * input. + * TODO: There a several places where {start,end} crop up. Perhaps we should + * have a Cursor object. + */ +function Hint(status, message, start, end, predictions) { + this.status = status; + this.message = message; + + if (typeof start === 'number') { + this.start = start; + this.end = end; + this.predictions = predictions; + } + else { + var arg = start; + this.start = arg.start; + this.end = arg.end; + this.predictions = arg.predictions; + } +} +Hint.prototype = { +}; +/** + * Loop over the array of hints finding the one we should display. + * @param hints array of hints + */ +Hint.sort = function(hints, cursor) { + // Calculate 'distance from cursor' + if (cursor !== undefined) { + hints.forEach(function(hint) { + if (hint.start === Argument.AT_CURSOR) { + hint.distance = 0; + } + else if (cursor < hint.start) { + hint.distance = hint.start - cursor; + } + else if (cursor > hint.end) { + hint.distance = cursor - hint.end; + } + else { + hint.distance = 0; + } + }, this); + } + // Sort + hints.sort(function(hint1, hint2) { + // Compare first based on distance from cursor + if (cursor !== undefined) { + var diff = hint1.distance - hint2.distance; + if (diff != 0) { + return diff; + } + } + // otherwise go with hint severity + return hint2.status - hint1.status; + }); + // tidy-up + if (cursor !== undefined) { + hints.forEach(function(hint) { + delete hint.distance; + }, this); + } + return hints; +}; +exports.Hint = Hint; + +/** + * A Hint that arose as a result of a Conversion + */ +function ConversionHint(conversion, arg) { + this.status = conversion.status; + this.message = conversion.message; + if (arg) { + this.start = arg.start; + this.end = arg.end; + } + else { + this.start = 0; + this.end = 0; + } + this.predictions = conversion.predictions; +}; +oop.inherits(ConversionHint, Hint); + + +/** + * We record where in the input string an argument comes so we can report errors + * against those string positions. + * We publish a 'change' event when-ever the text changes + * @param emitter Arguments use something else to pass on change events. + * Currently this will be the creating Requisition. This prevents dependency + * loops and prevents us from needing to merge listener lists. + * @param text The string (trimmed) that contains the argument + * @param start The position of the text in the original input string + * @param end See start + * @param prefix Knowledge of quotation marks and whitespace used prior to the + * text in the input string allows us to re-generate the original input from + * the arguments. + * @param suffix Any quotation marks and whitespace used after the text. + * Whitespace is normally placed in the prefix to the succeeding argument, but + * can be used here when this is the last argument. + * @constructor + */ +function Argument(emitter, text, start, end, prefix, suffix) { + this.emitter = emitter; + this.setText(text); + this.start = start; + this.end = end; + this.prefix = prefix; + this.suffix = suffix; +} +Argument.prototype = { + /** + * Return the result of merging these arguments. + * TODO: What happens when we're merging arguments for the single string + * case and some of the arguments are in quotation marks? + */ + merge: function(following) { + if (following.emitter != this.emitter) { + throw new Error('Can\'t merge Arguments from different EventEmitters'); + } + return new Argument( + this.emitter, + this.text + this.suffix + following.prefix + following.text, + this.start, following.end, + this.prefix, + following.suffix); + }, + + /** + * See notes on events in Assignment. We might need to hook changes here + * into a CliRequisition so they appear of the command line. + */ + setText: function(text) { + if (text == null) { + throw new Error('Illegal text for Argument: ' + text); + } + var ev = { argument: this, oldText: this.text, text: text }; + this.text = text; + this.emitter._dispatchEvent('argumentChange', ev); + }, + + /** + * Helper when we're putting arguments back together + */ + toString: function() { + // TODO: There is a bug here - we should re-escape escaped characters + // But can we do that reliably? + return this.prefix + this.text + this.suffix; + } +}; + +/** + * Merge an array of arguments into a single argument. + * All Arguments in the array are expected to have the same emitter + */ +Argument.merge = function(argArray, start, end) { + start = (start === undefined) ? 0 : start; + end = (end === undefined) ? argArray.length : end; + + var joined; + for (var i = start; i < end; i++) { + var arg = argArray[i]; + if (!joined) { + joined = arg; + } + else { + joined = joined.merge(arg); + } + } + return joined; +}; + +/** + * We sometimes need a way to say 'this error occurs where ever the cursor is' + */ +Argument.AT_CURSOR = -1; + + +/** + * A link between a parameter and the data for that parameter. + * The data for the parameter is available as in the preferred type and as + * an Argument for the CLI. + *

        We also record validity information where applicable. + *

        For values, null and undefined have distinct definitions. null means + * that a value has been provided, undefined means that it has not. + * Thus, null is a valid default value, and common because it identifies an + * parameter that is optional. undefined means there is no value from + * the command line. + * @constructor + */ +function Assignment(param, requisition) { + this.param = param; + this.requisition = requisition; + this.setValue(param.defaultValue); +}; +Assignment.prototype = { + /** + * The parameter that we are assigning to + * @readonly + */ + param: undefined, + + /** + * Report on the status of the last parse() conversion. + * @see types.Conversion + */ + conversion: undefined, + + /** + * The current value in a type as specified by param.type + */ + value: undefined, + + /** + * The string version of the current value + */ + arg: undefined, + + /** + * The current value (i.e. not the string representation) + * Use setValue() to mutate + */ + value: undefined, + setValue: function(value) { + if (this.value === value) { + return; + } + + if (value === undefined) { + this.value = this.param.defaultValue; + this.conversion = this.param.getDefault ? + this.param.getDefault() : + this.param.type.getDefault(); + this.arg = undefined; + } else { + this.value = value; + this.conversion = undefined; + var text = (value == null) ? '' : this.param.type.stringify(value); + if (this.arg) { + this.arg.setText(text); + } + } + + this.requisition._assignmentChanged(this); + }, + + /** + * The textual representation of the current value + * Use setValue() to mutate + */ + arg: undefined, + setArgument: function(arg) { + if (this.arg === arg) { + return; + } + this.arg = arg; + this.conversion = this.param.type.parse(arg.text); + this.conversion.arg = arg; // TODO: make this automatic? + this.value = this.conversion.value; + this.requisition._assignmentChanged(this); + }, + + /** + * Create a list of the hints associated with this parameter assignment. + * Generally there will be only one hint generated because we're currently + * only displaying one hint at a time, ordering by distance from cursor + * and severity. Since distance from cursor will be the same for all hints + * from this assignment all but the most severe will ever be used. It might + * make sense with more experience to alter this to function to be getHint() + */ + getHint: function() { + // Allow the parameter to provide documentation + if (this.param.getCustomHint && this.value && this.arg) { + var hint = this.param.getCustomHint(this.value, this.arg); + if (hint) { + return hint; + } + } + + // If there is no argument, use the cursor position + var message = '' + this.param.name + ': '; + if (this.param.description) { + // TODO: This should be a short description - do we need to trim? + message += this.param.description.trim(); + + // Ensure the help text ends with '. ' + if (message.charAt(message.length - 1) !== '.') { + message += '.'; + } + if (message.charAt(message.length - 1) !== ' ') { + message += ' '; + } + } + var status = Status.VALID; + var start = this.arg ? this.arg.start : Argument.AT_CURSOR; + var end = this.arg ? this.arg.end : Argument.AT_CURSOR; + var predictions; + + // Non-valid conversions will have useful information to pass on + if (this.conversion) { + status = this.conversion.status; + if (this.conversion.message) { + message += this.conversion.message; + } + predictions = this.conversion.predictions; + } + + // Hint if the param is required, but not provided + var argProvided = this.arg && this.arg.text !== ''; + var dataProvided = this.value !== undefined || argProvided; + if (this.param.defaultValue === undefined && !dataProvided) { + status = Status.INVALID; + message += 'Required<\strong>'; + } + + return new Hint(status, message, start, end, predictions); + }, + + /** + * Basically setValue(conversion.predictions[0]) done in a safe + * way. + */ + complete: function() { + if (this.conversion && this.conversion.predictions && + this.conversion.predictions.length > 0) { + this.setValue(this.conversion.predictions[0]); + } + }, + + /** + * If the cursor is at 'position', do we have sufficient data to start + * displaying the next hint. This is both complex and important. + * For example, if the user has just typed:

          + *
        • 'set tabstop ' then they clearly want to know about the valid + * values for the tabstop setting, so the hint is based on the next + * parameter. + *
        • 'set tabstop' (without trailing space) - they will probably still + * want to know about the valid values for the tabstop setting because + * there is no confusion about the setting in question. + *
        • 'set tabsto' they've not finished typing a setting name so the hint + * should be based on the current parameter. + *
        • 'set tabstop' (when there is an additional tabstopstyle setting) we + * can't make assumptions about the setting - we're not finished. + *
        + *

        Note that the input for 2 and 4 is identical, only the configuration + * has changed, so hint display is environmental. + * + *

        This function works out if the cursor is before the end of this + * assignment (assuming that we've asked the same thing of the previous + * assignment) and then attempts to work out if we should use the hint from + * the next assignment even though technically the cursor is still inside + * this one due to the rules above. + */ + isPositionCaptured: function(position) { + if (!this.arg) { + return false; + } + + // Note we don't check if position >= this.arg.start because that's + // implied by the fact that we're asking the assignments in turn, and + // we want to avoid thing falling between the cracks, but we do need + // to check that the argument does have a position + if (this.arg.start === -1) { + return false; + } + + // We're clearly done if the position is past the end of the text + if (position > this.arg.end) { + return false; + } + + // If we're AT the end, the position is captured if either the status + // is not valid or if there are other valid options including current + if (position === this.arg.end) { + return this.conversion.status !== Status.VALID || + this.conversion.predictions.length !== 0; + } + + // Otherwise we're clearly inside + return true; + }, + + /** + * Replace the current value with the lower value if such a concept + * exists. + */ + decrement: function() { + var replacement = this.param.type.decrement(this.value); + if (replacement != null) { + this.setValue(replacement); + } + }, + + /** + * Replace the current value with the higher value if such a concept + * exists. + */ + increment: function() { + var replacement = this.param.type.increment(this.value); + if (replacement != null) { + this.setValue(replacement); + } + }, + + /** + * Helper when we're rebuilding command lines. + */ + toString: function() { + return this.arg ? this.arg.toString() : ''; + } +}; +exports.Assignment = Assignment; + + +/** + * This is a special parameter to reflect the command itself. + */ +var commandParam = { + name: '__command', + type: 'command', + description: 'The command to execute', + + /** + * Provide some documentation for a command. + */ + getCustomHint: function(command, arg) { + var docs = []; + docs.push(' > '); + docs.push(command.name); + if (command.params && command.params.length > 0) { + command.params.forEach(function(param) { + if (param.defaultValue === undefined) { + docs.push(' [' + param.name + ']'); + } + else { + docs.push(' [' + param.name + ']'); + } + }, this); + } + docs.push('
        '); + + docs.push(command.description ? command.description : '(No description)'); + docs.push('
        '); + + if (command.params && command.params.length > 0) { + docs.push('

          '); + command.params.forEach(function(param) { + docs.push('
        • '); + docs.push('' + param.name + ': '); + docs.push(param.description ? param.description : '(No description)'); + if (param.defaultValue === undefined) { + docs.push(' [Required]'); + } + else if (param.defaultValue === null) { + docs.push(' [Optional]'); + } + else { + docs.push(' [Default: ' + param.defaultValue + ']'); + } + docs.push('
        • '); + }, this); + docs.push('
        '); + } + + return new Hint(Status.VALID, docs.join(''), arg); + } +}; + +/** + * A Requisition collects the information needed to execute a command. + * There is no point in a requisition for parameter-less commands because there + * is no information to collect. A Requisition is a collection of assignments + * of values to parameters, each handled by an instance of Assignment. + * CliRequisition adds functions for parsing input from a command line to this + * class. + *

        Events

        + * We publish the following events:
          + *
        • argumentChange: The text of some argument has changed. It is likely that + * any UI component displaying this argument will need to be updated. (Note that + * this event is actually published by the Argument itself - see the docs for + * Argument for more details) + * The event object looks like: { argument: A, oldText: B, text: B } + *
        • commandChange: The command has changed. It is likely that a UI + * structure will need updating to match the parameters of the new command. + * The event object looks like { command: A } + * @constructor + */ +function Requisition(env) { + this.env = env; + this.commandAssignment = new Assignment(commandParam, this); +} + +Requisition.prototype = { + /** + * The command that we are about to execute. + * @see setCommandConversion() + * @readonly + */ + commandAssignment: undefined, + + /** + * The count of assignments. Excludes the commandAssignment + * @readonly + */ + assignmentCount: undefined, + + /** + * The object that stores of Assignment objects that we are filling out. + * The Assignment objects are stored under their param.name for named + * lookup. Note: We make use of the property of Javascript objects that + * they are not just hashmaps, but linked-list hashmaps which iterate in + * insertion order. + * Excludes the commandAssignment. + */ + _assignments: undefined, + + /** + * The store of hints generated by the assignments. We are trying to prevent + * the UI from needing to access this in broad form, but instead use + * methods that query part of this structure. + */ + _hints: undefined, + + /** + * When the command changes, we need to keep a bunch of stuff in sync + */ + _assignmentChanged: function(assignment) { + // This is all about re-creating Assignments + if (assignment.param.name !== '__command') { + return; + } + + this._assignments = {}; + + if (assignment.value) { + assignment.value.params.forEach(function(param) { + this._assignments[param.name] = new Assignment(param, this); + }, this); + } + + this.assignmentCount = Object.keys(this._assignments).length; + this._dispatchEvent('commandChange', { command: assignment.value }); + }, + + /** + * Assignments have an order, so we need to store them in an array. + * But we also need named access ... + */ + getAssignment: function(nameOrNumber) { + var name = (typeof nameOrNumber === 'string') ? + nameOrNumber : + Object.keys(this._assignments)[nameOrNumber]; + return this._assignments[name]; + }, + + /** + * Where parameter name == assignment names - they are the same. + */ + getParameterNames: function() { + return Object.keys(this._assignments); + }, + + /** + * A *shallow* clone of the assignments. + * This is useful for systems that wish to go over all the assignments + * finding values one way or another and wish to trim an array as they go. + */ + cloneAssignments: function() { + return Object.keys(this._assignments).map(function(name) { + return this._assignments[name]; + }, this); + }, + + /** + * Collect the statuses from the Assignments. + * The hints returned are sorted by severity + */ + _updateHints: function() { + // TODO: work out when to clear this out for the plain Requisition case + // this._hints = []; + this.getAssignments(true).forEach(function(assignment) { + this._hints.push(assignment.getHint()); + }, this); + Hint.sort(this._hints); + + // We would like to put some initial help here, but for anyone but + // a complete novice a 'type help' message is very annoying, so we + // need to find a way to only display this message once, or for + // until the user click a 'close' button or similar + // TODO: Add special case for '' input + }, + + /** + * Returns the most severe status + */ + getWorstHint: function() { + return this._hints[0]; + }, + + /** + * Extract the names and values of all the assignments, and return as + * an object. + */ + getArgsObject: function() { + var args = {}; + this.getAssignments().forEach(function(assignment) { + args[assignment.param.name] = assignment.value; + }, this); + return args; + }, + + /** + * Access the arguments as an array. + * @param includeCommand By default only the parameter arguments are + * returned unless (includeCommand === true), in which case the list is + * prepended with commandAssignment.arg + */ + getAssignments: function(includeCommand) { + var args = []; + if (includeCommand === true) { + args.push(this.commandAssignment); + } + Object.keys(this._assignments).forEach(function(name) { + args.push(this.getAssignment(name)); + }, this); + return args; + }, + + /** + * Reset all the assignments to their default values + */ + setDefaultValues: function() { + this.getAssignments().forEach(function(assignment) { + assignment.setValue(undefined); + }, this); + }, + + /** + * Helper to call canon.exec + */ + exec: function() { + canon.exec(this.commandAssignment.value, + this.env, + "cli", + this.getArgsObject(), + this.toCanonicalString()); + }, + + /** + * Extract a canonical version of the input + */ + toCanonicalString: function() { + var line = []; + line.push(this.commandAssignment.value.name); + Object.keys(this._assignments).forEach(function(name) { + var assignment = this._assignments[name]; + var type = assignment.param.type; + // TODO: This will cause problems if there is a non-default value + // after a default value. Also we need to decide when to use + // named parameters in place of positional params. Both can wait. + if (assignment.value !== assignment.param.defaultValue) { + line.push(' '); + line.push(type.stringify(assignment.value)); + } + }, this); + return line.join(''); + } +}; +oop.implement(Requisition.prototype, EventEmitter); +exports.Requisition = Requisition; + + +/** + * An object used during command line parsing to hold the various intermediate + * data steps. + *

          The 'output' of the update is held in 2 objects: input.hints which is an + * array of hints to display to the user. In the future this will become a + * single value. + *

          The other output value is input.requisition which gives access to an + * args object for use in executing the final command. + * + *

          The majority of the functions in this class are called in sequence by the + * constructor. Their task is to add to hints fill out the requisition. + *

          The general sequence is:

            + *
          • _tokenize(): convert _typed into _parts + *
          • _split(): convert _parts into _command and _unparsedArgs + *
          • _assign(): convert _unparsedArgs into requisition + *
          + * + * @param typed {string} The instruction as typed by the user so far + * @param options {object} A list of optional named parameters. Can be any of: + * flags: Flags for us to check against the predicates specified with the + * commands. Defaulted to keyboard.buildFlags({ }); + * if not specified. + * @constructor + */ +function CliRequisition(env, options) { + Requisition.call(this, env); + + if (options && options.flags) { + /** + * TODO: We were using a default of keyboard.buildFlags({ }); + * This allowed us to have commands that only existed in certain contexts + * - i.e. Javascript specific commands. + */ + this.flags = options.flags; + } +} +oop.inherits(CliRequisition, Requisition); +(function() { + /** + * Called by the UI when ever the user interacts with a command line input + * @param input A structure that details the state of the input field. + * It should look something like: { typed:a, cursor: { start:b, end:c } } + * Where a is the contents of the input field, and b and c are the start + * and end of the cursor/selection respectively. + */ + CliRequisition.prototype.update = function(input) { + this.input = input; + this._hints = []; + + var args = this._tokenize(input.typed); + this._split(args); + + if (this.commandAssignment.value) { + this._assign(args); + } + + this._updateHints(); + }; + + /** + * Return an array of Status scores so we can create a marked up + * version of the command line input. + */ + CliRequisition.prototype.getInputStatusMarkup = function() { + // 'scores' is an array which tells us what chars are errors + // Initialize with everything VALID + var scores = this.toString().split('').map(function(ch) { + return Status.VALID; + }); + // For all chars in all hints, check and upgrade the score + this._hints.forEach(function(hint) { + for (var i = hint.start; i <= hint.end; i++) { + if (hint.status > scores[i]) { + scores[i] = hint.status; + } + } + }, this); + return scores; + }; + + /** + * Reconstitute the input from the args + */ + CliRequisition.prototype.toString = function() { + return this.getAssignments(true).map(function(assignment) { + return assignment.toString(); + }, this).join(''); + }; + + var superUpdateHints = CliRequisition.prototype._updateHints; + /** + * Marks up hints in a number of ways: + * - Makes INCOMPLETE hints that are not near the cursor INVALID since + * they can't be completed by typing + * - Finds the most severe hint, and annotates the array with it + * - Finds the hint to display, and also annotates the array with it + * TODO: I'm wondering if array annotation is evil and we should replace + * this with an object. Need to find out more. + */ + CliRequisition.prototype._updateHints = function() { + superUpdateHints.call(this); + + // Not knowing about cursor positioning, the requisition and assignments + // can't know this, but anything they mark as INCOMPLETE is actually + // INVALID unless the cursor is actually inside that argument. + var c = this.input.cursor; + this._hints.forEach(function(hint) { + var startInHint = c.start >= hint.start && c.start <= hint.end; + var endInHint = c.end >= hint.start && c.end <= hint.end; + var inHint = startInHint || endInHint; + if (!inHint && hint.status === Status.INCOMPLETE) { + hint.status = Status.INVALID; + } + }, this); + + Hint.sort(this._hints); + }; + + /** + * Accessor for the hints array. + * While we could just use the hints property, using getHints() is + * preferred for symmetry with Requisition where it needs a function due to + * lack of an atomic update system. + */ + CliRequisition.prototype.getHints = function() { + return this._hints; + }; + + /** + * Look through the arguments attached to our assignments for the assignment + * at the given position. + */ + CliRequisition.prototype.getAssignmentAt = function(position) { + var assignments = this.getAssignments(true); + for (var i = 0; i < assignments.length; i++) { + var assignment = assignments[i]; + if (!assignment.arg) { + // There is no argument in this assignment, we've fallen off + // the end of the obvious answers - it must be this one. + return assignment; + } + if (assignment.isPositionCaptured(position)) { + return assignment; + } + } + + return assignment; + }; + + /** + * Split up the input taking into account ' and " + */ + CliRequisition.prototype._tokenize = function(typed) { + // For blank input, place a dummy empty argument into the list + if (typed == null || typed.length === 0) { + return [ new Argument(this, '', 0, 0, '', '') ]; + } + + var OUTSIDE = 1; // The last character was whitespace + var IN_SIMPLE = 2; // The last character was part of a parameter + var IN_SINGLE_Q = 3; // We're inside a single quote: ' + var IN_DOUBLE_Q = 4; // We're inside double quotes: " + + var mode = OUTSIDE; + + // First we un-escape. This list was taken from: + // https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Unicode + // We are generally converting to their real values except for \', \" + // and '\ ' which we are converting to unicode private characters so we + // can distinguish them from ', " and ' ', which have special meaning. + // They need swapping back post-split - see unescape2() + typed = typed + .replace(/\\\\/g, '\\') + .replace(/\\b/g, '\b') + .replace(/\\f/g, '\f') + .replace(/\\n/g, '\n') + .replace(/\\r/g, '\r') + .replace(/\\t/g, '\t') + .replace(/\\v/g, '\v') + .replace(/\\n/g, '\n') + .replace(/\\r/g, '\r') + .replace(/\\ /g, '\uF000') + .replace(/\\'/g, '\uF001') + .replace(/\\"/g, '\uF002'); + + function unescape2(str) { + return str + .replace(/\uF000/g, ' ') + .replace(/\uF001/g, '\'') + .replace(/\uF002/g, '"'); + } + + var i = 0; + var start = 0; // Where did this section start? + var prefix = ''; + var args = []; + + while (true) { + if (i >= typed.length) { + // There is nothing else to read - tidy up + if (mode !== OUTSIDE) { + var str = unescape2(typed.substring(start, i)); + args.push(new Argument(this, str, start, i, prefix, '')); + } + else { + if (i !== start) { + // There's a bunch of whitespace at the end of the + // command add it to the last argument's suffix, + // creating an empty argument if needed. + var extra = typed.substring(start, i); + var lastArg = args[args.length - 1]; + if (!lastArg) { + lastArg = new Argument(this, '', i, i, extra, ''); + args.push(lastArg); + } + else { + lastArg.suffix += extra; + } + } + } + break; + } + + var c = typed[i]; + switch (mode) { + case OUTSIDE: + if (c === '\'') { + prefix = typed.substring(start, i + 1); + mode = IN_SINGLE_Q; + start = i + 1; + } + else if (c === '"') { + prefix = typed.substring(start, i + 1); + mode = IN_DOUBLE_Q; + start = i + 1; + } + else if (/ /.test(c)) { + // Still whitespace, do nothing + } + else { + prefix = typed.substring(start, i); + mode = IN_SIMPLE; + start = i; + } + break; + + case IN_SIMPLE: + // There is an edge case of xx'xx which we are assuming to + // be a single parameter (and same with ") + if (c === ' ') { + var str = unescape2(typed.substring(start, i)); + args.push(new Argument(this, str, + start, i, prefix, '')); + mode = OUTSIDE; + start = i; + prefix = ''; + } + break; + + case IN_SINGLE_Q: + if (c === '\'') { + var str = unescape2(typed.substring(start, i)); + args.push(new Argument(this, str, + start - 1, i + 1, prefix, c)); + mode = OUTSIDE; + start = i + 1; + prefix = ''; + } + break; + + case IN_DOUBLE_Q: + if (c === '"') { + var str = unescape2(typed.substring(start, i)); + args.push(new Argument(this, str, + start - 1, i + 1, prefix, c)); + mode = OUTSIDE; + start = i + 1; + prefix = ''; + } + break; + } + + i++; + } + + return args; + }; + + /** + * Looks in the canon for a command extension that matches what has been + * typed at the command line. + */ + CliRequisition.prototype._split = function(args) { + var argsUsed = 1; + var arg; + + while (argsUsed <= args.length) { + var arg = Argument.merge(args, 0, argsUsed); + this.commandAssignment.setArgument(arg); + + if (!this.commandAssignment.value) { + // Not found. break with value == null + break; + } + + /* + // Previously we needed a way to hide commands depending context. + // We have not resurrected that feature yet. + if (!keyboard.flagsMatch(command.predicates, this.flags)) { + // If the predicates say 'no match' then go LA LA LA + command = null; + break; + } + */ + + if (this.commandAssignment.value.exec) { + // Valid command, break with command valid + for (var i = 0; i < argsUsed; i++) { + args.shift(); + } + break; + } + + argsUsed++; + } + }; + + /** + * Work out which arguments are applicable to which parameters. + *

          This takes #_command.params and #_unparsedArgs and creates a map of + * param names to 'assignment' objects, which have the following properties: + *

            + *
          • param - The matching parameter. + *
          • index - Zero based index into where the match came from on the input + *
          • value - The matching input + *
          + */ + CliRequisition.prototype._assign = function(args) { + if (args.length === 0) { + this.setDefaultValues(); + return; + } + + // Create an error if the command does not take parameters, but we have + // been given them ... + if (this.assignmentCount === 0) { + // TODO: previously we were doing some extra work to avoid this if + // we determined that we had args that were all whitespace, but + // probably given our tighter tokenize() this won't be an issue? + this._hints.push(new Hint(Status.INVALID, + this.commandAssignment.value.name + + ' does not take any parameters', + Argument.merge(args))); + return; + } + + // Special case: if there is only 1 parameter, and that's of type + // text we put all the params into the first param + if (this.assignmentCount === 1) { + var assignment = this.getAssignment(0); + if (assignment.param.type.name === 'text') { + assignment.setArgument(Argument.merge(args)); + return; + } + } + + var assignments = this.cloneAssignments(); + var names = this.getParameterNames(); + + // Extract all the named parameters + var used = []; + assignments.forEach(function(assignment) { + var namedArgText = '--' + assignment.name; + + var i = 0; + while (true) { + var arg = args[i]; + if (namedArgText !== arg.text) { + i++; + if (i >= args.length) { + break; + } + continue; + } + + // boolean parameters don't have values, default to false + if (assignment.param.type.name === 'boolean') { + assignment.setValue(true); + } + else { + if (i + 1 < args.length) { + // Missing value portion of this named param + this._hints.push(new Hint(Status.INCOMPLETE, + 'Missing value for: ' + namedArgText, + args[i])); + } + else { + args.splice(i + 1, 1); + assignment.setArgument(args[i + 1]); + } + } + + lang.arrayRemove(names, assignment.name); + args.splice(i, 1); + // We don't need to i++ if we splice + } + }, this); + + // What's left are positional parameters assign in order + names.forEach(function(name) { + var assignment = this.getAssignment(name); + if (args.length === 0) { + // No more values + assignment.setValue(undefined); // i.e. default + } + else { + var arg = args[0]; + args.splice(0, 1); + assignment.setArgument(arg); + } + }, this); + + if (args.length > 0) { + var remaining = Argument.merge(args); + this._hints.push(new Hint(Status.INVALID, + 'Input \'' + remaining.text + '\' makes no sense.', + remaining)); + } + }; + +})(); +exports.CliRequisition = CliRequisition; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Mozilla Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/ui/settings', ['require', 'exports', 'module' , 'pilot/types', 'pilot/types/basic'], function(require, exports, module) { + + +var types = require("pilot/types"); +var SelectionType = require('pilot/types/basic').SelectionType; + +var direction = new SelectionType({ + name: 'direction', + data: [ 'above', 'below' ] +}); + +var hintDirectionSetting = { + name: "hintDirection", + description: "Are hints shown above or below the command line?", + type: "direction", + defaultValue: "above" +}; + +var outputDirectionSetting = { + name: "outputDirection", + description: "Is the output window shown above or below the command line?", + type: "direction", + defaultValue: "above" +}; + +var outputHeightSetting = { + name: "outputHeight", + description: "What height should the output panel be?", + type: "number", + defaultValue: 300 +}; + +exports.startup = function(data, reason) { + types.registerType(direction); + data.env.settings.addSetting(hintDirectionSetting); + data.env.settings.addSetting(outputDirectionSetting); + data.env.settings.addSetting(outputHeightSetting); +}; + +exports.shutdown = function(data, reason) { + types.unregisterType(direction); + data.env.settings.removeSetting(hintDirectionSetting); + data.env.settings.removeSetting(outputDirectionSetting); + data.env.settings.removeSetting(outputHeightSetting); +}; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/ui/cli_view', ['require', 'exports', 'module' , 'text!cockpit/ui/cli_view.css', 'pilot/event', 'pilot/dom', 'pilot/keys', 'pilot/canon', 'pilot/types', 'cockpit/cli', 'cockpit/ui/request_view'], function(require, exports, module) { + + +var editorCss = require("text!cockpit/ui/cli_view.css"); +var event = require("pilot/event"); +var dom = require("pilot/dom"); + +dom.importCssString(editorCss); + +var event = require("pilot/event"); +var keys = require("pilot/keys"); +var canon = require("pilot/canon"); +var Status = require('pilot/types').Status; + +var CliRequisition = require('cockpit/cli').CliRequisition; +var Hint = require('cockpit/cli').Hint; +var RequestView = require('cockpit/ui/request_view').RequestView; + +var NO_HINT = new Hint(Status.VALID, '', 0, 0); + +/** + * On startup we need to: + * 1. Add 3 sets of elements to the DOM for: + * - command line output + * - input hints + * - completion + * 2. Attach a set of events so the command line works + */ +exports.startup = function(data, reason) { + var cli = new CliRequisition(data.env); + var cliView = new CliView(cli, data.env); + data.env.cli = cli; +}; + +/** + * A class to handle the simplest UI implementation + */ +function CliView(cli, env) { + cli.cliView = this; + this.cli = cli; + this.doc = document; + this.win = dom.getParentWindow(this.doc); + this.env = env; + + // TODO: we should have a better way to specify command lines??? + this.element = this.doc.getElementById('cockpitInput'); + if (!this.element) { + // console.log('No element with an id of cockpit. Bailing on cli'); + return; + } + + this.settings = env.settings; + this.hintDirection = this.settings.getSetting('hintDirection'); + this.outputDirection = this.settings.getSetting('outputDirection'); + this.outputHeight = this.settings.getSetting('outputHeight'); + + // If the requisition tells us something has changed, we use this to know + // if we should ignore it + this.isUpdating = false; + + this.createElements(); + this.update(); +} +CliView.prototype = { + /** + * Create divs for completion, hints and output + */ + createElements: function() { + var input = this.element; + + this.element.spellcheck = false; + + this.output = this.doc.getElementById('cockpitOutput'); + this.popupOutput = (this.output == null); + if (!this.output) { + this.output = this.doc.createElement('div'); + this.output.id = 'cockpitOutput'; + this.output.className = 'cptOutput'; + input.parentNode.insertBefore(this.output, input.nextSibling); + + var setMaxOutputHeight = function() { + this.output.style.maxHeight = this.outputHeight.get() + 'px'; + }.bind(this); + this.outputHeight.addEventListener('change', setMaxOutputHeight); + setMaxOutputHeight(); + } + + this.completer = this.doc.createElement('div'); + this.completer.className = 'cptCompletion VALID'; + + this.completer.style.color = dom.computedStyle(input, "color"); + this.completer.style.fontSize = dom.computedStyle(input, "fontSize"); + this.completer.style.fontFamily = dom.computedStyle(input, "fontFamily"); + this.completer.style.fontWeight = dom.computedStyle(input, "fontWeight"); + this.completer.style.fontStyle = dom.computedStyle(input, "fontStyle"); + input.parentNode.insertBefore(this.completer, input.nextSibling); + + // Transfer background styling to the completer. + this.completer.style.backgroundColor = input.style.backgroundColor; + input.style.backgroundColor = 'transparent'; + + this.hinter = this.doc.createElement('div'); + this.hinter.className = 'cptHints'; + input.parentNode.insertBefore(this.hinter, input.nextSibling); + + var resizer = this.resizer.bind(this); + event.addListener(this.win, 'resize', resizer); + this.hintDirection.addEventListener('change', resizer); + this.outputDirection.addEventListener('change', resizer); + resizer(); + + canon.addEventListener('output', function(ev) { + new RequestView(ev.request, this); + }.bind(this)); + event.addCommandKeyListener(input, this.onCommandKey.bind(this)); + event.addListener(input, 'keyup', this.onKeyUp.bind(this)); + + // cursor position affects hint severity. TODO: shortcuts for speed + event.addListener(input, 'mouseup', function(ev) { + this.isUpdating = true; + this.update(); + this.isUpdating = false; + }.bind(this)); + + this.cli.addEventListener('argumentChange', this.onArgChange.bind(this)); + + event.addListener(input, "focus", function() { + dom.addCssClass(this.output, "cptFocusPopup"); + dom.addCssClass(this.hinter, "cptFocusPopup"); + }.bind(this)); + + function hideOutput() { + dom.removeCssClass(this.output, "cptFocusPopup"); + dom.removeCssClass(this.hinter, "cptFocusPopup"); + }; + event.addListener(input, "blur", hideOutput.bind(this)); + hideOutput.call(this); + }, + + /** + * We need to see the output of the latest command entered + */ + scrollOutputToBottom: function() { + // Certain browsers have a bug such that scrollHeight is too small + // when content does not fill the client area of the element + var scrollHeight = Math.max(this.output.scrollHeight, this.output.clientHeight); + this.output.scrollTop = scrollHeight - this.output.clientHeight; + }, + + /** + * To be called on window resize or any time we want to align the elements + * with the input box. + */ + resizer: function() { + var rect = this.element.getClientRects()[0]; + + this.completer.style.top = rect.top + 'px'; + var height = rect.bottom - rect.top; + this.completer.style.height = height + 'px'; + this.completer.style.lineHeight = height + 'px'; + this.completer.style.left = rect.left + 'px'; + var width = rect.right - rect.left; + this.completer.style.width = width + 'px'; + + if (this.hintDirection.get() === 'below') { + this.hinter.style.top = rect.bottom + 'px'; + this.hinter.style.bottom = 'auto'; + } + else { + this.hinter.style.top = 'auto'; + this.hinter.style.bottom = (this.doc.documentElement.clientHeight - rect.top) + 'px'; + } + this.hinter.style.left = (rect.left + 30) + 'px'; + this.hinter.style.maxWidth = (width - 110) + 'px'; + + if (this.popupOutput) { + if (this.outputDirection.get() === 'below') { + this.output.style.top = rect.bottom + 'px'; + this.output.style.bottom = 'auto'; + } + else { + this.output.style.top = 'auto'; + this.output.style.bottom = (this.doc.documentElement.clientHeight - rect.top) + 'px'; + } + this.output.style.left = rect.left + 'px'; + this.output.style.width = (width - 80) + 'px'; + } + }, + + /** + * Ensure that TAB isn't handled by the browser + */ +onCommandKey: function(ev, hashId, keyCode) { + var stopEvent; + if (keyCode === keys.TAB || + keyCode === keys.UP || + keyCode === keys.DOWN) { + stopEvent = true; + } else if (hashId != 0 || keyCode != 0) { + stopEvent = canon.execKeyCommand(this.env, 'cli', hashId, keyCode); + } + stopEvent && event.stopEvent(ev); + }, + + /** + * The main keyboard processing loop + */ + onKeyUp: function(ev) { + var handled; + /* + var handled = keyboardManager.processKeyEvent(ev, this, { + isCommandLine: true, isKeyUp: true + }); + */ + + // RETURN does a special exec/highlight thing + if (ev.keyCode === keys.RETURN) { + var worst = this.cli.getWorstHint(); + // Deny RETURN unless the command might work + if (worst.status === Status.VALID) { + this.cli.exec(); + this.element.value = ''; + } + else { + // If we've denied RETURN because the command was not VALID, + // select the part of the command line that is causing problems + // TODO: if there are 2 errors are we picking the right one? + dom.setSelectionStart(this.element, worst.start); + dom.setSelectionEnd(this.element, worst.end); + } + } + + this.update(); + + // Special actions which delegate to the assignment + var current = this.cli.getAssignmentAt(dom.getSelectionStart(this.element)); + if (current) { + // TAB does a special complete thing + if (ev.keyCode === keys.TAB) { + current.complete(); + this.update(); + } + + // UP/DOWN look for some history + if (ev.keyCode === keys.UP) { + current.increment(); + this.update(); + } + if (ev.keyCode === keys.DOWN) { + current.decrement(); + this.update(); + } + } + + return handled; + }, + + /** + * Actually parse the input and make sure we're all up to date + */ + update: function() { + this.isUpdating = true; + var input = { + typed: this.element.value, + cursor: { + start: dom.getSelectionStart(this.element), + end: dom.getSelectionEnd(this.element.selectionEnd) + } + }; + this.cli.update(input); + + var display = this.cli.getAssignmentAt(input.cursor.start).getHint(); + + // 1. Update the completer with prompt/error marker/TAB info + dom.removeCssClass(this.completer, Status.VALID.toString()); + dom.removeCssClass(this.completer, Status.INCOMPLETE.toString()); + dom.removeCssClass(this.completer, Status.INVALID.toString()); + + var completion = '> '; + if (this.element.value.length > 0) { + var scores = this.cli.getInputStatusMarkup(); + completion += this.markupStatusScore(scores); + } + + // Display the "-> prediction" at the end of the completer + if (this.element.value.length > 0 && + display.predictions && display.predictions.length > 0) { + var tab = display.predictions[0]; + completion += '  ⇥ ' + (tab.name ? tab.name : tab); + } + this.completer.innerHTML = completion; + dom.addCssClass(this.completer, this.cli.getWorstHint().status.toString()); + + // 2. Update the hint element + var hint = ''; + if (this.element.value.length !== 0) { + hint += display.message; + if (display.predictions && display.predictions.length > 0) { + hint += ': [ '; + display.predictions.forEach(function(prediction) { + hint += (prediction.name ? prediction.name : prediction); + hint += ' | '; + }, this); + hint = hint.replace(/\| $/, ']'); + } + } + + this.hinter.innerHTML = hint; + if (hint.length === 0) { + dom.addCssClass(this.hinter, 'cptNoPopup'); + } + else { + dom.removeCssClass(this.hinter, 'cptNoPopup'); + } + + this.isUpdating = false; + }, + + /** + * Markup an array of Status values with spans + */ + markupStatusScore: function(scores) { + var completion = ''; + // Create mark-up + var i = 0; + var lastStatus = -1; + while (true) { + if (lastStatus !== scores[i]) { + completion += ''; + lastStatus = scores[i]; + } + completion += this.element.value[i]; + i++; + if (i === this.element.value.length) { + completion += ''; + break; + } + if (lastStatus !== scores[i]) { + completion += ''; + } + } + + return completion; + }, + + /** + * Update the input element to reflect the changed argument + */ + onArgChange: function(ev) { + if (this.isUpdating) { + return; + } + + var prefix = this.element.value.substring(0, ev.argument.start); + var suffix = this.element.value.substring(ev.argument.end); + var insert = typeof ev.text === 'string' ? ev.text : ev.text.name; + this.element.value = prefix + insert + suffix; + // Fix the cursor. + var insertEnd = (prefix + insert).length; + this.element.selectionStart = insertEnd; + this.element.selectionEnd = insertEnd; + } +}; +exports.CliView = CliView; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/ui/request_view', ['require', 'exports', 'module' , 'pilot/dom', 'pilot/event', 'text!cockpit/ui/request_view.html', 'pilot/domtemplate', 'text!cockpit/ui/request_view.css'], function(require, exports, module) { + +var dom = require("pilot/dom"); +var event = require("pilot/event"); +var requestViewHtml = require("text!cockpit/ui/request_view.html"); +var Templater = require("pilot/domtemplate").Templater; + +var requestViewCss = require("text!cockpit/ui/request_view.css"); +dom.importCssString(requestViewCss); + +/** + * Pull the HTML into the DOM, but don't add it to the document + */ +var templates = document.createElement('div'); +templates.innerHTML = requestViewHtml; +var row = templates.querySelector('.cptRow'); + +/** + * Work out the path for images. + * TODO: This should probably live in some utility area somewhere + */ +function imageUrl(path) { + var dataUrl; + try { + dataUrl = require('text!cockpit/ui/' + path); + } catch (e) { } + if (dataUrl) { + return dataUrl; + } + + var filename = module.id.split('/').pop() + '.js'; + var imagePath; + + if (module.uri.substr(-filename.length) !== filename) { + console.error('Can\'t work out path from module.uri/module.id'); + return path; + } + + if (module.uri) { + var end = module.uri.length - filename.length - 1; + return module.uri.substr(0, end) + "/" + path; + } + + return filename + path; +} + + +/** + * Adds a row to the CLI output display + */ +function RequestView(request, cliView) { + this.request = request; + this.cliView = cliView; + this.imageUrl = imageUrl; + + // Elements attached to this by the templater. For info only + this.rowin = null; + this.rowout = null; + this.output = null; + this.hide = null; + this.show = null; + this.duration = null; + this.throb = null; + + new Templater().processNode(row.cloneNode(true), this); + + this.cliView.output.appendChild(this.rowin); + this.cliView.output.appendChild(this.rowout); + + this.request.addEventListener('output', this.onRequestChange.bind(this)); +}; + +RequestView.prototype = { + /** + * A single click on an invocation line in the console copies the command to + * the command line + */ + copyToInput: function() { + this.cliView.element.value = this.request.typed; + }, + + /** + * A double click on an invocation line in the console executes the command + */ + executeRequest: function(ev) { + this.cliView.cli.update({ + typed: this.request.typed, + cursor: { start:0, end:0 } + }); + this.cliView.cli.exec(); + }, + + hideOutput: function(ev) { + this.output.style.display = 'none'; + dom.addCssClass(this.hide, 'cmd_hidden'); + dom.removeCssClass(this.show, 'cmd_hidden'); + + event.stopPropagation(ev); + }, + + showOutput: function(ev) { + this.output.style.display = 'block'; + dom.removeCssClass(this.hide, 'cmd_hidden'); + dom.addCssClass(this.show, 'cmd_hidden'); + + event.stopPropagation(ev); + }, + + remove: function(ev) { + this.cliView.output.removeChild(this.rowin); + this.cliView.output.removeChild(this.rowout); + event.stopPropagation(ev); + }, + + onRequestChange: function(ev) { + this.duration.innerHTML = this.request.duration ? + 'completed in ' + (this.request.duration / 1000) + ' sec ' : + ''; + + this.output.innerHTML = ''; + this.request.outputs.forEach(function(output) { + var node; + if (typeof output == 'string') { + node = document.createElement('p'); + node.innerHTML = output; + } else { + node = output; + } + this.output.appendChild(node); + }, this); + this.cliView.scrollOutputToBottom(); + + dom.setCssClass(this.output, 'cmd_error', this.request.error); + + this.throb.style.display = this.request.completed ? 'none' : 'block'; + } +}; +exports.RequestView = RequestView; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is DomTemplate. + * + * The Initial Developer of the Original Code is Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Joe Walker (jwalker@mozilla.com) (original author) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('pilot/domtemplate', ['require', 'exports', 'module' ], function(require, exports, module) { + + +// WARNING: do not 'use_strict' without reading the notes in envEval; + +/** + * A templater that allows one to quickly template DOM nodes. + */ +function Templater() { + this.scope = []; +}; + +/** + * Recursive function to walk the tree processing the attributes as it goes. + * @param node the node to process. If you pass a string in instead of a DOM + * element, it is assumed to be an id for use with document.getElementById() + * @param data the data to use for node processing. + */ +Templater.prototype.processNode = function(node, data) { + if (typeof node === 'string') { + node = document.getElementById(node); + } + if (data === null || data === undefined) { + data = {}; + } + this.scope.push(node.nodeName + (node.id ? '#' + node.id : '')); + try { + // Process attributes + if (node.attributes && node.attributes.length) { + // We need to handle 'foreach' and 'if' first because they might stop + // some types of processing from happening, and foreach must come first + // because it defines new data on which 'if' might depend. + if (node.hasAttribute('foreach')) { + this.processForEach(node, data); + return; + } + if (node.hasAttribute('if')) { + if (!this.processIf(node, data)) { + return; + } + } + // Only make the node available once we know it's not going away + data.__element = node; + // It's good to clean up the attributes when we've processed them, + // but if we do it straight away, we mess up the array index + var attrs = Array.prototype.slice.call(node.attributes); + for (var i = 0; i < attrs.length; i++) { + var value = attrs[i].value; + var name = attrs[i].name; + this.scope.push(name); + try { + if (name === 'save') { + // Save attributes are a setter using the node + value = this.stripBraces(value); + this.property(value, data, node); + node.removeAttribute('save'); + } else if (name.substring(0, 2) === 'on') { + // Event registration relies on property doing a bind + value = this.stripBraces(value); + var func = this.property(value, data); + if (typeof func !== 'function') { + this.handleError('Expected ' + value + + ' to resolve to a function, but got ' + typeof func); + } + node.removeAttribute(name); + var capture = node.hasAttribute('capture' + name.substring(2)); + node.addEventListener(name.substring(2), func, capture); + if (capture) { + node.removeAttribute('capture' + name.substring(2)); + } + } else { + // Replace references in all other attributes + var self = this; + var newValue = value.replace(/\$\{[^}]*\}/g, function(path) { + return self.envEval(path.slice(2, -1), data, value); + }); + // Remove '_' prefix of attribute names so the DOM won't try + // to use them before we've processed the template + if (name.charAt(0) === '_') { + node.removeAttribute(name); + node.setAttribute(name.substring(1), newValue); + } else if (value !== newValue) { + attrs[i].value = newValue; + } + } + } finally { + this.scope.pop(); + } + } + } + + // Loop through our children calling processNode. First clone them, so the + // set of nodes that we visit will be unaffected by additions or removals. + var childNodes = Array.prototype.slice.call(node.childNodes); + for (var j = 0; j < childNodes.length; j++) { + this.processNode(childNodes[j], data); + } + + if (node.nodeType === Node.TEXT_NODE) { + this.processTextNode(node, data); + } + } finally { + this.scope.pop(); + } +}; + +/** + * Handle + * @param node An element with an 'if' attribute + * @param data The data to use with envEval + * @returns true if processing should continue, false otherwise + */ +Templater.prototype.processIf = function(node, data) { + this.scope.push('if'); + try { + var originalValue = node.getAttribute('if'); + var value = this.stripBraces(originalValue); + var recurse = true; + try { + var reply = this.envEval(value, data, originalValue); + recurse = !!reply; + } catch (ex) { + this.handleError('Error with \'' + value + '\'', ex); + recurse = false; + } + if (!recurse) { + node.parentNode.removeChild(node); + } + node.removeAttribute('if'); + return recurse; + } finally { + this.scope.pop(); + } +}; + +/** + * Handle and the special case of + * + * @param node An element with a 'foreach' attribute + * @param data The data to use with envEval + */ +Templater.prototype.processForEach = function(node, data) { + this.scope.push('foreach'); + try { + var originalValue = node.getAttribute('foreach'); + var value = originalValue; + + var paramName = 'param'; + if (value.charAt(0) === '$') { + // No custom loop variable name. Use the default: 'param' + value = this.stripBraces(value); + } else { + // Extract the loop variable name from 'NAME in ${ARRAY}' + var nameArr = value.split(' in '); + paramName = nameArr[0].trim(); + value = this.stripBraces(nameArr[1].trim()); + } + node.removeAttribute('foreach'); + try { + var self = this; + // Process a single iteration of a loop + var processSingle = function(member, clone, ref) { + ref.parentNode.insertBefore(clone, ref); + data[paramName] = member; + self.processNode(clone, data); + delete data[paramName]; + }; + + // processSingle is no good for nodes where we want to work on + // the childNodes rather than the node itself + var processAll = function(scope, member) { + self.scope.push(scope); + try { + if (node.nodeName === 'LOOP') { + for (var i = 0; i < node.childNodes.length; i++) { + var clone = node.childNodes[i].cloneNode(true); + processSingle(member, clone, node); + } + } else { + var clone = node.cloneNode(true); + clone.removeAttribute('foreach'); + processSingle(member, clone, node); + } + } finally { + self.scope.pop(); + } + }; + + var reply = this.envEval(value, data, originalValue); + if (Array.isArray(reply)) { + reply.forEach(function(data, i) { + processAll('' + i, data); + }, this); + } else { + for (var param in reply) { + if (reply.hasOwnProperty(param)) { + processAll(param, param); + } + } + } + node.parentNode.removeChild(node); + } catch (ex) { + this.handleError('Error with \'' + value + '\'', ex); + } + } finally { + this.scope.pop(); + } +}; + +/** + * Take a text node and replace it with another text node with the ${...} + * sections parsed out. We replace the node by altering node.parentNode but + * we could probably use a DOM Text API to achieve the same thing. + * @param node The Text node to work on + * @param data The data to use in calls to envEval + */ +Templater.prototype.processTextNode = function(node, data) { + // Replace references in other attributes + var value = node.data; + // We can't use the string.replace() with function trick (see generic + // attribute processing in processNode()) because we need to support + // functions that return DOM nodes, so we can't have the conversion to a + // string. + // Instead we process the string as an array of parts. In order to split + // the string up, we first replace '${' with '\uF001$' and '}' with '\uF002' + // We can then split using \uF001 or \uF002 to get an array of strings + // where scripts are prefixed with $. + // \uF001 and \uF002 are just unicode chars reserved for private use. + value = value.replace(/\$\{([^}]*)\}/g, '\uF001$$$1\uF002'); + var parts = value.split(/\uF001|\uF002/); + if (parts.length > 1) { + parts.forEach(function(part) { + if (part === null || part === undefined || part === '') { + return; + } + if (part.charAt(0) === '$') { + part = this.envEval(part.slice(1), data, node.data); + } + // It looks like this was done a few lines above but see envEval + if (part === null) { + part = "null"; + } + if (part === undefined) { + part = "undefined"; + } + // if (isDOMElement(part)) { ... } + if (typeof part.cloneNode !== 'function') { + part = node.ownerDocument.createTextNode(part.toString()); + } + node.parentNode.insertBefore(part, node); + }, this); + node.parentNode.removeChild(node); + } +}; + +/** + * Warn of string does not begin '${' and end '}' + * @param str the string to check. + * @return The string stripped of ${ and }, or untouched if it does not match + */ +Templater.prototype.stripBraces = function(str) { + if (!str.match(/\$\{.*\}/g)) { + this.handleError('Expected ' + str + ' to match ${...}'); + return str; + } + return str.slice(2, -1); +}; + +/** + * Combined getter and setter that works with a path through some data set. + * For example: + *
            + *
          • property('a.b', { a: { b: 99 }}); // returns 99 + *
          • property('a', { a: { b: 99 }}); // returns { b: 99 } + *
          • property('a', { a: { b: 99 }}, 42); // returns 99 and alters the + * input data to be { a: { b: 42 }} + *
          + * @param path An array of strings indicating the path through the data, or + * a string to be cut into an array using split('.') + * @param data An object to look in for the path argument + * @param newValue (optional) If defined, this value will replace the + * original value for the data at the path specified. + * @return The value pointed to by path before any + * newValue is applied. + */ +Templater.prototype.property = function(path, data, newValue) { + this.scope.push(path); + try { + if (typeof path === 'string') { + path = path.split('.'); + } + var value = data[path[0]]; + if (path.length === 1) { + if (newValue !== undefined) { + data[path[0]] = newValue; + } + if (typeof value === 'function') { + return function() { + return value.apply(data, arguments); + }; + } + return value; + } + if (!value) { + this.handleError('Can\'t find path=' + path); + return null; + } + return this.property(path.slice(1), value, newValue); + } finally { + this.scope.pop(); + } +}; + +/** + * Like eval, but that creates a context of the variables in env in + * which the script is evaluated. + * WARNING: This script uses 'with' which is generally regarded to be evil. + * The alternative is to create a Function at runtime that takes X parameters + * according to the X keys in the env object, and then call that function using + * the values in the env object. This is likely to be slow, but workable. + * @param script The string to be evaluated. + * @param env The environment in which to eval the script. + * @param context Optional debugging string in case of failure + * @return The return value of the script, or the error message if the script + * execution failed. + */ +Templater.prototype.envEval = function(script, env, context) { + with (env) { + try { + this.scope.push(context); + return eval(script); + } catch (ex) { + this.handleError('Template error evaluating \'' + script + '\'', ex); + return script; + } finally { + this.scope.pop(); + } + } +}; + +/** + * A generic way of reporting errors, for easy overloading in different + * environments. + * @param message the error message to report. + * @param ex optional associated exception. + */ +Templater.prototype.handleError = function(message, ex) { + this.logError(message); + this.logError('In: ' + this.scope.join(' > ')); + if (ex) { + this.logError(ex); + } +}; + + +/** + * A generic way of reporting errors, for easy overloading in different + * environments. + * @param message the error message to report. + */ +Templater.prototype.logError = function(message) { + window.console && window.console.log && console.log(message); +}; + +exports.Templater = Templater; + + +}); +/* ***** BEGIN LICENSE BLOCK ***** + * Version: MPL 1.1/GPL 2.0/LGPL 2.1 + * + * The contents of this file are subject to the Mozilla Public License Version + * 1.1 (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * http://www.mozilla.org/MPL/ + * + * Software distributed under the License is distributed on an "AS IS" basis, + * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License + * for the specific language governing rights and limitations under the + * License. + * + * The Original Code is Skywriter. + * + * The Initial Developer of the Original Code is + * Mozilla. + * Portions created by the Initial Developer are Copyright (C) 2009 + * the Initial Developer. All Rights Reserved. + * + * Contributor(s): + * Skywriter Team (skywriter@mozilla.com) + * + * Alternatively, the contents of this file may be used under the terms of + * either the GNU General Public License Version 2 or later (the "GPL"), or + * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), + * in which case the provisions of the GPL or the LGPL are applicable instead + * of those above. If you wish to allow use of your version of this file only + * under the terms of either the GPL or the LGPL, and not to allow others to + * use your version of this file under the terms of the MPL, indicate your + * decision by deleting the provisions above and replace them with the notice + * and other provisions required by the GPL or the LGPL. If you do not delete + * the provisions above, a recipient may use your version of this file under + * the terms of any one of the MPL, the GPL or the LGPL. + * + * ***** END LICENSE BLOCK ***** */ + +define('cockpit/commands/basic', ['require', 'exports', 'module' , 'pilot/canon'], function(require, exports, module) { + + +var canon = require('pilot/canon'); + +/** + * '!' command + */ +var bangCommandSpec = { + name: 'sh', + description: 'Execute a system command (requires server support)', + params: [ + { + name: 'command', + type: 'text', + description: 'The string to send to the os shell.' + } + ], + exec: function(env, args, request) { + var req = new XMLHttpRequest(); + req.open('GET', '/exec?args=' + args.command, true); + req.onreadystatechange = function(ev) { + if (req.readyState == 4) { + if (req.status == 200) { + request.done('
          ' + req.responseText + '
          '); + } + } + }; + req.send(null); + } +}; + +var canon = require('pilot/canon'); + +exports.startup = function(data, reason) { + canon.addCommand(bangCommandSpec); +}; + +exports.shutdown = function(data, reason) { + canon.removeCommand(bangCommandSpec); +}; + + +}); +define("text!cockpit/ui/cli_view.css", [], "" + + "#cockpitInput { padding-left: 16px; }" + + "" + + ".cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }" + + "" + + ".cptCompletion { padding: 0; position: absolute; z-index: -1000; }" + + ".cptCompletion.VALID { background: #FFF; }" + + ".cptCompletion.INCOMPLETE { background: #DDD; }" + + ".cptCompletion.INVALID { background: #DDD; }" + + ".cptCompletion span { color: #FFF; }" + + ".cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }" + + ".cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }" + + "span.cptPrompt { color: #66F; font-weight: bold; }" + + "" + + "" + + ".cptHints {" + + " color: #000;" + + " position: absolute;" + + " border: 1px solid rgba(230, 230, 230, 0.8);" + + " background: rgba(250, 250, 250, 0.8);" + + " -moz-border-radius-topleft: 10px;" + + " -moz-border-radius-topright: 10px;" + + " border-top-left-radius: 10px; border-top-right-radius: 10px;" + + " z-index: 1000;" + + " padding: 8px;" + + " display: none;" + + "}" + + "" + + ".cptFocusPopup { display: block; }" + + ".cptFocusPopup.cptNoPopup { display: none; }" + + "" + + ".cptHints ul { margin: 0; padding: 0 15px; }" + + "" + + ".cptGt { font-weight: bold; font-size: 120%; }" + + ""); + +define("text!cockpit/ui/request_view.css", [], "" + + ".cptRowIn {" + + " display: box; display: -moz-box; display: -webkit-box;" + + " box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal;" + + " box-align: center; -moz-box-align: center; -webkit-box-align: center;" + + " color: #333;" + + " background-color: #EEE;" + + " width: 100%;" + + " font-family: consolas, courier, monospace;" + + "}" + + ".cptRowIn > * { padding-left: 2px; padding-right: 2px; }" + + ".cptRowIn > img { cursor: pointer; }" + + ".cptHover { display: none; }" + + ".cptRowIn:hover > .cptHover { display: block; }" + + ".cptRowIn:hover > .cptHover.cptHidden { display: none; }" + + ".cptOutTyped {" + + " box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1;" + + " font-weight: bold; color: #000; font-size: 120%;" + + "}" + + ".cptRowOutput { padding-left: 10px; line-height: 1.2em; }" + + ".cptRowOutput strong," + + ".cptRowOutput b," + + ".cptRowOutput th," + + ".cptRowOutput h1," + + ".cptRowOutput h2," + + ".cptRowOutput h3 { color: #000; }" + + ".cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }" + + ".cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }" + + ".cptRowOutput input[type=password]," + + ".cptRowOutput input[type=text]," + + ".cptRowOutput textarea {" + + " color: #000; font-size: 120%;" + + " background: transparent; padding: 3px;" + + " border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;" + + "}" + + ".cptRowOutput table," + + ".cptRowOutput td," + + ".cptRowOutput th { border: 0; padding: 0 2px; }" + + ".cptRowOutput .right { text-align: right; }" + + ""); + +define("text!cockpit/ui/request_view.html", [], "" + + "
          " + + " " + + "
          " + + "" + + " " + + "
          >
          " + + "
          ${request.typed}
          " + + "" + + " " + + "
          " + + " \"Hide" + + " \"Show" + + " \"Remove" + + "" + + "
          " + + "" + + " " + + "
          " + + "
          " + + " " + + "
          " + + "
          " + + ""); + +define("text!cockpit/ui/images/closer.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAj9JREFUeNp0ks+LUlEUx7/vV1o8Z8wUx3IEHcQmiBiQlomjRNCiZpEuEqF/oEUwq/6EhvoHggmRcJUQBM1CRJAW0aLIaGQimZJxJsWxyV/P9/R1zzWlFl04vPvOPZ9z7rnnK5imidmKRCIq+zxgdoPZ1T/ut8xeM3tcKpW6s1hhBkaj0Qj7bDebTX+324WmadxvsVigqipcLleN/d4rFoulORiLxTZY8ItOp8MBCpYkiYPj8Xjus9vtlORWoVB4KcTjcQc732dLpSRXvCZaAws6Q4WDdqsO52kNH+oCRFGEz+f7ydwBKRgMPmTXi49GI1x2D/DsznesB06ws2eDbI7w9HYN6bVjvGss4KAjwDAMq81mM2SW5Wa/3weBbz42UL9uYnVpiO2Nr9ANHSGXib2Wgm9tCYIggGKJEVkvlwgi5/FQRmTLxO6hgJVzI1x0T/fJrBtHJxPeL6tI/fsZLA6ot8lkQi8HRVbw94gkWYI5MaHrOjcCGSNRxZosy9y5cErDzn0Dqx7gcwO8WtBp4PndI35GMYqiUMUvBL5yOBz8yRfFNpbPmqgcCFh/IuHa1nR/YXGM8+oUpFhihEQiwcdRLpfVRqOBtWXWq34Gra6AXq8Hp2piZcmKT4cKnE4nwuHwdByVSmWQz+d32WCTlHG/qaHHREN9kgi0sYQfv0R4PB4EAgESQDKXy72fSy6VSnHJVatVf71eR7vd5n66mtfrRSgU4pLLZrOlf7RKK51Ok8g3/yPyR5lMZi7y3wIMAME4EigHWgKnAAAAAElFTkSuQmCC"); + +define("text!cockpit/ui/images/dot_clear.gif", [], "data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAEBMgA7"); + +define("text!cockpit/ui/images/minus.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gDS7KbF4AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kFGw4xMrIJw5EAAAHcSURBVCjPhZIxSxtxGMZ/976XhJA/RA5EAyJcFksnp64hjUPBoXRyCYLQTyD0UxScu0nFwalCQSgFCVk7dXAwUAiBDA2RO4W7yN1x9+9gcyhU+pteHt4H3pfncay1LOl0OgY4BN4Ar/7KP4BvwNFwOIyWu87S2O12O8DxfD73oygiSRIAarUaxhhWV1fHwMFgMBiWxl6v9y6Koi+3t7ckSUKtVkNVAcjzvNRWVlYwxry9vLz86uzs7HjAZDKZGGstjUaDfxHHMSLC5ubmHdB2VfVwNpuZ5clxHPMcRVFwc3PTXFtbO3RFZHexWJCmabnweAaoVqvlv4vFAhHZdVX1ZZqmOI5DURR8fz/lxbp9Yrz+7bD72SfPcwBU1XdF5N5aWy2KgqIoeBzPEnWVLMseYnAcRERdVR27rrsdxzGqyutP6898+GBsNBqo6i9XVS88z9sOggAR4X94noeqXoiIHPm+H9XrdYIgIAxDwjAkTVPCMESzBy3LMprNJr7v34nIkV5dXd2fn59fG2P2siwjSRIqlQrWWlSVJFcqlQqtVot2u40xZu/s7OxnWbl+v98BjkejkT+dTgmCoDxtY2ODra2tMXBweno6fNJVgP39fQN8eKbkH09OTsqS/wHFRdHPfTSfjwAAAABJRU5ErkJggg=="); + +define("text!cockpit/ui/images/pinaction.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAClklEQVQ4EX1TXUhUQRQ+Z3Zmd+9uN1q2P3UpZaEwcikKekkqLKggKHJ96MHe9DmLkCDa9U198Id8kErICmIlRAN96UdE6QdBW/tBA5Uic7E0zN297L17p5mb1zYjD3eYc+d83zlnON8g5xzWNUSEdUBkHTJasRWySPP7fw3hfwkk2GoNsc0vOaJRHo1GV/GiMctkTIJRFlpZli8opK+htmf83gXeG63oteOtra0u25e7TYJIJELb26vYCACTgUe1lXV86BTn745l+MsyHqs53S/Aq4VEUa9Y6ko14eYY4u3AyM3HYwdKU35DZyblGR2+qq6W0X2Nnh07xynnVYpHORx/E1/GvvqaAZUayjMjdM2f/Lgr5E+fV93zR4u3zKCLughsZqKwAzAxaz6dPY6JgjLUF+eSP5OpjmAw2E8DvldHSvJMKPg08aRor1tc4BuALu6mOwGWdQC3mKIqRsC8mKd8wYfD78/earzSYzdMDW9QgKb0Is8CBY1mQXOiaXAHEpMDE5XTJqIq4EiyxUqKlpfkF0pyV1OTAoFAhmTmyCCoDsZNZvIkUjELQpipo0sQqYZAswZHwsEEE10M0pq2SSZY9HqNcDicJcNTpBvQJz40UbSOTh1B8bDpuY0w9Hb3kkn9lPAlBLfhfD39XTtX/blFJqiqrjbkTi63Hbofj2uL4GMsmzFgbDJ/vmMgv/lB4syJ0oXO7d3j++vio6GFsYmD6cHJreWc3/jRVVHhsOYvM8iZ36mtjPDBk/xDZE8CoHlbrlAssbTxDdDJvdb536L7I6S7Vy++6Gi4Xi9BsUthJRaLOYSPz4XALKI4j4iObd/e5UtDKUjZzYyYRyGAJv01Zj8kC5cbs5WY83hQnv0DzCXl+r8APElkq0RU6oMAAAAASUVORK5CYII="); + +define("text!cockpit/ui/images/pinin.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZ0lEQVQ4Ea2TPUsDQRCGZ89Eo4FACkULEQs1CH4Uamfjn7GxEYJFIFXgChFsbPwzNnZioREkaiHBQtEiEEiMRm/dZ8OEGAxR4sBxx877Pju7M2estTJIxLrNuVwuMxQEx0ZkzcFHyRtjXt02559RtB2GYanTYzoryOfz+6l4Nbszf2niwffKmpGRo9sVW22mDgqFwp5C2gDMm+P32a3JB1N+n5JifUGeP9JeNxGryPLYjcwMP8rJ07Q9fZltQzyAstOJ2vVu5sKc1ZZkRBrOcKeb+HexPidvkpCN5JUcllZtpZFc5DgBWc5M2eysZuMuofMBSA4NWjx4PUCsXefMlI0QY3ewRg4NWi4ZTQsgrjYXema+e4VqtEMK6KXvu+4B9Bklt90vVKMeD2BI6DOt4rZ/Gk7WyKFBi4fNPIAJY0joM61SCCZ9tI1o0OIB8D+DBIkYaJRbCBH9mZgNt+bb++ufSSF/eX8BYcDeAzuQJVUAAAAASUVORK5CYII="); + +define("text!cockpit/ui/images/pinout.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAACyUlEQVQ4EW1TXUgUURQ+Z3ZmnVV3QV2xJbVSEIowQbAfLQx8McLoYX2qjB58MRSkP3vZppceYhGxgrZaIughlYpE7CHFWiiKyj9II0qxWmwlNh1Xtp2f27mz7GDlZX7uuXO+73zfuXeQMQYIgAyALppgyBtse32stsw86txkHhATn+FbfPfzxnPB+vR3RMJYuTwW6bbB4a6WS5O3Yu2VlXIesDiAamiQNKVlVXfx5I0GJ7DY7p0/+erU4dgeMJIA31WNxZmAgibOreXDqF55sY4SFUURqbi+nkjgwTyAbHhLX8yOLsSM2QRA3JRAAgd4RGPbVhkKEp8qeJ7PFyW3fw++YHtC7CkaD0amqyqihSwlMQQ0wa07IjPVI/vbexreIUrVaQV2D4RMQ/o7m12Mdfx4H3PfB9FNzTR1U2cO0Bi45aV6xNvFBNaoIAfbSiwLlqi9/hR/R3Nrhua+Oqi9TEKiB02C7YXz+Pba4MTDrpbLiMAxNgmXb+HpwVkZdoIrkn9isW7nRw/TZYaagZArAWyhfqsSDL/c9aTx7JUjGZCtYExRqCzAwGblwr6aFQ84nTo6qZ7XCeCVQNckE/KSWolvoQnxeoFFgIh8G/nA+kBAxxuQO5m9eFrwLIGJHgcyM63VFMhRSgNVyJr7og8y1vbTQpH8DIEVgxuYuexw0QECIalq5FYgEmpkgoFYltU/lnrqDz5osirSFpF7lrHAFKSWHYfEs+mY/82UnAStyMlW8sUPsVIciTZgz3jV1ebg0CEOpgPF22s1z1YQYKSXPJ1hbAhR8T26WdLhkuVfAzPR+YO1Ox5n58SmCcF6e3uzAoHA77RkevJdWH/3+f2O9TGf3w3fWQ2Hw5F/13mcsWAT+vv6DK4kFApJ/d3d1k+kJtbCrmxXHS3n8ER6b3CQbAqaEHVra6sGxcXW4SovLx+empxapS//FfwD9kpMJjMMBBAAAAAASUVORK5CYII="); + +define("text!cockpit/ui/images/pins.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAQCAYAAABQrvyxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGYklEQVRIDbVWe0yURxCf/R735o6DO0FBe0RFsaL4iLXGIKa2SY3P6JGa2GpjlJjUV9NosbU++tYUbEnaQIrVaKJBG7WiNFQFUWO1UUEsVg2CAgoeHHLewcH32O58cBdQsX9Y5+7LfrszOzO/2ZnZj1BKgTBiIwVGVvKd49OVVYunDlXn6wdBKh+ogXrv+DOz1melIb+3LM5fNv2XPYE5EHY+L3PJljN5zavHpJjsQNsA/JJEgyC2+WTjy3b0GfoJW8O4aoHtDwiHQrj5lw1LLyyb1bp5zAjJTus9klrVpdD6TqH2ngVO+0dsRJnp06cLIYU4fx7NnRI3bu7UIYOeJ/McnuY88q3k62gc0S4Dgf5qhICQtIXS2lqD7BhSduPk3YfyzXaANhBBJDxYdUqCywB2qS4RdyUuSkTF/VJxcbH5j8N7/75RuFrN3Zh8OS8zqf5m4UpPeenOyP42dbtBeuvVnCdkK1e4PfPouX03mo9se+c33M8wqDk5Ofqed8REUTicQhbySUxp9u3KlMSHTtrFU6Kyn03lz15PPpW25vsZeYSIKyiVURcqeZJOH9lTNZLfnxRjU/uwrjbEUBWsapcSO2Hq4k0VfZg9EzxdDNCEjDxgNqRDme9umz/btwlsHRIEePHgAf73RdnHZ6LTuIUBN7OBQ+c1Fdnp6cZ1BQUdeRuWZi97o3ktDQQkVeFFzqJARd1A5a0Vr7ta6Kp6TZjtZ+NTIOoKF6qDrL7e0QQIUCiqMMKk8Z1Q/SCSKvzocf2B6NEN0SQn/kTO6fKJ0zqjZUlQBSpJ0GjR77w0aoc1Pr6S5/kVJrNpakV5hR+LWKN4t7sLX+p0rx2vqSta64olIulUKUgCSXLWE1R4KPPSj+5vhm2hdDOG+CkQBmhhyyKq6SaFYWTn5bB3QJRNz54AuXKn8TJjhu0Wbv+wNEKQjVhnmKopjo4FxXmetCRnC4F7BhCiCUepqAepRh0TM/gjjzOOSK2NgWZPc05qampRWJHb7dbOffep2ednzLzgczlbrQA6gHYF9BYDh9GY+FjddMweHMscmMuep07gXlMQoqw9ALoYu5MJsak9QmJA2IvAgVmoCRciooyPujJtNCv1uHt3TmK9gegFKrG9kh6oXwZiIEAtBIjORGKNTWR/WeW8XVkbjuJepLAyloM8LmTN//njKZPbraATZaLjCHEww9Ei4FFiPg6Ja5gT6gxYgLgnRDHRQwJXbz2GOw0d4A3K4GXlUtMahJjYVxiYbrwOmxIS10bFnIBOSi6Tl9Jgs0zbOEX18wyEwgLPMrxD1Y4aCK8kmTpgYcpAF27Mzs42Hjx4kA8BICUlJfKArR7LcEvTB1xEC9AoEw9OPagWkVU/D1oesmK6U911zEczMVe01oZjiMggg6ux2Qk379qh4rYKet4GjrhhwEteBgBrH8BssoXEtbHzPpSBRRSpqlNpgAiUoxzHKxLRszoVuggIisxaDQWZqkQvQjAoax3NbDbLLGuUEABNGedXqSyLRupXgDT5JfAGZNLio9B0X8Uiwk4w77MDc1D4yejjWtykPS3DX01UDCY/GPQcVDe0QYT0CIxGFvUorfvBxZsRfVrUuWruMBAb/lXCUofoFNZfzGJtowXOX0vwUSFK4BgyMKm6P6s9wQUZld+jrYyMDC0iIQDaJdG4IyZQfL3RfbFcCBIlRgc+u3CjaTApuZ9KsANgG8PNzHlWWD3tCxd6kafNNiFp5HAalAkkJ0SCV2H3CgOD9Nc/FqrXuyb0Eocvfhq171p5eyuJ1omKJEP5rQGe/FOOnXtq335z8YmvYo9cHb2t8spIb3lVSseZW46FlGY/Sk9P50P2w20UlWJUkUHIushfc5PXGAzCo0PlD2pnpCYfCXga3lu+fPlevEhWrVrFyrN/Orfv87FOW9tlqb2Kc9pV8DzioMk3UNUbXM+8B/ATBr8C8CKdvGXWGD/9sqm3dkxtzA4McMjHMB8D2ftheYXo+qzt3pXvz8/PP/vk+v8537V+yYW87Zu+RZ1ZbrexoKAA/SBpaWn4+aL5w5zGk+/jW59JiMkESW5urpiVlWXENRb1H/Yf2I9txIxz5IdkX3TsraukpsbQjz6090yb4XsAvQoRE0YvJdamtIIbOnRoUVlZ2ftsLVQzIdEXHntsaZdimssVfCpFui109+BnWPsXaWLI/zactygAAAAASUVORK5CYII="); + +define("text!cockpit/ui/images/plus.png", [], "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gDS7KbF4AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kFGw4yFTwuJTkAAAH7SURBVCjPdZKxa1NRFMZ/956XZMgFyyMlCZRA4hBx6lBcQ00GoYi4tEstFPwLAs7iLDi7FWuHThaUggihBDI5OWRoQAmBQFISQgvvpbwX3rsOaR4K+o2H8zvfOZxPWWtZqVarGaAJPAEe3ZW/A1+Bd+1221v1qhW4vb1dA44mk0nZ8zyCIAAgk8lgjGF9fb0PHF5cXLQTsF6vP/c879P19TVBEJDJZBARAKIoSmpra2sYY561Wq3PqtFouMBgMBgYay3ZbJZ/yfd9tNaUSqUboOKISPPq6sqsVvZ9H4AvL34B8PTj/QSO45jpdHovn883Ha31znw+JwzDpCEMQx4UloM8zyOdTif3zudztNY7jog8DMMQpRRxHPPt5TCBAEZvxlyOFTsfykRRBICIlB2t9a21Nh3HMXEc8+d7VhJHWCwWyzcohdZaHBHpO46z6fs+IsLj94XECaD4unCHL8FsNouI/HRE5Nx13c3ZbIbWOnG5HKtl+53TSq7rIiLnand31wUGnU7HjEYjlFLJZN/3yRnL1FMYY8jlcmxtbd0AFel2u7dnZ2eXxpi9xWJBEASkUimstYgIQSSkUimKxSKVSgVjzN7p6emPJHL7+/s14KjX65WHwyGz2SxZbWNjg2q12gcOT05O2n9lFeDg4MAAr/4T8rfHx8dJyH8DvvbYGzKvWukAAAAASUVORK5CYII="); + +define("text!cockpit/ui/images/throbber.gif", [], "data:image/gif;base64,R0lGODlh3AATAPQAAP///wAAAL6+vqamppycnLi4uLKyssjIyNjY2MTExNTU1Nzc3ODg4OTk5LCwsLy8vOjo6Ozs7MrKyvLy8vT09M7Ozvb29sbGxtDQ0O7u7tbW1sLCwqqqqvj4+KCgoJaWliH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFg8PwKIMHnLF63N2438f0mv1I2O8buXjvaOPtaHx7fn96goR4hmuId4qDdX95c4+RG4GCBoyAjpmQhZN0YGYFXitdZBIVGAoKoq4CG6Qaswi1CBtkcG6ytrYJubq8vbfAcMK9v7q7D8O1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQgDLAQGCQoLDA0QCwUHqfYSFw/xEPz88/X38Onr14+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdE/9chIeBgDoB7gjaWUWTlYAFE3LqzDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKwgcWABB5y1acFNZmEvXwoJ2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCLYMIFCzwLEprg84OsDus/tvqdezZf13Hvr2B9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebc3A8vjf5QWf15Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrAxAJoCDHbgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBBAJNv1DVV01MZdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJgxQCwT40PjfAV4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA00AqVB4hG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BAXHx/EoCzboAcdhcLDdgwJ6nua03YZ8PMFPoBMca215eg98G36IgYNvDgOGh4lqjHd7fXOTjYV9nItvhJaIfYF4jXuIf4CCbHmOBZySdoOtj5eja59wBmYFXitdHhwSFRgKxhobBgUPAmdoyxoI0tPJaM5+u9PaCQZzZ9gP2tPcdM7L4tLVznPn6OQb18nh6NV0fu3i5OvP8/nd1qjwaasHcIPAcf/gBSyAAMMwBANYEAhWYQGDBhAyLihwYJiEjx8fYMxIcsGDAxVA/yYIOZIkBAaGPIK8INJlRpgrPeasaRPmx5QgJfB0abLjz50tSeIM+pFmUo0nQQIV+vRlTJUSnNq0KlXCSq09ozIFexEBAYkeNiwgOaEtn2LFpGEQsKCtXbcSjOmVlqDuhAx3+eg1Jo3u37sZBA9GoMAw4MB5FyMwfLht4sh7G/utPGHlYAV8Nz9OnOBz4c2VFWem/Pivar0aKCP2LFn2XwhnVxBwsPbuBAQbEGiIFg1BggoWkidva5z4cL7IlStfkED48OIYoiufYIH68+cKPkqfnsB58ePjmZd3Dj199/XE20tv6/27XO3S6z9nPCz9BP3FISDefL/Bt192/uWmAv8BFzAQAQUWWFaaBgqA11hbHWTIXWIVXifNhRlq6FqF1sm1QQYhdiAhbNEYc2KKK1pXnAIvhrjhBh0KxxiINlqQAY4UXjdcjSJyeAx2G2BYJJD7NZQkjCPKuCORKnbAIXsuKhlhBxEomAIBBzgIYXIfHfmhAAyMR2ZkHk62gJoWlNlhi33ZJZ2cQiKTJoG05Wjcm3xith9dcOK5X51tLRenoHTuud2iMnaolp3KGXrdBo7eKYF5p/mXgJcogClmcgzAR5gCKymXYqlCgmacdhp2UCqL96mq4nuDBTmgBasaCFp4sHaQHHUsGvNRiiGyep1exyIra2mS7dprrtA5++z/Z8ZKYGuGsy6GqgTIDvupRGE+6CO0x3xI5Y2mOTkBjD4ySeGU79o44mcaSEClhglgsKyJ9S5ZTGY0Bnzrj+3SiKK9Rh5zjAALCywZBk/ayCWO3hYM5Y8Dn6qxxRFsgAGoJwwgDQRtYXAAragyQOmaLKNZKGaEuUlpyiub+ad/KtPqpntypvvnzR30DBtjMhNodK6Eqrl0zU0/GjTUgG43wdN6Ra2pAhGtAAZGE5Ta8TH6wknd2IytNKaiZ+Or79oR/tcvthIcAPe7DGAs9Edwk6r3qWoTaNzY2fb9HuHh2S343Hs1VIHhYtOt+Hh551rh24vP5YvXSGzh+eeghy76GuikU9FFEainrvrqrLfu+uuwxy777LTXfkIIACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BAWHB2l4CDZo9IDjcBja7UEhTV+3DXi3PJFA8xMcbHiDBgMPG31pgHBvg4Z9iYiBjYx7kWocb26OD398mI2EhoiegJlud4UFiZ5sm6Kdn2mBr5t7pJ9rlG0cHg5gXitdaxwFGArIGgoaGwYCZ3QFDwjU1AoIzdCQzdPV1c0bZ9vS3tUJBmjQaGXl1OB0feze1+faiBvk8wjnimn55e/o4OtWjp+4NPIKogsXjaA3g/fiGZBQAcEAFgQGOChgYEEDCCBBLihwQILJkxIe/3wMKfJBSQkJYJpUyRIkgwcVUJq8QLPmTYoyY6ZcyfJmTp08iYZc8MBkhZgxk9aEcPOlzp5FmwI9KdWn1qASurJkClRoWKwhq6IUqpJBAwQEMBYroAHkhLt3+RyzhgCDgAV48Wbgg+waAnoLMgTOm6DwQ8CLBzdGdvjw38V5JTg2lzhyTMeUEwBWHPgzZc4TSOM1bZia6LuqJxCmnOxv7NSsl1mGHHiw5tOuIWeAEHcFATwJME/ApgFBc3MVLEgPvE+Ddb4JokufPmFBAuvPXWu3MIF89wTOmxvOvp179evQtwf2nr6aApPyzVd3jn089e/8xdfeXe/xdZ9/d1ngHf98lbHH3V0LMrgPgsWpcFwBEFBgHmyNXWeYAgLc1UF5sG2wTHjIhNjBiIKZCN81GGyQwYq9uajeMiBOQGOLJ1KjTI40kmfBYNfc2NcGIpI4pI0vyrhjiT1WFqOOLEIZnjVOVpmajYfBiCSNLGbA5YdOkjdihSkQwIEEEWg4nQUmvYhYe+bFKaFodN5lp3rKvJYfnBKAJ+gGDMi3mmbwWYfng7IheuWihu5p32XcSWdSj+stkF95dp64jJ+RBipocHkCCp6PCiRQ6INookCAAwy0yd2CtNET3Yo7RvihBjFZAOaKDHT43DL4BQnsZMo8xx6uI1oQrHXXhHZrB28G62n/YSYxi+uzP2IrgbbHbiaer7hCiOxDFWhrbmGnLVuus5NFexhFuHLX6gkEECorlLpZo0CWJG4pLjIACykmBsp0eSSVeC15TDJeUhlkowlL+SWLNJpW2WEF87urXzNWSZ6JOEb7b8g1brZMjCg3ezBtWKKc4MvyEtwybPeaMAA1ECRoAQYHYLpbeYYCLfQ+mtL5c9CnfQpYpUtHOSejEgT9ogZ/GSqd0f2m+LR5WzOtHqlQX1pYwpC+WbXKqSYtpJ5Mt4a01lGzS3akF60AxkcTaLgAyRBPWCoDgHfJqwRuBuzdw/1ml3iCwTIeLUWJN0v4McMe7uasCTxseNWPSxc5RbvIgD7geZLbGrqCG3jepUmbbze63Y6fvjiOylbwOITPfIHEFsAHL/zwxBdvPBVdFKH88sw37/zz0Ecv/fTUV2/99SeEAAAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFh2cw8BQEm3T6yHEYHHD4oKCuD9qGvNsxT6QTgAkcHHmFeX11fm17hXwPG35qgnhxbwMPkXaLhgZ9gWp3bpyegX4DcG+inY+Qn6eclpiZkHh6epetgLSUcBxlD2csXXdvBQrHGgoaGhsGaIkFDwjTCArTzX+QadHU3c1ofpHc3dcGG89/4+TYktvS1NYI7OHu3fEJ5tpqBu/k+HX7+nXDB06SuoHm0KXhR65cQT8P3FRAMIAFgVMPwDCAwLHjggIHJIgceeFBg44eC/+ITCCBZYKSJ1FCWPBgpE2YMmc+qNCypwScMmnaXAkUJYOaFVyKLOqx5tCXJnMelcBzJNSYKIX2ZPkzqsyjPLku9Zr1QciVErYxaICAgEUOBRJIgzChbt0MLOPFwyBggV27eCUcmxZvg9+/dfPGo5bg8N/Ag61ZM4w4seDF1fpWhizZmoa+GSortgcaMWd/fkP/HY0MgWbTipVV++wY8GhvqSG4XUEgoYTKE+Qh0OCvggULiBckWEZ4Ggbjx5HXVc58IPQJ0idQJ66XanTpFraTe348+XLizRNcz658eHMN3rNPT+C+G/nodqk3t6a+fN3j+u0Xn3nVTQPfdRPspkL/b+dEIN8EeMm2GAYbTNABdrbJ1hyFFv5lQYTodSZABhc+loCEyhxTYYkZopdMMiNeiBxyIFajV4wYHpfBBspUl8yKHu6ooV5APsZjQxyyeNeJ3N1IYod38cgdPBUid6GCKfRWgAYU4IccSyHew8B3doGJHmMLkGkZcynKk2Z50Ym0zJzLbDCmfBbI6eIyCdyJmJmoqZmnBAXy9+Z/yOlZDZpwYihnj7IZpuYEevrYJ5mJEuqiof4l+NYDEXQpXQcMnNjZNDx1oGqJ4S2nF3EsqWrhqqVWl6JIslpAK5MaIqDeqjJq56qN1aTaQaPbHTPYr8Be6Gsyyh6Da7OkmmqP/7GyztdrNVQBm5+pgw3X7aoYKhfZosb6hyUKBHCgQKij1rghkOAJuZg1SeYIIY+nIpDvf/sqm4yNG5CY64f87qdAwSXKGqFkhPH1ZHb2EgYtw3bpKGVkPz5pJAav+gukjB1UHE/HLNJobWcSX8jiuicMMBFd2OmKwQFs2tjXpDfnPE1j30V3c7iRHlrzBD2HONzODyZtsQJMI4r0AUNaE3XNHQw95c9GC001MpIxDacFQ+ulTNTZlU3O1eWVHa6vb/pnQUUrgHHSBKIuwG+bCPyEqbAg25gMVV1iOB/IGh5YOKLKIQ6xBAcUHmzjIcIqgajZ+Ro42DcvXl7j0U4WOUd+2IGu7DWjI1pt4DYq8BPm0entuGSQY/4tBi9Ss0HqfwngBQtHbCH88MQXb/zxyFfRRRHMN+/889BHL/301Fdv/fXYZ39CCAAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFh2fAKXsKm7R6Q+Y43vABep0mGwwOPH7w2CT+gHZ3d3lyagl+CQNvg4yGh36LcHoGfHR/ZYOElQ9/a4ocmoRygIiRk5p8pYmZjXePaYBujHoOqp5qZHBlHAUFXitddg8PBg8KGsgayxvGkAkFDwgICtPTzX2mftHW3QnOpojG3dbYkNjk1waxsdDS1N7ga9zw1t/aifTk35fu6Qj3numL14fOuHTNECHqU4DDgQEsCCwidiHBAwYQMmpcUOCAhI8gJVzUuLGThAQnP/9abEAyI4MCIVOKZNnyJUqUJxNcGNlywYOQgHZirGkSJ8gHNEky+AkS58qWEJYC/bMzacmbQHkqNdlUJ1KoSz2i9COhmQYCEXtVrCBgwYS3cCf8qTcNQ9u4cFFOq2bPLV65Cf7dxZthbjW+CgbjnWtNgWPFcAsHdoxgWWK/iyV045sAc2S96SDn1exYw17REwpLQEYt2eW/qtPZRQAB7QoC61RW+GsBwYZ/CXb/XRCYLsAKFizEtUAc+G7lcZsjroscOvTmsoUvx15PwccJ0N8yL17N9PG/E7jv9S4hOV7pdIPDdZ+ePDzv2qMXn2b5+wTbKuAWnF3oZbABZY0lVmD/ApQd9thybxno2GGuCVDggaUpoyBsB1bGGgIYbJCBcuFJiOAyGohIInQSmmdeiBnMF2GHfNUlIoc1rncjYRjW6NgGf3VQGILWwNjBfxEZcAFbC7gHXQcfUYOYdwzQNxo5yUhQZXhvRYlMeVSuSOJHKJa5AQMQThBlZWZ6Bp4Fa1qzTAJbijcBlJrtxeaZ4lnnpZwpukWieGQmYx5ATXIplwTL8DdNZ07CtWYybNIJF4Ap4NZHe0920AEDk035kafieQrqXofK5ympn5JHKYjPrfoWcR8WWQGp4Ul32KPVgXdnqxM6OKqspjIYrGPDrlrsZtRIcOuR86nHFwbPvmes/6PH4frrqbvySh+mKGhaAARPzjjdhCramdoGGOhp44i+zogBkSDuWC5KlE4r4pHJkarXrj++Raq5iLmWLlxHBteavjG+6amJrUkJJI4Ro5sBv9AaOK+jAau77sbH7nspCwNIYIACffL7J4JtWQnen421nNzMcB6AqpRa9klonmBSiR4GNi+cJZpvwgX0ejj71W9yR+eIgaVvQgf0l/A8nWjUFhwtZYWC4hVnkZ3p/PJqNQ5NnwUQrQCGBBBMQIGTtL7abK+5JjAv1fi9bS0GLlJHgdjEgYzzARTwC1fgEWdJuKKBZzj331Y23qB3i9v5aY/rSUC4w7PaLeWXmr9NszMFoN79eeiM232o33EJAIzaSGwh++y012777bhT0UURvPfu++/ABy/88MQXb/zxyCd/QggAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEBY5nwCk7xIWNer0hO95wziC9Ttg5b4ND/+Y87IBqZAaEe29zGwmJigmDfHoGiImTjXiQhJEPdYyWhXwDmpuVmHwOoHZqjI6kZ3+MqhyemJKAdo6Ge3OKbEd4ZRwFBV4rc4MPrgYPChrMzAgbyZSJBcoI1tfQoYsJydfe2amT3d7W0OGp1OTl0YtqyQrq0Lt11PDk3KGoG+nxBpvTD9QhwCctm0BzbOyMIwdOUwEDEgawIOCB2oMLgB4wgMCx44IHBySIHClBY0ePfyT/JCB5weRJCAwejFw58kGDlzBTqqTZcuPLmCIBiWx58+VHmiRLFj0JVCVLl0xl7qSZwCbOo0lFWv0pdefQrVFDJtr5gMBEYBgxqBWwYILbtxPsqMPAFu7blfa81bUbN4HAvXAzyLWnoDBguHIRFF6m4LBbwQngMYPXuC3fldbyPrMcGLM3w5wRS1iWWUNlvnElKDZtz/EEwaqvYahQoexEfyILi4RrYYKFZwJ3810QWZ2ECrx9Ew+O3K6F5Yq9zXbb+y30a7olJJ+wnLC16W97Py+uwdtx1NcLWzs/3G9e07stVPc9kHJ0BcLtQp+c3ewKAgYkUAFpCaAmmHqKLSYA/18WHEiZPRhsQF1nlLFWmIR8ZbDBYs0YZuCGpGXWmG92aWiPMwhEOOEEHXRwIALlwXjhio+BeE15IzpnInaLbZBBhhti9x2GbnVQo2Y9ZuCfCgBeMCB+DJDIolt4iVhOaNSJdCOBUfIlkmkyMpPAAvKJ59aXzTQzJo0WoJnmQF36Jp6W1qC4gWW9GZladCiyJd+KnsHImgRRVjfnaDEKuiZvbcYWo5htzefbl5LFWNeSKQAo1QXasdhiiwwUl2B21H3aQaghXnPcp1NagCqYslXAqnV+zYWcpNwVp9l5eepJnHqL4SdBi56CGlmw2Zn6aaiZjZqfb8Y2m+Cz1O0n3f+tnvrGbF6kToApCgAWoNWPeh754JA0vmajiAr4iOuOW7abQXVGNriBWoRdOK8FxNqLwX3oluubhv8yluRbegqGb536ykesuoXhyJqPQJIGbLvQhkcwjKs1zBvBwSZIsbcsDCCBAAf4ya+UEhyQoIiEJtfoZ7oxUOafE2BwgMWMqUydfC1LVtiArk0QtGkWEopzlqM9aJrKHfw5c6wKjFkmXDrbhwFockodtMGFLWpXy9JdiXN1ZDNszV4WSLQCGBKoQYHUyonqrHa4ErewAgMmcAAF7f2baIoVzC2p3gUvJtLcvIWqloy6/R04mIpLwDhciI8qLOB5yud44pHPLbA83hFDWPjNbuk9KnySN57Av+TMBvgEAgzzNhJb5K777rz37vvvVHRRxPDEF2/88cgnr/zyzDfv/PPQnxACACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BIUCwcMpO84OT2HDbm8GHLQjnn6wE3g83SA3DB55G3llfHxnfnZ4gglvew6Gf4ySgmYGlpCJknochWiId3kJcZZyDn93i6KPl4eniopwq6SIoZKxhpenbhtHZRxhXisDopwPgHkGDxrLGgjLG8mC0gkFDwjX2AgJ0bXJ2djbgNJsAtbfCNB2oOnn6MmKbeXt226K1fMGi6j359D69ua+QZskjd+3cOvY9XNgp4ABCQNYEDBl7EIeCQkeMIDAseOCBwckiBSZ4ILGjh4B/40kaXIjSggMHmBcifHky5gYE6zM2OAlzGM6Z5rs+fIjTZ0tfcYMSlLCUJ8fL47kCVXmTjwPiKJkUCDnyqc3CxzQmYeAxAEGLGJYiwCDgAUT4sqdgOebArdw507IUNfuW71xdZ7DC5iuhGsKErf9CxhPYgUaEhPWyzfBMgUIJDPW6zhb5M1y+R5GjFkBaLmCM0dOfHqvztXYJnMejaFCBQlmVxAYsEGkYnQV4lqYMNyCtnYSggNekAC58uJxmTufW5w55mwKkg+nLp105uTC53a/nhg88fMTmDfDVl65Xum/IZt/3/zaag3a5W63nll1dvfiWbaaZLmpQIABCVQA2f9lAhTG112PQWYadXE9+FtmEwKWwQYQJrZagxomsOCAGVImInsSbpCBhhwug6KKcXXQQYUcYuDMggrASFmNzjjzzIrh7cUhhhHqONeGpSEW2QYxHsmjhxpgUGAKB16g4IIbMNCkXMlhaJ8GWVJo2I3NyKclYF1GxgyYDEAnXHJrMpNAm/rFBSczPiYAlwXF8ZnmesvoOdyMbx7m4o0S5LWdn4bex2Z4xYmEzaEb5EUcnxbA+WWglqIn6aHPTInCgVbdlZyMqMrIQHMRSiaBBakS1903p04w434n0loBoQFOt1yu2YAnY68RXiNsqh2s2qqxuyKb7Imtmgcrqsp6h8D/fMSpapldx55nwayK/SfqCQd2hcFdAgDp5GMvqhvakF4mZuS710WGIYy30khekRkMu92GNu6bo7r/ttjqwLaua5+HOdrKq5Cl3dcwi+xKiLBwwwom4b0E6xvuYyqOa8IAEghwQAV45VvovpkxBl2mo0W7AKbCZXoAhgMmWnOkEqx2JX5nUufbgJHpXCfMOGu2QAd8eitpW1eaNrNeMGN27mNz0swziYnpSbXN19gYtstzfXrdYjNHtAIYGFVwwAEvR1dfxdjKxVzAP0twAAW/ir2w3nzTd3W4yQWO3t0DfleB4XYnEHCEhffdKgaA29p0eo4fHLng9qoG+OVyXz0gMeWGY7qq3xhiRIEAwayNxBawxy777LTXbjsVXRSh++689+7778AHL/zwxBdv/PEnhAAAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEhYLD4BlwHGg0ubBpuzdm9Dk9eCTu+MTZkDb4PXYbeIIcHHxqf4F3gnqGY2kOdQmCjHCGfpCSjHhmh2N+knmEkJmKg3uHfgaaeY2qn6t2i4t7sKAPbwIJD2VhXisDCQZgDrKDBQ8aGgjKyhvDlJMJyAjV1gjCunkP1NfVwpRtk93e2ZVt5NfCk27jD97f0LPP7/Dr4pTp1veLgvrx7AL+Q/BM25uBegoYkDCABYFhEobhkUBRwoMGEDJqXPDgQMUEFC9c1LjxQUUJICX/iMRIEgIDkycrjmzJMSXFlDNJvkwJsmdOjQwKfDz5M+PLoSGLQqgZU6XSoB/voHxawGbFlS2XGktAwKEADB0xiEWAodqGBRPSqp1wx5qCamDRrp2Qoa3bagLkzrULF4GCvHPTglRAmKxZvWsHayBcliDitHUlvGWM97FgCdYWVw4c2e/kw4HZJlCwmDBhwHPrjraGYTHqtaoxVKggoesKAgd2SX5rbUMFCxOAC8cGDwHFwBYWJCgu4XfwtcqZV0grPHj0u2SnqwU+IXph3rK5b1fOu7Bx5+K7L6/2/Xhg8uyXnQ8dvfRiDe7TwyfNuzlybKYpgIFtKhAgwEKkKcOf/wChZbBBgMucRh1so5XH3wbI1WXafRJy9iCErmX4IWHNaIAhZ6uxBxeGHXQA24P3yYfBBhmgSBozESpwongWOBhggn/N1aKG8a1YY2oVAklgCgQUUwGJ8iXAgItrWUARbwpqIOWEal0ZoYJbzmWlZCWSlsAC6VkwZonNbMAAl5cpg+NiZwpnJ0Xylegmlc+tWY1mjnGnZnB4QukMA9UJRxGOf5r4ppqDjjmnfKilh2ejGiyJAgF1XNmYbC2GmhZ5AcJVgajcXecNqM9Rx8B6bingnlotviqdkB3YCg+rtOaapFsUhSrsq6axJ6sEwoZK7I/HWpCsr57FBxJ1w8LqV/81zbkoXK3LfVeNpic0KRQG4NHoIW/XEmZuaiN6tti62/moWbk18uhjqerWS6GFpe2YVotskVssWfBOAHACrZHoWcGQwQhlvmsdXBZ/F9YLMF2jzUuYBP4a7CLCnoEHrgkDSCDAARUILAGaVVqAwQHR8pZXomm9/ONhgjrbgc2lyYxmpIRK9uSNjrXs8gEbTrYyl2ryTJmsLCdKkWzFQl1lWlOXGmifal6p9VnbQfpyY2SZyXKVV7JmZkMrgIFSyrIeUJ2r7YKnXdivUg1kAgdQ8B7IzJjGsd9zKSdwyBL03WpwDGxwuOASEP5vriO2F3nLjQdIrpaRDxqcBdgIHGA74pKrZXiR2ZWuZt49m+o3pKMC3p4Av7SNxBa456777rz37jsVXRQh/PDEF2/88cgnr/zyzDfv/PMnhAAAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEhYLDUPAMHGi0weEpbN7wI8cxTzsGj4R+n+DUxwaBeBt7hH1/gYIPhox+Y3Z3iwmGk36BkIN8egOIl3h8hBuOkAaZhQlna4BrpnyWa4mleZOFjrGKcXoFA2ReKwMJBgISDw6abwUPGggazc0bBqG0G8kI1tcIwZp51djW2nC03d7BjG8J49jl4cgP3t/RetLp1+vT6O7v5fKhAvnk0UKFogeP3zmCCIoZkDCABQFhChQYuKBHgkUJkxpA2MhxQYEDFhNcvPBAI8eNCx7/gMQYckPJkxsZPLhIM8FLmDJrYiRp8mTKkCwT8IQJwSPQkENhpgQpEunNkzlpWkwKdSbGihKocowqVSvKWQkIOBSgQOYFDBgQpI0oYMGEt3AzTLKm4BqGtnDjirxW95vbvG/nWlub8G9euRsiqqWLF/AEkRoiprX2wLDeDQgkW9PQGLDgyNc665WguK8C0XAnRY6oGPUEuRLsgk5g+a3cCxUqSBC7gsCBBXcVq6swwULx4hayvctGPK8FCwsSLE9A3Hje6NOrHzeOnW695sffRi/9HfDz7sIVSNB+XXrmugo0rHcM3X388o6jr44ceb51uNjF1xcC8zk3wXiS8aYC/wESaLABBs7ch0ECjr2WAGvLsLZBeHqVFl9kGxooV0T81TVhBo6NiOEyJ4p4IYnNRBQiYCN6x4wCG3ZAY2If8jXjYRcyk2FmG/5nXAY8wqhWAii+1YGOSGLoY4VRfqiAgikwmIeS1gjAgHkWYLQZf9m49V9gDWYWY5nmTYCRM2TS5pxxb8IZGV5nhplmhJyZadxzbrpnZ2d/6rnZgHIid5xIMDaDgJfbLdrgMkKW+Rygz1kEZz1mehabkBpgiQIByVikwGTqVfDkk2/Vxxqiqur4X3fksHccre8xlxerDLiHjQIVUAgXr77yFeyuOvYqXGbMrbrqBMqaFpFFzhL7qv9i1FX7ZLR0LUNdcc4e6Cus263KbV+inkAAHhJg0BeITR6WmHcaxhvXg/AJiKO9R77ILF1FwmVdAu6WBu+ZFua72mkZWMfqBElKu0G8rFZ5n4ATp5jkmvsOq+Nj7u63ZMMPv4bveyYy6fDH+C6brgnACHBABQUrkGirz2FwAHnM4Mmhzq9yijOrOi/MKabH6VwBiYwZdukEQAvILKTWXVq0ZvH5/CfUM7M29Zetthp1eht0eqkFYw8IKXKA6mzXfTeH7fZg9zW0AhgY0TwthUa6Ch9dBeIsbsFrYkRBfgTfiG0FhwMWnbsoq3cABUYOnu/ejU/A6uNeT8u4wMb1WnBCyJJTLjjnr8o3OeJrUcpc5oCiPqAEkz8tXuLkPeDL3Uhs4fvvwAcv/PDEU9FFEcgnr/zyzDfv/PPQRy/99NRXf0IIACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BIWCw/AoDziOtCHt8BQ28PjmzK57Hom8fo42+P8DeAkbeYQcfX9+gYOFg4d1bIGEjQmPbICClI9/YwaLjHAJdJeKmZOViGtpn3qOqZineoeJgG8CeWUbBV4rAwkGAhIVGL97hGACGsrKCAgbBoTRhLvN1c3PepnU1s2/oZO6AtzdBoPf4eMI3tIJyOnF0YwFD+nY8e3z7+Xfefnj9uz8cVsXCh89axgk7BrAggAwBQsYIChwQILFixIeNIDAseOCBwcSXMy2sSPHjxJE/6a0eEGjSY4MQGK86PIlypUJEmYsaTKmyJ8JW/Ls6HMkzaEn8YwMWtPkx4pGd76E4DMPRqFTY860OGhogwYagBFoKEABA46DEGBAoEBB0AUT4sqdIFKBNbcC4M6dkEEk22oYFOTdG9fvWrtsBxM23MytYL17666t9phwXwlum2lIDHmuSA2IGyuOLOHv38qLMbdFjHruZbWgRXeOe1nC2BUEDiyAMMHZuwoTLAQX3nvDOAUW5Vogru434d4JnAsnPmFB9NBshQXfa9104+Rxl8e13rZxN+CEydtVsFkd+vDjE7C/q52wOvb4s7+faz025frbxefWbSoQIAEDEUCwgf9j7bUlwHN9ZVaegxDK1xYzFMJH24L5saXABhlYxiEzHoKoIV8LYqAMaw9aZqFmJUK4YHuNfRjiXhmk+NcyJgaIolvM8BhiBx3IleN8lH1IWAcRgkZgCgYiaBGJojGgHHFTgtagAFYSZhF7/qnTpY+faVlNAnqJN0EHWa6ozAZjBtgmmBokwMB01LW5jAZwbqfmlNips4B4eOqJgDJ2+imXRZpthuigeC6XZTWIxilXmRo8iYKBCwiWmWkJVEAkfB0w8KI1IvlIpKnOkVpqdB5+h96o8d3lFnijrgprjbfGRSt0lH0nAZG5vsprWxYRW6Suq4UWqrLEsspWg8Io6yv/q6EhK0Fw0GLbjKYn5CZYBYht1laPrnEY67kyrhYbuyceiR28Pso7bYwiXjihjWsWuWF5p/H765HmNoiur3RJsGKNG/jq748XMrwmjhwCfO6QD9v7LQsDxPTAMKsFpthyJCdkmgYiw0VdXF/Om9dyv7YMWGXTLYpZg5wNR11C78oW3p8HSGgul4qyrJppgllJHJZHn0Y0yUwDXCXUNquFZNLKyYXBAVZvxtAKYIQEsmPgDacr0tltO1y/DMwYpkgUpJfTasLGzd3cdCN3gN3UWRcY3epIEPevfq+3njBxq/kqBoGBduvea8f393zICS63ivRBTqgFpgaWZEIUULdcK+frIfAAL2AjscXqrLfu+uuwx05FF0XUbvvtuOeu++689+7778AHL/wJIQAAOwAAAAAAAAAAAA=="); + diff --git a/src/bb-modules/Filemanager/src/ace/cockpit.js b/src/bb-modules/Filemanager/src/ace/cockpit.js new file mode 100644 index 000000000..ddc082813 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/cockpit.js @@ -0,0 +1 @@ +define("cockpit/index",["require","exports","module","pilot/index","cockpit/cli","cockpit/ui/settings","cockpit/ui/cli_view","cockpit/commands/basic"],function(a,b,c){b.startup=function(b,c){a("pilot/index"),a("cockpit/cli").startup(b,c),a("cockpit/ui/settings").startup(b,c),a("cockpit/ui/cli_view").startup(b,c),a("cockpit/commands/basic").startup(b,c)}}),define("cockpit/cli",["require","exports","module","pilot/console","pilot/lang","pilot/oop","pilot/event_emitter","pilot/types","pilot/canon"],function(a,b,c){function r(a,b){q.call(this,a),b&&b.flags&&(this.flags=b.flags)}function q(a){this.env=a,this.commandAssignment=new o(p,this)}function o(a,b){this.param=a,this.requisition=b,this.setValue(a.defaultValue)}function n(a,b,c,d,e,f){this.emitter=a,this.setText(b),this.start=c,this.end=d,this.prefix=e,this.suffix=f}function m(a,b){this.status=a.status,this.message=a.message,b?(this.start=b.start,this.end=b.end):(this.start=0,this.end=0),this.predictions=a.predictions}function l(a,b,c,d,e){this.status=a,this.message=b;if(typeof c=="number")this.start=c,this.end=d,this.predictions=e;else{var f=c;this.start=f.start,this.end=f.end,this.predictions=f.predictions}}var d=a("pilot/console"),e=a("pilot/lang"),f=a("pilot/oop"),g=a("pilot/event_emitter").EventEmitter,h=a("pilot/types"),i=a("pilot/types").Status,j=a("pilot/types").Conversion,k=a("pilot/canon");b.startup=function(a,b){k.upgradeType("command",p)},l.prototype={},l.sort=function(a,b){b!==undefined&&a.forEach(function(a){a.start===n.AT_CURSOR?a.distance=0:ba.end?a.distance=b-a.end:a.distance=0},this),a.sort(function(a,c){if(b!==undefined){var d=a.distance-c.distance;if(d!=0)return d}return c.status-a.status}),b!==undefined&&a.forEach(function(a){delete a.distance},this);return a},b.Hint=l,f.inherits(m,l),n.prototype={merge:function(a){if(a.emitter!=this.emitter)throw new Error("Can't merge Arguments from different EventEmitters");return new n(this.emitter,this.text+this.suffix+a.prefix+a.text,this.start,a.end,this.prefix,a.suffix)},setText:function(a){if(a==null)throw new Error("Illegal text for Argument: "+a);var b={argument:this,oldText:this.text,text:a};this.text=a,this.emitter._dispatchEvent("argumentChange",b)},toString:function(){return this.prefix+this.text+this.suffix}},n.merge=function(a,b,c){b=b===undefined?0:b,c=c===undefined?a.length:c;var d;for(var e=b;e: ";this.param.description&&(b+=this.param.description.trim(),b.charAt(b.length-1)!=="."&&(b+="."),b.charAt(b.length-1)!==" "&&(b+=" "));var c=i.VALID,d=this.arg?this.arg.start:n.AT_CURSOR,e=this.arg?this.arg.end:n.AT_CURSOR,f;this.conversion&&(c=this.conversion.status,this.conversion.message&&(b+=this.conversion.message),f=this.conversion.predictions);var g=this.arg&&this.arg.text!=="",h=this.value!==undefined||g;this.param.defaultValue===undefined&&!h&&(c=i.INVALID,b+="Required");return new l(c,b,d,e,f)},complete:function(){this.conversion&&this.conversion.predictions&&this.conversion.predictions.length>0&&this.setValue(this.conversion.predictions[0])},isPositionCaptured:function(a){return this.arg?this.arg.start===-1?!1:a>this.arg.end?!1:a===this.arg.end?this.conversion.status!==i.VALID||this.conversion.predictions.length!==0:!0:!1},decrement:function(){var a=this.param.type.decrement(this.value);a!=null&&this.setValue(a)},increment:function(){var a=this.param.type.increment(this.value);a!=null&&this.setValue(a)},toString:function(){return this.arg?this.arg.toString():""}},b.Assignment=o;var p={name:"__command",type:"command",description:"The command to execute",getCustomHint:function(a,b){var c=[];c.push(" > "),c.push(a.name),a.params&&a.params.length>0&&a.params.forEach(function(a){a.defaultValue===undefined?c.push(" ["+a.name+"]"):c.push(" ["+a.name+"]")},this),c.push("
          "),c.push(a.description?a.description:"(No description)"),c.push("
          "),a.params&&a.params.length>0&&(c.push("
            "),a.params.forEach(function(a){c.push("
          • "),c.push(""+a.name+": "),c.push(a.description?a.description:"(No description)"),a.defaultValue===undefined?c.push(" [Required]"):a.defaultValue===null?c.push(" [Optional]"):c.push(" [Default: "+a.defaultValue+"]"),c.push("
          • ")},this),c.push("
          "));return new l(i.VALID,c.join(""),b)}};q.prototype={commandAssignment:undefined,assignmentCount:undefined,_assignments:undefined,_hints:undefined,_assignmentChanged:function(a){a.param.name==="__command"&&(this._assignments={},a.value&&a.value.params.forEach(function(a){this._assignments[a.name]=new o(a,this)},this),this.assignmentCount=Object.keys(this._assignments).length,this._dispatchEvent("commandChange",{command:a.value}))},getAssignment:function(a){var b=typeof a=="string"?a:Object.keys(this._assignments)[a];return this._assignments[b]},getParameterNames:function(){return Object.keys(this._assignments)},cloneAssignments:function(){return Object.keys(this._assignments).map(function(a){return this._assignments[a]},this)},_updateHints:function(){this.getAssignments(!0).forEach(function(a){this._hints.push(a.getHint())},this),l.sort(this._hints)},getWorstHint:function(){return this._hints[0]},getArgsObject:function(){var a={};this.getAssignments().forEach(function(b){a[b.param.name]=b.value},this);return a},getAssignments:function(a){var b=[];a===!0&&b.push(this.commandAssignment),Object.keys(this._assignments).forEach(function(a){b.push(this.getAssignment(a))},this);return b},setDefaultValues:function(){this.getAssignments().forEach(function(a){a.setValue(undefined)},this)},exec:function(){k.exec(this.commandAssignment.value,this.env,"cli",this.getArgsObject(),this.toCanonicalString())},toCanonicalString:function(){var a=[];a.push(this.commandAssignment.value.name),Object.keys(this._assignments).forEach(function(b){var c=this._assignments[b],d=c.param.type;c.value!==c.param.defaultValue&&(a.push(" "),a.push(d.stringify(c.value)))},this);return a.join("")}},f.implement(q.prototype,g),b.Requisition=q,f.inherits(r,q),function(){r.prototype.update=function(a){this.input=a,this._hints=[];var b=this._tokenize(a.typed);this._split(b),this.commandAssignment.value&&this._assign(b),this._updateHints()},r.prototype.getInputStatusMarkup=function(){var a=this.toString().split("").map(function(a){return i.VALID});this._hints.forEach(function(b){for(var c=b.start;c<=b.end;c++)b.status>a[c]&&(a[c]=b.status)},this);return a},r.prototype.toString=function(){return this.getAssignments(!0).map(function(a){return a.toString()},this).join("")};var a=r.prototype._updateHints;r.prototype._updateHints=function(){a.call(this);var b=this.input.cursor;this._hints.forEach(function(a){var c=b.start>=a.start&&b.start<=a.end,d=b.end>=a.start&&b.end<=a.end,e=c||d;!e&&a.status===i.INCOMPLETE&&(a.status=i.INVALID)},this),l.sort(this._hints)},r.prototype.getHints=function(){return this._hints},r.prototype.getAssignmentAt=function(a){var b=this.getAssignments(!0);for(var c=0;c=a.length){if(f!==b){var l=g(a.substring(i,h));k.push(new n(this,l,i,h,j,""))}else if(h!==i){var m=a.substring(i,h),o=k[k.length-1];o?o.suffix+=m:(o=new n(this,"",h,h,m,""),k.push(o))}break}var p=a[h];switch(f){case b:p==="'"?(j=a.substring(i,h+1),f=d,i=h+1):p==='"'?(j=a.substring(i,h+1),f=e,i=h+1):/ /.test(p)||(j=a.substring(i,h),f=c,i=h);break;case c:if(p===" "){var l=g(a.substring(i,h));k.push(new n(this,l,i,h,j,"")),f=b,i=h,j=""}break;case d:if(p==="'"){var l=g(a.substring(i,h));k.push(new n(this,l,i-1,h+1,j,p)),f=b,i=h+1,j=""}break;case e:if(p==='"'){var l=g(a.substring(i,h));k.push(new n(this,l,i-1,h+1,j,p)),f=b,i=h+1,j=""}}h++}return k},r.prototype._split=function(a){var b=1,c;while(b<=a.length){var c=n.merge(a,0,b);this.commandAssignment.setArgument(c);if(!this.commandAssignment.value)break;if(this.commandAssignment.value.exec){for(var d=0;d=a.length)break;continue}b.param.type.name==="boolean"?b.setValue(!0):f+10){var g=n.merge(a);this._hints.push(new l(i.INVALID,"Input '"+g.text+"' makes no sense.",g))}}}}(),b.CliRequisition=r}),define("cockpit/ui/settings",["require","exports","module","pilot/types","pilot/types/basic"],function(a,b,c){var d=a("pilot/types"),e=a("pilot/types/basic").SelectionType,f=new e({name:"direction",data:["above","below"]}),g={name:"hintDirection",description:"Are hints shown above or below the command line?",type:"direction",defaultValue:"above"},h={name:"outputDirection",description:"Is the output window shown above or below the command line?",type:"direction",defaultValue:"above"},i={name:"outputHeight",description:"What height should the output panel be?",type:"number",defaultValue:300};b.startup=function(a,b){d.registerType(f),a.env.settings.addSetting(g),a.env.settings.addSetting(h),a.env.settings.addSetting(i)},b.shutdown=function(a,b){d.unregisterType(f),a.env.settings.removeSetting(g),a.env.settings.removeSetting(h),a.env.settings.removeSetting(i)}}),define("cockpit/ui/cli_view",["require","exports","module","text!cockpit/ui/cli_view.css","pilot/event","pilot/dom","pilot/keys","pilot/canon","pilot/types","cockpit/cli","cockpit/ui/request_view"],function(a,b,c){function n(a,b){a.cliView=this,this.cli=a,this.doc=document,this.win=f.getParentWindow(this.doc),this.env=b,this.element=this.doc.getElementById("cockpitInput");!this.element||(this.settings=b.settings,this.hintDirection=this.settings.getSetting("hintDirection"),this.outputDirection=this.settings.getSetting("outputDirection"),this.outputHeight=this.settings.getSetting("outputHeight"),this.isUpdating=!1,this.createElements(),this.update())}var d=a("text!cockpit/ui/cli_view.css"),e=a("pilot/event"),f=a("pilot/dom");f.importCssString(d);var e=a("pilot/event"),g=a("pilot/keys"),h=a("pilot/canon"),i=a("pilot/types").Status,j=a("cockpit/cli").CliRequisition,k=a("cockpit/cli").Hint,l=a("cockpit/ui/request_view").RequestView,m=new k(i.VALID,"",0,0);b.startup=function(a,b){var c=new j(a.env),d=new n(c,a.env);a.env.cli=c},n.prototype={createElements:function(){function d(){f.removeCssClass(this.output,"cptFocusPopup"),f.removeCssClass(this.hinter,"cptFocusPopup")}var a=this.element;this.element.spellcheck=!1,this.output=this.doc.getElementById("cockpitOutput"),this.popupOutput=this.output==null;if(!this.output){this.output=this.doc.createElement("div"),this.output.id="cockpitOutput",this.output.className="cptOutput",a.parentNode.insertBefore(this.output,a.nextSibling);var b=function(){this.output.style.maxHeight=this.outputHeight.get()+"px"}.bind(this);this.outputHeight.addEventListener("change",b),b()}this.completer=this.doc.createElement("div"),this.completer.className="cptCompletion VALID",this.completer.style.color=f.computedStyle(a,"color"),this.completer.style.fontSize=f.computedStyle(a,"fontSize"),this.completer.style.fontFamily=f.computedStyle(a,"fontFamily"),this.completer.style.fontWeight=f.computedStyle(a,"fontWeight"),this.completer.style.fontStyle=f.computedStyle(a,"fontStyle"),a.parentNode.insertBefore(this.completer,a.nextSibling),this.completer.style.backgroundColor=a.style.backgroundColor,a.style.backgroundColor="transparent",this.hinter=this.doc.createElement("div"),this.hinter.className="cptHints",a.parentNode.insertBefore(this.hinter,a.nextSibling);var c=this.resizer.bind(this);e.addListener(this.win,"resize",c),this.hintDirection.addEventListener("change",c),this.outputDirection.addEventListener("change",c),c(),h.addEventListener("output",function(a){new l(a.request,this)}.bind(this)),e.addCommandKeyListener(a,this.onCommandKey.bind(this)),e.addListener(a,"keyup",this.onKeyUp.bind(this)),e.addListener(a,"mouseup",function(a){this.isUpdating=!0,this.update(),this.isUpdating=!1}.bind(this)),this.cli.addEventListener("argumentChange",this.onArgChange.bind(this)),e.addListener(a,"focus",function(){f.addCssClass(this.output,"cptFocusPopup"),f.addCssClass(this.hinter,"cptFocusPopup")}.bind(this)),e.addListener(a,"blur",d.bind(this)),d.call(this)},scrollOutputToBottom:function(){var a=Math.max(this.output.scrollHeight,this.output.clientHeight);this.output.scrollTop=a-this.output.clientHeight},resizer:function(){var a=this.element.getClientRects()[0];this.completer.style.top=a.top+"px";var b=a.bottom-a.top;this.completer.style.height=b+"px",this.completer.style.lineHeight=b+"px",this.completer.style.left=a.left+"px";var c=a.right-a.left;this.completer.style.width=c+"px",this.hintDirection.get()==="below"?(this.hinter.style.top=a.bottom+"px",this.hinter.style.bottom="auto"):(this.hinter.style.top="auto",this.hinter.style.bottom=this.doc.documentElement.clientHeight-a.top+"px"),this.hinter.style.left=a.left+30+"px",this.hinter.style.maxWidth=c-110+"px",this.popupOutput&&(this.outputDirection.get()==="below"?(this.output.style.top=a.bottom+"px",this.output.style.bottom="auto"):(this.output.style.top="auto",this.output.style.bottom=this.doc.documentElement.clientHeight-a.top+"px"),this.output.style.left=a.left+"px",this.output.style.width=c-80+"px")},onCommandKey:function(a,b,c){var d;if(c===g.TAB||c===g.UP||c===g.DOWN)d=!0;else if(b!=0||c!=0)d=h.execKeyCommand(this.env,"cli",b,c);d&&e.stopEvent(a)},onKeyUp:function(a){var b;if(a.keyCode===g.RETURN){var c=this.cli.getWorstHint();c.status===i.VALID?(this.cli.exec(),this.element.value=""):(f.setSelectionStart(this.element,c.start),f.setSelectionEnd(this.element,c.end))}this.update();var d=this.cli.getAssignmentAt(f.getSelectionStart(this.element));d&&(a.keyCode===g.TAB&&(d.complete(),this.update()),a.keyCode===g.UP&&(d.increment(),this.update()),a.keyCode===g.DOWN&&(d.decrement(),this.update()));return b},update:function(){this.isUpdating=!0;var a={typed:this.element.value,cursor:{start:f.getSelectionStart(this.element),end:f.getSelectionEnd(this.element.selectionEnd)}};this.cli.update(a);var b=this.cli.getAssignmentAt(a.cursor.start).getHint();f.removeCssClass(this.completer,i.VALID.toString()),f.removeCssClass(this.completer,i.INCOMPLETE.toString()),f.removeCssClass(this.completer,i.INVALID.toString());var c='> ';if(this.element.value.length>0){var d=this.cli.getInputStatusMarkup();c+=this.markupStatusScore(d)}if(this.element.value.length>0&&b.predictions&&b.predictions.length>0){var e=b.predictions[0];c+="  ⇥ "+(e.name?e.name:e)}this.completer.innerHTML=c,f.addCssClass(this.completer,this.cli.getWorstHint().status.toString());var g="";this.element.value.length!==0&&(g+=b.message,b.predictions&&b.predictions.length>0&&(g+=": [ ",b.predictions.forEach(function(a){g+=a.name?a.name:a,g+=" | "},this),g=g.replace(/\| $/,"]"))),this.hinter.innerHTML=g,g.length===0?f.addCssClass(this.hinter,"cptNoPopup"):f.removeCssClass(this.hinter,"cptNoPopup"),this.isUpdating=!1},markupStatusScore:function(a){var b="",c=0,d=-1;for(;;){d!==a[c]&&(b+="",d=a[c]),b+=this.element.value[c],c++;if(c===this.element.value.length){b+="";break}d!==a[c]&&(b+="")}return b},onArgChange:function(a){if(!this.isUpdating){var b=this.element.value.substring(0,a.argument.start),c=this.element.value.substring(a.argument.end),d=typeof a.text=="string"?a.text:a.text.name;this.element.value=b+d+c;var e=(b+d).length;this.element.selectionStart=e,this.element.selectionEnd=e}}},b.CliView=n}),define("cockpit/ui/request_view",["require","exports","module","pilot/dom","pilot/event","text!cockpit/ui/request_view.html","pilot/domtemplate","text!cockpit/ui/request_view.css"],function(a,b,c){function l(a,b){this.request=a,this.cliView=b,this.imageUrl=k,this.rowin=null,this.rowout=null,this.output=null,this.hide=null,this.show=null,this.duration=null,this.throb=null,(new g).processNode(j.cloneNode(!0),this),this.cliView.output.appendChild(this.rowin),this.cliView.output.appendChild(this.rowout),this.request.addEventListener("output",this.onRequestChange.bind(this))}function k(b){var d;try{d=a("text!cockpit/ui/"+b)}catch(e){}if(d)return d;var f=c.id.split("/").pop()+".js",g;if(c.uri.substr(-f.length)!==f){console.error("Can't work out path from module.uri/module.id");return b}if(c.uri){var h=c.uri.length-f.length-1;return c.uri.substr(0,h)+"/"+b}return f+b}var d=a("pilot/dom"),e=a("pilot/event"),f=a("text!cockpit/ui/request_view.html"),g=a("pilot/domtemplate").Templater,h=a("text!cockpit/ui/request_view.css");d.importCssString(h);var i=document.createElement("div");i.innerHTML=f;var j=i.querySelector(".cptRow");l.prototype={copyToInput:function(){this.cliView.element.value=this.request.typed},executeRequest:function(a){this.cliView.cli.update({typed:this.request.typed,cursor:{start:0,end:0}}),this.cliView.cli.exec()},hideOutput:function(a){this.output.style.display="none",d.addCssClass(this.hide,"cmd_hidden"),d.removeCssClass(this.show,"cmd_hidden"),e.stopPropagation(a)},showOutput:function(a){this.output.style.display="block",d.removeCssClass(this.hide,"cmd_hidden"),d.addCssClass(this.show,"cmd_hidden"),e.stopPropagation(a)},remove:function(a){this.cliView.output.removeChild(this.rowin),this.cliView.output.removeChild(this.rowout),e.stopPropagation(a)},onRequestChange:function(a){this.duration.innerHTML=this.request.duration?"completed in "+this.request.duration/1e3+" sec ":"",this.output.innerHTML="",this.request.outputs.forEach(function(a){var b;typeof a=="string"?(b=document.createElement("p"),b.innerHTML=a):b=a,this.output.appendChild(b)},this),this.cliView.scrollOutputToBottom(),d.setCssClass(this.output,"cmd_error",this.request.error),this.throb.style.display=this.request.completed?"none":"block"}},b.RequestView=l}),define("pilot/domtemplate",["require","exports","module"],function(require,exports,module){function Templater(){this.scope=[]}Templater.prototype.processNode=function(a,b){typeof a=="string"&&(a=document.getElementById(a));if(b===null||b===undefined)b={};this.scope.push(a.nodeName+(a.id?"#"+a.id:""));try{if(a.attributes&&a.attributes.length){if(a.hasAttribute("foreach")){this.processForEach(a,b);return}if(a.hasAttribute("if")&&!this.processIf(a,b))return;b.__element=a;var c=Array.prototype.slice.call(a.attributes);for(var d=0;d1&&(d.forEach(function(c){c!==null&&c!==undefined&&c!==""&&(c.charAt(0)==="$"&&(c=this.envEval(c.slice(1),b,a.data)),c===null&&(c="null"),c===undefined&&(c="undefined"),typeof c.cloneNode!="function"&&(c=a.ownerDocument.createTextNode(c.toString())),a.parentNode.insertBefore(c,a))},this),a.parentNode.removeChild(a))},Templater.prototype.stripBraces=function(a){if(!a.match(/\$\{.*\}/g)){this.handleError("Expected "+a+" to match ${...}");return a}return a.slice(2,-1)},Templater.prototype.property=function(a,b,c){this.scope.push(a);try{typeof a=="string"&&(a=a.split("."));var d=b[a[0]];if(a.length===1){c!==undefined&&(b[a[0]]=c);return typeof d=="function"?function(){return d.apply(b,arguments)}:d}if(!d){this.handleError("Can't find path="+a);return null}return this.property(a.slice(1),d,c)}finally{this.scope.pop()}},Templater.prototype.envEval=function(script,env,context){with(env)try{this.scope.push(context);return eval(script)}catch(ex){this.handleError("Template error evaluating '"+script+"'",ex);return script}finally{this.scope.pop()}},Templater.prototype.handleError=function(a,b){this.logError(a),this.logError("In: "+this.scope.join(" > ")),b&&this.logError(b)},Templater.prototype.logError=function(a){window.console&&window.console.log&&console.log(a)},exports.Templater=Templater}),define("cockpit/commands/basic",["require","exports","module","pilot/canon"],function(a,b,c){var d=a("pilot/canon"),e={name:"sh",description:"Execute a system command (requires server support)",params:[{name:"command",type:"text",description:"The string to send to the os shell."}],exec:function(a,b,c){var d=new XMLHttpRequest;d.open("GET","/exec?args="+b.command,!0),d.onreadystatechange=function(a){d.readyState==4&&d.status==200&&c.done("
          "+d.responseText+"
          ")},d.send(null)}},d=a("pilot/canon");b.startup=function(a,b){d.addCommand(e)},b.shutdown=function(a,b){d.removeCommand(e)}}),define("text!cockpit/ui/cli_view.css",[],"#cockpitInput { padding-left: 16px; }.cptOutput { overflow: auto; position: absolute; z-index: 999; display: none; }.cptCompletion { padding: 0; position: absolute; z-index: -1000; }.cptCompletion.VALID { background: #FFF; }.cptCompletion.INCOMPLETE { background: #DDD; }.cptCompletion.INVALID { background: #DDD; }.cptCompletion span { color: #FFF; }.cptCompletion span.INCOMPLETE { color: #DDD; border-bottom: 2px dotted #F80; }.cptCompletion span.INVALID { color: #DDD; border-bottom: 2px dotted #F00; }span.cptPrompt { color: #66F; font-weight: bold; }.cptHints { color: #000; position: absolute; border: 1px solid rgba(230, 230, 230, 0.8); background: rgba(250, 250, 250, 0.8); -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; border-top-left-radius: 10px; border-top-right-radius: 10px; z-index: 1000; padding: 8px; display: none;}.cptFocusPopup { display: block; }.cptFocusPopup.cptNoPopup { display: none; }.cptHints ul { margin: 0; padding: 0 15px; }.cptGt { font-weight: bold; font-size: 120%; }"),define("text!cockpit/ui/request_view.css",[],".cptRowIn { display: box; display: -moz-box; display: -webkit-box; box-orient: horizontal; -moz-box-orient: horizontal; -webkit-box-orient: horizontal; box-align: center; -moz-box-align: center; -webkit-box-align: center; color: #333; background-color: #EEE; width: 100%; font-family: consolas, courier, monospace;}.cptRowIn > * { padding-left: 2px; padding-right: 2px; }.cptRowIn > img { cursor: pointer; }.cptHover { display: none; }.cptRowIn:hover > .cptHover { display: block; }.cptRowIn:hover > .cptHover.cptHidden { display: none; }.cptOutTyped { box-flex: 1; -moz-box-flex: 1; -webkit-box-flex: 1; font-weight: bold; color: #000; font-size: 120%;}.cptRowOutput { padding-left: 10px; line-height: 1.2em; }.cptRowOutput strong,.cptRowOutput b,.cptRowOutput th,.cptRowOutput h1,.cptRowOutput h2,.cptRowOutput h3 { color: #000; }.cptRowOutput a { font-weight: bold; color: #666; text-decoration: none; }.cptRowOutput a: hover { text-decoration: underline; cursor: pointer; }.cptRowOutput input[type=password],.cptRowOutput input[type=text],.cptRowOutput textarea { color: #000; font-size: 120%; background: transparent; padding: 3px; border-radius: 5px; -moz-border-radius: 5px; -webkit-border-radius: 5px;}.cptRowOutput table,.cptRowOutput td,.cptRowOutput th { border: 0; padding: 0 2px; }.cptRowOutput .right { text-align: right; }"),define("text!cockpit/ui/request_view.html",[],'
          >
          ${request.typed}
          Hide command output Show command output Remove this command from the history
          '),define("text!cockpit/ui/images/closer.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAj9JREFUeNp0ks+LUlEUx7/vV1o8Z8wUx3IEHcQmiBiQlomjRNCiZpEuEqF/oEUwq/6EhvoHggmRcJUQBM1CRJAW0aLIaGQimZJxJsWxyV/P9/R1zzWlFl04vPvOPZ9z7rnnK5imidmKRCIq+zxgdoPZ1T/ut8xeM3tcKpW6s1hhBkaj0Qj7bDebTX+324WmadxvsVigqipcLleN/d4rFoulORiLxTZY8ItOp8MBCpYkiYPj8Xjus9vtlORWoVB4KcTjcQc732dLpSRXvCZaAws6Q4WDdqsO52kNH+oCRFGEz+f7ydwBKRgMPmTXi49GI1x2D/DsznesB06ws2eDbI7w9HYN6bVjvGss4KAjwDAMq81mM2SW5Wa/3weBbz42UL9uYnVpiO2Nr9ANHSGXib2Wgm9tCYIggGKJEVkvlwgi5/FQRmTLxO6hgJVzI1x0T/fJrBtHJxPeL6tI/fsZLA6ot8lkQi8HRVbw94gkWYI5MaHrOjcCGSNRxZosy9y5cErDzn0Dqx7gcwO8WtBp4PndI35GMYqiUMUvBL5yOBz8yRfFNpbPmqgcCFh/IuHa1nR/YXGM8+oUpFhihEQiwcdRLpfVRqOBtWXWq34Gra6AXq8Hp2piZcmKT4cKnE4nwuHwdByVSmWQz+d32WCTlHG/qaHHREN9kgi0sYQfv0R4PB4EAgESQDKXy72fSy6VSnHJVatVf71eR7vd5n66mtfrRSgU4pLLZrOlf7RKK51Ok8g3/yPyR5lMZi7y3wIMAME4EigHWgKnAAAAAElFTkSuQmCC"),define("text!cockpit/ui/images/dot_clear.gif",[],"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAEBMgA7"),define("text!cockpit/ui/images/minus.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gDS7KbF4AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kFGw4xMrIJw5EAAAHcSURBVCjPhZIxSxtxGMZ/976XhJA/RA5EAyJcFksnp64hjUPBoXRyCYLQTyD0UxScu0nFwalCQSgFCVk7dXAwUAiBDA2RO4W7yN1x9+9gcyhU+pteHt4H3pfncay1LOl0OgY4BN4Ar/7KP4BvwNFwOIyWu87S2O12O8DxfD73oygiSRIAarUaxhhWV1fHwMFgMBiWxl6v9y6Koi+3t7ckSUKtVkNVAcjzvNRWVlYwxry9vLz86uzs7HjAZDKZGGstjUaDfxHHMSLC5ubmHdB2VfVwNpuZ5clxHPMcRVFwc3PTXFtbO3RFZHexWJCmabnweAaoVqvlv4vFAhHZdVX1ZZqmOI5DURR8fz/lxbp9Yrz+7bD72SfPcwBU1XdF5N5aWy2KgqIoeBzPEnWVLMseYnAcRERdVR27rrsdxzGqyutP6898+GBsNBqo6i9XVS88z9sOggAR4X94noeqXoiIHPm+H9XrdYIgIAxDwjAkTVPCMESzBy3LMprNJr7v34nIkV5dXd2fn59fG2P2siwjSRIqlQrWWlSVJFcqlQqtVot2u40xZu/s7OxnWbl+v98BjkejkT+dTgmCoDxtY2ODra2tMXBweno6fNJVgP39fQN8eKbkH09OTsqS/wHFRdHPfTSfjwAAAABJRU5ErkJggg=="),define("text!cockpit/ui/images/pinaction.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAAClklEQVQ4EX1TXUhUQRQ+Z3Zmd+9uN1q2P3UpZaEwcikKekkqLKggKHJ96MHe9DmLkCDa9U198Id8kErICmIlRAN96UdE6QdBW/tBA5Uic7E0zN297L17p5mb1zYjD3eYc+d83zlnON8g5xzWNUSEdUBkHTJasRWySPP7fw3hfwkk2GoNsc0vOaJRHo1GV/GiMctkTIJRFlpZli8opK+htmf83gXeG63oteOtra0u25e7TYJIJELb26vYCACTgUe1lXV86BTn745l+MsyHqs53S/Aq4VEUa9Y6ko14eYY4u3AyM3HYwdKU35DZyblGR2+qq6W0X2Nnh07xynnVYpHORx/E1/GvvqaAZUayjMjdM2f/Lgr5E+fV93zR4u3zKCLughsZqKwAzAxaz6dPY6JgjLUF+eSP5OpjmAw2E8DvldHSvJMKPg08aRor1tc4BuALu6mOwGWdQC3mKIqRsC8mKd8wYfD78/earzSYzdMDW9QgKb0Is8CBY1mQXOiaXAHEpMDE5XTJqIq4EiyxUqKlpfkF0pyV1OTAoFAhmTmyCCoDsZNZvIkUjELQpipo0sQqYZAswZHwsEEE10M0pq2SSZY9HqNcDicJcNTpBvQJz40UbSOTh1B8bDpuY0w9Hb3kkn9lPAlBLfhfD39XTtX/blFJqiqrjbkTi63Hbofj2uL4GMsmzFgbDJ/vmMgv/lB4syJ0oXO7d3j++vio6GFsYmD6cHJreWc3/jRVVHhsOYvM8iZ36mtjPDBk/xDZE8CoHlbrlAssbTxDdDJvdb536L7I6S7Vy++6Gi4Xi9BsUthJRaLOYSPz4XALKI4j4iObd/e5UtDKUjZzYyYRyGAJv01Zj8kC5cbs5WY83hQnv0DzCXl+r8APElkq0RU6oMAAAAASUVORK5CYII="),define("text!cockpit/ui/images/pinin.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAABZ0lEQVQ4Ea2TPUsDQRCGZ89Eo4FACkULEQs1CH4Uamfjn7GxEYJFIFXgChFsbPwzNnZioREkaiHBQtEiEEiMRm/dZ8OEGAxR4sBxx877Pju7M2estTJIxLrNuVwuMxQEx0ZkzcFHyRtjXt02559RtB2GYanTYzoryOfz+6l4Nbszf2niwffKmpGRo9sVW22mDgqFwp5C2gDMm+P32a3JB1N+n5JifUGeP9JeNxGryPLYjcwMP8rJ07Q9fZltQzyAstOJ2vVu5sKc1ZZkRBrOcKeb+HexPidvkpCN5JUcllZtpZFc5DgBWc5M2eysZuMuofMBSA4NWjx4PUCsXefMlI0QY3ewRg4NWi4ZTQsgrjYXema+e4VqtEMK6KXvu+4B9Bklt90vVKMeD2BI6DOt4rZ/Gk7WyKFBi4fNPIAJY0joM61SCCZ9tI1o0OIB8D+DBIkYaJRbCBH9mZgNt+bb++ufSSF/eX8BYcDeAzuQJVUAAAAASUVORK5CYII="),define("text!cockpit/ui/images/pinout.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAC7mlDQ1BJQ0MgUHJvZmlsZQAAeAGFVM9rE0EU/jZuqdAiCFprDrJ4kCJJWatoRdQ2/RFiawzbH7ZFkGQzSdZuNuvuJrWliOTi0SreRe2hB/+AHnrwZC9KhVpFKN6rKGKhFy3xzW5MtqXqwM5+8943731vdt8ADXLSNPWABOQNx1KiEWlsfEJq/IgAjqIJQTQlVdvsTiQGQYNz+Xvn2HoPgVtWw3v7d7J3rZrStpoHhP1A4Eea2Sqw7xdxClkSAog836Epx3QI3+PY8uyPOU55eMG1Dys9xFkifEA1Lc5/TbhTzSXTQINIOJT1cVI+nNeLlNcdB2luZsbIEL1PkKa7zO6rYqGcTvYOkL2d9H5Os94+wiHCCxmtP0a4jZ71jNU/4mHhpObEhj0cGDX0+GAVtxqp+DXCFF8QTSeiVHHZLg3xmK79VvJKgnCQOMpkYYBzWkhP10xu+LqHBX0m1xOv4ndWUeF5jxNn3tTd70XaAq8wDh0MGgyaDUhQEEUEYZiwUECGPBoxNLJyPyOrBhuTezJ1JGq7dGJEsUF7Ntw9t1Gk3Tz+KCJxlEO1CJL8Qf4qr8lP5Xn5y1yw2Fb3lK2bmrry4DvF5Zm5Gh7X08jjc01efJXUdpNXR5aseXq8muwaP+xXlzHmgjWPxHOw+/EtX5XMlymMFMXjVfPqS4R1WjE3359sfzs94i7PLrXWc62JizdWm5dn/WpI++6qvJPmVflPXvXx/GfNxGPiKTEmdornIYmXxS7xkthLqwviYG3HCJ2VhinSbZH6JNVgYJq89S9dP1t4vUZ/DPVRlBnM0lSJ93/CKmQ0nbkOb/qP28f8F+T3iuefKAIvbODImbptU3HvEKFlpW5zrgIXv9F98LZua6N+OPwEWDyrFq1SNZ8gvAEcdod6HugpmNOWls05Uocsn5O66cpiUsxQ20NSUtcl12VLFrOZVWLpdtiZ0x1uHKE5QvfEp0plk/qv8RGw/bBS+fmsUtl+ThrWgZf6b8C8/UXAeIuJAAAACXBIWXMAAAsTAAALEwEAmpwYAAACyUlEQVQ4EW1TXUgUURQ+Z3ZmnVV3QV2xJbVSEIowQbAfLQx8McLoYX2qjB58MRSkP3vZppceYhGxgrZaIughlYpE7CHFWiiKyj9II0qxWmwlNh1Xtp2f27mz7GDlZX7uuXO+73zfuXeQMQYIgAyALppgyBtse32stsw86txkHhATn+FbfPfzxnPB+vR3RMJYuTwW6bbB4a6WS5O3Yu2VlXIesDiAamiQNKVlVXfx5I0GJ7DY7p0/+erU4dgeMJIA31WNxZmAgibOreXDqF55sY4SFUURqbi+nkjgwTyAbHhLX8yOLsSM2QRA3JRAAgd4RGPbVhkKEp8qeJ7PFyW3fw++YHtC7CkaD0amqyqihSwlMQQ0wa07IjPVI/vbexreIUrVaQV2D4RMQ/o7m12Mdfx4H3PfB9FNzTR1U2cO0Bi45aV6xNvFBNaoIAfbSiwLlqi9/hR/R3Nrhua+Oqi9TEKiB02C7YXz+Pba4MTDrpbLiMAxNgmXb+HpwVkZdoIrkn9isW7nRw/TZYaagZArAWyhfqsSDL/c9aTx7JUjGZCtYExRqCzAwGblwr6aFQ84nTo6qZ7XCeCVQNckE/KSWolvoQnxeoFFgIh8G/nA+kBAxxuQO5m9eFrwLIGJHgcyM63VFMhRSgNVyJr7og8y1vbTQpH8DIEVgxuYuexw0QECIalq5FYgEmpkgoFYltU/lnrqDz5osirSFpF7lrHAFKSWHYfEs+mY/82UnAStyMlW8sUPsVIciTZgz3jV1ebg0CEOpgPF22s1z1YQYKSXPJ1hbAhR8T26WdLhkuVfAzPR+YO1Ox5n58SmCcF6e3uzAoHA77RkevJdWH/3+f2O9TGf3w3fWQ2Hw5F/13mcsWAT+vv6DK4kFApJ/d3d1k+kJtbCrmxXHS3n8ER6b3CQbAqaEHVra6sGxcXW4SovLx+empxapS//FfwD9kpMJjMMBBAAAAAASUVORK5CYII="),define("text!cockpit/ui/images/pins.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAQCAYAAABQrvyxAAAACXBIWXMAAAsTAAALEwEAmpwYAAAGYklEQVRIDbVWe0yURxCf/R735o6DO0FBe0RFsaL4iLXGIKa2SY3P6JGa2GpjlJjUV9NosbU++tYUbEnaQIrVaKJBG7WiNFQFUWO1UUEsVg2CAgoeHHLewcH32O58cBdQsX9Y5+7LfrszOzO/2ZnZj1BKgTBiIwVGVvKd49OVVYunDlXn6wdBKh+ogXrv+DOz1melIb+3LM5fNv2XPYE5EHY+L3PJljN5zavHpJjsQNsA/JJEgyC2+WTjy3b0GfoJW8O4aoHtDwiHQrj5lw1LLyyb1bp5zAjJTus9klrVpdD6TqH2ngVO+0dsRJnp06cLIYU4fx7NnRI3bu7UIYOeJ/McnuY88q3k62gc0S4Dgf5qhICQtIXS2lqD7BhSduPk3YfyzXaANhBBJDxYdUqCywB2qS4RdyUuSkTF/VJxcbH5j8N7/75RuFrN3Zh8OS8zqf5m4UpPeenOyP42dbtBeuvVnCdkK1e4PfPouX03mo9se+c33M8wqDk5Ofqed8REUTicQhbySUxp9u3KlMSHTtrFU6Kyn03lz15PPpW25vsZeYSIKyiVURcqeZJOH9lTNZLfnxRjU/uwrjbEUBWsapcSO2Hq4k0VfZg9EzxdDNCEjDxgNqRDme9umz/btwlsHRIEePHgAf73RdnHZ6LTuIUBN7OBQ+c1Fdnp6cZ1BQUdeRuWZi97o3ktDQQkVeFFzqJARd1A5a0Vr7ta6Kp6TZjtZ+NTIOoKF6qDrL7e0QQIUCiqMMKk8Z1Q/SCSKvzocf2B6NEN0SQn/kTO6fKJ0zqjZUlQBSpJ0GjR77w0aoc1Pr6S5/kVJrNpakV5hR+LWKN4t7sLX+p0rx2vqSta64olIulUKUgCSXLWE1R4KPPSj+5vhm2hdDOG+CkQBmhhyyKq6SaFYWTn5bB3QJRNz54AuXKn8TJjhu0Wbv+wNEKQjVhnmKopjo4FxXmetCRnC4F7BhCiCUepqAepRh0TM/gjjzOOSK2NgWZPc05qampRWJHb7dbOffep2ednzLzgczlbrQA6gHYF9BYDh9GY+FjddMweHMscmMuep07gXlMQoqw9ALoYu5MJsak9QmJA2IvAgVmoCRciooyPujJtNCv1uHt3TmK9gegFKrG9kh6oXwZiIEAtBIjORGKNTWR/WeW8XVkbjuJepLAyloM8LmTN//njKZPbraATZaLjCHEww9Ei4FFiPg6Ja5gT6gxYgLgnRDHRQwJXbz2GOw0d4A3K4GXlUtMahJjYVxiYbrwOmxIS10bFnIBOSi6Tl9Jgs0zbOEX18wyEwgLPMrxD1Y4aCK8kmTpgYcpAF27Mzs42Hjx4kA8BICUlJfKArR7LcEvTB1xEC9AoEw9OPagWkVU/D1oesmK6U911zEczMVe01oZjiMggg6ux2Qk379qh4rYKet4GjrhhwEteBgBrH8BssoXEtbHzPpSBRRSpqlNpgAiUoxzHKxLRszoVuggIisxaDQWZqkQvQjAoax3NbDbLLGuUEABNGedXqSyLRupXgDT5JfAGZNLio9B0X8Uiwk4w77MDc1D4yejjWtykPS3DX01UDCY/GPQcVDe0QYT0CIxGFvUorfvBxZsRfVrUuWruMBAb/lXCUofoFNZfzGJtowXOX0vwUSFK4BgyMKm6P6s9wQUZld+jrYyMDC0iIQDaJdG4IyZQfL3RfbFcCBIlRgc+u3CjaTApuZ9KsANgG8PNzHlWWD3tCxd6kafNNiFp5HAalAkkJ0SCV2H3CgOD9Nc/FqrXuyb0Eocvfhq171p5eyuJ1omKJEP5rQGe/FOOnXtq335z8YmvYo9cHb2t8spIb3lVSseZW46FlGY/Sk9P50P2w20UlWJUkUHIushfc5PXGAzCo0PlD2pnpCYfCXga3lu+fPlevEhWrVrFyrN/Orfv87FOW9tlqb2Kc9pV8DzioMk3UNUbXM+8B/ATBr8C8CKdvGXWGD/9sqm3dkxtzA4McMjHMB8D2ftheYXo+qzt3pXvz8/PP/vk+v8537V+yYW87Zu+RZ1ZbrexoKAA/SBpaWn4+aL5w5zGk+/jW59JiMkESW5urpiVlWXENRb1H/Yf2I9txIxz5IdkX3TsraukpsbQjz6090yb4XsAvQoRE0YvJdamtIIbOnRoUVlZ2ftsLVQzIdEXHntsaZdimssVfCpFui109+BnWPsXaWLI/zactygAAAAASUVORK5CYII="),define("text!cockpit/ui/images/plus.png",[],"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAAfSC3RAAAAAXNSR0IArs4c6QAAAAZiS0dEANIA0gDS7KbF4AAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9kFGw4yFTwuJTkAAAH7SURBVCjPdZKxa1NRFMZ/956XZMgFyyMlCZRA4hBx6lBcQ00GoYi4tEstFPwLAs7iLDi7FWuHThaUggihBDI5OWRoQAmBQFISQgvvpbwX3rsOaR4K+o2H8zvfOZxPWWtZqVarGaAJPAEe3ZW/A1+Bd+1221v1qhW4vb1dA44mk0nZ8zyCIAAgk8lgjGF9fb0PHF5cXLQTsF6vP/c879P19TVBEJDJZBARAKIoSmpra2sYY561Wq3PqtFouMBgMBgYay3ZbJZ/yfd9tNaUSqUboOKISPPq6sqsVvZ9H4AvL34B8PTj/QSO45jpdHovn883Ha31znw+JwzDpCEMQx4UloM8zyOdTif3zudztNY7jog8DMMQpRRxHPPt5TCBAEZvxlyOFTsfykRRBICIlB2t9a21Nh3HMXEc8+d7VhJHWCwWyzcohdZaHBHpO46z6fs+IsLj94XECaD4unCHL8FsNouI/HRE5Nx13c3ZbIbWOnG5HKtl+53TSq7rIiLnand31wUGnU7HjEYjlFLJZN/3yRnL1FMYY8jlcmxtbd0AFel2u7dnZ2eXxpi9xWJBEASkUimstYgIQSSkUimKxSKVSgVjzN7p6emPJHL7+/s14KjX65WHwyGz2SxZbWNjg2q12gcOT05O2n9lFeDg4MAAr/4T8rfHx8dJyH8DvvbYGzKvWukAAAAASUVORK5CYII="),define("text!cockpit/ui/images/throbber.gif",[],"data:image/gif;base64,R0lGODlh3AATAPQAAP///wAAAL6+vqamppycnLi4uLKyssjIyNjY2MTExNTU1Nzc3ODg4OTk5LCwsLy8vOjo6Ozs7MrKyvLy8vT09M7Ozvb29sbGxtDQ0O7u7tbW1sLCwqqqqvj4+KCgoJaWliH/C05FVFNDQVBFMi4wAwEAAAAh/hpDcmVhdGVkIHdpdGggYWpheGxvYWQuaW5mbwAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFg8PwKIMHnLF63N2438f0mv1I2O8buXjvaOPtaHx7fn96goR4hmuId4qDdX95c4+RG4GCBoyAjpmQhZN0YGYFXitdZBIVGAoKoq4CG6Qaswi1CBtkcG6ytrYJubq8vbfAcMK9v7q7D8O1ycrHvsW6zcTKsczNz8HZw9vG3cjTsMIYqQgDLAQGCQoLDA0QCwUHqfYSFw/xEPz88/X38Onr14+Bp4ADCco7eC8hQYMAEe57yNCew4IVBU7EGNDiRn8Z831cGLHhSIgdE/9chIeBgDoB7gjaWUWTlYAFE3LqzDCTlc9WOHfm7PkTqNCh54rePDqB6M+lR536hCpUqs2gVZM+xbrTqtGoWqdy1emValeXKwgcWABB5y1acFNZmEvXwoJ2cGfJrTv3bl69Ffj2xZt3L1+/fw3XRVw4sGDGcR0fJhxZsF3KtBTThZxZ8mLMgC3fRatCLYMIFCzwLEprg84OsDus/tvqdezZf13Hvr2B9Szdu2X3pg18N+68xXn7rh1c+PLksI/Dhe6cuO3ow3NfV92bdArTqC2Ebc3A8vjf5QWf15Bg7Nz17c2fj69+fnq+8N2Lty+fuP78/eV2X13neIcCeBRwxorbZrAxAJoCDHbgoG8RTshahQ9iSKEEzUmYIYfNWViUhheCGJyIP5E4oom7WWjgCeBBAJNv1DVV01MZdJhhjdkplWNzO/5oXI846njjVEIqR2OS2B1pE5PVscajkxhMycqLJgxQCwT40PjfAV4GqNSXYdZXJn5gSkmmmmJu1aZYb14V51do+pTOCmA00AqVB4hG5IJ9PvYnhIFOxmdqhpaI6GeHCtpooisuutmg+Eg62KOMKuqoTaXgicQWoIYq6qiklmoqFV0UoeqqrLbq6quwxirrrLTWauutJ4QAACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BAXHx/EoCzboAcdhcLDdgwJ6nua03YZ8PMFPoBMca215eg98G36IgYNvDgOGh4lqjHd7fXOTjYV9nItvhJaIfYF4jXuIf4CCbHmOBZySdoOtj5eja59wBmYFXitdHhwSFRgKxhobBgUPAmdoyxoI0tPJaM5+u9PaCQZzZ9gP2tPcdM7L4tLVznPn6OQb18nh6NV0fu3i5OvP8/nd1qjwaasHcIPAcf/gBSyAAMMwBANYEAhWYQGDBhAyLihwYJiEjx8fYMxIcsGDAxVA/yYIOZIkBAaGPIK8INJlRpgrPeasaRPmx5QgJfB0abLjz50tSeIM+pFmUo0nQQIV+vRlTJUSnNq0KlXCSq09ozIFexEBAYkeNiwgOaEtn2LFpGEQsKCtXbcSjOmVlqDuhAx3+eg1Jo3u37sZBA9GoMAw4MB5FyMwfLht4sh7G/utPGHlYAV8Nz9OnOBz4c2VFWem/Pivar0aKCP2LFn2XwhnVxBwsPbuBAQbEGiIFg1BggoWkidva5z4cL7IlStfkED48OIYoiufYIH68+cKPkqfnsB58ePjmZd3Dj199/XE20tv6/27XO3S6z9nPCz9BP3FISDefL/Bt192/uWmAv8BFzAQAQUWWFaaBgqA11hbHWTIXWIVXifNhRlq6FqF1sm1QQYhdiAhbNEYc2KKK1pXnAIvhrjhBh0KxxiINlqQAY4UXjdcjSJyeAx2G2BYJJD7NZQkjCPKuCORKnbAIXsuKhlhBxEomAIBBzgIYXIfHfmhAAyMR2ZkHk62gJoWlNlhi33ZJZ2cQiKTJoG05Wjcm3xith9dcOK5X51tLRenoHTuud2iMnaolp3KGXrdBo7eKYF5p/mXgJcogClmcgzAR5gCKymXYqlCgmacdhp2UCqL96mq4nuDBTmgBasaCFp4sHaQHHUsGvNRiiGyep1exyIra2mS7dprrtA5++z/Z8ZKYGuGsy6GqgTIDvupRGE+6CO0x3xI5Y2mOTkBjD4ySeGU79o44mcaSEClhglgsKyJ9S5ZTGY0Bnzrj+3SiKK9Rh5zjAALCywZBk/ayCWO3hYM5Y8Dn6qxxRFsgAGoJwwgDQRtYXAAragyQOmaLKNZKGaEuUlpyiub+ad/KtPqpntypvvnzR30DBtjMhNodK6Eqrl0zU0/GjTUgG43wdN6Ra2pAhGtAAZGE5Ta8TH6wknd2IytNKaiZ+Or79oR/tcvthIcAPe7DGAs9Edwk6r3qWoTaNzY2fb9HuHh2S343Hs1VIHhYtOt+Hh551rh24vP5YvXSGzh+eeghy76GuikU9FFEainrvrqrLfu+uuwxy777LTXfkIIACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BAWHB2l4CDZo9IDjcBja7UEhTV+3DXi3PJFA8xMcbHiDBgMPG31pgHBvg4Z9iYiBjYx7kWocb26OD398mI2EhoiegJlud4UFiZ5sm6Kdn2mBr5t7pJ9rlG0cHg5gXitdaxwFGArIGgoaGwYCZ3QFDwjU1AoIzdCQzdPV1c0bZ9vS3tUJBmjQaGXl1OB0feze1+faiBvk8wjnimn55e/o4OtWjp+4NPIKogsXjaA3g/fiGZBQAcEAFgQGOChgYEEDCCBBLihwQILJkxIe/3wMKfJBSQkJYJpUyRIkgwcVUJq8QLPmTYoyY6ZcyfJmTp08iYZc8MBkhZgxk9aEcPOlzp5FmwI9KdWn1qASurJkClRoWKwhq6IUqpJBAwQEMBYroAHkhLt3+RyzhgCDgAV48Wbgg+waAnoLMgTOm6DwQ8CLBzdGdvjw38V5JTg2lzhyTMeUEwBWHPgzZc4TSOM1bZia6LuqJxCmnOxv7NSsl1mGHHiw5tOuIWeAEHcFATwJME/ApgFBc3MVLEgPvE+Ddb4JokufPmFBAuvPXWu3MIF89wTOmxvOvp179evQtwf2nr6aApPyzVd3jn089e/8xdfeXe/xdZ9/d1ngHf98lbHH3V0LMrgPgsWpcFwBEFBgHmyNXWeYAgLc1UF5sG2wTHjIhNjBiIKZCN81GGyQwYq9uajeMiBOQGOLJ1KjTI40kmfBYNfc2NcGIpI4pI0vyrhjiT1WFqOOLEIZnjVOVpmajYfBiCSNLGbA5YdOkjdihSkQwIEEEWg4nQUmvYhYe+bFKaFodN5lp3rKvJYfnBKAJ+gGDMi3mmbwWYfng7IheuWihu5p32XcSWdSj+stkF95dp64jJ+RBipocHkCCp6PCiRQ6INookCAAwy0yd2CtNET3Yo7RvihBjFZAOaKDHT43DL4BQnsZMo8xx6uI1oQrHXXhHZrB28G62n/YSYxi+uzP2IrgbbHbiaer7hCiOxDFWhrbmGnLVuus5NFexhFuHLX6gkEECorlLpZo0CWJG4pLjIACykmBsp0eSSVeC15TDJeUhlkowlL+SWLNJpW2WEF87urXzNWSZ6JOEb7b8g1brZMjCg3ezBtWKKc4MvyEtwybPeaMAA1ECRoAQYHYLpbeYYCLfQ+mtL5c9CnfQpYpUtHOSejEgT9ogZ/GSqd0f2m+LR5WzOtHqlQX1pYwpC+WbXKqSYtpJ5Mt4a01lGzS3akF60AxkcTaLgAyRBPWCoDgHfJqwRuBuzdw/1ml3iCwTIeLUWJN0v4McMe7uasCTxseNWPSxc5RbvIgD7geZLbGrqCG3jepUmbbze63Y6fvjiOylbwOITPfIHEFsAHL/zwxBdvPBVdFKH88sw37/zz0Ecv/fTUV2/99SeEAAAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFh2cw8BQEm3T6yHEYHHD4oKCuD9qGvNsxT6QTgAkcHHmFeX11fm17hXwPG35qgnhxbwMPkXaLhgZ9gWp3bpyegX4DcG+inY+Qn6eclpiZkHh6epetgLSUcBxlD2csXXdvBQrHGgoaGhsGaIkFDwjTCArTzX+QadHU3c1ofpHc3dcGG89/4+TYktvS1NYI7OHu3fEJ5tpqBu/k+HX7+nXDB06SuoHm0KXhR65cQT8P3FRAMIAFgVMPwDCAwLHjggIHJIgceeFBg44eC/+ITCCBZYKSJ1FCWPBgpE2YMmc+qNCypwScMmnaXAkUJYOaFVyKLOqx5tCXJnMelcBzJNSYKIX2ZPkzqsyjPLku9Zr1QciVErYxaICAgEUOBRJIgzChbt0MLOPFwyBggV27eCUcmxZvg9+/dfPGo5bg8N/Ag61ZM4w4seDF1fpWhizZmoa+GSortgcaMWd/fkP/HY0MgWbTipVV++wY8GhvqSG4XUEgoYTKE+Qh0OCvggULiBckWEZ4Ggbjx5HXVc58IPQJ0idQJ66XanTpFraTe348+XLizRNcz658eHMN3rNPT+C+G/nodqk3t6a+fN3j+u0Xn3nVTQPfdRPspkL/b+dEIN8EeMm2GAYbTNABdrbJ1hyFFv5lQYTodSZABhc+loCEyhxTYYkZopdMMiNeiBxyIFajV4wYHpfBBspUl8yKHu6ooV5APsZjQxyyeNeJ3N1IYod38cgdPBUid6GCKfRWgAYU4IccSyHew8B3doGJHmMLkGkZcynKk2Z50Ym0zJzLbDCmfBbI6eIyCdyJmJmoqZmnBAXy9+Z/yOlZDZpwYihnj7IZpuYEevrYJ5mJEuqiof4l+NYDEXQpXQcMnNjZNDx1oGqJ4S2nF3EsqWrhqqVWl6JIslpAK5MaIqDeqjJq56qN1aTaQaPbHTPYr8Be6Gsyyh6Da7OkmmqP/7GyztdrNVQBm5+pgw3X7aoYKhfZosb6hyUKBHCgQKij1rghkOAJuZg1SeYIIY+nIpDvf/sqm4yNG5CY64f87qdAwSXKGqFkhPH1ZHb2EgYtw3bpKGVkPz5pJAav+gukjB1UHE/HLNJobWcSX8jiuicMMBFd2OmKwQFs2tjXpDfnPE1j30V3c7iRHlrzBD2HONzODyZtsQJMI4r0AUNaE3XNHQw95c9GC001MpIxDacFQ+ulTNTZlU3O1eWVHa6vb/pnQUUrgHHSBKIuwG+bCPyEqbAg25gMVV1iOB/IGh5YOKLKIQ6xBAcUHmzjIcIqgajZ+Ro42DcvXl7j0U4WOUd+2IGu7DWjI1pt4DYq8BPm0entuGSQY/4tBi9Ss0HqfwngBQtHbCH88MQXb/zxyFfRRRHMN+/889BHL/301Fdv/fXYZ39CCAAh+QQJCgAAACwAAAAA3AATAAAF/yAgjmRpnmiqrmzrvnAsz3Rt33iu73zv/8CgcEgECAaEpHLJbDqf0Kh0Sq1ar9isdjoQtAQFh2fAKXsKm7R6Q+Y43vABep0mGwwOPH7w2CT+gHZ3d3lyagl+CQNvg4yGh36LcHoGfHR/ZYOElQ9/a4ocmoRygIiRk5p8pYmZjXePaYBujHoOqp5qZHBlHAUFXitddg8PBg8KGsgayxvGkAkFDwgICtPTzX2mftHW3QnOpojG3dbYkNjk1waxsdDS1N7ga9zw1t/aifTk35fu6Qj3numL14fOuHTNECHqU4DDgQEsCCwidiHBAwYQMmpcUOCAhI8gJVzUuLGThAQnP/9abEAyI4MCIVOKZNnyJUqUJxNcGNlywYOQgHZirGkSJ8gHNEky+AkS58qWEJYC/bMzacmbQHkqNdlUJ1KoSz2i9COhmQYCEXtVrCBgwYS3cCf8qTcNQ9u4cFFOq2bPLV65Cf7dxZthbjW+CgbjnWtNgWPFcAsHdoxgWWK/iyV045sAc2S96SDn1exYw17REwpLQEYt2eW/qtPZRQAB7QoC61RW+GsBwYZ/CXb/XRCYLsAKFizEtUAc+G7lcZsjroscOvTmsoUvx15PwccJ0N8yL17N9PG/E7jv9S4hOV7pdIPDdZ+ePDzv2qMXn2b5+wTbKuAWnF3oZbABZY0lVmD/ApQd9thybxno2GGuCVDggaUpoyBsB1bGGgIYbJCBcuFJiOAyGohIInQSmmdeiBnMF2GHfNUlIoc1rncjYRjW6NgGf3VQGILWwNjBfxEZcAFbC7gHXQcfUYOYdwzQNxo5yUhQZXhvRYlMeVSuSOJHKJa5AQMQThBlZWZ6Bp4Fa1qzTAJbijcBlJrtxeaZ4lnnpZwpukWieGQmYx5ATXIplwTL8DdNZ07CtWYybNIJF4Ap4NZHe0920AEDk035kafieQrqXofK5ympn5JHKYjPrfoWcR8WWQGp4Ul32KPVgXdnqxM6OKqspjIYrGPDrlrsZtRIcOuR86nHFwbPvmes/6PH4frrqbvySh+mKGhaAARPzjjdhCramdoGGOhp44i+zogBkSDuWC5KlE4r4pHJkarXrj++Raq5iLmWLlxHBteavjG+6amJrUkJJI4Ro5sBv9AaOK+jAau77sbH7nspCwNIYIACffL7J4JtWQnen421nNzMcB6AqpRa9klonmBSiR4GNi+cJZpvwgX0ejj71W9yR+eIgaVvQgf0l/A8nWjUFhwtZYWC4hVnkZ3p/PJqNQ5NnwUQrQCGBBBMQIGTtL7abK+5JjAv1fi9bS0GLlJHgdjEgYzzARTwC1fgEWdJuKKBZzj331Y23qB3i9v5aY/rSUC4w7PaLeWXmr9NszMFoN79eeiM232o33EJAIzaSGwh++y012777bhT0UURvPfu++/ABy/88MQXb/zxyCd/QggAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEBY5nwCk7xIWNer0hO95wziC9Ttg5b4ND/+Y87IBqZAaEe29zGwmJigmDfHoGiImTjXiQhJEPdYyWhXwDmpuVmHwOoHZqjI6kZ3+MqhyemJKAdo6Ge3OKbEd4ZRwFBV4rc4MPrgYPChrMzAgbyZSJBcoI1tfQoYsJydfe2amT3d7W0OGp1OTl0YtqyQrq0Lt11PDk3KGoG+nxBpvTD9QhwCctm0BzbOyMIwdOUwEDEgawIOCB2oMLgB4wgMCx44IHBySIHClBY0ePfyT/JCB5weRJCAwejFw58kGDlzBTqqTZcuPLmCIBiWx58+VHmiRLFj0JVCVLl0xl7qSZwCbOo0lFWv0pdefQrVFDJtr5gMBEYBgxqBWwYILbtxPsqMPAFu7blfa81bUbN4HAvXAzyLWnoDBguHIRFF6m4LBbwQngMYPXuC3fldbyPrMcGLM3w5wRS1iWWUNlvnElKDZtz/EEwaqvYahQoexEfyILi4RrYYKFZwJ3810QWZ2ECrx9Ew+O3K6F5Yq9zXbb+y30a7olJJ+wnLC16W97Py+uwdtx1NcLWzs/3G9e07stVPc9kHJ0BcLtQp+c3ewKAgYkUAFpCaAmmHqKLSYA/18WHEiZPRhsQF1nlLFWmIR8ZbDBYs0YZuCGpGXWmG92aWiPMwhEOOEEHXRwIALlwXjhio+BeE15IzpnInaLbZBBhhti9x2GbnVQo2Y9ZuCfCgBeMCB+DJDIolt4iVhOaNSJdCOBUfIlkmkyMpPAAvKJ59aXzTQzJo0WoJnmQF36Jp6W1qC4gWW9GZladCiyJd+KnsHImgRRVjfnaDEKuiZvbcYWo5htzefbl5LFWNeSKQAo1QXasdhiiwwUl2B21H3aQaghXnPcp1NagCqYslXAqnV+zYWcpNwVp9l5eepJnHqL4SdBi56CGlmw2Zn6aaiZjZqfb8Y2m+Cz1O0n3f+tnvrGbF6kToApCgAWoNWPeh754JA0vmajiAr4iOuOW7abQXVGNriBWoRdOK8FxNqLwX3oluubhv8yluRbegqGb536ykesuoXhyJqPQJIGbLvQhkcwjKs1zBvBwSZIsbcsDCCBAAf4ya+UEhyQoIiEJtfoZ7oxUOafE2BwgMWMqUydfC1LVtiArk0QtGkWEopzlqM9aJrKHfw5c6wKjFkmXDrbhwFockodtMGFLWpXy9JdiXN1ZDNszV4WSLQCGBKoQYHUyonqrHa4ErewAgMmcAAF7f2baIoVzC2p3gUvJtLcvIWqloy6/R04mIpLwDhciI8qLOB5yud44pHPLbA83hFDWPjNbuk9KnySN57Av+TMBvgEAgzzNhJb5K777rz37vvvVHRRxPDEF2/88cgnr/zyzDfv/PPQnxACACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BIUCwcMpO84OT2HDbm8GHLQjnn6wE3g83SA3DB55G3llfHxnfnZ4gglvew6Gf4ySgmYGlpCJknochWiId3kJcZZyDn93i6KPl4eniopwq6SIoZKxhpenbhtHZRxhXisDopwPgHkGDxrLGgjLG8mC0gkFDwjX2AgJ0bXJ2djbgNJsAtbfCNB2oOnn6MmKbeXt226K1fMGi6j359D69ua+QZskjd+3cOvY9XNgp4ABCQNYEDBl7EIeCQkeMIDAseOCBwckiBSZ4ILGjh4B/40kaXIjSggMHmBcifHky5gYE6zM2OAlzGM6Z5rs+fIjTZ0tfcYMSlLCUJ8fL47kCVXmTjwPiKJkUCDnyqc3CxzQmYeAxAEGLGJYiwCDgAUT4sqdgOebArdw507IUNfuW71xdZ7DC5iuhGsKErf9CxhPYgUaEhPWyzfBMgUIJDPW6zhb5M1y+R5GjFkBaLmCM0dOfHqvztXYJnMejaFCBQlmVxAYsEGkYnQV4lqYMNyCtnYSggNekAC58uJxmTufW5w55mwKkg+nLp105uTC53a/nhg88fMTmDfDVl65Xum/IZt/3/zaag3a5W63nll1dvfiWbaaZLmpQIABCVQA2f9lAhTG112PQWYadXE9+FtmEwKWwQYQJrZagxomsOCAGVImInsSbpCBhhwug6KKcXXQQYUcYuDMggrASFmNzjjzzIrh7cUhhhHqONeGpSEW2QYxHsmjhxpgUGAKB16g4IIbMNCkXMlhaJ8GWVJo2I3NyKclYF1GxgyYDEAnXHJrMpNAm/rFBSczPiYAlwXF8ZnmesvoOdyMbx7m4o0S5LWdn4bex2Z4xYmEzaEb5EUcnxbA+WWglqIn6aHPTInCgVbdlZyMqMrIQHMRSiaBBakS1903p04w434n0loBoQFOt1yu2YAnY68RXiNsqh2s2qqxuyKb7Imtmgcrqsp6h8D/fMSpapldx55nwayK/SfqCQd2hcFdAgDp5GMvqhvakF4mZuS710WGIYy30khekRkMu92GNu6bo7r/ttjqwLaua5+HOdrKq5Cl3dcwi+xKiLBwwwom4b0E6xvuYyqOa8IAEghwQAV45VvovpkxBl2mo0W7AKbCZXoAhgMmWnOkEqx2JX5nUufbgJHpXCfMOGu2QAd8eitpW1eaNrNeMGN27mNz0swziYnpSbXN19gYtstzfXrdYjNHtAIYGFVwwAEvR1dfxdjKxVzAP0twAAW/ir2w3nzTd3W4yQWO3t0DfleB4XYnEHCEhffdKgaA29p0eo4fHLng9qoG+OVyXz0gMeWGY7qq3xhiRIEAwayNxBawxy777LTXbjsVXRSh++689+7778AHL/zwxBdv/PEnhAAAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEhYLD4BlwHGg0ubBpuzdm9Dk9eCTu+MTZkDb4PXYbeIIcHHxqf4F3gnqGY2kOdQmCjHCGfpCSjHhmh2N+knmEkJmKg3uHfgaaeY2qn6t2i4t7sKAPbwIJD2VhXisDCQZgDrKDBQ8aGgjKyhvDlJMJyAjV1gjCunkP1NfVwpRtk93e2ZVt5NfCk27jD97f0LPP7/Dr4pTp1veLgvrx7AL+Q/BM25uBegoYkDCABYFhEobhkUBRwoMGEDJqXPDgQMUEFC9c1LjxQUUJICX/iMRIEgIDkycrjmzJMSXFlDNJvkwJsmdOjQwKfDz5M+PLoSGLQqgZU6XSoB/voHxawGbFlS2XGktAwKEADB0xiEWAodqGBRPSqp1wx5qCamDRrp2Qoa3bagLkzrULF4GCvHPTglRAmKxZvWsHayBcliDitHUlvGWM97FgCdYWVw4c2e/kw4HZJlCwmDBhwHPrjraGYTHqtaoxVKggoesKAgd2SX5rbUMFCxOAC8cGDwHFwBYWJCgu4XfwtcqZV0grPHj0u2SnqwU+IXph3rK5b1fOu7Bx5+K7L6/2/Xhg8uyXnQ8dvfRiDe7TwyfNuzlybKYpgIFtKhAgwEKkKcOf/wChZbBBgMucRh1so5XH3wbI1WXafRJy9iCErmX4IWHNaIAhZ6uxBxeGHXQA24P3yYfBBhmgSBozESpwongWOBhggn/N1aKG8a1YY2oVAklgCgQUUwGJ8iXAgItrWUARbwpqIOWEal0ZoYJbzmWlZCWSlsAC6VkwZonNbMAAl5cpg+NiZwpnJ0Xylegmlc+tWY1mjnGnZnB4QukMA9UJRxGOf5r4ppqDjjmnfKilh2ejGiyJAgF1XNmYbC2GmhZ5AcJVgajcXecNqM9Rx8B6bingnlotviqdkB3YCg+rtOaapFsUhSrsq6axJ6sEwoZK7I/HWpCsr57FBxJ1w8LqV/81zbkoXK3LfVeNpic0KRQG4NHoIW/XEmZuaiN6tti62/moWbk18uhjqerWS6GFpe2YVotskVssWfBOAHACrZHoWcGQwQhlvmsdXBZ/F9YLMF2jzUuYBP4a7CLCnoEHrgkDSCDAARUILAGaVVqAwQHR8pZXomm9/ONhgjrbgc2lyYxmpIRK9uSNjrXs8gEbTrYyl2ryTJmsLCdKkWzFQl1lWlOXGmifal6p9VnbQfpyY2SZyXKVV7JmZkMrgIFSyrIeUJ2r7YKnXdivUg1kAgdQ8B7IzJjGsd9zKSdwyBL03WpwDGxwuOASEP5vriO2F3nLjQdIrpaRDxqcBdgIHGA74pKrZXiR2ZWuZt49m+o3pKMC3p4Av7SNxBa456777rz37jsVXRQh/PDEF2/88cgnr/zyzDfv/PMnhAAAIfkECQoAAAAsAAAAANwAEwAABf8gII5kaZ5oqq5s675wLM90bd94ru987//AoHBIBAgGhKRyyWw6n9CodEqtWq/YrHY6ELQEhYLDUPAMHGi0weEpbN7wI8cxTzsGj4R+n+DUxwaBeBt7hH1/gYIPhox+Y3Z3iwmGk36BkIN8egOIl3h8hBuOkAaZhQlna4BrpnyWa4mleZOFjrGKcXoFA2ReKwMJBgISDw6abwUPGggazc0bBqG0G8kI1tcIwZp51djW2nC03d7BjG8J49jl4cgP3t/RetLp1+vT6O7v5fKhAvnk0UKFogeP3zmCCIoZkDCABQFhChQYuKBHgkUJkxpA2MhxQYEDFhNcvPBAI8eNCx7/gMQYckPJkxsZPLhIM8FLmDJrYiRp8mTKkCwT8IQJwSPQkENhpgQpEunNkzlpWkwKdSbGihKocowqVSvKWQkIOBSgQOYFDBgQpI0oYMGEt3AzTLKm4BqGtnDjirxW95vbvG/nWlub8G9euRsiqqWLF/AEkRoiprX2wLDeDQgkW9PQGLDgyNc665WguK8C0XAnRY6oGPUEuRLsgk5g+a3cCxUqSBC7gsCBBXcVq6swwULx4hayvctGPK8FCwsSLE9A3Hje6NOrHzeOnW695sffRi/9HfDz7sIVSNB+XXrmugo0rHcM3X388o6jr44ceb51uNjF1xcC8zk3wXiS8aYC/wESaLABBs7ch0ECjr2WAGvLsLZBeHqVFl9kGxooV0T81TVhBo6NiOEyJ4p4IYnNRBQiYCN6x4wCG3ZAY2If8jXjYRcyk2FmG/5nXAY8wqhWAii+1YGOSGLoY4VRfqiAgikwmIeS1gjAgHkWYLQZf9m49V9gDWYWY5nmTYCRM2TS5pxxb8IZGV5nhplmhJyZadxzbrpnZ2d/6rnZgHIid5xIMDaDgJfbLdrgMkKW+Rygz1kEZz1mehabkBpgiQIByVikwGTqVfDkk2/Vxxqiqur4X3fksHccre8xlxerDLiHjQIVUAgXr77yFeyuOvYqXGbMrbrqBMqaFpFFzhL7qv9i1FX7ZLR0LUNdcc4e6Cus263KbV+inkAAHhJg0BeITR6WmHcaxhvXg/AJiKO9R77ILF1FwmVdAu6WBu+ZFua72mkZWMfqBElKu0G8rFZ5n4ATp5jkmvsOq+Nj7u63ZMMPv4bveyYy6fDH+C6brgnACHBABQUrkGirz2FwAHnM4Mmhzq9yijOrOi/MKabH6VwBiYwZdukEQAvILKTWXVq0ZvH5/CfUM7M29Zetthp1eht0eqkFYw8IKXKA6mzXfTeH7fZg9zW0AhgY0TwthUa6Ch9dBeIsbsFrYkRBfgTfiG0FhwMWnbsoq3cABUYOnu/ejU/A6uNeT8u4wMb1WnBCyJJTLjjnr8o3OeJrUcpc5oCiPqAEkz8tXuLkPeDL3Uhs4fvvwAcv/PDEU9FFEcgnr/zyzDfv/PPQRy/99NRXf0IIACH5BAkKAAAALAAAAADcABMAAAX/ICCOZGmeaKqubOu+cCzPdG3feK7vfO//wKBwSAQIBoSkcslsOp/QqHRKrVqv2Kx2OhC0BIWCw/AoDziOtCHt8BQ28PjmzK57Hom8fo42+P8DeAkbeYQcfX9+gYOFg4d1bIGEjQmPbICClI9/YwaLjHAJdJeKmZOViGtpn3qOqZineoeJgG8CeWUbBV4rAwkGAhIVGL97hGACGsrKCAgbBoTRhLvN1c3PepnU1s2/oZO6AtzdBoPf4eMI3tIJyOnF0YwFD+nY8e3z7+Xfefnj9uz8cVsXCh89axgk7BrAggAwBQsYIChwQILFixIeNIDAseOCBwcSXMy2sSPHjxJE/6a0eEGjSY4MQGK86PIlypUJEmYsaTKmyJ8JW/Ls6HMkzaEn8YwMWtPkx4pGd76E4DMPRqFTY860OGhogwYagBFoKEABA46DEGBAoEBB0AUT4sqdIFKBNbcC4M6dkEEk22oYFOTdG9fvWrtsBxM23MytYL17666t9phwXwlum2lIDHmuSA2IGyuOLOHv38qLMbdFjHruZbWgRXeOe1nC2BUEDiyAMMHZuwoTLAQX3nvDOAUW5Vogru434d4JnAsnPmFB9NBshQXfa9104+Rxl8e13rZxN+CEydtVsFkd+vDjE7C/q52wOvb4s7+faz025frbxefWbSoQIAEDEUCwgf9j7bUlwHN9ZVaegxDK1xYzFMJH24L5saXABhlYxiEzHoKoIV8LYqAMaw9aZqFmJUK4YHuNfRjiXhmk+NcyJgaIolvM8BhiBx3IleN8lH1IWAcRgkZgCgYiaBGJojGgHHFTgtagAFYSZhF7/qnTpY+faVlNAnqJN0EHWa6ozAZjBtgmmBokwMB01LW5jAZwbqfmlNips4B4eOqJgDJ2+imXRZpthuigeC6XZTWIxilXmRo8iYKBCwiWmWkJVEAkfB0w8KI1IvlIpKnOkVpqdB5+h96o8d3lFnijrgprjbfGRSt0lH0nAZG5vsprWxYRW6Suq4UWqrLEsspWg8Io6yv/q6EhK0Fw0GLbjKYn5CZYBYht1laPrnEY67kyrhYbuyceiR28Pso7bYwiXjihjWsWuWF5p/H765HmNoiur3RJsGKNG/jq748XMrwmjhwCfO6QD9v7LQsDxPTAMKsFpthyJCdkmgYiw0VdXF/Om9dyv7YMWGXTLYpZg5wNR11C78oW3p8HSGgul4qyrJppgllJHJZHn0Y0yUwDXCXUNquFZNLKyYXBAVZvxtAKYIQEsmPgDacr0tltO1y/DMwYpkgUpJfTasLGzd3cdCN3gN3UWRcY3epIEPevfq+3njBxq/kqBoGBduvea8f393zICS63ivRBTqgFpgaWZEIUULdcK+frIfAAL2AjscXqrLfu+uuwx05FF0XUbvvtuOeu++689+7778AHL/wJIQAAOwAAAAAAAAAAAA==") \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/keybinding-emacs.js b/src/bb-modules/Filemanager/src/ace/keybinding-emacs.js new file mode 100644 index 000000000..5c99b14f0 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/keybinding-emacs.js @@ -0,0 +1 @@ +define("ace/keyboard/keybinding/emacs",["require","exports","module","ace/keyboard/state_handler"],function(a,b,c){var d=a("ace/keyboard/state_handler").StateHandler,e=a("ace/keyboard/state_handler").matchCharacterOnly,f={start:[{key:"ctrl-x",then:"c-x"},{regex:["(?:command-([0-9]*))*","(down|ctrl-n)"],exec:"golinedown",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(right|ctrl-f)"],exec:"gotoright",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(up|ctrl-p)"],exec:"golineup",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{regex:["(?:command-([0-9]*))*","(left|ctrl-b)"],exec:"gotoleft",params:[{name:"times",match:1,type:"number",defaultValue:1}]},{comment:"This binding matches all printable characters except numbers as long as they are no numbers and print them n times.",regex:["(?:command-([0-9]*))","([^0-9]+)*"],match:e,exec:"inserttext",params:[{name:"times",match:1,type:"number",defaultValue:"1"},{name:"text",match:2}]},{comment:"This binding matches numbers as long as there is no meta_number in the buffer.",regex:["(command-[0-9]*)*","([0-9]+)"],match:e,disallowMatches:[1],exec:"inserttext",params:[{name:"text",match:2,type:"text"}]},{regex:["command-([0-9]*)","(command-[0-9]|[0-9])"],comment:"Stops execution if the regex /meta_[0-9]+/ matches to avoid resetting the buffer."}],"c-x":[{key:"ctrl-g",then:"start"},{key:"ctrl-s",exec:"save",then:"start"}]};b.Emacs=new d(f)}),define("ace/keyboard/state_handler",["require","exports","module"],function(a,b,c){function e(a){this.keymapping=this.$buildKeymappingRegex(a)}var d=!1;e.prototype={$buildKeymappingRegex:function(a){for(state in a)this.$buildBindingsRegex(a[state]);return a},$buildBindingsRegex:function(a){a.forEach(function(a){a.key?a.key=new RegExp("^"+a.key+"$"):Array.isArray(a.regex)?(a.key=new RegExp("^"+a.regex[1]+"$"),a.regex=new RegExp(a.regex.join("")+"$")):a.regex&&(a.regex=new RegExp(a.regex+"$"))})},$composeBuffer:function(a,b,c){if(a.state==null||a.buffer==null)a.state="start",a.buffer="";var d=[];b&1&&d.push("ctrl"),b&8&&d.push("command"),b&2&&d.push("option"),b&4&&d.push("shift"),c&&d.push(c);var e=d.join("-"),f=a.buffer+e;b!=2&&(a.buffer=f);return{bufferToUse:f,symbolicName:e}},$find:function(a,b,c,e,f){var g={};this.keymapping[a.state].some(function(h){var i;if(h.key&&!h.key.test(c))return!1;if(h.regex&&!(i=h.regex.exec(b)))return!1;if(h.match&&!h.match(b,e,f,c))return!1;if(h.disallowMatches)for(var j=0;j"},{token:"keyword",regex:"(?:#include|#pragma|#line|#define|#undef|#ifdef|#else|#elif|#endif|#ifndef)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.c_cppHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return!1;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}return!1}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}"){e.end.column++;return e}}return!1}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}return!1}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")"){e.end.column++;return e}}return!1}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return!1;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;of.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-clojure.js b/src/bb-modules/Filemanager/src/ace/mode-clojure.js new file mode 100644 index 000000000..726de0c2b --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-clojure.js @@ -0,0 +1 @@ +define("ace/mode/clojure",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/clojure_highlight_rules","ace/mode/matching_parens_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/clojure_highlight_rules").ClojureHighlightRules,h=a("ace/mode/matching_parens_outdent").MatchingParensOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,";")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=d,f=this.$tokenizer.getLineTokens(b,a),g=f.tokens,h=f.state;if(g.length&&g[g.length-1].type=="comment")return d;if(a=="start"){var i=b.match(/[\(\[]/);i&&(d+=" "),i=b.match(/[\)]/),i&&(d="")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/clojure_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("* *1 *2 *3 *agent* *allow-unresolved-vars* *assert* *clojure-version* *command-line-args* *compile-files* *compile-path* *e *err* *file* *flush-on-newline* *in* *macro-meta* *math-context* *ns* *out* *print-dup* *print-length* *print-level* *print-meta* *print-readably* *read-eval* *source-path* *use-context-classloader* *warn-on-reflection* + - -> -> ->> ->> .. / < < <= <= = == > > >= >= accessor aclone add-classpath add-watch agent agent-errors aget alength alias all-ns alter alter-meta! alter-var-root amap ancestors and apply areduce array-map aset aset-boolean aset-byte aset-char aset-double aset-float aset-int aset-long aset-short assert assoc assoc! assoc-in associative? atom await await-for await1 bases bean bigdec bigint binding bit-and bit-and-not bit-clear bit-flip bit-not bit-or bit-set bit-shift-left bit-shift-right bit-test bit-xor boolean boolean-array booleans bound-fn bound-fn* butlast byte byte-array bytes cast char char-array char-escape-string char-name-string char? chars chunk chunk-append chunk-buffer chunk-cons chunk-first chunk-next chunk-rest chunked-seq? class class? clear-agent-errors clojure-version coll? comment commute comp comparator compare compare-and-set! compile complement concat cond condp conj conj! cons constantly construct-proxy contains? count counted? create-ns create-struct cycle dec decimal? declare definline defmacro defmethod defmulti defn defn- defonce defstruct delay delay? deliver deref derive descendants destructure disj disj! dissoc dissoc! distinct distinct? doall doc dorun doseq dosync dotimes doto double double-array doubles drop drop-last drop-while empty empty? ensure enumeration-seq eval even? every? false? ffirst file-seq filter find find-doc find-ns find-var first float float-array float? floats flush fn fn? fnext for force format future future-call future-cancel future-cancelled? future-done? future? gen-class gen-interface gensym get get-in get-method get-proxy-class get-thread-bindings get-validator hash hash-map hash-set identical? identity if-let if-not ifn? import in-ns inc init-proxy instance? int int-array integer? interleave intern interpose into into-array ints io! isa? iterate iterator-seq juxt key keys keyword keyword? last lazy-cat lazy-seq let letfn line-seq list list* list? load load-file load-reader load-string loaded-libs locking long long-array longs loop macroexpand macroexpand-1 make-array make-hierarchy map map? mapcat max max-key memfn memoize merge merge-with meta method-sig methods min min-key mod name namespace neg? newline next nfirst nil? nnext not not-any? not-empty not-every? not= ns ns-aliases ns-imports ns-interns ns-map ns-name ns-publics ns-refers ns-resolve ns-unalias ns-unmap nth nthnext num number? odd? or parents partial partition pcalls peek persistent! pmap pop pop! pop-thread-bindings pos? pr pr-str prefer-method prefers primitives-classnames print print-ctor print-doc print-dup print-method print-namespace-doc print-simple print-special-doc print-str printf println println-str prn prn-str promise proxy proxy-call-with-super proxy-mappings proxy-name proxy-super push-thread-bindings pvalues quot rand rand-int range ratio? rational? rationalize re-find re-groups re-matcher re-matches re-pattern re-seq read read-line read-string reduce ref ref-history-count ref-max-history ref-min-history ref-set refer refer-clojure release-pending-sends rem remove remove-method remove-ns remove-watch repeat repeatedly replace replicate require reset! reset-meta! resolve rest resultset-seq reverse reversible? rseq rsubseq second select-keys send send-off seq seq? seque sequence sequential? set set-validator! set? short short-array shorts shutdown-agents slurp some sort sort-by sorted-map sorted-map-by sorted-set sorted-set-by sorted? special-form-anchor special-symbol? split-at split-with str stream? string? struct struct-map subs subseq subvec supers swap! symbol symbol? sync syntax-symbol-anchor take take-last take-nth take-while test the-ns time to-array to-array-2d trampoline transient tree-seq true? type unchecked-add unchecked-dec unchecked-divide unchecked-inc unchecked-multiply unchecked-negate unchecked-remainder unchecked-subtract underive unquote unquote-splicing update-in update-proxy use val vals var-get var-set var? vary-meta vec vector vector? when when-first when-let when-not while with-bindings with-bindings* with-in-str with-loading-context with-local-vars with-meta with-open with-out-str with-precision xml-seq zero? zipmap ".split(" ")),b=e.arrayToMap("def do fn if let loop monitor-enter monitor-exit new quote recur set! throw try var".split(" ")),c=e.arrayToMap("true false nil".split(" "));this.$rules={start:[{token:"comment",regex:";.*$"},{token:"comment",regex:"^=begin$",next:"comment"},{token:"keyword",regex:"[\\(|\\)]"},{token:"keyword",regex:"[\\'\\(]"},{token:"keyword",regex:"[\\[|\\]]"},{token:"keyword",regex:"[\\{|\\}|\\#\\{|\\#\\}]"},{token:"keyword",regex:"[\\&]"},{token:"keyword",regex:"[\\#\\^\\{]"},{token:"keyword",regex:"[\\%]"},{token:"keyword",regex:"[@]"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"[!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+||=|!=|<=|>=|<>|<|>|!|&&]"},{token:function(d){return b.hasOwnProperty(d)?"keyword":c.hasOwnProperty(d)?"constant.language":a.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"[:](?:[a-zA-Z]|d)+"},{token:"string.regexp",regex:'/#"(?:.|(\\")|[^""\n])*"/g'}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ClojureHighlightRules=g}),define("ace/mode/matching_parens_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\)/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\))/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingParensOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-coffee.js b/src/bb-modules/Filemanager/src/ace/mode-coffee.js new file mode 100644 index 000000000..14e25f2ca --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-coffee.js @@ -0,0 +1 @@ +define("ace/mode/coffee",["require","exports","module","ace/tokenizer","ace/mode/coffee_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/text","ace/worker/worker_client","pilot/oop"],function(a,b,c){function k(){this.$tokenizer=new d((new e).getRules()),this.$outdent=new f}var d=a("ace/tokenizer").Tokenizer,e=a("ace/mode/coffee_highlight_rules").CoffeeHighlightRules,f=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,g=a("ace/range").Range,h=a("ace/mode/text").Mode,i=a("ace/worker/worker_client").WorkerClient,j=a("pilot/oop");j.inherits(k,h),function(){var a=/(?:[({[=:]|[-=]>|\b(?:else|switch|try|catch(?:\s*[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*)?|finally))\s*$/,b=/^(\s*)#/,c=/^\s*###(?!#)/,d=/^\s*/;this.getNextLineIndent=function(b,c,d){var e=this.$getIndent(c),f=this.$tokenizer.getLineTokens(c,b).tokens;(!f.length||f[f.length-1].type!=="comment")&&b==="start"&&a.test(c)&&(e+=d);return e},this.toggleCommentLines=function(a,e,f,h){console.log("toggle");var i=new g(0,0,0,0);for(var j=f;j<=h;++j){var k=e.getLine(j);if(c.test(k))continue;b.test(k)?k=k.replace(b,"$1"):k=k.replace(d,"$&#"),i.end.row=i.start.row=j,i.end.column=k.length+1,e.replace(i,k)}},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new i(["ace","pilot"],"worker-coffee.js","ace/mode/coffee_worker","Worker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("error",function(b){a.setAnnotations([b.data])}),c.on("ok",function(b){a.clearAnnotations()})}}.call(k.prototype),b.Mode=k}),define("ace/mode/coffee_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){function d(){var a="[$A-Za-z_\\x7f-\\uffff][$\\w\\x7f-\\uffff]*",b="(?![$\\w]|\\s*:)",c={token:"string",merge:!0,regex:".+"};this.$rules={start:[{token:"identifier",regex:"(?:@|(?:\\.|::)\\s*)"+a},{token:"keyword",regex:"(?:t(?:h(?:is|row|en)|ry|ypeof)|s(?:uper|witch)|return|b(?:reak|y)|c(?:ontinue|atch|lass)|i(?:n(?:stanceof)?|s(?:nt)?|f)|e(?:lse|xtends)|f(?:or (?:own)?|inally|unction)|wh(?:ile|en)|n(?:ew|ot?)|d(?:e(?:lete|bugger)|o)|loop|o(?:ff?|[rn])|un(?:less|til)|and|yes)"+b},{token:"constant.language",regex:"(?:true|false|null|undefined)"+b},{token:"invalid.illegal",regex:"(?:c(?:ase|onst)|default|function|v(?:ar|oid)|with|e(?:num|xport)|i(?:mplements|nterface)|let|p(?:ackage|r(?:ivate|otected)|ublic)|static|yield|__(?:hasProp|extends|slice|bind|indexOf))"+b},{token:"language.support.class",regex:"(?:Array|Boolean|Date|Function|Number|Object|R(?:e(?:gExp|ferenceError)|angeError)|S(?:tring|yntaxError)|E(?:rror|valError)|TypeError|URIError)"+b},{token:"language.support.function",regex:"(?:Math|JSON|is(?:NaN|Finite)|parse(?:Int|Float)|encodeURI(?:Component)?|decodeURI(?:Component)?)"+b},{token:"identifier",regex:a},{token:"constant.numeric",regex:"(?:0x[\\da-fA-F]+|(?:\\d+(?:\\.\\d+)?|\\.\\d+)(?:[eE][+-]?\\d+)?)"},{token:"string",merge:!0,regex:"'''",next:"qdoc"},{token:"string",merge:!0,regex:'"""',next:"qqdoc"},{token:"string",merge:!0,regex:"'",next:"qstring"},{token:"string",merge:!0,regex:'"',next:"qqstring"},{token:"string",merge:!0,regex:"`",next:"js"},{token:"string.regex",merge:!0,regex:"///",next:"heregex"},{token:"string.regex",regex:"/(?!\\s)[^[/\\n\\\\]*(?: (?:\\\\.|\\[[^\\]\\n\\\\]*(?:\\\\.[^\\]\\n\\\\]*)*\\])[^[/\\n\\\\]*)*/[imgy]{0,4}(?!\\w)"},{token:"comment",merge:!0,regex:"###(?!#)",next:"comment"},{token:"comment",regex:"#.*"},{token:"lparen",regex:"[({[]"},{token:"rparen",regex:"[\\]})]"},{token:"keyword.operator",regex:"\\S+"},{token:"text",regex:"\\s+"}],qdoc:[{token:"string",regex:".*?'''",next:"start"},c],qqdoc:[{token:"string",regex:'.*?"""',next:"start"},c],qstring:[{token:"string",regex:"[^\\\\']*(?:\\\\.[^\\\\']*)*'",next:"start"},c],qqstring:[{token:"string",regex:'[^\\\\"]*(?:\\\\.[^\\\\"]*)*"',next:"start"},c],js:[{token:"string",merge:!0,regex:"[^\\\\`]*(?:\\\\.[^\\\\`]*)*`",next:"start"},c],heregex:[{token:"string.regex",regex:".*?///[imgy]{0,4}",next:"start"},{token:"comment.regex",regex:"\\s+(?:#.*)?"},{token:"string.regex",merge:!0,regex:"\\S+"}],comment:[{token:"comment",regex:".*?###",next:"start"},{token:"comment",merge:!0,regex:".+"}]}}a("pilot/oop").inherits(d,a("ace/mode/text_highlight_rules").TextHighlightRules),b.CoffeeHighlightRules=d}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;j=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.CSharpHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return!1;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}return!1}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}"){e.end.column++;return e}}return!1}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}return!1}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")"){e.end.column++;return e}}return!1}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return!1;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;of.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-css.js b/src/bb-modules/Filemanager/src/ace/mode-css.js new file mode 100644 index 000000000..e7cbfde63 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-css.js @@ -0,0 +1 @@ +define("ace/mode/css",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/css_highlight_rules").CssHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/worker/worker_client").WorkerClient,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);f&&(d+=c);return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new i(["ace","pilot"],"worker-css.js","ace/mode/css_worker","Worker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)})}}.call(j.prototype),b.Mode=j}),define("ace/mode/css_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){function g(a){var b=[],c=a.split("");for(var d=0;d=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/groovy_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("assert|with|abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|def|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\?:|\\?\\.|\\*\\.|<=>|=~|==~|\\.@|\\*\\.@|\\.&|as|in|is|!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.GroovyHighlightRules=h}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-html.js b/src/bb-modules/Filemanager/src/ace/mode-html.js new file mode 100644 index 000000000..518767d3f --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-html.js @@ -0,0 +1 @@ +define("ace/mode/html",["require","exports","module","pilot/oop","ace/mode/text","ace/mode/javascript","ace/mode/css","ace/tokenizer","ace/mode/html_highlight_rules","ace/mode/behaviour/xml"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/mode/javascript").Mode,g=a("ace/mode/css").Mode,h=a("ace/tokenizer").Tokenizer,i=a("ace/mode/html_highlight_rules").HtmlHighlightRules,j=a("ace/mode/behaviour/xml").XmlBehaviour,k=function(){var a=new i;this.$tokenizer=new h(a.getRules()),this.$behaviour=new j,this.$embeds=a.getEmbeds(),this.createModeDelegates({"js-":f,"css-":g})};d.inherits(k,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(k.prototype),b.Mode=k}),define("ace/mode/javascript",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/worker/worker_client").WorkerClient,k=a("ace/mode/behaviour/cstyle").CstyleBehaviour,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new j(["ace","pilot"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("jslint",function(b){var c=[];for(var d=0;d=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/css",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/css_highlight_rules","ace/mode/matching_brace_outdent","ace/worker/worker_client"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/css_highlight_rules").CssHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/worker/worker_client").WorkerClient,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);f&&(d+=c);return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new i(["ace","pilot"],"worker-css.js","ace/mode/css_worker","Worker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("csslint",function(b){var c=[];b.data.forEach(function(a){c.push({row:a.line-1,column:a.col-1,text:a.message,type:a.type,lint:a})}),a.setAnnotations(c)})}}.call(j.prototype),b.Mode=j}),define("ace/mode/css_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){function g(a){var b=[],c=a.split("");for(var d=0;d"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"text",regex:"<(?=s*script)",next:"script"},{token:"text",regex:"<(?=s*style)",next:"css"},{token:"text",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],script:[{token:"text",regex:">",next:"js-start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"}].concat(a("script")),css:[{token:"text",regex:">",next:"css-start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"}].concat(a("style")),tag:[{token:"text",regex:">",next:"start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"}].concat(a("tag")),"style-qstring":b("'","style"),"style-qqstring":b('"',"style"),"script-qstring":b("'","script"),"script-qqstring":b('"',"script"),"tag-qstring":b("'","tag"),"tag-qqstring":b('"',"tag"),cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",merge:!0,regex:"\\s+"},{token:"text",merge:!0,regex:".+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"text",regex:"<\\/(?=script)",next:"tag"}]),this.embedRules(e,"css-",[{token:"text",regex:"<\\/(?=style)",next:"tag"}])};d.inherits(h,g),b.HtmlHighlightRules=h}),define("ace/mode/behaviour/xml",["require","exports","module","pilot/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=a("ace/mode/behaviour/cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/java_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abstract|continue|for|new|switch|assert|default|goto|package|synchronized|boolean|do|if|private|this|break|double|implements|protected|throw|byte|else|import|public|throws|case|enum|instanceof|return|transient|catch|extends|int|short|try|char|final|interface|static|void|class|finally|long|strictfp|volatile|const|float|native|super|while".split("|")),b=e.arrayToMap("null|Infinity|NaN|undefined".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.JavaHighlightRules=h}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-javascript.js b/src/bb-modules/Filemanager/src/ace/mode-javascript.js new file mode 100644 index 000000000..40628310c --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-javascript.js @@ -0,0 +1 @@ +define("ace/mode/javascript",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/worker/worker_client").WorkerClient,k=a("ace/mode/behaviour/cstyle").CstyleBehaviour,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new j(["ace","pilot"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("jslint",function(b){var c=[];for(var d=0;d=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-json.js b/src/bb-modules/Filemanager/src/ace/mode-json.js new file mode 100644 index 000000000..66df13b26 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-json.js @@ -0,0 +1 @@ +define("ace/mode/json",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/json_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/json_highlight_rules").JsonHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/mode/behaviour/cstyle").CstyleBehaviour,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j};d.inherits(k,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),define("ace/mode/json_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){this.$rules={start:[{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:"invalid.illegal",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"invalid.illegal",regex:"\\/\\/.*$"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}]}};d.inherits(g,f),b.JsonHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return!1;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}return!1}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}"){e.end.column++;return e}}return!1}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}return!1}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")"){e.end.column++;return e}}return!1}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return!1;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;of.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-ocaml.js b/src/bb-modules/Filemanager/src/ace/mode-ocaml.js new file mode 100644 index 000000000..56585c0ee --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-ocaml.js @@ -0,0 +1 @@ +define("ace/mode/ocaml",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/ocaml_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/ocaml_highlight_rules").OcamlHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e);var k=/(?:[({[=:]|[-=]>|\b(?:else|try|with))\s*$/;(function(){this.toggleCommentLines=function(a,b,c,d){var e,f,g=!0,h=/^\s*\(\*(.*)\*\)/;for(e=c;e<=d;e++)if(!h.test(b.getLine(e))){g=!1;break}var j=new i(0,0,0,0);for(e=c;e<=d;e++)f=b.getLine(e),j.start.row=e,j.end.row=e,j.end.column=f.length,b.replace(j,g?f.match(h)[1]:"(*"+f+"*)")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;(!e.length||e[e.length-1].type!=="comment")&&a==="start"&&k.test(b)&&(d+=c);return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}).call(j.prototype),b.Mode=j}),define("ace/mode/ocaml_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|begin|class|constraint|do|done|downto|else|end|exception|external|for|fun|function|functor|if|in|include|inherit|initializer|lazy|let|match|method|module|mutable|new|object|of|open|or|private|rec|sig|struct|then|to|try|type|val|virtual|when|while|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("abs|abs_big_int|abs_float|abs_num|abstract_tag|accept|access|acos|add|add_available_units|add_big_int|add_buffer|add_channel|add_char|add_initializer|add_int_big_int|add_interfaces|add_num|add_string|add_substitute|add_substring|alarm|allocated_bytes|allow_only|allow_unsafe_modules|always|append|appname_get|appname_set|approx_num_exp|approx_num_fix|arg|argv|arith_status|array|array1_of_genarray|array2_of_genarray|array3_of_genarray|asin|asr|assoc|assq|at_exit|atan|atan2|auto_synchronize|background|basename|beginning_of_input|big_int_of_int|big_int_of_num|big_int_of_string|bind|bind_class|bind_tag|bits|bits_of_float|black|blit|blit_image|blue|bool|bool_of_string|bounded_full_split|bounded_split|bounded_split_delim|bprintf|break|broadcast|bscanf|button_down|c_layout|capitalize|cardinal|cardinal|catch|catch_break|ceil|ceiling_num|channel|char|char_of_int|chdir|check|check_suffix|chmod|choose|chop_extension|chop_suffix|chown|chown|chr|chroot|classify_float|clear|clear_available_units|clear_close_on_exec|clear_graph|clear_nonblock|clear_parser|close|close|closeTk|close_box|close_graph|close_in|close_in_noerr|close_out|close_out_noerr|close_process|close_process|close_process_full|close_process_in|close_process_out|close_subwindow|close_tag|close_tbox|closedir|closedir|closure_tag|code|combine|combine|combine|command|compact|compare|compare_big_int|compare_num|complex32|complex64|concat|conj|connect|contains|contains_from|contents|copy|cos|cosh|count|count|counters|create|create_alarm|create_image|create_matrix|create_matrix|create_matrix|create_object|create_object_and_run_initializers|create_object_opt|create_process|create_process|create_process_env|create_process_env|create_table|current|current_dir_name|current_point|current_x|current_y|curveto|custom_tag|cyan|data_size|decr|decr_num|default_available_units|delay|delete_alarm|descr_of_in_channel|descr_of_out_channel|destroy|diff|dim|dim1|dim2|dim3|dims|dirname|display_mode|div|div_big_int|div_num|double_array_tag|double_tag|draw_arc|draw_char|draw_circle|draw_ellipse|draw_image|draw_poly|draw_poly_line|draw_rect|draw_segments|draw_string|dummy_pos|dummy_table|dump_image|dup|dup2|elements|empty|end_of_input|environment|eprintf|epsilon_float|eq_big_int|eq_num|equal|err_formatter|error_message|escaped|establish_server|executable_name|execv|execve|execvp|execvpe|exists|exists2|exit|exp|failwith|fast_sort|fchmod|fchown|field|file|file_exists|fill|fill_arc|fill_circle|fill_ellipse|fill_poly|fill_rect|filter|final_tag|finalise|find|find_all|first_chars|firstkey|flatten|float|float32|float64|float_of_big_int|float_of_bits|float_of_int|float_of_num|float_of_string|floor|floor_num|flush|flush_all|flush_input|flush_str_formatter|fold|fold_left|fold_left2|fold_right|fold_right2|for_all|for_all2|force|force_newline|force_val|foreground|fork|format_of_string|formatter_of_buffer|formatter_of_out_channel|fortran_layout|forward_tag|fprintf|frexp|from|from_channel|from_file|from_file_bin|from_function|from_string|fscanf|fst|fstat|ftruncate|full_init|full_major|full_split|gcd_big_int|ge_big_int|ge_num|genarray_of_array1|genarray_of_array2|genarray_of_array3|get|get_all_formatter_output_functions|get_approx_printing|get_copy|get_ellipsis_text|get_error_when_null_denominator|get_floating_precision|get_formatter_output_functions|get_formatter_tag_functions|get_image|get_margin|get_mark_tags|get_max_boxes|get_max_indent|get_method|get_method_label|get_normalize_ratio|get_normalize_ratio_when_printing|get_print_tags|get_state|get_variable|getcwd|getegid|getegid|getenv|getenv|getenv|geteuid|geteuid|getgid|getgid|getgrgid|getgrgid|getgrnam|getgrnam|getgroups|gethostbyaddr|gethostbyname|gethostname|getitimer|getlogin|getpeername|getpid|getppid|getprotobyname|getprotobynumber|getpwnam|getpwuid|getservbyname|getservbyport|getsockname|getsockopt|getsockopt_float|getsockopt_int|getsockopt_optint|gettimeofday|getuid|global_replace|global_substitute|gmtime|green|grid|group_beginning|group_end|gt_big_int|gt_num|guard|handle_unix_error|hash|hash_param|hd|header_size|i|id|ignore|in_channel_length|in_channel_of_descr|incr|incr_num|index|index_from|inet_addr_any|inet_addr_of_string|infinity|infix_tag|init|init_class|input|input_binary_int|input_byte|input_char|input_line|input_value|int|int16_signed|int16_unsigned|int32|int64|int8_signed|int8_unsigned|int_of_big_int|int_of_char|int_of_float|int_of_num|int_of_string|integer_num|inter|interactive|inv|invalid_arg|is_block|is_empty|is_implicit|is_int|is_int_big_int|is_integer_num|is_relative|iter|iter2|iteri|join|junk|key_pressed|kill|kind|kprintf|kscanf|land|last_chars|layout|lazy_from_fun|lazy_from_val|lazy_is_val|lazy_tag|ldexp|le_big_int|le_num|length|lexeme|lexeme_char|lexeme_end|lexeme_end_p|lexeme_start|lexeme_start_p|lineto|link|list|listen|lnot|loadfile|loadfile_private|localtime|lock|lockf|log|log10|logand|lognot|logor|logxor|lor|lower_window|lowercase|lseek|lsl|lsr|lstat|lt_big_int|lt_num|lxor|magenta|magic|mainLoop|major|major_slice|make|make_formatter|make_image|make_lexer|make_matrix|make_self_init|map|map2|map_file|mapi|marshal|match_beginning|match_end|matched_group|matched_string|max|max_array_length|max_big_int|max_elt|max_float|max_int|max_num|max_string_length|mem|mem_assoc|mem_assq|memq|merge|min|min_big_int|min_elt|min_float|min_int|min_num|minor|minus_big_int|minus_num|minus_one|mkdir|mkfifo|mktime|mod|mod_big_int|mod_float|mod_num|modf|mouse_pos|moveto|mul|mult_big_int|mult_int_big_int|mult_num|nan|narrow|nat_of_num|nativeint|neg|neg_infinity|new_block|new_channel|new_method|new_variable|next|nextkey|nice|nice|no_scan_tag|norm|norm2|not|npeek|nth|nth_dim|num_digits_big_int|num_dims|num_of_big_int|num_of_int|num_of_nat|num_of_ratio|num_of_string|O|obj|object_tag|ocaml_version|of_array|of_channel|of_float|of_int|of_int32|of_list|of_nativeint|of_string|one|openTk|open_box|open_connection|open_graph|open_hbox|open_hovbox|open_hvbox|open_in|open_in_bin|open_in_gen|open_out|open_out_bin|open_out_gen|open_process|open_process_full|open_process_in|open_process_out|open_subwindow|open_tag|open_tbox|open_temp_file|open_vbox|opendbm|opendir|openfile|or|os_type|out_channel_length|out_channel_of_descr|output|output_binary_int|output_buffer|output_byte|output_char|output_string|output_value|over_max_boxes|pack|params|parent_dir_name|parse|parse_argv|partition|pause|peek|pipe|pixels|place|plot|plots|point_color|polar|poll|pop|pos_in|pos_out|pow|power_big_int_positive_big_int|power_big_int_positive_int|power_int_positive_big_int|power_int_positive_int|power_num|pp_close_box|pp_close_tag|pp_close_tbox|pp_force_newline|pp_get_all_formatter_output_functions|pp_get_ellipsis_text|pp_get_formatter_output_functions|pp_get_formatter_tag_functions|pp_get_margin|pp_get_mark_tags|pp_get_max_boxes|pp_get_max_indent|pp_get_print_tags|pp_open_box|pp_open_hbox|pp_open_hovbox|pp_open_hvbox|pp_open_tag|pp_open_tbox|pp_open_vbox|pp_over_max_boxes|pp_print_as|pp_print_bool|pp_print_break|pp_print_char|pp_print_cut|pp_print_float|pp_print_flush|pp_print_if_newline|pp_print_int|pp_print_newline|pp_print_space|pp_print_string|pp_print_tab|pp_print_tbreak|pp_set_all_formatter_output_functions|pp_set_ellipsis_text|pp_set_formatter_out_channel|pp_set_formatter_output_functions|pp_set_formatter_tag_functions|pp_set_margin|pp_set_mark_tags|pp_set_max_boxes|pp_set_max_indent|pp_set_print_tags|pp_set_tab|pp_set_tags|pred|pred_big_int|pred_num|prerr_char|prerr_endline|prerr_float|prerr_int|prerr_newline|prerr_string|print|print_as|print_bool|print_break|print_char|print_cut|print_endline|print_float|print_flush|print_if_newline|print_int|print_newline|print_space|print_stat|print_string|print_tab|print_tbreak|printf|prohibit|public_method_label|push|putenv|quo_num|quomod_big_int|quote|raise|raise_window|ratio_of_num|rcontains_from|read|read_float|read_int|read_key|read_line|readdir|readdir|readlink|really_input|receive|recv|recvfrom|red|ref|regexp|regexp_case_fold|regexp_string|regexp_string_case_fold|register|register_exception|rem|remember_mode|remove|remove_assoc|remove_assq|rename|replace|replace_first|replace_matched|repr|reset|reshape|reshape_1|reshape_2|reshape_3|rev|rev_append|rev_map|rev_map2|rewinddir|rgb|rhs_end|rhs_end_pos|rhs_start|rhs_start_pos|rindex|rindex_from|rlineto|rmdir|rmoveto|round_num|run_initializers|run_initializers_opt|scanf|search_backward|search_forward|seek_in|seek_out|select|self|self_init|send|sendto|set|set_all_formatter_output_functions|set_approx_printing|set_binary_mode_in|set_binary_mode_out|set_close_on_exec|set_close_on_exec|set_color|set_ellipsis_text|set_error_when_null_denominator|set_field|set_floating_precision|set_font|set_formatter_out_channel|set_formatter_output_functions|set_formatter_tag_functions|set_line_width|set_margin|set_mark_tags|set_max_boxes|set_max_indent|set_method|set_nonblock|set_nonblock|set_normalize_ratio|set_normalize_ratio_when_printing|set_print_tags|set_signal|set_state|set_tab|set_tag|set_tags|set_text_size|set_window_title|setgid|setgid|setitimer|setitimer|setsid|setsid|setsockopt|setsockopt|setsockopt_float|setsockopt_float|setsockopt_int|setsockopt_int|setsockopt_optint|setsockopt_optint|setuid|setuid|shift_left|shift_left|shift_left|shift_right|shift_right|shift_right|shift_right_logical|shift_right_logical|shift_right_logical|show_buckets|shutdown|shutdown|shutdown_connection|shutdown_connection|sigabrt|sigalrm|sigchld|sigcont|sigfpe|sighup|sigill|sigint|sigkill|sign_big_int|sign_num|signal|signal|sigpending|sigpending|sigpipe|sigprocmask|sigprocmask|sigprof|sigquit|sigsegv|sigstop|sigsuspend|sigsuspend|sigterm|sigtstp|sigttin|sigttou|sigusr1|sigusr2|sigvtalrm|sin|singleton|sinh|size|size|size_x|size_y|sleep|sleep|sleep|slice_left|slice_left|slice_left_1|slice_left_2|slice_right|slice_right|slice_right_1|slice_right_2|snd|socket|socket|socket|socketpair|socketpair|sort|sound|split|split_delim|sprintf|sprintf|sqrt|sqrt|sqrt_big_int|square_big_int|square_num|sscanf|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stable_sort|stat|stat|stat|stat|stat|stats|stats|std_formatter|stdbuf|stderr|stderr|stderr|stdib|stdin|stdin|stdin|stdout|stdout|stdout|str_formatter|string|string_after|string_before|string_match|string_of_big_int|string_of_bool|string_of_float|string_of_format|string_of_inet_addr|string_of_inet_addr|string_of_int|string_of_num|string_partial_match|string_tag|sub|sub|sub_big_int|sub_left|sub_num|sub_right|subset|subset|substitute_first|substring|succ|succ|succ|succ|succ_big_int|succ_num|symbol_end|symbol_end_pos|symbol_start|symbol_start_pos|symlink|symlink|sync|synchronize|system|system|system|tag|take|tan|tanh|tcdrain|tcdrain|tcflow|tcflow|tcflush|tcflush|tcgetattr|tcgetattr|tcsendbreak|tcsendbreak|tcsetattr|tcsetattr|temp_file|text_size|time|time|time|timed_read|timed_write|times|times|tl|tl|tl|to_buffer|to_channel|to_float|to_hex|to_int|to_int32|to_list|to_list|to_list|to_nativeint|to_string|to_string|to_string|to_string|to_string|top|top|total_size|transfer|transp|truncate|truncate|truncate|truncate|truncate|truncate|try_lock|umask|umask|uncapitalize|uncapitalize|uncapitalize|union|union|unit_big_int|unlink|unlink|unlock|unmarshal|unsafe_blit|unsafe_fill|unsafe_get|unsafe_get|unsafe_set|unsafe_set|update|uppercase|uppercase|uppercase|uppercase|usage|utimes|utimes|wait|wait|wait|wait|wait_next_event|wait_pid|wait_read|wait_signal|wait_timed_read|wait_timed_write|wait_write|waitpid|white|widen|window_id|word_size|wrap|wrap_abort|write|yellow|yield|zero|zero_big_int|Arg|Arith_status|Array|Array1|Array2|Array3|ArrayLabels|Big_int|Bigarray|Buffer|Callback|CamlinternalOO|Char|Complex|Condition|Dbm|Digest|Dynlink|Event|Filename|Format|Gc|Genarray|Genlex|Graphics|GraphicsX11|Hashtbl|Int32|Int64|LargeFile|Lazy|Lexing|List|ListLabels|Make|Map|Marshal|MoreLabels|Mutex|Nativeint|Num|Obj|Oo|Parsing|Pervasives|Printexc|Printf|Queue|Random|Scanf|Scanning|Set|Sort|Stack|State|StdLabels|Str|Stream|String|StringLabels|Sys|Thread|ThreadUnix|Tk|Unix|UnixLabels|Weak".split("|")),d="(?:(?:[1-9]\\d*)|(?:0))",f="(?:0[oO]?[0-7]+)",g="(?:0[xX][\\dA-Fa-f]+)",h="(?:0[bB][01]+)",i="(?:"+d+"|"+f+"|"+g+"|"+h+")",j="(?:[eE][+-]?\\d+)",k="(?:\\.\\d+)",l="(?:\\d+)",m="(?:(?:"+l+"?"+k+")|(?:"+l+"\\.))",n="(?:(?:"+m+"|"+l+")"+j+")",o="(?:"+n+"|"+m+")";this.$rules={start:[{token:"comment",regex:"\\(\\*.*?\\*\\)\\s*?$"},{token:"comment",merge:!0,regex:"\\(\\*.*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"'.'"},{token:"string",merge:!0,regex:'"',next:"qstring"},{token:"constant.numeric",regex:"(?:"+o+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:o},{token:"constant.numeric",regex:i+"\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+\\.|\\-\\.|\\*\\.|\\/\\.|#|;;|\\+|\\-|\\*|\\*\\*\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|<-|="},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\)",next:"start"},{token:"comment",merge:!0,regex:".+"}],qstring:[{token:"string",regex:'"',next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.OcamlHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-perl.js b/src/bb-modules/Filemanager/src/ace/mode-perl.js new file mode 100644 index 000000000..521280f40 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-perl.js @@ -0,0 +1 @@ +define("ace/mode/perl",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/perl_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/perl_highlight_rules").PerlHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/perl_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("base|constant|continue|else|elsif|for|foreach|format|goto|if|last|local|my|next|no|package|parent|redo|require|scalar|sub|unless|until|while|use|vars".split("|")),b=e.arrayToMap("ARGV|ENV|INC|SIG".split("|")),c=e.arrayToMap("getprotobynumber|getprotobyname|getservbyname|gethostbyaddr|gethostbyname|getservbyport|getnetbyaddr|getnetbyname|getsockname|getpeername|setpriority|getprotoent|setprotoent|getpriority|endprotoent|getservent|setservent|endservent|sethostent|socketpair|getsockopt|gethostent|endhostent|setsockopt|setnetent|quotemeta|localtime|prototype|getnetent|endnetent|rewinddir|wantarray|getpwuid|closedir|getlogin|readlink|endgrent|getgrgid|getgrnam|shmwrite|shutdown|readline|endpwent|setgrent|readpipe|formline|truncate|dbmclose|syswrite|setpwent|getpwnam|getgrent|getpwent|ucfirst|sysread|setpgrp|shmread|sysseek|sysopen|telldir|defined|opendir|connect|lcfirst|getppid|binmode|syscall|sprintf|getpgrp|readdir|seekdir|waitpid|reverse|unshift|symlink|dbmopen|semget|msgrcv|rename|listen|chroot|msgsnd|shmctl|accept|unpack|exists|fileno|shmget|system|unlink|printf|gmtime|msgctl|semctl|values|rindex|substr|splice|length|msgget|select|socket|return|caller|delete|alarm|ioctl|index|undef|lstat|times|srand|chown|fcntl|close|write|umask|rmdir|study|sleep|chomp|untie|print|utime|mkdir|atan2|split|crypt|flock|chmod|BEGIN|bless|chdir|semop|shift|reset|link|stat|chop|grep|fork|dump|join|open|tell|pipe|exit|glob|warn|each|bind|sort|pack|eval|push|keys|getc|kill|seek|sqrt|send|wait|rand|tied|read|time|exec|recv|eof|chr|int|ord|exp|pos|pop|sin|log|abs|oct|hex|tie|cos|vec|END|ref|map|die|uc|lc|do".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0x[0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:function(d){return a.hasOwnProperty(d)?"keyword":b.hasOwnProperty(d)?"constant.language":c.hasOwnProperty(d)?"support.function":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\.\\.\\.|\\|\\|=|>>=|<<=|<=>|&&=|=>|!~|\\^=|&=|\\|=|\\.=|x=|%=|\\/=|\\*=|\\-=|\\+=|=~|\\*\\*|\\-\\-|\\.\\.|\\|\\||&&|\\+\\+|\\->|!=|==|>=|<=|>>|<<|,|=|\\?\\:|\\^|\\||x|%|\\/|\\*|<|&|\\\\|~|!|>|\\.|\\-|\\+|\\-C|\\-b|\\-S|\\-u|\\-t|\\-p|\\-l|\\-d|\\-f|\\-g|\\-s|\\-z|\\-k|\\-e|\\-O|\\-T|\\-B|\\-M|\\-A|\\-X|\\-W|\\-c|\\-R|\\-o|\\-x|\\-w|\\-r|\\b(?:and|cmp|eq|ge|gt|le|lt|ne|not|or|xor)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PerlHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-php.js b/src/bb-modules/Filemanager/src/ace/mode-php.js new file mode 100644 index 000000000..20b056b16 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-php.js @@ -0,0 +1 @@ +define("ace/mode/php",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/php_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/php_highlight_rules").PhpHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/mode/behaviour/cstyle").CstyleBehaviour,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j};d.inherits(k,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),define("ace/mode/php_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("abs|acos|acosh|addcslashes|addslashes|aggregate|aggregate_info|aggregate_methods|aggregate_methods_by_list|aggregate_methods_by_regexp|aggregate_properties|aggregate_properties_by_list|aggregate_properties_by_regexp|aggregation_info|amqpconnection|amqpexchange|amqpqueue|apache_child_terminate|apache_get_modules|apache_get_version|apache_getenv|apache_lookup_uri|apache_note|apache_request_headers|apache_reset_timeout|apache_response_headers|apache_setenv|apc_add|apc_bin_dump|apc_bin_dumpfile|apc_bin_load|apc_bin_loadfile|apc_cache_info|apc_cas|apc_clear_cache|apc_compile_file|apc_dec|apc_define_constants|apc_delete|apc_delete_file|apc_exists|apc_fetch|apc_inc|apc_load_constants|apc_sma_info|apc_store|apciterator|apd_breakpoint|apd_callstack|apd_clunk|apd_continue|apd_croak|apd_dump_function_table|apd_dump_persistent_resources|apd_dump_regular_resources|apd_echo|apd_get_active_symbols|apd_set_pprof_trace|apd_set_session|apd_set_session_trace|apd_set_session_trace_socket|appenditerator|array|array_change_key_case|array_chunk|array_combine|array_count_values|array_diff|array_diff_assoc|array_diff_key|array_diff_uassoc|array_diff_ukey|array_fill|array_fill_keys|array_filter|array_flip|array_intersect|array_intersect_assoc|array_intersect_key|array_intersect_uassoc|array_intersect_ukey|array_key_exists|array_keys|array_map|array_merge|array_merge_recursive|array_multisort|array_pad|array_pop|array_product|array_push|array_rand|array_reduce|array_replace|array_replace_recursive|array_reverse|array_search|array_shift|array_slice|array_splice|array_sum|array_udiff|array_udiff_assoc|array_udiff_uassoc|array_uintersect|array_uintersect_assoc|array_uintersect_uassoc|array_unique|array_unshift|array_values|array_walk|array_walk_recursive|arrayaccess|arrayiterator|arrayobject|arsort|asin|asinh|asort|assert|assert_options|atan|atan2|atanh|audioproperties|badfunctioncallexception|badmethodcallexception|base64_decode|base64_encode|base_convert|basename|bbcode_add_element|bbcode_add_smiley|bbcode_create|bbcode_destroy|bbcode_parse|bbcode_set_arg_parser|bbcode_set_flags|bcadd|bccomp|bcdiv|bcmod|bcmul|bcompiler_load|bcompiler_load_exe|bcompiler_parse_class|bcompiler_read|bcompiler_write_class|bcompiler_write_constant|bcompiler_write_exe_footer|bcompiler_write_file|bcompiler_write_footer|bcompiler_write_function|bcompiler_write_functions_from_file|bcompiler_write_header|bcompiler_write_included_filename|bcpow|bcpowmod|bcscale|bcsqrt|bcsub|bin2hex|bind_textdomain_codeset|bindec|bindtextdomain|bson_decode|bson_encode|bumpValue|bzclose|bzcompress|bzdecompress|bzerrno|bzerror|bzerrstr|bzflush|bzopen|bzread|bzwrite|cachingiterator|cairo|cairo_create|cairo_font_face_get_type|cairo_font_face_status|cairo_font_options_create|cairo_font_options_equal|cairo_font_options_get_antialias|cairo_font_options_get_hint_metrics|cairo_font_options_get_hint_style|cairo_font_options_get_subpixel_order|cairo_font_options_hash|cairo_font_options_merge|cairo_font_options_set_antialias|cairo_font_options_set_hint_metrics|cairo_font_options_set_hint_style|cairo_font_options_set_subpixel_order|cairo_font_options_status|cairo_format_stride_for_width|cairo_image_surface_create|cairo_image_surface_create_for_data|cairo_image_surface_create_from_png|cairo_image_surface_get_data|cairo_image_surface_get_format|cairo_image_surface_get_height|cairo_image_surface_get_stride|cairo_image_surface_get_width|cairo_matrix_create_scale|cairo_matrix_create_translate|cairo_matrix_invert|cairo_matrix_multiply|cairo_matrix_rotate|cairo_matrix_transform_distance|cairo_matrix_transform_point|cairo_matrix_translate|cairo_pattern_add_color_stop_rgb|cairo_pattern_add_color_stop_rgba|cairo_pattern_create_for_surface|cairo_pattern_create_linear|cairo_pattern_create_radial|cairo_pattern_create_rgb|cairo_pattern_create_rgba|cairo_pattern_get_color_stop_count|cairo_pattern_get_color_stop_rgba|cairo_pattern_get_extend|cairo_pattern_get_filter|cairo_pattern_get_linear_points|cairo_pattern_get_matrix|cairo_pattern_get_radial_circles|cairo_pattern_get_rgba|cairo_pattern_get_surface|cairo_pattern_get_type|cairo_pattern_set_extend|cairo_pattern_set_filter|cairo_pattern_set_matrix|cairo_pattern_status|cairo_pdf_surface_create|cairo_pdf_surface_set_size|cairo_ps_get_levels|cairo_ps_level_to_string|cairo_ps_surface_create|cairo_ps_surface_dsc_begin_page_setup|cairo_ps_surface_dsc_begin_setup|cairo_ps_surface_dsc_comment|cairo_ps_surface_get_eps|cairo_ps_surface_restrict_to_level|cairo_ps_surface_set_eps|cairo_ps_surface_set_size|cairo_scaled_font_create|cairo_scaled_font_extents|cairo_scaled_font_get_ctm|cairo_scaled_font_get_font_face|cairo_scaled_font_get_font_matrix|cairo_scaled_font_get_font_options|cairo_scaled_font_get_scale_matrix|cairo_scaled_font_get_type|cairo_scaled_font_glyph_extents|cairo_scaled_font_status|cairo_scaled_font_text_extents|cairo_surface_copy_page|cairo_surface_create_similar|cairo_surface_finish|cairo_surface_flush|cairo_surface_get_content|cairo_surface_get_device_offset|cairo_surface_get_font_options|cairo_surface_get_type|cairo_surface_mark_dirty|cairo_surface_mark_dirty_rectangle|cairo_surface_set_device_offset|cairo_surface_set_fallback_resolution|cairo_surface_show_page|cairo_surface_status|cairo_surface_write_to_png|cairo_svg_surface_create|cairo_svg_surface_restrict_to_version|cairo_svg_version_to_string|cairoantialias|cairocontent|cairocontext|cairoexception|cairoextend|cairofillrule|cairofilter|cairofontface|cairofontoptions|cairofontslant|cairofonttype|cairofontweight|cairoformat|cairogradientpattern|cairohintmetrics|cairohintstyle|cairoimagesurface|cairolineargradient|cairolinecap|cairolinejoin|cairomatrix|cairooperator|cairopath|cairopattern|cairopatterntype|cairopdfsurface|cairopslevel|cairopssurface|cairoradialgradient|cairoscaledfont|cairosolidpattern|cairostatus|cairosubpixelorder|cairosurface|cairosurfacepattern|cairosurfacetype|cairosvgsurface|cairosvgversion|cairotoyfontface|cal_days_in_month|cal_from_jd|cal_info|cal_to_jd|calcul_hmac|calculhmac|call_user_func|call_user_func_array|call_user_method|call_user_method_array|callbackfilteriterator|ceil|chdb|chdb_create|chdir|checkdate|checkdnsrr|chgrp|chmod|chop|chown|chr|chroot|chunk_split|class_alias|class_exists|class_implements|class_parents|classkit_import|classkit_method_add|classkit_method_copy|classkit_method_redefine|classkit_method_remove|classkit_method_rename|clearstatcache|clone|closedir|closelog|collator|com|com_addref|com_create_guid|com_event_sink|com_get|com_get_active_object|com_invoke|com_isenum|com_load|com_load_typelib|com_message_pump|com_print_typeinfo|com_propget|com_propput|com_propset|com_release|com_set|compact|connection_aborted|connection_status|connection_timeout|constant|construct|construct|construct|convert_cyr_string|convert_uudecode|convert_uuencode|copy|cos|cosh|count|count_chars|countable|counter_bump|counter_bump_value|counter_create|counter_get|counter_get_meta|counter_get_named|counter_get_value|counter_reset|counter_reset_value|crack_check|crack_closedict|crack_getlastmessage|crack_opendict|crc32|create_function|crypt|ctype_alnum|ctype_alpha|ctype_cntrl|ctype_digit|ctype_graph|ctype_lower|ctype_print|ctype_punct|ctype_space|ctype_upper|ctype_xdigit|cubrid_affected_rows|cubrid_bind|cubrid_client_encoding|cubrid_close|cubrid_close_prepare|cubrid_close_request|cubrid_col_get|cubrid_col_size|cubrid_column_names|cubrid_column_types|cubrid_commit|cubrid_connect|cubrid_connect_with_url|cubrid_current_oid|cubrid_data_seek|cubrid_db_name|cubrid_disconnect|cubrid_drop|cubrid_errno|cubrid_error|cubrid_error_code|cubrid_error_code_facility|cubrid_error_msg|cubrid_execute|cubrid_fetch|cubrid_fetch_array|cubrid_fetch_assoc|cubrid_fetch_field|cubrid_fetch_lengths|cubrid_fetch_object|cubrid_fetch_row|cubrid_field_flags|cubrid_field_len|cubrid_field_name|cubrid_field_seek|cubrid_field_table|cubrid_field_type|cubrid_free_result|cubrid_get|cubrid_get_autocommit|cubrid_get_charset|cubrid_get_class_name|cubrid_get_client_info|cubrid_get_db_parameter|cubrid_get_server_info|cubrid_insert_id|cubrid_is_instance|cubrid_list_dbs|cubrid_load_from_glo|cubrid_lob_close|cubrid_lob_export|cubrid_lob_get|cubrid_lob_send|cubrid_lob_size|cubrid_lock_read|cubrid_lock_write|cubrid_move_cursor|cubrid_new_glo|cubrid_next_result|cubrid_num_cols|cubrid_num_fields|cubrid_num_rows|cubrid_ping|cubrid_prepare|cubrid_put|cubrid_query|cubrid_real_escape_string|cubrid_result|cubrid_rollback|cubrid_save_to_glo|cubrid_schema|cubrid_send_glo|cubrid_seq_drop|cubrid_seq_insert|cubrid_seq_put|cubrid_set_add|cubrid_set_autocommit|cubrid_set_db_parameter|cubrid_set_drop|cubrid_unbuffered_query|cubrid_version|curl_close|curl_copy_handle|curl_errno|curl_error|curl_exec|curl_getinfo|curl_init|curl_multi_add_handle|curl_multi_close|curl_multi_exec|curl_multi_getcontent|curl_multi_info_read|curl_multi_init|curl_multi_remove_handle|curl_multi_select|curl_setopt|curl_setopt_array|curl_version|current|cyrus_authenticate|cyrus_bind|cyrus_close|cyrus_connect|cyrus_query|cyrus_unbind|date|date_add|date_create|date_create_from_format|date_date_set|date_default_timezone_get|date_default_timezone_set|date_diff|date_format|date_get_last_errors|date_interval_create_from_date_string|date_interval_format|date_isodate_set|date_modify|date_offset_get|date_parse|date_parse_from_format|date_sub|date_sun_info|date_sunrise|date_sunset|date_time_set|date_timestamp_get|date_timestamp_set|date_timezone_get|date_timezone_set|dateinterval|dateperiod|datetime|datetimezone|db2_autocommit|db2_bind_param|db2_client_info|db2_close|db2_column_privileges|db2_columns|db2_commit|db2_conn_error|db2_conn_errormsg|db2_connect|db2_cursor_type|db2_escape_string|db2_exec|db2_execute|db2_fetch_array|db2_fetch_assoc|db2_fetch_both|db2_fetch_object|db2_fetch_row|db2_field_display_size|db2_field_name|db2_field_num|db2_field_precision|db2_field_scale|db2_field_type|db2_field_width|db2_foreign_keys|db2_free_result|db2_free_stmt|db2_get_option|db2_last_insert_id|db2_lob_read|db2_next_result|db2_num_fields|db2_num_rows|db2_pclose|db2_pconnect|db2_prepare|db2_primary_keys|db2_procedure_columns|db2_procedures|db2_result|db2_rollback|db2_server_info|db2_set_option|db2_special_columns|db2_statistics|db2_stmt_error|db2_stmt_errormsg|db2_table_privileges|db2_tables|dba_close|dba_delete|dba_exists|dba_fetch|dba_firstkey|dba_handlers|dba_insert|dba_key_split|dba_list|dba_nextkey|dba_open|dba_optimize|dba_popen|dba_replace|dba_sync|dbase_add_record|dbase_close|dbase_create|dbase_delete_record|dbase_get_header_info|dbase_get_record|dbase_get_record_with_names|dbase_numfields|dbase_numrecords|dbase_open|dbase_pack|dbase_replace_record|dbplus_add|dbplus_aql|dbplus_chdir|dbplus_close|dbplus_curr|dbplus_errcode|dbplus_errno|dbplus_find|dbplus_first|dbplus_flush|dbplus_freealllocks|dbplus_freelock|dbplus_freerlocks|dbplus_getlock|dbplus_getunique|dbplus_info|dbplus_last|dbplus_lockrel|dbplus_next|dbplus_open|dbplus_prev|dbplus_rchperm|dbplus_rcreate|dbplus_rcrtexact|dbplus_rcrtlike|dbplus_resolve|dbplus_restorepos|dbplus_rkeys|dbplus_ropen|dbplus_rquery|dbplus_rrename|dbplus_rsecindex|dbplus_runlink|dbplus_rzap|dbplus_savepos|dbplus_setindex|dbplus_setindexbynumber|dbplus_sql|dbplus_tcl|dbplus_tremove|dbplus_undo|dbplus_undoprepare|dbplus_unlockrel|dbplus_unselect|dbplus_update|dbplus_xlockrel|dbplus_xunlockrel|dbx_close|dbx_compare|dbx_connect|dbx_error|dbx_escape_string|dbx_fetch_row|dbx_query|dbx_sort|dcgettext|dcngettext|deaggregate|debug_backtrace|debug_print_backtrace|debug_zval_dump|decbin|dechex|decoct|define|define_syslog_variables|defined|deg2rad|delete|dgettext|die|dio_close|dio_fcntl|dio_open|dio_read|dio_seek|dio_stat|dio_tcsetattr|dio_truncate|dio_write|dir|directoryiterator|dirname|disk_free_space|disk_total_space|diskfreespace|dl|dngettext|dns_check_record|dns_get_mx|dns_get_record|dom_import_simplexml|domainexception|domattr|domattribute_name|domattribute_set_value|domattribute_specified|domattribute_value|domcharacterdata|domcomment|domdocument|domdocument_add_root|domdocument_create_attribute|domdocument_create_cdata_section|domdocument_create_comment|domdocument_create_element|domdocument_create_element_ns|domdocument_create_entity_reference|domdocument_create_processing_instruction|domdocument_create_text_node|domdocument_doctype|domdocument_document_element|domdocument_dump_file|domdocument_dump_mem|domdocument_get_element_by_id|domdocument_get_elements_by_tagname|domdocument_html_dump_mem|domdocument_xinclude|domdocumentfragment|domdocumenttype|domdocumenttype_entities|domdocumenttype_internal_subset|domdocumenttype_name|domdocumenttype_notations|domdocumenttype_public_id|domdocumenttype_system_id|domelement|domelement_get_attribute|domelement_get_attribute_node|domelement_get_elements_by_tagname|domelement_has_attribute|domelement_remove_attribute|domelement_set_attribute|domelement_set_attribute_node|domelement_tagname|domentity|domentityreference|domexception|domimplementation|domnamednodemap|domnode|domnode_add_namespace|domnode_append_child|domnode_append_sibling|domnode_attributes|domnode_child_nodes|domnode_clone_node|domnode_dump_node|domnode_first_child|domnode_get_content|domnode_has_attributes|domnode_has_child_nodes|domnode_insert_before|domnode_is_blank_node|domnode_last_child|domnode_next_sibling|domnode_node_name|domnode_node_type|domnode_node_value|domnode_owner_document|domnode_parent_node|domnode_prefix|domnode_previous_sibling|domnode_remove_child|domnode_replace_child|domnode_replace_node|domnode_set_content|domnode_set_name|domnode_set_namespace|domnode_unlink_node|domnodelist|domnotation|domprocessinginstruction|domprocessinginstruction_data|domprocessinginstruction_target|domtext|domxml_new_doc|domxml_open_file|domxml_open_mem|domxml_version|domxml_xmltree|domxml_xslt_stylesheet|domxml_xslt_stylesheet_doc|domxml_xslt_stylesheet_file|domxml_xslt_version|domxpath|domxsltstylesheet_process|domxsltstylesheet_result_dump_file|domxsltstylesheet_result_dump_mem|dotnet|dotnet_load|doubleval|each|easter_date|easter_days|echo|empty|emptyiterator|enchant_broker_describe|enchant_broker_dict_exists|enchant_broker_free|enchant_broker_free_dict|enchant_broker_get_error|enchant_broker_init|enchant_broker_list_dicts|enchant_broker_request_dict|enchant_broker_request_pwl_dict|enchant_broker_set_ordering|enchant_dict_add_to_personal|enchant_dict_add_to_session|enchant_dict_check|enchant_dict_describe|enchant_dict_get_error|enchant_dict_is_in_session|enchant_dict_quick_check|enchant_dict_store_replacement|enchant_dict_suggest|end|ereg|ereg_replace|eregi|eregi_replace|error_get_last|error_log|error_reporting|errorexception|escapeshellarg|escapeshellcmd|eval|event_add|event_base_free|event_base_loop|event_base_loopbreak|event_base_loopexit|event_base_new|event_base_priority_init|event_base_set|event_buffer_base_set|event_buffer_disable|event_buffer_enable|event_buffer_fd_set|event_buffer_free|event_buffer_new|event_buffer_priority_set|event_buffer_read|event_buffer_set_callback|event_buffer_timeout_set|event_buffer_watermark_set|event_buffer_write|event_del|event_free|event_new|event_set|exception|exec|exif_imagetype|exif_read_data|exif_tagname|exif_thumbnail|exit|exp|expect_expectl|expect_popen|explode|expm1|export|export|extension_loaded|extract|ezmlm_hash|fam_cancel_monitor|fam_close|fam_monitor_collection|fam_monitor_directory|fam_monitor_file|fam_next_event|fam_open|fam_pending|fam_resume_monitor|fam_suspend_monitor|fbsql_affected_rows|fbsql_autocommit|fbsql_blob_size|fbsql_change_user|fbsql_clob_size|fbsql_close|fbsql_commit|fbsql_connect|fbsql_create_blob|fbsql_create_clob|fbsql_create_db|fbsql_data_seek|fbsql_database|fbsql_database_password|fbsql_db_query|fbsql_db_status|fbsql_drop_db|fbsql_errno|fbsql_error|fbsql_fetch_array|fbsql_fetch_assoc|fbsql_fetch_field|fbsql_fetch_lengths|fbsql_fetch_object|fbsql_fetch_row|fbsql_field_flags|fbsql_field_len|fbsql_field_name|fbsql_field_seek|fbsql_field_table|fbsql_field_type|fbsql_free_result|fbsql_get_autostart_info|fbsql_hostname|fbsql_insert_id|fbsql_list_dbs|fbsql_list_fields|fbsql_list_tables|fbsql_next_result|fbsql_num_fields|fbsql_num_rows|fbsql_password|fbsql_pconnect|fbsql_query|fbsql_read_blob|fbsql_read_clob|fbsql_result|fbsql_rollback|fbsql_rows_fetched|fbsql_select_db|fbsql_set_characterset|fbsql_set_lob_mode|fbsql_set_password|fbsql_set_transaction|fbsql_start_db|fbsql_stop_db|fbsql_table_name|fbsql_tablename|fbsql_username|fbsql_warnings|fclose|fdf_add_doc_javascript|fdf_add_template|fdf_close|fdf_create|fdf_enum_values|fdf_errno|fdf_error|fdf_get_ap|fdf_get_attachment|fdf_get_encoding|fdf_get_file|fdf_get_flags|fdf_get_opt|fdf_get_status|fdf_get_value|fdf_get_version|fdf_header|fdf_next_field_name|fdf_open|fdf_open_string|fdf_remove_item|fdf_save|fdf_save_string|fdf_set_ap|fdf_set_encoding|fdf_set_file|fdf_set_flags|fdf_set_javascript_action|fdf_set_on_import_javascript|fdf_set_opt|fdf_set_status|fdf_set_submit_form_action|fdf_set_target_frame|fdf_set_value|fdf_set_version|feof|fflush|fgetc|fgetcsv|fgets|fgetss|file|file_exists|file_get_contents|file_put_contents|fileatime|filectime|filegroup|fileinode|filemtime|fileowner|fileperms|filepro|filepro_fieldcount|filepro_fieldname|filepro_fieldtype|filepro_fieldwidth|filepro_retrieve|filepro_rowcount|filesize|filesystemiterator|filetype|filter_has_var|filter_id|filter_input|filter_input_array|filter_list|filter_var|filter_var_array|filteriterator|finfo_buffer|finfo_close|finfo_file|finfo_open|finfo_set_flags|floatval|flock|floor|flush|fmod|fnmatch|fopen|forward_static_call|forward_static_call_array|fpassthru|fprintf|fputcsv|fputs|fread|frenchtojd|fribidi_log2vis|fscanf|fseek|fsockopen|fstat|ftell|ftok|ftp_alloc|ftp_cdup|ftp_chdir|ftp_chmod|ftp_close|ftp_connect|ftp_delete|ftp_exec|ftp_fget|ftp_fput|ftp_get|ftp_get_option|ftp_login|ftp_mdtm|ftp_mkdir|ftp_nb_continue|ftp_nb_fget|ftp_nb_fput|ftp_nb_get|ftp_nb_put|ftp_nlist|ftp_pasv|ftp_put|ftp_pwd|ftp_quit|ftp_raw|ftp_rawlist|ftp_rename|ftp_rmdir|ftp_set_option|ftp_site|ftp_size|ftp_ssl_connect|ftp_systype|ftruncate|func_get_arg|func_get_args|func_num_args|function_exists|fwrite|gc_collect_cycles|gc_disable|gc_enable|gc_enabled|gd_info|gearmanclient|gearmanjob|gearmantask|gearmanworker|geoip_continent_code_by_name|geoip_country_code3_by_name|geoip_country_code_by_name|geoip_country_name_by_name|geoip_database_info|geoip_db_avail|geoip_db_filename|geoip_db_get_all_info|geoip_id_by_name|geoip_isp_by_name|geoip_org_by_name|geoip_record_by_name|geoip_region_by_name|geoip_region_name_by_code|geoip_time_zone_by_country_and_region|getMeta|getNamed|getValue|get_browser|get_called_class|get_cfg_var|get_class|get_class_methods|get_class_vars|get_current_user|get_declared_classes|get_declared_interfaces|get_defined_constants|get_defined_functions|get_defined_vars|get_extension_funcs|get_headers|get_html_translation_table|get_include_path|get_included_files|get_loaded_extensions|get_magic_quotes_gpc|get_magic_quotes_runtime|get_meta_tags|get_object_vars|get_parent_class|get_required_files|get_resource_type|getallheaders|getconstant|getconstants|getconstructor|getcwd|getdate|getdefaultproperties|getdoccomment|getendline|getenv|getextension|getextensionname|getfilename|gethostbyaddr|gethostbyname|gethostbynamel|gethostname|getimagesize|getinterfacenames|getinterfaces|getlastmod|getmethod|getmethods|getmodifiers|getmxrr|getmygid|getmyinode|getmypid|getmyuid|getname|getnamespacename|getopt|getparentclass|getproperties|getproperty|getprotobyname|getprotobynumber|getrandmax|getrusage|getservbyname|getservbyport|getshortname|getstartline|getstaticproperties|getstaticpropertyvalue|gettext|gettimeofday|gettype|glob|globiterator|gmagick|gmagickdraw|gmagickpixel|gmdate|gmmktime|gmp_abs|gmp_add|gmp_and|gmp_clrbit|gmp_cmp|gmp_com|gmp_div|gmp_div_q|gmp_div_qr|gmp_div_r|gmp_divexact|gmp_fact|gmp_gcd|gmp_gcdext|gmp_hamdist|gmp_init|gmp_intval|gmp_invert|gmp_jacobi|gmp_legendre|gmp_mod|gmp_mul|gmp_neg|gmp_nextprime|gmp_or|gmp_perfect_square|gmp_popcount|gmp_pow|gmp_powm|gmp_prob_prime|gmp_random|gmp_scan0|gmp_scan1|gmp_setbit|gmp_sign|gmp_sqrt|gmp_sqrtrem|gmp_strval|gmp_sub|gmp_testbit|gmp_xor|gmstrftime|gnupg_adddecryptkey|gnupg_addencryptkey|gnupg_addsignkey|gnupg_cleardecryptkeys|gnupg_clearencryptkeys|gnupg_clearsignkeys|gnupg_decrypt|gnupg_decryptverify|gnupg_encrypt|gnupg_encryptsign|gnupg_export|gnupg_geterror|gnupg_getprotocol|gnupg_import|gnupg_init|gnupg_keyinfo|gnupg_setarmor|gnupg_seterrormode|gnupg_setsignmode|gnupg_sign|gnupg_verify|gopher_parsedir|grapheme_extract|grapheme_stripos|grapheme_stristr|grapheme_strlen|grapheme_strpos|grapheme_strripos|grapheme_strrpos|grapheme_strstr|grapheme_substr|gregoriantojd|gupnp_context_get_host_ip|gupnp_context_get_port|gupnp_context_get_subscription_timeout|gupnp_context_host_path|gupnp_context_new|gupnp_context_set_subscription_timeout|gupnp_context_timeout_add|gupnp_context_unhost_path|gupnp_control_point_browse_start|gupnp_control_point_browse_stop|gupnp_control_point_callback_set|gupnp_control_point_new|gupnp_device_action_callback_set|gupnp_device_info_get|gupnp_device_info_get_service|gupnp_root_device_get_available|gupnp_root_device_get_relative_location|gupnp_root_device_new|gupnp_root_device_set_available|gupnp_root_device_start|gupnp_root_device_stop|gupnp_service_action_get|gupnp_service_action_return|gupnp_service_action_return_error|gupnp_service_action_set|gupnp_service_freeze_notify|gupnp_service_info_get|gupnp_service_info_get_introspection|gupnp_service_introspection_get_state_variable|gupnp_service_notify|gupnp_service_proxy_action_get|gupnp_service_proxy_action_set|gupnp_service_proxy_add_notify|gupnp_service_proxy_callback_set|gupnp_service_proxy_get_subscribed|gupnp_service_proxy_remove_notify|gupnp_service_proxy_set_subscribed|gupnp_service_thaw_notify|gzclose|gzcompress|gzdecode|gzdeflate|gzencode|gzeof|gzfile|gzgetc|gzgets|gzgetss|gzinflate|gzopen|gzpassthru|gzputs|gzread|gzrewind|gzseek|gztell|gzuncompress|gzwrite|halt_compiler|haruannotation|haruannotation_setborderstyle|haruannotation_sethighlightmode|haruannotation_seticon|haruannotation_setopened|harudestination|harudestination_setfit|harudestination_setfitb|harudestination_setfitbh|harudestination_setfitbv|harudestination_setfith|harudestination_setfitr|harudestination_setfitv|harudestination_setxyz|harudoc|harudoc_addpage|harudoc_addpagelabel|harudoc_construct|harudoc_createoutline|harudoc_getcurrentencoder|harudoc_getcurrentpage|harudoc_getencoder|harudoc_getfont|harudoc_getinfoattr|harudoc_getpagelayout|harudoc_getpagemode|harudoc_getstreamsize|harudoc_insertpage|harudoc_loadjpeg|harudoc_loadpng|harudoc_loadraw|harudoc_loadttc|harudoc_loadttf|harudoc_loadtype1|harudoc_output|harudoc_readfromstream|harudoc_reseterror|harudoc_resetstream|harudoc_save|harudoc_savetostream|harudoc_setcompressionmode|harudoc_setcurrentencoder|harudoc_setencryptionmode|harudoc_setinfoattr|harudoc_setinfodateattr|harudoc_setopenaction|harudoc_setpagelayout|harudoc_setpagemode|harudoc_setpagesconfiguration|harudoc_setpassword|harudoc_setpermission|harudoc_usecnsencodings|harudoc_usecnsfonts|harudoc_usecntencodings|harudoc_usecntfonts|harudoc_usejpencodings|harudoc_usejpfonts|harudoc_usekrencodings|harudoc_usekrfonts|haruencoder|haruencoder_getbytetype|haruencoder_gettype|haruencoder_getunicode|haruencoder_getwritingmode|haruexception|harufont|harufont_getascent|harufont_getcapheight|harufont_getdescent|harufont_getencodingname|harufont_getfontname|harufont_gettextwidth|harufont_getunicodewidth|harufont_getxheight|harufont_measuretext|haruimage|haruimage_getbitspercomponent|haruimage_getcolorspace|haruimage_getheight|haruimage_getsize|haruimage_getwidth|haruimage_setcolormask|haruimage_setmaskimage|haruoutline|haruoutline_setdestination|haruoutline_setopened|harupage|harupage_arc|harupage_begintext|harupage_circle|harupage_closepath|harupage_concat|harupage_createdestination|harupage_createlinkannotation|harupage_createtextannotation|harupage_createurlannotation|harupage_curveto|harupage_curveto2|harupage_curveto3|harupage_drawimage|harupage_ellipse|harupage_endpath|harupage_endtext|harupage_eofill|harupage_eofillstroke|harupage_fill|harupage_fillstroke|harupage_getcharspace|harupage_getcmykfill|harupage_getcmykstroke|harupage_getcurrentfont|harupage_getcurrentfontsize|harupage_getcurrentpos|harupage_getcurrenttextpos|harupage_getdash|harupage_getfillingcolorspace|harupage_getflatness|harupage_getgmode|harupage_getgrayfill|harupage_getgraystroke|harupage_getheight|harupage_gethorizontalscaling|harupage_getlinecap|harupage_getlinejoin|harupage_getlinewidth|harupage_getmiterlimit|harupage_getrgbfill|harupage_getrgbstroke|harupage_getstrokingcolorspace|harupage_gettextleading|harupage_gettextmatrix|harupage_gettextrenderingmode|harupage_gettextrise|harupage_gettextwidth|harupage_gettransmatrix|harupage_getwidth|harupage_getwordspace|harupage_lineto|harupage_measuretext|harupage_movetextpos|harupage_moveto|harupage_movetonextline|harupage_rectangle|harupage_setcharspace|harupage_setcmykfill|harupage_setcmykstroke|harupage_setdash|harupage_setflatness|harupage_setfontandsize|harupage_setgrayfill|harupage_setgraystroke|harupage_setheight|harupage_sethorizontalscaling|harupage_setlinecap|harupage_setlinejoin|harupage_setlinewidth|harupage_setmiterlimit|harupage_setrgbfill|harupage_setrgbstroke|harupage_setrotate|harupage_setsize|harupage_setslideshow|harupage_settextleading|harupage_settextmatrix|harupage_settextrenderingmode|harupage_settextrise|harupage_setwidth|harupage_setwordspace|harupage_showtext|harupage_showtextnextline|harupage_stroke|harupage_textout|harupage_textrect|hasconstant|hash|hash_algos|hash_copy|hash_file|hash_final|hash_hmac|hash_hmac_file|hash_init|hash_update|hash_update_file|hash_update_stream|hasmethod|hasproperty|header|header_register_callback|header_remove|headers_list|headers_sent|hebrev|hebrevc|hex2bin|hexdec|highlight_file|highlight_string|html_entity_decode|htmlentities|htmlspecialchars|htmlspecialchars_decode|http_build_cookie|http_build_query|http_build_str|http_build_url|http_cache_etag|http_cache_last_modified|http_chunked_decode|http_date|http_deflate|http_get|http_get_request_body|http_get_request_body_stream|http_get_request_headers|http_head|http_inflate|http_match_etag|http_match_modified|http_match_request_header|http_negotiate_charset|http_negotiate_content_type|http_negotiate_language|http_parse_cookie|http_parse_headers|http_parse_message|http_parse_params|http_persistent_handles_clean|http_persistent_handles_count|http_persistent_handles_ident|http_post_data|http_post_fields|http_put_data|http_put_file|http_put_stream|http_redirect|http_request|http_request_body_encode|http_request_method_exists|http_request_method_name|http_request_method_register|http_request_method_unregister|http_response_code|http_send_content_disposition|http_send_content_type|http_send_data|http_send_file|http_send_last_modified|http_send_status|http_send_stream|http_support|http_throttle|httpdeflatestream|httpdeflatestream_construct|httpdeflatestream_factory|httpdeflatestream_finish|httpdeflatestream_flush|httpdeflatestream_update|httpinflatestream|httpinflatestream_construct|httpinflatestream_factory|httpinflatestream_finish|httpinflatestream_flush|httpinflatestream_update|httpmessage|httpmessage_addheaders|httpmessage_construct|httpmessage_detach|httpmessage_factory|httpmessage_fromenv|httpmessage_fromstring|httpmessage_getbody|httpmessage_getheader|httpmessage_getheaders|httpmessage_gethttpversion|httpmessage_getparentmessage|httpmessage_getrequestmethod|httpmessage_getrequesturl|httpmessage_getresponsecode|httpmessage_getresponsestatus|httpmessage_gettype|httpmessage_guesscontenttype|httpmessage_prepend|httpmessage_reverse|httpmessage_send|httpmessage_setbody|httpmessage_setheaders|httpmessage_sethttpversion|httpmessage_setrequestmethod|httpmessage_setrequesturl|httpmessage_setresponsecode|httpmessage_setresponsestatus|httpmessage_settype|httpmessage_tomessagetypeobject|httpmessage_tostring|httpquerystring|httpquerystring_construct|httpquerystring_get|httpquerystring_mod|httpquerystring_set|httpquerystring_singleton|httpquerystring_toarray|httpquerystring_tostring|httpquerystring_xlate|httprequest|httprequest_addcookies|httprequest_addheaders|httprequest_addpostfields|httprequest_addpostfile|httprequest_addputdata|httprequest_addquerydata|httprequest_addrawpostdata|httprequest_addssloptions|httprequest_clearhistory|httprequest_construct|httprequest_enablecookies|httprequest_getcontenttype|httprequest_getcookies|httprequest_getheaders|httprequest_gethistory|httprequest_getmethod|httprequest_getoptions|httprequest_getpostfields|httprequest_getpostfiles|httprequest_getputdata|httprequest_getputfile|httprequest_getquerydata|httprequest_getrawpostdata|httprequest_getrawrequestmessage|httprequest_getrawresponsemessage|httprequest_getrequestmessage|httprequest_getresponsebody|httprequest_getresponsecode|httprequest_getresponsecookies|httprequest_getresponsedata|httprequest_getresponseheader|httprequest_getresponseinfo|httprequest_getresponsemessage|httprequest_getresponsestatus|httprequest_getssloptions|httprequest_geturl|httprequest_resetcookies|httprequest_send|httprequest_setcontenttype|httprequest_setcookies|httprequest_setheaders|httprequest_setmethod|httprequest_setoptions|httprequest_setpostfields|httprequest_setpostfiles|httprequest_setputdata|httprequest_setputfile|httprequest_setquerydata|httprequest_setrawpostdata|httprequest_setssloptions|httprequest_seturl|httprequestpool|httprequestpool_attach|httprequestpool_construct|httprequestpool_destruct|httprequestpool_detach|httprequestpool_getattachedrequests|httprequestpool_getfinishedrequests|httprequestpool_reset|httprequestpool_send|httprequestpool_socketperform|httprequestpool_socketselect|httpresponse|httpresponse_capture|httpresponse_getbuffersize|httpresponse_getcache|httpresponse_getcachecontrol|httpresponse_getcontentdisposition|httpresponse_getcontenttype|httpresponse_getdata|httpresponse_getetag|httpresponse_getfile|httpresponse_getgzip|httpresponse_getheader|httpresponse_getlastmodified|httpresponse_getrequestbody|httpresponse_getrequestbodystream|httpresponse_getrequestheaders|httpresponse_getstream|httpresponse_getthrottledelay|httpresponse_guesscontenttype|httpresponse_redirect|httpresponse_send|httpresponse_setbuffersize|httpresponse_setcache|httpresponse_setcachecontrol|httpresponse_setcontentdisposition|httpresponse_setcontenttype|httpresponse_setdata|httpresponse_setetag|httpresponse_setfile|httpresponse_setgzip|httpresponse_setheader|httpresponse_setlastmodified|httpresponse_setstream|httpresponse_setthrottledelay|httpresponse_status|hw_array2objrec|hw_changeobject|hw_children|hw_childrenobj|hw_close|hw_connect|hw_connection_info|hw_cp|hw_deleteobject|hw_docbyanchor|hw_docbyanchorobj|hw_document_attributes|hw_document_bodytag|hw_document_content|hw_document_setcontent|hw_document_size|hw_dummy|hw_edittext|hw_error|hw_errormsg|hw_free_document|hw_getanchors|hw_getanchorsobj|hw_getandlock|hw_getchildcoll|hw_getchildcollobj|hw_getchilddoccoll|hw_getchilddoccollobj|hw_getobject|hw_getobjectbyquery|hw_getobjectbyquerycoll|hw_getobjectbyquerycollobj|hw_getobjectbyqueryobj|hw_getparents|hw_getparentsobj|hw_getrellink|hw_getremote|hw_getremotechildren|hw_getsrcbydestobj|hw_gettext|hw_getusername|hw_identify|hw_incollections|hw_info|hw_inscoll|hw_insdoc|hw_insertanchors|hw_insertdocument|hw_insertobject|hw_mapid|hw_modifyobject|hw_mv|hw_new_document|hw_objrec2array|hw_output_document|hw_pconnect|hw_pipedocument|hw_root|hw_setlinkroot|hw_stat|hw_unlock|hw_who|hwapi_attribute|hwapi_attribute_key|hwapi_attribute_langdepvalue|hwapi_attribute_value|hwapi_attribute_values|hwapi_checkin|hwapi_checkout|hwapi_children|hwapi_content|hwapi_content_mimetype|hwapi_content_read|hwapi_copy|hwapi_dbstat|hwapi_dcstat|hwapi_dstanchors|hwapi_dstofsrcanchor|hwapi_error_count|hwapi_error_reason|hwapi_find|hwapi_ftstat|hwapi_hgcsp|hwapi_hwstat|hwapi_identify|hwapi_info|hwapi_insert|hwapi_insertanchor|hwapi_insertcollection|hwapi_insertdocument|hwapi_link|hwapi_lock|hwapi_move|hwapi_new_content|hwapi_object|hwapi_object_assign|hwapi_object_attreditable|hwapi_object_count|hwapi_object_insert|hwapi_object_new|hwapi_object_remove|hwapi_object_title|hwapi_object_value|hwapi_objectbyanchor|hwapi_parents|hwapi_reason_description|hwapi_reason_type|hwapi_remove|hwapi_replace|hwapi_setcommittedversion|hwapi_srcanchors|hwapi_srcsofdst|hwapi_unlock|hwapi_user|hwapi_userlist|hypot|ibase_add_user|ibase_affected_rows|ibase_backup|ibase_blob_add|ibase_blob_cancel|ibase_blob_close|ibase_blob_create|ibase_blob_echo|ibase_blob_get|ibase_blob_import|ibase_blob_info|ibase_blob_open|ibase_close|ibase_commit|ibase_commit_ret|ibase_connect|ibase_db_info|ibase_delete_user|ibase_drop_db|ibase_errcode|ibase_errmsg|ibase_execute|ibase_fetch_assoc|ibase_fetch_object|ibase_fetch_row|ibase_field_info|ibase_free_event_handler|ibase_free_query|ibase_free_result|ibase_gen_id|ibase_maintain_db|ibase_modify_user|ibase_name_result|ibase_num_fields|ibase_num_params|ibase_param_info|ibase_pconnect|ibase_prepare|ibase_query|ibase_restore|ibase_rollback|ibase_rollback_ret|ibase_server_info|ibase_service_attach|ibase_service_detach|ibase_set_event_handler|ibase_timefmt|ibase_trans|ibase_wait_event|iconv|iconv_get_encoding|iconv_mime_decode|iconv_mime_decode_headers|iconv_mime_encode|iconv_set_encoding|iconv_strlen|iconv_strpos|iconv_strrpos|iconv_substr|id3_get_frame_long_name|id3_get_frame_short_name|id3_get_genre_id|id3_get_genre_list|id3_get_genre_name|id3_get_tag|id3_get_version|id3_remove_tag|id3_set_tag|id3v2attachedpictureframe|id3v2frame|id3v2tag|idate|idn_to_ascii|idn_to_unicode|idn_to_utf8|ifx_affected_rows|ifx_blobinfile_mode|ifx_byteasvarchar|ifx_close|ifx_connect|ifx_copy_blob|ifx_create_blob|ifx_create_char|ifx_do|ifx_error|ifx_errormsg|ifx_fetch_row|ifx_fieldproperties|ifx_fieldtypes|ifx_free_blob|ifx_free_char|ifx_free_result|ifx_get_blob|ifx_get_char|ifx_getsqlca|ifx_htmltbl_result|ifx_nullformat|ifx_num_fields|ifx_num_rows|ifx_pconnect|ifx_prepare|ifx_query|ifx_textasvarchar|ifx_update_blob|ifx_update_char|ifxus_close_slob|ifxus_create_slob|ifxus_free_slob|ifxus_open_slob|ifxus_read_slob|ifxus_seek_slob|ifxus_tell_slob|ifxus_write_slob|ignore_user_abort|iis_add_server|iis_get_dir_security|iis_get_script_map|iis_get_server_by_comment|iis_get_server_by_path|iis_get_server_rights|iis_get_service_state|iis_remove_server|iis_set_app_settings|iis_set_dir_security|iis_set_script_map|iis_set_server_rights|iis_start_server|iis_start_service|iis_stop_server|iis_stop_service|image2wbmp|image_type_to_extension|image_type_to_mime_type|imagealphablending|imageantialias|imagearc|imagechar|imagecharup|imagecolorallocate|imagecolorallocatealpha|imagecolorat|imagecolorclosest|imagecolorclosestalpha|imagecolorclosesthwb|imagecolordeallocate|imagecolorexact|imagecolorexactalpha|imagecolormatch|imagecolorresolve|imagecolorresolvealpha|imagecolorset|imagecolorsforindex|imagecolorstotal|imagecolortransparent|imageconvolution|imagecopy|imagecopymerge|imagecopymergegray|imagecopyresampled|imagecopyresized|imagecreate|imagecreatefromgd|imagecreatefromgd2|imagecreatefromgd2part|imagecreatefromgif|imagecreatefromjpeg|imagecreatefrompng|imagecreatefromstring|imagecreatefromwbmp|imagecreatefromxbm|imagecreatefromxpm|imagecreatetruecolor|imagedashedline|imagedestroy|imageellipse|imagefill|imagefilledarc|imagefilledellipse|imagefilledpolygon|imagefilledrectangle|imagefilltoborder|imagefilter|imagefontheight|imagefontwidth|imageftbbox|imagefttext|imagegammacorrect|imagegd|imagegd2|imagegif|imagegrabscreen|imagegrabwindow|imageinterlace|imageistruecolor|imagejpeg|imagelayereffect|imageline|imageloadfont|imagepalettecopy|imagepng|imagepolygon|imagepsbbox|imagepsencodefont|imagepsextendfont|imagepsfreefont|imagepsloadfont|imagepsslantfont|imagepstext|imagerectangle|imagerotate|imagesavealpha|imagesetbrush|imagesetpixel|imagesetstyle|imagesetthickness|imagesettile|imagestring|imagestringup|imagesx|imagesy|imagetruecolortopalette|imagettfbbox|imagettftext|imagetypes|imagewbmp|imagexbm|imagick|imagick_adaptiveblurimage|imagick_adaptiveresizeimage|imagick_adaptivesharpenimage|imagick_adaptivethresholdimage|imagick_addimage|imagick_addnoiseimage|imagick_affinetransformimage|imagick_animateimages|imagick_annotateimage|imagick_appendimages|imagick_averageimages|imagick_blackthresholdimage|imagick_blurimage|imagick_borderimage|imagick_charcoalimage|imagick_chopimage|imagick_clear|imagick_clipimage|imagick_clippathimage|imagick_clone|imagick_clutimage|imagick_coalesceimages|imagick_colorfloodfillimage|imagick_colorizeimage|imagick_combineimages|imagick_commentimage|imagick_compareimagechannels|imagick_compareimagelayers|imagick_compareimages|imagick_compositeimage|imagick_construct|imagick_contrastimage|imagick_contraststretchimage|imagick_convolveimage|imagick_cropimage|imagick_cropthumbnailimage|imagick_current|imagick_cyclecolormapimage|imagick_decipherimage|imagick_deconstructimages|imagick_deleteimageartifact|imagick_despeckleimage|imagick_destroy|imagick_displayimage|imagick_displayimages|imagick_distortimage|imagick_drawimage|imagick_edgeimage|imagick_embossimage|imagick_encipherimage|imagick_enhanceimage|imagick_equalizeimage|imagick_evaluateimage|imagick_extentimage|imagick_flattenimages|imagick_flipimage|imagick_floodfillpaintimage|imagick_flopimage|imagick_frameimage|imagick_fximage|imagick_gammaimage|imagick_gaussianblurimage|imagick_getcolorspace|imagick_getcompression|imagick_getcompressionquality|imagick_getcopyright|imagick_getfilename|imagick_getfont|imagick_getformat|imagick_getgravity|imagick_gethomeurl|imagick_getimage|imagick_getimagealphachannel|imagick_getimageartifact|imagick_getimagebackgroundcolor|imagick_getimageblob|imagick_getimageblueprimary|imagick_getimagebordercolor|imagick_getimagechanneldepth|imagick_getimagechanneldistortion|imagick_getimagechanneldistortions|imagick_getimagechannelextrema|imagick_getimagechannelmean|imagick_getimagechannelrange|imagick_getimagechannelstatistics|imagick_getimageclipmask|imagick_getimagecolormapcolor|imagick_getimagecolors|imagick_getimagecolorspace|imagick_getimagecompose|imagick_getimagecompression|imagick_getimagecompressionquality|imagick_getimagedelay|imagick_getimagedepth|imagick_getimagedispose|imagick_getimagedistortion|imagick_getimageextrema|imagick_getimagefilename|imagick_getimageformat|imagick_getimagegamma|imagick_getimagegeometry|imagick_getimagegravity|imagick_getimagegreenprimary|imagick_getimageheight|imagick_getimagehistogram|imagick_getimageindex|imagick_getimageinterlacescheme|imagick_getimageinterpolatemethod|imagick_getimageiterations|imagick_getimagelength|imagick_getimagemagicklicense|imagick_getimagematte|imagick_getimagemattecolor|imagick_getimageorientation|imagick_getimagepage|imagick_getimagepixelcolor|imagick_getimageprofile|imagick_getimageprofiles|imagick_getimageproperties|imagick_getimageproperty|imagick_getimageredprimary|imagick_getimageregion|imagick_getimagerenderingintent|imagick_getimageresolution|imagick_getimagesblob|imagick_getimagescene|imagick_getimagesignature|imagick_getimagesize|imagick_getimagetickspersecond|imagick_getimagetotalinkdensity|imagick_getimagetype|imagick_getimageunits|imagick_getimagevirtualpixelmethod|imagick_getimagewhitepoint|imagick_getimagewidth|imagick_getinterlacescheme|imagick_getiteratorindex|imagick_getnumberimages|imagick_getoption|imagick_getpackagename|imagick_getpage|imagick_getpixeliterator|imagick_getpixelregioniterator|imagick_getpointsize|imagick_getquantumdepth|imagick_getquantumrange|imagick_getreleasedate|imagick_getresource|imagick_getresourcelimit|imagick_getsamplingfactors|imagick_getsize|imagick_getsizeoffset|imagick_getversion|imagick_hasnextimage|imagick_haspreviousimage|imagick_identifyimage|imagick_implodeimage|imagick_labelimage|imagick_levelimage|imagick_linearstretchimage|imagick_liquidrescaleimage|imagick_magnifyimage|imagick_mapimage|imagick_mattefloodfillimage|imagick_medianfilterimage|imagick_mergeimagelayers|imagick_minifyimage|imagick_modulateimage|imagick_montageimage|imagick_morphimages|imagick_mosaicimages|imagick_motionblurimage|imagick_negateimage|imagick_newimage|imagick_newpseudoimage|imagick_nextimage|imagick_normalizeimage|imagick_oilpaintimage|imagick_opaquepaintimage|imagick_optimizeimagelayers|imagick_orderedposterizeimage|imagick_paintfloodfillimage|imagick_paintopaqueimage|imagick_painttransparentimage|imagick_pingimage|imagick_pingimageblob|imagick_pingimagefile|imagick_polaroidimage|imagick_posterizeimage|imagick_previewimages|imagick_previousimage|imagick_profileimage|imagick_quantizeimage|imagick_quantizeimages|imagick_queryfontmetrics|imagick_queryfonts|imagick_queryformats|imagick_radialblurimage|imagick_raiseimage|imagick_randomthresholdimage|imagick_readimage|imagick_readimageblob|imagick_readimagefile|imagick_recolorimage|imagick_reducenoiseimage|imagick_removeimage|imagick_removeimageprofile|imagick_render|imagick_resampleimage|imagick_resetimagepage|imagick_resizeimage|imagick_rollimage|imagick_rotateimage|imagick_roundcorners|imagick_sampleimage|imagick_scaleimage|imagick_separateimagechannel|imagick_sepiatoneimage|imagick_setbackgroundcolor|imagick_setcolorspace|imagick_setcompression|imagick_setcompressionquality|imagick_setfilename|imagick_setfirstiterator|imagick_setfont|imagick_setformat|imagick_setgravity|imagick_setimage|imagick_setimagealphachannel|imagick_setimageartifact|imagick_setimagebackgroundcolor|imagick_setimagebias|imagick_setimageblueprimary|imagick_setimagebordercolor|imagick_setimagechanneldepth|imagick_setimageclipmask|imagick_setimagecolormapcolor|imagick_setimagecolorspace|imagick_setimagecompose|imagick_setimagecompression|imagick_setimagecompressionquality|imagick_setimagedelay|imagick_setimagedepth|imagick_setimagedispose|imagick_setimageextent|imagick_setimagefilename|imagick_setimageformat|imagick_setimagegamma|imagick_setimagegravity|imagick_setimagegreenprimary|imagick_setimageindex|imagick_setimageinterlacescheme|imagick_setimageinterpolatemethod|imagick_setimageiterations|imagick_setimagematte|imagick_setimagemattecolor|imagick_setimageopacity|imagick_setimageorientation|imagick_setimagepage|imagick_setimageprofile|imagick_setimageproperty|imagick_setimageredprimary|imagick_setimagerenderingintent|imagick_setimageresolution|imagick_setimagescene|imagick_setimagetickspersecond|imagick_setimagetype|imagick_setimageunits|imagick_setimagevirtualpixelmethod|imagick_setimagewhitepoint|imagick_setinterlacescheme|imagick_setiteratorindex|imagick_setlastiterator|imagick_setoption|imagick_setpage|imagick_setpointsize|imagick_setresolution|imagick_setresourcelimit|imagick_setsamplingfactors|imagick_setsize|imagick_setsizeoffset|imagick_settype|imagick_shadeimage|imagick_shadowimage|imagick_sharpenimage|imagick_shaveimage|imagick_shearimage|imagick_sigmoidalcontrastimage|imagick_sketchimage|imagick_solarizeimage|imagick_spliceimage|imagick_spreadimage|imagick_steganoimage|imagick_stereoimage|imagick_stripimage|imagick_swirlimage|imagick_textureimage|imagick_thresholdimage|imagick_thumbnailimage|imagick_tintimage|imagick_transformimage|imagick_transparentpaintimage|imagick_transposeimage|imagick_transverseimage|imagick_trimimage|imagick_uniqueimagecolors|imagick_unsharpmaskimage|imagick_valid|imagick_vignetteimage|imagick_waveimage|imagick_whitethresholdimage|imagick_writeimage|imagick_writeimagefile|imagick_writeimages|imagick_writeimagesfile|imagickdraw|imagickdraw_affine|imagickdraw_annotation|imagickdraw_arc|imagickdraw_bezier|imagickdraw_circle|imagickdraw_clear|imagickdraw_clone|imagickdraw_color|imagickdraw_comment|imagickdraw_composite|imagickdraw_construct|imagickdraw_destroy|imagickdraw_ellipse|imagickdraw_getclippath|imagickdraw_getcliprule|imagickdraw_getclipunits|imagickdraw_getfillcolor|imagickdraw_getfillopacity|imagickdraw_getfillrule|imagickdraw_getfont|imagickdraw_getfontfamily|imagickdraw_getfontsize|imagickdraw_getfontstyle|imagickdraw_getfontweight|imagickdraw_getgravity|imagickdraw_getstrokeantialias|imagickdraw_getstrokecolor|imagickdraw_getstrokedasharray|imagickdraw_getstrokedashoffset|imagickdraw_getstrokelinecap|imagickdraw_getstrokelinejoin|imagickdraw_getstrokemiterlimit|imagickdraw_getstrokeopacity|imagickdraw_getstrokewidth|imagickdraw_gettextalignment|imagickdraw_gettextantialias|imagickdraw_gettextdecoration|imagickdraw_gettextencoding|imagickdraw_gettextundercolor|imagickdraw_getvectorgraphics|imagickdraw_line|imagickdraw_matte|imagickdraw_pathclose|imagickdraw_pathcurvetoabsolute|imagickdraw_pathcurvetoquadraticbezierabsolute|imagickdraw_pathcurvetoquadraticbezierrelative|imagickdraw_pathcurvetoquadraticbeziersmoothabsolute|imagickdraw_pathcurvetoquadraticbeziersmoothrelative|imagickdraw_pathcurvetorelative|imagickdraw_pathcurvetosmoothabsolute|imagickdraw_pathcurvetosmoothrelative|imagickdraw_pathellipticarcabsolute|imagickdraw_pathellipticarcrelative|imagickdraw_pathfinish|imagickdraw_pathlinetoabsolute|imagickdraw_pathlinetohorizontalabsolute|imagickdraw_pathlinetohorizontalrelative|imagickdraw_pathlinetorelative|imagickdraw_pathlinetoverticalabsolute|imagickdraw_pathlinetoverticalrelative|imagickdraw_pathmovetoabsolute|imagickdraw_pathmovetorelative|imagickdraw_pathstart|imagickdraw_point|imagickdraw_polygon|imagickdraw_polyline|imagickdraw_pop|imagickdraw_popclippath|imagickdraw_popdefs|imagickdraw_poppattern|imagickdraw_push|imagickdraw_pushclippath|imagickdraw_pushdefs|imagickdraw_pushpattern|imagickdraw_rectangle|imagickdraw_render|imagickdraw_rotate|imagickdraw_roundrectangle|imagickdraw_scale|imagickdraw_setclippath|imagickdraw_setcliprule|imagickdraw_setclipunits|imagickdraw_setfillalpha|imagickdraw_setfillcolor|imagickdraw_setfillopacity|imagickdraw_setfillpatternurl|imagickdraw_setfillrule|imagickdraw_setfont|imagickdraw_setfontfamily|imagickdraw_setfontsize|imagickdraw_setfontstretch|imagickdraw_setfontstyle|imagickdraw_setfontweight|imagickdraw_setgravity|imagickdraw_setstrokealpha|imagickdraw_setstrokeantialias|imagickdraw_setstrokecolor|imagickdraw_setstrokedasharray|imagickdraw_setstrokedashoffset|imagickdraw_setstrokelinecap|imagickdraw_setstrokelinejoin|imagickdraw_setstrokemiterlimit|imagickdraw_setstrokeopacity|imagickdraw_setstrokepatternurl|imagickdraw_setstrokewidth|imagickdraw_settextalignment|imagickdraw_settextantialias|imagickdraw_settextdecoration|imagickdraw_settextencoding|imagickdraw_settextundercolor|imagickdraw_setvectorgraphics|imagickdraw_setviewbox|imagickdraw_skewx|imagickdraw_skewy|imagickdraw_translate|imagickpixel|imagickpixel_clear|imagickpixel_construct|imagickpixel_destroy|imagickpixel_getcolor|imagickpixel_getcolorasstring|imagickpixel_getcolorcount|imagickpixel_getcolorvalue|imagickpixel_gethsl|imagickpixel_issimilar|imagickpixel_setcolor|imagickpixel_setcolorvalue|imagickpixel_sethsl|imagickpixeliterator|imagickpixeliterator_clear|imagickpixeliterator_construct|imagickpixeliterator_destroy|imagickpixeliterator_getcurrentiteratorrow|imagickpixeliterator_getiteratorrow|imagickpixeliterator_getnextiteratorrow|imagickpixeliterator_getpreviousiteratorrow|imagickpixeliterator_newpixeliterator|imagickpixeliterator_newpixelregioniterator|imagickpixeliterator_resetiterator|imagickpixeliterator_setiteratorfirstrow|imagickpixeliterator_setiteratorlastrow|imagickpixeliterator_setiteratorrow|imagickpixeliterator_synciterator|imap_8bit|imap_alerts|imap_append|imap_base64|imap_binary|imap_body|imap_bodystruct|imap_check|imap_clearflag_full|imap_close|imap_create|imap_createmailbox|imap_delete|imap_deletemailbox|imap_errors|imap_expunge|imap_fetch_overview|imap_fetchbody|imap_fetchheader|imap_fetchmime|imap_fetchstructure|imap_fetchtext|imap_gc|imap_get_quota|imap_get_quotaroot|imap_getacl|imap_getmailboxes|imap_getsubscribed|imap_header|imap_headerinfo|imap_headers|imap_last_error|imap_list|imap_listmailbox|imap_listscan|imap_listsubscribed|imap_lsub|imap_mail|imap_mail_compose|imap_mail_copy|imap_mail_move|imap_mailboxmsginfo|imap_mime_header_decode|imap_msgno|imap_num_msg|imap_num_recent|imap_open|imap_ping|imap_qprint|imap_rename|imap_renamemailbox|imap_reopen|imap_rfc822_parse_adrlist|imap_rfc822_parse_headers|imap_rfc822_write_address|imap_savebody|imap_scan|imap_scanmailbox|imap_search|imap_set_quota|imap_setacl|imap_setflag_full|imap_sort|imap_status|imap_subscribe|imap_thread|imap_timeout|imap_uid|imap_undelete|imap_unsubscribe|imap_utf7_decode|imap_utf7_encode|imap_utf8|implementsinterface|implode|import_request_variables|in_array|include|include_once|inclued_get_data|inet_ntop|inet_pton|infiniteiterator|ingres_autocommit|ingres_autocommit_state|ingres_charset|ingres_close|ingres_commit|ingres_connect|ingres_cursor|ingres_errno|ingres_error|ingres_errsqlstate|ingres_escape_string|ingres_execute|ingres_fetch_array|ingres_fetch_assoc|ingres_fetch_object|ingres_fetch_proc_return|ingres_fetch_row|ingres_field_length|ingres_field_name|ingres_field_nullable|ingres_field_precision|ingres_field_scale|ingres_field_type|ingres_free_result|ingres_next_error|ingres_num_fields|ingres_num_rows|ingres_pconnect|ingres_prepare|ingres_query|ingres_result_seek|ingres_rollback|ingres_set_environment|ingres_unbuffered_query|ini_alter|ini_get|ini_get_all|ini_restore|ini_set|innamespace|inotify_add_watch|inotify_init|inotify_queue_len|inotify_read|inotify_rm_watch|interface_exists|intl_error_name|intl_get_error_code|intl_get_error_message|intl_is_failure|intldateformatter|intval|invalidargumentexception|invoke|invokeargs|ip2long|iptcembed|iptcparse|is_a|is_array|is_bool|is_callable|is_dir|is_double|is_executable|is_file|is_finite|is_float|is_infinite|is_int|is_integer|is_link|is_long|is_nan|is_null|is_numeric|is_object|is_readable|is_real|is_resource|is_scalar|is_soap_fault|is_string|is_subclass_of|is_uploaded_file|is_writable|is_writeable|isabstract|iscloneable|isdisabled|isfinal|isinstance|isinstantiable|isinterface|isinternal|isiterateable|isset|issubclassof|isuserdefined|iterator|iterator_apply|iterator_count|iterator_to_array|iteratoraggregate|iteratoriterator|java_last_exception_clear|java_last_exception_get|jddayofweek|jdmonthname|jdtofrench|jdtogregorian|jdtojewish|jdtojulian|jdtounix|jewishtojd|join|jpeg2wbmp|json_decode|json_encode|json_last_error|jsonserializable|judy|judy_type|judy_version|juliantojd|kadm5_chpass_principal|kadm5_create_principal|kadm5_delete_principal|kadm5_destroy|kadm5_flush|kadm5_get_policies|kadm5_get_principal|kadm5_get_principals|kadm5_init_with_password|kadm5_modify_principal|key|krsort|ksort|lcfirst|lcg_value|lchgrp|lchown|ldap_8859_to_t61|ldap_add|ldap_bind|ldap_close|ldap_compare|ldap_connect|ldap_count_entries|ldap_delete|ldap_dn2ufn|ldap_err2str|ldap_errno|ldap_error|ldap_explode_dn|ldap_first_attribute|ldap_first_entry|ldap_first_reference|ldap_free_result|ldap_get_attributes|ldap_get_dn|ldap_get_entries|ldap_get_option|ldap_get_values|ldap_get_values_len|ldap_list|ldap_mod_add|ldap_mod_del|ldap_mod_replace|ldap_modify|ldap_next_attribute|ldap_next_entry|ldap_next_reference|ldap_parse_reference|ldap_parse_result|ldap_read|ldap_rename|ldap_sasl_bind|ldap_search|ldap_set_option|ldap_set_rebind_proc|ldap_sort|ldap_start_tls|ldap_t61_to_8859|ldap_unbind|lengthexception|levenshtein|libxml_clear_errors|libxml_disable_entity_loader|libxml_get_errors|libxml_get_last_error|libxml_set_streams_context|libxml_use_internal_errors|libxmlerror|limititerator|link|linkinfo|list|locale|localeconv|localtime|log|log10|log1p|logicexception|long2ip|lstat|ltrim|lzf_compress|lzf_decompress|lzf_optimized_for|m_checkstatus|m_completeauthorizations|m_connect|m_connectionerror|m_deletetrans|m_destroyconn|m_destroyengine|m_getcell|m_getcellbynum|m_getcommadelimited|m_getheader|m_initconn|m_initengine|m_iscommadelimited|m_maxconntimeout|m_monitor|m_numcolumns|m_numrows|m_parsecommadelimited|m_responsekeys|m_responseparam|m_returnstatus|m_setblocking|m_setdropfile|m_setip|m_setssl|m_setssl_cafile|m_setssl_files|m_settimeout|m_sslcert_gen_hash|m_transactionssent|m_transinqueue|m_transkeyval|m_transnew|m_transsend|m_uwait|m_validateidentifier|m_verifyconnection|m_verifysslcert|magic_quotes_runtime|mail|mailparse_determine_best_xfer_encoding|mailparse_msg_create|mailparse_msg_extract_part|mailparse_msg_extract_part_file|mailparse_msg_extract_whole_part_file|mailparse_msg_free|mailparse_msg_get_part|mailparse_msg_get_part_data|mailparse_msg_get_structure|mailparse_msg_parse|mailparse_msg_parse_file|mailparse_rfc822_parse_addresses|mailparse_stream_encode|mailparse_uudecode_all|main|max|maxdb_affected_rows|maxdb_autocommit|maxdb_bind_param|maxdb_bind_result|maxdb_change_user|maxdb_character_set_name|maxdb_client_encoding|maxdb_close|maxdb_close_long_data|maxdb_commit|maxdb_connect|maxdb_connect_errno|maxdb_connect_error|maxdb_data_seek|maxdb_debug|maxdb_disable_reads_from_master|maxdb_disable_rpl_parse|maxdb_dump_debug_info|maxdb_embedded_connect|maxdb_enable_reads_from_master|maxdb_enable_rpl_parse|maxdb_errno|maxdb_error|maxdb_escape_string|maxdb_execute|maxdb_fetch|maxdb_fetch_array|maxdb_fetch_assoc|maxdb_fetch_field|maxdb_fetch_field_direct|maxdb_fetch_fields|maxdb_fetch_lengths|maxdb_fetch_object|maxdb_fetch_row|maxdb_field_count|maxdb_field_seek|maxdb_field_tell|maxdb_free_result|maxdb_get_client_info|maxdb_get_client_version|maxdb_get_host_info|maxdb_get_metadata|maxdb_get_proto_info|maxdb_get_server_info|maxdb_get_server_version|maxdb_info|maxdb_init|maxdb_insert_id|maxdb_kill|maxdb_master_query|maxdb_more_results|maxdb_multi_query|maxdb_next_result|maxdb_num_fields|maxdb_num_rows|maxdb_options|maxdb_param_count|maxdb_ping|maxdb_prepare|maxdb_query|maxdb_real_connect|maxdb_real_escape_string|maxdb_real_query|maxdb_report|maxdb_rollback|maxdb_rpl_parse_enabled|maxdb_rpl_probe|maxdb_rpl_query_type|maxdb_select_db|maxdb_send_long_data|maxdb_send_query|maxdb_server_end|maxdb_server_init|maxdb_set_opt|maxdb_sqlstate|maxdb_ssl_set|maxdb_stat|maxdb_stmt_affected_rows|maxdb_stmt_bind_param|maxdb_stmt_bind_result|maxdb_stmt_close|maxdb_stmt_close_long_data|maxdb_stmt_data_seek|maxdb_stmt_errno|maxdb_stmt_error|maxdb_stmt_execute|maxdb_stmt_fetch|maxdb_stmt_free_result|maxdb_stmt_init|maxdb_stmt_num_rows|maxdb_stmt_param_count|maxdb_stmt_prepare|maxdb_stmt_reset|maxdb_stmt_result_metadata|maxdb_stmt_send_long_data|maxdb_stmt_sqlstate|maxdb_stmt_store_result|maxdb_store_result|maxdb_thread_id|maxdb_thread_safe|maxdb_use_result|maxdb_warning_count|mb_check_encoding|mb_convert_case|mb_convert_encoding|mb_convert_kana|mb_convert_variables|mb_decode_mimeheader|mb_decode_numericentity|mb_detect_encoding|mb_detect_order|mb_encode_mimeheader|mb_encode_numericentity|mb_encoding_aliases|mb_ereg|mb_ereg_match|mb_ereg_replace|mb_ereg_search|mb_ereg_search_getpos|mb_ereg_search_getregs|mb_ereg_search_init|mb_ereg_search_pos|mb_ereg_search_regs|mb_ereg_search_setpos|mb_eregi|mb_eregi_replace|mb_get_info|mb_http_input|mb_http_output|mb_internal_encoding|mb_language|mb_list_encodings|mb_output_handler|mb_parse_str|mb_preferred_mime_name|mb_regex_encoding|mb_regex_set_options|mb_send_mail|mb_split|mb_strcut|mb_strimwidth|mb_stripos|mb_stristr|mb_strlen|mb_strpos|mb_strrchr|mb_strrichr|mb_strripos|mb_strrpos|mb_strstr|mb_strtolower|mb_strtoupper|mb_strwidth|mb_substitute_character|mb_substr|mb_substr_count|mcrypt_cbc|mcrypt_cfb|mcrypt_create_iv|mcrypt_decrypt|mcrypt_ecb|mcrypt_enc_get_algorithms_name|mcrypt_enc_get_block_size|mcrypt_enc_get_iv_size|mcrypt_enc_get_key_size|mcrypt_enc_get_modes_name|mcrypt_enc_get_supported_key_sizes|mcrypt_enc_is_block_algorithm|mcrypt_enc_is_block_algorithm_mode|mcrypt_enc_is_block_mode|mcrypt_enc_self_test|mcrypt_encrypt|mcrypt_generic|mcrypt_generic_deinit|mcrypt_generic_end|mcrypt_generic_init|mcrypt_get_block_size|mcrypt_get_cipher_name|mcrypt_get_iv_size|mcrypt_get_key_size|mcrypt_list_algorithms|mcrypt_list_modes|mcrypt_module_close|mcrypt_module_get_algo_block_size|mcrypt_module_get_algo_key_size|mcrypt_module_get_supported_key_sizes|mcrypt_module_is_block_algorithm|mcrypt_module_is_block_algorithm_mode|mcrypt_module_is_block_mode|mcrypt_module_open|mcrypt_module_self_test|mcrypt_ofb|md5|md5_file|mdecrypt_generic|memcache|memcache_debug|memcached|memory_get_peak_usage|memory_get_usage|messageformatter|metaphone|method_exists|mhash|mhash_count|mhash_get_block_size|mhash_get_hash_name|mhash_keygen_s2k|microtime|mime_content_type|min|ming_keypress|ming_setcubicthreshold|ming_setscale|ming_setswfcompression|ming_useconstants|ming_useswfversion|mkdir|mktime|money_format|mongo|mongobindata|mongocode|mongocollection|mongoconnectionexception|mongocursor|mongocursorexception|mongocursortimeoutexception|mongodate|mongodb|mongodbref|mongoexception|mongogridfs|mongogridfscursor|mongogridfsexception|mongogridfsfile|mongoid|mongoint32|mongoint64|mongomaxkey|mongominkey|mongoregex|mongotimestamp|move_uploaded_file|mpegfile|mqseries_back|mqseries_begin|mqseries_close|mqseries_cmit|mqseries_conn|mqseries_connx|mqseries_disc|mqseries_get|mqseries_inq|mqseries_open|mqseries_put|mqseries_put1|mqseries_set|mqseries_strerror|msession_connect|msession_count|msession_create|msession_destroy|msession_disconnect|msession_find|msession_get|msession_get_array|msession_get_data|msession_inc|msession_list|msession_listvar|msession_lock|msession_plugin|msession_randstr|msession_set|msession_set_array|msession_set_data|msession_timeout|msession_uniq|msession_unlock|msg_get_queue|msg_queue_exists|msg_receive|msg_remove_queue|msg_send|msg_set_queue|msg_stat_queue|msql|msql_affected_rows|msql_close|msql_connect|msql_create_db|msql_createdb|msql_data_seek|msql_db_query|msql_dbname|msql_drop_db|msql_error|msql_fetch_array|msql_fetch_field|msql_fetch_object|msql_fetch_row|msql_field_flags|msql_field_len|msql_field_name|msql_field_seek|msql_field_table|msql_field_type|msql_fieldflags|msql_fieldlen|msql_fieldname|msql_fieldtable|msql_fieldtype|msql_free_result|msql_list_dbs|msql_list_fields|msql_list_tables|msql_num_fields|msql_num_rows|msql_numfields|msql_numrows|msql_pconnect|msql_query|msql_regcase|msql_result|msql_select_db|msql_tablename|mssql_bind|mssql_close|mssql_connect|mssql_data_seek|mssql_execute|mssql_fetch_array|mssql_fetch_assoc|mssql_fetch_batch|mssql_fetch_field|mssql_fetch_object|mssql_fetch_row|mssql_field_length|mssql_field_name|mssql_field_seek|mssql_field_type|mssql_free_result|mssql_free_statement|mssql_get_last_message|mssql_guid_string|mssql_init|mssql_min_error_severity|mssql_min_message_severity|mssql_next_result|mssql_num_fields|mssql_num_rows|mssql_pconnect|mssql_query|mssql_result|mssql_rows_affected|mssql_select_db|mt_getrandmax|mt_rand|mt_srand|multipleiterator|mysql_affected_rows|mysql_client_encoding|mysql_close|mysql_connect|mysql_create_db|mysql_data_seek|mysql_db_name|mysql_db_query|mysql_drop_db|mysql_errno|mysql_error|mysql_escape_string|mysql_fetch_array|mysql_fetch_assoc|mysql_fetch_field|mysql_fetch_lengths|mysql_fetch_object|mysql_fetch_row|mysql_field_flags|mysql_field_len|mysql_field_name|mysql_field_seek|mysql_field_table|mysql_field_type|mysql_free_result|mysql_get_client_info|mysql_get_host_info|mysql_get_proto_info|mysql_get_server_info|mysql_info|mysql_insert_id|mysql_list_dbs|mysql_list_fields|mysql_list_processes|mysql_list_tables|mysql_num_fields|mysql_num_rows|mysql_pconnect|mysql_ping|mysql_query|mysql_real_escape_string|mysql_result|mysql_select_db|mysql_set_charset|mysql_stat|mysql_tablename|mysql_thread_id|mysql_unbuffered_query|mysqli|mysqli_bind_param|mysqli_bind_result|mysqli_client_encoding|mysqli_connect|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_driver|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_escape_string|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_report|mysqli_result|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_set_opt|mysqli_slave_query|mysqli_stmt|mysqli_warning|mysqlnd_ms_get_stats|mysqlnd_ms_query_is_select|mysqlnd_ms_set_user_pick_server|mysqlnd_qc_change_handler|mysqlnd_qc_clear_cache|mysqlnd_qc_get_cache_info|mysqlnd_qc_get_core_stats|mysqlnd_qc_get_handler|mysqlnd_qc_get_query_trace_log|mysqlnd_qc_set_user_handlers|natcasesort|natsort|ncurses_addch|ncurses_addchnstr|ncurses_addchstr|ncurses_addnstr|ncurses_addstr|ncurses_assume_default_colors|ncurses_attroff|ncurses_attron|ncurses_attrset|ncurses_baudrate|ncurses_beep|ncurses_bkgd|ncurses_bkgdset|ncurses_border|ncurses_bottom_panel|ncurses_can_change_color|ncurses_cbreak|ncurses_clear|ncurses_clrtobot|ncurses_clrtoeol|ncurses_color_content|ncurses_color_set|ncurses_curs_set|ncurses_def_prog_mode|ncurses_def_shell_mode|ncurses_define_key|ncurses_del_panel|ncurses_delay_output|ncurses_delch|ncurses_deleteln|ncurses_delwin|ncurses_doupdate|ncurses_echo|ncurses_echochar|ncurses_end|ncurses_erase|ncurses_erasechar|ncurses_filter|ncurses_flash|ncurses_flushinp|ncurses_getch|ncurses_getmaxyx|ncurses_getmouse|ncurses_getyx|ncurses_halfdelay|ncurses_has_colors|ncurses_has_ic|ncurses_has_il|ncurses_has_key|ncurses_hide_panel|ncurses_hline|ncurses_inch|ncurses_init|ncurses_init_color|ncurses_init_pair|ncurses_insch|ncurses_insdelln|ncurses_insertln|ncurses_insstr|ncurses_instr|ncurses_isendwin|ncurses_keyok|ncurses_keypad|ncurses_killchar|ncurses_longname|ncurses_meta|ncurses_mouse_trafo|ncurses_mouseinterval|ncurses_mousemask|ncurses_move|ncurses_move_panel|ncurses_mvaddch|ncurses_mvaddchnstr|ncurses_mvaddchstr|ncurses_mvaddnstr|ncurses_mvaddstr|ncurses_mvcur|ncurses_mvdelch|ncurses_mvgetch|ncurses_mvhline|ncurses_mvinch|ncurses_mvvline|ncurses_mvwaddstr|ncurses_napms|ncurses_new_panel|ncurses_newpad|ncurses_newwin|ncurses_nl|ncurses_nocbreak|ncurses_noecho|ncurses_nonl|ncurses_noqiflush|ncurses_noraw|ncurses_pair_content|ncurses_panel_above|ncurses_panel_below|ncurses_panel_window|ncurses_pnoutrefresh|ncurses_prefresh|ncurses_putp|ncurses_qiflush|ncurses_raw|ncurses_refresh|ncurses_replace_panel|ncurses_reset_prog_mode|ncurses_reset_shell_mode|ncurses_resetty|ncurses_savetty|ncurses_scr_dump|ncurses_scr_init|ncurses_scr_restore|ncurses_scr_set|ncurses_scrl|ncurses_show_panel|ncurses_slk_attr|ncurses_slk_attroff|ncurses_slk_attron|ncurses_slk_attrset|ncurses_slk_clear|ncurses_slk_color|ncurses_slk_init|ncurses_slk_noutrefresh|ncurses_slk_refresh|ncurses_slk_restore|ncurses_slk_set|ncurses_slk_touch|ncurses_standend|ncurses_standout|ncurses_start_color|ncurses_termattrs|ncurses_termname|ncurses_timeout|ncurses_top_panel|ncurses_typeahead|ncurses_ungetch|ncurses_ungetmouse|ncurses_update_panels|ncurses_use_default_colors|ncurses_use_env|ncurses_use_extended_names|ncurses_vidattr|ncurses_vline|ncurses_waddch|ncurses_waddstr|ncurses_wattroff|ncurses_wattron|ncurses_wattrset|ncurses_wborder|ncurses_wclear|ncurses_wcolor_set|ncurses_werase|ncurses_wgetch|ncurses_whline|ncurses_wmouse_trafo|ncurses_wmove|ncurses_wnoutrefresh|ncurses_wrefresh|ncurses_wstandend|ncurses_wstandout|ncurses_wvline|newinstance|newinstanceargs|newt_bell|newt_button|newt_button_bar|newt_centered_window|newt_checkbox|newt_checkbox_get_value|newt_checkbox_set_flags|newt_checkbox_set_value|newt_checkbox_tree|newt_checkbox_tree_add_item|newt_checkbox_tree_find_item|newt_checkbox_tree_get_current|newt_checkbox_tree_get_entry_value|newt_checkbox_tree_get_multi_selection|newt_checkbox_tree_get_selection|newt_checkbox_tree_multi|newt_checkbox_tree_set_current|newt_checkbox_tree_set_entry|newt_checkbox_tree_set_entry_value|newt_checkbox_tree_set_width|newt_clear_key_buffer|newt_cls|newt_compact_button|newt_component_add_callback|newt_component_takes_focus|newt_create_grid|newt_cursor_off|newt_cursor_on|newt_delay|newt_draw_form|newt_draw_root_text|newt_entry|newt_entry_get_value|newt_entry_set|newt_entry_set_filter|newt_entry_set_flags|newt_finished|newt_form|newt_form_add_component|newt_form_add_components|newt_form_add_hot_key|newt_form_destroy|newt_form_get_current|newt_form_run|newt_form_set_background|newt_form_set_height|newt_form_set_size|newt_form_set_timer|newt_form_set_width|newt_form_watch_fd|newt_get_screen_size|newt_grid_add_components_to_form|newt_grid_basic_window|newt_grid_free|newt_grid_get_size|newt_grid_h_close_stacked|newt_grid_h_stacked|newt_grid_place|newt_grid_set_field|newt_grid_simple_window|newt_grid_v_close_stacked|newt_grid_v_stacked|newt_grid_wrapped_window|newt_grid_wrapped_window_at|newt_init|newt_label|newt_label_set_text|newt_listbox|newt_listbox_append_entry|newt_listbox_clear|newt_listbox_clear_selection|newt_listbox_delete_entry|newt_listbox_get_current|newt_listbox_get_selection|newt_listbox_insert_entry|newt_listbox_item_count|newt_listbox_select_item|newt_listbox_set_current|newt_listbox_set_current_by_key|newt_listbox_set_data|newt_listbox_set_entry|newt_listbox_set_width|newt_listitem|newt_listitem_get_data|newt_listitem_set|newt_open_window|newt_pop_help_line|newt_pop_window|newt_push_help_line|newt_radio_get_current|newt_radiobutton|newt_redraw_help_line|newt_reflow_text|newt_refresh|newt_resize_screen|newt_resume|newt_run_form|newt_scale|newt_scale_set|newt_scrollbar_set|newt_set_help_callback|newt_set_suspend_callback|newt_suspend|newt_textbox|newt_textbox_get_num_lines|newt_textbox_reflowed|newt_textbox_set_height|newt_textbox_set_text|newt_vertical_scrollbar|newt_wait_for_key|newt_win_choice|newt_win_entries|newt_win_menu|newt_win_message|newt_win_messagev|newt_win_ternary|next|ngettext|nl2br|nl_langinfo|norewinditerator|normalizer|notes_body|notes_copy_db|notes_create_db|notes_create_note|notes_drop_db|notes_find_note|notes_header_info|notes_list_msgs|notes_mark_read|notes_mark_unread|notes_nav_create|notes_search|notes_unread|notes_version|nsapi_request_headers|nsapi_response_headers|nsapi_virtual|nthmac|number_format|numberformatter|oauth|oauth_get_sbs|oauth_urlencode|oauthexception|oauthprovider|ob_clean|ob_deflatehandler|ob_end_clean|ob_end_flush|ob_etaghandler|ob_flush|ob_get_clean|ob_get_contents|ob_get_flush|ob_get_length|ob_get_level|ob_get_status|ob_gzhandler|ob_iconv_handler|ob_implicit_flush|ob_inflatehandler|ob_list_handlers|ob_start|ob_tidyhandler|oci_bind_array_by_name|oci_bind_by_name|oci_cancel|oci_client_version|oci_close|oci_collection_append|oci_collection_assign|oci_collection_element_assign|oci_collection_element_get|oci_collection_free|oci_collection_max|oci_collection_size|oci_collection_trim|oci_commit|oci_connect|oci_define_by_name|oci_error|oci_execute|oci_fetch|oci_fetch_all|oci_fetch_array|oci_fetch_assoc|oci_fetch_object|oci_fetch_row|oci_field_is_null|oci_field_name|oci_field_precision|oci_field_scale|oci_field_size|oci_field_type|oci_field_type_raw|oci_free_statement|oci_internal_debug|oci_lob_append|oci_lob_close|oci_lob_copy|oci_lob_eof|oci_lob_erase|oci_lob_export|oci_lob_flush|oci_lob_free|oci_lob_getbuffering|oci_lob_import|oci_lob_is_equal|oci_lob_load|oci_lob_read|oci_lob_rewind|oci_lob_save|oci_lob_savefile|oci_lob_seek|oci_lob_setbuffering|oci_lob_size|oci_lob_tell|oci_lob_truncate|oci_lob_write|oci_lob_writetemporary|oci_lob_writetofile|oci_new_collection|oci_new_connect|oci_new_cursor|oci_new_descriptor|oci_num_fields|oci_num_rows|oci_parse|oci_password_change|oci_pconnect|oci_result|oci_rollback|oci_server_version|oci_set_action|oci_set_client_identifier|oci_set_client_info|oci_set_edition|oci_set_module_name|oci_set_prefetch|oci_statement_type|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|octdec|odbc_autocommit|odbc_binmode|odbc_close|odbc_close_all|odbc_columnprivileges|odbc_columns|odbc_commit|odbc_connect|odbc_cursor|odbc_data_source|odbc_do|odbc_error|odbc_errormsg|odbc_exec|odbc_execute|odbc_fetch_array|odbc_fetch_into|odbc_fetch_object|odbc_fetch_row|odbc_field_len|odbc_field_name|odbc_field_num|odbc_field_precision|odbc_field_scale|odbc_field_type|odbc_foreignkeys|odbc_free_result|odbc_gettypeinfo|odbc_longreadlen|odbc_next_result|odbc_num_fields|odbc_num_rows|odbc_pconnect|odbc_prepare|odbc_primarykeys|odbc_procedurecolumns|odbc_procedures|odbc_result|odbc_result_all|odbc_rollback|odbc_setoption|odbc_specialcolumns|odbc_statistics|odbc_tableprivileges|odbc_tables|openal_buffer_create|openal_buffer_data|openal_buffer_destroy|openal_buffer_get|openal_buffer_loadwav|openal_context_create|openal_context_current|openal_context_destroy|openal_context_process|openal_context_suspend|openal_device_close|openal_device_open|openal_listener_get|openal_listener_set|openal_source_create|openal_source_destroy|openal_source_get|openal_source_pause|openal_source_play|openal_source_rewind|openal_source_set|openal_source_stop|openal_stream|opendir|openlog|openssl_cipher_iv_length|openssl_csr_export|openssl_csr_export_to_file|openssl_csr_get_public_key|openssl_csr_get_subject|openssl_csr_new|openssl_csr_sign|openssl_decrypt|openssl_dh_compute_key|openssl_digest|openssl_encrypt|openssl_error_string|openssl_free_key|openssl_get_cipher_methods|openssl_get_md_methods|openssl_get_privatekey|openssl_get_publickey|openssl_open|openssl_pkcs12_export|openssl_pkcs12_export_to_file|openssl_pkcs12_read|openssl_pkcs7_decrypt|openssl_pkcs7_encrypt|openssl_pkcs7_sign|openssl_pkcs7_verify|openssl_pkey_export|openssl_pkey_export_to_file|openssl_pkey_free|openssl_pkey_get_details|openssl_pkey_get_private|openssl_pkey_get_public|openssl_pkey_new|openssl_private_decrypt|openssl_private_encrypt|openssl_public_decrypt|openssl_public_encrypt|openssl_random_pseudo_bytes|openssl_seal|openssl_sign|openssl_verify|openssl_x509_check_private_key|openssl_x509_checkpurpose|openssl_x509_export|openssl_x509_export_to_file|openssl_x509_free|openssl_x509_parse|openssl_x509_read|ord|outeriterator|outofboundsexception|outofrangeexception|output_add_rewrite_var|output_reset_rewrite_vars|overflowexception|overload|override_function|ovrimos_close|ovrimos_commit|ovrimos_connect|ovrimos_cursor|ovrimos_exec|ovrimos_execute|ovrimos_fetch_into|ovrimos_fetch_row|ovrimos_field_len|ovrimos_field_name|ovrimos_field_num|ovrimos_field_type|ovrimos_free_result|ovrimos_longreadlen|ovrimos_num_fields|ovrimos_num_rows|ovrimos_prepare|ovrimos_result|ovrimos_result_all|ovrimos_rollback|pack|parentiterator|parse_ini_file|parse_ini_string|parse_str|parse_url|parsekit_compile_file|parsekit_compile_string|parsekit_func_arginfo|passthru|pathinfo|pclose|pcntl_alarm|pcntl_exec|pcntl_fork|pcntl_getpriority|pcntl_setpriority|pcntl_signal|pcntl_signal_dispatch|pcntl_sigprocmask|pcntl_sigtimedwait|pcntl_sigwaitinfo|pcntl_wait|pcntl_waitpid|pcntl_wexitstatus|pcntl_wifexited|pcntl_wifsignaled|pcntl_wifstopped|pcntl_wstopsig|pcntl_wtermsig|pdf_activate_item|pdf_add_annotation|pdf_add_bookmark|pdf_add_launchlink|pdf_add_locallink|pdf_add_nameddest|pdf_add_note|pdf_add_outline|pdf_add_pdflink|pdf_add_table_cell|pdf_add_textflow|pdf_add_thumbnail|pdf_add_weblink|pdf_arc|pdf_arcn|pdf_attach_file|pdf_begin_document|pdf_begin_font|pdf_begin_glyph|pdf_begin_item|pdf_begin_layer|pdf_begin_page|pdf_begin_page_ext|pdf_begin_pattern|pdf_begin_template|pdf_begin_template_ext|pdf_circle|pdf_clip|pdf_close|pdf_close_image|pdf_close_pdi|pdf_close_pdi_page|pdf_closepath|pdf_closepath_fill_stroke|pdf_closepath_stroke|pdf_concat|pdf_continue_text|pdf_create_3dview|pdf_create_action|pdf_create_annotation|pdf_create_bookmark|pdf_create_field|pdf_create_fieldgroup|pdf_create_gstate|pdf_create_pvf|pdf_create_textflow|pdf_curveto|pdf_define_layer|pdf_delete|pdf_delete_pvf|pdf_delete_table|pdf_delete_textflow|pdf_encoding_set_char|pdf_end_document|pdf_end_font|pdf_end_glyph|pdf_end_item|pdf_end_layer|pdf_end_page|pdf_end_page_ext|pdf_end_pattern|pdf_end_template|pdf_endpath|pdf_fill|pdf_fill_imageblock|pdf_fill_pdfblock|pdf_fill_stroke|pdf_fill_textblock|pdf_findfont|pdf_fit_image|pdf_fit_pdi_page|pdf_fit_table|pdf_fit_textflow|pdf_fit_textline|pdf_get_apiname|pdf_get_buffer|pdf_get_errmsg|pdf_get_errnum|pdf_get_font|pdf_get_fontname|pdf_get_fontsize|pdf_get_image_height|pdf_get_image_width|pdf_get_majorversion|pdf_get_minorversion|pdf_get_parameter|pdf_get_pdi_parameter|pdf_get_pdi_value|pdf_get_value|pdf_info_font|pdf_info_matchbox|pdf_info_table|pdf_info_textflow|pdf_info_textline|pdf_initgraphics|pdf_lineto|pdf_load_3ddata|pdf_load_font|pdf_load_iccprofile|pdf_load_image|pdf_makespotcolor|pdf_moveto|pdf_new|pdf_open_ccitt|pdf_open_file|pdf_open_gif|pdf_open_image|pdf_open_image_file|pdf_open_jpeg|pdf_open_memory_image|pdf_open_pdi|pdf_open_pdi_document|pdf_open_pdi_page|pdf_open_tiff|pdf_pcos_get_number|pdf_pcos_get_stream|pdf_pcos_get_string|pdf_place_image|pdf_place_pdi_page|pdf_process_pdi|pdf_rect|pdf_restore|pdf_resume_page|pdf_rotate|pdf_save|pdf_scale|pdf_set_border_color|pdf_set_border_dash|pdf_set_border_style|pdf_set_char_spacing|pdf_set_duration|pdf_set_gstate|pdf_set_horiz_scaling|pdf_set_info|pdf_set_info_author|pdf_set_info_creator|pdf_set_info_keywords|pdf_set_info_subject|pdf_set_info_title|pdf_set_layer_dependency|pdf_set_leading|pdf_set_parameter|pdf_set_text_matrix|pdf_set_text_pos|pdf_set_text_rendering|pdf_set_text_rise|pdf_set_value|pdf_set_word_spacing|pdf_setcolor|pdf_setdash|pdf_setdashpattern|pdf_setflat|pdf_setfont|pdf_setgray|pdf_setgray_fill|pdf_setgray_stroke|pdf_setlinecap|pdf_setlinejoin|pdf_setlinewidth|pdf_setmatrix|pdf_setmiterlimit|pdf_setpolydash|pdf_setrgbcolor|pdf_setrgbcolor_fill|pdf_setrgbcolor_stroke|pdf_shading|pdf_shading_pattern|pdf_shfill|pdf_show|pdf_show_boxed|pdf_show_xy|pdf_skew|pdf_stringwidth|pdf_stroke|pdf_suspend_page|pdf_translate|pdf_utf16_to_utf8|pdf_utf32_to_utf16|pdf_utf8_to_utf16|pdo|pdo_cubrid_schema|pdo_pgsqllobcreate|pdo_pgsqllobopen|pdo_pgsqllobunlink|pdo_sqlitecreateaggregate|pdo_sqlitecreatefunction|pdoexception|pdostatement|pfsockopen|pg_affected_rows|pg_cancel_query|pg_client_encoding|pg_close|pg_connect|pg_connection_busy|pg_connection_reset|pg_connection_status|pg_convert|pg_copy_from|pg_copy_to|pg_dbname|pg_delete|pg_end_copy|pg_escape_bytea|pg_escape_string|pg_execute|pg_fetch_all|pg_fetch_all_columns|pg_fetch_array|pg_fetch_assoc|pg_fetch_object|pg_fetch_result|pg_fetch_row|pg_field_is_null|pg_field_name|pg_field_num|pg_field_prtlen|pg_field_size|pg_field_table|pg_field_type|pg_field_type_oid|pg_free_result|pg_get_notify|pg_get_pid|pg_get_result|pg_host|pg_insert|pg_last_error|pg_last_notice|pg_last_oid|pg_lo_close|pg_lo_create|pg_lo_export|pg_lo_import|pg_lo_open|pg_lo_read|pg_lo_read_all|pg_lo_seek|pg_lo_tell|pg_lo_unlink|pg_lo_write|pg_meta_data|pg_num_fields|pg_num_rows|pg_options|pg_parameter_status|pg_pconnect|pg_ping|pg_port|pg_prepare|pg_put_line|pg_query|pg_query_params|pg_result_error|pg_result_error_field|pg_result_seek|pg_result_status|pg_select|pg_send_execute|pg_send_prepare|pg_send_query|pg_send_query_params|pg_set_client_encoding|pg_set_error_verbosity|pg_trace|pg_transaction_status|pg_tty|pg_unescape_bytea|pg_untrace|pg_update|pg_version|php_check_syntax|php_ini_loaded_file|php_ini_scanned_files|php_logo_guid|php_sapi_name|php_strip_whitespace|php_uname|phpcredits|phpinfo|phpversion|pi|png2wbmp|popen|pos|posix_access|posix_ctermid|posix_errno|posix_get_last_error|posix_getcwd|posix_getegid|posix_geteuid|posix_getgid|posix_getgrgid|posix_getgrnam|posix_getgroups|posix_getlogin|posix_getpgid|posix_getpgrp|posix_getpid|posix_getppid|posix_getpwnam|posix_getpwuid|posix_getrlimit|posix_getsid|posix_getuid|posix_initgroups|posix_isatty|posix_kill|posix_mkfifo|posix_mknod|posix_setegid|posix_seteuid|posix_setgid|posix_setpgid|posix_setsid|posix_setuid|posix_strerror|posix_times|posix_ttyname|posix_uname|pow|preg_filter|preg_grep|preg_last_error|preg_match|preg_match_all|preg_quote|preg_replace|preg_replace_callback|preg_split|prev|print|print_r|printer_abort|printer_close|printer_create_brush|printer_create_dc|printer_create_font|printer_create_pen|printer_delete_brush|printer_delete_dc|printer_delete_font|printer_delete_pen|printer_draw_bmp|printer_draw_chord|printer_draw_elipse|printer_draw_line|printer_draw_pie|printer_draw_rectangle|printer_draw_roundrect|printer_draw_text|printer_end_doc|printer_end_page|printer_get_option|printer_list|printer_logical_fontheight|printer_open|printer_select_brush|printer_select_font|printer_select_pen|printer_set_option|printer_start_doc|printer_start_page|printer_write|printf|proc_close|proc_get_status|proc_nice|proc_open|proc_terminate|property_exists|ps_add_bookmark|ps_add_launchlink|ps_add_locallink|ps_add_note|ps_add_pdflink|ps_add_weblink|ps_arc|ps_arcn|ps_begin_page|ps_begin_pattern|ps_begin_template|ps_circle|ps_clip|ps_close|ps_close_image|ps_closepath|ps_closepath_stroke|ps_continue_text|ps_curveto|ps_delete|ps_end_page|ps_end_pattern|ps_end_template|ps_fill|ps_fill_stroke|ps_findfont|ps_get_buffer|ps_get_parameter|ps_get_value|ps_hyphenate|ps_include_file|ps_lineto|ps_makespotcolor|ps_moveto|ps_new|ps_open_file|ps_open_image|ps_open_image_file|ps_open_memory_image|ps_place_image|ps_rect|ps_restore|ps_rotate|ps_save|ps_scale|ps_set_border_color|ps_set_border_dash|ps_set_border_style|ps_set_info|ps_set_parameter|ps_set_text_pos|ps_set_value|ps_setcolor|ps_setdash|ps_setflat|ps_setfont|ps_setgray|ps_setlinecap|ps_setlinejoin|ps_setlinewidth|ps_setmiterlimit|ps_setoverprintmode|ps_setpolydash|ps_shading|ps_shading_pattern|ps_shfill|ps_show|ps_show2|ps_show_boxed|ps_show_xy|ps_show_xy2|ps_string_geometry|ps_stringwidth|ps_stroke|ps_symbol|ps_symbol_name|ps_symbol_width|ps_translate|pspell_add_to_personal|pspell_add_to_session|pspell_check|pspell_clear_session|pspell_config_create|pspell_config_data_dir|pspell_config_dict_dir|pspell_config_ignore|pspell_config_mode|pspell_config_personal|pspell_config_repl|pspell_config_runtogether|pspell_config_save_repl|pspell_new|pspell_new_config|pspell_new_personal|pspell_save_wordlist|pspell_store_replacement|pspell_suggest|putenv|px_close|px_create_fp|px_date2string|px_delete|px_delete_record|px_get_field|px_get_info|px_get_parameter|px_get_record|px_get_schema|px_get_value|px_insert_record|px_new|px_numfields|px_numrecords|px_open_fp|px_put_record|px_retrieve_record|px_set_blob_file|px_set_parameter|px_set_tablename|px_set_targetencoding|px_set_value|px_timestamp2string|px_update_record|qdom_error|qdom_tree|quoted_printable_decode|quoted_printable_encode|quotemeta|rad2deg|radius_acct_open|radius_add_server|radius_auth_open|radius_close|radius_config|radius_create_request|radius_cvt_addr|radius_cvt_int|radius_cvt_string|radius_demangle|radius_demangle_mppe_key|radius_get_attr|radius_get_vendor_attr|radius_put_addr|radius_put_attr|radius_put_int|radius_put_string|radius_put_vendor_addr|radius_put_vendor_attr|radius_put_vendor_int|radius_put_vendor_string|radius_request_authenticator|radius_send_request|radius_server_secret|radius_strerror|rand|range|rangeexception|rar_wrapper_cache_stats|rararchive|rarentry|rarexception|rawurldecode|rawurlencode|read_exif_data|readdir|readfile|readgzfile|readline|readline_add_history|readline_callback_handler_install|readline_callback_handler_remove|readline_callback_read_char|readline_clear_history|readline_completion_function|readline_info|readline_list_history|readline_on_new_line|readline_read_history|readline_redisplay|readline_write_history|readlink|realpath|realpath_cache_get|realpath_cache_size|recode|recode_file|recode_string|recursivearrayiterator|recursivecachingiterator|recursivecallbackfilteriterator|recursivedirectoryiterator|recursivefilteriterator|recursiveiterator|recursiveiteratoriterator|recursiveregexiterator|recursivetreeiterator|reflection|reflectionclass|reflectionexception|reflectionextension|reflectionfunction|reflectionfunctionabstract|reflectionmethod|reflectionobject|reflectionparameter|reflectionproperty|reflector|regexiterator|register_shutdown_function|register_tick_function|rename|rename_function|require|require_once|reset|resetValue|resourcebundle|restore_error_handler|restore_exception_handler|restore_include_path|return|rewind|rewinddir|rmdir|round|rpm_close|rpm_get_tag|rpm_is_valid|rpm_open|rpm_version|rrd_create|rrd_error|rrd_fetch|rrd_first|rrd_graph|rrd_info|rrd_last|rrd_lastupdate|rrd_restore|rrd_tune|rrd_update|rrd_xport|rrdcreator|rrdgraph|rrdupdater|rsort|rtrim|runkit_class_adopt|runkit_class_emancipate|runkit_constant_add|runkit_constant_redefine|runkit_constant_remove|runkit_function_add|runkit_function_copy|runkit_function_redefine|runkit_function_remove|runkit_function_rename|runkit_import|runkit_lint|runkit_lint_file|runkit_method_add|runkit_method_copy|runkit_method_redefine|runkit_method_remove|runkit_method_rename|runkit_return_value_used|runkit_sandbox_output_handler|runkit_superglobals|runtimeexception|samconnection_commit|samconnection_connect|samconnection_constructor|samconnection_disconnect|samconnection_errno|samconnection_error|samconnection_isconnected|samconnection_peek|samconnection_peekall|samconnection_receive|samconnection_remove|samconnection_rollback|samconnection_send|samconnection_setDebug|samconnection_subscribe|samconnection_unsubscribe|sammessage_body|sammessage_constructor|sammessage_header|sca_createdataobject|sca_getservice|sca_localproxy_createdataobject|sca_soapproxy_createdataobject|scandir|sdo_das_changesummary_beginlogging|sdo_das_changesummary_endlogging|sdo_das_changesummary_getchangeddataobjects|sdo_das_changesummary_getchangetype|sdo_das_changesummary_getoldcontainer|sdo_das_changesummary_getoldvalues|sdo_das_changesummary_islogging|sdo_das_datafactory_addpropertytotype|sdo_das_datafactory_addtype|sdo_das_datafactory_getdatafactory|sdo_das_dataobject_getchangesummary|sdo_das_relational_applychanges|sdo_das_relational_construct|sdo_das_relational_createrootdataobject|sdo_das_relational_executepreparedquery|sdo_das_relational_executequery|sdo_das_setting_getlistindex|sdo_das_setting_getpropertyindex|sdo_das_setting_getpropertyname|sdo_das_setting_getvalue|sdo_das_setting_isset|sdo_das_xml_addtypes|sdo_das_xml_create|sdo_das_xml_createdataobject|sdo_das_xml_createdocument|sdo_das_xml_document_getrootdataobject|sdo_das_xml_document_getrootelementname|sdo_das_xml_document_getrootelementuri|sdo_das_xml_document_setencoding|sdo_das_xml_document_setxmldeclaration|sdo_das_xml_document_setxmlversion|sdo_das_xml_loadfile|sdo_das_xml_loadstring|sdo_das_xml_savefile|sdo_das_xml_savestring|sdo_datafactory_create|sdo_dataobject_clear|sdo_dataobject_createdataobject|sdo_dataobject_getcontainer|sdo_dataobject_getsequence|sdo_dataobject_gettypename|sdo_dataobject_gettypenamespaceuri|sdo_exception_getcause|sdo_list_insert|sdo_model_property_getcontainingtype|sdo_model_property_getdefault|sdo_model_property_getname|sdo_model_property_gettype|sdo_model_property_iscontainment|sdo_model_property_ismany|sdo_model_reflectiondataobject_construct|sdo_model_reflectiondataobject_export|sdo_model_reflectiondataobject_getcontainmentproperty|sdo_model_reflectiondataobject_getinstanceproperties|sdo_model_reflectiondataobject_gettype|sdo_model_type_getbasetype|sdo_model_type_getname|sdo_model_type_getnamespaceuri|sdo_model_type_getproperties|sdo_model_type_getproperty|sdo_model_type_isabstracttype|sdo_model_type_isdatatype|sdo_model_type_isinstance|sdo_model_type_isopentype|sdo_model_type_issequencedtype|sdo_sequence_getproperty|sdo_sequence_insert|sdo_sequence_move|seekableiterator|sem_acquire|sem_get|sem_release|sem_remove|serializable|serialize|session_cache_expire|session_cache_limiter|session_commit|session_decode|session_destroy|session_encode|session_get_cookie_params|session_id|session_is_registered|session_module_name|session_name|session_pgsql_add_error|session_pgsql_get_error|session_pgsql_get_field|session_pgsql_reset|session_pgsql_set_field|session_pgsql_status|session_regenerate_id|session_register|session_save_path|session_set_cookie_params|session_set_save_handler|session_start|session_unregister|session_unset|session_write_close|setCounterClass|set_error_handler|set_exception_handler|set_file_buffer|set_include_path|set_magic_quotes_runtime|set_socket_blocking|set_time_limit|setcookie|setlocale|setproctitle|setrawcookie|setstaticpropertyvalue|setthreadtitle|settype|sha1|sha1_file|shell_exec|shm_attach|shm_detach|shm_get_var|shm_has_var|shm_put_var|shm_remove|shm_remove_var|shmop_close|shmop_delete|shmop_open|shmop_read|shmop_size|shmop_write|show_source|shuffle|signeurlpaiement|similar_text|simplexml_import_dom|simplexml_load_file|simplexml_load_string|simplexmlelement|simplexmliterator|sin|sinh|sizeof|sleep|snmp|snmp2_get|snmp2_getnext|snmp2_real_walk|snmp2_set|snmp2_walk|snmp3_get|snmp3_getnext|snmp3_real_walk|snmp3_set|snmp3_walk|snmp_get_quick_print|snmp_get_valueretrieval|snmp_read_mib|snmp_set_enum_print|snmp_set_oid_numeric_print|snmp_set_oid_output_format|snmp_set_quick_print|snmp_set_valueretrieval|snmpget|snmpgetnext|snmprealwalk|snmpset|snmpwalk|snmpwalkoid|soapclient|soapfault|soapheader|soapparam|soapserver|soapvar|socket_accept|socket_bind|socket_clear_error|socket_close|socket_connect|socket_create|socket_create_listen|socket_create_pair|socket_get_option|socket_get_status|socket_getpeername|socket_getsockname|socket_last_error|socket_listen|socket_read|socket_recv|socket_recvfrom|socket_select|socket_send|socket_sendto|socket_set_block|socket_set_blocking|socket_set_nonblock|socket_set_option|socket_set_timeout|socket_shutdown|socket_strerror|socket_write|solr_get_version|solrclient|solrclientexception|solrdocument|solrdocumentfield|solrexception|solrgenericresponse|solrillegalargumentexception|solrillegaloperationexception|solrinputdocument|solrmodifiableparams|solrobject|solrparams|solrpingresponse|solrquery|solrqueryresponse|solrresponse|solrupdateresponse|solrutils|sort|soundex|sphinxclient|spl_autoload|spl_autoload_call|spl_autoload_extensions|spl_autoload_functions|spl_autoload_register|spl_autoload_unregister|spl_classes|spl_object_hash|splbool|spldoublylinkedlist|splenum|splfileinfo|splfileobject|splfixedarray|splfloat|splheap|splint|split|spliti|splmaxheap|splminheap|splobjectstorage|splobserver|splpriorityqueue|splqueue|splstack|splstring|splsubject|spltempfileobject|spoofchecker|sprintf|sql_regcase|sqlite3|sqlite3result|sqlite3stmt|sqlite_array_query|sqlite_busy_timeout|sqlite_changes|sqlite_close|sqlite_column|sqlite_create_aggregate|sqlite_create_function|sqlite_current|sqlite_error_string|sqlite_escape_string|sqlite_exec|sqlite_factory|sqlite_fetch_all|sqlite_fetch_array|sqlite_fetch_column_types|sqlite_fetch_object|sqlite_fetch_single|sqlite_fetch_string|sqlite_field_name|sqlite_has_more|sqlite_has_prev|sqlite_key|sqlite_last_error|sqlite_last_insert_rowid|sqlite_libencoding|sqlite_libversion|sqlite_next|sqlite_num_fields|sqlite_num_rows|sqlite_open|sqlite_popen|sqlite_prev|sqlite_query|sqlite_rewind|sqlite_seek|sqlite_single_query|sqlite_udf_decode_binary|sqlite_udf_encode_binary|sqlite_unbuffered_query|sqlite_valid|sqrt|srand|sscanf|ssdeep_fuzzy_compare|ssdeep_fuzzy_hash|ssdeep_fuzzy_hash_filename|ssh2_auth_hostbased_file|ssh2_auth_none|ssh2_auth_password|ssh2_auth_pubkey_file|ssh2_connect|ssh2_exec|ssh2_fetch_stream|ssh2_fingerprint|ssh2_methods_negotiated|ssh2_publickey_add|ssh2_publickey_init|ssh2_publickey_list|ssh2_publickey_remove|ssh2_scp_recv|ssh2_scp_send|ssh2_sftp|ssh2_sftp_lstat|ssh2_sftp_mkdir|ssh2_sftp_readlink|ssh2_sftp_realpath|ssh2_sftp_rename|ssh2_sftp_rmdir|ssh2_sftp_stat|ssh2_sftp_symlink|ssh2_sftp_unlink|ssh2_shell|ssh2_tunnel|stat|stats_absolute_deviation|stats_cdf_beta|stats_cdf_binomial|stats_cdf_cauchy|stats_cdf_chisquare|stats_cdf_exponential|stats_cdf_f|stats_cdf_gamma|stats_cdf_laplace|stats_cdf_logistic|stats_cdf_negative_binomial|stats_cdf_noncentral_chisquare|stats_cdf_noncentral_f|stats_cdf_poisson|stats_cdf_t|stats_cdf_uniform|stats_cdf_weibull|stats_covariance|stats_den_uniform|stats_dens_beta|stats_dens_cauchy|stats_dens_chisquare|stats_dens_exponential|stats_dens_f|stats_dens_gamma|stats_dens_laplace|stats_dens_logistic|stats_dens_negative_binomial|stats_dens_normal|stats_dens_pmf_binomial|stats_dens_pmf_hypergeometric|stats_dens_pmf_poisson|stats_dens_t|stats_dens_weibull|stats_harmonic_mean|stats_kurtosis|stats_rand_gen_beta|stats_rand_gen_chisquare|stats_rand_gen_exponential|stats_rand_gen_f|stats_rand_gen_funiform|stats_rand_gen_gamma|stats_rand_gen_ibinomial|stats_rand_gen_ibinomial_negative|stats_rand_gen_int|stats_rand_gen_ipoisson|stats_rand_gen_iuniform|stats_rand_gen_noncenral_chisquare|stats_rand_gen_noncentral_f|stats_rand_gen_noncentral_t|stats_rand_gen_normal|stats_rand_gen_t|stats_rand_get_seeds|stats_rand_phrase_to_seeds|stats_rand_ranf|stats_rand_setall|stats_skew|stats_standard_deviation|stats_stat_binomial_coef|stats_stat_correlation|stats_stat_gennch|stats_stat_independent_t|stats_stat_innerproduct|stats_stat_noncentral_t|stats_stat_paired_t|stats_stat_percentile|stats_stat_powersum|stats_variance|stomp|stomp_connect_error|stomp_version|stompexception|stompframe|str_getcsv|str_ireplace|str_pad|str_repeat|str_replace|str_rot13|str_shuffle|str_split|str_word_count|strcasecmp|strchr|strcmp|strcoll|strcspn|stream_bucket_append|stream_bucket_make_writeable|stream_bucket_new|stream_bucket_prepend|stream_context_create|stream_context_get_default|stream_context_get_options|stream_context_get_params|stream_context_set_default|stream_context_set_option|stream_context_set_params|stream_copy_to_stream|stream_encoding|stream_filter_append|stream_filter_prepend|stream_filter_register|stream_filter_remove|stream_get_contents|stream_get_filters|stream_get_line|stream_get_meta_data|stream_get_transports|stream_get_wrappers|stream_is_local|stream_notification_callback|stream_register_wrapper|stream_resolve_include_path|stream_select|stream_set_blocking|stream_set_read_buffer|stream_set_timeout|stream_set_write_buffer|stream_socket_accept|stream_socket_client|stream_socket_enable_crypto|stream_socket_get_name|stream_socket_pair|stream_socket_recvfrom|stream_socket_sendto|stream_socket_server|stream_socket_shutdown|stream_supports_lock|stream_wrapper_register|stream_wrapper_restore|stream_wrapper_unregister|streamwrapper|strftime|strip_tags|stripcslashes|stripos|stripslashes|stristr|strlen|strnatcasecmp|strnatcmp|strncasecmp|strncmp|strpbrk|strpos|strptime|strrchr|strrev|strripos|strrpos|strspn|strstr|strtok|strtolower|strtotime|strtoupper|strtr|strval|substr|substr_compare|substr_count|substr_replace|svm|svmmodel|svn_add|svn_auth_get_parameter|svn_auth_set_parameter|svn_blame|svn_cat|svn_checkout|svn_cleanup|svn_client_version|svn_commit|svn_delete|svn_diff|svn_export|svn_fs_abort_txn|svn_fs_apply_text|svn_fs_begin_txn2|svn_fs_change_node_prop|svn_fs_check_path|svn_fs_contents_changed|svn_fs_copy|svn_fs_delete|svn_fs_dir_entries|svn_fs_file_contents|svn_fs_file_length|svn_fs_is_dir|svn_fs_is_file|svn_fs_make_dir|svn_fs_make_file|svn_fs_node_created_rev|svn_fs_node_prop|svn_fs_props_changed|svn_fs_revision_prop|svn_fs_revision_root|svn_fs_txn_root|svn_fs_youngest_rev|svn_import|svn_log|svn_ls|svn_mkdir|svn_repos_create|svn_repos_fs|svn_repos_fs_begin_txn_for_commit|svn_repos_fs_commit_txn|svn_repos_hotcopy|svn_repos_open|svn_repos_recover|svn_revert|svn_status|svn_update|swf_actiongeturl|swf_actiongotoframe|swf_actiongotolabel|swf_actionnextframe|swf_actionplay|swf_actionprevframe|swf_actionsettarget|swf_actionstop|swf_actiontogglequality|swf_actionwaitforframe|swf_addbuttonrecord|swf_addcolor|swf_closefile|swf_definebitmap|swf_definefont|swf_defineline|swf_definepoly|swf_definerect|swf_definetext|swf_endbutton|swf_enddoaction|swf_endshape|swf_endsymbol|swf_fontsize|swf_fontslant|swf_fonttracking|swf_getbitmapinfo|swf_getfontinfo|swf_getframe|swf_labelframe|swf_lookat|swf_modifyobject|swf_mulcolor|swf_nextid|swf_oncondition|swf_openfile|swf_ortho|swf_ortho2|swf_perspective|swf_placeobject|swf_polarview|swf_popmatrix|swf_posround|swf_pushmatrix|swf_removeobject|swf_rotate|swf_scale|swf_setfont|swf_setframe|swf_shapearc|swf_shapecurveto|swf_shapecurveto3|swf_shapefillbitmapclip|swf_shapefillbitmaptile|swf_shapefilloff|swf_shapefillsolid|swf_shapelinesolid|swf_shapelineto|swf_shapemoveto|swf_showframe|swf_startbutton|swf_startdoaction|swf_startshape|swf_startsymbol|swf_textwidth|swf_translate|swf_viewport|swfaction|swfbitmap|swfbutton|swfdisplayitem|swffill|swffont|swffontchar|swfgradient|swfmorph|swfmovie|swfprebuiltclip|swfshape|swfsound|swfsoundinstance|swfsprite|swftext|swftextfield|swfvideostream|swish_construct|swish_getmetalist|swish_getpropertylist|swish_prepare|swish_query|swishresult_getmetalist|swishresult_stem|swishresults_getparsedwords|swishresults_getremovedstopwords|swishresults_nextresult|swishresults_seekresult|swishsearch_execute|swishsearch_resetlimit|swishsearch_setlimit|swishsearch_setphrasedelimiter|swishsearch_setsort|swishsearch_setstructure|sybase_affected_rows|sybase_close|sybase_connect|sybase_data_seek|sybase_deadlock_retry_count|sybase_fetch_array|sybase_fetch_assoc|sybase_fetch_field|sybase_fetch_object|sybase_fetch_row|sybase_field_seek|sybase_free_result|sybase_get_last_message|sybase_min_client_severity|sybase_min_error_severity|sybase_min_message_severity|sybase_min_server_severity|sybase_num_fields|sybase_num_rows|sybase_pconnect|sybase_query|sybase_result|sybase_select_db|sybase_set_message_handler|sybase_unbuffered_query|symlink|sys_get_temp_dir|sys_getloadavg|syslog|system|tag|tan|tanh|tcpwrap_check|tempnam|textdomain|tidy|tidy_access_count|tidy_config_count|tidy_diagnose|tidy_error_count|tidy_get_error_buffer|tidy_get_output|tidy_load_config|tidy_reset_config|tidy_save_config|tidy_set_encoding|tidy_setopt|tidy_warning_count|tidynode|time|time_nanosleep|time_sleep_until|timezone_abbreviations_list|timezone_identifiers_list|timezone_location_get|timezone_name_from_abbr|timezone_name_get|timezone_offset_get|timezone_open|timezone_transitions_get|timezone_version_get|tmpfile|token_get_all|token_name|tokyotyrant|tokyotyrantquery|tokyotyranttable|tostring|tostring|touch|transliterator|traversable|trigger_error|trim|uasort|ucfirst|ucwords|udm_add_search_limit|udm_alloc_agent|udm_alloc_agent_array|udm_api_version|udm_cat_list|udm_cat_path|udm_check_charset|udm_check_stored|udm_clear_search_limits|udm_close_stored|udm_crc32|udm_errno|udm_error|udm_find|udm_free_agent|udm_free_ispell_data|udm_free_res|udm_get_doc_count|udm_get_res_field|udm_get_res_param|udm_hash32|udm_load_ispell_data|udm_open_stored|udm_set_agent_param|uksort|umask|underflowexception|unexpectedvalueexception|uniqid|unixtojd|unlink|unpack|unregister_tick_function|unserialize|unset|urldecode|urlencode|use_soap_error_handler|user_error|usleep|usort|utf8_decode|utf8_encode|v8js|v8jsexception|var_dump|var_export|variant|variant_abs|variant_add|variant_and|variant_cast|variant_cat|variant_cmp|variant_date_from_timestamp|variant_date_to_timestamp|variant_div|variant_eqv|variant_fix|variant_get_type|variant_idiv|variant_imp|variant_int|variant_mod|variant_mul|variant_neg|variant_not|variant_or|variant_pow|variant_round|variant_set|variant_set_type|variant_sub|variant_xor|version_compare|vfprintf|virtual|vpopmail_add_alias_domain|vpopmail_add_alias_domain_ex|vpopmail_add_domain|vpopmail_add_domain_ex|vpopmail_add_user|vpopmail_alias_add|vpopmail_alias_del|vpopmail_alias_del_domain|vpopmail_alias_get|vpopmail_alias_get_all|vpopmail_auth_user|vpopmail_del_domain|vpopmail_del_domain_ex|vpopmail_del_user|vpopmail_error|vpopmail_passwd|vpopmail_set_user_quota|vprintf|vsprintf|w32api_deftype|w32api_init_dtype|w32api_invoke_function|w32api_register_function|w32api_set_call_method|wddx_add_vars|wddx_deserialize|wddx_packet_end|wddx_packet_start|wddx_serialize_value|wddx_serialize_vars|win32_continue_service|win32_create_service|win32_delete_service|win32_get_last_control_message|win32_pause_service|win32_ps_list_procs|win32_ps_stat_mem|win32_ps_stat_proc|win32_query_service_status|win32_set_service_status|win32_start_service|win32_start_service_ctrl_dispatcher|win32_stop_service|wincache_fcache_fileinfo|wincache_fcache_meminfo|wincache_lock|wincache_ocache_fileinfo|wincache_ocache_meminfo|wincache_refresh_if_changed|wincache_rplist_fileinfo|wincache_rplist_meminfo|wincache_scache_info|wincache_scache_meminfo|wincache_ucache_add|wincache_ucache_cas|wincache_ucache_clear|wincache_ucache_dec|wincache_ucache_delete|wincache_ucache_exists|wincache_ucache_get|wincache_ucache_inc|wincache_ucache_info|wincache_ucache_meminfo|wincache_ucache_set|wincache_unlock|wordwrap|xattr_get|xattr_list|xattr_remove|xattr_set|xattr_supported|xdiff_file_bdiff|xdiff_file_bdiff_size|xdiff_file_bpatch|xdiff_file_diff|xdiff_file_diff_binary|xdiff_file_merge3|xdiff_file_patch|xdiff_file_patch_binary|xdiff_file_rabdiff|xdiff_string_bdiff|xdiff_string_bdiff_size|xdiff_string_bpatch|xdiff_string_diff|xdiff_string_diff_binary|xdiff_string_merge3|xdiff_string_patch|xdiff_string_patch_binary|xdiff_string_rabdiff|xhprof_disable|xhprof_enable|xhprof_sample_disable|xhprof_sample_enable|xml_error_string|xml_get_current_byte_index|xml_get_current_column_number|xml_get_current_line_number|xml_get_error_code|xml_parse|xml_parse_into_struct|xml_parser_create|xml_parser_create_ns|xml_parser_free|xml_parser_get_option|xml_parser_set_option|xml_set_character_data_handler|xml_set_default_handler|xml_set_element_handler|xml_set_end_namespace_decl_handler|xml_set_external_entity_ref_handler|xml_set_notation_decl_handler|xml_set_object|xml_set_processing_instruction_handler|xml_set_start_namespace_decl_handler|xml_set_unparsed_entity_decl_handler|xmlreader|xmlrpc_decode|xmlrpc_decode_request|xmlrpc_encode|xmlrpc_encode_request|xmlrpc_get_type|xmlrpc_is_fault|xmlrpc_parse_method_descriptions|xmlrpc_server_add_introspection_data|xmlrpc_server_call_method|xmlrpc_server_create|xmlrpc_server_destroy|xmlrpc_server_register_introspection_callback|xmlrpc_server_register_method|xmlrpc_set_type|xmlwriter_end_attribute|xmlwriter_end_cdata|xmlwriter_end_comment|xmlwriter_end_document|xmlwriter_end_dtd|xmlwriter_end_dtd_attlist|xmlwriter_end_dtd_element|xmlwriter_end_dtd_entity|xmlwriter_end_element|xmlwriter_end_pi|xmlwriter_flush|xmlwriter_full_end_element|xmlwriter_open_memory|xmlwriter_open_uri|xmlwriter_output_memory|xmlwriter_set_indent|xmlwriter_set_indent_string|xmlwriter_start_attribute|xmlwriter_start_attribute_ns|xmlwriter_start_cdata|xmlwriter_start_comment|xmlwriter_start_document|xmlwriter_start_dtd|xmlwriter_start_dtd_attlist|xmlwriter_start_dtd_element|xmlwriter_start_dtd_entity|xmlwriter_start_element|xmlwriter_start_element_ns|xmlwriter_start_pi|xmlwriter_text|xmlwriter_write_attribute|xmlwriter_write_attribute_ns|xmlwriter_write_cdata|xmlwriter_write_comment|xmlwriter_write_dtd|xmlwriter_write_dtd_attlist|xmlwriter_write_dtd_element|xmlwriter_write_dtd_entity|xmlwriter_write_element|xmlwriter_write_element_ns|xmlwriter_write_pi|xmlwriter_write_raw|xpath_eval|xpath_eval_expression|xpath_new_context|xpath_register_ns|xpath_register_ns_auto|xptr_eval|xptr_new_context|xslt_backend_info|xslt_backend_name|xslt_backend_version|xslt_create|xslt_errno|xslt_error|xslt_free|xslt_getopt|xslt_process|xslt_set_base|xslt_set_encoding|xslt_set_error_handler|xslt_set_log|xslt_set_object|xslt_set_sax_handler|xslt_set_sax_handlers|xslt_set_scheme_handler|xslt_set_scheme_handlers|xslt_setopt|xsltprocessor|yaml_emit|yaml_emit_file|yaml_parse|yaml_parse_file|yaml_parse_url|yaz_addinfo|yaz_ccl_conf|yaz_ccl_parse|yaz_close|yaz_connect|yaz_database|yaz_element|yaz_errno|yaz_error|yaz_es|yaz_es_result|yaz_get_option|yaz_hits|yaz_itemorder|yaz_present|yaz_range|yaz_record|yaz_scan|yaz_scan_result|yaz_schema|yaz_search|yaz_set_option|yaz_sort|yaz_syntax|yaz_wait|yp_all|yp_cat|yp_err_string|yp_errno|yp_first|yp_get_default_domain|yp_master|yp_match|yp_next|yp_order|zend_logo_guid|zend_thread_id|zend_version|zip_close|zip_entry_close|zip_entry_compressedsize|zip_entry_compressionmethod|zip_entry_filesize|zip_entry_name|zip_entry_open|zip_entry_read|zip_open|zip_read|ziparchive|ziparchive_addemptydir|ziparchive_addfile|ziparchive_addfromstring|ziparchive_close|ziparchive_deleteindex|ziparchive_deletename|ziparchive_extractto|ziparchive_getarchivecomment|ziparchive_getcommentindex|ziparchive_getcommentname|ziparchive_getfromindex|ziparchive_getfromname|ziparchive_getnameindex|ziparchive_getstatusstring|ziparchive_getstream|ziparchive_locatename|ziparchive_open|ziparchive_renameindex|ziparchive_renamename|ziparchive_setCommentName|ziparchive_setarchivecomment|ziparchive_setcommentindex|ziparchive_statindex|ziparchive_statname|ziparchive_unchangeall|ziparchive_unchangearchive|ziparchive_unchangeindex|ziparchive_unchangename|zlib_get_coding_type".split("|")),b=e.arrayToMap("abstract|and|array|as|break|case|catch|class|clone|const|continue|declare|default|do|else|elseif|enddeclare|endfor|endforeach|endif|endswitch|endwhile|extends|final|for|foreach|function|global|goto|if|implements|interface|instanceof|namespace|new|or|private|protected|public|static|switch|throw|try|use|var|while|xor".split("|")),c=e.arrayToMap("die|echo|empty|exit|eval|include|include_once|isset|list|require|require_once|return|print|unset".split("|")),d=e.arrayToMap("true|false|null|__CLASS__|__DIR__|__FILE__|__LINE__|__METHOD__|__FUNCTION__|__NAMESPACE__".split("|")),g=e.arrayToMap("$GLOBALS|$_SERVER|$_GET|$_POST|$_FILES|$_REQUEST|$_SESSION|$_ENV|$_COOKIE|$php_errormsg|$HTTP_RAW_POST_DATA|$http_response_header|$argc|$argv".split("|")),h=e.arrayToMap("key_exists|cairo_matrix_create_scale|cairo_matrix_create_translate|call_user_method|call_user_method_array|com_addref|com_get|com_invoke|com_isenum|com_load|com_release|com_set|connection_timeout|cubrid_load_from_glo|cubrid_new_glo|cubrid_save_to_glo|cubrid_send_glo|define_syslog_variables|dl|ereg|ereg_replace|eregi|eregi_replace|hw_documentattributes|hw_documentbodytag|hw_documentsize|hw_outputdocument|imagedashedline|maxdb_bind_param|maxdb_bind_result|maxdb_client_encoding|maxdb_close_long_data|maxdb_execute|maxdb_fetch|maxdb_get_metadata|maxdb_param_count|maxdb_send_long_data|mcrypt_ecb|mcrypt_generic_end|mime_content_type|mysql_createdb|mysql_dbname|mysql_db_query|mysql_drop_db|mysql_dropdb|mysql_escape_string|mysql_fieldflags|mysql_fieldflags|mysql_fieldname|mysql_fieldtable|mysql_fieldtype|mysql_freeresult|mysql_listdbs|mysql_list_fields|mysql_listfields|mysql_list_tables|mysql_listtables|mysql_numfields|mysql_numrows|mysql_selectdb|mysql_tablename|mysqli_bind_param|mysqli_bind_result|mysqli_disable_reads_from_master|mysqli_disable_rpl_parse|mysqli_enable_reads_from_master|mysqli_enable_rpl_parse|mysqli_execute|mysqli_fetch|mysqli_get_metadata|mysqli_master_query|mysqli_param_count|mysqli_rpl_parse_enabled|mysqli_rpl_probe|mysqli_rpl_query_type|mysqli_send_long_data|mysqli_send_query|mysqli_slave_query|ocibindbyname|ocicancel|ocicloselob|ocicollappend|ocicollassign|ocicollassignelem|ocicollgetelem|ocicollmax|ocicollsize|ocicolltrim|ocicolumnisnull|ocicolumnname|ocicolumnprecision|ocicolumnscale|ocicolumnsize|ocicolumntype|ocicolumntyperaw|ocicommit|ocidefinebyname|ocierror|ociexecute|ocifetch|ocifetchinto|ocifetchstatement|ocifreecollection|ocifreecursor|ocifreedesc|ocifreestatement|ociinternaldebug|ociloadlob|ocilogoff|ocilogon|ocinewcollection|ocinewcursor|ocinewdescriptor|ocinlogon|ocinumcols|ociparse|ociplogon|ociresult|ocirollback|ocirowcount|ocisavelob|ocisavelobfile|ociserverversion|ocisetprefetch|ocistatementtype|ociwritelobtofile|ociwritetemporarylob|PDF_add_annotation|PDF_add_bookmark|PDF_add_launchlink|PDF_add_locallink|PDF_add_note|PDF_add_outline|PDF_add_pdflink|PDF_add_weblink|PDF_attach_file|PDF_begin_page|PDF_begin_template|PDF_close_pdi|PDF_close|PDF_findfont|PDF_get_font|PDF_get_fontname|PDF_get_fontsize|PDF_get_image_height|PDF_get_image_width|PDF_get_majorversion|PDF_get_minorversion|PDF_get_pdi_parameter|PDF_get_pdi_value|PDF_open_ccitt|PDF_open_file|PDF_open_gif|PDF_open_image_file|PDF_open_image|PDF_open_jpeg|PDF_open_pdi|PDF_open_tiff|PDF_place_image|PDF_place_pdi_page|PDF_set_border_color|PDF_set_border_dash|PDF_set_border_style|PDF_set_char_spacing|PDF_set_duration|PDF_set_horiz_scaling|PDF_set_info_author|PDF_set_info_creator|PDF_set_info_keywords|PDF_set_info_subject|PDF_set_info_title|PDF_set_leading|PDF_set_text_matrix|PDF_set_text_rendering|PDF_set_text_rise|PDF_set_word_spacing|PDF_setgray_fill|PDF_setgray_stroke|PDF_setgray|PDF_setpolydash|PDF_setrgbcolor_fill|PDF_setrgbcolor_stroke|PDF_setrgbcolor|PDF_show_boxed|php_check_syntax|px_set_tablename|px_set_targetencoding|runkit_sandbox_output_handler|session_is_registered|session_register|session_unregisterset_magic_quotes_runtime|magic_quotes_runtime|set_socket_blocking|socket_set_blocking|set_socket_timeout|socket_set_timeout|split|spliti|sql_regcase".split("|")),i=e.arrayToMap("cfunction|old_function".split("|")),j=e.arrayToMap([]);this.$rules={start:[{token:"support",regex:"<\\?(?:php|\\=)"},{token:"support",regex:"\\?>"},{token:"comment",regex:"\\/\\/.*$"},{token:"comment",regex:"#.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/][gimy]*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",merge:!0,regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",merge:!0,regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language",regex:"\\b(?:DEFAULT_INCLUDE_PATH|E_(?:ALL|CO(?:MPILE_(?:ERROR|WARNING)|RE_(?:ERROR|WARNING))|ERROR|NOTICE|PARSE|STRICT|USER_(?:ERROR|NOTICE|WARNING)|WARNING)|P(?:EAR_(?:EXTENSION_DIR|INSTALL_DIR)|HP_(?:BINDIR|CONFIG_FILE_(?:PATH|SCAN_DIR)|DATADIR|E(?:OL|XTENSION_DIR)|INT_(?:MAX|SIZE)|L(?:IBDIR|OCALSTATEDIR)|O(?:S|UTPUT_HANDLER_(?:CONT|END|START))|PREFIX|S(?:API|HLIB_SUFFIX|YSCONFDIR)|VERSION))|__COMPILER_HALT_OFFSET__)\\b"},{token:"constant.language",regex:"\\b(?:A(?:B(?:DAY_(?:1|2|3|4|5|6|7)|MON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9))|LT_DIGITS|M_STR|SSERT_(?:ACTIVE|BAIL|CALLBACK|QUIET_EVAL|WARNING))|C(?:ASE_(?:LOWER|UPPER)|HAR_MAX|O(?:DESET|NNECTION_(?:ABORTED|NORMAL|TIMEOUT)|UNT_(?:NORMAL|RECURSIVE))|R(?:EDITS_(?:ALL|DOCS|FULLPAGE|G(?:ENERAL|ROUP)|MODULES|QA|SAPI)|NCYSTR|YPT_(?:BLOWFISH|EXT_DES|MD5|S(?:ALT_LENGTH|TD_DES)))|URRENCY_SYMBOL)|D(?:AY_(?:1|2|3|4|5|6|7)|ECIMAL_POINT|IRECTORY_SEPARATOR|_(?:FMT|T_FMT))|E(?:NT_(?:COMPAT|NOQUOTES|QUOTES)|RA(?:_(?:D_(?:FMT|T_FMT)|T_FMT|YEAR)|)|XTR_(?:IF_EXISTS|OVERWRITE|PREFIX_(?:ALL|I(?:F_EXISTS|NVALID)|SAME)|SKIP))|FRAC_DIGITS|GROUPING|HTML_(?:ENTITIES|SPECIALCHARS)|IN(?:FO_(?:ALL|C(?:ONFIGURATION|REDITS)|ENVIRONMENT|GENERAL|LICENSE|MODULES|VARIABLES)|I_(?:ALL|PERDIR|SYSTEM|USER)|T_(?:CURR_SYMBOL|FRAC_DIGITS))|L(?:C_(?:ALL|C(?:OLLATE|TYPE)|M(?:ESSAGES|ONETARY)|NUMERIC|TIME)|O(?:CK_(?:EX|NB|SH|UN)|G_(?:A(?:LERT|UTH(?:PRIV|))|C(?:ONS|R(?:IT|ON))|D(?:AEMON|EBUG)|E(?:MERG|RR)|INFO|KERN|L(?:OCAL(?:0|1|2|3|4|5|6|7)|PR)|MAIL|N(?:DELAY|EWS|O(?:TICE|WAIT))|ODELAY|P(?:ERROR|ID)|SYSLOG|U(?:SER|UCP)|WARNING)))|M(?:ON_(?:1(?:0|1|2|)|2|3|4|5|6|7|8|9|DECIMAL_POINT|GROUPING|THOUSANDS_SEP)|_(?:1_PI|2_(?:PI|SQRTPI)|E|L(?:N(?:10|2)|OG(?:10E|2E))|PI(?:_(?:2|4)|)|SQRT(?:1_2|2)))|N(?:EGATIVE_SIGN|O(?:EXPR|STR)|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|P(?:ATH(?:INFO_(?:BASENAME|DIRNAME|EXTENSION)|_SEPARATOR)|M_STR|OSITIVE_SIGN|_(?:CS_PRECEDES|S(?:EP_BY_SPACE|IGN_POSN)))|RADIXCHAR|S(?:EEK_(?:CUR|END|SET)|ORT_(?:ASC|DESC|NUMERIC|REGULAR|STRING)|TR_PAD_(?:BOTH|LEFT|RIGHT))|T(?:HOUS(?:ANDS_SEP|EP)|_FMT(?:_AMPM|))|YES(?:EXPR|STR)|STD(?:IN|OUT|ERR))\\b"},{token:function(e){if(i.hasOwnProperty(e))return"invalid.deprecated";if(b.hasOwnProperty(e))return"keyword";if(c.hasOwnProperty(e))return"keyword";if(d.hasOwnProperty(e))return"constant.language";if(g.hasOwnProperty(e))return"variable.language";if(j.hasOwnProperty(e))return"invalid.illegal";if(h.hasOwnProperty(e))return"invalid.deprecated";if(a.hasOwnProperty(e))return"support.function";if(e.match(/^(\$[a-zA-Z_][a-zA-Z0-9_]*|self|parent)$/))return"variable";return"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.PhpHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return!1;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}return!1}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}"){e.end.column++;return e}}return!1}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}return!1}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")"){e.end.column++;return e}}return!1}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return!1;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;of.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-python.js b/src/bb-modules/Filemanager/src/ace/mode-python.js new file mode 100644 index 000000000..e0632e253 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-python.js @@ -0,0 +1 @@ +define("ace/mode/python",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/python_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/python_highlight_rules").PythonHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/python_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("and|as|assert|break|class|continue|def|del|elif|else|except|exec|finally|for|from|global|if|import|in|is|lambda|not|or|pass|print|raise|return|try|while|with|yield".split("|")),b=e.arrayToMap("True|False|None|NotImplemented|Ellipsis|__debug__".split("|")),c=e.arrayToMap("abs|divmod|input|open|staticmethod|all|enumerate|int|ord|str|any|eval|isinstance|pow|sum|basestring|execfile|issubclass|print|super|binfile|iter|property|tuple|bool|filter|len|range|type|bytearray|float|list|raw_input|unichr|callable|format|locals|reduce|unicode|chr|frozenset|long|reload|vars|classmethod|getattr|map|repr|xrange|cmp|globals|max|reversed|zip|compile|hasattr|memoryview|round|__import__|complex|hash|min|set|apply|delattr|help|next|setattr|buffer|dict|hex|object|slice|coerce|dir|id|oct|sorted|intern".split("|")),d=e.arrayToMap("".split("|")),f="(?:r|u|ur|R|U|UR|Ur|uR)?",g="(?:(?:[1-9]\\d*)|(?:0))",h="(?:0[oO]?[0-7]+)",i="(?:0[xX][\\dA-Fa-f]+)",j="(?:0[bB][01]+)",k="(?:"+g+"|"+h+"|"+i+"|"+j+")",l="(?:[eE][+-]?\\d+)",m="(?:\\.\\d+)",n="(?:\\d+)",o="(?:(?:"+n+"?"+m+")|(?:"+n+"\\.))",p="(?:(?:"+o+"|"+n+")"+l+")",q="(?:"+p+"|"+o+")";this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"string",regex:f+'"{3}(?:[^\\\\]|\\\\.)*?"{3}'},{token:"string",merge:!0,regex:f+'"{3}.*$',next:"qqstring"},{token:"string",regex:f+'"(?:[^\\\\]|\\\\.)*?"'},{token:"string",regex:f+"'{3}(?:[^\\\\]|\\\\.)*?'{3}"},{token:"string",merge:!0,regex:f+"'{3}.*$",next:"qstring"},{token:"string",regex:f+"'(?:[^\\\\]|\\\\.)*?'"},{token:"constant.numeric",regex:"(?:"+q+"|\\d+)[jJ]\\b"},{token:"constant.numeric",regex:q},{token:"constant.numeric",regex:k+"[lL]\\b"},{token:"constant.numeric",regex:k+"\\b"},{token:function(e){return a.hasOwnProperty(e)?"keyword":b.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"invalid.illegal":c.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"\\+|\\-|\\*|\\*\\*|\\/|\\/\\/|%|<<|>>|&|\\||\\^|~|<|>|<=|=>|==|!=|<>|="},{token:"lparen",regex:"[\\[\\(\\{]"},{token:"rparen",regex:"[\\]\\)\\}]"},{token:"text",regex:"\\s+"}],qqstring:[{token:"string",regex:'(?:[^\\\\]|\\\\.)*?"{3}',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:[^\\\\]|\\\\.)*?'{3}",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.PythonHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-ruby.js b/src/bb-modules/Filemanager/src/ace/mode-ruby.js new file mode 100644 index 000000000..43bfa2a5d --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-ruby.js @@ -0,0 +1 @@ +define("ace/mode/ruby",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/ruby_highlight_rules","ace/mode/matching_brace_outdent","ace/range"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/ruby_highlight_rules").RubyHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)#/;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"#")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(j.prototype),b.Mode=j}),define("ace/mode/ruby_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){var a=e.arrayToMap("abort|Array|assert|assert_equal|assert_not_equal|assert_same|assert_not_same|assert_nil|assert_not_nil|assert_match|assert_no_match|assert_in_delta|assert_throws|assert_raise|assert_nothing_raised|assert_instance_of|assert_kind_of|assert_respond_to|assert_operator|assert_send|assert_difference|assert_no_difference|assert_recognizes|assert_generates|assert_response|assert_redirected_to|assert_template|assert_select|assert_select_email|assert_select_rjs|assert_select_encoded|css_select|at_exit|attr|attr_writer|attr_reader|attr_accessor|attr_accessible|autoload|binding|block_given?|callcc|caller|catch|chomp|chomp!|chop|chop!|defined?|delete_via_redirect|eval|exec|exit|exit!|fail|Float|flunk|follow_redirect!|fork|form_for|form_tag|format|gets|global_variables|gsub|gsub!|get_via_redirect|h|host!|https?|https!|include|Integer|lambda|link_to|link_to_unless_current|link_to_function|link_to_remote|load|local_variables|loop|open|open_session|p|print|printf|proc|putc|puts|post_via_redirect|put_via_redirect|raise|rand|raw|readline|readlines|redirect?|request_via_redirect|require|scan|select|set_trace_func|sleep|split|sprintf|srand|String|stylesheet_link_tag|syscall|system|sub|sub!|test|throw|trace_var|trap|untrace_var|atan2|cos|exp|frexp|ldexp|log|log10|sin|sqrt|tan|render|javascript_include_tag|csrf_meta_tag|label_tag|text_field_tag|submit_tag|check_box_tag|content_tag|radio_button_tag|text_area_tag|password_field_tag|hidden_field_tag|fields_for|select_tag|options_for_select|options_from_collection_for_select|collection_select|time_zone_select|select_date|select_time|select_datetime|date_select|time_select|datetime_select|select_year|select_month|select_day|select_hour|select_minute|select_second|file_field_tag|file_field|respond_to|skip_before_filter|around_filter|after_filter|verify|protect_from_forgery|rescue_from|helper_method|redirect_to|before_filter|send_data|send_file|validates_presence_of|validates_uniqueness_of|validates_length_of|validates_format_of|validates_acceptance_of|validates_associated|validates_exclusion_of|validates_inclusion_of|validates_numericality_of|validates_with|validates_each|authenticate_or_request_with_http_basic|authenticate_or_request_with_http_digest|filter_parameter_logging|match|get|post|resources|redirect|scope|assert_routing|translate|localize|extract_locale_from_tld|t|l|caches_page|expire_page|caches_action|expire_action|cache|expire_fragment|expire_cache_for|observe|cache_sweeper|has_many|has_one|belongs_to|has_and_belongs_to_many".split("|")),b=e.arrayToMap("alias|and|BEGIN|begin|break|case|class|def|defined|do|else|elsif|END|end|ensure|__FILE__|finally|for|gem|if|in|__LINE__|module|next|not|or|private|protected|public|redo|rescue|retry|return|super|then|undef|unless|until|when|while|yield".split("|")),c=e.arrayToMap("true|TRUE|false|FALSE|nil|NIL|ARGF|ARGV|DATA|ENV|RUBY_PLATFORM|RUBY_RELEASE_DATE|RUBY_VERSION|STDERR|STDIN|STDOUT|TOPLEVEL_BINDING".split("|")),d=e.arrayToMap("$DEBUG|$defout|$FILENAME|$LOAD_PATH|$SAFE|$stdin|$stdout|$stderr|$VERBOSE|$!|root_url|flash|session|cookies|params|request|response|logger".split("|"));this.$rules={start:[{token:"comment",regex:"#.*$"},{token:"comment",merge:!0,regex:"^=begin$",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"[`](?:(?:\\\\.)|(?:[^'\\\\]))*?[`]"},{token:"text",regex:"::"},{token:"variable.instancce",regex:"@{1,2}(?:[a-zA-Z_]|d)+"},{token:"variable.class",regex:"[A-Z](?:[a-zA-Z_]|d)+"},{token:"string",regex:"[:](?:[A-Za-z_]|[@$](?=[a-zA-Z0-9_]))[a-zA-Z0-9_]*[!=?]?"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F](?:[0-9a-fA-F]|_(?=[0-9a-fA-F]))*\\b"},{token:"constant.numeric",regex:"[+-]?\\d(?:\\d|_(?=\\d))*(?:(?:\\.\\d(?:\\d|_(?=\\d))*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="self"?"variable.language":b.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"constant.language":d.hasOwnProperty(e)?"variable.language":a.hasOwnProperty(e)?"support.function":e=="debugger"?"invalid.deprecated":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:"^=end$",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(g,f),b.RubyHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-scad.js b/src/bb-modules/Filemanager/src/ace/mode-scad.js new file mode 100644 index 000000000..32054602f --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-scad.js @@ -0,0 +1 @@ +define("ace/mode/scad",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/scad_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/scad_highlight_rules").scadHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/mode/behaviour/cstyle").CstyleBehaviour,k=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new j};d.inherits(k,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(k.prototype),b.Mode=k}),define("ace/mode/scad_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("module|if|else|for".split("|")),b=e.arrayToMap("NULL".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:'["].*\\\\$',next:"qqstring"},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"string",regex:"['].*\\\\$",next:"qstring"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant",regex:"<[a-zA-Z0-9.]+>"},{token:"keyword",regex:"(?:use|include)"},{token:function(c){return c=="this"?"variable.language":a.hasOwnProperty(c)?"keyword":b.hasOwnProperty(c)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|==|=|!=|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.scadHighlightRules=h}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/mode/behaviour/cstyle",["require","exports","module","pilot/oop","ace/mode/behaviour"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=function(){this.add("braces","insertion",function(a,b,c,d,e){if(e=="{"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"{"+g+"}",selection:!1}:{text:"{}",selection:[1,1]}}if(e=="}"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var k=d.$findOpeningBracket("}",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j=="}"){var l=d.findMatchingBracket({row:h.row,column:h.column+1});if(!l)return!1;var m=this.getNextLineIndent(a,i.substring(0,i.length-1),d.getTabString()),n=this.$getIndent(d.doc.getLine(l.row));return{text:"\n"+m+"\n"+n,selection:[1,m.length,1,m.length]}}}return!1}),this.add("braces","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="{"){var g=d.doc.getLine(e.start.row),h=g.substring(e.end.column,e.end.column+1);if(h=="}"){e.end.column++;return e}}return!1}),this.add("parens","insertion",function(a,b,c,d,e){if(e=="("){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?{text:"("+g+")",selection:!1}:{text:"()",selection:[1,1]}}if(e==")"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==")"){var k=d.$findOpeningBracket(")",{column:h.column+1,row:h.row});if(k!==null)return{text:"",selection:[1,1]}}}return!1}),this.add("parens","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=="("){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h==")"){e.end.column++;return e}}return!1}),this.add("string_dquotes","insertion",function(a,b,c,d,e){if(e=='"'){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);if(g!=="")return{text:'"'+g+'"',selection:!1};var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column-1,h.column);if(j=="\\")return!1;var k=d.getTokens(f.start.row,f.start.row)[0].tokens,l=0,m,n=-1;for(var o=0;of.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-scala.js b/src/bb-modules/Filemanager/src/ace/mode-scala.js new file mode 100644 index 000000000..aab530c11 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-scala.js @@ -0,0 +1 @@ +define("ace/mode/scala",["require","exports","module","pilot/oop","ace/mode/javascript","ace/tokenizer","ace/mode/scala_highlight_rules","ace/mode/matching_brace_outdent","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/javascript").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/scala_highlight_rules").ScalaHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/mode/behaviour/cstyle").CstyleBehaviour,j=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new i};d.inherits(j,e),function(){this.createWorker=function(a){return null}}.call(j.prototype),b.Mode=j}),define("ace/mode/javascript",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/worker/worker_client").WorkerClient,k=a("ace/mode/behaviour/cstyle").CstyleBehaviour,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new j(["ace","pilot"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("jslint",function(b){var c=[];for(var d=0;d=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/scala_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/doc_comment_highlight_rules","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/doc_comment_highlight_rules").DocCommentHighlightRules,g=a("ace/mode/text_highlight_rules").TextHighlightRules,h=function(){var a=e.arrayToMap("case|default|do|else|for|if|match|while|throw|return|try|catch|finally|yield|abstract|class|def|extends|final|forSome|implicit|implicits|import|lazy|new|object|override|package|private|protected|sealed|super|this|trait|type|val|var|with".split("|")),b=e.arrayToMap("true|false".split("|")),c=e.arrayToMap("AbstractMethodError|AssertionError|ClassCircularityError|ClassFormatError|Deprecated|EnumConstantNotPresentException|ExceptionInInitializerError|IllegalAccessError|IllegalThreadStateException|InstantiationError|InternalError|NegativeArraySizeException|NoSuchFieldError|Override|Process|ProcessBuilder|SecurityManager|StringIndexOutOfBoundsException|SuppressWarnings|TypeNotPresentException|UnknownError|UnsatisfiedLinkError|UnsupportedClassVersionError|VerifyError|InstantiationException|IndexOutOfBoundsException|ArrayIndexOutOfBoundsException|CloneNotSupportedException|NoSuchFieldException|IllegalArgumentException|NumberFormatException|SecurityException|Void|InheritableThreadLocal|IllegalStateException|InterruptedException|NoSuchMethodException|IllegalAccessException|UnsupportedOperationException|Enum|StrictMath|Package|Compiler|Readable|Runtime|StringBuilder|Math|IncompatibleClassChangeError|NoSuchMethodError|ThreadLocal|RuntimePermission|ArithmeticException|NullPointerException|Long|Integer|Short|Byte|Double|Number|Float|Character|Boolean|StackTraceElement|Appendable|StringBuffer|Iterable|ThreadGroup|Runnable|Thread|IllegalMonitorStateException|StackOverflowError|OutOfMemoryError|VirtualMachineError|ArrayStoreException|ClassCastException|LinkageError|NoClassDefFoundError|ClassNotFoundException|RuntimeException|Exception|ThreadDeath|Error|Throwable|System|ClassLoader|Cloneable|Class|CharSequence|Comparable|String|Object|Unit|Any|AnyVal|AnyRef|Null|ScalaObject|Singleton|Seq|Iterable|List|Option|Array|Char|Byte|Short|Int|Long|Nothing".split("|")),d=e.arrayToMap("".split("|"));this.$rules={start:[{token:"comment",regex:"\\/\\/.*$"},(new f).getStartRule("doc-start"),{token:"comment",merge:!0,regex:"\\/\\*",next:"comment"},{token:"string.regexp",regex:"[/](?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*\\s*(?=[).,;]|$)"},{token:"string",regex:'["](?:(?:\\\\.)|(?:[^"\\\\]))*?["]'},{token:"string",regex:"['](?:(?:\\\\.)|(?:[^'\\\\]))*?[']"},{token:"constant.numeric",regex:"0[xX][0-9a-fA-F]+\\b"},{token:"constant.numeric",regex:"[+-]?\\d+(?:(?:\\.\\d*)?(?:[eE][+-]?\\d+)?)?\\b"},{token:"constant.language.boolean",regex:"(?:true|false)\\b"},{token:function(e){return e=="this"?"variable.language":a.hasOwnProperty(e)?"keyword":c.hasOwnProperty(e)?"support.function":d.hasOwnProperty(e)?"support.function":b.hasOwnProperty(e)?"constant.language":"identifier"},regex:"[a-zA-Z_$][a-zA-Z0-9_$]*\\b"},{token:"keyword.operator",regex:"!|\\$|%|&|\\*|\\-\\-|\\-|\\+\\+|\\+|~|===|==|=|!=|!==|<=|>=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}]},this.embedRules(f,"doc-",[(new f).getEndRule("start")])};d.inherits(h,g),b.ScalaHighlightRules=h}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-scss.js b/src/bb-modules/Filemanager/src/ace/mode-scss.js new file mode 100644 index 000000000..9b4e11842 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-scss.js @@ -0,0 +1 @@ +define("ace/mode/scss",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/scss_highlight_rules","ace/mode/matching_brace_outdent"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/scss_highlight_rules").ScssHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h};d.inherits(i,e),function(){this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a).tokens;if(e.length&&e[e.length-1].type=="comment")return d;var f=b.match(/^.*\{\s*$/);f&&(d+=c);return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)}}.call(i.prototype),b.Mode=i}),define("ace/mode/scss_highlight_rules",["require","exports","module","pilot/oop","pilot/lang","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/lang"),f=a("ace/mode/text_highlight_rules").TextHighlightRules,g=function(){function i(a){var b=[],c=a.split("");for(var d=0;d|<=|>=|==|!=|-|%|#|\\+|\\$|\\+|\\*"},{token:"lparen",regex:"[[({]"},{token:"rparen",regex:"[\\])}]"},{token:"text",regex:"\\s+"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]}};d.inherits(g,f),b.ScssHighlightRules=g}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/mode-svg.js b/src/bb-modules/Filemanager/src/ace/mode-svg.js new file mode 100644 index 000000000..d8b49f897 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/mode-svg.js @@ -0,0 +1 @@ +define("ace/mode/svg",["require","exports","module","pilot/oop","ace/mode/text","ace/mode/javascript","ace/tokenizer","ace/mode/svg_highlight_rules","ace/mode/behaviour/xml"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/mode/javascript").Mode,g=a("ace/tokenizer").Tokenizer,h=a("ace/mode/svg_highlight_rules").SvgHighlightRules,i=a("ace/mode/behaviour/xml").XmlBehaviour,j=function(){this.highlighter=new h,this.$tokenizer=new g(this.highlighter.getRules()),this.$behaviour=new i,this.$embeds=this.highlighter.getEmbeds(),this.createModeDelegates({"js-":f})};d.inherits(j,e),function(){this.toggleCommentLines=function(a,b,c,d){return 0},this.getNextLineIndent=function(a,b,c){return this.$getIndent(b)},this.checkOutdent=function(a,b,c){return!1}}.call(j.prototype),b.Mode=j}),define("ace/mode/javascript",["require","exports","module","pilot/oop","ace/mode/text","ace/tokenizer","ace/mode/javascript_highlight_rules","ace/mode/matching_brace_outdent","ace/range","ace/worker/worker_client","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text").Mode,f=a("ace/tokenizer").Tokenizer,g=a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,h=a("ace/mode/matching_brace_outdent").MatchingBraceOutdent,i=a("ace/range").Range,j=a("ace/worker/worker_client").WorkerClient,k=a("ace/mode/behaviour/cstyle").CstyleBehaviour,l=function(){this.$tokenizer=new f((new g).getRules()),this.$outdent=new h,this.$behaviour=new k};d.inherits(l,e),function(){this.toggleCommentLines=function(a,b,c,d){var e=!0,f=[],g=/^(\s*)\/\//;for(var h=c;h<=d;h++)if(!g.test(b.getLine(h))){e=!1;break}if(e){var j=new i(0,0,0,0);for(var h=c;h<=d;h++){var k=b.getLine(h),l=k.match(g);j.start.row=h,j.end.row=h,j.end.column=l[0].length,b.replace(j,l[1])}}else b.indentRows(c,d,"//")},this.getNextLineIndent=function(a,b,c){var d=this.$getIndent(b),e=this.$tokenizer.getLineTokens(b,a),f=e.tokens,g=e.state;if(f.length&&f[f.length-1].type=="comment")return d;if(a=="start"){var h=b.match(/^.*[\{\(\[\:]\s*$/);h&&(d+=c)}else if(a=="doc-start"){if(g=="start")return"";var h=b.match(/^\s*(\/?)\*/);h&&(h[1]&&(d+=" "),d+="* ")}return d},this.checkOutdent=function(a,b,c){return this.$outdent.checkOutdent(b,c)},this.autoOutdent=function(a,b,c){this.$outdent.autoOutdent(b,c)},this.createWorker=function(a){var b=a.getDocument(),c=new j(["ace","pilot"],"worker-javascript.js","ace/mode/javascript_worker","JavaScriptWorker");c.call("setValue",[b.getValue()]),b.on("change",function(a){a.range={start:a.data.range.start,end:a.data.range.end},c.emit("change",a)}),c.on("jslint",function(b){var c=[];for(var d=0;d=|<<=|>>=|>>>=|<>|<|>|!|&&|\\|\\||\\?\\:|\\*=|%=|\\+=|\\-=|&=|\\^=|\\b(?:in|instanceof|new|delete|typeof|void)",next:"regex_allowed"},{token:"lparen",regex:"[[({]",next:"regex_allowed"},{token:"rparen",regex:"[\\])}]"},{token:"keyword.operator",regex:"\\/=?",next:"regex_allowed"},{token:"comment",regex:"^#!.*$"},{token:"text",regex:"\\s+"}],regex_allowed:[{token:"string.regexp",regex:"\\/(?:(?:\\[(?:\\\\]|[^\\]])+\\])|(?:\\\\/|[^\\]/]))*[/]\\w*",next:"start"},{token:"text",regex:"\\s+"},{token:"empty",regex:"",next:"start"}],comment:[{token:"comment",regex:".*?\\*\\/",next:"start"},{token:"comment",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'(?:(?:\\\\.)|(?:[^"\\\\]))*?"',next:"start"},{token:"string",merge:!0,regex:".+"}],qstring:[{token:"string",regex:"(?:(?:\\\\.)|(?:[^'\\\\]))*?'",next:"start"},{token:"string",merge:!0,regex:".+"}]},this.embedRules(g,"doc-",[(new g).getEndRule("start")])};d.inherits(i,h),b.JavaScriptHighlightRules=i}),define("ace/mode/doc_comment_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"comment.doc.tag",regex:"@[\\w\\d_]+"},{token:"comment.doc",merge:!0,regex:"\\s+"},{token:"comment.doc",merge:!0,regex:"TODO"},{token:"comment.doc",merge:!0,regex:"[^@\\*]+"},{token:"comment.doc",merge:!0,regex:"."}]}};d.inherits(f,e),function(){this.getStartRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\/\\*(?=\\*)",next:a}},this.getEndRule=function(a){return{token:"comment.doc",merge:!0,regex:"\\*\\/",next:a}}}.call(f.prototype),b.DocCommentHighlightRules=f}),define("ace/mode/matching_brace_outdent",["require","exports","module","ace/range"],function(a,b,c){var d=a("ace/range").Range,e=function(){};(function(){this.checkOutdent=function(a,b){return/^\s+$/.test(a)?/^\s*\}/.test(b):!1},this.autoOutdent=function(a,b){var c=a.getLine(b),e=c.match(/^(\s*\})/);if(!e)return 0;var f=e[1].length,g=a.findMatchingBracket({row:b,column:f});if(!g||g.row==b)return 0;var h=this.$getIndent(a.getLine(g.row));a.replace(new d(b,0,b,f-1),h)},this.$getIndent=function(a){var b=a.match(/^(\s+)/);return b?b[1]:""}}).call(e.prototype),b.MatchingBraceOutdent=e}),define("ace/worker/worker_client",["require","exports","module","pilot/oop","pilot/event_emitter"],function(a,b,c){var d=a("pilot/oop"),e=a("pilot/event_emitter").EventEmitter,f=function(b,c,d,e){this.callbacks=[];if(a.packaged)var f=this.$guessBasePath(),g=this.$worker=new Worker(f+c);else{var h=this.$normalizePath(a.nameToUrl("ace/worker/worker",null,"_")),g=this.$worker=new Worker(h),i={};for(var j=0;jf.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}),define("ace/mode/svg_highlight_rules",["require","exports","module","pilot/oop","ace/mode/javascript_highlight_rules","ace/mode/xml_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/javascript_highlight_rules").JavaScriptHighlightRules,f=a("ace/mode/xml_highlight_rules").XmlHighlightRules,g=function(){f.call(this),this.$rules.start.splice(3,0,{token:"text",regex:"<(?=s*script)",next:"script"}),this.$rules.script=[{token:"text",regex:">",next:"js-start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",regex:"'.*?'"}],this.embedRules(e,"js-",[{token:"comment",regex:"\\/\\/.*(?=<\\/script>)",next:"tag"},{token:"text",regex:"<\\/(?=script)",next:"tag"}])};d.inherits(g,f),b.SvgHighlightRules=g}),define("ace/mode/xml_highlight_rules",["require","exports","module","pilot/oop","ace/mode/text_highlight_rules"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/text_highlight_rules").TextHighlightRules,f=function(){this.$rules={start:[{token:"text",regex:"<\\!\\[CDATA\\[",next:"cdata"},{token:"xml_pe",regex:"<\\?.*?\\?>"},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"text",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],tag:[{token:"text",regex:">",next:"start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*$',next:"qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*$",next:"qstring"}],qstring:[{token:"string",regex:".*'",next:"tag"},{token:"string",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'.*"',next:"tag"},{token:"string",merge:!0,regex:".+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(f,e),b.XmlHighlightRules=f}),define("ace/mode/behaviour/xml",["require","exports","module","pilot/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=a("ace/mode/behaviour/cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k==""},{token:"comment",merge:!0,regex:"<\\!--",next:"comment"},{token:"text",regex:"<\\/?",next:"tag"},{token:"text",regex:"\\s+"},{token:"text",regex:"[^<]+"}],tag:[{token:"text",regex:">",next:"start"},{token:"keyword",regex:"[-_a-zA-Z0-9:]+"},{token:"text",regex:"\\s+"},{token:"string",regex:'".*?"'},{token:"string",merge:!0,regex:'["].*$',next:"qqstring"},{token:"string",regex:"'.*?'"},{token:"string",merge:!0,regex:"['].*$",next:"qstring"}],qstring:[{token:"string",regex:".*'",next:"tag"},{token:"string",merge:!0,regex:".+"}],qqstring:[{token:"string",regex:'.*"',next:"tag"},{token:"string",merge:!0,regex:".+"}],cdata:[{token:"text",regex:"\\]\\]>",next:"start"},{token:"text",regex:"\\s+"},{token:"text",regex:"(?:[^\\]]|\\](?!\\]>))+"}],comment:[{token:"comment",regex:".*?-->",next:"start"},{token:"comment",merge:!0,regex:".+"}]}};d.inherits(f,e),b.XmlHighlightRules=f}),define("ace/mode/behaviour/xml",["require","exports","module","pilot/oop","ace/mode/behaviour","ace/mode/behaviour/cstyle"],function(a,b,c){var d=a("pilot/oop"),e=a("ace/mode/behaviour").Behaviour,f=a("ace/mode/behaviour/cstyle").CstyleBehaviour,g=function(){this.inherit(f,["string_dquotes"]),this.add("brackets","insertion",function(a,b,c,d,e){if(e=="<"){var f=c.getSelectionRange(),g=d.doc.getTextRange(f);return g!==""?!1:{text:"<>",selection:[1,1]}}if(e==">"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),j=i.substring(h.column,h.column+1);if(j==">")return{text:"",selection:[1,1]}}else if(e=="\n"){var h=c.getCursorPosition(),i=d.doc.getLine(h.row),k=i.substring(h.column,h.column+2);if(k=="f.start.column)break;l+=k[o].value.length}if(!m||n<0&&m.type!=="comment"&&(m.type!=="string"||f.start.column!==m.value.length+l-1&&m.value.lastIndexOf('"')===m.value.length-1))return{text:'""',selection:[1,1]};if(m&&m.type==="string"){var p=i.substring(h.column,h.column+1);if(p=='"')return{text:"",selection:[1,1]}}}return!1}),this.add("string_dquotes","deletion",function(a,b,c,d,e){var f=d.doc.getTextRange(e);if(!e.isMultiLine()&&f=='"'){var g=d.doc.getLine(e.start.row),h=g.substring(e.start.column+1,e.start.column+2);if(h=='"'){e.end.column++;return e}}return!1})};d.inherits(f,e),b.CstyleBehaviour=f}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-clouds.js b/src/bb-modules/Filemanager/src/ace/theme-clouds.js new file mode 100644 index 000000000..c14d3cbcf --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-clouds.js @@ -0,0 +1 @@ +define("ace/theme/clouds",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds .ace_scroller {\n background-color: #FFFFFF;\n}\n\n.ace-clouds .ace_text-layer {\n cursor: text;\n color: #000000;\n}\n\n.ace-clouds .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-clouds .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-clouds .ace_marker-layer .ace_selection {\n background: #BDD5FC;\n}\n\n.ace-clouds .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds .ace_marker-layer .ace_active_line {\n background: #FFFBD1;\n}\n\n \n.ace-clouds .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds .ace_keyword {\n color:#AF956F;\n}\n\n.ace-clouds .ace_keyword.ace_operator {\n color:#484848;\n}\n\n.ace-clouds .ace_constant {\n \n}\n\n.ace-clouds .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds .ace_constant.ace_library {\n \n}\n\n.ace-clouds .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds .ace_invalid {\n background-color:#FF002A;\n}\n\n.ace-clouds .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds .ace_support {\n \n}\n\n.ace-clouds .ace_support.ace_function {\n color:#C52727;\n}\n\n.ace-clouds .ace_function.ace_buildin {\n \n}\n\n.ace-clouds .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds .ace_string.ace_regexp {\n \n}\n\n.ace-clouds .ace_comment {\n color:#BCC8BA;\n}\n\n.ace-clouds .ace_comment.ace_doc {\n \n}\n\n.ace-clouds .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds .ace_variable {\n \n}\n\n.ace-clouds .ace_variable.ace_language {\n \n}\n\n.ace-clouds .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-clouds_midnight.js b/src/bb-modules/Filemanager/src/ace/theme-clouds_midnight.js new file mode 100644 index 000000000..52137fb29 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-clouds_midnight.js @@ -0,0 +1 @@ +define("ace/theme/clouds_midnight",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-clouds-midnight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-clouds-midnight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-clouds-midnight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-clouds-midnight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-clouds-midnight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-clouds-midnight .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-clouds-midnight .ace_scroller {\n background-color: #191919;\n}\n\n.ace-clouds-midnight .ace_text-layer {\n cursor: text;\n color: #929292;\n}\n\n.ace-clouds-midnight .ace_cursor {\n border-left: 2px solid #7DA5DC;\n}\n\n.ace-clouds-midnight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #7DA5DC;\n}\n \n.ace-clouds-midnight .ace_marker-layer .ace_selection {\n background: #000000;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_marker-layer .ace_active_line {\n background: rgba(215, 215, 215, 0.031);\n}\n\n \n.ace-clouds-midnight .ace_invisible {\n color: #BFBFBF;\n}\n\n.ace-clouds-midnight .ace_keyword {\n color:#927C5D;\n}\n\n.ace-clouds-midnight .ace_keyword.ace_operator {\n color:#4B4B4B;\n}\n\n.ace-clouds-midnight .ace_constant {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_language {\n color:#39946A;\n}\n\n.ace-clouds-midnight .ace_constant.ace_library {\n \n}\n\n.ace-clouds-midnight .ace_constant.ace_numeric {\n color:#46A609;\n}\n\n.ace-clouds-midnight .ace_invalid {\n color:#FFFFFF;\nbackground-color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_invalid.ace_illegal {\n \n}\n\n.ace-clouds-midnight .ace_invalid.ace_deprecated {\n \n}\n\n.ace-clouds-midnight .ace_support {\n \n}\n\n.ace-clouds-midnight .ace_support.ace_function {\n color:#E92E2E;\n}\n\n.ace-clouds-midnight .ace_function.ace_buildin {\n \n}\n\n.ace-clouds-midnight .ace_string {\n color:#5D90CD;\n}\n\n.ace-clouds-midnight .ace_string.ace_regexp {\n \n}\n\n.ace-clouds-midnight .ace_comment {\n color:#3C403B;\n}\n\n.ace-clouds-midnight .ace_comment.ace_doc {\n \n}\n\n.ace-clouds-midnight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-clouds-midnight .ace_variable {\n \n}\n\n.ace-clouds-midnight .ace_variable.ace_language {\n \n}\n\n.ace-clouds-midnight .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-clouds-midnight"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-cobalt.js b/src/bb-modules/Filemanager/src/ace/theme-cobalt.js new file mode 100644 index 000000000..51be7b234 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-cobalt.js @@ -0,0 +1 @@ +define("ace/theme/cobalt",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-cobalt .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-cobalt .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-cobalt .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-cobalt .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-cobalt .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-cobalt .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-cobalt .ace_scroller {\n background-color: #002240;\n}\n\n.ace-cobalt .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-cobalt .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-cobalt .ace_marker-layer .ace_selection {\n background: rgba(179, 101, 57, 0.75);\n}\n\n.ace-cobalt .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-cobalt .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_marker-layer .ace_active_line {\n background: rgba(0, 0, 0, 0.35);\n}\n\n \n.ace-cobalt .ace_invisible {\n color: rgba(255, 255, 255, 0.15);\n}\n\n.ace-cobalt .ace_keyword {\n color:#FF9D00;\n}\n\n.ace-cobalt .ace_keyword.ace_operator {\n \n}\n\n.ace-cobalt .ace_constant {\n color:#FF628C;\n}\n\n.ace-cobalt .ace_constant.ace_language {\n \n}\n\n.ace-cobalt .ace_constant.ace_library {\n \n}\n\n.ace-cobalt .ace_constant.ace_numeric {\n \n}\n\n.ace-cobalt .ace_invalid {\n color:#F8F8F8;\nbackground-color:#800F00;\n}\n\n.ace-cobalt .ace_invalid.ace_illegal {\n \n}\n\n.ace-cobalt .ace_invalid.ace_deprecated {\n \n}\n\n.ace-cobalt .ace_support {\n color:#80FFBB;\n}\n\n.ace-cobalt .ace_support.ace_function {\n color:#FFB054;\n}\n\n.ace-cobalt .ace_function.ace_buildin {\n \n}\n\n.ace-cobalt .ace_string {\n \n}\n\n.ace-cobalt .ace_string.ace_regexp {\n color:#80FFC2;\n}\n\n.ace-cobalt .ace_comment {\n font-style:italic;\ncolor:#0088FF;\n}\n\n.ace-cobalt .ace_comment.ace_doc {\n \n}\n\n.ace-cobalt .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-cobalt .ace_variable {\n color:#CCCCCC;\n}\n\n.ace-cobalt .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-cobalt .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-cobalt"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-crimson_editor.js b/src/bb-modules/Filemanager/src/ace/theme-crimson_editor.js new file mode 100644 index 000000000..5545b3373 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-crimson_editor.js @@ -0,0 +1 @@ +define("ace/theme/crimson_editor",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-crimson-editor .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-crimson-editor .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-crimson-editor .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-crimson-editor .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-crimson-editor .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-crimson-editor .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-crimson-editor .ace_text-layer {\n cursor: text;\n color: rgb(64, 64, 64);\n}\n\n.ace-crimson-editor .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-crimson-editor .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n\n.ace-crimson-editor .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-crimson-editor .ace_line .ace_identifier {\n color: black;\n}\n\n.ace-crimson-editor .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-crimson-editor .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-crimson-editor .ace_line .ace_constant.ace_language {\n color: rgb(255, 156, 0);\n}\n\n.ace-crimson-editor .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_line .ace_invalid {\n text-decoration: line-through;\n color: rgb(224, 0, 0);\n}\n\n.ace-crimson-editor .ace_line .ace_fold {\n background-color: #E4E4E4;\n border-radius: 3px;\n}\n\n.ace-crimson-editor .ace_line .ace_support.ace_function {\n color: rgb(192, 0, 0);\n}\n\n.ace-crimson-editor .ace_line .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-crimson-editor .ace_line .ace_support.ace_type,\n.ace-crimson-editor .ace_line .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-crimson-editor .ace_line .ace_keyword.ace_operator {\n color: rgb(49, 132, 149);\n}\n\n.ace-crimson-editor .ace_line .ace_string {\n color: rgb(128, 0, 128);\n}\n\n.ace-crimson-editor .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-crimson-editor .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-crimson-editor .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-crimson-editor .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 64);\n}\n\n.ace-crimson-editor .ace_line .ace_variable {\n color: rgb(0, 64, 128);\n}\n\n.ace-crimson-editor .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}\n\n.ace-crimson-editor .ace_marker-layer .ace_selected_word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-crimson-editor .ace_string.ace_regex {\n color: rgb(192, 0, 192);\n}";d.importCssString(e),b.cssClass="ace-crimson-editor"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-dawn.js b/src/bb-modules/Filemanager/src/ace/theme-dawn.js new file mode 100644 index 000000000..3b98416e2 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-dawn.js @@ -0,0 +1 @@ +define("ace/theme/dawn",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-dawn .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-dawn .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-dawn .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-dawn .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-dawn .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-dawn .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-dawn .ace_scroller {\n background-color: #F9F9F9;\n}\n\n.ace-dawn .ace_text-layer {\n cursor: text;\n color: #080808;\n}\n\n.ace-dawn .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-dawn .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-dawn .ace_marker-layer .ace_selection {\n background: rgba(39, 95, 255, 0.30);\n}\n\n.ace-dawn .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-dawn .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_marker-layer .ace_active_line {\n background: rgba(36, 99, 180, 0.12);\n}\n\n \n.ace-dawn .ace_invisible {\n color: rgba(75, 75, 126, 0.50);\n}\n\n.ace-dawn .ace_keyword {\n color:#794938;\n}\n\n.ace-dawn .ace_keyword.ace_operator {\n \n}\n\n.ace-dawn .ace_constant {\n color:#811F24;\n}\n\n.ace-dawn .ace_constant.ace_language {\n \n}\n\n.ace-dawn .ace_constant.ace_library {\n \n}\n\n.ace-dawn .ace_constant.ace_numeric {\n \n}\n\n.ace-dawn .ace_invalid {\n \n}\n\n.ace-dawn .ace_invalid.ace_illegal {\n text-decoration:underline;\nfont-style:italic;\ncolor:#F8F8F8;\nbackground-color:#B52A1D;\n}\n\n.ace-dawn .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#B52A1D;\n}\n\n.ace-dawn .ace_support {\n color:#691C97;\n}\n\n.ace-dawn .ace_support.ace_function {\n color:#693A17;\n}\n\n.ace-dawn .ace_function.ace_buildin {\n \n}\n\n.ace-dawn .ace_string {\n color:#0B6125;\n}\n\n.ace-dawn .ace_string.ace_regexp {\n color:#CF5628;\n}\n\n.ace-dawn .ace_comment {\n font-style:italic;\ncolor:#5A525F;\n}\n\n.ace-dawn .ace_comment.ace_doc {\n \n}\n\n.ace-dawn .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-dawn .ace_variable {\n color:#234A97;\n}\n\n.ace-dawn .ace_variable.ace_language {\n \n}\n\n.ace-dawn .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-dawn"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-eclipse.js b/src/bb-modules/Filemanager/src/ace/theme-eclipse.js new file mode 100644 index 000000000..e74e173ee --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-eclipse.js @@ -0,0 +1 @@ +define("ace/theme/eclipse",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-eclipse .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-eclipse .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-eclipse .ace_gutter {\n width: 50px;\n background: rgb(227, 227, 227);\n border-right: 1px solid rgb(159, 159, 159);\t \n color: rgb(136, 136, 136);\n}\n\n.ace-eclipse .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-eclipse .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-eclipse .ace_text-layer {\n cursor: text;\n}\n\n.ace-eclipse .ace_cursor {\n border-left: 1px solid black;\n}\n\n.ace-eclipse .ace_line .ace_keyword, .ace-eclipse .ace_line .ace_variable {\n color: rgb(127, 0, 85);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-eclipse .ace_line .ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-eclipse .ace_line .ace_string {\n color: rgb(42, 0, 255);\n}\n\n.ace-eclipse .ace_line .ace_comment {\n color: rgb(63, 127, 95);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc {\n color: rgb(63, 95, 191);\n}\n\n.ace-eclipse .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(127, 159, 191);\n}\n\n.ace-eclipse .ace_line .ace_constant.ace_numeric {\n}\n\n.ace-eclipse .ace_line .ace_tag {\n\tcolor: rgb(63, 127, 127);\n}\n\n.ace-eclipse .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-eclipse .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-eclipse .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-eclipse .ace_marker-layer .ace_active_line {\n background: rgb(232, 242, 254);\n}";d.importCssString(e),b.cssClass="ace-eclipse"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-idle_fingers.js b/src/bb-modules/Filemanager/src/ace/theme-idle_fingers.js new file mode 100644 index 000000000..40c7b9526 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-idle_fingers.js @@ -0,0 +1 @@ +define("ace/theme/idle_fingers",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-idle-fingers .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-idle-fingers .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-idle-fingers .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-idle-fingers .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-idle-fingers .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-idle-fingers .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-idle-fingers .ace_scroller {\n background-color: #323232;\n}\n\n.ace-idle-fingers .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-idle-fingers .ace_cursor {\n border-left: 2px solid #91FF00;\n}\n\n.ace-idle-fingers .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #91FF00;\n}\n \n.ace-idle-fingers .ace_marker-layer .ace_selection {\n background: rgba(90, 100, 126, 0.88);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #404040;\n}\n\n.ace-idle-fingers .ace_marker-layer .ace_active_line {\n background: #353637;\n}\n\n \n.ace-idle-fingers .ace_invisible {\n color: #404040;\n}\n\n.ace-idle-fingers .ace_keyword {\n color:#CC7833;\n}\n\n.ace-idle-fingers .ace_keyword.ace_operator {\n \n}\n\n.ace-idle-fingers .ace_constant {\n color:#6C99BB;\n}\n\n.ace-idle-fingers .ace_constant.ace_language {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_library {\n \n}\n\n.ace-idle-fingers .ace_constant.ace_numeric {\n \n}\n\n.ace-idle-fingers .ace_invalid {\n color:#FFFFFF;\nbackground-color:#FF0000;\n}\n\n.ace-idle-fingers .ace_invalid.ace_illegal {\n \n}\n\n.ace-idle-fingers .ace_invalid.ace_deprecated {\n \n}\n\n.ace-idle-fingers .ace_support {\n \n}\n\n.ace-idle-fingers .ace_support.ace_function {\n color:#B83426;\n}\n\n.ace-idle-fingers .ace_function.ace_buildin {\n \n}\n\n.ace-idle-fingers .ace_string {\n color:#A5C261;\n}\n\n.ace-idle-fingers .ace_string.ace_regexp {\n color:#CCCC33;\n}\n\n.ace-idle-fingers .ace_comment {\n font-style:italic;\ncolor:#BC9458;\n}\n\n.ace-idle-fingers .ace_comment.ace_doc {\n \n}\n\n.ace-idle-fingers .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-idle-fingers .ace_variable {\n \n}\n\n.ace-idle-fingers .ace_variable.ace_language {\n \n}\n\n.ace-idle-fingers .ace_xml_pe {\n \n}\n\n.ace-idle-fingers .ace_collab.ace_user1 {\n color:#323232;\nbackground-color:#FFF980; \n}";d.importCssString(e),b.cssClass="ace-idle-fingers"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-kr_theme.js b/src/bb-modules/Filemanager/src/ace/theme-kr_theme.js new file mode 100644 index 000000000..2fac8bac7 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-kr_theme.js @@ -0,0 +1 @@ +define("ace/theme/kr_theme",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-kr-theme .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-kr-theme .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-kr-theme .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-kr-theme .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-kr-theme .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-kr-theme .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-kr-theme .ace_scroller {\n background-color: #0B0A09;\n}\n\n.ace-kr-theme .ace_text-layer {\n cursor: text;\n color: #FCFFE0;\n}\n\n.ace-kr-theme .ace_cursor {\n border-left: 2px solid #FF9900;\n}\n\n.ace-kr-theme .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FF9900;\n}\n \n.ace-kr-theme .ace_marker-layer .ace_selection {\n background: rgba(170, 0, 255, 0.45);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_marker-layer .ace_active_line {\n background: #38403D;\n}\n\n \n.ace-kr-theme .ace_invisible {\n color: rgba(255, 177, 111, 0.32);\n}\n\n.ace-kr-theme .ace_keyword {\n color:#949C8B;\n}\n\n.ace-kr-theme .ace_keyword.ace_operator {\n \n}\n\n.ace-kr-theme .ace_constant {\n color:rgba(210, 117, 24, 0.76);\n}\n\n.ace-kr-theme .ace_constant.ace_language {\n \n}\n\n.ace-kr-theme .ace_constant.ace_library {\n \n}\n\n.ace-kr-theme .ace_constant.ace_numeric {\n \n}\n\n.ace-kr-theme .ace_invalid {\n color:#F8F8F8;\nbackground-color:#A41300;\n}\n\n.ace-kr-theme .ace_invalid.ace_illegal {\n \n}\n\n.ace-kr-theme .ace_invalid.ace_deprecated {\n \n}\n\n.ace-kr-theme .ace_support {\n color:#9FC28A;\n}\n\n.ace-kr-theme .ace_support.ace_function {\n color:#85873A;\n}\n\n.ace-kr-theme .ace_function.ace_buildin {\n \n}\n\n.ace-kr-theme .ace_string {\n \n}\n\n.ace-kr-theme .ace_string.ace_regexp {\n color:rgba(125, 255, 192, 0.65);\n}\n\n.ace-kr-theme .ace_comment {\n font-style:italic;\ncolor:#706D5B;\n}\n\n.ace-kr-theme .ace_comment.ace_doc {\n \n}\n\n.ace-kr-theme .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-kr-theme .ace_variable {\n color:#D1A796;\n}\n\n.ace-kr-theme .ace_variable.ace_language {\n color:#FF80E1;\n}\n\n.ace-kr-theme .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-kr-theme"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-merbivore.js b/src/bb-modules/Filemanager/src/ace/theme-merbivore.js new file mode 100644 index 000000000..407e6f6c2 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-merbivore.js @@ -0,0 +1 @@ +define("ace/theme/merbivore",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-merbivore .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-merbivore .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-merbivore .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-merbivore .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-merbivore .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-merbivore .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-merbivore .ace_scroller {\n background-color: #161616;\n}\n\n.ace-merbivore .ace_text-layer {\n cursor: text;\n color: #E6E1DC;\n}\n\n.ace-merbivore .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-merbivore .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-merbivore .ace_marker-layer .ace_selection {\n background: #454545;\n}\n\n.ace-merbivore .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-merbivore .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #FCE94F;\n}\n\n.ace-merbivore .ace_marker-layer .ace_active_line {\n background: #333435;\n}\n\n \n.ace-merbivore .ace_invisible {\n color: #404040;\n}\n\n.ace-merbivore .ace_keyword {\n color:#FC6F09;\n}\n\n.ace-merbivore .ace_keyword.ace_operator {\n \n}\n\n.ace-merbivore .ace_constant {\n color:#1EDAFB;\n}\n\n.ace-merbivore .ace_constant.ace_language {\n color:#FDC251;\n}\n\n.ace-merbivore .ace_constant.ace_library {\n color:#8DFF0A;\n}\n\n.ace-merbivore .ace_constant.ace_numeric {\n color:#58C554;\n}\n\n.ace-merbivore .ace_invalid {\n color:#FFFFFF;\n background-color:#990000;\n}\n\n.ace-merbivore .ace_invalid.ace_illegal {\n \n}\n\n.ace-merbivore .ace_invalid.ace_deprecated {\n color:#FFFFFF;\n background-color:#990000;\n}\n\n.ace-merbivore .ace_support {\n \n}\n\n.ace-merbivore .ace_support.ace_function {\n color:#FC6F09;\n}\n\n.ace-merbivore .ace_function.ace_buildin {\n \n}\n\n.ace-merbivore .ace_string {\n color:#8DFF0A;\n}\n\n.ace-merbivore .ace_string.ace_regexp {\n \n}\n\n.ace-merbivore .ace_comment {\n color:#AD2EA4;\n}\n\n.ace-merbivore .ace_comment.ace_doc {\n \n}\n\n.ace-merbivore .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-merbivore .ace_variable {\n \n}\n\n.ace-merbivore .ace_variable.ace_language {\n \n}\n\n.ace-merbivore .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-merbivore"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-merbivore_soft.js b/src/bb-modules/Filemanager/src/ace/theme-merbivore_soft.js new file mode 100644 index 000000000..5be28c573 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-merbivore_soft.js @@ -0,0 +1 @@ +define("ace/theme/merbivore_soft",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-merbivore-soft .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-merbivore-soft .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-merbivore-soft .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-merbivore-soft .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-merbivore-soft .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-merbivore-soft .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-merbivore-soft .ace_scroller {\n background-color: #1C1C1C;\n}\n\n.ace-merbivore-soft .ace_text-layer {\n cursor: text;\n color: #E6E1DC;\n}\n\n.ace-merbivore-soft .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-merbivore-soft .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-merbivore-soft .ace_marker-layer .ace_selection {\n background: #494949;\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #FCE94F;\n}\n\n.ace-merbivore-soft .ace_marker-layer .ace_active_line {\n background: #333435;\n}\n\n \n.ace-merbivore-soft .ace_invisible {\n color: #404040;\n}\n\n.ace-merbivore-soft .ace_keyword {\n color:#FC803A;\n}\n\n.ace-merbivore-soft .ace_keyword.ace_operator {\n \n}\n\n.ace-merbivore-soft .ace_constant {\n color:#68C1D8;\n}\n\n.ace-merbivore-soft .ace_constant.ace_language {\n color:#E1C582;\n}\n\n.ace-merbivore-soft .ace_constant.ace_library {\n color:#8EC65F;\n}\n\n.ace-merbivore-soft .ace_constant.ace_numeric {\n color:#7FC578;\n}\n\n.ace-merbivore-soft .ace_invalid {\n color:#FFFFFF;\n background-color:#FE3838;\n}\n\n.ace-merbivore-soft .ace_invalid.ace_illegal {\n \n}\n\n.ace-merbivore-soft .ace_invalid.ace_deprecated {\n color:#FFFFFF;\n background-color:#FE3838;\n}\n\n.ace-merbivore-soft .ace_support {\n \n}\n\n.ace-merbivore-soft .ace_support.ace_function {\n color:#FC803A;\n}\n\n.ace-merbivore-soft .ace_function.ace_buildin {\n \n}\n\n.ace-merbivore-soft .ace_string {\n color:#8EC65F;\n}\n\n.ace-merbivore-soft .ace_string.ace_regexp {\n \n}\n\n.ace-merbivore-soft .ace_comment {\n color:#AC4BB8;\n}\n\n.ace-merbivore-soft .ace_comment.ace_doc {\n \n}\n\n.ace-merbivore-soft .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-merbivore-soft .ace_variable {\n \n}\n\n.ace-merbivore-soft .ace_variable.ace_language {\n \n}\n\n.ace-merbivore-soft .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-merbivore-soft"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-mono_industrial.js b/src/bb-modules/Filemanager/src/ace/theme-mono_industrial.js new file mode 100644 index 000000000..354de6bf4 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-mono_industrial.js @@ -0,0 +1 @@ +define("ace/theme/mono_industrial",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-mono-industrial .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-mono-industrial .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-mono-industrial .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-mono-industrial .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-mono-industrial .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-mono-industrial .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-mono-industrial .ace_scroller {\n background-color: #222C28;\n}\n\n.ace-mono-industrial .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-mono-industrial .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-mono-industrial .ace_marker-layer .ace_selection {\n background: rgba(145, 153, 148, 0.40);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_marker-layer .ace_active_line {\n background: rgba(12, 13, 12, 0.25);\n}\n\n \n.ace-mono-industrial .ace_invisible {\n color: rgba(102, 108, 104, 0.50);\n}\n\n.ace-mono-industrial .ace_keyword {\n color:#A39E64;\n}\n\n.ace-mono-industrial .ace_keyword.ace_operator {\n color:#A8B3AB;\n}\n\n.ace-mono-industrial .ace_constant {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_constant.ace_language {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_library {\n \n}\n\n.ace-mono-industrial .ace_constant.ace_numeric {\n color:#E98800;\n}\n\n.ace-mono-industrial .ace_invalid {\n color:#FFFFFF;\nbackground-color:rgba(153, 0, 0, 0.68);\n}\n\n.ace-mono-industrial .ace_invalid.ace_illegal {\n \n}\n\n.ace-mono-industrial .ace_invalid.ace_deprecated {\n \n}\n\n.ace-mono-industrial .ace_support {\n \n}\n\n.ace-mono-industrial .ace_support.ace_function {\n color:#588E60;\n}\n\n.ace-mono-industrial .ace_function.ace_buildin {\n \n}\n\n.ace-mono-industrial .ace_string {\n \n}\n\n.ace-mono-industrial .ace_string.ace_regexp {\n \n}\n\n.ace-mono-industrial .ace_comment {\n color:#666C68;\nbackground-color:#151C19;\n}\n\n.ace-mono-industrial .ace_comment.ace_doc {\n \n}\n\n.ace-mono-industrial .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-mono-industrial .ace_variable {\n \n}\n\n.ace-mono-industrial .ace_variable.ace_language {\n color:#648BD2;\n}\n\n.ace-mono-industrial .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-mono-industrial"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-monokai.js b/src/bb-modules/Filemanager/src/ace/theme-monokai.js new file mode 100644 index 000000000..398195fd8 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-monokai.js @@ -0,0 +1 @@ +define("ace/theme/monokai",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-monokai .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-monokai .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-monokai .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-monokai .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-monokai .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-monokai .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-monokai .ace_scroller {\n background-color: #272822;\n}\n\n.ace-monokai .ace_text-layer {\n cursor: text;\n color: #F8F8F2;\n}\n\n.ace-monokai .ace_cursor {\n border-left: 2px solid #F8F8F0;\n}\n\n.ace-monokai .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #F8F8F0;\n}\n \n.ace-monokai .ace_marker-layer .ace_selection {\n background: #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-monokai .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #49483E;\n}\n\n.ace-monokai .ace_marker-layer .ace_active_line {\n background: #49483E;\n}\n\n \n.ace-monokai .ace_invisible {\n color: #49483E;\n}\n\n.ace-monokai .ace_keyword {\n color:#F92672;\n}\n\n.ace-monokai .ace_keyword.ace_operator {\n \n}\n\n.ace-monokai .ace_constant {\n \n}\n\n.ace-monokai .ace_constant.ace_language {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_constant.ace_library {\n \n}\n\n.ace-monokai .ace_constant.ace_numeric {\n color:#AE81FF;\n}\n\n.ace-monokai .ace_invalid {\n color:#F8F8F0;\nbackground-color:#F92672;\n}\n\n.ace-monokai .ace_invalid.ace_illegal {\n \n}\n\n.ace-monokai .ace_invalid.ace_deprecated {\n color:#F8F8F0;\nbackground-color:#AE81FF;\n}\n\n.ace-monokai .ace_support {\n \n}\n\n.ace-monokai .ace_support.ace_function {\n color:#66D9EF;\n}\n\n.ace-monokai .ace_function.ace_buildin {\n \n}\n\n.ace-monokai .ace_string {\n color:#E6DB74;\n}\n\n.ace-monokai .ace_string.ace_regexp {\n \n}\n\n.ace-monokai .ace_comment {\n color:#75715E;\n}\n\n.ace-monokai .ace_comment.ace_doc {\n \n}\n\n.ace-monokai .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-monokai .ace_variable {\n \n}\n\n.ace-monokai .ace_variable.ace_language {\n \n}\n\n.ace-monokai .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-monokai"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-pastel_on_dark.js b/src/bb-modules/Filemanager/src/ace/theme-pastel_on_dark.js new file mode 100644 index 000000000..79cdb1077 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-pastel_on_dark.js @@ -0,0 +1 @@ +define("ace/theme/pastel_on_dark",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-pastel-on-dark .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-pastel-on-dark .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-pastel-on-dark .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-pastel-on-dark .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-pastel-on-dark .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-pastel-on-dark .ace_scroller {\n background-color: #2c2828;\n}\n\n.ace-pastel-on-dark .ace_text-layer {\n cursor: text;\n color: #8f938f;\n}\n\n.ace-pastel-on-dark .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-pastel-on-dark .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n \n.ace-pastel-on-dark .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-pastel-on-dark .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-pastel-on-dark .ace_keyword {\n color:#757ad8;\n}\n\n.ace-pastel-on-dark .ace_keyword.ace_operator {\n color:#797878;\n}\n\n.ace-pastel-on-dark .ace_constant {\n color:#4fb7c5;\n}\n\n.ace-pastel-on-dark .ace_constant.ace_language {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_library {\n \n}\n\n.ace-pastel-on-dark .ace_constant.ace_numeric {\n \n}\n\n.ace-pastel-on-dark .ace_invalid {\n \n}\n\n.ace-pastel-on-dark .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-pastel-on-dark .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-pastel-on-dark .ace_support {\n color:#9a9a9a;\n}\n\n.ace-pastel-on-dark .ace_support.ace_function {\n color:#aeb2f8;\n}\n\n.ace-pastel-on-dark .ace_function.ace_buildin {\n \n}\n\n.ace-pastel-on-dark .ace_string {\n color:#66a968;\n}\n\n.ace-pastel-on-dark .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-pastel-on-dark .ace_comment {\n color:#656865;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_comment.ace_doc.ace_tag {\n color:A6C6FF;\n}\n\n.ace-pastel-on-dark .ace_variable {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_variable.ace_language {\n color:#bebf55;\n}\n\n.ace-pastel-on-dark .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-pastel-on-dark"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-solarized_dark.js b/src/bb-modules/Filemanager/src/ace/theme-solarized_dark.js new file mode 100644 index 000000000..c98b5b4f8 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-solarized_dark.js @@ -0,0 +1 @@ +define("ace/theme/solarized_dark",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-solarized-dark .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-solarized-dark .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-solarized-dark .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-solarized-dark .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-solarized-dark .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-solarized-dark .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-solarized-dark .ace_scroller {\n background-color: #002B36;\n}\n\n.ace-solarized-dark .ace_text-layer {\n cursor: text;\n color: #93A1A1;\n}\n\n.ace-solarized-dark .ace_cursor {\n border-left: 2px solid #D30102;\n}\n\n.ace-solarized-dark .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #D30102;\n}\n \n.ace-solarized-dark .ace_marker-layer .ace_selection {\n background: #073642;\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(147, 161, 161, 0.50);\n}\n\n.ace-solarized-dark .ace_marker-layer .ace_active_line {\n background: #073642;\n}\n\n \n.ace-solarized-dark .ace_invisible {\n color: rgba(147, 161, 161, 0.50);\n}\n\n.ace-solarized-dark .ace_keyword {\n color:#859900;\n}\n\n.ace-solarized-dark .ace_keyword.ace_operator {\n \n}\n\n.ace-solarized-dark .ace_constant {\n \n}\n\n.ace-solarized-dark .ace_constant.ace_language {\n color:#B58900;\n}\n\n.ace-solarized-dark .ace_constant.ace_library {\n \n}\n\n.ace-solarized-dark .ace_constant.ace_numeric {\n color:#D33682;\n}\n\n.ace-solarized-dark .ace_invalid {\n \n}\n\n.ace-solarized-dark .ace_invalid.ace_illegal {\n \n}\n\n.ace-solarized-dark .ace_invalid.ace_deprecated {\n \n}\n\n.ace-solarized-dark .ace_support {\n \n}\n\n.ace-solarized-dark .ace_support.ace_function {\n color:#268BD2;\n}\n\n.ace-solarized-dark .ace_function.ace_buildin {\n \n}\n\n.ace-solarized-dark .ace_string {\n color:#2AA198;\n}\n\n.ace-solarized-dark .ace_string.ace_regexp {\n color:#D30102;\n}\n\n.ace-solarized-dark .ace_comment {\n font-style:italic;\ncolor:#657B83;\n}\n\n.ace-solarized-dark .ace_comment.ace_doc {\n \n}\n\n.ace-solarized-dark .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-solarized-dark .ace_variable {\n \n}\n\n.ace-solarized-dark .ace_variable.ace_language {\n color:#268BD2;\n}\n\n.ace-solarized-dark .ace_xml_pe {\n \n}\n\n.ace-solarized-dark .ace_collab.ace_user1 {\n \n}";d.importCssString(e),b.cssClass="ace-solarized-dark"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-solarized_light.js b/src/bb-modules/Filemanager/src/ace/theme-solarized_light.js new file mode 100644 index 000000000..ab010f1e3 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-solarized_light.js @@ -0,0 +1 @@ +define("ace/theme/solarized_light",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-solarized-light .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-solarized-light .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-solarized-light .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-solarized-light .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-solarized-light .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-solarized-light .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-solarized-light .ace_scroller {\n background-color: #FDF6E3;\n}\n\n.ace-solarized-light .ace_text-layer {\n cursor: text;\n color: #586E75;\n}\n\n.ace-solarized-light .ace_cursor {\n border-left: 2px solid #000000;\n}\n\n.ace-solarized-light .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #000000;\n}\n \n.ace-solarized-light .ace_marker-layer .ace_selection {\n background: #073642;\n}\n\n.ace-solarized-light .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-solarized-light .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(147, 161, 161, 0.50);\n}\n\n.ace-solarized-light .ace_marker-layer .ace_active_line {\n background: #EEE8D5;\n}\n\n \n.ace-solarized-light .ace_invisible {\n color: rgba(147, 161, 161, 0.50);\n}\n\n.ace-solarized-light .ace_keyword {\n color:#859900;\n}\n\n.ace-solarized-light .ace_keyword.ace_operator {\n \n}\n\n.ace-solarized-light .ace_constant {\n \n}\n\n.ace-solarized-light .ace_constant.ace_language {\n color:#B58900;\n}\n\n.ace-solarized-light .ace_constant.ace_library {\n \n}\n\n.ace-solarized-light .ace_constant.ace_numeric {\n color:#D33682;\n}\n\n.ace-solarized-light .ace_invalid {\n \n}\n\n.ace-solarized-light .ace_invalid.ace_illegal {\n \n}\n\n.ace-solarized-light .ace_invalid.ace_deprecated {\n \n}\n\n.ace-solarized-light .ace_support {\n \n}\n\n.ace-solarized-light .ace_support.ace_function {\n color:#268BD2;\n}\n\n.ace-solarized-light .ace_function.ace_buildin {\n \n}\n\n.ace-solarized-light .ace_string {\n color:#2AA198;\n}\n\n.ace-solarized-light .ace_string.ace_regexp {\n color:#D30102;\n}\n\n.ace-solarized-light .ace_comment {\n color:#93A1A1;\n}\n\n.ace-solarized-light .ace_comment.ace_doc {\n \n}\n\n.ace-solarized-light .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-solarized-light .ace_variable {\n \n}\n\n.ace-solarized-light .ace_variable.ace_language {\n color:#268BD2;\n}\n\n.ace-solarized-light .ace_xml_pe {\n \n}\n\n.ace-solarized-light .ace_collab.ace_user1 {\n \n}";d.importCssString(e),b.cssClass="ace-solarized-light"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-textmate.js b/src/bb-modules/Filemanager/src/ace/theme-textmate.js new file mode 100644 index 000000000..35a15b81c --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-textmate.js @@ -0,0 +1 @@ +define("ace/theme/textmate",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-tm .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-tm .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-tm .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-tm .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-tm .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-tm .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-tm .ace_text-layer {\n cursor: text;\n}\n\n.ace-tm .ace_cursor {\n border-left: 2px solid black;\n}\n\n.ace-tm .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid black;\n}\n \n.ace-tm .ace_line .ace_invisible {\n color: rgb(191, 191, 191);\n}\n\n.ace-tm .ace_line .ace_keyword {\n color: blue;\n}\n\n.ace-tm .ace_line .ace_constant.ace_buildin {\n color: rgb(88, 72, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_language {\n color: rgb(88, 92, 246);\n}\n\n.ace-tm .ace_line .ace_constant.ace_library {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_invalid {\n background-color: rgb(153, 0, 0);\n color: white;\n}\n\n.ace-tm .ace_line .ace_fold {\n background-color: #E4E4E4;\n border-radius: 3px;\n}\n\n.ace-tm .ace_line .ace_support.ace_function {\n color: rgb(60, 76, 114);\n}\n\n.ace-tm .ace_line .ace_support.ace_constant {\n color: rgb(6, 150, 14);\n}\n\n.ace-tm .ace_line .ace_support.ace_type,\n.ace-tm .ace_line .ace_support.ace_class {\n color: rgb(109, 121, 222);\n}\n\n.ace-tm .ace_line .ace_keyword.ace_operator {\n color: rgb(104, 118, 135);\n}\n\n.ace-tm .ace_line .ace_string {\n color: rgb(3, 106, 7);\n}\n\n.ace-tm .ace_line .ace_comment {\n color: rgb(76, 136, 107);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc {\n color: rgb(0, 102, 255);\n}\n\n.ace-tm .ace_line .ace_comment.ace_doc.ace_tag {\n color: rgb(128, 159, 191);\n}\n\n.ace-tm .ace_line .ace_constant.ace_numeric {\n color: rgb(0, 0, 205);\n}\n\n.ace-tm .ace_line .ace_variable {\n color: rgb(49, 132, 149);\n}\n\n.ace-tm .ace_line .ace_xml_pe {\n color: rgb(104, 104, 91);\n}\n\n.ace-tm .ace_marker-layer .ace_selection {\n background: rgb(181, 213, 255);\n}\n\n.ace-tm .ace_marker-layer .ace_step {\n background: rgb(252, 255, 0);\n}\n\n.ace-tm .ace_marker-layer .ace_stack {\n background: rgb(164, 229, 101);\n}\n\n.ace-tm .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgb(192, 192, 192);\n}\n\n.ace-tm .ace_marker-layer .ace_active_line {\n background: rgba(0, 0, 0, 0.07);\n}\n\n.ace-tm .ace_marker-layer .ace_selected_word {\n background: rgb(250, 250, 255);\n border: 1px solid rgb(200, 200, 250);\n}\n\n.ace-tm .ace_string.ace_regex {\n color: rgb(255, 0, 0)\n}";d.importCssString(e),b.cssClass="ace-tm"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-twilight.js b/src/bb-modules/Filemanager/src/ace/theme-twilight.js new file mode 100644 index 000000000..407246282 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-twilight.js @@ -0,0 +1 @@ +define("ace/theme/twilight",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-twilight .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-twilight .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-twilight .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-twilight .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-twilight .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-twilight .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-twilight .ace_scroller {\n background-color: #141414;\n}\n\n.ace-twilight .ace_text-layer {\n cursor: text;\n color: #F8F8F8;\n}\n\n.ace-twilight .ace_cursor {\n border-left: 2px solid #A7A7A7;\n}\n\n.ace-twilight .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #A7A7A7;\n}\n \n.ace-twilight .ace_marker-layer .ace_selection {\n background: rgba(221, 240, 255, 0.20);\n}\n\n.ace-twilight .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-twilight .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_marker-layer .ace_active_line {\n background: rgba(255, 255, 255, 0.031);\n}\n\n \n.ace-twilight .ace_invisible {\n color: rgba(255, 255, 255, 0.25);\n}\n\n.ace-twilight .ace_keyword {\n color:#CDA869;\n}\n\n.ace-twilight .ace_keyword.ace_operator {\n \n}\n\n.ace-twilight .ace_constant {\n color:#CF6A4C;\n}\n\n.ace-twilight .ace_constant.ace_language {\n \n}\n\n.ace-twilight .ace_constant.ace_library {\n \n}\n\n.ace-twilight .ace_constant.ace_numeric {\n \n}\n\n.ace-twilight .ace_invalid {\n \n}\n\n.ace-twilight .ace_invalid.ace_illegal {\n color:#F8F8F8;\nbackground-color:rgba(86, 45, 86, 0.75);\n}\n\n.ace-twilight .ace_invalid.ace_deprecated {\n text-decoration:underline;\nfont-style:italic;\ncolor:#D2A8A1;\n}\n\n.ace-twilight .ace_support {\n color:#9B859D;\n}\n\n.ace-twilight .ace_support.ace_function {\n color:#DAD085;\n}\n\n.ace-twilight .ace_function.ace_buildin {\n \n}\n\n.ace-twilight .ace_string {\n color:#8F9D6A;\n}\n\n.ace-twilight .ace_string.ace_regexp {\n color:#E9C062;\n}\n\n.ace-twilight .ace_comment {\n font-style:italic;\ncolor:#5F5A60;\n}\n\n.ace-twilight .ace_comment.ace_doc {\n \n}\n\n.ace-twilight .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-twilight .ace_variable {\n color:#7587A6;\n}\n\n.ace-twilight .ace_variable.ace_language {\n \n}\n\n.ace-twilight .ace_xml_pe {\n color:#494949;\n}";d.importCssString(e),b.cssClass="ace-twilight"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/theme-vibrant_ink.js b/src/bb-modules/Filemanager/src/ace/theme-vibrant_ink.js new file mode 100644 index 000000000..ed6ae9e13 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/theme-vibrant_ink.js @@ -0,0 +1 @@ +define("ace/theme/vibrant_ink",["require","exports","module"],function(a,b,c){var d=a("pilot/dom"),e=".ace-vibrant-ink .ace_editor {\n border: 2px solid rgb(159, 159, 159);\n}\n\n.ace-vibrant-ink .ace_editor.ace_focus {\n border: 2px solid #327fbd;\n}\n\n.ace-vibrant-ink .ace_gutter {\n width: 50px;\n background: #e8e8e8;\n color: #333;\n overflow : hidden;\n}\n\n.ace-vibrant-ink .ace_gutter-layer {\n width: 100%;\n text-align: right;\n}\n\n.ace-vibrant-ink .ace_gutter-layer .ace_gutter-cell {\n padding-right: 6px;\n}\n\n.ace-vibrant-ink .ace_print_margin {\n width: 1px;\n background: #e8e8e8;\n}\n\n.ace-vibrant-ink .ace_scroller {\n background-color: #0F0F0F;\n}\n\n.ace-vibrant-ink .ace_text-layer {\n cursor: text;\n color: #FFFFFF;\n}\n\n.ace-vibrant-ink .ace_cursor {\n border-left: 2px solid #FFFFFF;\n}\n\n.ace-vibrant-ink .ace_cursor.ace_overwrite {\n border-left: 0px;\n border-bottom: 1px solid #FFFFFF;\n}\n \n.ace-vibrant-ink .ace_marker-layer .ace_selection {\n background: #6699CC;\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_step {\n background: rgb(198, 219, 174);\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_bracket {\n margin: -1px 0 0 -1px;\n border: 1px solid #99CC99;\n}\n\n.ace-vibrant-ink .ace_marker-layer .ace_active_line {\n background: #333333;\n}\n\n \n.ace-vibrant-ink .ace_invisible {\n color: #404040;\n}\n\n.ace-vibrant-ink .ace_keyword {\n color:#FF6600;\n}\n\n.ace-vibrant-ink .ace_keyword.ace_operator {\n \n}\n\n.ace-vibrant-ink .ace_constant {\n \n}\n\n.ace-vibrant-ink .ace_constant.ace_language {\n color:#339999;\n}\n\n.ace-vibrant-ink .ace_constant.ace_library {\n \n}\n\n.ace-vibrant-ink .ace_constant.ace_numeric {\n color:#99CC99;\n}\n\n.ace-vibrant-ink .ace_invalid {\n color:#CCFF33;\n background-color:#000000;\n}\n\n.ace-vibrant-ink .ace_invalid.ace_illegal {\n \n}\n\n.ace-vibrant-ink .ace_invalid.ace_deprecated {\n color:#CCFF33;\n background-color:#000000;\n}\n\n.ace-vibrant-ink .ace_support {\n \n}\n\n.ace-vibrant-ink .ace_support.ace_function {\n color:#FFCC00;\n}\n\n.ace-vibrant-ink .ace_function.ace_buildin {\n \n}\n\n.ace-vibrant-ink .ace_string {\n color:#66FF00;\n}\n\n.ace-vibrant-ink .ace_string.ace_regexp {\n \n}\n\n.ace-vibrant-ink .ace_comment {\n color:#9933CC;\n}\n\n.ace-vibrant-ink .ace_comment.ace_doc {\n \n}\n\n.ace-vibrant-ink .ace_comment.ace_doc.ace_tag {\n \n}\n\n.ace-vibrant-ink .ace_variable {\n \n}\n\n.ace-vibrant-ink .ace_variable.ace_language {\n \n}\n\n.ace-vibrant-ink .ace_xml_pe {\n \n}";d.importCssString(e),b.cssClass="ace-vibrant-ink"}) \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/ace/worker-coffee.js b/src/bb-modules/Filemanager/src/ace/worker-coffee.js new file mode 100644 index 000000000..a4cbf5894 --- /dev/null +++ b/src/bb-modules/Filemanager/src/ace/worker-coffee.js @@ -0,0 +1 @@ +function initSender(){var a=require("pilot/event_emitter").EventEmitter,b=require("pilot/oop"),c=function(){};(function(){b.implement(this,a),this.callback=function(a,b){postMessage({type:"call",id:b,data:a})},this.emit=function(a,b){postMessage({type:"event",name:a,data:b})}}).call(c.prototype);return new c}function initBaseUrls(a){require.tlns=a}var console={log:function(a){postMessage({type:"log",data:a})}},window={console:console},require=function(a){var b=require.modules[a];if(b){b.initialized||(b.exports=b.factory().exports,b.initialized=!0);return b.exports}var c=a.split("/");c[0]=require.tlns[c[0]]||c[0],path=c.join("/")+".js",require.id=a,importScripts(path);return require(a)};require.modules={},require.tlns={};var define=function(a,b,c){arguments.length==2?c=b:arguments.length==1&&(c=a,a=require.id);a.indexOf("text/")!==0&&(require.modules[a]={factory:function(){var a={exports:{}},b=c(require,a.exports,a);b&&(a.exports=b);return a}})},main,sender;onmessage=function(a){var b=a.data;if(b.command)main[b.command].apply(main,b.args);else if(b.init){initBaseUrls(b.tlns),require("pilot/fixoldbrowsers"),sender=initSender();var c=require(b.module)[b.classname];main=new c(sender)}else b.event&&sender&&sender._dispatchEvent(b.event,b.data)},define("pilot/fixoldbrowsers",["require","exports","module"],function(a,b,c){if(!Function.prototype.bind){var d=Array.prototype.slice;Function.prototype.bind=function(a){var b=this;if(typeof b.apply!="function"||typeof b.call!="function")return new TypeError;var c=d.call(arguments),e=function f(){if(this instanceof f){var a=Object.create(b.prototype);b.apply(a,c.concat(d.call(arguments)));return a}return b.call.apply(b,c.concat(d.call(arguments)))};e.length=typeof b=="function"?Math.max(b.length-c.length,0):0;return e}}var e=Function.prototype.call,f=Array.prototype,g=Object.prototype,h=e.bind(g.hasOwnProperty),i,j,k,l,m;if(m=h(g,"__defineGetter__"))i=e.bind(g.__defineGetter__),j=e.bind(g.__defineSetter__),k=e.bind(g.__lookupGetter__),l=e.bind(g.__lookupSetter__);Array.isArray||(Array.isArray=function(a){return Object.prototype.toString.call(a)==="[object Array]"}),Array.prototype.forEach||(Array.prototype.forEach=function(a,b){var c=+this.length;for(var d=0;d=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=2)var d=arguments[1];else do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0);for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||0;if(c>=b)return-1;c<0&&(c+=b);for(;c=0;c--){if(!h(this,c))continue;if(a===this[c])return c}return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype});if(!Object.getOwnPropertyDescriptor){var n="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(n+a);if(!h(a,b))return undefined;var c,d,e;c={enumerable:!0,configurable:!0};if(m){var f=a.__proto__;a.__proto__=g;var d=k(a,b),e=l(a,b);a.__proto__=f;if(d||e){d&&(descriptor.get=d),e&&(descriptor.set=e);return descriptor}}descriptor.value=a[b];return descriptor}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}typeof b!="undefined"&&Object.defineProperties(c,b);return c});if(!Object.defineProperty){var o="Property description must be an object: ",p="Object.defineProperty called on non-object: ",q="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function")throw new TypeError(p+a);if(typeof a!="object"||a===null)throw new TypeError(o+c);if(h(c,"value"))if(m&&(k(a,b)||l(a,b))){var d=a.__proto__;a.__proto__=g,delete a[b],a[b]=c.value,a.prototype}else a[b]=c.value;else{if(!m)throw new TypeError(q);h(c,"get")&&i(a,b,c.get),h(c,"set")&&j(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)h(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(r){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){return!0});if(!Object.keys){var s=!0,t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=t.length;for(var v in{toString:null})s=!1;Object.keys=function W(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var W=[];for(var b in a)h(a,b)&&W.push(b);if(s)for(var c=0,d=u;c=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;k.constructor=b;return k}return a.apply(this,arguments)},c=new RegExp("^(?:((?:[+-]\\d\\d)?\\d\\d\\d\\d)(?:-(\\d\\d)(?:-(\\d\\d))?)?)?(?:T(\\d\\d):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?)?(?:Z|([+-])(\\d\\d):(\\d\\d))?$");for(var d in a)b[d]=a[d];b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function e(b){var d=c.exec(b);if(d){d.shift();var e=d[0]===undefined;for(var f=0;f<10;f++){if(f===7)continue;d[f]=+(d[f]||(f<3?1:0)),f===1&&d[f]--}if(e)return((d[3]*60+d[4])*60+d[5])*1e3+d[6];var g=(d[8]*60+d[9])*60*1e3;d[6]==="-"&&(g=-g);return a.UTC.apply(this,d.slice(0,7))+g}return a.parse.apply(this,arguments)};return b}(Date));if(!String.prototype.trim){var w=/^\s\s*/,x=/\s\s*$/;String.prototype.trim=function(){return String(this).replace(w,"").replace(x,"")}}}),define("pilot/event_emitter",["require","exports","module"],function(a,b,c){var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!!c&&!!c.length){var b=b||{};b.type=a;for(var d=0;d=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||""));return a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};this._dispatchEvent("change",{data:e});return d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:d});return c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};this._dispatchEvent("change",{data:e});return d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};this._dispatchEvent("change",{data:i});return d.start}},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};this._dispatchEvent("change",{data:e});return d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}}).call(h.prototype),b.Document=h}),define("ace/range",["require","exports","module"],function(a,b,c){var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;b=this.compare(c.row,c.column);if(b==1){b=this.compare(d.row,d.column);return b==1?2:b==0?1:0}if(b==-1)return-2;b=this.compare(d.row,d.column);return b==-1?-1:b==1?42:0},this.containsRange=function(a){var b=this.compareRange(a);return b==-1||b==0||b==1},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)||this.isStart(a,b)?!1:!0;return!1},this.insideStart=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)?!1:!0;return!1},this.insideEnd=function(a,b){if(this.compare(a,b)==0)return this.isStart(a,b)?!1:!0;return!1},this.compare=function(a,b){if(!this.isMultiLine()&&a===this.start.row)return bthis.end.column?1:0;return athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.rowthis.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0);return c}}).call(f.prototype)}),define("pilot/lang",["require","exports","module"],function(a,b,c){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return Array(b+1).join(a)};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){var b=[];for(i=0,l=a.length;i=0||!b&&Y.call(j,c)>=0)g=c.toUpperCase(),g==="WHEN"&&(l=this.tag(),Y.call(x,l)>=0)?g="LEADING_WHEN":g==="FOR"?this.seenFor=!0:g==="UNLESS"?g="IF":Y.call(Q,g)>=0?g="UNARY":Y.call(K,g)>=0&&(g!=="INSTANCEOF"&&this.seenFor?(g="FOR"+g,this.seenFor=!1):(g="RELATION",this.value()==="!"&&(this.tokens.pop(),c="!"+c)));Y.call(v,c)>=0&&(b?(g="IDENTIFIER",c=new String(c),c.reserved=!0):Y.call(L,c)>=0&&this.identifierError(c)),b||(Y.call(h,c)>=0&&(c=i[c]),g=function(){switch(c){case"!":return"UNARY";case"==":case"!=":return"COMPARE";case"&&":case"||":return"LOGIC";case"true":case"false":case"null":case"undefined":return"BOOL";case"break":case"continue":case"debugger":return"STATEMENT";default:return g}}()),this.token(g,c),a&&this.token(":",":");return d.length},a.prototype.numberToken=function(){var a,b;if(!(a=H.exec(this.chunk)))return 0;b=a[0],this.token("NUMBER",b);return b.length},a.prototype.stringToken=function(){var a,b;switch(this.chunk.charAt(0)){case"'":if(!(a=O.exec(this.chunk)))return 0;this.token("STRING",(b=a[0]).replace(C,"\\\n"));break;case'"':if(!(b=this.balancedString(this.chunk,'"')))return 0;0=0))return 0;if(!(a=J.exec(this.chunk)))return 0;c=a[0],this.token("REGEX",c==="//"?"/(?:)/":c);return c.length},a.prototype.heregexToken=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;d=a[0],b=a[1],c=a[2];if(0>b.indexOf("#{")){e=b.replace(r,"").replace(/\//g,"\\/"),this.token("REGEX","/"+(e||"(?:)")+"/"+c);return d.length}this.token("IDENTIFIER","RegExp"),this.tokens.push(["CALL_START","("]),g=[],k=this.interpolateString(b,{regex:!0});for(i=0,j=k.length;ithis.indent){if(d){this.indebt=f-this.indent,this.suppressNewlines();return b.length}a=f-this.indent+this.outdebt,this.token("INDENT",a),this.indents.push(a),this.outdebt=this.indebt=0}else this.indebt=0,this.outdentToken(this.indent-f,d);this.indent=f;return b.length},a.prototype.outdentToken=function(a,b,c){var d,e;while(a>0)e=this.indents.length-1,this.indents[e]===void 0?a=0:this.indents[e]===this.outdebt?(a-=this.outdebt,this.outdebt=0):this.indents[e]=0)&&this.assignmentError();if((h=b[1])==="||"||h==="&&"){b[0]="COMPOUND_ASSIGN",b[1]+="=";return d.length}}if(d===";")c="TERMINATOR";else if(Y.call(B,d)>=0)c="MATH";else if(Y.call(l,d)>=0)c="COMPARE";else if(Y.call(m,d)>=0)c="COMPOUND_ASSIGN";else if(Y.call(Q,d)>=0)c="UNARY";else if(Y.call(N,d)>=0)c="SHIFT";else if(Y.call(z,d)>=0||d==="?"&&(b!=null?b.spaced:void 0))c="LOGIC";else if(b&&!b.spaced)if(d==="("&&(i=b[0],Y.call(f,i)>=0))b[0]==="?"&&(b[0]="FUNC_EXIST"),c="CALL_START";else if(d==="["&&(j=b[0],Y.call(t,j)>=0)){c="INDEX_START";switch(b[0]){case"?":b[0]="INDEX_SOAK";break;case"::":b[0]="INDEX_PROTO"}}this.token(c,d);return d.length},a.prototype.sanitizeHeredoc=function(a,b){var c,d,e,f,g;e=b.indent,d=b.herecomment;if(d){if(o.test(a))throw new Error('block comment cannot contain "*/", starting on line '+(this.line+1));if(a.indexOf("\n")<=0)return a}else while(f=p.exec(a)){c=f[1];if(e===null||0<(g=c.length)&&gg;1<=g?c++:c--){switch(d=a.charAt(c)){case"\\":c++;continue;case b:f.pop();if(!f.length)return a.slice(0,c+1);b=f[f.length-1];continue}b!=="}"||d!=='"'&&d!=="'"?b==="}"&&d==="{"?f.push(b="}"):b==='"'&&e==="#"&&d==="{"&&f.push(b="}"):f.push(b=d),e=d}throw new Error("missing "+f.pop()+", starting on line "+(this.line+1))},a.prototype.interpolateString=function(b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t;c==null&&(c={}),e=c.heredoc,m=c.regex,o=[],l=0,f=-1;while(j=b.charAt(f+=1)){if(j==="\\"){f+=1;continue}if(j!=="#"||b.charAt(f+1)!=="{"||!(d=this.balancedString(b.slice(f+1),"}")))continue;l1&&(k.unshift(["(","("]),k.push([")",")"])),o.push(["TOKENS",k])}f+=d.length,l=f+1}f>l&&l1)&&this.token("(","(");for(f=0,q=o.length;f|[-+*\/%<>&|^!?=]=|>>>=?|([-+:])\1|([&|<>])\2=?|\?\.|\.{2,3})/,R=/^[^\n\S]+/,k=/^###([^#][\s\S]*?)(?:###[^\n\S]*|(?:###)?$)|^(?:\s*#(?!##[^#]).*)+/,g=/^[-=]>/,D=/^(?:\n[^\n\S]*)+/,O=/^'[^\\']*(?:\\.[^\\']*)*'/,u=/^`[^\\`]*(?:\\.[^\\`]*)*`/,J=/^\/(?![\s=])[^[\/\n\\]*(?:(?:\\[\s\S]|\[[^\]\n\\]*(?:\\[\s\S][^\]\n\\]*)*])[^[\/\n\\]*)*\/[imgy]{0,4}(?!\w)/,q=/^\/{3}([\s\S]+?)\/{3}([imgy]{0,4})(?!\w)/,r=/\s+(?:#.*)?/g,C=/\n/g,p=/\n+([^\n\S]*)/g,o=/\*\//,d=/^\s*@?([$A-Za-z_][$\w\x7f-\uffff]*|['"].*['"])[^\n\S]*?[:=][^:=>]/,y=/^\s*(?:,|\??\.(?![.\d])|::)/,P=/\s+$/,G=/^(?:[-+*&|\/%=<>!.\\][<>=&|]*|and|or|is(?:nt)?|n(?:ot|ew)|delete|typeof|instanceof)$/,m=["-=","+=","/=","*=","%=","||=","&&=","?=","<<=",">>=",">>>=","&=","^=","|="],Q=["!","~","NEW","TYPEOF","DELETE","DO"],z=["&&","||","&","|","^"],N=["<<",">>",">>>"],l=["==","!=","<",">","<=",">="],B=["*","/","%"],K=["IN","OF","INSTANCEOF"],e=["TRUE","FALSE","NULL","UNDEFINED"],E=["NUMBER","REGEX","BOOL","++","--","]"],F=E.concat(")","}","THIS","IDENTIFIER","STRING"),f=["IDENTIFIER","STRING","REGEX",")","]","}","?","::","@","THIS","SUPER"],t=f.concat("NUMBER","BOOL"),x=["INDENT","OUTDENT","TERMINATOR"]}),define("ace/mode/coffee/rewriter",["require","exports","module"],function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b=0)d+=1;else if(j=e[0],v.call(f,j)>=0)d-=1;a+=1}return a-1},a.prototype.removeLeadingNewlines=function(){var a,b,c,d;d=this.tokens;for(a=0,c=d.length;a=0)){c.splice(b,1);return 0}return 1})},a.prototype.closeOpenCalls=function(){var a,b;b=function(a,b){var c;return(c=a[0])===")"||c==="CALL_END"||a[0]==="OUTDENT"&&this.tag(b-1)===")"},a=function(a,b){return this.tokens[a[0]==="OUTDENT"?b-1:b][0]="CALL_END"};return this.scanTokens(function(c,d){c[0]==="CALL_START"&&this.detectEnd(d+1,b,a);return 1})},a.prototype.closeOpenIndexes=function(){var a,b;b=function(a,b){var c;return(c=a[0])==="]"||c==="INDEX_END"},a=function(a,b){return a[0]="INDEX_END"};return this.scanTokens(function(c,d){c[0]==="INDEX_START"&&this.detectEnd(d+1,b,a);return 1})},a.prototype.addImplicitBraces=function(){var a,b,c,d,e;c=[],d=null,e=0,b=function(a,b){var c,d,e,f,g,h;g=this.tokens.slice(b+1,b+3+1||9e9),c=g[0],f=g[1],e=g[2];if("HERECOMMENT"===(c!=null?c[0]:void 0))return!1;d=a[0];return(d==="TERMINATOR"||d==="OUTDENT")&&(f!=null?f[0]:void 0)!==":"&&((c!=null?c[0]:void 0)!=="@"||(e!=null?e[0]:void 0)!==":")||d===","&&c&&(h=c[0])!=="IDENTIFIER"&&h!=="NUMBER"&&h!=="STRING"&&h!=="@"&&h!=="TERMINATOR"&&h!=="OUTDENT"},a=function(a,b){var c;c=["}","}",a[2]],c.generated=!0;return this.tokens.splice(b,0,c)};return this.scanTokens(function(e,h,i){var j,k,l,m,n,o,p;if(o=l=e[0],v.call(g,o)>=0){c.push([l==="INDENT"&&this.tag(h-1)==="{"?"{":l,h]);return 1}if(v.call(f,l)>=0){d=c.pop();return 1}if(l!==":"||(j=this.tag(h-2))!==":"&&((p=c[c.length-1])!=null?p[0]:void 0)==="{")return 1;c.push(["{"]),k=j==="@"?h-2:h-1;while(this.tag(k-2)==="HERECOMMENT")k-=2;n=new String("{"),n.generated=!0,m=["{",n,e[2]],m.generated=!0,i.splice(k,0,m),this.detectEnd(h+2,b,a);return 2})},a.prototype.addImplicitParentheses=function(){var a,b;b=!1,a=function(a,b){var c;c=a[0]==="OUTDENT"?b+1:b;return this.tokens.splice(c,0,["CALL_END",")",a[2]])};return this.scanTokens(function(c,d,e){var f,g,m,o,p,q,r,s,t,u;r=c[0];if(r==="CLASS"||r==="IF")b=!0;s=e.slice(d-1,d+1+1||9e9),o=s[0],g=s[1],m=s[2],f=!b&&r==="INDENT"&&m&&m.generated&&m[0]==="{"&&o&&(t=o[0],v.call(k,t)>=0),q=!1,p=!1,v.call(n,r)>=0&&(b=!1),o&&!o.spaced&&r==="?"&&(c.call=!0);if(c.fromThen)return 1;if(!(f||(o!=null?o.spaced:void 0)&&(o.call||(u=o[0],v.call(k,u)>=0))&&(v.call(i,r)>=0||!c.spaced&&!c.newLine&&v.call(l,r)>=0)))return 1;e.splice(d,0,["CALL_START","(",c[2]]),this.detectEnd(d+1,function(a,b){var c,d;r=a[0];if(!q&&a.fromThen)return!0;if(r==="IF"||r==="ELSE"||r==="CATCH"||r==="->"||r==="=>")q=!0;if(r==="IF"||r==="ELSE"||r==="SWITCH"||r==="TRY")p=!0;return r!=="."&&r!=="?."&&r!=="::"||this.tag(b-1)!=="OUTDENT"?!a.generated&&this.tag(b-1)!==","&&(v.call(j,r)>=0||r==="INDENT"&&!p)&&(r!=="INDENT"||this.tag(b-2)!=="CLASS"&&(d=this.tag(b-1),v.call(h,d)<0)&&(!(c=this.tokens[b+1])||!c.generated||c[0]!=="{")):!0},a),o[0]==="?"&&(o[0]="FUNC_EXIST");return 2})},a.prototype.addImplicitIndentation=function(){return this.scanTokens(function(a,b,c){var d,e,f,g,h,i,j,k;i=a[0];if(i==="TERMINATOR"&&this.tag(b+1)==="THEN"){c.splice(b,1);return 0}if(i==="ELSE"&&this.tag(b-1)!=="OUTDENT"){c.splice.apply(c,[b,0].concat(w.call(this.indentation(a))));return 2}if(i!=="CATCH"||(j=this.tag(b+2))!=="OUTDENT"&&j!=="TERMINATOR"&&j!=="FINALLY"){if(v.call(p,i)>=0&&this.tag(b+1)!=="INDENT"&&(i!=="ELSE"||this.tag(b+1)!=="IF")){h=i,k=this.indentation(a),f=k[0],g=k[1],h==="THEN"&&(f.fromThen=!0),f.generated=g.generated=!0,c.splice(b+1,0,f),e=function(a,b){var c;return a[1]!==";"&&(c=a[0],v.call(o,c)>=0)&&(a[0]!=="ELSE"||h==="IF"||h==="THEN")},d=function(a,b){return this.tokens.splice(this.tag(b-1)===","?b-1:b,0,g)},this.detectEnd(b+2,e,d),i==="THEN"&&c.splice(b,1);return 1}return 1}c.splice.apply(c,[b+2,0].concat(w.call(this.indentation(a))));return 4})},a.prototype.tagPostfixConditionals=function(){var a;a=function(a,b){var c;return(c=a[0])==="TERMINATOR"||c==="INDENT"};return this.scanTokens(function(b,c){var d;if(b[0]!=="IF")return 1;d=b,this.detectEnd(c+1,a,function(a,b){if(a[0]!=="INDENT")return d[0]="POST_"+d[0]});return 1})},a.prototype.ensureBalance=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;d={},f={},m=this.tokens;for(i=0,k=m.length;i0)throw Error("unclosed "+e+" on line "+(f[e]+1))}return this},a.prototype.rewriteClosingParens=function(){var a,b,c;c=[],a={};for(b in m)a[b]=0;return this.scanTokens(function(b,d,e){var h,i,j,k,l,n,o;if(o=l=b[0],v.call(g,o)>=0){c.push(b);return 1}if(v.call(f,l)<0)return 1;if(a[h=m[l]]>0){a[h]-=1,e.splice(d,1);return 0}i=c.pop(),j=i[0],k=m[j];if(l===k)return 1;a[j]+=1,n=[k,j==="INDENT"?i[1]:k],this.tag(d+2)===j?(e.splice(d+3,0,n),c.push(i)):e.splice(d,0,n);return 1})},a.prototype.indentation=function(a){return[["INDENT",2,a[2]],["OUTDENT",2,a[2]]]},a.prototype.tag=function(a){var b;return(b=this.tokens[a])!=null?b[0]:void 0};return a}(),d=[["(",")"],["[","]"],["{","}"],["INDENT","OUTDENT"],["CALL_START","CALL_END"],["PARAM_START","PARAM_END"],["INDEX_START","INDEX_END"]],m={},g=[],f=[];for(s=0,t=d.length;s","=>","[","(","{","--","++"],l=["+","-"],h=["->","=>","{","[",","],j=["POST_IF","FOR","WHILE","UNTIL","WHEN","BY","LOOP","TERMINATOR"],p=["ELSE","->","=>","TRY","FINALLY","THEN"],o=["TERMINATOR","CATCH","FINALLY","ELSE","OUTDENT","LEADING_WHEN"],n=["TERMINATOR","INDENT","OUTDENT"]}),define("ace/mode/coffee/helpers",["require","exports","module"],function(a,b,c){var d,e;b.starts=function(a,b,c){return b===a.substr(c,b.length)},b.ends=function(a,b,c){var d;d=b.length;return b===a.substr(a.length-d-(c||0),d)},b.compact=function(a){var b,c,d,e;e=[];for(c=0,d=a.length;c":48,"=>":49,OptComma:50,",":51,Param:52,ParamVar:53,"...":54,Array:55,Object:56,Splat:57,SimpleAssignable:58,Accessor:59,Parenthetical:60,Range:61,This:62,".":63,"?.":64,"::":65,Index:66,INDEX_START:67,IndexValue:68,INDEX_END:69,INDEX_SOAK:70,INDEX_PROTO:71,Slice:72,"{":73,AssignList:74,"}":75,CLASS:76,EXTENDS:77,OptFuncExist:78,Arguments:79,SUPER:80,FUNC_EXIST:81,CALL_START:82,CALL_END:83,ArgList:84,THIS:85,"@":86,"[":87,"]":88,RangeDots:89,"..":90,Arg:91,SimpleArgs:92,TRY:93,Catch:94,FINALLY:95,CATCH:96,THROW:97,"(":98,")":99,WhileSource:100,WHILE:101,WHEN:102,UNTIL:103,Loop:104,LOOP:105,ForBody:106,FOR:107,ForStart:108,ForSource:109,ForVariables:110,OWN:111,ForValue:112,FORIN:113,FOROF:114,BY:115,SWITCH:116,Whens:117,ELSE:118,When:119,LEADING_WHEN:120,IfBlock:121,IF:122,POST_IF:123,UNARY:124,"-":125,"+":126,"--":127,"++":128,"?":129,MATH:130,SHIFT:131,COMPARE:132,LOGIC:133,RELATION:134,COMPOUND_ASSIGN:135,$accept:0,$end:1},terminals_:{2:"error",6:"TERMINATOR",13:"STATEMENT",25:"INDENT",26:"OUTDENT",28:"IDENTIFIER",30:"NUMBER",31:"STRING",33:"JS",34:"REGEX",35:"BOOL",37:"=",40:":",42:"RETURN",43:"HERECOMMENT",44:"PARAM_START",46:"PARAM_END",48:"->",49:"=>",51:",",54:"...",63:".",64:"?.",65:"::",67:"INDEX_START",69:"INDEX_END",70:"INDEX_SOAK",71:"INDEX_PROTO",73:"{",75:"}",76:"CLASS",77:"EXTENDS",80:"SUPER",81:"FUNC_EXIST",82:"CALL_START",83:"CALL_END",85:"THIS",86:"@",87:"[",88:"]",90:"..",93:"TRY",95:"FINALLY",96:"CATCH",97:"THROW",98:"(",99:")",101:"WHILE",102:"WHEN",103:"UNTIL",105:"LOOP",107:"FOR",111:"OWN",113:"FORIN",114:"FOROF",115:"BY",116:"SWITCH",118:"ELSE",120:"LEADING_WHEN",122:"IF",123:"POST_IF",124:"UNARY",125:"-",126:"+",127:"--",128:"++",129:"?",130:"MATH",131:"SHIFT",132:"COMPARE",133:"LOGIC",134:"RELATION",135:"COMPOUND_ASSIGN"},productions_:[0,[3,0],[3,1],[3,2],[4,1],[4,3],[4,2],[7,1],[7,1],[9,1],[9,1],[9,1],[9,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[8,1],[5,2],[5,3],[27,1],[29,1],[29,1],[32,1],[32,1],[32,1],[32,1],[18,3],[18,5],[38,1],[38,3],[38,5],[38,1],[39,1],[39,1],[39,1],[10,2],[10,1],[12,1],[16,5],[16,2],[47,1],[47,1],[50,0],[50,1],[45,0],[45,1],[45,3],[52,1],[52,2],[52,3],[53,1],[53,1],[53,1],[53,1],[57,2],[58,1],[58,2],[58,2],[58,1],[36,1],[36,1],[36,1],[14,1],[14,1],[14,1],[14,1],[14,1],[59,2],[59,2],[59,2],[59,1],[59,1],[66,3],[66,2],[66,2],[68,1],[68,1],[56,4],[74,0],[74,1],[74,3],[74,4],[74,6],[24,1],[24,2],[24,3],[24,4],[24,2],[24,3],[24,4],[24,5],[15,3],[15,3],[15,1],[15,2],[78,0],[78,1],[79,2],[79,4],[62,1],[62,1],[41,2],[55,2],[55,4],[89,1],[89,1],[61,5],[72,3],[72,2],[72,2],[84,1],[84,3],[84,4],[84,4],[84,6],[91,1],[91,1],[92,1],[92,3],[20,2],[20,3],[20,4],[20,5],[94,3],[11,2],[60,3],[60,5],[100,2],[100,4],[100,2],[100,4],[21,2],[21,2],[21,2],[21,1],[104,2],[104,2],[22,2],[22,2],[22,2],[106,2],[106,2],[108,2],[108,3],[112,1],[112,1],[112,1],[110,1],[110,3],[109,2],[109,2],[109,4],[109,4],[109,4],[109,6],[109,6],[23,5],[23,7],[23,4],[23,6],[117,1],[117,2],[119,3],[119,4],[121,3],[121,5],[19,1],[19,3],[19,3],[19,3],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,2],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,3],[17,5],[17,3]],performAction:function f(a,b,c,d,e,f,g){var h=f.length-1;switch(e){case 1:return this.$=new d.Block;case 2:return this.$=f[h];case 3:return this.$=f[h-1];case 4:this.$=d.Block.wrap([f[h]]);break;case 5:this.$=f[h-2].push(f[h]);break;case 6:this.$=f[h-1];break;case 7:this.$=f[h];break;case 8:this.$=f[h];break;case 9:this.$=f[h];break;case 10:this.$=f[h];break;case 11:this.$=f[h];break;case 12:this.$=new d.Literal(f[h]);break;case 13:this.$=f[h];break;case 14:this.$=f[h];break;case 15:this.$=f[h];break;case 16:this.$=f[h];break;case 17:this.$=f[h];break;case 18:this.$=f[h];break;case 19:this.$=f[h];break;case 20:this.$=f[h];break;case 21:this.$=f[h];break;case 22:this.$=f[h];break;case 23:this.$=f[h];break;case 24:this.$=new d.Block;break;case 25:this.$=f[h-1];break;case 26:this.$=new d.Literal(f[h]);break;case 27:this.$=new d.Literal(f[h]);break;case 28:this.$=new d.Literal(f[h]);break;case 29:this.$=f[h];break;case 30:this.$=new d.Literal(f[h]);break;case 31:this.$=new d.Literal(f[h]);break;case 32:this.$=function(){var a;a=new d.Literal(f[h]),f[h]==="undefined"&&(a.isUndefined=!0);return a}();break;case 33:this.$=new d.Assign(f[h-2],f[h]);break;case 34:this.$=new d.Assign(f[h-4],f[h-1]);break;case 35:this.$=new d.Value(f[h]);break;case 36:this.$=new d.Assign(new d.Value(f[h-2]),f[h],"object");break;case 37:this.$=new d.Assign(new d.Value(f[h-4]),f[h-1],"object");break;case 38:this.$=f[h];break;case 39:this.$=f[h];break;case 40:this.$=f[h];break;case 41:this.$=f[h];break;case 42:this.$=new d.Return(f[h]);break;case 43:this.$=new d.Return;break;case 44:this.$=new d.Comment(f[h]);break;case 45:this.$=new d.Code(f[h-3],f[h],f[h-1]);break;case 46:this.$=new d.Code([],f[h],f[h-1]);break;case 47:this.$="func";break;case 48:this.$="boundfunc";break;case 49:this.$=f[h];break;case 50:this.$=f[h];break;case 51:this.$=[];break;case 52:this.$=[f[h]];break;case 53:this.$=f[h-2].concat(f[h]);break;case 54:this.$=new d.Param(f[h]);break;case 55:this.$=new d.Param(f[h-1],null,!0);break;case 56:this.$=new d.Param(f[h-2],f[h]);break;case 57:this.$=f[h];break;case 58:this.$=f[h];break;case 59:this.$=f[h];break;case 60:this.$=f[h];break;case 61:this.$=new d.Splat(f[h-1]);break;case 62:this.$=new d.Value(f[h]);break;case 63:this.$=f[h-1].push(f[h]);break;case 64:this.$=new d.Value(f[h-1],[f[h]]);break;case 65:this.$=f[h];break;case 66:this.$=f[h];break;case 67:this.$=new d.Value(f[h]);break;case 68:this.$=new d.Value(f[h]);break;case 69:this.$=f[h];break;case 70:this.$=new d.Value(f[h]);break;case 71:this.$=new d.Value(f[h]);break;case 72:this.$=new d.Value(f[h]);break;case 73:this.$=f[h];break;case 74:this.$=new d.Access(f[h]);break;case 75:this.$=new d.Access(f[h],"soak");break;case 76:this.$=new d.Access(f[h],"proto");break;case 77:this.$=new d.Access(new d.Literal("prototype"));break;case 78:this.$=f[h];break;case 79:this.$=f[h-1];break;case 80:this.$=d.extend(f[h],{soak:!0});break;case 81:this.$=d.extend(f[h],{proto:!0});break;case 82:this.$=new d.Index(f[h]);break;case 83:this.$=new d.Slice(f[h]);break;case 84:this.$=new d.Obj(f[h-2],f[h-3].generated);break;case 85:this.$=[];break;case 86:this.$=[f[h]];break;case 87:this.$=f[h-2].concat(f[h]);break;case 88:this.$=f[h-3].concat(f[h]);break;case 89:this.$=f[h-5].concat(f[h-2]);break;case 90:this.$=new d.Class;break;case 91:this.$=new d.Class(null,null,f[h]);break;case 92:this.$=new d.Class(null,f[h]);break;case 93:this.$=new d.Class(null,f[h-1],f[h]);break;case 94:this.$=new d.Class(f[h]);break;case 95:this.$=new d.Class(f[h-1],null,f[h]);break;case 96:this.$=new d.Class(f[h-2],f[h]);break;case 97:this.$=new d.Class(f[h-3],f[h-1],f[h]);break;case 98:this.$=new d.Call(f[h-2],f[h],f[h-1]);break;case 99:this.$=new d.Call(f[h-2],f[h],f[h-1]);break;case 100:this.$=new d.Call("super",[new d.Splat(new d.Literal("arguments"))]);break;case 101:this.$=new d.Call("super",f[h]);break;case 102:this.$=!1;break;case 103:this.$=!0;break;case 104:this.$=[];break;case 105:this.$=f[h-2];break;case 106:this.$=new d.Value(new d.Literal("this"));break;case 107:this.$=new d.Value(new d.Literal("this"));break;case 108:this.$=new d.Value(new d.Literal("this"),[new d.Access(f[h])],"this");break;case 109:this.$=new d.Arr([]);break;case 110:this.$=new d.Arr(f[h-2]);break;case 111:this.$="inclusive";break;case 112:this.$="exclusive";break;case 113:this.$=new d.Range(f[h-3],f[h-1],f[h-2]);break;case 114:this.$=new d.Range(f[h-2],f[h],f[h-1]);break;case 115:this.$=new d.Range(f[h-1],null,f[h]);break;case 116:this.$=new d.Range(null,f[h],f[h-1]);break;case 117:this.$=[f[h]];break;case 118:this.$=f[h-2].concat(f[h]);break;case 119:this.$=f[h-3].concat(f[h]);break;case 120:this.$=f[h-2];break;case 121:this.$=f[h-5].concat(f[h-2]);break;case 122:this.$=f[h];break;case 123:this.$=f[h];break;case 124:this.$=f[h];break;case 125:this.$=[].concat(f[h-2],f[h]);break;case 126:this.$=new d.Try(f[h]);break;case 127:this.$=new d.Try(f[h-1],f[h][0],f[h][1]);break;case 128:this.$=new d.Try(f[h-2],null,null,f[h]);break;case 129:this.$=new d.Try(f[h-3],f[h-2][0],f[h-2][1],f[h]);break;case 130:this.$=[f[h-1],f[h]];break;case 131:this.$=new d.Throw(f[h]);break;case 132:this.$=new d.Parens(f[h-1]);break;case 133:this.$=new d.Parens(f[h-2]);break;case 134:this.$=new d.While(f[h]);break;case 135:this.$=new d.While(f[h-2],{guard:f[h]});break;case 136:this.$=new d.While(f[h],{invert:!0});break;case 137:this.$=new d.While(f[h-2],{invert:!0,guard:f[h]});break;case 138:this.$=f[h-1].addBody(f[h]);break;case 139:this.$=f[h].addBody(d.Block.wrap([f[h-1]]));break;case 140:this.$=f[h].addBody(d.Block.wrap([f[h-1]]));break;case 141:this.$=f[h];break;case 142:this.$=(new d.While(new d.Literal("true"))).addBody(f[h]);break;case 143:this.$=(new d.While(new d.Literal("true"))).addBody(d.Block.wrap([f[h]]));break;case 144:this.$=new d.For(f[h-1],f[h]);break;case 145:this.$=new d.For(f[h-1],f[h]);break;case 146:this.$=new d.For(f[h],f[h-1]);break;case 147:this.$={source:new d.Value(f[h])};break;case 148:this.$=function(){f[h].own=f[h-1].own,f[h].name=f[h-1][0],f[h].index=f[h-1][1];return f[h]}();break;case 149:this.$=f[h];break;case 150:this.$=function(){f[h].own=!0;return f[h]}();break;case 151:this.$=f[h];break;case 152:this.$=new d.Value(f[h]);break;case 153:this.$=new d.Value(f[h]);break;case 154:this.$=[f[h]];break;case 155:this.$=[f[h-2],f[h]];break;case 156:this.$={source:f[h]};break;case 157:this.$={source:f[h],object:!0};break;case 158:this.$={source:f[h-2],guard:f[h]};break;case 159:this.$={source:f[h-2],guard:f[h],object:!0};break;case 160:this.$={source:f[h-2],step:f[h]};break;case 161:this.$={source:f[h-4],guard:f[h-2],step:f[h]};break;case 162:this.$={source:f[h-4],step:f[h-2],guard:f[h]};break;case 163:this.$=new d.Switch(f[h-3],f[h-1]);break;case 164:this.$=new d.Switch(f[h-5],f[h-3],f[h-1]);break;case 165:this.$=new d.Switch(null,f[h-1]);break;case 166:this.$=new d.Switch(null,f[h-3],f[h-1]);break;case 167:this.$=f[h];break;case 168:this.$=f[h-1].concat(f[h]);break;case 169:this.$=[[f[h-1],f[h]]];break;case 170:this.$=[[f[h-2],f[h-1]]];break;case 171:this.$=new d.If(f[h-1],f[h],{type:f[h-2]});break;case 172:this.$=f[h-4].addElse(new d.If(f[h-1],f[h],{type:f[h-2]}));break;case 173:this.$=f[h];break;case 174:this.$=f[h-2].addElse(f[h]);break;case 175:this.$=new d.If(f[h],d.Block.wrap([f[h-2]]),{type:f[h-1],statement:!0});break;case 176:this.$=new d.If(f[h],d.Block.wrap([f[h-2]]),{type:f[h-1],statement:!0});break;case 177:this.$=new d.Op(f[h-1],f[h]);break;case 178:this.$=new d.Op("-",f[h]);break;case 179:this.$=new d.Op("+",f[h]);break;case 180:this.$=new d.Op("--",f[h]);break;case 181:this.$=new d.Op("++",f[h]);break;case 182:this.$=new d.Op("--",f[h-1],null,!0);break;case 183:this.$=new d.Op("++",f[h-1],null,!0);break;case 184:this.$=new d.Existence(f[h-1]);break;case 185:this.$=new d.Op("+",f[h-2],f[h]);break;case 186:this.$=new d.Op("-",f[h-2],f[h]);break;case 187:this.$=new d.Op(f[h-1],f[h-2],f[h]);break;case 188:this.$=new d.Op(f[h-1],f[h-2],f[h]);break;case 189:this.$=new d.Op(f[h-1],f[h-2],f[h]);break;case 190:this.$=new d.Op(f[h-1],f[h-2],f[h]);break;case 191:this.$=function(){return f[h-1].charAt(0)==="!"?(new d.Op(f[h-1].slice(1),f[h-2],f[h])).invert():new d.Op(f[h-1],f[h-2],f[h])}();break;case 192:this.$=new d.Assign(f[h-2],f[h],f[h-1]);break;case 193:this.$=new d.Assign(f[h-4],f[h-1],f[h-3]);break;case 194:this.$=new d.Extends(f[h-2],f[h])}},table:[{1:[2,1],3:1,4:2,5:3,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[3]},{1:[2,2],6:[1,71]},{6:[1,72]},{1:[2,4],6:[2,4],26:[2,4],99:[2,4]},{4:74,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[1,73],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,7],6:[2,7],26:[2,7],99:[2,7],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,8],6:[2,8],26:[2,8],99:[2,8],100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,13],6:[2,13],25:[2,13],26:[2,13],46:[2,13],51:[2,13],54:[2,13],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,13],70:[1,97],71:[1,98],75:[2,13],78:89,81:[1,91],82:[2,102],83:[2,13],88:[2,13],90:[2,13],99:[2,13],101:[2,13],102:[2,13],103:[2,13],107:[2,13],115:[2,13],123:[2,13],125:[2,13],126:[2,13],129:[2,13],130:[2,13],131:[2,13],132:[2,13],133:[2,13],134:[2,13]},{1:[2,14],6:[2,14],25:[2,14],26:[2,14],46:[2,14],51:[2,14],54:[2,14],59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,14],70:[1,97],71:[1,98],75:[2,14],78:99,81:[1,91],82:[2,102],83:[2,14],88:[2,14],90:[2,14],99:[2,14],101:[2,14],102:[2,14],103:[2,14],107:[2,14],115:[2,14],123:[2,14],125:[2,14],126:[2,14],129:[2,14],130:[2,14],131:[2,14],132:[2,14],133:[2,14],134:[2,14]},{1:[2,15],6:[2,15],25:[2,15],26:[2,15],46:[2,15],51:[2,15],54:[2,15],69:[2,15],75:[2,15],83:[2,15],88:[2,15],90:[2,15],99:[2,15],101:[2,15],102:[2,15],103:[2,15],107:[2,15],115:[2,15],123:[2,15],125:[2,15],126:[2,15],129:[2,15],130:[2,15],131:[2,15],132:[2,15],133:[2,15],134:[2,15]},{1:[2,16],6:[2,16],25:[2,16],26:[2,16],46:[2,16],51:[2,16],54:[2,16],69:[2,16],75:[2,16],83:[2,16],88:[2,16],90:[2,16],99:[2,16],101:[2,16],102:[2,16],103:[2,16],107:[2,16],115:[2,16],123:[2,16],125:[2,16],126:[2,16],129:[2,16],130:[2,16],131:[2,16],132:[2,16],133:[2,16],134:[2,16]},{1:[2,17],6:[2,17],25:[2,17],26:[2,17],46:[2,17],51:[2,17],54:[2,17],69:[2,17],75:[2,17],83:[2,17],88:[2,17],90:[2,17],99:[2,17],101:[2,17],102:[2,17],103:[2,17],107:[2,17],115:[2,17],123:[2,17],125:[2,17],126:[2,17],129:[2,17],130:[2,17],131:[2,17],132:[2,17],133:[2,17],134:[2,17]},{1:[2,18],6:[2,18],25:[2,18],26:[2,18],46:[2,18],51:[2,18],54:[2,18],69:[2,18],75:[2,18],83:[2,18],88:[2,18],90:[2,18],99:[2,18],101:[2,18],102:[2,18],103:[2,18],107:[2,18],115:[2,18],123:[2,18],125:[2,18],126:[2,18],129:[2,18],130:[2,18],131:[2,18],132:[2,18],133:[2,18],134:[2,18]},{1:[2,19],6:[2,19],25:[2,19],26:[2,19],46:[2,19],51:[2,19],54:[2,19],69:[2,19],75:[2,19],83:[2,19],88:[2,19],90:[2,19],99:[2,19],101:[2,19],102:[2,19],103:[2,19],107:[2,19],115:[2,19],123:[2,19],125:[2,19],126:[2,19],129:[2,19],130:[2,19],131:[2,19],132:[2,19],133:[2,19],134:[2,19]},{1:[2,20],6:[2,20],25:[2,20],26:[2,20],46:[2,20],51:[2,20],54:[2,20],69:[2,20],75:[2,20],83:[2,20],88:[2,20],90:[2,20],99:[2,20],101:[2,20],102:[2,20],103:[2,20],107:[2,20],115:[2,20],123:[2,20],125:[2,20],126:[2,20],129:[2,20],130:[2,20],131:[2,20],132:[2,20],133:[2,20],134:[2,20]},{1:[2,21],6:[2,21],25:[2,21],26:[2,21],46:[2,21],51:[2,21],54:[2,21],69:[2,21],75:[2,21],83:[2,21],88:[2,21],90:[2,21],99:[2,21],101:[2,21],102:[2,21],103:[2,21],107:[2,21],115:[2,21],123:[2,21],125:[2,21],126:[2,21],129:[2,21],130:[2,21],131:[2,21],132:[2,21],133:[2,21],134:[2,21]},{1:[2,22],6:[2,22],25:[2,22],26:[2,22],46:[2,22],51:[2,22],54:[2,22],69:[2,22],75:[2,22],83:[2,22],88:[2,22],90:[2,22],99:[2,22],101:[2,22],102:[2,22],103:[2,22],107:[2,22],115:[2,22],123:[2,22],125:[2,22],126:[2,22],129:[2,22],130:[2,22],131:[2,22],132:[2,22],133:[2,22],134:[2,22]},{1:[2,23],6:[2,23],25:[2,23],26:[2,23],46:[2,23],51:[2,23],54:[2,23],69:[2,23],75:[2,23],83:[2,23],88:[2,23],90:[2,23],99:[2,23],101:[2,23],102:[2,23],103:[2,23],107:[2,23],115:[2,23],123:[2,23],125:[2,23],126:[2,23],129:[2,23],130:[2,23],131:[2,23],132:[2,23],133:[2,23],134:[2,23]},{1:[2,9],6:[2,9],26:[2,9],99:[2,9],101:[2,9],103:[2,9],107:[2,9],123:[2,9]},{1:[2,10],6:[2,10],26:[2,10],99:[2,10],101:[2,10],103:[2,10],107:[2,10],123:[2,10]},{1:[2,11],6:[2,11],26:[2,11],99:[2,11],101:[2,11],103:[2,11],107:[2,11],123:[2,11]},{1:[2,12],6:[2,12],26:[2,12],99:[2,12],101:[2,12],103:[2,12],107:[2,12],123:[2,12]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],37:[1,101],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,70],6:[2,70],25:[2,70],26:[2,70],46:[2,70],51:[2,70],54:[2,70],63:[2,70],64:[2,70],65:[2,70],67:[2,70],69:[2,70],70:[2,70],71:[2,70],75:[2,70],81:[2,70],82:[2,70],83:[2,70],88:[2,70],90:[2,70],99:[2,70],101:[2,70],102:[2,70],103:[2,70],107:[2,70],115:[2,70],123:[2,70],125:[2,70],126:[2,70],129:[2,70],130:[2,70],131:[2,70],132:[2,70],133:[2,70],134:[2,70]},{1:[2,71],6:[2,71],25:[2,71],26:[2,71],46:[2,71],51:[2,71],54:[2,71],63:[2,71],64:[2,71],65:[2,71],67:[2,71],69:[2,71],70:[2,71],71:[2,71],75:[2,71],81:[2,71],82:[2,71],83:[2,71],88:[2,71],90:[2,71],99:[2,71],101:[2,71],102:[2,71],103:[2,71],107:[2,71],115:[2,71],123:[2,71],125:[2,71],126:[2,71],129:[2,71],130:[2,71],131:[2,71],132:[2,71],133:[2,71],134:[2,71]},{1:[2,72],6:[2,72],25:[2,72],26:[2,72],46:[2,72],51:[2,72],54:[2,72],63:[2,72],64:[2,72],65:[2,72],67:[2,72],69:[2,72],70:[2,72],71:[2,72],75:[2,72],81:[2,72],82:[2,72],83:[2,72],88:[2,72],90:[2,72],99:[2,72],101:[2,72],102:[2,72],103:[2,72],107:[2,72],115:[2,72],123:[2,72],125:[2,72],126:[2,72],129:[2,72],130:[2,72],131:[2,72],132:[2,72],133:[2,72],134:[2,72]},{1:[2,73],6:[2,73],25:[2,73],26:[2,73],46:[2,73],51:[2,73],54:[2,73],63:[2,73],64:[2,73],65:[2,73],67:[2,73],69:[2,73],70:[2,73],71:[2,73],75:[2,73],81:[2,73],82:[2,73],83:[2,73],88:[2,73],90:[2,73],99:[2,73],101:[2,73],102:[2,73],103:[2,73],107:[2,73],115:[2,73],123:[2,73],125:[2,73],126:[2,73],129:[2,73],130:[2,73],131:[2,73],132:[2,73],133:[2,73],134:[2,73]},{1:[2,100],6:[2,100],25:[2,100],26:[2,100],46:[2,100],51:[2,100],54:[2,100],63:[2,100],64:[2,100],65:[2,100],67:[2,100],69:[2,100],70:[2,100],71:[2,100],75:[2,100],79:102,81:[2,100],82:[1,103],83:[2,100],88:[2,100],90:[2,100],99:[2,100],101:[2,100],102:[2,100],103:[2,100],107:[2,100],115:[2,100],123:[2,100],125:[2,100],126:[2,100],129:[2,100],130:[2,100],131:[2,100],132:[2,100],133:[2,100],134:[2,100]},{27:107,28:[1,70],41:108,45:104,46:[2,51],51:[2,51],52:105,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{5:113,25:[1,5]},{8:114,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:116,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:117,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:118,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{14:119,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:122,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],37:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],77:[1,126],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],127:[1,123],128:[1,124],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66],135:[1,125]},{1:[2,173],6:[2,173],25:[2,173],26:[2,173],46:[2,173],51:[2,173],54:[2,173],69:[2,173],75:[2,173],83:[2,173],88:[2,173],90:[2,173],99:[2,173],101:[2,173],102:[2,173],103:[2,173],107:[2,173],115:[2,173],118:[1,127],123:[2,173],125:[2,173],126:[2,173],129:[2,173],130:[2,173],131:[2,173],132:[2,173],133:[2,173],134:[2,173]},{5:128,25:[1,5]},{5:129,25:[1,5]},{1:[2,141],6:[2,141],25:[2,141],26:[2,141],46:[2,141],51:[2,141],54:[2,141],69:[2,141],75:[2,141],83:[2,141],88:[2,141],90:[2,141],99:[2,141],101:[2,141],102:[2,141],103:[2,141],107:[2,141],115:[2,141],123:[2,141],125:[2,141],126:[2,141],129:[2,141],130:[2,141],131:[2,141],132:[2,141],133:[2,141],134:[2,141]},{5:130,25:[1,5]},{8:131,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,132],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,90],5:133,6:[2,90],14:119,15:120,25:[1,5],26:[2,90],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,46:[2,90],51:[2,90],54:[2,90],55:47,56:48,58:135,60:25,61:26,62:27,69:[2,90],73:[1,67],75:[2,90],77:[1,134],80:[1,28],83:[2,90],85:[1,55],86:[1,56],87:[1,54],88:[2,90],90:[2,90],98:[1,53],99:[2,90],101:[2,90],102:[2,90],103:[2,90],107:[2,90],115:[2,90],123:[2,90],125:[2,90],126:[2,90],129:[2,90],130:[2,90],131:[2,90],132:[2,90],133:[2,90],134:[2,90]},{1:[2,43],6:[2,43],8:136,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,43],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,43],100:39,101:[2,43],103:[2,43],104:40,105:[1,64],106:41,107:[2,43],108:66,116:[1,42],121:37,122:[1,61],123:[2,43],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:137,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,44],6:[2,44],25:[2,44],26:[2,44],51:[2,44],75:[2,44],99:[2,44],101:[2,44],103:[2,44],107:[2,44],123:[2,44]},{1:[2,67],6:[2,67],25:[2,67],26:[2,67],37:[2,67],46:[2,67],51:[2,67],54:[2,67],63:[2,67],64:[2,67],65:[2,67],67:[2,67],69:[2,67],70:[2,67],71:[2,67],75:[2,67],81:[2,67],82:[2,67],83:[2,67],88:[2,67],90:[2,67],99:[2,67],101:[2,67],102:[2,67],103:[2,67],107:[2,67],115:[2,67],123:[2,67],125:[2,67],126:[2,67],129:[2,67],130:[2,67],131:[2,67],132:[2,67],133:[2,67],134:[2,67]},{1:[2,68],6:[2,68],25:[2,68],26:[2,68],37:[2,68],46:[2,68],51:[2,68],54:[2,68],63:[2,68],64:[2,68],65:[2,68],67:[2,68],69:[2,68],70:[2,68],71:[2,68],75:[2,68],81:[2,68],82:[2,68],83:[2,68],88:[2,68],90:[2,68],99:[2,68],101:[2,68],102:[2,68],103:[2,68],107:[2,68],115:[2,68],123:[2,68],125:[2,68],126:[2,68],129:[2,68],130:[2,68],131:[2,68],132:[2,68],133:[2,68],134:[2,68]},{1:[2,29],6:[2,29],25:[2,29],26:[2,29],46:[2,29],51:[2,29],54:[2,29],63:[2,29],64:[2,29],65:[2,29],67:[2,29],69:[2,29],70:[2,29],71:[2,29],75:[2,29],81:[2,29],82:[2,29],83:[2,29],88:[2,29],90:[2,29],99:[2,29],101:[2,29],102:[2,29],103:[2,29],107:[2,29],115:[2,29],123:[2,29],125:[2,29],126:[2,29],129:[2,29],130:[2,29],131:[2,29],132:[2,29],133:[2,29],134:[2,29]},{1:[2,30],6:[2,30],25:[2,30],26:[2,30],46:[2,30],51:[2,30],54:[2,30],63:[2,30],64:[2,30],65:[2,30],67:[2,30],69:[2,30],70:[2,30],71:[2,30],75:[2,30],81:[2,30],82:[2,30],83:[2,30],88:[2,30],90:[2,30],99:[2,30],101:[2,30],102:[2,30],103:[2,30],107:[2,30],115:[2,30],123:[2,30],125:[2,30],126:[2,30],129:[2,30],130:[2,30],131:[2,30],132:[2,30],133:[2,30],134:[2,30]},{1:[2,31],6:[2,31],25:[2,31],26:[2,31],46:[2,31],51:[2,31],54:[2,31],63:[2,31],64:[2,31],65:[2,31],67:[2,31],69:[2,31],70:[2,31],71:[2,31],75:[2,31],81:[2,31],82:[2,31],83:[2,31],88:[2,31],90:[2,31],99:[2,31],101:[2,31],102:[2,31],103:[2,31],107:[2,31],115:[2,31],123:[2,31],125:[2,31],126:[2,31],129:[2,31],130:[2,31],131:[2,31],132:[2,31],133:[2,31],134:[2,31]},{1:[2,32],6:[2,32],25:[2,32],26:[2,32],46:[2,32],51:[2,32],54:[2,32],63:[2,32],64:[2,32],65:[2,32],67:[2,32],69:[2,32],70:[2,32],71:[2,32],75:[2,32],81:[2,32],82:[2,32],83:[2,32],88:[2,32],90:[2,32],99:[2,32],101:[2,32],102:[2,32],103:[2,32],107:[2,32],115:[2,32],123:[2,32],125:[2,32],126:[2,32],129:[2,32],130:[2,32],131:[2,32],132:[2,32],133:[2,32],134:[2,32]},{4:138,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,139],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:140,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,106],6:[2,106],25:[2,106],26:[2,106],46:[2,106],51:[2,106],54:[2,106],63:[2,106],64:[2,106],65:[2,106],67:[2,106],69:[2,106],70:[2,106],71:[2,106],75:[2,106],81:[2,106],82:[2,106],83:[2,106],88:[2,106],90:[2,106],99:[2,106],101:[2,106],102:[2,106],103:[2,106],107:[2,106],115:[2,106],123:[2,106],125:[2,106],126:[2,106],129:[2,106],130:[2,106],131:[2,106],132:[2,106],133:[2,106],134:[2,106]},{1:[2,107],6:[2,107],25:[2,107],26:[2,107],27:146,28:[1,70],46:[2,107],51:[2,107],54:[2,107],63:[2,107],64:[2,107],65:[2,107],67:[2,107],69:[2,107],70:[2,107],71:[2,107],75:[2,107],81:[2,107],82:[2,107],83:[2,107],88:[2,107],90:[2,107],99:[2,107],101:[2,107],102:[2,107],103:[2,107],107:[2,107],115:[2,107],123:[2,107],125:[2,107],126:[2,107],129:[2,107],130:[2,107],131:[2,107],132:[2,107],133:[2,107],134:[2,107]},{25:[2,47]},{25:[2,48]},{1:[2,62],6:[2,62],25:[2,62],26:[2,62],37:[2,62],46:[2,62],51:[2,62],54:[2,62],63:[2,62],64:[2,62],65:[2,62],67:[2,62],69:[2,62],70:[2,62],71:[2,62],75:[2,62],77:[2,62],81:[2,62],82:[2,62],83:[2,62],88:[2,62],90:[2,62],99:[2,62],101:[2,62],102:[2,62],103:[2,62],107:[2,62],115:[2,62],123:[2,62],125:[2,62],126:[2,62],127:[2,62],128:[2,62],129:[2,62],130:[2,62],131:[2,62],132:[2,62],133:[2,62],134:[2,62],135:[2,62]},{1:[2,65],6:[2,65],25:[2,65],26:[2,65],37:[2,65],46:[2,65],51:[2,65],54:[2,65],63:[2,65],64:[2,65],65:[2,65],67:[2,65],69:[2,65],70:[2,65],71:[2,65],75:[2,65],77:[2,65],81:[2,65],82:[2,65],83:[2,65],88:[2,65],90:[2,65],99:[2,65],101:[2,65],102:[2,65],103:[2,65],107:[2,65],115:[2,65],123:[2,65],125:[2,65],126:[2,65],127:[2,65],128:[2,65],129:[2,65],130:[2,65],131:[2,65],132:[2,65],133:[2,65],134:[2,65],135:[2,65]},{8:147,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:148,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:149,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:150,8:151,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,5],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{27:156,28:[1,70],55:157,56:158,61:152,73:[1,67],87:[1,54],110:153,111:[1,154],112:155},{109:159,113:[1,160],114:[1,161]},{6:[2,85],12:165,25:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:162,75:[2,85],86:[1,111]},{1:[2,27],6:[2,27],25:[2,27],26:[2,27],40:[2,27],46:[2,27],51:[2,27],54:[2,27],63:[2,27],64:[2,27],65:[2,27],67:[2,27],69:[2,27],70:[2,27],71:[2,27],75:[2,27],81:[2,27],82:[2,27],83:[2,27],88:[2,27],90:[2,27],99:[2,27],101:[2,27],102:[2,27],103:[2,27],107:[2,27],115:[2,27],123:[2,27],125:[2,27],126:[2,27],129:[2,27],130:[2,27],131:[2,27],132:[2,27],133:[2,27],134:[2,27]},{1:[2,28],6:[2,28],25:[2,28],26:[2,28],40:[2,28],46:[2,28],51:[2,28],54:[2,28],63:[2,28],64:[2,28],65:[2,28],67:[2,28],69:[2,28],70:[2,28],71:[2,28],75:[2,28],81:[2,28],82:[2,28],83:[2,28],88:[2,28],90:[2,28],99:[2,28],101:[2,28],102:[2,28],103:[2,28],107:[2,28],115:[2,28],123:[2,28],125:[2,28],126:[2,28],129:[2,28],130:[2,28],131:[2,28],132:[2,28],133:[2,28],134:[2,28]},{1:[2,26],6:[2,26],25:[2,26],26:[2,26],37:[2,26],40:[2,26],46:[2,26],51:[2,26],54:[2,26],63:[2,26],64:[2,26],65:[2,26],67:[2,26],69:[2,26],70:[2,26],71:[2,26],75:[2,26],77:[2,26],81:[2,26],82:[2,26],83:[2,26],88:[2,26],90:[2,26],99:[2,26],101:[2,26],102:[2,26],103:[2,26],107:[2,26],113:[2,26],114:[2,26],115:[2,26],123:[2,26],125:[2,26],126:[2,26],127:[2,26],128:[2,26],129:[2,26],130:[2,26],131:[2,26],132:[2,26],133:[2,26],134:[2,26],135:[2,26]},{1:[2,6],6:[2,6],7:169,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,26:[2,6],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],99:[2,6],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,3]},{1:[2,24],6:[2,24],25:[2,24],26:[2,24],46:[2,24],51:[2,24],54:[2,24],69:[2,24],75:[2,24],83:[2,24],88:[2,24],90:[2,24],95:[2,24],96:[2,24],99:[2,24],101:[2,24],102:[2,24],103:[2,24],107:[2,24],115:[2,24],118:[2,24],120:[2,24],123:[2,24],125:[2,24],126:[2,24],129:[2,24],130:[2,24],131:[2,24],132:[2,24],133:[2,24],134:[2,24]},{6:[1,71],26:[1,170]},{1:[2,184],6:[2,184],25:[2,184],26:[2,184],46:[2,184],51:[2,184],54:[2,184],69:[2,184],75:[2,184],83:[2,184],88:[2,184],90:[2,184],99:[2,184],101:[2,184],102:[2,184],103:[2,184],107:[2,184],115:[2,184],123:[2,184],125:[2,184],126:[2,184],129:[2,184],130:[2,184],131:[2,184],132:[2,184],133:[2,184],134:[2,184]},{8:171,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:172,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:173,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:174,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:175,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:176,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:177,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:178,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,140],6:[2,140],25:[2,140],26:[2,140],46:[2,140],51:[2,140],54:[2,140],69:[2,140],75:[2,140],83:[2,140],88:[2,140],90:[2,140],99:[2,140],101:[2,140],102:[2,140],103:[2,140],107:[2,140],115:[2,140],123:[2,140],125:[2,140],126:[2,140],129:[2,140],130:[2,140],131:[2,140],132:[2,140],133:[2,140],134:[2,140]},{1:[2,145],6:[2,145],25:[2,145],26:[2,145],46:[2,145],51:[2,145],54:[2,145],69:[2,145],75:[2,145],83:[2,145],88:[2,145],90:[2,145],99:[2,145],101:[2,145],102:[2,145],103:[2,145],107:[2,145],115:[2,145],123:[2,145],125:[2,145],126:[2,145],129:[2,145],130:[2,145],131:[2,145],132:[2,145],133:[2,145],134:[2,145]},{8:179,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,139],6:[2,139],25:[2,139],26:[2,139],46:[2,139],51:[2,139],54:[2,139],69:[2,139],75:[2,139],83:[2,139],88:[2,139],90:[2,139],99:[2,139],101:[2,139],102:[2,139],103:[2,139],107:[2,139],115:[2,139],123:[2,139],125:[2,139],126:[2,139],129:[2,139],130:[2,139],131:[2,139],132:[2,139],133:[2,139],134:[2,139]},{1:[2,144],6:[2,144],25:[2,144],26:[2,144],46:[2,144],51:[2,144],54:[2,144],69:[2,144],75:[2,144],83:[2,144],88:[2,144],90:[2,144],99:[2,144],101:[2,144],102:[2,144],103:[2,144],107:[2,144],115:[2,144],123:[2,144],125:[2,144],126:[2,144],129:[2,144],130:[2,144],131:[2,144],132:[2,144],133:[2,144],134:[2,144]},{79:180,82:[1,103]},{1:[2,63],6:[2,63],25:[2,63],26:[2,63],37:[2,63],46:[2,63],51:[2,63],54:[2,63],63:[2,63],64:[2,63],65:[2,63],67:[2,63],69:[2,63],70:[2,63],71:[2,63],75:[2,63],77:[2,63],81:[2,63],82:[2,63],83:[2,63],88:[2,63],90:[2,63],99:[2,63],101:[2,63],102:[2,63],103:[2,63],107:[2,63],115:[2,63],123:[2,63],125:[2,63],126:[2,63],127:[2,63],128:[2,63],129:[2,63],130:[2,63],131:[2,63],132:[2,63],133:[2,63],134:[2,63],135:[2,63]},{82:[2,103]},{27:181,28:[1,70]},{27:182,28:[1,70]},{1:[2,77],6:[2,77],25:[2,77],26:[2,77],27:183,28:[1,70],37:[2,77],46:[2,77],51:[2,77],54:[2,77],63:[2,77],64:[2,77],65:[2,77],67:[2,77],69:[2,77],70:[2,77],71:[2,77],75:[2,77],77:[2,77],81:[2,77],82:[2,77],83:[2,77],88:[2,77],90:[2,77],99:[2,77],101:[2,77],102:[2,77],103:[2,77],107:[2,77],115:[2,77],123:[2,77],125:[2,77],126:[2,77],127:[2,77],128:[2,77],129:[2,77],130:[2,77],131:[2,77],132:[2,77],133:[2,77],134:[2,77],135:[2,77]},{1:[2,78],6:[2,78],25:[2,78],26:[2,78],37:[2,78],46:[2,78],51:[2,78],54:[2,78],63:[2,78],64:[2,78],65:[2,78],67:[2,78],69:[2,78],70:[2,78],71:[2,78],75:[2,78],77:[2,78],81:[2,78],82:[2,78],83:[2,78],88:[2,78],90:[2,78],99:[2,78],101:[2,78],102:[2,78],103:[2,78],107:[2,78],115:[2,78],123:[2,78],125:[2,78],126:[2,78],127:[2,78],128:[2,78],129:[2,78],130:[2,78],131:[2,78],132:[2,78],133:[2,78],134:[2,78],135:[2,78]},{8:185,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],54:[1,189],55:47,56:48,58:36,60:25,61:26,62:27,68:184,72:186,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],89:187,90:[1,188],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{66:190,67:[1,96],70:[1,97],71:[1,98]},{66:191,67:[1,96],70:[1,97],71:[1,98]},{79:192,82:[1,103]},{1:[2,64],6:[2,64],25:[2,64],26:[2,64],37:[2,64],46:[2,64],51:[2,64],54:[2,64],63:[2,64],64:[2,64],65:[2,64],67:[2,64],69:[2,64],70:[2,64],71:[2,64],75:[2,64],77:[2,64],81:[2,64],82:[2,64],83:[2,64],88:[2,64],90:[2,64],99:[2,64],101:[2,64],102:[2,64],103:[2,64],107:[2,64],115:[2,64],123:[2,64],125:[2,64],126:[2,64],127:[2,64],128:[2,64],129:[2,64],130:[2,64],131:[2,64],132:[2,64],133:[2,64],134:[2,64],135:[2,64]},{8:193,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,194],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,101],6:[2,101],25:[2,101],26:[2,101],46:[2,101],51:[2,101],54:[2,101],63:[2,101],64:[2,101],65:[2,101],67:[2,101],69:[2,101],70:[2,101],71:[2,101],75:[2,101],81:[2,101],82:[2,101],83:[2,101],88:[2,101],90:[2,101],99:[2,101],101:[2,101],102:[2,101],103:[2,101],107:[2,101],115:[2,101],123:[2,101],125:[2,101],126:[2,101],129:[2,101],130:[2,101],131:[2,101],132:[2,101],133:[2,101],134:[2,101]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[1,195],84:196,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{46:[1,198],51:[1,199]},{46:[2,52],51:[2,52]},{37:[1,201],46:[2,54],51:[2,54],54:[1,200]},{37:[2,57],46:[2,57],51:[2,57],54:[2,57]},{37:[2,58],46:[2,58],51:[2,58],54:[2,58]},{37:[2,59],46:[2,59],51:[2,59],54:[2,59]},{37:[2,60],46:[2,60],51:[2,60],54:[2,60]},{27:146,28:[1,70]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:142,85:[1,55],86:[1,56],87:[1,54],88:[1,141],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,46],6:[2,46],25:[2,46],26:[2,46],46:[2,46],51:[2,46],54:[2,46],69:[2,46],75:[2,46],83:[2,46],88:[2,46],90:[2,46],99:[2,46],101:[2,46],102:[2,46],103:[2,46],107:[2,46],115:[2,46],123:[2,46],125:[2,46],126:[2,46],129:[2,46],130:[2,46],131:[2,46],132:[2,46],133:[2,46],134:[2,46]},{1:[2,177],6:[2,177],25:[2,177],26:[2,177],46:[2,177],51:[2,177],54:[2,177],69:[2,177],75:[2,177],83:[2,177],88:[2,177],90:[2,177],99:[2,177],100:84,101:[2,177],102:[2,177],103:[2,177],106:85,107:[2,177],108:66,115:[2,177],123:[2,177],125:[2,177],126:[2,177],129:[1,75],130:[2,177],131:[2,177],132:[2,177],133:[2,177],134:[2,177]},{100:87,101:[1,62],103:[1,63],106:88,107:[1,65],108:66,123:[1,86]},{1:[2,178],6:[2,178],25:[2,178],26:[2,178],46:[2,178],51:[2,178],54:[2,178],69:[2,178],75:[2,178],83:[2,178],88:[2,178],90:[2,178],99:[2,178],100:84,101:[2,178],102:[2,178],103:[2,178],106:85,107:[2,178],108:66,115:[2,178],123:[2,178],125:[2,178],126:[2,178],129:[1,75],130:[2,178],131:[2,178],132:[2,178],133:[2,178],134:[2,178]},{1:[2,179],6:[2,179],25:[2,179],26:[2,179],46:[2,179],51:[2,179],54:[2,179],69:[2,179],75:[2,179],83:[2,179],88:[2,179],90:[2,179],99:[2,179],100:84,101:[2,179],102:[2,179],103:[2,179],106:85,107:[2,179],108:66,115:[2,179],123:[2,179],125:[2,179],126:[2,179],129:[1,75],130:[2,179],131:[2,179],132:[2,179],133:[2,179],134:[2,179]},{1:[2,180],6:[2,180],25:[2,180],26:[2,180],46:[2,180],51:[2,180],54:[2,180],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,180],70:[2,66],71:[2,66],75:[2,180],81:[2,66],82:[2,66],83:[2,180],88:[2,180],90:[2,180],99:[2,180],101:[2,180],102:[2,180],103:[2,180],107:[2,180],115:[2,180],123:[2,180],125:[2,180],126:[2,180],129:[2,180],130:[2,180],131:[2,180],132:[2,180],133:[2,180],134:[2,180]},{59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:89,81:[1,91],82:[2,102]},{59:100,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],70:[1,97],71:[1,98],78:99,81:[1,91],82:[2,102]},{1:[2,69],6:[2,69],25:[2,69],26:[2,69],46:[2,69],51:[2,69],54:[2,69],63:[2,69],64:[2,69],65:[2,69],67:[2,69],69:[2,69],70:[2,69],71:[2,69],75:[2,69],81:[2,69],82:[2,69],83:[2,69],88:[2,69],90:[2,69],99:[2,69],101:[2,69],102:[2,69],103:[2,69],107:[2,69],115:[2,69],123:[2,69],125:[2,69],126:[2,69],129:[2,69],130:[2,69],131:[2,69],132:[2,69],133:[2,69],134:[2,69]},{1:[2,181],6:[2,181],25:[2,181],26:[2,181],46:[2,181],51:[2,181],54:[2,181],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,181],70:[2,66],71:[2,66],75:[2,181],81:[2,66],82:[2,66],83:[2,181],88:[2,181],90:[2,181],99:[2,181],101:[2,181],102:[2,181],103:[2,181],107:[2,181],115:[2,181],123:[2,181],125:[2,181],126:[2,181],129:[2,181],130:[2,181],131:[2,181],132:[2,181],133:[2,181],134:[2,181]},{1:[2,182],6:[2,182],25:[2,182],26:[2,182],46:[2,182],51:[2,182],54:[2,182],69:[2,182],75:[2,182],83:[2,182],88:[2,182],90:[2,182],99:[2,182],101:[2,182],102:[2,182],103:[2,182],107:[2,182],115:[2,182],123:[2,182],125:[2,182],126:[2,182],129:[2,182],130:[2,182],131:[2,182],132:[2,182],133:[2,182],134:[2,182]},{1:[2,183],6:[2,183],25:[2,183],26:[2,183],46:[2,183],51:[2,183],54:[2,183],69:[2,183],75:[2,183],83:[2,183],88:[2,183],90:[2,183],99:[2,183],101:[2,183],102:[2,183],103:[2,183],107:[2,183],115:[2,183],123:[2,183],125:[2,183],126:[2,183],129:[2,183],130:[2,183],131:[2,183],132:[2,183],133:[2,183],134:[2,183]},{8:202,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,203],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:204,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{5:205,25:[1,5],122:[1,206]},{1:[2,126],6:[2,126],25:[2,126],26:[2,126],46:[2,126],51:[2,126],54:[2,126],69:[2,126],75:[2,126],83:[2,126],88:[2,126],90:[2,126],94:207,95:[1,208],96:[1,209],99:[2,126],101:[2,126],102:[2,126],103:[2,126],107:[2,126],115:[2,126],123:[2,126],125:[2,126],126:[2,126],129:[2,126],130:[2,126],131:[2,126],132:[2,126],133:[2,126],134:[2,126]},{1:[2,138],6:[2,138],25:[2,138],26:[2,138],46:[2,138],51:[2,138],54:[2,138],69:[2,138],75:[2,138],83:[2,138],88:[2,138],90:[2,138],99:[2,138],101:[2,138],102:[2,138],103:[2,138],107:[2,138],115:[2,138],123:[2,138],125:[2,138],126:[2,138],129:[2,138],130:[2,138],131:[2,138],132:[2,138],133:[2,138],134:[2,138]},{1:[2,146],6:[2,146],25:[2,146],26:[2,146],46:[2,146],51:[2,146],54:[2,146],69:[2,146],75:[2,146],83:[2,146],88:[2,146],90:[2,146],99:[2,146],101:[2,146],102:[2,146],103:[2,146],107:[2,146],115:[2,146],123:[2,146],125:[2,146],126:[2,146],129:[2,146],130:[2,146],131:[2,146],132:[2,146],133:[2,146],134:[2,146]},{25:[1,210],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{117:211,119:212,120:[1,213]},{1:[2,91],6:[2,91],25:[2,91],26:[2,91],46:[2,91],51:[2,91],54:[2,91],69:[2,91],75:[2,91],83:[2,91],88:[2,91],90:[2,91],99:[2,91],101:[2,91],102:[2,91],103:[2,91],107:[2,91],115:[2,91],123:[2,91],125:[2,91],126:[2,91],129:[2,91],130:[2,91],131:[2,91],132:[2,91],133:[2,91],134:[2,91]},{14:214,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,94],5:216,6:[2,94],25:[1,5],26:[2,94],46:[2,94],51:[2,94],54:[2,94],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,94],70:[2,66],71:[2,66],75:[2,94],77:[1,217],81:[2,66],82:[2,66],83:[2,94],88:[2,94],90:[2,94],99:[2,94],101:[2,94],102:[2,94],103:[2,94],107:[2,94],115:[2,94],123:[2,94],125:[2,94],126:[2,94],129:[2,94],130:[2,94],131:[2,94],132:[2,94],133:[2,94],134:[2,94]},{1:[2,42],6:[2,42],26:[2,42],99:[2,42],100:84,101:[2,42],103:[2,42],106:85,107:[2,42],108:66,123:[2,42],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,131],6:[2,131],26:[2,131],99:[2,131],100:84,101:[2,131],103:[2,131],106:85,107:[2,131],108:66,123:[2,131],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,71],99:[1,218]},{4:219,7:4,8:6,9:7,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,122],25:[2,122],51:[2,122],54:[1,221],88:[2,122],89:220,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,109],6:[2,109],25:[2,109],26:[2,109],37:[2,109],46:[2,109],51:[2,109],54:[2,109],63:[2,109],64:[2,109],65:[2,109],67:[2,109],69:[2,109],70:[2,109],71:[2,109],75:[2,109],81:[2,109],82:[2,109],83:[2,109],88:[2,109],90:[2,109],99:[2,109],101:[2,109],102:[2,109],103:[2,109],107:[2,109],113:[2,109],114:[2,109],115:[2,109],123:[2,109],125:[2,109],126:[2,109],129:[2,109],130:[2,109],131:[2,109],132:[2,109],133:[2,109],134:[2,109]},{6:[2,49],25:[2,49],50:222,51:[1,223],88:[2,49]},{6:[2,117],25:[2,117],26:[2,117],51:[2,117],83:[2,117],88:[2,117]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:224,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,123],25:[2,123],26:[2,123],51:[2,123],83:[2,123],88:[2,123]},{1:[2,108],6:[2,108],25:[2,108],26:[2,108],37:[2,108],40:[2,108],46:[2,108],51:[2,108],54:[2,108],63:[2,108],64:[2,108],65:[2,108],67:[2,108],69:[2,108],70:[2,108],71:[2,108],75:[2,108],77:[2,108],81:[2,108],82:[2,108],83:[2,108],88:[2,108],90:[2,108],99:[2,108],101:[2,108],102:[2,108],103:[2,108],107:[2,108],115:[2,108],123:[2,108],125:[2,108],126:[2,108],127:[2,108],128:[2,108],129:[2,108],130:[2,108],131:[2,108],132:[2,108],133:[2,108],134:[2,108],135:[2,108]},{5:225,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,134],6:[2,134],25:[2,134],26:[2,134],46:[2,134],51:[2,134],54:[2,134],69:[2,134],75:[2,134],83:[2,134],88:[2,134],90:[2,134],99:[2,134],100:84,101:[1,62],102:[1,226],103:[1,63],106:85,107:[1,65],108:66,115:[2,134],123:[2,134],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,136],6:[2,136],25:[2,136],26:[2,136],46:[2,136],51:[2,136],54:[2,136],69:[2,136],75:[2,136],83:[2,136],88:[2,136],90:[2,136],99:[2,136],100:84,101:[1,62],102:[1,227],103:[1,63],106:85,107:[1,65],108:66,115:[2,136],123:[2,136],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,142],6:[2,142],25:[2,142],26:[2,142],46:[2,142],51:[2,142],54:[2,142],69:[2,142],75:[2,142],83:[2,142],88:[2,142],90:[2,142],99:[2,142],101:[2,142],102:[2,142],103:[2,142],107:[2,142],115:[2,142],123:[2,142],125:[2,142],126:[2,142],129:[2,142],130:[2,142],131:[2,142],132:[2,142],133:[2,142],134:[2,142]},{1:[2,143],6:[2,143],25:[2,143],26:[2,143],46:[2,143],51:[2,143],54:[2,143],69:[2,143],75:[2,143],83:[2,143],88:[2,143],90:[2,143],99:[2,143],100:84,101:[1,62],102:[2,143],103:[1,63],106:85,107:[1,65],108:66,115:[2,143],123:[2,143],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,147],6:[2,147],25:[2,147],26:[2,147],46:[2,147],51:[2,147],54:[2,147],69:[2,147],75:[2,147],83:[2,147],88:[2,147],90:[2,147],99:[2,147],101:[2,147],102:[2,147],103:[2,147],107:[2,147],115:[2,147],123:[2,147],125:[2,147],126:[2,147],129:[2,147],130:[2,147],131:[2,147],132:[2,147],133:[2,147],134:[2,147]},{113:[2,149],114:[2,149]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],110:228,112:155},{51:[1,229],113:[2,154],114:[2,154]},{51:[2,151],113:[2,151],114:[2,151]},{51:[2,152],113:[2,152],114:[2,152]},{51:[2,153],113:[2,153],114:[2,153]},{1:[2,148],6:[2,148],25:[2,148],26:[2,148],46:[2,148],51:[2,148],54:[2,148],69:[2,148],75:[2,148],83:[2,148],88:[2,148],90:[2,148],99:[2,148],101:[2,148],102:[2,148],103:[2,148],107:[2,148],115:[2,148],123:[2,148],125:[2,148],126:[2,148],129:[2,148],130:[2,148],131:[2,148],132:[2,148],133:[2,148],134:[2,148]},{8:230,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:231,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],50:232,51:[1,233],75:[2,49]},{6:[2,86],25:[2,86],26:[2,86],51:[2,86],75:[2,86]},{6:[2,35],25:[2,35],26:[2,35],40:[1,234],51:[2,35],75:[2,35]},{6:[2,38],25:[2,38],26:[2,38],51:[2,38],75:[2,38]},{6:[2,39],25:[2,39],26:[2,39],40:[2,39],51:[2,39],75:[2,39]},{6:[2,40],25:[2,40],26:[2,40],40:[2,40],51:[2,40],75:[2,40]},{6:[2,41],25:[2,41],26:[2,41],40:[2,41],51:[2,41],75:[2,41]},{1:[2,5],6:[2,5],26:[2,5],99:[2,5]},{1:[2,25],6:[2,25],25:[2,25],26:[2,25],46:[2,25],51:[2,25],54:[2,25],69:[2,25],75:[2,25],83:[2,25],88:[2,25],90:[2,25],95:[2,25],96:[2,25],99:[2,25],101:[2,25],102:[2,25],103:[2,25],107:[2,25],115:[2,25],118:[2,25],120:[2,25],123:[2,25],125:[2,25],126:[2,25],129:[2,25],130:[2,25],131:[2,25],132:[2,25],133:[2,25],134:[2,25]},{1:[2,185],6:[2,185],25:[2,185],26:[2,185],46:[2,185],51:[2,185],54:[2,185],69:[2,185],75:[2,185],83:[2,185],88:[2,185],90:[2,185],99:[2,185],100:84,101:[2,185],102:[2,185],103:[2,185],106:85,107:[2,185],108:66,115:[2,185],123:[2,185],125:[2,185],126:[2,185],129:[1,75],130:[1,78],131:[2,185],132:[2,185],133:[2,185],134:[2,185]},{1:[2,186],6:[2,186],25:[2,186],26:[2,186],46:[2,186],51:[2,186],54:[2,186],69:[2,186],75:[2,186],83:[2,186],88:[2,186],90:[2,186],99:[2,186],100:84,101:[2,186],102:[2,186],103:[2,186],106:85,107:[2,186],108:66,115:[2,186],123:[2,186],125:[2,186],126:[2,186],129:[1,75],130:[1,78],131:[2,186],132:[2,186],133:[2,186],134:[2,186]},{1:[2,187],6:[2,187],25:[2,187],26:[2,187],46:[2,187],51:[2,187],54:[2,187],69:[2,187],75:[2,187],83:[2,187],88:[2,187],90:[2,187],99:[2,187],100:84,101:[2,187],102:[2,187],103:[2,187],106:85,107:[2,187],108:66,115:[2,187],123:[2,187],125:[2,187],126:[2,187],129:[1,75],130:[2,187],131:[2,187],132:[2,187],133:[2,187],134:[2,187]},{1:[2,188],6:[2,188],25:[2,188],26:[2,188],46:[2,188],51:[2,188],54:[2,188],69:[2,188],75:[2,188],83:[2,188],88:[2,188],90:[2,188],99:[2,188],100:84,101:[2,188],102:[2,188],103:[2,188],106:85,107:[2,188],108:66,115:[2,188],123:[2,188],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[2,188],132:[2,188],133:[2,188],134:[2,188]},{1:[2,189],6:[2,189],25:[2,189],26:[2,189],46:[2,189],51:[2,189],54:[2,189],69:[2,189],75:[2,189],83:[2,189],88:[2,189],90:[2,189],99:[2,189],100:84,101:[2,189],102:[2,189],103:[2,189],106:85,107:[2,189],108:66,115:[2,189],123:[2,189],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,189],133:[2,189],134:[1,82]},{1:[2,190],6:[2,190],25:[2,190],26:[2,190],46:[2,190],51:[2,190],54:[2,190],69:[2,190],75:[2,190],83:[2,190],88:[2,190],90:[2,190],99:[2,190],100:84,101:[2,190],102:[2,190],103:[2,190],106:85,107:[2,190],108:66,115:[2,190],123:[2,190],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[2,190],134:[1,82]},{1:[2,191],6:[2,191],25:[2,191],26:[2,191],46:[2,191],51:[2,191],54:[2,191],69:[2,191],75:[2,191],83:[2,191],88:[2,191],90:[2,191],99:[2,191],100:84,101:[2,191],102:[2,191],103:[2,191],106:85,107:[2,191],108:66,115:[2,191],123:[2,191],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[2,191],133:[2,191],134:[2,191]},{1:[2,176],6:[2,176],25:[2,176],26:[2,176],46:[2,176],51:[2,176],54:[2,176],69:[2,176],75:[2,176],83:[2,176],88:[2,176],90:[2,176],99:[2,176],100:84,101:[1,62],102:[2,176],103:[1,63],106:85,107:[1,65],108:66,115:[2,176],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,175],6:[2,175],25:[2,175],26:[2,175],46:[2,175],51:[2,175],54:[2,175],69:[2,175],75:[2,175],83:[2,175],88:[2,175],90:[2,175],99:[2,175],100:84,101:[1,62],102:[2,175],103:[1,63],106:85,107:[1,65],108:66,115:[2,175],123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,98],6:[2,98],25:[2,98],26:[2,98],46:[2,98],51:[2,98],54:[2,98],63:[2,98],64:[2,98],65:[2,98],67:[2,98],69:[2,98],70:[2,98],71:[2,98],75:[2,98],81:[2,98],82:[2,98],83:[2,98],88:[2,98],90:[2,98],99:[2,98],101:[2,98],102:[2,98],103:[2,98],107:[2,98],115:[2,98],123:[2,98],125:[2,98],126:[2,98],129:[2,98],130:[2,98],131:[2,98],132:[2,98],133:[2,98],134:[2,98]},{1:[2,74],6:[2,74],25:[2,74],26:[2,74],37:[2,74],46:[2,74],51:[2,74],54:[2,74],63:[2,74],64:[2,74],65:[2,74],67:[2,74],69:[2,74],70:[2,74],71:[2,74],75:[2,74],77:[2,74],81:[2,74],82:[2,74],83:[2,74],88:[2,74],90:[2,74],99:[2,74],101:[2,74],102:[2,74],103:[2,74],107:[2,74],115:[2,74],123:[2,74],125:[2,74],126:[2,74],127:[2,74],128:[2,74],129:[2,74],130:[2,74],131:[2,74],132:[2,74],133:[2,74],134:[2,74],135:[2,74]},{1:[2,75],6:[2,75],25:[2,75],26:[2,75],37:[2,75],46:[2,75],51:[2,75],54:[2,75],63:[2,75],64:[2,75],65:[2,75],67:[2,75],69:[2,75],70:[2,75],71:[2,75],75:[2,75],77:[2,75],81:[2,75],82:[2,75],83:[2,75],88:[2,75],90:[2,75],99:[2,75],101:[2,75],102:[2,75],103:[2,75],107:[2,75],115:[2,75],123:[2,75],125:[2,75],126:[2,75],127:[2,75],128:[2,75],129:[2,75],130:[2,75],131:[2,75],132:[2,75],133:[2,75],134:[2,75],135:[2,75]},{1:[2,76],6:[2,76],25:[2,76],26:[2,76],37:[2,76],46:[2,76],51:[2,76],54:[2,76],63:[2,76],64:[2,76],65:[2,76],67:[2,76],69:[2,76],70:[2,76],71:[2,76],75:[2,76],77:[2,76],81:[2,76],82:[2,76],83:[2,76],88:[2,76],90:[2,76],99:[2,76],101:[2,76],102:[2,76],103:[2,76],107:[2,76],115:[2,76],123:[2,76],125:[2,76],126:[2,76],127:[2,76],128:[2,76],129:[2,76],130:[2,76],131:[2,76],132:[2,76],133:[2,76],134:[2,76],135:[2,76]},{69:[1,235]},{54:[1,189],69:[2,82],89:236,90:[1,188],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{69:[2,83]},{8:237,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{13:[2,111],28:[2,111],30:[2,111],31:[2,111],33:[2,111],34:[2,111],35:[2,111],42:[2,111],43:[2,111],44:[2,111],48:[2,111],49:[2,111],69:[2,111],73:[2,111],76:[2,111],80:[2,111],85:[2,111],86:[2,111],87:[2,111],93:[2,111],97:[2,111],98:[2,111],101:[2,111],103:[2,111],105:[2,111],107:[2,111],116:[2,111],122:[2,111],124:[2,111],125:[2,111],126:[2,111],127:[2,111],128:[2,111]},{13:[2,112],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],69:[2,112],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{1:[2,80],6:[2,80],25:[2,80],26:[2,80],37:[2,80],46:[2,80],51:[2,80],54:[2,80],63:[2,80],64:[2,80],65:[2,80],67:[2,80],69:[2,80],70:[2,80],71:[2,80],75:[2,80],77:[2,80],81:[2,80],82:[2,80],83:[2,80],88:[2,80],90:[2,80],99:[2,80],101:[2,80],102:[2,80],103:[2,80],107:[2,80],115:[2,80],123:[2,80],125:[2,80],126:[2,80],127:[2,80],128:[2,80],129:[2,80],130:[2,80],131:[2,80],132:[2,80],133:[2,80],134:[2,80],135:[2,80]},{1:[2,81],6:[2,81],25:[2,81],26:[2,81],37:[2,81],46:[2,81],51:[2,81],54:[2,81],63:[2,81],64:[2,81],65:[2,81],67:[2,81],69:[2,81],70:[2,81],71:[2,81],75:[2,81],77:[2,81],81:[2,81],82:[2,81],83:[2,81],88:[2,81],90:[2,81],99:[2,81],101:[2,81],102:[2,81],103:[2,81],107:[2,81],115:[2,81],123:[2,81],125:[2,81],126:[2,81],127:[2,81],128:[2,81],129:[2,81],130:[2,81],131:[2,81],132:[2,81],133:[2,81],134:[2,81],135:[2,81]},{1:[2,99],6:[2,99],25:[2,99],26:[2,99],46:[2,99],51:[2,99],54:[2,99],63:[2,99],64:[2,99],65:[2,99],67:[2,99],69:[2,99],70:[2,99],71:[2,99],75:[2,99],81:[2,99],82:[2,99],83:[2,99],88:[2,99],90:[2,99],99:[2,99],101:[2,99],102:[2,99],103:[2,99],107:[2,99],115:[2,99],123:[2,99],125:[2,99],126:[2,99],129:[2,99],130:[2,99],131:[2,99],132:[2,99],133:[2,99],134:[2,99]},{1:[2,33],6:[2,33],25:[2,33],26:[2,33],46:[2,33],51:[2,33],54:[2,33],69:[2,33],75:[2,33],83:[2,33],88:[2,33],90:[2,33],99:[2,33],100:84,101:[2,33],102:[2,33],103:[2,33],106:85,107:[2,33],108:66,115:[2,33],123:[2,33],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:238,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,104],6:[2,104],25:[2,104],26:[2,104],46:[2,104],51:[2,104],54:[2,104],63:[2,104],64:[2,104],65:[2,104],67:[2,104],69:[2,104],70:[2,104],71:[2,104],75:[2,104],81:[2,104],82:[2,104],83:[2,104],88:[2,104],90:[2,104],99:[2,104],101:[2,104],102:[2,104],103:[2,104],107:[2,104],115:[2,104],123:[2,104],125:[2,104],126:[2,104],129:[2,104],130:[2,104],131:[2,104],132:[2,104],133:[2,104],134:[2,104]},{6:[2,49],25:[2,49],50:239,51:[1,223],83:[2,49]},{6:[2,122],25:[2,122],26:[2,122],51:[2,122],54:[1,240],83:[2,122],88:[2,122],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{47:241,48:[1,57],49:[1,58]},{27:107,28:[1,70],41:108,52:242,53:106,55:109,56:110,73:[1,67],86:[1,111],87:[1,112]},{46:[2,55],51:[2,55]},{8:243,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,192],6:[2,192],25:[2,192],26:[2,192],46:[2,192],51:[2,192],54:[2,192],69:[2,192],75:[2,192],83:[2,192],88:[2,192],90:[2,192],99:[2,192],100:84,101:[2,192],102:[2,192],103:[2,192],106:85,107:[2,192],108:66,115:[2,192],123:[2,192],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:244,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,194],6:[2,194],25:[2,194],26:[2,194],46:[2,194],51:[2,194],54:[2,194],69:[2,194],75:[2,194],83:[2,194],88:[2,194],90:[2,194],99:[2,194],100:84,101:[2,194],102:[2,194],103:[2,194],106:85,107:[2,194],108:66,115:[2,194],123:[2,194],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,174],6:[2,174],25:[2,174],26:[2,174],46:[2,174],51:[2,174],54:[2,174],69:[2,174],75:[2,174],83:[2,174],88:[2,174],90:[2,174],99:[2,174],101:[2,174],102:[2,174],103:[2,174],107:[2,174],115:[2,174],123:[2,174],125:[2,174],126:[2,174],129:[2,174],130:[2,174],131:[2,174],132:[2,174],133:[2,174],134:[2,174]},{8:245,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,127],6:[2,127],25:[2,127],26:[2,127],46:[2,127],51:[2,127],54:[2,127],69:[2,127],75:[2,127],83:[2,127],88:[2,127],90:[2,127],95:[1,246],99:[2,127],101:[2,127],102:[2,127],103:[2,127],107:[2,127],115:[2,127],123:[2,127],125:[2,127],126:[2,127],129:[2,127],130:[2,127],131:[2,127],132:[2,127],133:[2,127],134:[2,127]},{5:247,25:[1,5]},{27:248,28:[1,70]},{117:249,119:212,120:[1,213]},{26:[1,250],118:[1,251],119:252,120:[1,213]},{26:[2,167],118:[2,167],120:[2,167]},{8:254,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],92:253,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,92],5:255,6:[2,92],25:[1,5],26:[2,92],46:[2,92],51:[2,92],54:[2,92],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,92],70:[1,97],71:[1,98],75:[2,92],78:89,81:[1,91],82:[2,102],83:[2,92],88:[2,92],90:[2,92],99:[2,92],101:[2,92],102:[2,92],103:[2,92],107:[2,92],115:[2,92],123:[2,92],125:[2,92],126:[2,92],129:[2,92],130:[2,92],131:[2,92],132:[2,92],133:[2,92],134:[2,92]},{1:[2,66],6:[2,66],25:[2,66],26:[2,66],46:[2,66],51:[2,66],54:[2,66],63:[2,66],64:[2,66],65:[2,66],67:[2,66],69:[2,66],70:[2,66],71:[2,66],75:[2,66],81:[2,66],82:[2,66],83:[2,66],88:[2,66],90:[2,66],99:[2,66],101:[2,66],102:[2,66],103:[2,66],107:[2,66],115:[2,66],123:[2,66],125:[2,66],126:[2,66],129:[2,66],130:[2,66],131:[2,66],132:[2,66],133:[2,66],134:[2,66]},{1:[2,95],6:[2,95],25:[2,95],26:[2,95],46:[2,95],51:[2,95],54:[2,95],69:[2,95],75:[2,95],83:[2,95],88:[2,95],90:[2,95],99:[2,95],101:[2,95],102:[2,95],103:[2,95],107:[2,95],115:[2,95],123:[2,95],125:[2,95],126:[2,95],129:[2,95],130:[2,95],131:[2,95],132:[2,95],133:[2,95],134:[2,95]},{14:256,15:120,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:121,41:60,55:47,56:48,58:215,60:25,61:26,62:27,73:[1,67],80:[1,28],85:[1,55],86:[1,56],87:[1,54],98:[1,53]},{1:[2,132],6:[2,132],25:[2,132],26:[2,132],46:[2,132],51:[2,132],54:[2,132],63:[2,132],64:[2,132],65:[2,132],67:[2,132],69:[2,132],70:[2,132],71:[2,132],75:[2,132],81:[2,132],82:[2,132],83:[2,132],88:[2,132],90:[2,132],99:[2,132],101:[2,132],102:[2,132],103:[2,132],107:[2,132],115:[2,132],123:[2,132],125:[2,132],126:[2,132],129:[2,132],130:[2,132],131:[2,132],132:[2,132],133:[2,132],134:[2,132]},{6:[1,71],26:[1,257]},{8:258,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,61],13:[2,112],25:[2,61],28:[2,112],30:[2,112],31:[2,112],33:[2,112],34:[2,112],35:[2,112],42:[2,112],43:[2,112],44:[2,112],48:[2,112],49:[2,112],51:[2,61],73:[2,112],76:[2,112],80:[2,112],85:[2,112],86:[2,112],87:[2,112],88:[2,61],93:[2,112],97:[2,112],98:[2,112],101:[2,112],103:[2,112],105:[2,112],107:[2,112],116:[2,112],122:[2,112],124:[2,112],125:[2,112],126:[2,112],127:[2,112],128:[2,112]},{6:[1,260],25:[1,261],88:[1,259]},{6:[2,50],8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[2,50],26:[2,50],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],83:[2,50],85:[1,55],86:[1,56],87:[1,54],88:[2,50],91:262,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,49],25:[2,49],26:[2,49],50:263,51:[1,223]},{1:[2,171],6:[2,171],25:[2,171],26:[2,171],46:[2,171],51:[2,171],54:[2,171],69:[2,171],75:[2,171],83:[2,171],88:[2,171],90:[2,171],99:[2,171],101:[2,171],102:[2,171],103:[2,171],107:[2,171],115:[2,171],118:[2,171],123:[2,171],125:[2,171],126:[2,171],129:[2,171],130:[2,171],131:[2,171],132:[2,171],133:[2,171],134:[2,171]},{8:264,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:265,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{113:[2,150],114:[2,150]},{27:156,28:[1,70],55:157,56:158,73:[1,67],87:[1,112],112:266},{1:[2,156],6:[2,156],25:[2,156],26:[2,156],46:[2,156],51:[2,156],54:[2,156],69:[2,156],75:[2,156],83:[2,156],88:[2,156],90:[2,156],99:[2,156],100:84,101:[2,156],102:[1,267],103:[2,156],106:85,107:[2,156],108:66,115:[1,268],123:[2,156],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,157],6:[2,157],25:[2,157],26:[2,157],46:[2,157],51:[2,157],54:[2,157],69:[2,157],75:[2,157],83:[2,157],88:[2,157],90:[2,157],99:[2,157],100:84,101:[2,157],102:[1,269],103:[2,157],106:85,107:[2,157],108:66,115:[2,157],123:[2,157],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,271],25:[1,272],75:[1,270]},{6:[2,50],12:165,25:[2,50],26:[2,50],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:273,39:164,41:168,43:[1,46],75:[2,50],86:[1,111]},{8:274,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,275],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,79],6:[2,79],25:[2,79],26:[2,79],37:[2,79],46:[2,79],51:[2,79],54:[2,79],63:[2,79],64:[2,79],65:[2,79],67:[2,79],69:[2,79],70:[2,79],71:[2,79],75:[2,79],77:[2,79],81:[2,79],82:[2,79],83:[2,79],88:[2,79],90:[2,79],99:[2,79],101:[2,79],102:[2,79],103:[2,79],107:[2,79],115:[2,79],123:[2,79],125:[2,79],126:[2,79],127:[2,79],128:[2,79],129:[2,79],130:[2,79],131:[2,79],132:[2,79],133:[2,79],134:[2,79],135:[2,79]},{8:276,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,69:[2,115],73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,116],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,277],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],83:[1,278]},{6:[2,61],25:[2,61],26:[2,61],51:[2,61],83:[2,61],88:[2,61]},{5:279,25:[1,5]},{46:[2,53],51:[2,53]},{46:[2,56],51:[2,56],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,280],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:281,25:[1,5],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{5:282,25:[1,5]},{1:[2,128],6:[2,128],25:[2,128],26:[2,128],46:[2,128],51:[2,128],54:[2,128],69:[2,128],75:[2,128],83:[2,128],88:[2,128],90:[2,128],99:[2,128],101:[2,128],102:[2,128],103:[2,128],107:[2,128],115:[2,128],123:[2,128],125:[2,128],126:[2,128],129:[2,128],130:[2,128],131:[2,128],132:[2,128],133:[2,128],134:[2,128]},{5:283,25:[1,5]},{26:[1,284],118:[1,285],119:252,120:[1,213]},{1:[2,165],6:[2,165],25:[2,165],26:[2,165],46:[2,165],51:[2,165],54:[2,165],69:[2,165],75:[2,165],83:[2,165],88:[2,165],90:[2,165],99:[2,165],101:[2,165],102:[2,165],103:[2,165],107:[2,165],115:[2,165],123:[2,165],125:[2,165],126:[2,165],129:[2,165],130:[2,165],131:[2,165],132:[2,165],133:[2,165],134:[2,165]},{5:286,25:[1,5]},{26:[2,168],118:[2,168],120:[2,168]},{5:287,25:[1,5],51:[1,288]},{25:[2,124],51:[2,124],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,93],6:[2,93],25:[2,93],26:[2,93],46:[2,93],51:[2,93],54:[2,93],69:[2,93],75:[2,93],83:[2,93],88:[2,93],90:[2,93],99:[2,93],101:[2,93],102:[2,93],103:[2,93],107:[2,93],115:[2,93],123:[2,93],125:[2,93],126:[2,93],129:[2,93],130:[2,93],131:[2,93],132:[2,93],133:[2,93],134:[2,93]},{1:[2,96],5:289,6:[2,96],25:[1,5],26:[2,96],46:[2,96],51:[2,96],54:[2,96],59:90,63:[1,92],64:[1,93],65:[1,94],66:95,67:[1,96],69:[2,96],70:[1,97],71:[1,98],75:[2,96],78:89,81:[1,91],82:[2,102],83:[2,96],88:[2,96],90:[2,96],99:[2,96],101:[2,96],102:[2,96],103:[2,96],107:[2,96],115:[2,96],123:[2,96],125:[2,96],126:[2,96],129:[2,96],130:[2,96],131:[2,96],132:[2,96],133:[2,96],134:[2,96]},{99:[1,290]},{88:[1,291],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,110],6:[2,110],25:[2,110],26:[2,110],37:[2,110],46:[2,110],51:[2,110],54:[2,110],63:[2,110],64:[2,110],65:[2,110],67:[2,110],69:[2,110],70:[2,110],71:[2,110],75:[2,110],81:[2,110],82:[2,110],83:[2,110],88:[2,110],90:[2,110],99:[2,110],101:[2,110],102:[2,110],103:[2,110],107:[2,110],113:[2,110],114:[2,110],115:[2,110],123:[2,110],125:[2,110],126:[2,110],129:[2,110],130:[2,110],131:[2,110],132:[2,110],133:[2,110],134:[2,110]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],91:292,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:197,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,25:[1,144],27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,57:145,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],84:293,85:[1,55],86:[1,56],87:[1,54],91:143,93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[2,118],25:[2,118],26:[2,118],51:[2,118],83:[2,118],88:[2,118]},{6:[1,260],25:[1,261],26:[1,294]},{1:[2,135],6:[2,135],25:[2,135],26:[2,135],46:[2,135],51:[2,135],54:[2,135],69:[2,135],75:[2,135],83:[2,135],88:[2,135],90:[2,135],99:[2,135],100:84,101:[1,62],102:[2,135],103:[1,63],106:85,107:[1,65],108:66,115:[2,135],123:[2,135],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,137],6:[2,137],25:[2,137],26:[2,137],46:[2,137],51:[2,137],54:[2,137],69:[2,137],75:[2,137],83:[2,137],88:[2,137],90:[2,137],99:[2,137],100:84,101:[1,62],102:[2,137],103:[1,63],106:85,107:[1,65],108:66,115:[2,137],123:[2,137],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{113:[2,155],114:[2,155]},{8:295,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:296,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:297,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,84],6:[2,84],25:[2,84],26:[2,84],37:[2,84],46:[2,84],51:[2,84],54:[2,84],63:[2,84],64:[2,84],65:[2,84],67:[2,84],69:[2,84],70:[2,84],71:[2,84],75:[2,84],81:[2,84],82:[2,84],83:[2,84],88:[2,84],90:[2,84],99:[2,84],101:[2,84],102:[2,84],103:[2,84],107:[2,84],113:[2,84],114:[2,84],115:[2,84],123:[2,84],125:[2,84],126:[2,84],129:[2,84],130:[2,84],131:[2,84],132:[2,84],133:[2,84],134:[2,84]},{12:165,27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:298,39:164,41:168,43:[1,46],86:[1,111]},{6:[2,85],12:165,25:[2,85],26:[2,85],27:166,28:[1,70],29:167,30:[1,68],31:[1,69],38:163,39:164,41:168,43:[1,46],51:[2,85],74:299,86:[1,111]},{6:[2,87],25:[2,87],26:[2,87],51:[2,87],75:[2,87]},{6:[2,36],25:[2,36],26:[2,36],51:[2,36],75:[2,36],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{8:300,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{69:[2,114],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,34],6:[2,34],25:[2,34],26:[2,34],46:[2,34],51:[2,34],54:[2,34],69:[2,34],75:[2,34],83:[2,34],88:[2,34],90:[2,34],99:[2,34],101:[2,34],102:[2,34],103:[2,34],107:[2,34],115:[2,34],123:[2,34],125:[2,34],126:[2,34],129:[2,34],130:[2,34],131:[2,34],132:[2,34],133:[2,34],134:[2,34]},{1:[2,105],6:[2,105],25:[2,105],26:[2,105],46:[2,105],51:[2,105],54:[2,105],63:[2,105],64:[2,105],65:[2,105],67:[2,105],69:[2,105],70:[2,105],71:[2,105],75:[2,105],81:[2,105],82:[2,105],83:[2,105],88:[2,105],90:[2,105],99:[2,105],101:[2,105],102:[2,105],103:[2,105],107:[2,105],115:[2,105],123:[2,105],125:[2,105],126:[2,105],129:[2,105],130:[2,105],131:[2,105],132:[2,105],133:[2,105],134:[2,105]},{1:[2,45],6:[2,45],25:[2,45],26:[2,45],46:[2,45],51:[2,45],54:[2,45],69:[2,45],75:[2,45],83:[2,45],88:[2,45],90:[2,45],99:[2,45],101:[2,45],102:[2,45],103:[2,45],107:[2,45],115:[2,45],123:[2,45],125:[2,45],126:[2,45],129:[2,45],130:[2,45],131:[2,45],132:[2,45],133:[2,45],134:[2,45]},{1:[2,193],6:[2,193],25:[2,193],26:[2,193],46:[2,193],51:[2,193],54:[2,193],69:[2,193],75:[2,193],83:[2,193],88:[2,193],90:[2,193],99:[2,193],101:[2,193],102:[2,193],103:[2,193],107:[2,193],115:[2,193],123:[2,193],125:[2,193],126:[2,193],129:[2,193],130:[2,193],131:[2,193],132:[2,193],133:[2,193],134:[2,193]},{1:[2,172],6:[2,172],25:[2,172],26:[2,172],46:[2,172],51:[2,172],54:[2,172],69:[2,172],75:[2,172],83:[2,172],88:[2,172],90:[2,172],99:[2,172],101:[2,172],102:[2,172],103:[2,172],107:[2,172],115:[2,172],118:[2,172],123:[2,172],125:[2,172],126:[2,172],129:[2,172],130:[2,172],131:[2,172],132:[2,172],133:[2,172],134:[2,172]},{1:[2,129],6:[2,129],25:[2,129],26:[2,129],46:[2,129],51:[2,129],54:[2,129],69:[2,129],75:[2,129],83:[2,129],88:[2,129],90:[2,129],99:[2,129],101:[2,129],102:[2,129],103:[2,129],107:[2,129],115:[2,129],123:[2,129],125:[2,129],126:[2,129],129:[2,129],130:[2,129],131:[2,129],132:[2,129],133:[2,129],134:[2,129]},{1:[2,130],6:[2,130],25:[2,130],26:[2,130],46:[2,130],51:[2,130],54:[2,130],69:[2,130],75:[2,130],83:[2,130],88:[2,130],90:[2,130],95:[2,130],99:[2,130],101:[2,130],102:[2,130],103:[2,130],107:[2,130],115:[2,130],123:[2,130],125:[2,130],126:[2,130],129:[2,130],130:[2,130],131:[2,130],132:[2,130],133:[2,130],134:[2,130]},{1:[2,163],6:[2,163],25:[2,163],26:[2,163],46:[2,163],51:[2,163],54:[2,163],69:[2,163],75:[2,163],83:[2,163],88:[2,163],90:[2,163],99:[2,163],101:[2,163],102:[2,163],103:[2,163],107:[2,163],115:[2,163],123:[2,163],125:[2,163],126:[2,163],129:[2,163],130:[2,163],131:[2,163],132:[2,163],133:[2,163],134:[2,163]},{5:301,25:[1,5]},{26:[1,302]},{6:[1,303],26:[2,169],118:[2,169],120:[2,169]},{8:304,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{1:[2,97],6:[2,97],25:[2,97],26:[2,97],46:[2,97],51:[2,97],54:[2,97],69:[2,97],75:[2,97],83:[2,97],88:[2,97],90:[2,97],99:[2,97],101:[2,97],102:[2,97],103:[2,97],107:[2,97],115:[2,97],123:[2,97],125:[2,97],126:[2,97],129:[2,97],130:[2,97],131:[2,97],132:[2,97],133:[2,97],134:[2,97]},{1:[2,133],6:[2,133],25:[2,133],26:[2,133],46:[2,133],51:[2,133],54:[2,133],63:[2,133],64:[2,133],65:[2,133],67:[2,133],69:[2,133],70:[2,133],71:[2,133],75:[2,133],81:[2,133],82:[2,133],83:[2,133],88:[2,133],90:[2,133],99:[2,133],101:[2,133],102:[2,133],103:[2,133],107:[2,133],115:[2,133],123:[2,133],125:[2,133],126:[2,133],129:[2,133],130:[2,133],131:[2,133],132:[2,133],133:[2,133],134:[2,133]},{1:[2,113],6:[2,113],25:[2,113],26:[2,113],46:[2,113],51:[2,113],54:[2,113],63:[2,113],64:[2,113],65:[2,113],67:[2,113],69:[2,113],70:[2,113],71:[2,113],75:[2,113],81:[2,113],82:[2,113],83:[2,113],88:[2,113],90:[2,113],99:[2,113],101:[2,113],102:[2,113],103:[2,113],107:[2,113],115:[2,113],123:[2,113],125:[2,113],126:[2,113],129:[2,113],130:[2,113],131:[2,113],132:[2,113],133:[2,113],134:[2,113]},{6:[2,119],25:[2,119],26:[2,119],51:[2,119],83:[2,119],88:[2,119]},{6:[2,49],25:[2,49],26:[2,49],50:305,51:[1,223]},{6:[2,120],25:[2,120],26:[2,120],51:[2,120],83:[2,120],88:[2,120]},{1:[2,158],6:[2,158],25:[2,158],26:[2,158],46:[2,158],51:[2,158],54:[2,158],69:[2,158],75:[2,158],83:[2,158],88:[2,158],90:[2,158],99:[2,158],100:84,101:[2,158],102:[2,158],103:[2,158],106:85,107:[2,158],108:66,115:[1,306],123:[2,158],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,160],6:[2,160],25:[2,160],26:[2,160],46:[2,160],51:[2,160],54:[2,160],69:[2,160],75:[2,160],83:[2,160],88:[2,160],90:[2,160],99:[2,160],100:84,101:[2,160],102:[1,307],103:[2,160],106:85,107:[2,160],108:66,115:[2,160],123:[2,160],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,159],6:[2,159],25:[2,159],26:[2,159],46:[2,159],51:[2,159],54:[2,159],69:[2,159],75:[2,159],83:[2,159],88:[2,159],90:[2,159],99:[2,159],100:84,101:[2,159],102:[2,159],103:[2,159],106:85,107:[2,159],108:66,115:[2,159],123:[2,159],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,88],25:[2,88],26:[2,88],51:[2,88],75:[2,88]},{6:[2,49],25:[2,49],26:[2,49],50:308,51:[1,233]},{26:[1,309],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{26:[1,310]},{1:[2,166],6:[2,166],25:[2,166],26:[2,166],46:[2,166],51:[2,166],54:[2,166],69:[2,166],75:[2,166],83:[2,166],88:[2,166],90:[2,166],99:[2,166],101:[2,166],102:[2,166],103:[2,166],107:[2,166],115:[2,166],123:[2,166],125:[2,166],126:[2,166],129:[2,166],130:[2,166],131:[2,166],132:[2,166],133:[2,166],134:[2,166]},{26:[2,170],118:[2,170],120:[2,170]},{25:[2,125],51:[2,125],100:84,101:[1,62],103:[1,63],106:85,107:[1,65],108:66,123:[1,83],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[1,260],25:[1,261],26:[1,311]},{8:312,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{8:313,9:115,10:19,11:20,12:21,13:[1,22],14:8,15:9,16:10,17:11,18:12,19:13,20:14,21:15,22:16,23:17,24:18,27:59,28:[1,70],29:49,30:[1,68],31:[1,69],32:24,33:[1,50],34:[1,51],35:[1,52],36:23,41:60,42:[1,44],43:[1,46],44:[1,29],47:30,48:[1,57],49:[1,58],55:47,56:48,58:36,60:25,61:26,62:27,73:[1,67],76:[1,43],80:[1,28],85:[1,55],86:[1,56],87:[1,54],93:[1,38],97:[1,45],98:[1,53],100:39,101:[1,62],103:[1,63],104:40,105:[1,64],106:41,107:[1,65],108:66,116:[1,42],121:37,122:[1,61],124:[1,31],125:[1,32],126:[1,33],127:[1,34],128:[1,35]},{6:[1,271],25:[1,272],26:[1,314]},{6:[2,37],25:[2,37],26:[2,37],51:[2,37],75:[2,37]},{1:[2,164],6:[2,164],25:[2,164],26:[2,164],46:[2,164],51:[2,164],54:[2,164],69:[2,164],75:[2,164],83:[2,164],88:[2,164],90:[2,164],99:[2,164],101:[2,164],102:[2,164],103:[2,164],107:[2,164],115:[2,164],123:[2,164],125:[2,164],126:[2,164],129:[2,164],130:[2,164],131:[2,164],132:[2,164],133:[2,164],134:[2,164]},{6:[2,121],25:[2,121],26:[2,121],51:[2,121],83:[2,121],88:[2,121]},{1:[2,161],6:[2,161],25:[2,161],26:[2,161],46:[2,161],51:[2,161],54:[2,161],69:[2,161],75:[2,161],83:[2,161],88:[2,161],90:[2,161],99:[2,161],100:84,101:[2,161],102:[2,161],103:[2,161],106:85,107:[2,161],108:66,115:[2,161],123:[2,161],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{1:[2,162],6:[2,162],25:[2,162],26:[2,162],46:[2,162],51:[2,162],54:[2,162],69:[2,162],75:[2,162],83:[2,162],88:[2,162],90:[2,162],99:[2,162],100:84,101:[2,162],102:[2,162],103:[2,162],106:85,107:[2,162],108:66,115:[2,162],123:[2,162],125:[1,77],126:[1,76],129:[1,75],130:[1,78],131:[1,79],132:[1,80],133:[1,81],134:[1,82]},{6:[2,89],25:[2,89],26:[2,89],51:[2,89],75:[2,89]}],defaultActions:{57:[2,47],58:[2,48],72:[2,3],91:[2,103],186:[2,83]},parseError:function(a,b){throw new Error(a)},parse:function h(a){function o(){var a;a=b.lexer.lex()||1,typeof a!="number"&&(a=b.symbols_[a]||a);return a}function n(a){c.length=c.length-2*a,d.length=d.length-a,e.length=e.length-a}var b=this,c=[0],d=[null],e=[],f=this.table,g="",h=0,i=0,j=0,k=2,l=1;this.lexer.setInput(a),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,typeof this.lexer.yylloc=="undefined"&&(this.lexer.yylloc={});var m=this.lexer.yylloc;e.push(m),typeof this.yy.parseError=="function"&&(this.parseError=this.yy.parseError);var p,q,r,s,t,u,v={},w,x,y,z;for(;;){r=c[c.length-1],this.defaultActions[r]?s=this.defaultActions[r]:(p==null&&(p=o()),s=f[r]&&f[r][p]);if(typeof s=="undefined"||!s.length||!s[0]){if(!j){z=[];for(w in f[r])this.terminals_[w]&&w>2&&z.push("'"+this.terminals_[w]+"'");var A="";this.lexer.showPosition?A="Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+z.join(", "):A="Parse error on line "+(h+1)+": Unexpected "+(p==1?"end of input":"'"+(this.terminals_[p]||p)+"'"),this.parseError(A,{text:this.lexer.match,token:this.terminals_[p]||p,line:this.lexer.yylineno,loc:m,expected:z})}if(j==3){if(p==l)throw new Error(A||"Parsing halted.");i=this.lexer.yyleng,g=this.lexer.yytext,h=this.lexer.yylineno,m=this.lexer.yylloc,p=o()}for(;;){if(k.toString()in f[r])break;if(r==0)throw new Error(A||"Parsing halted.");n(1),r=c[c.length-1]}q=p,p=k,r=c[c.length-1],s=f[r]&&f[r][k],j=3}if(s[0]instanceof Array&&s.length>1)throw new Error("Parse Error: multiple actions possible at state: "+r+", token: "+p);switch(s[0]){case 1:c.push(p),d.push(this.lexer.yytext),e.push(this.lexer.yylloc),c.push(s[1]),p=null,q?(p=q,q=null):(i=this.lexer.yyleng,g=this.lexer.yytext,h=this.lexer.yylineno,m=this.lexer.yylloc,j>0&&j--);break;case 2:x=this.productions_[s[1]][1],v.$=d[d.length-x],v._$={first_line:e[e.length-(x||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(x||1)].first_column,last_column:e[e.length-1].last_column},u=this.performAction.call(v,g,i,h,this.yy,s[1],d,e);if(typeof u!="undefined")return u;x&&(c=c.slice(0,-1*x*2),d=d.slice(0,-1*x),e=e.slice(0,-1*x)),c.push(this.productions_[s[1]][0]),d.push(v.$),e.push(v._$),y=f[c[c.length-2]][c[c.length-1]],c.push(y);break;case 3:return!0}}return!0}};c.exports=d}),define("ace/mode/coffee/nodes",["require","exports","module","ace/mode/coffee/scope","ace/mode/coffee/helpers"],function(a,b,c){var d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z,A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z,$,_,ba,bb,bc,bd,be,bf,bg,bh,bi,bj=Object.prototype.hasOwnProperty,bk=function(a,b){function d(){this.constructor=a}for(var c in b)bj.call(b,c)&&(a[c]=b[c]);d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype;return a},bl=function(a,b){return function(){return a.apply(b,arguments)}},bm=Array.prototype.indexOf||function(a){for(var b=0,c=this.length;b1&&a.level>=x?"("+b+")":b},a.prototype.compileRoot=function(a){var b;a.indent=this.tab=a.bare?"":R,a.scope=new N(null,this,null),a.level=A,b=this.compileWithDeclarations(a);return a.bare?b:"(function() {\n"+b+"\n}).call(this);\n"},a.prototype.compileWithDeclarations=function(a){var b,c,d,e,f,g,h,i,j,k;c=g="",k=this.expressions;for(f=0,j=k.length;f=v?"(void 0)":"void 0":this.value.reserved?'"'+this.value+'"':this.value;return this.isStatement()?""+this.tab+b+";":b},a.prototype.toString=function(){return' "'+this.value+'"'};return a}(),b.Return=L=function(){function a(a){a&&!a.unwrap().isUndefined&&(this.expression=a)}bk(a,g),a.prototype.children=["expression"],a.prototype.isStatement=Y,a.prototype.makeReturn=S,a.prototype.jumps=S,a.prototype.compile=function(b,c){var d,e;d=(e=this.expression)!=null?e.makeReturn():void 0;return!d||d instanceof a?a.__super__.compile.call(this,b,c):d.compile(b,c)},a.prototype.compileNode=function(a){return this.tab+("return"+(this.expression?" "+this.expression.compile(a,z):"")+";")};return a}(),b.Value=W=function(){function a(b,c,d){if(!c&&b instanceof a)return b;this.base=b,this.properties=c||[],d&&(this[d]=!0);return this}bk(a,g),a.prototype.children=["base","properties"],a.prototype.push=function(a){this.properties.push(a);return this},a.prototype.hasProperties=function(){return!!this.properties.length},a.prototype.isArray=function(){return!this.properties.length&&this.base instanceof e},a.prototype.isComplex=function(){return this.hasProperties()||this.base.isComplex()},a.prototype.isAssignable=function(){return this.hasProperties()||this.base.isAssignable()},a.prototype.isSimpleNumber=function(){return this.base instanceof B&&M.test(this.base.value)},a.prototype.isAtomic=function(){var a,b,c,d;d=this.properties.concat(this.base);for(b=0,c=d.length;b"+this.equals],h=l[0],e=l[1],c=this.stepNum?c=+this.stepNum>0?""+h+" "+this.toVar:""+e+" "+this.toVar:g?(m=[+this.fromNum,+this.toNum],d=m[0],j=m[1],m,c=d<=j?""+h+" "+j:""+e+" "+j):(b=""+this.fromVar+" <= "+this.toVar,c=""+b+" ? "+h+" "+this.toVar+" : "+e+" "+this.toVar),i=this.stepVar?""+f+" += "+this.stepVar:g?d<=j?""+f+"++":""+f+"--":""+b+" ? "+f+"++ : "+f+"--";return""+k+"; "+c+"; "+i},a.prototype.compileArray=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n;if(this.fromNum&&this.toNum&&Math.abs(this.fromNum-this.toNum)<=20){h=function(){n=[];for(var a=l=+this.fromNum,b=+this.toNum;l<=b?a<=b:a>=b;l<=b?a++:a--)n.push(a);return n}.apply(this,arguments),this.exclusive&&h.pop();return"["+h.join(", ")+"]"}e=this.tab+R,d=a.scope.freeVariable("i"),i=a.scope.freeVariable("results"),g="\n"+e+i+" = [];",this.fromNum&&this.toNum?(a.index=d,b=this.compileNode(a)):(j=""+d+" = "+this.from+(this.to!==this.toVar?", "+this.to:""),c=""+this.fromVar+" <= "+this.toVar,b="var "+j+"; "+c+" ? "+d+" <"+this.equals+" "+this.toVar+" : "+d+" >"+this.equals+" "+this.toVar+"; "+c+" ? "+d+"++ : "+d+"--"),f="{ "+i+".push("+d+"); }\n"+e+"return "+i+";\n"+a.indent;return"(function() {"+g+"\n"+e+"for ("+b+")"+f+"}).apply(this, arguments)"};return a}(),b.Slice=O=function(){function a(b){this.range=b,a.__super__.constructor.call(this)}bk(a,g),a.prototype.children=["range"],a.prototype.compileNode=function(a){var b,c,d,e,f,g;g=this.range,e=g.to,c=g.from,d=c&&c.compile(a,z)||"0",b=e&&e.compile(a,z),e&&(!!this.range.exclusive||+b!==-1)&&(f=", "+(this.range.exclusive?b:M.test(b)?(+b+1).toString():"("+b+" + 1) || 9e9"));return".slice("+d+(f||"")+")"};return a}(),b.Obj=F=function(){function a(a,b){this.generated=b!=null?b:!1,this.objects=this.properties=a||[]}bk(a,g),a.prototype.children=["properties"],a.prototype.compileNode=function(a){var b,c,d,e,g,h,i,j,k,l,n;k=this.properties;if(!k.length)return this.front?"({})":"{}";if(this.generated)for(l=0,n=k.length;l=0?"[\n"+a.indent+b+"\n"+this.tab+"]":"["+b+"]"},a.prototype.assigns=function(a){var b,c,d,e;e=this.objects;for(c=0,d=e.length;c=y?"("+f+")":f}i=this.variable.isObject();if(!r||m!==1||(k=l[0])instanceof P){v=t.compile(b,x),e=[],p=!1;if(!q.test(v)||this.variable.assigns(v))e.push(""+(n=b.scope.freeVariable("ref"))+" = "+v),v=n;for(g=0,w=l.length;g=0&&(b.isExistentialEquals=!0);return(new G(this.context.slice(0,-1),c,new a(d,this.value,"="))).compile(b)},a.prototype.compileSplice=function(a){var b,c,d,e,f,g,h,i,j,k,l,m;k=this.variable.properties.pop().range,d=k.from,h=k.to,c=k.exclusive,g=this.variable.compile(a),l=(d!=null?d.cache(a,y):void 0)||["0","0"],e=l[0],f=l[1],h?(d!=null?d.isSimpleNumber():void 0)&&h.isSimpleNumber()?(h=+h.compile(a)- +f,c||(h+=1)):(h=h.compile(a)+" - "+f,c||(h+=" + 1")):h="9e9",m=this.value.cache(a,x),i=m[0],j=m[1],b="[].splice.apply("+g+", ["+e+", "+h+"].concat("+i+")), "+j;return a.level>A?"("+b+")":b};return a}(),b.Code=l=function(){function a(a,b,c){this.params=a||[],this.body=b||new h,this.bound=c==="boundfunc",this.bound&&(this.context="this")}bk(a,g),a.prototype.children=["params","body"],a.prototype.isStatement=function(){return!!this.ctor},a.prototype.jumps=E,a.prototype.compileNode=function(a){var b,c,d,g,h,i,j,k,l,m,n,o,p,q,r,t,u,w,x,y,z,A,C,D;a.scope=new N(a.scope,this.body,this),a.scope.shared=$(a,"sharedScope"),a.indent+=R,delete a.bare,o=[],c=[],z=this.params;for(q=0,u=z.length;q=v?"("+b+")":b},a.prototype.traverseChildren=function(b,c){if(b)return a.__super__.traverseChildren.call(this,b,c)};return a}(),b.Param=H=function(){function a(a,b,c){this.name=a,this.value=b,this.splat=c}bk(a,g),a.prototype.children=["name","value"],a.prototype.compile=function(a){return this.name.compile(a,x)},a.prototype.asReference=function(a){var b;if(this.reference)return this.reference;b=this.name,b["this"]?(b=b.properties[0].name,b.value.reserved&&(b=new B("_"+b.value))):b.isComplex()&&(b=new B(a.scope.freeVariable("arg"))),b=new W(b),this.splat&&(b=new P(b));return this.reference=b},a.prototype.isComplex=function(){return this.name.isComplex()};return a}(),b.Splat=P=function(){function a(a){this.name=a.compile?a:new B(a)}bk(a,g),a.prototype.children=["name"],a.prototype.isAssignable=Y,a.prototype.assigns=function(a){return this.name.assigns(a)},a.prototype.compile=function(a){return this.index!=null?this.compileParam(a):this.name.compile(a)},a.compileSplattedArray=function(b,c,d){var e,f,g,h,i,j,k;i=-1;while((j=c[++i])&&!(j instanceof a))continue;if(i>=c.length)return"";if(c.length===1){g=c[0].compile(b,x);return d?g:""+bh("slice")+".call("+g+")"}e=c.slice(i);for(h=0,k=e.length;hA||this.returns)d=a.scope.freeVariable("results"),e=""+this.tab+d+" = [];\n",b&&(b=J.wrap(d,b));this.guard&&(b=h.wrap([new s(this.guard,b)])),b="\n"+b.compile(a,A)+"\n"+this.tab}c=e+this.tab+("while ("+this.condition.compile(a,z)+") {"+b+"}"),this.returns&&(c+="\n"+this.tab+"return "+d+";");return c};return a}(),b.Op=G=function(){function c(b,c,d,e){var f;if(b==="in")return new t(c,d);if(b==="do"){f=new i(c,c.params||[]),f["do"]=!0;return f}if(b==="new"){if(c instanceof i&&!c["do"])return c.newInstance();if(c instanceof l&&c.bound||c["do"])c=new I(c)}this.operator=a[b]||b,this.first=c,this.second=d,this.flip=!!e;return this}var a,b;bk(c,g),a={"==":"===","!=":"!==",of:"in"},b={"!==":"===","===":"!=="},c.prototype.children=["first","second"],c.prototype.isSimpleNumber=E,c.prototype.isUnary=function(){return!this.second},c.prototype.isComplex=function(){var a;return!this.isUnary()||(a=this.operator)!=="+"&&a!=="-"||this.first.isComplex()},c.prototype.isChainable=function(){var a;return(a=this.operator)==="<"||a===">"||a===">="||a==="<="||a==="==="||a==="!=="},c.prototype.invert=function(){var a,d,e,f,g;if(this.isChainable()&&this.first.isChainable()){a=!0,d=this;while(d&&d.operator)a&&(a=d.operator in b),d=d.first;if(!a)return(new I(this)).invert();d=this;while(d&&d.operator)d.invert=!d.invert,d.operator=b[d.operator],d=d.first;return this}if(f=b[this.operator]){this.operator=f,this.first.unwrap()instanceof c&&this.first.invert();return this}return this.second?(new I(this)).invert():this.operator==="!"&&(e=this.first.unwrap())instanceof c&&((g=e.operator)==="!"||g==="in"||g==="instanceof")?e:new c("!",this)},c.prototype.unfoldSoak=function(a){var b;return((b=this.operator)==="++"||b==="--"||b==="delete")&&bg(a,this,"first")},c.prototype.compileNode=function(a){var b;if(this.isUnary())return this.compileUnary(a);if(this.isChainable()&&this.first.isChainable())return this.compileChain(a);if(this.operator==="?")return this.compileExistence(a);this.first.front=this.front,b=this.first.compile(a,y)+" "+this.operator+" "+this.second.compile(a,y);return a.level<=y?b:"("+b+")"},c.prototype.compileChain=function(a){var b,c,d,e;e=this.first.second.cache(a),this.first.second=e[0],d=e[1],c=this.first.compile(a,y),b=""+c+" "+(this.invert?"&&":"||")+" "+d.compile(a)+" "+this.operator+" "+this.second.compile(a,y);return"("+b+")"},c.prototype.compileExistence=function(a){var b,c;this.first.isComplex()?(c=new B(a.scope.freeVariable("ref")),b=new I(new f(c,this.first))):(b=this.first,c=b);return(new s(new n(b),c,{type:"if"})).addElse(this.second).compile(a)},c.prototype.compileUnary=function(a){var b,d;d=[b=this.operator],(b==="new"||b==="typeof"||b==="delete"||(b==="+"||b==="-")&&this.first instanceof c&&this.first.operator===b)&&d.push(" "),b==="new"&&this.first.isStatement(a)&&(this.first=new I(this.first)),d.push(this.first.compile(a,y)),this.flip&&d.reverse();return d.join("")},c.prototype.toString=function(a){return c.__super__.toString.call(this,a,this.constructor.name+" "+this.operator)};return c}(),b.In=t=function(){function a(a,b){this.object=a,this.array=b}bk(a,g),a.prototype.children=["object","array"],a.prototype.invert=D,a.prototype.compileNode=function(a){var b,c,d,e,f;if(this.array instanceof W&&this.array.isArray()){f=this.array.base.objects;for(d=0,e=f.length;d= 0");if(d===c)return b;b=d+", "+b;return a.level=w?"("+d+")":d},a.prototype.unfoldSoak=function(){return this.soak&&this};return a}(),J={wrap:function(a,b){return b.isEmpty()||bc(b.expressions).jumps()?b:b.push(new i(new W(new B(a),[new d(new B("push"))]),[b.pop()]))}},k={wrap:function(a,b,c){var e,f,g,j,k;if(a.jumps())return a;g=new l([],h.wrap([a])),e=[];if((j=a.contains(this.literalArgs))||a.contains(this.literalThis))k=new B(j?"apply":"call"),e=[new B("this")],j&&e.push(new B("arguments")),g=new W(g,[new d(k)]);g.noReturn=c,f=new i(g,e);return b?h.wrap([f]):f},literalArgs:function(a){return a instanceof B&&a.value==="arguments"&&!a.asKey},literalThis:function(a){return a instanceof B&&a.value==="this"&&!a.asKey||a instanceof l&&a.bound}},bg=function(a,b,c){var d;if(!!(d=b[c].unfoldSoak(a))){b[c]=d.body,d.body=new W(b);return d}},V={"extends":"function(child, parent) {\n for (var key in parent) { if (__hasProp.call(parent, key)) child[key] = parent[key]; }\n function ctor() { this.constructor = child; }\n ctor.prototype = parent.prototype;\n child.prototype = new ctor;\n child.__super__ = parent.prototype;\n return child;\n}",bind:"function(fn, me){ return function(){ return fn.apply(me, arguments); }; }",indexOf:"Array.prototype.indexOf || function(item) {\n for (var i = 0, l = this.length; i < l; i++) {\n if (this[i] === item) return i;\n }\n return -1;\n}",hasProp:"Object.prototype.hasOwnProperty",slice:"Array.prototype.slice"},A=1,z=2,x=3,w=4,y=5,v=6,R=" ",q=/^[$A-Za-z_\x7f-\uffff][$\w\x7f-\uffff]*$/,M=/^[+-]?\d+$/,C=/^(?:([$A-Za-z_][$\w\x7f-\uffff]*)\.prototype\.)?([$A-Za-z_][$\w\x7f-\uffff]*)$/,r=/^['"]/,bh=function(a){var b;b="__"+a,N.root.assign(b,V[a]);return b},be=function(a,b){return a.replace(/\n/g,"$&"+b)}}),define("ace/mode/coffee/scope",["require","exports","module","ace/mode/coffee/helpers"],function(a,b,c){var d,e,f,g;g=a("ace/mode/coffee/helpers"),e=g.extend,f=g.last,b.Scope=d=function(){function a(b,c,d){this.parent=b,this.expressions=c,this.method=d,this.variables=[{name:"arguments",type:"arguments"}],this.positions={},this.parent||(a.root=this)}a.root=null,a.prototype.add=function(a,b,c){var d;return this.shared&&!c?this.parent.add(a,b,c):typeof (d=this.positions[a])=="number"?this.variables[d].type=b:this.positions[a]=this.variables.push({name:a,type:b})-1},a.prototype.find=function(a,b){if(this.check(a,b))return!0;this.add(a,"var");return!1},a.prototype.parameter=function(a){if(!this.shared||!this.parent.check(a,!0))return this.add(a,"param")},a.prototype.check=function(a,b){var c,d;c=!!this.type(a);return c||b?c:(d=this.parent)!=null?!!d.check(a):!!void 0},a.prototype.temporary=function(a,b){return a.length>1?"_"+a+(b>1?b:""):"_"+(b+parseInt(a,36)).toString(36).replace(/\d/g,"a")},a.prototype.type=function(a){var b,c,d,e;e=this.variables;for(c=0,d=e.length;c=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=2)var d=arguments[1];else do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0);for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||0;if(c>=b)return-1;c<0&&(c+=b);for(;c=0;c--){if(!h(this,c))continue;if(a===this[c])return c}return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype});if(!Object.getOwnPropertyDescriptor){var n="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(n+a);if(!h(a,b))return undefined;var c,d,e;c={enumerable:!0,configurable:!0};if(m){var f=a.__proto__;a.__proto__=g;var d=k(a,b),e=l(a,b);a.__proto__=f;if(d||e){d&&(descriptor.get=d),e&&(descriptor.set=e);return descriptor}}descriptor.value=a[b];return descriptor}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}typeof b!="undefined"&&Object.defineProperties(c,b);return c});if(!Object.defineProperty){var o="Property description must be an object: ",p="Object.defineProperty called on non-object: ",q="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function")throw new TypeError(p+a);if(typeof a!="object"||a===null)throw new TypeError(o+c);if(h(c,"value"))if(m&&(k(a,b)||l(a,b))){var d=a.__proto__;a.__proto__=g,delete a[b],a[b]=c.value,a.prototype}else a[b]=c.value;else{if(!m)throw new TypeError(q);h(c,"get")&&i(a,b,c.get),h(c,"set")&&j(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)h(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(r){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){return!0});if(!Object.keys){var s=!0,t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=t.length;for(var v in{toString:null})s=!1;Object.keys=function W(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var W=[];for(var b in a)h(a,b)&&W.push(b);if(s)for(var c=0,d=u;c=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;k.constructor=b;return k}return a.apply(this,arguments)},c=new RegExp("^(?:((?:[+-]\\d\\d)?\\d\\d\\d\\d)(?:-(\\d\\d)(?:-(\\d\\d))?)?)?(?:T(\\d\\d):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?)?(?:Z|([+-])(\\d\\d):(\\d\\d))?$");for(var d in a)b[d]=a[d];b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function e(b){var d=c.exec(b);if(d){d.shift();var e=d[0]===undefined;for(var f=0;f<10;f++){if(f===7)continue;d[f]=+(d[f]||(f<3?1:0)),f===1&&d[f]--}if(e)return((d[3]*60+d[4])*60+d[5])*1e3+d[6];var g=(d[8]*60+d[9])*60*1e3;d[6]==="-"&&(g=-g);return a.UTC.apply(this,d.slice(0,7))+g}return a.parse.apply(this,arguments)};return b}(Date));if(!String.prototype.trim){var w=/^\s\s*/,x=/\s\s*$/;String.prototype.trim=function(){return String(this).replace(w,"").replace(x,"")}}}),define("pilot/event_emitter",["require","exports","module"],function(a,b,c){var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!!c&&!!c.length){var b=b||{};b.type=a;for(var d=0;d=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||""));return a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};this._dispatchEvent("change",{data:e});return d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:d});return c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};this._dispatchEvent("change",{data:e});return d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};this._dispatchEvent("change",{data:i});return d.start}},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};this._dispatchEvent("change",{data:e});return d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}}).call(h.prototype),b.Document=h}),define("ace/range",["require","exports","module"],function(a,b,c){var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;b=this.compare(c.row,c.column);if(b==1){b=this.compare(d.row,d.column);return b==1?2:b==0?1:0}if(b==-1)return-2;b=this.compare(d.row,d.column);return b==-1?-1:b==1?42:0},this.containsRange=function(a){var b=this.compareRange(a);return b==-1||b==0||b==1},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)||this.isStart(a,b)?!1:!0;return!1},this.insideStart=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)?!1:!0;return!1},this.insideEnd=function(a,b){if(this.compare(a,b)==0)return this.isStart(a,b)?!1:!0;return!1},this.compare=function(a,b){if(!this.isMultiLine()&&a===this.start.row)return bthis.end.column?1:0;return athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.rowthis.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0);return c}}).call(f.prototype)}),define("pilot/lang",["require","exports","module"],function(a,b,c){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return Array(b+1).join(a)};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){var b=[];for(i=0,l=a.length;i=0&&this._ltIndex-1&&!b[h.type].hide&&(h.channel=b[h.type].channel,this._token=h,this._lt.push(h),this._ltIndexCache.push(this._lt.length-this._ltIndex+e),this._lt.length>5&&this._lt.shift(),this._ltIndexCache.length>5&&this._ltIndexCache.shift(),this._ltIndex=this._lt.length),i=b[h.type];return i&&(i.hide||i.channel!==undefined&&a!==i.channel)?this.get(a):h.type},LA:function(a){var b=a,c;if(a>0){if(a>5)throw new Error("Too much lookahead.");while(b)c=this.get(),b--;while(bthis._tokenData.length?"UNKNOWN_TOKEN":this._tokenData[a].name},tokenType:function(a){return this._tokenData[a]||-1},unget:function(){if(this._ltIndexCache.length)this._ltIndex-=this._ltIndexCache.pop(),this._token=this._lt[this._ltIndex-1];else throw new Error("Too much lookahead.")}},parserlib.util={StringReader:b,SyntaxError:c,SyntaxUnit:d,EventTarget:a,TokenStreamBase:e}})(),function(){function TokenStream(a){TokenStreamBase.call(this,a,Tokens)}function mix(a,b){for(var c in b)b.hasOwnProperty(c)&&(a[c]=b[c]);return a}function isIdentStart(a){return a!=null&&(isNameStart(a)||/\-\\/.test(a))}function isNameChar(a){return a!=null&&(isNameStart(a)||/[0-9\-\\]/.test(a))}function isNameStart(a){return a!=null&&/[a-z_\u0080-\uFFFF\\]/i.test(a)}function isNewLine(a){return a!=null&&nl.test(a)}function isWhitespace(a){return a!=null&&/\s/.test(a)}function isDigit(a){return a!=null&&/\d/.test(a)}function isHexDigit(a){return a!=null&&h.test(a)}function SelectorSubPart(a,b,c,d){SyntaxUnit.call(this,a,c,d),this.type=b,this.args=[]}function SelectorPart(a,b,c,d,e){SyntaxUnit.call(this,c,d,e),this.elementName=a,this.modifiers=b}function Selector(a,b,c){SyntaxUnit.call(this,a.join(" "),b,c),this.parts=a}function PropertyValuePart(text,line,col){SyntaxUnit.apply(this,arguments),this.type="unknown";var temp;if(/^([+\-]?[\d\.]+)([a-z]+)$/i.test(text)){this.type="dimension",this.value=+RegExp.$1,this.units=RegExp.$2;switch(this.units.toLowerCase()){case"em":case"rem":case"ex":case"px":case"cm":case"mm":case"in":case"pt":case"pc":this.type="length";break;case"deg":case"rad":case"grad":this.type="angle";break;case"ms":case"s":this.type="time";break;case"hz":case"khz":this.type="frequency";break;case"dpi":case"dpcm":this.type="resolution"}}else/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)%$/i.test(text)?(this.type="percentage",this.value=+RegExp.$1):/^([+\-]?\d+)$/i.test(text)?(this.type="integer",this.value=+RegExp.$1):/^([+\-]?[\d\.]+)$/i.test(text)?(this.type="number",this.value=+RegExp.$1):/^#([a-f0-9]{3,6})/i.test(text)?(this.type="color",temp=RegExp.$1,temp.length==3?(this.red=parseInt(temp.charAt(0)+temp.charAt(0),16),this.green=parseInt(temp.charAt(1)+temp.charAt(1),16),this.blue=parseInt(temp.charAt(2)+temp.charAt(2),16)):(this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16))):/^rgb\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1,this.green=+RegExp.$2,this.blue=+RegExp.$3):/^rgb\(\s*(\d+)%\s*,\s*(\d+)%\s*,\s*(\d+)%\s*\)/i.test(text)?(this.type="color",this.red=+RegExp.$1*255/100,this.green=+RegExp.$2*255/100,this.blue=+RegExp.$3*255/100):/^url\(["']?([^\)"']+)["']?\)/i.test(text)?(this.type="uri",this.uri=RegExp.$1):/^["'][^"']*["']/.test(text)?(this.type="string",this.value=eval(text)):Colors[text.toLowerCase()]?(this.type="color",temp=Colors[text.toLowerCase()].substring(1),this.red=parseInt(temp.substring(0,2),16),this.green=parseInt(temp.substring(2,4),16),this.blue=parseInt(temp.substring(4,6),16)):/^[\,\/]$/.test(text)?(this.type="operator",this.value=text):/^[a-z\-\u0080-\uFFFF][a-z0-9\-\u0080-\uFFFF]*$/i.test(text)&&(this.type="identifier",this.value=text)}function PropertyValue(a,b,c){SyntaxUnit.call(this,a.join(" "),b,c),this.parts=a}function PropertyName(a,b,c,d){SyntaxUnit.call(this,(b||"")+a,c,d),this.hack=b}function Parser(a){EventTarget.call(this),this.options=a||{},this._tokenStream=null}function MediaQuery(a,b,c,d,e){SyntaxUnit.call(this,(a?a+" ":"")+(b?b+" ":"")+c.join(" and "),d,e),this.modifier=a,this.mediaType=b,this.features=c}function MediaFeature(a,b){SyntaxUnit.call(this,"("+a+(b!==null?":"+b:"")+")",a.startLine,a.startCol),this.name=a,this.value=b}function Combinator(a,b,c){SyntaxUnit.call(this,a,b,c),this.type="unknown",/^\s+$/.test(a)?this.type="descendant":a==">"?this.type="child":a=="+"?this.type="adjacent-sibling":a=="~"&&(this.type="sibling")}var EventTarget=parserlib.util.EventTarget,TokenStreamBase=parserlib.util.TokenStreamBase,StringReader=parserlib.util.StringReader,SyntaxError=parserlib.util.SyntaxError,SyntaxUnit=parserlib.util.SyntaxUnit,Colors={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};Combinator.prototype=new SyntaxUnit,Combinator.prototype.constructor=Combinator;var Level1Properties={background:1,"background-attachment":1,"background-color":1,"background-image":1,"background-position":1,"background-repeat":1,border:1,"border-bottom":1,"border-bottom-width":1,"border-color":1,"border-left":1,"border-left-width":1,"border-right":1,"border-right-width":1,"border-style":1,"border-top":1,"border-top-width":1,"border-width":1,clear:1,color:1,display:1,"float":1,font:1,"font-family":1,"font-size":1,"font-style":1,"font-variant":1,"font-weight":1,height:1,"letter-spacing":1,"line-height":1,"list-style":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,margin:1,"margin-bottom":1,"margin-left":1,"margin-right":1,"margin-top":1,padding:1,"padding-bottom":1,"padding-left":1,"padding-right":1,"padding-top":1,"text-align":1,"text-decoration":1,"text-indent":1,"text-transform":1,"vertical-align":1,"white-space":1,width:1,"word-spacing":1},Level2Properties={azimuth:1,"cue-after":1,"cue-before":1,cue:1,elevation:1,"pause-after":1,"pause-before":1,pause:1,"pitch-range":1,pitch:1,"play-during":1,richness:1,"speak-header":1,"speak-numeral":1,"speak-punctuation":1,speak:1,"speech-rate":1,stress:1,"voice-family":1,volume:1,orphans:1,"page-break-after":1,"page-break-before":1,"page-break-inside":1,widows:1,cursor:1,"outline-color":1,"outline-style":1,"outline-width":1,outline:1,"background-attachment":1,"background-color":1,"background-image":1,"background-position":1,"background-repeat":1,background:1,"border-collapse":1,"border-color":1,"border-spacing":1,"border-style":1,"border-top":1,"border-top-color":1,"border-top-style":1,"border-top-width":1,"border-width":1,border:1,bottom:1,"caption-side":1,clear:1,clip:1,color:1,content:1,"counter-increment":1,"counter-reset":1,direction:1,display:1,"empty-cells":1,"float":1,"font-family":1,"font-size":1,"font-style":1,"font-variant":1,"font-weight":1,font:1,height:1,left:1,"letter-spacing":1,"line-height":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,"list-style":1,"margin-right":1,"margin-top":1,margin:1,"max-height":1,"max-width":1,"min-height":1,"min-width":1,overflow:1,"padding-top":1,padding:1,position:1,quotes:1,right:1,"table-layout":1,"text-align":1,"text-decoration":1,"text-indent":1,"text-transform":1,top:1,"unicode-bidi":1,"vertical-align":1,visibility:1,"white-space":1,width:1,"word-spacing":1,"z-index":1};MediaFeature.prototype=new SyntaxUnit,MediaFeature.prototype.constructor=MediaFeature,MediaQuery.prototype=new SyntaxUnit,MediaQuery.prototype.constructor=MediaQuery,Parser.prototype=function(){var a=new EventTarget,b,c={constructor:Parser,_stylesheet:function(){var a=this._tokenStream,b=null,c,d;this.fire("startstylesheet"),this._charset(),this._skipCruft();while(a.peek()==Tokens.IMPORT_SYM)this._import(),this._skipCruft();while(a.peek()==Tokens.NAMESPACE_SYM)this._namespace(),this._skipCruft();d=a.peek();while(d>Tokens.EOF){try{switch(d){case Tokens.MEDIA_SYM:this._media(),this._skipCruft();break;case Tokens.PAGE_SYM:this._page(),this._skipCruft();break;case Tokens.FONT_FACE_SYM:this._font_face(),this._skipCruft();break;case Tokens.KEYFRAMES_SYM:this._keyframes(),this._skipCruft();break;case Tokens.S:this._readWhitespace();break;default:if(!this._ruleset())switch(d){case Tokens.CHARSET_SYM:c=a.LT(1),this._charset(!1);throw new SyntaxError("@charset not allowed here.",c.startLine,c.startCol);case Tokens.IMPORT_SYM:c=a.LT(1),this._import(!1);throw new SyntaxError("@import not allowed here.",c.startLine,c.startCol);case Tokens.NAMESPACE_SYM:c=a.LT(1),this._namespace(!1);throw new SyntaxError("@namespace not allowed here.",c.startLine,c.startCol);default:a.get(),this._unexpectedToken(a.token())}}}catch(e){if(e instanceof SyntaxError&&!this.options.strict)this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col});else throw e}d=a.peek()}d!=Tokens.EOF&&this._unexpectedToken(a.token()),this.fire("endstylesheet")},_charset:function(a){var b=this._tokenStream,c,d,e,f;b.match(Tokens.CHARSET_SYM)&&(e=b.token().startLine,f=b.token().startCol,this._readWhitespace(),b.mustMatch(Tokens.STRING),d=b.token(),c=d.value,this._readWhitespace(),b.mustMatch(Tokens.SEMICOLON),a!==!1&&this.fire({type:"charset",charset:c,line:e,col:f}))},_import:function(a){var b=this._tokenStream,c,d,e,f=[];b.mustMatch(Tokens.IMPORT_SYM),e=b.token(),this._readWhitespace(),b.mustMatch([Tokens.STRING,Tokens.URI]),d=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),f=this._media_query_list(),b.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),a!==!1&&this.fire({type:"import",uri:d,media:f,line:e.startLine,col:e.startCol})},_namespace:function(a){var b=this._tokenStream,c,d,e,f;b.mustMatch(Tokens.NAMESPACE_SYM),c=b.token().startLine,d=b.token().startCol,this._readWhitespace(),b.match(Tokens.IDENT)&&(e=b.token().value,this._readWhitespace()),b.mustMatch([Tokens.STRING,Tokens.URI]),f=b.token().value.replace(/(?:url\()?["']([^"']+)["']\)?/,"$1"),this._readWhitespace(),b.mustMatch(Tokens.SEMICOLON),this._readWhitespace(),a!==!1&&this.fire({type:"namespace",prefix:e,uri:f,line:c,col:d})},_media:function(){var a=this._tokenStream,b,c,d;a.mustMatch(Tokens.MEDIA_SYM),b=a.token().startLine,c=a.token().startCol,this._readWhitespace(),d=this._media_query_list(),a.mustMatch(Tokens.LBRACE),this._readWhitespace(),this.fire({type:"startmedia",media:d,line:b,col:c});for(;;)if(a.peek()==Tokens.PAGE_SYM)this._page();else if(!this._ruleset())break;a.mustMatch(Tokens.RBRACE),this._readWhitespace(),this.fire({type:"endmedia",media:d,line:b,col:c})},_media_query_list:function(){var a=this._tokenStream,b=[];this._readWhitespace(),(a.peek()==Tokens.IDENT||a.peek()==Tokens.LPAREN)&&b.push(this._media_query());while(a.match(Tokens.COMMA))this._readWhitespace(),b.push(this._media_query());return b},_media_query:function(){var a=this._tokenStream,b=null,c=null,d=null,e=[];a.match(Tokens.IDENT)&&(c=a.token().value.toLowerCase(),c!="only"&&c!="not"?(a.unget(),c=null):d=a.token()),this._readWhitespace(),a.peek()==Tokens.IDENT?(b=this._media_type(),d===null&&(d=a.token())):a.peek()==Tokens.LPAREN&&(d===null&&(d=a.LT(1)),e.push(this._media_expression()));if(b===null&&e.length===0)return null;this._readWhitespace();while(a.match(Tokens.IDENT))a.token().value.toLowerCase()!="and"&&this._unexpectedToken(a.token()),this._readWhitespace(),e.push(this._media_expression());return new MediaQuery(c,b,e,d.startLine,d.startCol)},_media_type:function(){return this._media_feature()},_media_expression:function(){var a=this._tokenStream,b=null,c,d=null;a.mustMatch(Tokens.LPAREN),b=this._media_feature(),this._readWhitespace(),a.match(Tokens.COLON)&&(this._readWhitespace(),c=a.LT(1),d=this._expression()),a.mustMatch(Tokens.RPAREN),this._readWhitespace();return new MediaFeature(b,d?new SyntaxUnit(d,c.startLine,c.startCol):null)},_media_feature:function(){var a=this._tokenStream;a.mustMatch(Tokens.IDENT);return SyntaxUnit.fromToken(a.token())},_page:function(){var a=this._tokenStream,b,c,d=null,e=null;a.mustMatch(Tokens.PAGE_SYM),b=a.token().startLine,c=a.token().startCol,this._readWhitespace(),a.match(Tokens.IDENT)&&(d=a.token().value,d.toLowerCase()==="auto"&&this._unexpectedToken(a.token())),a.peek()==Tokens.COLON&&(e=this._pseudo_page()),this._readWhitespace(),this.fire({type:"startpage",id:d,pseudo:e,line:b,col:c}),this._readDeclarations(!0,!0),this.fire({type:"endpage",id:d,pseudo:e,line:b,col:c})},_margin:function(){var a=this._tokenStream,b,c,d=this._margin_sym();if(d){b=a.token().startLine,c=a.token().startCol,this.fire({type:"startpagemargin",margin:d,line:b,col:c}),this._readDeclarations(!0),this.fire({type:"endpagemargin",margin:d,line:b,col:c});return!0}return!1},_margin_sym:function(){var a=this._tokenStream;return a.match([Tokens.TOPLEFTCORNER_SYM,Tokens.TOPLEFT_SYM,Tokens.TOPCENTER_SYM,Tokens.TOPRIGHT_SYM,Tokens.TOPRIGHTCORNER_SYM,Tokens.BOTTOMLEFTCORNER_SYM,Tokens.BOTTOMLEFT_SYM,Tokens.BOTTOMCENTER_SYM,Tokens.BOTTOMRIGHT_SYM,Tokens.BOTTOMRIGHTCORNER_SYM,Tokens.LEFTTOP_SYM,Tokens.LEFTMIDDLE_SYM,Tokens.LEFTBOTTOM_SYM,Tokens.RIGHTTOP_SYM,Tokens.RIGHTMIDDLE_SYM,Tokens.RIGHTBOTTOM_SYM])?SyntaxUnit.fromToken(a.token()):null},_pseudo_page:function(){var a=this._tokenStream;a.mustMatch(Tokens.COLON),a.mustMatch(Tokens.IDENT);return a.token().value},_font_face:function(){var a=this._tokenStream,b,c;a.mustMatch(Tokens.FONT_FACE_SYM),b=a.token().startLine,c=a.token().startCol,this._readWhitespace(),this.fire({type:"startfontface",line:b,col:c}),this._readDeclarations(!0),this.fire({type:"endfontface",line:b,col:c})},_operator:function(){var a=this._tokenStream,b=null;a.match([Tokens.SLASH,Tokens.COMMA])&&(b=a.token(),this._readWhitespace());return b?PropertyValuePart.fromToken(b):null},_combinator:function(){var a=this._tokenStream,b=null,c;a.match([Tokens.PLUS,Tokens.GREATER,Tokens.TILDE])&&(c=a.token(),b=new Combinator(c.value,c.startLine,c.startCol),this._readWhitespace());return b},_unary_operator:function(){var a=this._tokenStream;return a.match([Tokens.MINUS,Tokens.PLUS])?a.token().value:null},_property:function(){var a=this._tokenStream,b=null,c=null,d,e,f,g;a.peek()==Tokens.STAR&&this.options.starHack&&(a.get(),e=a.token(),c=e.value,f=e.startLine,g=e.startCol),a.match(Tokens.IDENT)&&(e=a.token(),d=e.value,d.charAt(0)=="_"&&this.options.underscoreHack&&(c="_",d=d.substring(1)),b=new PropertyName(d,c,f||e.startLine,g||e.startCol),this._readWhitespace());return b},_ruleset:function(){var a=this._tokenStream,b,c;try{c=this._selectors_group()}catch(d){if(!(d instanceof SyntaxError&&!this.options.strict))throw d;this.fire({type:"error",error:d,message:d.message,line:d.line,col:d.col}),b=a.advance([Tokens.RBRACE]);if(b!=Tokens.RBRACE)throw d;return!0}c&&(this.fire({type:"startrule",selectors:c,line:c[0].line,col:c[0].col}),this._readDeclarations(!0),this.fire({type:"endrule",selectors:c,line:c[0].line,col:c[0].col}));return c},_selectors_group:function(){var a=this._tokenStream,b=[],c;c=this._selector();if(c!==null){b.push(c);while(a.match(Tokens.COMMA))this._readWhitespace(),c=this._selector(),c!==null?b.push(c):this._unexpectedToken(a.LT(1))}return b.length?b:null},_selector:function(){var a=this._tokenStream,b=[],c=null,d=null,e=null;c=this._simple_selector_sequence();if(c===null)return null;b.push(c);do{d=this._combinator();if(d!==null)b.push(d),c=this._simple_selector_sequence(),c===null?this._unexpectedToken(this.LT(1)):b.push(c);else if(this._readWhitespace())e=new Combinator(a.token().value,a.token().startLine,a.token().startCol),d=this._combinator(),c=this._simple_selector_sequence(),c===null?d!==null&&this._unexpectedToken(a.LT(1)):(d!==null?b.push(d):b.push(e),b.push(c));else break}while(!0);return new Selector(b,b[0].line,b[0].col)},_simple_selector_sequence:function(){var a=this._tokenStream,b=null,c=[],d="",e=[function(){return a.match(Tokens.HASH)?new SelectorSubPart(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,this._attrib,this._pseudo,this._negation],f=0,g=e.length,h=null,i=!1,j,k;j=a.LT(1).startLine,k=a.LT(1).startCol,b=this._type_selector(),b||(b=this._universal()),b!==null&&(d+=b);for(;;){if(a.peek()===Tokens.S)break;while(f1&&a.unget());return null}b&&(c.text=b+c.text,c.col-=b.length);return c},_class:function(){var a=this._tokenStream,b;if(a.match(Tokens.DOT)){a.mustMatch(Tokens.IDENT),b=a.token();return new SelectorSubPart("."+b.value,"class",b.startLine,b.startCol-1)}return null},_element_name:function(){var a=this._tokenStream,b;if(a.match(Tokens.IDENT)){b=a.token();return new SelectorSubPart(b.value,"elementName",b.startLine,b.startCol)}return null},_namespace_prefix:function(){var a=this._tokenStream,b="";if(a.LA(1)===Tokens.PIPE||a.LA(2)===Tokens.PIPE)a.match([Tokens.IDENT,Tokens.STAR])&&(b+=a.token().value),a.mustMatch(Tokens.PIPE),b+="|";return b.length?b:null},_universal:function(){var a=this._tokenStream,b="",c;c=this._namespace_prefix(),c&&(b+=c),a.match(Tokens.STAR)&&(b+="*");return b.length?b:null},_attrib:function(){var a=this._tokenStream,b=null,c,d;if(a.match(Tokens.LBRACKET)){d=a.token(),b=d.value,b+=this._readWhitespace(),c=this._namespace_prefix(),c&&(b+=c),a.mustMatch(Tokens.IDENT),b+=a.token().value,b+=this._readWhitespace(),a.match([Tokens.PREFIXMATCH,Tokens.SUFFIXMATCH,Tokens.SUBSTRINGMATCH,Tokens.EQUALS,Tokens.INCLUDES,Tokens.DASHMATCH])&&(b+=a.token().value,b+=this._readWhitespace(),a.mustMatch([Tokens.IDENT,Tokens.STRING]),b+=a.token().value,b+=this._readWhitespace()),a.mustMatch(Tokens.RBRACKET);return new SelectorSubPart(b+"]","attribute",d.startLine,d.startCol)}return null},_pseudo:function(){var a=this._tokenStream,b=null,c=":",d,e;a.match(Tokens.COLON)&&(a.match(Tokens.COLON)&&(c+=":"),a.match(Tokens.IDENT)?(b=a.token().value,d=a.token().startLine,e=a.token().startCol-c.length):a.peek()==Tokens.FUNCTION&&(d=a.LT(1).startLine,e=a.LT(1).startCol-c.length,b=this._functional_pseudo()),b&&(b=new SelectorSubPart(c+b,"pseudo",d,e)));return b},_functional_pseudo:function(){var a=this._tokenStream,b=null;a.match(Tokens.FUNCTION)&&(b=a.token().value,b+=this._readWhitespace(),b+=this._expression(),a.mustMatch(Tokens.RPAREN),b+=")");return b},_expression:function(){var a=this._tokenStream,b="";while(a.match([Tokens.PLUS,Tokens.MINUS,Tokens.DIMENSION,Tokens.NUMBER,Tokens.STRING,Tokens.IDENT,Tokens.LENGTH,Tokens.FREQ,Tokens.ANGLE,Tokens.TIME,Tokens.RESOLUTION]))b+=a.token().value,b+=this._readWhitespace();return b.length?b:null},_negation:function(){var a=this._tokenStream,b,c,d="",e,f=null;a.match(Tokens.NOT)&&(d=a.token().value,b=a.token().startLine,c=a.token().startCol,d+=this._readWhitespace(),e=this._negation_arg(),d+=e,d+=this._readWhitespace(),a.match(Tokens.RPAREN),d+=a.token().value,f=new SelectorSubPart(d,"not",b,c),f.args.push(e));return f},_negation_arg:function(){var a=this._tokenStream,b=[this._type_selector,this._universal,function(){return a.match(Tokens.HASH)?new SelectorSubPart(a.token().value,"id",a.token().startLine,a.token().startCol):null},this._class,this._attrib,this._pseudo],c=null,d=0,e=b.length,f,g,h,i;g=a.LT(1).startLine,h=a.LT(1).startCol;while(d0?new PropertyValue(b,b[0].startLine,b[0].startCol):null},_term:function(){var a=this._tokenStream,b=null,c=null,d,e;b=this._unary_operator(),b!==null&&(d=a.token().startLine,e=a.token().startCol),a.peek()==Tokens.IE_FUNCTION&&this.options.ieFilters?(c=this._ie_function(),b===null&&(d=a.token().startLine,e=a.token().startCol)):a.match([Tokens.NUMBER,Tokens.PERCENTAGE,Tokens.LENGTH,Tokens.ANGLE,Tokens.TIME,Tokens.FREQ,Tokens.STRING,Tokens.IDENT,Tokens.URI,Tokens.UNICODE_RANGE])?(c=a.token().value,b===null&&(d=a.token().startLine,e=a.token().startCol),this._readWhitespace()):(c=this._hexcolor(),c===null?(b===null&&(d=a.LT(1).startLine,e=a.LT(1).startCol),c===null&&(a.LA(3)==Tokens.EQUALS&&this.options.ieFilters?c=this._ie_function():c=this._function())):b===null&&(d=a.token().startLine,e=a.token().startCol));return c!==null?new PropertyValuePart(b!==null?b+c:c,d,e):null},_function:function(){var a=this._tokenStream,b=null,c=null;a.match(Tokens.FUNCTION)&&(b=a.token().value,this._readWhitespace(),c=this._expr(),a.match(Tokens.RPAREN),b+=c+")",this._readWhitespace());return b},_ie_function:function(){var a=this._tokenStream,b=null,c=null,d;if(a.match([Tokens.IE_FUNCTION,Tokens.FUNCTION])){b=a.token().value;do{this._readWhitespace()&&(b+=a.token().value),a.LA(0)==Tokens.COMMA&&(b+=a.token().value),a.match(Tokens.IDENT),b+=a.token().value,a.match(Tokens.EQUALS),b+=a.token().value,d=a.peek();while(d!=Tokens.COMMA&&d!=Tokens.S&&d!=Tokens.RPAREN)a.get(),b+=a.token().value,d=a.peek()}while(a.match([Tokens.COMMA,Tokens.S]));a.match(Tokens.RPAREN),b+=")",this._readWhitespace()}return b},_hexcolor:function(){var a=this._tokenStream,b,c=null;if(a.match(Tokens.HASH)){b=a.token(),c=b.value;if(!/#[a-f0-9]{3,6}/i.test(c))throw new SyntaxError("Expected a hex color but found '"+c+"' at line "+b.startLine+", col "+b.startCol+".",b.startLine,b.startCol);this._readWhitespace()}return c},_keyframes:function(){var a=this._tokenStream,b,c,d;a.mustMatch(Tokens.KEYFRAMES_SYM),this._readWhitespace(),d=this._keyframe_name(),this._readWhitespace(),a.mustMatch(Tokens.LBRACE),this.fire({type:"startkeyframes",name:d,line:d.line,col:d.col}),this._readWhitespace(),c=a.peek();while(c==Tokens.IDENT||c==Tokens.PERCENTAGE)this._keyframe_rule(),this._readWhitespace(),c=a.peek();this.fire({type:"endkeyframes",name:d,line:d.line,col:d.col}),this._readWhitespace(),a.mustMatch(Tokens.RBRACE)},_keyframe_name:function(){var a=this._tokenStream,b;a.mustMatch([Tokens.IDENT,Tokens.STRING]);return SyntaxUnit.fromToken(a.token())},_keyframe_rule:function(){var a=this._tokenStream,b,c=this._key_list();this.fire({type:"startkeyframerule",keys:c,line:c[0].line,col:c[0].col}),this._readDeclarations(!0),this.fire({type:"endkeyframerule",keys:c,line:c[0].line,col:c[0].col})},_key_list:function(){var a=this._tokenStream,b,c,d=[];d.push(this._key()),this._readWhitespace();while(a.match(Tokens.COMMA))this._readWhitespace(),d.push(this._key()),this._readWhitespace();return d},_key:function(){var a=this._tokenStream,b;if(a.match(Tokens.PERCENTAGE))return SyntaxUnit.fromToken(a.token());if(a.match(Tokens.IDENT)){b=a.token();if(/from|to/i.test(b.value))return SyntaxUnit.fromToken(b);a.unget()}this._unexpectedToken(a.LT(1))},_skipCruft:function(){while(this._tokenStream.match([Tokens.S,Tokens.CDO,Tokens.CDC]));},_readDeclarations:function(a,b){var c=this._tokenStream,d;this._readWhitespace(),a&&c.mustMatch(Tokens.LBRACE),this._readWhitespace();try{for(;;){if(!b||!this._margin()){if(!this._declaration())break;if(!c.match(Tokens.SEMICOLON))break}this._readWhitespace()}c.mustMatch(Tokens.RBRACE),this._readWhitespace()}catch(e){if(!(e instanceof SyntaxError&&!this.options.strict))throw e;this.fire({type:"error",error:e,message:e.message,line:e.line,col:e.col}),d=c.advance([Tokens.SEMICOLON,Tokens.RBRACE]);if(d==Tokens.SEMICOLON)this._readDeclarations(!1,b);else if(d!=Tokens.RBRACE)throw e}},_readWhitespace:function(){var a=this._tokenStream,b="";while(a.match(Tokens.S))b+=a.token().value;return b},_unexpectedToken:function(a){throw new SyntaxError("Unexpected token '"+a.value+"' at line "+a.startLine+", col "+a.startCol+".",a.startLine,a.startCol)},_verifyEnd:function(){this._tokenStream.LA(1)!=Tokens.EOF&&this._unexpectedToken(this._tokenStream.LT(1))},parse:function(a){this._tokenStream=new TokenStream(a,Tokens),this._stylesheet()},parseStyleSheet:function(a){return this.parse(a)},parseMediaQuery:function(a){this._tokenStream=new TokenStream(a,Tokens);var b=this._media_query();this._verifyEnd();return b},parsePropertyValue:function(a){this._tokenStream=new TokenStream(a,Tokens),this._readWhitespace();var b=this._expr();this._readWhitespace(),this._verifyEnd();return b},parseRule:function(a){this._tokenStream=new TokenStream(a,Tokens),this._readWhitespace();var b=this._ruleset();this._readWhitespace(),this._verifyEnd();return b},parseSelector:function(a){this._tokenStream=new TokenStream(a,Tokens),this._readWhitespace();var b=this._selector();this._readWhitespace(),this._verifyEnd();return b}};for(b in c)a[b]=c[b];return a}(),PropertyName.prototype=new SyntaxUnit,PropertyName.prototype.constructor=PropertyName,PropertyValue.prototype=new SyntaxUnit,PropertyValue.prototype.constructor=PropertyValue,PropertyValuePart.prototype=new SyntaxUnit,PropertyValuePart.prototype.constructor=PropertyValue,PropertyValuePart.fromToken=function(a){return new PropertyValuePart(a.value,a.startLine,a.startCol)},Selector.prototype=new SyntaxUnit,Selector.prototype.constructor=Selector,SelectorPart.prototype=new SyntaxUnit,SelectorPart.prototype.constructor=SelectorPart,SelectorSubPart.prototype=new SyntaxUnit,SelectorSubPart.prototype.constructor=SelectorSubPart;var h=/^[0-9a-fA-F]$/,nonascii=/^[\u0080-\uFFFF]$/,nl=/\n|\r\n|\r|\f/;TokenStream.prototype=mix(new TokenStreamBase,{_getToken:function(a){var b,c=this._reader,d=null,e=c.getLine(),f=c.getCol();b=c.read();while(b){switch(b){case"/":c.peek()=="*"?d=this.commentToken(b,e,f):d=this.charToken(b,e,f);break;case"|":case"~":case"^":case"$":case"*":c.peek()=="="?d=this.comparisonToken(b,e,f):d=this.charToken(b,e,f);break;case'"':case"'":d=this.stringToken(b,e,f);break;case"#":isNameChar(c.peek())?d=this.hashToken(b,e,f):d=this.charToken(b,e,f);break;case".":isDigit(c.peek())?d=this.numberToken(b,e,f):d=this.charToken(b,e,f);break;case"-":c.peek()=="-"?d=this.htmlCommentEndToken(b,e,f):isNameStart(c.peek())?d=this.identOrFunctionToken(b,e,f):d=this.charToken(b,e,f);break;case"!":d=this.importantToken(b,e,f);break;case"@":d=this.atRuleToken(b,e,f);break;case":":d=this.notToken(b,e,f);break;case"<":d=this.htmlCommentStartToken(b,e,f);break;case"U":case"u":if(c.peek()=="+"){d=this.unicodeRangeToken(b,e,f);break};default:isDigit(b)?d=this.numberToken(b,e,f):isWhitespace(b)?d=this.whitespaceToken(b,e,f):isIdentStart(b)?d=this.identOrFunctionToken(b,e,f):d=this.charToken(b,e,f)}break}!d&&b==null&&(d=this.createToken(Tokens.EOF,null,e,f));return d},createToken:function(a,b,c,d,e){var f=this._reader;e=e||{};return{value:b,type:a,channel:e.channel,hide:e.hide||!1,startLine:c,startCol:d,endLine:f.getLine(),endCol:f.getCol()}},atRuleToken:function(a,b,c){var d=a,e=this._reader,f=Tokens.CHAR,g=!1,h,i;e.mark(),h=this.readName(),d=a+h,f=Tokens.type(d.toLowerCase());if(f==Tokens.CHAR||f==Tokens.UNKNOWN)f=Tokens.CHAR,d=a,e.reset();return this.createToken(f,d,b,c)},charToken:function(a,b,c){var d=Tokens.type(a);d==-1&&(d=Tokens.CHAR);return this.createToken(d,a,b,c)},commentToken:function(a,b,c){var d=this._reader,e=this.readComment(a);return this.createToken(Tokens.COMMENT,e,b,c)},comparisonToken:function(a,b,c){var d=this._reader,e=a+d.read(),f=Tokens.type(e)||Tokens.CHAR;return this.createToken(f,e,b,c)},hashToken:function(a,b,c){var d=this._reader,e=this.readName(a);return this.createToken(Tokens.HASH,e,b,c)},htmlCommentStartToken:function(a,b,c){var d=this._reader,e=a;d.mark(),e+=d.readCount(3);if(e=="")return this.createToken(Tokens.CDC,e,b,c);d.reset();return this.charToken(a,b,c)},identOrFunctionToken:function(a,b,c){var d=this._reader,e=this.readName(a),f=Tokens.IDENT;d.peek()=="("?(e+=d.read(),e.toLowerCase()=="url("?(f=Tokens.URI,e=this.readURI(e),e.toLowerCase()=="url("&&(f=Tokens.FUNCTION)):f=Tokens.FUNCTION):d.peek()==":"&&e.toLowerCase()=="progid"&&(e+=d.readTo("("),f=Tokens.IE_FUNCTION);return this.createToken(f,e,b,c)},importantToken:function(a,b,c){var d=this._reader,e=a,f=Tokens.CHAR,g,h;d.mark(),h=d.read();while(h){if(h=="/"){if(d.peek()!="*")break;g=this.readComment(h);if(g=="")break}else if(isWhitespace(h))e+=h+this.readWhitespace();else{if(/i/i.test(h)){g=d.readCount(8),/mportant/i.test(g)&&(e+=h+g,f=Tokens.IMPORTANT_SYM);break}break}h=d.read()}if(f==Tokens.CHAR){d.reset();return this.charToken(a,b,c)}return this.createToken(f,e,b,c)},notToken:function(a,b,c){var d=this._reader,e=a;d.mark(),e+=d.readCount(4);if(e.toLowerCase()==":not(")return this.createToken(Tokens.NOT,e,b,c);d.reset();return this.charToken(a,b,c)},numberToken:function(a,b,c){var d=this._reader,e=this.readNumber(a),f,g=Tokens.NUMBER,h=d.peek();isIdentStart(h)?(f=this.readName(d.read()),e+=f,/^em$|^ex$|^px$|^gd$|^rem$|^vw$|^vh$|^vm$|^ch$|^cm$|^mm$|^in$|^pt$|^pc$/i.test(f)?g=Tokens.LENGTH:/^deg|^rad$|^grad$/i.test(f)?g=Tokens.ANGLE:/^ms$|^s$/i.test(f)?g=Tokens.TIME:/^hz$|^khz$/i.test(f)?g=Tokens.FREQ:/^dpi$|^dpcm$/i.test(f)?g=Tokens.RESOLUTION:g=Tokens.DIMENSION):h=="%"&&(e+=d.read(),g=Tokens.PERCENTAGE);return this.createToken(g,e,b,c)},stringToken:function(a,b,c){var d=a,e=a,f=this._reader,g=a,h=Tokens.STRING,i=f.read();while(i){e+=i;if(i==d&&g!="\\")break;if(isNewLine(f.peek())&&i!="\\"){h=Tokens.INVALID;break}g=i,i=f.read()}i==null&&(h=Tokens.INVALID);return this.createToken(h,e,b,c)},unicodeRangeToken:function(a,b,c){var d=this._reader,e=a,f,g=Tokens.CHAR;d.peek()=="+"&&(d.mark(),e+=d.read(),e+=this.readUnicodeRangePart(!0),e.length==2?d.reset():(g=Tokens.UNICODE_RANGE,e.indexOf("?")==-1&&d.peek()=="-"&&(d.mark(),f=d.read(),f+=this.readUnicodeRangePart(!1),f.length==1?d.reset():e+=f)));return this.createToken(g,e,b,c)},whitespaceToken:function(a,b,c){var d=this._reader,e=a+this.readWhitespace();return this.createToken(Tokens.S,e,b,c)},readUnicodeRangePart:function(a){var b=this._reader,c="",d=b.peek();while(isHexDigit(d)&&c.length<6)b.read(),c+=d,d=b.peek();if(a)while(d=="?"&&c.length<6)b.read(),c+=d,d=b.peek();return c},readWhitespace:function(){var a=this._reader,b="",c=a.peek();while(isWhitespace(c))a.read(),b+=c,c=a.peek();return b},readNumber:function(a){var b=this._reader,c=a,d=a==".",e=b.peek();while(e){if(isDigit(e))c+=b.read();else{if(e!=".")break;if(d)break;d=!0,c+=b.read()}e=b.peek()}return c},readString:function(){var a=this._reader,b=a.read(),c=b,d=b,e=a.peek();while(e){e=a.read(),c+=e;if(e==b&&d!="\\")break;if(isNewLine(a.peek())&&e!="\\"){c="";break}d=e,e=a.peek()}e==null&&(c="");return c},readURI:function(a){var b=this._reader,c=a,d="",e=b.peek();b.mark();while(e&&isWhitespace(e))b.read(),e=b.peek();e=="'"||e=='"'?d=this.readString():d=this.readURL(),e=b.peek();while(e&&isWhitespace(e))b.read(),e=b.peek();d==""||e!=")"?(c=a,b.reset()):c+=d+b.read();return c},readURL:function(){var a=this._reader,b="",c=a.peek();while(/^[!#$%&\\*-~]$/.test(c))b+=a.read(),c=a.peek();return b},readName:function(a){var b=this._reader,c=a||"",d=b.peek();for(;;)if(d=="\\")c+=this.readEscape(b.read()),d=b.peek();else if(d&&isNameChar(d))c+=b.read(),d=b.peek();else break;return c},readEscape:function(a){var b=this._reader,c=a||"",d=0,e=b.peek();if(isHexDigit(e))do c+=b.read(),e=b.peek();while(e&&isHexDigit(e)&&++d<6);c.length==3&&/\s/.test(e)||c.length==7||c.length==1?b.read():e="";return c+e},readComment:function(a){var b=this._reader,c=a||"",d=b.read();if(d=="*"){while(d){c+=d;if(d=="*"&&b.peek()=="/"){c+=b.read();break}d=b.read()}return c}return""}});var Tokens=[{name:"CDO"},{name:"CDC"},{name:"S",whitespace:!0},{name:"COMMENT",comment:!0,hide:!0,channel:"comment"},{name:"INCLUDES",text:"~="},{name:"DASHMATCH",text:"|="},{name:"PREFIXMATCH",text:"^="},{name:"SUFFIXMATCH",text:"$="},{name:"SUBSTRINGMATCH",text:"*="},{name:"STRING"},{name:"IDENT"},{name:"HASH"},{name:"IMPORT_SYM",text:"@import"},{name:"PAGE_SYM",text:"@page"},{name:"MEDIA_SYM",text:"@media"},{name:"FONT_FACE_SYM",text:"@font-face"},{name:"CHARSET_SYM",text:"@charset"},{name:"NAMESPACE_SYM",text:"@namespace"},{name:"KEYFRAMES_SYM",text:["@keyframes","@-webkit-keyframes","@-moz-keyframes"]},{name:"IMPORTANT_SYM"},{name:"LENGTH"},{name:"ANGLE"},{name:"TIME"},{name:"FREQ"},{name:"DIMENSION"},{name:"PERCENTAGE"},{name:"NUMBER"},{name:"URI"},{name:"FUNCTION"},{name:"UNICODE_RANGE"},{name:"INVALID"},{name:"PLUS",text:"+"},{name:"GREATER",text:">"},{name:"COMMA",text:","},{name:"TILDE",text:"~"},{name:"NOT"},{name:"TOPLEFTCORNER_SYM",text:"@top-left-corner"},{name:"TOPLEFT_SYM",text:"@top-left"},{name:"TOPCENTER_SYM",text:"@top-center"},{name:"TOPRIGHT_SYM",text:"@top-right"},{name:"TOPRIGHTCORNER_SYM",text:"@top-right-corner"},{name:"BOTTOMLEFTCORNER_SYM",text:"@bottom-left-corner"},{name:"BOTTOMLEFT_SYM",text:"@bottom-left"},{name:"BOTTOMCENTER_SYM",text:"@bottom-center"},{name:"BOTTOMRIGHT_SYM",text:"@bottom-right"},{name:"BOTTOMRIGHTCORNER_SYM",text:"@bottom-right-corner"},{name:"LEFTTOP_SYM",text:"@left-top"},{name:"LEFTMIDDLE_SYM",text:"@left-middle"},{name:"LEFTBOTTOM_SYM",text:"@left-bottom"},{name:"RIGHTTOP_SYM",text:"@right-top"},{name:"RIGHTMIDDLE_SYM",text:"@right-middle"},{name:"RIGHTBOTTOM_SYM",text:"@right-bottom"},{name:"RESOLUTION",state:"media"},{name:"IE_FUNCTION"},{name:"CHAR"},{name:"PIPE",text:"|"},{name:"SLASH",text:"/"},{name:"MINUS",text:"-"},{name:"STAR",text:"*"},{name:"LBRACE",text:"{"},{name:"RBRACE",text:"}"},{name:"LBRACKET",text:"["},{name:"RBRACKET",text:"]"},{name:"EQUALS",text:"="},{name:"COLON",text:":"},{name:"SEMICOLON",text:";"},{name:"LPAREN",text:"("},{name:"RPAREN",text:")"},{name:"DOT",text:"."}];(function(){var a=[],b={};Tokens.UNKNOWN=-1,Tokens.unshift({name:"EOF"});for(var c=0,d=Tokens.length;c1&&b.warn("Don't use adjoining classes.",f.line,f.col,c)}}}})}}),CSSLint.addRule({id:"box-model",name:"Box Model",desc:"Don't use width or height when using padding or border.",browsers:"All",init:function(a,b){var c=this,d={border:1,"border-left":1,"border-right":1,padding:1,"padding-left":1,"padding-right":1},e={border:1,"border-bottom":1,"border-top":1,padding:1,"padding-bottom":1,"padding-top":1},f;a.addListener("startrule",function(){f={}}),a.addListener("property",function(a){var b=a.property.text.toLowerCase();if(e[b]||d[b])!/^0\S*$/.test(a.value)&&(b!="border"||a.value!="none")&&(f[b]={line:a.property.line,col:a.property.col,value:a.value});else if(b=="width"||b=="height")f[b]=1}),a.addListener("endrule",function(){var a;if(f.height)for(a in e)e.hasOwnProperty(a)&&f[a]&&(a!="padding"||f[a].value.parts.length!=2||f[a].value.parts[0].value!=0)&&b.warn("Broken box model: using height with "+a+".",f[a].line,f[a].col,c);if(f.width)for(a in d)d.hasOwnProperty(a)&&f[a]&&(a!="padding"||f[a].value.parts.length!=2||f[a].value.parts[1].value!=0)&&b.warn("Broken box model: using width with "+a+".",f[a].line,f[a].col,c)})}}),CSSLint.addRule({id:"compatible-vendor-prefixes",name:"Compatible Vendor Prefixes",desc:"Include all compatible vendor prefixes to reach a wider range of users.",browsers:"All",init:function(a,b){var c=this,d,e,f,g,h,i,j,k=Array.prototype.push,l=[];d={animation:"webkit moz","animation-delay":"webkit moz","animation-direction":"webkit moz","animation-duration":"webkit moz","animation-fill-mode":"webkit moz","animation-iteration-count":"webkit moz","animation-name":"webkit moz","animation-play-state":"webkit moz","animation-timing-function":"webkit moz",appearance:"webkit moz","border-end":"webkit moz","border-end-color":"webkit moz","border-end-style":"webkit moz","border-end-width":"webkit moz","border-image":"webkit moz o","border-radius":"webkit moz","border-start":"webkit moz","border-start-color":"webkit moz","border-start-style":"webkit moz","border-start-width":"webkit moz","box-align":"webkit moz ms","box-direction":"webkit moz ms","box-flex":"webkit moz ms","box-lines":"webkit ms","box-ordinal-group":"webkit moz ms","box-orient":"webkit moz ms","box-pack":"webkit moz ms","box-sizing":"webkit moz","box-shadow":"webkit moz","column-count":"webkit moz","column-gap":"webkit moz","column-rule":"webkit moz","column-rule-color":"webkit moz","column-rule-style":"webkit moz","column-rule-width":"webkit moz","column-width":"webkit moz",hyphens:"epub moz","line-break":"webkit ms","margin-end":"webkit moz","margin-start":"webkit moz","marquee-speed":"webkit wap","marquee-style":"webkit wap","padding-end":"webkit moz","padding-start":"webkit moz","tab-size":"moz o","text-size-adjust":"webkit ms",transform:"webkit moz ms o","transform-origin":"webkit moz ms o",transition:"webkit moz o","transition-delay":"webkit moz o","transition-duration":"webkit moz o","transition-property":"webkit moz o","transition-timing-function":"webkit moz o","user-modify":"webkit moz","user-select":"webkit moz","word-break":"epub ms","writing-mode":"epub ms"};for(f in d)if(d.hasOwnProperty(f)){g=[],h=d[f].split(" ");for(i=0,j=h.length;i-1&&e.push(b)}),a.addListener("endrule",function(a){if(!!e.length){var f={},g,h,i,j,k,l,m,n,o,p;for(g=0,h=e.length;g-1&&(f[j]===undefined&&(f[j]={full:k.slice(0),actual:[]}),f[j].actual.indexOf(i)===-1&&f[j].actual.push(i)))}for(j in f)if(f.hasOwnProperty(j)){l=f[j],m=l.full,n=l.actual;if(m.length>n.length)for(g=0,h=m.length;g=10&&b.rollupWarn("Too many floats ("+d+"), you're probably using them for layout. Consider using a grid system instead.",c)})}}),CSSLint.addRule({id:"font-faces",name:"Font Faces",desc:"Too many different web fonts in the same stylesheet.",browsers:"All",init:function(a,b){var c=this,d=0;a.addListener("startfontface",function(){d++}),a.addListener("endstylesheet",function(){d>5&&b.rollupWarn("Too many @font-face declarations ("+d+").",c)})}}),CSSLint.addRule({id:"font-sizes",name:"Font Sizes",desc:"Checks the number of font-size declarations.",browsers:"All",init:function(a,b){var c=this,d=0;a.addListener("property",function(a){a.property=="font-size"&&d++}),a.addListener("endstylesheet",function(){b.stat("font-sizes",d),d>=10&&b.rollupWarn("Too many font-size declarations ("+d+"), abstraction needed.",c)})}}),CSSLint.addRule({id:"gradients",name:"Gradients",desc:"When using a vendor-prefixed gradient, make sure to use them all.",browsers:"All",init:function(a,b){var c=this,d;a.addListener("startrule",function(){d={moz:0,webkit:0,ms:0,o:0}}),a.addListener("property",function(a){/\-(moz|ms|o|webkit)(?:\-(?:linear|radial))\-gradient/.test(a.value)&&(d[RegExp.$1]=1)}),a.addListener("endrule",function(a){var e=[];d.moz||e.push("Firefox 3.6+"),d.webkit||e.push("Webkit (Safari, Chrome)"),d.ms||e.push("Internet Explorer 10+"),d.o||e.push("Opera 11.1+"),e.length&&e.length<4&&b.warn("Missing vendor-prefixed CSS gradients for "+e.join(", ")+".",a.selectors[0].line,a.selectors[0].col,c)})}}),CSSLint.addRule({id:"ids",name:"IDs",desc:"Selectors should not contain IDs.",browsers:"All",init:function(a,b){var c=this;a.addListener("startrule",function(a){var d=a.selectors,e,f,g,h,i,j,k;for(i=0;i1&&b.warn(h+" IDs in the selector, really?",e.line,e.col,c)}})}}),CSSLint.addRule({id:"import",name:"@import",desc:"Don't use @import, use instead.",browsers:"All",init:function(a,b){var c=this;a.addListener("import",function(a){b.warn("@import prevents parallel downloads, use instead.",a.line,a.col,c)})}}),CSSLint.addRule({id:"important",name:"Important",desc:"Be careful when using !important declaration",browsers:"All",init:function(a,b){var c=this,d=0;a.addListener("property",function(a){a.important===!0&&(d++,b.warn("Use of !important",a.line,a.col,c))}),a.addListener("endstylesheet",function(){b.stat("important",d),d>=10&&b.rollupWarn("Too many !important declarations ("+d+"), try to use less than 10 to avoid specifity issues.",c)})}}),CSSLint.addRule({id:"known-properties",name:"Known Properties",desc:"Properties should be known (listed in CSS specification) or be a vendor-prefixed property.",browsers:"All",init:function(a,b){var c=this,d={"alignment-adjust":1,"alignment-baseline":1,animation:1,"animation-delay":1,"animation-direction":1,"animation-duration":1,"animation-iteration-count":1,"animation-name":1,"animation-play-state":1,"animation-timing-function":1,appearance:1,azimuth:1,"backface-visibility":1,background:1,"background-attachment":1,"background-break":1,"background-clip":1,"background-color":1,"background-image":1,"background-origin":1,"background-position":1,"background-repeat":1,"background-size":1,"baseline-shift":1,binding:1,bleed:1,"bookmark-label":1,"bookmark-level":1,"bookmark-state":1,"bookmark-target":1,border:1,"border-bottom":1,"border-bottom-color":1,"border-bottom-left-radius":1,"border-bottom-right-radius":1,"border-bottom-style":1,"border-bottom-width":1,"border-collapse":1,"border-color":1,"border-image":1,"border-image-outset":1,"border-image-repeat":1,"border-image-slice":1,"border-image-source":1,"border-image-width":1,"border-left":1,"border-left-color":1,"border-left-style":1,"border-left-width":1,"border-radius":1,"border-right":1,"border-right-color":1,"border-right-style":1,"border-right-width":1,"border-spacing":1,"border-style":1,"border-top":1,"border-top-color":1,"border-top-left-radius":1,"border-top-right-radius":1,"border-top-style":1,"border-top-width":1,"border-width":1,bottom:1,"box-align":1,"box-decoration-break":1,"box-direction":1,"box-flex":1,"box-flex-group":1,"box-lines":1,"box-ordinal-group":1,"box-orient":1,"box-pack":1,"box-shadow":1,"box-sizing":1,"break-after":1,"break-before":1,"break-inside":1,"caption-side":1,clear:1,clip:1,color:1,"color-profile":1,"column-count":1,"column-fill":1,"column-gap":1,"column-rule":1,"column-rule-color":1,"column-rule-style":1,"column-rule-width":1,"column-span":1,"column-width":1,columns:1,content:1,"counter-increment":1,"counter-reset":1,crop:1,cue:1,"cue-after":1,"cue-before":1,cursor:1,direction:1,display:1,"dominant-baseline":1,"drop-initial-after-adjust":1,"drop-initial-after-align":1,"drop-initial-before-adjust":1,"drop-initial-before-align":1,"drop-initial-size":1,"drop-initial-value":1,elevation:1,"empty-cells":1,fit:1,"fit-position":1,"float":1,"float-offset":1,font:1,"font-family":1,"font-size":1,"font-size-adjust":1,"font-stretch":1,"font-style":1,"font-variant":1,"font-weight":1,"grid-columns":1,"grid-rows":1,"hanging-punctuation":1,height:1,"hyphenate-after":1,"hyphenate-before":1,"hyphenate-character":1,"hyphenate-lines":1,"hyphenate-resource":1,hyphens:1,icon:1,"image-orientation":1,"image-rendering":1,"image-resolution":1,"inline-box-align":1,left:1,"letter-spacing":1,"line-height":1,"line-stacking":1,"line-stacking-ruby":1,"line-stacking-shift":1,"line-stacking-strategy":1,"list-style":1,"list-style-image":1,"list-style-position":1,"list-style-type":1,margin:1,"margin-bottom":1,"margin-left":1,"margin-right":1,"margin-top":1,mark:1,"mark-after":1,"mark-before":1,marks:1,"marquee-direction":1,"marquee-play-count":1,"marquee-speed":1,"marquee-style":1,"max-height":1,"max-width":1,"min-height":1,"min-width":1,"move-to":1,"nav-down":1,"nav-index":1,"nav-left":1,"nav-right":1,"nav-up":1,opacity:1,orphans:1,outline:1,"outline-color":1,"outline-offset":1,"outline-style":1,"outline-width":1,overflow:1,"overflow-style":1,"overflow-x":1,"overflow-y":1,padding:1,"padding-bottom":1,"padding-left":1,"padding-right":1,"padding-top":1,page:1,"page-break-after":1,"page-break-before":1,"page-break-inside":1,"page-policy":1,pause:1,"pause-after":1,"pause-before":1,perspective:1,"perspective-origin":1,phonemes:1,pitch:1,"pitch-range":1,"play-during":1,position:1,"presentation-level":1,"punctuation-trim":1,quotes:1,"rendering-intent":1,resize:1,rest:1,"rest-after":1,"rest-before":1,richness:1,right:1,rotation:1,"rotation-point":1,"ruby-align":1,"ruby-overhang":1,"ruby-position":1,"ruby-span":1,size:1,speak:1,"speak-header":1,"speak-numeral":1,"speak-punctuation":1,"speech-rate":1,stress:1,"string-set":1,"table-layout":1,target:1,"target-name":1,"target-new":1,"target-position":1,"text-align":1,"text-align-last":1,"text-decoration":1,"text-emphasis":1,"text-height":1,"text-indent":1,"text-justify":1,"text-outline":1,"text-shadow":1,"text-transform":1,"text-wrap":1,top:1,transform:1,"transform-origin":1,"transform-style":1,transition:1,"transition-delay":1,"transition-duration":1,"transition-property":1,"transition-timing-function":1,"unicode-bidi":1,"vertical-align":1,visibility:1,"voice-balance":1,"voice-duration":1,"voice-family":1,"voice-pitch":1,"voice-pitch-range":1,"voice-rate":1,"voice-stress":1,"voice-volume":1,volume:1,"white-space":1,"white-space-collapse":1,widows:1,width:1,"word-break":1,"word-spacing":1,"word-wrap":1,"z-index":1,filter:1,zoom:1};a.addListener("property",function(a){var e=a.property.text.toLowerCase();!d[e]&&e.charAt(0)!="-"&&b.error("Unknown property '"+a.property+"'.",a.line,a.col,c)})}}),CSSLint.addRule({id:"overqualified-elements",name:"Overqualified Elements",desc:"Don't use classes or IDs with elements (a.foo or a#foo).",browsers:"All",init:function(a,b){var c=this,d={};a.addListener("startrule",function(a){var e=a.selectors,f,g,h,i,j,k;for(i=0;i0&&b.warn("Heading ("+f.elementName+") should not be qualified.",f.line,f.col,c)}})}}),CSSLint.addRule({id:"regex-selectors",name:"Regex Selectors",desc:"Selectors that look like regular expressions are slow and should be avoided.",browsers:"All",init:function(a,b){var c=this;a.addListener("startrule",function(a){var d=a.selectors,e,f,g,h,i,j;for(h=0;h1&&b.warn("Heading ("+g.elementName+") has already been defined.",g.line,g.col,c))})}}),CSSLint.addRule({id:"universal-selector",name:"Universal Selector",desc:"The universal selector (*) is known to be slow.",browsers:"All",init:function(a,b){var c=this;a.addListener("startrule",function(a){var d=a.selectors,e,f,g,h,i,j;for(h=0;h=2)var d=arguments[1];else do{if(c in this){d=this[c++];break}if(++c>=b)throw new TypeError}while(!0);for(;c=2)var d=arguments[1];else do{if(c in this){d=this[c--];break}if(--c<0)throw new TypeError}while(!0);for(;c>=0;c--)c in this&&(d=a.call(null,d,this[c],c,this));return d}),Array.prototype.indexOf||(Array.prototype.indexOf=function(a){var b=this.length;if(!b)return-1;var c=arguments[1]||0;if(c>=b)return-1;c<0&&(c+=b);for(;c=0;c--){if(!h(this,c))continue;if(a===this[c])return c}return-1}),Object.getPrototypeOf||(Object.getPrototypeOf=function(a){return a.__proto__||a.constructor.prototype});if(!Object.getOwnPropertyDescriptor){var n="Object.getOwnPropertyDescriptor called on a non-object: ";Object.getOwnPropertyDescriptor=function(a,b){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError(n+a);if(!h(a,b))return undefined;var c,d,e;c={enumerable:!0,configurable:!0};if(m){var f=a.__proto__;a.__proto__=g;var d=k(a,b),e=l(a,b);a.__proto__=f;if(d||e){d&&(descriptor.get=d),e&&(descriptor.set=e);return descriptor}}descriptor.value=a[b];return descriptor}}Object.getOwnPropertyNames||(Object.getOwnPropertyNames=function(a){return Object.keys(a)}),Object.create||(Object.create=function(a,b){var c;if(a===null)c={"__proto__":null};else{if(typeof a!="object")throw new TypeError("typeof prototype["+typeof a+"] != 'object'");var d=function(){};d.prototype=a,c=new d,c.__proto__=a}typeof b!="undefined"&&Object.defineProperties(c,b);return c});if(!Object.defineProperty){var o="Property description must be an object: ",p="Object.defineProperty called on non-object: ",q="getters & setters can not be defined on this javascript engine";Object.defineProperty=function(a,b,c){if(typeof a!="object"&&typeof a!="function")throw new TypeError(p+a);if(typeof a!="object"||a===null)throw new TypeError(o+c);if(h(c,"value"))if(m&&(k(a,b)||l(a,b))){var d=a.__proto__;a.__proto__=g,delete a[b],a[b]=c.value,a.prototype}else a[b]=c.value;else{if(!m)throw new TypeError(q);h(c,"get")&&i(a,b,c.get),h(c,"set")&&j(a,b,c.set)}return a}}Object.defineProperties||(Object.defineProperties=function(a,b){for(var c in b)h(b,c)&&Object.defineProperty(a,c,b[c]);return a}),Object.seal||(Object.seal=function(a){return a}),Object.freeze||(Object.freeze=function(a){return a});try{Object.freeze(function(){})}catch(r){Object.freeze=function(a){return function b(b){return typeof b=="function"?b:a(b)}}(Object.freeze)}Object.preventExtensions||(Object.preventExtensions=function(a){return a}),Object.isSealed||(Object.isSealed=function(a){return!1}),Object.isFrozen||(Object.isFrozen=function(a){return!1}),Object.isExtensible||(Object.isExtensible=function(a){return!0});if(!Object.keys){var s=!0,t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],u=t.length;for(var v in{toString:null})s=!1;Object.keys=function W(a){if(typeof a!="object"&&typeof a!="function"||a===null)throw new TypeError("Object.keys called on a non-object");var W=[];for(var b in a)h(a,b)&&W.push(b);if(s)for(var c=0,d=u;c=7?new a(c,d,e,f,g,h,i):j>=6?new a(c,d,e,f,g,h):j>=5?new a(c,d,e,f,g):j>=4?new a(c,d,e,f):j>=3?new a(c,d,e):j>=2?new a(c,d):j>=1?new a(c):new a;k.constructor=b;return k}return a.apply(this,arguments)},c=new RegExp("^(?:((?:[+-]\\d\\d)?\\d\\d\\d\\d)(?:-(\\d\\d)(?:-(\\d\\d))?)?)?(?:T(\\d\\d):(\\d\\d)(?::(\\d\\d)(?:\\.(\\d\\d\\d))?)?)?(?:Z|([+-])(\\d\\d):(\\d\\d))?$");for(var d in a)b[d]=a[d];b.now=a.now,b.UTC=a.UTC,b.prototype=a.prototype,b.prototype.constructor=b,b.parse=function e(b){var d=c.exec(b);if(d){d.shift();var e=d[0]===undefined;for(var f=0;f<10;f++){if(f===7)continue;d[f]=+(d[f]||(f<3?1:0)),f===1&&d[f]--}if(e)return((d[3]*60+d[4])*60+d[5])*1e3+d[6];var g=(d[8]*60+d[9])*60*1e3;d[6]==="-"&&(g=-g);return a.UTC.apply(this,d.slice(0,7))+g}return a.parse.apply(this,arguments)};return b}(Date));if(!String.prototype.trim){var w=/^\s\s*/,x=/\s\s*$/;String.prototype.trim=function(){return String(this).replace(w,"").replace(x,"")}}}),define("pilot/event_emitter",["require","exports","module"],function(a,b,c){var d={};d._emit=d._dispatchEvent=function(a,b){this._eventRegistry=this._eventRegistry||{};var c=this._eventRegistry[a];if(!!c&&!!c.length){var b=b||{};b.type=a;for(var d=0;d=b&&(a.row=Math.max(0,b-1),a.column=this.getLine(b-1).length);return a},this.insert=function(a,b){if(b.length==0)return a;a=this.$clipPosition(a),this.getLength()<=1&&this.$detectNewLine(b);var c=this.$split(b),d=c.splice(0,1)[0],e=c.length==0?null:c.splice(c.length-1,1)[0];a=this.insertInLine(a,d),e!==null&&(a=this.insertNewLine(a),a=this.insertLines(a.row,c),a=this.insertInLine(a,e||""));return a},this.insertLines=function(a,b){if(b.length==0)return{row:a,column:0};var c=[a,0];c.push.apply(c,b),this.$lines.splice.apply(this.$lines,c);var d=new f(a,0,a+b.length,0),e={action:"insertLines",range:d,lines:b};this._dispatchEvent("change",{data:e});return d.end},this.insertNewLine=function(a){a=this.$clipPosition(a);var b=this.$lines[a.row]||"";this.$lines[a.row]=b.substring(0,a.column),this.$lines.splice(a.row+1,0,b.substring(a.column,b.length));var c={row:a.row+1,column:0},d={action:"insertText",range:f.fromPoints(a,c),text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:d});return c},this.insertInLine=function(a,b){if(b.length==0)return a;var c=this.$lines[a.row]||"";this.$lines[a.row]=c.substring(0,a.column)+b+c.substring(a.column);var d={row:a.row,column:a.column+b.length},e={action:"insertText",range:f.fromPoints(a,d),text:b};this._dispatchEvent("change",{data:e});return d},this.remove=function(a){a.start=this.$clipPosition(a.start),a.end=this.$clipPosition(a.end);if(a.isEmpty())return a.start;var b=a.start.row,c=a.end.row;if(a.isMultiLine()){var d=a.start.column==0?b:b+1,e=c-1;a.end.column>0&&this.removeInLine(c,0,a.end.column),e>=d&&this.removeLines(d,e),d!=b&&(this.removeInLine(b,a.start.column,this.getLine(b).length),this.removeNewLine(a.start.row))}else this.removeInLine(b,a.start.column,a.end.column);return a.start},this.removeInLine=function(a,b,c){if(b!=c){var d=new f(a,b,a,c),e=this.getLine(a),g=e.substring(b,c),h=e.substring(0,b)+e.substring(c,e.length);this.$lines.splice(a,1,h);var i={action:"removeText",range:d,text:g};this._dispatchEvent("change",{data:i});return d.start}},this.removeLines=function(a,b){var c=new f(a,0,b+1,0),d=this.$lines.splice(a,b-a+1),e={action:"removeLines",range:c,nl:this.getNewLineCharacter(),lines:d};this._dispatchEvent("change",{data:e});return d},this.removeNewLine=function(a){var b=this.getLine(a),c=this.getLine(a+1),d=new f(a,b.length,a+1,0),e=b+c;this.$lines.splice(a,2,e);var g={action:"removeText",range:d,text:this.getNewLineCharacter()};this._dispatchEvent("change",{data:g})},this.replace=function(a,b){if(b.length==0&&a.isEmpty())return a.start;if(b==this.getTextRange(a))return a.end;this.remove(a);if(b)var c=this.insert(a.start,b);else c=a.start;return c},this.applyDeltas=function(a){for(var b=0;b=0;b--){var c=a[b],d=f.fromPoints(c.range.start,c.range.end);c.action=="insertLines"?this.removeLines(d.start.row,d.end.row-1):c.action=="insertText"?this.remove(d):c.action=="removeLines"?this.insertLines(d.start.row,c.lines):c.action=="removeText"&&this.insert(d.start,c.text)}}}).call(h.prototype),b.Document=h}),define("ace/range",["require","exports","module"],function(a,b,c){var d=function(a,b,c,d){this.start={row:a,column:b},this.end={row:c,column:d}};(function(){this.toString=function(){return"Range: ["+this.start.row+"/"+this.start.column+"] -> ["+this.end.row+"/"+this.end.column+"]"},this.contains=function(a,b){return this.compare(a,b)==0},this.compareRange=function(a){var b,c=a.end,d=a.start;b=this.compare(c.row,c.column);if(b==1){b=this.compare(d.row,d.column);return b==1?2:b==0?1:0}if(b==-1)return-2;b=this.compare(d.row,d.column);return b==-1?-1:b==1?42:0},this.containsRange=function(a){var b=this.compareRange(a);return b==-1||b==0||b==1},this.isEnd=function(a,b){return this.end.row==a&&this.end.column==b},this.isStart=function(a,b){return this.start.row==a&&this.start.column==b},this.setStart=function(a,b){typeof a=="object"?(this.start.column=a.column,this.start.row=a.row):(this.start.row=a,this.start.column=b)},this.setEnd=function(a,b){typeof a=="object"?(this.end.column=a.column,this.end.row=a.row):(this.end.row=a,this.end.column=b)},this.inside=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)||this.isStart(a,b)?!1:!0;return!1},this.insideStart=function(a,b){if(this.compare(a,b)==0)return this.isEnd(a,b)?!1:!0;return!1},this.insideEnd=function(a,b){if(this.compare(a,b)==0)return this.isStart(a,b)?!1:!0;return!1},this.compare=function(a,b){if(!this.isMultiLine()&&a===this.start.row)return bthis.end.column?1:0;return athis.end.row?1:this.start.row===a?b>=this.start.column?0:-1:this.end.row===a?b<=this.end.column?0:1:0},this.compareStart=function(a,b){return this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.compareEnd=function(a,b){return this.end.row==a&&this.end.column==b?1:this.compare(a,b)},this.compareInside=function(a,b){return this.end.row==a&&this.end.column==b?1:this.start.row==a&&this.start.column==b?-1:this.compare(a,b)},this.clipRows=function(a,b){if(this.end.row>b)var c={row:b+1,column:0};if(this.start.row>b)var e={row:b+1,column:0};if(this.start.rowthis.row)return;if(c.start.row==this.row&&c.start.column>this.column)return;var d=this.row,e=this.column;b.action==="insertText"?c.start.row===d&&c.start.column<=e?c.start.row===c.end.row?e+=c.end.column-c.start.column:(e-=c.start.column,d+=c.end.row-c.start.row):c.start.row!==c.end.row&&c.start.row=e?e=c.start.column:e=Math.max(0,e-(c.end.column-c.start.column)):c.start.row!==c.end.row&&c.start.row=this.document.getLength()?(c.row=Math.max(0,this.document.getLength()-1),c.column=this.document.getLine(c.row).length):a<0?(c.row=0,c.column=0):(c.row=a,c.column=Math.min(this.document.getLine(c.row).length,Math.max(0,b))),b<0&&(c.column=0);return c}}).call(f.prototype)}),define("pilot/lang",["require","exports","module"],function(a,b,c){b.stringReverse=function(a){return a.split("").reverse().join("")},b.stringRepeat=function(a,b){return Array(b+1).join(a)};var d=/^\s\s*/,e=/\s\s*$/;b.stringTrimLeft=function(a){return a.replace(d,"")},b.stringTrimRight=function(a){return a.replace(e,"")},b.copyObject=function(a){var b={};for(var c in a)b[c]=a[c];return b},b.copyArray=function(a){var b=[];for(i=0,l=a.length;ip)p+=A.indent;!a&&!bQ()&&!f&&A.strict&&j["(context)"]["(global)"]&&be('Missing "use strict" statement.'),c=bR(),L=f,p-=A.indent,bt()}bm("}",h),p=e}else a?((!b||A.curly)&&be("Expected '{a}' and instead saw '{b}'.",x,"{",x.value),z=!0,c=[bP()],z=!1):bg("Expected '{a}' and instead saw '{b}'.",x,"{",x.value);j["(verb)"]=null,G=g,o=d,a&&A.noempty&&(!c||c.length===0)&&be("Empty block.");return c}function bR(a){var b=[],c,d;while(!x.reach&&x.id!=="(end)")x.id===";"?(be("Unnecessary semicolon."),bm(";")):b.push(bP());return b}function bQ(){if(x.value==="use strict"){L&&be('Unnecessary "use strict".'),bm(),bm(";"),L=!0,A.newcap=!0,A.undef=!0;return!0}return!1}function bP(a){var b=p,c,d=G,e=x;if(e.id===";")be("Unnecessary semicolon.",e),bm(";");else{e.identifier&&!e.reserved&&bl().id===":"&&(bm(),bm(":"),G=Object.create(d),bj(e.value,"label"),x.labelled||be("Label '{a}' on {b} statement.",x,e.value,x.value),Z.test(e.value+":")&&be("Label '{a}' looks like a javascript url.",e,e.value),x.label=e.value,e=x),a||bt(),c=bn(0,!0),e.block||(!A.expr&&(!c||!c.exps)?be("Expected an assignment or function call and instead saw an expression.",O):A.nonew&&c.id==="("&&c.left.id==="new"&&be("Do not use 'new' for side effects."),x.id!==";"?!A.asi&&(!A.lastsemic||x.id!="}"||x.line!=O.line)&&bf("Missing semicolon.",O.line,O.from+O.value.length):(bo(O,x),bm(";"),br(O,x))),p=b,G=d;return c}}function bO(a){var b=0,c;if(x.id===";"&&!z)for(;;){c=bl(b);if(c.reach)return;if(c.id!=="(endline)"){if(c.id==="function"){be("Inner functions should be listed at the top of the outer function.",c);break}be("Unreachable '{a}' after '{b}'.",c,c.value,a);break}b+=1}}function bN(a){var b=bM(a);if(b)return b;O.id==="function"&&x.id==="("?be("Missing name in function declaration."):bg("Expected an identifier and instead saw '{a}'.",x,x.value)}function bM(a){if(x.identifier){bm(),O.reserved&&!A.es5&&(!a||O.value!="undefined")&&be("Expected an identifier and instead saw '{a}' (a reserved word).",O,O.id);return O.value}}function bL(a,b){var c=bw(a,150);c.led=function(a){A.plusplus?be("Unexpected use of '{a}'.",this,this.id):(!a.identifier||a.reserved)&&a.id!=="."&&a.id!=="["&&be("Bad operand.",this),this.left=a;return this};return c}function bK(a){bw(a,20).exps=!0;return bF(a,function(a,b){A.bitwise&&be("Unexpected use of '{a}'.",b,b.id),br(D,O),br(O,x);if(a){if(a.id==="."||a.id==="["||a.identifier&&!a.reserved){bn(19);return b}a===M["function"]&&be("Expected an identifier in an assignment, and instead saw a function invocation.",O);return b}bg("Bad assignment.",b)},20)}function bJ(a,b,c){var d=bw(a,c);bA(d),d.led=typeof b=="function"?b:function(a){A.bitwise&&be("Unexpected use of '{a}'.",this,this.id),this.left=a,this.right=bn(c);return this};return d}function bI(a,b){bw(a,20).exps=!0;return bF(a,function(a,b){var c;b.left=a,B[a.value]===!1&&G[a.value]["(global)"]===!0?be("Read only.",a):a["function"]&&be("'{a}' is a function.",a,a.value);if(a){if(a.id==="."||a.id==="["){(!a.left||a.left.value==="arguments")&&be("Bad assignment.",b),b.right=bn(19);return b}if(a.identifier&&!a.reserved){j[a.value]==="exception"&&be("Do not assign to the exception parameter.",a),b.right=bn(19);return b}a===M["function"]&&be("Expected an identifier in an assignment and instead saw a function invocation.",O)}bg("Bad assignment.",b)},20)}function bH(a){return a&&(a.type==="(number)"&&+a.value===0||a.type==="(string)"&&a.value===""||a.type==="null"&&!A.eqnull||a.type==="true"||a.type==="false"||a.type==="undefined")}function bG(a,b){var c=bw(a,100);c.led=function(a){bs(D,O),br(O,x);var c=bn(100);a&&a.id==="NaN"||c&&c.id==="NaN"?be("Use the isNaN function to compare with NaN.",this):b&&b.apply(this,[a,c]),a.id==="!"&&be("Confusing use of '{a}'.",a,"!"),c.id==="!"&&be("Confusing use of '{a}'.",a,"!"),this.left=a,this.right=c;return this};return c}function bF(a,b,c,d){var e=bw(a,c);bA(e),e.led=function(a){d||(bs(D,O),br(O,x));if(typeof b=="function")return b(a,this);this.left=a,this.right=bn(c);return this};return e}function bE(a,b){return bD(a,function(){typeof b=="function"&&b(this);return this})}function bD(a,b){var c=bC(a,b);c.identifier=c.reserved=!0;return c}function bC(a,b){var c=bx(a);c.type=a,c.nud=b;return c}function bB(a,b){var c=bw(a,150);bA(c),c.nud=typeof b=="function"?b:function(){this.right=bn(150),this.arity="unary";if(this.id==="++"||this.id==="--")A.plusplus?be("Unexpected use of '{a}'.",this,this.id):(!this.right.identifier||this.right.reserved)&&this.right.id!=="."&&this.right.id!=="["&&be("Bad operand.",this);return this};return c}function bA(a){var b=a.id.charAt(0);if(b>="a"&&b<="z"||b>="A"&&b<="Z")a.identifier=a.reserved=!0;return a}function bz(a,b){var c=by(a,b);c.block=!0;return c}function by(a,b){var c=bx(a);c.identifier=c.reserved=!0,c.fud=b;return c}function bx(a){return bw(a,0)}function bw(a,b){var c=M[a];if(!c||typeof c!="object")M[a]=c={id:a,lbp:b,value:a};return c}function bv(){O.line!==x.line?A.laxbreak||be("Bad line breaking before '{a}'.",O,x.id):O.character!==x.from&&A.white&&be("Unexpected space after '{a}'.",x,O.value),bm(","),br(O,x)}function bu(a){a=a||O,a.line!==x.line&&be("Line breaking error '{a}'.",a,a.value)}function bt(a){var b;A.white&&x.id!=="(end)"&&(b=p+(a||0),x.from!==b&&be("Expected '{a}' to have an indentation at {b} instead at {c}.",x,x.value,b,x.from))}function bs(a,b){a=a||O,b=b||x,!A.laxbreak&&a.line!==b.line?be("Bad line breaking before '{a}'.",b,b.id):A.white&&(a=a||O,b=b||x,a.character===b.from&&be("Missing space after '{a}'.",x,a.value))}function br(a,b){A.white&&(a=a||O,b=b||x,a.line===b.line&&a.character===b.from&&be("Missing space after '{a}'.",x,a.value))}function bq(a,b){a=a||O,b=b||x,A.white&&!a.comment&&a.line===b.line&&bo(a,b)}function bp(a,b){a=a||O,b=b||x,A.white&&(a.character!==b.from||a.line!==b.line)&&be("Unexpected space before '{a}'.",b,b.value)}function bo(a,b){a=a||O,b=b||x,A.white&&a.character!==b.from&&a.line===b.line&&be("Unexpected space after '{a}'.",b,a.value)}function bn(b,c){var d,e=!1;x.id==="(end)"&&bg("Unexpected early end of program.",O),bm(),c&&(a="anonymous",j["(verb)"]=O.value);if(c===!0&&O.fud)d=O.fud();else{if(O.nud)d=O.nud();else{if(x.type==="(number)"&&O.id==="."){be("A leading decimal point can be confused with a dot: '.{a}'.",O,x.value),bm();return O}bg("Expected an identifier and instead saw '{a}'.",O,O.id)}while(b=A.maxerr&&bd("Too many errors.",i,h);return j}function bd(a,b,c){var d=Math.floor(b/s.length*100);throw{name:"JSHintError",line:b,character:c,message:a+" ("+d+"% scanned)."}}function bc(){A.couch&&bb(B,f),A.rhino&&bb(B,F),A.prototypejs&&bb(B,E),A.node&&bb(B,y),A.devel&&bb(B,g),A.dojo&&bb(B,h),A.browser&&bb(B,e),A.jquery&&bb(B,r),A.mootools&&bb(B,w),A.wsh&&bb(B,R),A.globalstrict&&A.strict!==!1&&(A.strict=!0)}function bb(a,b){var c;for(c in b)ba(b,c)&&(a[c]=b[c])}function ba(a,b){return Object.prototype.hasOwnProperty.call(a,b)}function _(){}"use strict";var a,b={"<":!0,"<=":!0,"==":!0,"===":!0,"!==":!0,"!=":!0,">":!0,">=":!0,"+":!0,"-":!0,"*":!0,"/":!0,"%":!0},c={asi:!0,bitwise:!0,boss:!0,browser:!0,couch:!0,curly:!0,debug:!0,devel:!0,dojo:!0,eqeqeq:!0,eqnull:!0,es5:!0,evil:!0,expr:!0,forin:!0,globalstrict:!0,immed:!0,iterator:!0,jquery:!0,latedef:!0,laxbreak:!0,loopfunc:!0,mootools:!0,newcap:!0,noarg:!0,node:!0,noempty:!0,nonew:!0,nomen:!0,onevar:!0,passfail:!0,plusplus:!0,proto:!0,prototypejs:!0,regexdash:!0,regexp:!0,rhino:!0,undef:!0,scripturl:!0,shadow:!0,strict:!0,sub:!0,supernew:!0,trailing:!0,white:!0,wsh:!0},e={ArrayBuffer:!1,ArrayBufferView:!1,addEventListener:!1,applicationCache:!1,blur:!1,clearInterval:!1,clearTimeout:!1,close:!1,closed:!1,DataView:!1,defaultStatus:!1,document:!1,event:!1,FileReader:!1,Float32Array:!1,Float64Array:!1,focus:!1,frames:!1,getComputedStyle:!1,HTMLElement:!1,history:!1,Int16Array:!1,Int32Array:!1,Int8Array:!1,Image:!1,length:!1,localStorage:!1,location:!1,moveBy:!1,moveTo:!1,name:!1,navigator:!1,onbeforeunload:!0,onblur:!0,onerror:!0,onfocus:!0,onload:!0,onresize:!0,onunload:!0,open:!1,openDatabase:!1,opener:!1,Option:!1,parent:!1,print:!1,removeEventListener:!1,resizeBy:!1,resizeTo:!1,screen:!1,scroll:!1,scrollBy:!1,scrollTo:!1,setInterval:!1,setTimeout:!1,status:!1,top:!1,Uint16Array:!1,Uint32Array:!1,Uint8Array:!1,WebSocket:!1,window:!1,Worker:!1,XMLHttpRequest:!1,XPathEvaluator:!1,XPathException:!1,XPathExpression:!1,XPathNamespace:!1,XPathNSResolver:!1,XPathResult:!1},f={require:!1,respond:!1,getRow:!1,emit:!1,send:!1,start:!1,sum:!1,log:!1,exports:!1,module:!1},g={alert:!1,confirm:!1,console:!1,Debug:!1,opera:!1,prompt:!1},h={dojo:!1,dijit:!1,dojox:!1,define:!1,require:!1},i={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"/":"\\/","\\":"\\\\"},j,k=["closure","exception","global","label","outer","unused","var"],l,m,n,o,p,q,r={$:!1,jQuery:!1},s,t,u,v,w={$:!1,$$:!1,Assets:!1,Browser:!1,Chain:!1,Class:!1,Color:!1,Cookie:!1,Core:!1,Document:!1,DomReady:!1,DOMReady:!1,Drag:!1,Element:!1,Elements:!1,Event:!1,Events:!1,Fx:!1,Group:!1,Hash:!1,HtmlTable:!1,Iframe:!1,IframeShim:!1,InputValidator:!1,instanceOf:!1,Keyboard:!1,Locale:!1,Mask:!1,MooTools:!1,Native:!1,Options:!1,OverText:!1,Request:!1,Scroller:!1,Slick:!1,Slider:!1,Sortables:!1,Spinner:!1,Swiff:!1,Tips:!1,Type:!1,typeOf:!1,URI:!1,Window:!1},x,y={__filename:!1,__dirname:!1,exports:!1,Buffer:!1,GLOBAL:!1,global:!1,module:!1,process:!1,require:!1},z,A,B,C,D,E={$:!1,$$:!1,$A:!1,$F:!1,$H:!1,$R:!1,$break:!1,$continue:!1,$w:!1,Abstract:!1,Ajax:!1,Class:!1,Enumerable:!1,Element:!1,Event:!1,Field:!1,Form:!1,Hash:!1,Insertion:!1,ObjectRange:!1,PeriodicalExecuter:!1,Position:!1,Prototype:!1,Selector:!1,Template:!1,Toggle:!1,Try:!1,Autocompleter:!1,Builder:!1,Control:!1,Draggable:!1,Draggables:!1,Droppables:!1,Effect:!1,Sortable:!1,SortableObserver:!1,Sound:!1,Scriptaculous:!1},F={defineClass:!1,deserialize:!1,gc:!1,help:!1,load:!1,loadClass:!1,print:!1,quit:!1,readFile:!1,readUrl:!1,runCommand:!1,seal:!1,serialize:!1,spawn:!1,sync:!1,toint32:!1,version:!1},G,H,I,J={Array:!1,Boolean:!1,Date:!1,decodeURI:!1,decodeURIComponent:!1,encodeURI:!1,encodeURIComponent:!1,Error:!1,eval:!1,EvalError:!1,Function:!1,hasOwnProperty:!1,isFinite:!1,isNaN:!1,JSON:!1,Math:!1,Number:!1,Object:!1,parseInt:!1,parseFloat:!1,RangeError:!1,ReferenceError:!1,RegExp:!1,String:!1,SyntaxError:!1,TypeError:!1,URIError:!1},K={E:!0,LN2:!0,LN10:!0,LOG2E:!0,LOG10E:!0,MAX_VALUE:!0,MIN_VALUE:!0,NEGATIVE_INFINITY:!0,PI:!0,POSITIVE_INFINITY:!0,SQRT1_2:!0,SQRT2:!0},L,M={},N,O,P,Q,R={ActiveXObject:!0,Enumerator:!0,GetObject:!0,ScriptEngine:!0,ScriptEngineBuildVersion:!0,ScriptEngineMajorVersion:!0,ScriptEngineMinorVersion:!0,VBArray:!0,WSH:!0,WScript:!0},S,T,U,V,W,X,Y,Z,$;(function(){S=/@cc|<\/?|script|\]\s*\]|<\s*!|</i,T=/[\u0000-\u001f\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,U=/^\s*([(){}\[.,:;'"~\?\]#@]|==?=?|\/(\*(jshint|jslint|members?|global)?|=|\/)?|\*[\/=]?|\+(?:=|\++)?|-(?:=|-+)?|%=?|&[&=]?|\|[|=]?|>>?>?=?|<([\/=!]|\!(\[|--)?|<=?)?|\^=?|\!=?=?|[a-zA-Z_$][a-zA-Z0-9_$]*|[0-9]+([xX][0-9a-fA-F]+|\.[0-9]*)?([eE][+\-]?[0-9]+)?)/,V=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/,W=/[\u0000-\u001f&<"\/\\\u007f-\u009f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,X=/\*\/|\/\*/,Y=/^([a-zA-Z_$][a-zA-Z0-9_$]*)$/,Z=/^(?:javascript|jscript|ecmascript|vbscript|mocha|livescript)\s*:/i,$=/^\s*\/\*\s*falls\sthrough\s*\*\/\s*$/})(),typeof Array.isArray!="function"&&(Array.isArray=function(a){return Object.prototype.toString.apply(a)==="[object Array]"}),typeof Object.create!="function"&&(Object.create=function(a){_.prototype=a;return new _}),typeof Object.keys!="function"&&(Object.keys=function(a){var b=[],c;for(c in a)ba(a,c)&&b.push(c);return b}),typeof String.prototype.entityify!="function"&&(String.prototype.entityify=function(){return this.replace(/&/g,"&").replace(//g,">")}),typeof String.prototype.isAlpha!="function"&&(String.prototype.isAlpha=function(){return this>="a"&&this<="z￿"||this>="A"&&this<="Z￿"}),typeof String.prototype.isDigit!="function"&&(String.prototype.isDigit=function(){return this>="0"&&this<="9"}),typeof String.prototype.supplant!="function"&&(String.prototype.supplant=function(a){return this.replace(/\{([^{}]*)\}/g,function(b,c){var d=a[c];return typeof d=="string"||typeof d=="number"?d:b})}),typeof String.prototype.name!="function"&&(String.prototype.name=function(){return Y.test(this)?this:V.test(this)?'"'+this.replace(W,function(a){var b=i[a];return b?b:"\\u"+("0000"+a.charCodeAt().toString(16)).slice(-4)})+'"':'"'+this+'"'});var bi=function(){function f(d,e){var f,g;d==="(color)"||d==="(range)"?g={type:d}:d==="(punctuator)"||d==="(identifier)"&&ba(M,e)?g=M[e]||M["(error)"]:g=M[d],g=Object.create(g),(d==="(string)"||d==="(range)")&&!A.scripturl&&Z.test(e)&&bf("Script URL.",c,b),d==="(identifier)"&&(g.identifier=!0,e==="__proto__"&&!A.proto?bf("The '{a}' property is deprecated.",c,b,e):e==="__iterator__"&&!A.iterator?bf("'{a}' is only available in JavaScript 1.7.",c,b,e):A.nomen&&(e.charAt(0)==="_"||e.charAt(e.length-1)==="_")&&bf("Unexpected {a} in '{b}'.",c,b,"dangling '_'",e)),g.value=e,g.line=c,g.character=a,g.from=b,f=g.id,f!=="(endline)"&&(C=f&&("(,=:[!&|?{};".indexOf(f.charAt(f.length-1))>=0||f==="return"));return g}function e(){var b,e;if(c>=s.length)return!1;a=1,d=s[c],c+=1,b=d.search(/ \t/),b>=0&&bf("Mixed spaces and tabs.",c,b+1),d=d.replace(/\t/g,N),b=d.search(T),b>=0&&bf("Unsafe character.",c,b),A.maxlen&&A.maxlen=32&&e<=126&&e!==34&&e!==92&&e!==39&&bf("Unnecessary escapement.",c,a),a+=b,h=String.fromCharCode(e)}var h,i,j="";q&&g!=='"'&&bf("Strings must use doublequote.",c,a),i=0;for(;;){while(i>=d.length)i=0,e()||bh("Unclosed string.",c,b);h=d.charAt(i);if(h===g){a+=1,d=d.substr(i+1);return f("(string)",j,g)}if(h<" "){if(h==="\n"||h==="\r")break;bf("Control character in string: {a}.",c,a+i,d.slice(0,i))}else if(h==="\\"){i+=1,a+=1,h=d.charAt(i);switch(h){case"\\":case'"':case"/":break;case"'":q&&bf("Avoid \\'.",c,a);break;case"b":h="\b";break;case"f":h="\f";break;case"n":h="\n";break;case"r":h="\r";break;case"t":h="\t";break;case"u":k(4);break;case"v":q&&bf("Avoid \\v.",c,a),h=" ";break;case"x":q&&bf("Avoid \\x-.",c,a),k(2);break;default:bf("Bad escapement.",c,a)}}j+=h,a+=1,i+=1}}function s(c){var e=c.exec(d),f;if(e){n=e[0].length,f=e[1],h=f.charAt(0),d=d.substr(n),b=a+n-f.length,a+=n;return f}}var g,h,i,j,k,l,m,n,o,p,r;for(;;){if(!d)return f(e()?"(endline)":"(end)","");r=s(U);if(!r){r="",h="";while(d&&d<"!")d=d.substr(1);d&&bh("Unexpected '{a}'.",c,a,d.substr(0,1))}else{if(h.isAlpha()||h==="_"||h==="$")return f("(identifier)",r);if(h.isDigit()){isFinite(Number(r))||bf("Bad number '{a}'.",c,a,r),d.substr(0,1).isAlpha()&&bf("Missing space after '{a}'.",c,a,r),h==="0"&&(j=r.substr(1,1),j.isDigit()?O.id!=="."&&bf("Don't use extra leading zeros '{a}'.",c,a,r):q&&(j==="x"||j==="X")&&bf("Avoid 0x-. '{a}'.",c,a,r)),r.substr(r.length-1)==="."&&bf("A trailing decimal point can be confused with a dot '{a}'.",c,a,r);return f("(number)",r)}switch(r){case'"':case"'":return t(r);case"//":H&&bf("Unexpected comment.",c,a),d="",O.comment=!0;break;case"/*":H&&bf("Unexpected comment.",c,a);for(;;){m=d.search(X);if(m>=0)break;e()||bh("Unclosed comment.",c,a)}a+=m+2,d.substr(m,1)==="/"&&bh("Nested comment.",c,a),d=d.substr(m+2),O.comment=!0;break;case"/*members":case"/*member":case"/*jshint":case"/*jslint":case"/*global":case"*/":return{value:r,type:"special",line:c,character:a,from:b};case"":break;case"/":O.id==="/="&&bh("A regular expression literal can be confused with '/='.",c,b);if(C){k=0,i=0,n=0;for(;;){g=!0,h=d.charAt(n),n+=1;switch(h){case"":bh("Unclosed regular expression.",c,b);return;case"/":k>0&&bf("Unescaped '{a}'.",c,b+n,"/"),h=d.substr(0,n-1),p={g:!0,i:!0,m:!0};while(p[d.charAt(n)]===!0)p[d.charAt(n)]=!1,n+=1;a+=n,d=d.substr(n),p=d.charAt(0),(p==="/"||p==="*")&&bh("Confusing regular expression.",c,b);return f("(regexp)",h);case"\\":h=d.charAt(n),h<" "?bf("Unexpected control character in regular expression.",c,b+n):h==="<"&&bf("Unexpected escaped character '{a}' in regular expression.",c,b+n,h),n+=1;break;case"(":k+=1,g=!1;if(d.charAt(n)==="?"){n+=1;switch(d.charAt(n)){case":":case"=":case"!":n+=1;break;default:bf("Expected '{a}' and instead saw '{b}'.",c,b+n,":",d.charAt(n))}}else i+=1;break;case"|":g=!1;break;case")":k===0?bf("Unescaped '{a}'.",c,b+n,")"):k-=1;break;case" ":p=1;while(d.charAt(n)===" ")n+=1,p+=1;p>1&&bf("Spaces are hard to count. Use {{a}}.",c,b+n,p);break;case"[":h=d.charAt(n),h==="^"&&(n+=1,A.regexp?bf("Insecure '{a}'.",c,b+n,h):d.charAt(n)==="]"&&bh("Unescaped '{a}'.",c,b+n,"^")),p=!1,h==="]"&&(bf("Empty class.",c,b+n-1),p=!0);klass:do{h=d.charAt(n),n+=1;switch(h){case"[":case"^":bf("Unescaped '{a}'.",c,b+n,h),p=!0;break;case"-":p?p=!1:(bf("Unescaped '{a}'.",c,b+n,"-"),p=!0);break;case"]":!p&&!A.regexdash&&bf("Unescaped '{a}'.",c,b+n-1,"-");break klass;case"\\":h=d.charAt(n),h<" "?bf("Unexpected control character in regular expression.",c,b+n):h==="<"&&bf("Unexpected escaped character '{a}' in regular expression.",c,b+n,h),n+=1,p=!0;break;case"/":bf("Unescaped '{a}'.",c,b+n-1,"/"),p=!0;break;case"<":p=!0;break;default:p=!0}}while(h);break;case".":A.regexp&&bf("Insecure '{a}'.",c,b+n,h);break;case"]":case"?":case"{":case"}":case"+":case"*":bf("Unescaped '{a}'.",c,b+n,h)}if(g)switch(d.charAt(n)){case"?":case"+":case"*":n+=1,d.charAt(n)==="?"&&(n+=1);break;case"{":n+=1,h=d.charAt(n),(h<"0"||h>"9")&&bf("Expected a number and instead saw '{a}'.",c,b+n,h),n+=1,o=+h;for(;;){h=d.charAt(n);if(h<"0"||h>"9")break;n+=1,o=+h+o*10}l=o;if(h===","){n+=1,l=Infinity,h=d.charAt(n);if(h>="0"&&h<="9"){n+=1,l=+h;for(;;){h=d.charAt(n);if(h<"0"||h>"9")break;n+=1,l=+h+l*10}}}d.charAt(n)!=="}"?bf("Expected '{a}' and instead saw '{b}'.",c,b+n,"}",h):n+=1,d.charAt(n)==="?"&&(n+=1),o>l&&bf("'{a}' should not be greater than '{b}'.",c,b+n,o,l)}}h=d.substr(0,n-1),a+=n,d=d.substr(n);return f("(regexp)",h)}return f("(punctuator)",r);case"#":return f("(punctuator)",r);default:return f("(punctuator)",r)}}}}}}();bC("(number)",function(){return this}),bC("(string)",function(){return this}),M["(identifier)"]={type:"(identifier)",lbp:0,identifier:!0,nud:function(){var b=this.value,c=G[b],d;typeof c=="function"?c=undefined:typeof c=="boolean"&&(d=j,j=l[0],bj(b,"var"),c=j,j=d);if(j===c)switch(j[b]){case"unused":j[b]="var";break;case"unction":j[b]="function",this["function"]=!0;break;case"function":this["function"]=!0;break;case"label":be("'{a}' is a statement label.",O,b)}else if(j["(global)"])a!="typeof"&&a!="delete"&&A.undef&&typeof B[b]!="boolean"&&be("'{a}' is not defined.",O,b),bU(O);else switch(j[b]){case"closure":case"function":case"var":case"unused":be("'{a}' used out of scope.",O,b);break;case"label":be("'{a}' is a statement label.",O,b);break;case"outer":case"global":break;default:if(c===!0)j[b]=!0;else if(c===null)be("'{a}' is not allowed.",O,b),bU(O);else if(typeof c!="object")a!="typeof"&&a!="delete"&&A.undef?be("'{a}' is not defined.",O,b):j[b]=!0,bU(O);else switch(c[b]){case"function":case"unction":this["function"]=!0,c[b]="closure",j[b]=c["(global)"]?"global":"outer";break;case"var":case"unused":c[b]="closure",j[b]=c["(global)"]?"global":"outer";break;case"closure":case"parameter":j[b]=c["(global)"]?"global":"outer";break;case"label":be("'{a}' is a statement label.",O,b)}}return this},led:function(){bg("Expected an operator and instead saw '{a}'.",x,x.value)}},bC("(regexp)",function(){return this}),bx("(endline)"),bx("(begin)"),bx("(end)").reach=!0,bx(""),bx("(error)").reach=!0,bx("}").reach=!0,bx(")"),bx("]"),bx('"').reach=!0,bx("'").reach=!0,bx(";"),bx(":").reach=!0,bx(","),bx("#"),bx("@"),bD("else"),bD("case").reach=!0,bD("catch"),bD("default").reach=!0,bD("finally"),bE("arguments",function(a){L&&j["(global)"]&&be("Strict violation.",a)}),bE("eval"),bE("false"),bE("Infinity"),bE("NaN"),bE("null"),bE("this",function(a){L&&(j["(statement)"]&&j["(name)"].charAt(0)>"Z"||j["(global)"])&&be("Strict violation.",a)}),bE("true"),bE("undefined"),bI("=","assign",20),bI("+=","assignadd",20),bI("-=","assignsub",20),bI("*=","assignmult",20),bI("/=","assigndiv",20).nud=function(){bg("A regular expression literal can be confused with '/='.")},bI("%=","assignmod",20),bK("&=","assignbitand",20),bK("|=","assignbitor",20),bK("^=","assignbitxor",20),bK("<<=","assignshiftleft",20),bK(">>=","assignshiftright",20),bK(">>>=","assignshiftrightunsigned",20),bF("?",function(a,b){b.left=a,b.right=bn(10),bm(":"),b["else"]=bn(10);return b},30),bF("||","or",40),bF("&&","and",50),bJ("|","bitor",70),bJ("^","bitxor",80),bJ("&","bitand",90),bG("==",function(a,b){var c=A.eqnull&&(a.value=="null"||b.value=="null");!c&&A.eqeqeq?be("Expected '{a}' and instead saw '{b}'.",this,"===","=="):bH(a)?be("Use '{a}' to compare with '{b}'.",this,"===",a.value):bH(b)&&be("Use '{a}' to compare with '{b}'.",this,"===",b.value);return this}),bG("==="),bG("!=",function(a,b){var c=A.eqnull&&(a.value=="null"||b.value=="null");!c&&A.eqeqeq?be("Expected '{a}' and instead saw '{b}'.",this,"!==","!="):bH(a)?be("Use '{a}' to compare with '{b}'.",this,"!==",a.value):bH(b)&&be("Use '{a}' to compare with '{b}'.",this,"!==",b.value);return this}),bG("!=="),bG("<"),bG(">"),bG("<="),bG(">="),bJ("<<","shiftleft",120),bJ(">>","shiftright",120),bJ(">>>","shiftrightunsigned",120),bF("in","in",120),bF("instanceof","instanceof",120),bF("+",function(a,b){var c=bn(130);if(a&&c&&a.id==="(string)"&&c.id==="(string)"){a.value+=c.value,a.character=c.character,!A.scripturl&&Z.test(a.value)&&be("JavaScript URL.",a);return a}b.left=a,b.right=c;return b},130),bB("+","num"),bB("+++",function(){be("Confusing pluses."),this.right=bn(150),this.arity="unary";return this}),bF("+++",function(a){be("Confusing pluses."),this.left=a,this.right=bn(130);return this},130),bF("-","sub",130),bB("-","neg"),bB("---",function(){be("Confusing minuses."),this.right=bn(150),this.arity="unary";return this}),bF("---",function(a){be("Confusing minuses."),this.left=a,this.right=bn(130);return this},130),bF("*","mult",140),bF("/","div",140),bF("%","mod",140),bL("++","postinc"),bB("++","preinc"),M["++"].exps=!0,bL("--","postdec"),bB("--","predec"),M["--"].exps=!0,bB("delete",function(){var a=bn(0);(!a||a.id!=="."&&a.id!=="[")&&be("Variables should not be deleted."),this.first=a;return this}).exps=!0,bB("~",function(){A.bitwise&&be("Unexpected '{a}'.",this,"~"),bn(150);return this}),bB("!",function(){this.right=bn(150),this.arity="unary",b[this.right.id]===!0&&be("Confusing use of '{a}'.",this,"!");return this}),bB("typeof","typeof"),bB("new",function(){var a=bn(155),b;if(a&&a.id!=="function")if(a.identifier){a["new"]=!0;switch(a.value){case"Object":be("Use the object literal notation {}.",O);break;case"Number":case"String":case"Boolean":case"Math":case"JSON":be("Do not use {a} as a constructor.",O,a.value);break;case"Function":A.evil||be("The Function constructor is eval.");break;case"Date":case"RegExp":break;default:a.id!=="function"&&(b=a.value.substr(0,1),A.newcap&&(b<"A"||b>"Z")&&be("A constructor name should start with an uppercase letter.",O))}}else a.id!=="."&&a.id!=="["&&a.id!=="("&&be("Bad constructor.",O);else A.supernew||be("Weird construction. Delete 'new'.",this);bo(O,x),x.id!=="("&&!A.supernew&&be("Missing '()' invoking a constructor."),this.first=a;return this}),M["new"].exps=!0,bB("void").exps=!0,bF(".",function(a,b){bo(D,O),bp();var c=bN();typeof c=="string"&&bT(c),b.left=a,b.right=c,A.noarg&&a&&a.value==="arguments"&&(c==="callee"||c==="caller")?be("Avoid arguments.{a}.",a,c):!A.evil&&a&&a.value==="document"&&(c==="write"||c==="writeln")&&be("document.write can be a form of eval.",a),!A.evil&&(c==="eval"||c==="execScript")&&be("eval is evil.");return b},160,!0),bF("(",function(a,b){D.id!=="}"&&D.id!==")"&&bp(D,O),bq(),A.immed&&!a.immed&&a.id==="function"&&be("Wrap an immediate function invocation in parentheses to assist the reader in understanding that the expression is the result of a function, and not the function itself.");var c=0,d=[];a&&a.type==="(identifier)"&&a.value.match(/^[A-Z]([A-Z0-9_$]*[a-z][A-Za-z0-9_$]*)?$/)&&a.value!=="Number"&&a.value!=="String"&&a.value!=="Boolean"&&a.value!=="Date"&&(a.value==="Math"?be("Math is not a function.",a):A.newcap&&be("Missing 'new' prefix when invoking a constructor.",a));if(x.id!==")")for(;;){d[d.length]=bn(10),c+=1;if(x.id!==",")break;bv()}bm(")"),bq(D,O),typeof a=="object"&&(a.value==="parseInt"&&c===1&&be("Missing radix parameter.",a),A.evil||(a.value==="eval"||a.value==="Function"||a.value==="execScript"?be("eval is evil.",a):d[0]&&d[0].id==="(string)"&&(a.value==="setTimeout"||a.value==="setInterval")&&be("Implied eval is evil. Pass a function instead of a string.",a)),!a.identifier&&a.id!=="."&&a.id!=="["&&a.id!=="("&&a.id!=="&&"&&a.id!=="||"&&a.id!=="?"&&be("Bad invocation.",a)),b.left=a;return b},155,!0).exps=!0,bB("(",function(){bq(),x.id==="function"&&(x.immed=!0);var a=bn(0);bm(")",this),bq(D,O),A.immed&&a.id==="function"&&(x.id==="("?be("Move the invocation into the parens that contain the function.",x):be("Do not wrap function literals in parens unless they are to be immediately invoked.",this));return a}),bF("[",function(a,b){bp(D,O),bq();var c=bn(0),d;c&&c.type==="(string)"&&(!A.evil&&(c.value==="eval"||c.value==="execScript")&&be("eval is evil.",b),bT(c.value),!A.sub&&Y.test(c.value)&&(d=M[c.value],(!d||!d.reserved)&&be("['{a}'] is better written in dot notation.",c,c.value))),bm("]",b),bq(D,O),b.left=a,b.right=c;return b},160,!0),bB("[",function(){var a=O.line!==x.line;this.first=[],a&&(p+=A.indent,x.from===p+A.indent&&(p+=A.indent));while(x.id!=="(end)"){while(x.id===",")be("Extra comma."),bm(",");if(x.id==="]")break;a&&O.line!==x.line&&bt(),this.first.push(bn(10));if(x.id!==",")break;bv();if(x.id==="]"&&!A.es5){be("Extra comma.",O);break}}a&&(p-=A.indent,bt()),bm("]",this);return this},160),function(a){a.nud=function(){var a,b,c,d,e,f={},g;a=O.line!==x.line,a&&(p+=A.indent,x.from===p+A.indent&&(p+=A.indent));for(;;){if(x.id==="}")break;a&&bt();if(x.value==="get"&&bl().id!==":")bm("get"),A.es5||bg("get/set are ES5 features."),c=bV(),c||bg("Missing property name."),g=x,bo(O,x),b=bX(),!A.loopfunc&&j["(loopage)"]&&be("Don't make functions within a loop.",g),e=b["(params)"],e&&be("Unexpected parameter '{a}' in get {b} function.",g,e[0],c),bo(O,x),bm(","),bt(),bm("set"),d=bV(),c!==d&&bg("Expected {a} and instead saw {b}.",O,c,d),g=x,bo(O,x),b=bX(),e=b["(params)"],(!e||e.length!==1||e[0]!=="value")&&be("Expected (value) in set {a} function.",g,c);else{c=bV();if(typeof c!="string")break;bm(":"),br(O,x),bn(10)}f[c]===!0&&be("Duplicate member '{a}'.",x,c),f[c]=!0,bT(c);if(x.id===",")bv(),x.id===","?be("Extra comma.",O):x.id==="}"&&!A.es5&&be("Extra comma.",O);else break}a&&(p-=A.indent,bt()),bm("}",this);return this},a.fud=function(){bg("Expected to see a statement and instead saw a block.",O)}}(bx("{"));var bY=by("var",function(a){var b,c,d;j["(onevar)"]&&A.onevar?be("Too many var statements."):j["(global)"]||(j["(onevar)"]=!0),this.first=[];for(;;){br(O,x),b=bN(),j["(global)"]&&B[b]===!1&&be("Redefinition of '{a}'.",O,b),bj(b,"unused");if(a)break;c=O,this.first.push(O),x.id==="="&&(br(O,x),bm("="),br(O,x),x.id==="undefined"&&be("It is not necessary to initialize '{a}' to 'undefined'.",O,b),bl(0).id==="="&&x.identifier&&bg("Variable {a} was not declared correctly.",x,x.value),d=bn(0),c.first=d);if(x.id!==",")break;bv()}return this});bY.exps=!0,bz("function",function(){o&&be("Function declarations should not be placed in blocks. Use a function expression or move the statement to the top of the outer function.",O);var a=bN();bo(O,x),bj(a,"unction"),bX(a,!0),x.id==="("&&x.line===O.line&&bg("Function declarations are not invocable. Wrap the whole function invocation in parens.");return this}),bB("function",function(){var a=bM();a?bo(O,x):br(O,x),bX(a),!A.loopfunc&&j["(loopage)"]&&be("Don't make functions within a loop.");return this}),bz("if",function(){var a=x;bm("("),br(this,a),bq(),bn(20),x.id==="="&&(A.boss||be("Expected a conditional expression and instead saw an assignment."),bm("="),bn(20)),bm(")",a),bq(D,O),bS(!0,!0),x.id==="else"&&(br(O,x),bm("else"),x.id==="if"||x.id==="switch"?bP(!0):bS(!0,!0));return this}),bz("try",function(){var a,b,c;bS(!1),x.id==="catch"&&(bm("catch"),br(O,x),bm("("),c=G,G=Object.create(c),b=x.value,x.type!=="(identifier)"?be("Expected an identifier and instead saw '{a}'.",x,b):bj(b,"exception"),bm(),bm(")"),bS(!1),a=!0,G=c);if(x.id==="finally")bm("finally"),bS(!1);else{a||bg("Expected '{a}' and instead saw '{b}'.",x,"catch",x.value);return this}}),bz("while",function(){var a=x;j["(breakage)"]+=1,j["(loopage)"]+=1,bm("("),br(this,a),bq(),bn(20),x.id==="="&&(A.boss||be("Expected a conditional expression and instead saw an assignment."),bm("="),bn(20)),bm(")",a),bq(D,O),bS(!0,!0),j["(breakage)"]-=1,j["(loopage)"]-=1;return this}).labelled=!0,bD("with"),bz("switch",function(){var a=x,b=!1;j["(breakage)"]+=1,bm("("),br(this,a),bq(),this.condition=bn(20),bm(")",a),bq(D,O),br(O,x),a=x,bm("{"),br(O,x),p+=A.indent,this.cases=[];for(;;)switch(x.id){case"case":switch(j["(verb)"]){case"break":case"case":case"continue":case"return":case"switch":case"throw":break;default:$.test(s[x.line-2])||be("Expected a 'break' statement before 'case'.",O)}bt(-A.indent),bm("case"),this.cases.push(bn(20)),b=!0,bm(":"),j["(verb)"]="case";break;case"default":switch(j["(verb)"]){case"break":case"continue":case"return":case"throw":break;default:$.test(s[x.line-2])||be("Expected a 'break' statement before 'default'.",O)}bt(-A.indent),bm("default"),b=!0,bm(":");break;case"}":p-=A.indent,bt(),bm("}",a),(this.cases.length===1||this.condition.id==="true"||this.condition.id==="false")&&be("This 'switch' should be an 'if'.",this),j["(breakage)"]-=1,j["(verb)"]=undefined;return;case"(end)":bg("Missing '{a}'.",x,"}");return;default:if(b)switch(O.id){case",":bg("Each value should have its own case label.");return;case":":bR();break;default:bg("Missing ':' on a case clause.",O)}else bg("Expected '{a}' and instead saw '{b}'.",x,"case",x.value)}}).labelled=!0,by("debugger",function(){A.debug||be("All 'debugger' statements should be removed.");return this}).exps=!0,function(){var a=by("do",function(){j["(breakage)"]+=1,j["(loopage)"]+=1,this.first=bS(!0),bm("while");var a=x;br(O,a),bm("("),bq(),bn(20),x.id==="="&&(A.boss||be("Expected a conditional expression and instead saw an assignment."),bm("="),bn(20)),bm(")",a),bq(D,O),j["(breakage)"]-=1,j["(loopage)"]-=1;return this});a.labelled=!0,a.exps=!0}(),bz("for",function(){var a,b=x;j["(breakage)"]+=1,j["(loopage)"]+=1,bm("("),br(this,b),bq();if(bl(x.id==="var"?1:0).id==="in"){if(x.id==="var")bm("var"),bY.fud.call(bY,!0);else{switch(j[x.value]){case"unused":j[x.value]="var";break;case"var":break;default:be("Bad for in variable '{a}'.",x,x.value)}bm()}bm("in"),bn(20),bm(")",b),a=bS(!0,!0),A.forin&&(a.length>1||typeof a[0]!="object"||a[0].value!=="if")&&be("The body of a for in should be wrapped in an if statement to filter unwanted properties from the prototype.",this),j["(breakage)"]-=1,j["(loopage)"]-=1;return this}if(x.id!==";")if(x.id==="var")bm("var"),bY.fud.call(bY);else for(;;){bn(0,"for");if(x.id!==",")break;bv()}bu(O),bm(";"),x.id!==";"&&(bn(20),x.id==="="&&(A.boss||be("Expected a conditional expression and instead saw an assignment."),bm("="),bn(20))),bu(O),bm(";"),x.id===";"&&bg("Expected '{a}' and instead saw '{b}'.",x,")",";");if(x.id!==")")for(;;){bn(0,"for");if(x.id!==",")break;bv()}bm(")",b),bq(D,O),bS(!0,!0),j["(breakage)"]-=1,j["(loopage)"]-=1;return this}).labelled=!0,by("break",function(){var a=x.value;j["(breakage)"]===0&&be("Unexpected '{a}'.",x,this.value),bu(this),x.id!==";"&&O.line===x.line&&(j[a]!=="label"?be("'{a}' is not a statement label.",x,a):G[a]!==j&&be("'{a}' is out of scope.",x,a),this.first=x,bm()),bO("break");return this}).exps=!0,by("continue",function(){var a=x.value;j["(breakage)"]===0&&be("Unexpected '{a}'.",x,this.value),bu(this),x.id!==";"?O.line===x.line&&(j[a]!=="label"?be("'{a}' is not a statement label.",x,a):G[a]!==j&&be("'{a}' is out of scope.",x,a),this.first=x,bm()):j["(loopage)"]||be("Unexpected '{a}'.",x,this.value),bO("continue");return this}).exps=!0,by("return",function(){bu(this),x.id==="(regexp)"&&be("Wrap the /regexp/ literal in parens to disambiguate the slash operator."),x.id!==";"&&!x.reach&&(br(O,x),this.first=bn(20)),bO("return");return this}).exps=!0,by("throw",function(){bu(this),br(O,x),this.first=bn(20),bO("throw");return this}).exps=!0,bD("class"),bD("const"),bD("enum"),bD("export"),bD("extends"),bD("import"),bD("super"),bD("let"),bD("yield"),bD("implements"),bD("interface"),bD("package"),bD("private"),bD("protected"),bD("public"),bD("static");var b$=function(a,b,c){var e,f,g;d.errors=[],B=Object.create(J),bb(B,c||{});if(b){e=b.predef;if(e)if(Array.isArray(e))for(f=0;f0&&(a.implieds=d),P.length>0&&(a.urls=P),c=Object.keys(G),c.length>0&&(a.globals=c);for(f=1;f0&&(a.unused=j),h=[];for(i in u)if(typeof u[i]=="number"){a.member=u;break}return a},b$.report=function(a){function o(a,b){var c,d,e;if(b){m.push("
          "+a+" "),b=b.sort();for(d=0;d")}}var b=b$.data(),c=[],d,e,f,g,h,i,j,k="",l,m=[],n;if(b.errors||b.implieds||b.unused){f=!0,m.push("
          Error:");if(b.errors)for(h=0;hProblem"+(isFinite(d.line)?" at line "+d.line+" character "+d.character:"")+": "+d.reason.entityify()+"

          "+(e&&(e.length>80?e.slice(0,77)+"...":e).entityify())+"

          "));if(b.implieds){n=[];for(h=0;h"+b.implieds[h].name+" "+b.implieds[h].line+"";m.push("

          Implied global: "+n.join(", ")+"

          ")}if(b.unused){n=[];for(h=0;h"+b.unused[h].name+" "+b.unused[h].line+" "+b.unused[h]["function"]+"";m.push("

          Unused variable: "+n.join(", ")+"

          ")}b.json&&m.push("

          JSON: bad.

          "),m.push("
          ")}if(!a){m.push("
          "),b.urls&&o("URLs
          ",b.urls,"
          "),b.json&&!f?m.push("

          JSON: good.

          "):b.globals?m.push("
          Global "+b.globals.sort().join(", ")+"
          "):m.push("
          No new global variables introduced.
          ");for(h=0;h
          "+g.line+"-"+g.last+" "+(g.name||"")+"("+(g.param?g.param.join(", "):"")+")
          "),o("Unused",g.unused),o("Closure",g.closure),o("Variable",g["var"]),o("Exception",g.exception),o("Outer",g.outer),o("Global",g.global),o("Label",g.label);if(b.member){c=Object.keys(b.member);if(c.length){c=c.sort(),k="
          /*members ",j=10;for(h=0;h72&&(m.push(k+"
          "),k=" ",j=1),j+=l.length+2,b.member[i]===1&&(l=""+l+""),h*/
          ")}m.push("
          ")}}return m.join("")},b$.jshint=b$,b$.edition="2011-04-16";return b$}();typeof b=="object"&&b&&(b.JSHINT=d)}),define("ace/narcissus/jsparse",["require","exports","module","ace/narcissus/jslex","ace/narcissus/jsdefs"],function(require,exports,module){function parseStdin(a,b){for(;;)try{var c=new lexer.Tokenizer(a,"stdin",b.value),d=Script(c,!1);b.value=c.lineno;return d}catch(e){if(!c.unexpectedEOF)throw e;var f=readline();if(!f)throw e;a+="\n"+f}}function parse(a,b,c){var d=new lexer.Tokenizer(a,b,c),e=Script(d,!1);if(!d.done)throw d.newSyntaxError("Syntax error");return e}function PrimaryExpression(a,b){var c,d,e=a.get(!0);switch(e){case FUNCTION:c=FunctionDefinition(a,b,!1,EXPRESSED_FORM);break;case LEFT_BRACKET:c=new Node(a,{type:ARRAY_INIT});while((e=a.peek(!0))!==RIGHT_BRACKET){if(e===COMMA){a.get(),c.push(null);continue}c.push(AssignExpression(a,b));if(e!==COMMA&&!a.match(COMMA))break}c.children.length===1&&a.match(FOR)&&(d=new Node(a,{type:ARRAY_COMP,expression:c.children[0],tail:ComprehensionTail(a,b)}),c=d),a.mustMatch(RIGHT_BRACKET);break;case LEFT_CURLY:var f,g;c=new Node(a,{type:OBJECT_INIT});object_init:if(!a.match(RIGHT_CURLY)){do{e=a.get();if(a.token.value!=="get"&&a.token.value!=="set"||a.peek()!==IDENTIFIER){switch(e){case IDENTIFIER:case NUMBER:case STRING:f=new Node(a,{type:IDENTIFIER});break;case RIGHT_CURLY:if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal trailing ,");break object_init;default:if(a.token.value in definitions.keywords){f=new Node(a,{type:IDENTIFIER});break}throw a.newSyntaxError("Invalid property name")}if(a.match(COLON))d=new Node(a,{type:PROPERTY_INIT}),d.push(f),d.push(AssignExpression(a,b)),c.push(d);else{if(a.peek()!==COMMA&&a.peek()!==RIGHT_CURLY)throw a.newSyntaxError("missing : after property");c.push(f)}}else{if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal property accessor");c.push(FunctionDefinition(a,b,!0,EXPRESSED_FORM))}}while(a.match(COMMA));a.mustMatch(RIGHT_CURLY)}break;case LEFT_PAREN:c=ParenExpression(a,b),a.mustMatch(RIGHT_PAREN),c.parenthesized=!0;break;case LET:c=LetBlock(a,b,!1);break;case NULL:case THIS:case TRUE:case FALSE:case IDENTIFIER:case NUMBER:case STRING:case REGEXP:c=new Node(a);break;default:throw a.newSyntaxError("missing operand")}return c}function ArgumentList(a,b){var c,d;c=new Node(a,{type:LIST});if(a.match(RIGHT_PAREN,!0))return c;do{d=AssignExpression(a,b);if(d.type===YIELD&&!d.parenthesized&&a.peek()===COMMA)throw a.newSyntaxError("Yield expression must be parenthesized");if(a.match(FOR)){d=GeneratorExpression(a,b,d);if(c.children.length>1||a.peek(!0)===COMMA)throw a.newSyntaxError("Generator expression must be parenthesized")}c.push(d)}while(a.match(COMMA));a.mustMatch(RIGHT_PAREN);return c}function MemberExpression(a,b,c){var d,e,f,g;a.match(NEW)?(d=new Node(a),d.push(MemberExpression(a,b,!1)),a.match(LEFT_PAREN)&&(d.type=NEW_WITH_ARGS,d.push(ArgumentList(a,b)))):d=PrimaryExpression(a,b);while((g=a.get())!==END){switch(g){case DOT:e=new Node(a),e.push(d),a.mustMatch(IDENTIFIER),e.push(new Node(a));break;case LEFT_BRACKET:e=new Node(a,{type:INDEX}),e.push(d),e.push(Expression(a,b)),a.mustMatch(RIGHT_BRACKET);break;case LEFT_PAREN:if(c){e=new Node(a,{type:CALL}),e.push(d),e.push(ArgumentList(a,b));break};default:a.unget();return d}d=e}return d}function UnaryExpression(a,b){var c,d,e;switch(e=a.get(!0)){case DELETE:case VOID:case TYPEOF:case NOT:case BITWISE_NOT:case PLUS:case MINUS:e===PLUS?c=new Node(a,{type:UNARY_PLUS}):e===MINUS?c=new Node(a,{type:UNARY_MINUS}):c=new Node(a),c.push(UnaryExpression(a,b));break;case INCREMENT:case DECREMENT:c=new Node(a),c.push(MemberExpression(a,b,!0));break;default:a.unget(),c=MemberExpression(a,b,!0),a.tokens[a.tokenIndex+a.lookahead-1&3].lineno===a.lineno&&(a.match(INCREMENT)||a.match(DECREMENT))&&(d=new Node(a,{postfix:!0}),d.push(c),c=d)}return c}function MultiplyExpression(a,b){var c,d;c=UnaryExpression(a,b);while(a.match(MUL)||a.match(DIV)||a.match(MOD))d=new Node(a),d.push(c),d.push(UnaryExpression(a,b)),c=d;return c}function AddExpression(a,b){var c,d;c=MultiplyExpression(a,b);while(a.match(PLUS)||a.match(MINUS))d=new Node(a),d.push(c),d.push(MultiplyExpression(a,b)),c=d;return c}function ShiftExpression(a,b){var c,d;c=AddExpression(a,b);while(a.match(LSH)||a.match(RSH)||a.match(URSH))d=new Node(a),d.push(c),d.push(AddExpression(a,b)),c=d;return c}function RelationalExpression(a,b){var c,d,e=b.update({inForLoopInit:!1});c=ShiftExpression(a,e);while(a.match(LT)||a.match(LE)||a.match(GE)||a.match(GT)||!b.inForLoopInit&&a.match(IN)||a.match(INSTANCEOF))d=new Node(a),d.push(c),d.push(ShiftExpression(a,e)),c=d;return c}function EqualityExpression(a,b){var c,d;c=RelationalExpression(a,b);while(a.match(EQ)||a.match(NE)||a.match(STRICT_EQ)||a.match(STRICT_NE))d=new Node(a),d.push(c),d.push(RelationalExpression(a,b)),c=d;return c}function BitwiseAndExpression(a,b){var c,d;c=EqualityExpression(a,b);while(a.match(BITWISE_AND))d=new Node(a),d.push(c),d.push(EqualityExpression(a,b)),c=d;return c}function BitwiseXorExpression(a,b){var c,d;c=BitwiseAndExpression(a,b);while(a.match(BITWISE_XOR))d=new Node(a),d.push(c),d.push(BitwiseAndExpression(a,b)),c=d;return c}function BitwiseOrExpression(a,b){var c,d;c=BitwiseXorExpression(a,b);while(a.match(BITWISE_OR))d=new Node(a),d.push(c),d.push(BitwiseXorExpression(a,b)),c=d;return c}function AndExpression(a,b){var c,d;c=BitwiseOrExpression(a,b);while(a.match(AND))d=new Node(a),d.push(c),d.push(BitwiseOrExpression(a,b)),c=d;return c}function OrExpression(a,b){var c,d;c=AndExpression(a,b);while(a.match(OR))d=new Node(a),d.push(c),d.push(AndExpression(a,b)),c=d;return c}function ConditionalExpression(a,b){var c,d;c=OrExpression(a,b);if(a.match(HOOK)){d=c,c=new Node(a,{type:HOOK}),c.push(d),c.push(AssignExpression(a,b.update({inForLoopInit:!1})));if(!a.match(COLON))throw a.newSyntaxError("missing : after ?");c.push(AssignExpression(a,b))}return c}function AssignExpression(a,b){var c,d;if(a.match(YIELD,!0))return ReturnOrYield(a,b);c=new Node(a,{type:ASSIGN}),d=ConditionalExpression(a,b);if(!a.match(ASSIGN))return d;switch(d.type){case OBJECT_INIT:case ARRAY_INIT:d.destructuredNames=checkDestructuring(a,b,d);case IDENTIFIER:case DOT:case INDEX:case CALL:break;default:throw a.newSyntaxError("Bad left-hand side of assignment")}c.assignOp=a.token.assignOp,c.push(d),c.push(AssignExpression(a,b));return c}function Expression(a,b){var c,d;c=AssignExpression(a,b);if(a.match(COMMA)){d=new Node(a,{type:COMMA}),d.push(c),c=d;do{d=c.children[c.children.length-1];if(d.type===YIELD&&!d.parenthesized)throw a.newSyntaxError("Yield expression must be parenthesized");c.push(AssignExpression(a,b))}while(a.match(COMMA))}return c}function ParenExpression(a,b){var c=Expression(a,b.update({inForLoopInit:b.inForLoopInit&&a.token.type===LEFT_PAREN}));if(a.match(FOR)){if(c.type===YIELD&&!c.parenthesized)throw a.newSyntaxError("Yield expression must be parenthesized");if(c.type===COMMA&&!c.parenthesized)throw a.newSyntaxError("Generator expression must be parenthesized");c=GeneratorExpression(a,b,c)}return c}function HeadExpression(a,b){var c=MaybeLeftParen(a,b),d=ParenExpression(a,b);MaybeRightParen(a,c);if(c===END&&!d.parenthesized){var e=a.peek();if(e!==LEFT_CURLY&&!definitions.isStatementStartCode[e])throw a.newSyntaxError("Unparenthesized head followed by unbraced body")}return d}function ComprehensionTail(a,b){var c,d,e,f,g;c=new Node(a,{type:COMP_TAIL});do{d=new Node(a,{type:FOR_IN,isLoop:!0}),a.match(IDENTIFIER)&&(a.token.value==="each"?d.isEach=!0:a.unget()),g=MaybeLeftParen(a,b);switch(a.get()){case LEFT_BRACKET:case LEFT_CURLY:a.unget(),d.iterator=DestructuringExpression(a,b);break;case IDENTIFIER:d.iterator=f=new Node(a,{type:IDENTIFIER}),f.name=f.value,d.varDecl=e=new Node(a,{type:VAR}),e.push(f),b.parentScript.varDecls.push(f);break;default:throw a.newSyntaxError("missing identifier")}a.mustMatch(IN),d.object=Expression(a,b),MaybeRightParen(a,g),c.push(d)}while(a.match(FOR));a.match(IF)&&(c.guard=HeadExpression(a,b));return c}function GeneratorExpression(a,b,c){return new Node(a,{type:GENERATOR,expression:c,tail:ComprehensionTail(a,b)})}function DestructuringExpression(a,b,c){var d=PrimaryExpression(a,b);d.destructuredNames=checkDestructuring(a,b,d,c);return d}function checkDestructuring(a,b,c,d){if(c.type===ARRAY_COMP)throw a.newSyntaxError("Invalid array comprehension left-hand side");if(c.type===ARRAY_INIT||c.type===OBJECT_INIT){var e={},f,g,h,i,j,k=c.children;for(var l=0,m=k.length;l=0)throw a.newSyntaxError("More than one switch default");case CASE:f=new Node(a),j===DEFAULT?e.defaultIndex=e.cases.length:f.caseLabel=Expression(a,l,COLON);break;default:throw a.newSyntaxError("Invalid switch case")}a.mustMatch(COLON),f.statements=new Node(a,blockInit());while((j=a.peek(!0))!==CASE&&j!==DEFAULT&&j!==RIGHT_CURLY)f.statements.push(Statement(a,l));e.cases.push(f)}return e;case FOR:e=new Node(a,LOOP_INIT),a.match(IDENTIFIER)&&(a.token.value==="each"?e.isEach=!0:a.unget()),b.parenFreeMode||a.mustMatch(LEFT_PAREN),l=b.pushTarget(e).nest(NESTING_DEEP),m=b.update({inForLoopInit:!0}),(j=a.peek())!==SEMICOLON&&(j===VAR||j===CONST?(a.get(),f=Variables(a,m)):j===LET?(a.get(),a.peek()===LEFT_PAREN?f=LetBlock(a,m,!1):(m.parentBlock=e,e.varDecls=[],f=Variables(a,m))):f=Expression(a,m));if(f&&a.match(IN)){e.type=FOR_IN,e.object=Expression(a,m);if(f.type===VAR||f.type===LET){h=f.children;if(h.length!==1&&f.destructurings.length!==1)throw new SyntaxError("Invalid for..in left-hand side",a.filename,f.lineno);f.destructurings.length>0?e.iterator=f.destructurings[0]:e.iterator=h[0],e.varDecl=f}else{if(f.type===ARRAY_INIT||f.type===OBJECT_INIT)f.destructuredNames=checkDestructuring(a,m,f);e.iterator=f}}else{e.setup=f,a.mustMatch(SEMICOLON);if(e.isEach)throw a.newSyntaxError("Invalid for each..in loop");e.condition=a.peek()===SEMICOLON?null:Expression(a,m),a.mustMatch(SEMICOLON),k=a.peek(),e.update=(b.parenFreeMode?k===LEFT_CURLY||definitions.isStatementStartCode[k]:k===RIGHT_PAREN)?null:Expression(a,m)}b.parenFreeMode||a.mustMatch(RIGHT_PAREN),e.body=Statement(a,l);return e;case WHILE:e=new Node(a,{isLoop:!0}),e.condition=HeadExpression(a,b),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP));return e;case DO:e=new Node(a,{isLoop:!0}),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP)),a.mustMatch(WHILE),e.condition=HeadExpression(a,b);if(!b.ecmaStrictMode){a.match(SEMICOLON);return e}break;case BREAK:case CONTINUE:e=new Node(a),l=b.pushTarget(e),a.peekOnSameLine()===IDENTIFIER&&(a.get(),e.label=a.token.value),e.target=e.label?l.labeledTargets.find(function(a){return a.labels.has(e.label)}):l.defaultTarget;if(!e.target)throw a.newSyntaxError("Invalid "+(j===BREAK?"break":"continue"));if(!e.target.isLoop&&j===CONTINUE)throw a.newSyntaxError("Invalid continue");break;case TRY:e=new Node(a,{catchClauses:[]}),e.tryBlock=Block(a,b);while(a.match(CATCH)){f=new Node(a),g=MaybeLeftParen(a,b);switch(a.get()){case LEFT_BRACKET:case LEFT_CURLY:a.unget(),f.varName=DestructuringExpression(a,b,!0);break;case IDENTIFIER:f.varName=a.token.value;break;default:throw a.newSyntaxError("missing identifier in catch")}if(a.match(IF)){if(b.ecma3OnlyMode)throw a.newSyntaxError("Illegal catch guard");if(e.catchClauses.length&&!e.catchClauses.top().guard)throw a.newSyntaxError("Guarded catch after unguarded");f.guard=Expression(a,b)}MaybeRightParen(a,g),f.block=Block(a,b),e.catchClauses.push(f)}a.match(FINALLY)&&(e.finallyBlock=Block(a,b));if(!e.catchClauses.length&&!e.finallyBlock)throw a.newSyntaxError("Invalid try statement");return e;case CATCH:case FINALLY:throw a.newSyntaxError(definitions.tokens[j]+" without preceding try");case THROW:e=new Node(a),e.exception=Expression(a,b);break;case RETURN:e=ReturnOrYield(a,b);break;case WITH:e=new Node(a),e.object=HeadExpression(a,b),e.body=Statement(a,b.pushTarget(e).nest(NESTING_DEEP));return e;case VAR:case CONST:e=Variables(a,b);break;case LET:a.peek()===LEFT_PAREN?e=LetBlock(a,b,!0):e=Variables(a,b);break;case DEBUGGER:e=new Node(a);break;case NEWLINE:case SEMICOLON:e=new Node(a,{type:SEMICOLON}),e.expression=null;return e;default:if(j===IDENTIFIER){j=a.peek();if(j===COLON){d=a.token.value;if(b.allLabels.has(d))throw a.newSyntaxError("Duplicate label");a.get(),e=new Node(a,{type:LABEL,label:d}),e.statement=Statement(a,b.pushLabel(d).nest(NESTING_SHALLOW)),e.target=e.statement.type===LABEL?e.statement.target:e.statement;return e}}e=new Node(a,{type:SEMICOLON}),a.unget(),e.expression=Expression(a,b),e.end=e.expression.end}MagicalSemicolon(a);return e}function Block(a,b){a.mustMatch(LEFT_CURLY);var c=new Node(a,blockInit());Statements(a,b.update({parentBlock:c}).pushTarget(c),c),a.mustMatch(RIGHT_CURLY);return c}function Statements(a,b,c){try{while(!a.done&&a.peek(!0)!==RIGHT_CURLY)c.push(Statement(a,b))}catch(d){a.done&&(a.unexpectedEOF=!0);throw d}}function MaybeRightParen(a,b){b===LEFT_PAREN&&a.mustMatch(RIGHT_PAREN)}function MaybeLeftParen(a,b){return b.parenFreeMode?a.match(LEFT_PAREN)?LEFT_PAREN:END:a.mustMatch(LEFT_PAREN).type}function scriptInit(){return{type:SCRIPT,funDecls:[],varDecls:[],modDecls:[],impDecls:[],expDecls:[],loadDeps:[],hasEmptyReturn:!1,hasReturnWithValue:!1,isGenerator:!1}}function blockInit(){return{type:BLOCK,varDecls:[]}}function tokenString(a){var b=definitions.tokens[a];return/^\W/.test(b)?definitions.opTypeNames[b]:b.toUpperCase()}function Node(a,b){var c=a.token;c?(this.type=c.type,this.value=c.value,this.lineno=c.lineno,this.start=c.start,this.end=c.end):this.lineno=a.lineno,this.tokenizer=a,this.children=[];for(var d in b)this[d]=b[d]}function Script(a,b){var c=new Node(a,scriptInit()),d=new StaticContext(c,c,b,!1,NESTING_TOP);Statements(a,d,c);return c}function StaticContext(a,b,c,d,e){this.parentScript=a,this.parentBlock=b,this.inFunction=c,this.inForLoopInit=d,this.nesting=e,this.allLabels=new Stack,this.currentLabels=new Stack,this.labeledTargets=new Stack,this.defaultTarget=null,definitions.options.ecma3OnlyMode&&(this.ecma3OnlyMode=!0),definitions.options.parenFreeMode&&(this.parenFreeMode=!0)}function pushDestructuringVarDecls(a,b){for(var c in a){var d=a[c];d.type===IDENTIFIER?b.varDecls.push(d):pushDestructuringVarDecls(d,b)}}var lexer=require("ace/narcissus/jslex"),definitions=require("ace/narcissus/jsdefs");const StringMap=definitions.StringMap,Stack=definitions.Stack;eval(definitions.consts);const NESTING_TOP=0,NESTING_SHALLOW=1,NESTING_DEEP=2;StaticContext.prototype={ecma3OnlyMode:!1,parenFreeMode:!1,update:function(a){var b={};for(var c in a)b[c]={value:a[c],writable:!0,enumerable:!0,configurable:!0};return Object.create(this,b)},pushLabel:function(a){return this.update({currentLabels:this.currentLabels.push(a),allLabels:this.allLabels.push(a)})},pushTarget:function(a){var b=a.isLoop||a.type===SWITCH;if(this.currentLabels.isEmpty())return b?this.update({defaultTarget:a}):this;a.labels=new StringMap,this.currentLabels.forEach(function(b){a.labels.set(b,!0)});return this.update({currentLabels:new Stack,labeledTargets:this.labeledTargets.push(a),defaultTarget:b?a:this.defaultTarget})},nest:function(a){var b=Math.max(this.nesting,a);return b!==this.nesting?this.update({nesting:b}):this}},definitions.defineProperty(Array.prototype,"top",function(){return this.length&&this[this.length-1]},!1,!1,!0);var Np=Node.prototype={};Np.constructor=Node,Np.toSource=Object.prototype.toSource,Np.push=function(a){a!==null&&(a.start=0)b+=c;return b},!1,!1,!0);const DECLARED_FORM=0,EXPRESSED_FORM=1,STATEMENT_FORM=2;exports.parse=parse,exports.parseStdin=parseStdin,exports.Node=Node,exports.DECLARED_FORM=DECLARED_FORM,exports.EXPRESSED_FORM=EXPRESSED_FORM,exports.STATEMENT_FORM=STATEMENT_FORM,exports.Tokenizer=lexer.Tokenizer,exports.FunctionDefinition=FunctionDefinition}),define("ace/narcissus/jslex",["require","exports","module","ace/narcissus/jsdefs"],function(require,exports,module){function Tokenizer(a,b,c){this.cursor=0,this.source=String(a),this.tokens=[],this.tokenIndex=0,this.lookahead=0,this.scanNewlines=!1,this.unexpectedEOF=!1,this.filename=b||"",this.lineno=c||1}var definitions=require("ace/narcissus/jsdefs");eval(definitions.consts);var opTokens={};for(var op in definitions.opTypeNames){if(op==="\n"||op===".")continue;var node=opTokens;for(var i=0;i"9")throw this.newSyntaxError("Missing exponent");do ch=a[this.cursor++];while(ch>="0"&&ch<="9");this.cursor--;return!0}return!1},lexZeroNumber:function(a){var b=this.token,c=this.source;b.type=NUMBER,a=c[this.cursor++];if(a==="."){do a=c[this.cursor++];while(a>="0"&&a<="9");this.cursor--,this.lexExponent(),b.value=parseFloat(b.start,this.cursor)}else if(a==="x"||a==="X"){do a=c[this.cursor++];while(a>="0"&&a<="9"||a>="a"&&a<="f"||a>="A"&&a<="F");this.cursor--,b.value=parseInt(c.substring(b.start,this.cursor))}else if(a>="0"&&a<="7"){do a=c[this.cursor++];while(a>="0"&&a<="7");this.cursor--,b.value=parseInt(c.substring(b.start,this.cursor))}else this.cursor--,this.lexExponent(),b.value=0},lexNumber:function(a){var b=this.token,c=this.source;b.type=NUMBER;var d=!1;do a=c[this.cursor++],a==="."&&!d&&(d=!0,a=c[this.cursor++]);while(a>="0"&&a<="9");this.cursor--;var e=this.lexExponent();d=d||e;var f=c.substring(b.start,this.cursor);b.value=d?parseFloat(f):parseInt(f)},lexDot:function(a){var b=this.token,c=this.source,d=c[this.cursor];if(d>="0"&&d<="9"){do a=c[this.cursor++];while(a>="0"&&a<="9");this.cursor--,this.lexExponent(),b.type=NUMBER,b.value=parseFloat(b.start,this.cursor)}else b.type=DOT,b.assignOp=null,b.value="."},lexString:function(ch){var token=this.token,input=this.source;token.type=STRING;var hasEscapes=!1,delim=ch;if(input.length<=this.cursor)throw this.newSyntaxError("Unterminated string literal");while((ch=input[this.cursor++])!==delim){if(this.cursor==input.length)throw this.newSyntaxError("Unterminated string literal");if(ch==="\\"){hasEscapes=!0;if(++this.cursor==input.length)throw this.newSyntaxError("Unterminated string literal")}}token.value=hasEscapes?eval(input.substring(token.start,this.cursor)):input.substring(token.start+1,this.cursor-1)},lexRegExp:function(ch){var token=this.token,input=this.source;token.type=REGEXP;do{ch=input[this.cursor++];if(ch==="\\")this.cursor++;else if(ch==="["){do{if(ch===undefined)throw this.newSyntaxError("Unterminated character class");ch==="\\"&&this.cursor++,ch=input[this.cursor++]}while(ch!=="]")}else if(ch===undefined)throw this.newSyntaxError("Unterminated regex")}while(ch!=="/");do ch=input[this.cursor++];while(ch>="a"&&ch<="z");this.cursor--,token.value=eval(input.substring(token.start,this.cursor))},lexOp:function(a){var b=this.token,c=this.source,d=opTokens[a],e=c[this.cursor];e in d&&(d=d[e],this.cursor++,e=c[this.cursor],e in d&&(d=d[e],this.cursor++,e=c[this.cursor]));var f=d.op;definitions.assignOps[f]&&c[this.cursor]==="="?(this.cursor++,b.type=ASSIGN,b.assignOp=definitions.tokenIds[definitions.opTypeNames[f]],f+="="):(b.type=definitions.tokenIds[definitions.opTypeNames[f]],b.assignOp=null),b.value=f},lexIdent:function(a){var b=this.token,c=this.source;do a=c[this.cursor++];while(a>="a"&&a<="z"||a>="A"&&a<="Z"||a>="0"&&a<="9"||a==="$"||a==="_");this.cursor--;var d=c.substring(b.start,this.cursor);b.type=definitions.keywords[d]||IDENTIFIER,b.value=d},get:function(a){var b;while(this.lookahead){--this.lookahead,this.tokenIndex=this.tokenIndex+1&3,b=this.tokens[this.tokenIndex];if(b.type!==NEWLINE||this.scanNewlines)return b.type}this.skip(),this.tokenIndex=this.tokenIndex+1&3,b=this.tokens[this.tokenIndex],b||(this.tokens[this.tokenIndex]=b={});var c=this.source;if(this.cursor===c.length)return b.type=END;b.start=this.cursor,b.lineno=this.lineno;var d=c[this.cursor++];if(d>="a"&&d<="z"||d>="A"&&d<="Z"||d==="$"||d==="_")this.lexIdent(d);else if(a&&d==="/")this.lexRegExp(d);else if(d in opTokens)this.lexOp(d);else if(d===".")this.lexDot(d);else if(d>="1"&&d<="9")this.lexNumber(d);else if(d==="0")this.lexZeroNumber(d);else if(d==='"'||d==="'")this.lexString(d);else if(this.scanNewlines&&d==="\n")b.type=NEWLINE,b.value="\n",this.lineno++;else throw this.newSyntaxError("Illegal token");b.end=this.cursor;return b.type},unget:function(){if(++this.lookahead===4)throw"PANIC: too much lookahead!";this.tokenIndex=this.tokenIndex-1&3},newSyntaxError:function(a){var b=new SyntaxError(a,this.filename,this.lineno);b.source=this.source,b.lineno=this.lineno,b.cursor=this.lookahead?this.tokens[this.tokenIndex+this.lookahead&3].start:this.cursor;return b}},exports.Tokenizer=Tokenizer}),define("ace/narcissus/jsdefs",["require","exports","module"],function(a,b,c){function y(a){this.elts=a||null}function x(){this.table=Object.create(null,{}),this.size=0}function v(){return undefined}function u(a){return{getOwnPropertyDescriptor:function(b){var c=Object.getOwnPropertyDescriptor(a,b);c.configurable=!0;return c},getPropertyDescriptor:function(b){var c=s(a,b);c.configurable=!0;return c},getOwnPropertyNames:function(){return Object.getOwnPropertyNames(a)},defineProperty:function(b,c){Object.defineProperty(a,b,c)},"delete":function(b){return delete a[b]},fix:function(){return Object.isFrozen(a)?t(a):undefined},has:function(b){return b in a},hasOwn:function(b){return{}.hasOwnProperty.call(a,b)},get:function(b,c){return a[c]},set:function(b,c,d){a[c]=d;return!0},enumerate:function(){var b=[];for(m in a)b.push(m);return b},keys:function(){return Object.keys(a)}}}function t(a){var b={};for(var c in Object.getOwnPropertyNames(a))b[c]=Object.getOwnPropertyDescriptor(a,c);return b}function s(a,b){while(a){if({}.hasOwnProperty.call(a,b))return Object.getOwnPropertyDescriptor(a,b);a=Object.getPrototypeOf(a)}}function r(a){return typeof a=="function"&&a.toString().match(/\[native code\]/)}function q(a,b,c,d,e,f){Object.defineProperty(a,b,{value:c,writable:!e,configurable:!d,enumerable:!f})}function p(a,b,c,d,e){Object.defineProperty(a,b,{get:c,configurable:!d,enumerable:!e})}b.options={version:185},function(){b.hostGlobal=this}();var d=["END","\n",";",",","=","?",":","CONDITIONAL","||","&&","|","^","&","==","!=","===","!==","<","<=",">=",">","<<",">>",">>>","+","-","*","/","%","!","~","UNARY_PLUS","UNARY_MINUS","++","--",".","[","]","{","}","(",")","SCRIPT","BLOCK","LABEL","FOR_IN","CALL","NEW_WITH_ARGS","INDEX","ARRAY_INIT","OBJECT_INIT","PROPERTY_INIT","GETTER","SETTER","GROUP","LIST","LET_BLOCK","ARRAY_COMP","GENERATOR","COMP_TAIL","IDENTIFIER","NUMBER","STRING","REGEXP","break","case","catch","const","continue","debugger","default","delete","do","else","false","finally","for","function","if","in","instanceof","let","new","null","return","switch","this","throw","true","try","typeof","var","void","yield","while","with"],e=["break","const","continue","debugger","do","for","if","return","switch","throw","try","var","yield","while","with"],f={"\n":"NEWLINE",";":"SEMICOLON",",":"COMMA","?":"HOOK",":":"COLON","||":"OR","&&":"AND","|":"BITWISE_OR","^":"BITWISE_XOR","&":"BITWISE_AND","===":"STRICT_EQ","==":"EQ","=":"ASSIGN","!==":"STRICT_NE","!=":"NE","<<":"LSH","<=":"LE","<":"LT",">>>":"URSH",">>":"RSH",">=":"GE",">":"GT","++":"INCREMENT","--":"DECREMENT","+":"PLUS","-":"MINUS","*":"MUL","/":"DIV","%":"MOD","!":"NOT","~":"BITWISE_NOT",".":"DOT","[":"LEFT_BRACKET","]":"RIGHT_BRACKET","{":"LEFT_CURLY","}":"RIGHT_CURLY","(":"LEFT_PAREN",")":"RIGHT_PAREN"},g={"__proto__":null},h={},i="const ";for(var j=0,k=d.length;j0&&(i+=", ");var l=d[j],m;/^[a-z]/.test(l)?(m=l.toUpperCase(),g[l]=j):m=/^\W/.test(l)?f[l]:l,i+=m+" = "+j,h[m]=j,d[l]=j}i+=";";var n={"__proto__":null};for(j=0,k=e.length;j>",">>>","+","-","*","/","%"];for(j=0,k=o.length;j${BOOTSTRAP_LESS}.tmp; \ + lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP}; \ + lessc ${BOOTSTRAP_LESS}.tmp > ${BOOTSTRAP_MIN} --compress; \ + rm -f ${BOOTSTRAP_LESS}.tmp; \ + echo "Bootstrap successfully built! - `date`"; \ + else \ + echo "You must have the LESS compiler installed in order to build Bootstrap."; \ + echo "You can install it by running: npm install less -g"; \ + fi + +watch: + @@if test ! -z ${WATCHR}; then \ + echo "Watching less files..."; \ + watchr -e "watch('lib/.*\.less') { system 'make' }"; \ + else \ + echo "You must have the watchr installed in order to watch Bootstrap less files."; \ + echo "You can install it by running: gem install watchr"; \ + fi + +.PHONY: build watch \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/README.md b/src/bb-modules/Filemanager/src/css/bootstrap/README.md new file mode 100644 index 000000000..babfd5559 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/README.md @@ -0,0 +1,87 @@ +TWITTER BOOTSTRAP +================= + +Bootstrap is Twitter's toolkit for kickstarting CSS for websites, apps, and more. It includes base CSS styles for typography, forms, buttons, tables, grids, navigation, alerts, and more. + +To get started -- checkout http://twitter.github.com/bootstrap! + + +Usage +----- + +You can use Twitter Bootstrap in one of two ways: just drop the compiled CSS into any new project and start cranking, or run LESS on your site and compile on the fly like a boss. + +Here's what the LESS version looks like: + + + + +Or if you prefer, the standard css way: + + + +For more info, refer to the docs! + + +Bug Tracker +----------- + +Have a bug? Please create an issue here on GitHub! + +https://github.com/twitter/bootstrap/issues + + +Mailing List +------------ + +Have a question? Ask on our mailing list! + +twitter-bootstrap@googlegroups.com + +http://groups.google.com/group/twitter-bootstrap + + +Developers +---------- + +We have included a makefile with convenience methods for working with the bootstrap library. + ++ **build** - `make build` +This will run the less compiler on the bootstrap lib and generate a bootstrap.css and bootstrap.min.css file. +The lessc compiler is required for this command to run. + ++ **watch** - `make watch` +This is a convenience method for watching your less files and automatically building them whenever you save. +Watchr is required for this command to run. + + +AUTHORS +------- + +**Mark Otto** + ++ http://twitter.com/mdo ++ http://github.com/markdotto + +**Jacob Thornton** + ++ http://twitter.com/fat ++ http://github.com/fat + + +Copyright and License +--------------------- + +Copyright 2011 Twitter, Inc. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this work except in compliance with the License. +You may obtain a copy of the License in the LICENSE file, or at: + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.css b/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.css new file mode 100644 index 000000000..d7f4cfd9e --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.css @@ -0,0 +1,1751 @@ +/*! + * Bootstrap v1.0.0 + * + * Copyright 2011 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: Fri Aug 19 20:19:39 PDT 2011 + */ +/* Reset.less + * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). + * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ +html, body { + margin: 0; + padding: 0; +} +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +a, +abbr, +acronym, +address, +cite, +code, +del, +dfn, +em, +img, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +dd, +dl, +dt, +li, +ol, +ul, +fieldset, +form, +label, +legend, +button, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td { + margin: 0; + padding: 0; + border: 0; + font-weight: normal; + font-style: normal; + font-size: 100%; + line-height: 1; + font-family: inherit; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +ol, ul { + list-style: none; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +header, +section, +footer, +article, +aside { + display: block; +} +/* Preboot.less + * Variables and mixins to pre-ignite any new web development project + * ------------------------------------------------------------------ */ +.clearfix { + zoom: 1; +} +.clearfix:before, .clearfix:after { + display: table; + content: ""; +} +.clearfix:after { + clear: both; +} +.center-block { + display: block; + margin: 0 auto; +} +.container { + width: 940px; + margin: 0 auto; + zoom: 1; +} +.container:before, .container:after { + display: table; + content: ""; +} +.container:after { + clear: both; +} +/* + * Scaffolding + * Basic and global styles for generating a grid system, structural layout, and page templates + * ------------------------------------------------------------------------------------------- */ +.row { + zoom: 1; +} +.row:before, .row:after { + display: table; + content: ""; +} +.row:after { + clear: both; +} +.row .span1 { + float: left; + width: 40px; + margin-left: 20px; +} +.row .span1:first-child { + margin-left: 0; +} +.row .span2 { + float: left; + width: 100px; + margin-left: 20px; +} +.row .span2:first-child { + margin-left: 0; +} +.row .span3 { + float: left; + width: 160px; + margin-left: 20px; +} +.row .span3:first-child { + margin-left: 0; +} +.row .span4 { + float: left; + width: 220px; + margin-left: 20px; +} +.row .span4:first-child { + margin-left: 0; +} +.row .span5 { + float: left; + width: 280px; + margin-left: 20px; +} +.row .span5:first-child { + margin-left: 0; +} +.row .span6 { + float: left; + width: 340px; + margin-left: 20px; +} +.row .span6:first-child { + margin-left: 0; +} +.row .span7 { + float: left; + width: 400px; + margin-left: 20px; +} +.row .span7:first-child { + margin-left: 0; +} +.row .span8 { + float: left; + width: 460px; + margin-left: 20px; +} +.row .span8:first-child { + margin-left: 0; +} +.row .span9 { + float: left; + width: 520px; + margin-left: 20px; +} +.row .span9:first-child { + margin-left: 0; +} +.row .span10 { + float: left; + width: 580px; + margin-left: 20px; +} +.row .span10:first-child { + margin-left: 0; +} +.row .span11 { + float: left; + width: 640px; + margin-left: 20px; +} +.row .span11:first-child { + margin-left: 0; +} +.row .span12 { + float: left; + width: 700px; + margin-left: 20px; +} +.row .span12:first-child { + margin-left: 0; +} +.row .span13 { + float: left; + width: 760px; + margin-left: 20px; +} +.row .span13:first-child { + margin-left: 0; +} +.row .span14 { + float: left; + width: 820px; + margin-left: 20px; +} +.row .span14:first-child { + margin-left: 0; +} +.row .span15 { + float: left; + width: 880px; + margin-left: 20px; +} +.row .span15:first-child { + margin-left: 0; +} +.row .span16 { + float: left; + width: 940px; + margin-left: 20px; +} +.row .span16:first-child { + margin-left: 0; +} +.row .offset1 { + margin-left: 80px !important; +} +.row .offset1:first-child { + margin-left: 60px !important; +} +.row .offset2 { + margin-left: 140px !important; +} +.row .offset2:first-child { + margin-left: 120px !important; +} +.row .offset3 { + margin-left: 200px !important; +} +.row .offset3:first-child { + margin-left: 180px !important; +} +.row .offset4 { + margin-left: 260px !important; +} +.row .offset4:first-child { + margin-left: 240px !important; +} +.row .offset5 { + margin-left: 320px !important; +} +.row .offset5:first-child { + margin-left: 300px !important; +} +.row .offset6 { + margin-left: 380px !important; +} +.row .offset6:first-child { + margin-left: 360px !important; +} +.row .offset7 { + margin-left: 440px !important; +} +.row .offset7:first-child { + margin-left: 420px !important; +} +.row .offset8 { + margin-left: 500px !important; +} +.row .offset8:first-child { + margin-left: 480px !important; +} +.row .offset9 { + margin-left: 500px !important; +} +.row .offset9:first-child { + margin-left: 480px !important; +} +.row .offset10 { + margin-left: 620px !important; +} +.row .offset10:first-child { + margin-left: 600px !important; +} +.row .offset11 { + margin-left: 680px !important; +} +.row .offset11:first-child { + margin-left: 660px !important; +} +.row .offset12 { + margin-left: 740px !important; +} +.row .offset12:first-child { + margin-left: 720px !important; +} +html, body { +/* background-color: #fff; */ +} +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 18px; + color: #808080; + text-rendering: optimizeLegibility; +} +div.container { + width: 940px; + margin: 0 auto; +} +div.container-fluid { + padding: 20px; + zoom: 1; +} +div.container-fluid:before, div.container-fluid:after { + display: table; + content: ""; +} +div.container-fluid:after { + clear: both; +} +div.container-fluid div.sidebar { + float: left; + width: 220px; +} +div.container-fluid div.content { + min-width: 700px; + max-width: 1180px; + margin-left: 240px; +} +a { + color: #0069d6; + text-decoration: none; + line-height: inherit; +} +a:hover { + color: #0050a3; + text-decoration: underline; +} +.btn { + display: inline-block; + background-color: #e6e6e6; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(0.25, #ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(#ffffff, color-stop(0.25, #ffffff), #e6e6e6); + background-image: -moz-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6); + background-image: -ms-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6); + background-image: -o-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6); + background-image: linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6); + padding: 4px 14px; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + color: #333333; + font-size: 13px; + line-height: 18px; + border: 1px solid rgba(0, 0, 0, 0.1); + border-bottom-color: rgba(0, 0, 0, 0.25); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -webkit-transition: 0.1s linear all; + -moz-transition: 0.1s linear all; + transition: 0.1s linear all; +} +.btn:hover { + background-position: 0 -15px; + color: #333333; + text-decoration: none; +} +.btn.primary { + background-color: #0064cd; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd)); + background-image: -moz-linear-gradient(#049cdb, #0064cd); + background-image: -ms-linear-gradient(#049cdb, #0064cd); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd)); + background-image: -webkit-linear-gradient(#049cdb, #0064cd); + background-image: -o-linear-gradient(#049cdb, #0064cd); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0); + background-image: linear-gradient(#049cdb, #0064cd); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.btn.primary:hover { + color: #fff; +} +.btn.large { + font-size: 16px; + line-height: 28px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn.small { + padding-right: 9px; + padding-left: 9px; + font-size: 11px; +} +.btn:disabled, .btn.disabled { + background-image: none; + filter: alpha(opacity=65); + -khtml-opacity: 0.65; + -moz-opacity: 0.65; + opacity: 0.65; + cursor: default; +} +.btn:active { + -webkit-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 3px 7px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.05); +} +button.btn::-moz-focus-inner, input[type=submit].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +/* Typography.less + * Headings, body text, lists, code, and more for a versatile and durable typography system + * ---------------------------------------------------------------------------------------- */ +p { + font-size: 13px; + font-weight: normal; + line-height: 18px; + margin-bottom: 18px; +} +p small { + font-size: 11px; + color: #bfbfbf; +} +h1, +h2, +h3, +h4, +h5, +h6 { + font-weight: bold; + color: #404040; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + color: #bfbfbf; +} +h1 { + margin-bottom: 18px; + font-size: 30px; + line-height: 36px; +} +h1 small { + font-size: 18px; +} +h2 { + font-size: 24px; + line-height: 36px; +} +h2 small { + font-size: 14px; +} +h3, +h4, +h5, +h6 { + line-height: 36px; +} +h3 { + font-size: 18px; +} +h3 small { + font-size: 14px; +} +h4 { + font-size: 16px; +} +h4 small { + font-size: 12px; +} +h5 { + font-size: 14px; +} +h6 { + font-size: 13px; + color: #bfbfbf; + text-transform: uppercase; +} +ul, ol { + margin: 0 0 18px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: 18px; + color: #808080; +} +ul.unstyled { + list-style: none; + margin-left: 0; +} +dl { + margin-bottom: 18px; +} +dl dt, dl dd { + line-height: 18px; +} +dl dt { + font-weight: bold; +} +dl dd { + margin-left: 9px; +} +hr { + margin: 0 0 19px; + border: 0; + border-bottom: 1px solid #eee; +} +strong { + font-style: inherit; + font-weight: bold; + line-height: inherit; +} +em { + font-style: italic; + font-weight: inherit; + line-height: inherit; +} +.muted { + color: #e6e6e6; +} +blockquote { + margin-bottom: 18px; + border-left: 5px solid #eee; + padding-left: 15px; +} +blockquote p { + font-size: 14px; + font-weight: 300; + line-height: 18px; + margin-bottom: 0; +} +blockquote small, blockquote cite { + display: block; + font-size: 12px; + font-weight: 300; + line-height: 18px; + color: #bfbfbf; +} +blockquote small:before, blockquote cite:before { + content: '\2014 \00A0'; +} +address { + display: block; + line-height: 18px; + margin-bottom: 18px; +} +code { + padding: 0 3px 2px; + font-family: Monaco, Andale Mono, Courier New, monospace; + font-size: 12px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + background-color: #fee9cc; + color: rgba(0, 0, 0, 0.75); + padding: 1px 3px; +} + +/* Forms.less + * Base styles for various input types, form layouts, and states + * ------------------------------------------------------------- */ +form { + margin-bottom: 18px; +} +form fieldset { + margin-bottom: 18px; + padding-top: 18px; +} +form fieldset legend { + display: block; + margin-left: 150px; + font-size: 20px; + line-height: 1; + color: #404040; +} +form div.clearfix { + margin-bottom: 18px; +} +form label, +form input, +form select, +form textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: normal; +} +form label { + padding-top: 6px; + font-size: 13px; + line-height: 18px; + float: left; + width: 130px; + text-align: right; + color: #404040; +} +form div.input { + margin-left: 150px; +} +form input[type=checkbox], form input[type=radio] { + cursor: pointer; +} +form input[type=text], +form input[type=password], +form textarea, +form select, +form .uneditable-input { + display: inline-block; + width: 210px; + margin: 0; + padding: 4px; + font-size: 13px; + line-height: 18px; + height: 18px; + color: #808080; + border: 1px solid #ccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +form select, form input[type=file] { + height: 27px; + line-height: 27px; +} +form textarea { + height: auto; +} +form .uneditable-input { + background-color: #eee; + display: block; + border-color: #ccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.075); +} +form :-moz-placeholder { + color: #bfbfbf; +} +form ::-webkit-input-placeholder { + color: #bfbfbf; +} +form input[type=text], +form input[type=password], +form select, +form textarea { + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1); +} +form input[type=text]:focus, form input[type=password]:focus, form textarea:focus { + outline: none; + border-color: rgba(82, 168, 236, 0.8); + -webkit-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1), 0 0 8px rgba(82, 168, 236, 0.6); +} +form div.error { + background: #fae5e3; + padding: 10px 0; + margin: -10px 0 10px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +form div.error > label, form div.error span.help-inline, form div.error span.help-block { + color: #9d261d; +} +form div.error input[type=text], form div.error input[type=password], form div.error textarea { + border-color: #c87872; + -webkit-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); + -moz-box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); + box-shadow: 0 0 3px rgba(171, 41, 32, 0.25); +} +form div.error input[type=text]:focus, form div.error input[type=password]:focus, form div.error textarea:focus { + border-color: #b9554d; + -webkit-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); + -moz-box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); + box-shadow: 0 0 6px rgba(171, 41, 32, 0.5); +} +form div.error div.input-prepend span.add-on, form div.error div.input-append span.add-on { + background: #f4c8c5; + border-color: #c87872; + color: #b9554d; +} +form .input-mini, +form input.mini, +form textarea.mini, +form select.mini { + width: 60px; +} +form .input-small, +form input.small, +form textarea.small, +form select.small { + width: 90px; +} +form .input-medium, +form input.medium, +form textarea.medium, +form select.medium { + width: 150px; +} +form .input-large, +form input.large, +form textarea.large, +form select.large { + width: 210px; +} +form .input-xlarge, +form input.xlarge, +form textarea.xlarge, +form select.xlarge { + width: 270px; +} +form .input-xxlarge, +form input.xxlarge, +form textarea.xxlarge, +form select.xxlarge { + width: 530px; +} +form textarea.xxlarge { + overflow-y: scroll; +} +form input[readonly]:focus, form textarea[readonly]:focus, form input.disabled { + background: #f5f5f5; + border-color: #ddd; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.actions { + background: #f5f5f5; + margin-top: 18px; + margin-bottom: 18px; + padding: 17px 20px 18px 150px; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +div.actions div.secondary-action { + float: right; +} +div.actions div.secondary-action a { + line-height: 30px; +} +div.actions div.secondary-action a:hover { + text-decoration: underline; +} +.help-inline, .help-block { + font-size: 12px; + line-height: 18px; + color: #bfbfbf; +} +.help-inline { + padding-left: 5px; +} +.help-block { + display: block; + max-width: 600px; +} +div.inline-inputs { + color: #808080; +} +div.inline-inputs span, div.inline-inputs input[type=text] { + display: inline-block; +} +div.inline-inputs input.mini { + width: 60px; +} +div.inline-inputs input.small { + width: 90px; +} +div.inline-inputs span { + padding: 0 2px 0 1px; +} +div.input-prepend input[type=text], div.input-append input[type=text] { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +div.input-prepend .add-on, div.input-append .add-on { + background: #f5f5f5; + float: left; + display: block; + width: auto; + min-width: 16px; + padding: 4px 4px 4px 5px; + color: #bfbfbf; + font-weight: normal; + line-height: 18px; + height: 18px; + text-align: center; + text-shadow: 0 1px 0 #fff; + border: 1px solid #ccc; + border-right-width: 0; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +div.input-prepend .active, div.input-append .active { + background: #a9dba9; + border-color: #46a546; +} +div.input-append input[type=text] { + float: left; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +div.input-append .add-on { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; + border-right-width: 1px; + border-left-width: 0; +} +ul.inputs-list { + margin: 0 0 5px; + width: 100%; +} +ul.inputs-list li { + display: block; + padding: 0; + width: 100%; +} +ul.inputs-list li label { + display: block; + float: none; + width: auto; + padding: 0; + line-height: 18px; + text-align: left; + white-space: normal; +} +ul.inputs-list li label strong { + color: #808080; +} +ul.inputs-list li label small { + font-size: 12px; + font-weight: normal; +} +ul.inputs-list li ul.inputs-list { + margin-left: 25px; + margin-bottom: 10px; + padding-top: 0; +} +ul.inputs-list li:first-child { + padding-top: 5px; +} +ul.inputs-list input[type=radio], ul.inputs-list input[type=checkbox] { + margin-bottom: 0; +} +form.form-stacked { + padding-left: 20px; +} +form.form-stacked fieldset { + padding-top: 9px; +} +form.form-stacked legend { + margin-left: 0; +} +form.form-stacked label { + display: block; + float: none; + width: auto; + font-weight: bold; + text-align: left; + line-height: 20px; + padding-top: 0; +} +form.form-stacked div.clearfix { + margin-bottom: 9px; +} +form.form-stacked div.clearfix div.input { + margin-left: 0; +} +form.form-stacked ul.inputs-list { + margin-bottom: 0; +} +form.form-stacked ul.inputs-list li { + padding-top: 0; +} +form.form-stacked ul.inputs-list li label { + font-weight: normal; + padding-top: 0; +} +form.form-stacked div.actions { + margin-left: -20px; + padding-left: 20px; +} +/* + * Tables.less + * Tables for, you guessed it, tabular data + * ---------------------------------------- */ +table { + width: 100%; + margin-bottom: 18px; + padding: 0; + text-align: left; + border-collapse: separate; + font-size: 13px; +} +table th, table td { + padding: 10px 10px 9px; + line-height: 13.5px; + vertical-align: middle; + border-bottom: 1px solid #ddd; +} +table th { + padding-top: 9px; + font-weight: bold; + border-bottom-width: 2px; +} +table.zebra-striped tbody tr:nth-child(odd) td { + background-color: #f9f9f9; +} +table.zebra-striped tbody tr:hover td { + background-color: #f5f5f5; +} +table.zebra-striped th.header { + cursor: pointer; +} +table.zebra-striped th.header:after { + content: ""; + float: right; + margin-top: 7px; + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: hidden; +} +table.zebra-striped th.headerSortUp, table.zebra-striped th.headerSortDown { + background-color: rgba(141, 192, 219, 0.25); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +table.zebra-striped th.header:hover:after { + visibility: visible; +} +table.zebra-striped th.actions:hover { + background-image: none; +} +table.zebra-striped th.headerSortDown:after, table.zebra-striped th.headerSortDown:hover:after { + visibility: visible; + filter: alpha(opacity=60); + -khtml-opacity: 0.6; + -moz-opacity: 0.6; + opacity: 0.6; +} +table.zebra-striped th.headerSortUp:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility: visible; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + filter: alpha(opacity=60); + -khtml-opacity: 0.6; + -moz-opacity: 0.6; + opacity: 0.6; +} +table.zebra-striped th.blue { + color: #049cdb; + border-bottom-color: #049cdb; +} +table.zebra-striped th.headerSortUp.blue, table.zebra-striped th.headerSortDown.blue { + background-color: #ade6fe; +} +table.zebra-striped th.green { + color: #46a546; + border-bottom-color: #46a546; +} +table.zebra-striped th.headerSortUp.green, table.zebra-striped th.headerSortDown.green { + background-color: #cdeacd; +} +table.zebra-striped th.red { + color: #9d261d; + border-bottom-color: #9d261d; +} +table.zebra-striped th.headerSortUp.red, table.zebra-striped th.headerSortDown.red { + background-color: #f4c8c5; +} +table.zebra-striped th.yellow { + color: #ffc40d; + border-bottom-color: #ffc40d; +} +table.zebra-striped th.headerSortUp.yellow, table.zebra-striped th.headerSortDown.yellow { + background-color: #fff6d9; +} +table.zebra-striped th.orange { + color: #f89406; + border-bottom-color: #f89406; +} +table.zebra-striped th.headerSortUp.orange, table.zebra-striped th.headerSortDown.orange { + background-color: #fee9cc; +} +table.zebra-striped th.purple { + color: #7a43b6; + border-bottom-color: #7a43b6; +} +table.zebra-striped th.headerSortUp.purple, table.zebra-striped th.headerSortDown.purple { + background-color: #e2d5f0; +} +/* Patterns.less + * Repeatable UI elements outside the base styles provided from the scaffolding + * ---------------------------------------------------------------------------- */ +div.topbar { + background-color: #222222; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222)); + background-image: -moz-linear-gradient(#333333, #222222); + background-image: -ms-linear-gradient(#333333, #222222); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222)); + background-image: -webkit-linear-gradient(#333333, #222222); + background-image: -o-linear-gradient(#333333, #222222); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0); + background-image: linear-gradient(#333333, #222222); + height: 40px; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10000; + overflow: visible; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25), inset 0 -1px 0 rgba(0, 0, 0, 0.1); +} +div.topbar a { + color: #bfbfbf; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +div.topbar ul li a:hover, div.topbar ul li.active a, div.topbar a.logo:hover { + background-color: #333; + background-color: rgba(255, 255, 255, 0.15); + color: #ffffff; + text-decoration: none; +} +div.topbar a.logo { + float: left; + display: block; + padding: 8px 20px 12px; + margin-left: -20px; + color: #ffffff; + font-size: 20px; + font-weight: 200; + line-height: 1; +} +div.topbar a.logo img { + float: left; + margin-right: 6px; +} +div.topbar form { + float: left; + margin: 5px 0 0 0; + position: relative; + filter: alpha(opacity=100); + -khtml-opacity: 1; + -moz-opacity: 1; + opacity: 1; +} +div.topbar form input { + background-color: #bfbfbf; + background-color: rgba(255, 255, 255, 0.3); + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: normal; + font-weight: 13px; + line-height: 1; + width: 220px; + padding: 4px 9px; + color: #fff; + color: rgba(255, 255, 255, 0.75); + border: 1px solid #111; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0px rgba(255, 255, 255, 0.25); + -webkit-transition: none; + -moz-transition: none; + transition: none; +} +div.topbar form input:-moz-placeholder { + color: #e6e6e6; +} +div.topbar form input::-webkit-input-placeholder { + color: #e6e6e6; +} +div.topbar form input:hover { + background-color: #444; + background-color: rgba(255, 255, 255, 0.5); + color: #fff; +} +div.topbar form input:focus, div.topbar form input.focused { + outline: none; + background-color: #fff; + color: #404040; + text-shadow: 0 1px 0 #fff; + border: 0; + padding: 5px 10px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} +div.topbar ul { + display: block; + float: left; + margin: 0 10px 0 0; + position: relative; +} +div.topbar ul.secondary-nav { + float: right; + margin-left: 10px; + margin-right: 0; +} +div.topbar ul li { + display: block; + float: left; + font-size: 13px; +} +div.topbar ul li a { + display: block; + float: none; + padding: 10px 10px 11px; + line-height: 19px; + text-decoration: none; +} +div.topbar ul li a:hover { + color: #fff; + text-decoration: none; +} +div.topbar ul li.active a { + background-color: #222; + background-color: rgba(0, 0, 0, 0.5); +} +div.topbar ul.primary-nav li ul { + left: 0; +} +div.topbar ul.secondary-nav li ul { + right: 0; +} +div.topbar ul li.menu { + position: relative; +} +div.topbar ul li.menu a.menu:after { + width: 0px; + height: 0px; + display: inline-block; + content: "↓"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #fff; + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; +} +div.topbar ul li.menu.open a.menu, div.topbar ul li.menu.open a:hover { + background-color: #00b4eb; + background-color: rgba(255, 255, 255, 0.1); + color: #fff; +} +div.topbar ul li.menu.open ul { + display: block; +} +div.topbar ul li.menu.open ul li a { + background-color: transparent; + font-weight: normal; +} +div.topbar ul li.menu.open ul li a:hover { + background-color: rgba(255, 255, 255, 0.1); + color: #fff; +} +div.topbar ul li.menu.open ul li.active a { + background-color: rgba(255, 255, 255, 0.1); + font-weight: bold; +} +div.topbar ul li ul { + background-color: #333; + float: left; + display: none; + position: absolute; + top: 40px; + min-width: 160px; + max-width: 220px; + _width: 160px; + margin-left: 0; + margin-right: 0; + padding: 0; + text-align: left; + border: 0; + zoom: 1; + -webkit-border-radius: 0 0 5px 5px; + -moz-border-radius: 0 0 5px 5px; + border-radius: 0 0 5px 5px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.6); +} +div.topbar ul li ul li { + float: none; + clear: both; + display: block; + background: none; + font-size: 12px; +} +div.topbar ul li ul li a { + display: block; + padding: 6px 15px; + clear: both; + font-weight: normal; + line-height: 19px; + color: #bbb; +} +div.topbar ul li ul li a:hover { + background-color: #333; + background-color: rgba(255, 255, 255, 0.25); + color: #fff; +} +div.topbar ul li ul li.divider { + height: 1px; + overflow: hidden; + background: rgba(0, 0, 0, 0.2); + border-bottom: 1px solid rgba(255, 255, 255, 0.1); + margin: 5px 0; +} +div.topbar ul li ul li span { + clear: both; + display: block; + background: rgba(0, 0, 0, 0.2); + padding: 6px 15px; + cursor: default; + color: #808080; + border-top: 1px solid rgba(0, 0, 0, 0.2); +} +div.page-header { + margin-bottom: 17px; + border-bottom: 1px solid #ddd; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +div.page-header h1 { + margin-bottom: 8px; +} +div.alert-message { + background-color: rgba(0, 0, 0, 0.15); + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.15))); + background-image: -moz-linear-gradient(transparent, rgba(0, 0, 0, 0.15)); + background-image: -ms-linear-gradient(transparent, rgba(0, 0, 0, 0.15)); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, transparent), color-stop(100%, rgba(0, 0, 0, 0.15))); + background-image: -webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.15)); + background-image: -o-linear-gradient(transparent, rgba(0, 0, 0, 0.15)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='transparent', endColorstr='rgba(0, 0, 0, 0.15)', GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='transparent', endColorstr='rgba(0, 0, 0, 0.15)', GradientType=0); + background-image: linear-gradient(transparent, rgba(0, 0, 0, 0.15)); + background-color: #e6e6e6; + margin-bottom: 18px; + padding: 8px 15px; + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + border-bottom: 1px solid rgba(0, 0, 0, 0.25); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +div.alert-message p { + color: #fff; + margin-bottom: 0; +} +div.alert-message p + p { + margin-top: 5px; +} +div.alert-message.error { + background-color: #e06359; +} +div.alert-message.warning { + background-color: #ffd75a; +} +div.alert-message.success { + background-color: #74c474; +} +div.alert-message.info { + background-color: #30c0fb; +} +div.alert-message a.close { + float: right; + margin-top: -2px; + color: #fff; + font-size: 20px; + font-weight: bold; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +div.alert-message a.close:hover { + text-decoration: none; + filter: alpha(opacity=50); + -khtml-opacity: 0.5; + -moz-opacity: 0.5; + opacity: 0.5; +} +div.block-message { + margin-bottom: 18px; + padding: 14px; + color: #404040; + color: rgba(0, 0, 0, 0.8); + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +div.block-message p { + color: #404040; + color: rgba(0, 0, 0, 0.8); + margin-right: 30px; + margin-bottom: 0; +} +div.block-message ul { + margin-bottom: 0; +} +div.block-message strong { + display: block; +} +div.block-message a.close { + display: block; + color: #404040; + color: rgba(0, 0, 0, 0.5); + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); +} +div.block-message.error { + background: #f8dcda; + border: 1px solid #f4c8c5; +} +div.block-message.warning { + background: #fff0c0; + border: 1px solid #ffe38d; +} +div.block-message.success { + background: #dff1df; + border: 1px solid #bbe2bb; +} +div.block-message.info { + background: #c7eefe; + border: 1px solid #ade6fe; +} +ul.tabs, ul.pills { + margin: 0 0 20px; + padding: 0; + zoom: 1; +} +ul.tabs:before, +ul.pills:before, +ul.tabs:after, +ul.pills:after { + display: table; + content: ""; +} +ul.tabs:after, ul.pills:after { + clear: both; +} +ul.tabs li, ul.pills li { + display: inline; +} +ul.tabs li a, ul.pills li a { + float: left; + width: auto; +} +ul.tabs { + width: 100%; + border-bottom: 1px solid #bfbfbf; +} +ul.tabs li a { + margin-bottom: -1px; + margin-right: 2px; + padding: 0 15px; + line-height: 35px; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +ul.tabs li a:hover { + background-color: #e6e6e6; + border-bottom: 1px solid #bfbfbf; +} +ul.tabs li.active a { + background-color: #fff; + padding: 0 14px; + border: 1px solid #ccc; + border-bottom: 0; + color: #808080; +} +ul.pills li a { + margin: 5px 3px 5px 0; + padding: 0 15px; + text-shadow: 0 1px 1px #fff; + line-height: 30px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +ul.pills li a:hover { + background: #0050a3; + color: #fff; + text-decoration: none; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); +} +ul.pills li.active a { + background: #0069d6; + color: #fff; + text-shadow: 0 1px 1px rgba(0, 0, 0, 0.25); +} +div.pagination { + height: 36px; + margin: 18px 0; +} +div.pagination ul { + float: left; + margin: 0; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.075); +} +div.pagination ul li { + display: inline; +} +div.pagination ul li a { + float: left; + padding: 0 14px; + line-height: 34px; + border-right: 1px solid rgba(0, 0, 0, 0.15); + text-decoration: none; +} +div.pagination ul li a:hover, div.pagination ul li.active a { + background-color: #c7eefe; +} +div.pagination ul li.disabled a, div.pagination ul li.disabled a:hover { + background-color: none; + color: #bfbfbf; +} +div.pagination ul li.next a, div.pagination ul li:last-child a { + border: 0; +} +div.well { + background: #f5f5f5; + margin-bottom: 20px; + padding: 19px; + min-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +div.modal-backdrop { + background-color: rgba(0, 0, 0, 0.5); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; +} +div.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: 2000; + width: 560px; + margin: -280px 0 0 -250px; + background-color: #ffffff; + border: 1px solid rgba(0, 0, 0, 0.3); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding; + -moz-background-clip: padding; + background-clip: padding; +} +div.modal .modal-header { + border-bottom: 1px solid #eee; + padding: 5px 20px; +} +div.modal .modal-header a.close { + position: absolute; + right: 10px; + top: 10px; + color: #999; + line-height: 10px; + font-size: 18px; +} +div.modal .modal-body { + padding: 20px; +} +div.modal .modal-footer { + background-color: #f5f5f5; + padding: 14px 20px 15px; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + zoom: 1; +} +div.modal .modal-footer:before, div.modal .modal-footer:after { + display: table; + content: ""; +} +div.modal .modal-footer:after { + clear: both; +} +div.modal .modal-footer .btn { + float: right; + margin-left: 10px; +} +div.twipsy { + display: block; + position: absolute; + visibility: visible; + padding: 5px; + font-size: 11px; + z-index: 1000; + filter: alpha(opacity=80); + -khtml-opacity: 0.8; + -moz-opacity: 0.8; + opacity: 0.8; +} +div.twipsy.above .twipsy-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000000; +} +div.twipsy.left .twipsy-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid #000000; +} +div.twipsy.below .twipsy-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid #000000; +} +div.twipsy.right .twipsy-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-right: 5px solid #000000; +} +div.twipsy .twipsy-inner { + padding: 3px 8px; + background-color: #000; + color: white; + text-align: center; + max-width: 200px; + text-decoration: none; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +div.twipsy .twipsy-arrow { + position: absolute; + width: 0; + height: 0; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1000; + padding: 5px; + display: none; +} +.popover.above .arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-top: 5px solid #000000; +} +.popover.right .arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-right: 5px solid #000000; +} +.popover.below .arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-left: 5px solid transparent; + border-right: 5px solid transparent; + border-bottom: 5px solid #000000; +} +.popover.left .arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-top: 5px solid transparent; + border-bottom: 5px solid transparent; + border-left: 5px solid #000000; +} +.popover .arrow { + position: absolute; + width: 0; + height: 0; +} +.popover .inner { + background: rgba(0, 0, 0, 0.8); + padding: 3px; + overflow: hidden; + width: 280px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); +} +.popover .title { + background: #f5f5f5; + padding: 9px 15px; + line-height: 1; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; + border-bottom: 1px solid #eee; +} +.popover .content { + background-color: #ffffff; + padding: 14px; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + -webkit-background-clip: padding; + -moz-background-clip: padding; + background-clip: padding; +} +.popover .content p, .popover .content ul, .popover .content ol { + margin-bottom: 0; +} diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.min.css b/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.min.css new file mode 100644 index 000000000..ddfa4a604 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/bootstrap-1.0.0.min.css @@ -0,0 +1,221 @@ +html,body{margin:0;padding:0;} +h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,cite,code,del,dfn,em,img,q,s,samp,small,strike,strong,sub,sup,tt,var,dd,dl,dt,li,ol,ul,fieldset,form,label,legend,button,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;font-weight:normal;font-style:normal;font-size:100%;line-height:1;font-family:inherit;} +table{border-collapse:collapse;border-spacing:0;} +ol,ul{list-style:none;} +q:before,q:after,blockquote:before,blockquote:after{content:"";} +header,section,footer,article,aside{display:block;} +.clearfix{zoom:1;}.clearfix:before,.clearfix:after{display:table;content:"";} +.clearfix:after{clear:both;} +.center-block{display:block;margin:0 auto;} +.container{width:940px;margin:0 auto;zoom:1;}.container:before,.container:after{display:table;content:"";} +.container:after{clear:both;} +.row{zoom:1;}.row:before,.row:after{display:table;content:"";} +.row:after{clear:both;} +.row .span1{float:left;width:40px;margin-left:20px;}.row .span1:first-child{margin-left:0;} +.row .span2{float:left;width:100px;margin-left:20px;}.row .span2:first-child{margin-left:0;} +.row .span3{float:left;width:160px;margin-left:20px;}.row .span3:first-child{margin-left:0;} +.row .span4{float:left;width:220px;margin-left:20px;}.row .span4:first-child{margin-left:0;} +.row .span5{float:left;width:280px;margin-left:20px;}.row .span5:first-child{margin-left:0;} +.row .span6{float:left;width:340px;margin-left:20px;}.row .span6:first-child{margin-left:0;} +.row .span7{float:left;width:400px;margin-left:20px;}.row .span7:first-child{margin-left:0;} +.row .span8{float:left;width:460px;margin-left:20px;}.row .span8:first-child{margin-left:0;} +.row .span9{float:left;width:520px;margin-left:20px;}.row .span9:first-child{margin-left:0;} +.row .span10{float:left;width:580px;margin-left:20px;}.row .span10:first-child{margin-left:0;} +.row .span11{float:left;width:640px;margin-left:20px;}.row .span11:first-child{margin-left:0;} +.row .span12{float:left;width:700px;margin-left:20px;}.row .span12:first-child{margin-left:0;} +.row .span13{float:left;width:760px;margin-left:20px;}.row .span13:first-child{margin-left:0;} +.row .span14{float:left;width:820px;margin-left:20px;}.row .span14:first-child{margin-left:0;} +.row .span15{float:left;width:880px;margin-left:20px;}.row .span15:first-child{margin-left:0;} +.row .span16{float:left;width:940px;margin-left:20px;}.row .span16:first-child{margin-left:0;} +.row .offset1{margin-left:80px !important;}.row .offset1:first-child{margin-left:60px !important;} +.row .offset2{margin-left:140px !important;}.row .offset2:first-child{margin-left:120px !important;} +.row .offset3{margin-left:200px !important;}.row .offset3:first-child{margin-left:180px !important;} +.row .offset4{margin-left:260px !important;}.row .offset4:first-child{margin-left:240px !important;} +.row .offset5{margin-left:320px !important;}.row .offset5:first-child{margin-left:300px !important;} +.row .offset6{margin-left:380px !important;}.row .offset6:first-child{margin-left:360px !important;} +.row .offset7{margin-left:440px !important;}.row .offset7:first-child{margin-left:420px !important;} +.row .offset8{margin-left:500px !important;}.row .offset8:first-child{margin-left:480px !important;} +.row .offset9{margin-left:500px !important;}.row .offset9:first-child{margin-left:480px !important;} +.row .offset10{margin-left:620px !important;}.row .offset10:first-child{margin-left:600px !important;} +.row .offset11{margin-left:680px !important;}.row .offset11:first-child{margin-left:660px !important;} +.row .offset12{margin-left:740px !important;}.row .offset12:first-child{margin-left:720px !important;} +html,body{background-color:#fff;} +body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:18px;color:#808080;text-rendering:optimizeLegibility;} +div.container{width:940px;margin:0 auto;} +div.container-fluid{padding:20px;zoom:1;}div.container-fluid:before,div.container-fluid:after{display:table;content:"";} +div.container-fluid:after{clear:both;} +div.container-fluid div.sidebar{float:left;width:220px;} +div.container-fluid div.content{min-width:700px;max-width:1180px;margin-left:240px;} +a{color:#0069d6;text-decoration:none;line-height:inherit;}a:hover{color:#0050a3;text-decoration:underline;} +.btn{display:inline-block;background-color:#e6e6e6;background-repeat:no-repeat;background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), color-stop(0.25, #ffffff), to(#e6e6e6));background-image:-webkit-linear-gradient(#ffffff, color-stop(0.25, #ffffff), #e6e6e6);background-image:-moz-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-ms-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:-o-linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);background-image:linear-gradient(#ffffff, color-stop(#ffffff, 0.25), #e6e6e6);padding:4px 14px;text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);color:#333333;font-size:13px;line-height:18px;border:1px solid rgba(0, 0, 0, 0.1);border-bottom-color:rgba(0, 0, 0, 0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 0 rgba(255, 255, 255, 0.2),0 1px 2px rgba(0, 0, 0, 0.05);-webkit-transition:0.1s linear all;-moz-transition:0.1s linear all;transition:0.1s linear all;}.btn:hover{background-position:0 -15px;color:#333333;text-decoration:none;} +.btn.primary{background-color:#0064cd;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#049cdb), to(#0064cd));background-image:-moz-linear-gradient(#049cdb, #0064cd);background-image:-ms-linear-gradient(#049cdb, #0064cd);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #049cdb), color-stop(100%, #0064cd));background-image:-webkit-linear-gradient(#049cdb, #0064cd);background-image:-o-linear-gradient(#049cdb, #0064cd);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#049cdb', endColorstr='#0064cd', GradientType=0);background-image:linear-gradient(#049cdb, #0064cd);color:#fff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);}.btn.primary:hover{color:#fff;} +.btn.large{font-size:16px;line-height:28px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;} +.btn.small{padding-right:9px;padding-left:9px;font-size:11px;} +.btn:disabled,.btn.disabled{background-image:none;filter:alpha(opacity=65);-khtml-opacity:0.65;-moz-opacity:0.65;opacity:0.65;cursor:default;} +.btn:active{-webkit-box-shadow:inset 0 3px 7px rgba(0, 0, 0, 0.1),0 1px 2px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 3px 7px rgba(0, 0, 0, 0.1),0 1px 2px rgba(0, 0, 0, 0.05);box-shadow:inset 0 3px 7px rgba(0, 0, 0, 0.1),0 1px 2px rgba(0, 0, 0, 0.05);} +button.btn::-moz-focus-inner,input[type=submit].btn::-moz-focus-inner{padding:0;border:0;} +p{font-size:13px;font-weight:normal;line-height:18px;margin-bottom:18px;}p small{font-size:11px;color:#bfbfbf;} +h1,h2,h3,h4,h5,h6{font-weight:bold;color:#404040;}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{color:#bfbfbf;} +h1{margin-bottom:18px;font-size:30px;line-height:36px;}h1 small{font-size:18px;} +h2{font-size:24px;line-height:36px;}h2 small{font-size:14px;} +h3,h4,h5,h6{line-height:36px;} +h3{font-size:18px;}h3 small{font-size:14px;} +h4{font-size:16px;}h4 small{font-size:12px;} +h5{font-size:14px;} +h6{font-size:13px;color:#bfbfbf;text-transform:uppercase;} +ul,ol{margin:0 0 18px 25px;} +ul ul,ul ol,ol ol,ol ul{margin-bottom:0;} +ul{list-style:disc;} +ol{list-style:decimal;} +li{line-height:18px;color:#808080;} +ul.unstyled{list-style:none;margin-left:0;} +dl{margin-bottom:18px;}dl dt,dl dd{line-height:18px;} +dl dt{font-weight:bold;} +dl dd{margin-left:9px;} +hr{margin:0 0 19px;border:0;border-bottom:1px solid #eee;} +strong{font-style:inherit;font-weight:bold;line-height:inherit;} +em{font-style:italic;font-weight:inherit;line-height:inherit;} +.muted{color:#e6e6e6;} +blockquote{margin-bottom:18px;border-left:5px solid #eee;padding-left:15px;}blockquote p{font-size:14px;font-weight:300;line-height:18px;margin-bottom:0;} +blockquote small,blockquote cite{display:block;font-size:12px;font-weight:300;line-height:18px;color:#bfbfbf;}blockquote small:before,blockquote cite:before{content:'\2014 \00A0';} +address{display:block;line-height:18px;margin-bottom:18px;} +code,pre{padding:0 3px 2px;font-family:Monaco, Andale Mono, Courier New, monospace;font-size:12px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +code{background-color:#fee9cc;color:rgba(0, 0, 0, 0.75);padding:1px 3px;} +pre{background-color:#f5f5f5;display:block;padding:17px;margin:0 0 18px;line-height:18px;font-size:12px;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;white-space:pre-wrap;} +form{margin-bottom:18px;}form fieldset{margin-bottom:18px;padding-top:18px;}form fieldset legend{display:block;margin-left:150px;font-size:20px;line-height:1;color:#404040;} +form div.clearfix{margin-bottom:18px;} +form label,form input,form select,form textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:normal;} +form label{padding-top:6px;font-size:13px;line-height:18px;float:left;width:130px;text-align:right;color:#404040;} +form div.input{margin-left:150px;} +form input[type=checkbox],form input[type=radio]{cursor:pointer;} +form input[type=text],form input[type=password],form textarea,form select,form .uneditable-input{display:inline-block;width:210px;margin:0;padding:4px;font-size:13px;line-height:18px;height:18px;color:#808080;border:1px solid #ccc;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;} +form select,form input[type=file]{height:27px;line-height:27px;} +form textarea{height:auto;} +form .uneditable-input{background-color:#eee;display:block;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.075);} +form :-moz-placeholder{color:#bfbfbf;} +form ::-webkit-input-placeholder{color:#bfbfbf;} +form input[type=text],form input[type=password],form select,form textarea{-webkit-transition:border linear 0.2s,box-shadow linear 0.2s;-moz-transition:border linear 0.2s,box-shadow linear 0.2s;transition:border linear 0.2s,box-shadow linear 0.2s;-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1);} +form input[type=text]:focus,form input[type=password]:focus,form textarea:focus{outline:none;border-color:rgba(82, 168, 236, 0.8);-webkit-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);-moz-box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);box-shadow:inset 0 1px 3px rgba(0, 0, 0, 0.1),0 0 8px rgba(82, 168, 236, 0.6);} +form div.error{background:#fae5e3;padding:10px 0;margin:-10px 0 10px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}form div.error>label,form div.error span.help-inline,form div.error span.help-block{color:#9d261d;} +form div.error input[type=text],form div.error input[type=password],form div.error textarea{border-color:#c87872;-webkit-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);-moz-box-shadow:0 0 3px rgba(171, 41, 32, 0.25);box-shadow:0 0 3px rgba(171, 41, 32, 0.25);}form div.error input[type=text]:focus,form div.error input[type=password]:focus,form div.error textarea:focus{border-color:#b9554d;-webkit-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);-moz-box-shadow:0 0 6px rgba(171, 41, 32, 0.5);box-shadow:0 0 6px rgba(171, 41, 32, 0.5);} +form div.error div.input-prepend span.add-on,form div.error div.input-append span.add-on{background:#f4c8c5;border-color:#c87872;color:#b9554d;} +form .input-mini,form input.mini,form textarea.mini,form select.mini{width:60px;} +form .input-small,form input.small,form textarea.small,form select.small{width:90px;} +form .input-medium,form input.medium,form textarea.medium,form select.medium{width:150px;} +form .input-large,form input.large,form textarea.large,form select.large{width:210px;} +form .input-xlarge,form input.xlarge,form textarea.xlarge,form select.xlarge{width:270px;} +form .input-xxlarge,form input.xxlarge,form textarea.xxlarge,form select.xxlarge{width:530px;} +form textarea.xxlarge{overflow-y:scroll;} +form input[readonly]:focus,form textarea[readonly]:focus,form input.disabled{background:#f5f5f5;border-color:#ddd;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;} +div.actions{background:#f5f5f5;margin-top:18px;margin-bottom:18px;padding:17px 20px 18px 150px;border-top:1px solid #ddd;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;}div.actions div.secondary-action{float:right;}div.actions div.secondary-action a{line-height:30px;}div.actions div.secondary-action a:hover{text-decoration:underline;} +.help-inline,.help-block{font-size:12px;line-height:18px;color:#bfbfbf;} +.help-inline{padding-left:5px;} +.help-block{display:block;max-width:600px;} +div.inline-inputs{color:#808080;}div.inline-inputs span,div.inline-inputs input[type=text]{display:inline-block;} +div.inline-inputs input.mini{width:60px;} +div.inline-inputs input.small{width:90px;} +div.inline-inputs span{padding:0 2px 0 1px;} +div.input-prepend input[type=text],div.input-append input[type=text]{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;} +div.input-prepend .add-on,div.input-append .add-on{background:#f5f5f5;float:left;display:block;width:auto;min-width:16px;padding:4px 4px 4px 5px;color:#bfbfbf;font-weight:normal;line-height:18px;height:18px;text-align:center;text-shadow:0 1px 0 #fff;border:1px solid #ccc;border-right-width:0;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +div.input-prepend .active,div.input-append .active{background:#a9dba9;border-color:#46a546;} +div.input-append input[type=text]{float:left;-webkit-border-radius:3px 0 0 3px;-moz-border-radius:3px 0 0 3px;border-radius:3px 0 0 3px;} +div.input-append .add-on{-webkit-border-radius:0 3px 3px 0;-moz-border-radius:0 3px 3px 0;border-radius:0 3px 3px 0;border-right-width:1px;border-left-width:0;} +ul.inputs-list{margin:0 0 5px;width:100%;}ul.inputs-list li{display:block;padding:0;width:100%;}ul.inputs-list li label{display:block;float:none;width:auto;padding:0;line-height:18px;text-align:left;white-space:normal;}ul.inputs-list li label strong{color:#808080;} +ul.inputs-list li label small{font-size:12px;font-weight:normal;} +ul.inputs-list li ul.inputs-list{margin-left:25px;margin-bottom:10px;padding-top:0;} +ul.inputs-list li:first-child{padding-top:5px;} +ul.inputs-list input[type=radio],ul.inputs-list input[type=checkbox]{margin-bottom:0;} +form.form-stacked{padding-left:20px;}form.form-stacked fieldset{padding-top:9px;} +form.form-stacked legend{margin-left:0;} +form.form-stacked label{display:block;float:none;width:auto;font-weight:bold;text-align:left;line-height:20px;padding-top:0;} +form.form-stacked div.clearfix{margin-bottom:9px;}form.form-stacked div.clearfix div.input{margin-left:0;} +form.form-stacked ul.inputs-list{margin-bottom:0;}form.form-stacked ul.inputs-list li{padding-top:0;}form.form-stacked ul.inputs-list li label{font-weight:normal;padding-top:0;} +form.form-stacked div.actions{margin-left:-20px;padding-left:20px;} +table{width:100%;margin-bottom:18px;padding:0;text-align:left;border-collapse:separate;font-size:13px;}table th,table td{padding:10px 10px 9px;line-height:13.5px;vertical-align:middle;border-bottom:1px solid #ddd;} +table th{padding-top:9px;font-weight:bold;border-bottom-width:2px;} +table.zebra-striped tbody tr:nth-child(odd) td{background-color:#f9f9f9;} +table.zebra-striped tbody tr:hover td{background-color:#f5f5f5;} +table.zebra-striped th.header{cursor:pointer;}table.zebra-striped th.header:after{content:"";float:right;margin-top:7px;border-width:0 4px 4px;border-style:solid;border-color:#000 transparent;visibility:hidden;} +table.zebra-striped th.headerSortUp,table.zebra-striped th.headerSortDown{background-color:rgba(141, 192, 219, 0.25);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;} +table.zebra-striped th.header:hover:after{visibility:visible;} +table.zebra-striped th.actions:hover{background-image:none;} +table.zebra-striped th.headerSortDown:after,table.zebra-striped th.headerSortDown:hover:after{visibility:visible;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table.zebra-striped th.headerSortUp:after{border-bottom:none;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #000;visibility:visible;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;filter:alpha(opacity=60);-khtml-opacity:0.6;-moz-opacity:0.6;opacity:0.6;} +table.zebra-striped th.blue{color:#049cdb;border-bottom-color:#049cdb;} +table.zebra-striped th.headerSortUp.blue,table.zebra-striped th.headerSortDown.blue{background-color:#ade6fe;} +table.zebra-striped th.green{color:#46a546;border-bottom-color:#46a546;} +table.zebra-striped th.headerSortUp.green,table.zebra-striped th.headerSortDown.green{background-color:#cdeacd;} +table.zebra-striped th.red{color:#9d261d;border-bottom-color:#9d261d;} +table.zebra-striped th.headerSortUp.red,table.zebra-striped th.headerSortDown.red{background-color:#f4c8c5;} +table.zebra-striped th.yellow{color:#ffc40d;border-bottom-color:#ffc40d;} +table.zebra-striped th.headerSortUp.yellow,table.zebra-striped th.headerSortDown.yellow{background-color:#fff6d9;} +table.zebra-striped th.orange{color:#f89406;border-bottom-color:#f89406;} +table.zebra-striped th.headerSortUp.orange,table.zebra-striped th.headerSortDown.orange{background-color:#fee9cc;} +table.zebra-striped th.purple{color:#7a43b6;border-bottom-color:#7a43b6;} +table.zebra-striped th.headerSortUp.purple,table.zebra-striped th.headerSortDown.purple{background-color:#e2d5f0;} +div.topbar{background-color:#222222;background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(#333333), to(#222222));background-image:-moz-linear-gradient(#333333, #222222);background-image:-ms-linear-gradient(#333333, #222222);background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, #333333), color-stop(100%, #222222));background-image:-webkit-linear-gradient(#333333, #222222);background-image:-o-linear-gradient(#333333, #222222);-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#333333', endColorstr='#222222', GradientType=0);background-image:linear-gradient(#333333, #222222);height:40px;position:fixed;top:0;left:0;right:0;z-index:10000;overflow:visible;-webkit-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);-moz-box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);box-shadow:0 1px 3px rgba(0, 0, 0, 0.25),inset 0 -1px 0 rgba(0, 0, 0, 0.1);}div.topbar a{color:#bfbfbf;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);} +div.topbar ul li a:hover,div.topbar ul li.active a,div.topbar a.logo:hover{background-color:#333;background-color:rgba(255, 255, 255, 0.15);color:#ffffff;text-decoration:none;} +div.topbar a.logo{float:left;display:block;padding:8px 20px 12px;margin-left:-20px;color:#ffffff;font-size:20px;font-weight:200;line-height:1;}div.topbar a.logo img{float:left;margin-right:6px;} +div.topbar form{float:left;margin:5px 0 0 0;position:relative;filter:alpha(opacity=100);-khtml-opacity:1;-moz-opacity:1;opacity:1;}div.topbar form input{background-color:#bfbfbf;background-color:rgba(255, 255, 255, 0.3);font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:normal;font-weight:13px;line-height:1;width:220px;padding:4px 9px;color:#fff;color:rgba(255, 255, 255, 0.75);border:1px solid #111;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-moz-box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);box-shadow:inset 0 1px 2px rgba(0, 0, 0, 0.1),0 1px 0px rgba(255, 255, 255, 0.25);-webkit-transition:none;-moz-transition:none;transition:none;}div.topbar form input:-moz-placeholder{color:#e6e6e6;} +div.topbar form input::-webkit-input-placeholder{color:#e6e6e6;} +div.topbar form input:hover{background-color:#444;background-color:rgba(255, 255, 255, 0.5);color:#fff;} +div.topbar form input:focus,div.topbar form input.focused{outline:none;background-color:#fff;color:#404040;text-shadow:0 1px 0 #fff;border:0;padding:5px 10px;-webkit-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);-moz-box-shadow:0 0 3px rgba(0, 0, 0, 0.15);box-shadow:0 0 3px rgba(0, 0, 0, 0.15);} +div.topbar ul{display:block;float:left;margin:0 10px 0 0;position:relative;}div.topbar ul.secondary-nav{float:right;margin-left:10px;margin-right:0;} +div.topbar ul li{display:block;float:left;font-size:13px;}div.topbar ul li a{display:block;float:none;padding:10px 10px 11px;line-height:19px;text-decoration:none;}div.topbar ul li a:hover{color:#fff;text-decoration:none;} +div.topbar ul li.active a{background-color:#222;background-color:rgba(0, 0, 0, 0.5);} +div.topbar ul.primary-nav li ul{left:0;} +div.topbar ul.secondary-nav li ul{right:0;} +div.topbar ul li.menu{position:relative;}div.topbar ul li.menu a.menu:after{width:0px;height:0px;display:inline-block;content:"↓";text-indent:-99999px;vertical-align:top;margin-top:8px;margin-left:4px;border-left:4px solid transparent;border-right:4px solid transparent;border-top:4px solid #fff;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;} +div.topbar ul li.menu.open a.menu,div.topbar ul li.menu.open a:hover{background-color:#00b4eb;background-color:rgba(255, 255, 255, 0.1);color:#fff;} +div.topbar ul li.menu.open ul{display:block;}div.topbar ul li.menu.open ul li a{background-color:transparent;font-weight:normal;}div.topbar ul li.menu.open ul li a:hover{background-color:rgba(255, 255, 255, 0.1);color:#fff;} +div.topbar ul li.menu.open ul li.active a{background-color:rgba(255, 255, 255, 0.1);font-weight:bold;} +div.topbar ul li ul{background-color:#333;float:left;display:none;position:absolute;top:40px;min-width:160px;max-width:220px;_width:160px;margin-left:0;margin-right:0;padding:0;text-align:left;border:0;zoom:1;-webkit-border-radius:0 0 5px 5px;-moz-border-radius:0 0 5px 5px;border-radius:0 0 5px 5px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.6);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.6);box-shadow:0 1px 2px rgba(0, 0, 0, 0.6);}div.topbar ul li ul li{float:none;clear:both;display:block;background:none;font-size:12px;}div.topbar ul li ul li a{display:block;padding:6px 15px;clear:both;font-weight:normal;line-height:19px;color:#bbb;}div.topbar ul li ul li a:hover{background-color:#333;background-color:rgba(255, 255, 255, 0.25);color:#fff;} +div.topbar ul li ul li.divider{height:1px;overflow:hidden;background:rgba(0, 0, 0, 0.2);border-bottom:1px solid rgba(255, 255, 255, 0.1);margin:5px 0;} +div.topbar ul li ul li span{clear:both;display:block;background:rgba(0, 0, 0, 0.2);padding:6px 15px;cursor:default;color:#808080;border-top:1px solid rgba(0, 0, 0, 0.2);} +div.page-header{margin-bottom:17px;border-bottom:1px solid #ddd;-webkit-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);-moz-box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);box-shadow:0 1px 0 rgba(255, 255, 255, 0.5);}div.page-header h1{margin-bottom:8px;} +div.alert-message{background-color:rgba(0, 0, 0, 0.15);background-repeat:repeat-x;background-image:-khtml-gradient(linear, left top, left bottom, from(transparent), to(rgba(0, 0, 0, 0.15)));background-image:-moz-linear-gradient(transparent, rgba(0, 0, 0, 0.15));background-image:-ms-linear-gradient(transparent, rgba(0, 0, 0, 0.15));background-image:-webkit-gradient(linear, left top, left bottom, color-stop(0%, transparent), color-stop(100%, rgba(0, 0, 0, 0.15)));background-image:-webkit-linear-gradient(transparent, rgba(0, 0, 0, 0.15));background-image:-o-linear-gradient(transparent, rgba(0, 0, 0, 0.15));-ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr='transparent', endColorstr='rgba(0, 0, 0, 0.15)', GradientType=0)";filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='transparent', endColorstr='rgba(0, 0, 0, 0.15)', GradientType=0);background-image:linear-gradient(transparent, rgba(0, 0, 0, 0.15));background-color:#e6e6e6;margin-bottom:18px;padding:8px 15px;color:#fff;text-shadow:0 -1px 0 rgba(0, 0, 0, 0.25);border-bottom:1px solid rgba(0, 0, 0, 0.25);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}div.alert-message p{color:#fff;margin-bottom:0;}div.alert-message p+p{margin-top:5px;} +div.alert-message.error{background-color:#e06359;} +div.alert-message.warning{background-color:#ffd75a;} +div.alert-message.success{background-color:#74c474;} +div.alert-message.info{background-color:#30c0fb;} +div.alert-message a.close{float:right;margin-top:-2px;color:#fff;font-size:20px;font-weight:bold;text-shadow:0 1px 0 rgba(0, 0, 0, 0.5);filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;}div.alert-message a.close:hover{text-decoration:none;filter:alpha(opacity=50);-khtml-opacity:0.5;-moz-opacity:0.5;opacity:0.5;} +div.block-message{margin-bottom:18px;padding:14px;color:#404040;color:rgba(0, 0, 0, 0.8);text-shadow:0 1px 0 rgba(255, 255, 255, 0.25);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;}div.block-message p{color:#404040;color:rgba(0, 0, 0, 0.8);margin-right:30px;margin-bottom:0;} +div.block-message ul{margin-bottom:0;} +div.block-message strong{display:block;} +div.block-message a.close{display:block;color:#404040;color:rgba(0, 0, 0, 0.5);text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);} +div.block-message.error{background:#f8dcda;border:1px solid #f4c8c5;} +div.block-message.warning{background:#fff0c0;border:1px solid #ffe38d;} +div.block-message.success{background:#dff1df;border:1px solid #bbe2bb;} +div.block-message.info{background:#c7eefe;border:1px solid #ade6fe;} +ul.tabs,ul.pills{margin:0 0 20px;padding:0;zoom:1;}ul.tabs:before,ul.pills:before,ul.tabs:after,ul.pills:after{display:table;content:"";} +ul.tabs:after,ul.pills:after{clear:both;} +ul.tabs li,ul.pills li{display:inline;}ul.tabs li a,ul.pills li a{float:left;width:auto;} +ul.tabs{width:100%;border-bottom:1px solid #bfbfbf;}ul.tabs li a{margin-bottom:-1px;margin-right:2px;padding:0 15px;line-height:35px;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;}ul.tabs li a:hover{background-color:#e6e6e6;border-bottom:1px solid #bfbfbf;} +ul.tabs li.active a{background-color:#fff;padding:0 14px;border:1px solid #ccc;border-bottom:0;color:#808080;} +ul.pills li a{margin:5px 3px 5px 0;padding:0 15px;text-shadow:0 1px 1px #fff;line-height:30px;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px;}ul.pills li a:hover{background:#0050a3;color:#fff;text-decoration:none;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} +ul.pills li.active a{background:#0069d6;color:#fff;text-shadow:0 1px 1px rgba(0, 0, 0, 0.25);} +div.pagination{height:36px;margin:18px 0;}div.pagination ul{float:left;margin:0;border:1px solid rgba(0, 0, 0, 0.15);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;-webkit-box-shadow:0 1px 2px rgba(0, 0, 0, 0.075);-moz-box-shadow:0 1px 2px rgba(0, 0, 0, 0.075);box-shadow:0 1px 2px rgba(0, 0, 0, 0.075);}div.pagination ul li{display:inline;}div.pagination ul li a{float:left;padding:0 14px;line-height:34px;border-right:1px solid rgba(0, 0, 0, 0.15);text-decoration:none;} +div.pagination ul li a:hover,div.pagination ul li.active a{background-color:#c7eefe;} +div.pagination ul li.disabled a,div.pagination ul li.disabled a:hover{background-color:none;color:#bfbfbf;} +div.pagination ul li.next a,div.pagination ul li:last-child a{border:0;} +div.well{background:#f5f5f5;margin-bottom:20px;padding:19px;min-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);-moz-box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);box-shadow:inset 0 1px 1px rgba(0, 0, 0, 0.05);} +div.modal-backdrop{background-color:rgba(0, 0, 0, 0.5);position:fixed;top:0;left:0;right:0;bottom:0;z-index:1000;} +div.modal{position:fixed;top:50%;left:50%;z-index:2000;width:560px;margin:-280px 0 0 -250px;background-color:#ffffff;border:1px solid rgba(0, 0, 0, 0.3);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-webkit-background-clip:padding;-moz-background-clip:padding;background-clip:padding;}div.modal .modal-header{border-bottom:1px solid #eee;padding:5px 20px;}div.modal .modal-header a.close{position:absolute;right:10px;top:10px;color:#999;line-height:10px;font-size:18px;} +div.modal .modal-body{padding:20px;} +div.modal .modal-footer{background-color:#f5f5f5;padding:14px 20px 15px;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;-webkit-box-shadow:inset 0 1px 0 #ffffff;-moz-box-shadow:inset 0 1px 0 #ffffff;box-shadow:inset 0 1px 0 #ffffff;zoom:1;}div.modal .modal-footer:before,div.modal .modal-footer:after{display:table;content:"";} +div.modal .modal-footer:after{clear:both;} +div.modal .modal-footer .btn{float:right;margin-left:10px;} +div.twipsy{display:block;position:absolute;visibility:visible;padding:5px;font-size:11px;z-index:1000;filter:alpha(opacity=80);-khtml-opacity:0.8;-moz-opacity:0.8;opacity:0.8;}div.twipsy.above .twipsy-arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +div.twipsy.left .twipsy-arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +div.twipsy.below .twipsy-arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +div.twipsy.right .twipsy-arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +div.twipsy .twipsy-inner{padding:3px 8px;background-color:#000;color:white;text-align:center;max-width:200px;text-decoration:none;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;} +div.twipsy .twipsy-arrow{position:absolute;width:0;height:0;} +.popover{position:absolute;top:0;left:0;z-index:1000;padding:5px;display:none;}.popover.above .arrow{bottom:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-top:5px solid #000000;} +.popover.right .arrow{top:50%;left:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-right:5px solid #000000;} +.popover.below .arrow{top:0;left:50%;margin-left:-5px;border-left:5px solid transparent;border-right:5px solid transparent;border-bottom:5px solid #000000;} +.popover.left .arrow{top:50%;right:0;margin-top:-5px;border-top:5px solid transparent;border-bottom:5px solid transparent;border-left:5px solid #000000;} +.popover .arrow{position:absolute;width:0;height:0;} +.popover .inner{background:rgba(0, 0, 0, 0.8);padding:3px;overflow:hidden;width:280px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);-moz-box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);box-shadow:0 3px 7px rgba(0, 0, 0, 0.3);} +.popover .title{background:#f5f5f5;padding:9px 15px;line-height:1;-webkit-border-radius:3px 3px 0 0;-moz-border-radius:3px 3px 0 0;border-radius:3px 3px 0 0;border-bottom:1px solid #eee;} +.popover .content{background-color:#ffffff;padding:14px;-webkit-border-radius:0 0 3px 3px;-moz-border-radius:0 0 3px 3px;border-radius:0 0 3px 3px;-webkit-background-clip:padding;-moz-background-clip:padding;background-clip:padding;}.popover .content p,.popover .content ul,.popover .content ol{margin-bottom:0;} diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/css/docs.css b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/css/docs.css new file mode 100644 index 000000000..13868fdd9 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/css/docs.css @@ -0,0 +1,254 @@ +/* Add additional stylesheets below +-------------------------------------------------- */ +/* + Bootstrap's documentation styles + Special styles for presenting Bootstrap's documentation and examples +*/ +/* Body and structure +-------------------------------------------------- */ +body { + background-color: #fff; + position: relative; +} +section { + padding-top: 80px; + margin-bottom: -40px; +} +#masthead, #footer { + background-color: #049cd9; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, left top, left bottom, from(#004D9F), to(#049cd9)); + background-image: -webkit-linear-gradient(#004D9F, #049cd9); + background-image: -moz-linear-gradient(#004D9F, #049cd9); + background-image: -o-linear-gradient(top, #004D9F, #049cd9); + background-image: -khtml-gradient(linear, left top, left bottom, from(#004D9F), to(#049cd9)); + filter: progid:DXImageTransform.Microsoft.Gradient(StartColorStr='#004D9F', EndColorStr='#049cd9', GradientType=0); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorStr='#004D9F', EndColorStr='#049cd9', GradientType=0))"; +} +#masthead div.inner, #footer div.inner { + background: transparent url(../img/grid-18px.png) top center; + padding: 45px 0; + -webkit-box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.3); + -moz-box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.3); + box-shadow: inset 0 10px 30px rgba(0, 0, 0, 0.3); +} +#masthead h1, +#footer h1, +#masthead p, +#footer p { + color: #fff; + text-shadow: 0 1px 1px rgba(0,0,0,.3); +} +#masthead p a, +#footer p a { + color: #fff; + font-weight: bold; +} +#masthead { + margin-top: 40px; +} +#masthead h1, +#masthead p { + text-align: center; + margin-bottom: 9px; +} +#masthead h1 { + font-size: 54px; + line-height: 1; + text-shadow: 0 1px 2px rgba(0,0,0,.5); +} +#masthead p { + font-weight: 300; +} +#masthead p.lead { + font-size: 20px; + line-height: 27px; +} + +div.quickstart { + background-color: #f5f5f5; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(#f9f9f9), to(#f5f5f5)); + background-image: -moz-linear-gradient(#f9f9f9, #f5f5f5); + background-image: -ms-linear-gradient(#f9f9f9, #f5f5f5); + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, #f9f9f9), color-stop(100%, #f5f5f5)); + background-image: -webkit-linear-gradient(#f9f9f9, #f5f5f5); + background-image: -o-linear-gradient(#f9f9f9, #f5f5f5); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f5f5f5', GradientType=0)"; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#f9f9f9', endColorstr='#f5f5f5', GradientType=0); + background-image: linear-gradient(#f9f9f9, #f5f5f5); + margin-bottom: -36px; + border-top: 1px solid #fff; + border-bottom: 1px solid #eee; +} +div.quickstart div.row { + margin: 0 -20px; + -webkit-box-shadow: 1px 0 0 #f9f9f9; + -moz-box-shadow: 1px 0 0 #f9f9f9; + box-shadow: 1px 0 0 #f9f9f9; +} +div.quickstart div.columns { + width: 285px; + height: 117px; + margin-left: 0; + padding: 17px 20px 26px; + border-left: 1px solid #eee; + -webkit-box-shadow: inset 1px 0 0 #f9f9f9; + -moz-box-shadow: inset 1px 0 0 #f9f9f9; + box-shadow: inset 1px 0 0 #f9f9f9; +} +div.quickstart div.columns:last-child { + border-right: 1px solid #eee; + width: 286px; +} +div.quickstart h6, +div.quickstart p { + line-height: 18px; + text-align: center; + margin-bottom: 9px; + color: #333; +} +div.quickstart h6 { + color: #999; +} +div.quickstart form textarea { + display: block; + width: 275px; + height: auto; + margin: 0 0 9px; + line-height: 21px; + white-space: nowrap; + overflow: hidden; +} +#footer { + margin-top: 80px; +} +#footer p { + margin-bottom: 0; + color: rgba(255,255,255,.8) +} +#footer p.right { + float: right; +} +/* Special grid styles +-------------------------------------------------- */ +.show-grid { + margin-top: 20px; + margin-bottom: 20px; +} +.show-grid .column, .show-grid .columns { + background: rgba(0, 0, 0, 0.1); + text-align: center; + -moz-border-radius: 3px; + border-radius: 3px; + height: 30px; + line-height: 30px; +} +.show-grid:hover .column, .show-grid:hover .columns { + background: rgba(0, 0, 0, 0.25); +} +/* Hashgrid.js grid (press G & H to view) +-------------------------------------------------- */ +#grid { + width: 980px; + position: absolute; + top: 0; + left: 50%; + margin-left: -490px; +} +#grid div.vert { + background-color: rgba(0, 206, 209, 0.075); + width: 39px; + border: solid darkturquoise; + border-width: 0 1px; + margin-right: 19px; +} +#grid div.vert.first-line { + margin-left: 19px; +} +#grid div.horiz { + height: 19px; + border-bottom: 1px solid rgba(255, 0, 0, 0.1); + margin: 0; + padding: 0; +} +#grid div.horiz:nth-child(5n) { + border-color: rgba(255, 0, 0, 0.25); +} +/* Render mini layout previews +-------------------------------------------------- */ +div.mini-layout { + height: 340px; + margin-bottom: 20px; + padding: 9px; + border: 1px solid rgba(0, 0, 0, 0.25); + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.125); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.125); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.125); +} +div.mini-layout div { + -moz-border-radius: 3px; + border-radius: 3px; +} +div.mini-layout div.mini-layout-body { + background-color: rgba(141, 192, 219, 0.25); + margin: 0 auto; + width: 450px; + height: 340px; +} +div.mini-layout.fluid div.mini-layout-sidebar, div.mini-layout.fluid div.mini-layout-header, div.mini-layout.fluid div.mini-layout-body { + float: left; +} +div.mini-layout.fluid div.mini-layout-sidebar { + background-color: rgba(141, 192, 219, 0.5); + width: 90px; + height: 340px; +} +div.mini-layout.fluid div.mini-layout-body { + width: 400px; + margin-left: 10px; +} +/* Topbar special styles +-------------------------------------------------- */ +div.topbar-wrapper { + position: relative; + height: 40px; + margin: 5px 0 15px; +} +div.topbar-wrapper div.topbar { + position: absolute; + margin: 0 -20px; + padding-left: 20px; + padding-right: 20px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +/* Popover docs +-------------------------------------------------- */ +div.popover-well { + min-height: 160px; +} + +div.popover-well div.popover { + display: block; +} + +div.popover-well div.popover-wrapper { + width: 50%; + height: 160px; + float: left; + margin-left: 55px; + position:relative; +} + +div.popover-well div.popover-menu-wrapper { + height: 80px; +} + +img.large-bird { + margin: 5px 0 0 310px; + opacity:.1; +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/bird.png b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/bird.png new file mode 100644 index 000000000..f0e6fcb51 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/bird.png differ diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/grid-18px.png b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/grid-18px.png new file mode 100644 index 000000000..68f9fe1b7 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/grid-18px.png differ diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/twitter-logo-no-bird.png b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/twitter-logo-no-bird.png new file mode 100644 index 000000000..70b6573d7 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/img/twitter-logo-no-bird.png differ diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/application.js b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/application.js new file mode 100644 index 000000000..0de6ca96f --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/application.js @@ -0,0 +1,143 @@ +$(document).ready(function(){ + + // scroll spy logic + // ================ + + var activeTarget, + $window = $(window), + position = {}, + nav = $('body > .topbar li a'), + targets = nav.map(function () { + return $(this).attr('href'); + }), + offsets = $.map(targets, function (id) { + return $(id).offset().top; + }); + + + function setButton(id) { + nav.parent("li").removeClass('active'); + $(nav[$.inArray(id, targets)]).parent("li").addClass('active'); + } + + function processScroll(e) { + var scrollTop = $window.scrollTop() + 10, i; + for (i = offsets.length; i--;) { + if (activeTarget != targets[i] && scrollTop >= offsets[i] && (!offsets[i + 1] || scrollTop <= offsets[i + 1])) { + activeTarget = targets[i]; + setButton(activeTarget); + } + } + } + + nav.click(function () { + processScroll(); + }); + + processScroll(); + + $window.scroll(processScroll); + + + // Dropdown example for topbar nav + // =============================== + + $("body").bind("click", function(e) { + $("ul.menu-dropdown").hide(); + $('a.menu').parent("li").removeClass("open").children("ul.menu-dropdown").hide(); + }); + + $("a.menu").click(function(e) { + var $target = $(this); + var $parent = $target.parent("li"); + var $siblings = $target.siblings("ul.menu-dropdown"); + var $parentSiblings = $parent.siblings("li"); + if ($parent.hasClass("open")) { + $parent.removeClass("open"); + $siblings.hide(); + } else { + $parent.addClass("open"); + $siblings.show(); + } + $parentSiblings.children("ul.menu-dropdown").hide(); + $parentSiblings.removeClass("open"); + return false; + }); + + + // table sort example + // ================== + + $("#sortTableExample").tablesorter( {sortList: [[1,0]]} ); + + + // add on logic + // ============ + + $('.add-on :checkbox').click(function() { + if ($(this).attr('checked')) { + $(this).parents('.add-on').addClass('active'); + } else { + $(this).parents('.add-on').removeClass('active'); + } + }); + + + // Disable certain links in docs + // ============================= + + $('ul.tabs a, ul.pills a, .pagination a, .well .btn, .actions .btn, .alert-message .btn, a.close').click(function(e) { + e.preventDefault(); + }); + + // Copy code blocks in docs + $(".copy-code").focus(function() { + var el = this; + // push select to event loop for chrome :{o + setTimeout(function () { $(el).select(); }, 1); + }); + + + // POSITION TWIPSIES + // ================= + + $('.twipsies.well a').each(function () { + var type = this.title + , $anchor = $(this) + , $twipsy = $('.twipsy.' + type) + + , twipsy = { + width: $twipsy.width() + 10 + , height: $twipsy.height() + 10 + } + + , anchor = { + position: $anchor.position() + , width: $anchor.width() + , height: $anchor.height() + } + + , offset = { + above: { + top: anchor.position.top - twipsy.height + , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2) + } + , below: { + top: anchor.position.top + anchor.height + , left: anchor.position.left + (anchor.width/2) - (twipsy.width/2) + } + , left: { + top: anchor.position.top + (anchor.height/2) - (twipsy.height/2) + , left: anchor.position.left - twipsy.width - 5 + } + , right: { + top: anchor.position.top + (anchor.height/2) - (twipsy.height/2) + , left: anchor.position.left + anchor.width + 5 + } + } + + $twipsy.css(offset[type]) + + }); + +}); \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.css b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.css new file mode 100644 index 000000000..da6b6e7e1 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.css @@ -0,0 +1,41 @@ +.com { color: #93a1a1; } +.lit { color: #195f91; } +.pun, .opn, .clo { color: #93a1a1; } +.fun { color: #dc322f; } +.str, .atv { color: #268bd2; } +.kwd, .tag { color: #195f91; } +.typ, .atn, .dec, .var { color: #CB4B16; } +.pln { color: #93a1a1; } +pre.prettyprint { + background: #fefbf3; + padding: 9px; + border: 1px solid rgba(0,0,0,.2); + -webkit-box-shadow: 0 1px 2px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 2px rgba(0,0,0,.1); + box-shadow: 0 1px 2px rgba(0,0,0,.1); +} + +/* Specify class=linenums on a pre to get line numbering */ +ol.linenums { margin: 0 0 0 40px; } /* IE indents via margin-left */ +ol.linenums li { color: rgba(0,0,0,.15); line-height: 20px; } +/* Alternate shading for lines */ +li.L1, li.L3, li.L5, li.L7, li.L9 { } + +/* +$base03: #002b36; +$base02: #073642; +$base01: #586e75; +$base00: #657b83; +$base0: #839496; +$base1: #93a1a1; +$base2: #eee8d5; +$base3: #fdf6e3; +$yellow: #b58900; +$orange: #cb4b16; +$red: #dc322f; +$magenta: #d33682; +$violet: #6c71c4; +$blue: #268bd2; +$cyan: #2aa198; +$green: #859900; +*/ \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.js b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.js new file mode 100644 index 000000000..eef5ad7e6 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/docs/assets/js/google-code-prettify/prettify.js @@ -0,0 +1,28 @@ +var q=null;window.PR_SHOULD_USE_CONTINUATION=!0; +(function(){function L(a){function m(a){var f=a.charCodeAt(0);if(f!==92)return f;var b=a.charAt(1);return(f=r[b])?f:"0"<=b&&b<="7"?parseInt(a.substring(1),8):b==="u"||b==="x"?parseInt(a.substring(2),16):a.charCodeAt(1)}function e(a){if(a<32)return(a<16?"\\x0":"\\x")+a.toString(16);a=String.fromCharCode(a);if(a==="\\"||a==="-"||a==="["||a==="]")a="\\"+a;return a}function h(a){for(var f=a.substring(1,a.length-1).match(/\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\[0-3][0-7]{0,2}|\\[0-7]{1,2}|\\[\S\s]|[^\\]/g),a= +[],b=[],o=f[0]==="^",c=o?1:0,i=f.length;c122||(d<65||j>90||b.push([Math.max(65,j)|32,Math.min(d,90)|32]),d<97||j>122||b.push([Math.max(97,j)&-33,Math.min(d,122)&-33]))}}b.sort(function(a,f){return a[0]-f[0]||f[1]-a[1]});f=[];j=[NaN,NaN];for(c=0;ci[0]&&(i[1]+1>i[0]&&b.push("-"),b.push(e(i[1])));b.push("]");return b.join("")}function y(a){for(var f=a.source.match(/\[(?:[^\\\]]|\\[\S\s])*]|\\u[\dA-Fa-f]{4}|\\x[\dA-Fa-f]{2}|\\\d+|\\[^\dux]|\(\?[!:=]|[()^]|[^()[\\^]+/g),b=f.length,d=[],c=0,i=0;c=2&&a==="["?f[c]=h(j):a!=="\\"&&(f[c]=j.replace(/[A-Za-z]/g,function(a){a=a.charCodeAt(0);return"["+String.fromCharCode(a&-33,a|32)+"]"}));return f.join("")}for(var t=0,s=!1,l=!1,p=0,d=a.length;p=5&&"lang-"===b.substring(0,5))&&!(o&&typeof o[1]==="string"))c=!1,b="src";c||(r[f]=b)}i=d;d+=f.length;if(c){c=o[1];var j=f.indexOf(c),k=j+c.length;o[2]&&(k=f.length-o[2].length,j=k-c.length);b=b.substring(5);B(l+i,f.substring(0,j),e,p);B(l+i+j,c,C(b,c),p);B(l+i+k,f.substring(k),e,p)}else p.push(l+i,b)}a.e=p}var h={},y;(function(){for(var e=a.concat(m), +l=[],p={},d=0,g=e.length;d=0;)h[n.charAt(k)]=r;r=r[1];n=""+r;p.hasOwnProperty(n)||(l.push(r),p[n]=q)}l.push(/[\S\s]/);y=L(l)})();var t=m.length;return e}function u(a){var m=[],e=[];a.tripleQuotedStrings?m.push(["str",/^(?:'''(?:[^'\\]|\\[\S\s]|''?(?=[^']))*(?:'''|$)|"""(?:[^"\\]|\\[\S\s]|""?(?=[^"]))*(?:"""|$)|'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$))/,q,"'\""]):a.multiLineStrings?m.push(["str",/^(?:'(?:[^'\\]|\\[\S\s])*(?:'|$)|"(?:[^"\\]|\\[\S\s])*(?:"|$)|`(?:[^\\`]|\\[\S\s])*(?:`|$))/, +q,"'\"`"]):m.push(["str",/^(?:'(?:[^\n\r'\\]|\\.)*(?:'|$)|"(?:[^\n\r"\\]|\\.)*(?:"|$))/,q,"\"'"]);a.verbatimStrings&&e.push(["str",/^@"(?:[^"]|"")*(?:"|$)/,q]);var h=a.hashComments;h&&(a.cStyleComments?(h>1?m.push(["com",/^#(?:##(?:[^#]|#(?!##))*(?:###|$)|.*)/,q,"#"]):m.push(["com",/^#(?:(?:define|elif|else|endif|error|ifdef|include|ifndef|line|pragma|undef|warning)\b|[^\n\r]*)/,q,"#"]),e.push(["str",/^<(?:(?:(?:\.\.\/)*|\/?)(?:[\w-]+(?:\/[\w-]+)+)?[\w-]+\.h|[a-z]\w*)>/,q])):m.push(["com",/^#[^\n\r]*/, +q,"#"]));a.cStyleComments&&(e.push(["com",/^\/\/[^\n\r]*/,q]),e.push(["com",/^\/\*[\S\s]*?(?:\*\/|$)/,q]));a.regexLiterals&&e.push(["lang-regex",/^(?:^^\.?|[!+-]|!=|!==|#|%|%=|&|&&|&&=|&=|\(|\*|\*=|\+=|,|-=|->|\/|\/=|:|::|;|<|<<|<<=|<=|=|==|===|>|>=|>>|>>=|>>>|>>>=|[?@[^]|\^=|\^\^|\^\^=|{|\||\|=|\|\||\|\|=|~|break|case|continue|delete|do|else|finally|instanceof|return|throw|try|typeof)\s*(\/(?=[^*/])(?:[^/[\\]|\\[\S\s]|\[(?:[^\\\]]|\\[\S\s])*(?:]|$))+\/)/]);(h=a.types)&&e.push(["typ",h]);a=(""+a.keywords).replace(/^ | $/g, +"");a.length&&e.push(["kwd",RegExp("^(?:"+a.replace(/[\s,]+/g,"|")+")\\b"),q]);m.push(["pln",/^\s+/,q," \r\n\t\xa0"]);e.push(["lit",/^@[$_a-z][\w$@]*/i,q],["typ",/^(?:[@_]?[A-Z]+[a-z][\w$@]*|\w+_t\b)/,q],["pln",/^[$_a-z][\w$@]*/i,q],["lit",/^(?:0x[\da-f]+|(?:\d(?:_\d+)*\d*(?:\.\d*)?|\.\d\+)(?:e[+-]?\d+)?)[a-z]*/i,q,"0123456789"],["pln",/^\\[\S\s]?/,q],["pun",/^.[^\s\w"-$'./@\\`]*/,q]);return x(m,e)}function D(a,m){function e(a){switch(a.nodeType){case 1:if(k.test(a.className))break;if("BR"===a.nodeName)h(a), +a.parentNode&&a.parentNode.removeChild(a);else for(a=a.firstChild;a;a=a.nextSibling)e(a);break;case 3:case 4:if(p){var b=a.nodeValue,d=b.match(t);if(d){var c=b.substring(0,d.index);a.nodeValue=c;(b=b.substring(d.index+d[0].length))&&a.parentNode.insertBefore(s.createTextNode(b),a.nextSibling);h(a);c||a.parentNode.removeChild(a)}}}}function h(a){function b(a,d){var e=d?a.cloneNode(!1):a,f=a.parentNode;if(f){var f=b(f,1),g=a.nextSibling;f.appendChild(e);for(var h=g;h;h=g)g=h.nextSibling,f.appendChild(h)}return e} +for(;!a.nextSibling;)if(a=a.parentNode,!a)return;for(var a=b(a.nextSibling,0),e;(e=a.parentNode)&&e.nodeType===1;)a=e;d.push(a)}var k=/(?:^|\s)nocode(?:\s|$)/,t=/\r\n?|\n/,s=a.ownerDocument,l;a.currentStyle?l=a.currentStyle.whiteSpace:window.getComputedStyle&&(l=s.defaultView.getComputedStyle(a,q).getPropertyValue("white-space"));var p=l&&"pre"===l.substring(0,3);for(l=s.createElement("LI");a.firstChild;)l.appendChild(a.firstChild);for(var d=[l],g=0;g=0;){var h=m[e];A.hasOwnProperty(h)?window.console&&console.warn("cannot override language handler %s",h):A[h]=a}}function C(a,m){if(!a||!A.hasOwnProperty(a))a=/^\s*=o&&(h+=2);e>=c&&(a+=2)}}catch(w){"console"in window&&console.log(w&&w.stack?w.stack:w)}}var v=["break,continue,do,else,for,if,return,while"],w=[[v,"auto,case,char,const,default,double,enum,extern,float,goto,int,long,register,short,signed,sizeof,static,struct,switch,typedef,union,unsigned,void,volatile"], +"catch,class,delete,false,import,new,operator,private,protected,public,this,throw,true,try,typeof"],F=[w,"alignof,align_union,asm,axiom,bool,concept,concept_map,const_cast,constexpr,decltype,dynamic_cast,explicit,export,friend,inline,late_check,mutable,namespace,nullptr,reinterpret_cast,static_assert,static_cast,template,typeid,typename,using,virtual,where"],G=[w,"abstract,boolean,byte,extends,final,finally,implements,import,instanceof,null,native,package,strictfp,super,synchronized,throws,transient"], +H=[G,"as,base,by,checked,decimal,delegate,descending,dynamic,event,fixed,foreach,from,group,implicit,in,interface,internal,into,is,lock,object,out,override,orderby,params,partial,readonly,ref,sbyte,sealed,stackalloc,string,select,uint,ulong,unchecked,unsafe,ushort,var"],w=[w,"debugger,eval,export,function,get,null,set,undefined,var,with,Infinity,NaN"],I=[v,"and,as,assert,class,def,del,elif,except,exec,finally,from,global,import,in,is,lambda,nonlocal,not,or,pass,print,raise,try,with,yield,False,True,None"], +J=[v,"alias,and,begin,case,class,def,defined,elsif,end,ensure,false,in,module,next,nil,not,or,redo,rescue,retry,self,super,then,true,undef,unless,until,when,yield,BEGIN,END"],v=[v,"case,done,elif,esac,eval,fi,function,in,local,set,then,until"],K=/^(DIR|FILE|vector|(de|priority_)?queue|list|stack|(const_)?iterator|(multi)?(set|map)|bitset|u?(int|float)\d*)/,N=/\S/,O=u({keywords:[F,H,w,"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END"+ +I,J,v],hashComments:!0,cStyleComments:!0,multiLineStrings:!0,regexLiterals:!0}),A={};k(O,["default-code"]);k(x([],[["pln",/^[^]*(?:>|$)/],["com",/^<\!--[\S\s]*?(?:--\>|$)/],["lang-",/^<\?([\S\s]+?)(?:\?>|$)/],["lang-",/^<%([\S\s]+?)(?:%>|$)/],["pun",/^(?:<[%?]|[%?]>)/],["lang-",/^]*>([\S\s]+?)<\/xmp\b[^>]*>/i],["lang-js",/^]*>([\S\s]*?)(<\/script\b[^>]*>)/i],["lang-css",/^]*>([\S\s]*?)(<\/style\b[^>]*>)/i],["lang-in.tag",/^(<\/?[a-z][^<>]*>)/i]]), +["default-markup","htm","html","mxml","xhtml","xml","xsl"]);k(x([["pln",/^\s+/,q," \t\r\n"],["atv",/^(?:"[^"]*"?|'[^']*'?)/,q,"\"'"]],[["tag",/^^<\/?[a-z](?:[\w-.:]*\w)?|\/?>$/i],["atn",/^(?!style[\s=]|on)[a-z](?:[\w:-]*\w)?/i],["lang-uq.val",/^=\s*([^\s"'>]*(?:[^\s"'/>]|\/(?=\s)))/],["pun",/^[/<->]+/],["lang-js",/^on\w+\s*=\s*"([^"]+)"/i],["lang-js",/^on\w+\s*=\s*'([^']+)'/i],["lang-js",/^on\w+\s*=\s*([^\s"'>]+)/i],["lang-css",/^style\s*=\s*"([^"]+)"/i],["lang-css",/^style\s*=\s*'([^']+)'/i],["lang-css", +/^style\s*=\s*([^\s"'>]+)/i]]),["in.tag"]);k(x([],[["atv",/^[\S\s]+/]]),["uq.val"]);k(u({keywords:F,hashComments:!0,cStyleComments:!0,types:K}),["c","cc","cpp","cxx","cyc","m"]);k(u({keywords:"null,true,false"}),["json"]);k(u({keywords:H,hashComments:!0,cStyleComments:!0,verbatimStrings:!0,types:K}),["cs"]);k(u({keywords:G,cStyleComments:!0}),["java"]);k(u({keywords:v,hashComments:!0,multiLineStrings:!0}),["bsh","csh","sh"]);k(u({keywords:I,hashComments:!0,multiLineStrings:!0,tripleQuotedStrings:!0}), +["cv","py"]);k(u({keywords:"caller,delete,die,do,dump,elsif,eval,exit,foreach,for,goto,if,import,last,local,my,next,no,our,print,package,redo,require,sub,undef,unless,until,use,wantarray,while,BEGIN,END",hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["perl","pl","pm"]);k(u({keywords:J,hashComments:!0,multiLineStrings:!0,regexLiterals:!0}),["rb"]);k(u({keywords:w,cStyleComments:!0,regexLiterals:!0}),["js"]);k(u({keywords:"all,and,by,catch,class,else,extends,false,finally,for,if,in,is,isnt,loop,new,no,not,null,of,off,on,or,return,super,then,true,try,unless,until,when,while,yes", +hashComments:3,cStyleComments:!0,multilineStrings:!0,tripleQuotedStrings:!0,regexLiterals:!0}),["coffee"]);k(x([],[["str",/^[\S\s]+/]]),["regex"]);window.prettyPrintOne=function(a,m,e){var h=document.createElement("PRE");h.innerHTML=a;e&&D(h,e);E({g:m,i:e,h:h});return h.innerHTML};window.prettyPrint=function(a){function m(){for(var e=window.PR_SHOULD_USE_CONTINUATION?l.now()+250:Infinity;p=0){var k=k.match(g),f,b;if(b= +!k){b=n;for(var o=void 0,c=b.firstChild;c;c=c.nextSibling)var i=c.nodeType,o=i===1?o?b:c:i===3?N.test(c.nodeValue)?b:o:o;b=(f=o===b?void 0:o)&&"CODE"===f.tagName}b&&(k=f.className.match(g));k&&(k=k[1]);b=!1;for(o=n.parentNode;o;o=o.parentNode)if((o.tagName==="pre"||o.tagName==="code"||o.tagName==="xmp")&&o.className&&o.className.indexOf("prettyprint")>=0){b=!0;break}b||((b=(b=n.className.match(/\blinenums\b(?::(\d+))?/))?b[1]&&b[1].length?+b[1]:!0:!1)&&D(n,b),d={g:k,h:n,i:b},E(d))}}p
          '); + tip.css({position: 'absolute', zIndex: 100000}); + $.data(this, 'active.tipsy', tip); + } + + if ($(this).attr('title') || typeof($(this).attr('original-title')) != 'string') { + $(this).attr('original-title', $(this).attr('title') || '').removeAttr('title'); + } + + var title; + if (typeof opts.title == 'string') { + title = $(this).attr(opts.title == 'title' ? 'original-title' : opts.title); + } else if (typeof opts.title == 'function') { + title = opts.title.call(this); + } + + tip.find('.tipsy-inner')[opts.html ? 'html' : 'text'](title || opts.fallback); + + var pos = $.extend({}, $(this).offset(), {width: this.offsetWidth, height: this.offsetHeight}); + tip.get(0).className = 'tipsy'; // reset classname in case of dynamic gravity + tip.remove().css({top: 0, left: 0, visibility: 'hidden', display: 'block'}).appendTo(document.body); + var actualWidth = tip[0].offsetWidth, actualHeight = tip[0].offsetHeight; + var gravity = (typeof opts.gravity == 'function') ? opts.gravity.call(this) : opts.gravity; + + switch (gravity.charAt(0)) { + case 'n': + tip.css({top: pos.top + pos.height, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-north'); + break; + case 's': + tip.css({top: pos.top - actualHeight, left: pos.left + pos.width / 2 - actualWidth / 2}).addClass('tipsy-south'); + break; + case 'e': + tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left - actualWidth}).addClass('tipsy-east'); + break; + case 'w': + tip.css({top: pos.top + pos.height / 2 - actualHeight / 2, left: pos.left + pos.width}).addClass('tipsy-west'); + break; + } + + if (opts.fade) { + tip.css({opacity: 0, display: 'block', visibility: 'visible'}).animate({opacity: 0.8}); + } else { + tip.css({visibility: 'visible'}); + } + + }, function() { + $.data(this, 'cancel.tipsy', false); + var self = this; + setTimeout(function() { + if ($.data(this, 'cancel.tipsy')) return; + var tip = $.data(self, 'active.tipsy'); + if (opts.fade) { + tip.stop().fadeOut(function() { $(this).remove(); }); + } else { + tip.remove(); + } + }, 100); + + }); + + }); + + }; + + // Overwrite this method to provide options on a per-element basis. + // For example, you could store the gravity in a 'tipsy-gravity' attribute: + // return $.extend({}, options, {gravity: $(ele).attr('tipsy-gravity') || 'n' }); + // (remember - do not modify 'options' in place!) + $.fn.tipsy.elementOptions = function(ele, options) { + return $.metadata ? $.extend({}, options, $(ele).metadata()) : options; + }; + + $.fn.tipsy.defaults = { + fade: false, + fallback: '', + gravity: 'n', + html: false, + title: 'title' + }; + + $.fn.tipsy.autoNS = function() { + return $(this).offset().top > ($(document).scrollTop() + $(window).height() / 2) ? 's' : 'n'; + }; + + $.fn.tipsy.autoWE = function() { + return $(this).offset().left > ($(document).scrollLeft() + $(window).width() / 2) ? 'e' : 'w'; + }; + +})(jQuery); diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/docs/index.html b/src/bb-modules/Filemanager/src/css/bootstrap/docs/index.html new file mode 100644 index 000000000..8c6c43515 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/docs/index.html @@ -0,0 +1,1316 @@ + + + + + Twitter Bootstrap + + + + + + + + + + + + + + + + + +
          +
          +
          +

          Twitter Bootstrap

          +

          + Bootstrap is a toolkit from Twitter designed to kickstart development of webapps and sites.
          + It includes base CSS and HTML for typography, forms, buttons, tables, grids, navigation, and more.
          +

          +

          Nerd alert: Bootstrap is built with Less and was designed to work out of the gate with only modern browsers in mind.

          +
          +
          +
          + +
          +
          +
          +
          +
          Hotlink the CSS
          +

          For the quickest and easiest start, just copy this snippet into your webpage.

          +
          + +
          +
          +
          +
          Use it with Less
          +

          A fan of using Less? No problem, just clone the repo and add these lines:

          +
          + +
          +
          +
          +
          Fork on GitHub
          +

          Download, fork, pull, file issues, and more with the official Bootstrap repo on Github.

          +

          Bootstrap on GitHub »

          +
          +
          +
          +
          + +
          + + +
          + +
          +
          +

          Default grid

          +

          The default grid system provided as part of Bootstrap is a 940px wide 16-column grid. It’s a flavor of the popular 960 grid system, but without the additional margin/padding on the left and right sides.

          +
          +
          +

          Example grid markup

          +

          As shown here, a basic layout can be created with two "columns," each spanning a number of the 16 foundational columns we defined as part of our grid system. See the examples below for more variations.

          +
          +<div class="row">
          +  <div class="span6 columns">
          +    ...
          +  </div>
          +  <div class="span10 columns">
          +    ...
          +  </div>
          +</div>
          +
          +
          +
          + +
          +
          1
          +
          1
          +
          1
          +
          1
          + +
          1
          +
          1
          +
          1
          +
          1
          + +
          1
          +
          1
          +
          1
          +
          1
          + +
          1
          +
          1
          +
          1
          +
          1
          +
          + +
          +
          2
          +
          2
          +
          2
          +
          2
          +
          2
          +
          2
          +
          2
          +
          2
          +
          + +
          +
          3
          +
          3
          +
          3
          +
          3
          +
          3
          +
          1
          +
          + +
          +
          4
          +
          4
          +
          4
          +
          4
          +
          + +
          +
          4
          +
          6
          +
          6
          +
          + +
          +
          8
          +
          8
          +
          + +
          +
          5
          +
          11
          +
          + +
          +
          16
          +
          + +

          Offsetting columns

          +
          +
          4
          +
          8 offset 4
          +
          +
          +
          4 offset 4
          +
          4 offset 4
          +
          +
          +
          5 offset 3
          +
          5 offset 3
          +
          +
          +
          10 offset 6
          +
          +
          + + + + +
          + +
          +
          +

          Fixed layout

          +

          A basic 940px wide, centered container layout for just about any site or page.

          +
          +
          +
          +
          +
          +
          +<body>
          +  <div class="container">
          +    ...
          +  </div>
          +</body>
          +
          +
          +
          +
          +
          +

          Fluid layout

          +

          A flexible fluid or liquid page structure with min- and max-widths and a left-hand sidebar. Great for apps.

          +
          +
          +
          +
          +
          +
          +
          +<body>
          +  <div class="container-fluid">
          +    <div class="sidebar">
          +      ...
          +    </div>
          +    <div class="content">
          +      ...
          +    </div>
          +  </div>
          +</body>
          +
          +
          +
          +
          + + + +
          + + +
          +
          +

          Headings and copy

          +

          A standard typographic hierarchy for structuring your webpages.

          +
          +
          +

          h1. Heading 1

          +

          h2. Heading 2

          +

          h3. Heading 3

          +

          h4. Heading 4

          +
          h5. Heading 5
          +
          h6. Heading 6
          +
          +
          +

          Example paragraph

          +

          Nullam quis risus eget urna mollis ornare vel eu leo. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Nullam id dolor id nibh ultricies vehicula ut id elit.

          +

          Example headingHas sub-heading…

          +

          You can also add subheadings with the <strong> and <em>

          +
          +
          + +
          +
          +

          Misc. elements

          +

          Using emphasis, addresses, & abbreviations

          +

          + <strong> + <em> + <address> + <abbr> +

          +
          +
          +

          When to use

          +

          Emphasis tags (<strong> and <em>) should be used to add visual distinction between a word or phrase and its surrounding copy. Use <strong> for plain old attention and <em> for slick attention and titles.

          +

          Emphasis in a paragraph

          +

          Fusce dapibus, tellus ac cursus commodo, tortor mauris condimentum nibh, ut fermentum massa justo sit amet risus. Maecenas faucibus mollis interdum. Nulla vitae elit libero, a pharetra augue.

          +

          Note: It’s still okay to use <b> and <i> tags in HTML5, but they don’t come with inherent styles anymore. <b> is meant to convey importance while <i> is mostly for voice, technical terms, etc.

          +

          Addresses

          +

          The address element is used for contact information for its nearest ancestor, or the entire body of work. Here’s how it looks:

          +
          + Twitter, Inc.
          + 795 Folsom Ave, Suite 600
          + San Francisco, CA 94107
          + P: (123) 456-7890 +
          +

          Note: Each line in an address must end with a line-break (<br />) or be wrapped in a block-level tag (e.g., p) to properly structure the content.

          +

          Abbreviations

          +

          For abbreviations and acronyms, use the abbr tag (acronym is deprecated in HTML5). Put the shorthand form within the tag and set a title for the complete name.

          +
          +
          + +
          +
          +

          Blockquotes

          +

          + <blockquote> + <p> + <small> +

          +
          +
          +

          Be sure to wrap your blockquote around paragraph and small tags. When citing a source, use the small element. The CSS will automatically preface a name with an em dash (&mdash;).

          +
          +

          Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua…

          + Dr. Julius Hibbert +
          +
          +
          + + +

          Lists

          +
          +
          +

          Unordered <ul>

          +
            +
          • Jeremy Bixby
          • +
          • Robert Dezure
          • +
          • Josh Washington
          • +
          • Anton Capresi
          • +
          • My Team Mates +
              +
            • George Castanza
            • +
            • Jerry Seinfeld
            • +
            • Cosmo Kramer
            • +
            • Elaine Bennis
            • +
            • Newman
            • +
            +
          • +
          • John Jacob
          • +
          • Paul Pierce
          • +
          • Kevin Garnett
          • +
          +
          +
          +

          Unstyled <ul.unstyled>

          +
            +
          • Jeremy Bixby
          • +
          • Robert Dezure
          • +
          • Josh Washington
          • +
          • Anton Capresi
          • +
          • My Team Mates +
              +
            • George Castanza
            • +
            • Jerry Seinfeld
            • +
            • Cosmo Kramer
            • +
            • Elaine Bennis
            • +
            • Newman
            • +
            +
          • +
          • John Jacob
          • +
          • Paul Pierce
          • +
          • Kevin Garnett
          • +
          +
          +
          +

          Ordered <ol>

          +
            +
          1. Jeremy Bixby
          2. +
          3. Robert Dezure
          4. +
          5. Josh Washington
          6. +
          7. Anton Capresi
          8. +
          9. My Team Mates +
              +
            1. George Castanza
            2. +
            3. Jerry Seinfeld
            4. +
            5. Cosmo Kramer
            6. +
            7. Elaine Bennis
            8. +
            9. Newman
            10. +
            +
          10. +
          11. John Jacob
          12. +
          13. Paul Pierce
          14. +
          15. Kevin Garnett
          16. +
          +
          +
          +

          Description dl

          +
          +
          Description lists
          +
          A description list is perfect for defining terms.
          +
          Euismod
          +
          Vestibulum id ligula porta felis euismod semper eget lacinia odio sem nec elit.
          +
          Donec id elit non mi porta gravida at eget metus.
          +
          Malesuada porta
          +
          Etiam porta sem malesuada magna mollis euismod.
          +
          +
          +
          +
          + + +
          + + +
          +
          +

          Building tables

          +

          + <table> + <thead> + <tbody> + <tr> + <th> + <td> + <colspan> + <caption> +

          +

          Tables are great—for a lot of things. Great tables, however, need a bit of markup love to be useful, scalable, and readable (at the code level). Here are a few tips to help.

          +

          Always wrap your column headers in a thead such that hierarchy is thead > tr > th.

          +

          Similar to the column headers, all your table’s body content should be wrapped in a tbody so your hierarchy is tbody > tr > td.

          +
        + +
        +

        Example: Default table styles

        +

        All tables will be automatically styled with only the essential borders to ensure readability and maintain structure. No need to add extra classes or attributes.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        #First NameLast NameLanguage
        1SomeOneEnglish
        2JoeSixpackEnglish
        3StuDentCode
        +
        +<table class="common-table">
        +  ...
        +</table>
        + +

        Example: Zebra-striped

        +

        Get a little fancy with your tables by adding zebra-striping—just add the .zebra-striped class.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        #First NameLast NameLanguage
        1SomeOneEnglish
        2JoeSixpackEnglish
        3StuDentCode
        +
        +<table class="common-table zebra-striped">
        +...
        +</table>
        + +

        Example: Zebra-striped w/ TableSorter.js

        +

        Taking the previous example, we improve the usefulness of our tables by providing sorting functionality via jQuery and the Tablesorter plugin. Click any column’s header to change the sort.

        + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
        #First NameLast NameLanguage
        1YourOneEnglish
        2JoeSixpackEnglish
        3StuDentCode
        +
        +<script src="js/jquery/jquery.tablesorter.min.js"></script>
        +<script >
        +  $(function() {
        +    $("table#sortTableExample").tablesorter({ sortList: [[1,0]] });
        +  });
        +</script>
        +<table class="common-table zebra-striped">
        +  ...
        +</table>
        +
        + + + + + +
        + + + +
        +
        +

        Default styles

        +

        All forms are given default styles to present them in a readable and scalable way. Styles are provided for text inputs, select lists, textareas, radio buttons and checkboxes, and buttons.

        +
        +
        +
        +
        + Example form legend +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        + +
        + Some Value Here +
        +
        +
        + +
        + +
        +
        +
        + +
        + + Small snippet of help text +
        +
        +
        +
        + Example form legend +
        + +
        +
        + @ + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        +
        + + +
        +
        +
        +
        + +
        + +
        +
        +
        +
        + Example form legend +
        + +
        +
          +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        • + +
        • +
        + + Note: Labels surround all the options for much larger click areas and a more usable form. + +
        +
        +
        + +
        +
        + + + to + + + All times are shown as Pacific Standard Time (GMT -08:00). +
        +
        +
        +
        + +
        + + + Block of help text to describe the field above if need be. + +
        +
        +
        + +
        +
          +
        • + +
        • +
        • + +
        • +
        +
        +
        +
        + + +
        +
        +
        +
        +
        + +
        + +
        +
        +

        Stacked forms

        +

        Add .form-stacked to your form’s HTML and you’ll have labels on top of their fields instead of to their left. This works great if your forms are short or you have two columns of inputs for heavier forms.

        +
        +
        +
        +
        + Example form legend +
        + +
        + +
        +
        +
        + +
        + +
        +
        +
        +
        + Example form legend +
        + +
        +
          +
        • + +
        • +
        • + +
        • +
        + + Note: Labels surround all the options for much larger click areas and a more usable form. + +
        +
        +
        +
        + + +
        +
        +
        +
        + +
        +
        +

        Buttons

        +

        As a convention, buttons are used for actions while links are used for objects. For instance, "Download" could be a button and "recent activity" could be a link.

        +

        All buttons default to a light gray style, but a blue .primary class is available. Plus, rolling your own styles is easy peasy.

        +
        +
        +

        Example buttons

        +

        Button styles can be applied to anything with the .btn applied. Typically you’ll want to apply these to only a, button, and select input elements. Here’s how it looks:

        +
        + + +
        +

        Alternate sizes

        +

        Fancy larger or smaller buttons? Have at it!

        + + +

        Disabled state

        +

        For buttons that are not active or are disabled by the app for one reason or another, use the disabled state. That’s .disabled for links and :disabled for button elements.

        +

        Links

        + +

        Buttons

        +
        + + +
        +
        +
        +
        + + + + + + + +
        + +
        +
        +

        Basic alerts

        +

        One-line messages for highlighting the failure, possible failure, or success of an action. Particularly useful for forms.

        +
        +
        +
        + × +

        Oh snap! Change this and that and try again.

        +
        +
        + × +

        Holy gaucamole! Best check yo self, you’re not looking too good.

        +
        +
        + × +

        Well done! You successfully read this alert message.

        +
        +
        + × +

        Heads up! This is an alert that needs your attention, but it’s not a huge priority just yet.

        +
        +
        +
        +
        +
        +

        Block messages

        +

        For messages that require a bit of explanation, we have paragraph style alerts. These are perfect for bubbling up longer error messages, warning a user of a pending action, or just presenting information for more emphasis on the page.

        +
        +
        +
        + × +

        Oh snap! You got an error! Change this and that and try again. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit. Cras mattis consectetur purus sit amet fermentum.

        +

        Take this action Or do this

        +
        +
        + × +

        Holy gaucamole! This is a warning! Best check yo self, you’re not looking too good. Nulla vitae elit libero, a pharetra augue. Praesent commodo cursus magna, vel scelerisque nisl consectetur et.

        +

        Take this action Or do this

        +
        +
        + × +

        Well done! You successfully read this alert message. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Maecenas faucibus mollis interdum.

        +

        Take this action Or do this

        +
        +
        + × +

        Heads up! This is an alert that needs your attention, but it’s not a huge priority just yet.

        +

        Take this action Or do this

        +
        +
        +
        +
        + + +
        + +
        +
        +

        Modals

        +

        Modals—dialogs or lightboxes—are great for contextual actions in situations where it’s important that the background context be maintained.

        +
        +
        +
        + +
        +
        +
        +
        +

        Tool Tips

        +

        Twipsies are super useful for aiding a confused user and pointing them in the right direction.

        +
        +
        +
        +
        +

        +Lorem ipsum dolar sit amet illo error ipsum veritatis aut iste perspiciatis iste voluptas natus illo quasi odit aut natus consequuntur consequuntur, aut natus illo voluptatem odit perspiciatis laudantium rem doloremque totam voluptas. Voluptasdicta eaque beatae aperiam ut enim voluptatem explicabo explicabo, voluptas quia odit fugit accusantium totam totam architecto explicabo sit quasi fugit fugit, totam doloremque unde sunt sed dicta quae accusantium fugit voluptas nemo voluptas voluptatem rem quae aut veritatis quasi quae. +

        +
        +
        +
        below!
        +
        +
        +
        +
        right!
        +
        +
        +
        +
        left!
        +
        +
        +
        +
        above!
        +
        +
        +
        +
        +
        +
        + +
        +
        +

        Popovers

        +

        Use popovers to provide subtextual information to a page without effecting layout.

        +
        +
        +
        +
        +
        +
        +
        +

        Popover Title

        +
        +

        Etiam porta sem malesuada magna mollis euismod. Maecenas faucibus mollis interdum. Morbi leo risus, porta ac consectetur ac, vestibulum at eros.

        +
        +
        +
        + +
        +
        +
        +
        + + +
        + + + +
        + +
        +
        +

        Bootstrap was built with Preboot, an open-source pack of mixins and variables to be used in conjunction with Less, a CSS preprocessor for faster and easier web development.

        +

        Check out how we used Preboot in Bootstrap and how you can make use of it should you choose to run Less on your next project.

        +
        +
        +

        How to use it

        +

        Use this option to make full use of Bootstrap’s Less variables, mixins, and nesting in CSS via javascript in your browser.

        +
        +<link rel="stylesheet/less" href="less/bootstrap.less" media="all" />
        +<script src="js/less-1.0.41.min.js"></script>
        +

        Not feeling the .js solution? Try the Less Mac app or use Node.js to compile when you deploy your code.

        + +

        What’s included

        +

        Here are some of the highlights of what’s included in Twitter Bootstrap as part of Bootstrap. Head over to the Bootstrap website or Github project page to download and learn more.

        +

        Color variables

        +

        Variables in Less are perfect for maintaining and updating your CSS headache free. When you want to change a color value or a frequently used value, update it in one spot and you’re set.

        +
        +// Links
        +@linkColor:         #8b59c2;
        +@linkColorHover:    darken(@linkColor, 10);
        +
        +// Grays
        +@black:             #000;
        +@grayDark:          lighten(@black, 25%);
        +@gray:              lighten(@black, 50%);
        +@grayLight:         lighten(@black, 70%);
        +@grayLighter:       lighten(@black, 90%);
        +@white:             #fff;
        +
        +// Accent Colors
        +@blue:              #08b5fb;
        +@green:             #46a546;
        +@red:               #9d261d;
        +@yellow:            #ffc40d;
        +@orange:            #f89406;
        +@pink:              #c3325f;
        +@purple:            #7a43b6;
        +
        +// Baseline
        +@baseline:          20px;
        +
        + +

        Commenting

        +

        Less also provides another style of commenting in addition to CSS’s normal /* ... */ syntax.

        +
        +// This is a comment
        +/* This is also a comment */
        +
        + +

        Mixins up the wazoo

        +

        Mixins are basically includes or partials for CSS, allowing you to combine a block of code into one. They’re great for vendor prefixed properties like box-shadow, cross-browser gradients, font stacks, and more. Below is a sample of the mixins that are included with Bootstrap.

        +

        Font stacks

        +
        +#font {
        +  .shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) {
        +    font-size: @size;
        +    font-weight: @weight;
        +    line-height: @lineHeight;
        +  }
        +  .sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
        +    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
        +    font-size: @size;
        +    font-weight: @weight;
        +    line-height: @lineHeight;
        +  }
        +  .serif(@weight: normal, @size: 14px, @lineHeight: 20px) {
        +    font-family: "Georgia", Times New Roman, Times, sans-serif;
        +    font-size: @size;
        +    font-weight: @weight;
        +    line-height: @lineHeight;
        +  }
        +  .monospace(@weight: normal, @size: 12px, @lineHeight: 20px) {
        +    font-family: "Monaco", Courier New, monospace;
        +    font-size: @size;
        +    font-weight: @weight;
        +    line-height: @lineHeight;
        +  }
        +}
        +
        +

        Gradients

        +
        +#gradient {
        +  .horizontal (@startColor: #555, @endColor: #333) {
        +    background-color: @endColor;
        +    background-repeat: repeat-x;
        +    background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror
        +    background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+
        +    background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10
        +    background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
        +    background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+
        +    background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10
        +    -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor); // IE8+
        +    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE6 & IE7
        +    background-image: linear-gradient(left, @startColor, @endColor); // Le standard
        +  }
        +  .vertical (@startColor: #555, @endColor: #333) {
        +    background-color: @endColor;
        +    background-repeat: repeat-x;
        +    background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror
        +    background-image: -moz-linear-gradient(@startColor, @endColor); // FF 3.6+
        +    background-image: -ms-linear-gradient(@startColor, @endColor); // IE10
        +    background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+
        +    background-image: -webkit-linear-gradient(@startColor, @endColor); // Safari 5.1+, Chrome 10+
        +    background-image: -o-linear-gradient(@startColor, @endColor); // Opera 11.10
        +    -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor); // IE8+
        +    filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE6 & IE7
        +    background-image: linear-gradient(@startColor, @endColor); // The standard
        +  }
        +  .directional (@startColor: #555, @endColor: #333, @deg: 45deg) {
        +    ...
        +  }
        +  .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 0.5, @endColor: #c3325f) {
        +    ...
        +  }
        +}
        +
        + +

        Operations and grid system

        +

        Get fancy and perform some math to generate flexible and powerful mixins like the one below.

        +
        +// Griditude
        +@gridColumns:       16;
        +@gridColumnWidth:   40px;
        +@gridGutterWidth:   20px;
        +
        +// Grid System
        +.container {
        +  width: @siteWidth;
        +  margin: 0 auto;
        +  .clearfix();
        +}
        +.columns(@columnSpan: 1) {
        +  display: inline;
        +  float: left;
        +  width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1));
        +  margin-left: @gridGutterWidth;
        +  &:first-child {
        +    margin-left: 0;
        +  }
        +}
        +.offset(@columnOffset: 1) {
        +  margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) !important;
        +}
        +
        +
        +
        + +
        + + + + + + + diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/bootstrap.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/bootstrap.less new file mode 100644 index 000000000..ead0c8f83 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/bootstrap.less @@ -0,0 +1,23 @@ +/*! + * Bootstrap v1.0.0 + * + * Copyright 2011 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + * Date: @DATE + */ + +// CSS Reset +@import "reset.less"; + +// Core +@import "preboot.less"; +@import "scaffolding.less"; + +// Styled patterns and elements +@import "type.less"; +@import "forms.less"; +@import "tables.less"; +@import "patterns.less"; \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/forms.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/forms.less new file mode 100644 index 000000000..f958693fc --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/forms.less @@ -0,0 +1,349 @@ +/* Forms.less + * Base styles for various input types, form layouts, and states + * ------------------------------------------------------------- */ + + +// FORM STYLES +// ----------- + +form { + margin-bottom: @baseline; + + // Groups of fields with labels on top (legends) + fieldset { + margin-bottom: @baseline; + padding-top: @baseline; + legend { + display: block; + margin-left: 150px; + font-size: 20px; + line-height: 1; + color: @grayDark; + } + } + + // Parent element that clears floats and wraps labels and fields together + div.clearfix { + margin-bottom: @baseline; + } + + // Set font for forms + label, input, select, textarea { + #font > .sans-serif(normal,13px,normal); + } + + // Float labels left + label { + padding-top: 6px; + font-size: 13px; + line-height: 18px; + float: left; + width: 130px; + text-align: right; + color: @grayDark; + } + + // Shift over the inside div to align all label's relevant content + div.input { + margin-left: 150px; + } + + // Checkboxs and radio buttons + input[type=checkbox], + input[type=radio] { + cursor: pointer; + } + + // Inputs, Textareas, Selects + input[type=text], + input[type=password], + textarea, + select, + .uneditable-input { + display: inline-block; + width: 210px; + margin: 0; + padding: 4px; + font-size: 13px; + line-height: @baseline; + height: @baseline; + color: @gray; + border: 1px solid #ccc; + .border-radius(3px); + } + select, + input[type=file] { + height: @baseline * 1.5; + line-height: @baseline * 1.5; + } + textarea { + height: auto; + } + .uneditable-input { + background-color: #eee; + display: block; + border-color: #ccc; + .box-shadow(inset 0 1px 2px rgba(0,0,0,.075)); + } + + // Placeholder text gets special styles; can't be bundled together though for some reason + :-moz-placeholder { + color: @grayLight; + } + ::-webkit-input-placeholder { + color: @grayLight; + } + + // Focus states + input[type=text], + input[type=password], + select, textarea { + @transition: border linear .2s, box-shadow linear .2s; + .transition(@transition); + .box-shadow(inset 0 1px 3px rgba(0,0,0,.1)); + } + input[type=text]:focus, + input[type=password]:focus, + textarea:focus { + outline: none; + border-color: rgba(82,168,236,.8); + @shadow: inset 0 1px 3px rgba(0,0,0,.1), 0 0 8px rgba(82,168,236,.6); + .box-shadow(@shadow); + } + + // Error styles + div.error { + background: lighten(@red, 57%); + padding: 10px 0; + margin: -10px 0 10px; + .border-radius(4px); + @error-text: desaturate(lighten(@red, 25%), 25%); + > label, + span.help-inline, + span.help-block { + color: @red; + } + input[type=text], + input[type=password], + textarea { + border-color: @error-text; + .box-shadow(0 0 3px rgba(171,41,32,.25)); + &:focus { + border-color: darken(@error-text, 10%); + .box-shadow(0 0 6px rgba(171,41,32,.5)); + } + } + div.input-prepend, + div.input-append { + span.add-on { + background: lighten(@red, 50%); + border-color: @error-text; + color: darken(@error-text, 10%); + } + } + } + + // Form element sizes + .input-mini, input.mini, textarea.mini, select.mini { + width: 60px; + } + .input-small, input.small, textarea.small, select.small { + width: 90px; + } + .input-medium, input.medium, textarea.medium, select.medium { + width: 150px; + } + .input-large, input.large, textarea.large, select.large { + width: 210px; + } + .input-xlarge, input.xlarge, textarea.xlarge, select.xlarge { + width: 270px; + } + .input-xxlarge, input.xxlarge, textarea.xxlarge, select.xxlarge { + width: 530px; + } + textarea.xxlarge { + overflow-y: scroll; + } + + // Turn off focus for disabled (read-only) form elements + input[readonly]:focus, + textarea[readonly]:focus, + input.disabled { + background: #f5f5f5; + border-color: #ddd; + .box-shadow(none); + } +} + +// Actions (the buttons) +div.actions { + background: #f5f5f5; + margin-top: @baseline; + margin-bottom: @baseline; + padding: (@baseline - 1) 20px @baseline 150px; + border-top: 1px solid #ddd; + .border-radius(0 0 3px 3px); + div.secondary-action { + float: right; + a { + line-height: 30px; + &:hover { + text-decoration: underline; + } + } + } +} + +// Help Text +.help-inline, +.help-block { + font-size: 12px; + line-height: @baseline; + color: @grayLight; +} +.help-inline { + padding-left: 5px; +} + +// Big blocks of help text +.help-block { + display: block; + max-width: 600px; +} + +// Inline Fields (input fields that appear as inline objects +div.inline-inputs { + color: @gray; + span, input[type=text] { + display: inline-block; + } + input.mini { + width: 60px; + } + input.small { + width: 90px; + } + span { + padding: 0 2px 0 1px; + } +} + +// Allow us to put symbols and text within the input field for a cleaner look +div.input-prepend, +div.input-append { + input[type=text] { + .border-radius(0 3px 3px 0); + } + .add-on { + background: #f5f5f5; + float: left; + display: block; + width: auto; + min-width: 16px; + padding: 4px 4px 4px 5px; + color: @grayLight; + font-weight: normal; + line-height: 18px; + height: 18px; + text-align: center; + text-shadow: 0 1px 0 #fff; + border: 1px solid #ccc; + border-right-width: 0; + .border-radius(3px 0 0 3px); + } + .active { + background: lighten(@green, 30); + border-color: @green; + } +} +div.input-append { + input[type=text] { + float: left; + .border-radius(3px 0 0 3px); + } + .add-on { + .border-radius(0 3px 3px 0); + border-right-width: 1px; + border-left-width: 0; + } +} + +// Stacked options for forms (radio buttons or checkboxes) +ul.inputs-list { + margin: 0 0 5px; + width: 100%; + li { + display: block; + padding: 0; + width: 100%; + label { + display: block; + float: none; + width: auto; + padding: 0; + line-height: @baseline; + text-align: left; + white-space: normal; + strong { + color: @gray; + } + small { + font-size: 12px; + font-weight: normal; + } + } + ul.inputs-list { + margin-left: 25px; + margin-bottom: 10px; + padding-top: 0; + } + &:first-child { + padding-top: 5px; + } + } + input[type=radio], + input[type=checkbox] { + margin-bottom: 0; + } +} + +// Stacked forms +form.form-stacked { + padding-left: 20px; + fieldset { + padding-top: @baseline / 2; + } + legend { + margin-left: 0; + } + label { + display: block; + float: none; + width: auto; + font-weight: bold; + text-align: left; + line-height: 20px; + padding-top: 0; + } + div.clearfix { + margin-bottom: @baseline / 2; + div.input { + margin-left: 0; + } + } + ul.inputs-list { + margin-bottom: 0; + li { + padding-top: 0; + label { + font-weight: normal; + padding-top: 0; + } + } + } + div.actions { + margin-left: -20px; + padding-left: 20px; + } +} diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/patterns.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/patterns.less new file mode 100644 index 000000000..db6f42bb4 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/patterns.less @@ -0,0 +1,639 @@ +/* Patterns.less + * Repeatable UI elements outside the base styles provided from the scaffolding + * ---------------------------------------------------------------------------- */ + + +// TOPBAR +// ------ + +// Topbar for Branding and Nav +div.topbar { + #gradient > .vertical(#333, #222); + height: 40px; + position: fixed; + top: 0; + left: 0; + right: 0; + z-index: 10000; + overflow: visible; + @shadow: 0 1px 3px rgba(0,0,0,.25), inset 0 -1px 0 rgba(0,0,0,.1); + .box-shadow(@shadow); + + // Links get text shadow + a { + color: @grayLight; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + } + + // Hover and active states for links + ul li a:hover, + ul li.active a, + a.logo:hover { + background-color: #333; + background-color: rgba(255,255,255,.15); + color: @white; + text-decoration: none; + } + + // Logo + a.logo { + float: left; + display: block; + padding: 8px 20px 12px; + margin-left: -20px; + color: @white; + font-size: 20px; + font-weight: 200; + line-height: 1; + img { + float: left; + margin-right: 6px; + } + } + + // Search Form + form { + float: left; + margin: 5px 0 0 0; + position: relative; + .opacity(100); + input { + background-color: @grayLight; + background-color: rgba(255,255,255,.3); + #font > .sans-serif(13px, normal, 1); + width: 220px; + padding: 4px 9px; + color: #fff; + color: rgba(255,255,255,.75); + border: 1px solid #111; + .border-radius(4px); + @shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0px rgba(255,255,255,.25); + .box-shadow(@shadow); + .transition(none); + + // Placeholder text gets special styles; can't be bundled together though for some reason + &:-moz-placeholder { + color: @grayLighter; + } + &::-webkit-input-placeholder { + color: @grayLighter; + } + &:hover { + background-color: #444; + background-color: rgba(255,255,255,.5); + color: #fff; + } + &:focus, + &.focused { + outline: none; + background-color: #fff; + color: @grayDark; + text-shadow: 0 1px 0 #fff; + border: 0; + padding: 5px 10px; + .box-shadow(0 0 3px rgba(0,0,0,.15)); + } + } + } + + // Navigation + ul { + display: block; + float: left; + margin: 0 10px 0 0; + position: relative; + &.secondary-nav { + float: right; + margin-left: 10px; + margin-right: 0; + } + li { + display: block; + float: left; + font-size: 13px; + a { + display: block; + float: none; + padding: 10px 10px 11px; + line-height: 19px; + text-decoration: none; + &:hover { + color: #fff; + text-decoration: none; + } + } + &.active a { + background-color: #222; + background-color: rgba(0,0,0,.5); + } + } + + // Dropdowns + &.primary-nav li ul { + left: 0; + } + &.secondary-nav li ul { + right: 0; + } + li.menu { + position: relative; + a.menu { + &:after { + width: 0px; + height: 0px; + display: inline-block; + content: "↓"; + text-indent: -99999px; + vertical-align: top; + margin-top: 8px; + margin-left: 4px; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #fff; + .opacity(50); + } + } + &.open { + a.menu, + a:hover { + background-color: lighten(#00a0d1,5); + background-color: rgba(255,255,255,.1); + color: #fff; + } + ul { + display: block; + li { + a { + background-color: transparent; + font-weight: normal; + &:hover { + background-color: rgba(255,255,255,.1); + color: #fff; + } + } + &.active a { + background-color: rgba(255,255,255,.1); + font-weight: bold; + } + } + } + } + } + li ul { + background-color: #333; + float: left; + display: none; + position: absolute; + top: 40px; + min-width: 160px; + max-width: 220px; + _width: 160px; + margin-left: 0; + margin-right: 0; + padding: 0; + text-align: left; + border: 0; + zoom: 1; + .border-radius(0 0 5px 5px); + .box-shadow(0 1px 2px rgba(0,0,0,0.6)); + li { + float: none; + clear: both; + display: block; + background: none; + font-size: 12px; + a { + display: block; + padding: 6px 15px; + clear: both; + font-weight: normal; + line-height: 19px; + color: #bbb; + &:hover { + background-color: #333; + background-color: rgba(255,255,255,.25); + color: #fff; + } + } + + // Dividers (basically an hr) + &.divider { + height: 1px; + overflow: hidden; + background: rgba(0,0,0,.2); + border-bottom: 1px solid rgba(255,255,255,.1); + margin: 5px 0; + } + + // Section separaters + span { + clear: both; + display: block; + background: rgba(0,0,0,.2); + padding: 6px 15px; + cursor: default; + color: @gray; + border-top: 1px solid rgba(0,0,0,.2); + } + } + } + } +} + + +// PAGE HEADERS +// ------------ + +div.page-header { + margin-bottom: @baseline - 1; + border-bottom: 1px solid #ddd; + .box-shadow(0 1px 0 rgba(255,255,255,.5)); + h1 { + margin-bottom: (@baseline / 2) - 1px; + } +} + + +// ERROR STYLES +// ------------ + +// One-liner alert bars +div.alert-message { + #gradient > .vertical(transparent, rgba(0,0,0,0.15)); + background-color: @grayLighter; + margin-bottom: @baseline; + padding: 8px 15px; + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + border-bottom: 1px solid rgba(0,0,0,.25); + .border-radius(4px); + p { + color: #fff; + margin-bottom: 0; + + p { + margin-top: 5px; + } + } + &.error { + background-color: lighten(@red, 25%); + } + &.warning { + background-color: lighten(@yellow, 15%); + } + &.success { + background-color: lighten(@green, 15%); + } + &.info { + background-color: lighten(@blue, 15%); + } + a.close { + float: right; + margin-top: -2px; + color: #fff; + font-size: 20px; + font-weight: bold; + text-shadow: 0 1px 0 rgba(0,0,0,.5); + .opacity(50); + .border-radius(3px); + &:hover { + text-decoration: none; + .opacity(50); + } + } +} + +// Block-level Alerts +div.block-message { + margin-bottom: @baseline; + padding: 14px; + color: @grayDark; + color: rgba(0,0,0,.8); + text-shadow: 0 1px 0 rgba(255,255,255,.25); + .border-radius(6px); + p { + color: @grayDark; + color: rgba(0,0,0,.8); + margin-right: 30px; + margin-bottom: 0; + } + ul { + margin-bottom: 0; + } + strong { + display: block; + } + a.close { + display: block; + color: @grayDark; + color: rgba(0,0,0,.5); + text-shadow: 0 1px 1px rgba(255,255,255,.75); + } + &.error { + background: lighten(@red, 55%); + border: 1px solid lighten(@red, 50%); + } + &.warning { + background: lighten(@yellow, 35%); + border: 1px solid lighten(@yellow, 25%) + } + &.success { + background: lighten(@green, 45%); + border: 1px solid lighten(@green, 35%) + } + &.info { + background: lighten(@blue, 45%); + border: 1px solid lighten(@blue, 40%); + } +} + + +// NAVIGATION +// ---------- + +// Common tab and pill styles +ul.tabs, +ul.pills { + margin: 0 0 20px; + padding: 0; + .clearfix(); + li { + display: inline; + a { + float: left; + width: auto; + } + } +} + +// Basic Tabs +ul.tabs { + width: 100%; + border-bottom: 1px solid @grayLight; + li { + a { + margin-bottom: -1px; + margin-right: 2px; + padding: 0 15px; + line-height: (@baseline * 2) - 1; + .border-radius(3px 3px 0 0); + &:hover { + background-color: @grayLighter; + border-bottom: 1px solid @grayLight; + } + } + &.active a { + background-color: #fff; + padding: 0 14px; + border: 1px solid #ccc; + border-bottom: 0; + color: @gray; + } + } +} + +// Basic pill nav +ul.pills { + li { + a { + margin: 5px 3px 5px 0; + padding: 0 15px; + text-shadow: 0 1px 1px #fff; + line-height: 30px; + .border-radius(15px); + &:hover { + background: @linkColorHover; + color: #fff; + text-decoration: none; + text-shadow: 0 1px 1px rgba(0,0,0,.25); + } + } + &.active a { + background: @linkColor; + color: #fff; + text-shadow: 0 1px 1px rgba(0,0,0,.25); + } + } +} + + +// PAGINATION +// ---------- + +div.pagination { + height: @baseline * 2; + margin: @baseline 0; + ul { + float: left; + margin: 0; + border: 1px solid rgba(0,0,0,.15); + .border-radius(3px); + .box-shadow(0 1px 2px rgba(0,0,0,.075)); + li { + display: inline; + a { + float: left; + padding: 0 14px; + line-height: (@baseline * 2) - 2; + border-right: 1px solid rgba(0,0,0,.15); + text-decoration: none; + } + a:hover, + &.active a { + background-color: lighten(@blue, 45%); + } + &.disabled a, + &.disabled a:hover { + background-color: none; + color: @grayLight; + } + &.next a, + &:last-child a { + border: 0; + } + } + } +} + + +// WELLS +// ----- + +div.well { + background: #f5f5f5; + margin-bottom: 20px; + padding: 19px; + min-height: 20px; + border: 1px solid #ddd; + .border-radius(4px); + .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); +} + + +// MODALS +// ------ + +div.modal-backdrop { + background-color: rgba(0,0,0,.5); + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: 1000; +} +div.modal { + position: fixed; + top: 50%; + left: 50%; + z-index: 2000; + width: 560px; + margin: -280px 0 0 -250px; + background-color: @white; + border: 1px solid rgba(0,0,0,.3); + .border-radius(6px); + .box-shadow(0 3px 7px rgba(0,0,0,0.3)); + .background-clip(padding); + .modal-header { + border-bottom: 1px solid #eee; + padding: 5px 20px; + a.close { + position: absolute; + right: 10px; + top: 10px; + color: #999; + line-height:10px; + font-size: 18px; + } + } + .modal-body { + padding: 20px; + } + .modal-footer { + background-color: #f5f5f5; + padding: 14px 20px 15px; + border-top: 1px solid #ddd; + .border-radius(0 0 6px 6px); + .box-shadow(inset 0 1px 0 #fff); + .clearfix(); + .btn { + float: right; + margin-left: 10px; + } + } +} + + +// POPOVER ARROWS +// -------------- + +#popoverArrow { + .above(@arrowWidth: 5px) { + bottom: 0; + left: 50%; + margin-left: -@arrowWidth; + border-left: @arrowWidth solid transparent; + border-right: @arrowWidth solid transparent; + border-top: @arrowWidth solid #000; + } + .left(@arrowWidth: 5px) { + top: 50%; + right: 0; + margin-top: -@arrowWidth; + border-top: @arrowWidth solid transparent; + border-bottom: @arrowWidth solid transparent; + border-left: @arrowWidth solid #000; + } + .below(@arrowWidth: 5px) { + top: 0; + left: 50%; + margin-left: -@arrowWidth; + border-left: @arrowWidth solid transparent; + border-right: @arrowWidth solid transparent; + border-bottom: @arrowWidth solid #000; + } + .right(@arrowWidth: 5px) { + top: 50%; + left: 0; + margin-top: -@arrowWidth; + border-top: @arrowWidth solid transparent; + border-bottom: @arrowWidth solid transparent; + border-right: @arrowWidth solid #000; + } +} + +// TWIPSY +// ------ + +div.twipsy { + display: block; + position: absolute; + visibility: visible; + padding: 5px; + font-size: 11px; + z-index: 1000; + .opacity(80); + &.above .twipsy-arrow { #popoverArrow > .above(); } + &.left .twipsy-arrow { #popoverArrow > .left(); } + &.below .twipsy-arrow { #popoverArrow > .below(); } + &.right .twipsy-arrow { #popoverArrow > .right(); } + .twipsy-inner { + padding: 3px 8px; + background-color: #000; + color: white; + text-align: center; + max-width: 200px; + text-decoration: none; + .border-radius(4px); + } + .twipsy-arrow { + position: absolute; + width: 0; + height: 0; + } +} + + +// POPOVERS +// -------- + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1000; + padding: 5px; + display: none; + &.above .arrow { #popoverArrow > .above(); } + &.right .arrow { #popoverArrow > .right(); } + &.below .arrow { #popoverArrow > .below(); } + &.left .arrow { #popoverArrow > .left(); } + .arrow { + position: absolute; + width: 0; + height: 0; + } + .inner { + background: rgba(0,0,0,.8); + padding: 3px; + overflow: hidden; + width: 280px; + .border-radius(6px); + .box-shadow(0 3px 7px rgba(0,0,0,0.3)); + } + .title { + background: #f5f5f5; + padding: 9px 15px; + line-height: 1; + .border-radius(3px 3px 0 0); + border-bottom:1px solid #eee; + } + .content { + background-color: @white; + padding: 14px; + .border-radius(0 0 3px 3px); + .background-clip(padding); + p, ul, ol { + margin-bottom: 0; + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/preboot.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/preboot.less new file mode 100644 index 000000000..3e53dcf9b --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/preboot.less @@ -0,0 +1,270 @@ +/* Preboot.less + * Variables and mixins to pre-ignite any new web development project + * ------------------------------------------------------------------ */ + + +// VARIABLES +// --------- + +// Links +@linkColor: #0069d6; +@linkColorHover: darken(@linkColor, 10); + +// Grays +@black: #000; +@grayDark: lighten(@black, 25%); +@gray: lighten(@black, 50%); +@grayLight: lighten(@black, 75%); +@grayLighter: lighten(@black, 90%); +@white: #fff; + +// Accent Colors +@blue: #049CDB; +@blueDark: #0064CD; +@green: #46a546; +@red: #9d261d; +@yellow: #ffc40d; +@orange: #f89406; +@pink: #c3325f; +@purple: #7a43b6; + +// Baseline grid +@basefont: 13px; +@baseline: 18px; + +// Griditude +@gridColumns: 16; +@gridColumnWidth: 40px; +@gridGutterWidth: 20px; +@siteWidth: (@gridColumns * @gridColumnWidth) + (@gridGutterWidth * (@gridColumns - 1)); + +// Color Scheme +@baseColor: @blue; // Set a base color +@complement: spin(@baseColor, 180); // Determine a complementary color +@split1: spin(@baseColor, 158); // Split complements +@split2: spin(@baseColor, -158); +@triad1: spin(@baseColor, 135); // Triads colors +@triad2: spin(@baseColor, -135); +@tetra1: spin(@baseColor, 90); // Tetra colors +@tetra2: spin(@baseColor, -90); +@analog1: spin(@baseColor, 22); // Analogs colors +@analog2: spin(@baseColor, -22); + + +// MIXINS +// ------ + +// Clearfix for clearing floats like a boss h5bp.com/q +.clearfix { + zoom: 1; + &:before, &:after { + display: table; + content: ""; + } + &:after { + clear: both; + } +} + +// Center-align a block level element +.center-block { + display: block; + margin: 0 auto; +} + +// Sizing shortcuts +.size(@height: 5px, @width: 5px) { + height: @height; + width: @width; +} +.square(@size: 5px) { + .size(@size, @size); +} + +// Input placeholder text +.placeholder(@color: @grayLight) { + :-moz-placeholder { + color: @color; + } + ::-webkit-input-placeholder { + color: @color; + } +} + +// Font Stacks +#font { + .shorthand(@weight: normal, @size: 14px, @lineHeight: 20px) { + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } + .sans-serif(@weight: normal, @size: 14px, @lineHeight: 20px) { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } + .serif(@weight: normal, @size: 14px, @lineHeight: 20px) { + font-family: "Georgia", Times New Roman, Times, serif; + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } + .monospace(@weight: normal, @size: 12px, @lineHeight: 20px) { + font-family: "Monaco", Courier New, monospace; + font-size: @size; + font-weight: @weight; + line-height: @lineHeight; + } +} + +// Grid System +.container { + width: @siteWidth; + margin: 0 auto; + .clearfix(); +} +.columns(@columnSpan: 1) { + float: left; + width: (@gridColumnWidth * @columnSpan) + (@gridGutterWidth * (@columnSpan - 1)); + margin-left: @gridGutterWidth; + &:first-child { + margin-left: 0; + } +} +.offsetMath(@extraSpace: 40px) { + margin-left: (@gridColumnWidth * @columnOffset) + (@gridGutterWidth * (@columnOffset - 1)) + @extraSpace !important; +} +.offset(@columnOffset: 1) { + .offsetMath(40px); + &:first-child { + .offsetMath(20px); + } +} + +// Border Radius +.border-radius(@radius: 5px) { + -webkit-border-radius: @radius; + -moz-border-radius: @radius; + border-radius: @radius; +} + +// Drop shadows +.box-shadow(@shadow: 0 1px 3px rgba(0,0,0,.25)) { + -webkit-box-shadow: @shadow; + -moz-box-shadow: @shadow; + box-shadow: @shadow; +} + +// Transitions +.transition(@transition) { + -webkit-transition: @transition; + -moz-transition: @transition; + transition: @transition; +} + +// Background clipping +.background-clip(@clip) { + -webkit-background-clip: @clip; + -moz-background-clip: @clip; + background-clip: @clip; +} + +// CSS3 Content Columns +.content-columns(@columnCount, @columnGap: 20px) { + -webkit-column-count: @columnCount; + -webkit-column-gap: @columnGap; + -moz-column-count: @columnCount; + -moz-column-gap: @columnGap; + column-count: @columnCount; + column-gap: @columnGap; +} + +// Buttons +.button(@color: #fff, @padding: 4px 14px, @textColor: #333, @textShadow: 0 1px 1px rgba(255,255,255,.75), @fontSize: 13px, @borderColor: rgba(0,0,0,.1), @borderRadius: 4px) { + display: inline-block; + #gradient > .vertical-three-colors(@color, @color, 0.25, darken(@color, 10%)); + padding: @padding; + text-shadow: @textShadow; + color: @textColor; + font-size: @fontSize; + line-height: @baseline; + border: 1px solid @borderColor; + border-bottom-color: fadein(@borderColor, 15%); + .border-radius(@borderRadius); + @shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + &:hover { + background-position: 0 -15px; + color: @textColor; + text-decoration: none; + } +} + +// Add an alphatransparency value to any background or border color (via Elyse Holladay) +#translucent { + .background(@color: @white, @alpha: 1) { + background-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + } + .border(@color: @white, @alpha: 1) { + border-color: hsla(hue(@color), saturation(@color), lightness(@color), @alpha); + background-clip: padding-box; + } +} + +// Gradients +#gradient { + .horizontal (@startColor: #555, @endColor: #333) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, right top, from(@startColor), to(@endColor)); // Konqueror + background-image: -moz-linear-gradient(left, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(left, @startColor, @endColor); // IE10 + background-image: -webkit-gradient(linear, left top, right top, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(left, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(left, @startColor, @endColor); // Opera 11.10 + -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor); // IE8+ + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=1)",@startColor,@endColor)); // IE6 & IE7 + background-image: linear-gradient(left, @startColor, @endColor); // Le standard + } + .vertical (@startColor: #555, @endColor: #333) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -khtml-gradient(linear, left top, left bottom, from(@startColor), to(@endColor)); // Konqueror + background-image: -moz-linear-gradient(@startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(@startColor, @endColor); // IE10 + background-image: -webkit-gradient(linear, left top, left bottom, color-stop(0%, @startColor), color-stop(100%, @endColor)); // Safari 4+, Chrome 2+ + background-image: -webkit-linear-gradient(@startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(@startColor, @endColor); // Opera 11.10 + -ms-filter: %("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor); // IE8+ + filter: e(%("progid:DXImageTransform.Microsoft.gradient(startColorstr='%d', endColorstr='%d', GradientType=0)",@startColor,@endColor)); // IE6 & IE7 + background-image: linear-gradient(@startColor, @endColor); // The standard + } + .directional (@startColor: #555, @endColor: #333, @deg: 45deg) { + background-color: @endColor; + background-repeat: repeat-x; + background-image: -moz-linear-gradient(@deg, @startColor, @endColor); // FF 3.6+ + background-image: -ms-linear-gradient(@deg, @startColor, @endColor); // IE10 + background-image: -webkit-linear-gradient(@deg, @startColor, @endColor); // Safari 5.1+, Chrome 10+ + background-image: -o-linear-gradient(@deg, @startColor, @endColor); // Opera 11.10 + background-image: linear-gradient(@deg, @startColor, @endColor); // The standard + } + .vertical-three-colors(@startColor: #00b3ee, @midColor: #7a43b6, @colorStop: 0.5, @endColor: #c3325f) { + background-color: @endColor; + background-repeat: no-repeat; + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(@startColor), color-stop(@colorStop, @midColor), to(@endColor)); + background-image: -webkit-linear-gradient(@startColor, color-stop(@colorStop, @midColor), @endColor); + background-image: -moz-linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor); + background-image: -ms-linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor); + background-image: -o-linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor); + background-image: linear-gradient(@startColor, color-stop(@midColor, @colorStop), @endColor); + } +} + +// Opacity +.opacity(@opacity: 100) { + filter: e(%("alpha(opacity=%d)", @opacity)); + -khtml-opacity: @opacity / 100; + -moz-opacity: @opacity / 100; + opacity: @opacity / 100; +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/reset.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/reset.less new file mode 100644 index 000000000..db1682202 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/reset.less @@ -0,0 +1,21 @@ +/* Reset.less + * Props to Eric Meyer (meyerweb.com) for his CSS reset file. We're using an adapted version here that cuts out some of the reset HTML elements we will never need here (i.e., dfn, samp, etc). + * ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- */ + + +// ERIC MEYER RESET +// ---------------- + +html, body { margin: 0; padding: 0; } +h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, cite, code, del, dfn, em, img, q, s, samp, small, strike, strong, sub, sup, tt, var, dd, dl, dt, li, ol, ul, fieldset, form, label, legend, button, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; font-weight: normal; font-style: normal; font-size: 100%; line-height: 1; font-family: inherit; } +table { border-collapse: collapse; border-spacing: 0; } +ol, ul { list-style: none; } +q:before, q:after, blockquote:before, blockquote:after { content: ""; } + + +// HTML5 +// ----- + +header, section, footer, article, aside { + display: block; +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/scaffolding.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/scaffolding.less new file mode 100644 index 000000000..427dab2b8 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/scaffolding.less @@ -0,0 +1,137 @@ +/* + * Scaffolding + * Basic and global styles for generating a grid system, structural layout, and page templates + * ------------------------------------------------------------------------------------------- */ + + +// GRID SYSTEM +// ----------- + +.row { + .clearfix(); + + // Default columns + .span1 { .columns(1); } + .span2 { .columns(2); } + .span3 { .columns(3); } + .span4 { .columns(4); } + .span5 { .columns(5); } + .span6 { .columns(6); } + .span7 { .columns(7); } + .span8 { .columns(8); } + .span9 { .columns(9); } + .span10 { .columns(10); } + .span11 { .columns(11); } + .span12 { .columns(12); } + .span13 { .columns(13); } + .span14 { .columns(14); } + .span15 { .columns(15); } + .span16 { .columns(16); } + + // Offset column options + .offset1 { .offset(1); } + .offset2 { .offset(2); } + .offset3 { .offset(3); } + .offset4 { .offset(4); } + .offset5 { .offset(5); } + .offset6 { .offset(6); } + .offset7 { .offset(7); } + .offset8 { .offset(8); } + .offset9 { .offset(8); } + .offset10 { .offset(10); } + .offset11 { .offset(11); } + .offset12 { .offset(12); } +} + + +// STRUCTURAL LAYOUT +// ----------------- + +html, body { + background-color: #fff; +} +body { + margin: 0; + #font > .sans-serif(normal,@basefont,@baseline); + color: @gray; + text-rendering: optimizeLegibility; +} + +// Container (centered, fixed-width layouts) +div.container { + width: 940px; + margin: 0 auto; +} + +// Fluid layouts (left aligned, with sidebar, min- & max-width content) +div.container-fluid { + padding: 20px; + .clearfix(); + div.sidebar { + float: left; + width: 220px; + } + div.content { + min-width: 700px; + max-width: 1180px; + margin-left: 240px; + } +} + + +// BASE STYLES +// ----------- + +// Links +a { + color: @linkColor; + text-decoration: none; + line-height: inherit; + &:hover { + color: @linkColorHover; + text-decoration: underline; + } +} + +// Buttons +.btn { + .button(); + .transition(.1s linear all); + &.primary { + #gradient > .vertical(@blue, @blueDark); + color: #fff; + text-shadow: 0 -1px 0 rgba(0,0,0,.25); + &:hover { + color: #fff; + } + } + &.large { + font-size: 16px; + line-height: 28px; + .border-radius(6px); + } + &.small { + padding-right: 9px; + padding-left: 9px; + font-size: 11px; + } + &:disabled, + &.disabled { + background-image: none; + .opacity(65); + cursor: default; + } + &:active { + @shadow: inset 0 3px 7px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.05); + .box-shadow(@shadow); + } +} + +// Help Firefox not be a jerk about adding extra padding to buttons +button.btn, +input[type=submit].btn { + &::-moz-focus-inner { + padding: 0; + border: 0; + } +} diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/tables.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/tables.less new file mode 100644 index 000000000..4c65141a3 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/tables.less @@ -0,0 +1,152 @@ +/* + * Tables.less + * Tables for, you guessed it, tabular data + * ---------------------------------------- */ + + +// BASELINE STYLES +// --------------- + +table { + width: 100%; + margin-bottom: @baseline; + padding: 0; + text-align: left; + border-collapse: separate; + font-size: 13px; + th, td { + padding: 10px 10px 9px; + line-height: @baseline * .75; + vertical-align: middle; + border-bottom: 1px solid #ddd; + } + th { + padding-top: 9px; + font-weight: bold; + border-bottom-width: 2px; + } +} + + +// ZEBRA-STRIPING +// -------------- + +// Default zebra-stripe styles (alternating gray and transparent backgrounds) +table.zebra-striped { + tbody { + tr:nth-child(odd) td { + background-color: #f9f9f9; + } + tr:hover td { + background-color: #f5f5f5; + } + } + + // Tablesorting styles w/ jQuery plugin + th.header { + cursor: pointer; + &:after { + content: ""; + float: right; + margin-top: 7px; + border-width: 0 4px 4px; + border-style: solid; + border-color: #000 transparent; + visibility: hidden; + } + } + + // Style the sorted column headers (THs) + th.headerSortUp, + th.headerSortDown { + background-color: rgba(141,192,219,.25); + text-shadow: 0 1px 1px rgba(255,255,255,.75); + .border-radius(3px 3px 0 0); + } + + // Style the ascending (reverse alphabetical) column header + th.header:hover { + &:after { + visibility:visible; + } + } + th.actions:hover { + background-image: none; + } + + // Style the descending (alphabetical) column header + th.headerSortDown, + th.headerSortDown:hover { + &:after { + visibility:visible; + .opacity(60); + } + } + + // Style the ascending (reverse alphabetical) column header + th.headerSortUp { + &:after { + border-bottom: none; + border-left: 4px solid transparent; + border-right: 4px solid transparent; + border-top: 4px solid #000; + visibility:visible; + .box-shadow(none); //can't add boxshadow to downward facing arrow :( + .opacity(60); + } + } + + // Blue Table Headings + th.blue { + color: @blue; + border-bottom-color: @blue; + } + th.headerSortUp.blue, th.headerSortDown.blue { + background-color: lighten(@blue, 40%); + } + + // Green Table Headings + th.green { + color: @green; + border-bottom-color: @green; + } + th.headerSortUp.green, th.headerSortDown.green { // backround color is 20% of border color + background-color: lighten(@green, 40%); + } + + // Red Table Headings + th.red { + color: @red; + border-bottom-color: @red; + } + th.headerSortUp.red, th.headerSortDown.red { + background-color: lighten(@red, 50%); + } + + // Yellow Table Headings + th.yellow { + color: @yellow; + border-bottom-color: @yellow; + } + th.headerSortUp.yellow, th.headerSortDown.yellow { + background-color: lighten(@yellow, 40%); + } + + // Orange Table Headings + th.orange { + color: @orange; + border-bottom-color: @orange; + } + th.headerSortUp.orange, th.headerSortDown.orange { + background-color: lighten(@orange, 40%); + } + + // Purple Table Headings + th.purple { + color: @purple; + border-bottom-color: @purple; + } + th.headerSortUp.purple, th.headerSortDown.purple { + background-color: lighten(@purple, 40%); + } +} diff --git a/src/bb-modules/Filemanager/src/css/bootstrap/lib/type.less b/src/bb-modules/Filemanager/src/css/bootstrap/lib/type.less new file mode 100644 index 000000000..2e330f9a1 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/bootstrap/lib/type.less @@ -0,0 +1,184 @@ +/* Typography.less + * Headings, body text, lists, code, and more for a versatile and durable typography system + * ---------------------------------------------------------------------------------------- */ + + +// BODY TEXT +// --------- + +p { + #font > .shorthand(normal,@basefont,@baseline); + margin-bottom: @baseline; + small { + font-size: 11px; + color: @grayLight; + } +} + + +// HEADINGS +// -------- + +h1, h2, h3, h4, h5, h6 { + font-weight: bold; + color: @grayDark; + small { + color: @grayLight; + } +} +h1 { + margin-bottom: @baseline; + font-size: 30px; + line-height: @baseline * 2; + small { + font-size: 18px; + } +} +h2 { + font-size: 24px; + line-height: @baseline * 2; + small { + font-size: 14px; + } +} +h3, h4, h5, h6 { + line-height: @baseline * 2; +} +h3 { + font-size: 18px; + small { + font-size: 14px; + } +} +h4 { + font-size: 16px; + small { + font-size: 12px; + } +} +h5 { + font-size: 14px; +} +h6 { + font-size: 13px; + color: @grayLight; + text-transform: uppercase; +} + + +// COLORS +// ------ + +// Unordered and Ordered lists +ul, ol { + margin: 0 0 @baseline 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +ul { + list-style: disc; +} +ol { + list-style: decimal; +} +li { + line-height: @baseline; + color: @gray; +} +ul.unstyled { + list-style: none; + margin-left: 0; +} + +// Description Lists +dl { + margin-bottom: @baseline; + dt, dd { + line-height: @baseline; + } + dt { + font-weight: bold; + } + dd { + margin-left: @baseline / 2; + } +} + +// MISC +// ---- + +// Horizontal rules +hr { + margin: 0 0 19px; + border: 0; + border-bottom: 1px solid #eee; +} + +// Emphasis +strong { + font-style: inherit; + font-weight: bold; + line-height: inherit; +} +em { + font-style: italic; + font-weight: inherit; + line-height: inherit; +} +.muted { + color: @grayLighter; +} + +// Blockquotes +blockquote { + margin-bottom: @baseline; + border-left: 5px solid #eee; + padding-left: 15px; + p { + #font > .shorthand(300,14px,@baseline); + margin-bottom: 0; + } + small, cite { + display: block; + #font > .shorthand(300,12px,@baseline); + color: @grayLight; + &:before { + content: '\2014 \00A0'; + } + } +} + +// Addresses +address { + display: block; + line-height: @baseline; + margin-bottom: @baseline; +} + +// Inline and block code styles +code, pre { + padding: 0 3px 2px; + font-family: Monaco, Andale Mono, Courier New, monospace; + font-size: 12px; + .border-radius(3px); +} +code { + background-color: lighten(@orange, 40%); + color: rgba(0,0,0,.75); + padding: 1px 3px; +} +pre { + background-color: #f5f5f5; + display: block; + padding: @baseline - 1; + margin: 0 0 @baseline; + line-height: @baseline; + font-size: 12px; + border: 1px solid rgba(0,0,0,.15); + .border-radius(3px); + white-space: pre-wrap; +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 000000000..5b5dab2ab Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 000000000..ac8b229af Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 000000000..ad3d6346e Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 000000000..42ccba269 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 000000000..5a46b47cb Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_dadada_1x400.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 000000000..86c2baa65 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 000000000..4443fdc1a Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 000000000..7c9fa6c6e Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_222222_256x240.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_222222_256x240.png new file mode 100644 index 000000000..ee039dc09 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_222222_256x240.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_2e83ff_256x240.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_2e83ff_256x240.png new file mode 100644 index 000000000..45e8928e5 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_2e83ff_256x240.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_454545_256x240.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_454545_256x240.png new file mode 100644 index 000000000..7ec70d11b Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_454545_256x240.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_888888_256x240.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_888888_256x240.png new file mode 100644 index 000000000..5ba708c39 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_888888_256x240.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_cd0a0a_256x240.png b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_cd0a0a_256x240.png new file mode 100644 index 000000000..7930a5580 Binary files /dev/null and b/src/bb-modules/Filemanager/src/css/jqueryui/images/ui-icons_cd0a0a_256x240.png differ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.accordion.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.accordion.css new file mode 100644 index 000000000..327beb50e --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.accordion.css @@ -0,0 +1,19 @@ +/* + * jQuery UI Accordion 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Accordion#theming + */ +/* IE/Win - Fix animation bug - #4615 */ +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.all.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.all.css new file mode 100644 index 000000000..bf68bc41e --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.all.css @@ -0,0 +1,11 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming + */ +@import "jquery.ui.base.css"; +@import "jquery.ui.theme.css"; diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.autocomplete.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.autocomplete.css new file mode 100644 index 000000000..6de686736 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.autocomplete.css @@ -0,0 +1,53 @@ +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + padding:.2em .4em; + line-height:1.5; + zoom:1; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: normal; + margin: -1px; +} diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.base.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.base.css new file mode 100644 index 000000000..f52ee39b9 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.base.css @@ -0,0 +1,11 @@ +@import url("jquery.ui.core.css"); +@import url("jquery.ui.resizable.css"); +@import url("jquery.ui.selectable.css"); +@import url("jquery.ui.accordion.css"); +@import url("jquery.ui.autocomplete.css"); +@import url("jquery.ui.button.css"); +@import url("jquery.ui.dialog.css"); +@import url("jquery.ui.slider.css"); +@import url("jquery.ui.tabs.css"); +@import url("jquery.ui.datepicker.css"); +@import url("jquery.ui.progressbar.css"); \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.button.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.button.css new file mode 100644 index 000000000..31c79f9c4 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.button.css @@ -0,0 +1,38 @@ +/* + * jQuery UI Button 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Button#theming + */ +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-text-only .ui-button-text { padding: .4em 1em; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 7px; } +.ui-buttonset .ui-button { margin-left: 0; margin-right: -.3em; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.core.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.core.css new file mode 100644 index 000000000..375d4ad92 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.core.css @@ -0,0 +1,41 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute !important; clip: rect(1px 1px 1px 1px); clip: rect(1px,1px,1px,1px); } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.datepicker.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.datepicker.css new file mode 100644 index 000000000..28efc9469 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.datepicker.css @@ -0,0 +1,68 @@ +/* + * jQuery UI Datepicker 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Datepicker#theming + */ +.ui-datepicker { width: 17em; padding: .2em .2em 0; display: none; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; font-size:0em; } + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + +/* IE6 IFRAME FIX (taken from datepicker 1.5.3 */ +.ui-datepicker-cover { + display: none; /*sorry for IE5*/ + display/**/: block; /*sorry for IE5*/ + position: absolute; /*must have*/ + z-index: -1; /*must have*/ + filter: mask(); /*must have*/ + top: -4px; /*must have*/ + left: -4px; /*must have*/ + width: 200px; /*must have*/ + height: 200px; /*must have*/ +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.dialog.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.dialog.css new file mode 100644 index 000000000..1b95d7f4d --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.dialog.css @@ -0,0 +1,21 @@ +/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog#theming + */ +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { padding: .4em 1em; position: relative; } +.ui-dialog .ui-dialog-title { float: left; margin: .1em 16px .1em 0; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: .3em; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 0; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane { text-align: left; border-width: 1px 0 0 0; background-image: none; margin: .5em 0 0 0; padding: .3em 1em .5em .4em; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { margin: .5em .4em .5em 0; cursor: pointer; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.progressbar.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.progressbar.css new file mode 100644 index 000000000..e885ced6c --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.progressbar.css @@ -0,0 +1,11 @@ +/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar#theming + */ +.ui-progressbar { height:2em; text-align: left; } +.ui-progressbar .ui-progressbar-value {margin: -1px; height:100%; } \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.resizable.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.resizable.css new file mode 100644 index 000000000..dc706797f --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.resizable.css @@ -0,0 +1,20 @@ +/* + * jQuery UI Resizable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Resizable#theming + */ +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block; } +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.selectable.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.selectable.css new file mode 100644 index 000000000..2f0abf418 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.selectable.css @@ -0,0 +1,14 @@ +/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectable#theming + */ +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } +.ui-selected { + background: #1C9AD9 !important; + color: #FFF; +} \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.slider.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.slider.css new file mode 100644 index 000000000..982f42c58 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.slider.css @@ -0,0 +1,24 @@ +/* + * jQuery UI Slider 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Slider#theming + */ +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 1.2em; height: 1.2em; cursor: default; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background-position: 0 0; } + +.ui-slider-horizontal { height: .8em; } +.ui-slider-horizontal .ui-slider-handle { top: -.3em; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: .8em; height: 100px; } +.ui-slider-vertical .ui-slider-handle { left: -.3em; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.tabs.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.tabs.css new file mode 100644 index 000000000..8289e5b63 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.tabs.css @@ -0,0 +1,38 @@ +/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs#theming + */ +.ui-tabs { position: relative; padding: 0; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; border-bottom: 0 !important; padding: 0; + white-space: nowrap; + border-right: 1px solid #ddd; +} +.ui-tabs .ui-tabs-nav li a { float: left; padding: 4px 10px 3px 10px; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#e0e0e0', endColorstr='#f0f0f0'); + background: -webkit-gradient(linear, left top, left bottom, from(#e0e0e0), to(#f8f8f8)); + background: -moz-linear-gradient(top, #e0e0e0, #f8f8f8); + box-shadow:inset 0px 2px 5px #aaa; + padding-bottom: 1px; + margin-bottom: 0; +} +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { clear:both; display: block; border-width: 0; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } + +.ui-tabs .ui-icon { + width: 14px; + height: 14px; + position: relative; + top: 6px; + margin-right: 5px; + background: url('../../img/close.png') center center no-repeat; + float: left; +} diff --git a/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.theme.css b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.theme.css new file mode 100644 index 000000000..1f6c8f2df --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/jqueryui/jquery.ui.theme.css @@ -0,0 +1,247 @@ +/* + * jQuery UI CSS Framework 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + * To view and modify this theme, visit http://jqueryui.com/themeroller/ + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1.1em/*{fsDefault}*/; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif/*{ffDefault}*/; font-size: 1em; } +.ui-widget-content { border: 1px solid #aaaaaa/*{borderColorContent}*/; background: #ffffff/*{bgColorContent}*/ url(images/ui-bg_flat_75_ffffff_40x100.png)/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/; color: #222222/*{fcContent}*/; } +.ui-widget-content a { color: #222222/*{fcContent}*/; } +.ui-widget-header { border: 1px solid #aaaaaa/*{borderColorHeader}*/; background: #cccccc/*{bgColorHeader}*/ url(images/ui-bg_highlight-soft_75_cccccc_1x100.png)/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/; color: #222222/*{fcHeader}*/; font-weight: bold; } +.ui-widget-header a { color: #222222/*{fcHeader}*/; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border: 1px solid #d3d3d3/*{borderColorDefault}*/; background: #e6e6e6/*{bgColorDefault}*/ url(images/ui-bg_glass_75_e6e6e6_1x400.png)/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #555555/*{fcDefault}*/; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555/*{fcDefault}*/; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { border: 1px solid #999999/*{borderColorHover}*/; background: #dadada/*{bgColorHover}*/ url(images/ui-bg_glass_75_dadada_1x400.png)/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcHover}*/; } +.ui-state-hover a, .ui-state-hover a:hover { color: #212121/*{fcHover}*/; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { border: 1px solid #aaaaaa/*{borderColorActive}*/; background: #ffffff/*{bgColorActive}*/ url(images/ui-bg_glass_65_ffffff_1x400.png)/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/; font-weight: normal/*{fwDefault}*/; color: #212121/*{fcActive}*/; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #212121/*{fcActive}*/; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight, .ui-widget-content .ui-state-highlight, .ui-widget-header .ui-state-highlight {border: 1px solid #fcefa1/*{borderColorHighlight}*/; background: #fbf9ee/*{bgColorHighlight}*/ url(images/ui-bg_glass_55_fbf9ee_1x400.png)/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/; color: #363636/*{fcHighlight}*/; } +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636/*{fcHighlight}*/; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a/*{borderColorError}*/; background: #fef1ec/*{bgColorError}*/ url(images/ui-bg_glass_95_fef1ec_1x400.png)/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/; color: #cd0a0a/*{fcError}*/; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a/*{fcError}*/; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a/*{fcError}*/; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-content .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsContent}*/; } +.ui-widget-header .ui-icon {background-image: url(images/ui-icons_222222_256x240.png)/*{iconsHeader}*/; } +.ui-state-default .ui-icon { background-image: url(images/ui-icons_888888_256x240.png)/*{iconsDefault}*/; } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsHover}*/; } +.ui-state-active .ui-icon {background-image: url(images/ui-icons_454545_256x240.png)/*{iconsActive}*/; } +.ui-state-highlight .ui-icon {background-image: url(images/ui-icons_2e83ff_256x240.png)/*{iconsHighlight}*/; } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(images/ui-icons_cd0a0a_256x240.png)/*{iconsError}*/; } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */ +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +/* Corner radius */ +.ui-corner-all, .ui-corner-top, .ui-corner-left, .ui-corner-tl { -moz-border-radius-topleft: 4px/*{cornerRadius}*/; -webkit-border-top-left-radius: 4px/*{cornerRadius}*/; -khtml-border-top-left-radius: 4px/*{cornerRadius}*/; border-top-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-top, .ui-corner-right, .ui-corner-tr { -moz-border-radius-topright: 4px/*{cornerRadius}*/; -webkit-border-top-right-radius: 4px/*{cornerRadius}*/; -khtml-border-top-right-radius: 4px/*{cornerRadius}*/; border-top-right-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-left, .ui-corner-bl { -moz-border-radius-bottomleft: 4px/*{cornerRadius}*/; -webkit-border-bottom-left-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-left-radius: 4px/*{cornerRadius}*/; border-bottom-left-radius: 4px/*{cornerRadius}*/; } +.ui-corner-all, .ui-corner-bottom, .ui-corner-right, .ui-corner-br { -moz-border-radius-bottomright: 4px/*{cornerRadius}*/; -webkit-border-bottom-right-radius: 4px/*{cornerRadius}*/; -khtml-border-bottom-right-radius: 4px/*{cornerRadius}*/; border-bottom-right-radius: 4px/*{cornerRadius}*/; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa/*{bgColorOverlay}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityOverlay}*/; } +.ui-widget-shadow { margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/; padding: 8px/*{thicknessShadow}*/; background: #aaaaaa/*{bgColorShadow}*/ url(images/ui-bg_flat_0_aaaaaa_40x100.png)/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/; opacity: .3;filter:Alpha(Opacity=30)/*{opacityShadow}*/; -moz-border-radius: 8px/*{cornerRadiusShadow}*/; -khtml-border-radius: 8px/*{cornerRadiusShadow}*/; -webkit-border-radius: 8px/*{cornerRadiusShadow}*/; border-radius: 8px/*{cornerRadiusShadow}*/; } \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/css/main.css b/src/bb-modules/Filemanager/src/css/main.css new file mode 100644 index 000000000..fe8d20770 --- /dev/null +++ b/src/bb-modules/Filemanager/src/css/main.css @@ -0,0 +1,19 @@ +body { + margin: 0; + background-image: url('../img/bg-repeat.gif'); + background-repeat: repeat-x; +} +.content { + background-image: url('../img/content.png'); + background-repeat: no-repeat; + background-position: center 60px; + min-height: 200px; +} +header { + height: 90px; + width: 950px; + margin: 0px auto 30px auto; +} +header img.logo { + margin-top: 20px; +} diff --git a/src/bb-modules/Filemanager/src/img/bg-repeat.gif b/src/bb-modules/Filemanager/src/img/bg-repeat.gif new file mode 100644 index 000000000..e86209bbf Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/bg-repeat.gif differ diff --git a/src/bb-modules/Filemanager/src/img/close.png b/src/bb-modules/Filemanager/src/img/close.png new file mode 100644 index 000000000..bd257701d Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/close.png differ diff --git a/src/bb-modules/Filemanager/src/img/content.png b/src/bb-modules/Filemanager/src/img/content.png new file mode 100644 index 000000000..595d4776f Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/content.png differ diff --git a/src/bb-modules/Filemanager/src/img/dir-add.png b/src/bb-modules/Filemanager/src/img/dir-add.png new file mode 100644 index 000000000..710c15278 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/dir-add.png differ diff --git a/src/bb-modules/Filemanager/src/img/dir.png b/src/bb-modules/Filemanager/src/img/dir.png new file mode 100644 index 000000000..ec5d21f30 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/dir.png differ diff --git a/src/bb-modules/Filemanager/src/img/doc.png b/src/bb-modules/Filemanager/src/img/doc.png new file mode 100644 index 000000000..1eb66de47 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/doc.png differ diff --git a/src/bb-modules/Filemanager/src/img/document--plus.png b/src/bb-modules/Filemanager/src/img/document--plus.png new file mode 100644 index 000000000..df35ed6e1 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/document--plus.png differ diff --git a/src/bb-modules/Filemanager/src/img/drop.png b/src/bb-modules/Filemanager/src/img/drop.png new file mode 100644 index 000000000..c7cfcb838 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/drop.png differ diff --git a/src/bb-modules/Filemanager/src/img/folder--plus.png b/src/bb-modules/Filemanager/src/img/folder--plus.png new file mode 100644 index 000000000..5075baf76 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/folder--plus.png differ diff --git a/src/bb-modules/Filemanager/src/img/html.png b/src/bb-modules/Filemanager/src/img/html.png new file mode 100644 index 000000000..6880eee16 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/html.png differ diff --git a/src/bb-modules/Filemanager/src/img/logo_300dpi.tif b/src/bb-modules/Filemanager/src/img/logo_300dpi.tif new file mode 100644 index 000000000..4bcde3627 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/logo_300dpi.tif differ diff --git a/src/bb-modules/Filemanager/src/img/logo_lrg.png b/src/bb-modules/Filemanager/src/img/logo_lrg.png new file mode 100644 index 000000000..4af35a1dc Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/logo_lrg.png differ diff --git a/src/bb-modules/Filemanager/src/img/logo_sm.png b/src/bb-modules/Filemanager/src/img/logo_sm.png new file mode 100644 index 000000000..1b83ae10a Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/logo_sm.png differ diff --git a/src/bb-modules/Filemanager/src/img/php.png b/src/bb-modules/Filemanager/src/img/php.png new file mode 100644 index 000000000..1cef9d8c8 Binary files /dev/null and b/src/bb-modules/Filemanager/src/img/php.png differ diff --git a/src/bb-modules/Filemanager/src/js/disableText.js b/src/bb-modules/Filemanager/src/js/disableText.js new file mode 100644 index 000000000..2e06f6738 --- /dev/null +++ b/src/bb-modules/Filemanager/src/js/disableText.js @@ -0,0 +1,62 @@ +/** + * .disableTextSelect - Disable Text Select Plugin + * + * Version: 1.1 + * Updated: 2007-11-28 + * + * Used to stop users from selecting text + * + * Copyright (c) 2007 James Dempster (letssurf@gmail.com, http://www.jdempster.com/category/jquery/disabletextselect/) + * + * Dual licensed under the MIT (MIT-LICENSE.txt) + * and GPL (GPL-LICENSE.txt) licenses. + **/ + +/** + * Requirements: + * - jQuery (John Resig, http://www.jquery.com/) + **/ +(function($) { + if ($.browser.mozilla) { + $.fn.disableTextSelect = function() { + return this.each(function() { + $(this).css({ + 'MozUserSelect' : 'none' + }); + }); + }; + $.fn.enableTextSelect = function() { + return this.each(function() { + $(this).css({ + 'MozUserSelect' : '' + }); + }); + }; + } else if ($.browser.msie) { + $.fn.disableTextSelect = function() { + return this.each(function() { + $(this).bind('selectstart.disableTextSelect', function() { + return false; + }); + }); + }; + $.fn.enableTextSelect = function() { + return this.each(function() { + $(this).unbind('selectstart.disableTextSelect'); + }); + }; + } else { + $.fn.disableTextSelect = function() { + return this.each(function() { + $(this).bind('mousedown.disableTextSelect', function() { + return false; + }); + }); + }; + $.fn.enableTextSelect = function() { + return this.each(function() { + $(this).unbind('mousedown.disableTextSelect'); + }); + }; + } +})(jQuery); \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/js/edit.js b/src/bb-modules/Filemanager/src/js/edit.js new file mode 100644 index 000000000..898bffc91 --- /dev/null +++ b/src/bb-modules/Filemanager/src/js/edit.js @@ -0,0 +1,214 @@ +var working_path = '/'; +var $editor_tabs; +var openFiles = []; + +// Array Remove - By John Resig (MIT Licensed) +Array.prototype.remove = function(from, to) { + var rest = this.slice((to || from) + 1 || this.length); + this.length = from < 0 ? this.length + from : from; + return this.push.apply(this, rest); +}; + +$(function(){ + $(document).disableTextSelect(); + $editor_tabs = $("#edit-content").tabs({ + tabTemplate: '
      • #{label}
      • ', + add: function(event, ui) { + var dpath = openFiles[ui.index].path; + var npath = bbUrl+'/filemanager/editor?file='+dpath; + var html = ''; + $(ui.tab).parent().find('span.ui-icon-close').attr('data-path', dpath); + $(ui.panel).html(html); + resizeStage(); + $editor_tabs.tabs('select',ui.index); + }, + create: function(event, ui) { + setTimeout(function(){ resizeStage(); },1000); + } + }); + $( "#edit-content" ).delegate('li span.ui-icon-close', "click", function() { + var index = $( "li", $editor_tabs ).index( $( this ).parent() ); + $editor_tabs.tabs( "remove", index ); + dpath = $( this ).attr('data-path'); + for(var i=0;i < openFiles.length; i++){ + if(openFiles[i].path == dpath){ + openFiles.remove(i); + } + } + }); + + loadFiles(working_path); + + $("#edit-dir").click(function(e){ + $("#path-tree").stop(true,true).slideToggle(); + }); + $("#edit-files").mouseleave(function(e){ + $("#path-tree").stop(true,true).slideUp(); + }); + $("#path-tree li").on('click',function(e){ + mx = $("#path-tree li").index(this); + var newpath = $(this).attr('data-path'); + if(working_path == newpath){ + $("#path-tree").stop(true,true).hide(); + return false; + } + $("#path-tree li").each(function(idx,ele){ + if(idx==mx){ + return idx; + }else{ + $(ele).remove(); + } + }); + working_path = newpath; + $("#select-dir").text(working_path).attr('data-path',working_path); + loadFiles(working_path); + $("#path-tree").stop(true,true).hide(); + }); + + resizeStage(); + setTimeout(function(){ resizeStage(); },100); + +}); +function loadFiles(dir){ + if(dir.substr(dir.length-4) == '..//'){ + dirarray = working_path.split('/'); + dirarray.pop(); + dirarray.pop(); + var newdir = dirarray.join('/'); + if(newdir.length == 0){ + newdir = '/'; + } + dir = newdir; + } + working_path = dir; + + $("#select-dir").text(dir); + $("#select-dir").attr('data-path', dir); + + var pathtree = dir.split('/'); + pathtree.pop(); + var tree = ''; + $("#path-tree").html(''); + $(pathtree).each(function(idx){ + tree += pathtree[idx]+'/'; + $("#path-tree").prepend('
      • '+tree+'
      • '); + }); + + + jQuery.post(apiUrl+'admin/filemanager/get_list',{path:dir},function(result){ + $("#file-list").html(''); + var html = ''; + d = result.result; + if(d.filecount == 0){ + + }else{ + for(var i=0;i'+d.files[i].filename+''; + } + } + $("#file-list").html(html); + + if(working_path != '/'){ + $("#file-list").prepend('
      • ..
      • '); + } + + + $("#file-list li").draggable({ + revert: 'invalid' + }); + $("#file-list li.file-dir").droppable({ + hoverClass: 'selected-item', + over: function(event, ui) {}, + drop: function(event,ui){ + from = $(ui.draggable).attr('data-path'); + to = $(this).attr('data-path'); + $.post(apiUrl+'admin/filemanager/move_file',{path:from, to:to},function(d){ + loadFiles(working_path); + }); + $(ui.draggable).fadeOut('fast'); + } + }); + $('#file-list li').on('click', function(e){ + $(this).siblings().removeClass('selected-item'); + $(this).addClass('selected-item'); + }); + $('#file-list li.file-file').on('dblclick', function(e){ + var idx = $editor_tabs.tabs("length"); + var path = $(this).attr('data-path'); + var filename = $(this).attr('data-filename'); + var newid ="tab-"+idx; + var item = {'path':path,'name':filename}; + + for(var i=0;i < openFiles.length; i++){ + if(openFiles[i].path == path){ + $editor_tabs.tabs('select',i); + return false; + } + } + + openFiles[idx] = item; + $editor_tabs.tabs('add', "#"+newid, filename); + $("#"+newid).attr('data-path',path); + }); + $('#file-list li.file-dir').on('dblclick', function(e){ + var newpath = working_path+$(this).attr('data-filename')+"/"; + loadFiles(newpath); + }); + + if(openFile) { + $('li[data-filename="'+openFile+'"]').dblclick(); + } + }); + +} + +function newDir(){ + var txt = prompt("Directory name:"); + if(txt.length > 0){ + mkpath = working_path+'/'+txt; + $.post(apiUrl+'admin/filemanager/new_item',{path:mkpath,type:'dir'},function(d){ + loadFiles(working_path); + }); + } +} +function newFile(){ + var txt = prompt("File name:"); + if(txt.length > 0){ + mkpath = working_path+'/'+txt; + $.post(apiUrl+'admin/filemanager/new_item',{path:mkpath,type:'file'},function(d){ + loadFiles(working_path); + }); + } +} + +$(window).resize(function(){ + resizeStage(); +}); + +function resizeStage(){ + var h = $(window).height() - $("#main-nav").outerHeight(); + $("#edit-files").css('height',h+'px'); + var w = $(window).width() - $("#edit-files").outerWidth(); + $("#edit-content").css('height',h+'px'); + $("#edit-content").css('width',w+'px'); + var fh = h - 25; + $(".editor-iframe").css('width',w+'px'); + $(".editor-iframe").css('height',fh+'px'); +} +function oc(a) +{ + var o = {}; + for(var i=0;i=0)&&k(a,!d)}});c(function(){var a=document.body,b=a.appendChild(b=document.createElement("div"));c.extend(b.style,{minHeight:"100px",height:"auto",padding:0,borderWidth:0});c.support.minHeight=b.offsetHeight===100;c.support.selectstart="onselectstart"in b;a.removeChild(b).style.display="none"});c.extend(c.ui,{plugin:{add:function(a,b,d){a=c.ui[a].prototype;for(var e in d){a.plugins[e]=a.plugins[e]||[];a.plugins[e].push([b,d[e]])}},call:function(a,b,d){if((b=a.plugins[b])&& +a.element[0].parentNode)for(var e=0;e0)return true;a[b]=1;d=a[b]>0;a[b]=0;return d},isOverAxis:function(a,b,d){return a>b&&a=9)&&!a.button)return this._mouseUp(a);if(this._mouseStarted){this._mouseDrag(a);return a.preventDefault()}if(this._mouseDistanceMet(a)&&this._mouseDelayMet(a))(this._mouseStarted=this._mouseStart(this._mouseDownEvent,a)!==false)?this._mouseDrag(a):this._mouseUp(a);return!this._mouseStarted},_mouseUp:function(a){b(document).unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted= +false;a.target==this._mouseDownEvent.target&&b.data(a.target,this.widgetName+".preventClickEvent",true);this._mouseStop(a)}return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}})})(jQuery); +;/* + * jQuery UI Position 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Position + */ +(function(c){c.ui=c.ui||{};var n=/left|center|right/,o=/top|center|bottom/,t=c.fn.position,u=c.fn.offset;c.fn.position=function(b){if(!b||!b.of)return t.apply(this,arguments);b=c.extend({},b);var a=c(b.of),d=a[0],g=(b.collision||"flip").split(" "),e=b.offset?b.offset.split(" "):[0,0],h,k,j;if(d.nodeType===9){h=a.width();k=a.height();j={top:0,left:0}}else if(d.setTimeout){h=a.width();k=a.height();j={top:a.scrollTop(),left:a.scrollLeft()}}else if(d.preventDefault){b.at="left top";h=k=0;j={top:b.of.pageY, +left:b.of.pageX}}else{h=a.outerWidth();k=a.outerHeight();j=a.offset()}c.each(["my","at"],function(){var f=(b[this]||"").split(" ");if(f.length===1)f=n.test(f[0])?f.concat(["center"]):o.test(f[0])?["center"].concat(f):["center","center"];f[0]=n.test(f[0])?f[0]:"center";f[1]=o.test(f[1])?f[1]:"center";b[this]=f});if(g.length===1)g[1]=g[0];e[0]=parseInt(e[0],10)||0;if(e.length===1)e[1]=e[0];e[1]=parseInt(e[1],10)||0;if(b.at[0]==="right")j.left+=h;else if(b.at[0]==="center")j.left+=h/2;if(b.at[1]==="bottom")j.top+= +k;else if(b.at[1]==="center")j.top+=k/2;j.left+=e[0];j.top+=e[1];return this.each(function(){var f=c(this),l=f.outerWidth(),m=f.outerHeight(),p=parseInt(c.curCSS(this,"marginLeft",true))||0,q=parseInt(c.curCSS(this,"marginTop",true))||0,v=l+p+(parseInt(c.curCSS(this,"marginRight",true))||0),w=m+q+(parseInt(c.curCSS(this,"marginBottom",true))||0),i=c.extend({},j),r;if(b.my[0]==="right")i.left-=l;else if(b.my[0]==="center")i.left-=l/2;if(b.my[1]==="bottom")i.top-=m;else if(b.my[1]==="center")i.top-= +m/2;i.left=Math.round(i.left);i.top=Math.round(i.top);r={left:i.left-p,top:i.top-q};c.each(["left","top"],function(s,x){c.ui.position[g[s]]&&c.ui.position[g[s]][x](i,{targetWidth:h,targetHeight:k,elemWidth:l,elemHeight:m,collisionPosition:r,collisionWidth:v,collisionHeight:w,offset:e,my:b.my,at:b.at})});c.fn.bgiframe&&f.bgiframe();f.offset(c.extend(i,{using:b.using}))})};c.ui.position={fit:{left:function(b,a){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();b.left= +d>0?b.left-d:Math.max(b.left-a.collisionPosition.left,b.left)},top:function(b,a){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();b.top=d>0?b.top-d:Math.max(b.top-a.collisionPosition.top,b.top)}},flip:{left:function(b,a){if(a.at[0]!=="center"){var d=c(window);d=a.collisionPosition.left+a.collisionWidth-d.width()-d.scrollLeft();var g=a.my[0]==="left"?-a.elemWidth:a.my[0]==="right"?a.elemWidth:0,e=a.at[0]==="left"?a.targetWidth:-a.targetWidth,h=-2*a.offset[0];b.left+= +a.collisionPosition.left<0?g+e+h:d>0?g+e+h:0}},top:function(b,a){if(a.at[1]!=="center"){var d=c(window);d=a.collisionPosition.top+a.collisionHeight-d.height()-d.scrollTop();var g=a.my[1]==="top"?-a.elemHeight:a.my[1]==="bottom"?a.elemHeight:0,e=a.at[1]==="top"?a.targetHeight:-a.targetHeight,h=-2*a.offset[1];b.top+=a.collisionPosition.top<0?g+e+h:d>0?g+e+h:0}}}};if(!c.offset.setOffset){c.offset.setOffset=function(b,a){if(/static/.test(c.curCSS(b,"position")))b.style.position="relative";var d=c(b), +g=d.offset(),e=parseInt(c.curCSS(b,"top",true),10)||0,h=parseInt(c.curCSS(b,"left",true),10)||0;g={top:a.top-g.top+e,left:a.left-g.left+h};"using"in a?a.using.call(b,g):d.css(g)};c.fn.offset=function(b){var a=this[0];if(!a||!a.ownerDocument)return null;if(b)return this.each(function(){c.offset.setOffset(this,b)});return u.call(this)}}})(jQuery); +;/* + * jQuery UI Draggable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Draggables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(d){d.widget("ui.draggable",d.ui.mouse,{widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false},_create:function(){if(this.options.helper== +"original"&&!/^(?:r|a|f)/.test(this.element.css("position")))this.element[0].style.position="relative";this.options.addClasses&&this.element.addClass("ui-draggable");this.options.disabled&&this.element.addClass("ui-draggable-disabled");this._mouseInit()},destroy:function(){if(this.element.data("draggable")){this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._mouseDestroy();return this}},_mouseCapture:function(a){var b= +this.options;if(this.helper||b.disabled||d(a.target).is(".ui-resizable-handle"))return false;this.handle=this._getHandle(a);if(!this.handle)return false;if(b.iframeFix)d(b.iframeFix===true?"iframe":b.iframeFix).each(function(){d('
        ').css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1E3}).css(d(this).offset()).appendTo("body")});return true},_mouseStart:function(a){var b=this.options; +this.helper=this._createHelper(a);this._cacheHelperProportions();if(d.ui.ddmanager)d.ui.ddmanager.current=this;this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent();this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()}); +this.originalPosition=this.position=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);b.containment&&this._setContainment();if(this._trigger("start",a)===false){this._clear();return false}this._cacheHelperProportions();d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.helper.addClass("ui-draggable-dragging");this._mouseDrag(a,true);d.ui.ddmanager&&d.ui.ddmanager.dragStart(this,a);return true}, +_mouseDrag:function(a,b){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!b){b=this._uiHash();if(this._trigger("drag",a,b)===false){this._mouseUp({});return false}this.position=b.position}if(!this.options.axis||this.options.axis!="y")this.helper[0].style.left=this.position.left+"px";if(!this.options.axis||this.options.axis!="x")this.helper[0].style.top=this.position.top+"px";d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);return false},_mouseStop:function(a){var b= +false;if(d.ui.ddmanager&&!this.options.dropBehaviour)b=d.ui.ddmanager.drop(this,a);if(this.dropped){b=this.dropped;this.dropped=false}if((!this.element[0]||!this.element[0].parentNode)&&this.options.helper=="original")return false;if(this.options.revert=="invalid"&&!b||this.options.revert=="valid"&&b||this.options.revert===true||d.isFunction(this.options.revert)&&this.options.revert.call(this.element,b)){var c=this;d(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration, +10),function(){c._trigger("stop",a)!==false&&c._clear()})}else this._trigger("stop",a)!==false&&this._clear();return false},_mouseUp:function(a){this.options.iframeFix===true&&d("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});d.ui.ddmanager&&d.ui.ddmanager.dragStop(this,a);return d.ui.mouse.prototype._mouseUp.call(this,a)},cancel:function(){this.helper.is(".ui-draggable-dragging")?this._mouseUp({}):this._clear();return this},_getHandle:function(a){var b=!this.options.handle|| +!d(this.options.handle,this.element).length?true:false;d(this.options.handle,this.element).find("*").andSelf().each(function(){if(this==a.target)b=true});return b},_createHelper:function(a){var b=this.options;a=d.isFunction(b.helper)?d(b.helper.apply(this.element[0],[a])):b.helper=="clone"?this.element.clone().removeAttr("id"):this.element;a.parents("body").length||a.appendTo(b.appendTo=="parent"?this.element[0].parentNode:b.appendTo);a[0]!=this.element[0]&&!/(fixed|absolute)/.test(a.css("position"))&& +a.css("position","absolute");return a},_adjustOffsetFromHelper:function(a){if(typeof a=="string")a=a.split(" ");if(d.isArray(a))a={left:+a[0],top:+a[1]||0};if("left"in a)this.offset.click.left=a.left+this.margins.left;if("right"in a)this.offset.click.left=this.helperProportions.width-a.right+this.margins.left;if("top"in a)this.offset.click.top=a.top+this.margins.top;if("bottom"in a)this.offset.click.top=this.helperProportions.height-a.bottom+this.margins.top},_getParentOffset:function(){this.offsetParent= +this.helper.offsetParent();var a=this.offsetParent.offset();if(this.cssPosition=="absolute"&&this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0])){a.left+=this.scrollParent.scrollLeft();a.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]==document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()=="html"&&d.browser.msie)a={top:0,left:0};return{top:a.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:a.left+(parseInt(this.offsetParent.css("borderLeftWidth"), +10)||0)}},_getRelativeOffset:function(){if(this.cssPosition=="relative"){var a=this.element.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else return{top:0,left:0}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"), +10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var a=this.options;if(a.containment=="parent")a.containment=this.helper[0].parentNode;if(a.containment=="document"||a.containment=="window")this.containment=[a.containment=="document"?0:d(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a.containment=="document"?0:d(window).scrollTop()-this.offset.relative.top-this.offset.parent.top, +(a.containment=="document"?0:d(window).scrollLeft())+d(a.containment=="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a.containment=="document"?0:d(window).scrollTop())+(d(a.containment=="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];if(!/^(document|window|parent)$/.test(a.containment)&&a.containment.constructor!=Array){a=d(a.containment);var b=a[0];if(b){a.offset();var c=d(b).css("overflow")!= +"hidden";this.containment=[(parseInt(d(b).css("borderLeftWidth"),10)||0)+(parseInt(d(b).css("paddingLeft"),10)||0),(parseInt(d(b).css("borderTopWidth"),10)||0)+(parseInt(d(b).css("paddingTop"),10)||0),(c?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(d(b).css("borderLeftWidth"),10)||0)-(parseInt(d(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(c?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(d(b).css("borderTopWidth"), +10)||0)-(parseInt(d(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relative_container=a}}else if(a.containment.constructor==Array)this.containment=a.containment},_convertPositionTo:function(a,b){if(!b)b=this.position;a=a=="absolute"?1:-1;var c=this.cssPosition=="absolute"&&!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName);return{top:b.top+ +this.offset.relative.top*a+this.offset.parent.top*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollTop():f?0:c.scrollTop())*a),left:b.left+this.offset.relative.left*a+this.offset.parent.left*a-(d.browser.safari&&d.browser.version<526&&this.cssPosition=="fixed"?0:(this.cssPosition=="fixed"?-this.scrollParent.scrollLeft():f?0:c.scrollLeft())*a)}},_generatePosition:function(a){var b=this.options,c=this.cssPosition=="absolute"&& +!(this.scrollParent[0]!=document&&d.ui.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(c[0].tagName),e=a.pageX,h=a.pageY;if(this.originalPosition){var g;if(this.containment){if(this.relative_container){g=this.relative_container.offset();g=[this.containment[0]+g.left,this.containment[1]+g.top,this.containment[2]+g.left,this.containment[3]+g.top]}else g=this.containment;if(a.pageX-this.offset.click.leftg[2])e=g[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>g[3])h=g[3]+this.offset.click.top}if(b.grid){h=b.grid[1]?this.originalPageY+Math.round((h-this.originalPageY)/b.grid[1])*b.grid[1]:this.originalPageY;h=g?!(h-this.offset.click.topg[3])?h:!(h-this.offset.click.topg[2])?e:!(e-this.offset.click.left=0;i--){var j=c.snapElements[i].left,l=j+c.snapElements[i].width,k=c.snapElements[i].top,m=k+c.snapElements[i].height;if(j-e=j&&f<=l||h>=j&&h<=l||fl)&&(e>= +i&&e<=k||g>=i&&g<=k||ek);default:return false}};d.ui.ddmanager={current:null,droppables:{"default":[]},prepareOffsets:function(a,b){var c=d.ui.ddmanager.droppables[a.options.scope]||[],e=b?b.type:null,g=(a.currentItem||a.element).find(":data(droppable)").andSelf(),f=0;a:for(;f').css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(), +top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("resizable",this.element.data("resizable"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle= +this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=a.handles||(!e(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne", +nw:".ui-resizable-nw"});if(this.handles.constructor==String){if(this.handles=="all")this.handles="n,e,s,w,se,sw,ne,nw";var c=this.handles.split(",");this.handles={};for(var d=0;d');/sw|se|ne|nw/.test(f)&&g.css({zIndex:++a.zIndex});"se"==f&&g.addClass("ui-icon ui-icon-gripsmall-diagonal-se");this.handles[f]=".ui-resizable-"+f;this.element.append(g)}}this._renderAxis=function(h){h=h||this.element;for(var i in this.handles){if(this.handles[i].constructor== +String)this.handles[i]=e(this.handles[i],this.element).show();if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){var j=e(this.handles[i],this.element),l=0;l=/sw|ne|nw|se|n|s/.test(i)?j.outerHeight():j.outerWidth();j=["padding",/ne|nw|n/.test(i)?"Top":/se|sw|s/.test(i)?"Bottom":/^e$/.test(i)?"Right":"Left"].join("");h.css(j,l);this._proportionallyResize()}e(this.handles[i])}};this._renderAxis(this.element);this._handles=e(".ui-resizable-handle",this.element).disableSelection(); +this._handles.mouseover(function(){if(!b.resizing){if(this.className)var h=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);b.axis=h&&h[1]?h[1]:"se"}});if(a.autoHide){this._handles.hide();e(this.element).addClass("ui-resizable-autohide").hover(function(){if(!a.disabled){e(this).removeClass("ui-resizable-autohide");b._handles.show()}},function(){if(!a.disabled)if(!b.resizing){e(this).addClass("ui-resizable-autohide");b._handles.hide()}})}this._mouseInit()},destroy:function(){this._mouseDestroy(); +var b=function(c){e(c).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){b(this.element);var a=this.element;a.after(this.originalElement.css({position:a.css("position"),width:a.outerWidth(),height:a.outerHeight(),top:a.css("top"),left:a.css("left")})).remove()}this.originalElement.css("resize",this.originalResizeStyle);b(this.originalElement);return this},_mouseCapture:function(b){var a= +false;for(var c in this.handles)if(e(this.handles[c])[0]==b.target)a=true;return!this.options.disabled&&a},_mouseStart:function(b){var a=this.options,c=this.element.position(),d=this.element;this.resizing=true;this.documentScroll={top:e(document).scrollTop(),left:e(document).scrollLeft()};if(d.is(".ui-draggable")||/absolute/.test(d.css("position")))d.css({position:"absolute",top:c.top,left:c.left});e.browser.opera&&/relative/.test(d.css("position"))&&d.css({position:"relative",top:"auto",left:"auto"}); +this._renderProxy();c=m(this.helper.css("left"));var f=m(this.helper.css("top"));if(a.containment){c+=e(a.containment).scrollLeft()||0;f+=e(a.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:f};this.size=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalSize=this._helper?{width:d.outerWidth(),height:d.outerHeight()}:{width:d.width(),height:d.height()};this.originalPosition={left:c,top:f};this.sizeDiff= +{width:d.outerWidth()-d.width(),height:d.outerHeight()-d.height()};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof a.aspectRatio=="number"?a.aspectRatio:this.originalSize.width/this.originalSize.height||1;a=e(".ui-resizable-"+this.axis).css("cursor");e("body").css("cursor",a=="auto"?this.axis+"-resize":a);d.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var a=this.helper,c=this.originalMousePosition,d=this._change[this.axis]; +if(!d)return false;c=d.apply(this,[b,b.pageX-c.left||0,b.pageY-c.top||0]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey)c=this._updateRatio(c,b);c=this._respectSize(c,b);this._propagate("resize",b);a.css({top:this.position.top+"px",left:this.position.left+"px",width:this.size.width+"px",height:this.size.height+"px"});!this._helper&&this._proportionallyResizeElements.length&&this._proportionallyResize();this._updateCache(c);this._trigger("resize",b,this.ui());return false}, +_mouseStop:function(b){this.resizing=false;var a=this.options,c=this;if(this._helper){var d=this._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName);d=f&&e.ui.hasScroll(d[0],"left")?0:c.sizeDiff.height;f=f?0:c.sizeDiff.width;f={width:c.helper.width()-f,height:c.helper.height()-d};d=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null;var g=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;a.animate||this.element.css(e.extend(f, +{top:g,left:d}));c.helper.height(c.size.height);c.helper.width(c.size.width);this._helper&&!a.animate&&this._proportionallyResize()}e("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);this._helper&&this.helper.remove();return false},_updateVirtualBoundaries:function(b){var a=this.options,c,d,f;a={minWidth:k(a.minWidth)?a.minWidth:0,maxWidth:k(a.maxWidth)?a.maxWidth:Infinity,minHeight:k(a.minHeight)?a.minHeight:0,maxHeight:k(a.maxHeight)?a.maxHeight: +Infinity};if(this._aspectRatio||b){b=a.minHeight*this.aspectRatio;d=a.minWidth/this.aspectRatio;c=a.maxHeight*this.aspectRatio;f=a.maxWidth/this.aspectRatio;if(b>a.minWidth)a.minWidth=b;if(d>a.minHeight)a.minHeight=d;if(cb.width,h=k(b.height)&&a.minHeight&&a.minHeight>b.height;if(g)b.width=a.minWidth;if(h)b.height=a.minHeight;if(d)b.width=a.maxWidth;if(f)b.height=a.maxHeight;var i=this.originalPosition.left+this.originalSize.width,j=this.position.top+this.size.height,l=/sw|nw|w/.test(c);c=/nw|ne|n/.test(c);if(g&&l)b.left=i-a.minWidth;if(d&&l)b.left=i-a.maxWidth;if(h&&c)b.top=j-a.minHeight;if(f&&c)b.top=j-a.maxHeight;if((a=!b.width&&!b.height)&&!b.left&&b.top)b.top=null;else if(a&&!b.top&&b.left)b.left= +null;return b},_proportionallyResize:function(){if(this._proportionallyResizeElements.length)for(var b=this.helper||this.element,a=0;a');var a=e.browser.msie&&e.browser.version<7,c=a?1:0;a=a?2:-1;this.helper.addClass(this._helper).css({width:this.element.outerWidth()+ +a,height:this.element.outerHeight()+a,position:"absolute",left:this.elementOffset.left-c+"px",top:this.elementOffset.top-c+"px",zIndex:++b.zIndex});this.helper.appendTo("body").disableSelection()}else this.helper=this.element},_change:{e:function(b,a){return{width:this.originalSize.width+a}},w:function(b,a){return{left:this.originalPosition.left+a,width:this.originalSize.width-a}},n:function(b,a,c){return{top:this.originalPosition.top+c,height:this.originalSize.height-c}},s:function(b,a,c){return{height:this.originalSize.height+ +c}},se:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},sw:function(b,a,c){return e.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,a,c]))},ne:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,a,c]))},nw:function(b,a,c){return e.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,a,c]))}},_propagate:function(b,a){e.ui.plugin.call(this,b,[a,this.ui()]); +b!="resize"&&this._trigger(b,a,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});e.extend(e.ui.resizable,{version:"1.8.16"});e.ui.plugin.add("resizable","alsoResize",{start:function(){var b=e(this).data("resizable").options,a=function(c){e(c).each(function(){var d=e(this);d.data("resizable-alsoresize",{width:parseInt(d.width(), +10),height:parseInt(d.height(),10),left:parseInt(d.css("left"),10),top:parseInt(d.css("top"),10),position:d.css("position")})})};if(typeof b.alsoResize=="object"&&!b.alsoResize.parentNode)if(b.alsoResize.length){b.alsoResize=b.alsoResize[0];a(b.alsoResize)}else e.each(b.alsoResize,function(c){a(c)});else a(b.alsoResize)},resize:function(b,a){var c=e(this).data("resizable");b=c.options;var d=c.originalSize,f=c.originalPosition,g={height:c.size.height-d.height||0,width:c.size.width-d.width||0,top:c.position.top- +f.top||0,left:c.position.left-f.left||0},h=function(i,j){e(i).each(function(){var l=e(this),q=e(this).data("resizable-alsoresize"),p={},r=j&&j.length?j:l.parents(a.originalElement[0]).length?["width","height"]:["width","height","top","left"];e.each(r,function(n,o){if((n=(q[o]||0)+(g[o]||0))&&n>=0)p[o]=n||null});if(e.browser.opera&&/relative/.test(l.css("position"))){c._revertToRelativePosition=true;l.css({position:"absolute",top:"auto",left:"auto"})}l.css(p)})};typeof b.alsoResize=="object"&&!b.alsoResize.nodeType? +e.each(b.alsoResize,function(i,j){h(i,j)}):h(b.alsoResize)},stop:function(){var b=e(this).data("resizable"),a=b.options,c=function(d){e(d).each(function(){var f=e(this);f.css({position:f.data("resizable-alsoresize").position})})};if(b._revertToRelativePosition){b._revertToRelativePosition=false;typeof a.alsoResize=="object"&&!a.alsoResize.nodeType?e.each(a.alsoResize,function(d){c(d)}):c(a.alsoResize)}e(this).removeData("resizable-alsoresize")}});e.ui.plugin.add("resizable","animate",{stop:function(b){var a= +e(this).data("resizable"),c=a.options,d=a._proportionallyResizeElements,f=d.length&&/textarea/i.test(d[0].nodeName),g=f&&e.ui.hasScroll(d[0],"left")?0:a.sizeDiff.height;f={width:a.size.width-(f?0:a.sizeDiff.width),height:a.size.height-g};g=parseInt(a.element.css("left"),10)+(a.position.left-a.originalPosition.left)||null;var h=parseInt(a.element.css("top"),10)+(a.position.top-a.originalPosition.top)||null;a.element.animate(e.extend(f,h&&g?{top:h,left:g}:{}),{duration:c.animateDuration,easing:c.animateEasing, +step:function(){var i={width:parseInt(a.element.css("width"),10),height:parseInt(a.element.css("height"),10),top:parseInt(a.element.css("top"),10),left:parseInt(a.element.css("left"),10)};d&&d.length&&e(d[0]).css({width:i.width,height:i.height});a._updateCache(i);a._propagate("resize",b)}})}});e.ui.plugin.add("resizable","containment",{start:function(){var b=e(this).data("resizable"),a=b.element,c=b.options.containment;if(a=c instanceof e?c.get(0):/parent/.test(c)?a.parent().get(0):c){b.containerElement= +e(a);if(/document/.test(c)||c==document){b.containerOffset={left:0,top:0};b.containerPosition={left:0,top:0};b.parentData={element:e(document),left:0,top:0,width:e(document).width(),height:e(document).height()||document.body.parentNode.scrollHeight}}else{var d=e(a),f=[];e(["Top","Right","Left","Bottom"]).each(function(i,j){f[i]=m(d.css("padding"+j))});b.containerOffset=d.offset();b.containerPosition=d.position();b.containerSize={height:d.innerHeight()-f[3],width:d.innerWidth()-f[1]};c=b.containerOffset; +var g=b.containerSize.height,h=b.containerSize.width;h=e.ui.hasScroll(a,"left")?a.scrollWidth:h;g=e.ui.hasScroll(a)?a.scrollHeight:g;b.parentData={element:a,left:c.left,top:c.top,width:h,height:g}}}},resize:function(b){var a=e(this).data("resizable"),c=a.options,d=a.containerOffset,f=a.position;b=a._aspectRatio||b.shiftKey;var g={top:0,left:0},h=a.containerElement;if(h[0]!=document&&/static/.test(h.css("position")))g=d;if(f.left<(a._helper?d.left:0)){a.size.width+=a._helper?a.position.left-d.left: +a.position.left-g.left;if(b)a.size.height=a.size.width/c.aspectRatio;a.position.left=c.helper?d.left:0}if(f.top<(a._helper?d.top:0)){a.size.height+=a._helper?a.position.top-d.top:a.position.top;if(b)a.size.width=a.size.height*c.aspectRatio;a.position.top=a._helper?d.top:0}a.offset.left=a.parentData.left+a.position.left;a.offset.top=a.parentData.top+a.position.top;c=Math.abs((a._helper?a.offset.left-g.left:a.offset.left-g.left)+a.sizeDiff.width);d=Math.abs((a._helper?a.offset.top-g.top:a.offset.top- +d.top)+a.sizeDiff.height);f=a.containerElement.get(0)==a.element.parent().get(0);g=/relative|absolute/.test(a.containerElement.css("position"));if(f&&g)c-=a.parentData.left;if(c+a.size.width>=a.parentData.width){a.size.width=a.parentData.width-c;if(b)a.size.height=a.size.width/a.aspectRatio}if(d+a.size.height>=a.parentData.height){a.size.height=a.parentData.height-d;if(b)a.size.width=a.size.height*a.aspectRatio}},stop:function(){var b=e(this).data("resizable"),a=b.options,c=b.containerOffset,d=b.containerPosition, +f=b.containerElement,g=e(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width;g=g.outerHeight()-b.sizeDiff.height;b._helper&&!a.animate&&/relative/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g});b._helper&&!a.animate&&/static/.test(f.css("position"))&&e(this).css({left:h.left-d.left-c.left,width:i,height:g})}});e.ui.plugin.add("resizable","ghost",{start:function(){var b=e(this).data("resizable"),a=b.options,c=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:0.25, +display:"block",position:"relative",height:c.height,width:c.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof a.ghost=="string"?a.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=e(this).data("resizable");b.ghost&&b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})},stop:function(){var b=e(this).data("resizable");b.ghost&&b.helper&&b.helper.get(0).removeChild(b.ghost.get(0))}});e.ui.plugin.add("resizable","grid",{resize:function(){var b= +e(this).data("resizable"),a=b.options,c=b.size,d=b.originalSize,f=b.originalPosition,g=b.axis;a.grid=typeof a.grid=="number"?[a.grid,a.grid]:a.grid;var h=Math.round((c.width-d.width)/(a.grid[0]||1))*(a.grid[0]||1);a=Math.round((c.height-d.height)/(a.grid[1]||1))*(a.grid[1]||1);if(/^(se|s|e)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a}else if(/^(ne)$/.test(g)){b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}else{if(/^(sw)$/.test(g)){b.size.width=d.width+h;b.size.height= +d.height+a}else{b.size.width=d.width+h;b.size.height=d.height+a;b.position.top=f.top-a}b.position.left=f.left-h}}});var m=function(b){return parseInt(b,10)||0},k=function(b){return!isNaN(parseInt(b,10))}})(jQuery); +;/* + * jQuery UI Selectable 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Selectables + * + * Depends: + * jquery.ui.core.js + * jquery.ui.mouse.js + * jquery.ui.widget.js + */ +(function(e){e.widget("ui.selectable",e.ui.mouse,{options:{appendTo:"body",autoRefresh:true,distance:0,filter:"*",tolerance:"touch"},_create:function(){var c=this;this.element.addClass("ui-selectable");this.dragged=false;var f;this.refresh=function(){f=e(c.options.filter,c.element[0]);f.each(function(){var d=e(this),b=d.offset();e.data(this,"selectable-item",{element:this,$element:d,left:b.left,top:b.top,right:b.left+d.outerWidth(),bottom:b.top+d.outerHeight(),startselected:false,selected:d.hasClass("ui-selected"), +selecting:d.hasClass("ui-selecting"),unselecting:d.hasClass("ui-unselecting")})})};this.refresh();this.selectees=f.addClass("ui-selectee");this._mouseInit();this.helper=e("
        ")},destroy:function(){this.selectees.removeClass("ui-selectee").removeData("selectable-item");this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");this._mouseDestroy();return this},_mouseStart:function(c){var f=this;this.opos=[c.pageX, +c.pageY];if(!this.options.disabled){var d=this.options;this.selectees=e(d.filter,this.element[0]);this._trigger("start",c);e(d.appendTo).append(this.helper);this.helper.css({left:c.clientX,top:c.clientY,width:0,height:0});d.autoRefresh&&this.refresh();this.selectees.filter(".ui-selected").each(function(){var b=e.data(this,"selectable-item");b.startselected=true;if(!c.metaKey){b.$element.removeClass("ui-selected");b.selected=false;b.$element.addClass("ui-unselecting");b.unselecting=true;f._trigger("unselecting", +c,{unselecting:b.element})}});e(c.target).parents().andSelf().each(function(){var b=e.data(this,"selectable-item");if(b){var g=!c.metaKey||!b.$element.hasClass("ui-selected");b.$element.removeClass(g?"ui-unselecting":"ui-selected").addClass(g?"ui-selecting":"ui-unselecting");b.unselecting=!g;b.selecting=g;(b.selected=g)?f._trigger("selecting",c,{selecting:b.element}):f._trigger("unselecting",c,{unselecting:b.element});return false}})}},_mouseDrag:function(c){var f=this;this.dragged=true;if(!this.options.disabled){var d= +this.options,b=this.opos[0],g=this.opos[1],h=c.pageX,i=c.pageY;if(b>h){var j=h;h=b;b=j}if(g>i){j=i;i=g;g=j}this.helper.css({left:b,top:g,width:h-b,height:i-g});this.selectees.each(function(){var a=e.data(this,"selectable-item");if(!(!a||a.element==f.element[0])){var k=false;if(d.tolerance=="touch")k=!(a.left>h||a.righti||a.bottomb&&a.rightg&&a.bottom *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1E3},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable"); +this.refresh();this.floating=this.items.length?a.axis==="x"||/left|right/.test(this.items[0].item.css("float"))||/inline|table-cell/.test(this.items[0].item.css("display")):false;this.offset=this.element.offset();this._mouseInit()},destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--)this.items[a].item.removeData("sortable-item");return this},_setOption:function(a,b){if(a=== +"disabled"){this.options[a]=b;this.widget()[b?"addClass":"removeClass"]("ui-sortable-disabled")}else d.Widget.prototype._setOption.apply(this,arguments)},_mouseCapture:function(a,b){if(this.reverting)return false;if(this.options.disabled||this.options.type=="static")return false;this._refreshItems(a);var c=null,e=this;d(a.target).parents().each(function(){if(d.data(this,"sortable-item")==e){c=d(this);return false}});if(d.data(a.target,"sortable-item")==e)c=d(a.target);if(!c)return false;if(this.options.handle&& +!b){var f=false;d(this.options.handle,c).find("*").andSelf().each(function(){if(this==a.target)f=true});if(!f)return false}this.currentItem=c;this._removeCurrentsFromItems();return true},_mouseStart:function(a,b,c){b=this.options;var e=this;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(a);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top, +left:this.offset.left-this.margins.left};this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");d.extend(this.offset,{click:{left:a.pageX-this.offset.left,top:a.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this._generatePosition(a);this.originalPageX=a.pageX;this.originalPageY=a.pageY;b.cursorAt&&this._adjustOffsetFromHelper(b.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]}; +this.helper[0]!=this.currentItem[0]&&this.currentItem.hide();this._createPlaceholder();b.containment&&this._setContainment();if(b.cursor){if(d("body").css("cursor"))this._storedCursor=d("body").css("cursor");d("body").css("cursor",b.cursor)}if(b.opacity){if(this.helper.css("opacity"))this._storedOpacity=this.helper.css("opacity");this.helper.css("opacity",b.opacity)}if(b.zIndex){if(this.helper.css("zIndex"))this._storedZIndex=this.helper.css("zIndex");this.helper.css("zIndex",b.zIndex)}if(this.scrollParent[0]!= +document&&this.scrollParent[0].tagName!="HTML")this.overflowOffset=this.scrollParent.offset();this._trigger("start",a,this._uiHash());this._preserveHelperProportions||this._cacheHelperProportions();if(!c)for(c=this.containers.length-1;c>=0;c--)this.containers[c]._trigger("activate",a,e._uiHash(this));if(d.ui.ddmanager)d.ui.ddmanager.current=this;d.ui.ddmanager&&!b.dropBehaviour&&d.ui.ddmanager.prepareOffsets(this,a);this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(a); +return true},_mouseDrag:function(a){this.position=this._generatePosition(a);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs)this.lastPositionAbs=this.positionAbs;if(this.options.scroll){var b=this.options,c=false;if(this.scrollParent[0]!=document&&this.scrollParent[0].tagName!="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-a.pageY=0;b--){c=this.items[b];var e=c.item[0],f=this._intersectsWithPointer(c);if(f)if(e!=this.currentItem[0]&&this.placeholder[f==1?"next":"prev"]()[0]!=e&&!d.ui.contains(this.placeholder[0],e)&&(this.options.type=="semi-dynamic"?!d.ui.contains(this.element[0], +e):true)){this.direction=f==1?"down":"up";if(this.options.tolerance=="pointer"||this._intersectsWithSides(c))this._rearrange(a,c);else break;this._trigger("change",a,this._uiHash());break}}this._contactContainers(a);d.ui.ddmanager&&d.ui.ddmanager.drag(this,a);this._trigger("sort",a,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(a,b){if(a){d.ui.ddmanager&&!this.options.dropBehaviour&&d.ui.ddmanager.drop(this,a);if(this.options.revert){var c=this;b=c.placeholder.offset(); +c.reverting=true;d(this.helper).animate({left:b.left-this.offset.parent.left-c.margins.left+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollLeft),top:b.top-this.offset.parent.top-c.margins.top+(this.offsetParent[0]==document.body?0:this.offsetParent[0].scrollTop)},parseInt(this.options.revert,10)||500,function(){c._clear(a)})}else this._clear(a,b);return false}},cancel:function(){var a=this;if(this.dragging){this._mouseUp({target:null});this.options.helper=="original"?this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper"): +this.currentItem.show();for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,a._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,a._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){this.placeholder[0].parentNode&&this.placeholder[0].parentNode.removeChild(this.placeholder[0]);this.options.helper!="original"&&this.helper&&this.helper[0].parentNode&&this.helper.remove();d.extend(this,{helper:null, +dragging:false,reverting:false,_noFinalSort:null});this.domPosition.prev?d(this.domPosition.prev).after(this.currentItem):d(this.domPosition.parent).prepend(this.currentItem)}return this},serialize:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};d(b).each(function(){var e=(d(a.item||this).attr(a.attribute||"id")||"").match(a.expression||/(.+)[-=_](.+)/);if(e)c.push((a.key||e[1]+"[]")+"="+(a.key&&a.expression?e[1]:e[2]))});!c.length&&a.key&&c.push(a.key+"=");return c.join("&")}, +toArray:function(a){var b=this._getItemsAsjQuery(a&&a.connected),c=[];a=a||{};b.each(function(){c.push(d(a.item||this).attr(a.attribute||"id")||"")});return c},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,e=this.positionAbs.top,f=e+this.helperProportions.height,g=a.left,h=g+a.width,i=a.top,k=i+a.height,j=this.offset.click.top,l=this.offset.click.left;j=e+j>i&&e+jg&&b+la[this.floating?"width":"height"]?j:g0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!=0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor==String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(a){var b=[],c=[],e=this._connectWith(); +if(e&&a)for(a=e.length-1;a>=0;a--)for(var f=d(e[a]),g=f.length-1;g>=0;g--){var h=d.data(f[g],"sortable");if(h&&h!=this&&!h.options.disabled)c.push([d.isFunction(h.options.items)?h.options.items.call(h.element):d(h.options.items,h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),h])}c.push([d.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):d(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), +this]);for(a=c.length-1;a>=0;a--)c[a][0].each(function(){b.push(this)});return d(b)},_removeCurrentsFromItems:function(){for(var a=this.currentItem.find(":data(sortable-item)"),b=0;b=0;f--)for(var g=d(e[f]),h=g.length-1;h>=0;h--){var i=d.data(g[h],"sortable");if(i&&i!=this&&!i.options.disabled){c.push([d.isFunction(i.options.items)?i.options.items.call(i.element[0],a,{item:this.currentItem}):d(i.options.items,i.element),i]);this.containers.push(i)}}for(f=c.length-1;f>=0;f--){a=c[f][1];e=c[f][0];h=0;for(g=e.length;h=0;b--){var c=this.items[b];if(!(c.instance!=this.currentContainer&&this.currentContainer&&c.item[0]!=this.currentItem[0])){var e=this.options.toleranceElement?d(this.options.toleranceElement,c.item):c.item;if(!a){c.width=e.outerWidth();c.height=e.outerHeight()}e=e.offset();c.left=e.left;c.top=e.top}}if(this.options.custom&&this.options.custom.refreshContainers)this.options.custom.refreshContainers.call(this);else for(b= +this.containers.length-1;b>=0;b--){e=this.containers[b].element.offset();this.containers[b].containerCache.left=e.left;this.containers[b].containerCache.top=e.top;this.containers[b].containerCache.width=this.containers[b].element.outerWidth();this.containers[b].containerCache.height=this.containers[b].element.outerHeight()}return this},_createPlaceholder:function(a){var b=a||this,c=b.options;if(!c.placeholder||c.placeholder.constructor==String){var e=c.placeholder;c.placeholder={element:function(){var f= +d(document.createElement(b.currentItem[0].nodeName)).addClass(e||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];if(!e)f.style.visibility="hidden";return f},update:function(f,g){if(!(e&&!c.forcePlaceholderSize)){g.height()||g.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10));g.width()||g.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")|| +0,10))}}}}b.placeholder=d(c.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);c.placeholder.update(b,b.placeholder)},_contactContainers:function(a){for(var b=null,c=null,e=this.containers.length-1;e>=0;e--)if(!d.ui.contains(this.currentItem[0],this.containers[e].element[0]))if(this._intersectsWith(this.containers[e].containerCache)){if(!(b&&d.ui.contains(this.containers[e].element[0],b.element[0]))){b=this.containers[e];c=e}}else if(this.containers[e].containerCache.over){this.containers[e]._trigger("out", +a,this._uiHash(this));this.containers[e].containerCache.over=0}if(b)if(this.containers.length===1){this.containers[c]._trigger("over",a,this._uiHash(this));this.containers[c].containerCache.over=1}else if(this.currentContainer!=this.containers[c]){b=1E4;e=null;for(var f=this.positionAbs[this.containers[c].floating?"left":"top"],g=this.items.length-1;g>=0;g--)if(d.ui.contains(this.containers[c].element[0],this.items[g].item[0])){var h=this.items[g][this.containers[c].floating?"left":"top"];if(Math.abs(h- +f)this.containment[2])f=this.containment[2]+this.offset.click.left;if(a.pageY-this.offset.click.top>this.containment[3])g=this.containment[3]+this.offset.click.top}if(b.grid){g=this.originalPageY+Math.round((g- +this.originalPageY)/b.grid[1])*b.grid[1];g=this.containment?!(g-this.offset.click.topthis.containment[3])?g:!(g-this.offset.click.topthis.containment[2])?f:!(f-this.offset.click.left=0;e--)if(d.ui.contains(this.containers[e].element[0],this.currentItem[0])&&!b){c.push(function(f){return function(g){f._trigger("receive",g,this._uiHash(this))}}.call(this,this.containers[e]));c.push(function(f){return function(g){f._trigger("update",g,this._uiHash(this))}}.call(this,this.containers[e]))}}for(e=this.containers.length-1;e>=0;e--){b||c.push(function(f){return function(g){f._trigger("deactivate",g,this._uiHash(this))}}.call(this, +this.containers[e]));if(this.containers[e].containerCache.over){c.push(function(f){return function(g){f._trigger("out",g,this._uiHash(this))}}.call(this,this.containers[e]));this.containers[e].containerCache.over=0}}this._storedCursor&&d("body").css("cursor",this._storedCursor);this._storedOpacity&&this.helper.css("opacity",this._storedOpacity);if(this._storedZIndex)this.helper.css("zIndex",this._storedZIndex=="auto"?"":this._storedZIndex);this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop", +a,this._uiHash());for(e=0;e li > :first-child,> :not(li):even",icons:{header:"ui-icon-triangle-1-e",headerSelected:"ui-icon-triangle-1-s"},navigation:false,navigationFilter:function(){return this.href.toLowerCase()===location.href.toLowerCase()}},_create:function(){var a=this,b=a.options;a.running=0;a.element.addClass("ui-accordion ui-widget ui-helper-reset").children("li").addClass("ui-accordion-li-fix"); +a.headers=a.element.find(b.header).addClass("ui-accordion-header ui-helper-reset ui-state-default ui-corner-all").bind("mouseenter.accordion",function(){b.disabled||c(this).addClass("ui-state-hover")}).bind("mouseleave.accordion",function(){b.disabled||c(this).removeClass("ui-state-hover")}).bind("focus.accordion",function(){b.disabled||c(this).addClass("ui-state-focus")}).bind("blur.accordion",function(){b.disabled||c(this).removeClass("ui-state-focus")});a.headers.next().addClass("ui-accordion-content ui-helper-reset ui-widget-content ui-corner-bottom"); +if(b.navigation){var d=a.element.find("a").filter(b.navigationFilter).eq(0);if(d.length){var h=d.closest(".ui-accordion-header");a.active=h.length?h:d.closest(".ui-accordion-content").prev()}}a.active=a._findActive(a.active||b.active).addClass("ui-state-default ui-state-active").toggleClass("ui-corner-all").toggleClass("ui-corner-top");a.active.next().addClass("ui-accordion-content-active");a._createIcons();a.resize();a.element.attr("role","tablist");a.headers.attr("role","tab").bind("keydown.accordion", +function(f){return a._keydown(f)}).next().attr("role","tabpanel");a.headers.not(a.active||"").attr({"aria-expanded":"false","aria-selected":"false",tabIndex:-1}).next().hide();a.active.length?a.active.attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}):a.headers.eq(0).attr("tabIndex",0);c.browser.safari||a.headers.find("a").attr("tabIndex",-1);b.event&&a.headers.bind(b.event.split(" ").join(".accordion ")+".accordion",function(f){a._clickHandler.call(a,f,this);f.preventDefault()})},_createIcons:function(){var a= +this.options;if(a.icons){c("").addClass("ui-icon "+a.icons.header).prependTo(this.headers);this.active.children(".ui-icon").toggleClass(a.icons.header).toggleClass(a.icons.headerSelected);this.element.addClass("ui-accordion-icons")}},_destroyIcons:function(){this.headers.children(".ui-icon").remove();this.element.removeClass("ui-accordion-icons")},destroy:function(){var a=this.options;this.element.removeClass("ui-accordion ui-widget ui-helper-reset").removeAttr("role");this.headers.unbind(".accordion").removeClass("ui-accordion-header ui-accordion-disabled ui-helper-reset ui-state-default ui-corner-all ui-state-active ui-state-disabled ui-corner-top").removeAttr("role").removeAttr("aria-expanded").removeAttr("aria-selected").removeAttr("tabIndex"); +this.headers.find("a").removeAttr("tabIndex");this._destroyIcons();var b=this.headers.next().css("display","").removeAttr("role").removeClass("ui-helper-reset ui-widget-content ui-corner-bottom ui-accordion-content ui-accordion-content-active ui-accordion-disabled ui-state-disabled");if(a.autoHeight||a.fillHeight)b.css("height","");return c.Widget.prototype.destroy.call(this)},_setOption:function(a,b){c.Widget.prototype._setOption.apply(this,arguments);a=="active"&&this.activate(b);if(a=="icons"){this._destroyIcons(); +b&&this._createIcons()}if(a=="disabled")this.headers.add(this.headers.next())[b?"addClass":"removeClass"]("ui-accordion-disabled ui-state-disabled")},_keydown:function(a){if(!(this.options.disabled||a.altKey||a.ctrlKey)){var b=c.ui.keyCode,d=this.headers.length,h=this.headers.index(a.target),f=false;switch(a.keyCode){case b.RIGHT:case b.DOWN:f=this.headers[(h+1)%d];break;case b.LEFT:case b.UP:f=this.headers[(h-1+d)%d];break;case b.SPACE:case b.ENTER:this._clickHandler({target:a.target},a.target); +a.preventDefault()}if(f){c(a.target).attr("tabIndex",-1);c(f).attr("tabIndex",0);f.focus();return false}return true}},resize:function(){var a=this.options,b;if(a.fillSpace){if(c.browser.msie){var d=this.element.parent().css("overflow");this.element.parent().css("overflow","hidden")}b=this.element.parent().height();c.browser.msie&&this.element.parent().css("overflow",d);this.headers.each(function(){b-=c(this).outerHeight(true)});this.headers.next().each(function(){c(this).height(Math.max(0,b-c(this).innerHeight()+ +c(this).height()))}).css("overflow","auto")}else if(a.autoHeight){b=0;this.headers.next().each(function(){b=Math.max(b,c(this).height("").height())}).height(b)}return this},activate:function(a){this.options.active=a;a=this._findActive(a)[0];this._clickHandler({target:a},a);return this},_findActive:function(a){return a?typeof a==="number"?this.headers.filter(":eq("+a+")"):this.headers.not(this.headers.not(a)):a===false?c([]):this.headers.filter(":eq(0)")},_clickHandler:function(a,b){var d=this.options; +if(!d.disabled)if(a.target){a=c(a.currentTarget||b);b=a[0]===this.active[0];d.active=d.collapsible&&b?false:this.headers.index(a);if(!(this.running||!d.collapsible&&b)){var h=this.active;j=a.next();g=this.active.next();e={options:d,newHeader:b&&d.collapsible?c([]):a,oldHeader:this.active,newContent:b&&d.collapsible?c([]):j,oldContent:g};var f=this.headers.index(this.active[0])>this.headers.index(a[0]);this.active=b?c([]):a;this._toggle(j,g,e,b,f);h.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header); +if(!b){a.removeClass("ui-state-default ui-corner-all").addClass("ui-state-active ui-corner-top").children(".ui-icon").removeClass(d.icons.header).addClass(d.icons.headerSelected);a.next().addClass("ui-accordion-content-active")}}}else if(d.collapsible){this.active.removeClass("ui-state-active ui-corner-top").addClass("ui-state-default ui-corner-all").children(".ui-icon").removeClass(d.icons.headerSelected).addClass(d.icons.header);this.active.next().addClass("ui-accordion-content-active");var g=this.active.next(), +e={options:d,newHeader:c([]),oldHeader:d.active,newContent:c([]),oldContent:g},j=this.active=c([]);this._toggle(j,g,e)}},_toggle:function(a,b,d,h,f){var g=this,e=g.options;g.toShow=a;g.toHide=b;g.data=d;var j=function(){if(g)return g._completed.apply(g,arguments)};g._trigger("changestart",null,g.data);g.running=b.size()===0?a.size():b.size();if(e.animated){d={};d=e.collapsible&&h?{toShow:c([]),toHide:b,complete:j,down:f,autoHeight:e.autoHeight||e.fillSpace}:{toShow:a,toHide:b,complete:j,down:f,autoHeight:e.autoHeight|| +e.fillSpace};if(!e.proxied)e.proxied=e.animated;if(!e.proxiedDuration)e.proxiedDuration=e.duration;e.animated=c.isFunction(e.proxied)?e.proxied(d):e.proxied;e.duration=c.isFunction(e.proxiedDuration)?e.proxiedDuration(d):e.proxiedDuration;h=c.ui.accordion.animations;var i=e.duration,k=e.animated;if(k&&!h[k]&&!c.easing[k])k="slide";h[k]||(h[k]=function(l){this.slide(l,{easing:k,duration:i||700})});h[k](d)}else{if(e.collapsible&&h)a.toggle();else{b.hide();a.show()}j(true)}b.prev().attr({"aria-expanded":"false", +"aria-selected":"false",tabIndex:-1}).blur();a.prev().attr({"aria-expanded":"true","aria-selected":"true",tabIndex:0}).focus()},_completed:function(a){this.running=a?0:--this.running;if(!this.running){this.options.clearStyle&&this.toShow.add(this.toHide).css({height:"",overflow:""});this.toHide.removeClass("ui-accordion-content-active");if(this.toHide.length)this.toHide.parent()[0].className=this.toHide.parent()[0].className;this._trigger("change",null,this.data)}}});c.extend(c.ui.accordion,{version:"1.8.16", +animations:{slide:function(a,b){a=c.extend({easing:"swing",duration:300},a,b);if(a.toHide.size())if(a.toShow.size()){var d=a.toShow.css("overflow"),h=0,f={},g={},e;b=a.toShow;e=b[0].style.width;b.width(parseInt(b.parent().width(),10)-parseInt(b.css("paddingLeft"),10)-parseInt(b.css("paddingRight"),10)-(parseInt(b.css("borderLeftWidth"),10)||0)-(parseInt(b.css("borderRightWidth"),10)||0));c.each(["height","paddingTop","paddingBottom"],function(j,i){g[i]="hide";j=(""+c.css(a.toShow[0],i)).match(/^([\d+-.]+)(.*)$/); +f[i]={value:j[1],unit:j[2]||"px"}});a.toShow.css({height:0,overflow:"hidden"}).show();a.toHide.filter(":hidden").each(a.complete).end().filter(":visible").animate(g,{step:function(j,i){if(i.prop=="height")h=i.end-i.start===0?0:(i.now-i.start)/(i.end-i.start);a.toShow[0].style[i.prop]=h*f[i.prop].value+f[i.prop].unit},duration:a.duration,easing:a.easing,complete:function(){a.autoHeight||a.toShow.css("height","");a.toShow.css({width:e,overflow:d});a.complete()}})}else a.toHide.animate({height:"hide", +paddingTop:"hide",paddingBottom:"hide"},a);else a.toShow.animate({height:"show",paddingTop:"show",paddingBottom:"show"},a)},bounceslide:function(a){this.slide(a,{easing:a.down?"easeOutBounce":"swing",duration:a.down?1E3:200})}}})})(jQuery); +;/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.position.js + */ +(function(d){var e=0;d.widget("ui.autocomplete",{options:{appendTo:"body",autoFocus:false,delay:300,minLength:1,position:{my:"left top",at:"left bottom",collision:"none"},source:null},pending:0,_create:function(){var a=this,b=this.element[0].ownerDocument,g;this.element.addClass("ui-autocomplete-input").attr("autocomplete","off").attr({role:"textbox","aria-autocomplete":"list","aria-haspopup":"true"}).bind("keydown.autocomplete",function(c){if(!(a.options.disabled||a.element.propAttr("readOnly"))){g= +false;var f=d.ui.keyCode;switch(c.keyCode){case f.PAGE_UP:a._move("previousPage",c);break;case f.PAGE_DOWN:a._move("nextPage",c);break;case f.UP:a._move("previous",c);c.preventDefault();break;case f.DOWN:a._move("next",c);c.preventDefault();break;case f.ENTER:case f.NUMPAD_ENTER:if(a.menu.active){g=true;c.preventDefault()}case f.TAB:if(!a.menu.active)return;a.menu.select(c);break;case f.ESCAPE:a.element.val(a.term);a.close(c);break;default:clearTimeout(a.searching);a.searching=setTimeout(function(){if(a.term!= +a.element.val()){a.selectedItem=null;a.search(null,c)}},a.options.delay);break}}}).bind("keypress.autocomplete",function(c){if(g){g=false;c.preventDefault()}}).bind("focus.autocomplete",function(){if(!a.options.disabled){a.selectedItem=null;a.previous=a.element.val()}}).bind("blur.autocomplete",function(c){if(!a.options.disabled){clearTimeout(a.searching);a.closing=setTimeout(function(){a.close(c);a._change(c)},150)}});this._initSource();this.response=function(){return a._response.apply(a,arguments)}; +this.menu=d("
          ").addClass("ui-autocomplete").appendTo(d(this.options.appendTo||"body",b)[0]).mousedown(function(c){var f=a.menu.element[0];d(c.target).closest(".ui-menu-item").length||setTimeout(function(){d(document).one("mousedown",function(h){h.target!==a.element[0]&&h.target!==f&&!d.ui.contains(f,h.target)&&a.close()})},1);setTimeout(function(){clearTimeout(a.closing)},13)}).menu({focus:function(c,f){f=f.item.data("item.autocomplete");false!==a._trigger("focus",c,{item:f})&&/^key/.test(c.originalEvent.type)&& +a.element.val(f.value)},selected:function(c,f){var h=f.item.data("item.autocomplete"),i=a.previous;if(a.element[0]!==b.activeElement){a.element.focus();a.previous=i;setTimeout(function(){a.previous=i;a.selectedItem=h},1)}false!==a._trigger("select",c,{item:h})&&a.element.val(h.value);a.term=a.element.val();a.close(c);a.selectedItem=h},blur:function(){a.menu.element.is(":visible")&&a.element.val()!==a.term&&a.element.val(a.term)}}).zIndex(this.element.zIndex()+1).css({top:0,left:0}).hide().data("menu"); +d.fn.bgiframe&&this.menu.element.bgiframe()},destroy:function(){this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");this.menu.element.remove();d.Widget.prototype.destroy.call(this)},_setOption:function(a,b){d.Widget.prototype._setOption.apply(this,arguments);a==="source"&&this._initSource();if(a==="appendTo")this.menu.element.appendTo(d(b||"body",this.element[0].ownerDocument)[0]);a==="disabled"&& +b&&this.xhr&&this.xhr.abort()},_initSource:function(){var a=this,b,g;if(d.isArray(this.options.source)){b=this.options.source;this.source=function(c,f){f(d.ui.autocomplete.filter(b,c.term))}}else if(typeof this.options.source==="string"){g=this.options.source;this.source=function(c,f){a.xhr&&a.xhr.abort();a.xhr=d.ajax({url:g,data:c,dataType:"json",autocompleteRequest:++e,success:function(h){this.autocompleteRequest===e&&f(h)},error:function(){this.autocompleteRequest===e&&f([])}})}}else this.source= +this.options.source},search:function(a,b){a=a!=null?a:this.element.val();this.term=this.element.val();if(a.length").data("item.autocomplete",b).append(d("").text(b.label)).appendTo(a)},_move:function(a,b){if(this.menu.element.is(":visible"))if(this.menu.first()&&/^previous/.test(a)||this.menu.last()&&/^next/.test(a)){this.element.val(this.term);this.menu.deactivate()}else this.menu[a](b);else this.search(null,b)},widget:function(){return this.menu.element}});d.extend(d.ui.autocomplete,{escapeRegex:function(a){return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, +"\\$&")},filter:function(a,b){var g=new RegExp(d.ui.autocomplete.escapeRegex(b),"i");return d.grep(a,function(c){return g.test(c.label||c.value||c)})}})})(jQuery); +(function(d){d.widget("ui.menu",{_create:function(){var e=this;this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({role:"listbox","aria-activedescendant":"ui-active-menuitem"}).click(function(a){if(d(a.target).closest(".ui-menu-item a").length){a.preventDefault();e.select(a)}});this.refresh()},refresh:function(){var e=this;this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role","menuitem").children("a").addClass("ui-corner-all").attr("tabindex", +-1).mouseenter(function(a){e.activate(a,d(this).parent())}).mouseleave(function(){e.deactivate()})},activate:function(e,a){this.deactivate();if(this.hasScroll()){var b=a.offset().top-this.element.offset().top,g=this.element.scrollTop(),c=this.element.height();if(b<0)this.element.scrollTop(g+b);else b>=c&&this.element.scrollTop(g+b-c+a.height())}this.active=a.eq(0).children("a").addClass("ui-state-hover").attr("id","ui-active-menuitem").end();this._trigger("focus",e,{item:a})},deactivate:function(){if(this.active){this.active.children("a").removeClass("ui-state-hover").removeAttr("id"); +this._trigger("blur");this.active=null}},next:function(e){this.move("next",".ui-menu-item:first",e)},previous:function(e){this.move("prev",".ui-menu-item:last",e)},first:function(){return this.active&&!this.active.prevAll(".ui-menu-item").length},last:function(){return this.active&&!this.active.nextAll(".ui-menu-item").length},move:function(e,a,b){if(this.active){e=this.active[e+"All"](".ui-menu-item").eq(0);e.length?this.activate(b,e):this.activate(b,this.element.children(a))}else this.activate(b, +this.element.children(a))},nextPage:function(e){if(this.hasScroll())if(!this.active||this.last())this.activate(e,this.element.children(".ui-menu-item:first"));else{var a=this.active.offset().top,b=this.element.height(),g=this.element.children(".ui-menu-item").filter(function(){var c=d(this).offset().top-a-b+d(this).height();return c<10&&c>-10});g.length||(g=this.element.children(".ui-menu-item:last"));this.activate(e,g)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.last()?":first":":last"))},previousPage:function(e){if(this.hasScroll())if(!this.active||this.first())this.activate(e,this.element.children(".ui-menu-item:last"));else{var a=this.active.offset().top,b=this.element.height();result=this.element.children(".ui-menu-item").filter(function(){var g=d(this).offset().top-a+b-d(this).height();return g<10&&g>-10});result.length||(result=this.element.children(".ui-menu-item:first"));this.activate(e,result)}else this.activate(e,this.element.children(".ui-menu-item").filter(!this.active|| +this.first()?":last":":first"))},hasScroll:function(){return this.element.height()").addClass("ui-button-text").html(this.options.label).appendTo(a.empty()).text(),e=this.options.icons,f=e.primary&&e.secondary,d=[];if(e.primary||e.secondary){if(this.options.text)d.push("ui-button-text-icon"+(f?"s":e.primary?"-primary":"-secondary"));e.primary&&a.prepend("");e.secondary&&a.append("");if(!this.options.text){d.push(f?"ui-button-icons-only": +"ui-button-icon-only");this.hasTitle||a.attr("title",c)}}else d.push("ui-button-text-only");a.addClass(d.join(" "))}}});b.widget("ui.buttonset",{options:{items:":button, :submit, :reset, :checkbox, :radio, a, :data(button)"},_create:function(){this.element.addClass("ui-buttonset")},_init:function(){this.refresh()},_setOption:function(a,c){a==="disabled"&&this.buttons.button("option",a,c);b.Widget.prototype._setOption.apply(this,arguments)},refresh:function(){var a=this.element.css("direction")=== +"ltr";this.buttons=this.element.find(this.options.items).filter(":ui-button").button("refresh").end().not(":ui-button").button().end().map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-all ui-corner-left ui-corner-right").filter(":first").addClass(a?"ui-corner-left":"ui-corner-right").end().filter(":last").addClass(a?"ui-corner-right":"ui-corner-left").end().end()},destroy:function(){this.element.removeClass("ui-buttonset");this.buttons.map(function(){return b(this).button("widget")[0]}).removeClass("ui-corner-left ui-corner-right").end().button("destroy"); +b.Widget.prototype.destroy.call(this)}})})(jQuery); +;/* + * jQuery UI Dialog 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Dialog + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + * jquery.ui.button.js + * jquery.ui.draggable.js + * jquery.ui.mouse.js + * jquery.ui.position.js + * jquery.ui.resizable.js + */ +(function(c,l){var m={buttons:true,height:true,maxHeight:true,maxWidth:true,minHeight:true,minWidth:true,width:true},n={maxHeight:true,maxWidth:true,minHeight:true,minWidth:true},o=c.attrFn||{val:true,css:true,html:true,text:true,data:true,width:true,height:true,offset:true,click:true};c.widget("ui.dialog",{options:{autoOpen:true,buttons:{},closeOnEscape:true,closeText:"close",dialogClass:"",draggable:true,hide:null,height:"auto",maxHeight:false,maxWidth:false,minHeight:150,minWidth:150,modal:false, +position:{my:"center",at:"center",collision:"fit",using:function(a){var b=c(this).css(a).offset().top;b<0&&c(this).css("top",a.top-b)}},resizable:true,show:null,stack:true,title:"",width:300,zIndex:1E3},_create:function(){this.originalTitle=this.element.attr("title");if(typeof this.originalTitle!=="string")this.originalTitle="";this.options.title=this.options.title||this.originalTitle;var a=this,b=a.options,d=b.title||" ",e=c.ui.dialog.getTitleId(a.element),g=(a.uiDialog=c("
          ")).appendTo(document.body).hide().addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+ +b.dialogClass).css({zIndex:b.zIndex}).attr("tabIndex",-1).css("outline",0).keydown(function(i){if(b.closeOnEscape&&!i.isDefaultPrevented()&&i.keyCode&&i.keyCode===c.ui.keyCode.ESCAPE){a.close(i);i.preventDefault()}}).attr({role:"dialog","aria-labelledby":e}).mousedown(function(i){a.moveToTop(false,i)});a.element.show().removeAttr("title").addClass("ui-dialog-content ui-widget-content").appendTo(g);var f=(a.uiDialogTitlebar=c("
          ")).addClass("ui-dialog-titlebar ui-widget-header ui-corner-all ui-helper-clearfix").prependTo(g), +h=c('').addClass("ui-dialog-titlebar-close ui-corner-all").attr("role","button").hover(function(){h.addClass("ui-state-hover")},function(){h.removeClass("ui-state-hover")}).focus(function(){h.addClass("ui-state-focus")}).blur(function(){h.removeClass("ui-state-focus")}).click(function(i){a.close(i);return false}).appendTo(f);(a.uiDialogTitlebarCloseText=c("")).addClass("ui-icon ui-icon-closethick").text(b.closeText).appendTo(h);c("").addClass("ui-dialog-title").attr("id", +e).html(d).prependTo(f);if(c.isFunction(b.beforeclose)&&!c.isFunction(b.beforeClose))b.beforeClose=b.beforeclose;f.find("*").add(f).disableSelection();b.draggable&&c.fn.draggable&&a._makeDraggable();b.resizable&&c.fn.resizable&&a._makeResizable();a._createButtons(b.buttons);a._isOpen=false;c.fn.bgiframe&&g.bgiframe()},_init:function(){this.options.autoOpen&&this.open()},destroy:function(){var a=this;a.overlay&&a.overlay.destroy();a.uiDialog.hide();a.element.unbind(".dialog").removeData("dialog").removeClass("ui-dialog-content ui-widget-content").hide().appendTo("body"); +a.uiDialog.remove();a.originalTitle&&a.element.attr("title",a.originalTitle);return a},widget:function(){return this.uiDialog},close:function(a){var b=this,d,e;if(false!==b._trigger("beforeClose",a)){b.overlay&&b.overlay.destroy();b.uiDialog.unbind("keypress.ui-dialog");b._isOpen=false;if(b.options.hide)b.uiDialog.hide(b.options.hide,function(){b._trigger("close",a)});else{b.uiDialog.hide();b._trigger("close",a)}c.ui.dialog.overlay.resize();if(b.options.modal){d=0;c(".ui-dialog").each(function(){if(this!== +b.uiDialog[0]){e=c(this).css("z-index");isNaN(e)||(d=Math.max(d,e))}});c.ui.dialog.maxZ=d}return b}},isOpen:function(){return this._isOpen},moveToTop:function(a,b){var d=this,e=d.options;if(e.modal&&!a||!e.stack&&!e.modal)return d._trigger("focus",b);if(e.zIndex>c.ui.dialog.maxZ)c.ui.dialog.maxZ=e.zIndex;if(d.overlay){c.ui.dialog.maxZ+=1;d.overlay.$el.css("z-index",c.ui.dialog.overlay.maxZ=c.ui.dialog.maxZ)}a={scrollTop:d.element.scrollTop(),scrollLeft:d.element.scrollLeft()};c.ui.dialog.maxZ+=1; +d.uiDialog.css("z-index",c.ui.dialog.maxZ);d.element.attr(a);d._trigger("focus",b);return d},open:function(){if(!this._isOpen){var a=this,b=a.options,d=a.uiDialog;a.overlay=b.modal?new c.ui.dialog.overlay(a):null;a._size();a._position(b.position);d.show(b.show);a.moveToTop(true);b.modal&&d.bind("keypress.ui-dialog",function(e){if(e.keyCode===c.ui.keyCode.TAB){var g=c(":tabbable",this),f=g.filter(":first");g=g.filter(":last");if(e.target===g[0]&&!e.shiftKey){f.focus(1);return false}else if(e.target=== +f[0]&&e.shiftKey){g.focus(1);return false}}});c(a.element.find(":tabbable").get().concat(d.find(".ui-dialog-buttonpane :tabbable").get().concat(d.get()))).eq(0).focus();a._isOpen=true;a._trigger("open");return a}},_createButtons:function(a){var b=this,d=false,e=c("
          ").addClass("ui-dialog-buttonpane ui-widget-content ui-helper-clearfix"),g=c("
          ").addClass("ui-dialog-buttonset").appendTo(e);b.uiDialog.find(".ui-dialog-buttonpane").remove();typeof a==="object"&&a!==null&&c.each(a, +function(){return!(d=true)});if(d){c.each(a,function(f,h){h=c.isFunction(h)?{click:h,text:f}:h;var i=c('').click(function(){h.click.apply(b.element[0],arguments)}).appendTo(g);c.each(h,function(j,k){if(j!=="click")j in o?i[j](k):i.attr(j,k)});c.fn.button&&i.button()});e.appendTo(b.uiDialog)}},_makeDraggable:function(){function a(f){return{position:f.position,offset:f.offset}}var b=this,d=b.options,e=c(document),g;b.uiDialog.draggable({cancel:".ui-dialog-content, .ui-dialog-titlebar-close", +handle:".ui-dialog-titlebar",containment:"document",start:function(f,h){g=d.height==="auto"?"auto":c(this).height();c(this).height(c(this).height()).addClass("ui-dialog-dragging");b._trigger("dragStart",f,a(h))},drag:function(f,h){b._trigger("drag",f,a(h))},stop:function(f,h){d.position=[h.position.left-e.scrollLeft(),h.position.top-e.scrollTop()];c(this).removeClass("ui-dialog-dragging").height(g);b._trigger("dragStop",f,a(h));c.ui.dialog.overlay.resize()}})},_makeResizable:function(a){function b(f){return{originalPosition:f.originalPosition, +originalSize:f.originalSize,position:f.position,size:f.size}}a=a===l?this.options.resizable:a;var d=this,e=d.options,g=d.uiDialog.css("position");a=typeof a==="string"?a:"n,e,s,w,se,sw,ne,nw";d.uiDialog.resizable({cancel:".ui-dialog-content",containment:"document",alsoResize:d.element,maxWidth:e.maxWidth,maxHeight:e.maxHeight,minWidth:e.minWidth,minHeight:d._minHeight(),handles:a,start:function(f,h){c(this).addClass("ui-dialog-resizing");d._trigger("resizeStart",f,b(h))},resize:function(f,h){d._trigger("resize", +f,b(h))},stop:function(f,h){c(this).removeClass("ui-dialog-resizing");e.height=c(this).height();e.width=c(this).width();d._trigger("resizeStop",f,b(h));c.ui.dialog.overlay.resize()}}).css("position",g).find(".ui-resizable-se").addClass("ui-icon ui-icon-grip-diagonal-se")},_minHeight:function(){var a=this.options;return a.height==="auto"?a.minHeight:Math.min(a.minHeight,a.height)},_position:function(a){var b=[],d=[0,0],e;if(a){if(typeof a==="string"||typeof a==="object"&&"0"in a){b=a.split?a.split(" "): +[a[0],a[1]];if(b.length===1)b[1]=b[0];c.each(["left","top"],function(g,f){if(+b[g]===b[g]){d[g]=b[g];b[g]=f}});a={my:b.join(" "),at:b.join(" "),offset:d.join(" ")}}a=c.extend({},c.ui.dialog.prototype.options.position,a)}else a=c.ui.dialog.prototype.options.position;(e=this.uiDialog.is(":visible"))||this.uiDialog.show();this.uiDialog.css({top:0,left:0}).position(c.extend({of:window},a));e||this.uiDialog.hide()},_setOptions:function(a){var b=this,d={},e=false;c.each(a,function(g,f){b._setOption(g,f); +if(g in m)e=true;if(g in n)d[g]=f});e&&this._size();this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option",d)},_setOption:function(a,b){var d=this,e=d.uiDialog;switch(a){case "beforeclose":a="beforeClose";break;case "buttons":d._createButtons(b);break;case "closeText":d.uiDialogTitlebarCloseText.text(""+b);break;case "dialogClass":e.removeClass(d.options.dialogClass).addClass("ui-dialog ui-widget ui-widget-content ui-corner-all "+b);break;case "disabled":b?e.addClass("ui-dialog-disabled"): +e.removeClass("ui-dialog-disabled");break;case "draggable":var g=e.is(":data(draggable)");g&&!b&&e.draggable("destroy");!g&&b&&d._makeDraggable();break;case "position":d._position(b);break;case "resizable":(g=e.is(":data(resizable)"))&&!b&&e.resizable("destroy");g&&typeof b==="string"&&e.resizable("option","handles",b);!g&&b!==false&&d._makeResizable(b);break;case "title":c(".ui-dialog-title",d.uiDialogTitlebar).html(""+(b||" "));break}c.Widget.prototype._setOption.apply(d,arguments)},_size:function(){var a= +this.options,b,d,e=this.uiDialog.is(":visible");this.element.show().css({width:"auto",minHeight:0,height:0});if(a.minWidth>a.width)a.width=a.minWidth;b=this.uiDialog.css({height:"auto",width:a.width}).height();d=Math.max(0,a.minHeight-b);if(a.height==="auto")if(c.support.minHeight)this.element.css({minHeight:d,height:"auto"});else{this.uiDialog.show();a=this.element.css("height","auto").height();e||this.uiDialog.hide();this.element.height(Math.max(a,d))}else this.element.height(Math.max(a.height- +b,0));this.uiDialog.is(":data(resizable)")&&this.uiDialog.resizable("option","minHeight",this._minHeight())}});c.extend(c.ui.dialog,{version:"1.8.16",uuid:0,maxZ:0,getTitleId:function(a){a=a.attr("id");if(!a){this.uuid+=1;a=this.uuid}return"ui-dialog-title-"+a},overlay:function(a){this.$el=c.ui.dialog.overlay.create(a)}});c.extend(c.ui.dialog.overlay,{instances:[],oldInstances:[],maxZ:0,events:c.map("focus,mousedown,mouseup,keydown,keypress,click".split(","),function(a){return a+".dialog-overlay"}).join(" "), +create:function(a){if(this.instances.length===0){setTimeout(function(){c.ui.dialog.overlay.instances.length&&c(document).bind(c.ui.dialog.overlay.events,function(d){if(c(d.target).zIndex()").addClass("ui-widget-overlay")).appendTo(document.body).css({width:this.width(),height:this.height()});c.fn.bgiframe&&b.bgiframe();this.instances.push(b);return b},destroy:function(a){var b=c.inArray(a,this.instances);b!=-1&&this.oldInstances.push(this.instances.splice(b,1)[0]);this.instances.length===0&&c([document,window]).unbind(".dialog-overlay");a.remove();var d=0;c.each(this.instances,function(){d=Math.max(d,this.css("z-index"))});this.maxZ=d},height:function(){var a,b;if(c.browser.msie&& +c.browser.version<7){a=Math.max(document.documentElement.scrollHeight,document.body.scrollHeight);b=Math.max(document.documentElement.offsetHeight,document.body.offsetHeight);return a").appendTo(this.element).addClass("ui-slider-range ui-widget-header"+(b.range==="min"||b.range==="max"?" ui-slider-range-"+b.range:""))}for(var j=c.length;j"); +this.handles=c.add(d(e.join("")).appendTo(a.element));this.handle=this.handles.eq(0);this.handles.add(this.range).filter("a").click(function(g){g.preventDefault()}).hover(function(){b.disabled||d(this).addClass("ui-state-hover")},function(){d(this).removeClass("ui-state-hover")}).focus(function(){if(b.disabled)d(this).blur();else{d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");d(this).addClass("ui-state-focus")}}).blur(function(){d(this).removeClass("ui-state-focus")});this.handles.each(function(g){d(this).data("index.ui-slider-handle", +g)});this.handles.keydown(function(g){var k=true,l=d(this).data("index.ui-slider-handle"),i,h,m;if(!a.options.disabled){switch(g.keyCode){case d.ui.keyCode.HOME:case d.ui.keyCode.END:case d.ui.keyCode.PAGE_UP:case d.ui.keyCode.PAGE_DOWN:case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:k=false;if(!a._keySliding){a._keySliding=true;d(this).addClass("ui-state-active");i=a._start(g,l);if(i===false)return}break}m=a.options.step;i=a.options.values&&a.options.values.length? +(h=a.values(l)):(h=a.value());switch(g.keyCode){case d.ui.keyCode.HOME:h=a._valueMin();break;case d.ui.keyCode.END:h=a._valueMax();break;case d.ui.keyCode.PAGE_UP:h=a._trimAlignValue(i+(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.PAGE_DOWN:h=a._trimAlignValue(i-(a._valueMax()-a._valueMin())/5);break;case d.ui.keyCode.UP:case d.ui.keyCode.RIGHT:if(i===a._valueMax())return;h=a._trimAlignValue(i+m);break;case d.ui.keyCode.DOWN:case d.ui.keyCode.LEFT:if(i===a._valueMin())return;h=a._trimAlignValue(i- +m);break}a._slide(g,l,h);return k}}).keyup(function(g){var k=d(this).data("index.ui-slider-handle");if(a._keySliding){a._keySliding=false;a._stop(g,k);a._change(g,k);d(this).removeClass("ui-state-active")}});this._refreshValue();this._animateOff=false},destroy:function(){this.handles.remove();this.range.remove();this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");this._mouseDestroy(); +return this},_mouseCapture:function(a){var b=this.options,c,f,e,j,g;if(b.disabled)return false;this.elementSize={width:this.element.outerWidth(),height:this.element.outerHeight()};this.elementOffset=this.element.offset();c=this._normValueFromMouse({x:a.pageX,y:a.pageY});f=this._valueMax()-this._valueMin()+1;j=this;this.handles.each(function(k){var l=Math.abs(c-j.values(k));if(f>l){f=l;e=d(this);g=k}});if(b.range===true&&this.values(1)===b.min){g+=1;e=d(this.handles[g])}if(this._start(a,g)===false)return false; +this._mouseSliding=true;j._handleIndex=g;e.addClass("ui-state-active").focus();b=e.offset();this._clickOffset=!d(a.target).parents().andSelf().is(".ui-slider-handle")?{left:0,top:0}:{left:a.pageX-b.left-e.width()/2,top:a.pageY-b.top-e.height()/2-(parseInt(e.css("borderTopWidth"),10)||0)-(parseInt(e.css("borderBottomWidth"),10)||0)+(parseInt(e.css("marginTop"),10)||0)};this.handles.hasClass("ui-state-hover")||this._slide(a,g,c);return this._animateOff=true},_mouseStart:function(){return true},_mouseDrag:function(a){var b= +this._normValueFromMouse({x:a.pageX,y:a.pageY});this._slide(a,this._handleIndex,b);return false},_mouseStop:function(a){this.handles.removeClass("ui-state-active");this._mouseSliding=false;this._stop(a,this._handleIndex);this._change(a,this._handleIndex);this._clickOffset=this._handleIndex=null;return this._animateOff=false},_detectOrientation:function(){this.orientation=this.options.orientation==="vertical"?"vertical":"horizontal"},_normValueFromMouse:function(a){var b;if(this.orientation==="horizontal"){b= +this.elementSize.width;a=a.x-this.elementOffset.left-(this._clickOffset?this._clickOffset.left:0)}else{b=this.elementSize.height;a=a.y-this.elementOffset.top-(this._clickOffset?this._clickOffset.top:0)}b=a/b;if(b>1)b=1;if(b<0)b=0;if(this.orientation==="vertical")b=1-b;a=this._valueMax()-this._valueMin();return this._trimAlignValue(this._valueMin()+b*a)},_start:function(a,b){var c={handle:this.handles[b],value:this.value()};if(this.options.values&&this.options.values.length){c.value=this.values(b); +c.values=this.values()}return this._trigger("start",a,c)},_slide:function(a,b,c){var f;if(this.options.values&&this.options.values.length){f=this.values(b?0:1);if(this.options.values.length===2&&this.options.range===true&&(b===0&&c>f||b===1&&c1){this.options.values[a]=this._trimAlignValue(b);this._refreshValue();this._change(null,a)}else if(arguments.length)if(d.isArray(arguments[0])){c=this.options.values;f=arguments[0];for(e=0;e=this._valueMax())return this._valueMax();var b=this.options.step>0?this.options.step:1,c=(a-this._valueMin())%b;a=a-c;if(Math.abs(c)*2>=b)a+=c>0?b:-b;return parseFloat(a.toFixed(5))},_valueMin:function(){return this.options.min},_valueMax:function(){return this.options.max},_refreshValue:function(){var a= +this.options.range,b=this.options,c=this,f=!this._animateOff?b.animate:false,e,j={},g,k,l,i;if(this.options.values&&this.options.values.length)this.handles.each(function(h){e=(c.values(h)-c._valueMin())/(c._valueMax()-c._valueMin())*100;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";d(this).stop(1,1)[f?"animate":"css"](j,b.animate);if(c.options.range===true)if(c.orientation==="horizontal"){if(h===0)c.range.stop(1,1)[f?"animate":"css"]({left:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({width:e- +g+"%"},{queue:false,duration:b.animate})}else{if(h===0)c.range.stop(1,1)[f?"animate":"css"]({bottom:e+"%"},b.animate);if(h===1)c.range[f?"animate":"css"]({height:e-g+"%"},{queue:false,duration:b.animate})}g=e});else{k=this.value();l=this._valueMin();i=this._valueMax();e=i!==l?(k-l)/(i-l)*100:0;j[c.orientation==="horizontal"?"left":"bottom"]=e+"%";this.handle.stop(1,1)[f?"animate":"css"](j,b.animate);if(a==="min"&&this.orientation==="horizontal")this.range.stop(1,1)[f?"animate":"css"]({width:e+"%"}, +b.animate);if(a==="max"&&this.orientation==="horizontal")this.range[f?"animate":"css"]({width:100-e+"%"},{queue:false,duration:b.animate});if(a==="min"&&this.orientation==="vertical")this.range.stop(1,1)[f?"animate":"css"]({height:e+"%"},b.animate);if(a==="max"&&this.orientation==="vertical")this.range[f?"animate":"css"]({height:100-e+"%"},{queue:false,duration:b.animate})}}});d.extend(d.ui.slider,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Tabs 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Tabs + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(d,p){function u(){return++v}function w(){return++x}var v=0,x=0;d.widget("ui.tabs",{options:{add:null,ajaxOptions:null,cache:false,cookie:null,collapsible:false,disable:null,disabled:[],enable:null,event:"click",fx:null,idPrefix:"ui-tabs-",load:null,panelTemplate:"
          ",remove:null,select:null,show:null,spinner:"Loading…",tabTemplate:"
        • #{label}
        • "},_create:function(){this._tabify(true)},_setOption:function(b,e){if(b=="selected")this.options.collapsible&& +e==this.options.selected||this.select(e);else{this.options[b]=e;this._tabify()}},_tabId:function(b){return b.title&&b.title.replace(/\s/g,"_").replace(/[^\w\u00c0-\uFFFF-]/g,"")||this.options.idPrefix+u()},_sanitizeSelector:function(b){return b.replace(/:/g,"\\:")},_cookie:function(){var b=this.cookie||(this.cookie=this.options.cookie.name||"ui-tabs-"+w());return d.cookie.apply(null,[b].concat(d.makeArray(arguments)))},_ui:function(b,e){return{tab:b,panel:e,index:this.anchors.index(b)}},_cleanup:function(){this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function(){var b= +d(this);b.html(b.data("label.tabs")).removeData("label.tabs")})},_tabify:function(b){function e(g,f){g.css("display","");!d.support.opacity&&f.opacity&&g[0].style.removeAttribute("filter")}var a=this,c=this.options,h=/^#.+/;this.list=this.element.find("ol,ul").eq(0);this.lis=d(" > li:has(a[href])",this.list);this.anchors=this.lis.map(function(){return d("a",this)[0]});this.panels=d([]);this.anchors.each(function(g,f){var i=d(f).attr("href"),l=i.split("#")[0],q;if(l&&(l===location.toString().split("#")[0]|| +(q=d("base")[0])&&l===q.href)){i=f.hash;f.href=i}if(h.test(i))a.panels=a.panels.add(a.element.find(a._sanitizeSelector(i)));else if(i&&i!=="#"){d.data(f,"href.tabs",i);d.data(f,"load.tabs",i.replace(/#.*$/,""));i=a._tabId(f);f.href="#"+i;f=a.element.find("#"+i);if(!f.length){f=d(c.panelTemplate).attr("id",i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g-1]||a.list);f.data("destroy.tabs",true)}a.panels=a.panels.add(f)}else c.disabled.push(g)});if(b){this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all"); +this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.lis.addClass("ui-state-default ui-corner-top");this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");if(c.selected===p){location.hash&&this.anchors.each(function(g,f){if(f.hash==location.hash){c.selected=g;return false}});if(typeof c.selected!=="number"&&c.cookie)c.selected=parseInt(a._cookie(),10);if(typeof c.selected!=="number"&&this.lis.filter(".ui-tabs-selected").length)c.selected= +this.lis.index(this.lis.filter(".ui-tabs-selected"));c.selected=c.selected||(this.lis.length?0:-1)}else if(c.selected===null)c.selected=-1;c.selected=c.selected>=0&&this.anchors[c.selected]||c.selected<0?c.selected:0;c.disabled=d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"),function(g){return a.lis.index(g)}))).sort();d.inArray(c.selected,c.disabled)!=-1&&c.disabled.splice(d.inArray(c.selected,c.disabled),1);this.panels.addClass("ui-tabs-hide");this.lis.removeClass("ui-tabs-selected ui-state-active"); +if(c.selected>=0&&this.anchors.length){a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");a.element.queue("tabs",function(){a._trigger("show",null,a._ui(a.anchors[c.selected],a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))});this.load(c.selected)}d(window).bind("unload",function(){a.lis.add(a.anchors).unbind(".tabs");a.lis=a.anchors=a.panels=null})}else c.selected=this.lis.index(this.lis.filter(".ui-tabs-selected")); +this.element[c.collapsible?"addClass":"removeClass"]("ui-tabs-collapsible");c.cookie&&this._cookie(c.selected,c.cookie);b=0;for(var j;j=this.lis[b];b++)d(j)[d.inArray(b,c.disabled)!=-1&&!d(j).hasClass("ui-tabs-selected")?"addClass":"removeClass"]("ui-state-disabled");c.cache===false&&this.anchors.removeData("cache.tabs");this.lis.add(this.anchors).unbind(".tabs");if(c.event!=="mouseover"){var k=function(g,f){f.is(":not(.ui-state-disabled)")&&f.addClass("ui-state-"+g)},n=function(g,f){f.removeClass("ui-state-"+ +g)};this.lis.bind("mouseover.tabs",function(){k("hover",d(this))});this.lis.bind("mouseout.tabs",function(){n("hover",d(this))});this.anchors.bind("focus.tabs",function(){k("focus",d(this).closest("li"))});this.anchors.bind("blur.tabs",function(){n("focus",d(this).closest("li"))})}var m,o;if(c.fx)if(d.isArray(c.fx)){m=c.fx[0];o=c.fx[1]}else m=o=c.fx;var r=o?function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.hide().removeClass("ui-tabs-hide").animate(o,o.duration||"normal", +function(){e(f,o);a._trigger("show",null,a._ui(g,f[0]))})}:function(g,f){d(g).closest("li").addClass("ui-tabs-selected ui-state-active");f.removeClass("ui-tabs-hide");a._trigger("show",null,a._ui(g,f[0]))},s=m?function(g,f){f.animate(m,m.duration||"normal",function(){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");e(f,m);a.element.dequeue("tabs")})}:function(g,f){a.lis.removeClass("ui-tabs-selected ui-state-active");f.addClass("ui-tabs-hide");a.element.dequeue("tabs")}; +this.anchors.bind(c.event+".tabs",function(){var g=this,f=d(g).closest("li"),i=a.panels.filter(":not(.ui-tabs-hide)"),l=a.element.find(a._sanitizeSelector(g.hash));if(f.hasClass("ui-tabs-selected")&&!c.collapsible||f.hasClass("ui-state-disabled")||f.hasClass("ui-state-processing")||a.panels.filter(":animated").length||a._trigger("select",null,a._ui(this,l[0]))===false){this.blur();return false}c.selected=a.anchors.index(this);a.abort();if(c.collapsible)if(f.hasClass("ui-tabs-selected")){c.selected= +-1;c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){s(g,i)}).dequeue("tabs");this.blur();return false}else if(!i.length){c.cookie&&a._cookie(c.selected,c.cookie);a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this));this.blur();return false}c.cookie&&a._cookie(c.selected,c.cookie);if(l.length){i.length&&a.element.queue("tabs",function(){s(g,i)});a.element.queue("tabs",function(){r(g,l)});a.load(a.anchors.index(this))}else throw"jQuery UI Tabs: Mismatching fragment identifier."; +d.browser.msie&&this.blur()});this.anchors.bind("click.tabs",function(){return false})},_getIndex:function(b){if(typeof b=="string")b=this.anchors.index(this.anchors.filter("[href$="+b+"]"));return b},destroy:function(){var b=this.options;this.abort();this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");this.anchors.each(function(){var e= +d.data(this,"href.tabs");if(e)this.href=e;var a=d(this).unbind(".tabs");d.each(["href","load","cache"],function(c,h){a.removeData(h+".tabs")})});this.lis.unbind(".tabs").add(this.panels).each(function(){d.data(this,"destroy.tabs")?d(this).remove():d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")});b.cookie&&this._cookie(null,b.cookie);return this},add:function(b, +e,a){if(a===p)a=this.anchors.length;var c=this,h=this.options;e=d(h.tabTemplate.replace(/#\{href\}/g,b).replace(/#\{label\}/g,e));b=!b.indexOf("#")?b.replace("#",""):this._tabId(d("a",e)[0]);e.addClass("ui-state-default ui-corner-top").data("destroy.tabs",true);var j=c.element.find("#"+b);j.length||(j=d(h.panelTemplate).attr("id",b).data("destroy.tabs",true));j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");if(a>=this.lis.length){e.appendTo(this.list);j.appendTo(this.list[0].parentNode)}else{e.insertBefore(this.lis[a]); +j.insertBefore(this.panels[a])}h.disabled=d.map(h.disabled,function(k){return k>=a?++k:k});this._tabify();if(this.anchors.length==1){h.selected=0;e.addClass("ui-tabs-selected ui-state-active");j.removeClass("ui-tabs-hide");this.element.queue("tabs",function(){c._trigger("show",null,c._ui(c.anchors[0],c.panels[0]))});this.load(0)}this._trigger("add",null,this._ui(this.anchors[a],this.panels[a]));return this},remove:function(b){b=this._getIndex(b);var e=this.options,a=this.lis.eq(b).remove(),c=this.panels.eq(b).remove(); +if(a.hasClass("ui-tabs-selected")&&this.anchors.length>1)this.select(b+(b+1=b?--h:h});this._tabify();this._trigger("remove",null,this._ui(a.find("a")[0],c[0]));return this},enable:function(b){b=this._getIndex(b);var e=this.options;if(d.inArray(b,e.disabled)!=-1){this.lis.eq(b).removeClass("ui-state-disabled");e.disabled=d.grep(e.disabled,function(a){return a!=b});this._trigger("enable",null, +this._ui(this.anchors[b],this.panels[b]));return this}},disable:function(b){b=this._getIndex(b);var e=this.options;if(b!=e.selected){this.lis.eq(b).addClass("ui-state-disabled");e.disabled.push(b);e.disabled.sort();this._trigger("disable",null,this._ui(this.anchors[b],this.panels[b]))}return this},select:function(b){b=this._getIndex(b);if(b==-1)if(this.options.collapsible&&this.options.selected!=-1)b=this.options.selected;else return this;this.anchors.eq(b).trigger(this.options.event+".tabs");return this}, +load:function(b){b=this._getIndex(b);var e=this,a=this.options,c=this.anchors.eq(b)[0],h=d.data(c,"load.tabs");this.abort();if(!h||this.element.queue("tabs").length!==0&&d.data(c,"cache.tabs"))this.element.dequeue("tabs");else{this.lis.eq(b).addClass("ui-state-processing");if(a.spinner){var j=d("span",c);j.data("label.tabs",j.html()).html(a.spinner)}this.xhr=d.ajax(d.extend({},a.ajaxOptions,{url:h,success:function(k,n){e.element.find(e._sanitizeSelector(c.hash)).html(k);e._cleanup();a.cache&&d.data(c, +"cache.tabs",true);e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.success(k,n)}catch(m){}},error:function(k,n){e._cleanup();e._trigger("load",null,e._ui(e.anchors[b],e.panels[b]));try{a.ajaxOptions.error(k,n,b,c)}catch(m){}}}));e.element.dequeue("tabs");return this}},abort:function(){this.element.queue([]);this.panels.stop(false,true);this.element.queue("tabs",this.element.queue("tabs").splice(-2,2));if(this.xhr){this.xhr.abort();delete this.xhr}this._cleanup();return this}, +url:function(b,e){this.anchors.eq(b).removeData("cache.tabs").data("load.tabs",e);return this},length:function(){return this.anchors.length}});d.extend(d.ui.tabs,{version:"1.8.16"});d.extend(d.ui.tabs.prototype,{rotation:null,rotate:function(b,e){var a=this,c=this.options,h=a._rotate||(a._rotate=function(j){clearTimeout(a.rotation);a.rotation=setTimeout(function(){var k=c.selected;a.select(++k'))}function N(a){return a.bind("mouseout", +function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");b.length&&b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")}).bind("mouseover",function(b){b=d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");if(!(d.datepicker._isDisabledDatepicker(J.inline?a.parent()[0]:J.input[0])||!b.length)){b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover"); +b.addClass("ui-state-hover");b.hasClass("ui-datepicker-prev")&&b.addClass("ui-datepicker-prev-hover");b.hasClass("ui-datepicker-next")&&b.addClass("ui-datepicker-next-hover")}})}function H(a,b){d.extend(a,b);for(var c in b)if(b[c]==null||b[c]==C)a[c]=b[c];return a}d.extend(d.ui,{datepicker:{version:"1.8.16"}});var B=(new Date).getTime(),J;d.extend(M.prototype,{markerClassName:"hasDatepicker",maxRows:4,log:function(){this.debug&&console.log.apply("",arguments)},_widgetDatepicker:function(){return this.dpDiv}, +setDefaults:function(a){H(this._defaults,a||{});return this},_attachDatepicker:function(a,b){var c=null;for(var e in this._defaults){var f=a.getAttribute("date:"+e);if(f){c=c||{};try{c[e]=eval(f)}catch(h){c[e]=f}}}e=a.nodeName.toLowerCase();f=e=="div"||e=="span";if(!a.id){this.uuid+=1;a.id="dp"+this.uuid}var i=this._newInst(d(a),f);i.settings=d.extend({},b||{},c||{});if(e=="input")this._connectDatepicker(a,i);else f&&this._inlineDatepicker(a,i)},_newInst:function(a,b){return{id:a[0].id.replace(/([^A-Za-z0-9_-])/g, +"\\\\$1"),input:a,selectedDay:0,selectedMonth:0,selectedYear:0,drawMonth:0,drawYear:0,inline:b,dpDiv:!b?this.dpDiv:N(d('
          '))}},_connectDatepicker:function(a,b){var c=d(a);b.append=d([]);b.trigger=d([]);if(!c.hasClass(this.markerClassName)){this._attachments(c,b);c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", +function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});this._autoSize(b);d.data(a,"datepicker",b);b.settings.disabled&&this._disableDatepicker(a)}},_attachments:function(a,b){var c=this._get(b,"appendText"),e=this._get(b,"isRTL");b.append&&b.append.remove();if(c){b.append=d(''+c+"");a[e?"before":"after"](b.append)}a.unbind("focus",this._showDatepicker);b.trigger&&b.trigger.remove();c=this._get(b,"showOn");if(c== +"focus"||c=="both")a.focus(this._showDatepicker);if(c=="button"||c=="both"){c=this._get(b,"buttonText");var f=this._get(b,"buttonImage");b.trigger=d(this._get(b,"buttonImageOnly")?d("").addClass(this._triggerClass).attr({src:f,alt:c,title:c}):d('').addClass(this._triggerClass).html(f==""?c:d("").attr({src:f,alt:c,title:c})));a[e?"before":"after"](b.trigger);b.trigger.click(function(){d.datepicker._datepickerShowing&&d.datepicker._lastInput==a[0]?d.datepicker._hideDatepicker(): +d.datepicker._showDatepicker(a[0]);return false})}},_autoSize:function(a){if(this._get(a,"autoSize")&&!a.inline){var b=new Date(2009,11,20),c=this._get(a,"dateFormat");if(c.match(/[DM]/)){var e=function(f){for(var h=0,i=0,g=0;gh){h=f[g].length;i=g}return i};b.setMonth(e(this._get(a,c.match(/MM/)?"monthNames":"monthNamesShort")));b.setDate(e(this._get(a,c.match(/DD/)?"dayNames":"dayNamesShort"))+20-b.getDay())}a.input.attr("size",this._formatDate(a,b).length)}},_inlineDatepicker:function(a, +b){var c=d(a);if(!c.hasClass(this.markerClassName)){c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker",function(e,f,h){b.settings[f]=h}).bind("getData.datepicker",function(e,f){return this._get(b,f)});d.data(a,"datepicker",b);this._setDate(b,this._getDefaultDate(b),true);this._updateDatepicker(b);this._updateAlternate(b);b.settings.disabled&&this._disableDatepicker(a);b.dpDiv.css("display","block")}},_dialogDatepicker:function(a,b,c,e,f){a=this._dialogInst;if(!a){this.uuid+= +1;this._dialogInput=d('');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/ +2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b= +d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e= +a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a, +"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f== +a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input", +a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value= +"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b); +c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing= +true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}); +a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&& +!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(), +h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b= +this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); +this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): +0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"? +"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a); +this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField"); +if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"? +b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd", +COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames: +null)||this._defaults.monthNames;var i=function(o){(o=k+1 +12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&& +a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? +new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); +n=this._canAdjustMonth(a,-1,m,g)?''+n+"":f?"":''+n+"";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m, +g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+s+"":f?"":''+s+"";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&& +a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
          '+(c?h:"")+(this._isInRange(a,s)?'":"")+(c?"":h)+"
          ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
          '+(/all|left/.test(t)&& +x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
          ';var z=j?'":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+""}y+=z+"";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, +z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&ro;R+='";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
          '+this._get(a,"weekHeader")+"
          '+this._get(a,"calculateWeek")(r)+""+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+"
          "+(l?""+(i[0]>0&&G==i[1]-1?'
          ':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
          ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
          ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +;/* + * jQuery UI Progressbar 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Progressbar + * + * Depends: + * jquery.ui.core.js + * jquery.ui.widget.js + */ +(function(b,d){b.widget("ui.progressbar",{options:{value:0,max:100},min:0,_create:function(){this.element.addClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").attr({role:"progressbar","aria-valuemin":this.min,"aria-valuemax":this.options.max,"aria-valuenow":this._value()});this.valueDiv=b("
          ").appendTo(this.element);this.oldValue=this._value();this._refreshValue()},destroy:function(){this.element.removeClass("ui-progressbar ui-widget ui-widget-content ui-corner-all").removeAttr("role").removeAttr("aria-valuemin").removeAttr("aria-valuemax").removeAttr("aria-valuenow"); +this.valueDiv.remove();b.Widget.prototype.destroy.apply(this,arguments)},value:function(a){if(a===d)return this._value();this._setOption("value",a);return this},_setOption:function(a,c){if(a==="value"){this.options.value=c;this._refreshValue();this._value()===this.options.max&&this._trigger("complete")}b.Widget.prototype._setOption.apply(this,arguments)},_value:function(){var a=this.options.value;if(typeof a!=="number")a=0;return Math.min(this.options.max,Math.max(this.min,a))},_percentage:function(){return 100* +this._value()/this.options.max},_refreshValue:function(){var a=this.value(),c=this._percentage();if(this.oldValue!==a){this.oldValue=a;this._trigger("change")}this.valueDiv.toggle(a>this.min).toggleClass("ui-corner-right",a===this.options.max).width(c.toFixed(0)+"%");this.element.attr("aria-valuenow",a)}});b.extend(b.ui.progressbar,{version:"1.8.16"})})(jQuery); +;/* + * jQuery UI Effects 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/ + */ +jQuery.effects||function(f,j){function m(c){var a;if(c&&c.constructor==Array&&c.length==3)return c;if(a=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c))return[parseInt(a[1],10),parseInt(a[2],10),parseInt(a[3],10)];if(a=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c))return[parseFloat(a[1])*2.55,parseFloat(a[2])*2.55,parseFloat(a[3])*2.55];if(a=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c))return[parseInt(a[1], +16),parseInt(a[2],16),parseInt(a[3],16)];if(a=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c))return[parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16),parseInt(a[3]+a[3],16)];if(/rgba\(0, 0, 0, 0\)/.exec(c))return n.transparent;return n[f.trim(c).toLowerCase()]}function s(c,a){var b;do{b=f.curCSS(c,a);if(b!=""&&b!="transparent"||f.nodeName(c,"body"))break;a="backgroundColor"}while(c=c.parentNode);return m(b)}function o(){var c=document.defaultView?document.defaultView.getComputedStyle(this,null):this.currentStyle, +a={},b,d;if(c&&c.length&&c[0]&&c[c[0]])for(var e=c.length;e--;){b=c[e];if(typeof c[b]=="string"){d=b.replace(/\-(\w)/g,function(g,h){return h.toUpperCase()});a[d]=c[b]}}else for(b in c)if(typeof c[b]==="string")a[b]=c[b];return a}function p(c){var a,b;for(a in c){b=c[a];if(b==null||f.isFunction(b)||a in t||/scrollbar/.test(a)||!/color/i.test(a)&&isNaN(parseFloat(b)))delete c[a]}return c}function u(c,a){var b={_:0},d;for(d in a)if(c[d]!=a[d])b[d]=a[d];return b}function k(c,a,b,d){if(typeof c=="object"){d= +a;b=null;a=c;c=a.effect}if(f.isFunction(a)){d=a;b=null;a={}}if(typeof a=="number"||f.fx.speeds[a]){d=b;b=a;a={}}if(f.isFunction(b)){d=b;b=null}a=a||{};b=b||a.duration;b=f.fx.off?0:typeof b=="number"?b:b in f.fx.speeds?f.fx.speeds[b]:f.fx.speeds._default;d=d||a.complete;return[c,a,b,d]}function l(c){if(!c||typeof c==="number"||f.fx.speeds[c])return true;if(typeof c==="string"&&!f.effects[c])return true;return false}f.effects={};f.each(["backgroundColor","borderBottomColor","borderLeftColor","borderRightColor", +"borderTopColor","borderColor","color","outlineColor"],function(c,a){f.fx.step[a]=function(b){if(!b.colorInit){b.start=s(b.elem,a);b.end=m(b.end);b.colorInit=true}b.elem.style[a]="rgb("+Math.max(Math.min(parseInt(b.pos*(b.end[0]-b.start[0])+b.start[0],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[1]-b.start[1])+b.start[1],10),255),0)+","+Math.max(Math.min(parseInt(b.pos*(b.end[2]-b.start[2])+b.start[2],10),255),0)+")"}});var n={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0, +0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211, +211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0],transparent:[255,255,255]},q=["add","remove","toggle"],t={border:1,borderBottom:1,borderColor:1,borderLeft:1,borderRight:1,borderTop:1,borderWidth:1,margin:1,padding:1};f.effects.animateClass=function(c,a,b, +d){if(f.isFunction(b)){d=b;b=null}return this.queue(function(){var e=f(this),g=e.attr("style")||" ",h=p(o.call(this)),r,v=e.attr("class");f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});r=p(o.call(this));e.attr("class",v);e.animate(u(h,r),{queue:false,duration:a,easing:b,complete:function(){f.each(q,function(w,i){c[i]&&e[i+"Class"](c[i])});if(typeof e.attr("style")=="object"){e.attr("style").cssText="";e.attr("style").cssText=g}else e.attr("style",g);d&&d.apply(this,arguments);f.dequeue(this)}})})}; +f.fn.extend({_addClass:f.fn.addClass,addClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{add:c},a,b,d]):this._addClass(c)},_removeClass:f.fn.removeClass,removeClass:function(c,a,b,d){return a?f.effects.animateClass.apply(this,[{remove:c},a,b,d]):this._removeClass(c)},_toggleClass:f.fn.toggleClass,toggleClass:function(c,a,b,d,e){return typeof a=="boolean"||a===j?b?f.effects.animateClass.apply(this,[a?{add:c}:{remove:c},b,d,e]):this._toggleClass(c,a):f.effects.animateClass.apply(this, +[{toggle:c},a,b,d])},switchClass:function(c,a,b,d,e){return f.effects.animateClass.apply(this,[{add:a,remove:c},b,d,e])}});f.extend(f.effects,{version:"1.8.16",save:function(c,a){for(var b=0;b").addClass("ui-effects-wrapper").css({fontSize:"100%",background:"transparent",border:"none",margin:0,padding:0}), +d=document.activeElement;c.wrap(b);if(c[0]===d||f.contains(c[0],d))f(d).focus();b=c.parent();if(c.css("position")=="static"){b.css({position:"relative"});c.css({position:"relative"})}else{f.extend(a,{position:c.css("position"),zIndex:c.css("z-index")});f.each(["top","left","bottom","right"],function(e,g){a[g]=c.css(g);if(isNaN(parseInt(a[g],10)))a[g]="auto"});c.css({position:"relative",top:0,left:0,right:"auto",bottom:"auto"})}return b.css(a).show()},removeWrapper:function(c){var a,b=document.activeElement; +if(c.parent().is(".ui-effects-wrapper")){a=c.parent().replaceWith(c);if(c[0]===b||f.contains(c[0],b))f(b).focus();return a}return c},setTransition:function(c,a,b,d){d=d||{};f.each(a,function(e,g){unit=c.cssUnit(g);if(unit[0]>0)d[g]=unit[0]*b+unit[1]});return d}});f.fn.extend({effect:function(c){var a=k.apply(this,arguments),b={options:a[1],duration:a[2],callback:a[3]};a=b.options.mode;var d=f.effects[c];if(f.fx.off||!d)return a?this[a](b.duration,b.callback):this.each(function(){b.callback&&b.callback.call(this)}); +return d.call(this,b)},_show:f.fn.show,show:function(c){if(l(c))return this._show.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="show";return this.effect.apply(this,a)}},_hide:f.fn.hide,hide:function(c){if(l(c))return this._hide.apply(this,arguments);else{var a=k.apply(this,arguments);a[1].mode="hide";return this.effect.apply(this,a)}},__toggle:f.fn.toggle,toggle:function(c){if(l(c)||typeof c==="boolean"||f.isFunction(c))return this.__toggle.apply(this,arguments);else{var a=k.apply(this, +arguments);a[1].mode="toggle";return this.effect.apply(this,a)}},cssUnit:function(c){var a=this.css(c),b=[];f.each(["em","px","%","pt"],function(d,e){if(a.indexOf(e)>0)b=[parseFloat(a),e]});return b}});f.easing.jswing=f.easing.swing;f.extend(f.easing,{def:"easeOutQuad",swing:function(c,a,b,d,e){return f.easing[f.easing.def](c,a,b,d,e)},easeInQuad:function(c,a,b,d,e){return d*(a/=e)*a+b},easeOutQuad:function(c,a,b,d,e){return-d*(a/=e)*(a-2)+b},easeInOutQuad:function(c,a,b,d,e){if((a/=e/2)<1)return d/ +2*a*a+b;return-d/2*(--a*(a-2)-1)+b},easeInCubic:function(c,a,b,d,e){return d*(a/=e)*a*a+b},easeOutCubic:function(c,a,b,d,e){return d*((a=a/e-1)*a*a+1)+b},easeInOutCubic:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a+b;return d/2*((a-=2)*a*a+2)+b},easeInQuart:function(c,a,b,d,e){return d*(a/=e)*a*a*a+b},easeOutQuart:function(c,a,b,d,e){return-d*((a=a/e-1)*a*a*a-1)+b},easeInOutQuart:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a+b;return-d/2*((a-=2)*a*a*a-2)+b},easeInQuint:function(c,a,b, +d,e){return d*(a/=e)*a*a*a*a+b},easeOutQuint:function(c,a,b,d,e){return d*((a=a/e-1)*a*a*a*a+1)+b},easeInOutQuint:function(c,a,b,d,e){if((a/=e/2)<1)return d/2*a*a*a*a*a+b;return d/2*((a-=2)*a*a*a*a+2)+b},easeInSine:function(c,a,b,d,e){return-d*Math.cos(a/e*(Math.PI/2))+d+b},easeOutSine:function(c,a,b,d,e){return d*Math.sin(a/e*(Math.PI/2))+b},easeInOutSine:function(c,a,b,d,e){return-d/2*(Math.cos(Math.PI*a/e)-1)+b},easeInExpo:function(c,a,b,d,e){return a==0?b:d*Math.pow(2,10*(a/e-1))+b},easeOutExpo:function(c, +a,b,d,e){return a==e?b+d:d*(-Math.pow(2,-10*a/e)+1)+b},easeInOutExpo:function(c,a,b,d,e){if(a==0)return b;if(a==e)return b+d;if((a/=e/2)<1)return d/2*Math.pow(2,10*(a-1))+b;return d/2*(-Math.pow(2,-10*--a)+2)+b},easeInCirc:function(c,a,b,d,e){return-d*(Math.sqrt(1-(a/=e)*a)-1)+b},easeOutCirc:function(c,a,b,d,e){return d*Math.sqrt(1-(a=a/e-1)*a)+b},easeInOutCirc:function(c,a,b,d,e){if((a/=e/2)<1)return-d/2*(Math.sqrt(1-a*a)-1)+b;return d/2*(Math.sqrt(1-(a-=2)*a)+1)+b},easeInElastic:function(c,a,b, +d,e){c=1.70158;var g=0,h=d;if(a==0)return b;if((a/=e)==1)return b+d;g||(g=e*0.3);if(h").css({position:"absolute",visibility:"visible",left:-f*(h/d),top:-e*(i/c)}).parent().addClass("ui-effects-explode").css({position:"absolute",overflow:"hidden",width:h/d,height:i/c,left:g.left+f*(h/d)+(a.options.mode=="show"?(f-Math.floor(d/2))*(h/d):0),top:g.top+e*(i/c)+(a.options.mode=="show"?(e-Math.floor(c/2))*(i/c):0),opacity:a.options.mode=="show"?0:1}).animate({left:g.left+f*(h/d)+(a.options.mode=="show"?0:(f-Math.floor(d/2))*(h/d)),top:g.top+ +e*(i/c)+(a.options.mode=="show"?0:(e-Math.floor(c/2))*(i/c)),opacity:a.options.mode=="show"?1:0},a.duration||500);setTimeout(function(){a.options.mode=="show"?b.css({visibility:"visible"}):b.css({visibility:"visible"}).hide();a.callback&&a.callback.apply(b[0]);b.dequeue();j("div.ui-effects-explode").remove()},a.duration||500)})}})(jQuery); +;/* + * jQuery UI Effects Fade 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fade + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.fade=function(a){return this.queue(function(){var c=b(this),d=b.effects.setMode(c,a.options.mode||"hide");c.animate({opacity:d},{queue:false,duration:a.duration,easing:a.options.easing,complete:function(){a.callback&&a.callback.apply(this,arguments);c.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Fold 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Fold + * + * Depends: + * jquery.effects.core.js + */ +(function(c){c.effects.fold=function(a){return this.queue(function(){var b=c(this),j=["position","top","bottom","left","right"],d=c.effects.setMode(b,a.options.mode||"hide"),g=a.options.size||15,h=!!a.options.horizFirst,k=a.duration?a.duration/2:c.fx.speeds._default/2;c.effects.save(b,j);b.show();var e=c.effects.createWrapper(b).css({overflow:"hidden"}),f=d=="show"!=h,l=f?["width","height"]:["height","width"];f=f?[e.width(),e.height()]:[e.height(),e.width()];var i=/([0-9]+)%/.exec(g);if(i)g=parseInt(i[1], +10)/100*f[d=="hide"?0:1];if(d=="show")e.css(h?{height:0,width:g}:{height:g,width:0});h={};i={};h[l[0]]=d=="show"?f[0]:g;i[l[1]]=d=="show"?f[1]:0;e.animate(h,k,a.options.easing).animate(i,k,a.options.easing,function(){d=="hide"&&b.hide();c.effects.restore(b,j);c.effects.removeWrapper(b);a.callback&&a.callback.apply(b[0],arguments);b.dequeue()})})}})(jQuery); +;/* + * jQuery UI Effects Highlight 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Highlight + * + * Depends: + * jquery.effects.core.js + */ +(function(b){b.effects.highlight=function(c){return this.queue(function(){var a=b(this),e=["backgroundImage","backgroundColor","opacity"],d=b.effects.setMode(a,c.options.mode||"show"),f={backgroundColor:a.css("backgroundColor")};if(d=="hide")f.opacity=0;b.effects.save(a,e);a.show().css({backgroundImage:"none",backgroundColor:c.options.color||"#ffff99"}).animate(f,{queue:false,duration:c.duration,easing:c.options.easing,complete:function(){d=="hide"&&a.hide();b.effects.restore(a,e);d=="show"&&!b.support.opacity&& +this.style.removeAttribute("filter");c.callback&&c.callback.apply(this,arguments);a.dequeue()}})})}})(jQuery); +;/* + * jQuery UI Effects Pulsate 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Effects/Pulsate + * + * Depends: + * jquery.effects.core.js + */ +(function(d){d.effects.pulsate=function(a){return this.queue(function(){var b=d(this),c=d.effects.setMode(b,a.options.mode||"show");times=(a.options.times||5)*2-1;duration=a.duration?a.duration/2:d.fx.speeds._default/2;isVisible=b.is(":visible");animateTo=0;if(!isVisible){b.css("opacity",0).show();animateTo=1}if(c=="hide"&&isVisible||c=="show"&&!isVisible)times--;for(c=0;c').appendTo(document.body).addClass(a.options.className).css({top:d.top,left:d.left,height:b.innerHeight(),width:b.innerWidth(),position:"absolute"}).animate(c,a.duration,a.options.easing,function(){f.remove();a.callback&&a.callback.apply(b[0],arguments); +b.dequeue()})})}})(jQuery); +; \ No newline at end of file diff --git a/src/bb-modules/Filemanager/src/js/jquery.js b/src/bb-modules/Filemanager/src/js/jquery.js new file mode 100644 index 000000000..93adea19f --- /dev/null +++ b/src/bb-modules/Filemanager/src/js/jquery.js @@ -0,0 +1,4 @@ +/*! jQuery v1.7.2 jquery.com | jquery.org/license */ +(function(a,b){function cy(a){return f.isWindow(a)?a:a.nodeType===9?a.defaultView||a.parentWindow:!1}function cu(a){if(!cj[a]){var b=c.body,d=f("<"+a+">").appendTo(b),e=d.css("display");d.remove();if(e==="none"||e===""){ck||(ck=c.createElement("iframe"),ck.frameBorder=ck.width=ck.height=0),b.appendChild(ck);if(!cl||!ck.createElement)cl=(ck.contentWindow||ck.contentDocument).document,cl.write((f.support.boxModel?"":"")+""),cl.close();d=cl.createElement(a),cl.body.appendChild(d),e=f.css(d,"display"),b.removeChild(ck)}cj[a]=e}return cj[a]}function ct(a,b){var c={};f.each(cp.concat.apply([],cp.slice(0,b)),function(){c[this]=a});return c}function cs(){cq=b}function cr(){setTimeout(cs,0);return cq=f.now()}function ci(){try{return new a.ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}function ch(){try{return new a.XMLHttpRequest}catch(b){}}function cb(a,c){a.dataFilter&&(c=a.dataFilter(c,a.dataType));var d=a.dataTypes,e={},g,h,i=d.length,j,k=d[0],l,m,n,o,p;for(g=1;g0){if(c!=="border")for(;e=0===c})}function S(a){return!a||!a.parentNode||a.parentNode.nodeType===11}function K(){return!0}function J(){return!1}function n(a,b,c){var d=b+"defer",e=b+"queue",g=b+"mark",h=f._data(a,d);h&&(c==="queue"||!f._data(a,e))&&(c==="mark"||!f._data(a,g))&&setTimeout(function(){!f._data(a,e)&&!f._data(a,g)&&(f.removeData(a,d,!0),h.fire())},0)}function m(a){for(var b in a){if(b==="data"&&f.isEmptyObject(a[b]))continue;if(b!=="toJSON")return!1}return!0}function l(a,c,d){if(d===b&&a.nodeType===1){var e="data-"+c.replace(k,"-$1").toLowerCase();d=a.getAttribute(e);if(typeof d=="string"){try{d=d==="true"?!0:d==="false"?!1:d==="null"?null:f.isNumeric(d)?+d:j.test(d)?f.parseJSON(d):d}catch(g){}f.data(a,c,d)}else d=b}return d}function h(a){var b=g[a]={},c,d;a=a.split(/\s+/);for(c=0,d=a.length;c)[^>]*$|#([\w\-]*)$)/,j=/\S/,k=/^\s+/,l=/\s+$/,m=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,n=/^[\],:{}\s]*$/,o=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,p=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,q=/(?:^|:|,)(?:\s*\[)+/g,r=/(webkit)[ \/]([\w.]+)/,s=/(opera)(?:.*version)?[ \/]([\w.]+)/,t=/(msie) ([\w.]+)/,u=/(mozilla)(?:.*? rv:([\w.]+))?/,v=/-([a-z]|[0-9])/ig,w=/^-ms-/,x=function(a,b){return(b+"").toUpperCase()},y=d.userAgent,z,A,B,C=Object.prototype.toString,D=Object.prototype.hasOwnProperty,E=Array.prototype.push,F=Array.prototype.slice,G=String.prototype.trim,H=Array.prototype.indexOf,I={};e.fn=e.prototype={constructor:e,init:function(a,d,f){var g,h,j,k;if(!a)return this;if(a.nodeType){this.context=this[0]=a,this.length=1;return this}if(a==="body"&&!d&&c.body){this.context=c,this[0]=c.body,this.selector=a,this.length=1;return this}if(typeof a=="string"){a.charAt(0)!=="<"||a.charAt(a.length-1)!==">"||a.length<3?g=i.exec(a):g=[null,a,null];if(g&&(g[1]||!d)){if(g[1]){d=d instanceof e?d[0]:d,k=d?d.ownerDocument||d:c,j=m.exec(a),j?e.isPlainObject(d)?(a=[c.createElement(j[1])],e.fn.attr.call(a,d,!0)):a=[k.createElement(j[1])]:(j=e.buildFragment([g[1]],[k]),a=(j.cacheable?e.clone(j.fragment):j.fragment).childNodes);return e.merge(this,a)}h=c.getElementById(g[2]);if(h&&h.parentNode){if(h.id!==g[2])return f.find(a);this.length=1,this[0]=h}this.context=c,this.selector=a;return this}return!d||d.jquery?(d||f).find(a):this.constructor(d).find(a)}if(e.isFunction(a))return f.ready(a);a.selector!==b&&(this.selector=a.selector,this.context=a.context);return e.makeArray(a,this)},selector:"",jquery:"1.7.2",length:0,size:function(){return this.length},toArray:function(){return F.call(this,0)},get:function(a){return a==null?this.toArray():a<0?this[this.length+a]:this[a]},pushStack:function(a,b,c){var d=this.constructor();e.isArray(a)?E.apply(d,a):e.merge(d,a),d.prevObject=this,d.context=this.context,b==="find"?d.selector=this.selector+(this.selector?" ":"")+c:b&&(d.selector=this.selector+"."+b+"("+c+")");return d},each:function(a,b){return e.each(this,a,b)},ready:function(a){e.bindReady(),A.add(a);return this},eq:function(a){a=+a;return a===-1?this.slice(a):this.slice(a,a+1)},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},slice:function(){return this.pushStack(F.apply(this,arguments),"slice",F.call(arguments).join(","))},map:function(a){return this.pushStack(e.map(this,function(b,c){return a.call(b,c,b)}))},end:function(){return this.prevObject||this.constructor(null)},push:E,sort:[].sort,splice:[].splice},e.fn.init.prototype=e.fn,e.extend=e.fn.extend=function(){var a,c,d,f,g,h,i=arguments[0]||{},j=1,k=arguments.length,l=!1;typeof i=="boolean"&&(l=i,i=arguments[1]||{},j=2),typeof i!="object"&&!e.isFunction(i)&&(i={}),k===j&&(i=this,--j);for(;j0)return;A.fireWith(c,[e]),e.fn.trigger&&e(c).trigger("ready").off("ready")}},bindReady:function(){if(!A){A=e.Callbacks("once memory");if(c.readyState==="complete")return setTimeout(e.ready,1);if(c.addEventListener)c.addEventListener("DOMContentLoaded",B,!1),a.addEventListener("load",e.ready,!1);else if(c.attachEvent){c.attachEvent("onreadystatechange",B),a.attachEvent("onload",e.ready);var b=!1;try{b=a.frameElement==null}catch(d){}c.documentElement.doScroll&&b&&J()}}},isFunction:function(a){return e.type(a)==="function"},isArray:Array.isArray||function(a){return e.type(a)==="array"},isWindow:function(a){return a!=null&&a==a.window},isNumeric:function(a){return!isNaN(parseFloat(a))&&isFinite(a)},type:function(a){return a==null?String(a):I[C.call(a)]||"object"},isPlainObject:function(a){if(!a||e.type(a)!=="object"||a.nodeType||e.isWindow(a))return!1;try{if(a.constructor&&!D.call(a,"constructor")&&!D.call(a.constructor.prototype,"isPrototypeOf"))return!1}catch(c){return!1}var d;for(d in a);return d===b||D.call(a,d)},isEmptyObject:function(a){for(var b in a)return!1;return!0},error:function(a){throw new Error(a)},parseJSON:function(b){if(typeof b!="string"||!b)return null;b=e.trim(b);if(a.JSON&&a.JSON.parse)return a.JSON.parse(b);if(n.test(b.replace(o,"@").replace(p,"]").replace(q,"")))return(new Function("return "+b))();e.error("Invalid JSON: "+b)},parseXML:function(c){if(typeof c!="string"||!c)return null;var d,f;try{a.DOMParser?(f=new DOMParser,d=f.parseFromString(c,"text/xml")):(d=new ActiveXObject("Microsoft.XMLDOM"),d.async="false",d.loadXML(c))}catch(g){d=b}(!d||!d.documentElement||d.getElementsByTagName("parsererror").length)&&e.error("Invalid XML: "+c);return d},noop:function(){},globalEval:function(b){b&&j.test(b)&&(a.execScript||function(b){a.eval.call(a,b)})(b)},camelCase:function(a){return a.replace(w,"ms-").replace(v,x)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toUpperCase()===b.toUpperCase()},each:function(a,c,d){var f,g=0,h=a.length,i=h===b||e.isFunction(a);if(d){if(i){for(f in a)if(c.apply(a[f],d)===!1)break}else for(;g0&&a[0]&&a[j-1]||j===0||e.isArray(a));if(k)for(;i1?i.call(arguments,0):b,j.notifyWith(k,e)}}function l(a){return function(c){b[a]=arguments.length>1?i.call(arguments,0):c,--g||j.resolveWith(j,b)}}var b=i.call(arguments,0),c=0,d=b.length,e=Array(d),g=d,h=d,j=d<=1&&a&&f.isFunction(a.promise)?a:f.Deferred(),k=j.promise();if(d>1){for(;c
          a",d=p.getElementsByTagName("*"),e=p.getElementsByTagName("a")[0];if(!d||!d.length||!e)return{};g=c.createElement("select"),h=g.appendChild(c.createElement("option")),i=p.getElementsByTagName("input")[0],b={leadingWhitespace:p.firstChild.nodeType===3,tbody:!p.getElementsByTagName("tbody").length,htmlSerialize:!!p.getElementsByTagName("link").length,style:/top/.test(e.getAttribute("style")),hrefNormalized:e.getAttribute("href")==="/a",opacity:/^0.55/.test(e.style.opacity),cssFloat:!!e.style.cssFloat,checkOn:i.value==="on",optSelected:h.selected,getSetAttribute:p.className!=="t",enctype:!!c.createElement("form").enctype,html5Clone:c.createElement("nav").cloneNode(!0).outerHTML!=="<:nav>",submitBubbles:!0,changeBubbles:!0,focusinBubbles:!1,deleteExpando:!0,noCloneEvent:!0,inlineBlockNeedsLayout:!1,shrinkWrapBlocks:!1,reliableMarginRight:!0,pixelMargin:!0},f.boxModel=b.boxModel=c.compatMode==="CSS1Compat",i.checked=!0,b.noCloneChecked=i.cloneNode(!0).checked,g.disabled=!0,b.optDisabled=!h.disabled;try{delete p.test}catch(r){b.deleteExpando=!1}!p.addEventListener&&p.attachEvent&&p.fireEvent&&(p.attachEvent("onclick",function(){b.noCloneEvent=!1}),p.cloneNode(!0).fireEvent("onclick")),i=c.createElement("input"),i.value="t",i.setAttribute("type","radio"),b.radioValue=i.value==="t",i.setAttribute("checked","checked"),i.setAttribute("name","t"),p.appendChild(i),j=c.createDocumentFragment(),j.appendChild(p.lastChild),b.checkClone=j.cloneNode(!0).cloneNode(!0).lastChild.checked,b.appendChecked=i.checked,j.removeChild(i),j.appendChild(p);if(p.attachEvent)for(n in{submit:1,change:1,focusin:1})m="on"+n,o=m in p,o||(p.setAttribute(m,"return;"),o=typeof p[m]=="function"),b[n+"Bubbles"]=o;j.removeChild(p),j=g=h=p=i=null,f(function(){var d,e,g,h,i,j,l,m,n,q,r,s,t,u=c.getElementsByTagName("body")[0];!u||(m=1,t="padding:0;margin:0;border:",r="position:absolute;top:0;left:0;width:1px;height:1px;",s=t+"0;visibility:hidden;",n="style='"+r+t+"5px solid #000;",q="
          "+""+"
          ",d=c.createElement("div"),d.style.cssText=s+"width:0;height:0;position:static;top:0;margin-top:"+m+"px",u.insertBefore(d,u.firstChild),p=c.createElement("div"),d.appendChild(p),p.innerHTML="
          t
          ",k=p.getElementsByTagName("td"),o=k[0].offsetHeight===0,k[0].style.display="",k[1].style.display="none",b.reliableHiddenOffsets=o&&k[0].offsetHeight===0,a.getComputedStyle&&(p.innerHTML="",l=c.createElement("div"),l.style.width="0",l.style.marginRight="0",p.style.width="2px",p.appendChild(l),b.reliableMarginRight=(parseInt((a.getComputedStyle(l,null)||{marginRight:0}).marginRight,10)||0)===0),typeof p.style.zoom!="undefined"&&(p.innerHTML="",p.style.width=p.style.padding="1px",p.style.border=0,p.style.overflow="hidden",p.style.display="inline",p.style.zoom=1,b.inlineBlockNeedsLayout=p.offsetWidth===3,p.style.display="block",p.style.overflow="visible",p.innerHTML="
          ",b.shrinkWrapBlocks=p.offsetWidth!==3),p.style.cssText=r+s,p.innerHTML=q,e=p.firstChild,g=e.firstChild,i=e.nextSibling.firstChild.firstChild,j={doesNotAddBorder:g.offsetTop!==5,doesAddBorderForTableAndCells:i.offsetTop===5},g.style.position="fixed",g.style.top="20px",j.fixedPosition=g.offsetTop===20||g.offsetTop===15,g.style.position=g.style.top="",e.style.overflow="hidden",e.style.position="relative",j.subtractsBorderForOverflowNotVisible=g.offsetTop===-5,j.doesNotIncludeMarginInBodyOffset=u.offsetTop!==m,a.getComputedStyle&&(p.style.marginTop="1%",b.pixelMargin=(a.getComputedStyle(p,null)||{marginTop:0}).marginTop!=="1%"),typeof d.style.zoom!="undefined"&&(d.style.zoom=1),u.removeChild(d),l=p=d=null,f.extend(b,j))});return b}();var j=/^(?:\{.*\}|\[.*\])$/,k=/([A-Z])/g;f.extend({cache:{},uuid:0,expando:"jQuery"+(f.fn.jquery+Math.random()).replace(/\D/g,""),noData:{embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",applet:!0},hasData:function(a){a=a.nodeType?f.cache[a[f.expando]]:a[f.expando];return!!a&&!m(a)},data:function(a,c,d,e){if(!!f.acceptData(a)){var g,h,i,j=f.expando,k=typeof c=="string",l=a.nodeType,m=l?f.cache:a,n=l?a[j]:a[j]&&j,o=c==="events";if((!n||!m[n]||!o&&!e&&!m[n].data)&&k&&d===b)return;n||(l?a[j]=n=++f.uuid:n=j),m[n]||(m[n]={},l||(m[n].toJSON=f.noop));if(typeof c=="object"||typeof c=="function")e?m[n]=f.extend(m[n],c):m[n].data=f.extend(m[n].data,c);g=h=m[n],e||(h.data||(h.data={}),h=h.data),d!==b&&(h[f.camelCase(c)]=d);if(o&&!h[c])return g.events;k?(i=h[c],i==null&&(i=h[f.camelCase(c)])):i=h;return i}},removeData:function(a,b,c){if(!!f.acceptData(a)){var d,e,g,h=f.expando,i=a.nodeType,j=i?f.cache:a,k=i?a[h]:h;if(!j[k])return;if(b){d=c?j[k]:j[k].data;if(d){f.isArray(b)||(b in d?b=[b]:(b=f.camelCase(b),b in d?b=[b]:b=b.split(" ")));for(e=0,g=b.length;e1,null,!1)},removeData:function(a){return this.each(function(){f.removeData(this,a)})}}),f.extend({_mark:function(a,b){a&&(b=(b||"fx")+"mark",f._data(a,b,(f._data(a,b)||0)+1))},_unmark:function(a,b,c){a!==!0&&(c=b,b=a,a=!1);if(b){c=c||"fx";var d=c+"mark",e=a?0:(f._data(b,d)||1)-1;e?f._data(b,d,e):(f.removeData(b,d,!0),n(b,c,"mark"))}},queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue",d=f._data(a,b),c&&(!d||f.isArray(c)?d=f._data(a,b,f.makeArray(c)):d.push(c));return d||[]}},dequeue:function(a,b){b=b||"fx";var c=f.queue(a,b),d=c.shift(),e={};d==="inprogress"&&(d=c.shift()),d&&(b==="fx"&&c.unshift("inprogress"),f._data(a,b+".run",e),d.call(a,function(){f.dequeue(a,b)},e)),c.length||(f.removeData(a,b+"queue "+b+".run",!0),n(a,b,"queue"))}}),f.fn.extend({queue:function(a,c){var d=2;typeof a!="string"&&(c=a,a="fx",d--);if(arguments.length1)},removeAttr:function(a){return this.each(function(){f.removeAttr(this,a)})},prop:function(a,b){return f.access(this,f.prop,a,b,arguments.length>1)},removeProp:function(a){a=f.propFix[a]||a;return this.each(function(){try{this[a]=b,delete this[a]}catch(c){}})},addClass:function(a){var b,c,d,e,g,h,i;if(f.isFunction(a))return this.each(function(b){f(this).addClass(a.call(this,b,this.className))});if(a&&typeof a=="string"){b=a.split(p);for(c=0,d=this.length;c-1)return!0;return!1},val:function(a){var c,d,e,g=this[0];{if(!!arguments.length){e=f.isFunction(a);return this.each(function(d){var g=f(this),h;if(this.nodeType===1){e?h=a.call(this,d,g.val()):h=a,h==null?h="":typeof h=="number"?h+="":f.isArray(h)&&(h=f.map(h,function(a){return a==null?"":a+""})),c=f.valHooks[this.type]||f.valHooks[this.nodeName.toLowerCase()];if(!c||!("set"in c)||c.set(this,h,"value")===b)this.value=h}})}if(g){c=f.valHooks[g.type]||f.valHooks[g.nodeName.toLowerCase()];if(c&&"get"in c&&(d=c.get(g,"value"))!==b)return d;d=g.value;return typeof d=="string"?d.replace(q,""):d==null?"":d}}}}),f.extend({valHooks:{option:{get:function(a){var b=a.attributes.value;return!b||b.specified?a.value:a.text}},select:{get:function(a){var b,c,d,e,g=a.selectedIndex,h=[],i=a.options,j=a.type==="select-one";if(g<0)return null;c=j?g:0,d=j?g+1:i.length;for(;c=0}),c.length||(a.selectedIndex=-1);return c}}},attrFn:{val:!0,css:!0,html:!0,text:!0,data:!0,width:!0,height:!0,offset:!0},attr:function(a,c,d,e){var g,h,i,j=a.nodeType;if(!!a&&j!==3&&j!==8&&j!==2){if(e&&c in f.attrFn)return f(a)[c](d);if(typeof a.getAttribute=="undefined")return f.prop(a,c,d);i=j!==1||!f.isXMLDoc(a),i&&(c=c.toLowerCase(),h=f.attrHooks[c]||(u.test(c)?x:w));if(d!==b){if(d===null){f.removeAttr(a,c);return}if(h&&"set"in h&&i&&(g=h.set(a,d,c))!==b)return g;a.setAttribute(c,""+d);return d}if(h&&"get"in h&&i&&(g=h.get(a,c))!==null)return g;g=a.getAttribute(c);return g===null?b:g}},removeAttr:function(a,b){var c,d,e,g,h,i=0;if(b&&a.nodeType===1){d=b.toLowerCase().split(p),g=d.length;for(;i=0}})});var z=/^(?:textarea|input|select)$/i,A=/^([^\.]*)?(?:\.(.+))?$/,B=/(?:^|\s)hover(\.\S+)?\b/,C=/^key/,D=/^(?:mouse|contextmenu)|click/,E=/^(?:focusinfocus|focusoutblur)$/,F=/^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,G=function( +a){var b=F.exec(a);b&&(b[1]=(b[1]||"").toLowerCase(),b[3]=b[3]&&new RegExp("(?:^|\\s)"+b[3]+"(?:\\s|$)"));return b},H=function(a,b){var c=a.attributes||{};return(!b[1]||a.nodeName.toLowerCase()===b[1])&&(!b[2]||(c.id||{}).value===b[2])&&(!b[3]||b[3].test((c["class"]||{}).value))},I=function(a){return f.event.special.hover?a:a.replace(B,"mouseenter$1 mouseleave$1")};f.event={add:function(a,c,d,e,g){var h,i,j,k,l,m,n,o,p,q,r,s;if(!(a.nodeType===3||a.nodeType===8||!c||!d||!(h=f._data(a)))){d.handler&&(p=d,d=p.handler,g=p.selector),d.guid||(d.guid=f.guid++),j=h.events,j||(h.events=j={}),i=h.handle,i||(h.handle=i=function(a){return typeof f!="undefined"&&(!a||f.event.triggered!==a.type)?f.event.dispatch.apply(i.elem,arguments):b},i.elem=a),c=f.trim(I(c)).split(" ");for(k=0;k=0&&(h=h.slice(0,-1),k=!0),h.indexOf(".")>=0&&(i=h.split("."),h=i.shift(),i.sort());if((!e||f.event.customEvent[h])&&!f.event.global[h])return;c=typeof c=="object"?c[f.expando]?c:new f.Event(h,c):new f.Event(h),c.type=h,c.isTrigger=!0,c.exclusive=k,c.namespace=i.join("."),c.namespace_re=c.namespace?new RegExp("(^|\\.)"+i.join("\\.(?:.*\\.)?")+"(\\.|$)"):null,o=h.indexOf(":")<0?"on"+h:"";if(!e){j=f.cache;for(l in j)j[l].events&&j[l].events[h]&&f.event.trigger(c,d,j[l].handle.elem,!0);return}c.result=b,c.target||(c.target=e),d=d!=null?f.makeArray(d):[],d.unshift(c),p=f.event.special[h]||{};if(p.trigger&&p.trigger.apply(e,d)===!1)return;r=[[e,p.bindType||h]];if(!g&&!p.noBubble&&!f.isWindow(e)){s=p.delegateType||h,m=E.test(s+h)?e:e.parentNode,n=null;for(;m;m=m.parentNode)r.push([m,s]),n=m;n&&n===e.ownerDocument&&r.push([n.defaultView||n.parentWindow||a,s])}for(l=0;le&&j.push({elem:this,matches:d.slice(e)});for(k=0;k0?this.on(b,null,a,c):this.trigger(b)},f.attrFn&&(f.attrFn[b]=!0),C.test(b)&&(f.event.fixHooks[b]=f.event.keyHooks),D.test(b)&&(f.event.fixHooks[b]=f.event.mouseHooks)}),function(){function x(a,b,c,e,f,g){for(var h=0,i=e.length;h0){k=j;break}}j=j[a]}e[h]=k}}}function w(a,b,c,e,f,g){for(var h=0,i=e.length;h+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,d="sizcache"+(Math.random()+"").replace(".",""),e=0,g=Object.prototype.toString,h=!1,i=!0,j=/\\/g,k=/\r\n/g,l=/\W/;[0,0].sort(function(){i=!1;return 0});var m=function(b,d,e,f){e=e||[],d=d||c;var h=d;if(d.nodeType!==1&&d.nodeType!==9)return[];if(!b||typeof b!="string")return e;var i,j,k,l,n,q,r,t,u=!0,v=m.isXML(d),w=[],x=b;do{a.exec(""),i=a.exec(x);if(i){x=i[3],w.push(i[1]);if(i[2]){l=i[3];break}}}while(i);if(w.length>1&&p.exec(b))if(w.length===2&&o.relative[w[0]])j=y(w[0]+w[1],d,f);else{j=o.relative[w[0]]?[d]:m(w.shift(),d);while(w.length)b=w.shift(),o.relative[b]&&(b+=w.shift()),j=y(b,j,f)}else{!f&&w.length>1&&d.nodeType===9&&!v&&o.match.ID.test(w[0])&&!o.match.ID.test(w[w.length-1])&&(n=m.find(w.shift(),d,v),d=n.expr?m.filter(n.expr,n.set)[0]:n.set[0]);if(d){n=f?{expr:w.pop(),set:s(f)}:m.find(w.pop(),w.length===1&&(w[0]==="~"||w[0]==="+")&&d.parentNode?d.parentNode:d,v),j=n.expr?m.filter(n.expr,n.set):n.set,w.length>0?k=s(j):u=!1;while(w.length)q=w.pop(),r=q,o.relative[q]?r=w.pop():q="",r==null&&(r=d),o.relative[q](k,r,v)}else k=w=[]}k||(k=j),k||m.error(q||b);if(g.call(k)==="[object Array]")if(!u)e.push.apply(e,k);else if(d&&d.nodeType===1)for(t=0;k[t]!=null;t++)k[t]&&(k[t]===!0||k[t].nodeType===1&&m.contains(d,k[t]))&&e.push(j[t]);else for(t=0;k[t]!=null;t++)k[t]&&k[t].nodeType===1&&e.push(j[t]);else s(k,e);l&&(m(l,h,e,f),m.uniqueSort(e));return e};m.uniqueSort=function(a){if(u){h=i,a.sort(u);if(h)for(var b=1;b0},m.find=function(a,b,c){var d,e,f,g,h,i;if(!a)return[];for(e=0,f=o.order.length;e":function(a,b){var c,d=typeof b=="string",e=0,f=a.length;if(d&&!l.test(b)){b=b.toLowerCase();for(;e=0)?c||d.push(h):c&&(b[g]=!1));return!1},ID:function(a){return a[1].replace(j,"")},TAG:function(a,b){return a[1].replace(j,"").toLowerCase()},CHILD:function(a){if(a[1]==="nth"){a[2]||m.error(a[0]),a[2]=a[2].replace(/^\+|\s*/g,"");var b=/(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2]==="even"&&"2n"||a[2]==="odd"&&"2n+1"||!/\D/.test(a[2])&&"0n+"+a[2]||a[2]);a[2]=b[1]+(b[2]||1)-0,a[3]=b[3]-0}else a[2]&&m.error(a[0]);a[0]=e++;return a},ATTR:function(a,b,c,d,e,f){var g=a[1]=a[1].replace(j,"");!f&&o.attrMap[g]&&(a[1]=o.attrMap[g]),a[4]=(a[4]||a[5]||"").replace(j,""),a[2]==="~="&&(a[4]=" "+a[4]+" ");return a},PSEUDO:function(b,c,d,e,f){if(b[1]==="not")if((a.exec(b[3])||"").length>1||/^\w/.test(b[3]))b[3]=m(b[3],null,null,c);else{var g=m.filter(b[3],c,d,!0^f);d||e.push.apply(e,g);return!1}else if(o.match.POS.test(b[0])||o.match.CHILD.test(b[0]))return!0;return b},POS:function(a){a.unshift(!0);return a}},filters:{enabled:function(a){return a.disabled===!1&&a.type!=="hidden"},disabled:function(a){return a.disabled===!0},checked:function(a){return a.checked===!0},selected:function(a){a.parentNode&&a.parentNode.selectedIndex;return a.selected===!0},parent:function(a){return!!a.firstChild},empty:function(a){return!a.firstChild},has:function(a,b,c){return!!m(c[3],a).length},header:function(a){return/h\d/i.test(a.nodeName)},text:function(a){var b=a.getAttribute("type"),c=a.type;return a.nodeName.toLowerCase()==="input"&&"text"===c&&(b===c||b===null)},radio:function(a){return a.nodeName.toLowerCase()==="input"&&"radio"===a.type},checkbox:function(a){return a.nodeName.toLowerCase()==="input"&&"checkbox"===a.type},file:function(a){return a.nodeName.toLowerCase()==="input"&&"file"===a.type},password:function(a){return a.nodeName.toLowerCase()==="input"&&"password"===a.type},submit:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"submit"===a.type},image:function(a){return a.nodeName.toLowerCase()==="input"&&"image"===a.type},reset:function(a){var b=a.nodeName.toLowerCase();return(b==="input"||b==="button")&&"reset"===a.type},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&"button"===a.type||b==="button"},input:function(a){return/input|select|textarea|button/i.test(a.nodeName)},focus:function(a){return a===a.ownerDocument.activeElement}},setFilters:{first:function(a,b){return b===0},last:function(a,b,c,d){return b===d.length-1},even:function(a,b){return b%2===0},odd:function(a,b){return b%2===1},lt:function(a,b,c){return bc[3]-0},nth:function(a,b,c){return c[3]-0===b},eq:function(a,b,c){return c[3]-0===b}},filter:{PSEUDO:function(a,b,c,d){var e=b[1],f=o.filters[e];if(f)return f(a,c,b,d);if(e==="contains")return(a.textContent||a.innerText||n([a])||"").indexOf(b[3])>=0;if(e==="not"){var g=b[3];for(var h=0,i=g.length;h=0}},ID:function(a,b){return a.nodeType===1&&a.getAttribute("id")===b},TAG:function(a,b){return b==="*"&&a.nodeType===1||!!a.nodeName&&a.nodeName.toLowerCase()===b},CLASS:function(a,b){return(" "+(a.className||a.getAttribute("class"))+" ").indexOf(b)>-1},ATTR:function(a,b){var c=b[1],d=m.attr?m.attr(a,c):o.attrHandle[c]?o.attrHandle[c](a):a[c]!=null?a[c]:a.getAttribute(c),e=d+"",f=b[2],g=b[4];return d==null?f==="!=":!f&&m.attr?d!=null:f==="="?e===g:f==="*="?e.indexOf(g)>=0:f==="~="?(" "+e+" ").indexOf(g)>=0:g?f==="!="?e!==g:f==="^="?e.indexOf(g)===0:f==="$="?e.substr(e.length-g.length)===g:f==="|="?e===g||e.substr(0,g.length+1)===g+"-":!1:e&&d!==!1},POS:function(a,b,c,d){var e=b[2],f=o.setFilters[e];if(f)return f(a,c,b,d)}}},p=o.match.POS,q=function(a,b){return"\\"+(b-0+1)};for(var r in o.match)o.match[r]=new RegExp(o.match[r].source+/(?![^\[]*\])(?![^\(]*\))/.source),o.leftMatch[r]=new RegExp(/(^(?:.|\r|\n)*?)/.source+o.match[r].source.replace(/\\(\d+)/g,q));o.match.globalPOS=p;var s=function(a,b){a=Array.prototype.slice.call(a,0);if(b){b.push.apply(b,a);return b}return a};try{Array.prototype.slice.call(c.documentElement.childNodes,0)[0].nodeType}catch(t){s=function(a,b){var c=0,d=b||[];if(g.call(a)==="[object Array]")Array.prototype.push.apply(d,a);else if(typeof a.length=="number")for(var e=a.length;c",e.insertBefore(a,e.firstChild),c.getElementById(d)&&(o.find.ID=function(a,c,d){if(typeof c.getElementById!="undefined"&&!d){var e=c.getElementById(a[1]);return e?e.id===a[1]||typeof e.getAttributeNode!="undefined"&&e.getAttributeNode("id").nodeValue===a[1]?[e]:b:[]}},o.filter.ID=function(a,b){var c=typeof a.getAttributeNode!="undefined"&&a.getAttributeNode("id");return a.nodeType===1&&c&&c.nodeValue===b}),e.removeChild(a),e=a=null}(),function(){var a=c.createElement("div");a.appendChild(c.createComment("")),a.getElementsByTagName("*").length>0&&(o.find.TAG=function(a,b){var c=b.getElementsByTagName(a[1]);if(a[1]==="*"){var d=[];for(var e=0;c[e];e++)c[e].nodeType===1&&d.push(c[e]);c=d}return c}),a.innerHTML="",a.firstChild&&typeof a.firstChild.getAttribute!="undefined"&&a.firstChild.getAttribute("href")!=="#"&&(o.attrHandle.href=function(a){return a.getAttribute("href",2)}),a=null}(),c.querySelectorAll&&function(){var a=m,b=c.createElement("div"),d="__sizzle__";b.innerHTML="

          ";if(!b.querySelectorAll||b.querySelectorAll(".TEST").length!==0){m=function(b,e,f,g){e=e||c;if(!g&&!m.isXML(e)){var h=/^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);if(h&&(e.nodeType===1||e.nodeType===9)){if(h[1])return s(e.getElementsByTagName(b),f);if(h[2]&&o.find.CLASS&&e.getElementsByClassName)return s(e.getElementsByClassName(h[2]),f)}if(e.nodeType===9){if(b==="body"&&e.body)return s([e.body],f);if(h&&h[3]){var i=e.getElementById(h[3]);if(!i||!i.parentNode)return s([],f);if(i.id===h[3])return s([i],f)}try{return s(e.querySelectorAll(b),f)}catch(j){}}else if(e.nodeType===1&&e.nodeName.toLowerCase()!=="object"){var k=e,l=e.getAttribute("id"),n=l||d,p=e.parentNode,q=/^\s*[+~]/.test(b);l?n=n.replace(/'/g,"\\$&"):e.setAttribute("id",n),q&&p&&(e=e.parentNode);try{if(!q||p)return s(e.querySelectorAll("[id='"+n+"'] "+b),f)}catch(r){}finally{l||k.removeAttribute("id")}}}return a(b,e,f,g)};for(var e in a)m[e]=a[e];b=null}}(),function(){var a=c.documentElement,b=a.matchesSelector||a.mozMatchesSelector||a.webkitMatchesSelector||a.msMatchesSelector;if(b){var d=!b.call(c.createElement("div"),"div"),e=!1;try{b.call(c.documentElement,"[test!='']:sizzle")}catch(f){e=!0}m.matchesSelector=function(a,c){c=c.replace(/\=\s*([^'"\]]*)\s*\]/g,"='$1']");if(!m.isXML(a))try{if(e||!o.match.PSEUDO.test(c)&&!/!=/.test(c)){var f=b.call(a,c);if(f||!d||a.document&&a.document.nodeType!==11)return f}}catch(g){}return m(c,null,null,[a]).length>0}}}(),function(){var a=c.createElement("div");a.innerHTML="
          ";if(!!a.getElementsByClassName&&a.getElementsByClassName("e").length!==0){a.lastChild.className="e";if(a.getElementsByClassName("e").length===1)return;o.order.splice(1,0,"CLASS"),o.find.CLASS=function(a,b,c){if(typeof b.getElementsByClassName!="undefined"&&!c)return b.getElementsByClassName(a[1])},a=null}}(),c.documentElement.contains?m.contains=function(a,b){return a!==b&&(a.contains?a.contains(b):!0)}:c.documentElement.compareDocumentPosition?m.contains=function(a,b){return!!(a.compareDocumentPosition(b)&16)}:m.contains=function(){return!1},m.isXML=function(a){var b=(a?a.ownerDocument||a:0).documentElement;return b?b.nodeName!=="HTML":!1};var y=function(a,b,c){var d,e=[],f="",g=b.nodeType?[b]:b;while(d=o.match.PSEUDO.exec(a))f+=d[0],a=a.replace(o.match.PSEUDO,"");a=o.relative[a]?a+"*":a;for(var h=0,i=g.length;h0)for(h=g;h=0:f.filter(a,this).length>0:this.filter(a).length>0)},closest:function(a,b){var c=[],d,e,g=this[0];if(f.isArray(a)){var h=1;while(g&&g.ownerDocument&&g!==b){for(d=0;d-1:f.find.matchesSelector(g,a)){c.push(g);break}g=g.parentNode;if(!g||!g.ownerDocument||g===b||g.nodeType===11)break}}c=c.length>1?f.unique(c):c;return this.pushStack(c,"closest",a)},index:function(a){if(!a)return this[0]&&this[0].parentNode?this.prevAll().length:-1;if(typeof a=="string")return f.inArray(this[0],f(a));return f.inArray(a.jquery?a[0]:a,this)},add:function(a,b){var c=typeof a=="string"?f(a,b):f.makeArray(a&&a.nodeType?[a]:a),d=f.merge(this.get(),c);return this.pushStack(S(c[0])||S(d[0])?d:f.unique(d))},andSelf:function(){return this.add(this.prevObject)}}),f.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return f.dir(a,"parentNode")},parentsUntil:function(a,b,c){return f.dir(a,"parentNode",c)},next:function(a){return f.nth(a,2,"nextSibling")},prev:function(a){return f.nth(a,2,"previousSibling")},nextAll:function(a){return f.dir(a,"nextSibling")},prevAll:function(a){return f.dir(a,"previousSibling")},nextUntil:function(a,b,c){return f.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return f.dir(a,"previousSibling",c)},siblings:function(a){return f.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return f.sibling(a.firstChild)},contents:function(a){return f.nodeName(a,"iframe")?a.contentDocument||a.contentWindow.document:f.makeArray(a.childNodes)}},function(a,b){f.fn[a]=function(c,d){var e=f.map(this,b,c);L.test(a)||(d=c),d&&typeof d=="string"&&(e=f.filter(d,e)),e=this.length>1&&!R[a]?f.unique(e):e,(this.length>1||N.test(d))&&M.test(a)&&(e=e.reverse());return this.pushStack(e,a,P.call(arguments).join(","))}}),f.extend({filter:function(a,b,c){c&&(a=":not("+a+")");return b.length===1?f.find.matchesSelector(b[0],a)?[b[0]]:[]:f.find.matches(a,b)},dir:function(a,c,d){var e=[],g=a[c];while(g&&g.nodeType!==9&&(d===b||g.nodeType!==1||!f(g).is(d)))g.nodeType===1&&e.push(g),g=g[c];return e},nth:function(a,b,c,d){b=b||1;var e=0;for(;a;a=a[c])if(a.nodeType===1&&++e===b)break;return a},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling)a.nodeType===1&&a!==b&&c.push(a);return c}});var V="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",W=/ jQuery\d+="(?:\d+|null)"/g,X=/^\s+/,Y=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,Z=/<([\w:]+)/,$=/]","i"),bd=/checked\s*(?:[^=]|=\s*.checked.)/i,be=/\/(java|ecma)script/i,bf=/^\s*",""],legend:[1,"
          ","
          "],thead:[1,"","
          "],tr:[2,"","
          "],td:[3,"","
          "],col:[2,"","
          "],area:[1,"",""],_default:[0,"",""]},bh=U(c);bg.optgroup=bg.option,bg.tbody=bg.tfoot=bg.colgroup=bg.caption=bg.thead,bg.th=bg.td,f.support.htmlSerialize||(bg._default=[1,"div
          ","
          "]),f.fn.extend({text:function(a){return f.access(this,function(a){return a===b?f.text(this):this.empty().append((this[0]&&this[0].ownerDocument||c).createTextNode(a))},null,a,arguments.length)},wrapAll:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapAll(a.call(this,b))});if(this[0]){var b=f(a,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&b.insertBefore(this[0]),b.map(function(){var a=this;while(a.firstChild&&a.firstChild.nodeType===1)a=a.firstChild;return a}).append(this)}return this},wrapInner:function(a){if(f.isFunction(a))return this.each(function(b){f(this).wrapInner(a.call(this,b))});return this.each(function(){var b=f(this),c=b.contents();c.length?c.wrapAll(a):b.append(a)})},wrap:function(a){var b=f.isFunction(a);return this.each(function(c){f(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){f.nodeName(this,"body")||f(this).replaceWith(this.childNodes)}).end()},append:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.appendChild(a)})},prepend:function(){return this.domManip(arguments,!0,function(a){this.nodeType===1&&this.insertBefore(a,this.firstChild)})},before:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this)});if(arguments.length){var a=f +.clean(arguments);a.push.apply(a,this.toArray());return this.pushStack(a,"before",arguments)}},after:function(){if(this[0]&&this[0].parentNode)return this.domManip(arguments,!1,function(a){this.parentNode.insertBefore(a,this.nextSibling)});if(arguments.length){var a=this.pushStack(this,"after",arguments);a.push.apply(a,f.clean(arguments));return a}},remove:function(a,b){for(var c=0,d;(d=this[c])!=null;c++)if(!a||f.filter(a,[d]).length)!b&&d.nodeType===1&&(f.cleanData(d.getElementsByTagName("*")),f.cleanData([d])),d.parentNode&&d.parentNode.removeChild(d);return this},empty:function(){for(var a=0,b;(b=this[a])!=null;a++){b.nodeType===1&&f.cleanData(b.getElementsByTagName("*"));while(b.firstChild)b.removeChild(b.firstChild)}return this},clone:function(a,b){a=a==null?!1:a,b=b==null?a:b;return this.map(function(){return f.clone(this,a,b)})},html:function(a){return f.access(this,function(a){var c=this[0]||{},d=0,e=this.length;if(a===b)return c.nodeType===1?c.innerHTML.replace(W,""):null;if(typeof a=="string"&&!ba.test(a)&&(f.support.leadingWhitespace||!X.test(a))&&!bg[(Z.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(Y,"<$1>");try{for(;d1&&l0?this.clone(!0):this).get();f(e[h])[b](j),d=d.concat(j)}return this.pushStack(d,a,e.selector)}}),f.extend({clone:function(a,b,c){var d,e,g,h=f.support.html5Clone||f.isXMLDoc(a)||!bc.test("<"+a.nodeName+">")?a.cloneNode(!0):bo(a);if((!f.support.noCloneEvent||!f.support.noCloneChecked)&&(a.nodeType===1||a.nodeType===11)&&!f.isXMLDoc(a)){bk(a,h),d=bl(a),e=bl(h);for(g=0;d[g];++g)e[g]&&bk(d[g],e[g])}if(b){bj(a,h);if(c){d=bl(a),e=bl(h);for(g=0;d[g];++g)bj(d[g],e[g])}}d=e=null;return h},clean:function(a,b,d,e){var g,h,i,j=[];b=b||c,typeof b.createElement=="undefined"&&(b=b.ownerDocument||b[0]&&b[0].ownerDocument||c);for(var k=0,l;(l=a[k])!=null;k++){typeof l=="number"&&(l+="");if(!l)continue;if(typeof l=="string")if(!_.test(l))l=b.createTextNode(l);else{l=l.replace(Y,"<$1>");var m=(Z.exec(l)||["",""])[1].toLowerCase(),n=bg[m]||bg._default,o=n[0],p=b.createElement("div"),q=bh.childNodes,r;b===c?bh.appendChild(p):U(b).appendChild(p),p.innerHTML=n[1]+l+n[2];while(o--)p=p.lastChild;if(!f.support.tbody){var s=$.test(l),t=m==="table"&&!s?p.firstChild&&p.firstChild.childNodes:n[1]===""&&!s?p.childNodes:[];for(i=t.length-1;i>=0;--i)f.nodeName(t[i],"tbody")&&!t[i].childNodes.length&&t[i].parentNode.removeChild(t[i])}!f.support.leadingWhitespace&&X.test(l)&&p.insertBefore(b.createTextNode(X.exec(l)[0]),p.firstChild),l=p.childNodes,p&&(p.parentNode.removeChild(p),q.length>0&&(r=q[q.length-1],r&&r.parentNode&&r.parentNode.removeChild(r)))}var u;if(!f.support.appendChecked)if(l[0]&&typeof (u=l.length)=="number")for(i=0;i1)},f.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=by(a,"opacity");return c===""?"1":c}return a.style.opacity}}},cssNumber:{fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":f.support.cssFloat?"cssFloat":"styleFloat"},style:function(a,c,d,e){if(!!a&&a.nodeType!==3&&a.nodeType!==8&&!!a.style){var g,h,i=f.camelCase(c),j=a.style,k=f.cssHooks[i];c=f.cssProps[i]||i;if(d===b){if(k&&"get"in k&&(g=k.get(a,!1,e))!==b)return g;return j[c]}h=typeof d,h==="string"&&(g=bu.exec(d))&&(d=+(g[1]+1)*+g[2]+parseFloat(f.css(a,c)),h="number");if(d==null||h==="number"&&isNaN(d))return;h==="number"&&!f.cssNumber[i]&&(d+="px");if(!k||!("set"in k)||(d=k.set(a,d))!==b)try{j[c]=d}catch(l){}}},css:function(a,c,d){var e,g;c=f.camelCase(c),g=f.cssHooks[c],c=f.cssProps[c]||c,c==="cssFloat"&&(c="float");if(g&&"get"in g&&(e=g.get(a,!0,d))!==b)return e;if(by)return by(a,c)},swap:function(a,b,c){var d={},e,f;for(f in b)d[f]=a.style[f],a.style[f]=b[f];e=c.call(a);for(f in b)a.style[f]=d[f];return e}}),f.curCSS=f.css,c.defaultView&&c.defaultView.getComputedStyle&&(bz=function(a,b){var c,d,e,g,h=a.style;b=b.replace(br,"-$1").toLowerCase(),(d=a.ownerDocument.defaultView)&&(e=d.getComputedStyle(a,null))&&(c=e.getPropertyValue(b),c===""&&!f.contains(a.ownerDocument.documentElement,a)&&(c=f.style(a,b))),!f.support.pixelMargin&&e&&bv.test(b)&&bt.test(c)&&(g=h.width,h.width=c,c=e.width,h.width=g);return c}),c.documentElement.currentStyle&&(bA=function(a,b){var c,d,e,f=a.currentStyle&&a.currentStyle[b],g=a.style;f==null&&g&&(e=g[b])&&(f=e),bt.test(f)&&(c=g.left,d=a.runtimeStyle&&a.runtimeStyle.left,d&&(a.runtimeStyle.left=a.currentStyle.left),g.left=b==="fontSize"?"1em":f,f=g.pixelLeft+"px",g.left=c,d&&(a.runtimeStyle.left=d));return f===""?"auto":f}),by=bz||bA,f.each(["height","width"],function(a,b){f.cssHooks[b]={get:function(a,c,d){if(c)return a.offsetWidth!==0?bB(a,b,d):f.swap(a,bw,function(){return bB(a,b,d)})},set:function(a,b){return bs.test(b)?b+"px":b}}}),f.support.opacity||(f.cssHooks.opacity={get:function(a,b){return bq.test((b&&a.currentStyle?a.currentStyle.filter:a.style.filter)||"")?parseFloat(RegExp.$1)/100+"":b?"1":""},set:function(a,b){var c=a.style,d=a.currentStyle,e=f.isNumeric(b)?"alpha(opacity="+b*100+")":"",g=d&&d.filter||c.filter||"";c.zoom=1;if(b>=1&&f.trim(g.replace(bp,""))===""){c.removeAttribute("filter");if(d&&!d.filter)return}c.filter=bp.test(g)?g.replace(bp,e):g+" "+e}}),f(function(){f.support.reliableMarginRight||(f.cssHooks.marginRight={get:function(a,b){return f.swap(a,{display:"inline-block"},function(){return b?by(a,"margin-right"):a.style.marginRight})}})}),f.expr&&f.expr.filters&&(f.expr.filters.hidden=function(a){var b=a.offsetWidth,c=a.offsetHeight;return b===0&&c===0||!f.support.reliableHiddenOffsets&&(a.style&&a.style.display||f.css(a,"display"))==="none"},f.expr.filters.visible=function(a){return!f.expr.filters.hidden(a)}),f.each({margin:"",padding:"",border:"Width"},function(a,b){f.cssHooks[a+b]={expand:function(c){var d,e=typeof c=="string"?c.split(" "):[c],f={};for(d=0;d<4;d++)f[a+bx[d]+b]=e[d]||e[d-2]||e[0];return f}}});var bC=/%20/g,bD=/\[\]$/,bE=/\r?\n/g,bF=/#.*$/,bG=/^(.*?):[ \t]*([^\r\n]*)\r?$/mg,bH=/^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,bI=/^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,bJ=/^(?:GET|HEAD)$/,bK=/^\/\//,bL=/\?/,bM=/)<[^<]*)*<\/script>/gi,bN=/^(?:select|textarea)/i,bO=/\s+/,bP=/([?&])_=[^&]*/,bQ=/^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,bR=f.fn.load,bS={},bT={},bU,bV,bW=["*/"]+["*"];try{bU=e.href}catch(bX){bU=c.createElement("a"),bU.href="",bU=bU.href}bV=bQ.exec(bU.toLowerCase())||[],f.fn.extend({load:function(a,c,d){if(typeof a!="string"&&bR)return bR.apply(this,arguments);if(!this.length)return this;var e=a.indexOf(" ");if(e>=0){var g=a.slice(e,a.length);a=a.slice(0,e)}var h="GET";c&&(f.isFunction(c)?(d=c,c=b):typeof c=="object"&&(c=f.param(c,f.ajaxSettings.traditional),h="POST"));var i=this;f.ajax({url:a,type:h,dataType:"html",data:c,complete:function(a,b,c){c=a.responseText,a.isResolved()&&(a.done(function(a){c=a}),i.html(g?f("
          ").append(c.replace(bM,"")).find(g):c)),d&&i.each(d,[c,b,a])}});return this},serialize:function(){return f.param(this.serializeArray())},serializeArray:function(){return this.map(function(){return this.elements?f.makeArray(this.elements):this}).filter(function(){return this.name&&!this.disabled&&(this.checked||bN.test(this.nodeName)||bH.test(this.type))}).map(function(a,b){var c=f(this).val();return c==null?null:f.isArray(c)?f.map(c,function(a,c){return{name:b.name,value:a.replace(bE,"\r\n")}}):{name:b.name,value:c.replace(bE,"\r\n")}}).get()}}),f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "),function(a,b){f.fn[b]=function(a){return this.on(b,a)}}),f.each(["get","post"],function(a,c){f[c]=function(a,d,e,g){f.isFunction(d)&&(g=g||e,e=d,d=b);return f.ajax({type:c,url:a,data:d,success:e,dataType:g})}}),f.extend({getScript:function(a,c){return f.get(a,b,c,"script")},getJSON:function(a,b,c){return f.get(a,b,c,"json")},ajaxSetup:function(a,b){b?b$(a,f.ajaxSettings):(b=a,a=f.ajaxSettings),b$(a,b);return a},ajaxSettings:{url:bU,isLocal:bI.test(bV[1]),global:!0,type:"GET",contentType:"application/x-www-form-urlencoded; charset=UTF-8",processData:!0,async:!0,accepts:{xml:"application/xml, text/xml",html:"text/html",text:"text/plain",json:"application/json, text/javascript","*":bW},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText"},converters:{"* text":a.String,"text html":!0,"text json":f.parseJSON,"text xml":f.parseXML},flatOptions:{context:!0,url:!0}},ajaxPrefilter:bY(bS),ajaxTransport:bY(bT),ajax:function(a,c){function w(a,c,l,m){if(s!==2){s=2,q&&clearTimeout(q),p=b,n=m||"",v.readyState=a>0?4:0;var o,r,u,w=c,x=l?ca(d,v,l):b,y,z;if(a>=200&&a<300||a===304){if(d.ifModified){if(y=v.getResponseHeader("Last-Modified"))f.lastModified[k]=y;if(z=v.getResponseHeader("Etag"))f.etag[k]=z}if(a===304)w="notmodified",o=!0;else try{r=cb(d,x),w="success",o=!0}catch(A){w="parsererror",u=A}}else{u=w;if(!w||a)w="error",a<0&&(a=0)}v.status=a,v.statusText=""+(c||w),o?h.resolveWith(e,[r,w,v]):h.rejectWith(e,[v,w,u]),v.statusCode(j),j=b,t&&g.trigger("ajax"+(o?"Success":"Error"),[v,d,o?r:u]),i.fireWith(e,[v,w]),t&&(g.trigger("ajaxComplete",[v,d]),--f.active||f.event.trigger("ajaxStop"))}}typeof a=="object"&&(c=a,a=b),c=c||{};var d=f.ajaxSetup({},c),e=d.context||d,g=e!==d&&(e.nodeType||e instanceof f)?f(e):f.event,h=f.Deferred(),i=f.Callbacks("once memory"),j=d.statusCode||{},k,l={},m={},n,o,p,q,r,s=0,t,u,v={readyState:0,setRequestHeader:function(a,b){if(!s){var c=a.toLowerCase();a=m[c]=m[c]||a,l[a]=b}return this},getAllResponseHeaders:function(){return s===2?n:null},getResponseHeader:function(a){var c;if(s===2){if(!o){o={};while(c=bG.exec(n))o[c[1].toLowerCase()]=c[2]}c=o[a.toLowerCase()]}return c===b?null:c},overrideMimeType:function(a){s||(d.mimeType=a);return this},abort:function(a){a=a||"abort",p&&p.abort(a),w(0,a);return this}};h.promise(v),v.success=v.done,v.error=v.fail,v.complete=i.add,v.statusCode=function(a){if(a){var b;if(s<2)for(b in a)j[b]=[j[b],a[b]];else b=a[v.status],v.then(b,b)}return this},d.url=((a||d.url)+"").replace(bF,"").replace(bK,bV[1]+"//"),d.dataTypes=f.trim(d.dataType||"*").toLowerCase().split(bO),d.crossDomain==null&&(r=bQ.exec(d.url.toLowerCase()),d.crossDomain=!(!r||r[1]==bV[1]&&r[2]==bV[2]&&(r[3]||(r[1]==="http:"?80:443))==(bV[3]||(bV[1]==="http:"?80:443)))),d.data&&d.processData&&typeof d.data!="string"&&(d.data=f.param(d.data,d.traditional)),bZ(bS,d,c,v);if(s===2)return!1;t=d.global,d.type=d.type.toUpperCase(),d.hasContent=!bJ.test(d.type),t&&f.active++===0&&f.event.trigger("ajaxStart");if(!d.hasContent){d.data&&(d.url+=(bL.test(d.url)?"&":"?")+d.data,delete d.data),k=d.url;if(d.cache===!1){var x=f.now(),y=d.url.replace(bP,"$1_="+x);d.url=y+(y===d.url?(bL.test(d.url)?"&":"?")+"_="+x:"")}}(d.data&&d.hasContent&&d.contentType!==!1||c.contentType)&&v.setRequestHeader("Content-Type",d.contentType),d.ifModified&&(k=k||d.url,f.lastModified[k]&&v.setRequestHeader("If-Modified-Since",f.lastModified[k]),f.etag[k]&&v.setRequestHeader("If-None-Match",f.etag[k])),v.setRequestHeader("Accept",d.dataTypes[0]&&d.accepts[d.dataTypes[0]]?d.accepts[d.dataTypes[0]]+(d.dataTypes[0]!=="*"?", "+bW+"; q=0.01":""):d.accepts["*"]);for(u in d.headers)v.setRequestHeader(u,d.headers[u]);if(d.beforeSend&&(d.beforeSend.call(e,v,d)===!1||s===2)){v.abort();return!1}for(u in{success:1,error:1,complete:1})v[u](d[u]);p=bZ(bT,d,c,v);if(!p)w(-1,"No Transport");else{v.readyState=1,t&&g.trigger("ajaxSend",[v,d]),d.async&&d.timeout>0&&(q=setTimeout(function(){v.abort("timeout")},d.timeout));try{s=1,p.send(l,w)}catch(z){if(s<2)w(-1,z);else throw z}}return v},param:function(a,c){var d=[],e=function(a,b){b=f.isFunction(b)?b():b,d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};c===b&&(c=f.ajaxSettings.traditional);if(f.isArray(a)||a.jquery&&!f.isPlainObject(a))f.each(a,function(){e(this.name,this.value)});else for(var g in a)b_(g,a[g],c,e);return d.join("&").replace(bC,"+")}}),f.extend({active:0,lastModified:{},etag:{}});var cc=f.now(),cd=/(\=)\?(&|$)|\?\?/i;f.ajaxSetup({jsonp:"callback",jsonpCallback:function(){return f.expando+"_"+cc++}}),f.ajaxPrefilter("json jsonp",function(b,c,d){var e=typeof b.data=="string"&&/^application\/x\-www\-form\-urlencoded/.test(b.contentType);if(b.dataTypes[0]==="jsonp"||b.jsonp!==!1&&(cd.test(b.url)||e&&cd.test(b.data))){var g,h=b.jsonpCallback=f.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback,i=a[h],j=b.url,k=b.data,l="$1"+h+"$2";b.jsonp!==!1&&(j=j.replace(cd,l),b.url===j&&(e&&(k=k.replace(cd,l)),b.data===k&&(j+=(/\?/.test(j)?"&":"?")+b.jsonp+"="+h))),b.url=j,b.data=k,a[h]=function(a){g=[a]},d.always(function(){a[h]=i,g&&f.isFunction(i)&&a[h](g[0])}),b.converters["script json"]=function(){g||f.error(h+" was not called");return g[0]},b.dataTypes[0]="json";return"script"}}),f.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/javascript|ecmascript/},converters:{"text script":function(a){f.globalEval(a);return a}}}),f.ajaxPrefilter("script",function(a){a.cache===b&&(a.cache=!1),a.crossDomain&&(a.type="GET",a.global=!1)}),f.ajaxTransport("script",function(a){if(a.crossDomain){var d,e=c.head||c.getElementsByTagName("head")[0]||c.documentElement;return{send:function(f,g){d=c.createElement("script"),d.async="async",a.scriptCharset&&(d.charset=a.scriptCharset),d.src=a.url,d.onload=d.onreadystatechange=function(a,c){if(c||!d.readyState||/loaded|complete/.test(d.readyState))d.onload=d.onreadystatechange=null,e&&d.parentNode&&e.removeChild(d),d=b,c||g(200,"success")},e.insertBefore(d,e.firstChild)},abort:function(){d&&d.onload(0,1)}}}});var ce=a.ActiveXObject?function(){for(var a in cg)cg[a](0,1)}:!1,cf=0,cg;f.ajaxSettings.xhr=a.ActiveXObject?function(){return!this.isLocal&&ch()||ci()}:ch,function(a){f.extend(f.support,{ajax:!!a,cors:!!a&&"withCredentials"in a})}(f.ajaxSettings.xhr()),f.support.ajax&&f.ajaxTransport(function(c){if(!c.crossDomain||f.support.cors){var d;return{send:function(e,g){var h=c.xhr(),i,j;c.username?h.open(c.type,c.url,c.async,c.username,c.password):h.open(c.type,c.url,c.async);if(c.xhrFields)for(j in c.xhrFields)h[j]=c.xhrFields[j];c.mimeType&&h.overrideMimeType&&h.overrideMimeType(c.mimeType),!c.crossDomain&&!e["X-Requested-With"]&&(e["X-Requested-With"]="XMLHttpRequest");try{for(j in e)h.setRequestHeader(j,e[j])}catch(k){}h.send(c.hasContent&&c.data||null),d=function(a,e){var j,k,l,m,n;try{if(d&&(e||h.readyState===4)){d=b,i&&(h.onreadystatechange=f.noop,ce&&delete cg[i]);if(e)h.readyState!==4&&h.abort();else{j=h.status,l=h.getAllResponseHeaders(),m={},n=h.responseXML,n&&n.documentElement&&(m.xml=n);try{m.text=h.responseText}catch(a){}try{k=h.statusText}catch(o){k=""}!j&&c.isLocal&&!c.crossDomain?j=m.text?200:404:j===1223&&(j=204)}}}catch(p){e||g(-1,p)}m&&g(j,k,m,l)},!c.async||h.readyState===4?d():(i=++cf,ce&&(cg||(cg={},f(a).unload(ce)),cg[i]=d),h.onreadystatechange=d)},abort:function(){d&&d(0,1)}}}});var cj={},ck,cl,cm=/^(?:toggle|show|hide)$/,cn=/^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,co,cp=[["height","marginTop","marginBottom","paddingTop","paddingBottom"],["width","marginLeft","marginRight","paddingLeft","paddingRight"],["opacity"]],cq;f.fn.extend({show:function(a,b,c){var d,e;if(a||a===0)return this.animate(ct("show",3),a,b,c);for(var g=0,h=this.length;g=i.duration+this.startTime){this.now=this.end,this.pos=this.state=1,this.update(),i.animatedProperties[this.prop]=!0;for(b in i.animatedProperties)i.animatedProperties[b]!==!0&&(g=!1);if(g){i.overflow!=null&&!f.support.shrinkWrapBlocks&&f.each(["","X","Y"],function(a,b){h.style["overflow"+b]=i.overflow[a]}),i.hide&&f(h).hide();if(i.hide||i.show)for(b in i.animatedProperties)f.style(h,b,i.orig[b]),f.removeData(h,"fxshow"+b,!0),f.removeData(h,"toggle"+b,!0);d=i.complete,d&&(i.complete=!1,d.call(h))}return!1}i.duration==Infinity?this.now=e:(c=e-this.startTime,this.state=c/i.duration,this.pos=f.easing[i.animatedProperties[this.prop]](this.state,c,0,1,i.duration),this.now=this.start+(this.end-this.start)*this.pos),this.update();return!0}},f.extend(f.fx,{tick:function(){var a,b=f.timers,c=0;for(;c-1,k={},l={},m,n;j?(l=e.position(),m=l.top,n=l.left):(m=parseFloat(h)||0,n=parseFloat(i)||0),f.isFunction(b)&&(b=b.call(a,c,g)),b.top!=null&&(k.top=b.top-g.top+m),b.left!=null&&(k.left=b.left-g.left+n),"using"in b?b.using.call(a,k):e.css(k)}},f.fn.extend({position:function(){if(!this[0])return null;var a=this[0],b=this.offsetParent(),c=this.offset(),d=cx.test(b[0].nodeName)?{top:0,left:0}:b.offset();c.top-=parseFloat(f.css(a,"marginTop"))||0,c.left-=parseFloat(f.css(a,"marginLeft"))||0,d.top+=parseFloat(f.css(b[0],"borderTopWidth"))||0,d.left+=parseFloat(f.css(b[0],"borderLeftWidth"))||0;return{top:c.top-d.top,left:c.left-d.left}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||c.body;while(a&&!cx.test(a.nodeName)&&f.css(a,"position")==="static")a=a.offsetParent;return a})}}),f.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(a,c){var d=/Y/.test(c);f.fn[a]=function(e){return f.access(this,function(a,e,g){var h=cy(a);if(g===b)return h?c in h?h[c]:f.support.boxModel&&h.document.documentElement[e]||h.document.body[e]:a[e];h?h.scrollTo(d?f(h).scrollLeft():g,d?g:f(h).scrollTop()):a[e]=g},a,e,arguments.length,null)}}),f.each({Height:"height",Width:"width"},function(a,c){var d="client"+a,e="scroll"+a,g="offset"+a;f.fn["inner"+a]=function(){var a=this[0];return a?a.style?parseFloat(f.css(a,c,"padding")):this[c]():null},f.fn["outer"+a]=function(a){var b=this[0];return b?b.style?parseFloat(f.css(b,c,a?"margin":"border")):this[c]():null},f.fn[c]=function(a){return f.access(this,function(a,c,h){var i,j,k,l;if(f.isWindow(a)){i=a.document,j=i.documentElement[d];return f.support.boxModel&&j||i.body&&i.body[d]||j}if(a.nodeType===9){i=a.documentElement;if(i[d]>=i[e])return i[d];return Math.max(a.body[e],i[e],a.body[g],i[g])}if(h===b){k=f.css(a,c),l=parseFloat(k);return f.isNumeric(l)?l:k}f(a).css(c,h)},c,a,arguments.length,null)}}),a.jQuery=a.$=f,typeof define=="function"&&define.amd&&define.amd.jQuery&&define("jquery",[],function(){return f})})(window); \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/Api/Admin.php b/src/bb-modules/Formbuilder/Api/Admin.php new file mode 100644 index 000000000..1d309a801 --- /dev/null +++ b/src/bb-modules/Formbuilder/Api/Admin.php @@ -0,0 +1,318 @@ +getService(); + $formId = $service->addNewForm($data); + + return $formId; + } + + /** + * Add new field to form + * + * @param string $type - Field type + * @param int $form_id - ID of the field form + * + * @optional + * @optional string $label - Label of the field which will be shown. Default value "Type X" where X is number of fields in form. For example "Checkbox 2" + * @optional string $name - Name of the field. Dafault value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2" + * @optional bool $hide_label - Option either hide label of field or not + * @optional string $description - Description of a field + * @optional mixed $default_value - Default value of field. If field is checkbox or radio this variable must be array, otherwise it is string + * @optional bool $required - Option wither field need to have "required" attribute (Not applicable for checkboxes) + * @optional bool $hidden - Option either field should be hidden + * @optional bool $readonly - Option either field needs to be readonly + * @optional string $prefix - Prefix for "text" type fields + * @optional string $suffix - Suffix for "text" type fields + * @optional array $options - Array of options for "select", "checkbox" and "radio" type fields. Key represents label and value will be field's value. Array must be unique. + * @optional bool $show_initial - Either show initial or not + * @optional bool $show_middle - Either show middle or not + * @optional bool $show_prefix - Either to show prefix or not + * @optional bool $show_suffix - Either to show suffix or not + * @optional int $text_size - Prefered text size + * + * @return int - ID of created field + * @throws Box_Exception + */ + public function add_field($data) + { + $service = $this->getService(); + if (!isset($data['type']) || !$service->typeValidation($data['type'])) { + throw new \Box_Exception('Form field type is not valid', null, 2684); + } + if (isset($data['options']) && is_array(($data['options'])) && !$service->isArrayUnique($data['options'])) { + throw new \Box_Exception('This input type must have unique values', null, 3658); + } + if (!isset($data['form_id'])) { + throw new \Box_Exception('Form id was not passed', null, 9846); + } + + $fieldId = $service->addNewField($data); + return $fieldId; + } + + /** + * Get form data by it's id + * + * @param int $id - ID of the form + * + * @return array + * @throws Box_Exception + */ + + public function get_form($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Form id was not passed', null, 2391); + } + + $service = $this->getService(); + return $service->getForm($data['id']); + } + + /** + * Get fields data by form's id + * + * @param int $form_id - ID of form + * + * @return array + * @throws Box_Exception + */ + public function get_form_fields($data) + { + if (!isset($data['form_id'])) { + throw new \Box_Exception('Form id was not passed', null, 1822); + } + + $service = $this->getService(); + $fields = $service->getFormFields($data['form_id']); + + return $fields; + } + + + /** + * Get field data by field id + * + * @param int $id - ID of the fields + * + * @return array + * @throws Box_Exception + */ + public function get_field($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Field id was not passed', null, 3547); + } + + $service = $this->getService(); + $field = $service->getField($data['id']); + + return $field; + } + + /** + * Get array of forms + * + * + * + * @return multidimensional array + * @throws Box_Exception + */ + public function get_forms() + { + $service = $this->getService(); + $forms = $service->getForms(); + return $forms; + } + + /** + * Delete form and it's form fields + * + * @param int $id - ID of the form + * + * @return bool + * @throws Box_Exception + */ + public function delete_form($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Form id was not passed', null, 9958); + } + $service = $this->getService(); + $service->removeForm($data['id']); + return true; + } + + + /** + * Delete field by id + * + * @param int $id - ID of the field + * + * @return bool + * @throws Box_Exception + */ + public function delete_field($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Field id was not passed', null, 9959); + } + $service = $this->getService(); + $service->removeField($data); + return true; + } + + + + /** + * Update form + * + * @param array + * + * @param string $type - Field type + * @param int $form_id - ID of the field form + * + * @optional + * @optional string $label - Label of the field which will be shown. Default value "Type X" where X is number of fields in form. For example "Checkbox 2" + * @optional string $name - Name of the field. Dafault value "new_type_X" where X is number of fields in the form. For example "new_checkbox_2" + * @optional bool $hide_label - Option either hide label of field or not + * @optional string $description - Description of a field + * @optional mixed $default_value - Default value of field. If field is checkbox or radio this variable must be array, otherwise it is string + * @optional bool $required - Option wither field need to have "required" attribute (Not applicable for checkboxes) + * @optional bool $hidden - Option either field should be hidden + * @optional bool $readonly - Option either field needs to be readonly + * @optional string $prefix - Prefix for "text" type fields + * @optional string $suffix - Suffix for "text" type fields + * @optional array $options - Array of options for "select", "checkbox" and "radio" type fields. Key represents label and value will be field's value. Array must be unique. + * @optional bool $show_initial - Either show initial or not + * @optional bool $show_middle - Either show middle or not + * @optional bool $show_prefix - Eithor to show prefix or not + * @optional bool $show_suffix - Either to show suffix or not + * @optional int $text_size - Prefered text size + * + * @return int - ID of the field + * @throws Box_Exception + */ + public function update_field($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Field id was not passed', null, 9958); + } + + $service = $this->getService(); + if (isset($data['options']) && !$service->isArrayUnique($data['options'])) { + throw new \Box_Exception('This input type must have unique values', null, 3658); + } + + $fieldId = $service->updateField($data); + + return $fieldId; + } + + + /** + * Get form pairs + * + * @return mixed + */ + public function get_pairs($data) + { + $service = $this->getService(); + return $service->getFormPairs(); + } + + + /** + * Dublicate form with its fields in database + * + * @param int $form_id - ID of the origin form + * @param string $name - Name of copied form + * + * + * @return int - ID of the new form + * @throws Box_Exception + */ + public function copy_form($data) + { + if (!isset($data['form_id'])) { + throw new \Box_Exception('Form id was not passed', null, 9958); + } + if (!isset($data['name'])) { + throw new \Box_Exception('Form name was not passed', null, 9842); + } + + $service = $this->getService(); + $new_form_id = $service->dublicateForm($data); + return $new_form_id; + } + + /** + * Update form name and style + * + * @param int $form_id - ID of the form + * @param string $form_name - New name of the form + * + * @return bool + */ + public function update_form_settings($data) + { + if (!isset($data['form_id']) || (trim($data['form_id']) == "")) { + throw new \Box_Exception('Form id was not passed', null, 1654); + } + if (!isset($data['form_name'])) { + throw new \Box_Exception('Form name was not passed', null, 9241); + } + + if (!isset($data['type'])) { + throw new \Box_Exception('Form type was not passed', null, 3794); + } + + if ($data['type'] !='horizontal' && $data['type'] != 'default') { + throw new \Box_Exception('Field type not supported', null, 3207); + } + + $service = $this->getService(); + return $service->updateFormSettings($data); + + } + + +} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/Api/Guest.php b/src/bb-modules/Formbuilder/Api/Guest.php new file mode 100644 index 000000000..1fb9c9387 --- /dev/null +++ b/src/bb-modules/Formbuilder/Api/Guest.php @@ -0,0 +1,37 @@ +getService(); + return $service->getForm($data['id']); + } +} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/Controller/Client.php b/src/bb-modules/Formbuilder/Controller/Client.php new file mode 100644 index 000000000..3686a01d0 --- /dev/null +++ b/src/bb-modules/Formbuilder/Controller/Client.php @@ -0,0 +1,45 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/formbuilder/:id', 'get_form', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_form(\Box_App $app, $id) + { + return $app->render('mod_formbuilder_build', array('id'=>$id)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/Service.php b/src/bb-modules/Formbuilder/Service.php new file mode 100644 index 000000000..295602832 --- /dev/null +++ b/src/bb-modules/Formbuilder/Service.php @@ -0,0 +1,419 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + + public function getFormFieldsTypes() + { + return array( + "text" => 'Text input', + "select" => 'Dropdown', + "radio" => 'Radio select', + "checkbox" => 'Checkbox', + "textarea" => 'Text area' + ); + } + + public function typeValidation($type) + { + return array_key_exists($type, $this->getFormFieldsTypes()); + } + + public function isArrayUnique($data) + { + $unique = array_unique($data); + return (count($data) === count($unique)); + + } + + public function addNewForm($data) + { + $data["style"]["type"] = isset ($data["type"])? $data["type"] : "horizontal"; + $data["style"]["show_title"] = isset ($data["show_title"])? $data["show_title"] : "0"; + $data["style"] = json_encode($data["style"],JSON_FORCE_OBJECT); + + $bean = $this->di['db']->dispense('Form'); + $bean->name = $data['name']; + $bean->style = $data['style']; + $bean->created_at = date('c'); + $bean->updated_at = date('c'); + + $form_id = $this->di['db']->store($bean); + $this->di['logger']->info('Created new form %s with id %s', $data['name'], $form_id); + return $form_id; + } + + public function addNewField($field) //TODO server-side required check + { + $field_number = (int)$this->getFormFieldsCount($field['form_id']) + 1; + + $formId = $field['form_id']; + $types = $this->getFormFieldsTypes(); + $type = $field["type"]; + $label = isset($field['label']) ? $field['label'] : $types[$type] . " " . $field_number; + $name = isset($field['name']) ? $field['name'] : ($this->slugify("new_" . $type) . "_" . $field_number); + + + if ($type == "select" || $type == "checkbox" || $type == "radio") { + $field['options'] = '{"First option":"1", "Second option": "2", "Third option":"3"}'; + } + if ($field['type'] == "textarea" && !isset($field['options'])) { + $field['options'] = '{"height":"100", "width": "300"}'; + } + if (isset($field['default_value'])) { + $field['default_value'] = is_array($field['default_value']) ? json_encode($field['default_value'], JSON_FORCE_OBJECT) : $field['default_value']; + } + if (isset ($field['options']) && is_array($field['options'])) { + $field['options'] = json_encode($field['options'], JSON_FORCE_OBJECT); + } + $bean = $this->di['db']->dispense('FormField'); + $bean->form_id = $formId; + $bean->name = $name; + $bean->label = $label; + $bean->hide_label = isset($field['hide_label']) ? $field['hide_label'] : null; + $bean->description = isset($field['description']) ? $field['description'] : null; + $bean->type = $field['type']; + $bean->default_value = isset($field['default_value']) ? $field['default_value'] : null; + $bean->required = isset($field['required']) ? $field['required'] : null; + $bean->hidden = isset($field['hidden']) ? $field['hidden'] : null; + $bean->readonly = isset($field['readonly']) ? $field['readonly'] : null; + $bean->options = isset($field['options']) ? $field['options'] : null; + $bean->prefix = isset($field['prefix']) ? $field['prefix'] : null; + $bean->suffix = isset($field['suffix']) ? $field['suffix'] : null; + $bean->show_initial = isset($field['show_initial']) ? $field['show_initial'] : null; + $bean->show_middle = isset($field['show_middle']) ? $field['show_middle'] : null; + $bean->show_prefix = isset($field['show_prefix']) ? $field['show_prefix'] : null; + $bean->show_suffix = isset ($field['show_suffix']) ? $field['show_suffix'] : null; + $bean->text_size = isset($field['text_size']) ? $field['text_size'] : null; + $bean->created_at = date('c'); + $bean->updated_at = date('c'); + + $fieldId = $this->di['db']->store($bean); + $this->di['logger']->info('Added new field %s to form %s', $fieldId, $field['form_id']); + + return $fieldId; + } + + + private function slugify($text) + { + + // replace non letter or digits by _ + $text = preg_replace('~[^\\pL\d]+~u', '_', $text); + + // trim + $text = trim($text, '_'); + + // transliterate + $text = iconv('utf-8', 'us-ascii//TRANSLIT', $text); + + // lowercase + $text = strtolower($text); + + // remove unwanted characters + $text = preg_replace('~[^-\w]+~', '', $text); + + if (is_numeric(substr($text, 0, 1))) { + throw new \Box_Exception ('Field name can not start with number.', null, 1649); + } + + if (empty($text)) { + throw new \Box_Exception ('Field name can not be empty. Please make sure it is not empty and does not contain special characters.', null, 3502); + } + + return $text; + } + + + public function updateField($field) + { + $fieldId = $field['id']; + + $label = isset($field['label']) ? $field['label'] : 'New field'; + $name = $this->slugify($field['name']); + + $get_field = $this->getField($field['id']); + $field['form_id'] = $get_field['form_id']; + + if ($this->formFieldNameExists(array("form_id" => $field["form_id"], "field_name" => $field["name"], "field_id" => $fieldId))) { + throw new \Box_Exception ('Unfortunately field with this name exists in this form already. Form must have different field names.', null, 7628); + } + + $field['options'] = isset($field['options']) ? json_encode($field['options']) : ""; + if (isset($field['default_value'])) { + $field['default_value'] = is_array($field['default_value']) ? json_encode($field['default_value'], JSON_FORCE_OBJECT) : $field['default_value']; + } + + if (isset($field['type'])) { + if ($field['type'] == "checkbox" || $field['type'] == "radio" || $field['type'] == "select") { + if (!$this->isArrayUnique(array_filter($field['values'], 'strlen'))) { + throw new \Box_Exception(ucfirst($field['type']) . ' values must be unique', null, 1597); + } + if (!$this->isArrayUnique(array_filter($field['labels'], 'strlen'))) { + throw new \Box_Exception(ucfirst($field['type']) . ' labels must be unique', null, 1598); + } + $field['options'] = array_combine($field['labels'], $field['values']); + $field['options'] = array_filter($field['options'], 'strlen'); + $field['options'] = json_encode($field['options'], JSON_FORCE_OBJECT); + } + if ($field['type'] == "textarea") { + if (count($field['textarea_size']) != count(array_filter($field['textarea_size'], 'is_numeric'))) { + throw new \Box_Exception('Textarea size options must be integer values', null, 3510); + } + $field['options'] = array_combine($field['textarea_option'], $field['textarea_size']); + $field['options'] = json_encode($field['options'], JSON_FORCE_OBJECT); + } + } + + $bean = $this->di['db']->dispense('FormField'); + $bean->id = $fieldId; + $bean->name = $name; + $bean->label = $label; + $bean->hide_label = isset($field['hide_label']) ? $field['hide_label'] : null; + $bean->description = isset($field['description']) ? $field['description'] : null; + $bean->default_value = isset($field['default_value']) ? $field['default_value'] : null; + $bean->required = isset($field['required']) ? $field['required'] : null; + $bean->hidden = isset($field['hidden']) ? $field['hidden'] : null; + $bean->readonly = isset($field['readonly']) ? $field['readonly'] : null; + $bean->options = $field['options']; + $bean->prefix = isset($field['prefix']) ? $field['prefix'] : null; + $bean->suffix = isset ($field['suffix']) ? $field['suffix'] : null; + $bean->show_initial = isset($field['show_initial']) ? $field['show_initial'] : null; + $bean->show_middle = isset($field['show_middle']) ? $field['show_middle'] : null; + $bean->show_prefix = isset($field['show_prefix']) ? $field['show_prefix'] : null; + $bean->show_suffix = isset($field['show_suffix']) ? $field['show_suffix'] : null; + $bean->text_size = isset($field['text_size']) ? $field['text_size'] : null; + $bean->updated_at = date('c'); + + $this->di['db']->store($bean); + $this->di['logger']->info('Updated custom form %s', $fieldId); + return $fieldId; + } + + public function getForm($formId) + { + $formModel = $this->di['db']->load('Form', $formId); + if (!$formModel instanceof \Model_Form) { + throw new \Box_Exception('Form not found', null, 9632); + } + $result = $this->di['db']->toArray($formModel); + + $result['style'] = json_decode($result['style'], true); + $result['fields'] = $this->getFormFields($result['id']); + $result['fields'] = $this->fieldsJsonDecode($result['fields']); + return $result; + } + + public function getFormFields($formId) + { + $sql = (" + SELECT * + FROM form_field + WHERE form_id = :form_id + ORDER BY ID asc + "); + $result = $this->di['db']->getAll($sql, array(':form_id' => $formId)); + return $result; + + } + + private function fieldsJsonDecode($fields) + { + foreach ($fields as $key => $r) { + $fields[$key]['options'] = json_decode($r['options'], true); + $fields[$key]['default_value'] = (json_decode($r['default_value'])) ? (json_decode($r['default_value'], true)) : $r['default_value']; + } + return $fields; + } + + public function getFormFieldsCount($form_id) + { + $sql = (" + SELECT COUNT(*) + FROM form_field + WHERE form_id = :form_id + "); + + return $this->di['db']->getCell($sql, array(':form_id' => $form_id)); + } + + + public function getFormPairs() + { + $sql = " + SELECT id, name + FROM form + "; + + return $this->di['db']->getAssoc($sql); + } + + public function getField($fieldId) + { + $field = $this->di['db']->load('FormField', $fieldId); + if (!$field instanceof \Model_FormField){ + throw new \Box_Exception ("Field was not found", null, 2575); + } + $result = $this->di['db']->toArray($field); + if (!isset($result['id'])) { + throw new \Box_Exception ("Field was not found", null, 2575); + } + if (substr($result["options"], 0, 1) == "{" || substr($result["options"], 0, 1) == "[") { + $result['options'] = json_decode($result['options']); + } + return $result; + + } + + public function removeForm($form_id) + { + $sql = "DELETE + FROM form_field + WHERE form_id = ? + "; + $this->di['db']->exec($sql, array($form_id)); + + $sql2 = "DELETE + FROM form + WHERE id = ?"; + $this->di['db']->exec($sql2, array($form_id)); + + $sql3 = "UPDATE product + SET form_id = NULL + WHERE form_id = ? + "; + $this->di['db']->exec($sql3, array($form_id)); + + $sql4 = "UPDATE client_order + SET form_id = NULL + WHERE form_id = :form_id + "; + $this->di['db']->exec($sql4, array(':form_id' => $form_id)); + + $this->di['logger']->info('Deleted custom form %s', $form_id); + return true; + } + + public function removeField($data) + { + $fieldModel = $this->di['db']->load('FormField', $data['id']); + if (!$fieldModel instanceof \Model_FormField){ + throw new \Box_Exception ("Field was not found", null, 1641); + } + + $this->di['db']->trash($fieldModel); + $this->di['logger']->info('Deleted custom field %s', $data['id']); + return true; + } + + + public function formFieldNameExists($data) + { + $form_id = $data['form_id']; + $field_name = $data['field_name']; + $field_id = $data['field_id']; + $sql = (" + SELECT COUNT( * ) + FROM `form_field` + WHERE form_id = :form_id + AND name = :field_name + AND id != :field_id + "); + + $result = $this->di['db']->findOne('FormField', 'form_id = ? and name = ? and id != ?', array($form_id, $field_name, $field_id)); + return ($result) ? true : false; + } + + public function getForms() + { + $sql = (" + SELECT f.id, f.name, COUNT( p.id ) as product_count, COUNT( co.id ) as order_count + FROM `form` f + LEFT JOIN product p ON (f.id = p.form_id) + LEFT JOIN client_order co ON (f.id = co.form_id) + GROUP BY f.id + "); + + return $this->di['db']->getAll($sql); + } + + public function dublicateForm($data) + { + + $fields = $this->getFormFields($data['form_id']); + $new_form_id = $this->addNewForm(array( + "name" => $data['name'] + )); + + if (isset($fields) && is_array($fields)) { + foreach ($fields as $field_data) { + $field_data['form_id'] = $new_form_id; + $this->addNewField($field_data); + } + } + $this->di['logger']->info('Copied form with id %s to new form %s with id %s', $data['form_id'], $data['name'], $new_form_id); + return $new_form_id; + } + + public function updateFormSettings($data) + { + $show_title = isset($data['show_title'])? $data['show_title'] : "1"; + $type = $data['type']; + + $sql = "UPDATE `form` + SET `name` = :form_name + WHERE id = :id"; + $this->di['db']->exec($sql, array(':form_name' => $data['form_name'], ':id' => $data['form_id'])); + + $this->di['logger']->info('Updated form %s name to %s', $data['form_id'], $data['form_name']); + + $style = array( + "type" => $type, + "show_title" => $show_title + ); + + $sql2 = "UPDATE `form` + SET `style` = :type + WHERE id = :id"; + $this->di['db']->exec($sql2, array(':type' => json_encode($style, JSON_FORCE_OBJECT), ':id' => $data['form_id'])); + $this->di['logger']->info('Updated form %s type to %s', $data['form_id'], $data['type']); + return true; + } + + +} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/assets/css/bootstrap-form.css b/src/bb-modules/Formbuilder/assets/css/bootstrap-form.css new file mode 100644 index 000000000..3d16ca9f0 --- /dev/null +++ b/src/bb-modules/Formbuilder/assets/css/bootstrap-form.css @@ -0,0 +1,886 @@ +/*! + * Bootstrap v2.3.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +form { + margin: 0 0 20px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 15px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #595959; +} +.help-block { + display: block; + margin-bottom: 10px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + vertical-align: middle; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 10px; +} +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} diff --git a/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_field.phtml b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_field.phtml new file mode 100644 index 000000000..4151f8c3b --- /dev/null +++ b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_field.phtml @@ -0,0 +1,225 @@ +
          +
          {% trans 'Edit field' %}
          +
          + +
          + +
          + + + +
          +
            +
          • + +
          • +
          • + {% trans 'Please keep in mind that field name can not start with number. Special characters will be replaced with underscrore ( _ )' %} +
          • +
          +
          + +
          +
          + + +
          + +
            +
          • + +
          • + +
          + +
          +
          +
          + + + +{% if field.type == "checkbox" or field.type=="radio" or field.type=="select" %} +
          + + +
          +
          +
            +
          • + +
          • +
          • +
          • + +
          • +
          +
          + {% for k,v in field.options %} +
          +
            +
          • + +
          • +
          • =
          • +
          • + +
          • +
          +
          + {% endfor %} +
          +
            +
          • + +
          • +
          • =
          • +
          • + +
          • +
          +
          + +
          +
          +
          + +
          +{% endif %} + +
          + + +
          + + + + + + + + + + +
          +
          + +
          +{% if field.type == "text" %} +
          + + + +
          +
            + +
          • + +
          • +
          • + +
          • + +
          • + +
          + +
          +
          + +
          +{% endif %} +{% if field.type == "textarea" %} +
          + + + +
          +
            + +
          • + + +
          • +
          • {% trans 'px' %}
          • + +
          • + + +
          • +
          • {% trans 'px' %}
          • +
          +
          +
          + +
          +{% endif %} + +
          + + +
          +
            + {% if field.type == "text"%} +
          • {{field.prefix}}
          • +
          • +
          • {{field.suffix}}
          • + {% elseif field.type == "checkbox" %} + {% for k,v in field.options %} + + + {% endfor %} + {% elseif field.type == "radio" %} + {% for k,v in field.options %} + + + {% endfor %} + {% elseif field.type == "select" %} + + {% elseif field.type == "textarea" %} +
          • + +
          • + {% endif %} +
          +
          + +
          +
          +
          + + +
          +
            +
          • + +
          • +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + + + + + \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_manage.phtml b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_manage.phtml new file mode 100644 index 000000000..2b5abdaf1 --- /dev/null +++ b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_manage.phtml @@ -0,0 +1,84 @@ +{% set form = guest.formbuilder_get({"id":order.form_id}) %} +{% set config = order.config %} +
          + + + + + + + + + + + + + {% for field in form.fields %} +
          + {% if field.hide_label!=1 %}{% endif %} +
          + {% if field.type == "text" %} + + {% elseif field.type == "select" %} + + + {% elseif field.type == "checkbox" %} + {% for k,v in field.options %} + + {% endfor %} + + {% elseif field.type == "radio" %} + {% for k,v in field.options %} + + {% endfor %} + + {% elseif field.type == "textarea" %} +
          + +
          + {% endif %} +
          +
          +
          + {% endfor %} + + +
          + +
          + +
          +
          +
          + + + + \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_preview.phtml b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_preview.phtml new file mode 100644 index 000000000..c0daaf573 --- /dev/null +++ b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_preview.phtml @@ -0,0 +1,74 @@ +
          + + +
          + {% if field.type == "text" %} +
          +
            +
          • {{field.prefix}}
          • +
          • + +
          • +
          • {{field.suffix}}
          • +
          +
          + {% elseif field.type == "select" %} + {% if field.options is empty %} +
            +
          • {% trans 'Please click on "Edit" in order to add new select box' %}
          • +
          + {% else %} + + {% endif %} + {% elseif field.type == "checkbox" %} + {% if field.options is empty %} +
            +
          • {% trans 'Please click on "Edit" in order to add new checkbox' %}
          • +
          + {% else %} + {% for k,v in field.options %} + + + {% endfor %} + {% endif %} + {% elseif field.type == "radio" %} + {% if field.options is empty %} +
            +
          • {% trans 'Please click on "Edit" in order to add new radio box' %}
          • +
          + {% else %} + {% for k,v in field.options %} + + + {% endfor %} + {% endif %} + {% elseif field.type == "textarea" %} +
          + +
          + {% endif %} +
          +
          + +
          + + Edit + +
          +
          + +
          \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_settings.phtml b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_settings.phtml new file mode 100644 index 000000000..2c47d5375 --- /dev/null +++ b/src/bb-modules/Formbuilder/html_admin/mod_formbuilder_settings.phtml @@ -0,0 +1,348 @@ +{% if guest.extension_is_on({"mod":"formbuilder"}) %} +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %}{% import "macro_functions.phtml" as mf %}{% block meta_title %}Custom form builder{% endblock %}{% set active_menu = 'system' %} + +{% block head %} + +{% endblock %} + +{% block content %} +
          + + + +
          +
          + +
          +
          + + + + + + + + + + + {% for form in admin.formbuilder_get_forms %} + + + + + + + + {% endfor %} + + + + + + +
          {% trans 'Form' %}{% trans 'Orders using this form' %}{% trans 'Products using this form' %}{% trans 'Actions' %}
          {{ form.name }}{{ form.order_count }}{{ form.product_count }} + + + +
          + +
          + + +
          +
          +
          +
          + +
          +
          + +
          +
          +
          + + + + +{% if request.id %}{% set form = admin.formbuilder_get_form({"id":request.id}) %} + +
          +
          +
          {% trans 'Form options' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          +
          + +
          +
          +
          +
          +
          + +
          +
          +
          + + + +
          +
          + +
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          {{ form.name }}
          +
          + +
          + + + + +
          +{% for i,field in form.fields %} +
          + {% include 'mod_formbuilder_field.phtml' with field %} + {% include 'mod_formbuilder_preview.phtml' with field %} +
          +{% endfor %} +
          + + + +
          +
          +
          {% endif %} +
          + +
          + +{% endblock %} + +{% block js %} +{% endblock %} + +{% endif %} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/html_client/mod_formbuilder_build.phtml b/src/bb-modules/Formbuilder/html_client/mod_formbuilder_build.phtml new file mode 100644 index 000000000..2b0edb0f9 --- /dev/null +++ b/src/bb-modules/Formbuilder/html_client/mod_formbuilder_build.phtml @@ -0,0 +1,76 @@ +{% if guest.extension_is_on({"mod":"formbuilder"}) %} +{% set form = guest.formbuilder_get({"id":product.form_id}) %} + {% if form.style.show_title != "0" %} +
          +
          + {{form.name}} +
          +
          + {% endif %} + +
          + {% for field in form.fields %} + {% if form.style.type == 'horizontal' %} +
          + {% endif %} + {% if field.hide_label!=1 %}{% endif %} + {% if form.style.type == 'horizontal' %} +
          + {% endif %} + + + {% if field.type == "text" %} + {% if field.prefix is not empty or field.suffix is not empty %}
          {% endif %} + {% if field.prefix is not empty %}{{field.prefix}}{% endif %} + + {% if field.suffix is not empty %}{{field.suffix}}{% endif %} + {% if field.prefix is not empty or field.suffix is not empty %}
          {% endif %} + + {% elseif field.type == "select" %} + + + {% elseif field.type == "checkbox" %} + {% for k,v in field.options %} + + {% endfor %} + + {% elseif field.type == "radio" %} + {% for k,v in field.options %} + + {% endfor %} + + {% elseif field.type == "textarea" %} + + {% endif %} + {{field.description}} + {% if form.style.type == 'horizontal' %} +
          +
          + {% endif %} + + {% endfor %} +
          + + +{% endif %} \ No newline at end of file diff --git a/src/bb-modules/Formbuilder/manifest.json b/src/bb-modules/Formbuilder/manifest.json new file mode 100644 index 000000000..c142321bd --- /dev/null +++ b/src/bb-modules/Formbuilder/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "formbuilder", + "type": "mod", + "name": "Form Builder", + "description": "Adds ability to create custom forms to be used anywhere", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Api/Admin.php b/src/bb-modules/Forum/Api/Admin.php new file mode 100644 index 000000000..42e005fe5 --- /dev/null +++ b/src/bb-modules/Forum/Api/Admin.php @@ -0,0 +1,613 @@ +di['table']('Forum'); + return $table->getPairs(); + } + + /** + * Get paginated list of forums + * + * @return array + */ + public function get_list($data) + { + $table = $this->di['table']('Forum'); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + list ($sql, $params)= $table->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach($pager['list'] as $key => $item){ + $forum = $this->di['db']->getExistingModelById('Forum', $item['id'], 'Forum not found'); + $pager['list'][$key] = $table->toApiArray($forum); + } + + return $pager; + } + + /** + * Get forums list grouped by category name + * + * @return array + */ + public function get_categories($data) + { + $table = $this->di['table']('Forum'); + list($query, $bindings) = $table->getSearchQuery($data); + //$list = $q->execute(); + $list = $this->di['db']->find('Forum'); + + $result = array(); + foreach($list as $f) { + $result[$f->category][] = $table->toApiArray($f); + } + return $result; + } + + /** + * Get forum details + * + * @param int $id - forum id + * @return array + * @throws \Box_Exception + */ + public function get($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum id missing'); + } + + $table = $this->di['table']('Forum'); + $model = $this->di['db']->getExistingModelById('Forum', $data['id'], 'Forum not found'); + + return $table->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Create new forum + * + * @param string $title - new forum title + * + * @optional string $category - new forum category + * + * @return int - new forum id + * @throws \Box_Exception + */ + public function create($data) + { + if(!isset($data['title'])) { + throw new \Box_Exception('Forum title is missing'); + } + + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_Forum', 3); + + $priority = $this->di['db']->getCell("SELECT MAX(priority) FROM forum GROUP BY priority ORDER BY priority DESC LIMIT 1"); + + $model = $this->di['db']->dispense('Forum'); + $model->category = isset($data['category']) ? $data['category'] : NULL; + $model->title = $data['title']; + $model->slug = $this->di['tools']->slug($data['title']); + $model->status = isset($data['status']) ? $data['status'] : \Model_Forum::STATUS_ACTIVE; + $model->description = isset($data['description']) ? $data['description'] : NULL; + $model->priority = $priority + 1; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Created new forum "%s"', $model->title); + + return $model->id; + } + + /** + * Update existing forum + * + * @param int $id - forum id + * + * @optional string $category - new forum category + * @optional string $title - new forum title + * @optional string $status - new forum status + * @optional string $slug - new forum slug + * @optional string $description - new forum description + * @optional string $priority - new forum priority + * + * @return boolean + * @throws \Box_Exception + */ + public function update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum id missing'); + } + + $model = $this->di['db']->getExistingModelById('Forum', $data['id'], 'Forum not found'); + + if(isset($data['category'])) { + if(isset($data['update_categories']) && $data['update_categories']) { + $this->di['db']->exec('UPDATE forum SET category = :cat WHERE category = :old_cat', + array('cat'=>$data['category'], 'old_cat'=>$model->category)); + } + $model->category = $data['category']; + } + + if(isset($data['title'])) { + $model->title = $data['title']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['slug'])) { + $model->slug = $data['slug']; + } + + if(isset($data['description'])) { + $model->description = $data['description']; + } + + if(isset($data['priority'])) { + $model->priority = $data['priority']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated forum "%s"', $model->title); + return true; + } + + /** + * Change forums sorting order + * + * @param array $priority - forum id => priority pairs + * + * @return boolean + * @throws \Box_Exception + */ + public function update_priority($data) + { + if(!isset($data['priority']) || !is_array($data['priority'])) { + throw new \Box_Exception('priority params is missing'); + } + + foreach($data['priority'] as $id => $p) { + $model = $this->di['db']->getExistingModelById('Forum', $id); + if($model instanceof \Model_Forum) { + $model->priority = $p; + $model->updated_at = date('c'); + $this->di['db']->store($model); + } + } + + $this->di['logger']->info('Changed forums priorities'); + return true; + } + + /** + * Remove forum with all topics + * + * @param int $id - forum id + * + * @return boolean + * @throws \Box_Exception + */ + public function delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum id missing'); + } + + $table = $this->di['table']('Forum'); + $model = $this->di['db']->getExistingModelById('Forum', $data['id'], 'Forum not found'); + + $id = $model->id; + $table->rm($model); + + $this->di['logger']->info('Deleted forum #%s', $id); + return true; + } + + /** + * Get paginated list of topics + * + * @return array + */ + public function topic_get_list($data) + { + $table = $this->di['table']('ForumTopic'); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + list($sql, $params) = $table->getSearchQuery($data); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $topic = $this->di['db']->getExistingModelById('ForumTopic', $item['id'], 'Forum topic not found'); + $pager['list'][$key] = $table->toApiArray($topic); + } + + return $pager; + } + + /** + * Get topic details + * + * @param int $id - topic id + * @return array + * @throws \Box_Exception + */ + public function topic_get($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Topic id is missing'); + } + + $table = $this->di['table']('ForumTopic'); + $model = $this->di['db']->getExistingModelById('ForumTopic', $data['id'], 'Forum Topic not found'); + + return $table->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Remove topic + * + * @param int $id - topic id + * @return boolean + * @throws \Box_Exception + */ + public function topic_delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Topic id is missing'); + } + + $table = $this->di['table']('ForumTopic'); + $model = $this->di['db']->getExistingModelById('ForumTopic', $data['id'], 'Forum Topic not found'); + + $id = $model->id; + $table->rm($model); + $this->di['logger']->info('Deleted forum topic #%s', $id); + return true; + } + + /** + * Create new topic + * + * @param int $forum_id - forum id + * @param string $title - topic title + * @param string $message - topic message + * + * @optional string $status - initial topic status + * + * @return int - new topic id + * @throws \Box_Exception + */ + public function topic_create($data) + { + if(!isset($data['forum_id'])) { + throw new \Box_Exception('Forum ID not passed'); + } + + if(!isset($data['title'])) { + throw new \Box_Exception('Forum topic title not passed'); + } + + if(!isset($data['message'])) { + throw new \Box_Exception('Forum topic message not passed'); + } + + if(strlen($data['message']) < 2) { + throw new \Box_Exception('Your message is too short'); + } + + $this->di['db']->getExistingModelById('Forum', $data['forum_id'], 'Forum not found'); + $forum = $this->di['db']->getExistingModelById('Forum', $data['forum_id'], 'Forum not found'); + + $topic = $this->di['db']->dispense('ForumTopic'); + $topic->forum_id = $forum->id; + $topic->title = $data['title']; + $topic->slug = $this->di['tools']->slug($data['title']); + $topic->status = isset($data['status']) ? $data['status'] : \Model_ForumTopic::STATUS_ACTIVE; + $topic->created_at = date('c'); + $topic->updated_at = date('c'); + $this->di['db']->store($topic); + + $msg = $this->di['db']->dispense('ForumTopicMessage'); + $msg->admin_id = $this->getIdentity()->id; + $msg->forum_topic_id = $topic->id; + $msg->message = $data['message']; + $msg->ip = $this->getIp(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $this->di['logger']->info('Started new forum topic "%s"', $topic->title); + + return (int)$topic->id; + } + + /** + * Update forum topic + * + * @param int $id - topic id + * + * @optional string $title - topic title + * @optional string $message - topic message + * @optional string $status - topic status + * @optional string $slug - topic slug + * @optional int $views - topic views count + * @optional bool $sticky - topic sticky flag + * + * @return boolean + * @throws \Box_Exception + */ + public function topic_update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum topic id missing'); + } + + $model = $this->di['db']->getExistingModelById('ForumTopic', $data['id'], 'Forum Topic not found'); + + if(isset($data['forum_id'])) { + $model->forum_id = $data['forum_id']; + } + + if(isset($data['title'])) { + $model->title = $data['title']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['slug'])) { + $model->slug = $data['slug']; + } + + if(isset($data['sticky'])) { + $model->sticky = $data['sticky']; + } + + if(isset($data['views'])) { + $model->views = $data['views']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated forum topic "%s"', $model->title); + return true; + } + + /** + * Get topic messages list + * + * @optional int $forum_topic_id - topic id + * @optional int $client_id - filter by client id + * @optional bool $with_points - get messages with points only + * + * @return array + * @throws \Box_Exception + */ + public function message_get_list($data) + { + $data['orderby'] = 'created_at'; + $data['sortorder'] = 'desc'; + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + list($sql, $params) = $this->getService()->getMessagesQuery($data); + + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach($pager['list'] as &$entry) { + $entry['author'] = $this->getService()->getProfile($entry['client_id']); + if (!$entry['client_id'] && $entry['admin_id']){ + $admin = $this->di['db']->getExistingModelById('Admin', $entry['admin_id'], 'Admin not found'); + $entry['author']['gravatar'] = 'https://gravatar.com/avatar/' . md5($admin->email); + } + } + return $pager; + } + + /** + * Get forum topic message + * + * @param int $id - message id + * @return type + * @throws \Box_Exception + */ + public function message_get($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum Topic message ID not passed'); + } + $table = $this->di['table']('ForumTopicMessage'); + + $msg = $this->di['db']->getExistingModelById('ForumTopicMessage', $data['id'], 'Forum Topic Message not found'); + + return $table->toApiArray($msg, true, $this->getIdentity()); + } + + /** + * Update forum topic message + * + * @param int $id - message id + * + * @optional string $message - topic message + * + * @return boolean + * @throws \Box_Exception + */ + public function message_update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum Topic message ID not passed'); + } + + $model = $this->di['db']->getExistingModelById('ForumTopicMessage', $data['id'], 'Forum Topic Message not found'); + + if(isset($data['message'])) { + $model->message = $data['message']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated forum topic message #%s', $model->id); + return true; + } + + /** + * Delete topic message + * + * @param int $id - message id + * + * @return boolean + * @throws \Box_Exception + */ + public function message_delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Forum Topic message ID not passed'); + } + + $table = $table = $this->di['table']('ForumTopicMessage'); + $model = $this->di['db']->getExistingModelById('ForumTopicMessage', $data['id'], 'Forum Topic Message not found'); + + $id = $model->id; + $table->rm($model); + + $this->di['logger']->info('Admin removed forum topic message #%s', $id); + return true; + } + + /** + * Post new message to topic + * + * @param int $forum_topic_id - forum topic id + * @param string $message - topic message + * + * @return id + * @throws \Box_Exception + */ + public function message_create($data) + { + if(!isset($data['forum_topic_id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + if(!isset($data['message'])) { + throw new \Box_Exception('Topic message not passed'); + } + + if(strlen($data['message']) < 2) { + throw new \Box_Exception('Your message is too short'); + } + + $topic = $this->di['db']->getExistingModelById('ForumTopic', $data['forum_topic_id'], 'Forum Topic not found'); + + $admin = $this->getIdentity(); + + $msg = $this->di['db']->dispense('ForumTopicMessage'); + $msg->admin_id = $admin->id; + $msg->forum_topic_id = $topic->id; + $msg->message = $data['message']; + $msg->ip = $this->getIp(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $topic->updated_at = date('c'); + $this->di['db']->store($topic); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminRepliedInForum', 'params'=>array('id'=>$topic->id, 'message_id'=>$msg->id, 'admin_id'=>$admin->id))); + + $this->di['logger']->info('Posted new forum message %s', $msg->id); + return (int)$msg->id; + } + + /** + * Decline post. Post will be considered as not worth the points. + * + * @param int $id - message id + * + * @return bool + * @throws \Box_Exception + */ + public function points_deduct($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Message ID not passed'); + } + + $service = $service = $this->di['mod_service']('forum'); + $service->declinePointsForPost($data['id']); + + $this->di['logger']->info('Deducted points from forum message #%s', $data['id']); + return true; + } + + /** + * Update total points for client + * + * @param int $client_id - client id + * @param float $amount - new points total + * + * @return boolean + * @throws \Box_Exception + */ + public function points_update($data) + { + if(!isset($data['client_id'])) { + throw new \Box_Exception('Client ID not passed'); + } + + if(!isset($data['amount'])) { + throw new \Box_Exception('Amount not passed'); + } + + $service = $service = $this->di['mod_service']('forum'); + $service->updateTotalPoints($data['client_id'], $data['amount']); + + $this->di['logger']->info('Updated client %s forum points balance to %s', $data['client_id'], $data['amount']); + return true; + } + + /** + * Client forum profile + * + * @param int $client_id - client id + * @return array + * @throws \Box_Exception + */ + public function profile_get($data) + { + if(!isset($data['client_id'])) { + throw new \Box_Exception('Client ID not passed'); + } + + $forumService = $this->di['mod_service']('forum'); + return $forumService->getProfile($data['client_id']); + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Api/Client.php b/src/bb-modules/Forum/Api/Client.php new file mode 100644 index 000000000..31564720d --- /dev/null +++ b/src/bb-modules/Forum/Api/Client.php @@ -0,0 +1,514 @@ +di['table']('Forum'); + list($sql, $params) = $table->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $forum = $this->di['db']->getExistingModelById('Forum', $item['id'], 'Forum not found'); + $pager['list'][$key] = $table->toApiArray($forum); + } + + return $pager; + } + + /** + * Get forums list grouped by category name + * + * @return array + */ + public function get_categories($data) + { + $table = $this->di['table']('Forum'); + + $list = $this->di['db']->find('Forum', 'ORDER BY priority ASC, category ASC'); + + $result = array(); + foreach ($list as $f) { + $result[$f->category][] = $table->toApiArray($f); + } + + return $result; + } + + /** + * Get forum details + * + * @param int $id - forum id + * + * @return array + * @throws Box_Exception + */ + public function get($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + $table = $this->di['table']('Forum'); + + $model = FALSE; + if ($id) { + $model = $table->findOneActiveById($id); + } else { + $model = $table->findOneActiveBySlug($slug); + } + + if (!$model instanceof \Model_Forum) { + throw new \Box_Exception('Forum not found'); + } + + return $table->toApiArray($model); + } + + /** + * Get paginated list of topics + * + * @return array + */ + public function get_topic_list($data) + { + $table = $this->di['table']('ForumTopic'); + list($sql, $params) = $table->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + + return $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + /** + * Get topic details + * + * @param int $id - topic id + * @return array + * @throws Box_Exception + */ + public function get_topic($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + $table = $this->di['table']('ForumTopic'); + + $model = FALSE; + if ($id) { + $model = $this->di['db']->load('ForumTopic', $id); + } else { + $model = $this->di['db']->findOne('ForumTopic', 'slug = :slug', array(':slug' => $slug)); + } + + if (!$model instanceof \Model_ForumTopic) { + throw new \Box_Exception('Forum Topic not found'); + } + $table->hitView($model); + + return $table->toApiArray($model); + } + + /** + * Create new topic + * + * @param int $forum_id - forum id + * @param string $topic - topic title + * @param string $message - topic message + * + * @optional string $status - initial topic status + * + * @return int - new topic id + * @throws Box_Exception + */ + public function start_topic($data) + { + if (!isset($data['forum_id'])) { + throw new \Box_Exception('Forum ID not passed'); + } + if (!isset($data['topic'])) { + throw new \Box_Exception('Forum topic not passed'); + } + if (!isset($data['message'])) { + throw new \Box_Exception('Forum message not passed'); + } + + if (strlen($data['message']) < 2) { + throw new \Box_Exception('Your message is too short'); + } + + $event_params = $data; + $event_params['client_id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event' => 'onBeforeClientCreateForumTopic', 'params' => $event_params)); + + $table = $this->di['table']('Forum');; + $forum = $table->findOneActiveById($data['forum_id']); + if (!$forum instanceof \Model_Forum) { + throw new \Box_Exception('Forum not found'); + } + + if ($forum->status == \Model_Forum::STATUS_LOCKED) { + throw new \Box_Exception('Forum is locked. No new topics can be started'); + } + + $client = $this->getIdentity(); + + $topic = $this->di['db']->dispense('ForumTopic'); + $topic->forum_id = $forum->id; + $topic->title = $data['topic']; + $topic->slug = $this->di['tools']->slug($data['topic']); + $topic->status = 'active'; + $topic->created_at = date('c'); + $topic->updated_at = date('c'); + $this->di['db']->store($topic); + + $msg = $this->di['db']->dispense('ForumTopicMessage'); + $msg->client_id = $client->id; + $msg->forum_topic_id = $topic->id; + $msg->message = $data['message']; + $msg->ip = $this->getIp(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $this->di['events_manager']->fire(array('event' => 'onAfterClientCreateForumTopic', 'params' => array('id' => $topic->id))); + + $this->subscribe(array('id' => $topic->id)); + + $this->di['logger']->info('Started new forum topic "%s"', $topic->title); + + //@EasterEgg to return slug instead of id + if (isset($data['return']) && $data['return'] == 'slug') { + return $topic->slug; + } + + return (int)$topic->id; + } + + /** + * Get topic messages list + * + * @param int $forum_topic_id - topic id + * @return array + * @throws Box_Exception + */ + public function get_topic_message_list($data) + { + if (!isset($data['forum_topic_id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + $table = $this->di['table']('ForumTopicMessage'); + list($sql, $params) = $table->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + + return $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + /** + * Post new message to topic + * + * @param int $forum_topic_id - forum topic id + * @param string $message - topic message + * + * @return id + * @throws Box_Exception + */ + public function post_message($data) + { + if (!isset($data['forum_topic_id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + if (!isset($data['message'])) { + throw new \Box_Exception('Topic message not passed'); + } + + if (strlen($data['message']) < 2) { + throw new \Box_Exception('Your message is too short'); + } + + $topic = $this->di['db']->getExistingModelById('ForumTopic', $data['forum_topic_id'], 'Forum Topic not found'); + + if ($topic->status == \Model_ForumTopic::STATUS_LOCKED) { + throw new \Box_Exception('Forum topic is locked. No new message can be posted'); + } + + $client = $this->getIdentity(); + + $data['client_id'] = $client->id; + $this->di['events_manager']->fire(array('event' => 'onBeforeClientRepliedInForum', 'params' => $data)); + + $msg = $this->di['db']->dispense('ForumTopicMessage'); + $msg->client_id = $client->id; + $msg->forum_topic_id = $topic->id; + $msg->message = $data['message']; + $msg->ip = $this->getIp(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $topic->updated_at = date('c'); + $this->di['db']->store($topic); + + $this->di['events_manager']->fire(array('event' => 'onAfterClientRepliedInForum', 'params' => array('id' => $topic->id, 'message_id' => $msg->id, 'client_id' => $client->id))); + + $this->di['logger']->info('Posted message in topic #%s', $topic->id); + + return (int)$msg->id; + } + + /** + * Check if current client is subscribed to forum notifications + * + * @return bool + * @throws Box_Exception + */ + public function is_subscribed($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + $client = $this->getIdentity(); + $sql = " + SELECT meta_value + FROM extension_meta + WHERE client_id = :cid + AND extension = :ext + AND rel_type = :type + AND rel_id = :rid + AND meta_key = :key + "; + $tid = $data['id']; + + $value = $this->di['db']->getCell($sql, array('cid' => $client->id, 'ext' => 'mod_forum', 'type' => 'forum_topic', 'rid' => $tid, 'key' => 'notification')); + + return (bool)$value; + } + + /** + * Unsubscribe client from topic notifications + * + * @return bool + * @throws Box_Exception + */ + public function unsubscribe($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + $client = $this->getIdentity(); + $sql = " + DELETE FROM extension_meta + WHERE client_id = :cid + AND extension = :ext + AND rel_type = :type + AND rel_id = :rid + AND meta_key = :key + "; + $tid = $data['id']; + + $this->di['db']->exec($sql, array('cid' => $client->id, 'ext' => 'mod_forum', 'type' => 'forum_topic', 'rid' => $tid, 'key' => 'notification')); + + $this->di['logger']->info('Unsubscribed from forum topic %s', $data['id']); + + return true; + } + + /** + * Subscribe client to forum topic notifications + * + * @param int $id - forum topic id + * @return bool + * @throws Box_Exception + */ + public function subscribe($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + if ($this->is_subscribed($data)) { + throw new \Exception('You have already subscribed to this topic notifications'); + } + + $client = $this->getIdentity(); + $meta = $this->di['db']->dispense('extension_meta'); + $meta->extension = 'mod_forum'; + $meta->client_id = $client->id; + $meta->rel_type = 'forum_topic'; + $meta->rel_id = $data['id']; + $meta->meta_key = 'notification'; + $meta->meta_value = 1; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $this->di['db']->store($meta); + + $this->di['logger']->info('Subscribed to forum topic %s', $data['id']); + + return true; + } + + /** + * Get list of topics added to favorites + * + * @return array + */ + public function favorites($data) + { + $client = $this->getIdentity(); + $sql = " + SELECT rel_id + FROM extension_meta + WHERE client_id = :cid + AND extension = :ext + AND rel_type = :type + AND meta_key = :key + "; + $list = $this->di['db']->getAssoc($sql, array('cid' => $client->id, 'ext' => 'mod_forum', 'type' => 'forum_topic', 'key' => 'favorite')); + $result = array(); + $table = $this->di['table']('ForumTopic'); + $topics = $table->getTopicsByIds(array_values($list)); + foreach ($topics as $topic) { + //var_dump($topic->id);exit; + $result[] = $table->toApiArray($topic); + } + + return $result; + } + + /** + * Check if topic is added to favoites + * + * @param int $id - forum topic id + * @return bool + * @throws Box_Exception + */ + public function is_favorite($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + $client = $this->getIdentity(); + $sql = " + SELECT meta_value + FROM extension_meta + WHERE client_id = :cid + AND extension = :ext + AND rel_type = :type + AND rel_id = :rid + AND meta_key = :key + "; + $tid = $data['id']; + + $value = $this->di['db']->getCell($sql, array('cid' => $client->id, 'ext' => 'mod_forum', 'type' => 'forum_topic', 'rid' => $tid, 'key' => 'favorite')); + + return (bool)$value; + } + + /** + * Add topic to favorites + * + * @param int $id - forum topic id + * @return boolean + * @throws Box_Exception + * @throws Exception + */ + public function favorite_add($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + if ($this->is_favorite($data)) { + throw new \Exception('You have already added this topic to favorites'); + } + + $client = $this->getIdentity(); + $meta = $this->di['db']->dispense('extension_meta'); + $meta->extension = 'mod_forum'; + $meta->client_id = $client->id; + $meta->rel_type = 'forum_topic'; + $meta->rel_id = $data['id']; + $meta->meta_key = 'favorite'; + $meta->meta_value = 1; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $this->di['db']->store($meta); + + $this->di['logger']->info('Added forum topic %s to favorites', $data['id']); + + return true; + } + + /** + * Remove topic from favorites + * + * @param int $id - forum topic id + * @return boolean + * @throws Box_Exception + */ + public function favorite_remove($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + + $client = $this->getIdentity(); + $sql = " + DELETE FROM extension_meta + WHERE client_id = :cid + AND extension = :ext + AND rel_type = :type + AND rel_id = :rid + AND meta_key = :key + "; + $tid = $data['id']; + + $this->di['db']->exec($sql, array('cid' => $client->id, 'ext' => 'mod_forum', 'type' => 'forum_topic', 'rid' => $tid, 'key' => 'favorite')); + + $this->di['logger']->info('Removed forum topic %s from favorites', $data['id']); + + return true; + } + + /** + * Forum profile + * + * @return array + * @throws Box_Exception + */ + public function profile($data) + { + return $this->getService()->getProfile($this->getIdentity()->id); + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Api/Guest.php b/src/bb-modules/Forum/Api/Guest.php new file mode 100644 index 000000000..0eeb934a7 --- /dev/null +++ b/src/bb-modules/Forum/Api/Guest.php @@ -0,0 +1,199 @@ +di['table']('Forum'); + list ($sql, $params) = $table->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $forum = $this->di['db']->getExistingModelById('Forum', $item['id'], 'Forum not found'); + $pager['list'][$key] = $table->toApiArray($forum); + } + + return $pager; + } + + /** + * Get forums list grouped by category name + * + * @return array + */ + public function get_categories($data) + { + $table = $this->di['table']('Forum'); + + $list = $this->di['db']->find('Forum', 'ORDER BY priority ASC, category ASC'); + + $result = array(); + foreach ($list as $f) { + $result[$f->category][] = $table->toApiArray($f); + } + + return $result; + } + + /** + * Get forum details + * + * @param int $id - forum id + * + * @return array + * @throws Box_Exception + */ + public function get($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + $table = $this->di['table']('Forum'); + + $model = FALSE; + if ($id) { + $model = $table->findOneActiveById($id); + } else { + $model = $table->findOneActiveBySlug($slug); + } + + if (!$model instanceof \Model_Forum) { + throw new \Box_Exception('Forum not found'); + } + + return $table->toApiArray($model); + } + + /** + * Get paginated list of topics + * + * @return array + */ + public function get_topic_list($data) + { + $table = $this->di['table']('ForumTopic'); + list($sql, $params) = $table->getSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach($pager['list'] as $key => $item){ + $forum = $this->di['db']->getExistingModelById('ForumTopic', $item['id'], 'Forum topic not found'); + $pager['list'][$key] = $table->toApiArray($forum); + } + + return $pager; + } + + /** + * Get topic details + * + * @param int $id - topic id + * @return array + * @throws Box_Exception + */ + public function get_topic($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + $table = $this->di['table']('ForumTopic'); + + $model = FALSE; + if ($id) { + $model = $this->di['db']->load('ForumTopic', $id); + } else { + $model = $this->di['db']->findOne('ForumTopic', 'slug = :slug', array(':slug' => $slug)); + } + if (!$model instanceof \Model_ForumTopic) { + throw new \Box_Exception('Forum Topic not found'); + } + $table->hitView($model); + + return $table->toApiArray($model); + } + + /** + * Get topic messages list + * + * @param int $forum_topic_id - topic id + * @return array + * @throws Box_Exception + */ + public function get_topic_message_list($data) + { + if (!isset($data['forum_topic_id'])) { + throw new \Box_Exception('Forum Topic ID not passed'); + } + $table = $this->di['table']('ForumTopicMessage'); + list($sql, $params) = $table->getSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach($pager['list'] as $key => $item){ + $forum = $this->di['db']->getExistingModelById('ForumTopicMessage', $item['id'], 'Forum topic message not found'); + $pager['list'][$key] = $table->toApiArray($forum); + } + + return $pager; + } + + /** + * Search topic messages + * + * @param string $q - query string + * @return array - paginated list of results + * @throws Box_Exception + */ + public function search($data) + { + if (!isset($data['q']) || empty($data['q'])) { + throw new \Box_Exception('Enter some keywords for search'); + } + + if (strlen($data['q']) < 3) { + throw new \Box_Exception('Search keyword must be longer than 3 characters'); + } + + $table = $this->di['table']('ForumTopicMessage'); + list($sql, $params) = $table->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + public function members_list($data) + { + list($sql, $params) = $this->getService()->getMembersListQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getAdvancedResultSet($sql, $params, $per_page); + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Controller/Admin.php b/src/bb-modules/Forum/Controller/Admin.php new file mode 100644 index 000000000..4b86aac37 --- /dev/null +++ b/src/bb-modules/Forum/Controller/Admin.php @@ -0,0 +1,84 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages'=>array( + array( + 'location' => 'support', + 'index' => 700, + 'label' => 'Forum', + 'uri' => $this->di['url']->adminLink('forum'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/forum', 'get_index', array(), get_class($this)); + $app->get('/forum/profile/:id', 'get_profile', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/forum/:id', 'get_forum', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/forum/topic/:id', 'get_topic', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_forum_index'); + } + + public function get_forum(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $forum = $api->forum_get(array('id'=>$id)); + return $app->render('mod_forum_forum', array('forum'=>$forum)); + } + + public function get_topic(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $topic = $api->forum_topic_get(array('id'=>$id)); + return $app->render('mod_forum_topic', array('topic'=>$topic)); + } + + public function get_profile(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + return $app->render('mod_forum_profile', array('client_id'=>$id)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Controller/Client.php b/src/bb-modules/Forum/Controller/Client.php new file mode 100644 index 000000000..877edd078 --- /dev/null +++ b/src/bb-modules/Forum/Controller/Client.php @@ -0,0 +1,85 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/forum', 'get_index', array(), get_class($this)); + $app->get('/forum/members-list', 'get_members', array(), get_class($this)); + $app->get('/forum/topics.rss', 'get_rss', array(), get_class($this)); + $app->get('/forum/:forum', 'get_forum', array('forum' => '[a-z0-9-]+'), get_class($this)); + $app->get('/forum/:forum/:topic', 'get_forum_topic', array('forum' => '[a-z0-9-]+', 'topic' => '[a-z0-9-]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + return $app->render('mod_forum_index'); + } + + public function get_rss(\Box_App $app) + { + header('Content-Type: application/rss+xml;'); + return $app->render('mod_forum_rss'); + } + + public function get_forum(\Box_App $app, $forum) + { + $api = $app->getApiGuest(); + $data = array( + 'slug' => $forum, + ); + $f = $api->forum_get($data); + return $app->render('mod_forum_forum', array('forum'=>$f)); + } + + public function get_forum_topic(\Box_App $app, $forum, $topic) + { + $api = $app->getApiGuest(); + $data = array( + 'slug' => $forum, + ); + $f = $api->forum_get($data); + + $data = array( + 'slug' => $topic, + ); + $t = $api->forum_get_topic($data); + return $app->render('mod_forum_topic', array('topic'=>$t, 'forum'=>$f)); + } + + public function get_members(\Box_App $app) + { + return $app->render('mod_forum_members_list', array()); + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/Service.php b/src/bb-modules/Forum/Service.php new file mode 100644 index 000000000..5c77f6afc --- /dev/null +++ b/src/bb-modules/Forum/Service.php @@ -0,0 +1,312 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getProfile($client_id) + { + $sql='SELECT + id, + CONCAT(c.first_name, " ", c.last_name) as name, + CONCAT("https://gravatar.com/avatar/", MD5(c.email)) as gravatar, + c.created_at + FROM client c + WHERE c.id = :cid + '; + + $details = $this->di['db']->getRow($sql, array(':cid'=>$client_id)); + $posts = $this->di['db']->getCell('SELECT COUNT(id) FROM forum_topic_message WHERE client_id = :cid', array(':cid'=>$client_id)); + + $points = $this->di['db']->getCell('SELECT meta_value + FROM extension_meta + WHERE extension = "mod_forum" + AND meta_key = "points_total" + AND client_id = :cid', + array('cid'=>$client_id)); + + $profile = array(); + $profile['id'] = $details['id']; + $profile['posts'] = $posts; + $profile['points'] = ($points) ? $points : 0; + $profile['gravatar'] = $details['gravatar']; + $profile['name'] = $details['name']; + $profile['created_at'] = $details['created_at']; + return $profile; + } + + public function getMembersListQuery($data) + { + $sql=' + SELECT + 0 as posts, + CONCAT(c.first_name, " ", c.last_name) as name, + CONCAT("https://gravatar.com/avatar/", MD5(c.email)) as gravatar, + c.created_at + FROM client c + RIGHT JOIN forum_topic_message fp ON (fp.client_id = c.id) + WHERE fp.id > 0 + '; + + $params = array(); + + $first_char = isset($data['first_char']) ? $data['first_char'] : NULL; + + if(NULL !== $first_char) { + $sql .= ' AND c.first_name LIKE :first_char'; + $params['first_char'] = $first_char.'%'; + } + + $sql .= ' GROUP BY c.id ORDER BY c.first_name DESC '; + return array($sql, $params); + } + + public function getMessagesQuery($data) + { + $sql=' + SELECT fp.id, fp.client_id, fp.admin_id, fp.message, fp.points, + ft.slug as forum_topic_slug, + f.slug as forum_slug, + fp.created_at, + fp.updated_at, + f.id as forum_id, + fp.forum_topic_id, + CONCAT(f.category, " > ", f.title, " > ", ft.title) as forum_title + FROM forum_topic_message fp + LEFT JOIN forum_topic ft ON (ft.id = fp.forum_topic_id) + LEFT JOIN forum f ON (f.id = ft.forum_id) + WHERE 1 + '; + + $params = array(); + + $search = (isset($data['q']) && !empty($data['q'])) ? $data['q'] : NULL; + $search2 = (isset($data['search']) && !empty($data['search'])) ? $data['search'] : NULL; + $forum_topic_id = (isset($data['forum_topic_id']) && !empty($data['forum_topic_id'])) ? $data['forum_topic_id'] : NULL; + $forum_id = isset($data['forum_id']) ? $data['forum_id'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $with_points = isset($data['with_points']) ? $data['with_points'] : NULL; + + if($with_points) { + $sql .= ' AND fp.points IS NOT NULL AND fp.points != "" '; + } + + if($forum_topic_id) { + $sql .= ' AND ft.id = :forum_topic_id'; + $params['forum_topic_id'] = $forum_topic_id; + } + + if($forum_id) { + $sql .= ' AND f.id = :forum_id'; + $params['forum_id'] = $forum_id; + } + + if($client_id) { + $sql .= ' AND fp.client_id = :cid'; + $params['cid'] = $client_id; + } + + if($search) { + $sql .= ' AND fp.message LIKE :search'; + $params['search'] = "%$search%"; + } + + if($search2) { + $sql .= ' AND fp.message LIKE :search2'; + $params['search2'] = "%$search2%"; + } + + if(isset($data['orderby'])) { + if(in_array(strtolower($data['orderby']), array('id', 'created_at'))) { + $sortorder = (isset($data['sortorder']) && in_array(strtolower($data['sortorder']), array('asc', 'desc'))) ? $data['sortorder'] : 'asc' ; + $sql .= ' ORDER BY '.sprintf('fp.%s %s', $data['orderby'], strtoupper($sortorder)); + } + } else { + $sql .= ' ORDER BY fp.id DESC'; + } + + return array($sql, $params); + } + + public function updateTotalPoints($client_id, $amount, $increment = false) + { + $meta = $this->getTotalPointsMeta($client_id); + if($increment) { + $amount = $meta->meta_value + $amount; + } + $meta->meta_value = $amount; + $meta->updated_at = date('c'); + $this->di['db']->store($meta); + } + + public function declinePointsForPost($post_id) + { + $post = $this->di['db']->load('forum_topic_message', $post_id); + if(!$post) { + throw new \Box_Exception('Message not found'); + } + + $minus_points = -$post->points; + + $post->points = null; + $post->updated_at = date('c'); + $this->di['db']->store($post); + + $this->updateTotalPoints($post->client_id, $minus_points, true); + } + + private function getTotalPointsMeta($client_id) + { + $meta = $this->di['db']->findOne('extension_meta', + 'extension = "mod_forum" AND meta_key = "points_total" AND client_id = :cid', + array('cid'=>$client_id)); + if(!$meta) { + $meta = $this->di['db']->dispense('extension_meta'); + $meta->extension = 'mod_forum'; + $meta->client_id = $client_id; + $meta->meta_key = 'points_total'; + $meta->meta_value = 0; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $this->di['db']->store($meta); + } + return $meta; + } + + public function getTopicSubscribers($topic_id) + { + $sql=" + SELECT client_id + FROM extension_meta + WHERE extension = 'mod_forum' + AND rel_type = 'forum_topic' + AND rel_id = :rid + AND meta_key = 'notification' + "; + + return $this->di['db']->getAssoc($sql, array(':rid'=>$topic_id)); + } + + public static function onAfterClientCreateForumTopic(\Box_Event $event) + { + $api = $event->getApiAdmin(); + $params = $event->getParameters(); + $id = $params['id']; + } + + public static function onAfterAdminRepliedInForum(\Box_Event $event) + { + $di = $event->getDi(); + $api = $di['api_admin']; + $params = $event->getParameters(); + $id = $params['id']; + $message_id = $params['message_id']; + + $service = $di['mod_service']('forum'); + $list = $service->getTopicSubscribers($id); + + $message = $api->forum_message_get(array('id'=>$message_id)); + $topic = $api->forum_topic_get(array('id'=>$id)); + + foreach($list as $cid) { + $email = array(); + $email['to_client'] = $cid; + $email['code'] = 'mod_forum_new_post'; + $email['topic_id'] = $id; + $email['message_id'] = $message_id; + + $email['message'] = $message; + $email['topic'] = $topic; + + try { + $api->email_template_send($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + } + + public static function onAfterClientRepliedInForum(\Box_Event $event) + { + $di = $event->getDi(); + $api = $di['api_admin']; + $params = $event->getParameters(); + $id = $params['id']; + $message_id = $params['message_id']; + $client_id = $params['client_id']; + + $service = $di['mod_service']('forum'); + $list = $service->getTopicSubscribers($id); + + $message = $api->forum_message_get(array('id'=>$message_id)); + $topic = $api->forum_topic_get(array('id'=>$id)); + + foreach($list as $cid) { + if($client_id == $cid) { + //do not send email to author + continue; + } + + $email = array(); + $email['to_client'] = $cid; + $email['code'] = 'mod_forum_new_post'; + $email['topic_id'] = $id; + $email['message_id'] = $message_id; + + $email['message'] = $message; + $email['topic'] = $topic; + + try { + $api->email_template_send($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + //forum points + + $mod = $di['mod']('forum'); + $config = $mod->getConfig(); + $points = isset($config['points']) ? $config['points'] : 0 ; + $points_forums = isset($config['points_forums']) ? $config['points_forums'] : array() ; + + if(isset($config['forum_points_enable']) + && $config['forum_points_enable'] + && !empty($points_forums) + && in_array($topic['forum']['id'], $points_forums) + && strlen($message['message']) >= $config['post_length'] + && $points > 0) { + + $di['db']->exec('UPDATE forum_topic_message SET points = :points WHERE id = :id', + array('points'=>$points, 'id'=>$message_id)); + + $service = $mod->getService(); + $service->updateTotalPoints($client_id, $points, true); + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_admin/mod_forum_forum.phtml b/src/bb-modules/Forum/html_admin/mod_forum_forum.phtml new file mode 100644 index 000000000..724cbd028 --- /dev/null +++ b/src/bb-modules/Forum/html_admin/mod_forum_forum.phtml @@ -0,0 +1,62 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}Forum{% endblock %} + +{% block content %} +
          +
          +
          {% trans 'Forum details' %}
          +
          + +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          • +
          +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + + +{% endblock %} diff --git a/src/bb-modules/Forum/html_admin/mod_forum_index.phtml b/src/bb-modules/Forum/html_admin/mod_forum_index.phtml new file mode 100644 index 000000000..4df962436 --- /dev/null +++ b/src/bb-modules/Forum/html_admin/mod_forum_index.phtml @@ -0,0 +1,232 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}Forum{% endblock %} + +{% block content %} +
          + + + +
          + +
          + +
          + {{ mf.table_search }} + + + + + + + + + + + {% set posts = admin.forum_message_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, post in posts.list %} + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Message' %}{% trans 'Date' %}Actions
          {{post.author.id}} + {{post.forum_title}} +
          + {{ post.message|truncate(80) }}
          {{ post.created_at|timeago }} ago + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': posts, 'url':'forum'} %} +
          + +
          + {{ mf.table_search }} + + + + + + + + + + + + + + {% set topics = admin.forum_topic_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, topic in topics.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Replies' %}{% trans 'Views' %}{% trans 'Status' %}{% trans 'Sticky' %}Actions
          {{ topic.forum.category }} > {{ topic.forum.title }} > {{ topic.title }}{{ topic.stats.posts_count }}{{ topic.stats.views_count }}{{ mf.status_name(topic.status) }}{{ mf.q(topic.sticky) }} + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': topics, 'url':'forum'} %} +
          + +
          + +
          +
          +
          + +
          + {{ mf.selectbox('forum_id', admin.forum_get_pairs, request.forum_id, 1) }} +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          +
          + +
          +
          +
          + + + + + + + + + + + {% for category, forums in admin.forum_get_categories %} + + + + {% for forum in forums %} + + + + + + {% endfor %} + {% endfor %} + + + + + + + +
          {% trans 'Sorting' %}{% trans 'Title' %}{% trans 'Actions' %}
          {{category}}
          {{forum.title}} + + +
          + +
          +
          +
          + +
          +
          +
          + +{% endblock %} diff --git a/src/bb-modules/Forum/html_admin/mod_forum_profile.phtml b/src/bb-modules/Forum/html_admin/mod_forum_profile.phtml new file mode 100644 index 000000000..5e2a836da --- /dev/null +++ b/src/bb-modules/Forum/html_admin/mod_forum_profile.phtml @@ -0,0 +1,170 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Forum - Client profile{% endblock %} +{% set active_menu = 'support' %} + +{% block content %} + +{% set params = admin.extension_config_get({"ext":"mod_forum"}) %} +{% set fp = admin.forum_profile_get({"client_id":client_id}) %} +{% set posts = admin.forum_message_get_list({"client_id":client_id,"per_page":30, "page":request.page}|merge(request)) %} +{% set last_message = posts.list[0] %} +
          + + + +
          +
          + +
          + +
          + {{ fp.name }} +
          + + + + + + + + + + + + + + + + + + + + + + + {% if params.forum_points_enable %} + {% set points = fp.points %} + + + + + + + + + + + {% endif %} + + + + + + + +
          Name{{ fp.name }}
          Posts{{ fp.posts }}
          Last Activity{% if last_message %}{{ last_message.created_at|bb_date }} ({{ last_message.created_at|timeago }} ago){% else %}-{% endif %}
          Joined{{ fp.created_at|bb_date }}
          Points{{ points }}
          + +
          + +
          +

          {% trans 'Recent posts' %}

          +
          + + + + + + + + + + + + {% for i, post in posts.list %} + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Message' %}{% trans 'Date' %}Actions
          + {{post.forum_title}} +
          + {{ post.message|truncate(80) }}
          {{ post.created_at|timeago }} ago + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': posts, 'url':'profile/'~client_id} %} +
          + + +
          + {% if params.forum_points_enable %} + + + + + + + + + + {% set posts = admin.forum_message_get_list({"per_page":20, "client_id":client_id, "with_points":1}|merge(request)) %} + {% for i, post in posts.list %} + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Message' %}{% trans 'Actions' %}
          + {{post.forum_title}} - {{post.points}} point(s) +
          + {{post.message}} +
          + +
          {% trans 'The list is empty' %}
          + {% else %} +
          +

          {% trans 'Enable forum points feature in extension configuration page' %}

          +

          Forum settings

          +
          + {% endif %} +
          + +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_admin/mod_forum_settings.phtml b/src/bb-modules/Forum/html_admin/mod_forum_settings.phtml new file mode 100644 index 000000000..4666369cb --- /dev/null +++ b/src/bb-modules/Forum/html_admin/mod_forum_settings.phtml @@ -0,0 +1,111 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Forum settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + +
          +
          +
          {% trans 'Forum settings' %}
          +
          + + {% set params = admin.extension_config_get({"ext":"mod_forum"}) %} + +
          +
          +
          + +
          + + +
          +
          +
          + +
          +
          +
          +
            +
          • Give
          • +
          • +
          • points if post length is longer than
          • +
          • + +
          • +
          • symbols
          • +
          +
          +
          +
          + + + + + + + + + + + {% for category, forums in admin.forum_get_categories %} + + + + {% for forum in forums %} + + + + + {% endfor %} + {% endfor %} + +
          + + {% trans 'Give points for posting in selected forums' %}
          {{category}}
          + + {{forum.title}}
          +
          +
          + + + +
          +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_admin/mod_forum_topic.phtml b/src/bb-modules/Forum/html_admin/mod_forum_topic.phtml new file mode 100644 index 000000000..418baf118 --- /dev/null +++ b/src/bb-modules/Forum/html_admin/mod_forum_topic.phtml @@ -0,0 +1,238 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}Forum topic{% endblock %} + +{% block content %} + +
          +
          +
          {{topic.title}}
          +
          + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {{ topic.forum.title }}
          {{ topic.title }}
          {{ topic.first.author.name }}
          {% trans 'Views' %}{{ topic.stats.views_count }}
          {% trans 'Messages' %}{{ topic.stats.posts_count }}
          {{ mf.status_name(topic.status) }}
          {{ mf.q(topic.sticky) }}
          {{ topic.created_at|date('Y-m-d') }}
          {{ topic.due_at|date('Y-m-d') }}
          + +
          +
          + +
          + +
          + +
          +
          +
          + +
          + {{ mf.selectbox('forum_id', admin.forum_get_pairs, topic.forum.id, 1) }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          +
          + +
          + +
          +
          + +
          +{% set messages = guest.forum_get_topic_message_list({"forum_topic_id":topic.id, "page":request.page, "per_page":30}) %} +{% for i, message in messages.list %} +
          +
          +
          {{ message.author.name }}
          +
          + +
          +
          +
          +
          +
          + + + +
          +
          + +
          +
          +
          +
          +
          +
          + + + +
          +
          +
          + +
          +
          +
          + + + +
          +
          +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {{ message.id }}
          {{ message.ip|default('-') }} {{ message.ip|ipcountryname }}
          {{ message.created_at|date("l, d F Y") }}
          {{ message.updated_at|date("l, d F Y") }}
          +
          + Delete +
          +
          +
          +
          +
          +{% endfor %} +
          + +{% include "partial_pagination.phtml" with {'list': messages, 'url':'forum/topic/'~topic.id} %} + +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_client/mod_forum_forum.phtml b/src/bb-modules/Forum/html_client/mod_forum_forum.phtml new file mode 100644 index 000000000..1e9b7a9a8 --- /dev/null +++ b/src/bb-modules/Forum/html_client/mod_forum_forum.phtml @@ -0,0 +1,131 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{ forum.title }}{% endblock %} +{% block meta_description %}{{ forum.description }}{% endblock %} +{% block breadcrumb %} +
        • {% trans 'Forum' %}/
        • +
        • {{ forum.title }}
        • +{% endblock %} +{% block content %} +
          +
          +
          +
          +

          {{ forum.title }}

          +
          + {{ forum.description }} +
            +
          • + +
          • +
          • + {% if client %} + {% trans 'New topic' %} + {% else %} + + {% endif %} +
          • +
          +
          +
          + + + + + + + + + + + + + + {% set topics = guest.forum_get_topic_list({"forum_id":forum.id, "per_page":10,"page":request.page}) %} + {% for i, topic in topics.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + +
            {% trans 'Thread / Thread Starter' %}{% trans 'Last post' %}{% trans 'Replies' %}{% trans 'Views' %}
          + + + {{ topic.first.author.name }} + + {{topic.title}} +

          {{ topic.first.author.name }}

          +
          + {{ topic.last.created_at|bb_date }} +

          {% trans 'by' %} {{ topic.last.author.name }} {#{{ topic.last.author.name }}#}

          +
          {{ topic.stats.posts_count }}{{ topic.stats.views_count }}
          {% trans 'The list is empty' %}
          +
          +
          +
          +
          + + {% include "partial_pagination.phtml" with {'list': topics} %} + + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_client/mod_forum_index.phtml b/src/bb-modules/Forum/html_client/mod_forum_index.phtml new file mode 100644 index 000000000..cb374ccf2 --- /dev/null +++ b/src/bb-modules/Forum/html_client/mod_forum_index.phtml @@ -0,0 +1,118 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Forum' %}{% endblock %} +{% block meta_description %}{% trans 'Welcome to our forums.' %}{% endblock %} +{% block breadcrumb %}
        • {% trans 'Forum' %}
        • {% endblock %} + +{% block content %} + +{% for cat_name, forums in guest.forum_get_categories %} +
          +
          +
          +
          +

          {{cat_name}}

          +

          {% trans 'Welcome to our forums. Feel free to join the discussions.' %}

          +
          +
          + + + + + + + + + + + + {% for forum in forums %} + + + + + + + {% endfor %} + +
           {% trans 'Forum' %}{% trans 'Threads' %}{% trans 'Posts' %}
          + + + {{forum.title}} +

          {{forum.description}}

          +
          + {{forum.stats.topics_count|default(0)}} + {{forum.stats.posts_count|default(0)}}
          + {% if not client %} +

          + {% endif %} +
          +
          +
          +
          +{% endfor %} + +{% if client and client.forum_favorites %} +
          +
          +
          +
          +

          {% trans 'Favorite topics' %}

          +

          {% trans 'You set this topic as favorite. It can be done by opening any topic and clicking on "Add to favorites" button in "Topic information" block.' %}

          +
          +
          + + + + + + + + + + + + + + {% for i, topic in client.forum_favorites %} + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + +
            {% trans 'Thread / Thread Starter' %}{% trans 'Last post' %}{% trans 'Replies' %}{% trans 'Views' %}
          + + + {{ topic.first.author.name }} + + {{topic.title}} +

          {{ topic.first.author.name }}

          +
          + {{ topic.last.created_at|bb_date }} +

          {% trans 'by' %} {{ topic.last.author.name }} {#{{ topic.last.author.name }}#}

          +
          {{ topic.stats.posts_count }}{{ topic.stats.views_count }}
          {% trans 'The list is empty' %}
          + +
          +
          +
          +
          +{% endif %} + + + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_client/mod_forum_members_list.phtml b/src/bb-modules/Forum/html_client/mod_forum_members_list.phtml new file mode 100644 index 000000000..5f236fca2 --- /dev/null +++ b/src/bb-modules/Forum/html_client/mod_forum_members_list.phtml @@ -0,0 +1,58 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Forum members' %}{% endblock %} +{% block breadcrumb %}
        • {% trans 'Forum members' %}
        • {% endblock %} + +{% block content %} +
          +
          +
          +
          +

          {% trans 'Forum members' %}

          +

          {% trans 'List of all forum members. You can filter the list by clicking on letter above to find usernames which start with this letter.' %}

          +
          +
          + + + + + + + + + + + + + {% set members = guest.forum_members_list({"per_page":20}|merge(request)) %} + {% for member in members.list %} + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Username' %}{% trans 'Posts' %}{% trans 'Joined' %}
          {{member.name}}{{member.posts}}{{member.created_at|bb_date}}
          {% trans 'The list is empty' %}
          +
          +
          +
          +
          + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_client/mod_forum_rss.phtml b/src/bb-modules/Forum/html_client/mod_forum_rss.phtml new file mode 100644 index 000000000..eb24bf4b4 --- /dev/null +++ b/src/bb-modules/Forum/html_client/mod_forum_rss.phtml @@ -0,0 +1,30 @@ +{% set company = guest.system_company %} + + + + + {{ company.name }} + {{ 'forum' | link }} + en + {{ company.description }} + BoxBilling RSS Engine + + {{ company.logo_url }} + {{ company.name }} + {{ '/' | link }} + + {% for topic in guest.forum_get_topic_list({"per_page":100}).list %} + + + {{ topic.title | truncate(150) }} + {{ '/forum'|link }}/{{topic.forum.slug}}/{{topic.slug}} + {{ '/forum'|link }}/{{topic.forum.slug}}/{{topic.slug}} + {{ topic.first.message | truncate(250) }} + {{topic.forum.category}}/{{topic.forum.title}} + {{ topic.first.author.name }} + {{ topic.created_at|date("D, d M Y H:i:s O") }} + + {% endfor %} + + + \ No newline at end of file diff --git a/src/bb-modules/Forum/html_client/mod_forum_topic.phtml b/src/bb-modules/Forum/html_client/mod_forum_topic.phtml new file mode 100644 index 000000000..62794407a --- /dev/null +++ b/src/bb-modules/Forum/html_client/mod_forum_topic.phtml @@ -0,0 +1,173 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ topic.title }}{% endblock %} +{% block meta_description%}{{ topic.first.message|truncate(200) }}{% endblock %} +{% block breadcrumb %} +
        • {% trans 'Forum' %}/
        • +
        • {{ forum.title }}/
        • +
        • {{ topic.title }}
        • +{% endblock %} + +{% block content %} + +
          +
          +
          +
          +

          {{ topic.title }}

          +

          {{ forum.title }}

          +
          +
          + {% set messages = guest.forum_get_topic_message_list({"forum_topic_id":topic.id, "page":request.page, "per_page":10}) %} + {% for i, message in messages.list %} +
          +
          +
          + {{ message.author.name }} +

          + {{ message.author.name }} +

          +
          +
          +
          +
          #{{ i+1 }} | {{ message.created_at|bb_date }} + +
          + +
          +
          {{ message.message|bbmd }}
          + + + +
          +
          +
          +
          + {% else %} +
          {% trans 'No replies in this topic' %}
          + {% endfor %} + {% include "partial_pagination.phtml" with {'list': messages} %} +
          +
          +
          +
          +
          +
          +
          +
          +

          {% trans 'Topic information' %}

          +

          {% trans 'Information about topic. Here you can add this thread to favorites or choose to be notified regarding activity of this topic.' %}

          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if client %} + + + + + + {% endif %} +
          {% trans 'Forum' %}{{ forum.title }}
          {% trans 'Topic' %}{{ topic.title }}
          {% trans 'Started By' %}{{ topic.first.author.name }}
          {% trans 'Views' %}{{ topic.stats.views_count }}
          {% trans 'Messages' %}{{ topic.stats.posts_count }}
          {% trans 'Since' %}{{topic.created_at|bb_date}}
          + {% if client.forum_is_favorite({"id":topic.id}) %} + {% trans 'Remove from favorites' %} + {% else %} + {% trans 'Add to favorites' %} + {% endif %} + + {% if client.forum_is_subscribed({"id":topic.id}) %} + {% trans 'Disable notifications for this topic' %} + {% else %} + {% trans 'Subscribe to notifications' %} + {% endif %} +
          +

          + {% trans 'Back to threads list' %} +

          +
          +
          +
          +
          + +{% endblock %} +{% block js %} + +{% endblock%} \ No newline at end of file diff --git a/src/bb-modules/Forum/html_email/mod_forum_new_post.phtml b/src/bb-modules/Forum/html_email/mod_forum_new_post.phtml new file mode 100644 index 000000000..81510cb85 --- /dev/null +++ b/src/bb-modules/Forum/html_email/mod_forum_new_post.phtml @@ -0,0 +1,21 @@ +{% block subject %}[{{ guest.system_company.name }}] New Forum Message{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +New message was posted on Forum **{{ topic.forum.title }} > {{ topic.title }}** + +*** + +{{ message.message }} + +*** + +To reply to this message or disable notifications, visit the link below: + +{{ 'forum'|link }}/{{ topic.forum.slug }}/{{ topic.slug }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Forum/icon.png b/src/bb-modules/Forum/icon.png new file mode 100644 index 000000000..3fa57fe4f Binary files /dev/null and b/src/bb-modules/Forum/icon.png differ diff --git a/src/bb-modules/Forum/manifest.json b/src/bb-modules/Forum/manifest.json new file mode 100644 index 000000000..4a0b96e90 --- /dev/null +++ b/src/bb-modules/Forum/manifest.json @@ -0,0 +1,12 @@ +{ + "id": "forum", + "type": "mod", + "name": "Forum", + "description": "Forum for BoxBilling", + "icon_url": "icon.png", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "http://www.boxbilling.com/license.txt", + "version": "1.2.0" +} \ No newline at end of file diff --git a/src/bb-modules/Hook/Api/Admin.php b/src/bb-modules/Hook/Api/Admin.php new file mode 100644 index 000000000..5716017ba --- /dev/null +++ b/src/bb-modules/Hook/Api/Admin.php @@ -0,0 +1,77 @@ +getService(); + list($sql, $params) = $service->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + /** + * Invoke hook with params + * + * @param string $event - event name, ie: onEventBeforeInvoiceIsDue + * @optional array $params - what params are passed to event method $event->getParams() + * + * @return mixed - event return value + */ + public function call($data) + { + if(!isset($data['event']) || empty($data['event'])) { + error_log('Invoked event call without providing event name'); + return false; + } + + $event = $data['event']; + $params = isset($data['params']) ? $data['params'] : null; + if($this->di['config']['debug']) { + try { + $this->di['logger']->info($event. ': '. var_export($params, 1)); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + + return $this->di['events_manager']->fire($data); + } + + /** + * Reinstall and activate all existing hooks from module or all + * activated modules. Does not connect already connected event + * + * @optional string $mod - module name to connect hooks + * + * @return bool + */ + public function batch_connect($data) + { + $mod = isset($data['mod']) ? $data['mod'] : null; + $service = $this->getService(); + return $service->batchConnect($mod); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Hook/Service.php b/src/bb-modules/Hook/Service.php new file mode 100644 index 000000000..aba94265f --- /dev/null +++ b/src/bb-modules/Hook/Service.php @@ -0,0 +1,220 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($filter) + { + $q="SELECT id, rel_type, rel_id, meta_value as event, created_at, updated_at + FROM extension_meta + WHERE extension = 'mod_hook' + AND rel_type = 'mod' + AND meta_key = 'listener' + "; + return array($q, array()); + } + + public function toApiArray($row) + { + return $row; + } + + public static function onAfterAdminActivateExtension(\Box_Event $event) + { + $params = $event->getParameters(); + if(!isset($params['id'])) { + $event->setReturnValue(FALSE); + } else { + $di = $event->getDi(); + $ext = $di['db']->load('extension', $params['id']); + if(is_object($ext) && $ext->type == 'mod') { + $service = $di['mod_service']('hook'); + $service->batchConnect($ext->name); + } + $event->setReturnValue(TRUE); + } + } + + public static function onAfterAdminDeactivateExtension(\Box_Event $event) + { + $di = $event->getDi(); + $params = $event->getParameters(); + if($params['type'] == 'mod') { + $q="DELETE FROM extension_meta + WHERE extension = 'mod_hook' + AND rel_type = 'mod' + AND rel_id = :mod + AND meta_key = 'listener'"; + $di['db']->exec($q, array('mod'=>$params['id'])); + } + + $event->setReturnValue(TRUE); + } + + /** + * @param string $mod module name + * @return bool + */ + public function batchConnect($mod_name = null) + { + $mods = array(); + if(null !== $mod_name) { + $mods[] = $mod_name; + } else { + $extensionService = $this->di['mod_service']('extension'); + $mods = $extensionService->getCoreAndActiveModules(); + } + + foreach($mods as $m) { + $mod = $this->di['mod']($m); + if($mod->hasService()) { + $class = $mod->getService(); + $reflector = new \Reflectionclass($class); + foreach($reflector->getMethods() as $method) { + $p = $method->getParameters(); + if($method->isPublic() + && isset($p[0]) + && $p[0]->getclass() + && in_array($p[0]->getclass()->getName(), array('Box_Event', '\Box_Event'))) { + $this->connect(array('event'=>$method->getName(), 'mod'=>$mod->getName())); + } + } + } + } + + $this->_disconnectUnavailable(); + + return true; + } + + /** + * Connect event for module + * + * @param string $event - event name, ie: onAfterAdminDeactivateExtension + * @param string $mod - module name where hook is located + * + * @return boolean + * @throws Box_Exception + */ + private function connect($data) + { + if(!isset($data['event'])) { + throw new \Box_Exception('Hook event not passed'); + } + + if(!isset($data['mod'])) { + throw new \Box_Exception('Param mod not passed'); + } + + $event = $data['event']; + $mod = $data['mod']; + + $q="SELECT id + FROM extension_meta + WHERE extension = 'mod_hook' + AND rel_type = 'mod' + AND rel_id = :mod + AND meta_key = 'listener' + AND meta_value = :event + "; + if($this->di['db']->getCell($q, array('mod'=>$mod, 'event'=>$event))) { + // already connected + return true; + } + + $meta = $this->di['db']->dispense('extension_meta'); + $meta->extension = 'mod_hook'; + $meta->rel_type = 'mod'; + $meta->rel_id = $mod; + $meta->meta_key = 'listener'; + $meta->meta_value = $event; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $this->di['db']->store($meta); + + return true; + } + + /** + * Disconnect unavailable listeners + */ + private function _disconnectUnavailable() + { + $rm_sql="DELETE FROM extension_meta WHERE id = :id"; + + $sql="SELECT id, rel_id, meta_value + FROM extension_meta + WHERE extension = 'mod_hook' + AND rel_type = 'mod' + AND meta_key = 'listener' + "; + $list = $this->di['db']->getAll($sql); + $extensionService = $this->di['mod_service']('extension'); + foreach($list as $listener) { + try { + $mod_name = $listener['rel_id']; + $event = $listener['meta_value']; + + // do not disconnect core modules + if($extensionService->isCoreModule($mod_name)) { + continue; + } + + // disconect modules without service class + $mod = $this->di['mod']($mod_name); + if(!$mod->hasService()) { + $this->di['db']->exec($rm_sql, array('id'=>$listener['id'])); + continue; + } + + $ext = $this->di['db']->findOne('extension', "type = 'mod' AND name = :mod AND status = 'installed'", array('mod'=>$mod_name)); + if(!$ext) { + $this->di['db']->exec($rm_sql, array('id'=>$listener['id'])); + continue; + } + + $s = $mod->getService(); + if(!method_exists($s, $event)) { + $this->di['db']->exec($rm_sql, array('id'=>$listener['id'])); + continue; + } + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Hook/manifest.json b/src/bb-modules/Hook/manifest.json new file mode 100644 index 000000000..eb74fd372 --- /dev/null +++ b/src/bb-modules/Hook/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "hook", + "type": "mod", + "name": "Event hooks subsystem", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Index/Controller/Admin.php b/src/bb-modules/Index/Controller/Admin.php new file mode 100644 index 000000000..1a3b9080a --- /dev/null +++ b/src/bb-modules/Index/Controller/Admin.php @@ -0,0 +1,54 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('', 'get_index', array(), get_class($this)); + $app->get('/', 'get_index', array(), get_class($this)); + $app->get('/index', 'get_index', array(), get_class($this)); + $app->get('/index/', 'get_index', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + if($this->di['auth']->isAdminLoggedIn()) { + return $app->render('mod_index_dashboard'); + } else { + return $app->redirect('/staff/login'); + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Index/html_client/mod_index_dashboard.phtml b/src/bb-modules/Index/html_client/mod_index_dashboard.phtml new file mode 100644 index 000000000..85170634c --- /dev/null +++ b/src/bb-modules/Index/html_client/mod_index_dashboard.phtml @@ -0,0 +1,230 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Client Area' %}{% endblock %} +{% block page_header %}{% trans 'Dashboard' %}{% endblock %} + +{% block breadcrumbs %} + {% if not settings.hide_dashboard_breadcrumb %} + + {% endif %} +{% endblock %} + +{% import "macro_functions.phtml" as mf %} + +{% block content %} + +{% if settings.showcase_enabled %} +
          +

          {{ settings.showcase_heading }}

          +

          {{ settings.showcase_text }}

          +

          {{ settings.showcase_button_title }}

          +
          +{% endif %} + +{% if client %} + +{% set tickets = client.support_ticket_get_list({"status":'on_hold'}) %} +{% if tickets.total > 0 %} +
          +
          +
          +
          +

          {% trans 'Tickets waiting your reply' %}

          +
          +
          + + + + + + + + + + + + + {% for i, ticket in tickets.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + +
          {% trans 'Id' %}{% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %}{% trans 'Submitted' %}{% trans 'Actions' %}
          {{ticket.id}}{{ticket.subject}}{{ticket.helpdesk.name}}{{mf.status_name(ticket.status)}}{{ticket.created_at|bb_date}}{% trans 'Reply' %}
          {% trans 'The list is empty' %}
          +
          +
          +
          +
          +{% endif %} + +
          +{% set profile = client.client_get %} +
          +
          +
          +

          {% trans 'Profile' %}

          + +
          +
          +
          +
          {% trans 'ID' %}
          +
          #{{ profile.id }}
          +
          {% trans 'Email' %}
          +
          {{ profile.email }}
          +
          {% trans 'Balance' %}
          +
          {{ profile.balance | money(profile.currency) }}
          +
          +
          +
          +
          + +
          +
          +
          +

          {% trans 'Invoices' %}

          + +
          +
          +
          +
          {% trans 'Total' %}
          +
          {{ client.invoice_get_list().total }}
          +
          {% trans 'Paid' %}
          +
          {{ client.invoice_get_list({"status":"paid"}).total }}
          +
          {% trans 'Unpaid' %}
          +
          {{ client.invoice_get_list({"status":"unpaid"}).total }}
          +
          +
          +
          +
          +
          + +
          + +
          +
          +
          +

          {% trans 'Orders' %}

          + +
          +
          +
          +
          {% trans 'Total' %}
          +
          {{ client.order_get_list({"hide_addons":1}).total }}
          +
          {% trans 'Active' %}
          +
          {{ client.order_get_list({"hide_addons":1, "status":"active"}).total }}
          +
          {% trans 'Expiring' %}
          +
          {{ client.order_get_list({"expiring":1}).total }}
          +
          +
          +
          +
          + +
          +
          +
          +

          {% trans 'Tickets' %}

          + +
          +
          +
          +
          {% trans 'Total' %}
          +
          {{ client.support_ticket_get_list().total }}
          +
          {% trans 'Open' %}
          +
          {{ client.support_ticket_get_list({"status":'open'}).total }}
          +
          {% trans 'On Hold' %}
          +
          {{ client.support_ticket_get_list({"status":'on_hold'}).total }}
          +
          +
          +
          +
          +
          + +
          + +
          +
          +
          +

          {% trans 'Recent orders' %}

          +
          +
          + + + {% for i, order in client.order_get_list({"per_page":5, "page":request.page, "hide_addons":1}).list %} + + + + + {% else %} + + + + {% endfor %} + +
          {{ order.title|truncate(30) }}{{ mf.status_name(order.status) }}
          {% trans 'The list is empty' %}
          +
          +
          +
          + +
          +
          +
          +

          {% trans 'Recent emails' %}

          +
          +
          + + + {% for i, email in client.email_get_list({"per_page":5}).list %} + + + + + {% else %} + + + + {% endfor %} + +
          {{email.subject|truncate(30)}}{{ email.created_at|timeago }} {% trans 'ago' %}
          {% trans 'The list is empty' %}
          +
          +
          +
          + +
          + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Index/manifest.json b/src/bb-modules/Index/manifest.json new file mode 100644 index 000000000..6937d6596 --- /dev/null +++ b/src/bb-modules/Index/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "index", + "type": "mod", + "name": "Index page module", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Api/Admin.php b/src/bb-modules/Invoice/Api/Admin.php new file mode 100644 index 000000000..9f35abf18 --- /dev/null +++ b/src/bb-modules/Invoice/Api/Admin.php @@ -0,0 +1,887 @@ +getService(); + list ($sql, $params) = $service->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $invoice = $this->di['db']->getExistingModelById('Invoice', $item['id'], 'Invoice not found'); + $pager['list'][$key] = $this->getService()->toApiArray($invoice, true, $this->getIdentity()); + } + + return $pager; + } + + /** + * Get invoice details + * @param int $id - invoice id + * @return array + */ + public function get($data) + { + $model = $this->_getInvoice($data); + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Sets invoce status to paid. This method differs from invoice update method + * in a way that it sends notification to Events system, so emails are sent. + * Also this will try to automatically apply payment if clients balance is + * available + * + * @param int $id - invoice id + * + * @optional bool $execute - execute related tasks on invoice items. Default false. + * + * @return array + */ + public function mark_as_paid($data) + { + $execute = false; + if(isset($data['execute']) && $data['execute']) { + $execute = true; + } + $model = $this->_getInvoice($data); + return $this->getService()->markAsPaid($model, FALSE, $execute); + } + + /** + * Prepare invoice for editing and updating. + * Uses clients details, such as currency assigned to client. + * If client currency is not defined, sets default currency for client + * + * @param int $client_id - Client id. Client must have defined currency on profile. + * + * @optional bool $approve - set true to approve invoice after preparation. Defaults to false + * @optional int $gateway_id - Selected payment gateway id + * @optional array $items - list of invoice lines. One line is array of line parameters + * @optional string $text_1 - text to be displayed before invoice items table + * @optional string $text_2 - text to be displayed after invoice items table + * + * @return int $id - newly generated invoice ID + */ + public function prepare($data) + { + $required = array( + 'client_id' => 'Client id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->di['db']->getExistingModelById('Client', $data['client_id'], 'Client not found'); + + return $this->getService()->prepareInvoice($client, $data); + } + + /** + * Approve invoice. + * + * @param int $id - invoice id + * @param bool $use_credits - default = false + * @return bool + */ + public function approve($data) + { + $model = $this->_getInvoice($data); + + return $this->getService()->approveInvoice($model, $data); + } + + /** + * Add refunds + * @param int $id - invoice id + * + * @optional string $note - note for refund + * + * @return bool + */ + public function refund($data) + { + $model = $this->_getInvoice($data); + $note = isset($data['note']) ? $data['note'] : NULL; + + return $this->getService()->refundInvoice($model, $note); + } + + /** + * Update invoice details + * + * @param int $id - invoice id + * + * @optional string $paid_at - Invoice payment date (Y-m-d) or empty to remove + * @optional string $due_at - Invoice due date (Y-m-d)or empty to remove + * @optional string $created_at - Invoice issue date (Y-m-d) or empty to remove + * + * @optional string $serie - Invoice serie + * @optional string $nr - Invoice number + * @optional string $status - Invoice status: paid|unpaid + * @optional string $taxrate - Invoice tax rate + * @optional string $taxname - Invoice tax name + * @optional bool $approved - flag to set invoice as approved. Approved invoices are visible to clients + * @optional string $notes - notes + * @optional int $gateway_id - selected payment method - gateway id + + * @optional array $new_item - [title] [price] + * + * @optional string $text_1 - Custom invoice text 1 + * @optional string $text_2 - Custom invoice text 1 + * + * @optional string $seller_company - Seller company name + * @optional string $seller_company_vat - Seller company VAT number + * @optional string $seller_company_number - Seller company number + * @optional string $seller_address - Seller address + * @optional string $seller_phone - Seller phone + * @optional string $seller_email - Seller email + * + * @optional string $buyer_first_name - Buyer first name + * @optional string $buyer_last_name - Buyer last name + * @optional string $buyer_company - Buyer company name + * @optional string $buyer_company_vat - Buyer company VAT number + * @optional string $buyer_company_number - Buyer company number + * @optional string $buyer_address - Buyer address + * @optional string $buyer_city - Buyer city + * @optional string $buyer_state - Buyer state + * @optional string $buyer_country - Buyer country + * @optional string $buyer_zip - Buyer zip + * @optional string $buyer_phone - Buyer phone + * @optional string $buyer_email - Buyer email + * + * @return bool + */ + public function update($data) + { + $model = $this->_getInvoice($data); + return $this->getService()->updateInvoice($model, $data); + } + + /** + * Remove one line from invoice + * + * @param int $id - invoice line id + * @return bool + */ + public function item_delete($data) + { + $required = array( + 'id' => 'Invoice item id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('InvoiceItem', $data['id'], 'Invoice item was not found'); + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + return $invoiceItemService->remove($model); + } + + /** + * Delete invoice + * + * @param int $id - Invoice id + * @return bool + */ + public function delete($data) + { + $model = $this->_getInvoice($data); + return $this->getService()->deleteInvoiceByAdmin($model); + } + + /** + * Generates new invoice for order. If unpaid invoice for selected order + * already exists, new invoice will not be generated, and existing invoice id + * is returned + * + * @param int $id - ID of order to generate new invoice for + * @optional int $due_days - Days number until invoice is due + * + * @return string - invoice id + * @throws Exception + * @throws LogicException + */ + public function renewal_invoice($data) + { + $required = array( + 'id' => 'Order id required', + ); + + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('ClientOrder', $data['id'], 'Order not found'); + if($model->price <= 0) { + throw new \Box_Exception('Order :id is free. No need to generate invoice.', array(':id'=>$model->id)); + } + + return $this->getService()->renewInvoice($model, $data); + } + + /** + * Use credits to pay for invoices + * if credits are available in clients balance + * + * @optional int $client_id - cover only one client invoices + * + * @return bool + */ + public function batch_pay_with_credits($data) + { + return $this->getService()->doBatchPayWithCredits($data); + } + + /** + * Cover one invoice with credits + * + * @param int $id - Invoice id + * + * @return bool + */ + public function pay_with_credits($data) + { + $invoice = $this->_getInvoice($data); + return $this->getService()->payInvoiceWithCredits($invoice); + } + + /** + * Generate invoices for expiring orders + * + * @return bool + */ + public function batch_generate() + { + return $this->getService()->generateInvoicesForExpiringOrders(); + } + + /** + * Action to activate paid invoices lines + * + * @return bool + */ + public function batch_activate_paid() + { + return $this->getService()->doBatchPaidInvoiceActivation(); + } + + /** + * Send buyer reminders about upcoming payment + * + * @return bool + */ + public function batch_send_reminders($data) + { + return $this->getService()->doBatchRemindersSend(); + } + + /** + * Calls due events on unpaid and approved invoices. + * Attach custom event hooks events: + * + * onEventBeforeInvoiceIsDue - event receives params: id and days_left + * onEventAfterInvoiceIsDue - event receives params: id and days_passed + * + * @optional bool $once_per_day - default true. Pass false if you want to execute this action more than once per day + * + * @return bool - true if executed, false - if it was already executed + */ + public function batch_invoke_due_event($data) + { + return $this->getService()->doBatchInvokeDueEvent($data); + } + + /** + * Send payment reminder notification for client. + * Calls event hook, so you can attach your custom notification code + * + * @param int $id - invoice id + * @return bool + */ + public function send_reminder($data) + { + $invoice = $this->_getInvoice($data); + return $this->getService()->sendInvoiceReminder($invoice); + } + + /** + * Return invoice statuses with counter + * + * @return array + */ + public function get_statuses($data) + { + return $this->getService()->counter(); + } + + /** + * Process all received transactions + * + * @return bool + */ + public function transaction_process_all($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->proccessReceivedATransactions(); + } + + /** + * Process selected transaction + * @param int $id - Transaction id + * + * @return transaction output or true; + */ + public function transaction_process($data) + { + $required = array( + 'id' => 'Transaction id is missing', + ); + + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Transaction', $data['id'], 'Transaction not found'); + + $output = null; + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminTransactionProcess', 'params'=>array('id'=>$model->id))); + + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->preProcessTransaction ($model); + } + + /** + * Update transaction details + * @param int $id - transaction id + * + * @optional int $invoice_id - new invoice id + * @optional string $txn_id - transaction id on payment gateway + * @optional string $txn_status - transaction status on payment gateway + * @optional int $gateway_id - Payment gateway ID on BoxBilling + * @optional float $amount - Transaction amount + * @optional string $currency - Currency code. Must be available on BoxBilling + * @optional string $type - Currency code. Must be available on BoxBilling + * @optional string $status - Transaction status on BoxBilling + * @optional bool $validate_ipn - Flag to enable and disable IPN validation for this transaction + * @optional string $note - Custom note + * + * @return bool + */ + public function transaction_update($data) + { + $required = array( + 'id' => 'Transaction id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('Transaction', $data['id'], 'Transaction not found'); + + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->update($model, $data); + } + + /** + * Create custom transaction + * + * @param int $bb_invoice_id - BoxBilling invoice id + * @param int $bb_gateway_id - BoxBilling gateway id + * + * @optional array $get - $_GET data + * @optional array $post - $_POST data + * @optional array $server - $_SERVER data + * @optional array $http_raw_post_data - file_get_contents("php://input") + * @optional string $txn_id - transaction id on payment gateway + * @optional bool $skip_validation - makes params bb_invoice_id and bb_gateway_id optional + * + * @return int $id - new transaction id + */ + public function transaction_create($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->create($data); + } + + /** + * Remove transaction + * + * @param int $id - Transaction id + * @return bool + */ + public function transaction_delete($data) + { + $required = array( + 'id' => 'Transaction id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('Transaction', $data['id'], 'Transaction not found'); + + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->delete($model); + } + + /** + * Get transaction details + * @param int $id - Transaction id + * @return array + */ + public function transaction_get($data) + { + $required = array( + 'id' => 'Transaction id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('Transaction', $data['id'], 'Transaction not found'); + + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->toApiArray($model, true); + } + + /** + * Get paginated list of transactions + * + * @optional string $txn_id - search for transactions by transaction id on payment gateway + * + * @return array + */ + public function transaction_get_list($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + list ($sql, $params) = $transactionService->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $transaction = $this->di['db']->getExistingModelById('Transaction', $item['id'], 'Transaction not found'); + $pager['list'][$key] = $transactionService->toApiArray($transaction); + } + + return $pager; + } + + /** + * Return transactions statuses with counter + * @return array + */ + public function transaction_get_statuses($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->counter(); + } + + /** + * Get available transaction statuses + * @return array + */ + public function transaction_get_statuses_pairs($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->getStatusPairs(); + } + + /** + * Get available transaction statuses + * @return array + */ + public function transaction_statuses($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->getStatuses(); + } + + /** + * Get available transaction statuses on gateways + * + * @return array + */ + public function transaction_gateway_statuses($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->getGatewayStatuses(); + } + + /** + * Get available transaction types + * @return array + */ + public function transaction_types($data) + { + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + return $transactionService->getTypes(); + } + + /** + * Get available gateways + * + * @return array + */ + public function gateway_get_list($data) + { + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + list ($sql, $params) = $gatewayService->getSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $gateway = $this->di['db']->getExistingModelById('PayGateway', $item['id'], 'Gateway not found'); + $pager['list'][$key] = $gatewayService->toApiArray($gateway, false, $this->getIdentity()); + } + + return $pager; + } + + /** + * Get available gateways pairs + * @return array + */ + public function gateway_get_pairs($data) + { + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->getPairs(); + } + + /** + * Return existing module but not activated + * + * @param none + * @return array + */ + public function gateway_get_available($data) + { + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->getAvailable(); + } + + /** + * Install available payment gateway + * @param code - available payment gateway code + * @return true + */ + public function gateway_install($data) + { + $required = array( + 'code' => 'Payment gateway code is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $code = $data['code']; + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->install($code); + } + + /** + * Get gateway details + * + * @param int $id - gateway id + * @return array + * @throws Box_Exception + */ + public function gateway_get($data) + { + $required = array( + 'id' => 'Gateway id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('PayGateway', $data['id'], 'Gateway not found'); + + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Copy gateway from existing one + * + * @param int $id - id of gateway to be copied + * @return int - new id of gateway + * @throws Box_Exception + */ + public function gateway_copy($data) + { + $required = array( + 'id' => 'Gateway id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('PayGateway', $data['id'], 'Gateway not found'); + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->copy($model); + } + + /** + * Change gateway settings + * + * @param int $id - gateway id + * @optional string $title - gateway title + * @optional array $config - gateway config array + * @optional array $accepted_currencies - list of currencies this gateway supports + * @optional bool $enabled - flag to enable or disable gateway + * @optional bool $allow_single - flag to enable or disable single payment option + * @optional bool $allow_recurrent - flag to enable or disable recurrent payment option + * @optional bool $test_mode - flag to enable or disable test mode for gateway + * + * @return boolean + * @throws Box_Exception + */ + public function gateway_update($data) + { + $required = array( + 'id' => 'Gateway id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('PayGateway', $data['id'], 'Gateway not found'); + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->update($model, $data); + } + + /** + * Remove payment gateway from system + * + * @param int $id - gateway id + * @return boolean + * @throws Box_Exception + */ + public function gateway_delete($data) + { + $required = array( + 'id' => 'Gateway id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('PayGateway', $data['id'], 'Gateway not found'); + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->delete($model); + } + + /** + * Get list of subscribtions + * + * @return array + */ + public function subscription_get_list($data) + { + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + list ($sql, $params) = $subscriptionService->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $subscription = $this->di['db']->getExistingModelById('Subscription', $item['id'], 'Subscription not found'); + $pager['list'][$key] = $subscriptionService->toApiArray($subscription); + } + + return $pager; + } + + /** + * Add new subscription + * + * @param int $client_id - client id + * @param int $gateway_id - payment gateway id + * @param string $currency - currency + * + * @optional string $sid - subscription id on payment gateway + * @optional string $status - status: active|canceled + * @optional string $period - example: 1W - every week, 2M - every 2 months + * @optional string $amount - billed amount + * @optional string $rel_type - related item type + * @optional string $rel_id - related item id + * + * @return int - id + * @throws Box_Exception + */ + public function subscription_create($data) + { + $required = array( + 'client_id' => 'Client id not passed', + 'gateway_id' => 'Payment gateway id not passed', + 'currency' => 'Subscription currency not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->di['db']->getExistingModelById('Client', $data['client_id'], 'Client not found'); + $payGateway = $this->di['db']->getExistingModelById('PayGateway', $data['gateway_id'], 'Payment gateway not found'); + + if($client->currency != $data['currency']) { + throw new \Box_Exception('Client currency must match subscription currency. Check if clients currency is defined.'); + } + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + return $subscriptionService->create($client, $payGateway, $data); + } + + /** + * Update subscription options + * + * @param int $id - subscription id + * + * @optional int $status - subscription status + * @optional string $sid - subscription id on payment gateway + * @optional string $period - subscription period code + * @optional string $amount - subscription amount + * @optional string $currency - subscription currency + * + * @return boolean + * @throws Box_Exception + */ + public function subscription_update($data) + { + $required = array( + 'id' => 'Subscription id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Subscription', $data['id'], 'Subscription not found'); + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + return $subscriptionService->update($model, $data); + } + + /** + * Get subscription details. + * + * @param int $id - subscription id + * @param string $sid - subscription id on payment gateway - required if id is not passed + * + * @return array + * @throws Box_Exception + */ + public function subscription_get($data) + { + if (!isset($data['id']) && !isset($data['sid'])) { + if (!isset($data['id'])){ + throw new \Box_Exception('Subscription id not passed'); + } + if (!isset($data['sid'])){ + throw new \Box_Exception('Subscription sid not passed'); + } + } + $model = null; + if(isset($data['id'])) { + $model = $this->di['db']->load('Subscription', $data['id']); + } + + if(!$model && isset($data['sid'])) { + $model = $this->di['db']->findOne('Subscription', 'sid = ?', array($data['sid'])); + } + + if(!$model instanceof \Model_Subscription) { + throw new \Box_Exception('Subscription not found'); + } + + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + return $subscriptionService->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Remove subscription + * + * @param int $id - subscription id + * + * @return boolean + * @throws Box_Exception + */ + public function subscription_delete($data) + { + $required = array( + 'id' => 'Subscription id not passed' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Subscription', $data['id'], 'Subscription not found'); + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + return $subscriptionService->delete($model); + } + + /** + * Remove tax rule + * + * @param int $id - tax id + * + * @return boolean + * @throws Box_Exception + */ + public function tax_delete($data) + { + $required = array( + 'id' => 'Tax id is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Tax', $data['id'], 'Tax rule not found'); + $taxService = $this->di['mod_service']('Invoice', 'Tax'); + return $taxService->delete($model); + } + + /** + * Create new tax rule + * + * @param string $name - tax name + * @param flaot $taxrate - tax rate + * + * @return int - new tax id + */ + public function tax_create($data) + { + $required = array( + 'name' => 'Tax name is missing', + 'taxrate' => 'Tax rate is missing or is not valid', + ); + + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $taxService = $this->di['mod_service']('Invoice', 'Tax'); + return $taxService->create($data); + } + + /** + * Get list of taxes + * + * @return array + */ + public function tax_get_list($data) + { + $taxService = $this->di['mod_service']('Invoice', 'Tax'); + list ($sql, $params) = $taxService->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + /** + * Automatically setup the EU VAT tax rules for you for all EU Member States. + * This action will delete any existing tax rules and configure the VAT rates + * for all EU countries. + * + * @param string $name - VAT label + * @param string $taxrate - VAT rate + * @return type + */ + public function tax_setup_eu($data) + { + $required = array( + 'name' => 'Tax name is missing', + 'taxrate' => 'Tax rate is missing or is not valid', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $taxService = $this->di['mod_service']('Invoice', 'Tax'); + return $taxService->setupEUTaxes($data); + } + + private function _getInvoice($data) + { + $required = array( + 'id' => 'Invoice id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Invoice', $data['id'], 'Invoice was not found'); + + return $model; + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Api/Client.php b/src/bb-modules/Invoice/Api/Client.php new file mode 100644 index 000000000..1031cf9f2 --- /dev/null +++ b/src/bb-modules/Invoice/Api/Client.php @@ -0,0 +1,198 @@ +getIdentity()->id; + $data['approved'] = true; + list ($sql, $params) = $this->getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $invoice = $this->di['db']->getExistingModelById('Invoice', $item['id'], 'Invoice not found'); + $pager['list'][$key] = $this->getService()->toApiArray($invoice); + } + + return $pager; + } + + /** + * Get invoice details + * + * @param string $hash - invoice hash + * @return type + * @throws Exception + */ + public function get($data) + { + $required = array( + 'hash' => 'Invoice hash not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->findOne('Invoice', 'hash = :hash', array('hash'=>$data['hash'])); + if(!$model) { + throw new \Box_Exception('Invoice was not found'); + } + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Update Invoice details. Only unpaid invoice details can be updated. + * + * @param string $hash - invoice hash + * + * @optional int $gateway_id - selected payment gateway id + * + * @return bool + * @throws Exception + */ + public function update($data) + { + $required = array( + 'hash' => 'Invoice hash not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $invoice = $this->di['db']->findOne('Invoice', 'hash = :hash', array('hash'=>$data['hash'])); + if(!$invoice) { + throw new \Box_Exception('Invoice was not found'); + } + if($invoice->status == 'paid') { + throw new \Box_Exception('Paid Invoice can not be modified'); + } + + $updateParams['gateway_id'] = isset($data['gateway_id']) ? $data['gateway_id'] : null; + return $this->getService()->updateInvoice($invoice, $updateParams); + } + + /** + * Generates new invoice for selected order. If unpaid invoice for selected order + * already exists, new invoice will not be generated, and old invoice hash + * is returned + * + * @param int $order_id - ID of order to generate new invoice for + * @return string - invoice hash + * @throws Exception + * @throws LogicException + */ + public function renewal_invoice($data) + { + $required = array( + 'order_id' => 'Order id required', + ); + + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->findOne('ClientOrder', 'client_id = ? and id = ?', array($this->getIdentity()->id, $data['order_id'])); + if(!$model instanceof \Model_ClientOrder) { + throw new \Box_Exception('Order not found'); + } + if($model->price <= 0) { + throw new \Box_Exception('Order :id is free. No need to generate invoice.', array(':id'=>$model->id)); + } + $service = $this->getService(); + $invoice = $service->generateForOrder($model); + $service->approveInvoice($invoice, array('id'=>$invoice->id, 'use_credits'=>true)); + $this->di['logger']->info('Generated new renewal invoice #%s', $invoice->id); + return $invoice->hash; + } + + /** + * Deposit money in advance. Generates new invoice for depositing money. + * Clients currency must be defined. + * + * @param float $amount - amount to be deposited. + * @return string - invoice hash + */ + public function funds_invoice($data) + { + $required = array( + 'amount' => 'Amount is required', + ); + + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + if (!is_numeric($data['amount'])) { + throw new \Box_Exception('You need to enter numeric value'); + } + + $service = $this->getService(); + $invoice = $service->generateFundsInvoice($this->getIdentity(), $data['amount']); + $service->approveInvoice($invoice, array('id'=>$invoice->id)); + $this->di['logger']->info('Generated add funds invoice #%s', $invoice->id); + return $invoice->hash; + } + + /** + * Client removes unpaid invoice. + * + * @param string $hash - invoice hash + * @return boolean + * @throws Exception + */ + public function delete($data) + { + $required = array( + 'hash' => 'Invoice hash not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->findOne('Invoice', 'hash = :hash', array('hash'=>$data['hash'])); + if(!$model) { + throw new \Box_Exception('Invoice was not found'); + } + + return $this->getService()->deleteInvoiceByClient($model); + } + + /** + * Get paginated list of transactions. + * + * @optional string $invoice_hash - filter transactions by invoice hash + * @optional int $gateway_id - filter transactions by payment gateway id + * @optional string $status - filter transactions by status + * @optional string $currency - filter transactions by currency code + * @optional string $date_from - filter transactions by date + * @optional string $date_to - filter transactions by date + * @return type + */ + public function transaction_get_list($data) + { + $data['client_id'] = $this->getIdentity()->id; + $data['status'] = 'processed'; + $transactionService = $this->di['mod_service']('Invoice', 'Transaction'); + list ($sql, $params) = $transactionService->getSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $transaction = $this->di['db']->getExistingModelById('Transaction', $item['id'], 'Transaction not found'); + $pager['list'][$key] = $transactionService->toApiArray($transaction); + } + + return $pager; + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Api/Guest.php b/src/bb-modules/Invoice/Api/Guest.php new file mode 100644 index 000000000..2a65b5d1b --- /dev/null +++ b/src/bb-modules/Invoice/Api/Guest.php @@ -0,0 +1,132 @@ + 'Invoice hash not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->findOne('Invoice', 'hash = :hash', array('hash'=>$data['hash'])); + if(!$model) { + throw new \Box_Exception('Invoice was not found'); + } + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Update Invoice details. Only unpaid invoice details can be updated. + * + * @param string $hash - invoice hash + * + * @optional int $gateway_id - selected payment gateway id + * + * @return bool + * @throws Exception + */ + public function update($data) + { + $required = array( + 'hash' => 'Invoice hash not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $invoice = $this->di['db']->findOne('Invoice', 'hash = :hash', array('hash'=>$data['hash'])); + if(!$invoice) { + throw new \Box_Exception('Invoice was not found'); + } + if($invoice->status == 'paid') { + throw new \Box_Exception('Paid Invoice can not be modified'); + } + + $updateParams['gateway_id'] = isset($data['gateway_id']) ? $data['gateway_id'] : null; + return $this->getService()->updateInvoice($invoice, $updateParams); + } + + /** + * Get list of available payment gateways to pay for invoices + * + * @optional string $format - if format is "pairs" then id=>name values are returned + * + * @return array + */ + public function gateways($data) + { + $gatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + return $gatewayService->getActive($data); + } + + /** + * Process invoice for selected gateway. Returned result can be processed + * to redirect or to show required information. Returned result depends + * on payment gateway. + * + * Tries to detect if invoice can be subscribed and if payment gateway supports subscriptions + * uses subscription payment. + * + * @param string $hash - invoice hash + * @param int $gateway_id - payment gateway id + * + * @optional bool $auto_redirect - should payment adapter automatically redirect client or just print pay now button + * + * @return array + * @throws Exception + * @throws LogicException + */ + public function payment($data) + { + if(!isset($data['hash'])) { + throw new \Box_Exception('Invoice hash not passed. Missing param hash', null, 810); + } + + if(!isset($data['gateway_id'])) { + throw new \Box_Exception('Payment method not found. Missing param gateway_id', null, 811); + } + + return $this->getService()->processInvoice($data); + } + + + /** + * Generates PDF for given invoice + * + * @param string $hash - invoice hash + * + * + * + * @throws Exception + */ + public function pdf($data) + { + if (!isset($data['hash'])) { + throw new \Box_Exception("Invoice hash is missing"); + } + + return $this->getService()->generatePDF($data['hash'], $this->getIdentity()); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Controller/Admin.php b/src/bb-modules/Invoice/Controller/Admin.php new file mode 100644 index 000000000..189e4492e --- /dev/null +++ b/src/bb-modules/Invoice/Controller/Admin.php @@ -0,0 +1,170 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 400, + 'location' => 'invoice', + 'label' => 'Invoices', + 'uri' => 'invoice', + 'class' => 'invoices', + ), + 'subpages' => array( + array( + 'location' => 'invoice', + 'label' => 'Overview', + 'uri' => $this->di['url']->adminLink('invoice'), + 'index' => 100, + 'class' => '', + ), + array( + 'location' => 'invoice', + 'label' => 'Advanced search', + 'uri' => $this->di['url']->adminLink('invoice', array('show_filter' => 1)), + 'index' => 200, + 'class' => '', + ), + array( + 'location' => 'invoice', + 'label' => 'Subscriptions', + 'uri' => $this->di['url']->adminLink('invoice/subscriptions'), + 'index' => 300, + 'class' => '', + ), + array( + 'location' => 'invoice', + 'label' => 'Transactions overview', + 'uri' => $this->di['url']->adminLink('invoice/transactions'), + 'index' => 400, + 'class' => '', + ), + array( + 'location' => 'invoice', + 'label' => 'Transactions search', + 'uri' => $this->di['url']->adminLink('invoice/transactions', array('show_filter' => 1)), + 'index' => 500, + 'class' => '', + ), + array( + 'location' => 'system', + 'label' => 'Tax rules', + 'uri' => $this->di['url']->adminLink('invoice/tax'), + 'index' => 180, + 'class' => '', + ), + array( + 'location' => 'system', + 'label' => 'Payment gateways', + 'uri' => $this->di['url']->adminLink('invoice/gateways'), + 'index' => 160, + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/invoice', 'get_index', array(), get_class($this)); + $app->get('/invoice/subscriptions', 'get_subscriptions', array(), get_class($this)); + $app->get('/invoice/transactions', 'get_transactions', array(), get_class($this)); + $app->get('/invoice/gateways', 'get_gateways', array(), get_class($this)); + $app->get('/invoice/gateway/:id', 'get_gateway', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/invoice/manage/:id','get_invoice', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/invoice/transaction/:id','get_transaction', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/invoice/subscription/:id','get_subscription', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/invoice/tax', 'get_tax', array(), get_class($this)); + } + + public function get_tax(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_invoice_tax'); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_invoice_index'); + } + + public function get_invoice(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $invoice = $api->invoice_get(array('id'=>$id)); + return $app->render('mod_invoice_invoice', array('invoice'=>$invoice)); + } + + public function get_transaction(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $tx = $api->invoice_transaction_get(array('id'=>$id)); + return $app->render('mod_invoice_transaction', array('transaction'=>$tx)); + } + + public function get_transactions(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_invoice_transactions'); + } + + public function get_subscriptions(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_invoice_subscriptions'); + } + + public function get_subscription(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $tx = $api->invoice_subscription_get(array('id'=>$id)); + return $app->render('mod_invoice_subscription', array('subscription'=>$tx)); + } + + public function get_gateways(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_invoice_gateways'); + } + + public function get_gateway(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $gateway = $api->invoice_gateway_get(array('id'=>$id)); + return $app->render('mod_invoice_gateway', array('gateway'=>$gateway)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Controller/Client.php b/src/bb-modules/Invoice/Controller/Client.php new file mode 100644 index 000000000..2a850f1af --- /dev/null +++ b/src/bb-modules/Invoice/Controller/Client.php @@ -0,0 +1,109 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/invoice', 'get_invoices', array(), get_class($this)); + $app->post('/invoice', 'get_invoices', array(), get_class($this)); + $app->get('/invoice/:hash', 'get_invoice', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->post('/invoice/:hash', 'get_invoice', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->get('/invoice/print/:hash', 'get_invoice_print', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->post('/invoice/print/:hash', 'get_invoice_print', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->get('/invoice/banklink/:hash/:id', 'get_banklink', array('id'=>'[0-9]+', 'hash'=>'[a-z0-9]+'), get_class($this)); + $app->get('/invoice/thank-you/:hash', 'get_thankyoupage', array('hash'=>'[a-z0-9]+'), get_class($this)); + $app->get('/invoice/pdf/:hash', 'get_pdf', array('hash'=>'[a-z0-9]+'), get_class($this)); + } + + public function get_invoices(\Box_App $app) + { + $api = $app->getApiClient(); + return $app->render('mod_invoice_index'); + } + + public function get_invoice(\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $invoice = $api->invoice_get($data); + return $app->render('mod_invoice_invoice', array('invoice'=>$invoice)); + } + + public function get_invoice_print(\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $invoice = $api->invoice_get($data); + return $app->render('mod_invoice_print', array('invoice'=>$invoice)); + } + + public function get_thankyoupage(\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $invoice = $api->invoice_get($data); + return $app->render('mod_invoice_thankyou', array('invoice'=>$invoice)); + } + + public function get_banklink(\Box_App $app, $hash, $id) + { + $api = $app->getApiGuest(); + $data = array( + 'subscription' => $this->di['request']->getQuery('subscription'), + 'hash' => $hash, + 'gateway_id' => $id, + 'auto_redirect' => true, + ); + + $invoice = $api->invoice_get($data); + $result = $api->invoice_payment($data); + return $app->render('mod_invoice_banklink', array('payment'=>$result, 'invoice'=>$invoice)); + } + + public function get_pdf (\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $invoice = $api->invoice_pdf($data); + return $app->render('mod_invoice_pdf', array('invoice'=>$invoice)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/Service.php b/src/bb-modules/Invoice/Service.php new file mode 100644 index 000000000..b359f1054 --- /dev/null +++ b/src/bb-modules/Invoice/Service.php @@ -0,0 +1,1594 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getPaymentAdapter(\Model_PayGateway $pg, \Model_Invoice $model = null, $optional = array()) + { + $defaults = array(); + $config = $this->di['tools']->decodeJ($pg->config); + + $cancel_url = $this->di['url']->get('invoice?status=cancel'); + $return_url = $this->di['url']->get('invoice?status=ok'); + $callback_url = $this->di['url']->get('bb-ipn.php?bb_gateway_id='.$pg->id); + $callback_redirect_url = $callback_url; + + if($model instanceof \Model_Invoice) { + $cancel_url = $this->di['url']->get('invoice/'.$model->hash.'?status=cancel'); + $return_url = $this->di['url']->get('invoice/'.$model->hash.'?status=ok'); + $callback_url .= '&bb_invoice_id='.$model->id; + $callback_redirect_url .= '&bb_invoice_id='.$model->id.'&bb_redirect_=1&&bb_invoice_hash='.$model->hash; + $defaults['thankyou_url'] = $this->di['url']->get('invoice/thank-you/'.$model->hash); + $defaults['invoice_url'] = $this->di['url']->get('invoice/'.$model->hash); + } + + $defaults['auto_redirect'] = false; + $defaults['test_mode'] = (bool)$pg->test_mode; + $defaults['return_url'] = $return_url; + $defaults['cancel_url'] = $cancel_url; + $defaults['notify_url'] = $callback_url; + $defaults['redirect_url'] = $callback_redirect_url; + $defaults['continue_shopping_url'] = $this->di['url']->get('order'); + $defaults['single_page'] = true; + + if(isset($optional['auto_redirect'])) { + $defaults['auto_redirect'] = $optional['auto_redirect']; + } + + $config = array_merge($config, $defaults); + $class = sprintf('Payment_Adapter_%s', $pg->gateway); + + if(!class_exists($class)) { + throw new \Box_Exception("Payment gateway :adapter was not found", array(':adapter'=>$class)); + } + + $adapter = new $class($config); + + //set dependency injection without interface + if(method_exists($adapter, 'setDi')) { + $adapter->setDi($this->di); + } + + return $adapter; + } + + public function getSearchQuery($data) + { + $sql="SELECT p.* + FROM invoice p + LEFT JOIN invoice_item pi ON (p.id = pi.invoice_id) + LEFT JOIN client cl ON (cl.id = p.client_id) + WHERE 1 "; + + $params = array(); + + $search = isset($data['search']) ? $data['search'] : NULL; + $order_id = isset($data['order_id']) ? $data['order_id'] : NULL; + $id = isset($data['id']) ? $data['id'] : NULL; + $id_nr = isset($data['nr']) ? $data['nr'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $client = isset($data['client']) ? $data['client'] : NULL; + $created_at = isset($data['created_at']) ? $data['created_at'] : NULL; + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + $paid_at = isset($data['paid_at']) ? $data['paid_at'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $approved = isset($data['approved']) ? $data['approved'] : NULL; + $currency = isset($data['currency']) ? $data['currency'] : NULL; + + if($order_id) { + $sql .= ' AND pi.type = :item_type AND pi.rel_id = :order_id'; + $params['item_type'] = \Model_InvoiceItem::TYPE_ORDER; + $params['order_id'] = $order_id; + } + + if($id) { + $sql .= ' AND p.id = :id'; + $params['id'] = $id; + } + + if($id_nr) { + $sql .= ' AND (p.id = :id_nr OR p.nr = :id_nr)'; + $params['id_nr'] = $id_nr; + } + + if($approved) { + $sql .= ' AND p.approved = :approved'; + $params['approved'] = $approved; + } + + if($status) { + $sql .= ' AND p.status = :status'; + $params['status'] = $status; + } + + if($currency) { + $sql .= ' AND p.currency = :currency'; + $params['currency'] = $currency; + } + + if(NULL !== $client_id) { + $sql .= ' AND p.client_id = :client_id'; + $params['client_id'] = $client_id; + } + + if(NULL !== $client) { + $sql .= ' AND (cl.first_name LIKE :client_search OR cl.last_name LIKE :client_search OR cl.id = :client OR cl.email = :client)'; + $params['client_search'] = $client.'%'; + $params['client'] = $client; + } + + if($created_at) { + $sql .= " AND DATE_FORMAT(p.created_at, '%Y-%m-%d') = :created_at"; + $params['created_at'] = date('Y-m-d', strtotime($created_at)); + } + + if($date_from) { + $sql .= " AND UNIX_TIMESTAMP(p.created_at) >= :date_from"; + $params['date_from'] = strtotime($date_from); + } + + if($date_to) { + $sql .= " AND UNIX_TIMESTAMP(p.created_at) <= :date_to"; + $params['date_to'] = strtotime($date_to); + } + + if($paid_at) { + $sql .= " AND DATE_FORMAT(p.paid_at, '%Y-%m-%d') = :paid_at"; + $params['paid_at'] = date('Y-m-d', strtotime($paid_at)); + } + + if($search) { + $sql .= " AND (p.id = :int OR p.nr LIKE :search_like OR p.id LIKE :search OR pi.title LIKE :search_like)"; + $params['int'] = (int)preg_replace("/[^0-9]/","",$search); + $params['search_like'] = '%'.$search.'%'; + $params['search'] = $search; + } + + $sql .= ' GROUP BY p.id ORDER BY p.id DESC'; + return array($sql, $params); + } + + public function toApiArray(\Model_Invoice $invoice, $deep = true, $identity = null) + { + $row = $this->di['db']->toArray($invoice); + + $items = $this->di['db']->find('InvoiceItem', 'invoice_id = :iid', array('iid'=>$row['id'])); + $lines = array(); + $total = $tax_total = 0; + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + foreach($items as $item) { + $order_id = ($item->type == \Model_InvoiceItem::TYPE_ORDER) ? $item->rel_id : null; + $line_total = $item->price * $item->quantity; + $total += $line_total; + $line_tax = $invoiceItemService->getTax($item); + $tax_total += $line_tax; + $line = array( + 'id' => $item->id, + 'title' => $item->title, + 'period' => $item->period, + 'quantity' => $item->quantity, + 'unit' => $item->unit, + 'price' => $item->price, + 'tax' => $line_tax, + 'taxed' => $item->taxed, + 'charged' => $item->charged, + 'total' => $item->price * $item->quantity, + 'order_id' => $order_id, + 'type' => $item->type, + 'rel_id' => $item->rel_id, + 'task' => $item->task, + 'status' => $item->status, + ); + $lines[] = $line; + } + $tax = $tax_total; + + $result = array(); + $result['id'] = $row['id']; + $result['serie'] = $row['serie']; + $result['nr'] = $row['nr']; + + $nr = (is_numeric($result['nr'])) ? $result['nr'] : $result['id']; + $result['serie_nr'] = $result['serie'] . sprintf('%05s', $nr); + + $result['hash'] = $row['hash']; + $result['gateway_id'] = $row['gateway_id']; + $result['taxname'] = $row['taxname']; + $result['taxrate'] = $row['taxrate']; + $result['currency'] = $row['currency']; + $result['currency_rate'] = $row['currency_rate']; + $result['tax'] = $tax; + $result['subtotal'] = $total; + $result['total'] = $total + $tax; + $result['status'] = $row['status']; + $result['notes'] = $row['notes']; + $result['text_1'] = $row['text_1']; + $result['text_2'] = $row['text_2']; + $result['due_at'] = $row['due_at']; + $result['paid_at'] = $row['paid_at']; + $result['created_at'] = $row['created_at']; + $result['updated_at'] = $row['updated_at']; + $result['lines'] = $lines; + + $result['buyer'] = array( + 'first_name'=> $row['buyer_first_name'], + 'last_name' => $row['buyer_last_name'], + 'company' => $row['buyer_company'], + 'company_vat' => $row['buyer_company_vat'], + 'company_number' => $row['buyer_company_number'], + 'address' => $row['buyer_address'], + 'city' => $row['buyer_city'], + 'state' => $row['buyer_state'], + 'country' => $row['buyer_country'], + 'phone' => $row['buyer_phone'], + 'phone_cc' => $row['buyer_phone_cc'], + 'email' => $row['buyer_email'], + 'zip' => $row['buyer_zip'], + ); + + $systemService = $this->di['mod_service']('system'); + $c = $systemService->getCompany(); + $result['seller'] = array( + 'company' => !empty($row['seller_company']) ? $row['seller_company'] : $c['name'], + 'company_vat'=> $row['seller_company_vat'], + 'company_number'=> $row['seller_company_number'], + 'address' => !empty($row['seller_address']) ? $row['seller_address'] : trim($c['address_1'] .' '. $c['address_2'] .' '. $c['address_2']), + 'phone' => !empty($row['seller_phone']) ? $row['seller_phone'] : $c['tel'], + 'email' => !empty($row['seller_email']) ? $row['seller_email'] : $c['email'], + ); + + if($identity instanceof \Model_Admin) { + $client = $this->di['db']->load('Client', $row['client_id']); + $clientService = $this->di['mod_service']('client'); + if($client instanceof \Model_Client) { + $result['client'] = $clientService->toApiArray($client); + } else { + $result['client'] = null; + } + $result['reminded_at'] = $row['reminded_at']; + $result['approved'] = (bool)$row['approved']; + $result['income'] = $row['base_income'] - $row['base_refund']; + $result['refund'] = $row['refund']; + $result['credit'] = $row['credit']; + } + + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + $result['subscribable'] = $subscriptionService->isSubscribable($row['id']); + if($deep && $result['subscribable']) { + $ip = $this->di['db']->getCell('SELECT period FROM invoice_item WHERE invoice_id = :id', array('id'=>$row['id'])); + $period = $this->di['period']($ip); + $result['subscription'] = array( + 'unit' => $period->getUnit(), + 'cycle' => $period->getQty(), + 'period' => $ip, + ); + } + + return $result; + } + + public static function onAfterAdminInvoicePaymentReceived(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + $service = $di['mod_service']('invoice'); + + try { + $invoiceModel = $di['db']->load('Invoice', $params['id']); + $invoice = $service->toApiArray($invoiceModel, array('id' =>$params['id'])); + if($invoice['total'] > 0) { + $email = array(); + $email['to_client'] = $invoiceModel->client_id; + $email['code'] = 'mod_invoice_paid'; + $email['invoice'] = $invoice; + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + + return true; + } + + public static function onAfterAdminInvoiceApprove(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + $service = $di['mod_service']('invoice'); + + try { + $invoiceModel = $di['db']->load('Invoice', $params['id']); + $invoice = $service->toApiArray($invoiceModel, array('id' =>$params['id'])); + $email = array(); + $email['to_client'] = $invoiceModel->client_id; + $email['code'] = 'mod_invoice_created'; + $email['invoice'] = $invoice; + $emailService = $di['mod_service']('Email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + + return true; + } + + public static function onAfterAdminInvoiceReminderSent(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + $service = $di['mod_service']('invoice'); + + try { + $invoiceModel = $di['db']->load('Invoice', $params['id']); + $invoice = $service->toApiArray($invoiceModel, array('id' =>$params['id'])); + $email = array(); + $email['to_client'] = $invoiceModel->client_id; + $email['code'] = 'mod_invoice_payment_reminder'; + $email['invoice'] = $invoice; + $emailService = $di['mod_service']('Email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminCronRun(\Box_Event $event) + { + $di = $event->getDi(); + $mod = $di['mod']('invoice'); + $config = $mod->getConfig(); + if(isset($config['remove_after_days']) && $config['remove_after_days']) { + //removing old invoices + $days = (int)$config['remove_after_days']; + + /* + $sql=" + SELECT id, due_at, DATEDIFF(NOW(), due_at) AS days_after_expiration + FROM invoice + WHERE status = 'unpaid' + HAVING days_after_expiration > $days + ORDER BY due_at DESC + "; + */ + + $sql="DELETE FROM invoice WHERE status = 'unpaid' AND DATEDIFF(NOW(), due_at) > $days"; + $di['db']->exec($sql); + } + } + + public static function onEventAfterInvoiceIsDue(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + $service = $di['mod_service']('invoice'); + + //send reminder once a day when 5 days has passed + if($params['days_passed'] != 5) { + return; + } + + try { + $invoiceModel = $di['db']->load('Invoice', $params['id']); + $invoice = $service->toApiArray($invoiceModel, array('id' =>$params['id'])); + $email = array(); + $email['to_client'] = $invoice['client']['id']; + $email['code'] = 'mod_invoice_due_after'; + $email['days_passed']= $params['days_passed']; + $email['invoice'] = $invoice; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public function markAsPaid(\Model_Invoice $invoice, $charge = TRUE, $execute = false) + { + if($invoice->status == \Model_Invoice::STATUS_PAID) { + return TRUE; + } + + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + foreach($invoiceItems as $item) { + $invoiceItemService->markAsPaid($item, $charge); + } + + $systemService = $this->di['mod_service']('system'); + $ctable = $this->di['mod_service']('Currency'); + + $invoice->serie = $systemService->getParamValue('invoice_series_paid'); + $invoice->nr = $this->getNextInvoiceNumber($invoice); + $invoice->approved = TRUE; + $invoice->currency_rate = $ctable->getRateByCode($invoice->currency); + $invoice->status = \Model_Invoice::STATUS_PAID; + $invoice->paid_at = date('c'); + $invoice->updated_at = date('c'); + $this->di['db']->store($invoice); + + $this->countIncome($invoice); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoicePaymentReceived', 'params'=>array('id'=>$invoice->id))); + + if($execute) { + + foreach($invoiceItems as $item) { + try { + $invoiceItemService->executeTask($item); + } catch(\Exception $e) { + error_log($e); + } + } + } + + $this->di['logger']->info('Marked invoice "%s" as paid', $invoice->id); + return true; + } + + public function getNextInvoiceNumber(\Model_Invoice $model) + { + $p = 'invoice_starting_number'; + $systemService = $this->di['mod_service']('system'); + $next_nr = $systemService->getParamValue($p); + if(empty($next_nr)) { + $next_nr = $model->id; + + //get last invoice number + + $r = $this->di['db']->findOne('Invoice', 'nr is not null order by id desc'); + if($r instanceof \Model_Invoice && is_numeric($r->nr)) { + $next_nr = $r->nr + 1; + } + } + $systemService->updateParam($p, $next_nr+1); + return $next_nr; + } + + public function countIncome(\Model_Invoice $invoice) + { + $table = $this->di['mod_service']('Currency'); + + $invoice->base_income = $table->toBaseCurrency($invoice->currency, $this->getTotal($invoice)); + $invoice->base_refund = $table->toBaseCurrency($invoice->currency, $invoice->refund); + $this->di['db']->store($invoice); + } + + public function prepareInvoice(\Model_Client $client, array $data) + { + if(!$client->currency) { + $currencyService = $this->di['mod_service']('Currency'); + $currency = $currencyService->getDefault(); + $client->currency = $currency->code; + $this->di['db']->store($client); + error_log(sprintf('Client #%s currency was not defined. Set default currency %s', $client->id, $currency->code)); + } + + $model = $this->di['db']->dispense('Invoice'); + $model->client_id = $client->id; + $model->status = \Model_Invoice::STATUS_UNPAID; + $model->currency = $client->currency; + $model->approved = 0; + + if(isset($data['gateway_id'])) { + $model->gateway_id = $data['gateway_id']; + } + + if(isset($data['text_1'])) { + $model->text_1 = $data['text_1']; + } + + if(isset($data['text_2'])) { + $model->text_2 = $data['text_2']; + } + + $model->created_at = date('c'); + $model->updated_at = date('c'); + $invoiceId = $this->di['db']->store($model);; + + $this->setInvoiceDefaults($model); + + if(isset($data['items']) && is_array($data['items'])) { + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + foreach($data['items'] as $d) { + $invoiceItemService->addNew($model, $d); + } + } + + $this->di['logger']->info('Prepared new invoice "%s"', $invoiceId); + + if(isset($data['approve']) && $data['approve']) { + try { + $this->approveInvoice($model, array('id'=>$invoiceId)); + $this->di['logger']->info('Approved invoice %s instantly', $invoiceId); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + + return $invoiceId; + } + + public function setInvoiceDefaults(\Model_Invoice $model) + { + $clientService = $this->di['mod_service']('Client'); + $systemService = $this->di['mod_service']('system'); + $client = $this->di['db']->load('Client', $model->client_id); + $seller = $systemService->getCompany(); + + $buyer = $clientService->toApiArray($client); + + $model->seller_company = $seller['name']; + $model->seller_company_vat = $seller['vat_number']; + $model->seller_company_number = $seller['number']; + $model->seller_address = trim($seller['address_1'] .' '. $seller['address_2'] .' '. $seller['address_3']); + $model->seller_phone = $seller['tel']; + $model->seller_email = $seller['email']; + + $model->buyer_first_name = $buyer['first_name']; + $model->buyer_last_name = $buyer['last_name']; + $model->buyer_company = $buyer['company']; + $model->buyer_company_vat = $buyer['company_vat']; + $model->buyer_company_number = $buyer['company_number']; + $model->buyer_address = $buyer['address_1'] .' '. $buyer['address_2']; + $model->buyer_city = $buyer['city']; + $model->buyer_state = $buyer['state']; + $model->buyer_country = $buyer['country']; + $model->buyer_phone = $buyer['phone_cc'] .' '.$buyer['phone']; + $model->buyer_email = $buyer['email']; + $model->buyer_zip = $buyer['postcode']; + + $due_time = strtotime('+' . $systemService->getParamValue('invoice_due_days', 1) . ' day'); + $model->due_at = date('c', $due_time); + + $model->serie = $systemService->getParamValue('invoice_series'); + $model->nr = $model->id; + $model->hash = sha1(uniqid()); + + $taxtitle = ''; + $taxService = $this->di['mod_service']('Invoice', 'Tax'); + $tax = $taxService->getTaxRateForClient($client, $taxtitle); + $model->taxname = $taxtitle; + $model->taxrate = $tax; + + $this->di['db']->store($model); + } + + public function approveInvoice(\Model_Invoice $invoice, array $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceApprove', 'params'=>array('id'=>$invoice->id))); + + $invoice->approved = 1; + $invoice->updated_at = date('c'); + $this->di['db']->store($invoice); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceApprove', 'params'=>array('id'=>$invoice->id))); + + if(isset($data['use_credits']) && $data['use_credits']) { + $this->tryPayWithCredits($invoice); + } + + $this->di['logger']->info('Approved invoice "%s"', $invoice->id); + return true; + } + + public function tryPayWithCredits(\Model_Invoice $invoice) + { + if(!$invoice->approved) { + return ; + } + + // check if invoice is not "deposit" type invoice + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); + foreach($invoiceItems as $item) { + if($item->type == \Model_InvoiceItem::TYPE_DEPOSIT) { + return ; + } + } + + $client = $this->di['db']->load('Client', $invoice->client_id); + $cbrepo = $this->di['mod_service']('Client', 'Balance'); + $balance = $cbrepo->getClientBalance($client); + $required = $this->getTotalWithTax($invoice); + $epsilon = 0.05; + + if(abs($balance-$required) < $epsilon) { + if($this->di['config']['debug']) error_log(sprintf('Setting invoice %s as paid with credits', $invoice->id)); + $this->markAsPaid($invoice); + return true; + } + + if($balance-$required > 0.00001) { + if($this->di['config']['debug']) error_log(sprintf('Setting invoice %s as paid with credits', $invoice->id)); + $this->markAsPaid($invoice); + return true; + } + if($this->di['config']['debug']) error_log(sprintf('Invoice %s could not be paid with credits. Money in balance %s Required: %s', $invoice->id, $balance, $required)); + } + + public function getTotalWithTax(\Model_Invoice $invoice) + { + $total = $this->getTotal($invoice) + $this->getTax($invoice); + return (float)$total; + } + + public function getTax(\Model_Invoice $invoice) + { + if($invoice->taxrate <= 0) { + return 0; + } + + $iiService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + $items = $this->di['db']->find('InvoiceItem', 'invoice_id = ? ', array($invoice->id)); + $tax = 0; + foreach($items as $item) { + $tax += $iiService->getTax($item) * $item->quantity; + } + return $tax; + } + + public function getTotal(\Model_Invoice $invoice) + { + $total = 0; + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + foreach($invoiceItems as $item) { + $total += $invoiceItemService->getTotal($item); + } + return (float)$total; + } + + public function refundInvoice(\Model_Invoice $invoice, $note = null) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceRefund', 'params'=>array('id'=>$invoice->id))); + + $systemService = $this->di['mod_service']('system'); + $logic = $systemService->getParamValue('invoice_refund_logic', 'manual'); + $result = null; + + switch ($logic) { + + case 'credit_note': + case 'negative_invoice': + + $total = $this->getTotalWithTax($invoice); + if($total <= 0) { + throw new \Box_Exception('Can not refund invoice with negative amount'); + } + + $new = $this->di['db']->dispense('Invoice'); + $new->client_id = $invoice->client_id; + $new->hash = md5(uniqid()); + $new->status = \Model_Invoice::STATUS_REFUNDED; + $new->currency = $invoice->currency; + $new->approved = true; + $new->taxname = $invoice->taxname; + $new->taxrate = $invoice->taxrate; + + $new->seller_company = $invoice->seller_company; + $new->seller_address = $invoice->seller_address; + $new->seller_phone = $invoice->seller_phone; + $new->seller_email = $invoice->seller_email; + + $new->buyer_first_name= $invoice->buyer_first_name; + $new->buyer_last_name = $invoice->buyer_last_name; + $new->buyer_company = $invoice->buyer_company; + $new->buyer_address = $invoice->buyer_address; + $new->buyer_city = $invoice->buyer_city; + $new->buyer_state = $invoice->buyer_state; + $new->buyer_country = $invoice->buyer_country; + $new->buyer_phone = $invoice->buyer_phone; + $new->buyer_email = $invoice->buyer_email; + $new->buyer_zip = $invoice->buyer_zip; + + $new->paid_at = date('c'); + $new->created_at = date('c'); + $new->updated_at = date('c'); + $this->di['db']->store($new); + + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); + foreach($invoiceItems as $item) { + $pi = $this->di['db']->dispense('InvoiceItem'); + $pi->invoice_id = $new->id; + $pi->type = $item->type; + $pi->rel_id = $item->rel_id; + $pi->task = $item->task; + $pi->status = \Model_InvoiceItem::STATUS_EXECUTED; // ark refund invoce as executed + $pi->title = $item->title; + $pi->period = $item->period; + $pi->quantity = $item->quantity; + $pi->unit = $item->unit; + $pi->charged = 1; + $pi->price = -$item->price; + $pi->taxed = $item->taxed; + $pi->created_at = date('c'); + $pi->updated_at = date('c'); + $this->di['db']->store($pi); + } + + $this->countIncome($new); + + $this->addNote($invoice, sprintf('Refund invoice #%s generated', $new->id)); + $this->addNote($new, sprintf('Refund for #%s invoice', $invoice->id)); + if(!empty($note)) { + $this->addNote($new, $note); + } + + if($logic == 'negative_invoice') { + $new->serie = $systemService->getParamValue('invoice_series_paid'); + $new->nr = $this->getNextInvoiceNumber($new); + $this->di['db']->store($new); + } + + if($logic == 'credit_note') { + $next_nr = $systemService->getParamValue('invoice_cn_starting_number', 1); + $new->serie = $systemService->getParamValue('invoice_cn_series', 'CN-'); + $new->nr = $next_nr; + $this->di['db']->store($new); + + //update next credit note starting number + $systemService->updateParam('invoice_cn_starting_number', ++$next_nr, true); + } + $result = (int)$new->id; + break; + + //@todo undocumented + //@deprecated + case 'same_invoice': + $amount = $this->getTotalWithTax($invoice); + $invoice->refund = empty($amount) ? NULL : $amount; + $invoice->updated_at = date('c'); + $this->di['db']->store($invoice); + + if(!empty($note)) { + $this->addNote($invoice, $note); + } + + // mark invoice as refunded if refund amount is equal or greater + // than refund amount + $total = $this->getTotalWithTax($invoice); + if($invoice->refund >= $total) { + $invoice->status = \Model_Invoice::STATUS_REFUNDED; + $this->di['db']->store($invoice); + } + + $this->countIncome($invoice); + break; + + case 'manual': + if($this->di['config']['debug']) error_log('Refunds are managed manually. No actions performed'); + default: + break; + } + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceRefund', 'params'=>array('id'=>$invoice->id))); + + $this->di['logger']->info('Refunded invoice #%s', $invoice->id); + return $result; + } + + public function updateInvoice(\Model_Invoice $model, array $data) + { + + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceUpdate', 'params'=>$data)); + + if(isset($data['gateway_id'])) { + $model->gateway_id = $data['gateway_id']; + } + + if(isset($data['text_1'])) { + $model->text_1 = $data['text_1']; + } + + if(isset($data['text_2'])) { + $model->text_2 = $data['text_2']; + } + + if(isset($data['seller_company'])) { + $model->seller_company = $data['seller_company']; + } + + if(isset($data['seller_company_vat'])) { + $model->seller_company_vat = $data['seller_company_vat']; + } + + if(isset($data['seller_company_number'])) { + $model->seller_company_number = $data['seller_company_number']; + } + + if(isset($data['seller_address'])) { + $model->seller_address = $data['seller_address']; + } + + if(isset($data['seller_phone'])) { + $model->seller_phone = $data['seller_phone']; + } + + if(isset($data['seller_email'])) { + $model->seller_email = $data['seller_email']; + } + + if(isset($data['buyer_first_name'])) { + $model->buyer_first_name = $data['buyer_first_name']; + } + + if(isset($data['buyer_last_name'])) { + $model->buyer_last_name = $data['buyer_last_name']; + } + + if(isset($data['buyer_company'])) { + $model->buyer_company = $data['buyer_company']; + } + + if(isset($data['buyer_company_vat'])) { + $model->buyer_company_vat = $data['buyer_company_vat']; + } + + if(isset($data['buyer_company_number'])) { + $model->buyer_company_number = $data['buyer_company_number']; + } + + if(isset($data['buyer_address'])) { + $model->buyer_address = $data['buyer_address']; + } + + if(isset($data['buyer_city'])) { + $model->buyer_city = $data['buyer_city']; + } + + if(isset($data['buyer_state'])) { + $model->buyer_state = $data['buyer_state']; + } + + if(isset($data['buyer_country'])) { + $model->buyer_country = $data['buyer_country']; + } + + if(isset($data['buyer_zip'])) { + $model->buyer_zip = $data['buyer_zip']; + } + + if(isset($data['buyer_phone'])) { + $model->buyer_phone = $data['buyer_phone']; + } + + if(isset($data['buyer_email'])) { + $model->buyer_email = $data['buyer_email']; + } + + if(isset($data['paid_at'])) { + if(empty($data['paid_at'])) { + $model->paid_at = null; + } else { + $model->paid_at = date('c', strtotime($data['paid_at'])); + } + } + + if(isset($data['due_at'])) { + if(empty($data['due_at'])) { + $model->due_at = null; + } else { + $model->due_at = date('c', strtotime($data['due_at'])); + } + } + + if(isset($data['serie'])) { + $model->serie = $data['serie']; + } + if(isset($data['nr'])) { + $model->nr = $data['nr']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['taxrate'])) { + $model->taxrate = $data['taxrate']; + } + + if(isset($data['taxname'])) { + $model->taxname = $data['taxname']; + } + + if(isset($data['approved'])) { + $model->approved = (int)$data['approved']; + } + + if(isset($data['notes'])) { + $model->notes = $data['notes']; + } + + if(isset($data['created_at'])) { + $model->created_at = date('c', strtotime($data['created_at'])); + } + + if(isset($data['new_item']) && is_array($data['new_item'])) { + $ni = $data['new_item']; + if(isset($ni['title']) && !empty($ni['title'])) { + $invoiceItemService->addNew($model, $ni); + } + } + + if(isset($data['items']) && is_array($data['items'])) { + foreach($data['items'] as $id=>$d) { + $item = $this->di['db']->load('InvoiceItem', $id); + if($item instanceof \Model_InvoiceItem) { + $invoiceItemService->update($item, $d); + } + } + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceUpdate', 'params'=>array('id'=>$model->id))); + + $this->di['logger']->info('Updated invoice "%s"', $model->id); + return true; + } + + public function rmInvoice(\Model_Invoice $model) + { + //remove related invoice from orders + $sql=" + UPDATE client_order + SET unpaid_invoice_id = NULL + WHERE unpaid_invoice_id = :id"; + $this->di['db']->exec($sql, array('id'=>$model->id)); + + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($model->id)); + foreach($invoiceItems as $item) { + $this->di['db']->trash($item); + } + $this->di['db']->trash($model); + return true; + } + + public function deleteInvoiceByAdmin(\Model_Invoice $model) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceDelete','params'=>array('id'=>$model->id))); + + $id = $model->id; + $this->rmInvoice($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceDelete', 'params'=>array('id'=>$id))); + + $this->di['logger']->info('Removed invoice #%s', $id); + return TRUE; + } + + public function deleteInvoiceByClient(\Model_Invoice $model) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeClientInvoiceDelete', 'params'=>array('id'=>$model->id))); + + // check if invoice is associated with order + $invoiceItem = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($model->id)); + foreach($invoiceItem as $item) { + if($item->type == \Model_InvoiceItem::TYPE_ORDER) { + throw new \Box_Exception('Invoice is related to order #:id. Please cancel order first.', array(':id'=>$item->rel_id)); + } + } + + $this->rmInvoice($model); + $this->di['logger']->info('Removed invoice #%s', $model->id); + return TRUE; + } + + public function renewInvoice(\Model_ClientOrder $model, array $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminGenerateRenewalInvoice', 'params'=>array('order_id'=>$model->id))); + + $due_days = isset($data['due_days']) ? (int)$data['due_days'] : null; + $invoice = $this->generateForOrder($model, $due_days); + $this->approveInvoice($invoice, (array('id'=>$invoice->id, 'use_credits'=>true))); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminGenerateRenewalInvoice', 'params'=>array('order_id'=>$model->id, 'id'=>$invoice->id))); + + $this->di['logger']->info('Generated renewal invoice #%s', $invoice->id); + return $invoice->id; + } + + public function doBatchPayWithCredits(array $data) + { + $unpaid = $this->findAllUnpaid($data); + foreach($unpaid as $proforma) { + try { + $this->tryPayWithCredits($proforma); + } catch(\Exception $e) { + if($this->di['config']['debug']) { + error_log($e->getMessage()); + } + } + } + $this->di['logger']->info('Executed action to try cover unpaid invoices with client credits'); + return true; + } + + public function payInvoiceWithCredits(\Model_Invoice $model) + { + $this->tryPayWithCredits($model); + $this->di['logger']->info('Cover invoice with client credits'); + return true; + } + + public function generateForOrder(\Model_ClientOrder $order, $due_days = null) + { + //check if we do have invoice prepared already + if(NULL !== $order->unpaid_invoice_id) { + $p = $this->di['db']->load('Invoice', $order->unpaid_invoice_id); + if($p instanceof \Model_Invoice) { + return $p; + } + } + + if($order->price <= 0) { + throw new \Box_Exception('Invoices are not generated for 0 amount orders'); + } + + $client = $this->di['db']->load('Client', $order->client_id); + + // generate proforma + $proforma = $this->di['db']->dispense('Invoice'); + $proforma->client_id = $client->id; + $proforma->status = \Model_Invoice::STATUS_UNPAID; + $proforma->currency = $order->currency; + $proforma->approved = false; + $proforma->created_at = date('c'); + $proforma->updated_at = date('c'); + $this->di['db']->store($proforma); + + $this->setInvoiceDefaults($proforma); + + $price = $order->price; + // apply discount for new invoice if promo code is recurrent + if($order->promo_recurring) { + $price = $order->price - $order->discount; + if($price < 0) { + $price = 0; + } + $order->promo_used +=1; + $this->di['db']->store($order); + } + + $invoiceItemService = $this->di['mod_service']('Invoice', "InvoiceItem"); + $invoiceItemService->generateFromOrder($proforma, $order, \Model_InvoiceItem::TASK_RENEW, $price); + + // invoice due date + if($due_days > 0) { + $proforma->due_at = date('c', strtotime('+'.$due_days.' days')); + $this->di['db']->store($proforma); + } else if($order->expires_at) { + $proforma->due_at = $order->expires_at; + $this->di['db']->store($proforma); + } + + return $proforma; + } + + public function generateInvoicesForExpiringOrders() + { + $orderService = $this->di['mod_service']('Order'); + $orders = $orderService->getSoonExpiringActiveOrders(); + + if(count($orders) == 0) { + return TRUE; + } + + foreach($orders as $order) { + try { + $invoice = $this->generateForOrder($order); + $this->approveInvoice($invoice, array('id'=>$invoice->id, 'use_credits'=>true)); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + + $this->di['logger']->info('Executed action to generate new invoices for expiring orders'); + return true; + } + + public function doBatchPaidInvoiceActivation() + { + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + + foreach($this->findAllPaid() as $proforma) { + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = :id', array('id'=>$proforma->id)); + foreach($invoiceItems as $item) { + try { + $invoiceItemService->executeTask($item); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + } + } + $this->di['logger']->info('Executed action to activate paid invoices'); + return true; + } + + public function doBatchRemindersSend() + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceSendReminders')); + $list = $this->getUnpaidInvoicesLateFor(); + foreach($list as $invoice) { + $this->sendInvoiceReminder($invoice); + } + $this->di['logger']->info('Executed action to send invoice payment reminders'); + return true; + } + + public function doBatchInvokeDueEvent() + { + $once_per_day = isset($data['once_per_day']) ? (bool)$data['once_per_day']: true; + $key = 'invoice_overdue_invoked'; + + //do not use api call to get system param to avoid invoking system module event hooks + $ss = $this->di['mod_service']('System'); + $last_time = $ss->getParamValue($key); + if($once_per_day && $last_time && (time() - strtotime($last_time)) < 86400) { + //error_log('Already executed today.'); + return false; + } + + $before_due_list = $this->di['db']->getAll("SELECT id, DATEDIFF(due_at, NOW()) as days_left FROM invoice WHERE status = 'unpaid' AND approved = 1 AND due_at > NOW()"); + foreach($before_due_list as $params) { + $this->di['events_manager']->fire(array('event'=>'onEventBeforeInvoiceIsDue', 'params'=>$params)); + } + + $after_due_list = $this->di['db']->getAll("SELECT id, ABS(DATEDIFF(due_at, NOW())) as days_passed FROM invoice WHERE status = 'unpaid' AND approved = 1 AND due_at < NOW()"); + foreach($after_due_list as $params) { + $this->di['events_manager']->fire(array('event'=>'onEventAfterInvoiceIsDue', 'params'=>$params)); + } + + $ss->setParamValue($key, date('c')); + $this->di['logger']->info('Executed action to invoke invoice due event'); + return true; + } + + public function sendInvoiceReminder(\Model_Invoice $invoice) + { + // do not send accidental reminder for paid invoices + if($invoice->status == \Model_Invoice::STATUS_PAID) { + return true; + } + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminInvoiceSendReminder', 'params'=>array('id'=>$invoice->id))); + + $invoice->reminded_at = date('c'); + $invoice->updated_at = date('c'); + $this->di['db']->store($invoice); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminInvoiceReminderSent', 'params'=>array('id'=>$invoice->id))); + + $this->di['logger']->info('Invoice payment reminder sent'); + return true; + } + + public function counter() + { + $sql = 'SELECT status, count(id) as counter + FROM invoice + group by status'; + $rows = $this->di['db']->getAll($sql); + $data = array(); + foreach ($rows as $row){ + $data [ $row['status'] ] = $row['counter']; + } + return array( + 'total' => array_sum($data), + \Model_Invoice::STATUS_PAID => isset($data[\Model_Invoice::STATUS_PAID]) ? $data[\Model_Invoice::STATUS_PAID] : 0, + \Model_Invoice::STATUS_UNPAID => isset($data[\Model_Invoice::STATUS_UNPAID]) ? $data[\Model_Invoice::STATUS_UNPAID] : 0, + \Model_Invoice::STATUS_REFUNDED => isset($data[\Model_Invoice::STATUS_REFUNDED]) ? $data[\Model_Invoice::STATUS_REFUNDED] : 0, + \Model_Invoice::STATUS_CANCELED => isset($data[\Model_Invoice::STATUS_CANCELED]) ? $data[\Model_Invoice::STATUS_CANCELED] : 0, + ); + } + + public function generateFundsInvoice(\Model_Client $client, $amount) + { + if(!$client->currency) { + throw new \Box_Exception('You must have at least one active order before you can add funds so you cannot proceed at the current time!'); + } + + $systemService = $this->di['mod_service']('system'); + + $min_amount = $systemService->getParamValue('funds_min_amount', NULL); + $max_amount = $systemService->getParamValue('funds_max_amount', NULL); + + if($min_amount && $amount < $min_amount) { + throw new \Box_Exception('Amount is not valid', null, 981); + } + + if($max_amount && $amount > $max_amount) { + throw new \Box_Exception('Amount is not valid', null, 982); + } + + $proforma = $this->di['db']->dispense('Invoice'); + $proforma->client_id = $client->id; + $proforma->status = \Model_Invoice::STATUS_UNPAID; + $proforma->currency = $client->currency; + $proforma->approved = $this->_isAutoApproved(); + $proforma->created_at = date('c'); + $proforma->updated_at = date('c'); + $this->di['db']->store($proforma); + + $this->setInvoiceDefaults($proforma); + + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + $invoiceItemService->generateForAddFunds($proforma, $amount); + + return $proforma; + } + + public function processInvoice(array $data) + { + $subscribe = false; + + $invoice = $this->di['db']->findOne('Invoice', 'hash = ?', array($data['hash'])); + if(!$invoice instanceof \Model_Invoice) { + throw new \Box_Exception('Invoice not found', null, 812); + } + + $gtw = $this->di['db']->load('PayGateway', $data['gateway_id']); + if(!$gtw instanceof \Model_PayGateway) { + throw new \Box_Exception('Payment method not found', null, 813); + } + + if(!$gtw->enabled) { + throw new \Box_Exception('Payment method not enabled', null, 814); + } + + $subscribeService = $this->di['mod_service']('Invoice', 'Subscription'); + $payGatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + if($subscribeService->isSubscribable($invoice->id) && $payGatewayService->canPerformRecurrentPayment($gtw)) { + $subscribe = true; + } + + + $adapter = $payGatewayService->getPaymentAdapter($gtw, $invoice, $data); + $adapter->setDi($this->di); + $pgc = $adapter->getConfig(); + + //@since v2.9.15 + if(method_exists($adapter, 'getHtml')) { + $html = $adapter->getHtml($this->di['api_system'], $invoice->id, $subscribe); + return array( + 'iframe' => isset($pgc['can_load_in_iframe']) ? (bool)$pgc['can_load_in_iframe'] : false, + 'type' => 'html', + 'service_url' => '', + 'subscription' => $subscribe, + 'result' => $html, + ); + } + + $i = clone $invoice; + $mpi = $this->getPaymentInvoice($i, $subscribe); + $r = ($subscribe) ? $adapter->recurrentPayment($mpi) : $adapter->singlePayment($mpi); + $this->di['logger']->info('Went to pay for invoice #%s via %s', $invoice->id, $gtw->gateway); + + //@bug https://github.com/boxbilling/BoxBilling/issues/108 + if($adapter->getType() != 'html') { + $r = (array)$r; + } + + return array( + 'type' => $adapter->getType(), + 'service_url' => $adapter->getServiceURL(), + 'subscription' => $subscribe, + 'result' => $r, + ); + } + + public function generatePDF($hash, $identity) + { + $invoice = $this->di['db']->findOne('Invoice', 'hash = :hash', array(':hash' => $hash)); + if (!$invoice instanceof \Model_Invoice) { + throw new \Box_Exception('Invoice not found'); + } + $invoice = $this->toApiArray($invoice, false, $identity); + $systemService = $this->di['mod_service']('System'); + $company = $systemService->getCompany(); + $pdf = $this->di['pdf']; + $pdf->AddPage(); + + $pdf->AddFont('DejaVu', '', 'DejaVuSansCondensed.ttf', true); + $pdf->AddFont('DejaVu', 'B', 'DejaVuSansCondensed-Bold.ttf', true); + $pdf->SetFont('DejaVu', 'B', 20); + $font_size = 8; + $left = 10; + + $pdf->text(90, 20, $invoice['serie_nr']); + + $pdf->SetFont('DejaVu', '', $font_size); + + if (isset($company['logo_url']) && !empty($company['logo_url'])){ + $pdf->Image($company['logo_url'], $left + 75, 35, 50); + } + + $localeDateFormat = $this->di['config']['locale_date_format']; + $invoice_info = __("Invoice number: ") . $invoice['nr'] . "\n" . + __("Invoice date: ") . strftime($localeDateFormat, strtotime($invoice['created_at'])) . "\n" . + __("Due date: ") . strftime($localeDateFormat, strtotime($invoice['due_at'])) . "\n" . + __("Invoice status: ") . $invoice['status']; + $pdf->SetFont('DejaVu', 'B', $font_size); + $pdf->text($left + 15, 75, __("Invoice")); + $pdf->SetFont('DejaVu', '', $font_size); + + $pdf->SetXY($left, 70); + $pdf->MultiCell(60, 10, "\n" . $invoice_info, 0, "L", 0); + + $company_info = __("Name: ") . $invoice['seller']['company'] . "\n" . + __("Address: ") . $invoice['seller']['address'] . "\n" . + __("Phone: ") . $invoice['seller']['phone'] . "\n" . + __("Email: ") . $invoice['seller']['email']; + $pdf->SetFont('DejaVu', 'B', $font_size); + $pdf->text(95, 75, __("Company")); + $pdf->SetFont('DejaVu', '', $font_size); + $pdf->SetXY(75, 70); + $pdf->MultiCell(60, 10, "\n" . $company_info, 0, "L", 0); + + $buyer_info = __("Name: ") . $invoice['buyer']['first_name'] . $invoice['buyer']['last_name'] . "\n" . + __("Company: ") . $invoice['buyer']['company'] . "\n" . + __("Address: ") . $invoice['buyer']['address'] . "\n" . + __("Phone: ") . $invoice['buyer']['phone']; + $pdf->SetFont('DejaVu', 'B', $font_size); + $pdf->text(145, 75, __("Billing and delivery address")); + $pdf->SetFont('DejaVu', '', $font_size); + + $pdf->SetXY(140, 70); + $pdf->MultiCell(60, 10, "\n" . $buyer_info, 0, "L", 0); + + $header = array(__('#'), __('Title'), __('Price'), __('Total')); + $pdf->SetXY($left, 150); + $w = array(10, 120, 30, 30); + + for ($i = 0; $i < count($header); $i++) + $pdf->Cell($w[$i], 7, $header[$i], 1, 0, 'C'); + $pdf->Ln(); + + $nr = 1; + foreach ($invoice['lines'] as $row) { + $pdf->Cell($w[0], 6, $nr++, 'LR'); + $pdf->Cell($w[1], 6, $row['title'], 'LR'); + $pdf->Cell($w[2], 6, ($row['quantity'] > 1) ? $row['quantity'] . ' x ' . $this->money($row['price']) : $this->money($row['price']), 'LR', 0, 'R'); + $pdf->Cell($w[3], 6, $this->money($row['total']), 'LR', 0, 'R'); + $pdf->Ln(); + } + $pdf->Cell(array_sum($w), 0, '', 'T'); + + $y = $pdf->GetY(); + $pdf->SetXY(120, $y + 10); + if ($invoice['tax'] > 0) { + $pdf->Cell(40, 6, $invoice['taxname'] . ' ' . $invoice['taxrate'] . "%", 'LRTB', 0, 'C'); + $pdf->Cell(40, 6, $this->money($invoice['tax']), 'LRTB', 0, 'C'); + $pdf->Ln(); + $pdf->SetX(120); + } + + $pdf->SetX(120); + if (isset($invoice['discount']) && $invoice['discount'] > 0) { + $pdf->Cell(40, 8, __('Discount '), 'LRTB', 0, 'C'); + $pdf->Cell(40, 8, $this->money($invoice['discount']), 'LRTB', 0, 'C'); + $pdf->Ln(); + $pdf->SetX(120); + } + + $pdf->SetFont('Arial', 'B', $font_size + 2); + $pdf->Cell(40, 10, __('Total'), 'LRTB', 0, 'C'); + $pdf->Cell(40, 10, $this->money($invoice['total']), 'LRTB', 0, 'C'); + $pdf->Ln(); + + $pdf->Output($invoice["serie_nr"] . ".pdf", "I"); + } + + private function money($price) + { + $api_guest = $this->di['api_guest']; + $currency = $api_guest->cart_get_currency(); + + return $api_guest->currency_format(array("price" => $price, 'code' => $currency['code'], 'convert' => false)); + } + + public function addNote(\Model_Invoice $model, $note) + { + $n = $model->notes; + $model->notes = $n . date('c') .': '.$note.' '.PHP_EOL; + $model->updated_at = date('c'); + $this->di['db']->store($model); + return true; + } + + public function findAllUnpaid(array $filter = null) + { + $sql = 'SELECT m.* + FROM invoice as m + LEFT JOIN client as cl on m.client_id = cl.id + LEFT JOIN client_balance as cb on m.client_id = cb.client_id + LEFT JOIN invoice_item as pi on pi.invoice_id = m.id + WHERE m.status = :status + AND m.approved = 1'; + $params = array('status' => \Model_Invoice::STATUS_UNPAID); + + $client_id = isset($filter['client_id']) ? (int)$filter['client_id'] : null; + + if($client_id) { + $sql .= ' AND m.client_id = :client_id '; + $params['client_id'] = $client_id; + } + + $sql .= ' GROUP BY m.id, cl.id + HAVING SUM(cb.amount) >= SUM(pi.price) + ORDER BY m.id DESC'; + + $records = $this->di['db']->getAll($sql, $params); + $invoices = $this->di['db']->convertToModels('invoice', $records); + return $invoices; + } + + public function findAllPaid() + { + return $this->di['db']->find('Invoice', 'status = ? order by id desc', array(\Model_Invoice::STATUS_PAID)); + } + + public function getUnpaidInvoicesLateFor($days_after_issue = 2) + { + $conditions = 'status = ? and approved = 1 and reminded_at is null and DATEDIFF(NOW(), created_at) > ?'; + return $this->di['db']->find('Invoice', $conditions, array(\Model_Invoice::STATUS_UNPAID, $days_after_issue)); + } + + /** + * @return bool + */ + private function _isAutoApproved() + { + /** + * @var \Box\Mod\System\Service $systemService + */ + $systemService = $this->di['mod_service']('system'); + return (bool) $systemService->getParamValue('invoice_auto_approval', true); + } + + /** + * @param \Model_Invoice $invoice + * @param bool $subscribe + * @return \Payment_Invoice + */ + public function getPaymentInvoice(\Model_Invoice $invoice, $subscribe = false) + { + $proforma = $this->toApiArray($invoice); + $client = $this->getBuyer($invoice); + + $buyer = new \Payment_Invoice_Buyer(); + $buyer + ->setEmail($client['email']) + ->setFirstName($client['first_name']) + ->setLastName($client['last_name']) + ->setCompany($client['company']) + ->setAddress($client['address']) + ->setCity($client['city']) + ->setState($client['state']) + ->setZip($client['zip']) + ->setPhone($client['phone']) + ->setPhoneCountryCode($client['phone_cc']) + ->setCountry($client['country']); + + $first_title = null; + $items = array(); + foreach($proforma['lines'] as $item) { + $pi = new \Payment_Invoice_Item(); + $pi + ->setId($item['id']) + ->setTitle($item['title']) + ->setDescription($item['title']) + ->setPrice($item['price']) + ->setTax($item['tax']) + ->setQuantity($item['quantity']); + $items[] = $pi; + if(is_null($first_title) && count($proforma['lines']) == 1) { + $first_title = $item['title']; + } + } + + $params = array( + ':id'=>sprintf('%05s', $proforma['nr']), + ':serie'=>$proforma['serie'], + ':title'=>$first_title); + if($first_title) { + $title = __('Payment for invoice :serie:id [:title]', $params); + } else { + $title = __('Payment for invoice :serie:id', $params); + } + + $mpi = new \Payment_Invoice(); + $mpi->setId($invoice->id); + $mpi->setNumber($proforma['nr']); + $mpi->setBuyer($buyer); + $mpi->setCurrency($proforma['currency']); + $mpi->setTitle($title); + $mpi->setItems($items); + + // can subscribe only if proforma has one item with defined period + if($subscribe && $this->isSubscribable($invoice->id)) { + + $subitem = $invoice->InvoiceItem->getFirst(); + $period = $this->di['period']($subitem->period); + + $bs = new \Payment_Invoice_Subscription(); + $bs->setId($proforma['id']); + $bs->setAmount($mpi->getTotalWithTax()); + $bs->setCycle($period->getQty()); + $bs->setUnit($period->getUnit()); + + $mpi->setSubscription($bs); + $mpi->setTitle('Subscription for '.$subitem->title); + } + + return $mpi; + } + + public function getBuyer(\Model_Invoice $invoice) + { + return array( + 'first_name'=> $invoice->buyer_first_name, + 'last_name' => $invoice->buyer_last_name, + 'company' => $invoice->buyer_company, + 'address' => $invoice->buyer_address, + 'city' => $invoice->buyer_city, + 'state' => $invoice->buyer_state, + 'country' => $invoice->buyer_country, + 'phone' => $invoice->buyer_phone, + 'phone_cc' => '', + 'email' => $invoice->buyer_email, + 'zip' => $invoice->buyer_zip, + ); + } + + public function rmByClient(\Model_Client $client) + { + $invoices = $this->di['db']->find('Invoice', 'client_id = ?', array($client->id)); + foreach($invoices as $invoice) { + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', $invoice->id); + foreach ($invoiceItems as $invoiceItem){ + $this->di['db']->trash($invoiceItem); + } + $this->di['db']->trash($invoice); + } + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServiceInvoiceItem.php b/src/bb-modules/Invoice/ServiceInvoiceItem.php new file mode 100644 index 000000000..e4300cc29 --- /dev/null +++ b/src/bb-modules/Invoice/ServiceInvoiceItem.php @@ -0,0 +1,300 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function markAsPaid(\Model_InvoiceItem $item, $charge = TRUE) + { + if($charge && !$item->charged) { + $this->creditInvoiceItem($item); + $item->charged = TRUE; + $item->updated_at = date('c'); + } + + $item->status = \Model_InvoiceItem::STATUS_PENDING_SETUP; + $item->updated_at = date('c'); + $this->di['db']->store($item); + + $oid = $this->getOrderId($item); + if(NULL !== $oid) { + $orderService = $this->di['mod_service']('Order'); + $order = $this->di['db']->load('ClientOrder', $oid); + if($order instanceof \Model_ClientOrder) { + $orderService->unsetUnpaidInvoice($order); + } + } + } + + public function executeTask(\Model_InvoiceItem $item) + { + if($item->status == \Model_InvoiceItem::STATUS_EXECUTED) { + return true; + } + + if($item->type == \Model_InvoiceItem::TYPE_ORDER) { + $order_id = $this->getOrderId($item); + $order = $this->di['db']->load('ClientOrder', $order_id); + if(!$order instanceof \Model_ClientOrder) { + throw new \Box_Exception('Could not activate proforma item. Order :id not found', array(':id'=>$order_id)); + } + $orderService = $this->di['mod_service']('Order'); + switch ($item->task) { + case \Model_InvoiceItem::TASK_ACTIVATE: + $product = $this->di['db']->findOne('Product', $order->product_id); + if($product->setup == \Model_Product::SETUP_AFTER_PAYMENT) { + try { + $orderService->activateOrder($order); + } catch(\Exception $e) { + error_log($e->getMessage()); + $orderService->saveStatusChange($order, 'Order could not be activated due to error: '.$e->getMessage()); + } + } + break; + + case \Model_InvoiceItem::TASK_RENEW: + try { + $order = $this->di['db']->load('ClientOrder', $order_id); + $orderService->renewOrder($order); + } catch(\Exception $e) { + error_log($e->getMessage()); + $orderService->saveStatusChange($order, 'Order could not renew due to error: '.$e->getMessage()); + } + break; + + default: + // do nothing for unregistered tasks + break; + } + + $this->markAsExecuted($item); + } + + if($item->type == \Model_InvoiceItem::TYPE_HOOK_CALL) { + try { + $params = json_decode($item->rel_id); + $this->di['events_manager']->fire(array('event'=>$item->task, 'params'=>$params)); + } catch(\Exception $e) { + error_log($e->getMessage()); + } + $this->markAsExecuted($item); + } + + if($item->type == \Model_InvoiceItem::TYPE_DEPOSIT) { + //@todo - do nothing on deposit transaction + $this->markAsExecuted($item); + } + + if($item->type == \Model_InvoiceItem::TYPE_CUSTOM) { + //@todo ? + $this->markAsExecuted($item); + } + } + + public function addNew(\Model_Invoice $proforma, array $data) + { + if(!isset($data['title']) || empty($data['title'])) { + throw new \Box_Exception('Invoice item title is missing'); + } + + $period = isset($data['period']) ? $data['period'] : NULL; + if($period) { + $periodCheck = $this->di['period']($period); + } + + $type = isset($data['type']) ? $data['type'] : \Model_InvoiceItem::TYPE_CUSTOM; + $rel_id = isset($data['rel_id']) ? $data['rel_id'] : NULL; + $task = isset($data['task']) ? $data['task'] : \Model_InvoiceItem::TASK_VOID; + $status = isset($data['status']) ? $data['status'] : \Model_InvoiceItem::STATUS_PENDING_PAYMENT; + + $pi = $this->di['db']->dispense('InvoiceItem'); + $pi->invoice_id = $proforma->id; + $pi->type = $type; + $pi->rel_id = $rel_id; + $pi->task = $task; + $pi->status = $status; + $pi->title = $data['title']; + $pi->period = $period; + $pi->quantity = isset($data['quantity']) ? (int)$data['quantity'] : 1; + $pi->unit = isset($data['unit']) ? (string)$data['unit'] : NULL; + $pi->charged = isset($data['charged']) ? (bool)$data['charged'] : 0; + $pi->price = isset($data['price']) ? (float)$data['price'] : 0; + $pi->taxed = isset($data['taxed']) ? (bool)$data['taxed'] : FALSE; + $pi->created_at = date('c'); + $pi->updated_at = date('c'); + $itemId = $this->di['db']->store($pi); + + return (int) $itemId; + } + + public function getTotal(\Model_InvoiceItem $item) + { + return floatval($item->price * $item->quantity); + } + + public function getTax(\Model_InvoiceItem $item) + { + if(!$item->taxed) { + return 0; + } + + $rate = $this->di['db']->getCell('SELECT taxrate FROM invoice WHERE id = :id', array('id'=>$item->invoice_id)); + if($rate <= 0) { + return 0; + } + + return round(($item->price * $rate / 100), 2); + } + + public function update(\Model_InvoiceItem $item, array $data) + { + if(isset($data['title'])) { + $item->title = $data['title']; + } + + if(isset($data['price'])) { + $item->price = $data['price']; + } + + if(isset($data['taxed']) && !empty($data['taxed'])) { + $item->taxed = (bool)$data['taxed']; + } else { + $item->taxed = false; + } + + $item->updated_at = date('c'); + $this->di['db']->store($item); + } + + + public function remove(\Model_InvoiceItem $model) + { + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Removed invoice item "%s"', $id); + return true; + } + + public function generateForAddFunds(\Model_Invoice $proforma, $amount) + { + $pi = $this->di['db']->dispense('InvoiceItem'); + $pi->invoice_id = $proforma->id; + $pi->type = \Model_InvoiceItem::TYPE_DEPOSIT; + $pi->rel_id = NULL; + $pi->task = \Model_InvoiceItem::TASK_VOID; + $pi->status = \Model_InvoiceItem::STATUS_PENDING_PAYMENT; + $pi->title = __('Add funds to account'); + $pi->period = NULL; + $pi->quantity = 1; + $pi->unit = NULL; + $pi->charged = 1; + $pi->price = $amount; + $pi->taxed = FALSE; + $pi->created_at = date('c'); + $pi->updated_at = date('c'); + $this->di['db']->store($pi); + } + + public function creditInvoiceItem(\Model_InvoiceItem $item) + { + $total = $this->getTotalWithTax($item); + if($total <= 0) { + return TRUE; + } + + $invoice = $this->di['db']->load('Invoice', $item->invoice_id); + $client = $this->di['db']->load('Client', $invoice->client_id); + + $credit = $this->di['db']->dispense('ClientBalance'); + $credit->client_id = $client->id; + $credit->type = 'invoice'; + $credit->rel_id = $invoice->id; + $credit->description = $item->title; + $credit->amount = -$total; + $credit->created_at = date('c'); + $credit->updated_at = date('c'); + $this->di['db']->store($credit); + + $invoiceService = $this->di['mod_service']('Invoice'); + $invoiceService->addNote($invoice, sprintf('Charged clients balance with %s %s for %s', $total, $invoice->currency, $item->title)); + } + + public function getTotalWithTax(\Model_InvoiceItem $item) + { + return $this->getTotal($item) + $this->getTax($item); + } + + public function getOrderId(\Model_InvoiceItem $item) + { + if($item->type == \Model_InvoiceItem::TYPE_ORDER) { + return (int) $item->rel_id; + } + return 0; + } + + protected function markAsExecuted(\Model_InvoiceItem $item) + { + $item->status = \Model_InvoiceItem::STATUS_EXECUTED; + $item->updated_at = date('c'); + $this->di['db']->store($item); + } + + public function generateFromOrder(\Model_Invoice $proforma, \Model_ClientOrder $order, $task, $price) + { + $corderService = $this->di['mod_service']('Order'); + + $clientService = $this->di['mod_service']('client'); + $client = $this->di['db']->load('Client', $order->client_id); + $taxed = $clientService->isClientTaxable($client); + + $pi = $this->di['db']->dispense('InvoiceItem'); + $pi->invoice_id = $proforma->id; + $pi->type = \Model_InvoiceItem::TYPE_ORDER; + $pi->rel_id = $order->id; + $pi->task = $task; + $pi->status = \Model_InvoiceItem::STATUS_PENDING_PAYMENT; + $pi->title = $order->title; + $pi->period = $order->period; + $pi->quantity = $order->quantity; + $pi->unit = $order->unit; + $pi->price = $price; + $pi->taxed = $taxed; + $pi->created_at = date('c'); + $pi->updated_at = date('c'); + $this->di['db']->store($pi); + + $corderService->setUnpaidInvoice($order, $proforma); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServicePayGateway.php b/src/bb-modules/Invoice/ServicePayGateway.php new file mode 100644 index 000000000..ddcba5c29 --- /dev/null +++ b/src/bb-modules/Invoice/ServicePayGateway.php @@ -0,0 +1,354 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + + public function getSearchQuery(array $data) + { + $sql = 'SELECT * + FROM pay_gateway + WHERE 1 '; + + $search = isset($data['search']) ? $data['search'] : NULL; + $params = array(); + if($search) { + $sql .= 'AND m.name LIKE :search'; + $params['search'] = "%$search%"; + } + + $sql .= ' ORDER by gateway ASC'; + + return array($sql, $params); + } + + public function getPairs() + { + $sql = 'SELECT id, gateway, name + FROM pay_gateway'; + + $rows = $this->di['db']->getAll($sql); + $result = array(); + foreach ($rows as $row){ + $result[ $row['id'] ] = $row['name']; + } + return $result; + } + + public function getAvailable() + { + $sql = 'SELECT id, gateway, name + FROM pay_gateway'; + + $rows = $this->di['db']->getAll($sql); + $exists = array(); + foreach ($rows as $row){ + $exists[ $row['gateway'] ] = $row['name']; + } + + $pattern = BB_PATH_LIBRARY.'/Payment/Adapter/*.php'; + $adapters = array(); + foreach(glob($pattern) as $path) { + $adapter = pathinfo($path, PATHINFO_FILENAME); + if(!array_key_exists($adapter, $exists)) { + $adapters[] = $adapter; + } + } + + return $adapters; + } + + public function install($code) + { + $available = $this->getAvailable(); + if(!in_array($code, $available)) { + throw new \Box_Exception('Payment gateway is not available for installation.'); + } + + $new = $this->di['db']->dispense('PayGateway'); + $new->name = $code; + $new->gateway = $code; + $new->enabled = 0; + $new->accepted_currencies = NULL; + $new->test_mode = 0; + $new->config = NULL; + $this->di['db']->store($new); + + $this->di['logger']->info('Installed new payment gateway %s', $code); + return true; + } + + public function toApiArray(\Model_PayGateway $model, $deep = false, $identity = null) + { + list($single, $recurrent) = $this->_getAllowTuple($model); + + $result = array( + 'id' => $model->id, + 'code' => $model->gateway, + 'title' => $model->name, + 'allow_single' => $model->allow_single, + 'allow_recurrent' => $model->allow_recurrent, + 'accepted_currencies' => $this->getAcceptedCurrencies($model), + ); + + if($identity instanceof \Model_Admin) { + $result['supports_one_time_payments'] = $single; + $result['supports_subscriptions'] = $recurrent; + $result['config'] = json_decode($model->config, 1); + $result['form'] = $this->getFormElements($model); + $result['description'] = $this->getDescription($model); + $result['enabled'] = $model->enabled; + $result['test_mode'] = $model->test_mode; + $result['callback'] = $this->getCallbackUrl($model); + } + + return $result; + } + + public function copy(\Model_PayGateway $model) + { + $new = $this->di['db']->dispense('PayGateway'); + $new->name = $model->name . ' (Copy)'; + $new->gateway = $model->gateway; + $new->enabled = 0; + $new->accepted_currencies = $model->accepted_currencies; + $new->test_mode = $model->test_mode; + $new->config = $model->config; + $newId = $this->di['db']->store($new); + $this->di['logger']->info('Copied payment gateway #%s - %s', $newId, $model->gateway); + return $newId; + } + + public function update(\Model_PayGateway $model, array $data) + { + if(isset($data['title'])) { + $model->name = $data['title']; + } + + if(isset($data['config']) && is_array($data['config'])) { + $model->config = json_encode($data['config']); + } + + if(isset($data['accepted_currencies']) && is_array($data['accepted_currencies'])) { + $model->accepted_currencies = json_encode($data['accepted_currencies']); + } + + if(isset($data['enabled'])) { + $model->enabled = $data['enabled']; + } + + if(isset($data['allow_single'])) { + $model->allow_single = (bool)$data['allow_single']; + } + + if(isset($data['allow_recurrent'])) { + $model->allow_recurrent = (bool)$data['allow_recurrent']; + } + + if(isset($data['test_mode'])) { + $model->test_mode = $data['test_mode']; + } + $this->di['db']->store($model); + $this->di['logger']->info('Updated payment gateway %s', $model->gateway); + return true; + } + + public function delete(\Model_PayGateway $model) + { + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Removed payment gateway %s', $id); + + return true; + } + + public function getActive(array $data) + { + $format = isset($data['format']) ? $data['format'] : null; + + $gateways = $this->di['db']->find('PayGateway', 'enabled = 1 ORDER BY id desc'); + $result = array(); + foreach($gateways as $gtw) { + if($format == 'pairs') { + $result[$gtw->id] = $gtw->name; + } else { + $result[] = $this->toApiArray($gtw); + } + } + return $result; + } + + public function canPerformRecurrentPayment(\Model_PayGateway $model) + { + return (bool)$model->allow_recurrent; + } + + public function getPaymentAdapter(\Model_PayGateway $pg, \Model_Invoice $model = null, $optional = array()) + { + $config = $this->di['tools']->decodeJ($pg->config); + $defaults = array(); + $defaults['auto_redirect'] = false; + $defaults['test_mode'] = $pg->test_mode; + $defaults['return_url'] = $this->getReturnUrl($pg, $model); + $defaults['cancel_url'] = $this->getCancelUrl($pg, $model); + $defaults['notify_url'] = $this->getCallbackUrl($pg, $model); + $defaults['redirect_url'] = $this->getCallbackRedirect($pg, $model); + $defaults['continue_shopping_url'] = $this->di['tools']->url('/order'); + $defaults['single_page'] = true; + if($model instanceof \Model_Invoice) { + $defaults['thankyou_url'] = $this->di['tools']->url('/invoice/thank-you/'.$model->hash); + $defaults['invoice_url'] = $this->di['tools']->url('/invoice/'.$model->hash); + } + + if(isset($optional['auto_redirect'])) { + $defaults['auto_redirect'] = $optional['auto_redirect']; + } + + $config = array_merge($config, $defaults); + + $class = $this->getAdapterClassName($pg); + + if(!class_exists($class)) { + throw new \Box_Exception("Payment gateway :adapter was not found", array(':adapter'=>$class)); + } + + $adapter = new $class($config); + return $adapter; + } + + private function _getAllowTuple(\Model_PayGateway $model) + { + $adapter_config = $this->getAdapterConfig($model); + $single = isset($adapter_config['supports_one_time_payments']) ? $adapter_config['supports_one_time_payments'] : FALSE; + $recurrent = isset($adapter_config['supports_subscriptions']) ? $adapter_config['supports_subscriptions'] : FALSE; + + return array( + $single, + $recurrent, + ); + } + + public function getAdapterConfig(\Model_PayGateway $pg) + { + $class = $this->getAdapterClassName($pg); + if(!file_exists(BB_PATH_LIBRARY.'/Payment/Adapter/'.$pg->gateway.'.php')) { + throw new \Box_Exception("Payment gateway :adapter was not found", array(':adapter'=>$pg->gateway)); + } + + if(!class_exists($class)) { + throw new \Box_Exception("Payment gateway class $class was not found"); + } + + if(!method_exists($class, 'getConfig')) { + error_log("Payment $class gateway does not have getConfig method"); + return array(); + } + + return call_user_func(array($class, 'getConfig')); + } + + public function getAdapterClassName(\Model_PayGateway $pg) + { + return sprintf('Payment_Adapter_%s', $pg->gateway); + } + + public function getAcceptedCurrencies(\Model_PayGateway $model) + { + if(null === $model->accepted_currencies || empty($model->accepted_currencies)) { + $currencyService = $this->di['mod_service']('Currency'); + return array_keys($currencyService->getPairs()); + } + + return json_decode($model->accepted_currencies, 1); + } + + public function getFormElements(\Model_PayGateway $model) + { + $config = $this->getAdapterConfig($model); + if(isset($config['form']) && is_array($config['form'])) { + return $config['form']; + } + return array(); + } + + public function getDescription(\Model_PayGateway $model) + { + $config = $this->getAdapterConfig($model); + return (isset($config['description'])) ? $config['description'] : NULL; + } + + private function getCallbackUrl(\Model_PayGateway $pg, $model = null) + { + $p = array( + 'bb_gateway_id' => $pg->id, + ); + if($model instanceof \Model_Invoice) { + $p['bb_invoice_id'] = $model->id; + } + return $this->di['config']['url'] . 'bb-ipn.php?'.http_build_query($p); + } + + private function getReturnUrl(\Model_PayGateway $pg, $model = null) + { + if($model instanceof \Model_Invoice) { + return $this->di['tools']->url('/invoice/'.$model->hash.'?status=ok'); + } + return $this->di['tools']->url('/invoice?status=ok'); + } + + + private function getCancelUrl(\Model_PayGateway $pg, $model = null) + { + if($model instanceof \Model_Invoice) { + return $this->di['tools']->url('/invoice/'.$model->hash.'?status=cancel'); + } + return $this->di['tools']->url('/invoice?status=cancel'); + } + + private function getCallbackRedirect(\Model_PayGateway $pg, $model = null) + { + $p = array( + 'bb_gateway_id' => $pg->id, + ); + + if($model instanceof \Model_Invoice) { + $p['bb_invoice_id'] = $model->id; + $p['bb_invoice_hash'] = $model->hash; + $p['bb_redirect'] = 1; + } + return $this->di['config']['debug'] . 'bb-ipn.php?'.http_build_query($p); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServiceSubscription.php b/src/bb-modules/Invoice/ServiceSubscription.php new file mode 100644 index 000000000..642cee721 --- /dev/null +++ b/src/bb-modules/Invoice/ServiceSubscription.php @@ -0,0 +1,258 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function create(\Model_Client $cient, \Model_PayGateway $pg, array $data) + { + $model = $this->di['db']->dispense('Subscription'); + $model->client_id = $data['client_id']; + $model->pay_gateway_id = $data['gateway_id']; + + $model->sid = isset($data['sid']) ? $data['sid'] : NULL; + $model->status = isset($data['status']) ? $data['status'] : NULL; + $model->period = isset($data['period']) ? $data['period'] : NULL; + $model->amount = isset($data['amount']) ? $data['amount'] : NULL; + $model->currency = isset($data['currency']) ? $data['currency'] : NULL; + $model->rel_id = isset($data['rel_id']) ? $data['rel_id'] : NULL; + $model->rel_type = isset($data['rel_type']) ? $data['rel_type'] : NULL; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $newId = $this->di['db']->store($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminSubscriptionCreate', 'params'=>array('id'=>$newId))); + + $this->di['logger']->info('Created subscription %s', $newId); + return $newId; + } + + public function update(\Model_Subscription $model, array $data) + { + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['sid'])) { + $model->sid = $data['sid']; + } + + if(isset($data['period'])) { + $model->period = $data['period']; + } + + if(isset($data['amount'])) { + $model->amount = $data['amount']; + } + + if(isset($data['currency'])) { + $model->currency = $data['currency']; + } + + $model->updated_at = date('c'); + $newId = $this->di['db']->store($model); + + $this->di['logger']->info('Updated subscription %s', $newId); + return true; + } + + + public function toApiArray(\Model_Subscription $model, $deep = false, $identity = null) + { + $result = array( + 'id' => $model->id, + 'sid' => $model->sid, + 'period' => $model->period, + 'amount' => $model->amount, + 'currency' => $model->currency, + 'status' => $model->status, + 'created_at' => $model->created_at, + 'updated_at' => $model->updated_at, + ); + $client = $this->di['db']->load('Client', $model->client_id); + if($client instanceof \Model_Client) { + $clientService = $this->di['mod_service']('Client'); + $result['client'] = $clientService->toApiArray($client, false, $identity); + } else { + $result['client'] = array(); + } + + $gtw = $this->di['db']->load('PayGateway', $model->pay_gateway_id); + if($gtw instanceof \Model_PayGateway) { + $payGatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + $result['gateway'] = $payGatewayService->toApiArray($gtw, false, $identity); + } else { + $result['gateway'] = array(); + } + + return $result; + } + + public function delete(\Model_Subscription $model) + { + $id = $model->id; + $this->di['db']->trash($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminSubscriptionDelete', 'params'=>array('id'=>$id))); + + $this->di['logger']->info('Removed subscription %s', $id); + return true; + } + + public function getSearchQuery(array $data) + { + $sql = 'SELECT * + FROM subscription + WHERE 1 '; + + + $id = isset($data['id']) ? $data['id'] : NULL; + $sid = isset($data['sid']) ? $data['sid'] : NULL; + $search = isset($data['search']) ? $data['search'] : NULL; + $invoice_id = isset($data['invoice_id']) ? $data['invoice_id'] : NULL ; + $gateway_id = isset($data['gateway_id']) ? $data['gateway_id'] : NULL ; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL ; + $status = isset($data['status']) ? $data['status'] : NULL ; + $currency = isset($data['currency']) ? $data['currency'] : NULL ; + + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + $params = array(); + if($status) { + $sql .= ' AND status = :status'; + $params['status'] = $status; + } + + if($invoice_id) { + $sql .= ' AND invoice_id = :invoice_id'; + $params['invoice_id'] = $invoice_id; + } + + if($gateway_id) { + $sql .= ' AND gateway_id = :gateway_id'; + $params['gateway_id'] = $gateway_id; + } + + if($client_id) { + $sql .= ' AMD client_id = :client_id'; + $params['client_id'] = $client_id; + } + + if($currency) { + $sql .= ' AND currency = :currency '; + $params['currency'] = $currency; + } + + if($date_from) { + $sql .= ' AND UNIX_TIMESTAMP(m.created_at) >= :date_from'; + $params['date_from'] = $date_from; + + } + + if($date_to) { + $sql .= ' AND UNIX_TIMESTAMP(m.created_at) <= :date_to'; + $params['date_to'] = $date_to; + } + + if($search) { + $sql .= ' AND sid = :sid OR m.id = :mid '; + $params['sid'] = $search; + $params['mid'] = $search; + } + + if($id) { + $sql .= ' AND id = :id'; + $params['id'] = $id; + } + + if($sid) { + $sql .= ' AND sid = :sid'; + $params['sid'] = $sid; + } + + + $sql .= ' ORDER BY id DESC'; + return array($sql, $params); + } + + public function isSubscribable($invoice_id) + { + $query = "SELECT COUNT(id) as cc + FROM invoice_item + WHERE invoice_id = :id + GROUP BY invoice_id + "; + $count = $this->di['db']->getCell($query, array('id'=>$invoice_id)); + if($count > 1) { + return false; + } + + // check if first invoice line has deined period + $query = "SELECT id, period + FROM invoice_item + WHERE invoice_id = :id + LIMIT 1 + "; + $list = $this->di['db']->getAll($query, array(':id' => $invoice_id)); + + if(isset($list[0]) + && isset($list[0]['period']) + && !empty($list[0]['period'])) { + return true; + } else { + return false; + } + } + + public function getSubscriptionPeriod(\Model_Invoice $invoice) + { + if(!$this->isSubscribable($invoice->id)) { + return NULL; + } + + $query = "SELECT period + FROM invoice_item + WHERE invoice_id = :id + LIMIT 1 + "; + return $this->di['db']->getCell($query, array('id'=>$invoice->id)); + } + + public function unsubscribe(\Model_Subscription $model) + { + $model->status = 'canceled'; + $model->updated_at = date('c'); + $this->di['db']->store($model); + } +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServiceTax.php b/src/bb-modules/Invoice/ServiceTax.php new file mode 100644 index 000000000..ba166e3e2 --- /dev/null +++ b/src/bb-modules/Invoice/ServiceTax.php @@ -0,0 +1,139 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function getTaxRateForClient(\Model_Client $model, &$title = null) + { + $clientService = $this->di['mod_service']('client'); + if(!$clientService->isClientTaxable($model)) { + return 0; + } + + $tax = $this->di['db']->findOne('Tax', 'state = ? and country = ?', array($model->state, $model->country)); + // find rate which matches clients country and state + + if($tax instanceof \Model_Tax) { + $title = $tax->name; + return $tax->taxrate; + } + + // find rate which matches clients country + $tax = $this->di['db']->findOne('Tax', 'country = ?', array($model->country)); + if($tax instanceof \Model_Tax) { + $title = $tax->name; + return $tax->taxrate; + } + + // find rate which matches clients country + $tax = $this->di['db']->findOne('Tax', 'state is NULL or state = "" and country is null or country = ""'); + if($tax instanceof \Model_Tax) { + $title = $tax->name; + return $tax->taxrate; + } + + return 0; + } + + public function getTax(\Model_Invoice $invoice) + { + if($invoice->taxrate <= 0) { + return 0; + } + + $tax = 0; + $invoiceItems = $this->di['db']->find('InvoiceItem', 'invoice_id = ?', array($invoice->id)); + $invoiceItemService = $this->di['mod_service']('Invoice', 'InvoiceItem'); + foreach($invoiceItems as $item) { + $tax += $invoiceItemService->getTax($item) * $item->quantity; + } + return $tax; + } + + public function delete(\Model_Tax $model) + { + $name = $model->name; + $this->di['db']->trash($model); + $this->di['logger']->info('Deleted tax rule %s', $name); + return true; + } + + public function create(array $data) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_Tax', 2); + + $model = $this->di['db']->dispense('Tax'); + $model->name = $data['name']; + $model->country = (!isset($data['country']) || empty($data['country'])) ? NULL : $data['country']; + $model->state = (!isset($data['state']) || empty($data['state'])) ? NULL : $data['state']; + $model->taxrate = $data['taxrate']; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $newId = $this->di['db']->store($model); + + $this->di['logger']->info('Created new tax rule %s', $model->name); + return $newId ; + } + + public function getSearchQuery($data) + { + $sql = 'SELECT * + FROM tax + ORDER BY id desc'; + + return array($sql, array()); + } + + public function setupEUTaxes(array $data) + { + $sql="TRUNCATE tax;"; + $this->di['db']->exec($sql); + + $systemService = $this->di['mod_service']('System'); + $eu_countries = $systemService->getEuCountries(); + foreach($eu_countries as $code=>$title) { + $this->create(array('name'=>$data['name'], 'taxrate'=>$data['taxrate'], 'country'=>$code)); + } + + return true; + } + + public function toApiArray(\Model_Tax $model, $deep = false, $identity = null) + { + return $this->di['db']->toArray($model); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/ServiceTransaction.php b/src/bb-modules/Invoice/ServiceTransaction.php new file mode 100644 index 000000000..b38164e82 --- /dev/null +++ b/src/bb-modules/Invoice/ServiceTransaction.php @@ -0,0 +1,737 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function proccessReceivedATransactions() + { + $this->di['logger']->info('Executed action to process received transactions'); + $received = $this->getReceived(); + foreach($received as $transaction) { + $this->preProcessTransaction($transaction); + } + return true; + } + + public function update(\Model_Transaction $model, array $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminTransactionUpdate', 'params'=>array('id'=>$model->id))); + + if(isset($data['invoice_id'])) { + $model->invoice_id = $data['invoice_id']; + } + + if(isset($data['txn_id'])) { + $model->txn_id = $data['txn_id']; + } + + if(isset($data['txn_status'])) { + $model->txn_status = $data['txn_status']; + } + + if(isset($data['gateway_id'])) { + $model->gateway_id = $data['gateway_id']; + } + + if(isset($data['amount'])) { + $model->amount = $data['amount']; + } + + if(isset($data['currency'])) { + $model->currency = $data['currency']; + } + + if(isset($data['type'])) { + $model->type = $data['type']; + } + + if(isset($data['note'])) { + $model->note = $data['note']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['validate_ipn'])) { + $model->validate_ipn = $data['validate_ipn']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + $this->di['events_manager']->fire(array('event'=>'onAfterAdminTransactionUpdate', 'params'=>array('id'=>$model->id))); + + $this->di['logger']->info('Updated transaction #%s', $model->id); + return true; + } + + public function createAndProcess($ipn) + { + $id = $this->create($ipn); + return $this->processTransaction($id); + } + + public function create(array $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminTransactionCreate', 'params'=>$data)); + + $skip_validation = isset($data['skip_validation']) ? (bool)$data['skip_validation'] : false; + if(!$skip_validation) { + if(!isset($data['bb_invoice_id'])) { + throw new \Box_Exception('Transaction invoice id is missing'); + } + + if(!isset($data['bb_gateway_id'])) { + throw new \Box_Exception('Payment gateway id is missing'); + } + $invoice = $this->di['db']->load('Invoice', $data['bb_invoice_id']); + if(!$invoice instanceof \Model_Invoice) { + throw new \Box_Exception('Invoice was not found'); + } + + $gateway = $this->di['db']->load('PayGateway', $data['bb_gateway_id']); + if(!$gateway instanceof \Model_PayGateway) { + throw new \Box_Exception('Gateway was not found'); + } + } + + $ipn = array( + 'get' => (isset($data['get']) && is_array($data['get'])) ? $data['get'] : NULL, + 'post' => (isset($data['post']) && is_array($data['post'])) ? $data['post'] : NULL, + 'http_raw_post_data' => isset($data['http_raw_post_data']) ? $data['http_raw_post_data'] : NULL, + 'server' => isset($data['server']) ? $data['server'] : NULL, + ); + + $transaction = $this->di['db']->dispense('Transaction'); + $transaction->gateway_id = isset($data['bb_gateway_id']) ? $data['bb_gateway_id'] : NULL; + $transaction->invoice_id = isset($data['bb_invoice_id']) ? $data['bb_invoice_id'] : NULL; + $transaction->txn_id = isset($data['txn_id']) ? $data['txn_id'] : NULL; + $transaction->status = 'received'; + $transaction->ip = $this->di['request']->getClientAddress(); + $transaction->ipn = json_encode($ipn); + $transaction->note = (isset($data['note'])) ? $data['note'] : NULL; + $transaction->created_at = date('c'); + $transaction->updated_at = date('c'); + $newId = $this->di['db']->store($transaction); + + $this->di['logger']->info('Received transaction %s from payment gateway %s', $newId, $transaction->gateway_id); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminTransactionCreate', 'params'=>array('id'=>$newId))); + + return $newId; + } + + public function delete(\Model_Transaction $model) + { + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Removed transaction #%s', $id); + return true; + } + + public function toApiArray(\Model_Transaction $model, $deep = false, $identity = null) + { + $gateway = NULL; + if($model->gateway_id) { + $gtw = $this->di['db']->load('PayGateway', $model->gateway_id); + if($gtw instanceof \Model_PayGateway) { + $gateway = $gtw->name; + } + } + + $result = array( + 'id' => $model->id, + 'invoice_id' => $model->invoice_id, + 'txn_id' => $model->txn_id, + 'txn_status' => $model->txn_status, + 'gateway_id' => $model->gateway_id, + 'gateway' => $gateway, + 'amount' => $model->amount, + 'currency' => $model->currency, + 'type' => $model->type, + 'status' => $model->status, + 'ip' => $model->ip, + 'validate_ipn' => $model->validate_ipn, + 'error' => $model->error, + 'error_code' => $model->error_code, + 'note' => $model->note, + 'created_at' => $model->created_at, + 'updated_at' => $model->updated_at, + ); + if($deep) { + $result['ipn'] = json_decode($model->ipn, true); + } + return $result; + } + + public function getSearchQuery(array $data) + { + $sql = 'SELECT m.* + FROM transaction as m + LEFT JOIN invoice as i on m.invoice_id = i.id + WHERE 1 '; + + $id = isset($data['id']) ? $data['id'] : NULL; + $search = isset($data['search']) ? $data['search'] : NULL; + $invoice_hash = isset($data['invoice_hash']) ? $data['invoice_hash'] : NULL; + $invoice_id = isset($data['invoice_id']) ? $data['invoice_id'] : NULL; + $gateway_id = isset($data['gateway_id']) ? $data['gateway_id'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $currency = isset($data['currency']) ? $data['currency'] : NULL; + $type = isset($data['type']) ? $data['type'] : NULL; + $txn_id = isset($data['txn_id']) ? $data['txn_id'] : NULL; + + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + + $params = array(); + if ($id) { + $sql .= ' AND m.id = :id'; + $params['id'] = $id; + } + + if ($status) { + $sql .= ' AND m.status = :status'; + $params['status'] = $status; + } + + if ($invoice_hash) { + $sql .= ' AND i.hash = :hash'; + $params['hash'] = $invoice_hash; + } + + if ($invoice_id) { + $sql .= ' AND m.invoice_id = :invoice_id'; + $params['invoice_id'] = $invoice_id; + } + + if ($gateway_id) { + $sql .= ' AND m.gateway_id = :gateway_id'; + $params['gateway_id'] = $gateway_id; + } + + if ($client_id) { + $sql .= ' AND i.client_id = :client_id'; + $params['client_id'] = $client_id; + } + + if ($currency) { + $sql .= ' AND m.currency = :currency'; + $params['currency'] = $currency; + } + + if ($type) { + $sql .= ' AND m.type = :type'; + $params['type'] = $type; + } + + if ($txn_id) { + $sql .= ' AND m.txn_id = :txn_id'; + $params['txn_id'] = $txn_id; + } + + if ($date_from) { + $sql .= ' AND UNIX_TIMESTAMP(m.created_at) >= :date_from'; + $params['date_from'] = strtotime($date_from); + } + + if ($date_to) { + $sql .= ' AND UNIX_TIMESTAMP(m.created_at) <= :date_to'; + $params['date_to'] = strtotime($date_to); + } + + if ($search) { + $sql .= ' AND m.note LIKE :note OR m.invoice_id LIKE :search_invoice_id OR m.txn_id LIKE :search_txn_id OR m.ipn LIKE :ipn'; + $params['note'] = "%$search%"; + $params['search__invoice_id'] = "%$search%"; + $params['search_txn_id'] = "%$search%"; + $params['ipn'] = "%$search%"; + } + + $sql .= ' ORDER BY m.id DESC'; + + return array($sql, $params); + } + + public function counter() + { + $sql = 'SELECT status, count(id) as counter + FROM transaction + GROUP BY status'; + $rows = $this->di['db']->getAll($sql); + $data = array(); + foreach($rows as $row){ + $data[ $row['status'] ] = $row['counter']; + } + + return array( + 'total' => array_sum($data), + \Model_Transaction::STATUS_RECEIVED => isset($data[\Model_Transaction::STATUS_RECEIVED]) ? $data[\Model_Transaction::STATUS_RECEIVED] : 0, + \Model_Transaction::STATUS_APPROVED => isset($data[\Model_Transaction::STATUS_APPROVED]) ? $data[\Model_Transaction::STATUS_APPROVED] : 0, + \Model_Transaction::STATUS_PROCESSED => isset($data[\Model_Transaction::STATUS_PROCESSED]) ? $data[\Model_Transaction::STATUS_PROCESSED] : 0, + \Model_Transaction::STATUS_ERROR => isset($data[\Model_Transaction::STATUS_ERROR]) ? $data[\Model_Transaction::STATUS_ERROR] : 0, + ); + } + + public function getStatusPairs() + { + return array( + \Model_Transaction::STATUS_RECEIVED => 'Received', + \Model_Transaction::STATUS_APPROVED => 'Approved', + \Model_Transaction::STATUS_PROCESSED => 'Processed', + \Model_Transaction::STATUS_ERROR => 'Error', + ); + } + + public function getStatuses() + { + return array( + \Model_Transaction::STATUS_RECEIVED => 'Received', + \Model_Transaction::STATUS_APPROVED => 'Approved/Verified', + \Model_Transaction::STATUS_PROCESSED => 'Processed', + \Model_Transaction::STATUS_ERROR => 'Error', + ); + } + + public function getGatewayStatuses() + { + return array( + \Payment_Transaction::STATUS_PENDING => 'Pending validation', + \Payment_Transaction::STATUS_COMPLETE => 'Complete', + \Payment_Transaction::STATUS_UNKNOWN => 'Unknown', + + ); + } + + public function getTypes() + { + return array( + \Payment_Transaction::TXTYPE_PAYMENT => 'Payment', + \Payment_Transaction::TXTYPE_REFUND => 'Refund', + \Payment_Transaction::TXTYPE_SUBSCR_CREATE => 'Subscription create', + \Payment_Transaction::TXTYPE_SUBSCR_CANCEL => 'Subscription cancel', + \Payment_Transaction::TXTYPE_UNKNOWN => 'Unknown', + ); + } + + public function oldProcessLogic($model) + { + $tx = $this->process($model); + return !empty($tx->output) ? $tx->output : null; + } + + public function preProcessTransaction(\Model_Transaction $model) + { + try { + $output = $this->processTransaction($model->id); + } catch (\Box_Exception $e) { + // if gateway does not support new logic use old logic + if($e->getCode() == 705) { + $output = $this->oldProcessLogic($model); + } else { + $model->status = \Model_Transaction::STATUS_ERROR; + $model->error = $e->getMessage(); + $model->error_code = $e->getCode(); + $model->updated_at = date('c'); + $this->di['db']->store($model); + throw $e; + } + } + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminTransactionProcess', 'params'=>array('id'=>$model->id))); + $this->di['logger']->info('Processed transaction #%s', $model->id); + return !empty($output) ? $output : true; + + } + + /** + * New simplified transaction processing logic + * + * @since 2.9.11 + * @param type $id + * @return mixed + * @throws Box_Exception + */ + public function processTransaction($id) + { + $tx = $this->di['db']->load('Transaction', $id); + if(!$tx) { + throw new \Box_Exception('Transaction :id not found.', array('id'=>$id), 404); + } + + if(empty($tx->gateway_id)) { + throw new \Box_Exception('Could not determine transaction origin. Transaction payment gateway is unknown.', null, 701); + } + + $gtw = $this->di['db']->load('PayGateway', $tx->gateway_id); + if(!$gtw instanceof \Model_PayGateway) { + throw new \Box_Exception('Can not handle transaction received from unknown payment gateway: :id', array(':id'=>$tx->gateway_id), 704); + } + + $payGatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + $adapter = $payGatewayService->getPaymentAdapter($gtw); + if(!method_exists($adapter, 'process')) { + throw new \Box_Exception('Payment adapter :adapter does not support action :action', array(':adapter'=>$gtw->name, ':action'=>'processTransaction'), 705); + } + + $ipn = json_decode($tx->ipn, 1); + return $adapter->process($this->di['api_admin'], $id, $ipn, $tx->gateway_id); + } + + public function getReceived() + { + $filter = array( + 'status' => 'received' + ); + list($sql, $params) = $this->getSearchQuery($filter); + $assocArray = $this->di['db']->getAll($sql, $params); + return $this->di['db']->convertToModels('transaction', $assocArray); + } + + public function process($tx) + { + $transaction = $this->di['db']->load('Transaction', $tx->id); + + if($this->_isProcessed($transaction)) { + return $transaction; + } + + try { + $this->_parseIpnAndApprove($transaction); + + switch ($transaction->type) { + case \Payment_Transaction::TXTYPE_PAYMENT: + $this->_debit($transaction); + break; + + case \Payment_Transaction::TXTYPE_REFUND: + $this->_refund($transaction); + break; + + case \Payment_Transaction::TXTYPE_SUBSCR_CREATE: + $this->_subscribe($transaction); + break; + + case \Payment_Transaction::TXTYPE_SUBSCR_CANCEL: + $this->_unsubscribe($transaction); + break; + + default: + throw new \Box_Exception('Unknown transaction #:id type: :type', array(':id'=>$transaction->id, ':type'=>$transaction->type), 632); + break; + } + } catch(\Exception $e) { + $transaction->status = \Model_Transaction::STATUS_ERROR; + $transaction->error = $e->getMessage(); + $transaction->error_code = $e->getCode(); + $transaction->updated_at = date('c'); + $this->di['db']->store($transaction); + + if(BB_DEBUG) error_log($e->getMessage()); + if(APPLICATION_ENV == 'testing') throw $e; + } + + return $transaction; + } + + private function _isProcessed(\Model_Transaction $tx) + { + if($tx->status == \Model_Transaction::STATUS_PROCESSED) { + $tx->error = NULL; + $tx->error_code = NULL; + $tx->updated_at = date('c'); + $this->di['db']->store($tx); + return true; + } + + if($this->hasProcessedTransaction($tx)) { + + $tx->note .= 'Transaction was marked as processed. Transaction with same ID is already processed'; + $tx->updated_at = date('c'); + $this->di['db']->store($tx); + + $this->_markAsProcessed($tx); + return true; + } + + return false; + } + + private function hasProcessedTransaction(\Model_Transaction $tx) + { + if(!$tx->txn_id) { + return false; + } + + $res = $this->di['db']->findOne('Transaction', 'status = processed and txn_id = ?', array($tx->txn_id)); + return empty($res); + } + + private function _markAsProcessed(\Model_Transaction $tx) + { + $tx->error = NULL; + $tx->error_code = NULL; + $tx->status = \Model_Transaction::STATUS_PROCESSED; + $tx->updated_at = date('c'); + $this->di['db']->store($tx); + } + + private function _parseIpnAndApprove(\Model_Transaction &$tx) + { + if($tx->status == \Model_Transaction::STATUS_APPROVED) { + return $tx; + } + + $invoiceService = $this->di['mod_service']('Invoice'); + $payGatewayService = $this->di['mod_service']('Invoice', 'PayGateway'); + $ipn = json_decode($tx->ipn); + + if(empty($tx->gateway_id)) { + throw new \Box_Exception('Could not determine transaction origin. Transaction payment gateway is unknown.', null, 701); + } + + $gtw = $this->di['db']->load('PayGateway', $tx->gateway_id); + if(!$gtw instanceof \Model_PayGateway) { + throw new \Box_Exception('Can not handle transaction received from unknown payment gateway: :id', array(':id'=>$tx->gateway_id), 704); + } + + $adapter = $payGatewayService->getPaymentAdapter($gtw); + if(!$tx->invoice_id && method_exists($adapter, 'getInvoiceId')) { + $tx->invoice_id = $adapter->getInvoiceId($ipn); + } + + if(!$tx->invoice_id) { + throw new \Box_Exception('Transaction :id is not associated with an invoice.', array(':id'=>$tx->id), 702); + } + + $invoice = $this->di['db']->load('Invoice', $tx->invoice_id); + if(!$invoice instanceof \Model_Invoice) { + throw new \Box_Exception('Invoice #:id not found', array(':id'=>$tx->invoice_id), 703); + } + + $adapter = $payGatewayService->getPaymentAdapter($gtw, $invoice); + $mpi = $invoiceService->getPaymentInvoice($invoice); + + if(APPLICATION_ENV != 'testing' && $tx->validate_ipn) { + if(!$adapter->isIpnValid($ipn, $mpi)) { + $tx->output = $adapter->getOutput(); + throw new \Box_Exception('Instant payment notification (IPN) did not pass gateway :id validation', array(':id'=>$gtw->gateway), 706); + } + $tx->output = $adapter->getOutput(); + } + + $response = $adapter->getTransaction($ipn, $mpi); + if(!$response instanceof \Payment_Transaction) { + throw new \Box_Exception('Payment gateway :id method getTransaction should return Payment_Transaction object', array(':id'=>$gtw->gateway), 705); + } + + // if tx type is already defined, do not set them again + if($response->getType()) { + $tx->type = $response->getType(); + } + + if($response->getId()) { + $tx->txn_id = $response->getId(); + } + + if($response->getStatus()) { + $tx->txn_status = $response->getStatus(); + } + + if($response->getSubscriptionId()) { + $tx->s_id = $response->getSubscriptionId(); + } + + if ($response->getAmount()) { + $tx->amount = $response->getAmount(); + } + + if ($response->getCurrency()) { + $tx->currency = $response->getCurrency(); + } + + $tx->status = \Model_Transaction::STATUS_APPROVED; + $tx->updated_at = date('c'); + $this->di['db']->store($tx); + + return $tx; + } + + private function _debit(\Model_Transaction $tx) + { + if($this->_isProcessed($tx)) { + return $tx; + } + + $this->_validateApprovedTransaction($tx); + + $this->debitTransaction($tx); + + $this->_markAsProcessed($tx); + + // try pay for invoice after debit + if($tx->invoice_id) { + try { + $invoiceService = $this->di['mod_service']('Invoice'); + $invoiceService->tryPayWithCredits($tx->Invoice); + } catch(\Exception $e) { + if($this->di['config']['debug']){ + error_log($e->getMessage()); + } + } + } + } + + private function _refund(\Model_Transaction $tx) + { + if($this->_isProcessed($tx)) { + return $tx; + } + + $this->_validateApprovedTransaction($tx); + + $invoice = $this->di['db']->load('Invoice', $tx->invoice_id); + $note = sprintf('Transaction %s refund', $tx->id); + + $invoiceService = $this->di['mod_service']('Invoice'); + $invoiceService->refund($invoice, $note); + + $this->_markAsProcessed($tx); + return $tx; + } + + private function _subscribe(\Model_Transaction $tx) + { + if($this->_isProcessed($tx)) { + return $tx; + } + + $this->_validateApprovedTransaction($tx); + + if(empty($tx->s_id)) { + throw new \Box_Exception('Can not create subscription. Subscription id from payment gateway was not received'); + } + + $invoice = $this->di['db']->load('Invoice', $tx->invoice_id); + $subscriptionService = $this->di['mod_service']('Invoice', 'Subscription'); + $period = $subscriptionService->getSubscriptionPeriod($invoice); + + $s = $this->di['db']->dispense('Subscription'); + $s->client_id = $invoice->client_id; + $s->pay_gateway_id = $tx->gateway_id; + $s->sid = $tx->s_id; + $s->period = $period; + $s->rel_type = 'invoice'; + $s->rel_id = $invoice->id; + $s->amount = $tx->amount; + $s->currency = $invoice->currency; + $s->status = 'active'; + $s->created_at = date('c'); + $s->updated_at = date('c'); + $this->di['db']->store($s); + + $this->_markAsProcessed($tx); + return $tx; + } + + private function _unsubscribe(\Model_Transaction $tx) + { + if($this->_isProcessed($tx)) { + return $tx; + } + + + $serviceSubscription = $this->di['mod_service']("Subscription"); + $model = $this->di['db']->load('Subscription', $tx->s_id); + if(!$model instanceof \Model_Subscription) { + throw new \Box_Exception('Subscription #:id was not found. Could not unsusbscribe', array(':id'=>$tx->s_id)); + } + + $serviceSubscription->unsubscribe($model); + + $this->_markAsProcessed($tx); + return $tx; + } + + private function _validateApprovedTransaction(\Model_Transaction $tx) + { + if($tx->status != \Model_Transaction::STATUS_APPROVED) { + throw new \Box_Exception('Only approved transaction can be processed'); + } + + if(empty($tx->invoice_id)) { + throw new \Box_Exception('Transaction :id is not associated with an invoice.', array(':id'=>$tx->id), 7022); + } + + $invoice = $this->di['db']->load('Invoice', $tx->invoice_id); + + // check that payment currency is correct + if($invoice->currency != $tx->currency) { + throw new \Box_Exception('Transaction currency :code do not match required currency :required', array(':code'=>$tx->currency, ':required'=>$invoice->currency), 709); + } + + // check that payment status is completed if + if($tx->txn_status == \Payment_Transaction::STATUS_PENDING) { + throw new \Box_Exception('Transaction status on payment gateway is Pending. Only Complete or Unknown transactions can be processed.', null, 712); + } + } + + public function debitTransaction(\Model_Transaction $tx) + { + $proforma = $this->di['db']->load('Invoice', $tx->invoice_id); + $client = $this->di['db']->load('Client', $proforma->client_id); + + if($client->currency != $proforma->currency) { + throw new \Box_Exception('Client currency do not match invoice currency'); + } + + // do not debit negative or zero amount + if($tx->amount < 0) { + throw new \Box_Exception('Can not add negative amount to client balance for debit transaction'); + } + + $credit = $this->di['db']->dispense('ClientBalance'); + $credit->client_id = $client->id; + $credit->type = 'transaction'; + $credit->rel_id = $tx->id; + $credit->description = "Invoice #".$proforma->id . ' payment received from transaction #'.$tx->id; + $credit->amount = $tx->amount; + $credit->created_at = date('c'); + $credit->updated_at = date('c'); + $this->di['db']->store($credit); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_admin/mod_invoice_settings.phtml b/src/bb-modules/Invoice/html_admin/mod_invoice_settings.phtml new file mode 100644 index 000000000..94a077bda --- /dev/null +++ b/src/bb-modules/Invoice/html_admin/mod_invoice_settings.phtml @@ -0,0 +1,124 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Invoice settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          +
          +
          {% trans 'Invoice settings' %}
          +
          + + {% set params = admin.system_get_params %} +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + {% trans 'Proforma Invoicing / Sequential Invoice Numbering' %} + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + {% trans 'Refunds settings' %} +
          + +
          + +
          + +
          + +
          +
          +
          +
          + +
          + {% trans 'Add funds settings' %} +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_banklink.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_banklink.phtml new file mode 100644 index 000000000..398d47a65 --- /dev/null +++ b/src/bb-modules/Invoice/html_client/mod_invoice_banklink.phtml @@ -0,0 +1,46 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Processing payment ...' %}{% endblock %} + +{% block content %} + +{# +
          {% debug invoice %}
          +
          {% debug payment %}
          +#} +
          +
          +
          +
          +

          {% trans 'Processing payment ...' %}

          +

          {% trans 'Thank you for your patience.' %}

          +
          +
          + {% if payment.type == 'html' %} + {{ payment.result|raw }} + {% endif %} + {% if payment.type == 'form' %} +

          {% trans 'Redirecting to payment gateway..' %}

          +
          + {% for key, value in payment.result %} + + {% endfor %} + +
          + + + {% endif %} +
          +
          +
          +
          + + + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_index.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_index.phtml new file mode 100644 index 000000000..1fe7122fd --- /dev/null +++ b/src/bb-modules/Invoice/html_client/mod_invoice_index.phtml @@ -0,0 +1,104 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Invoice management' %}{% endblock %} +{% block page_header %}{% trans 'Invoice management' %}{% endblock %} + +{% block breadcrumb %} +
        • {% trans 'Invoices' %}
        • +{% endblock %} + +{% block content %} + +{% set unpaid_invoices = client.invoice_get_list({"status":"unpaid", "per_page":100}) %} +{% set paid_invoices = client.invoice_get_list({"per_page":10, "page":request.page, "status":"paid"}) %} + +
          +
          +
          +
          +

          {% trans 'List of invoices' %}


          + {% trans 'All of your invoices can be found here. You can choose to see either paid or unpaid invoices by clicking corresponding button.' %} + +
          +
          +
          +

          {% trans 'Unpaid' %}

          + + + + + + + + + + + + + {% if unpaid_invoices.total > 0 %} + {% for i, invoice in unpaid_invoices.list %} + + + + + + + + {% endfor %} + {% else %} + + + + {% endif %} + + +
          {% trans 'Title' %}{% trans 'Issue Date' %}{% trans 'Due Date' %}{% trans 'Total' %} 
          {{ "Proforma invoice #%05s"|format(invoice.id) }}{{ invoice.created_at|bb_date }}{{ invoice.due_at|bb_date }}{{ invoice.total | money(invoice.currency) }}{% trans 'Pay' %}
          {% trans 'The list is empty' %}
          + +
          + + +
          +
          +

          {{ unpaid_invoices.total }} unpaid invoices and {{ paid_invoices.total }} paid invoices

          +
          +
          +
          +
          +{% endblock %} + diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_invoice.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_invoice.phtml new file mode 100644 index 000000000..636a68285 --- /dev/null +++ b/src/bb-modules/Invoice/html_client/mod_invoice_invoice.phtml @@ -0,0 +1,256 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set nr = invoice.serie ~ "%05s"|format(invoice.nr) %} + +{% block meta_title %}{% trans 'Proforma invoice' %}{% endblock %} + + +{% block breadcrumb %} +
        • {% trans 'Invoices' %} /
        • +
        • {% trans 'Invoice' %} {{nr}}
        • +{% endblock %} + +{% block content %} + +{% set seller = invoice.seller %} +{% set buyer = invoice.buyer %} +{% set company = guest.system_company %} + +{% if invoice.status == 'unpaid' %} +
          +
          +
          + + +
          +

          {% trans 'Payment methods' %}

          +

          {% trans 'Please choose payment type and pay for your chosen products.' %}

          +
          +
          + + {% for gtw in guest.invoice_gateways %} + {% if invoice.currency in gtw.accepted_currencies %} + {% set banklink = 'invoice/banklink' | link %} + + {% endif %} + {% endfor %} + +
          +
          +
          +
          + +{% endif %} + +
          +
          +
          + +
          +

          {% trans 'Invoice' %} {{nr}}


          + {% trans 'You can print this invoice or export it to PDF file by clicking on corresponding button.' %} + +
          + +
          +
          +
          + {% if company.logo_url %} + Logo + {% endif %} +
          +
          {% trans 'Invoice number' %}:
          +
          {{ nr }}
          +
          {% trans 'Invoice date' %}:
          +
          {% if invoice.created_at %} + {{ invoice.created_at | bb_date }} + {% else %} + ----- + {% endif %} +
          +
          {% trans 'Due date' %}:
          +
          {% if invoice.due_at %} + {{ invoice.due_at | bb_date }} + {% else %} + ----- + {% endif %} +
          +
          {% trans 'Invoice status' %}:
          +
          + + {{ invoice.status | capitalize }} + +
          +
          +
          +
          +
          +

          {% trans 'Company' %}

          +
          + {% if seller.company %} +
          {% trans 'Name' %}:
          +
          {{seller.company}}
          + {% endif %} + + {% if seller.company_vat%} +
          {% trans 'VAT' %}:
          +
          {{seller.company_vat}}
          + {% endif %} + + {% if seller.address%} +
          {% trans 'Address' %}:
          +
          {{seller.address}}
          + {% endif %} + + {% if seller.phone %} +
          {% trans 'Phone' %}:
          +
          {{seller.phone}}
          + {% endif %} + + {% if seller.email %} +
          {% trans 'Email' %}:
          +
          {{seller.email}}
          + {% endif %} + + {% if seller.account_number %} +
          {% trans 'Account' %}:
          +
          {{seller.account_number}}
          + {% endif %} + + {% if seller.note %} +
          {% trans 'Note' %}:
          +
          {{seller.note}}
          + {% endif %} +
          + +
          +
          + + +
          +
          +

          {% trans 'Billing & Delivery address' %}

          +
          + {% if buyer.first_name or buyer.last_name %} +
          {% trans 'Name' %}:
          +
          {{buyer.first_name}} {{buyer.last_name}}
          + {% endif %} + + {% if buyer.company %} +
          {% trans 'Company' %}:
          +
          {{buyer.company}}
          + {% endif %} + + {% if buyer.company_number %} +
          {% trans 'Company number' %}:
          +
          {{buyer.company_number}}
          + {% endif %} + + {% if buyer.company_vat %} +
          {% trans 'Company VAT' %}:
          +
          {{buyer.company_vat}}
          + {% endif %} + + {% if buyer.address %} +
          {% trans 'Address' %}:
          +
          {{buyer.address}}
          +
          {{buyer.city}}, {{buyer.state}}
          +
          {{buyer.zip}}, {{guest.system_countries[buyer.country]}}
          + {% endif %} + + {% if buyer.phone %} +
          {% trans 'Phone' %}:
          +
          {{buyer.phone}}
          + {% endif %} +
          +
          +
          +
          + + {% if invoice.text_1 %} +
          + {{ invoice.text_1|markdown }} +
          + {% endif %} + + + + + + + + + + + + {% for i, item in invoice.lines %} + + + + + + + + {% endfor %} + + +
          {% trans '#' %}{% trans 'Title' %}{% trans 'Price' %}{% trans 'Total' %}
          {{ i+1 }}. + {% if item.order_id%} + {{ item.title }} + {% else %} + {{ item.title }} + {% endif %} + + {{ item.price | money(invoice.currency) }} + {% if item.quantity > 1 %} + x {{ item.quantity }} {# item.unit #} + {% endif %} + {{ item.total | money(invoice.currency) }}
          + +
          +
          + + {% if invoice.tax > 0 %} + + + + + {% endif %} + {% if invoice.discount > 0 %} + + + + + {% endif %} + + + + + +
          {{ invoice.taxname }} {{ invoice.taxrate }}%{{ invoice.tax | money(invoice.currency) }}
          {% trans 'Discount' %}{{ invoice.discount | money(invoice.currency) }}
          {% trans 'Total' %}{{ invoice.total | money(invoice.currency) }}
          +
          +
          + + {% if invoice.text_2 %} +
          + {{ invoice.text_2|markdown }} +
          + {% endif %} +
          +
          +
          +
          +{% endblock %} + +{% block js%} + +{% endblock%} \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_pdf.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_pdf.phtml new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_print.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_print.phtml new file mode 100644 index 000000000..f2e5f48f0 --- /dev/null +++ b/src/bb-modules/Invoice/html_client/mod_invoice_print.phtml @@ -0,0 +1,266 @@ +{% set nr = invoice.serie ~ "%05s"|format(invoice.nr) %} +{% set seller = invoice.seller %} +{% set buyer = invoice.buyer %} +{% set company = guest.system_company %} + + + + + + + + + + +
          +
          +
          +
          +

          {% trans 'Invoice' %} {{nr}}

          +
          +
          +
          +
          + +
          + {% if company.logo_url %} + Logo + {% endif %} +
          +
          {% trans 'Invoice number' %}:
          +
          {{ nr }}
          +
          {% trans 'Invoice date' %}:
          +
          {% if invoice.created_at %} + {{ invoice.created_at | bb_date }} + {% else %} + ----- + {% endif %} +
          +
          {% trans 'Due date' %}:
          +
          {% if invoice.due_at %} + {{ invoice.due_at | bb_date }} + {% else %} + ----- + {% endif %} +
          +
          {% trans 'Invoice status' %}:
          +
          + + + {{ invoice.status | capitalize }} + +
          +
          +
          +
          +
          +
          +

          {% trans 'Company' %}

          +
          + {% if seller.company %} +
          {% trans 'Name' %}:
          +
          {{seller.company}}
          + {% endif %} + + {% if seller.company_vat%} +
          {% trans 'VAT' %}:
          +
          {{seller.company_vat}}
          + {% endif %} + + {% if seller.address%} +
          {% trans 'Address' %}:
          +
          {{seller.address}}
          + {% endif %} + + {% if seller.phone %} +
          {% trans 'Phone' %}:
          +
          {{seller.phone}}
          + {% endif %} + + {% if seller.email %} +
          {% trans 'Email' %}:
          +
          {{seller.email}}
          + {% endif %} + + {% if seller.account_number %} +
          {% trans 'Account' %}:
          +
          {{seller.account_number}}
          + {% endif %} + + {% if seller.note %} +
          {% trans 'Note' %}:
          +
          {{seller.note}}
          + {% endif %} +
          +
          +
          + + +
          +
          +

          {% trans 'Billing & Delivery address' %}

          +
          + {% if buyer.first_name or buyer.last_name %} +
          {% trans 'Name' %}:
          +
          {{buyer.first_name}} {{buyer.last_name}}
          + {% endif %} + + {% if buyer.company %} +
          {% trans 'Company' %}:
          +
          {{buyer.company}}
          + {% endif %} + + {% if buyer.company_number %} +
          {% trans 'Company number' %}:
          +
          {{buyer.company_number}}
          + {% endif %} + + {% if buyer.company_vat %} +
          {% trans 'Company VAT' %}:
          +
          {{buyer.company_vat}}
          + {% endif %} + + {% if buyer.address %} +
          {% trans 'Address' %}:
          +
          {{buyer.address}}
          +
          {{buyer.city}}, {{buyer.state}}
          +
          {{buyer.zip}}, {{guest.system_countries[buyer.country]}}
          + {% endif %} + + {% if buyer.phone %} +
          {% trans 'Phone' %}:
          +
          {{buyer.phone}}
          + {% endif %} +
          +
          +
          +
          + + {% if invoice.text_1 %} +
          + {{ invoice.text_1|markdown }} +
          + {% endif %} + + + + + + + + + + + + {% for i, item in invoice.lines %} + + + + + + + + {% endfor %} + + +
          {% trans '#' %}{% trans 'Title' %}{% trans 'Price' %}{% trans 'Total' %}
          {{ i+1 }}. + {% if item.order_id%} + {{ item.title }} + {% else %} + {{ item.title }} + {% endif %} + + {{ item.price | money(invoice.currency) }} + {% if item.quantity > 1 %} + x {{ item.quantity }} {# item.unit #} + {% endif %} + {{ item.total | money(invoice.currency) }}
          +
          +
          +
          + + {% if invoice.tax > 0 %} + + + + + {% endif %} + {% if invoice.discount > 0 %} + + + + + {% endif %} + + + + + +
          {{ invoice.taxname }} {{ invoice.taxrate }}%{{ invoice.tax | money(invoice.currency) }}
          {% trans 'Discount' %}{{ invoice.discount | money(invoice.currency) }}
          {% trans 'Total' %}{{ invoice.total | money(invoice.currency) }}
          +
          +
          + + {% if invoice.text_2 %} +
          + {{ invoice.text_2|markdown }} +
          + {% endif %} +
          +
          +
          +
          + + \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_client/mod_invoice_thankyou.phtml b/src/bb-modules/Invoice/html_client/mod_invoice_thankyou.phtml new file mode 100644 index 000000000..1f65a79d4 --- /dev/null +++ b/src/bb-modules/Invoice/html_client/mod_invoice_thankyou.phtml @@ -0,0 +1,30 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Thank you' %}{% endblock %} +{% block breadcrumb %}
        • {% trans 'Thank you' %}
        • {% endblock %} + +{% block content %} + +
          + +
          +
          +
          +

          {% trans 'Thank you' %}

          +

          {% trans%}Your payment is being processed right now. It can take up 5 minutes to complete.{% endtrans %}

          +
          +
          +

          {% trans %}Payment for invoice received{% endtrans %}

          + +

          {% trans%}You will be automatically redirected to invoice page after 5 minutes.{% endtrans %}

          + + +
          +
          +
          + + +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Invoice/html_email/mod_invoice_created.phtml b/src/bb-modules/Invoice/html_email/mod_invoice_created.phtml new file mode 100644 index 000000000..f958f976f --- /dev/null +++ b/src/bb-modules/Invoice/html_email/mod_invoice_created.phtml @@ -0,0 +1,17 @@ +{% block subject %}[{{ guest.system_company.name }}] Invoice Created{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +This is to notify that proforma invoice {{ invoice.id }} was generated on {{ invoice.created_at|date }}. +Amount Due: {{ invoice.total | money(invoice.currency) }} +Due Date: {{invoice.due_at|date}} + +You can view and pay the invoice at: {{'invoice'|link}}/{{invoice.hash}} + +Login to members area: {{'login'|link({'email' : c.email }) }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Invoice/html_email/mod_invoice_due_after.phtml b/src/bb-modules/Invoice/html_email/mod_invoice_due_after.phtml new file mode 100644 index 000000000..dd8262a29 --- /dev/null +++ b/src/bb-modules/Invoice/html_email/mod_invoice_due_after.phtml @@ -0,0 +1,23 @@ +{% block subject %}[{{ guest.system_company.name }}] Invoice Due{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +This is a payment reminder that your proforma invoice **{{ invoice.serie_nr }}** is already +due for {{ days_passed }} days. + +Amount due: {{ invoice.total | money(invoice.currency) }} +Due Date: {{ invoice.due_at|date }} + +You can view and pay the invoice at: {{'invoice'|link}}/{{invoice.hash}} + +You may review your invoice history at any time by logging in to your client area. + +Login to members area: {{'login'|link({'email' : c.email }) }} +View and manage invoices: {{'invoice'|link}} + + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Invoice/html_email/mod_invoice_paid.phtml b/src/bb-modules/Invoice/html_email/mod_invoice_paid.phtml new file mode 100644 index 000000000..9ebf1c5e4 --- /dev/null +++ b/src/bb-modules/Invoice/html_email/mod_invoice_paid.phtml @@ -0,0 +1,20 @@ +{% block subject %}[{{ guest.system_company.name }}] Payment Received{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +This is a payment receipt for Invoice **{{ invoice.serie_nr }}** issued on +{{invoice.created_at|date('Y-m-d')}} + +Total Paid: {{ invoice.total | money(invoice.currency) }} + +You may review your invoice history at any time by logging in to your client area. +Note: This email serves as an official receipt for this payment. + +Login to members area: {{'login'|link({'email' : c.email }) }} +View invoice: {{'invoice'|link}}/{{invoice.hash}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Invoice/html_email/mod_invoice_payment_reminder.phtml b/src/bb-modules/Invoice/html_email/mod_invoice_payment_reminder.phtml new file mode 100644 index 000000000..50dac8036 --- /dev/null +++ b/src/bb-modules/Invoice/html_email/mod_invoice_payment_reminder.phtml @@ -0,0 +1,23 @@ +{% block subject %}[{{ guest.system_company.name }}] Payment Reminder{% endblock %} +{% block content %} +{% filter markdown %} +Hello {{ c.first_name }} {{ c.last_name }}, + +This is to remind that your proforma invoice **{{ invoice.serie_nr }}** is due +in {{ invoice.due_at|daysleft }} days. + +Amount due: {{ invoice.total | money(invoice.currency) }} +Due Date: {{ invoice.due_at|date }} + +You can view and pay the invoice at: {{'invoice'|link}}/{{invoice.hash}} + +You may review your invoice history at any time by logging in to your client area. + +Login to members area: {{'login'|link({'email' : c.email }) }} +View and manage invoices: {{'invoice'|link}} + + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Invoice/icon.png b/src/bb-modules/Invoice/icon.png new file mode 100644 index 000000000..8bd2c93da Binary files /dev/null and b/src/bb-modules/Invoice/icon.png differ diff --git a/src/bb-modules/Invoice/manifest.json b/src/bb-modules/Invoice/manifest.json new file mode 100644 index 000000000..e4a825dcb --- /dev/null +++ b/src/bb-modules/Invoice/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "invoice", + "type": "mod", + "name": "Invoices", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Kb/Api/Admin.php b/src/bb-modules/Kb/Api/Admin.php new file mode 100644 index 000000000..ae2e82ba1 --- /dev/null +++ b/src/bb-modules/Kb/Api/Admin.php @@ -0,0 +1,270 @@ +getService()->searchArticles($status, $search, $cat); + + foreach ($pager['list'] as $key => $item) { + $article = $this->di['db']->getExistingModelById('KbArticle', $item['id'], 'KB Article not found'); + $pager['list'][$key] = $this->getService()->toApiArray($article); + } + + return $pager; + } + + /** + * Get knowledge base article + * + * @param int $id - knowledge base article ID + * + * @return array + */ + public function article_get($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Article id not passed'); + } + + $model = $this->di['db']->findOne('KbArticle', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_KbArticle) { + throw new \Box_Exception('Article not found'); + } + + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Create new knowledge base article + * + * @param int $kb_article_category_id - knowledge base category ID + * @param string $title - knowledge base article title + * + * @optional string $status - knowledge base article status + * @optional string $content - knowledge base article content + * + * @return array + */ + public function article_create($data) + { + if (!isset($data['kb_article_category_id'])) { + throw new \Box_Exception('Article category id not passed'); + } + + if (!isset($data['title'])) { + throw new \Box_Exception('Article title not passed'); + } + $articleCategoryId = $data['kb_article_category_id']; + $title = $data['title']; + $status = isset($data['status']) ? $data['status'] : \Model_KbArticle::DRAFT; + $content = isset($data['content']) ? $data['content'] : NULL; + + return $this->getService()->createArticle($articleCategoryId, $title, $status, $content); + } + + /** + * Update knowledge base article + * + * @param int $id - knowledge base article ID + * + * @optional string $title - knowledge base article title + * @optional int $kb_article_category_id - knowledge base category ID + * @optional string $slug - knowledge base article slug + * @optional string $status - knowledge base article status + * @optional string $content - knowledge base article content + * @optional int $views - knowledge base article views counter + * + * @return bool + */ + public function article_update($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Article id not passed'); + } + + $articleCategoryId = isset($data['kb_article_category_id']) ? $data['kb_article_category_id'] : null; + $title = isset($data['title']) ? $data['title'] : null; + $slug = isset($data['slug']) ? $data['slug'] : null; + $status = isset($data['status']) ? $data['status'] : null; + $content = isset($data['content']) ? $data['content'] : null; + $views = isset($data['views']) ? $data['views'] : null; + + + return $this->getService()->updateArticle($data['id'], $articleCategoryId, $title, $slug, $status, $content, $views); + } + + /** + * Delete knowledge base article + * + * @param int $id - knowledge base article ID + * + * @return bool + */ + public function article_delete($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Article id is missing'); + } + + $model = $this->di['db']->findOne('KbArticle', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_KbArticle) { + throw new \Box_Exception('Article not found'); + } + + $this->getService()->rm($model); + + return true; + } + + /** + * Get paginated list of knowledge base categories + * + * @return array + */ + public function category_get_list($data) + { + list($sql, $bindings) = $this->getService()->categoryGetSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $bindings, $per_page); + + foreach ($pager['list'] as $key => $item) { + $category = $this->di['db']->getExistingModelById('KbArticleCategory', $item['id'], 'KB Article not found'); + $pager['list'][$key] = $this->getService()->categoryToApiArray($category, $this->getIdentity()); + } + + return $pager; + } + + /** + * Get knowledge base category + * + * @param int $id - knowledge base category ID + * + * @return array + */ + public function category_get($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Caegory id not passed'); + } + + $model = $this->di['db']->findOne('KbArticleCategory', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_KbArticleCategory) { + throw new \Box_Exception('Article Category not found'); + } + + return $this->getService()->categoryToApiArray($model); + } + + /** + * Create new knowledge base category + * + * @param string $title - knowledge base category title + * + * @optional string $description - knowledge base category description + * + * @return array + */ + public function category_create($data) + { + if (!isset($data['title'])) { + throw new \Box_Exception('Category title not passed'); + } + + $title = $data['title']; + $description = isset($data['description']) ? $data['description'] : NULL; + + return $this->getService()->createCategory($title, $description); + } + + /** + * Update knowledge base category + * + * @param int $id - knowledge base category ID + * + * @optional string $title - knowledge base category title + * @optional string $slug - knowledge base category slug + * @optional string $description - knowledge base category description + * + * @return array + */ + public function category_update($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Category id not passed'); + } + + $model = $this->di['db']->findOne('KbArticleCategory', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_KbArticleCategory) { + throw new \Box_Exception('Article Category not found'); + } + + $title = isset($data['title']) ? $data['title'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + $description = isset($data['description']) ? $data['description'] : NULL; + + return $this->getService()->updateCategory($model, $title, $slug, $description); + } + + /** + * Delete knowledge base category + * + * @param int $id - knowledge base category ID + * + * @return bool + */ + public function category_delete($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Category id is missing'); + } + + $model = $this->di['db']->findOne('KbArticleCategory', 'id = ?', array($data['id'])); + + if (!$model instanceof \Model_KbArticleCategory) { + throw new \Box_Exception('Category not found'); + } + + return $this->getService()->categoryRm($model); + } + + /** + * Get knowledge base categories id, title pairs + * + * @return array + */ + public function category_get_pairs($data) + { + return $this->getService()->categoryGetPairs(); + } +} \ No newline at end of file diff --git a/src/bb-modules/Kb/Api/Guest.php b/src/bb-modules/Kb/Api/Guest.php new file mode 100644 index 000000000..acbedd7d7 --- /dev/null +++ b/src/bb-modules/Kb/Api/Guest.php @@ -0,0 +1,139 @@ +getService()->searchArticles($status, $search, $cat); + + foreach ($pager['list'] as $key => $item) { + $article = $this->di['db']->getExistingModelById('KbArticle', $item['id'], 'KB Article not found'); + $pager['list'][$key] = $this->getService()->toApiArray($article); + } + + return $pager; + } + + /** + * Get active knowledge base article + * + * @param int $id - knowledge base article ID. Required only if SLUG is not passed. + * @param string $slug - knowledge base article slug. Required only if ID is not passed. + * + * @return array + */ + public function article_get($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + $model = FALSE; + if ($id) { + $model = $this->getService()->findActiveArticleById($id); + } else { + $model = $this->getService()->findActiveArticleBySlug($slug); + } + + if (!$model instanceof \Model_KbArticle) { + throw new \Box_Exception('Article item not found'); + } + $this->getService()->hitView($model); + + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Get paginated list of knowledge base categories + * @return array + */ + public function category_get_list($data) + { + $data['article_status'] = \Model_KbArticle::ACTIVE; + list($query, $bindings) = $this->getService()->categoryGetSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($query, $bindings, $per_page); + + $q = isset($data['q']) ? $data['q'] : null; + + foreach ($pager['list'] as $key => $item) { + $category = $this->di['db']->getExistingModelById('KbArticleCategory', $item['id'], 'KB Article not found'); + $pager['list'][$key] = $this->getService()->categoryToApiArray($category, $this->getIdentity(), $q); + } + return $pager; + } + + /** + * Get knowledge base categories id, title pairs + * + * @return array + */ + public function category_get_pairs($data) + { + return $this->getService()->categoryGetPairs(); + } + + /** + * Get knowledge base category by ID or SLUG + * + * @param int $id - knowledge base category ID. Required only if SLUG is not passed. + * @param string $slug - knowledge base category slug. Required only if ID is not passed. + * + * @return array + */ + public function category_get($data) + { + if (!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('Category ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + + $model = FALSE; + if ($id) { + $model = $this->getService()->findCategoryById($id); + } else { + $model = $this->getService()->findCategoryBySlug($slug); + } + + if (!$model instanceof \Model_KbArticleCategory) { + throw new \Box_Exception('Knowledge base category not found'); + } + + return $this->getService()->categoryToApiArray($model, $this->getIdentity()); + } +} \ No newline at end of file diff --git a/src/bb-modules/Kb/Controller/Admin.php b/src/bb-modules/Kb/Controller/Admin.php new file mode 100644 index 000000000..d9cb1b8dd --- /dev/null +++ b/src/bb-modules/Kb/Controller/Admin.php @@ -0,0 +1,85 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 501, + 'location' => 'kb', + 'label' => 'Knowledge Base', + 'uri' => $this->di['url']->adminLink('kb'), + 'class' => 'support', + ), + 'subpages' => array( + array( + 'location' => 'kb', + 'index' => 800, + 'label' => 'Knowledge Base', + 'uri' => $this->di['url']->adminLink('kb'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/kb', 'get_index', array(), get_class($this)); + $app->get('/kb/article/:id', 'get_post', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/kb/category/:id', 'get_cat', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_kb_index'); + } + + public function get_post(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $post = $api->kb_article_get(array('id'=>$id)); + return $app->render('mod_kb_article', array('post'=>$post)); + } + + public function get_cat(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $cat = $api->kb_category_get(array('id'=>$id)); + return $app->render('mod_kb_category', array('category'=>$cat)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Kb/Controller/Client.php b/src/bb-modules/Kb/Controller/Client.php new file mode 100644 index 000000000..dc8f32e6d --- /dev/null +++ b/src/bb-modules/Kb/Controller/Client.php @@ -0,0 +1,63 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/kb', 'get_kb', array(), get_class($this)); + $app->get('/kb/:category', 'get_kb_category', array('category' => '[a-z0-9-]+'), get_class($this)); + $app->get('/kb/:category/:slug', 'get_kb_article', array('category' => '[a-z0-9-]+', 'slug' => '[a-z0-9-]+'), get_class($this)); + } + + public function get_kb(\Box_App $app) + { + return $app->render('mod_kb_index'); + } + + public function get_kb_category(\Box_App $app, $category) + { + $api = $app->getApiGuest(); + $data = array('slug'=>$category); + $model = $api->kb_category_get($data); + return $app->render('mod_kb_category', array('category'=>$model)); + } + + public function get_kb_article(\Box_App $app, $category, $slug) + { + $api = $app->getApiGuest(); + $data = array('slug'=>$slug); + $article = $api->kb_article_get($data); + return $app->render('mod_kb_article', array('article'=>$article)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Kb/Service.php b/src/bb-modules/Kb/Service.php new file mode 100644 index 000000000..c48378316 --- /dev/null +++ b/src/bb-modules/Kb/Service.php @@ -0,0 +1,347 @@ +di = $di; + } + + public function searchArticles($status = null, $search = null, $cat = null) + { + $filter = array(); + + $sql = " + SELECT * + FROM kb_article + WHERE 1 + "; + + if ($cat) { + $sql .= " AND kb_article_category_id = :cid"; + $filter[':cid'] = $cat; + } + + if ($status) { + $sql .= " AND status = :status"; + $filter[':status'] = $status; + } + + if ($search) { + $sql .= " title LIKE :q OR content LIKE :q"; + $filter[':q'] = "%$search%"; + } + + $sql .= " ORDER BY kb_article_category_id DESC, views DESC"; + + return $this->di['pager']->getSimpleResultSet($sql, $filter); + } + + + public function findActiveArticleById($id) + { + $bindings = array( + ':id' => $id, + ':status' => \Model_KbArticle::ACTIVE + ); + + return $this->di['db']->findOne('KbArticle', 'id = :id AND status=:status', $bindings); + } + + public function findActiveArticleBySlug($slug) + { + $bindings = array( + ':slug' => $slug, + ':status' => \Model_KbArticle::ACTIVE + ); + + return $this->di['db']->findOne('KbArticle', 'slug = :slug AND status=:status', $bindings); + } + + public function findActive() + { + return $this->di['db']->find('KbArticle', 'status=:status', array(':status' => \Model_KbArticle::ACTIVE)); + } + + public function hitView(\Model_KbArticle $model) + { + $model->views++; + $this->di['db']->store($model); + } + + public function rm(\Model_KbArticle $model) + { + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Deleted knowledge base article #%s', $id); + } + + public function toApiArray(\Model_KbArticle $model, $deep = false, $identity = null) + { + $data = array( + 'id' => $model->id, + 'slug' => $model->slug, + 'title' => $model->title, + 'views' => $model->views, + 'created_at' => $model->created_at, + 'status' => $model->status, + 'updated_at' => $model->updated_at, + ); + + $cat = $this->di['db']->load('KbArticleCategory', $model->kb_article_category_id); + $data['category'] = array( + 'id' => $cat->id, + 'slug' => $cat->slug, + 'title' => $cat->title, + ); + + if ($deep) { + $data['content'] = $model->content; + } + + if ($identity instanceof \Model_Admin) { + $data['status'] = $model->status; + $data['kb_article_category_id'] = $model->kb_article_category_id; + } + + return $data; + } + + public function createArticle($articleCategoryId, $title, $status = null, $content = null) + { + if(!isset($status)){ + $status = \Model_KbArticle::DRAFT; + } + + $model = $this->di['db']->dispense('KbArticle'); + $model->kb_article_category_id = $articleCategoryId; + $model->title = $title; + $model->slug = $this->di['tools']->slug($title); + $model->status = $status; + $model->content = $content; + $model->updated_at = date('c'); + $model->created_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created new knowledge base article #%s', $id); + + return $id; + } + + public function updateArticle($id, $articleCategoryId = null, $title = null, $slug = null, $status = null, $content = null, $views = null) + { + $model = $this->di['db']->findOne('KbArticle', 'id = ?', array($id)); + + if (!$model instanceof \Model_KbArticle) { + throw new \Box_Exception('Article not found'); + } + + if (isset($articleCategoryId)) { + $model->kb_article_category_id = $articleCategoryId; + } + + if (isset($title)) { + $model->title = $title; + } + + if (isset($slug)) { + $model->slug = $slug; + } + + if (isset($status)) { + $model->status = $status; + } + + if (isset($content)) { + $model->content = $content; + } + + if (isset($views)) { + $model->views = $views; + } + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + $this->di['logger']->info('Updated knowledge base article #%s', $id); + + return true; + } + + public function categoryGetSearchQuery($data) + { + $sql = " + SELECT kac.* + FROM kb_article_category kac + LEFT JOIN kb_article ka ON kac.id = ka.kb_article_category_id"; + + $article_status = isset($data['article_status']) ? $data['article_status'] : NULL; + $query = isset($data['q']) ? $data['q'] : NULL; + + $where = array(); + $bindings = array(); + if ($article_status) { + $where[] = "ka.status = :status"; + + $bindings[':status'] = $article_status; + } + + if ($query) { + $where[] = "(ka.title LIKE :title OR ka.content LIKE :content)"; + + $bindings[':title'] = "%$query%"; + $bindings[':content'] = "%$query%"; + } + + if (!empty($where)) { + $sql = $sql . ' WHERE ' . implode(' AND ', $where); + } + + $sql = $sql . " GROUP BY kac.id ORDER BY kac.id DESC"; + + return array($sql, $bindings); + } + + public function categoryFindAll() + { + $sql = "SELECT kac.*, a.* + FROM kb_article_category kac + LEFT JOIN kb_article ka + ON kac.id = ka.kb_article_category_id + "; + + return $this->di['db']->getAll($sql); + } + + public function categoryGetPairs() + { + $sql = "SELECT id, title FROM kb_article_category"; + $pairs = $this->di['db']->getAssoc($sql); + + return $pairs; + } + + public function categoryRm(\Model_KbArticleCategory $model) + { + $bindings = array( + ':kb_article_category_id' => $model->id + ); + + $articlesCount = $this->di['db']->getCell("SELECT count(*) as cnt FROM kb_article WHERE kb_article_category_id = :kb_article_category_id", $bindings); + + if ($articlesCount > 0) { + throw new \Box_Exception('Can not remove category which has articles'); + } + + $id = $model->id; + + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted knowledge base category #%s', $id); + + return true; + } + + public function categoryToApiArray(\Model_KbArticleCategory $model, $identity = null, $query = null) + { + $data = $this->di['db']->toArray($model); + + $sql = "kb_article_category_id = :category_id"; + $bindings = array( + ':category_id' => $model->id + ); + + if (!$identity instanceof \Model_Admin){ + $sql .= " AND status = 'active'"; + } + + if ($query){ + $sql .= "AND (title LIKE :title OR content LIKE :content)"; + $query = "%$query%"; + $bindings[':content'] = $query; + $bindings[':title'] = $query; + } + + $articles = $this->di['db']->find('KbArticle', $sql, $bindings); + + foreach ($articles as $article) { + $data['articles'][] = $this->toApiArray($article, false, $identity); + } + + return $data; + } + + public function createCategory($title, $description = null) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_KbArticleCategory', 2); + + $model = $this->di['db']->dispense('KbArticleCategory'); + $model->title = $title; + $model->description = $description; + $model->slug = $this->di['tools']->slug($title); + $model->updated_at = date('c'); + $model->created_at = date('c'); + + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created new knowledge base category #%s', $id); + + return $id; + } + + public function updateCategory(\Model_KbArticleCategory $model, $title = null, $slug = null, $description = null) + { + if (isset($title)) { + $model->title = $title; + } + + if (isset($slug)) { + $model->slug = $slug; + } + + if (isset($description)) { + $model->description = $description; + } + + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + $this->di['logger']->info('Updated knowledge base category #%s', $model->id); + + return true; + } + + public function findCategoryById($id) + { + return $this->di['db']->load('KbArticleCategory', $id); + } + + public function findCategoryBySlug($slug) + { + $bindings = array( + ':slug' => $slug, + ); + + return $this->di['db']->findOne('KbArticleCategory', 'slug = :slug', $bindings); + } +} \ No newline at end of file diff --git a/src/bb-modules/Kb/html_admin/mod_kb_article.phtml b/src/bb-modules/Kb/html_admin/mod_kb_article.phtml new file mode 100644 index 000000000..b0bd7f665 --- /dev/null +++ b/src/bb-modules/Kb/html_admin/mod_kb_article.phtml @@ -0,0 +1,90 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'kb' %} +{% block meta_title %}{{ post.title}}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + +
          +
          {{ post.title}}
          +
          + +
          +
          + + + +
          +
          +
          + +
          + +
          +
          {% trans 'Article details' %}
          +
          + +
          +
          +
          + +
          + {{ mf.selectbox('kb_article_category_id', admin.kb_category_get_pairs, post.kb_article_category_id, 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + + +
          +
          + +
          + Go back +
          +
          +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Kb/html_admin/mod_kb_category.phtml b/src/bb-modules/Kb/html_admin/mod_kb_category.phtml new file mode 100644 index 000000000..c81e2a5c8 --- /dev/null +++ b/src/bb-modules/Kb/html_admin/mod_kb_category.phtml @@ -0,0 +1,53 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'support' %} +{% block meta_title %}{{ category.title}}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {{ category.title}}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Kb/html_admin/mod_kb_index.phtml b/src/bb-modules/Kb/html_admin/mod_kb_index.phtml new file mode 100644 index 000000000..903253e57 --- /dev/null +++ b/src/bb-modules/Kb/html_admin/mod_kb_index.phtml @@ -0,0 +1,151 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Knowledge Base' %}{% endblock %} +{% set active_menu = 'kb' %} +{% block content %} + +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set posts = admin.kb_article_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, post in posts.list %} + + + + + + + + {% else %} + + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Category' %}{% trans 'Status' %}{% trans 'Views' %} 
          {{ post.title }}{{post.category.title}}{{ mf.status_name(post.status) }}{{ post.views }} + + +
          + {% trans 'The list is empty' %} +
          + + {% include "partial_pagination.phtml" with {'list': posts, 'url':'kb'} %} +
          + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('kb_article_category_id', admin.kb_category_get_pairs, request.kb_article_category_id, 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          + + + {% for cat_id, cat_title in admin.kb_category_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + +
          {{cat_title}} + + +
          {% trans 'The list is empty' %}
          +
          + +
          + +
          +
          + +{% endblock %} diff --git a/src/bb-modules/Kb/html_client/mod_kb_article.phtml b/src/bb-modules/Kb/html_client/mod_kb_article.phtml new file mode 100644 index 000000000..cc590f715 --- /dev/null +++ b/src/bb-modules/Kb/html_client/mod_kb_article.phtml @@ -0,0 +1,68 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{article.title}}{% endblock %} + +{% block breadcrumb %} +
        • {% trans 'Knowledge base' %} /
        • +
        • {{article.category.title}}/
        • +
        • {{article.title}}
        • +{% endblock %} + +{% block content %} + +
          +
          +
          +
          +
          +

          {{article.title}}

          +
          {{article.created_at|bb_date }}
          +

          {% trans 'Article views' %}: {{ article.views }}

          +
          +
          + {{article.content|bbmd}} +
          +

          {% trans 'Back to list' %}

          +
          +
          +
          +
          +
          +{% endblock %} + +{% block content_after %} + +
          +
          +
          +
          +
          +

          {%trans 'Similiar articles' %}

          +
          +
          + +
          +
          +
          + +
          +
          +
          +

          {%trans 'Knowledge base categories'%}

          +
          +
          + +
          +
          +
          +
          +
          +{% endblock %} diff --git a/src/bb-modules/Kb/html_client/mod_kb_category.phtml b/src/bb-modules/Kb/html_client/mod_kb_category.phtml new file mode 100644 index 000000000..94959e783 --- /dev/null +++ b/src/bb-modules/Kb/html_client/mod_kb_category.phtml @@ -0,0 +1,32 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{category.title}}{% endblock %} + +{% block breadcrumb %} +
        • {% trans 'Knowledge base' %} /
        • +
        • {{category.title}}
        • +{% endblock %} + +{% block content %} +
          +
          + +
          +
          + {% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Kb/html_client/mod_kb_index.phtml b/src/bb-modules/Kb/html_client/mod_kb_index.phtml new file mode 100644 index 000000000..e656a510e --- /dev/null +++ b/src/bb-modules/Kb/html_client/mod_kb_index.phtml @@ -0,0 +1,58 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{%trans 'Knowledge base'%}{% endblock %} +{% block breadcrumb %}{%trans 'Knowledge base'%}{% endblock %} + +{% block content %} + + {% if request.q %} + {% set kbcategories = guest.kb_category_get_list({"q": request.q}) %} + {% else %} + {% set kbcategories = guest.kb_category_get_list %} + {% endif %} + +
          +
          +
          +
          +
          +

          {% trans 'Knowledge base' %}


          + {% trans 'Please try to read related topics in knowledge base before contacting support.' %} + +
          +
          + +
          + {% for i, category in kbcategories.list %} + + {% else %} +

          + {% trans 'Try using other keyword. No matches found for keyword:' %} + {{ request.q }} +

          + {% endfor %} +
          +
          +
          +
          +
          +
          +{% endblock %} diff --git a/src/bb-modules/Kb/manifest.json b/src/bb-modules/Kb/manifest.json new file mode 100644 index 000000000..9900b65cc --- /dev/null +++ b/src/bb-modules/Kb/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "kb", + "type": "mod", + "name": "Knowledge base", + "description": "Knowledge base module for BoxBilling", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "http://www.boxbilling.com/license.txt", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Massmailer/Api/Admin.php b/src/bb-modules/Massmailer/Api/Admin.php new file mode 100644 index 000000000..9a722f46e --- /dev/null +++ b/src/bb-modules/Massmailer/Api/Admin.php @@ -0,0 +1,316 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $pager['list'][$key] = $this->getService()->toApiArray($item); + } + return $pager; + } + + /** + * Get mail message by id + * + * @param int $id - mail message ID + * + * @return array + */ + public function get($data) + { + $model = $this->_getMessage($data); + return $this->getService()->toApiArray($model); + } + + /** + * Update mail message + * + * @param int $id - mail message id + * + * @optional string $subject - mail message title + * @optional string $content - mail message content + * @optional string $status - mail message status + * @optional string $from_name - mail message email from name + * @optional string $from_email - mail message email from email + * @optional array $filter - filter parameters to select clients + * + * @return bool + */ + public function update($data) + { + $model = $this->_getMessage($data); + + if(isset($data['content'])) { + $model->content = $data['content']; + } + + if(isset($data['subject'])) { + $model->subject = $data['subject']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['filter'])) { + $model->filter = json_encode($data['filter']); + } + + if(isset($data['from_name'])) { + if(empty($data['from_name'])) { + throw new \Box_Exception('Message from name can not be empty'); + } + $model->from_name = $data['from_name']; + } + + if(isset($data['from_email'])) { + $this->di['validator']->isEmailValid($data['from_email']); + $model->from_email = $data['from_email']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated mail message #%s', $model->id); + return TRUE; + } + + /** + * Create mail message + * + * @param string $subject - mail message subject + * + * @optional string $content - mail message content + * + * @return bool + */ + public function create($data) + { + if(!isset($data['subject'])) { + throw new \Box_Exception('Message subject not passed'); + } + + $default_content = '{% filter markdown %} +Hi {{ c.first_name }} {{ c.last_name }}, + +Your email is: {{ c.email }} + +Aenean vut sagittis in natoque tortor. Facilisis magnis duis nec eros! Augue +sed quis tortor porttitor? Rhoncus tortor pid et a enim dis adipiscing eros +facilisis nunc. Phasellus dis odio lacus pulvinar vel lundium dapibus turpis. + +Urna parturient, ultricies nascetur? Et a. Elementum in dapibus ut vel ut +magna tempor, dapibus lacus sed? Ut velit dignissim placerat, tristique pid +vut amet et nunc! Elementum dolor, dictumst porta ultrices. Rhoncus, amet. + +Order our services at {{ "order"|link }} + +{{ guest.system_company.name }} - {{ guest.system_company.signature }} +{% endfilter %} + '; + $systemService = $this->di['mod_service']('system'); + $company = $systemService->getCompany(); + + $model = $this->di['db']->dispense('mod_massmailer'); + $model->from_email = $company['email']; + $model->from_name = $company['name']; + $model->subject = $data['subject']; + $model->content = isset($data['content']) ? $data['content'] : $default_content; + $model->status = 'draft'; + $model->created_at = date('c'); + $model->updated_at = date('c'); + + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created mail message #%s', $model->id); + return $id; + } + + /** + * Send test mail message by ID to client + * + * @param int $id - mail message ID + * + * @return bool + */ + public function send_test($data) + { + $model = $this->_getMessage($data); + $client_id = $this->_getTestClientId(); + + if(empty($model->content)) { + throw new \Box_Exception('Add some content before sending message'); + } + + $this->getService()->sendMessage($model, $client_id); + + $this->di['logger']->info('Sent test mail message #%s to client ', $model->id); + return true; + } + + /** + * Send mail message by ID + * + * @param int $id - mail message ID + * + * @return bool + */ + public function send($data) + { + $model = $this->_getMessage($data); + + if(empty($model->content)) { + throw new \Box_Exception('Add some content before sending message'); + } + + $mod = $this->di['mod']('massmailer'); + $c = $mod->getConfig(); + $interval = isset($c['interval']) ? (int)$c['interval'] : 30; + $max = isset($c['limit']) ? (int)$c['limit'] : 25; + + $clients = $this->getService()->getMessageReceivers($model, $data); + foreach($clients as $c) { + $d = array( + 'queue' => 'massmailer', + 'mod' => 'massmailer', + 'handler' => 'sendMail', + 'max' => $max, + 'interval' => $interval, + 'params' => array('msg_id'=>$model->id, 'client_id'=>$c['id']), + ); + $this->di['api_admin']->queue_message_add($d); + } + + $model->status = 'sent'; + $model->sent_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Added mass mail messages #%s to queue', $id); + return true; + } + + /** + * Copy mail message by ID + * + * @param int $id - mail message ID + * + * @return bool + */ + public function copy($data) + { + $model = $this->_getMessage($data); + + $copy = $this->di['db']->dispense('mod_massmailer'); + $copy->from_email = $model->from_email; + $copy->from_name = $model->from_name; + $copy->subject = $model->subject . ' (Copy)'; + $copy->content = $model->content; + $copy->filter = $model->filter; + $copy->status = 'draft'; + $copy->created_at = date('c'); + $copy->updated_at = date('c'); + + $copyId = $this->di['db']->store($copy); + + $this->di['logger']->info('Copied mail message #%s to #%s', $model->id, $copyId); + + return $copyId; + } + + /** + * Get message receivers list + * + * @param int $id - mail message ID + * + * @return array + */ + public function receivers($data) + { + $model = $this->_getMessage($data); + return $this->getService()->getMessageReceivers($model, $data); + } + + /** + * Delete mail message by ID + * + * @param int $id - mail message ID + * + * @return bool + */ + public function delete($data) + { + $model = $this->_getMessage($data); + $id = $model->id; + + $this->di['db']->trash($model); + + $this->di['logger']->info('Removed mail message #%s', $id); + return true; + } + + /** + * Generate preview text + * + * @param int $id - message id + * + * @return array - parsed subject and content strings + */ + public function preview($data) + { + $model = $this->_getMessage($data); + $client_id = $this->_getTestClientId(); + list($ps, $pc) = $this->getService()->getParsed($model, $client_id); + return array( + 'subject' => $ps, + 'content' => $pc, + ); + } + + private function _getTestClientId() + { + $mod = $this->di['mod']('massmailer'); + $c = $mod->getConfig(); + + if(!isset($c['test_client_id']) || empty($c['test_client_id'])) { + throw new \Box_Exception('Client ID needs to be configured in mass mailer settings.'); + } + + return (int)$c['test_client_id']; + } + + private function _getMessage($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Message id not passed'); + } + + $model = $this->di['db']->getExistingModelById('mod_massmailer', $data['id'], 'Message not found'); + + return $model; + } +} \ No newline at end of file diff --git a/src/bb-modules/Massmailer/Controller/Admin.php b/src/bb-modules/Massmailer/Controller/Admin.php new file mode 100644 index 000000000..5f4ff8e2f --- /dev/null +++ b/src/bb-modules/Massmailer/Controller/Admin.php @@ -0,0 +1,69 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages'=>array( + array( + 'location' => 'extensions', + 'index' => 4000, + 'label' => 'Mass mailer', + 'uri' => $this->di['url']->adminLink('massmailer'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/massmailer', 'get_index', array(), get_class($this)); + $app->get('/massmailer/message/:id', 'get_edit', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_massmailer_index'); + } + + public function get_edit(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $model = $api->massmailer_get(array('id'=>$id)); + return $app->render('mod_massmailer_message', array('msg'=>$model)); + } +} \ No newline at end of file diff --git a/src/bb-modules/Massmailer/Service.php b/src/bb-modules/Massmailer/Service.php new file mode 100644 index 000000000..84cdb2b71 --- /dev/null +++ b/src/bb-modules/Massmailer/Service.php @@ -0,0 +1,199 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function install() + { + $extensionService = $this->di['mod_service']('extension'); + $extensionService->activateExistingExtension(array('id'=>'queue', 'type'=>'mod')); + + $sql=" + CREATE TABLE IF NOT EXISTS `mod_massmailer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `from_email` varchar(255) DEFAULT NULL, + `from_name` varchar(255) DEFAULT NULL, + `subject` varchar(255) DEFAULT NULL, + `content` text DEFAULT NULL, + `filter` text DEFAULT NULL, + `status` varchar(255) DEFAULT NULL, + `sent_at` varchar(35) DEFAULT NULL, + `created_at` varchar(35) DEFAULT NULL, + `updated_at` varchar(35) DEFAULT NULL, + PRIMARY KEY (`id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; + "; + $this->di['db']->exec($sql); + + //default config values + $extensionService->setConfig(array('ext'=>'mod_massmailer', 'limit'=>'2','interval'=>'10', 'test_client_id'=>1)); + } + + public function getSearchQuery($data) + { + $sql="SELECT * + FROM mod_massmailer + WHERE 1 "; + + $params = array(); + + $search = (isset($data['search']) && !empty($data['search'])) ? $data['search'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + + if(NULL !== $status) { + $sql .= ' AND status = :status'; + $params[':status'] = $status; + } + + if(NULL !== $search) { + $sql .= ' AND (subject LIKE :search OR content LIKE :search OR from_email LIKE :search OR from_name LIKE :search)'; + $params[':search'] = '%'.$search.'%'; + } + + $sql .= ' ORDER BY created_at DESC'; + + return array($sql, $params); + } + + public function getMessageReceivers($model, $data = array()) + { + $row = $this->toApiArray($model); + $filter = $row['filter']; + + $sql="SELECT c.id, c.first_name, c.last_name + FROM client c + LEFT JOIN client_order co ON (co.client_id = c.id) + WHERE 1 + "; + + $values = array(); + if(!empty($filter)) { + if(isset($filter['client_status']) && !empty($filter['client_status'])) { + $sql .= sprintf(" AND c.status IN ('%s')", implode("', '", $filter['client_status'])); + } + + if(isset($filter['client_groups']) && !empty($filter['client_groups'])) { + $sql .= sprintf(" AND c.client_group_id IN ('%s')", implode("', '", $filter['client_groups'])); + } + + if(isset($filter['has_order']) && !empty($filter['has_order'])) { + $sql .= sprintf(" AND co.product_id IN ('%s')", implode("', '", $filter['has_order'])); + } + + if(isset($filter['has_order_with_status']) && !empty($filter['has_order_with_status'])) { + $sql .= sprintf(" AND co.status IN ('%s')", implode("', '", $filter['has_order_with_status'])); + } + } + + $sql .= ' GROUP BY c.id ORDER BY c.id DESC'; + + if(isset($data['debug']) && $data['debug']) { + throw new \Exception($sql. ' '. print_r($values, 1)); + } + + return $this->di['db']->getAll($sql, $values); + } + + public function getParsed($model, $client_id) + { + $clientService = $this->di['mod_service']('client'); + $systemService = $this->di['mod_service']('system'); + + $client = $clientService->get(array('id'=>$client_id)); + $clientArr = $clientService->toApiArray($client, true, null); + + $vars = array(); + $vars['c'] = $clientArr; + $vars['_client_id'] = $client->id; + $vars['_tpl'] = $model->subject; + $ps = $systemService->renderString($vars['_tpl'], false, $vars); + + $vars = array(); + $vars['c'] = $clientArr; + $vars['_client_id'] = $client->id; + $vars['_tpl'] = $model->content; + $pc = $systemService->renderString($vars['_tpl'], false, $vars); + + return array($ps, $pc); + } + + public function sendMessage($model, $client_id) + { + list($ps, $pc) = $this->getParsed($model, $client_id); + + $clientService = $this->di['mod_service']('client'); + $emailService = $this->di['mod_service']('email'); + + $client = $clientService->get(array('id' => $client_id)); + + $data = array( + 'to' => $client->email, + 'to_name' => $client->first_name . ' ' . $client->last_name, + 'from' => $model->from_email, + 'from_name' => $model->from_name, + 'subject' => $ps, + 'content' => $pc, + 'client_id' => $client_id, + ); + + return $emailService->sendMail($data['to'], $data['from'], $data['subject'], $data['content'], $data['to_name'], $data['from_name'], $data['client_id']); + } + + public function toApiArray($row) + { + if($row instanceof \RedBeanPHP\OODBBean) { + $row = $row->export(); + } + + if($row['filter']) { + $row['filter'] = json_decode($row['filter'], 1); + } else { + $row['filter'] = array(); + } + + return $row; + } + + public static function onAfterAdminCronRun(\Box_Event $event) + { + try { + $di = $event->getDi(); + $di['api_admin']->queue_execute(array('queue'=>'massmailer')); + } catch(\Exception $e) { + error_log('Error executing massmailer queue: '.$e->getMessage()); + } + } + + public function sendMail($params) + { + $model = $this->di['db']->load('mod_massmailer', $params['msg_id']); + if(!$model) { + throw new \Exception('Mass mail message not found'); + } + $this->sendMessage($model, $params['client_id']); + } +} \ No newline at end of file diff --git a/src/bb-modules/Massmailer/html_admin/mod_massmailer_index.phtml b/src/bb-modules/Massmailer/html_admin/mod_massmailer_index.phtml new file mode 100644 index 000000000..8cdeddf0e --- /dev/null +++ b/src/bb-modules/Massmailer/html_admin/mod_massmailer_index.phtml @@ -0,0 +1,122 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Mass mailer{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + {% set msgs = admin.massmailer_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, msg in msgs.list %} + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Subject' %}{% trans 'From' %}{% trans 'Status' %} 
          {{ msg.subject }}{{ msg.from_name }}
          {{ msg.from_email }}
          {{ mf.status_name(msg.status) }} + + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': msgs, 'url':'massmailer'} %} +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          +
          +

          {% trans 'Mass Mail Settings' %}

          +
          + + {% set params = admin.extension_config_get({"ext":"mod_massmailer"}) %} + +
          + +
          +
          +
          +
            +
          • Send
          • +
          • +
          • emails every
          • +
          • +
          • seconds until complete
          • +
          +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          + +
          +
          + +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-modules/Massmailer/html_admin/mod_massmailer_message.phtml b/src/bb-modules/Massmailer/html_admin/mod_massmailer_message.phtml new file mode 100644 index 000000000..1d9565656 --- /dev/null +++ b/src/bb-modules/Massmailer/html_admin/mod_massmailer_message.phtml @@ -0,0 +1,141 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}{{ msg.subject}}{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} +
          + +
          +
          {% trans 'Send Email Message' %} - {{ msg.subject}}
          +
          + +
          +
          + +
          + +
          +
            +
          • +
          • +
          • +
          +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {% trans 'Recipients filter. Select none to send message to all clients' %} +
          + +
          + + + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + {% trans 'Message content' %} +
          +
          + +
          +
          + +
          + +
          + + + + + +
          +
          + + +
          + +{% endblock %} + +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Massmailer/icon.png b/src/bb-modules/Massmailer/icon.png new file mode 100644 index 000000000..d1950b03b Binary files /dev/null and b/src/bb-modules/Massmailer/icon.png differ diff --git a/src/bb-modules/Massmailer/manifest.json b/src/bb-modules/Massmailer/manifest.json new file mode 100644 index 000000000..d00f91c6d --- /dev/null +++ b/src/bb-modules/Massmailer/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "massmailer", + "type": "mod", + "name": "Mass mail tool", + "icon_url": "icon.png", + "description": "Send batch email to filtered clients", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/News/Api/Admin.php b/src/bb-modules/News/Api/Admin.php new file mode 100644 index 000000000..4b029af7e --- /dev/null +++ b/src/bb-modules/News/Api/Admin.php @@ -0,0 +1,179 @@ +getService(); + list ($sql, $params) = $service->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $post = $this->di['db']->getExistingModelById('Post', $item['id'], 'Post not found'); + $pager['list'][$key] = $this->getService()->toApiArray($post); + } + + return $pager; + } + + /** + * Get news item by ID + * + * @param int $id - news item ID + * + * @return array + */ + public function get($data) + { + if(!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $service = $this->getService(); + $model = $this->di['db']->getExistingModelById('Post', $id, 'News item not found'); + return $service->toApiArray($model, 'admin'); + } + + /** + * Update news item. + * + * @param int $id - news item ID + * + * @optional string $title - news item title + * @optional string $slug - news item slug + * @optional string $content - news item content + * @optional string $status - news item status + * + * @return bool + */ + public function update($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Post id not passed'); + } + + $model = $this->di['db']->getExistingModelById('Post', $data['id'], 'News item not found'); + + if(isset($data['content'])) { + $model->content = $data['content']; + } + + if(isset($data['title'])) { + $model->title = $data['title']; + } + + if(isset($data['slug'])) { + $model->slug = $data['slug']; + } + + if(isset($data['image'])) { + $model->image = $data['image']; + } + + if(isset($data['section'])) { + $model->section = $data['section']; + } + + if(isset($data['publish_at'])) { + $model->publish_at = $data['publish_at']; + } + + if(isset($data['published_at'])) { + $model->published_at = $data['published_at']; + } + + if(isset($data['expires_at'])) { + $model->publish_at = $data['expires_at']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['created_at'])) { + $model->created_at = date('c', strtotime($data['created_at'])); + } + + if(isset($data['updated_at'])) { + $model->updated_at = date('c', strtotime($data['updated_at'])); + } + + $model->admin_id = $this->getIdentity()->id; + $this->di['db']->store($model); + + $this->di['logger']->info('Updated news item #%s', $model->id); + return TRUE; + } + + /** + * Creat new news item. + * + * @param string $title - news item title + * + * @optional string $content - news item content + * @optional string $status - news item status + * + * @return bool + */ + public function create($data) + { + if(!isset($data['title'])) { + throw new \Box_Exception('Post title not passed'); + } + + $model = $this->di['db']->dispense('Post'); + $model->admin_id = $this->getIdentity()->id; + $model->title = $data['title']; + $model->slug = $this->di['tools']->slug($data['title']); + $model->status = isset($data['status']) ? $data['status'] : NULL; + $model->content = isset($data['content']) ? $data['content'] : NULL; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Created news item #%s', $model->id); + return $model->id; + } + + /** + * Delete news item by ID + * + * @param int $id - news item ID + * + * @return bool + */ + public function delete($data) + { + if(!isset($data['id'])) { + throw new \Box_Exception('Post id not passed'); + } + + $model = $this->di['db']->getExistingModelById('Post', $data['id'], 'News item not found'); + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Removed news item #%s', $id); + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/News/Api/Guest.php b/src/bb-modules/News/Api/Guest.php new file mode 100644 index 000000000..a501a2a44 --- /dev/null +++ b/src/bb-modules/News/Api/Guest.php @@ -0,0 +1,68 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $post = $this->di['db']->getExistingModelById('Post', $item['id'], 'Post not found'); + $pager['list'][$key] = $this->getService()->toApiArray($post); + } + + return $pager; + } + + /** + * Get news item by ID or SLUG + * + * @param int $id - news item ID. Required only if SLUG is not passed. + * @param string $slug - news item slug. Required only if ID is not passed. + * + * @return array + */ + public function get($data) + { + if(!isset($data['id']) && !isset($data['slug'])) { + throw new \Box_Exception('ID or slug is missing'); + } + + $id = isset($data['id']) ? $data['id'] : NULL; + $slug = isset($data['slug']) ? $data['slug'] : NULL; + + if($id) { + $model = $this->getService()->findOneActiveById($id); + } else { + $model = $this->getService()->findOneActiveBySlug($slug); + } + + if(!$model || $model->status !== 'active') { + throw new \Box_Exception('News item not found'); + } + return $this->getService()->toApiArray($model); + } +} \ No newline at end of file diff --git a/src/bb-modules/News/Controller/Admin.php b/src/bb-modules/News/Controller/Admin.php new file mode 100644 index 000000000..aeabe9d7a --- /dev/null +++ b/src/bb-modules/News/Controller/Admin.php @@ -0,0 +1,72 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages' => array( + array( + 'location' => 'support', + 'index' => 900, + 'label' => 'Announcements', + 'uri' => $this->di['url']->adminLink('news'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/news', 'get_index', array(), get_class($this)); + $app->get('/news/', 'get_index', array(), get_class($this)); + $app->get('/news/index', 'get_index', array(), get_class($this)); + $app->get('/news/index/', 'get_index', array(), get_class($this)); + $app->get('/news/post/:id', 'get_post', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_news_index'); + } + + public function get_post(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $post = $api->news_get(array('id'=>$id)); + return $app->render('mod_news_post', array('post'=>$post)); + } +} \ No newline at end of file diff --git a/src/bb-modules/News/Controller/Client.php b/src/bb-modules/News/Controller/Client.php new file mode 100644 index 000000000..a492533b7 --- /dev/null +++ b/src/bb-modules/News/Controller/Client.php @@ -0,0 +1,53 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/news', 'get_news', array(), get_class($this)); + $app->get('/news/:slug', 'get_news_item', array('slug' => '[a-z0-9-]+'), get_class($this)); + } + + public function get_news(\Box_App $app) + { + return $app->render('mod_news_index'); + } + + public function get_news_item(\Box_App $app, $slug) + { + $post = $this->di['api_guest']->news_get(array('slug'=>$slug)); + return $app->render('mod_news_post', array('post'=>$post)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/News/Service.php b/src/bb-modules/News/Service.php new file mode 100644 index 000000000..f1eed9a1a --- /dev/null +++ b/src/bb-modules/News/Service.php @@ -0,0 +1,95 @@ +di = $di; + } + + public function findOneActiveById($id) + { + return $this->di['db']->findOne('Post', 'id = :id AND status = "active"', array('id'=>$id)); + } + + public function findOneActiveBySlug($slug) + { + return $this->di['db']->findOne('Post', 'slug = :slug AND status = "active"', array('slug'=>$slug)); + } + + public function getSearchQuery($data) + { + $sql='SELECT *, + SUBSTRING( content, 1, LOCATE( "", content ) -1 ) AS excerpt + FROM post + WHERE 1 '; + + $params = array(); + + $search = isset($data['search']) ? $data['search'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + + if(NULL !== $status) { + $sql .= ' AND status = :status'; + $params['status'] = $status; + } + + if(NULL !== $search) { + $sql .= ' AND (m.title LIKE %:search% OR m.content LIKE %:search%)'; + $params['search'] = $search; + } + + $sql .= ' ORDER BY created_at DESC'; + + return array($sql, $params); + } + + public function toApiArray($row, $role = 'guest', $deep = true) + { + $admin = $this->di['db']->getRow('SELECT name, email FROM admin WHERE id=:id', array('id'=>$row->admin_id)); + + $data = array( + 'id' => $row->id, + 'title' => $row->title, + 'content' => $row->content, + 'slug' => $row->slug, + 'image' => $row->image, + 'section' => $row->section, + 'publish_at' => $row->publish_at, + 'published_at' => $row->published_at, + 'expires_at' => $row->expires_at, + 'created_at' => $row->created_at, + 'updated_at' => $row->updated_at, + 'author' => array( + 'name' => $admin['name'], + 'email' => $admin['email'], + ), + 'excerpt' => $row->excerpt, + //'tags' => array('foo', 'bar', 'bas'), //@todo + ); + + if($role == 'admin') { + $data['status'] = $row->status; + } + + return $data; + } +} \ No newline at end of file diff --git a/src/bb-modules/News/html_admin/mod_news_index.phtml b/src/bb-modules/News/html_admin/mod_news_index.phtml new file mode 100644 index 000000000..67cc99860 --- /dev/null +++ b/src/bb-modules/News/html_admin/mod_news_index.phtml @@ -0,0 +1,90 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}{% trans 'News' %}{% endblock %} + +{% block content %} +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + {% set posts = admin.news_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, post in posts.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Active' %}{% trans 'Date' %} 
          {{ post.id }}{{ post.title }}{{ mf.status_name(post.status) }}{{ post.created_at|bb_datetime }} + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': posts, 'url':'news/index'} %} +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          +
          + +{% endblock %} diff --git a/src/bb-modules/News/html_admin/mod_news_post.phtml b/src/bb-modules/News/html_admin/mod_news_post.phtml new file mode 100644 index 000000000..f867866eb --- /dev/null +++ b/src/bb-modules/News/html_admin/mod_news_post.phtml @@ -0,0 +1,91 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}{{ post.title}}{% endblock %} +{% set active_menu = 'support' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {{ post.title}}
          +
          + +
          +
          + + + +
          +
          +
          + +
          + +
          +
          {{ post.title}}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          + +
          +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/News/html_client/mod_news_index.phtml b/src/bb-modules/News/html_client/mod_news_index.phtml new file mode 100644 index 000000000..8abe2d37f --- /dev/null +++ b/src/bb-modules/News/html_client/mod_news_index.phtml @@ -0,0 +1,41 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Blog'%}{% endblock %} +{% block breadcrumb %}{% trans 'Blog'%}{% endblock %} + +{% block content %} +
          +
          +
          +
          +
          +

          {% trans 'News & Announcements' %}

          +

          {% trans 'Track our latest information.' %}

          +
          +
          + {% set posts = guest.news_get_list({"page":request.page,"per_page": 5}) %} + {% for i, post in posts.list %} +
          +
          +

          {{post.title}}

          +
          {{post.updated_at|bb_date}}
          +
          +
          + {% if post.excerpt %} + {{ post.excerpt|bbmd }} + {% else %} + {{ post.content|bbmd }} + {% endif %} +
          + {% trans 'Read more ...' %} +
          + {% else %} +

          The list is empty

          + {% endfor %} +
          +
          + {% include "partial_pagination.phtml" with {'list': posts} %} +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/News/html_client/mod_news_post.phtml b/src/bb-modules/News/html_client/mod_news_post.phtml new file mode 100644 index 000000000..251a93fb5 --- /dev/null +++ b/src/bb-modules/News/html_client/mod_news_post.phtml @@ -0,0 +1,69 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{post.title}}{% endblock %} +{% block breadcrumb %} +
        • {% trans 'Blog' %}/
        • +
        • {{post.title}}
        • +{% endblock %} + +{% block opengraph %} + + + + + + + + {% if post.published_at %}{% endif %} + {% if post.updated_at %}{% endif %} + {% if post.expires_at %}{% endif %} + {% if post.section %}{% endif %} + {% if post.tags %}{% endif %} + +{% endblock %} + +{% block content %} +
          +
          +
          +
          +

          {{post.title}}

          +
          {{post.created_at|bb_date}}
          +

          {% trans 'by '%} {{ post.author.name }}

          +
          +
          + {% if post.image %}{{post.title}}{% endif %} + {{ post.content|bbmd }} + {# if post.tags %}Tags: {{ post.tags|join(', ') }}{% endif #} + + {% if guest.extension_is_on({"mod":"comment"}) %}{% include "mod_comment_block.phtml" %}{% endif %} +
          +

          {% trans 'Back to list' %}

          +
          +
          +
          +
          + +{% endblock %} + +{# block sidebar2 %} +
          +
          +
          +
          +

          {% trans 'Other recent posts' %}

          +
          +
          + +
          +
          +
          +
          +{% endblock #} \ No newline at end of file diff --git a/src/bb-modules/News/manifest.json b/src/bb-modules/News/manifest.json new file mode 100644 index 000000000..84427acb9 --- /dev/null +++ b/src/bb-modules/News/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "news", + "type": "mod", + "name": "News", + "description": "News module for BoxBilling", + "homepage_url": "http://github.com/boxbilling/", + "author": "BoxBilling", + "author_url": "http://extensions.boxbilling.com/", + "license": "http://www.boxbilling.com/license.txt", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Notification/Api/Admin.php b/src/bb-modules/Notification/Api/Admin.php new file mode 100644 index 000000000..4e4f1ea19 --- /dev/null +++ b/src/bb-modules/Notification/Api/Admin.php @@ -0,0 +1,124 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $resultSet = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + } + + /** + * Get notification message + * + * @param int $id - message id + * @return array + * @throws Box_Exception + */ + public function get($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Notification id is missing'); + } + + $meta = $this->di['db']->load('extension_meta', $data['id']); + if ($meta->extension != 'mod_notification' || $meta->meta_key != 'message') { + throw new \Box_Exception('Notification message was not found'); + } + + return $this->getService()->toApiArray($meta); + } + + /** + * Add new notification message + * + * @param string $message - message text + * @return int - new message id + */ + public function add($data) + { + if (!isset($data['message'])) { + return false; + } + + $meta = $this->di['db']->dispense('extension_meta'); + $meta->extension = 'mod_notification'; + $meta->rel_type = 'staff'; + $meta->rel_id = 1; + $meta->meta_key = 'message'; + $meta->meta_value = $data['message']; + $meta->created_at = date('c'); + $meta->updated_at = date('c'); + $id = $this->di['db']->store($meta); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminNotificationAdd', 'params' => array('id' => $id))); + + return $id; + } + + /** + * Remove notification message + * + * @param int $id - message id + * @return boolean + * @throws Box_Exception + */ + public function delete($data) + { + if (!isset($data['id'])) { + throw new \Box_Exception('Notification id is missing'); + } + + $meta = $this->di['db']->load('extension_meta', $data['id']); + if ($meta->extension != 'mod_notification' || $meta->meta_key != 'message') { + throw new \Box_Exception('Notification message was not found'); + } + $this->di['db']->trash($meta); + + return true; + } + + /** + * Remove all notification messages + * + * @return boolean + * @throws Box_Exception + */ + public function delete_all() + { + $sql = "DELETE + FROM extension_meta + WHERE extension = 'mod_notification' + AND meta_key = 'message';"; + $this->di['db']->exec($sql); + + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/Notification/Controller/Admin.php b/src/bb-modules/Notification/Controller/Admin.php new file mode 100644 index 000000000..b1b297300 --- /dev/null +++ b/src/bb-modules/Notification/Controller/Admin.php @@ -0,0 +1,46 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/notification', 'get_index', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_notification_index'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Notification/Service.php b/src/bb-modules/Notification/Service.php new file mode 100644 index 000000000..b28b059b2 --- /dev/null +++ b/src/bb-modules/Notification/Service.php @@ -0,0 +1,48 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public function getSearchQuery($filter) + { + $q = "SELECT * + FROM extension_meta + WHERE extension = 'mod_notification' + AND meta_key = 'message' + ORDER BY id DESC + "; + + return array($q, array()); + } + + public function toApiArray($row) + { + return $this->di['db']->toArray($row); + } +} \ No newline at end of file diff --git a/src/bb-modules/Notification/html_admin/mod_notification_index.phtml b/src/bb-modules/Notification/html_admin/mod_notification_index.phtml new file mode 100644 index 000000000..7ed4f5b29 --- /dev/null +++ b/src/bb-modules/Notification/html_admin/mod_notification_index.phtml @@ -0,0 +1,73 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Notifications center{% endblock %} +{% set active_menu = 'activity' %} + +{% block content %} +
          + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + {% set events = admin.notification_get_list({"per_page":10, "page":request.page}|merge(request)) %} + {% for i, event in events.list %} + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Message' %}{% trans 'Date' %} 
          {{ admin.system_string_render({"_tpl": event.meta_value, "_try":true })|raw }}{{ event.created_at|date('Y-m-d H:i') }} + +
          + {% trans 'The list is empty' %} +
          + + {% include "partial_pagination.phtml" with {'list': events, 'url':'notification'} %} + + + +
          + +
          +
          +
          +
          +
          + +
          +
          +
          + + +
          +
          +
          +
          +
          + +{% endblock %} diff --git a/src/bb-modules/Notification/manifest.json b/src/bb-modules/Notification/manifest.json new file mode 100644 index 000000000..ec461504c --- /dev/null +++ b/src/bb-modules/Notification/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "notification", + "type": "mod", + "name": "Notification center", + "description": "Important messages for staff members", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Order/Api/Admin.php b/src/bb-modules/Order/Api/Admin.php new file mode 100644 index 000000000..a0f443794 --- /dev/null +++ b/src/bb-modules/Order/Api/Admin.php @@ -0,0 +1,455 @@ +_getOrder($data); + + return $this->getService()->toApiArray($order, $deep, $this->getIdentity()); + } + + /** + * Return paginated list of orders + * + * @optional string $date_from - show only order places after this date + * @optional string $date_to - show only order places till this date + * + * @return array + */ + public function get_list($data) + { + list($sql, $params) = $this->getService()->getSearchQuery($data); + $paginator = $this->di['pager']; + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $resultSet = $paginator->getAdvancedResultSet($sql, $params, $per_page); + + $meta = (isset($data['meta']) && is_array($data['meta'])) ? $data['meta'] : null; + + foreach ($resultSet['list'] as $key => $result) { + $orderObj = $this->di['db']->getExistingModelById('ClientOrder', $result['id'], 'Order not found'); + $data = $this->getService()->toApiArray($orderObj, true, $this->getIdentity()); + + $data['config'] = json_decode($orderObj->config, 1); + $data['total'] = $this->getService()->getTotal($orderObj); + $data['title'] = $orderObj->title; + + if ($meta) { + $i = 1; + $query = 'SELECT name, value FROM client_order_meta WHERE client_order_id = :id'; + foreach ($meta as $k => $v) { + $where[] = "(name = :meta_name$i AND value LIKE :meta_value$i)"; + $bindings[':meta_name' . $i] = $k; + $bindings[':meta_value' . $i] = $v . '%'; + $i++; + } + + if (!empty($where)) { + $query .= ' AND ' . implode(' AND ', $where); + } + $bindings[':id'] = $orderObj->id; + + $data['meta'] = $this->di['db']->getAssoc($query, $bindings); + + } + $supportService = $this->di['mod_service']('support'); + $data['active_tickets'] = $supportService->getActiveTicketsCountForOrder($orderObj); + + $resultSet['list'][$key] = $data; + } + + return $resultSet; + } + + /** + * Place new order for client. Admin is able to order disabled products. + * + * @param int $client_id - Client id + * @param int $product_id - Product id to be ordered + * + * @optional array $config - Depending on product type, you may need to pass product configuration options + * @optional int $quantity - Quantity of products to order. Default 1 + * @optional float $price - Overriden unit price in default currency. Default is product price for selected period. + * @optional string $group_id - Order group id. Assign order to be as an addon for other order + * @optional string $currency - Order currency. If not passed, default is used + * @optional string $title - Order title. If not passed, product title is used + * @optional bool $activate - activate imediately + * @optional string $invoice_option - Options: "no-invoice", "issue-invoice"; Default: no-invoice + * @optional string $created_at - date when order was created. Default: now + * @optional string $updated_at - date when order was updated. Default: now + * + * @return array + */ + public function create($data) + { + $required = array( + 'client_id' => 'Client id not passed', + 'product_id' => 'Product id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->di['db']->getExistingModelById('Client', $data['client_id'], 'Client not found'); + $product = $this->di['db']->getExistingModelById('Product', $data['product_id'], 'Product not found'); + + return $this->getService()->createOrder($client, $product, $data); + } + + /** + * Update order settings + * + * @param int $id - Order id + * + * @optional string $period - Order billing period, ie: 1Y + * @optional string $expires_at - Order expiration date, ie: 2022-12-29 + * @optional string $activated_at - Order activation date, ie: 2022-12-29 + * @optional string $title - new order title + * @optional string $price - new order price, new invoice will be issued with this amount + * @optional string $status - manual orders status change. Does not perform action on service + * @optional string $reason - order status change reason + * @optional string $notes - order notes + * @optional array $meta - list of meta properties + * + * @return bool + */ + public function update($data) + { + $order = $this->_getOrder($data); + + return $this->getService()->updateOrder($order, $data); + } + + /** + * Activate order depending on current status. + * + * @param int $id - Order id + * @optional bool $force - Skip order status checking. Force activate even active order + * + * @return bool + */ + public function activate($data) + { + $order = $this->_getOrder($data); + + return $this->getService()->activateOrder($order, $data); + } + + /** + * Activate order depending on current status. + * + * @param int $id - Order id + * + * @return bool + */ + public function renew($data) + { + $order = $this->_getOrder($data); + + if ($order->status == \Model_ClientOrder::STATUS_PENDING_SETUP || $order->status == \Model_ClientOrder::STATUS_FAILED_SETUP) { + return $this->activate($data); + } + + return $this->getService()->renewOrder($order, $data); + } + + /** + * Suspend order + * + * @param int $id - Order id + * + * @optional string $reason - Suspendation reason message + * @optional bool $skip_event - Skip calling event hooks + * + * @return bool + */ + public function suspend($data) + { + $order = $this->_getOrder($data); + $skip_event = isset($data['skip_event']) ? (bool)$data['skip_event'] : false; + + $reason = isset($data['reason']) ? $data['reason'] : NULL; + + return $this->getService()->suspendFromOrder($order, $reason, $skip_event); + } + + /** + * Unsuspend suspended order + * + * @param int $id - Order id + * + * @return bool + */ + public function unsuspend($data) + { + $order = $this->_getOrder($data); + if ($order->status != \Model_ClientOrder::STATUS_SUSPENDED) { + throw new \Box_Exception('Only suspended orders can be unsuspended'); + } + + return $this->getService()->unsuspendFromOrder($order); + } + + /** + * Cancel order + * + * @param int $id - Order id + * + * @optional bool $skip_event - Skip calling event hooks + * + * @return bool + */ + public function cancel($data) + { + $order = $this->_getOrder($data); + $skip_event = isset($data['skip_event']) ? (bool)$data['skip_event'] : false; + + $reason = isset($data['reason']) ? $data['reason'] : NULL; + + return $this->getService()->cancelFromOrder($order, $reason, $skip_event); + } + + /** + * Uncancel canceled order + * + * @param int $id - Order id + * + * @return bool + */ + public function uncancel($data) + { + $order = $this->_getOrder($data); + if ($order->status != \Model_ClientOrder::STATUS_CANCELED) { + throw new \Box_Exception('Only canceled orders can be uncanceled'); + } + + return $this->getService()->uncancelFromOrder($order); + } + + /** + * Delete order + * + * @param int $id - Order id + * + * @optional bool $delete_addons - Remove addons also. Default false. + * + * @return bool + */ + public function delete($data) + { + $order = $this->_getOrder($data); + $delete_addons = isset($data['delete_addons']) ? (bool)$data['delete_addons'] : false; + + if ($delete_addons) { + $list = $this->getService()->getOrderAddonsList($order); + foreach ($list as $addon) { + $this->getService()->deleteFromOrder($addon); + } + } + + return $this->getService()->deleteFromOrder($order); + } + + /** + * Suspend all expired orders. + * + * @return bool + */ + public function batch_suspend_expired($data) + { + return $this->getService()->batchSuspendExpired(); + } + + /** + * Cancel all suspended orders. + * Configure how many days suspended order should be kept before canceling + * + * @return bool + */ + public function batch_cancel_suspended($data) + { + return $this->getService()->batchCancelSuspended(); + } + + /** + * Update order config + * + * @param int $id - Order id + * @param array $config - list of key value pairs of configuration fields + * + * @return bool + */ + public function update_config($data) + { + $order = $this->_getOrder($data); + + if (!isset($data['config']) || !is_array($data['config'])) { + throw new \Box_Exception('Order config not passed'); + } + + $config = $data['config']; + + return $this->getService()->updateOrderConfig($order, $config); + } + + /** + * Get order service data + * + * @param int $id - Order id + * + * @return array + */ + public function service($data) + { + $order = $this->_getOrder($data); + + return $this->getService()->getOrderServiceData($order, $this->getIdentity()); + } + + /** + * Get paginated order statuses history list + * + * @param int $id - Order id + * + * @return array + */ + public function status_history_get_list($data) + { + $order = $this->_getOrder($data); + + $data['client_order_id'] = $order->id; + + list($sql, $bindings) = $this->getService()->getOrderStatusSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getSimpleResultSet($sql, $bindings, $per_page); + } + + + /** + * Add order status hitory change + * + * @param int $id - Order id + * @param string $status - order status + * + * @return array + */ + public function status_history_add($data) + { + $order = $this->_getOrder($data); + + $required = array( + 'status' => 'Order status was not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $notes = isset($data['notes']) ? $data['notes'] : null; + + return $this->getService()->orderStatusAdd($order, $data['status'], $notes); + } + + /** + * Remove order status history item + * + * @param int $id - History line id + * + * @return bool + */ + public function status_history_delete($data) + { + $required = array( + 'id' => 'Order history line id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + return $this->getService()->orderStatusRm($data['id']); + } + + /** + * Return order statuses codes with counter + * + * @return array + */ + public function get_statuses() + { + return $this->getService()->counter(); + } + + /** + * Return available invoice options + * + * @return array + */ + public function get_invoice_options($data) + { + return array( + 'issue-invoice' => __('Automatically issue renewal invoices'), + 'no-invoice' => __('Issue invoices manually'), + ); + } + + /** + * Return order statuses codes with titles + * + * @return array + */ + public function get_status_pairs($data) + { + return array( + \Model_ClientOrder::STATUS_PENDING_SETUP => 'Pending setup', + \Model_ClientOrder::STATUS_FAILED_SETUP => 'Setup failed', + \Model_ClientOrder::STATUS_ACTIVE => 'Active', + \Model_ClientOrder::STATUS_SUSPENDED => 'Suspended', + \Model_ClientOrder::STATUS_CANCELED => 'Canceled', + ); + } + + /** + * Return order addons list + * + * @param int $id - Order id + * + * @return array + */ + public function addons($data) + { + $model = $this->_getOrder($data); + $list = $this->getService()->getOrderAddonsList($model); + $result = array(); + foreach ($list as $order) { + $result[] = $this->getService()->toApiArray($order); + } + + return $result; + } + + protected function _getOrder($data) + { + $required = array( + 'id' => 'Order id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + return $this->di['db']->getExistingModelById('ClientOrder', $data['id'], 'Order not found'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Order/Api/Client.php b/src/bb-modules/Order/Api/Client.php new file mode 100644 index 000000000..02d4a1797 --- /dev/null +++ b/src/bb-modules/Order/Api/Client.php @@ -0,0 +1,131 @@ +getIdentity(); + $data['client_id'] = $identity->id; + if (isset($data['expiring'])) { + list($query, $bindings) = $this->getService()->getSoonExpiringActiveOrdersQuery($data); + } else { + list($query, $bindings) = $this->getService()->getSearchQuery($data); + } + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($query, $bindings, $per_page); + + foreach ($pager['list'] as $key => $item) { + $order = $this->di['db']->getExistingModelById('ClientOrder', $item['id'], 'Client order not found'); + $pager['list'][$key] = $this->getService()->toApiArray($order); + } + return $pager; + } + + /** + * Get order details + * + * @param int $id - order id + * @return array + */ + public function get($data) + { + $model = $this->_getOrder($data); + + return $this->getService()->toApiArray($model); + } + + /** + * Get order addons + * + * @param int $id - order id + * @return array + */ + public function addons($data) + { + $model = $this->_getOrder($data); + $list = $this->getService()->getOrderAddonsList($model); + $result = array(); + foreach ($list as $order) { + $result[] = $this->getService()->toApiArray($order); + } + + return $result; + } + + /** + * Get order service. Order must be activated before service can be retrieved. + * + * @param int $id - order id + * @return array + */ + public function service($data) + { + $order = $this->_getOrder($data); + + return $this->getService()->getOrderServiceData($order, $data['id'], $this->getIdentity());; + } + + /** + * List of product pairs offered as an upgrade + * @param int $id - order id + * @return array + */ + public function upgradables($data) + { + $model = $this->_getOrder($data); + $product = $this->di['db']->getExistingModelById('Product', $model->product_id); + $productService = $this->di['mod_service']('product'); + + return $productService->getUpgradablePairs($product); + } + + /** + * Can delete only pending setup and failed setup orders + * @param int $id - order id + */ + public function delete($data) + { + $model = $this->_getOrder($data); + if (!in_array($model->status, array(\Model_ClientOrder::STATUS_PENDING_SETUP, \Model_ClientOrder::STATUS_FAILED_SETUP))) { + throw new \Box_Exception('Only pending and failed setup orders can be deleted.'); + } + + return $this->getService()->deleteFromOrder($model); + } + + protected function _getOrder($data) + { + $required = array( + 'id' => 'Order id required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $order = $this->getService()->findForClientById($this->getIdentity(), $data['id']); + if (!$order instanceof \Model_ClientOrder) { + throw new \Box_Exception('Order not found'); + } + + return $order; + } +} \ No newline at end of file diff --git a/src/bb-modules/Order/Controller/Admin.php b/src/bb-modules/Order/Controller/Admin.php new file mode 100644 index 000000000..870549ec6 --- /dev/null +++ b/src/bb-modules/Order/Controller/Admin.php @@ -0,0 +1,103 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 300, + 'location' => 'order', + 'label' => 'Orders', + 'uri' => $this->di['url']->adminLink('order'), + 'class' => 'orders', + ), + 'subpages' => array( + array( + 'location' => 'order', + 'index' => 100, + 'label' => 'Overview', + 'uri' => $this->di['url']->adminLink('order'), + 'class' => '', + ), + array( + 'location' => 'order', + 'index' => 200, + 'label' => 'Advanced search', + 'uri' => $this->di['url']->adminLink('order', array('show_filter' => 1)), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/order', 'get_index', array(), get_class($this)); + $app->get('/order/', 'get_index', array(), get_class($this)); + $app->get('/order/index', 'get_index', array(), get_class($this)); + $app->get('/order/manage/:id', 'get_order', array('id'=>'[0-9]+'), get_class($this)); + $app->post('/order/new', 'get_new', null, get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_order_index'); + } + + public function get_new(\Box_App $app) + { + $api = $app->getApiAdmin(); + $product = $api->product_get(array('id' => $this->di['request']->getPost('product_id'))); + $client = $api->client_get(array('id' => $this->di['request']->getPost('client_id'))); + return $app->render('mod_order_new', array('product' => $product, 'client' => $client)); + } + + public function get_order(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $data = array( + 'id' => $id, + ); + $order = $api->order_get($data); + $set = array('order'=>$order); + + if(isset($order['plugin']) && !empty($order['plugin'])) { + $set['plugin'] = 'plugin_'.$order['plugin'].'_manage.phtml'; + } + + return $app->render('mod_order_manage', $set); + } +} \ No newline at end of file diff --git a/src/bb-modules/Order/Controller/Client.php b/src/bb-modules/Order/Controller/Client.php new file mode 100644 index 000000000..b0f08b954 --- /dev/null +++ b/src/bb-modules/Order/Controller/Client.php @@ -0,0 +1,89 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + + $app->get('/order', 'get_products', array(), get_class($this)); + $app->get('/order/service', 'get_orders', array(), get_class($this)); + $app->get('/order/:id', 'get_configure_product', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/order/:slug', 'get_configure_product_by_slug', array('slug' => '[a-z0-9-]+'), get_class($this)); + $app->get('/order/service/manage/:id', 'get_order', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_products(\Box_App $app) + { + return $app->render('mod_order_index'); + } + + public function get_configure_product_by_slug(\Box_App $app, $slug) + { + $api = $app->getApiGuest(); + $product = $api->product_get(array('slug'=>$slug)); + $tpl = 'mod_service'.$product['type'].'_order'; + if($api->system_template_exists(array('file'=>$tpl.'.phtml'))) { + return $app->render($tpl, array('product'=>$product)); + } + return $app->render('mod_order_product', array('product'=>$product)); + } + + public function get_configure_product(\Box_App $app, $id) + { + $api = $app->getApiGuest(); + $product = $api->product_get(array('id'=>$id)); + $tpl = 'mod_service'.$product['type'].'_order'; + if($api->system_template_exists(array('file'=>$tpl.'.phtml'))) { + return $app->render($tpl, array('product'=>$product)); + } + return $app->render('mod_order_product', array('product'=>$product)); + } + + public function get_orders(\Box_App $app) + { + $api = $app->getApiClient(); + return $app->render('mod_order_list'); + } + + public function get_order(\Box_App $app, $id) + { + $api = $app->getApiClient(); + $data = array( + 'id' => $id, + ); + $order = $api->order_get($data); + return $app->render('mod_order_manage', array('order'=>$order)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Order/Service.php b/src/bb-modules/Order/Service.php new file mode 100644 index 000000000..7e728e39e --- /dev/null +++ b/src/bb-modules/Order/Service.php @@ -0,0 +1,1308 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function counter() + { + $sql = " + SELECT status, COUNT(id) as counter + FROM client_order + WHERE group_master = 1 + GROUP BY status + "; + + $data = $this->di['db']->getAssoc($sql); + + return array( + 'total' => array_sum($data), + \Model_ClientOrder::STATUS_PENDING_SETUP => isset($data[\Model_ClientOrder::STATUS_PENDING_SETUP]) ? $data[\Model_ClientOrder::STATUS_PENDING_SETUP] : 0, + \Model_ClientOrder::STATUS_FAILED_SETUP => isset($data[\Model_ClientOrder::STATUS_FAILED_SETUP]) ? $data[\Model_ClientOrder::STATUS_FAILED_SETUP] : 0, + \Model_ClientOrder::STATUS_ACTIVE => isset($data[\Model_ClientOrder::STATUS_ACTIVE]) ? $data[\Model_ClientOrder::STATUS_ACTIVE] : 0, + \Model_ClientOrder::STATUS_SUSPENDED => isset($data[\Model_ClientOrder::STATUS_SUSPENDED]) ? $data[\Model_ClientOrder::STATUS_SUSPENDED] : 0, + \Model_ClientOrder::STATUS_CANCELED => isset($data[\Model_ClientOrder::STATUS_CANCELED]) ? $data[\Model_ClientOrder::STATUS_CANCELED] : 0, + ); + } + + public static function onAfterAdminOrderActivate(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $service = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found');; + $identity = $di['loggedin_admin']; + $s = $service->getOrderServiceData($order, $identity); + $orderArr = $service->toApiArray($order, true, $identity); + + $email = $params; + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_activated', $orderArr['service_type']); + $email['service'] = $s; + $email['order'] = $orderArr; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOrderRenew(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $orderService = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found'); + $identity = $di['loggedin_admin']; + $service = $orderService->getOrderServiceData($order, $identity); + $orderArr = $orderService->toApiArray($order, true, $identity); + + $email = array(); + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_renewed', $orderArr['service_type']); + $email['service'] = $service; + $email['order'] = $orderArr; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOrderSuspend(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $service = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found'); + $identity = $di['loggedin_admin']; + $s = $service->getOrderServiceData($order, $identity); + $orderArr = $service->toApiArray($order, true, $identity); + + $email = array(); + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_suspended', $orderArr['service_type']); + $email['service'] = $s; + $email['order'] = $orderArr; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOrderUnsuspend(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $service = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found'); + $identity = $di['loggedin_admin']; + $s = $service->getOrderServiceData($order, $identity); + $orderArr = $service->toApiArray($order, true, $identity); + + $email = array(); + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_unsuspended', $orderArr['service_type']); + $email['service'] = $s; + $email['order'] = $orderArr; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOrderCancel(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $service = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found'); + $identity = $di['loggedin_admin']; + $orderArr = $service->toApiArray($order, true, $identity); + + $email = array(); + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_canceled', $orderArr['service_type']); + $email['order'] = $orderArr; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOrderUncancel(\Box_Event $event) + { + $params = $event->getParameters(); + $order_id = $params['id']; + $di = $event->getDi(); + $service = $di['mod_service']('order'); + + try { + $order = $di['db']->getExistingModelById('ClientOrder', $order_id, 'Order not found'); + $identity = $di['loggedin_admin']; + $s = $service->getOrderServiceData($order, $identity); + $orderArr = $service->toApiArray($order, true, $identity); + + $email = array(); + $email['to_client'] = $orderArr['client']['id']; + $email['code'] = sprintf('mod_service%s_renewed', $orderArr['service_type']); + $email['order'] = $orderArr; + $email['service'] = $s; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public function getOrderService(\Model_ClientOrder $order) + { + if (NULL !== $order->service_id) { + //@deprecated + //@todo remove this when doctrine is removed + $core_services = array( + \Model_ProductTable::CUSTOM, + \Model_ProductTable::LICENSE, + \Model_ProductTable::DOWNLOADABLE, + \Model_ProductTable::HOSTING, + \Model_ProductTable::MEMBERSHIP, + \Model_ProductTable::DOMAIN, + ); + if (in_array($order->service_type, $core_services)) { + $repo_class = $this->_getServiceClassName($order); + + return $this->di['db']->load($repo_class, $order->service_id); + } else { + $service = $this->di['db']->findOne('service_' . $order->service_type, + 'id = :id', + array(':id' => $order->service_id)); + + return $service; + } + } + + return NULL; + } + + protected function _getServiceClassName(\Model_ClientOrder $order) + { + $s = $this->di['tools']->to_camel_case($order->service_type, true); + + return 'Service' . ucfirst($s); + } + + public function getServiceOrder($service) + { + $type = $this->di['tools']->from_camel_case(str_replace('Model_Service', '', get_class($service))); + + $bindings = array( + 'service_type' => $type, + ':service_id' => $service->id + ); + + return $this->di['db']->findOne('ClientOrder', 'service_type = :service_type AND service_id = :service_id', $bindings); + } + + public function getConfig(\Model_ClientOrder $model) + { + return $this->di['tools']->decodeJ($model->config); + } + + public function productHasOrders(\Model_Product $product) + { + $order = $this->di['db']->findOne('ClientOrder', 'product_id = :product_id', array(':product_id' => $product->id)); + + return ($order instanceof \Model_ClientOrder); + } + + public function getLogger(\Model_ClientOrder $order) + { + $log = $this->di['logger']; + $log->addWriter(new \Box_LogDb('Model_ClientOrderStatus')); + $log->setEventItem('client_order_id', $order->id); + $log->setEventItem('status', $order->status); + + return $log; + } + + public function saveStatusChange(\Model_ClientOrder $order, $notes = NULL) + { + $os = $this->di['db']->dispense('ClientOrderStatus'); + $os->client_order_id = $order->id; + $os->status = $order->status; + $os->notes = $notes; + $os->created_at = date('c'); + $os->updated_at = date('c'); + $this->di['db']->store($os); + } + + public function getSoonExpiringActiveOrders() + { + list($query, $bindings) = $this->getSoonExpiringActiveOrdersQuery(); + $ordersArr = $this->di['db']->getAll($query, $bindings); + + return $this->di['db']->convertToModels('ClientOrder', $ordersArr); + } + + public function getSoonExpiringActiveOrdersQuery($data = array()) + { + $systemService = $this->di['mod_service']('system'); + $days_until_expiration = $systemService->getParamValue('invoice_issue_days_before_expire', 14); + + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + + $query = "SELECT * + FROM client_order + WHERE status = :status + AND invoice_option = :invoice_option + AND period IS NOT NULL + AND expires_at IS NOT NULL + AND unpaid_invoice_id IS NULL"; + + $where = array(); + $bindings = array(); + + if (NULL !== $client_id) { + $where[] = 'client_id = :client_id'; + $bindings[':client_id'] = $client_id; + } + + if (!empty($where)) { + $query = $query . ' AND '. implode(' AND ', $where); + } + + $query .= " HAVING DATEDIFF(expires_at, NOW()) <= :days_until_expiration ORDER BY client_id DESC"; + $bindings[':status'] = \Model_ClientOrder::STATUS_ACTIVE; + $bindings[':invoice_option'] = 'issue-invoice'; + $bindings[':days_until_expiration'] = $days_until_expiration; + + return array($query, $bindings); + } + + public function toApiArray(\Model_ClientOrder $model, $deep = true, $identity = null) + { + $clientService = $this->di['mod_service']('client'); + $supportService = $this->di['mod_service']('support'); + + $data = $this->di['db']->toArray($model); + $data['config'] = json_decode($model->config, 1); + $data['total'] = $this->getTotal($model); + $data['title'] = $model->title; + $data['meta'] = $this->di['db']->getAssoc('SELECT name, value FROM client_order_meta WHERE client_order_id = :id', array(':id' => $model->id)); + $data['active_tickets'] = $supportService->getActiveTicketsCountForOrder($model); + + if ($identity instanceof \Model_Admin) { + $data['config'] = $this->getConfig($model); + $productModel = $this->di['db']->load('Product', $model->product_id); + if ($productModel instanceof \Model_Product){ + $data['plugin'] = $productModel->plugin; + }else{ + $data['plugin'] = null; + } + $client = $this->di['db']->getExistingModelById('Client', $model->client_id, 'Client not found'); + $data['client'] = $clientService->toApiArray($client, false); + } + + return $data; + } + + public function getSearchQuery($data) + { + $query = "SELECT co.* from client_order co + LEFT JOIN client c ON c.id = co.client_id + LEFT JOIN client_order_meta meta ON meta.client_order_id = co.id"; + + $search = isset($data['search']) ? $data['search'] : FALSE; + $hide_addons = isset($data['hide_addons']); + $id = isset($data['id']) ? $data['id'] : NULL; + $product_id = isset($data['product_id']) ? $data['product_id'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $title = isset($data['title']) ? $data['title'] : NULL; + $period = isset($data['period']) ? $data['period'] : NULL; + $type = isset($data['type']) ? $data['type'] : NULL; + $created_at = isset($data['created_at']) ? $data['created_at'] : NULL; + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + $ids = (isset($data['ids']) && is_array($data['ids'])) ? $data['ids'] : null; + $meta = (isset($data['meta']) && is_array($data['meta'])) ? $data['meta'] : null; + + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $invoice_option = isset($data['invoice_option']) ? $data['invoice_option'] : NULL; + + $where = array(); + $bindings = array(); + + if ($client_id) { + $where[] = "co.client_id = :client_id"; + $bindings[':client_id'] = $client_id; + } + + if ($invoice_option) { + $where[] = "co.invoice_option = :invoice_option"; + $bindings[':invoice_option'] = $invoice_option; + } + + if ($id) { + $where[] = "co.id = :id"; + $bindings[':id'] = $id; + } + + if ($status) { + $where[] = "co.status = :status"; + $bindings[':status'] = $status; + } + + if ($product_id) { + $where[] = "co.product_id = :product_id"; + $bindings[':product_id'] = $product_id; + } + + if ($type) { + $where[] = "co.service_type = :service_type"; + $bindings[':service_type'] = $type; + } + + if ($title) { + $where[] = "co.title LIKE :title"; + $bindings[':title'] = '%' . $title . '%'; + } + + if ($period) { + $where[] = "co.period = :period"; + $bindings[':period'] = $period; + } + + if ($hide_addons) { + $where[] = "co.group_master = 1"; + } + + if ($created_at) { + $where[] = "DATE_FORMAT(co.created_at, '%Y-%m-%d') = :created_at"; + $bindings[':created_at'] = date('Y-m-d', strtotime($created_at)); + } + + if ($date_from) { + $where[] = "UNIX_TIMESTAMP(co.created_at) >= :date_from"; + $bindings[':date_from'] = strtotime($date_from); + } + + if ($date_to) { + $where[] = "UNIX_TIMESTAMP(co.created_at) <= :date_to"; + $bindings[':date_to'] = strtotime($date_to); + } + + //smartSearch + if ($search) { + if (is_numeric($search)) { + $where[] = "co.id = :search"; + $bindings[':search'] = $search; + } else { + $where[] = "(c.first_name LIKE :first_name OR c.last_name LIKE :last_name OR co.title LIKE :title)"; + $bindings[':first_name'] = "%$search%"; + $bindings[':last_name'] = "%$search%"; + $bindings[':title'] = "%$search%"; + } + } + + if ($ids) { + $where[] = "co.id IN (:ids)"; + $bindings[':ids'] = $ids; + } + if ($meta) { + $i = 1; + foreach ($meta as $k => $v) { + $where[] = "(meta.name = :meta_name$i AND meta.value LIKE :meta_value$i)"; + $bindings[':meta_name' . $i] = $k; + $bindings[':meta_value' . $i] = $v . '%'; + $i++; + } + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + $query .= " GROUP by co.id ORDER BY co.id DESC"; + + return array($query, $bindings); + } + + public function createOrder(\Model_Client $client, \Model_Product $product, array $data) + { + if (!$this->di['license']->isPro()) { + throw new \Box_Exception('This feature is available in BoxBilling PRO version.', null, 876); + } + + $currencyService = $this->di['mod_service']('currency'); + if (isset($data['currency']) && !empty($data['currency'])) { + $currency = $currencyService->getByCode($data['currency']); + } elseif ($client->currency) { + $currency = $currencyService->getByCode($client->currency); + } else { + $currency = $currencyService->getDefault(); + } + if (!$currency instanceof \Model_Currency) { + throw new \Box_Exception('Currency could not be determined for order'); + } + + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderCreate', 'params' => $data, 'subject' => $product->type)); + + $period = (isset($data['period']) && !empty($data['period'])) ? $data['period'] : NULL; + $qty = isset($data['quantity']) ? $data['quantity'] : 1; + $config = (isset($data['config']) && is_array($data['config'])) ? $data['config'] : array(); + $group_id = isset($data['group_id']) ? $data['group_id'] : NULL; + $activate = isset($data['activate']) ? (bool)$data['activate'] : FALSE; + $invoiceOption = isset($data['invoice_option']) ? $data['invoice_option'] : 'no-invoice'; + $skipValidation = isset($data['skip_validation']) ? (bool)$data['skip_validation'] : false; + + $cartService = $this->di['mod_service']('cart'); + // check stock + if (!$cartService->isStockAvailable($product, $qty)) { + throw new \Box_Exception("Product :id is out of stock.", array(':id' => $product->id), 831); + } + + // Addons must have defined master order + $parent_order = FALSE; + if ($product->is_addon && empty($group_id)) { + throw new \Box_Exception('Group ID parameter is missing for addon product order', null, 832); + } + + if (!empty($group_id)) { + $parent_order = $this->getMasterOrderForClient($client, $group_id); + if (!$parent_order instanceof \Model_ClientOrder) { + throw new \Box_Exception('Parent order :group_id was not found', array(':group_id' => $group_id)); + } + } + + //validate order config data + if ($period) { + $config['period'] = $period; + } + $se = $this->di['mod_service']('service' . $product->type); + //@deprecated logic + if (method_exists($se, 'prependOrderConfig')) { + $config = $se->prependOrderConfig($product, $config); + } + + //@migration script + $se = $this->di['mod_service']('service' . $product->type); + if (method_exists($se, 'attachOrderConfig')) { + $config = $se->attachOrderConfig($product, $config); + } + + if (method_exists($se, 'validateOrderData')) { + if (!$skipValidation) $se->validateOrderData($config); + } + + $order = $this->di['db']->dispense('ClientOrder'); + $order->client_id = $client->id; + $order->product_id = $product->id; + $order->group_id = ($parent_order) ? $parent_order->group_id : uniqid(); + $order->group_master = ($parent_order) ? 0 : 1; + $order->title = isset($data['title']) ? $data['title'] : $product->title; + $order->currency = $currency->code; + $order->quantity = $qty; + $order->service_type = $product->type; + $order->unit = $product->unit; + $order->status = \Model_ClientOrder::STATUS_PENDING_SETUP; + $order->config = json_encode($config); + $order->invoice_option = $invoiceOption; + + if ($period) { + $bp = $this->di['period']($data['period']); + $order->period = $bp->getCode(); + } + + if (isset($data['price'])) { + $order->price = $data['price']; + } else { + $repo = $product->getTable($product->type); + $rate = $currencyService->getRateByCode($currency->code); + $order->price = $repo->getProductPrice($product, $config) * $rate; + } + + if (isset($data['notes'])) { + $order->notes = $data['notes']; + } + + if (isset($data['created_at'])) { + $order->created_at = date('c', strtotime($data['created_at'])); + } else { + $order->created_at = date('c'); + } + + if (isset($data['updated_at'])) { + $order->updated_at = date('c', strtotime($data['updated_at'])); + } else { + $order->updated_at = date('c'); + } + + $id = $this->di['db']->store($order); + + if (isset($data['meta']) && is_array($data['meta'])) { + foreach ($data['meta'] as $k => $v) { + $mm = $this->di['db']->findOne('client_order_meta', 'client_order_id = :id AND name = :n', array(':id' => $order->id, ':n' => $k)); + if (!$mm) { + $mm = $this->di['db']->dispense('ClientOrderMeta'); + $mm->client_order_id = $id; + $mm->name = $k; + $mm->created_at = date('c'); + } + $mm->value = $v; + $mm->updated_at = date('c'); + $this->di['db']->store($mm); + } + } + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderCreate', 'params' => array('id' => $order->id), 'subject' => $product->type)); + + $this->di['logger']->info('Created order #%s', $id); + + // invoice options + if ($invoiceOption == 'issue-invoice' && $order->price > 0) { + $invoiceService = $this->di['mod_service']('invoice'); + $invoice = $invoiceService->generateForOrder($order); + + $invoiceService->approveInvoice($invoice, array('id' => $invoice->id, 'use_credits' => true)); + } + + // activate imediately if say so + if ($activate) { + try { + $this->activateOrder($order); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + + return $id; + } + + public function getMasterOrderForClient(\Model_Client $client, $group_id) + { + $bindings = array( + ':group_id' => $group_id, + ':client_id' => $client->id + ); + + return $this->di['db']->findOne('ClientOrder', 'group_id = :group_id AND group_master = 1 AND client_id = :client_id', $bindings); + } + + public function activateOrder(\Model_ClientOrder $order, $data = array()) + { + if ($order->status != \Model_ClientOrder::STATUS_PENDING_SETUP && $order->status != \Model_ClientOrder::STATUS_FAILED_SETUP) { + if (!isset($data['force']) || !$data['force']) { + throw new \Box_Exception('Only pending setup or failed orders can be activated'); + } + } + + $event_params = array('id' => $order->id); + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderActivate', 'params' => $event_params)); + $result = $this->createFromOrder($order); + if (is_array($result)) { + $event_params = array_merge($event_params, $result); + } + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderActivate', 'params' => $event_params)); + + // activate all addons on initial activation + // @see https://github.com/boxbilling/BoxBilling/issues/54 + if ($order->group_master) { + $list = $this->getOrderAddonsList($order); + foreach ($list as $addon) { + try { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderActivate', 'params' => array('id' => $addon->id))); + $this->createFromOrder($addon); + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderActivate', 'params' => array('id' => $addon->id))); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + } + + $this->di['logger']->info('Activated order #%s', $order->id); + + return TRUE; + } + + public function createFromOrder(\Model_ClientOrder $order) + { + $service = $this->getOrderService($order); + if (!is_object($service)) { + $mod = $this->di['mod']('service' . $order->service_type); + $s = $mod->getService(); + if (method_exists($s, 'create') || method_exists($s, 'action_create')) { + $service = $this->_callOnService($order, \Model_ClientOrder::ACTION_CREATE); + if (!is_object($service)) { + throw new \Box_Exception('Error creating ' . $order->service_type . ' service for order ' . $order->id); + } + + $order->service_id = $service->id; + $order->updated_at = date('c'); + $this->di['db']->store($order); + } + } + + try { + $result = $this->_callOnService($order, \Model_ClientOrder::ACTION_ACTIVATE); + } catch (\Exception $e) { + $order->status = \Model_ClientOrder::STATUS_FAILED_SETUP; + $this->di['db']->store($order); + + $this->saveStatusChange($order, $e->getMessage()); + + throw $e; + } + + // set automatic order expiration + if (!empty($order->period)) { + $from_time = (NULL === $order->expires_at) ? time() : strtotime($order->expires_at); + + $period = $this->di['period']($order->period); + $order->expires_at = date('c', $period->getExpirationTime($from_time)); + } + + $order->status = \Model_ClientOrder::STATUS_ACTIVE; + $order->activated_at = date('c'); + $order->suspended_at = NULL; + $order->canceled_at = NULL; + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $productModel = $this->di['db']->load('Product', $order->product_id); + if($productModel instanceof \Model_Product) { + $this->stockSale($productModel, $order->quantity); + } else { + error_log(sprintf('Order without product ID detected Order #%s', $order->id)); + } + + $this->saveStatusChange($order, 'Order activated'); + + return $result; + } + + public function getOrderAddonsList(\Model_ClientOrder $order) + { + return $this->di['db']->find('ClientOrder', 'group_id = :group_id AND client_id = :client_id and (group_master = 0 OR group_master IS NULL)', array(':group_id' => $order->group_id, ':client_id' => $order->client_id)); + } + + protected function _callOnService(\Model_ClientOrder $order, $action) + { + $repo = $this->di['mod_service']('service' . $order->service_type); + //@deprecated + //@todo remove this when doctrine is removed + $core_services = array( + \Model_ProductTable::CUSTOM, + \Model_ProductTable::LICENSE, + \Model_ProductTable::DOWNLOADABLE, + \Model_ProductTable::HOSTING, + \Model_ProductTable::MEMBERSHIP, + \Model_ProductTable::DOMAIN, + ); + + if (in_array($order->service_type, $core_services)) { + $m = 'action_' . $action; + if (!method_exists($repo, $m) || !is_callable(array($repo, $m))) { + throw new \Box_Exception('Service ' . $order->service_type . ' do not support ' . $m); + } + + return $repo->$m($order); + } else { + //@new logic for services + $o = $this->di['db']->findOne('client_order', + 'id = :id', + array(':id' => $order->id)); + $service = NULL; + $sdbname = 'service_' . $order->service_type; + if ($order->service_id) { + $service = $this->di['db']->load($sdbname, $order->service_id); + } + if (method_exists($repo, $action) && is_callable(array($repo, $action))) { + return $repo->$action($o, $service); + } + } + error_log(sprintf('Service %s does not support action %s', $order->service_type, $action)); + + return null; + } + + public function stockSale(\Model_Product $product, $qty) + { + if ($product->stock_control) { + $product->quantity_in_stock = $product->quantity_in_stock - $qty; + $product->updated_at = date('c'); + $this->di['db']->store($product); + } + + return TRUE; + } + + public function updateOrder(\Model_ClientOrder $order, array $data) + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderUpdate', 'params' => $data)); + + if (isset($data['period']) && !empty($data['period'])) { + $period = $this->di['period']($data['period']); + $order->period = $period->getCode(); + } else if (isset($data['period']) && empty ($data['period'])) { + $order->period = NULL; + } + + if (isset($data['created_at']) && !empty($data['created_at'])) { + $order->created_at = date('c', strtotime($data['created_at'])); + } + + if (isset($data['activated_at']) && !empty($data['activated_at'])) { + $order->activated_at = date('c', strtotime($data['activated_at'])); + } + + if (isset($data['expires_at']) && !empty($data['expires_at'])) { + $order->expires_at = date('c', strtotime($data['expires_at'])); + } else if (isset($data['expires_at']) && empty ($data['expires_at'])) { + $order->expires_at = NULL; + } + + if (isset($data['invoice_option'])) { + $order->invoice_option = $data['invoice_option']; + } + + if (isset($data['title'])) { + $order->title = $data['title']; + } + + if (isset($data['price'])) { + $order->price = $data['price']; + } + + if (isset($data['status']) && !empty($data['status'])) { + $order->status = $data['status']; + } + + if (isset($data['notes'])) { + $order->notes = $data['notes']; + } + + if (isset($data['reason'])) { + $order->reason = $data['reason']; + } + + if (isset($data['meta']) && is_array($data['meta'])) { + if (empty($data['meta'])) { + $this->di['db']->exec('DELETE FROM client_order_meta WHERE client_order_id = :id;', array(':id' => $order->id)); + } else { + foreach ($data['meta'] as $k => $v) { + $mm = $this->di['db']->findOne('ClientOrderMeta', 'client_order_id = :id AND name = :n', array(':id' => $order->id, ':n' => $k)); + if (!$mm) { + $mm = $this->di['db']->dispense('ClientOrderMeta'); + $mm->client_order_id = $order->id; + $mm->name = $k; + $mm->created_at = date('c'); + } + $mm->value = $v; + $mm->updated_at = date('c'); + $this->di['db']->store($mm); + } + } + } + + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderUpdate', 'params' => array('id' => $order->id))); + + $this->di['logger']->info('Update order #%s', $order->id); + + return TRUE; + } + + public function renewOrder(\Model_ClientOrder $order) + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderRenew', 'params' => array('id' => $order->id))); + + $this->renewFromOrder($order); + + // activate all addons on initial activation + // @see https://github.com/boxbilling/BoxBilling/issues/54 + if ($order->group_master && $order->status == \Model_ClientOrder::STATUS_PENDING_SETUP) { + $list = $this->getOrderAddonsList($order); + foreach ($list as $addon) { + try { + $this->renewFromOrder($addon); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + } + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderRenew', 'params' => array('id' => $order->id))); + $this->di['logger']->info('Renewed order #%s', $order->id); + + return TRUE; + } + + public function renewFromOrder(\Model_ClientOrder $order) + { + $this->_callOnService($order, \Model_ClientOrder::ACTION_RENEW); + + // set automatic order expiration + if (!empty($order->period)) { + $from_time = (NULL === $order->expires_at) ? time() : strtotime($order->expires_at); // from expiration date + + //@deprecated setting, moved to config + $systemService = $this->di['mod_service']('system'); + $logic = $systemService->getParamValue('order_renewal_logic'); + + $mod = $this->di['mod']('order'); + $config = $mod->getConfig(); + $logic = isset($config['order_renewal_logic']) ? $config['order_renewal_logic'] : $logic; + + if ($logic == 'from_today') { + $from_time = time(); //renew order from the date renewal occured + } elseif ($logic == 'from_greater') { + if (strtotime($order->expires_at) > time()) { + $from_time = strtotime($order->expires_at); + } else { + $from_time = time(); + } + } + $period = $this->di['period']($order->period); + $order->expires_at = date('c', $period->getExpirationTime($from_time)); + } + + $order->status = \Model_ClientOrder::STATUS_ACTIVE; + $order->suspended_at = NULL; + $order->unsuspended_at = NULL; + $order->canceled_at = NULL; + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $this->saveStatusChange($order, 'Order renewed'); + } + + public function suspendFromOrder(\Model_ClientOrder $order, $reason = null, $skipEvent = false) + { + if (!$skipEvent) $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderSuspend', 'params' => array('id' => $order->id))); + + if ($order->status != \Model_ClientOrder::STATUS_ACTIVE) { + throw new \Box_Exception('Only active orders can be suspended'); + } + + $this->_callOnService($order, \Model_ClientOrder::ACTION_SUSPEND); + + $order->status = \Model_ClientOrder::STATUS_SUSPENDED; + $order->reason = $reason; + $order->suspended_at = date('c'); + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $note = (NULL === $reason) ? "Order suspeded" : 'Order suspended for ' . $reason; + $this->saveStatusChange($order, $note); + + if (!$skipEvent) $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderSuspend', 'params' => array('id' => $order->id))); + + $this->di['logger']->info('Suspended order #%s', $order->id); + + return TRUE; + } + + public function unsuspendFromOrder(\Model_ClientOrder $order) + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderUnsuspend', 'params' => array('id' => $order->id))); + + $this->_callOnService($order, \Model_ClientOrder::ACTION_UNSUSPEND); + + $order->status = \Model_ClientOrder::STATUS_ACTIVE; + $order->reason = NULL; + $order->suspended_at = NULL; + $order->unsuspended_at = date('c'); + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $this->saveStatusChange($order, 'Order unsuspended'); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderUnsuspend', 'params' => array('id' => $order->id))); + + $this->di['logger']->info('Unsuspended order #%s', $order->id); + + return TRUE; + } + + public function cancelFromOrder(\Model_ClientOrder $order, $reason = null, $skipEvent = false) + { + if (!$skipEvent) $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderCancel', 'params' => array('id' => $order->id))); + + if (in_array($order->status, array(\Model_ClientOrder::STATUS_CANCELED, \Model_ClientOrder::STATUS_PENDING_SETUP, \Model_ClientOrder::STATUS_FAILED_SETUP))) { + throw new \Box_Exception('Can not cancel ' . $order->status . ' order'); + } + + $this->_callOnService($order, \Model_ClientOrder::ACTION_CANCEL); + + $order->status = \Model_ClientOrder::STATUS_CANCELED; + $order->reason = $reason; + $order->canceled_at = date('c'); + $order->expires_at = NULL; + $order->suspended_at = NULL; + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $note = (NULL === $reason) ? "Order canceled" : 'Canceled order for ' . $reason; + $this->saveStatusChange($order, $note); + + if (!$skipEvent) $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderCancel', 'params' => array('id' => $order->id))); + + $this->di['logger']->info('Canceled order #%s', $order->id); + + return TRUE; + } + + public function uncancelFromOrder(\Model_ClientOrder $order) + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderUncancel', 'params' => array('id' => $order->id))); + + $this->_callOnService($order, \Model_ClientOrder::ACTION_UNCANCEL); + + $expires_at = NULL; + if ($order->period) { + $period = $this->di['period']($order->period); + $expires_at = $period->getExpirationTime(time()); + $expires_at = date('c', $expires_at); + } + + $order->status = \Model_ClientOrder::STATUS_ACTIVE; + $order->reason = NULL; + $order->activated_at = date('c'); + $order->expires_at = $expires_at; + $order->suspended_at = NULL; + $order->canceled_at = NULL; + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $this->saveStatusChange($order, 'Activated canceled order'); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderUncancel', 'params' => array('id' => $order->id))); + + $this->di['logger']->info('Uncanceled order #%s', $order->id); + + return TRUE; + } + + public function rmInvoiceItemByOrder(\Model_ClientOrder $order) + { + $bindings = array( + ':type' => 'order', + ':rel_id' => $order->id, + ':status' => \Model_InvoiceItem::STATUS_PENDING_PAYMENT + ); + + $item = $this->di['db']->findOne('InvoiceItem', 'type = :type AND rel_id = :rel_id AND status = :status', $bindings); + + if ($item instanceof \Model_InvoiceItem) { + $this->di['db']->trash($item); + } + } + + + public function rmClientOrderStatusByOrder(\Model_ClientOrder $order) + { + $this->di['db']->exec('Delete FROM client_order_status WHERE client_order_id = :client_order_id', array(':client_order_id' => $order->id)); + } + + public function rmOrder(\Model_ClientOrder $model) + { + if ($model->group_master) { + // set addons as separate orders + $list = $this->getOrderAddonsList($model); + foreach ($list as $addon) { + $addon->group_master = 1; + $addon->group_id = 0; + $this->di['db']->store($addon); + } + } + $this->di['db']->trash($model); + } + + public function deleteFromOrder(\Model_ClientOrder $order) + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOrderDelete', 'params' => array('id' => $order->id))); + + if ($order->status == \Model_ClientOrder::STATUS_PENDING_SETUP) { + $this->rmInvoiceItemByOrder($order); + } + + $this->_callOnService($order, \Model_ClientOrder::ACTION_DELETE); + $id = $order->id; + $this->rmClientOrderStatusByOrder($order); + $this->rmOrder($order); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOrderDelete', 'params' => array('id' => $id))); + $this->di['logger']->info('Deleted order #%s', $id); + + return TRUE; + } + + public function getExpiredOrders() + { + $bindings = array( + ':status' => \Model_ClientOrder::STATUS_ACTIVE, + ); + + return $this->di['db']->find('ClientOrder', 'status = :status AND expires_at IS NOT NULL AND DATEDIFF(NOW(), expires_at) >= 1 ORDER BY id', $bindings); + } + + public function batchSuspendExpired() + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminBatchSuspendOrders')); + + $mod = $this->di['mod']('order'); + $c = $mod->getConfig(); + + $reason = isset($c['batch_suspend_reason']) ? $c['batch_suspend_reason'] : null; + + $list = $this->getExpiredOrders(); + + foreach ($list as $order) { + try { + $this->suspendFromOrder($order, $reason); + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminBatchSuspendOrders')); + + $this->di['logger']->info('Executed action to suspend expired orders'); + + return TRUE; + } + + public function batchCancelSuspended() + { + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminBatchCancelSuspendedOrders')); + + $mod = $this->di['mod']('order'); + $config = $mod->getConfig(); + if (!isset($config['batch_cancel_suspended']) || !$config['batch_cancel_suspended']) { + return false; + } + + $reason = isset($config['batch_cancel_suspended_reason']) ? $config['batch_cancel_suspended_reason'] : null; + $days = isset($config['batch_cancel_suspended_after_days']) ? (int)$config['batch_cancel_suspended_after_days'] : 7; + + if ($days < 0) { + $days = 7; + } + + $sql = " + SELECT id, suspended_at, DATEDIFF(NOW(), suspended_at) as days_passed_since_suspension + FROM client_order + WHERE status = 'suspended' + AND DATEDIFF(NOW(), suspended_at) > :days + ORDER BY id DESC + "; + + $orders = $this->di['db']->getAll($sql, array(':days' => $days)); + + foreach ($orders as $orderArr) { + try { + $order = $this->di['db']->getExistingModelById('ClientOrder', $orderArr['id'], 'Order not found'); + $this->cancelFromOrder($order, $reason); + } catch (\Exception $e) { + error_log($e); + } + } + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminBatchCancelSuspendedOrders')); + + $this->di['logger']->info('Executed action to cancel suspended orders'); + + return TRUE; + } + + public function updateOrderConfig(\Model_ClientOrder $order, array $config) + { + $order->config = json_encode($config); + $order->updated_at = date('c'); + $this->di['db']->store($order); + + $this->di['logger']->info('Updated order #%s config', $order->id); + + return TRUE; + } + + public function getOrderStatusSearchQuery($data) + { + $query = "SELECT * FROM client_order_status"; + + $oid = isset($data['client_order_id']) ? $data['client_order_id'] : NULL; + + $where = array(); + $bindings = array(); + + if (NULL !== $oid) { + $where[] = "client_order_id = :client_order_id"; + + $bindings[':client_order_id'] = $oid; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " ORDER BY id DESC"; + + return array($query, $bindings); + } + + public function orderStatusAdd(\Model_ClientOrder $order, $status, $notes = null) + { + $bean = $this->di['db']->dispense('ClientOrderStatus'); + $bean->client_order_id = $order->id; + $bean->status = $status; + $bean->notes = $notes; + $bean->created_at = date('c'); + $bean->updated_at = date('c'); + $id = $this->di['db']->store($bean); + + $this->di['logger']->info('Added order status history message to order #%s', $id); + + return true; + } + + public function orderStatusRm($id) + { + $orderStatus = $this->di['db']->getExistingModelById('ClientOrderStatus', $id, 'Order history line not found'); + + $this->di['db']->trash($orderStatus); + + $this->di['logger']->info('Order history line removed'); + + return true; + } + + public function findForClientById(\Model_Client $client, $id) + { + $bindings = array( + ':id' => $id, + ':client_id' => $client->id + ); + return $this->di['db']->findOne('ClientOrder', 'id = :id AND client_id = :client_id', $bindings); + } + + public function getOrderServiceData(\Model_ClientOrder $order, $identity) + { + $orderId = $order->id; + $service = $this->getOrderService($order); + if (!is_object($service)) { + error_log(sprintf('Order #%s has no active service', $orderId)); + + return null; + } + $srepo = $this->di['mod_service']('service' . $order->service_type); + if (!method_exists($srepo, 'toApiArray')) { + error_log(sprintf('service #%s method toApiArray is missing', $order->service_type)); + + return null; + } + + return $srepo->toApiArray($service, true, $identity); + } + + + public function getTotal(\Model_ClientOrder $model) + { + return ($model->price * $model->quantity); + } + + public function setUnpaidInvoice(\Model_ClientOrder $order, \Model_Invoice $proforma) + { + $order->unpaid_invoice_id = $proforma->id; + $order->updated_at = date('c'); + $this->di['db']->store($order); + } + + public function unsetUnpaidInvoice(\Model_ClientOrder $order) + { + $order->unpaid_invoice_id = NULL; + $order->updated_at = date('c'); + $this->di['db']->store($order); + } + + public function getRelatedOrderIdByType(\Model_ClientOrder $order, $type) + { + $bindings = array( + ':group_id' => $order->group_id, + ':service_type' => $type + ); + + $o = $this->di['db']->findOne('ClientOrder', 'group_id = :group_id AND service_type = :service_type', $bindings); + + if ($o instanceof \Model_ClientOrder) { + return $o->id; + } + + return NULL; + } + + public function rmByClient(\Model_Client $client) + { + $sql = 'DELETE FROM client_order WHERE client_id = :id'; + + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($sql); + $stmt->execute(array('id'=>$client->id)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Order/html_admin/mod_order_settings.phtml b/src/bb-modules/Order/html_admin/mod_order_settings.phtml new file mode 100644 index 000000000..f53eabd4d --- /dev/null +++ b/src/bb-modules/Order/html_admin/mod_order_settings.phtml @@ -0,0 +1,77 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Orders settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          +
          +
          {% trans 'Orders settings' %}
          +
          + + {% set params = admin.extension_config_get({"ext":"mod_order"}) %} +
          +
          +
          + +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          +
            +
          • + +
          • +
          • +
          • days after order suspension with reason
          • +
          • +
          +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Order/html_client/mod_order_index.phtml b/src/bb-modules/Order/html_client/mod_order_index.phtml new file mode 100644 index 000000000..21f5dd94c --- /dev/null +++ b/src/bb-modules/Order/html_client/mod_order_index.phtml @@ -0,0 +1,43 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Order' %}{% endblock %} + +{% set loader_nr = request.loader | default("8")%} +{% set loader_url = ('img/assets/loaders/loader'~loader_nr~'.gif') %} + +{% block content_before %} +{% endblock %} + +{% block content %} + +
          +
          +
          +
          +

          {% trans 'Select Product' %}

          +

          {% trans 'Choose products we offer for selling' %}

          +
          +
          + +
          + + + +{% endif %} +{% endif %} \ No newline at end of file diff --git a/src/bb-modules/Spamchecker/icon.png b/src/bb-modules/Spamchecker/icon.png new file mode 100644 index 000000000..119b123ec Binary files /dev/null and b/src/bb-modules/Spamchecker/icon.png differ diff --git a/src/bb-modules/Spamchecker/manifest.json b/src/bb-modules/Spamchecker/manifest.json new file mode 100644 index 000000000..9c8311470 --- /dev/null +++ b/src/bb-modules/Spamchecker/manifest.json @@ -0,0 +1,13 @@ +{ + "id": "spamchecker", + "type": "mod", + "name": "Spam Cheker", + "description": "Uses stopforumspam.com database and captcha verification to stop spam", + "icon_url": "icon.png", + "project_url": "http://www.boxbilling.com/", + "homepage_url": "http://www.boxbilling.com/", + "author": "BoxBilling", + "author_url": "http://www.boxbilling.cz/", + "license": "Free for commercial and non-commercial use (Apache License or GPL 2)", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Spamchecker/recaptchalib.php b/src/bb-modules/Spamchecker/recaptchalib.php new file mode 100644 index 000000000..941d7424c --- /dev/null +++ b/src/bb-modules/Spamchecker/recaptchalib.php @@ -0,0 +1,277 @@ + $value ) + $req .= $key . '=' . urlencode( stripslashes($value) ) . '&'; + + // Cut the last '&' + $req=substr($req,0,strlen($req)-1); + return $req; +} + + + +/** + * Submits an HTTP POST to a reCAPTCHA server + * @param string $host + * @param string $path + * @param array $data + * @param int port + * @return array response + */ +function _recaptcha_http_post($host, $path, $data, $port = 80) { + + $req = _recaptcha_qsencode ($data); + + $http_request = "POST $path HTTP/1.0\r\n"; + $http_request .= "Host: $host\r\n"; + $http_request .= "Content-Type: application/x-www-form-urlencoded;\r\n"; + $http_request .= "Content-Length: " . strlen($req) . "\r\n"; + $http_request .= "User-Agent: reCAPTCHA/PHP\r\n"; + $http_request .= "\r\n"; + $http_request .= $req; + + $response = ''; + if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) { + throw new Exception('Could not open socket'); + } + + fwrite($fs, $http_request); + + while ( !feof($fs) ) + $response .= fgets($fs, 1160); // One TCP-IP packet + fclose($fs); + $response = explode("\r\n\r\n", $response, 2); + + return $response; +} + + + +/** + * Gets the challenge HTML (javascript and non-javascript version). + * This is called from the browser, and the resulting reCAPTCHA HTML widget + * is embedded within the HTML form it was called from. + * @param string $pubkey A public key for reCAPTCHA + * @param string $error The error given by reCAPTCHA (optional, default is null) + * @param boolean $use_ssl Should the request be made over ssl? (optional, default is false) + + * @return string - The HTML to be embedded in the user's form. + */ +function recaptcha_get_html ($pubkey, $error = null, $use_ssl = false) +{ + if ($pubkey == null || $pubkey == '') { + die ("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); + } + + if ($use_ssl) { + $server = RECAPTCHA_API_SECURE_SERVER; + } else { + $server = RECAPTCHA_API_SERVER; + } + + $errorpart = ""; + if ($error) { + $errorpart = "&error=" . $error; + } + return ' + + '; +} + + + + +/** + * A ReCaptchaResponse is returned from recaptcha_check_answer() + */ +class ReCaptchaResponse { + var $is_valid; + var $error; +} + + +/** + * Calls an HTTP POST function to verify if the user's guess was correct + * @param string $privkey + * @param string $remoteip + * @param string $challenge + * @param string $response + * @param array $extra_params an array of extra variables to post to the server + * @return ReCaptchaResponse + */ +function recaptcha_check_answer ($privkey, $remoteip, $challenge, $response, $extra_params = array()) +{ + if ($privkey == null || $privkey == '') { + throw new Exception("To use reCAPTCHA you must get an API key from https://www.google.com/recaptcha/admin/create"); + } + + if ($remoteip == null || $remoteip == '') { + throw new Exception("For security reasons, you must pass the remote ip to reCAPTCHA"); + } + + + + //discard spam submissions + if ($challenge == null || strlen($challenge) == 0 || $response == null || strlen($response) == 0) { + $recaptcha_response = new ReCaptchaResponse(); + $recaptcha_response->is_valid = false; + $recaptcha_response->error = 'Incorrect captcha'; + return $recaptcha_response; + } + + $response = _recaptcha_http_post (RECAPTCHA_VERIFY_SERVER, "/recaptcha/api/verify", + array ( + 'privatekey' => $privkey, + 'remoteip' => $remoteip, + 'challenge' => $challenge, + 'response' => $response + ) + $extra_params + ); + + $answers = explode ("\n", $response [1]); + $recaptcha_response = new ReCaptchaResponse(); + + if (trim ($answers [0]) == 'true') { + $recaptcha_response->is_valid = true; + } + else { + $recaptcha_response->is_valid = false; + $recaptcha_response->error = $answers [1]; + } + return $recaptcha_response; + +} + +/** + * gets a URL where the user can sign up for reCAPTCHA. If your application + * has a configuration page where you enter a key, you should provide a link + * using this function. + * @param string $domain The domain where the page is hosted + * @param string $appname The name of your application + */ +function recaptcha_get_signup_url ($domain = null, $appname = null) { + return "https://www.google.com/recaptcha/admin/create?" . _recaptcha_qsencode (array ('domains' => $domain, 'app' => $appname)); +} + +function _recaptcha_aes_pad($val) { + $block_size = 16; + $numpad = $block_size - (strlen ($val) % $block_size); + return str_pad($val, strlen ($val) + $numpad, chr($numpad)); +} + +/* Mailhide related code */ + +function _recaptcha_aes_encrypt($val,$ky) { + if (! function_exists ("mcrypt_encrypt")) { + throw new Exception("To use reCAPTCHA Mailhide, you need to have the mcrypt php module installed."); + } + $mode=MCRYPT_MODE_CBC; + $enc=MCRYPT_RIJNDAEL_128; + $val=_recaptcha_aes_pad($val); + return mcrypt_encrypt($enc, $ky, $val, $mode, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"); +} + + +function _recaptcha_mailhide_urlbase64 ($x) { + return strtr(base64_encode ($x), '+/', '-_'); +} + +/* gets the reCAPTCHA Mailhide url for a given email, public key and private key */ +function recaptcha_mailhide_url($pubkey, $privkey, $email) { + if ($pubkey == '' || $pubkey == null || $privkey == "" || $privkey == null) { + die ("To use reCAPTCHA Mailhide, you have to sign up for a public and private key, " . + "you can do so at http://www.google.com/recaptcha/mailhide/apikey"); + } + + + $ky = pack('H*', $privkey); + $cryptmail = _recaptcha_aes_encrypt ($email, $ky); + + return "http://www.google.com/recaptcha/mailhide/d?k=" . $pubkey . "&c=" . _recaptcha_mailhide_urlbase64 ($cryptmail); +} + +/** + * gets the parts of the email to expose to the user. + * eg, given johndoe@example,com return ["john", "example.com"]. + * the email is then displayed as john...@example.com + */ +function _recaptcha_mailhide_email_parts ($email) { + $arr = preg_split("/@/", $email ); + + if (strlen ($arr[0]) <= 4) { + $arr[0] = substr ($arr[0], 0, 1); + } else if (strlen ($arr[0]) <= 6) { + $arr[0] = substr ($arr[0], 0, 3); + } else { + $arr[0] = substr ($arr[0], 0, 4); + } + return $arr; +} + +/** + * Gets html to display an email address given a public an private key. + * to get a key, go to: + * + * http://www.google.com/recaptcha/mailhide/apikey + */ +function recaptcha_mailhide_html($pubkey, $privkey, $email) { + $emailparts = _recaptcha_mailhide_email_parts ($email); + $url = recaptcha_mailhide_url ($pubkey, $privkey, $email); + + return htmlentities($emailparts[0]) . "...@" . htmlentities ($emailparts [1]); + +} + + +?> diff --git a/src/bb-modules/Staff/Api/Admin.php b/src/bb-modules/Staff/Api/Admin.php new file mode 100644 index 000000000..32d924e2a --- /dev/null +++ b/src/bb-modules/Staff/Api/Admin.php @@ -0,0 +1,516 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach($pager['list'] as $key => $item){ + $staff = $this->di['db']->getExistingModelById('Admin', $item['id'], 'Admin is not found'); + $pager['list'][$key] = $this->getService()->toModel_AdminApiiArray($staff); + } + + return $pager; + + } + + /** + * Get staff member by id + * + * @param int $id - staff member ID + * @return array + * @throws Exception + */ + public function get($data) + { + $required = array( + 'id' => 'ID is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + return $this->getService()->toModel_AdminApiiArray($model); + } + + /** + * Update staff member + * + * @param int $id - staff member ID + * + * @optional string $email - new email + * @optional string $name - new name + * @optional string $status - new status + * @optional string $signature - new signature + * @optional int $admin_group_id - new group id + * + * @return boolean + * @throws Exception + */ + public function update($data) + { + $required = array( + 'id' => 'ID is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + + return $this->getService()->update($model, $data); + } + + /** + * Completely delete staff member. Removes all related acitivity from logs + * + * @param int $id - staff member ID + * @return boolean + * @throws Exception + */ + public function delete($data) + { + $required = array( + 'id' => 'ID is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + + return $this->getService()->delete($model); + } + + /** + * Change staff member password + * + * @param int $id - staff member ID + * @param string $password - new staff member password + * @param string $password_confirm - repeat new staff member password + * @return boolean + * @throws Exception + */ + public function change_password($data) + { + $required = array( + 'id' => 'ID is missing', + 'password' => 'Password required', + 'password_confirm' => 'Password confirmation required', + ); + $validator = $this->di['validator']; + $validator->checkRequiredParamsForArray($required, $data); + + if($data['password'] != $data['password_confirm']) { + throw new \Box_Exception('Passwords do not match'); + } + + + $validator->isPasswordStrong($data['password']); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + return $this->getService()->changePassword($model, $data['password']); + } + + /** + * Create new staff member + * + * @param string $email - email of new staff member + * @param string $password - password of new staff member + * @param string $name - name of new staff member + * @param string $admin_group_id - admin group id of new staff member + * + * @optional string $signature - signature of new staff member + * + * @return int - ID of newly created staff member + * @throws Exception + */ + public function create($data) + { + $required = array( + 'email' => 'Email param is missing', + 'password' => 'Password param is missing', + 'name' => 'Name param is missing', + 'admin_group_id' => 'Group id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + + return $this->getService()->create($data); + } + + /** + * Return staff member permissions + * + * @param int $id - staff member id + * + * @return array + */ + public function permissions_get($data) + { + $required = array( + 'id' => 'ID is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + + return $this->getService()->getPermissions($model->id); + } + + /** + * Update staff member permissions + * + * @param int $id - staff member id + * @param array $permissions - staff member permissions + * + * @return bool + */ + public function permissions_update($data) + { + $required = array( + 'id' => 'ID is missing', + 'permissions' => 'Permissions parameter missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('Admin', $data['id'], 'Staff member not found'); + + $this->getService()->setPermissions($model->id, $data['permissions']); + + $this->di['logger']->info('Changed staff member %s permisions', $model->id); + return true; + } + + /** + * Return pairs of staff member groups + * + * @return type + */ + public function group_get_pairs($data) + { + return $this->getService()->getAdminGroupPair(); + } + + /** + * Return paginate list of staff members groups + * @return array + */ + public function group_get_list($data) + { + list($sql, $params) = $this->getService()->getAdminGroupSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $model = $this->di['db']->getExistingModelById('AdminGroup', $item['id'], 'Post not found'); + $pager['list'][$key] = $this->getService()->toAdminGroupApiArray($model, false, $this->getIdentity()); + } + + return $pager; + } + + /** + * Create new staff members group + * + * @param string $name - name of staff members group + * + * @return int - new staff group ID + * @throws Exception + */ + public function group_create($data) + { + $required = array( + 'name' => 'Staff group is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + return $this->getService()->createGroup($data['name']); + } + + /** + * Return staff group details + * + * @param int $id - group id + * @return array - group details + * @throws Exception + */ + public function group_get($data) + { + + $required = array( + 'id' => 'Group id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('AdminGroup', $data['id'], 'Group not found'); + + return $this->getService()->toAdminGroupApiArray($model, true, $this->getIdentity()); + } + + /** + * Remove staff group + * + * @param int $id - group id + * @return boolean + * @throws Exception + */ + public function group_delete($data) + { + $required = array( + 'id' => 'Group id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('AdminGroup', $data['id'], 'Group not found'); + return $this->getService()->deleteGroup($model); + } + + /** + * Update staff group + * + * @param int $id - group id + * + * @optional int $name - new group name + * + * @return boolean + * @throws Exception + */ + public function group_update($data) + { + $required = array( + 'id' => 'Group id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('AdminGroup', $data['id'], 'Group not found'); + + return $this->getService()->updateGroup($model, $data); + } + + /** + * Get paginated list of staff logins history + * + * @return array + */ + public function login_history_get_list($data) + { + list($sql, $params) = $this->getService()->getActivityAdminHistorySearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $params, $per_page); + foreach ($pager['list'] as $key => $item) { + $activity = $this->di['db']->getExistingModelById('ActivityAdminHistory', $item['id'], sprintf('Staff activity item #%s not found', $item['id'])); + if ($activity) { + $pager['list'][$key] = $this->getService()->toActivityAdminHistoryApiArray($activity); + } + } + + return $pager; + } + + /** + * Get details of login history event + * + * @param int $id - event id + * @return array + * @throws ErrorException + */ + public function login_history_get($data) + { + $required = array( + 'id' => 'Id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('ActivityAdminHistory', $data['id'], 'Event not found'); + + return $this->getService()->toActivityAdminHistoryApiArray($model); + } + + /** + * Delete login history event + * + * @param int $id - event id + * @return boolean + * @throws ErrorException + */ + public function login_history_delete($data) + { + $required = array( + 'id' => 'Id not passed', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + $model = $this->di['db']->getExistingModelById('ActivityAdminHistory', $data['id'], 'Event not found'); + + return $this->getService()->deleteLoginHistory($model); + } + + /** + * Returns currently loggen in staff member information + * + * @return array + * @deprecated moved to profile module + * @codeCoverageIgnore + * @example + * + * Array + * ( + * [id] => 1 + * [role] => staff + * [admin_group_id] => 1 + * [email] => demo@boxbilling.com + * [pass] => 89e495e7941cf9e40e6980d14a16bf023ccd4c91 + * [name] => Demo Administrator + * [signature] => Sincerely Yours, Demo Administrator + * [status] => active + * [api_token] => 29baba87f1c120f1b7fc6b0139167003 + * [created_at] => 1310024416 + * [updated_at] => 1310024416 + * ) + * + */ + public function profile_get() + { + return $this->di['db']->toArray($this->getIdentity()); + } + + /** + * Clear session data and logout from system + * @deprecated moved to profile module + * @codeCoverageIgnore + * @return boolean + */ + public function profile_logout() + { + if($_COOKIE) { // testing env fix + $this->di['cookie']->set('BOXADMR', "", time() - 3600, '/'); + } + $this->di['session']->delete('admin'); + $this->di['logger']->info('Logged out'); + return true; + } + + /** + * Update currently logged in staff member details + * + * @optional string $email - new email + * @optional string $name - new name + * @optional string $signature - new signature + * @deprecated moved to profile module + * @return boolean + * @throws Exception + * @codeCoverageIgnore + */ + public function profile_update($data) + { + $event_params = $data; + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffProfileUpdate', 'params'=>$event_params)); + + $admin = $this->getIdentity(); + + if(isset($data['email'])) { + $admin->email = $data['email']; + } + + if(isset($data['name'])) { + $admin->name = $data['name']; + } + + if(isset($data['signature'])) { + $admin->signature = $data['signature']; + } + + $admin->updated_at = date('c'); + $this->di['db']->store($admin); + + $event_params = array(); + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffProfileUpdate', 'params'=>$event_params)); + + $this->di['logger']->info('Updated profile'); + return true; + } + + /** + * Generates new API token for currently logged in staff member + * @deprecated moved to profile module + * @return boolean + * @codeCoverageIgnore + */ + public function profile_generate_api_key($data) + { + $admin = $this->getIdentity(); + + $event_params = array(); + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffApiKeyChange', 'params'=>$event_params)); + + $admin->api_token = $this->di['tools']->generatePassword(32); + $admin->updated_at = date('c'); + $this->di['db']->store($admin); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffApiKeyChange', 'params'=>$event_params)); + + $this->di['logger']->info('Generated new API key'); + return true; + } + + /** + * Change password for currently logged in staff member + * + * @param string $password - new password + * @param string $password_confirm - repeat new password + * @return boolean + * @deprecated moved to profile module + * @throws Exception + * @codeCoverageIgnore + */ + public function profile_change_password($data) + { + if(!isset($data['password'])) { + throw new \Box_Exception('Password required'); + } + if(!isset($data['password_confirm'])) { + throw new \Box_Exception('Password confirmation required'); + } + + if($data['password'] != $data['password_confirm']) { + throw new \Box_Exception('Passwords do not match'); + } + + $this->di['validator']->isPasswordStrong($data['password']); + + $event_params = $data; + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffProfilePasswordChange', 'params'=>$event_params)); + + $admin = $this->getIdentity(); + + $admin->pass = $data['password']; + $admin->updated_at = date('c'); + $this->di['db']->store($admin); + + $event_params = array(); + $event_params['id'] = $this->getIdentity()->id; + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffProfilePasswordChange', 'params'=>$event_params)); + + $this->di['logger']->info('Changed profile password'); + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/Staff/Api/Guest.php b/src/bb-modules/Staff/Api/Guest.php new file mode 100644 index 000000000..78aef6b4f --- /dev/null +++ b/src/bb-modules/Staff/Api/Guest.php @@ -0,0 +1,88 @@ +di['db']->findOne('Admin', '1=1')) == 0); + if(!$allow) { + throw new \Box_Exception('Administrator account already exists', null, 55); + } + $required = array( + 'email' => 'Administrator email is missing.', + 'password' => 'Administrator password is missing.', + ); + $validator = $this->di['validator']; + $validator->checkRequiredParamsForArray($required, $data); + $validator->isEmailValid($data['email']); + $validator->isPasswordStrong($data['password']); + + $result = $this->getService()->createAdmin($data); + if ($result){ + $this->login($data); + } + return true; + } + + /** + * Login to admin area and save information to session. + * + * @param string $email - admin email + * @param string $password - admin password + * + * @optional string $remember - pass value "1" to create remember me cookie + * @return array + * @throws Exception + */ + public function login($data) + { + $required = array( + 'email' => 'Email required', + 'password' => 'Password required', + ); + $validator = $this->di['validator']; + $validator->checkRequiredParamsForArray($required, $data); + + $config = $this->getMod()->getConfig(); + + //check ip + if(isset($config['allowed_ips']) && isset($config['check_ip']) && $config['check_ip']) { + $allowed_ips = explode(PHP_EOL, $config['allowed_ips']); + if(!empty($allowed_ips)) { + array_walk($allowed_ips, create_function('&$val', '$val = trim($val);')); + if(!in_array($this->getIp(), $allowed_ips)) { + throw new \Box_Exception('You are not allowed to login to admin area from :ip address', array(':ip'=>$this->getIp()), 403); + } + } + } + + return $this->getService()->login($data['email'], $data['password'], $this->getIp()); + } +} \ No newline at end of file diff --git a/src/bb-modules/Staff/Controller/Admin.php b/src/bb-modules/Staff/Controller/Admin.php new file mode 100644 index 000000000..3d8587914 --- /dev/null +++ b/src/bb-modules/Staff/Controller/Admin.php @@ -0,0 +1,100 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'subpages' => array( + array( + 'location' => 'activity', + 'index' => 400, + 'label' => 'Staff logins history', + 'uri' => $this->di['url']->adminLink('staff/logins'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/staff/login', 'get_login', array(), get_class($this)); + $app->get('/staff/manage/:id', 'get_manage', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/staff/group/:id', 'get_group', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/staff/profile', 'get_profile', array(), get_class($this)); + $app->get('/staff/logins', 'get_history', array(), get_class($this)); + } + + public function get_login(\Box_App $app) + { + // check if at least one admin exists. + // if not show admin create form + $service = $this->di['mod_service']('staff'); + $count = $service->getAdminsCount(); + $create = ($count == 0); + return $app->render('mod_staff_login', array('create_admin'=>$create)); + } + + public function get_profile(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_staff_profile'); + } + + public function get_manage(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $staff = $api->staff_get(array('id'=>$id)); + + $extensionService = $this->di['mod_service']("Extension"); + $mods = $extensionService->getCoreAndActiveModules(); + return $app->render('mod_staff_manage', array('staff'=>$staff, 'mods'=>$mods)); + } + + public function get_group(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $group = $api->staff_group_get(array('id'=>$id)); + + $extensionService = $this->di['mod_service']("Extension"); + $mods = $extensionService->getCoreAndActiveModules(); + return $app->render('mod_staff_group', array('group'=>$group, 'mods'=>$mods)); + } + public function get_history(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_staff_login_history'); + } +} \ No newline at end of file diff --git a/src/bb-modules/Staff/Service.php b/src/bb-modules/Staff/Service.php new file mode 100644 index 000000000..6a42a52e3 --- /dev/null +++ b/src/bb-modules/Staff/Service.php @@ -0,0 +1,678 @@ +di = $di; + } + + /** + * @return \Box_Di + */ + public function getDi() + { + return $this->di; + } + + public function login($email, $password, $ip) + { + $event_params = array(); + $event_params['email'] = $email; + $event_params['password'] = $password; + $event_params['ip'] = $ip; + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminLogin', 'params'=>$event_params)); + + $model = $this->di['db']->findOne('Admin', "email = ? AND pass = SHA1(?) AND status = ?", array( $email, $password, 'active' )); + if(!$model instanceof \Model_Admin ) { + $this->di['events_manager']->fire(array('event'=>'onEventAdminLoginFailed', 'params'=>$event_params)); + throw new \Box_Exception('Check your login details', null, 403); + } + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminLogin', 'params'=>array('id'=>$model->id, 'ip'=>$ip))); + + $result = array( + 'id' => $model->id, + 'email' => $model->email, + 'name' => $model->name, + 'role' => $model->role, + ); + + $this->di['session']->set('admin', $result); + + $this->di['logger']->info(sprintf('Staff member %s logged in', $model->id)); + + return $result; + } + + public function getAdminsCount() + { + $sql = "SELECT COUNT(*) FROM admin WHERE 1"; + return $this->di['db']->getCell($sql); + } + + public function setPermissions($member_id, $array) + { + $sql="UPDATE admin SET permissions = :p WHERE id = :id"; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($sql); + $stmt->bindValue('p', json_encode($array)); + $stmt->bindValue('id', $member_id); + $stmt->execute(); + return true; + } + + public function getPermissions($member_id) + { + $sql="SELECT permissions FROM admin WHERE id = :id"; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($sql); + $stmt->execute(array('id'=>$member_id)); + $json = $stmt->fetchColumn(); + $permissions = json_decode($json, 1); + if(!$permissions) { + return array(); + } + return $permissions; + } + + public function hasPermission($member, $mod, $method = null) + { + if($member->role == \Model_Admin::ROLE_CRON || $member->role == \Model_Admin::ROLE_ADMIN) { + return true; + } + + $permissions = null; + if(is_null($permissions)) { + $permissions = $this->getPermissions($member->id); + } + + if(empty($permissions)) { + return false; + } + + if(!array_key_exists($mod, $permissions)) { + return false; + } + + if(!is_null($method) && is_array($permissions[$mod]) && !in_array($method, $permissions[$mod])) { + return false; + } + + return true; + } + + /** + * @param \Box_Event $event + */ + public static function onAfterClientOrderCreate(\Box_Event $event) + { + $di = $event->getDi(); + $params = $event->getParameters(); + + try { + $orderModel = $di['db']->load('ClientOrder', $params['id']); + $orderTicketService = $di['mod_service']('order'); + $order = $orderTicketService->toApiArray($orderModel, true, $di['loggedin_admin']); + + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_client_order'; + $email['order'] = $order; + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + /** + * @param \Box_Event $event + */ + public static function onAfterClientOpenTicket(\Box_Event $event) + { + $di = $event->getDi(); + $params = $event->getParameters(); + + try { + $supportTicketService = $di['mod_service']('support'); + $ticketModel = $supportTicketService->getTicketById($params['id']); + $ticket = $supportTicketService->toApiArray($ticketModel, true, $di['loggedin_admin']); + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_ticket_open'; + $email['ticket'] = $ticket; + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterClientReplyTicket(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $supportTicketService = $di['mod_service']('support'); + $ticketModel = $supportTicketService->getTicketById($params['id']); + $ticket = $supportTicketService->toApiArray($ticketModel, true); + + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_ticket_reply'; + $email['ticket'] = $ticket; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterClientCloseTicket(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $supportTicketService = $di['mod_service']('support'); + $ticketModel = $supportTicketService->getTicketById($params['id']); + $ticket = $supportTicketService->toApiArray($ticketModel, true); + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_ticket_close'; + $email['ticket'] = $ticket; + + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterGuestPublicTicketOpen(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $supportTicketService = $di['mod_service']('support'); + $ticketModel = $supportTicketService->getTicketById($params['id']); + $ticket = $supportTicketService->toApiArray($ticketModel, true); + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_pticket_open'; + $email['ticket'] = $ticket; + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterClientSignUp(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $clientService = $di['mod_service']('client'); + + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_client_signup'; + $email['c'] = $clientService ->get(array('id' => $params['id'])); + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + + return true; + } + + public static function onAfterGuestPublicTicketReply(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $supportTicketService = $di['mod_service']('support'); + $ticketModel = $supportTicketService->getTicketById($params['id']); + $ticket = $supportTicketService->toApiArray($ticketModel, true); + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_pticket_reply'; + $email['ticket'] = $ticket; + $emailService = $di['mod_service']('email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + /** + * @param \Box_Event $event + */ + public static function onAfterGuestPublicTicketClose(\Box_Event $event) + { + $params = $event->getParameters(); + $di = $event->getDi(); + + try { + $supportService = $di['mod_service']('Support'); + $publicTicket = $di['db']->load('SupportPTicket', $params['id']); + $ticket = $supportService->publicToApiArray($publicTicket); + $email = array(); + $email['to_staff'] = true; + $email['code'] = 'mod_staff_pticket_close'; + $email['ticket'] = $ticket; + $emailService = $di['mod_service']('Email'); + $emailService->sendTemplate($email); + } catch(\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public function getList($data){ + $data['no_cron'] = true; + + list ($query, $params) = $this->getSearchQuery($data); + + $di = $this->getDi(); + $pager = $di['pager']; + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $pager->getSimpleResultSet($query, $params, $per_page); + } + + public function getSearchQuery($data) + { + $query = "SELECT * FROM admin"; + + $search = isset($data['search']) ? $data['search'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $no_cron = isset($data['no_cron']) ? (bool)$data['no_cron'] : false; + + $where = array(); + $bindings = array(); + + if($search) { + $search = "%$search%"; + $where[] = "(name LIKE :name OR email LIKE :email )"; + $bindings[':name'] = $search; + $bindings[':email'] = $search; + } + + if($status) { + $where[] = "status = :status"; + $bindings[':status'] = $status; + } + + if($no_cron) { + $where[] = "role != :role"; + $bindings[':role'] = \Model_Admin::ROLE_CRON; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + $query .= " ORDER BY `admin_group_id` ASC, id ASC"; + + return array($query, $bindings); + } + + + /** + * @return \Model_Admin + */ + public function getCronAdmin() + { + $cron = $this->di['db']->findOne('Admin', 'role = :role', array(':role'=>\Model_Admin::ROLE_CRON)); + if($cron instanceof \Model_Admin) { + return $cron; + } + + $cron = $this->di['db']->dispense('Admin'); + $cron->role = \Model_Admin::ROLE_CRON; + $cron->admin_group_id = 1; + $cron->email = $this->di['tools']->generatePassword().'@'.$this->di['tools']->generatePassword().'.com'; + $cron->pass = uniqid() . microtime(); + $cron->name = "System Cron Job"; + $cron->signature = ""; + $cron->protected = 1; + $cron->status = 'active'; + $cron->created_at = date('c'); + $cron->updated_at = date('c'); + $this->di['db']->store($cron); + return $cron; + } + + public function toModel_AdminApiiArray(\Model_Admin $model, $deep = false) + { + $data = array( + 'id' => $model->id, + 'role' => $model->role, + 'admin_group_id' => $model->admin_group_id, + 'email' => $model->email, + 'name' => $model->name, + 'status' => $model->status, + 'signature' => $model->signature, + 'created_at' => $model->created_at, + 'updated_at' => $model->updated_at, + ); + + $data['protected'] = $model->protected; + + $adminGroupModel = $this->di['db']->load('AdminGroup', $model->admin_group_id); + $data['group']['id'] = $adminGroupModel->id; + $data['group']['name'] = $adminGroupModel->name; + + return $data; + } + + public function update(\Model_Admin $model, $data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffUpdate', 'params'=>array('id'=>$model->id))); + + if(isset($data['email'])) { + $model->email = $data['email']; + } + + if(isset($data['admin_group_id'])) { + $model->admin_group_id = $data['admin_group_id']; + } + + if(isset($data['name'])) { + $model->name = $data['name']; + } + + if(isset($data['status'])) { + $model->status = $data['status']; + } + + if(isset($data['signature'])) { + $model->signature = $data['signature']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffUpdate', 'params'=>array('id'=>$model->id))); + + $this->di['logger']->info('Updated staff member %s details', $model->id); + return true; + } + + public function delete(\Model_Admin $model) + { + if($model->protected) { + throw new \Box_Exception('This administrator account is protected and can not be removed'); + } + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffDelete', 'params'=>array('id'=>$model->id))); + + $id = $model->id; + $this->di['db']->trash($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffDelete', 'params'=>array('id'=>$id))); + + $this->di['logger']->info('Deleted staff member %s', $id); + return true; + } + + public function changePassword(\Model_Admin $model, $password) + { + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffPasswordChange', 'params'=>array('id'=>$model->id))); + + $model->pass = $password; + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffPasswordChange', 'params'=>array('id'=>$model->id))); + + $this->di['logger']->info('Changed staff member %s password', $model->id); + return true; + } + + public function create(array $data) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_Admin', 3); + + $signature = isset($data['signature']) ? $data['signature'] : NULL; + + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminStaffCreate', 'params'=>$data)); + + $model = $this->di['db']->dispense('Admin'); + $model->role = \Model_Admin::ROLE_STAFF; + $model->admin_group_id = $data['admin_group_id']; + $model->email = $data['email']; + $model->pass = $data['password']; + $model->name = $data['name']; + $model->status = \Model_Admin::STATUS_ACTIVE; + $model->signature = $signature; + $model->created_at = date('c'); + $model->updated_at = date('c'); + + try { + $newId = $this->di['db']->store($model); + } catch(\RedBeanPHP\RedException $e) { + throw new \Box_Exception('Staff member with email :email is already registered', array(':email'=>$data['email']), 788954); + } + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminStaffCreate', 'params'=>array('id'=>$newId))); + + $this->di['logger']->info('Created new staff member %s', $newId); + + return (int)$newId; + } + + public function createAdmin(array $data) + { + $admin = $this->di['db']->dispense('Admin'); + $admin->role = 'admin'; + $admin->admin_group_id = 1; + $admin->name = 'Administrator'; + $admin->email = $data['email']; + $admin->pass = sha1($data['password']); + $admin->protected = 1; + $admin->status = 'active'; + $admin->created_at = date('c'); + $admin->updated_at = date('c'); + + $newId = $this->di['db']->store($admin); + + $this->di['logger']->info('Main administrator %s account created', $admin->email); + $this->_sendMail($admin, $data['password']); + + $data['remember'] = true; + return $newId; + } + + public function getAdminGroupPair() + { + $sql = 'SELECT id, name + FROM admin_group'; + $rows = $this->di['db']->getAll($sql); + $result = array(); + + foreach($rows as $row){ + $result[ $row['id'] ] = $row['name']; + } + + return $result; + } + + public function getAdminGroupSearchQuery($data) + { + $sql = 'SELECT * + FROM admin_group + order by id asc'; + return array($sql, array()); + } + + public function createGroup($name) + { + $systemService = $this->di['mod_service']('system'); + $systemService ->checkLimits('Model_AdminGroup', 2); + + $model = $this->di['db']->dispense('AdminGroup'); + $model->name = $name; + + $model->created_at = date('c'); + $model->updated_at = date('c'); + $groupId = $this->di['db']->store($model); + + $this->di['logger']->info('Created new staff group %s', $groupId); + return (int) $groupId; + + } + + public function toAdminGroupApiArray(\Model_AdminGroup $model, $deep = false, $identity = null) + { + $data = array(); + $data['id'] = $model->id; + $data['name'] = $model->name; + $data['created_at'] = $model->created_at; + $data['updated_at'] = $model->updated_at; + return $data; + } + + public function deleteGroup(\Model_AdminGroup $model) + { + $id = $model->id; + if($model->id == 1) { + throw new \Box_Exception('Administrators group can not be removed'); + } + + $sql = 'SELECT count(1) + FROM admin + WHERE admin_group_id = :id'; + $staffMembersInGroup = $this->di['db']->getCell($sql, array('id' => $model->id)); + if($staffMembersInGroup > 0) { + throw new \Box_Exception('Can not remove group which has staff members'); + } + + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted staff group %s', $id); + return true; + } + + public function updateGroup(\Model_AdminGroup $model, $data) + { + if (isset($data['name'])){ + $model->name = $data['name']; + } + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated staff group %s', $model->id); + return true; + } + + public function getActivityAdminHistorySearchQuery($data) + { + $sql = 'SELECT m.*, a.email, a.name + FROM activity_admin_history as m + LEFT JOIN admin as a on m.admin_id = a.id + '; + + $search = isset($data['search']) ? $data['search'] : NULL; + $admin_id = isset($data['admin_id']) ? $data['admin_id'] : NULL; + + $where = array(); + $params = array(); + if($search) { + $where[] = ' a.name LIKE :name OR a.id LIKE :id OR a.email LIKE :email '; + $params['name'] = "%$search%"; + $params['id'] = "%$search%"; + $params['email'] = "%$search%"; + } + + if($admin_id) { + $where[] = 'm.admin_id = :admin_id'; + $params['admin_id'] = $admin_id; + } + + if (!empty($where)){ + $sql .= ' WHERE '.implode(' AND ', $where); + } + $sql .= ' ORDER BY m.id DESC'; + + return array($sql, $params); + } + + public function toActivityAdminHistoryApiArray(\Model_ActivityAdminHistory $model, $deep = false) + { + $result = array( + 'id' => $model->id, + 'ip' => $model->ip, + 'created_at' => $model->created_at, + ); + if ($model->admin_id) { + $adminModel = $this->di['db']->load('Admin', $model->admin_id); + if ($adminModel instanceof \Model_Admin && $adminModel->id) { + $result['staff']['id'] = $adminModel->id; + $result['staff']['name'] = $adminModel->name; + $result['staff']['email'] = $adminModel->email; + } + } + + return $result; + } + + public function deleteLoginHistory(\Model_ActivityAdminHistory $model) + { + $this->di['db']->trash($model); + return true; + } + + protected function _sendMail($admin, $admin_pass) + { + $admin_name = $admin->name; + $admin_email = $admin->email; + + $client_url = $this->di['url']->link('/'); + $admin_url = $this->di['url']->adminLink('/'); + + $content = "Hi $admin_name, ".PHP_EOL; + $content .= "You have successfully setup BoxBilling at ".BB_URL.PHP_EOL; + $content .= "Access client area at: ".$client_url.PHP_EOL; + $content .= "Access admin area at: ".$admin_url." with login details:".PHP_EOL; + $content .= "Email: ".$admin_email.PHP_EOL; + $content .= "Password: ".$admin_pass.PHP_EOL.PHP_EOL; + + $content .= "Read BoxBilling documentation to get started http://www.boxbilling.com/docs/".PHP_EOL; + $content .= "Thank You for using BoxBilling.".PHP_EOL; + + $subject = sprintf('BoxBilling is ready at "%s"', BB_URL); + + $systemService = $this->di['mod_service']('system'); + $from = $systemService->getParamValue('company_email'); + $emailService = $this->di['mod_service']('Email'); + $emailService->sendMail($admin_email, $from, $subject, $content); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Staff/html_admin/mod_staff_settings.phtml b/src/bb-modules/Staff/html_admin/mod_staff_settings.phtml new file mode 100644 index 000000000..4611d874a --- /dev/null +++ b/src/bb-modules/Staff/html_admin/mod_staff_settings.phtml @@ -0,0 +1,230 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}{% trans 'Staff' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + + + +
          +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set members = admin.staff_get_list({"per_page":100, "page":request.page}|merge(request)) %} + {% for i, member in members.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %}{% trans 'Email' %}{% trans 'Group' %}{% trans 'Status' %} 
          {{ member.id }}{{ member.name }}{{ member.email }}{{member.group.name}}{{ mf.status_name(member.status) }} + + +
          + {% trans 'The list is empty' %} +
          + +
          + +
          +
          + {% set params = admin.extension_config_get({"ext":"mod_staff"}) %} +
          + +
          +
          + +
          + + +
          +
          +
          + +
          +
          + +
          + +
          +
          +
          +
          + + + +
          +
          + +
          + +
          +
          +
          +
          +
          + +
          + {{ mf.selectbox('admin_group_id', admin.staff_group_get_pairs, '', 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          +
          +
          + +
          +
          + + + + + + + + + + {% set groups = admin.staff_group_get_list({"per_page":100, "page":request.page}) %} + {% for i, group in groups.list %} + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %} 
          {{ group.name }} + + +
          + {% trans 'The list is empty' %} +
          + +
          + +
          +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Staff/html_email/mod_staff_client_order.phtml b/src/bb-modules/Staff/html_email/mod_staff_client_order.phtml new file mode 100644 index 000000000..e36b58c1b --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_client_order.phtml @@ -0,0 +1,13 @@ +{% block subject %}[{{ guest.system_company.name }}] New Order Placed{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + +Client **{{ order.client.first_name }} {{ order.client.last_name }}** placed a new order for **{{ order.title }}** on {{ order.created_at|date }} + +Manage order {{'order/manage'|alink}}/{{order.id}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Staff/html_email/mod_staff_client_signup.phtml b/src/bb-modules/Staff/html_email/mod_staff_client_signup.phtml new file mode 100644 index 000000000..96f8e47ba --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_client_signup.phtml @@ -0,0 +1,13 @@ +{% block subject %}[{{ guest.system_company.name }}] New Client Signed Up{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + + *{{ c.first_name }} {{ c.last_name }}* has just signed up with {{ guest.system_company.name }} + +Manage client at {{'client/manage'|alink}}/{{c.id}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Staff/html_email/mod_staff_pticket_close.phtml b/src/bb-modules/Staff/html_email/mod_staff_pticket_close.phtml new file mode 100644 index 000000000..382bb92b3 --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_pticket_close.phtml @@ -0,0 +1,12 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}} [closed]{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ staff.name }}, + +Public ticket {{ 'support/public-ticket/'|alink }}/{{ticket.id}} was closed by client. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Staff/html_email/mod_staff_pticket_open.phtml b/src/bb-modules/Staff/html_email/mod_staff_pticket_open.phtml new file mode 100644 index 000000000..f61617498 --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_pticket_open.phtml @@ -0,0 +1,15 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + +New public ticket received. + +Reply at {{'support/public-ticket'|alink }}/{{ ticket.id }} + +Track conversation at: {{'support/contact-us/conversation'|link }}/{{ ticket.hash }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Staff/html_email/mod_staff_pticket_reply.phtml b/src/bb-modules/Staff/html_email/mod_staff_pticket_reply.phtml new file mode 100644 index 000000000..1932d1db2 --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_pticket_reply.phtml @@ -0,0 +1,12 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ staff.name }}, + +New reply posted on ticket {{ 'support/public-ticket/'|alink }}/{{ticket.id}} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Staff/html_email/mod_staff_ticket_close.phtml b/src/bb-modules/Staff/html_email/mod_staff_ticket_close.phtml new file mode 100644 index 000000000..4cb86199b --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_ticket_close.phtml @@ -0,0 +1,13 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + + **{{ ticket.client.first_name }} {{ ticket.client.last_name }}** closed support ticket #{{ ticket.id }} + +Review the ticket at {{'support/ticket'|alink }}/{{ ticket.id }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Staff/html_email/mod_staff_ticket_open.phtml b/src/bb-modules/Staff/html_email/mod_staff_ticket_open.phtml new file mode 100644 index 000000000..d0b291926 --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_ticket_open.phtml @@ -0,0 +1,23 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + + **{{ ticket.client.first_name }} {{ ticket.client.last_name }}** opened a new support ticket #{{ ticket.id }} + +*** + +{{ ticket.messages[0].content }} + +*** + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Reply at {{'support/ticket'|alink }}/{{ ticket.id }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Staff/html_email/mod_staff_ticket_reply.phtml b/src/bb-modules/Staff/html_email/mod_staff_ticket_reply.phtml new file mode 100644 index 000000000..fe4db4d99 --- /dev/null +++ b/src/bb-modules/Staff/html_email/mod_staff_ticket_reply.phtml @@ -0,0 +1,17 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ staff.name }}, + + **{{ ticket.client.first_name }} {{ ticket.client.last_name }}** replied to support ticket #{{ ticket.id }} + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Reply at {{'support/ticket'|alink }}/{{ ticket.id }} + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Staff/icon.png b/src/bb-modules/Staff/icon.png new file mode 100644 index 000000000..59ecf03f1 Binary files /dev/null and b/src/bb-modules/Staff/icon.png differ diff --git a/src/bb-modules/Staff/manifest.json b/src/bb-modules/Staff/manifest.json new file mode 100644 index 000000000..2727d62c0 --- /dev/null +++ b/src/bb-modules/Staff/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "staff", + "type": "mod", + "name": "Staff", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Stats/Api/Admin.php b/src/bb-modules/Stats/Api/Admin.php new file mode 100644 index 000000000..08342538f --- /dev/null +++ b/src/bb-modules/Stats/Api/Admin.php @@ -0,0 +1,181 @@ +getService()->getSummary(); + } + + /** + * Return income statistics + * + * @return array + */ + public function get_summary_income() + { + return $this->getService()->getSummaryIncome(); + } + + /** + * Get order statuses + * + * @return array + */ + public function get_orders_statuses($data) + { + return $this->getService()->getOrdersStatuses($data); + } + + /** + * Get active orders stats grouped by products + * + * @return array + */ + public function get_product_summary($data) + { + return $this->getService()->getProductSummary($data); + } + + /** + * Get product sales + * + * @return array + */ + public function get_product_sales($data) + { + return $this->getService()->getProductSales($data); + } + + /** + * Get income and refunds statistics + * + * @return array + */ + public function get_income_vs_refunds($data) + { + return $this->getService()->incomeAndRefundStats($data); + } + + /** + * Return refunds by day. If no timespan is selected method returns + * previous month statistics. + * + * @optional string $date_from - day since refunds are counted + * @optional string $date_to - day until refunds are counted + * + * @return array + */ + public function get_refunds($data) + { + return $this->getService()->getRefunds($data); + } + + /** + * Return icome by day. If no timespan is selected method returns + * previous month statistics. + * + * @optional string $date_from - day since income are counted + * @optional string $date_to - day until income are counted + * + * @return array + */ + public function get_income($data) + { + return $this->getService()->getIncome($data); + } + + /** + * Return statistics for orders + * + * @optional string $date_from - day since income are counted + * @optional string $date_to - day until income are counted + * + * @return array + */ + public function get_orders($data) + { + return $this->getService()->getTableStats('client_order', $data); + } + + /** + * Return clients signups by day. If no timespan is selected method returns + * previous month statistics. + * + * @optional string $date_from - day since income are counted + * @optional string $date_to - day until income are counted + * + * @return array + */ + public function get_clients($data) + { + return $this->getService()->getTableStats('client', $data); + } + + /** + * Get number of clients in country + * + * @return array + */ + public function client_countries($data) + { + return $this->getService()->getClientCountries($data); + } + + /** + * Get number of sales by country + * + * @return array + */ + public function sales_countries($data) + { + return $this->getService()->getSalesByCountry($data); + } + + /** + * Return invoices by day. If no timespan is selected method returns + * previous month statistics. + * + * @optional string $date_from - day since income are counted + * @optional string $date_to - day until income are counted + * + * @return array + */ + public function get_invoices($data) + { + return $this->getService()->getTableStats('invoice', $data); + } + + /** + * Return support tickets by day. If no timespan is selected method returns + * previous month statistics. + * + * @optional string $date_from - day since income are counted + * @optional string $date_to - day until income are counted + * + * @return array + */ + public function get_tickets($data) + { + return $this->getService()->getTableStats('support_ticket', $data); + } +} \ No newline at end of file diff --git a/src/bb-modules/Stats/Service.php b/src/bb-modules/Stats/Service.php new file mode 100644 index 000000000..454c8c063 --- /dev/null +++ b/src/bb-modules/Stats/Service.php @@ -0,0 +1,409 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function getSummary() + { + $stats = array(); + + $pdo = $this->di['pdo']; + + $total_query = "SELECT COUNT(1) FROM :table"; + $yeste_query = "SELECT COUNT(1) FROM :table WHERE DATE_FORMAT(`created_at`, '%Y-%m-%d') = DATE_SUB(CURDATE(), INTERVAL 1 DAY)"; + $today_query = "SELECT COUNT(1) FROM :table WHERE DATE_FORMAT(`created_at`, '%Y-%m-%d') = CURDATE()"; + $month_query = "SELECT COUNT(1) FROM :table WHERE DATE_FORMAT(`created_at`, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')"; + $last_month_query = "SELECT COUNT(1) FROM :table WHERE created_at BETWEEN DATE_FORMAT(NOW() - INTERVAL 1 MONTH, '%Y-%m-01') AND DATE_FORMAT(NOW() ,'%Y-%m-01')"; + + // client stats + $table = 'client'; + $stmt = $pdo->prepare(str_replace(':table', $table, $total_query)); + $stmt->execute(); + $stats['clients_total'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $today_query)); + $stmt->execute(); + $stats['clients_today'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $yeste_query)); + $stmt->execute(); + $stats['clients_yesterday'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $month_query)); + $stmt->execute(); + $stats['clients_this_month'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $last_month_query)); + $stmt->execute(); + $stats['clients_last_month'] = $stmt->fetchColumn(); + + // orders stats + $table = 'client_order'; + $stmt = $pdo->prepare(str_replace(':table', $table, $total_query)); + $stmt->execute(); + $stats['orders_total'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $today_query)); + $stmt->execute(); + $stats['orders_today'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $yeste_query)); + $stmt->execute(); + $stats['orders_yesterday'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $month_query)); + $stmt->execute(); + $stats['orders_this_month'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $last_month_query)); + $stmt->execute(); + $stats['orders_last_month'] = $stmt->fetchColumn(); + + // invoice stats + $table = 'invoice'; + $stmt = $pdo->prepare(str_replace(':table', $table, $total_query)); + $stmt->execute(); + $stats['invoices_total'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $today_query)); + $stmt->execute(); + $stats['invoices_today'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $yeste_query)); + $stmt->execute(); + $stats['invoices_yesterday'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $month_query)); + $stmt->execute(); + $stats['invoices_this_month'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $last_month_query)); + $stmt->execute(); + $stats['invoices_last_month'] = $stmt->fetchColumn(); + + // ticket stats + $table = 'support_ticket'; + $stmt = $pdo->prepare(str_replace(':table', $table, $total_query)); + $stmt->execute(); + $stats['tickets_total'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $today_query)); + $stmt->execute(); + $stats['tickets_today'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $yeste_query)); + $stmt->execute(); + $stats['tickets_yesterday'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $month_query)); + $stmt->execute(); + $stats['tickets_this_month'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare(str_replace(':table', $table, $last_month_query)); + $stmt->execute(); + $stats['tickets_last_month'] = $stmt->fetchColumn(); + + return $stats; + } + + public function getSummaryIncome() + { + $stats = array(); + + $pdo = $this->di['pdo']; + + $total_query = "SELECT (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS income FROM invoice WHERE approved = 1 AND (status = 'paid' OR status = 'refunded')"; + $yeste_query = "SELECT (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS income FROM invoice WHERE approved = 1 AND (status = 'paid' OR status = 'refunded') AND DATE_FORMAT(`paid_at`, '%Y-%m-%d') = DATE_SUB(CURDATE(), INTERVAL 1 DAY)"; + $today_query = "SELECT (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS income FROM invoice WHERE approved = 1 AND (status = 'paid' OR status = 'refunded') AND DATE_FORMAT(`paid_at`, '%Y-%m-%d') = CURDATE()"; + $month_query = "SELECT (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS income FROM invoice WHERE approved = 1 AND (status = 'paid' OR status = 'refunded') AND DATE_FORMAT(`paid_at`, '%Y-%m') = DATE_FORMAT(NOW(), '%Y-%m')"; + $last_month_query = "SELECT (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS income FROM invoice WHERE approved = 1 AND (status = 'paid' OR status = 'refunded') AND paid_at BETWEEN DATE_FORMAT(NOW() - INTERVAL 1 MONTH, '%Y-%m-01') AND DATE_FORMAT(NOW() ,'%Y-%m-01')"; + + $stmt = $pdo->prepare($total_query); + $stmt->execute(); + $stats['total'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare($today_query); + $stmt->execute(); + $stats['today'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare($yeste_query); + $stmt->execute(); + $stats['yesterday'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare($month_query); + $stmt->execute(); + $stats['this_month'] = $stmt->fetchColumn(); + + $stmt = $pdo->prepare($last_month_query); + $stmt->execute(); + $stats['last_month'] = $stmt->fetchColumn(); + +// $stmt = $pdo->prepare(sprintf($total_query, $table)); +// $stmt->execute(); +// $stats['this_year'] = $stmt->fetchColumn(); + + return $stats; + } + + public function getOrdersStatuses($data) + { + $orderService = $this->di['mod_service']('order'); + $c = $orderService->counter(); + unset($c['total']); + return $c; + } + + public function getProductSummary($data) + { + $query = "SELECT p.id, p.title, COUNT(o.id) as orders + FROM `client_order` o + RIGHT JOIN `product` p ON(p.id = o.product_id) + WHERE o.status = 'active' + GROUP BY o.product_id + ORDER BY orders DESC + "; + return $this->di['db']->getAll($query); + } + + public function getProductSales($data) + { + list($time_from, $time_to) = $this->_getDateInterval($data); + + $pdo = $this->di['pdo']; + + $query = "SELECT title, COUNT(product_id) as sales + FROM `client_order` + WHERE status = :status + AND `created_at` BETWEEN :date_from AND :date_to + GROUP BY product_id + "; + + $stmt = $pdo->prepare($query); + $stmt->execute( + array( + 'status' => 'active', + 'date_from' => date('Y-m-d', $time_from), + 'date_to' => date('Y-m-d', $time_to), + ) + ); + + return $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + } + + public function incomeAndRefundStats($data) + { + $pdo = $this->di['pdo']; + + $query = "SELECT COALESCE(SUM(base_refund), 0) AS `refund`, COALESCE(SUM(base_income), 0) AS `income` + FROM `invoice` + WHERE approved = 1 + AND (status = :status1 OR status = :status2) + "; + + $stmt = $pdo->prepare($query); + $stmt->execute(array( + 'status1' => \Model_Invoice::STATUS_PAID, + 'status2' => \Model_Invoice::STATUS_REFUNDED, + )); + + $results = $stmt->fetchAll(\PDO::FETCH_ASSOC); + return $results[0]; + } + + public function getRefunds($data) + { + $time_from = strtotime('-1 month'); + $time_to = strtotime('+1 day'); + + if(isset($data['date_from']) && !empty($data['date_from'])) { + $time_from = strtotime($data['date_from']); + } + + if(isset($data['date_to']) && !empty($data['date_to'])) { + $time_to = strtotime($data['date_to']); + } + + $pdo = $this->di['pdo']; + + $query = "SELECT DATE_FORMAT(`created_at`, '%Y-%m-%d') AS `date`, COALESCE(SUM(base_refund), 0) AS `refund` + FROM `invoice` + WHERE `created_at` BETWEEN :date_from AND :date_to + AND approved = 1 + AND status = :status + GROUP BY `date`"; + + $stmt = $pdo->prepare($query); + $stmt->execute( + array( + 'status' => \Model_Invoice::STATUS_REFUNDED, + 'date_from' => date('Y-m-d', $time_from), + 'date_to' => date('Y-m-d', $time_to), + ) + ); + + $results = $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + return $this->_genFlotArray($results, $time_from, $time_to); + } + + public function getIncome($data) + { + $time_from = strtotime('-1 month'); + $time_to = strtotime('+1 day'); + + if(isset($data['date_from']) && !empty($data['date_from'])) { + $time_from = strtotime($data['date_from']); + } + + if(isset($data['date_to']) && !empty($data['date_to'])) { + $time_to = strtotime($data['date_to']); + } + + $pdo = $this->di['pdo']; + + $query = "SELECT DATE_FORMAT(`paid_at`, '%Y-%m-%d') AS `date`, (COALESCE(SUM(base_income), 0) - COALESCE(SUM(base_refund), 0)) AS `income` + FROM `invoice` + WHERE `paid_at` BETWEEN :date_from AND :date_to + AND approved = 1 + AND status = :status + GROUP BY `date`"; + + $stmt = $pdo->prepare($query); + $stmt->execute( + array( + 'status' => \Model_Invoice::STATUS_PAID, + 'date_from' => date('Y-m-d', $time_from), + 'date_to' => date('Y-m-d', $time_to), + ) + ); + + $results = $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + return $this->_genFlotArray($results, $time_from, $time_to); + } + + public function getClientCountries($data) + { + $limit = isset($data['limit']) ? (int)$data['limit']: 10; + $q=" + SELECT country, COUNT(id) as clients + FROM `client` + GROUP BY `country` + ORDER BY clients DESC + LIMIT $limit + "; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($q); + $stmt->execute(); + return $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + } + + public function getSalesByCountry($data) + { + $limit = isset($data['limit']) ? (int)$data['limit']: 10; + $q=" + SELECT buyer_country, COUNT(id) as sales + FROM `invoice` + WHERE status = 'paid' + GROUP BY `buyer_country` + ORDER BY sales DESC + LIMIT $limit + "; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($q); + $stmt->execute(); + return $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + } + + private function _getDateInterval($data) + { + $time_from = strtotime('-1 month'); + $time_to = strtotime('+1 day'); + + if(isset($data['date_from']) && !empty($data['date_from'])) { + $time_from = strtotime($data['date_from']); + } + + if(isset($data['date_to']) && !empty($data['date_to'])) { + $time_to = strtotime($data['date_to']); + } + + return array($time_from, $time_to); + } + + public function getTableStats($table, $data = array()) + { + $time_from = strtotime('-1 month'); + $time_to = strtotime('+1 day'); + + if(isset($data['date_from']) && !empty($data['date_from'])) { + $time_from = strtotime($data['date_from']); + } + + if(isset($data['date_to']) && !empty($data['date_to'])) { + $time_to = strtotime($data['date_to']); + } + + $pdo = $this->di['pdo']; + + $query = "SELECT DATE_FORMAT(`created_at`, '%Y-%m-%d') AS `date`, COUNT(1) AS `count` + FROM `$table` + WHERE `created_at` BETWEEN :date_from AND :date_to + GROUP BY `date`"; + + $stmt = $pdo->prepare($query); + $stmt->execute( + array( + 'date_from' => date('Y-m-d', $time_from), + 'date_to' => date('Y-m-d', $time_to), + ) + ); + + $results = $stmt->fetchAll(\PDO::FETCH_KEY_PAIR); + return $this->_genFlotArray($results, $time_from, $time_to); + } + + private function _genFlotArray($results, $time_from, $time_to) + { + $data = array(); + // Loop between timestamps, 1 day at a time + do { + $time_from = strtotime('+1 day',$time_from); + $dom = date('Y-m-d', $time_from); + $c = (isset($results[$dom])) ? $results[$dom] : 0; + $data[] = array($time_from * 1000, (int)$c); + } while ($time_to > $time_from); + array_pop($data); + return $data; + } +} + \ No newline at end of file diff --git a/src/bb-modules/Stats/manifest.json b/src/bb-modules/Stats/manifest.json new file mode 100644 index 000000000..831e47214 --- /dev/null +++ b/src/bb-modules/Stats/manifest.json @@ -0,0 +1,7 @@ +{ + "id": "stats", + "type": "mod", + "name": "Statistics", + "description": "BoxBilling core module", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Support/Api/Admin.php b/src/bb-modules/Support/Api/Admin.php new file mode 100644 index 000000000..d57668478 --- /dev/null +++ b/src/bb-modules/Support/Api/Admin.php @@ -0,0 +1,796 @@ +getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $bindings, $per_page); + foreach($pager['list'] as $key => $ticketArr){ + $ticket = $this->di['db']->getExistingModelById('SupportTicket', $ticketArr['id'], 'Ticket not found'); + $pager['list'][$key] = $this->getService()->toApiArray($ticket, true, $this->getIdentity()); + } + + return $pager; + } + + /** + * Return ticket full details + * + * @param int $id - ticket id + * + * @return array + */ + public function ticket_get($data) + { + $required = array( + 'id' => 'Ticket id is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->toApiArray($model, true, $this->getIdentity()); + } + + /** + * Update ticket details + * + * @param int $id - ticket id + * + * @optional int $support_helpdesk_id - ticket helpdesk id + * @optional string $status - ticket status + * @optional string $subject - ticket subject + * @optional string $priority - ticket priority + * + * @return bool + */ + public function ticket_update($data) + { + $required = array( + 'id' => 'Ticket id is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->ticketUpdate($model, $data); + } + + /** + * Update ticket message + * + * @param int $id - ticket id + * @param string $content - new message content + * + * @return bool + */ + public function ticket_message_update($data) + { + $required = array( + 'id' => 'Ticket message id is missing', + 'content' => 'Ticket message content is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicketMessage', $data['id'], 'Ticket message not found'); + + return $this->getService()->ticketMessageUpdate($model, $data['content']); + } + + /** + * Delete ticket. + * + * @param int $id - ticket id + * + * @return bool + */ + public function ticket_delete($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->rm($model); + } + + /** + * Add new conversation message to to ticket + * + * @param int $id - ticket id + * @param string $content - ticket message content + * + * @return int - ticket message id + */ + public function ticket_reply($data) + { + $required = array( + 'id' => 'Ticket id is missing', + 'content' => 'Ticket message content is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->ticketReply($ticket, $this->getIdentity(), $data['content']); + } + + /** + * Close ticket + * + * @param int $id - ticket id + * + * @return boolean + */ + public function ticket_close($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + if ($ticket->status == \Model_SupportTicket::CLOSED) { + return true; + } + + return $this->getService()->closeTicket($ticket, $this->getIdentity()); + } + + /** + * Method to create open new ticket. Tickets can have tasks assigned to them + * via optional parameters. + * + * @param int $client_id - ticket client id + * @param string $content - ticket message content + * @param string $subject - ticket subject + * @param int $support_helpdesk_id - Ticket helpdesk id. + * + * @optional string $status - Ticket status. Default - on hold + * + * @return int $id - ticket id + */ + public function ticket_create($data) + { + $required = array( + 'client_id' => 'Client id is missing', + 'content' => 'Ticket content required', + 'subject' => 'Ticket subject required', + 'support_helpdesk_id' => 'Ticket support_helpdesk_id is required' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->di['db']->getExistingModelById('Client', $data['client_id'], 'Client not found'); + $helpdesk = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['support_helpdesk_id'], 'Helpdesk invalid'); + + return $this->getService()->ticketCreateForAdmin($client, $helpdesk, $data, $this->getIdentity()); + + } + + /** + * Action to close all tickets which have not received any replies for a + * time defined in helpdesk + * + * Run by cron job + * + * @return boolean + */ + public function batch_ticket_auto_close($data) + { + // Auto close support tickets + $expired = $this->getService()->getExpired(); + + foreach ($expired as $model) { + if (!$this->getService()->autoClose($model)) { + $this->di['logger']->info('Ticket %s was not closed', $model->id); + } + } + + return true; + } + + /** + * Action to close all inqueries which have not received any replies for a + * time defined in helpdesk + * + * Run by cron job + * + * @return boolean + */ + public function batch_public_ticket_auto_close($data) + { + // Auto close public tickets + $expired = $this->getService()->publicGetExpired(); + foreach ($expired as $model) { + if (!$this->getService()->publicAutoClose($model)) { + $this->di['logger']->info('Public Ticket %s was not closed', $model->id); + } + } + + return true; + } + + /** + * Return tickets statuses with counter + * @return + */ + public function ticket_get_statuses($data) + { + if (isset($data['titles'])) { + return $this->getService()->getStatuses(); + } + + return $this->getService()->counter(); + } + + /** + * Get paginated list of inqueries + * + * @return array + */ + public function public_ticket_get_list($data) + { + list($sql, $bindings) = $this->getService()->publicGetSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $bindings, $per_page); + + foreach($pager['list'] as $key => $ticketArr){ + $ticket = $this->di['db']->getExistingModelById('SupportPTicket', $ticketArr['id'], 'Ticket not found'); + $pager['list'][$key] = $this->getService()->publicToApiArray($ticket); + } + return $pager; + } + + /** + * Create new inquiry. Send email + * + * @param string $name - receivers name + * @param string $email - receivers email + * @param string $subject - email subject + * @param string $message - email message + * + * @return int - inquiry id + * @throws \Box_Exception + */ + public function public_ticket_create($data) + { + $required = array( + 'name' => 'Client name parameter is missing', + 'email' => 'Client email parameter is missing', + 'subject' => 'Subject parameter is missing', + 'message' => 'Ticket message is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + return $this->getService()->publicTicketCreate($data, $this->getIdentity()); + } + + /** + * Get inquiry details + * + * @param int $id - inquiry id + * @return array + * @throws \Box_Exception + */ + public function public_ticket_get($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->publicToApiArray($model, true); + } + + /** + * Delete inquiry + * + * @param int $id - inquiry id + * @return bool + * @throws \Box_Exception + */ + public function public_ticket_delete($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->publicRm($model); + } + + /** + * Set iquery status to closed + * + * @param int $id - inquiry id + * @return array + * @throws \Box_Exception + */ + public function public_ticket_close($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->di['db']->getExistingModelById('SupportPTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->publicCloseTicket($ticket, $this->getIdentity()); + } + + /** + * Update inquiry details + * + * @param int $id - inquiry id + * + * @optional string $subject - subject + * @optional string $status - status + * + * @return bool + * @throws \Box_Exception + */ + public function public_ticket_update($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->publicTicketUpdate($model, $data); + } + + /** + * Post new reply to inquiry + * + * @param int $id - inquiry id + * @param string $content - text message + * + * @return bool + * @throws \Box_Exception + */ + public function public_ticket_reply($data) + { + $required = array( + 'id' => 'Ticket id is missing', + 'content' => 'Ticket content required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->di['db']->getExistingModelById('SupportPTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->publicTicketReply($ticket, $this->getIdentity(), $data['content']); + } + + /** + * Return tickets statuses with counter + */ + public function public_ticket_get_statuses($data) + { + if (isset($data['titles'])) { + return $this->getService()->publicGetStatuses(); + } + + return $this->getService()->publicCounter(); + } + + /** + * Get helpdesk list + * + * @return array + */ + public function helpdesk_get_list($data) + { + list($sql, $bindings) = $this->getService()->helpdeskGetSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + return $this->di['pager']->getSimpleResultSet($sql, $bindings, $per_page); + } + + /** + * Get pairs of helpdesks + * + * @return array + */ + public function helpdesk_get_pairs($data) + { + return $this->getService()->helpdeskGetPairs(); + } + + /** + * Get helpdesk details + * + * @param int $id - helpdesk id + * @return array + * @throws \Box_Exception + */ + public function helpdesk_get($data) + { + $required = array( + 'id' => 'Help desk id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['id'], 'Help desk not found'); + + return $this->getService()->helpdeskToApiArray($model); + } + + /** + * Update helpdesk parameters + * + * @param int $id - helpdesk id + * + * @optional string $name - helpdesk name + * @optional string $email - helpdesk email + * @optional string $can_reopen - flag to enable/disable ability to reopen closed tickets + * @optional int $close_after - time to wait for reply before auto closing ticket + * @optional string $signature - helpdesk signature + * + * @return boolean + * @throws \Box_Exception + */ + public function helpdesk_update($data) + { + $required = array( + 'id' => 'Help desk id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['id'], 'Help desk not found'); + + return $this->getService()->helpdeskUpdate($model, $data); + } + + /** + * Create new helpdesk + * + * @param string $name - new helpdesk title + * + * @optional string $email - helpdesk email + * @optional string $can_reopen - flag to enable/disable ability to reopen closed tickets + * @optional int $close_after - time to wait for reply before auto closing ticket + * @optional string $signature - helpdesk signature + * + * @return int - id + * @throws \Box_Exception + */ + public function helpdesk_create($data) + { + $required = array( + 'name' => 'Help desk title is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + return $this->getService()->helpdeskCreate($data); + } + + /** + * Delete helpdesk + * + * @param int $id - helpdesk id + * + * @return boolean + * @throws \Box_Exception + */ + public function helpdesk_delete($data) + { + $required = array( + 'id' => 'Help desk id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['id'], 'Help desk not found'); + + return $this->getService()->helpdeskRm($model); + } + + /** + * Get list of canned responses + * + * @return array + */ + public function canned_get_list($data) + { + list($sql, $bindings) = $this->getService()->cannedGetSearchQuery($data); + + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getSimpleResultSet($sql, $bindings, $per_page); + foreach($pager['list'] as $key => $item){ + $staff = $this->di['db']->getExistingModelById('SupportPr', $item['id'], 'Canned response not found'); + $pager['list'][$key] = $this->getService()->cannedToApiArray($staff); + } + + return $pager; + } + + /** + * Get list of canned responses grouped by category + * + * @return array + */ + public function canned_pairs() + { + $res = $this->di['db']->getAssoc('SELECT id, title FROM support_pr_category WHERE 1'); + $list = array(); + foreach ($res as $id => $title) { + $list[$title] = $this->di['db']->getAssoc('SELECT id, title FROM support_pr WHERE support_pr_category_id = :id', array('id' => $id)); + } + + return $list; + } + + /** + * Get canned response details + * + * @param int $id - canned response id + * + * @return array + * @throws \Box_Exception + */ + public function canned_get($data) + { + $required = array( + 'id' => 'Canned reply id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPr', $data['id'], 'Canned reply not found'); + + return $this->getService()->cannedToApiArray($model); + } + + /** + * Delete canned response + * + * @param id $id - canned response id + * + * @return boolean + * @throws \Box_Exception + */ + public function canned_delete($data) + { + $required = array( + 'id' => 'Canned reply id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPr', $data['id'], 'Canned reply not found'); + + return $this->getService()->cannedRm($model); + } + + /** + * Create new canned response + * + * @param string $title - canned response title + * @param int $category_id - canned response category id + * + * @optional string $content - canned response content + * + * @return int + * @throws \Box_Exception + */ + public function canned_create($data) + { + $required = array( + 'title' => 'Canned reply title is missing', + 'category_id' => 'Canned reply category id is missing' + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $content = isset($data['content']) ? $data['content'] : NULL; + + return $this->getService()->cannedCreate($data['title'], $data['category_id'], $content); + } + + /** + * Update canned response + * + * @param int $id - canned response id + * + * @optional string $title - canned response title + * @optional int $category_id - canned response category id + * @optional string $content - canned response content + * + * @return bool + * @throws \Box_Exception + */ + public function canned_update($data) + { + $required = array( + 'id' => 'Canned reply id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPr', $data['id'], 'Canned reply not found'); + + return $this->getService()->cannedUpdate($model, $data); + } + + /** + * Get canned response pairs + * + * @return array + */ + public function canned_category_pairs($data) + { + return $this->di['db']->getAssoc('SELECT id, title FROM support_pr_category WHERE 1'); + } + + /** + * Get canned response category + * + * @param int $id - canned response category id + * @return array + * @throws \Box_Exception + */ + public function canned_category_get($data) + { + $required = array( + 'id' => 'Canned category id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPrCategory', $data['id'], 'Canned category not found'); + + return $this->getService()->cannedCategoryToApiArray($model); + } + + /** + * Get canned response category + * + * @param int $id - canned response category id + * + * @optional string $title - new catefory title + * + * @return bool + * @throws \Box_Exception + */ + public function canned_category_update($data) + { + $required = array( + 'id' => 'Canned category id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPrCategory', $data['id'], 'Canned category not found'); + + $title = (isset($data['title'])) ? $data['title'] : $model->title; + + return $this->getService()->cannedCategoryUpdate($model, $title); + } + + /** + * Delete canned response category + * + * @param int $id - canned response category id + * + * @return bool + * @throws \Box_Exception + */ + public function canned_category_delete($data) + { + $required = array( + 'id' => 'Canned category id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportPrCategory', $data['id'], 'Canned category not found'); + + return $this->getService()->cannedCategoryRm($model); + } + + /** + * Create canned response category + * + * @param string $title - canned response category title + * + * @return int - new category id + * @throws \Box_Exception + */ + public function canned_category_create($data) + { + $required = array( + 'title' => 'Canned category title is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + return $this->getService()->cannedCategoryCreate($data['title']); + } + + /** + * Add note to support ticket + * + * @param int $ticket_id - support ticket id to add note to + * @param string $note - note + * + * @return int - new note id + * @throws \Box_Exception + */ + public function note_create($data) + { + $required = array( + 'ticket_id' => 'ticket_id is missing', + 'note' => 'Note is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->di['db']->getExistingModelById('SupportTicket', $data['ticket_id'], 'Ticket not found'); + + return $this->getService()->noteCreate($ticket, $this->getIdentity(), $data['note']); + } + + /** + * Delete note from support ticket + * + * @param int $id - note id + * + * @return bool + * @throws \Box_Exception + */ + public function note_delete($data) + { + $required = array( + 'id' => 'Note id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicketNote', $data['id'], 'Note not found'); + + return $this->getService()->noteRm($model); + } + + /** + * Set support ticket related task to completed + * + * @param int $id - support ticket id + * + * @return boolean + * @throws \Box_Exception + */ + public function task_complete($data) + { + $required = array( + 'id' => 'Ticket id is missing', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $model = $this->di['db']->getExistingModelById('SupportTicket', $data['id'], 'Ticket not found'); + + return $this->getService()->ticketTaskComplete($model); + + } +} \ No newline at end of file diff --git a/src/bb-modules/Support/Api/Client.php b/src/bb-modules/Support/Api/Client.php new file mode 100644 index 000000000..66ee2982c --- /dev/null +++ b/src/bb-modules/Support/Api/Client.php @@ -0,0 +1,161 @@ +getIdentity(); + $data['client_id'] = $identity->id; + + list($sql, $bindings) = $this->getService()->getSearchQuery($data); + $per_page = isset($data['per_page']) ? $data['per_page'] : $this->di['pager']->getPer_page(); + $pager = $this->di['pager']->getAdvancedResultSet($sql, $bindings, $per_page); + foreach($pager['list'] as $key => $ticketArr){ + $ticket = $this->di['db']->getExistingModelById('SupportTicket', $ticketArr['id'], 'Ticket not found'); + $pager['list'][$key] = $this->getService()->toApiArray($ticket, true, $this->getIdentity()); + } + + return $pager; + } + + /** + * Return ticket full details + * + * @param int $id - ticket id + * + * @return array + */ + public function ticket_get($data) + { + $required = array( + 'id' => 'Ticket id required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $ticket = $this->getService()->findOneByClient($this->getIdentity(), $data['id']); + + return $this->getService()->toApiArray($ticket); + } + + /** + * Return pairs for support helpdesk. Can be used to populate select box. + * + * @return array + */ + public function helpdesk_get_pairs() + { + return $this->getService()->helpdeskGetPairs(); + } + + /** + * Method to create open new ticket. Tickets can have tasks assigned to them + * via optional parameters. + * + * @param string $content - ticket message content + * @param string $subject - ticket subject + * @param string $support_helpdesk_id - Ticket helpdesk id. + * + * @optional int $rel_type - Ticket relation type + * @optional int $rel_id - Ticket relation id + * @optional int $rel_task - Ticket task codename + * @optional int $rel_new_value - Task can have new value assigned. + * + * @return int $id - ticket id + */ + public function ticket_create($data) + { + $required = array( + 'content' => 'Ticket content required', + 'subject' => 'Ticket subject required', + 'support_helpdesk_id' => 'Ticket support_helpdesk_id required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $helpdesk = $this->di['db']->getExistingModelById('SupportHelpdesk', $data['support_helpdesk_id'], 'Helpdesk invalid'); + + $client = $this->getIdentity(); + + return $this->getService()->ticketCreateForClient($client, $helpdesk, $data); + + } + + /** + * Add new conversation message to ticket. Ticket will be reopened if closed + * + * @param int $id - ticket id + * @param string $content - ticket message + * + * @return bool + */ + public function ticket_reply($data) + { + $required = array( + 'id' => 'Ticket ID required', + 'content' => 'Ticket content required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->getIdentity(); + + $bindings = array( + ':id' => $data['id'], + ':client_id' => $client->id + ); + $ticket = $this->di['db']->findOne('SupportTicket', 'id = :id AND client_id = :client_id', $bindings); + + if (!$ticket instanceof \Model_SupportTicket){ + throw new \Box_Exception('Ticket not found'); + } + + if (!$this->getService()->canBeReopened($ticket)) { + throw new \Box_Exception('Ticket can not be reopened.'); + } + + $result = $this->getService()->ticketReply($ticket, $client, $data['content']); + return ($result > 0) ? true : false; + } + + /** + * Close ticket + * + * @param int $id - ticket id + * + * @return boolean + */ + public function ticket_close($data) + { + $required = array( + 'id' => 'Ticket ID required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $client = $this->getIdentity(); + + $ticket = $this->getService()->findOneByClient($client, $data['id']); + + return $this->getService()->closeTicket($ticket, $this->getIdentity()); + } +} \ No newline at end of file diff --git a/src/bb-modules/Support/Api/Guest.php b/src/bb-modules/Support/Api/Guest.php new file mode 100644 index 000000000..77f76bebf --- /dev/null +++ b/src/bb-modules/Support/Api/Guest.php @@ -0,0 +1,105 @@ + 'Please enter your name', + 'email' => 'Please enter your email', + 'subject' => 'Please enter your subject', + 'message' => 'Please enter your message', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + if (strlen($data['message']) < 4) { + throw new \Box_Exception('Please enter your message'); + } + + return $this->getService()->ticketCreateForGuest($data); + } + + /** + * Get public ticket + * + * @param string $hash - public ticket hash + * + * @return array - ticket details + */ + public function ticket_get($data) + { + $required = array( + 'hash' => 'Public ticket hash required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $publicTicket = $this->getService()->publicFindOneByHash($data['hash']); + + return $this->getService()->publicToApiArray($publicTicket); + } + + /** + * Close public ticket + * + * @param string $hash - public ticket hash + * + * @return bool + */ + public function ticket_close($data) + { + $required = array( + 'hash' => 'Public ticket hash required', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $publicTicket = $this->getService()->publicFindOneByHash($data['hash']); + + return $this->getService()->publicCloseTicket($publicTicket, $this->getIdentity()); + } + + /** + * Reply to public ticket + * + * @param string $hash - public ticket hash + * @param string $message - public ticket reply message + * + * @return string - ticket hash + * + */ + public function ticket_reply($data) + { + $required = array( + 'hash' => 'Public ticket hash required', + 'message' => 'Message is required and can not be blank', + ); + $this->di['validator']->checkRequiredParamsForArray($required, $data); + + $publicTicket = $this->getService()->publicFindOneByHash($data['hash']); + + return $this->getService()->publicTicketReplyForGuest($publicTicket, $data['message']); + } +} \ No newline at end of file diff --git a/src/bb-modules/Support/Controller/Admin.php b/src/bb-modules/Support/Controller/Admin.php new file mode 100644 index 000000000..d6cb6f5a1 --- /dev/null +++ b/src/bb-modules/Support/Controller/Admin.php @@ -0,0 +1,172 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'location' => 'support', + 'index' => 500, + 'label' => 'Support', + 'class' => 'support', + ), + 'subpages' => array( + array( + 'location' => 'support', + 'label' => 'Client tickets', + 'uri' => $this->di['url']->adminLink('support', array('status' => 'open')), + 'index' => 100, + 'class' => '', + ), + array( + 'location' => 'support', + 'label' => 'Advanced ticket search', + 'uri' => $this->di['url']->adminLink('support', array('show_filter' => 1)), + 'index' => 200, + 'class' => '', + ), + array( + 'location' => 'support', + 'label' => 'Public tickets', + 'uri' => $this->di['url']->adminLink('support/public-tickets', array('status' => 'open')), + 'index' => 300, + 'class' => '', + ), + array( + 'location' => 'support', + 'label' => 'Canned responses', + 'uri' => $this->di['url']->adminLink('support/canned-responses'), + 'index' => 400, + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/support', 'get_index', array(), get_class($this)); + $app->get('/support/', 'get_index', array(), get_class($this)); + $app->get('/support/index', 'get_index', array(), get_class($this)); + $app->get('/support/ticket/:id','get_ticket', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/support/public-tickets', 'get_public_tickets', array(), get_class($this)); + $app->get('/support/public-ticket/:id', 'get_public_ticket', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/support/helpdesks', 'get_helpdesks', array(), get_class($this)); + $app->get('/support/helpdesk/:id', 'get_helpdesk', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/support/canned-responses', 'get_canned_list', null, get_class($this)); + $app->get('/support/canned/:id', 'get_canned', array('id'=>'[0-9]+'), get_class($this)); + $app->get('/support/canned-category/:id', 'get_canned_cat', array('id'=>'[0-9]+'), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_support_tickets'); + } + + public function get_ticket(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $ticket = $api->support_ticket_get(array('id'=>$id)); + + $cdm = ''; + $mod = $this->di['mod']('support'); + $config = $mod->getConfig(); + + try { + if(isset($config['delay_enable']) && $config['delay_enable'] && isset($config['delay_hours']) && $config['delay_hours'] >= 0) { + $last_message = end($ticket['messages']); + reset($ticket); + + $hours_passed = (round((time() - strtotime($last_message['created_at'])) / 3600) > $config['delay_hours']); + if($hours_passed) { + $delay_canned = $api->support_canned_get(array('id'=>$config['delay_message_id'])); + $cdm = $delay_canned['content']; + } + } + } catch (\Exception $e) { + error_log($e->getMessage()); + } + + return $app->render('mod_support_ticket', array('ticket'=>$ticket, 'canned_delay_message'=>$cdm)); + } + + public function get_public_tickets(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_support_public_tickets'); + } + + public function get_public_ticket(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $ticket = $api->support_public_ticket_get(array('id'=>$id)); + return $app->render('mod_support_public_ticket', array('ticket'=>$ticket)); + } + + public function get_helpdesk(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $helpdesk = $api->support_helpdesk_get(array('id'=>$id)); + return $app->render('mod_support_helpdesk', array('helpdesk'=>$helpdesk)); + } + + public function get_helpdesks(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_support_helpdesks'); + } + + public function get_canned_list(\Box_App $app) + { + $app->getApiAdmin(); + return $app->render('mod_support_canned_responses'); + } + + public function get_canned(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $c = $api->support_canned_get(array('id'=>$id)); + return $app->render('mod_support_canned_response', array('response'=>$c)); + } + + public function get_canned_cat(\Box_App $app, $id) + { + $api = $app->getApiAdmin(); + $c = $api->support_canned_category_get(array('id'=>$id)); + return $app->render('mod_support_canned_category', array('category'=>$c)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Support/Controller/Client.php b/src/bb-modules/Support/Controller/Client.php new file mode 100644 index 000000000..322201166 --- /dev/null +++ b/src/bb-modules/Support/Controller/Client.php @@ -0,0 +1,72 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/support', 'get_tickets', array(), get_class($this)); + $app->get('/support/ticket/:id', 'get_ticket', array(), get_class($this)); + $app->get('/support/contact-us', 'get_contact_us', array(), get_class($this)); + $app->get('/support/contact-us/conversation/:hash', 'get_contact_us_conversation', array('hash'=>'[a-z0-9]+'), get_class($this)); + } + + public function get_tickets(\Box_App $app) + { + $api = $app->getApiClient(); + return $app->render('mod_support_tickets'); + } + + public function get_ticket(\Box_App $app, $id) + { + $api = $app->getApiClient(); + $ticket = $api->support_ticket_get(array('id'=>$id)); + return $app->render('mod_support_ticket', array('ticket'=>$ticket)); + } + + public function get_contact_us(\Box_App $app) + { + return $app->render('mod_support_contact_us'); + } + + public function get_contact_us_conversation(\Box_App $app, $hash) + { + $api = $app->getApiGuest(); + $data = array( + 'hash' => $hash, + ); + $array = $api->support_ticket_get($data); + return $app->render('mod_support_contact_us_conversation', array('ticket'=>$array)); + } + +} \ No newline at end of file diff --git a/src/bb-modules/Support/Service.php b/src/bb-modules/Support/Service.php new file mode 100644 index 000000000..ba67f1b97 --- /dev/null +++ b/src/bb-modules/Support/Service.php @@ -0,0 +1,1482 @@ +di = $di; + } + + public function getDi() + { + return $this->di; + } + + public static function onAfterClientOpenTicket(\Box_Event $event) + { + $di = $event->getDi(); + $params = $event->getParameters(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + + try { + $ticketObj = $supportService->getTicketById($params['id']); + $identity = $di['loggedin_client']; + $ticketArr = $supportService->toApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to_client'] = $ticketObj->client_id; + $email['code'] = 'mod_support_ticket_open'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminOpenTicket(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + + try { + $ticketObj = $supportService->getTicketById($params['id']); + $identity = $di['loggedin_admin']; + $ticketArr = $supportService->toApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to_client'] = $ticketObj->client_id; + $email['code'] = 'mod_support_ticket_staff_open'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminCloseTicket(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $identity = $di['loggedin_admin']; + $ticketObj = $supportService->getTicketById($params['id']); + $ticketArr = $supportService->toApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to_client'] = $ticketObj->client_id; + $email['code'] = 'mod_support_ticket_staff_close'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminReplyTicket(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $ticketObj = $supportService->getTicketById($params['id']); + $identity = $di['loggedin_admin']; + $ticketArr = $supportService->toApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to_client'] = $ticketObj->client_id; + $email['code'] = 'mod_support_ticket_staff_reply'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterGuestPublicTicketOpen(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $ticketObj = $supportService->getPublicTicketById($params['id']); + $ticketArr = $supportService->publicToApiArray($ticketObj, true); + + $email = array(); + $email['to'] = $ticketArr['author_email']; + $email['to_name'] = $ticketArr['author_name']; + $email['code'] = 'mod_support_pticket_open'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminPublicTicketOpen(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $ticketObj = $supportService->getPublicTicketById($params['id']); + $identity = $di['loggedin_admin']; + $ticketArr = $supportService->publicToApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to'] = $ticketArr['author_email']; + $email['to_name'] = $ticketArr['author_name']; + $email['code'] = 'mod_support_pticket_staff_open'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminPublicTicketReply(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $ticketObj = $supportService->getPublicTicketById($params['id']); + $identity = $di['loggedin_admin']; + $ticketArr = $supportService->publicToApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to'] = $ticketArr['author_email']; + $email['to_name'] = $ticketArr['author_name']; + $email['code'] = 'mod_support_pticket_staff_reply'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public static function onAfterAdminPublicTicketClose(\Box_Event $event) + { + $di = $event->getDi(); + $supportService = $di['mod_service']('support'); + $emailService = $di['mod_service']('email'); + $params = $event->getParameters(); + + try { + $ticketObj = $supportService->getPublicTicketById($params['id']); + $identity = $di['loggedin_admin']; + $ticketArr = $supportService->publicToApiArray($ticketObj, true, $identity); + + $email = array(); + $email['to'] = $ticketArr['author_email']; + $email['to_name'] = $ticketArr['author_name']; + $email['code'] = 'mod_support_pticket_staff_close'; + $email['ticket'] = $ticketArr; + $emailService->sendTemplate($email); + } catch (\Exception $exc) { + error_log($exc->getMessage()); + } + } + + public function getTicketById($id) + { + return $this->di['db']->getExistingModelById('SupportTicket', $id, 'Ticket not found'); + } + + public function getPublicTicketById($id) + { + return $this->di['db']->getExistingModelById('SupportPTicket', $id, 'Ticket not found');; + } + + /** + * Return array of ticket statuses + */ + public function getStatuses() + { + $data = array( + \Model_SupportTicket::OPENED => 'Open', + \Model_SupportTicket::ONHOLD => 'On hold', + \Model_SupportTicket::CLOSED => 'Closed', + ); + + return $data; + } + + /** + * Find ticket for client + * @param Model_Client $c + * @param int $id + * @return Model_SupportTicket + */ + public function findOneByClient(\Model_Client $c, $id) + { + $bindings = array( + ':id' => $id, + ':client_id' => $c->id + ); + + $ticket = $this->di['db']->findOne('SupportTicket', 'id = :id AND client_id = :client_id', $bindings); + + if (!$ticket instanceof \Model_SupportTicket) { + throw new \Box_Exception('Ticket not found'); + } + + return $ticket; + } + + public function getSearchQuery($data) + { + $query = "SELECT st.* + FROM support_ticket st + JOIN support_ticket_message stm ON stm.support_ticket_id = st.id + LEFT JOIN client c ON st.client_id = c.id"; + + $search = isset($data['search']) ? $data['search'] : NULL; + $id = isset($data['id']) ? $data['id'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $client = isset($data['client']) ? $data['client'] : NULL; + $client_id = isset($data['client_id']) ? $data['client_id'] : NULL; + $order_id = isset($data['order_id']) ? $data['order_id'] : NULL; + $subject = isset($data['subject']) ? $data['subject'] : NULL; + $content = isset($data['content']) ? $data['content'] : NULL; + $helpdesk = isset($data['support_helpdesk_id']) ? $data['support_helpdesk_id'] : NULL; + $created_at = isset($data['created_at']) ? $data['created_at'] : NULL; + $date_from = isset($data['date_from']) ? $data['date_from'] : NULL; + $date_to = isset($data['date_to']) ? $data['date_to'] : NULL; + $priority = isset($data['priority']) ? $data['priority'] : NULL; + + $where = array(); + $bindings = array(); + + if ($id) { + $where[] = "st.id = :ticket_id"; + $bindings[':ticket_id'] = $id; + } + + if ($priority) { + $where[] = "st.priority = :priority"; + $bindings[':priority'] = $priority; + } + + if ($helpdesk) { + $where[] = "st.support_helpdesk_id = :support_helpdesk_id"; + $bindings[':support_helpdesk_id'] = $helpdesk; + } + + if ($client) { + $where[] = "c.first_name LIKE :first_name"; + $where[] = "c.last_name LIKE :last_name"; + $bindings[':first_name'] = "%" . $client . "%"; + $bindings[':last_name'] = "%" . $client . "%"; + } + + if ($client_id) { + $where[] = "c.id = :client_id"; + $bindings[':client_id'] = $client_id; + } + + if ($content) { + $where[] = "stm.content LIKE :content"; + $bindings[':content'] = "%" . $content . "%"; + } + + if ($subject) { + $where[] = "st.subject LIKE :subject"; + $bindings[':subject'] = "%" . $subject . "%"; + } + + if ($status) { + $where[] = "st.status = :status"; + $bindings[':status'] = $status; + } + + if ($order_id) { + $where[] = "st.rel_type = :rel_type AND st.rel_id = :rel_id"; + $bindings[':rel_type'] = \Model_SupportTicket::REL_TYPE_ORDER; + $bindings[':rel_id'] = $order_id; + } + + if ($created_at) { + $where[] = "DATE_FORMAT(st.created_at, '%Y-%m-%d') = :created_at"; + $bindings[':created_at'] = date('Y-m-d', strtotime($created_at)); + } + + if ($date_from) { + $where[] = "UNIX_TIMESTAMP(st.created_at) >= :date_from"; + $bindings[':date_from'] = strtotime($date_from); + } + + if ($date_to) { + $where[] = "UNIX_TIMESTAMP(st.created_at) <= :date_to"; + $bindings[':date_to'] = strtotime($date_to); + } + //smartSearch + if ($search) { + if (is_numeric($search)) { + $where[] = "st.id = :ticket_id"; + $bindings[':ticket_id'] = $search; + } else { + $search = "%" . $search . "%"; + $where[] = "(stm.content LIKE :content OR st.subject LIKE :subject)"; + $bindings[':content'] = $search; + $bindings[':subject'] = $search; + } + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " GROUP BY st.id ORDER BY stm.created_at DESC, st.priority ASC, st.id DESC"; + + return array($query, $bindings); + } + + public function counter() + { + $query = "SELECT status, COUNT(id) as counter + FROM support_ticket + GROUP BY status"; + + $data = $this->di['db']->getAssoc($query); + + return array( + 'total' => array_sum($data), + \Model_SupportTicket::OPENED => isset($data[\Model_SupportTicket::OPENED]) ? $data[\Model_SupportTicket::OPENED] : 0, + \Model_SupportTicket::CLOSED => isset($data[\Model_SupportTicket::CLOSED]) ? $data[\Model_SupportTicket::CLOSED] : 0, + \Model_SupportTicket::ONHOLD => isset($data[\Model_SupportTicket::ONHOLD]) ? $data[\Model_SupportTicket::ONHOLD] : 0, + ); + } + + public function getLatest() + { + return $this->di['db']->find('SupportTicket', 'ORDER BY id DESC LIMIT 10'); + } + + public function getExpired() + { + $bindings = array( + ':status' => \Model_SupportTicket::ONHOLD + ); + + $sql = "SELECT st.* + FROM support_ticket as st + LEFT JOIN support_helpdesk sh ON sh.id = st.support_helpdesk_id + WHERE st.status = :status + AND DATE_ADD(st.updated_at, INTERVAL sh.close_after HOUR) < NOW() + ORDER BY st.id ASC"; + $result = $this->di['db']->getAll($sql, $bindings); + return $this->di['db']->convertToModels('SupportTicket', $result); + } + + public function countByStatus($status) + { + $query = "SELECT COUNT(m.id) as counter FROM support_ticket + WHERE status = :status GROUP BY status LIMIT 1"; + + return $this->di['db']->getCell($query, array(':status' => $status)); + } + + public function getActiveTicketsCountForOrder(\Model_ClientOrder $model) + { + $query = "SELECT COUNT(id) as counter FROM support_ticket + WHERE rel_id = :order_id + AND rel_type = 'order' + AND (status = :status1 OR status = :status2)"; + + $bindings = array( + ':order_id' => $model->id, + ':status1' => \Model_SupportTicket::OPENED, + ':status2' => \Model_SupportTicket::ONHOLD, + ); + + return $this->di['db']->getCell($query, $bindings); + } + + public function checkIfTaskAlreadyExists(\Model_Client $client, $rel_id, $rel_type, $rel_task) + { + $bindings = array( + ':client_id' => $client->id, + ':rel_id' => $rel_id, + ':rel_type' => $rel_type, + ':rel_task' => $rel_task, + ':rel_status' => \Model_SupportTicket::REL_STATUS_PENDING + ); + + $ticket = $this->di['db']->findOne( + 'SupportTicket', + 'client_id = :client_id + AND rel_id = :rel_id + AND rel_type = :rel_type + AND rel_task = :rel_task + AND rel_status = :rel_status', + $bindings); + + return ($ticket instanceof \Model_SupportTicket); + } + + public function closeTicket(\Model_SupportTicket $ticket, $identity) + { + $ticket->status = \Model_SupportTicket::CLOSED; + $ticket->updated_at = date('c'); + + $this->di['db']->store($ticket); + + if ($identity instanceof \Model_Admin) { + $this->di['events_manager']->fire(array('event' => 'onAfterAdminCloseTicket', 'params' => array('id' => $ticket->id))); + } elseif ($identity instanceof \Model_Client) { + $this->di['events_manager']->fire(array('event' => 'onAfterClientCloseTicket', 'params' => array('id' => $ticket->id))); + } + + $this->di['logger']->info('Closed ticket "%s"', $ticket->id); + + return true; + } + + public function autoClose(\Model_SupportTicket $model) + { + $model->status = \Model_SupportTicket::CLOSED; + $model->updated_at = date('c'); + + $this->di['db']->store($model); + $this->di['logger']->info('Ticket %s was closed', $model->id); + + return TRUE; + } + + public function canBeReopened(\Model_SupportTicket $model) + { + if ($model->status != \Model_SupportTicket::CLOSED) { + return true; + } + + $helpdesk = $this->di['db']->getExistingModelById('SupportHelpdesk', $model->support_helpdesk_id); + + return (bool)$helpdesk->can_reopen; + } + + private function _getRelDetails(\Model_SupportTicket $model) + { + if (!$model->rel_type || !$model->rel_id) { + return array(); + } + + $result = array( + 'id' => $model->rel_id, + 'type' => $model->rel_type, + 'task' => $model->rel_task, + 'new_value' => $model->rel_new_value, + 'status' => $model->rel_status, + ); + + $client = $this->di['db']->load('Client', $model->client_id); + + if ($model->rel_type == \Model_SupportTicket::REL_TYPE_ORDER) { + $orderService = $this->di['mod_service']('order'); + $o = $orderService->findForClientById($client, $model->rel_id); + if ($o instanceof \Model_ClientOrder) { + $result['order'] = $orderService->toApiArray($o, false); + } + } + + return $result; + } + + public function rmByClient(\Model_Client $client) + { + $clientTickets = $this->di['db']->find('SupportTicket', 'client_id = :client_id', array(':client_id' => $client->id)); + foreach ($clientTickets as $ticket) { + $this->di['db']->trash($ticket); + } + } + + public function rm(\Model_SupportTicket $model) + { + $supportTicketNotes = $this->di['db']->find('SupportTicketNote', 'support_ticket_id = :support_ticket_id', array(':support_ticket_id' => $model->id)); + foreach ($supportTicketNotes as $note) { + $this->di['db']->trash($note); + } + + $supportTicketMessages = $this->di['db']->find('SupportTicketMessage', 'support_ticket_id = :support_ticket_id', array(':support_ticket_id' => $model->id)); + foreach ($supportTicketMessages as $message) { + $this->di['db']->trash($message); + } + + $id = $model->id; + + $this->di['db']->trash($model); + + $this->di['logger']->info('Removed ticket "%s"', $id); + + return true; + } + + public function toApiArray(\Model_SupportTicket $model, $deep = true, $identity = null) + { + $firstSupportTicketMessage = $this->di['db']->findOne('SupportTicketMessage', 'support_ticket_id = :support_ticket_id ORDER by id ASC LIMIT 1', array(':support_ticket_id' => $model->id)); + $supportHelpdesk = $this->di['db']->load('SupportHelpdesk', $model->support_helpdesk_id); + + $data = $this->di['db']->toArray($model); + $data['replies'] = $this->messageGetRepliesCount($model); + $data['first'] = $this->messageToApiArray($firstSupportTicketMessage); + $data['helpdesk'] = $this->helpdeskToApiArray($supportHelpdesk); + + if ($deep) { + $messages = $this->messageGetTicketMessages($model); + foreach ($messages as $msg) { + $data['messages'][] = $this->messageToApiArray($msg); + } + } + + if ($identity instanceof \Model_Admin) { + $data['rel'] = $this->_getRelDetails($model); + $data['priority'] = $model->priority; + $data['client'] = $this->getClientApiArrayForTicket($model); + $supportTicketNotes = $this->di['db']->find('SupportTicketNote', 'support_ticket_id = :support_ticket_id', array(':support_ticket_id' => $model->id)); + + foreach ($supportTicketNotes as $note) { + $data['notes'][] = $this->noteToApiArray($note); + } + } + + return $data; + } + + public function getClientApiArrayForTicket(\Model_SupportTicket $ticket) + { + $client = $this->di['db']->load('Client', $ticket->client_id); + + if ($client instanceof \Model_Client) { + $clientService = $this->di['mod_service']('client'); + + return $clientService->toApiArray($client); + } else { + error_log('Missing client for ticket ' . $ticket->id); + + return array(); + } + } + + public function noteGetAuthorDetails(\Model_SupportTicketNote $model) + { + $admin = $this->di['db']->load('Admin', $model->admin_id); + + return array( + 'name' => $admin->getFullName(), + 'email' => $admin->email, + ); + } + + public function noteRm(\Model_SupportTicketNote $model) + { + $id = $model->id; + $this->di['db']->trash($model); + + $this->di['logger']->info('Removed note #%s', $id); + + return true; + } + + public function noteToApiArray(\Model_SupportTicketNote $model, $deep = false, $identity = null) + { + $data = $this->di['db']->toArray($model); + $data['author'] = $this->noteGetAuthorDetails($model); + + return $data; + } + + public function helpdeskGetSearchQuery($data) + { + $query = "SELECT * FROM support_helpdesk"; + + $search = isset($data['search']) ? $data['search'] : NULL; + + $where = array(); + $bindings = array(); + + if ($search) { + $search = "%" . $search . "%"; + $where[] = "(name LIKE :name OR email LIKE :email OR signature LIKE :signature)"; + $bindings[':name'] = $search; + $bindings[':email'] = $search; + $bindings[':signature'] = $search; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + $query .= " ORDER BY id DESC"; + + return array($query, $bindings); + } + + public function helpdeskGetPairs() + { + return $this->di['db']->getAssoc("SELECT id, name FROM support_helpdesk");; + } + + public function helpdeskRm(\Model_SupportHelpdesk $model) + { + $id = $model->id; + + $tickets = $this->di['db']->find('SupportTicket', 'support_helpdesk_id = :support_helpdesk_id', array(':support_helpdesk_id' => $model->id)); + if (count($tickets) > 0) { + throw new \Box_Exception('Can not remove helpdesk which has tickets'); + } + $this->di['db']->trash($model); + $this->di['logger']->info('Deleted helpdesk #%s', $id); + return true; + } + + public function helpdeskToApiArray(\Model_SupportHelpdesk $model) + { + return $this->di['db']->toArray($model); + } + + public function messageGetTicketMessages(\Model_SupportTicket $model) + { + return $this->di['db']->find('supportTicketMessage', 'support_ticket_id = :support_ticket_id ORDER BY id ASC', array(':support_ticket_id' => $model->id)); + } + + public function messageGetRepliesCount(\Model_SupportTicket $model) + { + $query = "SELECT COUNT(id) as counter + FROM support_ticket_message + WHERE support_ticket_id = :support_ticket_id + GROUP BY support_ticket_id"; + + $bindings = array( + ':support_ticket_id' => $model->id + ); + + return $this->di['db']->getCell($query, $bindings); + } + + public function messageGetAuthorDetails(\Model_SupportTicketMessage $model) + { + if ($model->admin_id) { + $author = $this->di['db']->load('Admin', $model->admin_id); + } else { + $author = $this->di['db']->load('Client', $model->client_id);; + } + + return array( + 'name' => $author->getFullName(), + 'email' => $author->email, + ); + } + + public function messageToApiArray(\Model_SupportTicketMessage $model) + { + $data = $this->di['db']->toArray($model); + $data['author'] = $this->messageGetAuthorDetails($model); + + return $data; + } + + public function ticketUpdate(\Model_SupportTicket $model, $data) + { + if (isset($data['support_helpdesk_id'])) { + $model->support_helpdesk_id = $data['support_helpdesk_id']; + } + + if (isset($data['status'])) { + $model->status = $data['status']; + } + + if (isset($data['subject'])) { + $model->subject = $data['subject']; + } + + if (isset($data['priority'])) { + $model->priority = $data['priority']; + } + + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + $this->di['logger']->info('Updated ticket #%s', $model->id); + + return true; + } + + public function ticketMessageUpdate(\Model_SupportTicketMessage $model, $content) + { + $model->content = $content; + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + return true; + } + + public function ticketReply(\Model_SupportTicket $ticket, $identity, $content) + { + $msg = $this->di['db']->dispense('SupportTicketMessage'); + $msg->support_ticket_id = $ticket->id; + if ($identity instanceof \Model_Admin) { + $msg->admin_id = $identity->id; + } elseif ($identity instanceof \Model_Client) { + $msg->client_id = $identity->id; + } + $msg->content = $content; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $msgId = $this->di['db']->store($msg); + + if ($identity instanceof \Model_Admin) { + $ticket->status = \Model_SupportTicket::ONHOLD; + } elseif ($identity instanceof \Model_Client) { + $ticket->status = \Model_SupportTicket::OPENED; + } + + $ticket->updated_at = date('c'); + $this->di['db']->store($ticket); + + if ($identity instanceof \Model_Admin) { + $this->di['events_manager']->fire(array('event' => 'onAfterAdminReplyTicket', 'params' => array('id' => $ticket->id))); + } elseif ($identity instanceof \Model_Client) { + $this->di['events_manager']->fire(array('event' => 'onAfterClientReplyTicket', 'params' => array('id' => $ticket->id))); + } + + $this->di['logger']->info('Replied to ticket "%s"', $ticket->id); + + return $msgId; + } + + public function ticketCreateForAdmin(\Model_Client $client, \Model_SupportHelpdesk $helpdesk, $data, \Model_Admin $identity) + { + $status = isset($data['status']) ? $data['status'] : \Model_SupportTicket::ONHOLD; + + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminOpenTicket', 'params' => $data)); + + $ticket = $this->di['db']->dispense('SupportTicket');; + $ticket->client_id = $client->id; + $ticket->status = $status; + $ticket->subject = $data['subject']; + $ticket->support_helpdesk_id = $helpdesk->id; + $ticket->created_at = date('c'); + $ticket->updated_at = date('c'); + $ticketId = $this->di['db']->store($ticket); + + $msg = $this->di['db']->dispense('SupportTicketMessage'); + $msg->admin_id = $identity->id; + $msg->support_ticket_id = $ticketId; + $msg->content = $data['content']; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminOpenTicket', 'params' => array('id' => $ticketId))); + + $this->di['logger']->info('Admin opened new ticket "%s"', $ticketId); + + return (int)$ticketId; + } + + public function ticketCreateForGuest($data) + { + $this->di['validator']->isEmailValid($data['email']); + + $event_params = $data; + $event_params['ip'] = $this->di['request']->getClientAddress(); + $altered = $this->di['events_manager']->fire(array('event' => 'onBeforeGuestPublicTicketOpen', 'params' => $event_params)); + + $status = isset($altered['status']) ? $altered['status'] : 'open'; + $subject = isset($altered['subject']) ? $altered['subject'] : $data['subject']; + $message = isset($altered['message']) ? $altered['message'] : $data['message']; + + $ticket = $this->di['db']->dispense('SupportPTicket'); + $ticket->hash = sha1(uniqid()); + $ticket->author_name = $data['name']; + $ticket->author_email = $data['email']; + $ticket->subject = $subject; + $ticket->status = $status; + $ticket->created_at = date('c'); + $ticket->updated_at = date('c'); + $ticketId = $this->di['db']->store($ticket); + + $msg = $this->di['db']->dispense('SupportPTicketMessage'); + $msg->support_p_ticket_id = $ticket->id; + $msg->content = $message; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $this->di['events_manager']->fire(array('event' => 'onAfterGuestPublicTicketOpen', 'params' => array('id' => $ticketId))); + + $this->di['logger']->info('"%s" opened public ticket "%s"', $ticket->author_email, $ticketId); + + return $ticket->hash; + } + + public function ticketCreateForClient(\Model_Client $client, \Model_SupportHelpdesk $helpdesk, array $data) + { + //@todo validate task params + $rel_id = isset($data['rel_id']) ? $data['rel_id'] : NULL; + $rel_type = isset($data['rel_type']) ? $data['rel_type'] : NULL; + $rel_task = isset($data['rel_task']) ? $data['rel_task'] : NULL; + $rel_new_value = isset($data['rel_new_value']) ? $data['rel_new_value'] : NULL; + $rel_status = isset($data['rel_task']) ? \Model_SupportTicket::REL_STATUS_PENDING : \Model_SupportTicket::REL_STATUS_COMPLETE; + + // check if support ticket with same uncompleted task already exists + if ($rel_id && $rel_type && $rel_task && $this->checkIfTaskAlreadyExists($client, $rel_id, $rel_type, $rel_task)) { + throw new \Box_Exception('We have already received this request.'); + } + + $event_params = $data; + $event_params['client_id'] = $client->id; + $this->di['events_manager']->fire(array('event' => 'onBeforeClientOpenTicket', 'params' => $event_params)); + + + $ticket = $this->di['db']->dispense('SupportTicket'); + $ticket->client_id = $client->id; + $ticket->subject = $data['subject']; + $ticket->support_helpdesk_id = $helpdesk->id; + $ticket->created_at = date('c'); + $ticket->updated_at = date('c'); + + // related task with ticket + $ticket->rel_id = $rel_id; + $ticket->rel_type = $rel_type; + $ticket->rel_task = $rel_task; + $ticket->rel_new_value = $rel_new_value; + $ticket->rel_status = $rel_status; + + $ticketId = $this->di['db']->store($ticket); + + $this->messageCreateForTicket($ticket, $client, $data['content']); + + $this->di['events_manager']->fire(array('event' => 'onAfterClientOpenTicket', 'params' => array('id' => $ticket->id))); + + $mod = $this->di['mod']('support'); + $config = $mod->getConfig(); + if (isset($config['autorespond_enable']) + && $config['autorespond_enable'] + && isset($config['autorespond_message_id']) + && !empty($config['autorespond_message_id']) + ) { + try { + $cannedObj = $this->di['db']->getExistingModelById('SupportPr', $config['autorespond_message_id'], 'Canned reply not found'); + $canned = $this->cannedToApiArray($cannedObj); + $staffService = $this->di['mod_service']('staff'); + $admin = $staffService->getCronAdmin(); + if (isset($canned['content']) && $admin instanceof \Model_Admin){ + $this->ticketReply($ticket, $admin, $canned['content']); + } + + } catch (\Exception $e) { + error_log($e->getMessage()); + } + } + + $this->di['logger']->info('Submitted new ticket "%s"', $ticketId); + + return (int)$ticketId; + } + + public function messageCreateForTicket(\Model_SupportTicket $ticket, $identity, $content) + { + $msg = $this->di['db']->dispense('SupportTicketMessage'); + $msg->support_ticket_id = $ticket->id; + if ($identity instanceof \Model_Admin) { + $msg->admin_id = $identity->id; + } elseif ($identity instanceof \Model_Client) { + $msg->client_id = $identity->id; + } else { + throw new \Box_Exception('Identity is not valid'); + } + $msg->content = $content; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + + return $this->di['db']->store($msg); + } + + public function publicGetStatuses() + { + $data = array( + \Model_SupportPTicket::OPENED => 'Open', + \Model_SupportPTicket::ONHOLD => 'On hold', + \Model_SupportPTicket::CLOSED => 'Closed', + ); + + return $data; + } + + public function publicFindOneByHash($hash) + { + $bindings = array( + ':hash' => $hash + ); + + $publicTicket = $this->di['db']->findOne('SupportPTicket', 'hash = :hash', $bindings); + if (!$publicTicket instanceof \Model_SupportPTicket) { + throw new \Box_Exception('Public ticket not found'); + } + + return $publicTicket; + } + + public function publicGetSearchQuery($data) + { + $query = "SELECT spt.* FROM support_p_ticket spt + LEFT JOIN support_p_ticket_message sptm + ON spt.id = sptm.support_p_ticket_id"; + + $search = isset($data['search']) ? $data['search'] : NULL; + + $id = isset($data['id']) ? $data['id'] : NULL; + $status = isset($data['status']) ? $data['status'] : NULL; + $name = isset($data['name']) ? $data['name'] : NULL; + $email = isset($data['email']) ? $data['email'] : NULL; + $subject = isset($data['subject']) ? $data['subject'] : NULL; + $content = isset($data['content']) ? $data['content'] : NULL; + + $where = array(); + $bindings = array(); + + if ($id) { + $where[] = "spt.id = :p_ticket_id"; + $bindings[':p_ticket_id'] = $id; + } + + if ($status) { + $where[] = "spt.status = :p_ticket_status"; + $bindings[':p_ticket_status'] = $status; + } + + if ($email) { + $where[] = "spt.author_email = :p_ticket_author_email"; + $bindings[':p_ticket_author_email'] = $email; + } + + if ($name) { + $where[] = "spt.author_name = :p_ticket_author_name"; + $bindings[':p_ticket_author_name'] = $name; + } + + if ($content) { + $where[] = "spt.content LIKE :p_ticket_content"; + $bindings[':p_ticket_content'] = "%$content%"; + } + + if ($subject) { + $where[] = "spt.subject LIKE :p_ticket_subject"; + $bindings[':p_ticket_subject'] = "%$subject%"; + } + + //smartSearch + if ($search) { + if (is_numeric($search)) { + $where[] = "spt.id = :p_ticket_id"; + $bindings[':p_ticket_id'] = $search; + } else { + $search = "%" . $search . "%"; + $where[] = "sptm.content LIKE :p_message_content OR spt.subject LIKE :p_ticket_subject"; + $bindings[':p_message_content'] = $search; + $bindings[':p_ticket_subject'] = $search; + } + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " GROUP BY spt.id ORDER BY spt.id DESC, sptm.id ASC"; + + return array($query, $bindings); + } + + public function publicCounter() + { + $query = "SELECT status, COUNT(id) as counter + FROM support_p_ticket + GROUP BY status"; + + $data = $this->di['db']->getAssoc($query); + + return array( + 'total' => array_sum($data), + \Model_SupportPTicket::OPENED => isset($data[\Model_SupportPTicket::OPENED]) ? $data[\Model_SupportPTicket::OPENED] : 0, + \Model_SupportPTicket::CLOSED => isset($data[\Model_SupportPTicket::CLOSED]) ? $data[\Model_SupportPTicket::CLOSED] : 0, + \Model_SupportPTicket::ONHOLD => isset($data[\Model_SupportPTicket::ONHOLD]) ? $data[\Model_SupportPTicket::ONHOLD] : 0, + ); + } + + public function publicGetLatest() + { + return $this->di['db']->find('SupportPTicket', 'ORDER BY id DESC Limit 10'); + } + + public function publicCountByStatus($status) + { + $query = "SELECT COUNT(id) as counter + FROM support_p_ticket + WHERE status = :status + GROUP BY status"; + + return $this->di['db']->getCell($query, array(':status' => $status)); + } + + public function publicGetExpired() + { + $bindings = array( + ':status' => \Model_SupportPTicket::ONHOLD + ); + + $publicTicket = $this->di['db']->find('SupportPTicket', 'status = :status AND DATE_ADD(updated_at, INTERVAL 48 HOUR) < NOW() ORDER BY id ASC', $bindings); + + return $publicTicket; + } + + public function publicCloseTicket(\Model_SupportPTicket $model, $identity) + { + $model->status = 'closed'; + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + if ($identity instanceof \Model_Admin) { + $this->di['events_manager']->fire(array('event' => 'onAfterAdminPublicTicketClose', 'params' => array('id' => $model->id))); + $this->di['logger']->info('Public Ticket %s was closed', $model->id); + } elseif ($identity instanceof \Model_Guest) { + $this->di['events_manager']->fire(array('event' => 'onAfterGuestPublicTicketClose', 'params' => array('id' => $model->id))); + $this->di['logger']->info('"%s" closed public ticket "%s"', $model->author_email, $model->id); + + } + + return true; + } + + public function publicAutoClose(\Model_SupportPTicket $model) + { + $model->status = 'closed'; + $model->updated_at = date('c'); + + $this->di['db']->store($model); + + $this->di['logger']->info('Public Ticket %s was closed', $model->id); + + return TRUE; + } + + public function publicRm(\Model_SupportPTicket $model) + { + $id = $model->id; + $bindings = array( + ':support_p_ticket_id' => $model->id + ); + $messages = $this->di['db']->find('SupportPTicketMessage', 'support_p_ticket_id = :support_p_ticket_id', $bindings); + + foreach ($messages as $message) { + $this->di['db']->trash($message); + } + + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted public ticket #%s', $id); + + return true; + } + + public function publicToApiArray(\Model_SupportPTicket $model, $deep = true) + { + $data = $this->di['db']->toArray($model); + $messages = array(); + $messagesArr = $this->di['db']->find('SupportPTicketMessage', 'support_p_ticket_id = :support_p_ticket_id', array(':support_p_ticket_id' => $model->id)); + foreach ($messagesArr as $msg) { + $messages[] = $this->publicMessageToApiArray($msg); + } + + $first = $this->di['db']->findOne('SupportPTicketMessage', 'support_p_ticket_id = :support_p_ticket_id LIMIT 1', array(':support_p_ticket_id' => $model->id)); + if ($first instanceof \Model_SupportPTicketMessage) { + $data['author'] = $this->publicMessageGetAuthorDetails($first); + } else { + $data['author'] = array(); + } + $data['messages'] = $messages; + + return $data; + } + + public function publicMessageGetAuthorDetails(\Model_SupportPTicketMessage $model) + { + if ($model->admin_id) { + $author = $this->di['db']->getExistingModelById('Admin', $model->admin_id); + + return array( + 'name' => $author->getFullName(), + 'email' => $author->email, + ); + } + + $ticket = $this->di['db']->getExistingModelById('SupportPTicket', $model->support_p_ticket_id); + + return array( + 'name' => $ticket->author_name, + 'email' => $ticket->author_email, + ); + } + + public function publicMessageToApiArray(\Model_SupportPTicketMessage $model, $deep = true) + { + $data = $this->di['db']->toArray($model); + $data['author'] = $this->publicMessageGetAuthorDetails($model); + + return $data; + } + + public function publicTicketCreate($data, \Model_Admin $identity) + { + $this->di['validator']->isEmailValid($data['email']); + + $this->di['events_manager']->fire(array('event' => 'onBeforeAdminPublicTicketOpen', 'params' => $data)); + + $ticket = $this->di['db']->dispense('SupportPTicket'); + $ticket->hash = sha1(uniqid()); + $ticket->author_name = $data['name']; + $ticket->author_email = $data['email']; + $ticket->subject = $data['subject']; + $ticket->status = 'open'; + $ticket->created_at = date('c'); + $ticket->updated_at = date('c'); + $ticketId = $this->di['db']->store($ticket); + + $msg = $this->di['db']->dispense('SupportPTicketMessage'); + $msg->support_p_ticket_id = $ticketId; + $msg->admin_id = $identity->id; + $msg->content = $data['message']; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminPublicTicketOpen', 'params' => array('id' => $ticketId))); + + $this->di['logger']->info('Opened public ticket for email "%s"', $ticket->author_email); + + return $ticketId; + } + + public function publicTicketUpdate(\Model_SupportPTicket $model, $data) + { + if (isset($data['subject'])) { + $model->subject = $data['subject']; + } + + if (isset($data['status'])) { + $model->status = $data['status']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated public ticket #%s', $model->id); + + return true; + } + + public function publicTicketReply(\Model_SupportPTicket $ticket, \Model_Admin $identity, $content) + { + $msg = $this->di['db']->dispense('SupportPTicketMessage'); + $msg->support_p_ticket_id = $ticket->id; + $msg->admin_id = $identity->id; + $msg->content = $content; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $messageId = $this->di['db']->store($msg); + + $ticket->status = \Model_SupportPTicket::ONHOLD; + $ticket->updated_at = date('c'); + $this->di['db']->store($ticket); + + $this->di['events_manager']->fire(array('event' => 'onAfterAdminPublicTicketReply', 'params' => array('id' => $ticket->id))); + + $this->di['logger']->info('Replied to public ticket "%s"', $ticket->id); + + return $messageId; + } + + public function publicTicketReplyForGuest(\Model_SupportPTicket $ticket, $message) + { + $msg = $this->di['db']->dispense('SupportPTicketMessage'); + $msg->support_p_ticket_id = $ticket->id; + $msg->content = $message; + $msg->ip = $this->di['request']->getClientAddress(); + $msg->created_at = date('c'); + $msg->updated_at = date('c'); + $this->di['db']->store($msg); + + $ticket->status = \Model_SupportPTicket::OPENED; + $ticket->updated_at = date('c'); + $this->di['db']->store($ticket); + + $this->di['events_manager']->fire(array('event' => 'onAfterGuestPublicTicketReply', 'params' => array('id' => $ticket->id))); + + $this->di['logger']->info('Client "%s" replied to public ticket "%s"', $ticket->author_email, $ticket->id); + + return $ticket->hash; + } + + public function helpdeskUpdate(\Model_SupportHelpdesk $model, $data) + { + if (isset ($data['name'])) { + $model->name = $data['name']; + } + + if (isset ($data['email'])) { + $model->email = $data['email']; + } + + if (isset ($data['can_reopen'])) { + $model->can_reopen = $data['can_reopen']; + } + + if (isset ($data['close_after'])) { + $model->close_after = $data['close_after']; + } + + if (isset ($data['signature'])) { + $model->signature = $data['signature']; + } + + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Updated helpdesk #%s', $id); + + return true; + } + + public function helpdeskCreate($data) + { + $model = $this->di['db']->dispense('SupportHelpdesk'); + $model->name = $data['name']; + $model->email = isset($data['email']) ? $data['email'] : NULL; + $model->can_reopen = isset($data['can_reopen']) ? $data['can_reopen'] : NULL; + $model->close_after = isset($data['close_after']) ? $data['close_after'] : NULL; + $model->signature = isset($data['signature']) ? $data['signature'] : NULL; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created helpdesk #%s', $id); + + return $id; + } + + public function cannedGetSearchQuery($data) + { + $query = "SELECT sp.* FROM support_pr sp + LEFT JOIN support_pr_category spc + ON spc.id = sp.support_pr_category_id"; + + $search = isset($data['search']) ? $data['search'] : NULL; + + $where = array(); + $bindings = array(); + + if ($search) { + $search = "%" . $search . "%"; + $where[] = "title LIKE :title OR content LIKE :content"; + $bindings[':title'] = $search; + $bindings[':content'] = $search; + } + + if (!empty($where)) { + $query = $query . ' WHERE ' . implode(' AND ', $where); + } + + $query .= " ORDER BY sp.support_pr_category_id ASC"; + + return array($query, $bindings); + } + + public function cannedGetGroupedPairs() + { + $query = "SELECT sp.title as r_title, spc.title as c_title FROM support_pr sp + LEFT JOIN support_pr_category spc + ON spc.id = sp.support_pr_category_id"; + + $data = $this->di['db']->getAll($query); + $res = array(); + foreach ($data as $r) { + $res[$r['c_title']][$r['id']] = $r['r_title']; + } + + return $res; + } + + public function cannedRm(\Model_SupportPr $model) + { + $id = $model->id; + + $this->di['db']->trash($model); + + $this->di['logger']->info('Deleted canned reponse #%s', $id); + + return true; + } + + public function cannedToApiArray(\Model_SupportPr $model) + { + $result = $this->di['db']->toArray($model); + $category = $this->di['db']->load('SupportPrCategory', $model->support_pr_category_id); + if ($category instanceof \Model_SupportPrCategory) { + $result['category'] = array( + 'id' => $category->id, + 'title' => $category->title, + ); + } else { + $result['category'] = array(); + } + + return $result; + } + + public function cannedCategoryGetPairs() + { + return $this->di['db']->getAssoc("SELECT id, title FROM support_pr_category"); + } + + public function cannedCategoryRm(\Model_SupportPrCategory $model) + { + $id = $model->id; + $this->di['db']->trash($model); + $this->di['logger']->info('Deleted canned response category #%s', $id); + + return true; + } + + public function cannedCategoryToApiArray(\Model_SupportPrCategory $model) + { + return $this->di['db']->toArray($model); + } + + public function cannedCreate($title, $categoryId, $content = null) + { + $systemService = $this->di['mod_service']('system'); + $systemService->checkLimits('Model_SupportPr', 5); + + $model = $this->di['db']->dispense('SupportPr'); + $model->support_pr_category_id = $categoryId; + $model->title = $title; + $model->content = $content; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created new canned response #%s', $id); + + return $id; + } + + public function cannedUpdate(\Model_SupportPr $model, $data) + { + if (isset($data['category_id'])) { + $model->support_pr_category_id = $data['category_id']; + } + + if (isset($data['title'])) { + $model->title = $data['title']; + } + + if (isset($data['content'])) { + $model->content = $data['content']; + } + + $model->updated_at = date('c'); + $this->di['db']->store($model); + + $this->di['logger']->info('Updated canned response #%s', $model->id); + + return true; + } + + public function cannedCategoryCreate($title) + { + $model = $this->di['db']->dispense('SupportPrCategory'); + $model->title = $title; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Created new canned response category #%s', $id); + + return $id; + } + + public function cannedCategoryUpdate(\Model_SupportPrCategory $model, $title) + { + $model->title = $title; + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Updated canned response category #%s', $id); + + return true; + } + + public function noteCreate(\Model_SupportTicket $ticket, \Model_Admin $identity, $note) + { + $model = $this->di['db']->dispense('SupportTicketNote'); + $model->support_ticket_id = $ticket->id; + $model->admin_id = $identity->id; + $model->note = $note; + $model->created_at = date('c'); + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Added note to ticket #%s', $id); + + return $id; + } + + public function ticketTaskComplete(\Model_SupportTicket $model) + { + $model->rel_status = \Model_SupportTicket::REL_STATUS_COMPLETE; + $model->updated_at = date('c'); + $id = $this->di['db']->store($model); + + $this->di['logger']->info('Marked ticket #%s task as complete', $id); + + return true; + } + +} \ No newline at end of file diff --git a/src/bb-modules/Support/html_admin/mod_support_canned_selector.phtml b/src/bb-modules/Support/html_admin/mod_support_canned_selector.phtml new file mode 100644 index 000000000..ee82277e0 --- /dev/null +++ b/src/bb-modules/Support/html_admin/mod_support_canned_selector.phtml @@ -0,0 +1,23 @@ +
          + +
          + + + diff --git a/src/bb-modules/Support/html_admin/mod_support_helpdesk.phtml b/src/bb-modules/Support/html_admin/mod_support_helpdesk.phtml new file mode 100644 index 000000000..7028cc88f --- /dev/null +++ b/src/bb-modules/Support/html_admin/mod_support_helpdesk.phtml @@ -0,0 +1,72 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ helpdesk.name }}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {{ helpdesk.name }}
          +
          + +
          +

          {% trans 'Support help desk' %}

          +

          {% trans 'Help desk name will be visible for clients when submitting new ticket. Define very large number of hours to disable auto close ticket option' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_admin/mod_support_settings.phtml b/src/bb-modules/Support/html_admin/mod_support_settings.phtml new file mode 100644 index 000000000..ae9cf6487 --- /dev/null +++ b/src/bb-modules/Support/html_admin/mod_support_settings.phtml @@ -0,0 +1,211 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Support settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + + + +
          +
          +
          + + {% set params = admin.extension_config_get({"ext":"mod_support"}) %} + +
          + +
          + {% trans 'Auto responder settings' %} +
          + +
          + + +
          +
          +
          + +
          +
          + +
          + +
          +
          +
          +
          +
          + +
          + {% trans 'Delay message - selected canned response message will be added to default reply message' %} +
          + +
          + + +
          +
          +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + + + +
          +
          +
          + +
          + + {{ mf.table_search }} + + + + + + + + + + + + {% for helpdesk in admin.support_helpdesk_get_list({"per_page":50, "page":request.page}|merge(request)).list %} + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Title' %}{% trans 'Email' %}{% trans 'Close tickets after' %} 
          {{ helpdesk.name }}{{ helpdesk.email }}{{ helpdesk.close_after }} hour(s) + + +
          + {% trans 'The list is empty' %} +
          + +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + + +
          +
          + +
          +
          + +
          +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_client/mod_support_contact_us.phtml b/src/bb-modules/Support/html_client/mod_support_contact_us.phtml new file mode 100644 index 000000000..f84acce9b --- /dev/null +++ b/src/bb-modules/Support/html_client/mod_support_contact_us.phtml @@ -0,0 +1,111 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Contact us' %}{% endblock %} +{% block breadcrumb %}{% trans 'Contact us' %}{% endblock %} + +{% block content %} +{% set company = guest.system_company %} +
          +
          +
          +
          +
          +

          {% trans 'Contact us' %}

          +

          {{ company.signature }}

          +
          +
          +
          +
          +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + +
          + +
          + +
          +
          + + + {{ mf.recaptcha }} +
          +
          + +
          +
          + + +
          + + +
          + + +
          +
          + {{ company.name }} +
          +
          + {{ company.address_1 }} +
          +
          + {{ company.address_2 }} +
          +
          + {{ company.address_3 }} +
          +
          + {{ company.tel }} +
          +
          + {{ company.www }} +
          +
          + {{ company.email }} +
          +
          +
          +
          + +
          +
          +
          +
          +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-modules/Support/html_client/mod_support_contact_us_conversation.phtml b/src/bb-modules/Support/html_client/mod_support_contact_us_conversation.phtml new file mode 100644 index 000000000..8164d5b12 --- /dev/null +++ b/src/bb-modules/Support/html_client/mod_support_contact_us_conversation.phtml @@ -0,0 +1,147 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}}{% endblock %} +{% block breadcrumb %} +
        • {% trans 'Contact us' %}/
        • +
        • {{ticket.subject}}
        • +{% endblock %} + +{% block content_before %} + +
          +
          +
          +
          +

          {% trans 'Ticket information' %}

          +
          + {% if ticket.status != 'closed' %} + + {% endif %} +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.status != 'closed' %} + {% endif %} +
          {% trans 'Subject' %}{{ticket.subject}}
          {% trans 'Author' %}{{ticket.author.name}}
          {% trans 'Email' %}{{ticket.author.email}}
          {% trans 'Status' %}
          {{mf.status_name(ticket.status) }}
          {% trans 'Time opened' %}{{ticket.created_at|bb_date }}
          +
          +
          +
          +
          +{% endblock %} + + + +{% block content %} +
          +
          +
          +
          +

          {{ ticket.subject }}

          +

          {% trans 'by '%} {{ ticket.author_email }}

          +
          +
          + {% for i, message in ticket.messages %} +
          +
          +
          + {{ message.author.name }} +

          + {{ message.author.name }} +

          +
          +
          +
          +
          {{ message.created_at|bb_date }} + +
          +
          +
          {{ message.content|bbmd }}
          +
          +
          +
          +
          + {% endfor %} +
          +
          +
          + {% if ticket.status != 'closed' %} +
          +
          + + + +
          +
          + {% elseif ticket.status == 'closed' %} +
          {% trans 'Ticket was closed and cannot be reopened.' %}
          + {% endif %} +
          +
          +
          +
          +
          +
          +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_client/mod_support_ticket.phtml b/src/bb-modules/Support/html_client/mod_support_ticket.phtml new file mode 100644 index 000000000..9a14e84c0 --- /dev/null +++ b/src/bb-modules/Support/html_client/mod_support_ticket.phtml @@ -0,0 +1,189 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}}{% endblock %} +{% block breadcrumb %} +
        • {% trans 'Support tickets' %}/
        • +{{ticket.subject}} +{% endblock %} + +{% block content %} +
          +
          +
          +
          +

          {% trans 'Ticket information' %}

          + + {% if ticket.status != 'closed' %} +
          + +
          + {% endif %} +
          +
          + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.rel_type == 'order' and ticket.rel_id %} + + + + + {% endif %} + + +
          {% trans 'Ticket ID' %}#{{ticket.id}}
          {% trans 'Help desk' %}{{ticket.helpdesk.name}}
          {% trans 'Status' %}
          {{mf.status_name(ticket.status)}}
          {% trans 'Time opened' %}{{ticket.created_at|bb_date }}
          {% trans 'Related to' %}{% trans 'Service #' %} {{ ticket.rel_id }}
          + +
          +
          +
          +
          +
          +
          +

          {% trans 'Last tickets'%}

          + +
          +
          + + + + + + + + + + + {% set tickets = client.support_ticket_get_list({"per_page":5, "page":request.page}) %} + {% for i, t in tickets.list %} + + + + + + + {% else %} + + + + {% endfor %} + + +
          {% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %}{% trans 'Submitted' %}
          {{t.subject|truncate(40)}}{{t.helpdesk.name}}{{mf.status_name(t.status)}}{{t.created_at|timeago}} {% trans 'ago' %}
          {% trans 'The list is empty' %}
          +
          +
          +
          + +
          + +
          +
          +
          +
          +

          {{ ticket.subject }}

          +

          #{{ ticket.id }} - {{ticket.helpdesk.name}}

          +
          +
          + {% for i, message in ticket.messages %} +
          +
          +
          + {{ message.author.name }} +

          + {{ message.author.name }} +

          +
          +
          +
          +
          #{{ i+1 }} | {{ message.created_at|bb_date }} + {% if ticket.status != 'closed' %} + + {% endif %} +
          +
          +
          {{ message.content|bbmd }}
          +
          +
          +
          +
          + {% endfor %} + +
          + {% if ticket.status != 'closed' %} +
          +
          +
          +
          + + + +
          +
          +
          + {% elseif ticket.status == 'closed' %} +
          {% trans 'Ticket was closed and cannot be reopened.' %}
          + {% endif %} +
          + +
          +
          +
          +
          +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_client/mod_support_tickets.phtml b/src/bb-modules/Support/html_client/mod_support_tickets.phtml new file mode 100644 index 000000000..6318ae060 --- /dev/null +++ b/src/bb-modules/Support/html_client/mod_support_tickets.phtml @@ -0,0 +1,140 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Support tickets' %}{% endblock %} +{% block page_header %}{% trans 'Support tickets' %}{% endblock %} +{% block breadcrumb %}{% trans 'Support tickets' %}{% endblock %} +{% block content %} + + +
          +
          +
          +
          +

          {% trans 'Support tickets'%}


          + {% trans 'Need an answer? We are here to help!' %} + +
          +
          + + + + + + + + + + + + + + {% set tickets = client.support_ticket_get_list({"per_page":10, "page":request.page}) %} + {% for i, ticket in tickets.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + + {% if tickets.pages > 1 %} + + + + + + {% endif %} +
          {% trans 'Id' %}{% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %}{% trans 'Submitted' %}{% trans 'Actions' %}
          #{{ticket.id}}{{ticket.subject|truncate(40)}}{{ticket.helpdesk.name}}{{mf.status_name(ticket.status)}}{{ticket.created_at|timeago}} {% trans 'ago' %}{% if ticket.status=='closed'%}{% trans 'View' %}{% else %}{% trans 'Reply' %}{%endif%}
          {% trans 'The list is empty' %}
          + {% include "partial_pagination.phtml" with {'list': tickets} %} +
          + +
          +
          +
          +
          + + + + +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_email/mod_support_pticket_open.phtml b/src/bb-modules/Support/html_email/mod_support_pticket_open.phtml new file mode 100644 index 000000000..174aa64a7 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_pticket_open.phtml @@ -0,0 +1,14 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ ticket.author_name }}, + +Thank You for Your request. We will reply in 24 hours. +You can track and respond to this conversation at {{'support/contact-us/conversation'|link }}/{{ ticket.hash }} + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_pticket_staff_close.phtml b/src/bb-modules/Support/html_email/mod_support_pticket_staff_close.phtml new file mode 100644 index 000000000..427aae97e --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_pticket_staff_close.phtml @@ -0,0 +1,18 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}} [closed]{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ ticket.author_name }}, + +This is a confirmation email to inform you that your ticket was closed. + +You can track conversation at + +{{'support/contact-us/conversation'|link }}/{{ ticket.hash }} + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_pticket_staff_open.phtml b/src/bb-modules/Support/html_email/mod_support_pticket_staff_open.phtml new file mode 100644 index 000000000..5f480f2e8 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_pticket_staff_open.phtml @@ -0,0 +1,20 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ ticket.author_name }}, + +{{ticket.messages[0].content}} + +*** + +You can track and respond to this conversation at: + +{{'support/contact-us/conversation'|link }}/{{ ticket.hash }} + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_pticket_staff_reply.phtml b/src/bb-modules/Support/html_email/mod_support_pticket_staff_reply.phtml new file mode 100644 index 000000000..0bdce8704 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_pticket_staff_reply.phtml @@ -0,0 +1,18 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ ticket.author_name }}, + +New reply was posted to request **{{ticket.subject}}** + +You can track and respond to this conversation at: + +{{'support/contact-us/conversation'|link }}/{{ ticket.hash }} + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_ticket_open.phtml b/src/bb-modules/Support/html_email/mod_support_ticket_open.phtml new file mode 100644 index 000000000..40cd6c4f7 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_ticket_open.phtml @@ -0,0 +1,22 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ ticket.subject }}{% endblock %} +{% block content %} +{% filter markdown %} +Hi {{ c.first_name }} {{ c.last_name }}, + +Thank you for contacting our support team. +A support ticket has now been opened for your request. You will be notified when +a response is made by email. The details of your ticket are shown below. + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Login to members area: {{'login'|link({'email' : c.email }) }} +Reply Ticket at: {{'support/ticket'|link}}/{{ ticket.id }} + +Please do not reply to this email directly. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Support/html_email/mod_support_ticket_staff_close.phtml b/src/bb-modules/Support/html_email/mod_support_ticket_staff_close.phtml new file mode 100644 index 000000000..b14932ff3 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_ticket_staff_close.phtml @@ -0,0 +1,23 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ c.first_name }} {{ c.last_name }}, + +This a notification message to inform you that ticket **{{ticket.subject}}** +is now closed. + + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Login to members area: {{'login'|link({'email' : c.email }) }} +Reply Ticket at: {{'support/ticket'|link}}/{{ ticket.id }} + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_ticket_staff_open.phtml b/src/bb-modules/Support/html_email/mod_support_ticket_staff_open.phtml new file mode 100644 index 000000000..fde119334 --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_ticket_staff_open.phtml @@ -0,0 +1,25 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ c.first_name }} {{ c.last_name }}, + +{{ticket.messages[0].content}} + +*** + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Login to members area: {{'login'|link({'email' : c.email }) }} +Reply Ticket at: {{'support/ticket'|link}}/{{ ticket.id }} + + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} + +{% endblock %} diff --git a/src/bb-modules/Support/html_email/mod_support_ticket_staff_reply.phtml b/src/bb-modules/Support/html_email/mod_support_ticket_staff_reply.phtml new file mode 100644 index 000000000..40c9acfaf --- /dev/null +++ b/src/bb-modules/Support/html_email/mod_support_ticket_staff_reply.phtml @@ -0,0 +1,22 @@ +{% block subject %}[{{ guest.system_company.name }}] {{ticket.subject}}{% endblock %} +{% block content %} +{% filter markdown %} + +Hi {{ c.first_name }} {{ c.last_name }}, + +New reply was posted to request **{{ticket.subject}}** + +Ticket ID: #{{ticket.id}} +Department: {{ticket.helpdesk.name}} +Status: {{ticket.status|title}} + +Login to members area: {{'login'|link({'email' : c.email }) }} +Reply Ticket at: {{'support/ticket'|link}}/{{ ticket.id }} + + +Please do not reply to this email directly. Use the link provided above. + +{{ guest.system_company.signature }} + +{% endfilter %} +{% endblock %} diff --git a/src/bb-modules/Support/icon.png b/src/bb-modules/Support/icon.png new file mode 100644 index 000000000..6c40aae0e Binary files /dev/null and b/src/bb-modules/Support/icon.png differ diff --git a/src/bb-modules/Support/manifest.json b/src/bb-modules/Support/manifest.json new file mode 100644 index 000000000..785c1bdbe --- /dev/null +++ b/src/bb-modules/Support/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "support", + "type": "mod", + "name": "Support", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/System/Api/Admin.php b/src/bb-modules/System/Api/Admin.php new file mode 100644 index 000000000..3ed5490ce --- /dev/null +++ b/src/bb-modules/System/Api/Admin.php @@ -0,0 +1,161 @@ +getService()->getLicenseInfo($data); + } + + /** + * Return system setting param + * @deprecated + * @param string $key - parameter key name + * @return string + */ + public function param($data) + { + if(!isset ($data['key'])) { + throw new \Box_Exception('Parameter key is missing'); + } + return $this->getService()->getParamValue($data['key']); + } + + /** + * Get all defined system params + * + * @return array + */ + public function get_params($data) + { + return $this->getService()->getParams($data); + } + + /** + * Updated parameters array with new values. Creates new setting if it was + * not defined earlier. You can create new parameters using this method. + * This method accepts any number of parameters you pass. + * + * @param string $key - name of the parameter to be changed/created + * + * @return bool + */ + public function update_params($data) + { + return $this->getService()->updateParams($data); + } + + /** + * System messages about working environment. + * + * @param string $type - messages type to be returned: info + * + * @return array + */ + public function messages($data) + { + $type = isset($data['type']) ? $data['type'] : 'info'; + return $this->getService()->getMessages($type); + } + + /** + * Check if passed file name template exists for admin area + * + * @param string $file - template file name, example: mod_index_dashboard.phtml + * @return bool + */ + public function template_exists($data) + { + if(!isset($data['file'])) { + return false; + } + + return $this->getService()->templateExists($data['file'], $this->getIdentity()); + } + + /** + * Parse string like BoxBilling template + * + * @param string $_tpl - Template text to be parsed + * + * @optional bool $_try - if true, will not throw error if template is not valid, returns _tpl string + * @optional int $_client_id - if passed client id, then client API will also be available + * + * @return string + */ + public function string_render($data) + { + if(!isset($data['_tpl'])) { + error_log('_tpl parameter not passed'); + return ''; + } + $tpl = $data['_tpl']; + $try_render = isset($data['_try']) ? $data['_try'] : false; + + $vars = $data; + unset($vars['_tpl'], $vars['_try']); + return $this->getService()->renderString($tpl, $try_render, $vars); + } + + /** + * Returns system environment information. + * + * @return array + */ + public function env($data) + { + $ip = isset($data['ip']) ? $data['ip'] : null; + return $this->getService()->getEnv($ip); + } + + /** + * Method to check if staff member has permission to access module + * + * @param string $mod - module name + * + * @optional string $f - module method name + * + * @return bool + * @throws \Box_Exception + */ + public function is_allowed($data) + { + if(!isset($data['mod'])) { + throw new \Box_Exception('mod parameter not passed'); + } + + $f = isset($data['f']) ? $data['f'] : null; + return $this->getService()->staffHasPermissions($this->getIdentity(), $data['mod'], $f); + } + + /** + * Clear system cache + * + * @return bool + */ + public function clear_cache() + { + return $this->getService()->clearCache(); + } +} \ No newline at end of file diff --git a/src/bb-modules/System/Api/Guest.php b/src/bb-modules/System/Api/Guest.php new file mode 100644 index 000000000..5df73cced --- /dev/null +++ b/src/bb-modules/System/Api/Guest.php @@ -0,0 +1,180 @@ +getService()->getVersion(); + } + + /** + * Returns company information + * + * @return array + */ + public function company() + { + return $this->getService()->getCompany(); + } + + /** + * Returns world wide phone codes + * + * @optional $country - if passed country code the result will be phone code only + * + * @return array + */ + public function phone_codes($data) + { + return $this->getService()->getPhoneCodes($data); + } + + /** + * Returns USA states list + * + * @return array + */ + public function states() + { + return $this->getService()->getStates(); + } + + /** + * Returns list of european union countries + * + * @return array + */ + public function countries_eunion() + { + return $this->getService()->getEuCountries(); + } + + /** + * Returns list of world countries + * + * @return array + */ + public function countries() + { + return $this->getService()->getCountries(); + } + + /** + * Returns system parameter by key + * + * @param string $key - Parameter name + * + * @return string + */ + public function param($data) + { + if(!isset ($data['key'])) { + throw new \Box_Exception('Parameter key is missing'); + } + return $this->getService()->getPublicParamValue($data['key']); + } + + /** + * Return list of available payment periods + * + * @return array + */ + public function periods() + { + return \Box_Period::getPredefined(); + } + + /** + * Gets period title by identifier + * + * @param string $code - Perdio code name, ie: 1M => Monthly + * + * @return string + */ + public function period_title($data) + { + $code = isset($data['code']) ? $data['code'] : NULL; + if($code == NULL) { + return '-'; + } + return $this->getService()->getPeriod($code); + } + + /** + * Returns info for paginator according to list + * + * @return array + */ + public function paginator($data) + { + $midrange = 7; + $current_page = $data['page']; + $limit = $data['per_page']; + $itemsCount = $data['total']; + + $p = new \Box_Paginator($itemsCount, $current_page, $limit, $midrange); + return $p->toArray(); + } + + /** + * If called from template file this function returnes current url + * @return string + */ + public function current_url() + { + return $this->di['request']->getURI(); + } + + /** + * Check if passed file name template exists for client area + * + * @param string $file - template file name, example: mod_index_dashboard.phtml + * @return bool + */ + public function template_exists($data) + { + if(!isset($data['file'])) { + return false; + } + + return $this->getService()->templateExists($data['file']); + } + + /** + * Get current client locale + * + * @return string + */ + public function locale() + { + $cookie = $this->di['cookie']; + $locale = $this->di['config']['locale'];; + if ($cookie->has('BBLANG')){ + $bblang = $cookie->get('BBLANG'); + if (!empty($bblang)){ + $locale = $bblang; + } + } + return $locale; + } +} \ No newline at end of file diff --git a/src/bb-modules/System/Controller/Admin.php b/src/bb-modules/System/Controller/Admin.php new file mode 100644 index 000000000..bf0922d03 --- /dev/null +++ b/src/bb-modules/System/Controller/Admin.php @@ -0,0 +1,76 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function fetchNavigation() + { + return array( + 'group' => array( + 'index' => 600, + 'location' => 'system', + 'label' => 'Configuration', + 'class' => 'settings', + ), + 'subpages'=> array( + array( + 'location' => 'system', + 'label' => 'Settings', + 'index' => 100, + 'uri' => $this->di['url']->adminLink('system'), + 'class' => '', + ), + ), + ); + } + + public function register(\Box_App &$app) + { + $app->get('/system', 'get_index', array(), get_class($this)); + $app->get('/system/', 'get_index', array(), get_class($this)); + $app->get('/system/index', 'get_index', array(), get_class($this)); + $app->get('/system/activity', 'get_activity', array(), get_class($this)); + } + + public function get_index(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_system_index'); + } + + public function get_activity(\Box_App $app) + { + $api = $app->getApiAdmin(); + return $app->render('mod_system_activity'); + } +} \ No newline at end of file diff --git a/src/bb-modules/System/Service.php b/src/bb-modules/System/Service.php new file mode 100644 index 000000000..e09f559f7 --- /dev/null +++ b/src/bb-modules/System/Service.php @@ -0,0 +1,1306 @@ +di = $di; + } + + public function getParamValue($param, $default = NULL) + { + if(empty($param)) { + throw new \Box_Exception('Parameter key is missing'); + } + + $query = "SELECT value + FROM setting + WHERE param = :param + "; + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param'=>$param)); + $results = $stmt->fetchColumn(); + if($results === false) { + return $default; + } + return $results; + } + + public function setParamValue($param, $value, $createIfNotExists = true) + { + $pdo = $this->di['pdo']; + + if($this->paramExists($param)) { + $query="UPDATE setting SET value = :value WHERE param = :param"; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param'=>$param, 'value'=>$value)); + } else if($createIfNotExists) { + try { + $query="INSERT INTO setting (param, value, created_at, updated_at) VALUES (:param, :value, :created_at, :updated_at)"; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param'=>$param, 'value'=>$value, 'created_at'=>date('c'), 'updated_at'=>date('c'))); + } catch(Exception $e) { + //ignore duplicate key error + if($e->getCode() != 23000) { + throw $e; + } + } + } + + return true; + } + + public function paramExists($param) + { + $pdo = $this->di['pdo']; + $q = "SELECT id + FROM setting + WHERE param = :param"; + $stmt = $pdo->prepare($q); + $stmt->execute(array('param'=>$param)); + $results = $stmt->fetchColumn(); + return (bool)$results; + } + + private function _getMultipleParams($params) + { + if (!is_array($params)){ + return array(); + } + $query = "SELECT param, value + FROM setting + WHERE param IN('".implode("', '", $params)."') + "; + $rows = $this->di['db']->getAll($query); + $result = array(); + foreach($rows as $row){ + $result[ $row['param'] ] = $row['value']; + } + return $result; + } + + public function getCompany() + { + $c = array( + 'company_name', + 'company_email', + 'company_tel', + 'company_signature', + 'company_logo', + 'company_address_1', + 'company_address_2', + 'company_address_3', + + 'company_account_number', + 'company_number', + 'company_note', + 'company_privacy_policy', + 'company_tos', + 'company_vat_number', + ); + $results = $this->_getMultipleParams($c); + return array( + 'www' => $this->di['config']['url'], + 'name' => isset($results['company_name']) ? $results['company_name'] : NULL, + 'email' => isset($results['company_email']) ? $results['company_email'] : NULL, + 'tel' => isset($results['company_tel']) ? $results['company_tel'] : NULL, + 'signature' => isset($results['company_signature']) ? $results['company_signature'] : NULL, + 'logo_url' => isset($results['company_logo']) ? $results['company_logo'] : NULL, + 'address_1' => isset($results['company_address_1']) ? $results['company_address_1'] : NULL, + 'address_2' => isset($results['company_address_2']) ? $results['company_address_2'] : NULL, + 'address_3' => isset($results['company_address_3']) ? $results['company_address_3'] : NULL, + 'account_number' => isset($results['company_account_number']) ? $results['company_account_number'] : NULL, + 'number' => isset($results['company_number']) ? $results['company_number'] : NULL, + 'note' => isset($results['company_note']) ? $results['company_note'] : NULL, + 'privacy_policy' => isset($results['company_privacy_policy']) ? $results['company_privacy_policy'] : NULL, + 'tos' => isset($results['company_tos']) ? $results['company_tos'] : NULL, + 'vat_number' => isset($results['company_vat_number']) ? $results['company_vat_number'] : NULL, + ); + } + + public function getLanguages($deep = false) + { + $path = BB_PATH_LANGS; + if ($handle = opendir($path)) { + while (false !== ($entry = readdir($handle))) { + if ($entry != ".svn" && $entry != "." && $entry != ".." && is_dir($path.DIRECTORY_SEPARATOR.$entry)) { + $locales[] = $entry; + } + } + closedir($handle); + } + sort($locales); + if(!$deep){ + return $locales; + } + + $details = array(); + + foreach($locales as $locale) { + $file = $path.'/'.$locale.'/LC_MESSAGES/messages.po'; + if(file_exists($file)) { + $f = fopen($file, 'r'); + $project_info = fread($f, 400); + fclose($f); + + $lines = explode(PHP_EOL, $project_info); + foreach($lines as $line) { + if(strpos($line, 'Language:')) { + $l = str_replace('"Language:', '', $line); + $l = str_replace('\n"', '', $l); + $l = trim($l); + + $details[] = array( + 'locale' => $locale, + 'title' => $l, + ); + break; + } + } + } + } + return $details; + } + + public function getLicenseInfo($data) + { + $details = $this->di['license']->getDetails(); + $owner = null; + $expires_at = null; + if(isset($details['expires_at']) && $details['expires_at']) { + if(is_numeric($details['expires_at'])) { + $expires_at = date('c', $details['expires_at']); + } else { + $expires_at = $details['expires_at']; + } + } + + if(isset($details['licensed_to']) && $details['licensed_to']) { + $owner = $details['licensed_to']; + } + + $result = array( + 'licensed_to' => $owner, + 'key' => $this->di['config']['license'], + 'expires_at' => $expires_at, + ); + return $result; + } + + public function getParams($data) + { + $query = "SELECT param, value + FROM setting"; + $rows = $this->di['db']->getAll($query); + $result = array(); + foreach($rows as $row){ + $result[ $row['param'] ] = $row['value']; + } + return $result; + } + + public function updateParam($param, $value, $createIfNotExists = true) + { + $pdo = $this->di['pdo']; + + if ($this->paramExists($param)) { + $query = "UPDATE setting SET value = :value WHERE param = :param"; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param' => $param, 'value' => $value)); + } else if ($createIfNotExists) { + try { + $query = "INSERT INTO setting (param, value, created_at, updated_at) VALUES (:param, :value, :created_at, :updated_at)"; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param' => $param, 'value' => $value, 'created_at' => date('c'), 'updated_at' => date('c'))); + } catch (\Exception $e) { + //ignore duplicate key error + if ($e->getCode() != 23000) { + throw $e; + } + } + } + + return true; + } + + public function updateParams($data) + { + $this->di['events_manager']->fire(array('event'=>'onBeforeAdminSettingsUpdate', 'params'=>$data)); + + foreach($data as $key=>$val) { + $this->updateParam($key, $val, true); + } + + $this->di['events_manager']->fire(array('event'=>'onAfterAdminSettingsUpdate')); + + $this->di['logger']->info('Updated system general settings'); + return true; + } + + public function getMessages($type) + { + $msgs = array(); + + try { + $updater = $this->di['updater']; + if($updater->getCanUpdate()) { + $version = $updater->getLatestVersion(); + $msgs['info'][] = sprintf('BoxBilling %s is available for download.', $version); + } + } catch(\Exception $e) { + error_log($e->getMessage()); + } + $last_exec = $this->getParamValue('last_cron_exec'); + if(!$last_exec) { + $msgs['info'][] = 'Cron was never executed. Make sure you have setup cron job.'; + } + + $install = BB_PATH_ROOT.'/install'; + if($this->di['tools']->fileExists(BB_PATH_ROOT.'/install')) { + $msgs['info'][] = sprintf('Install module "%s" still exists. Please remove it for security reasons.', $install); + } + + if(!extension_loaded('mcrypt')) { + $msgs['info'][] = sprintf('BoxBilling requires %s extension to be enabled on this server for security reasons.', 'php mcrypt'); + } + + return isset($msgs[$type]) ? $msgs[$type] : array(); + } + + public function templateExists($file, $identity = null) + { + if ($identity instanceof \Model_Admin) { + $client = false; + } else { + $client = true; + } + $themeService = $this->di['mod_service']('theme'); + $theme = $themeService->getThemeConfig($client); + foreach ($theme['paths'] as $path) { + if ($this->di['tools']->fileExists($path . DIRECTORY_SEPARATOR . $file)) { + return true; + } + } + + return false; + } + + public function renderString($tpl, $try_render, $vars) + { + $twig = $this->di['twig']; + if(isset($vars['_client_id'])) { + $identity = $this->di['db']->load('Client', $vars['_client_id']); + if($identity instanceof \Model_Client) { + $twig->addGlobal('client', $this->di['api_client']); + } + } + + try { + $twig->addGlobal('admin', $this->di['api_admin']); + } catch(\Exception $e) { + + } + + try { + $template = $twig->loadTemplate($tpl); + $parsed = $template->render($vars); + } catch (\Exception $e) { + $parsed = $tpl; + if ($e instanceof \Twig_Error_Syntax || $e instanceof \Twig_Error_Loader) { + if (!$try_render) { + throw $e; + } + } else { + throw $e; + } + } + + return $parsed; + } + + public function clearCache() + { + $this->di['tools']->emptyFolder(BB_PATH_CACHE); + return true; + } + + public function getEnv($ip) + { + if(isset($ip)) { + try { + return $this->di['tools']->get_url('http://www.biranchi.com/ip.php', 2); + } catch(\Exception $e) { + return ''; + } + } + + $r = $this->di['requirements']; + $data = $r->getInfo(); + $data['last_patch'] = $this->getParamValue('last_patch'); + + return $data; + } + + public function staffHasPermissions($identity, $module, $f = null) + { + $service = $this->di['mod_service']('staff'); + return $service->hasPermission($identity, $module, $f); + } + + public function getCurrentUrl() + { + $request = $this->di['request']; + $pageURL = 'http'; + $https = $request->getScheme(); + if (isset($https) && $https == "https") { + $pageURL .= "s"; + } + $pageURL .= "://"; + + $serverPort = $request->getServer("SERVER_PORT"); + if (isset($serverPort) && $serverPort != "80" && $serverPort != "443") { + $pageURL .= $request->getServer("SERVER_NAME").":".$request->getServer("SERVER_PORT"); + } else { + $pageURL .= $request->getServer("SERVER_NAME"); + } + + $this_page = $request->getURI(); + if (strpos($this_page, "?") !== false) { + $a = explode("?", $this_page); + $this_page = reset($a); + } + return $pageURL . $this_page; + } + + public function getPeriod($code) + { + $p = \Box_Period::getPredefined(); + if(isset($p[$code])) { + return $p[$code]; + } + + $p = new \Box_Period($code); + return $p->getTitle(); + } + + public function getPublicParamValue($param) + { + $query = "SELECT value + FROM setting + WHERE param = :param + AND public = 1 + "; + + $pdo = $this->di['pdo']; + $stmt = $pdo->prepare($query); + $stmt->execute(array('param'=>$param)); + $results = $stmt->fetchColumn(); + if($results === false) { + throw new \Box_Exception('Parameter :param does not exist', array(':param'=>$param)); + } + return $results; + } + + public function getCountries() + { + //default countries + $countries = array( + "US" => "United States", + "AF" => "Afghanistan", + "AL" => "Albania", + "DZ" => "Algeria", + "AS" => "American Samoa", + "AD" => "Andorra", + "AO" => "Angola", + "AI" => "Anguilla", + "AQ" => "Antarctica", + "AG" => "Antigua And Barbuda", + "AR" => "Argentina", + "AM" => "Armenia", + "AW" => "Aruba", + "AU" => "Australia", + "AT" => "Austria", + "AZ" => "Azerbaijan", + "BS" => "Bahamas", + "BH" => "Bahrain", + "BD" => "Bangladesh", + "BB" => "Barbados", + "BY" => "Belarus", + "BE" => "Belgium", + "BZ" => "Belize", + "BJ" => "Benin", + "BM" => "Bermuda", + "BT" => "Bhutan", + "BO" => "Bolivia", + "BA" => "Bosnia And Herzegowina", + "BW" => "Botswana", + "BR" => "Brazil", + // "IO" => "British Indian Ocean Territory", + "BN" => "Brunei Darussalam", + "BG" => "Bulgaria", + "BF" => "Burkina Faso", + "BI" => "Burundi", + "KH" => "Cambodia", + "CM" => "Cameroon", + "CA" => "Canada", + "CV" => "Cape Verde", + "KY" => "Cayman Islands", + "CF" => "Central African Republic", + "TD" => "Chad", + "CL" => "Chile", + "CN" => "China", + "CX" => "Christmas Island", + "CC" => "Cocos (Keeling) Islands", + "CO" => "Colombia", + "KM" => "Comoros", + "CG" => "Congo", + // "CD" => "Congo, The Democratic Republic Of The", + "CK" => "Cook Islands", + "CR" => "Costa Rica", + "CI" => "Cote D'Ivoire", + "HR" => "Croatia", + "CU" => "Cuba", + "CY" => "Cyprus", + "CZ" => "Czech Republic", + "DK" => "Denmark", + "DJ" => "Djibouti", + "DM" => "Dominica", + "DO" => "Dominican Republic", + "TP" => "East Timor", + "EC" => "Ecuador", + "EG" => "Egypt", + "SV" => "El Salvador", + "GQ" => "Equatorial Guinea", + "ER" => "Eritrea", + "EE" => "Estonia", + "ET" => "Ethiopia", + // "FK" => "Falkland Islands (Malvinas)", + "FO" => "Faroe Islands", + "FJ" => "Fiji", + "FI" => "Finland", + "FR" => "France", + "GA" => "Gabon", + "GB" => "Great Britain", + "GM" => "Gambia", + "GE" => "Georgia", + "DE" => "Germany", + "GH" => "Ghana", + "GI" => "Gibraltar", + "GR" => "Greece", + "GL" => "Greenland", + "GD" => "Grenada", + "GP" => "Guadeloupe", + "GU" => "Guam", + "GT" => "Guatemala", + "GN" => "Guinea", + "GW" => "Guinea-Bissau", + "GY" => "Guyana", + "HT" => "Haiti", + "EL" => "Hellenic Republic (Greece)", + // "HM" => "Heard And Mc Donald Islands", + // "VA" => "Holy See (Vatican City State)", + "HN" => "Honduras", + "HK" => "Hong Kong", + "HU" => "Hungary", + "IS" => "Iceland", + "IN" => "India", + "ID" => "Indonesia", + "IR" => "Iran", + "IQ" => "Iraq", + "IE" => "Ireland", + "IL" => "Israel", + "IT" => "Italy", + "JM" => "Jamaica", + "JP" => "Japan", + "JO" => "Jordan", + "KZ" => "Kazakhstan", + "KE" => "Kenya", + "KI" => "Kiribati", + // "KP" => "Korea, Democratic People's Republic Of", + "KR" => "Korea, Republic Of", + "KW" => "Kuwait", + "KG" => "Kyrgyzstan", + // "LA" => "Lao People's Democratic Republic", + "LV" => "Latvia", + "LB" => "Lebanon", + "LS" => "Lesotho", + "LR" => "Liberia", + "LY" => "Libyan Arab Jamahiriya", + "LI" => "Liechtenstein", + "LT" => "Lithuania", + "LU" => "Luxembourg", + "MO" => "Macau", + // "MK" => "Macedonia, Former Yugoslav Republic Of", + "MG" => "Madagascar", + "MW" => "Malawi", + "MY" => "Malaysia", + "MV" => "Maldives", + "ML" => "Mali", + "MT" => "Malta", + "MH" => "Marshall Islands", + "MQ" => "Martinique", + "MR" => "Mauritania", + "MU" => "Mauritius", + "YT" => "Mayotte", + "MX" => "Mexico", + // "FM" => "Micronesia, Federated States Of", + "MD" => "Moldova, Republic Of", + "MC" => "Monaco", + "MN" => "Mongolia", + "MS" => "Montserrat", + "MA" => "Morocco", + "MZ" => "Mozambique", + "MM" => "Myanmar", + "NA" => "Namibia", + "NR" => "Nauru", + "NP" => "Nepal", + "NL" => "Netherlands", + "AN" => "Netherlands Antilles", + "NC" => "New Caledonia", + "NZ" => "New Zealand", + "NI" => "Nicaragua", + "NE" => "Niger", + "NG" => "Nigeria", + "NU" => "Niue", + "NF" => "Norfolk Island", + "MP" => "Northern Mariana Islands", + "NO" => "Norway", + "OM" => "Oman", + "PK" => "Pakistan", + "PW" => "Palau", + "PA" => "Panama", + "PG" => "Papua New Guinea", + "PY" => "Paraguay", + "PE" => "Peru", + "PH" => "Philippines", + "PN" => "Pitcairn", + "PL" => "Poland", + "PT" => "Portugal", + "PR" => "Puerto Rico", + "QA" => "Qatar", + "RE" => "Reunion", + "RO" => "Romania", + "RU" => "Russian Federation", + "RW" => "Rwanda", + "KN" => "Saint Kitts And Nevis", + "LC" => "Saint Lucia", + // "VC" => "Saint Vincent And The Grenadines", + "WS" => "Samoa", + "SM" => "San Marino", + "ST" => "Sao Tome And Principe", + "SA" => "Saudi Arabia", + "SN" => "Senegal", + "SC" => "Seychelles", + "SL" => "Sierra Leone", + "SG" => "Singapore", + "SK" => "Slovakia", + "SI" => "Slovenia", + "SB" => "Solomon Islands", + "SO" => "Somalia", + "ZA" => "South Africa", + // "GS" => "South Georgia, South Sandwich Islands", + "ES" => "Spain", + "LK" => "Sri Lanka", + "SH" => "St. Helena", + "PM" => "St. Pierre And Miquelon", + "SD" => "Sudan", + "SR" => "Suriname", + // "SJ" => "Svalbard And Jan Mayen Islands", + "SZ" => "Swaziland", + "SE" => "Sweden", + "CH" => "Switzerland", + "SY" => "Syrian Arab Republic", + "TW" => "Taiwan", + "TJ" => "Tajikistan", + "TZ" => "Tanzania", + "TH" => "Thailand", + "TG" => "Togo", + "TK" => "Tokelau", + "TO" => "Tonga", + "TT" => "Trinidad And Tobago", + "TN" => "Tunisia", + "TR" => "Turkey", + "TM" => "Turkmenistan", + // "TC" => "Turks And Caicos Islands", + "TV" => "Tuvalu", + "UG" => "Uganda", + "UA" => "Ukraine", + "AE" => "United Arab Emirates", + // "UM" => "United States Minor Outlying Islands", + "UY" => "Uruguay", + "UZ" => "Uzbekistan", + "VU" => "Vanuatu", + "VE" => "Venezuela", + "VN" => "Viet Nam", + "VG" => "Virgin Islands (British)", + "VI" => "Virgin Islands (U.S.)", + // "WF" => "Wallis And Futuna Islands", + "EH" => "Western Sahara", + "YE" => "Yemen", + "YU" => "Yugoslavia", + "ZM" => "Zambia", + "ZW" => "Zimbabwe" + ); + + $mod = $this->di['mod']('system'); + $config = $mod->getConfig(); + if (isset($config['countries'])) { + preg_match_all('#([A-Z]{2})=(.+)#', $config['countries'], $matches); + if (isset($matches[1]) && !empty($matches[1]) && isset($matches[2]) && !empty($matches[2])) { + if (count($matches[1] == count($matches[2]))){ + $countries = array_combine($matches[1], $matches[2]); + } + } + } + + return $countries; + } + + public function getEuCountries() + { + $list = array('AT', 'BE', 'BG', 'CY', 'CZ', 'DE', 'DK', 'EE', 'ES', 'FI', + 'FR', 'GB', 'GR', 'HU', 'IE', 'IT', 'LT', 'LU', 'LV', 'MT', 'NL', + 'PL', 'PT', 'RO', 'SE', 'SI', 'SK'); + $c = $this->getCountries(); + $res = array(); + foreach ($list as $code) { + if (!isset($c[$code])) { continue;}; + $res[$code] = $c[$code]; + } + return $res; + } + + public function getStates() + { + return array ( + 'AK' => 'Alaska', + 'AL' => 'Alabama', + 'AR' => 'Arkansas', + 'AZ' => 'Arizona', + 'CA' => 'California', + 'CO' => 'Colorado', + 'CT' => 'Connecticut', + 'DE' => 'Delaware', + 'FL' => 'Florida', + 'GA' => 'Georgia', + 'HI' => 'Hawaii', + 'IA' => 'Iowa', + 'ID' => 'Idaho', + 'IL' => 'Illinois', + 'IN' => 'Indiana', + 'KS' => 'Kansas', + 'KY' => 'Kentucky', + 'LA' => 'Louisiana', + 'MA' => 'Massachusetts', + 'MD' => 'Maryland', + 'ME' => 'Maine', + 'MI' => 'Michigan', + 'MN' => 'Minnesota', + 'MO' => 'Missouri', + 'MS' => 'Mississippi', + 'MT' => 'Montana', + 'NC' => 'North Carolina', + 'ND' => 'North Dakota', + 'NE' => 'Nebraska', + 'NH' => 'New Hampshire', + 'NJ' => 'New Jersey', + 'NM' => 'New Mexico', + 'NV' => 'Nevada', + 'NY' => 'New York', + 'OH' => 'Ohio', + 'OK' => 'Oklahoma', + 'OR' => 'Oregon', + 'PA' => 'Pennsylvania', + 'RI' => 'Rhode Island', + 'SC' => 'South Carolina', + 'SD' => 'South Dakota', + 'TN' => 'Tennessee', + 'TX' => 'Texas', + 'UT' => 'Utah', + 'VA' => 'Virginia', + 'VT' => 'Vermont', + 'WA' => 'Washington', + 'WI' => 'Wisconsin', + 'WV' => 'West Virginia', + 'WY' => 'Wyoming', + ); + } + + public function getPhoneCodes($data) + { + $codes = array( + 'AF' => '93', + 'AL' => '355', + 'DZ' => '213', + 'AS' => '1-684', + 'AD' => '376', + 'AO' => '244', + 'AQ' => '244', + 'AI' => '1-264', + 'AG' => '1-268', + 'AR' => '54', + 'AM' => '7', + 'AW' => '297', + 'AU' => '61', + 'AT' => '43', + 'AZ' => '994', + 'BS' => '1-242', + 'BH' => '973', + 'BD' => '880', + 'BB' => '1-246', + 'BY' => '375', + 'BE' => '32', + 'BZ' => '501', + 'BJ' => '229', + 'BM' => '1-441', + 'BT' => '975', + 'BO' => '591', + 'BQ' => '599', + 'BA' => '387', + 'BW' => '267', + 'BR' => '55', + 'BN' => '673', + 'BG' => '359', + 'BF' => '226', + 'BI' => '257', + 'BV' => '257', + 'KH' => '855', + 'CM' => '237', + 'CA' => '1', + 'CV' => '238', + 'KY' => '1-345', + 'CF' => '236', + 'TD' => '235', + 'CL' => '56', + 'CN' => '86', + 'CO' => '57', + 'KM' => '269', + 'CG' => '242', + 'CD' => '243', + 'CK' => '682', + 'CR' => '506', + 'CI' => '225', + 'HR' => '385', + 'CU' => '53', + 'CW' => '599', + 'CY' => '357', + 'CZ' => '420', + 'CC' => '11', + 'CX' => '61', + 'DK' => '45', + 'DJ' => '253', + 'DM' => '1-767', + 'DO' => '1-809', + 'EC' => '593', + 'EG' => '20', + 'SV' => '503', + 'GQ' => '240', + 'ER' => '291', + 'EE' => '372', + 'ET' => '251', + 'FO' => '298', + 'FK' => '500', + 'FJ' => '679', + 'FI' => '358', + 'FR' => '33', + 'GF' => '594', + 'PF' => '689', + 'GA' => '241', + 'GM' => '220', + 'DE' => '49', + 'GH' => '233', + 'GI' => '350', + 'GB' => '44', + 'GR' => '30', + 'GL' => '299', + 'GD' => '1-473', + 'GP' => '590', + 'GU' => '1-671', + 'GT' => '502', + 'GN' => '224', + 'GW' => '245', + 'GY' => '592', + 'HT' => '509', + 'HN' => '504', + 'HK' => '852', + 'HU' => '36', + 'IS' => '354', + 'IN' => '91', + 'ID' => '62', + 'IR' => '98', + 'IQ' => '964', + 'IE' => '353', + 'IL' => '972', + 'IT' => '39', + 'JM' => '1-876', + 'JP' => '81', + 'JO' => '962', + 'KZ' => '7', + 'KE' => '254', + 'KI' => '686', + 'KP' => '850', + 'KR' => '82', + 'KW' => '965', + 'KG' => '996', + 'LA' => '856', + 'LV' => '371', + 'LB' => '961', + 'LS' => '266', + 'LR' => '231', + 'LY' => '218', + 'LI' => '423', + 'LT' => '370', + 'LU' => '352', + 'MO' => '853', + 'MK' => '389', + 'MG' => '261', + 'MW' => '265', + 'MY' => '60', + 'MV' => '960', + 'ML' => '223', + 'MT' => '356', + 'MH' => '692', + 'MQ' => '596', + 'MR' => '222', + 'MU' => '230', + 'YT' => '269', + 'MX' => '52', + 'FM' => '691', + 'MD' => '373', + 'MC' => '377', + 'MN' => '976', + 'ME' => '382', + 'MS' => '1-664', + 'MA' => '212', + 'MZ' => '258', + 'MM' => '95', + 'NA' => '264', + 'NR' => '674', + 'NP' => '977', + 'NL' => '31', + 'AN' => '599', + 'NC' => '687', + 'NZ' => '64', + 'NI' => '505', + 'NE' => '227', + 'NG' => '234', + 'NU' => '683', + 'MP' => '1-670', + 'NO' => '47', + 'OM' => '968', + 'PK' => '92', + 'PW' => '680', + 'PS' => '970', + 'PA' => '507', + 'PG' => '675', + 'PY' => '595', + 'PE' => '51', + 'PH' => '63', + 'PL' => '48', + 'PT' => '351', + 'PR' => '1', + 'QA' => '974', + 'RE' => '262', + 'RO' => '40', + 'RU' => '7', + 'RW' => '250', + 'SH' => '290', + 'KN' => '1-869', + 'LC' => '1-758', + 'PM' => '508', + 'VC' => '1-784', + 'WS' => '685', + 'SM' => '378', + 'ST' => '239', + 'SA' => '966', + 'SN' => '221', + 'RS' => '381', + 'SC' => '248', + 'SL' => '232', + 'SG' => '65', + 'SX' => '599', + 'SK' => '421', + 'SI' => '386', + 'SB' => '677', + 'SO' => '252', + 'ZA' => '27', + 'ES' => '34', + 'LK' => '94', + 'SD' => '249', + 'SR' => '597', + 'SZ' => '268', + 'SE' => '46', + 'CH' => '41', + 'SY' => '963', + 'TW' => '886', + 'TJ' => '992', + 'TZ' => '255', + 'TH' => '66', + 'TL' => '670', + 'TG' => '228', + 'TK' => '690', + 'TO' => '676', + 'TT' => '1-868', + 'TP' => '670', + 'TN' => '216', + 'TR' => '90', + 'TM' => '993', + 'TC' => '1-649', + 'TV' => '688', + 'UG' => '256', + 'UA' => '380', + 'NF' => '', + 'PN' => '', + 'EH' => '', + 'YU' => '', + 'EL' => '30', + 'AE' => '971', + 'GB' => '44', + 'GE' => '995', + 'US' => '1', + 'UY' => '598', + 'UZ' => '998', + 'VU' => '678', + 'VA' => '379', + 'VE' => '58', + 'VN' => '84', + 'VG' => '1-284', + 'VI' => '1-340', + 'WF' => '681', + 'YE' => '967', + 'ZM' => '260', + 'ZW' => '263', + ); + + if(isset($data['country'])) { + if(array_key_exists($data['country'], $codes)) { + return $codes[$data['country']]; + } else { + throw new \Box_Exception('Country :code phone code is not registered', array(':code'=>$data['country'])); + } + } + + return array( + '7940' => 'Abkhazia +7940', + '99544' => 'Abkhazia +99544', + '93' => 'Afghanistan +93', + '355' => 'Albania +355', + '213' => 'Algeria +213', + '1684' => 'American Samoa +1684', + '376' => 'Andorra +376', + '244' => 'Angola +244', + '1264' => 'Anguilla +1264', + '1268' => 'Antigua and Barbuda +1268', + '54' => 'Argentina +54', + '374' => 'Armenia +374', + '297' => 'Aruba +297', + '247' => 'Ascension +247', + '61' => 'Australia +61', + '43' => 'Austria +43', + '994' => 'Azerbaijan +994', + '1242' => 'Bahamas +1242', + '973' => 'Bahrain +973', + '880' => 'Bangladesh +880', + '1246' => 'Barbados +1246', + '375' => 'Belarus +375', + '32' => 'Belgium +32', + '501' => 'Belize +501', + '229' => 'Benin +229', + '1441' => 'Bermuda +1441', + '975' => 'Bhutan +975', + '591' => 'Bolivia +591', + '387' => 'Bosnia and Herzegovina +387', + '267' => 'Botswana +267', + '55' => 'Brazil +55', + '246' => 'British Indian Ocean Territory +246', + '1284' => 'British Virgin Islands +1284', + '673' => 'Brunei +673', + '359' => 'Bulgaria +359', + '226' => 'Burkina Faso +226', + '257' => 'Burundi +257', + '855' => 'Cambodia +855', + '237' => 'Cameroon +237', + '238' => 'Cape Verde +238', + '1345' => 'Cayman Islands +1345', + '236' => 'Central African Republic +236', + '235' => 'Chad +235', + '56' => 'Chile +56', + '86' => 'China +86', + '57' => 'Colombia +57', + '269' => 'Comoros +269', + '242' => 'Congo +242', + '243' => 'Congo - Kinshasa +243', + '682' => 'Cook Islands +682', + '506' => 'Costa Rica +506', + '385' => 'Croatia +385', + '5399' => 'Cuba (Guantanamo Bay) +5399', + '53' => 'Cuba +53', + '599' => 'Curaçao +599', + '357' => 'Cyprus +357', + '420' => 'Czech Republic +420', + '45' => 'Denmark +45', + '253' => 'Djibouti +253', + '1767' => 'Dominica +1767', + '1809' => 'Dominican Republic +1809', + '1829' => 'Dominican Republic +1829', + '1849' => 'Dominican Republic +1849', + '88213' => 'EMSAT (Mobile Satellite service) +88213', + '670' => 'East Timor +670', + '593' => 'Ecuador+593', + '20' => 'Egypt +20', + '503' => 'El Salvador +503', + '8812' => 'Ellipso (Mobile Satellite service) +8812', + '8813' => 'Ellipso (Mobile Satellite service) +8813', + '240' => 'Equatorial Guinea +240', + '291' => 'Eritrea +291', + '372' => 'Estonia +372', + '251' => 'Ethiopia +251', + '500' => 'Falkland Islands +500', + '298' => 'Faroe Islands +298', + '679' => 'Fiji +679', + '358' => 'Finland +358', + '33' => 'France +33', + '594' => 'French Guiana +594', + '689' => 'French Polynesia +689', + '241' => 'Gabon +241', + '220' => 'Gambia +220', + '995' => 'Georgia +995', + '49' => 'Germany +49', + '233' => 'Ghana +233', + '350' => 'Gibraltar +350', + '881' => 'Global Mobile Satellite System (GMSS) +881', + '8818' => 'Globalstar (Mobile Satellite Service) +8818', + '8819' => 'Globalstar (Mobile Satellite Service) +8819', + '30' => 'Greece +30', + '299' => 'Greenland +299', + '1473' => 'Grenada +1473', + '1671' => 'Guam +1671', + '502' => 'Guatemala +502', + '224' => 'Guinea +224', + '245' => 'Guinea-Bissau +245', + '592' => 'Guyana +592', + '509' => 'Haiti +509', + '504' => 'Honduras +504', + '852' => 'Hong Kong SAR China +852', + '36' => 'Hungary +36', + '8810' => 'ICO Global (Mobile Satellite Service) +8810', + '8811' => 'ICO Global (Mobile Satellite Service) +8811', + '354' => 'Iceland +354', + '91' => 'India +91', + '62' => 'Indonesia +62', + '870' => 'Inmarsat SNAC +870', + '800' => 'International Freephone Service +800', + '808' => 'International Shared Cost Service (ISCS) +808', + '964' => 'Iraq +964', + '353' => 'Ireland +353', + '8816' => 'Iridium (Mobile Satellite service) +8816', + '8817' => 'Iridium (Mobile Satellite service) +8817', + '972' => 'Israel +972', + '39' => 'Italy +39', + '225' => 'Ivory Coast +225', + '1876' => 'Jamaica +1876', + '81' => 'Japan +81', + '962' => 'Jordan +962', + '76' => 'Kazakhstan +76', + '77' => 'Kazakhstan +77', + '254' => 'Kenya +254', + '686' => 'Kiribati +686', + '965' => 'Kuwait +965', + '996' => 'Kyrgyzstan +996', + '856' => 'Laos +856', + '371' => 'Latvia +371', + '961' => 'Lebanon +961', + '266' => 'Lesotho +266', + '231' => 'Liberia +231', + '218' => 'Libya +218', + '423' => 'Liechtenstein +423', + '370' => 'Lithuania +370', + '352' => 'Luxembourg +352', + '853' => 'Macau SAR China +853', + '389' => 'Macedonia +389', + '261' => 'Madagascar +261', + '265' => 'Malawi +265', + '60' => 'Malaysia +60', + '960' => 'Maldives +960', + '223' => 'Mali +223', + '356' => 'Malta +356', + '692' => 'Marshall Islands +692', + '596' => 'Martinique +596', + '222' => 'Mauritania +222', + '230' => 'Mauritius +230', + '52' => 'Mexico +52', + '691' => 'Micronesia +691', + '373' => 'Moldova +373', + '377' => 'Monaco +377', + '976' => 'Mongolia +976', + '382' => 'Montenegro +382', + '1664' => 'Montserrat +1664', + '212' => 'Morocco +212', + '258' => 'Mozambique +258', + '95' => 'Myanmar +95', + '264' => 'Namibia +264', + '674' => 'Nauru +674', + '977' => 'Nepal +977', + '31' => 'Netherlands +31', + '687' => 'New Caledonia +687', + '64' => 'New Zealand +64', + '505' => 'Nicaragua +505', + '227' => 'Niger +227', + '234' => 'Nigeria +234', + '683' => 'Niue +683', + '672' => 'Norfolk Island +672', + '850' => 'North Korea +850', + '1670' => 'Northern Mariana Islands +1670', + '47' => 'Norway +47', + '968' => 'Oman +968', + '92' => 'Pakistan +92', + '680' => 'Palau +680', + '970' => 'Palestinian Territory +970', + '507' => 'Panama +507', + '675' => 'Papua New Guinea +675', + '595' => 'Paraguay +595', + '51' => 'Peru +51', + '63' => 'Philippines +63', + '48' => 'Poland +48', + '351' => 'Portugal +351', + '1787' => 'Puerto Rico +1787', + '1939' => 'Puerto Rico +1939', + '974' => 'Qatar +974', + '40' => 'Romania +40', + '7' => 'Russia +7', + '250' => 'Rwanda +250', + '262' => 'Réunion +262', + '290' => 'Saint Helena +290', + '1869' => 'Saint Kitts and Nevis +1869', + '1758' => 'Saint Lucia +1758', + '590' => 'Saint Martin +590', + '508' => 'Saint Pierre and Miquelon +508', + '1784' => 'Saint Vincent and the Grenadines +1784', + '685' => 'Samoa +685', + '378' => 'San Marino +378', + '966' => 'Saudi Arabia +966', + '221' => 'Senegal +221', + '381' => 'Serbia +381', + '248' => 'Seychelles +248', + '232' => 'Sierra Leone +232', + '65' => 'Singapore +65', + '1721' => 'Sint Maarten (from May 31, 2010) +1721', + '421' => 'Slovakia +421', + '386' => 'Slovenia +386', + '677' => 'Solomon Islands +677', + '252' => 'Somalia +252', + '27' => 'South Africa +27', + '82' => 'South Korea +82', + '34' => 'Spain +34', + '94' => 'Sri Lanka +94', + '249' => 'Sudan +249', + '597' => 'Suriname +597', + '268' => 'Swaziland +268', + '46' => 'Sweden +46', + '41' => 'Switzerland +41', + '963' => 'Syria +963', + '239' => 'São Tomé and Príncipe +239', + '886' => 'Taiwan +886', + '992' => 'Tajikistan +992', + '66' => 'Thailand +66', + '88216' => 'Thuraya (Mobile Satellite service) +88216', + '228' => 'Togo +228', + '690' => 'Tokelau +690', + '676' => 'Tonga +676', + '1868' => 'Trinidad and Tobago +1868', + '216' => 'Tunisia +216', + '90' => 'Turkey +90', + '993' => 'Turkmenistan +993', + '1649' => 'Turks and Caicos Islands +1649', + '688' => 'Tuvalu +688', + '1340' => 'U.S. Virgin Islands +1340', + '256' => 'Uganda +256', + '380' => 'Ukraine +380', + '971' => 'United Arab Emirates +971', + '878' => 'Universal Personal Telecommunications (UPT) +878', + '598' => 'Uruguay +598', + '998' => 'Uzbekistan +998', + '678' => 'Vanuatu +678', + '379' => 'Vatican +379', + '39066' => 'Vatican +39066', + '58' => 'Venezuela +58', + '84' => 'Vietnam +84', + '1808' => 'Wake Island +1808', + '681' => 'Wallis and Futuna +681', + '967' => 'Yemen +967', + '260' => 'Zambia +260', + '255' => 'Zanzibar +255', + '263' => 'Zimbabwe +263', + ); + } + + /** + * Call this method in API to check limits for entries + */ + public function checkLimits($model, $limit = 2) + { + if (!$this->di['license']->isPro()) { + $model = str_replace('Model_', '', $model); + $count = count($this->di['db']->find($model)); + + if ($count >= $limit) { + throw new \Box_Exception('You have reached free version limit. Upgrade to PRO version of BoxBilling if you want this limit removed.', null, 875); + } + } + } + + public function getNameservers() + { + $query = "SELECT param, value FROM setting WHERE param IN ('nameserver_1', 'nameserver_2', 'nameserver_3', 'nameserver_4')"; + + return $this->di['db']->getAssoc($query); + } + + public function getEmailSettings() + { + $params = array( + 'mailer', + 'smtp_authentication', + 'smtp_security', + 'smtp_port', + 'smtp_username', + 'smtp_password', + 'smtp_host', + ); + $res = $this->_getMultipleParams($params); + + return array( + 'mailer' => isset($res['mailer']) ? $res['mailer'] : 'sendmail', + 'smtp_authentication' => (isset($res['smtp_authentication']) && $res['smtp_authentication']) ? 'login' : NULL, + 'smtp_host' => (isset($res['smtp_host'])) ? $res['smtp_host'] : NULL, + 'smtp_security' => (isset($res['smtp_security']) && $res['smtp_security'] != 'no') ? $res['smtp_security'] : NULL, + 'smtp_port' => (isset($res['smtp_port'])) ? $res['smtp_port'] : NULL, + 'smtp_username' => (isset($res['smtp_username'])) ? $res['smtp_username'] : NULL, + 'smtp_password' => (isset($res['smtp_password'])) ? $res['smtp_password'] : NULL, + ); + } + + public function getVersion() + { + return \Box_Version::VERSION; + } +} \ No newline at end of file diff --git a/src/bb-modules/System/html_admin/mod_system_settings.phtml b/src/bb-modules/System/html_admin/mod_system_settings.phtml new file mode 100644 index 000000000..2fad248e6 --- /dev/null +++ b/src/bb-modules/System/html_admin/mod_system_settings.phtml @@ -0,0 +1,449 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'System settings' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +{% set new_params = admin.extension_config_get({"ext":"mod_system"}) %} +{% set params = admin.system_get_params %} + +
          + + + +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          +
          + +
          +
          +
          + +
          +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          + +
          +
          + {% trans 'Company terms of service, legal regulation' %} + +
          + +
          + {% trans 'Company privacy policy' %} + +
          + +
          + {% trans 'Notes' %} + +
          + +
          + +
          +
          + +
          + +
          +
          +
          +{% set default_countries %} +US=United States +AF=Afghanistan +AL=Albania +DZ=Algeria +AS=American Samoa +AD=Andorra +AO=Angola +AI=Anguilla +AQ=Antarctica +AG=Antigua And Barbuda +AR=Argentina +AM=Armenia +AW=Aruba +AU=Australia +AT=Austria +AZ=Azerbaijan +BS=Bahamas +BH=Bahrain +BD=Bangladesh +BB=Barbados +BY=Belarus +BE=Belgium +BZ=Belize +BJ=Benin +BM=Bermuda +BT=Bhutan +BO=Bolivia +BA=Bosnia And Herzegowina +BW=Botswana +BR=Brazil +BN=Brunei Darussalam +BG=Bulgaria +BF=Burkina Faso +BI=Burundi +KH=Cambodia +CM=Cameroon +CA=Canada +CV=Cape Verde +KY=Cayman Islands +CF=Central African Republic +TD=Chad +CL=Chile +CN=China +CX=Christmas Island +CC=Cocos (Keeling) Islands +CO=Colombia +KM=Comoros +CG=Congo +CK=Cook Islands +CR=Costa Rica +CI=Cote D'Ivoire +HR=Croatia +CU=Cuba +CY=Cyprus +CZ=Czech Republic +DK=Denmark +DJ=Djibouti +DM=Dominica +DO=Dominican Republic +TP=East Timor +EC=Ecuador +EG=Egypt +SV=El Salvador +GQ=Equatorial Guinea +ER=Eritrea +EE=Estonia +ET=Ethiopia +FO=Faroe Islands +FJ=Fiji +FI=Finland +FR=France +GA=Gabon +GB=Great Britain +GM=Gambia +GE=Georgia +DE=Germany +GH=Ghana +GI=Gibraltar +GR=Greece +GL=Greenland +GD=Grenada +GP=Guadeloupe +GU=Guam +GT=Guatemala +GN=Guinea +GW=Guinea-Bissau +GY=Guyana +HT=Haiti +EL=Hellenic Republic (Greece) +HN=Honduras +HK=Hong Kong +HU=Hungary +IS=Iceland +IN=India +ID=Indonesia +IR=Iran +IQ=Iraq +IE=Ireland +IL=Israel +IT=Italy +JM=Jamaica +JP=Japan +JO=Jordan +KZ=Kazakhstan +KE=Kenya +KI=Kiribati +KR=Korea, Republic Of +KW=Kuwait +KG=Kyrgyzstan +LV=Latvia +LB=Lebanon +LS=Lesotho +LR=Liberia +LY=Libyan Arab Jamahiriya +LI=Liechtenstein +LT=Lithuania +LU=Luxembourg +MO=Macau +MG=Madagascar +MW=Malawi +MY=Malaysia +MV=Maldives +ML=Mali +MT=Malta +MH=Marshall Islands +MQ=Martinique +MR=Mauritania +MU=Mauritius +YT=Mayotte +MX=Mexico +MD=Moldova, Republic Of +MC=Monaco +MN=Mongolia +MS=Montserrat +MA=Morocco +MZ=Mozambique +MM=Myanmar +NA=Namibia +NR=Nauru +NP=Nepal +NL=Netherlands +AN=Netherlands Antilles +NC=New Caledonia +NZ=New Zealand +NI=Nicaragua +NE=Niger +NG=Nigeria +NU=Niue +NF=Norfolk Island +MP=Northern Mariana Islands +NO=Norway +OM=Oman +PK=Pakistan +PW=Palau +PA=Panama +PG=Papua New Guinea +PY=Paraguay +PE=Peru +PH=Philippines +PN=Pitcairn +PL=Poland +PT=Portugal +PR=Puerto Rico +QA=Qatar +RE=Reunion +RO=Romania +RU=Russian Federation +RW=Rwanda +KN=Saint Kitts And Nevis +LC=Saint Lucia +WS=Samoa +SM=San Marino +ST=Sao Tome And Principe +SA=Saudi Arabia +SN=Senegal +SC=Seychelles +SL=Sierra Leone +SG=Singapore +SK=Slovakia +SI=Slovenia +SB=Solomon Islands +SO=Somalia +ZA=South Africa +ES=Spain +LK=Sri Lanka +SH=St. Helena +PM=St. Pierre And Miquelon +SD=Sudan +SR=Suriname +SZ=Swaziland +SE=Sweden +CH=Switzerland +SY=Syrian Arab Republic +TW=Taiwan +TJ=Tajikistan +TZ=Tanzania +TH=Thailand +TG=Togo +TK=Tokelau +TO=Tonga +TT=Trinidad And Tobago +TN=Tunisia +TR=Turkey +TM=Turkmenistan +TV=Tuvalu +UG=Uganda +UA=Ukraine +AE=United Arab Emirates +UY=Uruguay +UZ=Uzbekistan +VU=Vanuatu +VE=Venezuela +VN=Viet Nam +VG=Virgin Islands (British) +VI=Virgin Islands (U.S.) +EH=Western Sahara +YE=Yemen +ZM=Zambia +ZW=Zimbabwe +{% endset %} +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + + + +
          +
          +

          {% trans 'FTP layer for BoxBilling' %}

          +

          {% trans 'FTP is used to manage BoxBilling modules and updates.' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/System/icon.png b/src/bb-modules/System/icon.png new file mode 100644 index 000000000..c3f8dba8d Binary files /dev/null and b/src/bb-modules/System/icon.png differ diff --git a/src/bb-modules/System/manifest.json b/src/bb-modules/System/manifest.json new file mode 100644 index 000000000..80373ebe0 --- /dev/null +++ b/src/bb-modules/System/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "system", + "type": "mod", + "name": "System", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Theme/Api/Admin.php b/src/bb-modules/Theme/Api/Admin.php new file mode 100644 index 000000000..0c0d3f21c --- /dev/null +++ b/src/bb-modules/Theme/Api/Admin.php @@ -0,0 +1,116 @@ +getService()->getThemes(); + return array('list'=>$themes); + } + + /** + * Get theme by code + * + * @param string $code - theme code + * + * @return array + */ + public function get($data) + { + if(!isset($data['code'])) { + throw new \Box_Exception('Theme code is missing'); + } + + return $this->getService()->loadTheme($data['code']); + } + + /** + * Set new theme as default + * + * @param string $code - theme code + * @return bool + */ + public function select($data) + { + if(!isset($data['code'])) { + throw new \Box_Exception('Theme code is missing'); + } + $theme = $this->getService()->getTheme($data['code']); + + $systemService = $this->di['mod_service']('system'); + if($theme->isAdminAreaTheme()) { + $systemService->updateParam('admin_theme', $data['code']); + } else { + $systemService->updateParam('theme', $data['code']); + } + + $this->di['logger']->info('Changed default theme'); + return true; + } + + /** + * Delete theme preset + * + * @param string $code - theme code + * @param string $preset - theme preset code + * + * @return bool + */ + public function preset_delete($data) + { + if(!isset($data['code'])) { + throw new \Box_Exception('Theme code is missing'); + } + if(!isset($data['preset'])) { + throw new \Box_Exception('Theme preset name is missing'); + } + + $service = $this->getService(); + + $theme = $service->getTheme($data['code']); + $service->deletePreset($theme, $data['preset']); + + return true; + } + + /** + * Select new theme preset + * + * @param string $code - theme code + * @param string $preset - theme preset code + * + * @return bool + */ + public function preset_select($data) + { + if(!isset($data['code'])) { + throw new \Box_Exception('Theme code is missing'); + } + if(!isset($data['preset'])) { + throw new \Box_Exception('Theme preset name is missing'); + } + + $service = $this->getService(); + $theme = $service->getTheme($data['code']); + $service->setCurrentThemePreset($theme, $data['preset']); + + return true; + } +} \ No newline at end of file diff --git a/src/bb-modules/Theme/Controller/Admin.php b/src/bb-modules/Theme/Controller/Admin.php new file mode 100644 index 000000000..6369d22d4 --- /dev/null +++ b/src/bb-modules/Theme/Controller/Admin.php @@ -0,0 +1,130 @@ +di = $di; + } + + /** + * @return mixed + */ + public function getDi() + { + return $this->di; + } + + public function register(\Box_App &$app) + { + $app->get('/theme/:theme', 'get_theme', array('theme' => '[a-z0-9-_]+'), get_class($this)); + $app->post('/theme/:theme', 'save_theme_settings', array('theme' => '[a-z0-9-_]+'), get_class($this)); + } + + /** + * Save theme settings + * + * @param string $code - client area theme code + * @return array + */ + public function save_theme_settings(\Box_App $app, $theme) + { + $api = $app->getApiAdmin(); + + $mod = $this->di['mod']('theme'); + $service = $mod->getService(); + $t = $service->getTheme($theme); + + $isNewPreset = isset($_POST['save-current-setting']) ? (bool)$_POST['save-current-setting'] : false; + $preset = $service->getCurrentThemePreset($t); + if($isNewPreset && isset($_POST['save-current-setting-preset']) && !empty($_POST['save-current-setting-preset'])) { + $preset = $_POST['save-current-setting-preset']; + $preset = str_replace(" ", "", $preset); + $service->setCurrentThemePreset($t, $preset); + } + + unset($_POST['save-current-setting-preset']); + unset($_POST['save-current-setting']); + + + $error = null; + try { + if(!$t->isAssetsPathWritable()) { + throw new \Box_Exception('Theme ":name" assets folder is not writable. Files can not be uploaded and settings can not be saved. Set folder permissions to 777', array(':name'=>$t->getName())); + } + $service->updateSettings($t, $preset, $_POST); + $service->uploadAssets($t, $_FILES); + $service->regenerateThemeCssAndJsFiles($t, $preset, $api); + } catch(\Exception $e) { + error_log($e); + $error = $e->getMessage(); + } + + //optional data file + try { + $service->regenerateThemeSettingsDataFile($t); + } catch(\Exception $e) { + error_log($e); + $error = $e->getMessage(); + } + + $red_url = '/theme/'.$theme; + if($error) { + $red_url .= '?error='.$error; + } + $app->redirect($red_url); + } + + public function get_theme(\Box_App $app, $theme) + { + $api = $app->getApiAdmin(); + + $mod = $this->di['mod']('theme'); + $service = $mod->getService(); + $t = $service->getTheme($theme); + $preset = $service->getCurrentThemePreset($t); + $html = $t->getSettingsPageHtml($theme); + + $info = null; + if(!$t->isAssetsPathWritable()) { + $info = __('Theme ":name" assets folder is not writable. Set folder :folder permissions to 777', array(':name'=>$t->getName(), ':folder'=>$t->getPathAssets())); + } + + if(empty($html)) { + $info = __('Theme ":name" is not configurable', array(':name'=>$t->getName())); + } + + + $data = array( + 'info' => $info, + 'error' => isset($_GET['error']) ? $_GET['error'] : null, + 'theme_code' => $t->getName(), + 'settings_html' => $html, + 'uploaded' => $t->getUploadedAssets($theme), + 'settings' => $service->getThemeSettings($t, $preset), + 'current_preset'=> $preset, + 'presets' => $service->getThemePresets($t), + 'snippets' => $t->getSnippets(), + ); + + return $app->render('mod_theme_preset', $data); + } +} \ No newline at end of file diff --git a/src/bb-modules/Theme/Model/Theme.php b/src/bb-modules/Theme/Model/Theme.php new file mode 100644 index 000000000..7d0eb8cd2 --- /dev/null +++ b/src/bb-modules/Theme/Model/Theme.php @@ -0,0 +1,192 @@ +name = $name; + + if(!file_exists($this->getPath())) { + throw new \Box_Exception('Theme ":name" does not exists', array(':name'=>$name)); + } + } + + public function getName() + { + return $this->name; + } + + public function isAdminAreaTheme() + { + return (strpos($this->name, 'admin_') !== false); + } + + public function isAssetsPathWritable() + { + return is_writable($this->getPathAssets()); + } + + public function getSnippets() + { + $path = $this->getPathHtml(); + $snippets = glob($path .DIRECTORY_SEPARATOR. 'snippet_*.phtml'); + $result = array(); + foreach($snippets as $snippet) { + $result[basename($snippet)] = str_replace('snippet_','', pathinfo($snippet, PATHINFO_FILENAME)); + } + return $result; + } + + public function getUploadedAssets() + { + $assets_folder = $this->getPathAssets(); + $files = $this->getSettingsPageFiles(); + $uploaded = array(); + foreach($files as $file) { + if(file_exists($assets_folder .DIRECTORY_SEPARATOR. $file)) { + $uploaded[] = array( + 'name' => $file, + 'url' => $this->getUrl().'/assets/'.$file, + ); + } + } + return $uploaded; + } + + private function getSettingsPageFiles() + { + $str = $this->getSettingsPageHtml(); + if(empty($str)) { + return array(); + } + + $dom = new \DOMDocument(); + $dom->loadHTML($str); + $xpath = new \DOMXPath($dom); + $nodes = $xpath->query("//input[@type='file']/@name"); + $files = array(); + foreach($nodes as $node) { + $files[] = $node->textContent; + } + return $files; + } + + public function getSettingsPageHtml() + { + $spp = $this->getPathConfig() .DIRECTORY_SEPARATOR. 'settings.html'; + if(!file_exists($spp)) { + error_log('Theme '. $this->getName() .' does not have settings page'); + return ''; + } + + $settings_page = file_get_contents($spp); + $settings_page = $this->strip_tags_content($settings_page, ' + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Theme/html_admin/mod_theme_settings.phtml b/src/bb-modules/Theme/html_admin/mod_theme_settings.phtml new file mode 100644 index 000000000..fd75a0fc6 --- /dev/null +++ b/src/bb-modules/Theme/html_admin/mod_theme_settings.phtml @@ -0,0 +1,54 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Themes' %}{% endblock %} +{% set active_menu = 'system' %} + + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} +
          +
          {% trans 'Client area themes' %}
          + + + + + + + + + + + {% set themes = admin.theme_get_list({"per_page":100}) %} + {% for i, theme in themes.list %} + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %}{% trans 'Actions' %}
          {% if guest.extension_theme.code == theme.code %}{{ theme.code }}{% else %}{{ theme.code }}{% endif %} + {% trans 'Settings' %} + {% if guest.extension_theme.code != theme.code %} + {% trans 'Set as default' %} + {% endif %} +
          + {% trans 'The list is empty' %} +
          + +
          +{% endblock %} diff --git a/src/bb-modules/Theme/icon.png b/src/bb-modules/Theme/icon.png new file mode 100644 index 000000000..d82b9dd21 Binary files /dev/null and b/src/bb-modules/Theme/icon.png differ diff --git a/src/bb-modules/Theme/manifest.json b/src/bb-modules/Theme/manifest.json new file mode 100644 index 000000000..7cba2ca85 --- /dev/null +++ b/src/bb-modules/Theme/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "theme", + "type": "mod", + "name": "Theme", + "description": "BoxBilling core module", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/Wysiwyg/Api/Admin.php b/src/bb-modules/Wysiwyg/Api/Admin.php new file mode 100644 index 000000000..c4c340e56 --- /dev/null +++ b/src/bb-modules/Wysiwyg/Api/Admin.php @@ -0,0 +1,31 @@ +di['mod']('wysiwyg'); + $config = $mod->getConfig(); + return isset($config['editor']) ? $config['editor'] : 'markitup'; + } + + public function editors() + { + return array( + 'markitup' => 'markItUp', + 'ckeditor' => 'CKEditor', + ); + } +} \ No newline at end of file diff --git a/src/bb-modules/Wysiwyg/assets/ckeditor/CHANGES.md b/src/bb-modules/Wysiwyg/assets/ckeditor/CHANGES.md new file mode 100644 index 000000000..f725709ab --- /dev/null +++ b/src/bb-modules/Wysiwyg/assets/ckeditor/CHANGES.md @@ -0,0 +1,154 @@ +CKEditor 4 Changelog +==================== + +## CKEditor 4.1.2 + +* Added new translation: Sinhala. +* [#10339](http://dev.ckeditor.com/ticket/10339): Fixed: Error thrown when inserted data totally stripped out after filtering and processing. +* [#10298](http://dev.ckeditor.com/ticket/10298): Fixed: Data processor breaks attributes containing protected parts. +* [#10367](http://dev.ckeditor.com/ticket/10367): Fixed: `editable#insertText` loses characters when `RegExp` replace controls are being inserted. +* [#10165](http://dev.ckeditor.com/ticket/10165): [IE] Access denied error when `document.domain` has been altered. +* [#9761](http://dev.ckeditor.com/ticket/9761): Update *Backspace* key state in `keystrokeHandler#blockedKeystrokes` when calling `editor.setReadOnly()`. +* [#6504](http://dev.ckeditor.com/ticket/6504): Fixed: Race condition while loading several `config.customConfig` files. +* [#10146](http://dev.ckeditor.com/ticket/10146): [Firefox] Empty lines are being removed while `config#enterMode` is `CKEDITOR.ENTER_BR`. +* [#10360](http://dev.ckeditor.com/ticket/10360): Fixed: ARIA `role="application"` should not be used for dialogs. +* [#10361](http://dev.ckeditor.com/ticket/10361): Fixed: ARIA `role="application"` should not be used for floating panels. +* [#10510](http://dev.ckeditor.com/ticket/10510): Introduced unique voice labels to differentiate between different editor instances. +* [#9945](http://dev.ckeditor.com/ticket/9945): [iOS] Scrolling not possible on iPad. +* [#10389](http://dev.ckeditor.com/ticket/10389): Fixed: Invalid HTML in the "Text and Table" template. + +## CKEditor 4.1.1 + +* Added new translation: Albanian. +* [#10172](http://dev.ckeditor.com/ticket/10172): Pressing *Delete*/*Backspace* in an empty table cell moves the cursor to the next/previous cell. +* [#10219](http://dev.ckeditor.com/ticket/10219): Error thrown when destroying an editor instance in parallel with a mouseup event. +* [#10265](http://dev.ckeditor.com/ticket/10265): Wrong loop type in the Filebrowser plugin. +* [#10249](http://dev.ckeditor.com/ticket/10249): Wrong undo/redo states at start. +* [#10268](http://dev.ckeditor.com/ticket/10268): "Show Blocks" does not recover after switching to source view. +* [#9995](http://dev.ckeditor.com/ticket/9995): HTML code in `textarea` should not be modified by the `htmlDataProcessor`. +* [#10320](http://dev.ckeditor.com/ticket/10320): Justify plugin should add elements to the ACF based on current Enter mode. +* [#10260](http://dev.ckeditor.com/ticket/10260): Fixed: Advanced Content Filter blocks `tabSpaces`. Unified `data-cke-*` attributes filtering. +* [#10315](http://dev.ckeditor.com/ticket/10315): [Webkit] Undo manager should not record snapshots after a filling character was added/removed. +* [#10291](http://dev.ckeditor.com/ticket/10291): [Webkit] Space after a filling character should be secured. +* [#10330](http://dev.ckeditor.com/ticket/10330): [Webkit] The filling character is not removed on `keydown` in specific cases. +* [#10285](http://dev.ckeditor.com/ticket/10285): Fixed: Styled text pasted from MS Word causes an infinite loop. +* [#10131](http://dev.ckeditor.com/ticket/10131): Fixed: `undoManager#update` does not refresh the command state. +* [#10337](http://dev.ckeditor.com/ticket/10337): Fixed: Unable to remove `` using `removeformat`. + +## CKEditor 4.1 + +* [#10192](http://dev.ckeditor.com/ticket/10192): Closing lists with Enter key does not work with Advanced Content Filter in several cases. +* [#10191](http://dev.ckeditor.com/ticket/10191): Fixed allowed content rules unification, so the `filter.allowedContent` property always contains rules in the same format. +* [#10224](http://dev.ckeditor.com/ticket/10224): Advanced Content Filter does not remove non-empty `` elements anymore. +* Minor issues in plugin integration with Advanced Content Filter: + * [#10166](http://dev.ckeditor.com/ticket/10166): Added transformation from the `align` attribute to `float` style to preserve backward compatibility after the introduction of Advanced Content Filter. + * [#10195](http://dev.ckeditor.com/ticket/10195): Image plugin no longer registers rules for links to Advanced Content Filter. + * [#10213](http://dev.ckeditor.com/ticket/10213): Justify plugin is now correctly registering rules to Advanced Content Filter when `config.justifyClasses` is defined. + +## CKEditor 4.1 RC + +* [#9829](http://dev.ckeditor.com/ticket/9829): Data and features activation based on editor configuration. + + Brand new data filtering system that works in 2 modes: + + * based on loaded features (toolbar items, plugins) - the data will be filtered according to what the editor in its + current configuration can handle, + * based on `config.allowedContent` rules - the data will be filtered and the editor features (toolbar items, commands, + keystrokes) will be enabled if they are allowed. + + See the `datafiltering.html` sample, [guides](http://docs.ckeditor.com/#!/guide/dev_advanced_content_filter) and [`CKEDITOR.filter` API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.filter). +* [#9387](http://dev.ckeditor.com/ticket/9387): Reintroduced "Shared Spaces" - the ability to display toolbar and bottom editor space in selected locations and to share them by different editor instances. +* [#9907](http://dev.ckeditor.com/ticket/9907): Added the `contentPreview` event for preview data manipulation. +* [#9713](http://dev.ckeditor.com/ticket/9713): Introduced the `sourcedialog` plugin that brings raw HTML editing for inline editor instances. +* Included in [#9829](http://dev.ckeditor.com/ticket/9829): Introduced new events, `toHtml` and `toDataFormat`, allowing for better integration with data processing. See API documentation: [`toHtml`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toHtml), [`toDataFormat`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-event-toDataFormat). +* [#9981](http://dev.ckeditor.com/ticket/9981): Added ability to filter `htmlParser.fragment`, `htmlParser.element` etc. by many `htmlParser.filter`s before writing structure to an HTML string. +* Included in [#10103](http://dev.ckeditor.com/ticket/10103): + * Introduced the `editor.status` property to make it easier to check the current status of the editor. See [API documentation](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-property-status). + * Default `command` state is now `CKEDITOR.TRISTATE_DISABLE`. It will be activated on `editor.instanceReady` or immediately after being added if the editor is already initialized. +* [#9796](http://dev.ckeditor.com/ticket/9796): Introduced `` as a default tag for strikethrough, which replaces obsolete `` in HTML5. + +## CKEditor 4.0.3 + +* [#10196](http://dev.ckeditor.com/ticket/10196): Fixed context menus not opening with keyboard shortcuts when Autogrow is enabled. +* [#10212](http://dev.ckeditor.com/ticket/10212): [IE7-10] Undo command throws errors after multiple switches between Source and WYSIWYG view. +* [#10219](http://dev.ckeditor.com/ticket/10219): [Inline editor] Error thrown after calling editor.destroy(). + +## CKEditor 4.0.2 + +* [#9779](http://dev.ckeditor.com/ticket/9779): Fixed overriding `CKEDITOR.getUrl` with `CKEDITOR_GETURL`. +* [#9772](http://dev.ckeditor.com/ticket/9772): Custom buttons in dialog window footer have different look and size (Moono, Kama). +* [#9029](http://dev.ckeditor.com/ticket/9029): Custom styles added with `styleSet.add()` are displayed in wrong order. +* [#9887](http://dev.ckeditor.com/ticket/9887): Disable magicline when `editor.readOnly` is set. +* [#9882](http://dev.ckeditor.com/ticket/9882): Fixed empty document title on `getData()` if set via the Document Properties dialog window. +* [#9773](http://dev.ckeditor.com/ticket/9773): Fixed rendering problems with selection fields in the Kama skin. +* [#9851](http://dev.ckeditor.com/ticket/9851): The `selectionChange` event is not fired when mouse selection ended outside editable. +* [#9903](http://dev.ckeditor.com/ticket/9903): [Inline editor] Bad positioning of floating space with page horizontal scroll. +* [#9872](http://dev.ckeditor.com/ticket/9872): `editor.checkDirty()` returns `true` when called onload. Removed the obsolete `editor.mayBeDirty` flag. +* [#9893](http://dev.ckeditor.com/ticket/9893): Fixed broken toolbar when editing mixed direction content in Quirks mode. +* [#9845](http://dev.ckeditor.com/ticket/9845): Fixed TAB navigation in the Link dialog window when the Anchor option is used and no anchors are available. +* [#9883](http://dev.ckeditor.com/ticket/9883): Maximizing was making the entire page editable with divarea-based editors. +* [#9940](http://dev.ckeditor.com/ticket/9940): [Firefox] Navigating back to a page with the editor was making the entire page editable. +* [#9966](http://dev.ckeditor.com/ticket/9966): Fixed: Unable to type square brackets with French keyboard layout. Changed magicline keystrokes. +* [#9507](http://dev.ckeditor.com/ticket/9507): [Firefox] Selection is moved before editable position when the editor is focused for the first time. +* [#9947](http://dev.ckeditor.com/ticket/9947): [Webkit] Editor overflows parent container in some edge cases. +* [#10105](http://dev.ckeditor.com/ticket/10105): Fixed: Broken sourcearea view when an RTL language is set. +* [#10123](http://dev.ckeditor.com/ticket/10123): [Webkit] Fixed: Several dialog windows have broken layout since the latest Webkit release. +* [#10152](http://dev.ckeditor.com/ticket/10152): Fixed: Invalid ARIA property used on menu items. + +## CKEditor 4.0.1.1 + +* Security update: Added protection against XSS attack and possible path disclosure in PHP sample. + +## CKEditor 4.0.1 + +Fixed issues: + +* [#9655](http://dev.ckeditor.com/ticket/9655): Support for IE Quirks Mode in new Moono skin. +* Accessibility issues (mainly on inline editor): [#9364](http://dev.ckeditor.com/ticket/9364), [#9368](http://dev.ckeditor.com/ticket/9368), [#9369](http://dev.ckeditor.com/ticket/9369), [#9370](http://dev.ckeditor.com/ticket/9370), [#9541](http://dev.ckeditor.com/ticket/9541), [#9543](http://dev.ckeditor.com/ticket/9543), [#9841](http://dev.ckeditor.com/ticket/9841), [#9844](http://dev.ckeditor.com/ticket/9844). +* Magic-line: + * [#9481](http://dev.ckeditor.com/ticket/9481): Added accessibility support for Magic-line. + * [#9509](http://dev.ckeditor.com/ticket/9509): Added Magic-line support for forms. + * [#9573](http://dev.ckeditor.com/ticket/9573): Magic-line doesn't disappear on `mouseout` in the specific case. +* [#9754](http://dev.ckeditor.com/ticket/9754): [Webkit] Cut & paste simple unformatted text generates inline wrapper in Webkits. +* [#9456](http://dev.ckeditor.com/ticket/9456): [Chrome] Properly paste bullet list style from MS-Word. +* [#9699](http://dev.ckeditor.com/ticket/9699), [#9758](http://dev.ckeditor.com/ticket/9758): Improved selection locking when selecting by dragging. +* Context menu: + * [#9712](http://dev.ckeditor.com/ticket/9712): Context menu open destroys editor focus. + * [#9366](http://dev.ckeditor.com/ticket/9366): Context menu should be displayed over floating toolbar. + * [#9706](http://dev.ckeditor.com/ticket/9706): Context menu generates JS error in inline mode when editor attached to header element. +* [#9800](http://dev.ckeditor.com/ticket/9800): Hide float panel when resizing window. +* [#9721](http://dev.ckeditor.com/ticket/9721): Padding in content of div based editor puts editing area under bottom UI space. +* [#9528](http://dev.ckeditor.com/ticket/9528): Host page's `box-sizing` style shouldn't influence editor UI elements. +* [#9503](http://dev.ckeditor.com/ticket/9503): Forms plugin adds context menu listeners only on supported input types. Added support for `tel, email, search` and `url` input types. +* [#9769](http://dev.ckeditor.com/ticket/9769): Improved floating toolbar positioning in narrow window. +* [#9875](http://dev.ckeditor.com/ticket/9875): Table dialog doesn't populate width correctly. +* [#8675](http://dev.ckeditor.com/ticket/8675): Deleting cells in nested table removes outer table cell. +* [#9815](http://dev.ckeditor.com/ticket/9815): Can't edit dialog fields on editor initialized in jQuery UI modal dialog. +* [#8888](http://dev.ckeditor.com/ticket/8888): CKEditor dialogs do not show completely in small window. +* [#9360](http://dev.ckeditor.com/ticket/9360): [Inline editor] Blocks shown for a div stay permanently even after user exists editing the div. +* [#9531](http://dev.ckeditor.com/ticket/9531): [Firefox & Inline editor] Toolbar is lost when closing format combo by clicking on its button. +* [#9553](http://dev.ckeditor.com/ticket/9553): Table width incorrectly set when `border-width` style is specified. +* [#9594](http://dev.ckeditor.com/ticket/9594): Cannot tab past CKEditor when it is in read only mode. +* [#9658](http://dev.ckeditor.com/ticket/9658): [IE9] Justify not working on selected image. +* [#9686](http://dev.ckeditor.com/ticket/9686): Added missing contents styles for `
          `.
          +* [#9709](http://dev.ckeditor.com/ticket/9709): PasteFromWord should not depend on configuration from other styles.
          +* [#9726](http://dev.ckeditor.com/ticket/9726): Removed color dialog dependency from table tools.
          +* [#9765](http://dev.ckeditor.com/ticket/9765): Toolbar Collapse command documented incorrectly on Accessibility Instructions dialog.
          +* [#9771](http://dev.ckeditor.com/ticket/9771): [Webkit & Opera] Fixed scrolling issues when pasting.
          +* [#9787](http://dev.ckeditor.com/ticket/9787): [IE9] onChange isn't fired for checkboxes in dialogs.
          +* [#9842](http://dev.ckeditor.com/ticket/9842): [Firefox 17] When we open toolbar menu for the first time & press down arrow key, focus goes to next toolbar button instead of menu options.
          +* [#9847](http://dev.ckeditor.com/ticket/9847): Elements path shouldn't be initialized on inline editor.
          +* [#9853](http://dev.ckeditor.com/ticket/9853): `Editor#addRemoveFormatFilter` is exposed before it really works.
          +* [#8893](http://dev.ckeditor.com/ticket/8893): Value of `pasteFromWordCleanupFile` config is now taken from instance configuration.
          +* [#9693](http://dev.ckeditor.com/ticket/9693): Removed "live preview" checkbox from UI color picker.
          +
          +
          +## CKEditor 4.0
          +
          +The first stable release of the new CKEditor 4 code line.
          +
          +The CKEditor JavaScript API has been kept compatible with CKEditor 4, whenever
          +possible. The list of relevant changes can be found in the [API Changes page of
          +the CKEditor 4 documentation][1].
          +
          +[1]: http://docs.ckeditor.com/#!/guide/dev_api_changes "API Changes"
          diff --git a/src/bb-modules/Wysiwyg/assets/ckeditor/LICENSE.md b/src/bb-modules/Wysiwyg/assets/ckeditor/LICENSE.md
          new file mode 100644
          index 000000000..cf70e61e6
          --- /dev/null
          +++ b/src/bb-modules/Wysiwyg/assets/ckeditor/LICENSE.md
          @@ -0,0 +1,1264 @@
          +Software License Agreement
          +==========================
          +
          +CKEditor - The text editor for Internet - http://ckeditor.com
          +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
          +
          +Licensed under the terms of any of the following licenses at your
          +choice:
          +
          + - GNU General Public License Version 2 or later (the "GPL")
          +   http://www.gnu.org/licenses/gpl.html
          +   (See Appendix A)
          +
          + - GNU Lesser General Public License Version 2.1 or later (the "LGPL")
          +   http://www.gnu.org/licenses/lgpl.html
          +   (See Appendix B)
          +
          + - Mozilla Public License Version 1.1 or later (the "MPL")
          +   http://www.mozilla.org/MPL/MPL-1.1.html
          +   (See Appendix C)
          +
          +You are not required to, but if you want to explicitly declare the
          +license you have chosen to be bound to when using, reproducing,
          +modifying and distributing this software, just include a text file
          +titled "legal.txt" in your version of this software, indicating your
          +license choice. In any case, your choice will not restrict any
          +recipient of your version of this software to use, reproduce, modify
          +and distribute this software under any of the above licenses.
          +
          +Sources of Intellectual Property Included in CKEditor
          +-----------------------------------------------------
          +
          +Where not otherwise indicated, all CKEditor content is authored by
          +CKSource engineers and consists of CKSource-owned intellectual
          +property. In some specific instances, CKEditor will incorporate work
          +done by developers outside of CKSource with their express permission.
          +
          +Trademarks
          +----------
          +
          +CKEditor is a trademark of CKSource - Frederico Knabben. All other brand
          +and product names are trademarks, registered trademarks or service
          +marks of their respective holders.
          +
          +---
          +
          +Appendix A: The GPL License
          +---------------------------
          +
          +GNU GENERAL PUBLIC LICENSE
          +Version 2, June 1991
          +
          + Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
          + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
          + Everyone is permitted to copy and distribute verbatim copies
          + of this license document, but changing it is not allowed.
          +
          +Preamble
          +
          +  The licenses for most software are designed to take away your
          +freedom to share and change it.  By contrast, the GNU General Public
          +License is intended to guarantee your freedom to share and change free
          +software-to make sure the software is free for all its users.  This
          +General Public License applies to most of the Free Software
          +Foundation's software and to any other program whose authors commit to
          +using it.  (Some other Free Software Foundation software is covered by
          +the GNU Lesser General Public License instead.)  You can apply it to
          +your programs, too.
          +
          +  When we speak of free software, we are referring to freedom, not
          +price.  Our General Public Licenses are designed to make sure that you
          +have the freedom to distribute copies of free software (and charge for
          +this service if you wish), that you receive source code or can get it
          +if you want it, that you can change the software or use pieces of it
          +in new free programs; and that you know you can do these things.
          +
          +  To protect your rights, we need to make restrictions that forbid
          +anyone to deny you these rights or to ask you to surrender the rights.
          +These restrictions translate to certain responsibilities for you if you
          +distribute copies of the software, or if you modify it.
          +
          +  For example, if you distribute copies of such a program, whether
          +gratis or for a fee, you must give the recipients all the rights that
          +you have.  You must make sure that they, too, receive or can get the
          +source code.  And you must show them these terms so they know their
          +rights.
          +
          +  We protect your rights with two steps: (1) copyright the software, and
          +(2) offer you this license which gives you legal permission to copy,
          +distribute and/or modify the software.
          +
          +  Also, for each author's protection and ours, we want to make certain
          +that everyone understands that there is no warranty for this free
          +software.  If the software is modified by someone else and passed on, we
          +want its recipients to know that what they have is not the original, so
          +that any problems introduced by others will not reflect on the original
          +authors' reputations.
          +
          +  Finally, any free program is threatened constantly by software
          +patents.  We wish to avoid the danger that redistributors of a free
          +program will individually obtain patent licenses, in effect making the
          +program proprietary.  To prevent this, we have made it clear that any
          +patent must be licensed for everyone's free use or not licensed at all.
          +
          +  The precise terms and conditions for copying, distribution and
          +modification follow.
          +
          +GNU GENERAL PUBLIC LICENSE
          +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
          +
          +  0. This License applies to any program or other work which contains
          +a notice placed by the copyright holder saying it may be distributed
          +under the terms of this General Public License.  The "Program", below,
          +refers to any such program or work, and a "work based on the Program"
          +means either the Program or any derivative work under copyright law:
          +that is to say, a work containing the Program or a portion of it,
          +either verbatim or with modifications and/or translated into another
          +language.  (Hereinafter, translation is included without limitation in
          +the term "modification".)  Each licensee is addressed as "you".
          +
          +Activities other than copying, distribution and modification are not
          +covered by this License; they are outside its scope.  The act of
          +running the Program is not restricted, and the output from the Program
          +is covered only if its contents constitute a work based on the
          +Program (independent of having been made by running the Program).
          +Whether that is true depends on what the Program does.
          +
          +  1. You may copy and distribute 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 and disclaimer of warranty; keep intact all the
          +notices that refer to this License and to the absence of any warranty;
          +and give any other recipients of the Program a copy of this License
          +along with the Program.
          +
          +You may charge a fee for the physical act of transferring a copy, and
          +you may at your option offer warranty protection in exchange for a fee.
          +
          +  2. You may modify your copy or copies of the Program or any portion
          +of it, thus forming a work based on the Program, and copy and
          +distribute such modifications or work under the terms of Section 1
          +above, provided that you also meet all of these conditions:
          +
          +    a) You must cause the modified files to carry prominent notices
          +    stating that you changed the files and the date of any change.
          +
          +    b) You must cause any work that you distribute or publish, that in
          +    whole or in part contains or is derived from the Program or any
          +    part thereof, to be licensed as a whole at no charge to all third
          +    parties under the terms of this License.
          +
          +    c) If the modified program normally reads commands interactively
          +    when run, you must cause it, when started running for such
          +    interactive use in the most ordinary way, to print or display an
          +    announcement including an appropriate copyright notice and a
          +    notice that there is no warranty (or else, saying that you provide
          +    a warranty) and that users may redistribute the program under
          +    these conditions, and telling the user how to view a copy of this
          +    License.  (Exception: if the Program itself is interactive but
          +    does not normally print such an announcement, your work based on
          +    the Program is not required to print an announcement.)
          +
          +These requirements apply to the modified work as a whole.  If
          +identifiable sections of that work are not derived from the Program,
          +and can be reasonably considered independent and separate works in
          +themselves, then this License, and its terms, do not apply to those
          +sections when you distribute them as separate works.  But when you
          +distribute the same sections as part of a whole which is a work based
          +on the Program, the distribution of the whole must be on the terms of
          +this License, whose permissions for other licensees extend to the
          +entire whole, and thus to each and every part regardless of who wrote it.
          +
          +Thus, it is not the intent of this section to claim rights or contest
          +your rights to work written entirely by you; rather, the intent is to
          +exercise the right to control the distribution of derivative or
          +collective works based on the Program.
          +
          +In addition, mere aggregation of another work not based on the Program
          +with the Program (or with a work based on the Program) on a volume of
          +a storage or distribution medium does not bring the other work under
          +the scope of this License.
          +
          +  3. You may copy and distribute the Program (or a work based on it,
          +under Section 2) in object code or executable form under the terms of
          +Sections 1 and 2 above provided that you also do one of the following:
          +
          +    a) Accompany it with the complete corresponding machine-readable
          +    source code, which must be distributed under the terms of Sections
          +    1 and 2 above on a medium customarily used for software interchange; or,
          +
          +    b) Accompany it with a written offer, valid for at least three
          +    years, to give any third party, for a charge no more than your
          +    cost of physically performing source distribution, a complete
          +    machine-readable copy of the corresponding source code, to be
          +    distributed under the terms of Sections 1 and 2 above on a medium
          +    customarily used for software interchange; or,
          +
          +    c) Accompany it with the information you received as to the offer
          +    to distribute corresponding source code.  (This alternative is
          +    allowed only for noncommercial distribution and only if you
          +    received the program in object code or executable form with such
          +    an offer, in accord with Subsection b above.)
          +
          +The source code for a work means the preferred form of the work for
          +making modifications to it.  For an executable work, complete source
          +code means all the source code for all modules it contains, plus any
          +associated interface definition files, plus the scripts used to
          +control compilation and installation of the executable.  However, as a
          +special exception, the source code distributed need not include
          +anything that is normally distributed (in either source or binary
          +form) with the major components (compiler, kernel, and so on) of the
          +operating system on which the executable runs, unless that component
          +itself accompanies the executable.
          +
          +If distribution of executable or object code is made by offering
          +access to copy from a designated place, then offering equivalent
          +access to copy the source code from the same place counts as
          +distribution of the source code, even though third parties are not
          +compelled to copy the source along with the object code.
          +
          +  4. You may not copy, modify, sublicense, or distribute the Program
          +except as expressly provided under this License.  Any attempt
          +otherwise to copy, modify, sublicense or distribute the Program is
          +void, and will automatically terminate your rights under this License.
          +However, parties who have received copies, or rights, from you under
          +this License will not have their licenses terminated so long as such
          +parties remain in full compliance.
          +
          +  5. You are not required to accept this License, since you have not
          +signed it.  However, nothing else grants you permission to modify or
          +distribute the Program or its derivative works.  These actions are
          +prohibited by law if you do not accept this License.  Therefore, by
          +modifying or distributing the Program (or any work based on the
          +Program), you indicate your acceptance of this License to do so, and
          +all its terms and conditions for copying, distributing or modifying
          +the Program or works based on it.
          +
          +  6. Each time you redistribute the Program (or any work based on the
          +Program), the recipient automatically receives a license from the
          +original licensor to copy, distribute or modify the Program subject to
          +these terms and conditions.  You may not impose any further
          +restrictions on the recipients' exercise of the rights granted herein.
          +You are not responsible for enforcing compliance by third parties to
          +this License.
          +
          +  7. If, as a consequence of a court judgment or allegation of patent
          +infringement or for any other reason (not limited to patent issues),
          +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
          +distribute so as to satisfy simultaneously your obligations under this
          +License and any other pertinent obligations, then as a consequence you
          +may not distribute the Program at all.  For example, if a patent
          +license would not permit royalty-free redistribution of the Program by
          +all those who receive copies directly or indirectly through you, then
          +the only way you could satisfy both it and this License would be to
          +refrain entirely from distribution of the Program.
          +
          +If any portion of this section is held invalid or unenforceable under
          +any particular circumstance, the balance of the section is intended to
          +apply and the section as a whole is intended to apply in other
          +circumstances.
          +
          +It is not the purpose of this section to induce you to infringe any
          +patents or other property right claims or to contest validity of any
          +such claims; this section has the sole purpose of protecting the
          +integrity of the free software distribution system, which is
          +implemented by public license practices.  Many people have made
          +generous contributions to the wide range of software distributed
          +through that system in reliance on consistent application of that
          +system; it is up to the author/donor to decide if he or she is willing
          +to distribute software through any other system and a licensee cannot
          +impose that choice.
          +
          +This section is intended to make thoroughly clear what is believed to
          +be a consequence of the rest of this License.
          +
          +  8. If the distribution and/or use of the Program is restricted in
          +certain countries either by patents or by copyrighted interfaces, the
          +original copyright holder who places the Program under this License
          +may add an explicit geographical distribution limitation excluding
          +those countries, so that distribution is permitted only in or among
          +countries not thus excluded.  In such case, this License incorporates
          +the limitation as if written in the body of this License.
          +
          +  9. The Free Software Foundation may publish revised and/or new versions
          +of the 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 a version number of this License which applies to it and "any
          +later version", you have the option of following the terms and conditions
          +either of that version or of any later version published by the Free
          +Software Foundation.  If the Program does not specify a version number of
          +this License, you may choose any version ever published by the Free Software
          +Foundation.
          +
          +  10. If you wish to incorporate parts of the Program into other free
          +programs whose distribution conditions are different, write to the author
          +to ask for permission.  For software which is copyrighted by the Free
          +Software Foundation, write to the Free Software Foundation; we sometimes
          +make exceptions for this.  Our decision will be guided by the two goals
          +of preserving the free status of all derivatives of our free software and
          +of promoting the sharing and reuse of software generally.
          +
          +NO WARRANTY
          +
          +  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, 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.
          +
          +  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
          +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
          +REDISTRIBUTE 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.
          +
          +END OF TERMS AND CONDITIONS
          +
          +
          +Appendix B: The LGPL License
          +----------------------------
          +
          +GNU LESSER GENERAL PUBLIC LICENSE
          +Version 2.1, February 1999
          +
          + Copyright (C) 1991, 1999 Free Software Foundation, Inc.
          +     59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
          + Everyone is permitted to copy and distribute verbatim copies
          + of this license document, but changing it is not allowed.
          +
          +[This is the first released version of the Lesser GPL.  It also counts
          + as the successor of the GNU Library Public License, version 2, hence
          + the version number 2.1.]
          +
          +Preamble
          +
          +  The licenses for most software are designed to take away your
          +freedom to share and change it.  By contrast, the GNU General Public
          +Licenses are intended to guarantee your freedom to share and change
          +free software-to make sure the software is free for all its users.
          +
          +  This license, the Lesser General Public License, applies to some
          +specially designated software packages-typically libraries-of the
          +Free Software Foundation and other authors who decide to use it.  You
          +can use it too, but we suggest you first think carefully about whether
          +this license or the ordinary General Public License is the better
          +strategy to use in any particular case, based on the explanations below.
          +
          +  When we speak of free software, we are referring to freedom of use,
          +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 this service if you wish); that you receive source code or can get
          +it if you want it; that you can change the software and use pieces of
          +it in new free programs; and that you are informed that you can do
          +these things.
          +
          +  To protect your rights, we need to make restrictions that forbid
          +distributors to deny you these rights or to ask you to surrender these
          +rights.  These restrictions translate to certain responsibilities for
          +you if you distribute copies of the library or if you modify it.
          +
          +  For example, if you distribute copies of the library, whether gratis
          +or for a fee, you must give the recipients all the rights that we gave
          +you.  You must make sure that they, too, receive or can get the source
          +code.  If you link other code with the library, you must provide
          +complete object files to the recipients, so that they can relink them
          +with the library after making changes to the library and recompiling
          +it.  And you must show them these terms so they know their rights.
          +
          +  We protect your rights with a two-step method: (1) we copyright the
          +library, and (2) we offer you this license, which gives you legal
          +permission to copy, distribute and/or modify the library.
          +
          +  To protect each distributor, we want to make it very clear that
          +there is no warranty for the free library.  Also, if the library is
          +modified by someone else and passed on, the recipients should know
          +that what they have is not the original version, so that the original
          +author's reputation will not be affected by problems that might be
          +introduced by others.
          +
          +  Finally, software patents pose a constant threat to the existence of
          +any free program.  We wish to make sure that a company cannot
          +effectively restrict the users of a free program by obtaining a
          +restrictive license from a patent holder.  Therefore, we insist that
          +any patent license obtained for a version of the library must be
          +consistent with the full freedom of use specified in this license.
          +
          +  Most GNU software, including some libraries, is covered by the
          +ordinary GNU General Public License.  This license, the GNU Lesser
          +General Public License, applies to certain designated libraries, and
          +is quite different from the ordinary General Public License.  We use
          +this license for certain libraries in order to permit linking those
          +libraries into non-free programs.
          +
          +  When a program is linked with a library, whether statically or using
          +a shared library, the combination of the two is legally speaking a
          +combined work, a derivative of the original library.  The ordinary
          +General Public License therefore permits such linking only if the
          +entire combination fits its criteria of freedom.  The Lesser General
          +Public License permits more lax criteria for linking other code with
          +the library.
          +
          +  We call this license the "Lesser" General Public License because it
          +does Less to protect the user's freedom than the ordinary General
          +Public License.  It also provides other free software developers Less
          +of an advantage over competing non-free programs.  These disadvantages
          +are the reason we use the ordinary General Public License for many
          +libraries.  However, the Lesser license provides advantages in certain
          +special circumstances.
          +
          +  For example, on rare occasions, there may be a special need to
          +encourage the widest possible use of a certain library, so that it becomes
          +a de-facto standard.  To achieve this, non-free programs must be
          +allowed to use the library.  A more frequent case is that a free
          +library does the same job as widely used non-free libraries.  In this
          +case, there is little to gain by limiting the free library to free
          +software only, so we use the Lesser General Public License.
          +
          +  In other cases, permission to use a particular library in non-free
          +programs enables a greater number of people to use a large body of
          +free software.  For example, permission to use the GNU C Library in
          +non-free programs enables many more people to use the whole GNU
          +operating system, as well as its variant, the GNU/Linux operating
          +system.
          +
          +  Although the Lesser General Public License is Less protective of the
          +users' freedom, it does ensure that the user of a program that is
          +linked with the Library has the freedom and the wherewithal to run
          +that program using a modified version of the Library.
          +
          +  The precise terms and conditions for copying, distribution and
          +modification follow.  Pay close attention to the difference between a
          +"work based on the library" and a "work that uses the library".  The
          +former contains code derived from the library, whereas the latter must
          +be combined with the library in order to run.
          +
          +GNU LESSER GENERAL PUBLIC LICENSE
          +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
          +
          +  0. This License Agreement applies to any software library or other
          +program which contains a notice placed by the copyright holder or
          +other authorized party saying it may be distributed under the terms of
          +this Lesser General Public License (also called "this License").
          +Each licensee is addressed as "you".
          +
          +  A "library" means a collection of software functions and/or data
          +prepared so as to be conveniently linked with application programs
          +(which use some of those functions and data) to form executables.
          +
          +  The "Library", below, refers to any such software library or work
          +which has been distributed under these terms.  A "work based on the
          +Library" means either the Library or any derivative work under
          +copyright law: that is to say, a work containing the Library or a
          +portion of it, either verbatim or with modifications and/or translated
          +straightforwardly into another language.  (Hereinafter, translation is
          +included without limitation in the term "modification".)
          +
          +  "Source code" for a work means the preferred form of the work for
          +making modifications to it.  For a library, complete source code means
          +all the source code for all modules it contains, plus any associated
          +interface definition files, plus the scripts used to control compilation
          +and installation of the library.
          +
          +  Activities other than copying, distribution and modification are not
          +covered by this License; they are outside its scope.  The act of
          +running a program using the Library is not restricted, and output from
          +such a program is covered only if its contents constitute a work based
          +on the Library (independent of the use of the Library in a tool for
          +writing it).  Whether that is true depends on what the Library does
          +and what the program that uses the Library does.
          +
          +  1. You may copy and distribute verbatim copies of the Library's
          +complete source code as you receive it, in any medium, provided that
          +you conspicuously and appropriately publish on each copy an
          +appropriate copyright notice and disclaimer of warranty; keep intact
          +all the notices that refer to this License and to the absence of any
          +warranty; and distribute a copy of this License along with the
          +Library.
          +
          +  You may charge a fee for the physical act of transferring a copy,
          +and you may at your option offer warranty protection in exchange for a
          +fee.
          +
          +  2. You may modify your copy or copies of the Library or any portion
          +of it, thus forming a work based on the Library, and copy and
          +distribute such modifications or work under the terms of Section 1
          +above, provided that you also meet all of these conditions:
          +
          +    a) The modified work must itself be a software library.
          +
          +    b) You must cause the files modified to carry prominent notices
          +    stating that you changed the files and the date of any change.
          +
          +    c) You must cause the whole of the work to be licensed at no
          +    charge to all third parties under the terms of this License.
          +
          +    d) If a facility in the modified Library refers to a function or a
          +    table of data to be supplied by an application program that uses
          +    the facility, other than as an argument passed when the facility
          +    is invoked, then you must make a good faith effort to ensure that,
          +    in the event an application does not supply such function or
          +    table, the facility still operates, and performs whatever part of
          +    its purpose remains meaningful.
          +
          +    (For example, a function in a library to compute square roots has
          +    a purpose that is entirely well-defined independent of the
          +    application.  Therefore, Subsection 2d requires that any
          +    application-supplied function or table used by this function must
          +    be optional: if the application does not supply it, the square
          +    root function must still compute square roots.)
          +
          +These requirements apply to the modified work as a whole.  If
          +identifiable sections of that work are not derived from the Library,
          +and can be reasonably considered independent and separate works in
          +themselves, then this License, and its terms, do not apply to those
          +sections when you distribute them as separate works.  But when you
          +distribute the same sections as part of a whole which is a work based
          +on the Library, the distribution of the whole must be on the terms of
          +this License, whose permissions for other licensees extend to the
          +entire whole, and thus to each and every part regardless of who wrote
          +it.
          +
          +Thus, it is not the intent of this section to claim rights or contest
          +your rights to work written entirely by you; rather, the intent is to
          +exercise the right to control the distribution of derivative or
          +collective works based on the Library.
          +
          +In addition, mere aggregation of another work not based on the Library
          +with the Library (or with a work based on the Library) on a volume of
          +a storage or distribution medium does not bring the other work under
          +the scope of this License.
          +
          +  3. You may opt to apply the terms of the ordinary GNU General Public
          +License instead of this License to a given copy of the Library.  To do
          +this, you must alter all the notices that refer to this License, so
          +that they refer to the ordinary GNU General Public License, version 2,
          +instead of to this License.  (If a newer version than version 2 of the
          +ordinary GNU General Public License has appeared, then you can specify
          +that version instead if you wish.)  Do not make any other change in
          +these notices.
          +
          +  Once this change is made in a given copy, it is irreversible for
          +that copy, so the ordinary GNU General Public License applies to all
          +subsequent copies and derivative works made from that copy.
          +
          +  This option is useful when you wish to copy part of the code of
          +the Library into a program that is not a library.
          +
          +  4. You may copy and distribute the Library (or a portion or
          +derivative of it, under Section 2) in object code or executable form
          +under the terms of Sections 1 and 2 above provided that you accompany
          +it with the complete corresponding machine-readable source code, which
          +must be distributed under the terms of Sections 1 and 2 above on a
          +medium customarily used for software interchange.
          +
          +  If distribution of object code is made by offering access to copy
          +from a designated place, then offering equivalent access to copy the
          +source code from the same place satisfies the requirement to
          +distribute the source code, even though third parties are not
          +compelled to copy the source along with the object code.
          +
          +  5. A program that contains no derivative of any portion of the
          +Library, but is designed to work with the Library by being compiled or
          +linked with it, is called a "work that uses the Library".  Such a
          +work, in isolation, is not a derivative work of the Library, and
          +therefore falls outside the scope of this License.
          +
          +  However, linking a "work that uses the Library" with the Library
          +creates an executable that is a derivative of the Library (because it
          +contains portions of the Library), rather than a "work that uses the
          +library".  The executable is therefore covered by this License.
          +Section 6 states terms for distribution of such executables.
          +
          +  When a "work that uses the Library" uses material from a header file
          +that is part of the Library, the object code for the work may be a
          +derivative work of the Library even though the source code is not.
          +Whether this is true is especially significant if the work can be
          +linked without the Library, or if the work is itself a library.  The
          +threshold for this to be true is not precisely defined by law.
          +
          +  If such an object file uses only numerical parameters, data
          +structure layouts and accessors, and small macros and small inline
          +functions (ten lines or less in length), then the use of the object
          +file is unrestricted, regardless of whether it is legally a derivative
          +work.  (Executables containing this object code plus portions of the
          +Library will still fall under Section 6.)
          +
          +  Otherwise, if the work is a derivative of the Library, you may
          +distribute the object code for the work under the terms of Section 6.
          +Any executables containing that work also fall under Section 6,
          +whether or not they are linked directly with the Library itself.
          +
          +  6. As an exception to the Sections above, you may also combine or
          +link a "work that uses the Library" with the Library to produce a
          +work containing portions of the Library, and distribute that work
          +under terms of your choice, provided that the terms permit
          +modification of the work for the customer's own use and reverse
          +engineering for debugging such modifications.
          +
          +  You must give prominent notice with each copy of the work that the
          +Library is used in it and that the Library and its use are covered by
          +this License.  You must supply a copy of this License.  If the work
          +during execution displays copyright notices, you must include the
          +copyright notice for the Library among them, as well as a reference
          +directing the user to the copy of this License.  Also, you must do one
          +of these things:
          +
          +    a) Accompany the work with the complete corresponding
          +    machine-readable source code for the Library including whatever
          +    changes were used in the work (which must be distributed under
          +    Sections 1 and 2 above); and, if the work is an executable linked
          +    with the Library, with the complete machine-readable "work that
          +    uses the Library", as object code and/or source code, so that the
          +    user can modify the Library and then relink to produce a modified
          +    executable containing the modified Library.  (It is understood
          +    that the user who changes the contents of definitions files in the
          +    Library will not necessarily be able to recompile the application
          +    to use the modified definitions.)
          +
          +    b) Use a suitable shared library mechanism for linking with the
          +    Library.  A suitable mechanism is one that (1) uses at run time a
          +    copy of the library already present on the user's computer system,
          +    rather than copying library functions into the executable, and (2)
          +    will operate properly with a modified version of the library, if
          +    the user installs one, as long as the modified version is
          +    interface-compatible with the version that the work was made with.
          +
          +    c) Accompany the work with a written offer, valid for at
          +    least three years, to give the same user the materials
          +    specified in Subsection 6a, above, for a charge no more
          +    than the cost of performing this distribution.
          +
          +    d) If distribution of the work is made by offering access to copy
          +    from a designated place, offer equivalent access to copy the above
          +    specified materials from the same place.
          +
          +    e) Verify that the user has already received a copy of these
          +    materials or that you have already sent this user a copy.
          +
          +  For an executable, the required form of the "work that uses the
          +Library" must include any data and utility programs needed for
          +reproducing the executable from it.  However, as a special exception,
          +the materials to be distributed need not include anything that is
          +normally distributed (in either source or binary form) with the major
          +components (compiler, kernel, and so on) of the operating system on
          +which the executable runs, unless that component itself accompanies
          +the executable.
          +
          +  It may happen that this requirement contradicts the license
          +restrictions of other proprietary libraries that do not normally
          +accompany the operating system.  Such a contradiction means you cannot
          +use both them and the Library together in an executable that you
          +distribute.
          +
          +  7. You may place library facilities that are a work based on the
          +Library side-by-side in a single library together with other library
          +facilities not covered by this License, and distribute such a combined
          +library, provided that the separate distribution of the work based on
          +the Library and of the other library facilities is otherwise
          +permitted, and provided that you do these two things:
          +
          +    a) Accompany the combined library with a copy of the same work
          +    based on the Library, uncombined with any other library
          +    facilities.  This must be distributed under the terms of the
          +    Sections above.
          +
          +    b) Give prominent notice with the combined library of the fact
          +    that part of it is a work based on the Library, and explaining
          +    where to find the accompanying uncombined form of the same work.
          +
          +  8. You may not copy, modify, sublicense, link with, or distribute
          +the Library except as expressly provided under this License.  Any
          +attempt otherwise to copy, modify, sublicense, link with, or
          +distribute the Library is void, and will automatically terminate your
          +rights under this License.  However, parties who have received copies,
          +or rights, from you under this License will not have their licenses
          +terminated so long as such parties remain in full compliance.
          +
          +  9. You are not required to accept this License, since you have not
          +signed it.  However, nothing else grants you permission to modify or
          +distribute the Library or its derivative works.  These actions are
          +prohibited by law if you do not accept this License.  Therefore, by
          +modifying or distributing the Library (or any work based on the
          +Library), you indicate your acceptance of this License to do so, and
          +all its terms and conditions for copying, distributing or modifying
          +the Library or works based on it.
          +
          +  10. Each time you redistribute the Library (or any work based on the
          +Library), the recipient automatically receives a license from the
          +original licensor to copy, distribute, link with or modify the Library
          +subject to these terms and conditions.  You may not impose any further
          +restrictions on the recipients' exercise of the rights granted herein.
          +You are not responsible for enforcing compliance by third parties with
          +this License.
          +
          +  11. If, as a consequence of a court judgment or allegation of patent
          +infringement or for any other reason (not limited to patent issues),
          +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
          +distribute so as to satisfy simultaneously your obligations under this
          +License and any other pertinent obligations, then as a consequence you
          +may not distribute the Library at all.  For example, if a patent
          +license would not permit royalty-free redistribution of the Library by
          +all those who receive copies directly or indirectly through you, then
          +the only way you could satisfy both it and this License would be to
          +refrain entirely from distribution of the Library.
          +
          +If any portion of this section is held invalid or unenforceable under any
          +particular circumstance, the balance of the section is intended to apply,
          +and the section as a whole is intended to apply in other circumstances.
          +
          +It is not the purpose of this section to induce you to infringe any
          +patents or other property right claims or to contest validity of any
          +such claims; this section has the sole purpose of protecting the
          +integrity of the free software distribution system which is
          +implemented by public license practices.  Many people have made
          +generous contributions to the wide range of software distributed
          +through that system in reliance on consistent application of that
          +system; it is up to the author/donor to decide if he or she is willing
          +to distribute software through any other system and a licensee cannot
          +impose that choice.
          +
          +This section is intended to make thoroughly clear what is believed to
          +be a consequence of the rest of this License.
          +
          +  12. If the distribution and/or use of the Library is restricted in
          +certain countries either by patents or by copyrighted interfaces, the
          +original copyright holder who places the Library under this License may add
          +an explicit geographical distribution limitation excluding those countries,
          +so that distribution is permitted only in or among countries not thus
          +excluded.  In such case, this License incorporates the limitation as if
          +written in the body of this License.
          +
          +  13. The Free Software Foundation may publish revised and/or new
          +versions of the Lesser 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 Library
          +specifies a version number of this License which applies to it and
          +"any later version", you have the option of following the terms and
          +conditions either of that version or of any later version published by
          +the Free Software Foundation.  If the Library does not specify a
          +license version number, you may choose any version ever published by
          +the Free Software Foundation.
          +
          +  14. If you wish to incorporate parts of the Library into other free
          +programs whose distribution conditions are incompatible with these,
          +write to the author to ask for permission.  For software which is
          +copyrighted by the Free Software Foundation, write to the Free
          +Software Foundation; we sometimes make exceptions for this.  Our
          +decision will be guided by the two goals of preserving the free status
          +of all derivatives of our free software and of promoting the sharing
          +and reuse of software generally.
          +
          +NO WARRANTY
          +
          +  15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
          +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
          +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
          +OTHER PARTIES PROVIDE THE LIBRARY "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
          +LIBRARY IS WITH YOU.  SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME
          +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
          +
          +  16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
          +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
          +AND/OR REDISTRIBUTE THE LIBRARY 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
          +LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
          +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
          +DAMAGES.
          +
          +END OF TERMS AND CONDITIONS
          +
          +
          +Appendix C: The MPL License
          +---------------------------
          +
          +MOZILLA PUBLIC LICENSE
          +Version 1.1
          +
          +1. Definitions.
          +
          +     1.0.1. "Commercial Use" means distribution or otherwise making the
          +     Covered Code available to a third party.
          +
          +     1.1. "Contributor" means each entity that creates or contributes to
          +     the creation of Modifications.
          +
          +     1.2. "Contributor Version" means the combination of the Original
          +     Code, prior Modifications used by a Contributor, and the Modifications
          +     made by that particular Contributor.
          +
          +     1.3. "Covered Code" means the Original Code or Modifications or the
          +     combination of the Original Code and Modifications, in each case
          +     including portions thereof.
          +
          +     1.4. "Electronic Distribution Mechanism" means a mechanism generally
          +     accepted in the software development community for the electronic
          +     transfer of data.
          +
          +     1.5. "Executable" means Covered Code in any form other than Source
          +     Code.
          +
          +     1.6. "Initial Developer" means the individual or entity identified
          +     as the Initial Developer in the Source Code notice required by Exhibit
          +     A.
          +
          +     1.7. "Larger Work" means a work which combines Covered Code or
          +     portions thereof with code not governed by the terms of this License.
          +
          +     1.8. "License" means this document.
          +
          +     1.8.1. "Licensable" means having the right to grant, to the maximum
          +     extent possible, whether at the time of the initial grant or
          +     subsequently acquired, any and all of the rights conveyed herein.
          +
          +     1.9. "Modifications" means any addition to or deletion from the
          +     substance or structure of either the Original Code or any previous
          +     Modifications. When Covered Code is released as a series of files, a
          +     Modification is:
          +          A. Any addition to or deletion from the contents of a file
          +          containing Original Code or previous Modifications.
          +
          +          B. Any new file that contains any part of the Original Code or
          +          previous Modifications.
          +
          +     1.10. "Original Code" means Source Code of computer software code
          +     which is described in the Source Code notice required by Exhibit A as
          +     Original Code, and which, at the time of its release under this
          +     License is not already Covered Code governed by this License.
          +
          +     1.10.1. "Patent Claims" means any patent claim(s), now owned or
          +     hereafter acquired, including without limitation,  method, process,
          +     and apparatus claims, in any patent Licensable by grantor.
          +
          +     1.11. "Source Code" means the preferred form of the Covered Code for
          +     making modifications to it, including all modules it contains, plus
          +     any associated interface definition files, scripts used to control
          +     compilation and installation of an Executable, or source code
          +     differential comparisons against either the Original Code or another
          +     well known, available Covered Code of the Contributor's choice. The
          +     Source Code can be in a compressed or archival form, provided the
          +     appropriate decompression or de-archiving software is widely available
          +     for no charge.
          +
          +     1.12. "You" (or "Your")  means an individual or a legal entity
          +     exercising rights under, and complying with all of the terms of, this
          +     License or a future version of this License issued under Section 6.1.
          +     For legal entities, "You" includes any entity which controls, is
          +     controlled by, or is under common control with You. For purposes of
          +     this definition, "control" means (a) the power, direct or indirect,
          +     to cause the direction or management of such entity, whether by
          +     contract or otherwise, or (b) ownership of more than fifty percent
          +     (50%) of the outstanding shares or beneficial ownership of such
          +     entity.
          +
          +2. Source Code License.
          +
          +     2.1. The Initial Developer Grant.
          +     The Initial Developer hereby grants You a world-wide, royalty-free,
          +     non-exclusive license, subject to third party intellectual property
          +     claims:
          +          (a)  under intellectual property rights (other than patent or
          +          trademark) Licensable by Initial Developer to use, reproduce,
          +          modify, display, perform, sublicense and distribute the Original
          +          Code (or portions thereof) with or without Modifications, and/or
          +          as part of a Larger Work; and
          +
          +          (b) under Patents Claims infringed by the making, using or
          +          selling of Original Code, to make, have made, use, practice,
          +          sell, and offer for sale, and/or otherwise dispose of the
          +          Original Code (or portions thereof).
          +
          +          (c) the licenses granted in this Section 2.1(a) and (b) are
          +          effective on the date Initial Developer first distributes
          +          Original Code under the terms of this License.
          +
          +          (d) Notwithstanding Section 2.1(b) above, no patent license is
          +          granted: 1) for code that You delete from the Original Code; 2)
          +          separate from the Original Code;  or 3) for infringements caused
          +          by: i) the modification of the Original Code or ii) the
          +          combination of the Original Code with other software or devices.
          +
          +     2.2. Contributor Grant.
          +     Subject to third party intellectual property claims, each Contributor
          +     hereby grants You a world-wide, royalty-free, non-exclusive license
          +
          +          (a)  under intellectual property rights (other than patent or
          +          trademark) Licensable by Contributor, to use, reproduce, modify,
          +          display, perform, sublicense and distribute the Modifications
          +          created by such Contributor (or portions thereof) either on an
          +          unmodified basis, with other Modifications, as Covered Code
          +          and/or as part of a Larger Work; and
          +
          +          (b) under Patent Claims infringed by the making, using, or
          +          selling of  Modifications made by that Contributor either alone
          +          and/or in combination with its Contributor Version (or portions
          +          of such combination), to make, use, sell, offer for sale, have
          +          made, and/or otherwise dispose of: 1) Modifications made by that
          +          Contributor (or portions thereof); and 2) the combination of
          +          Modifications made by that Contributor with its Contributor
          +          Version (or portions of such combination).
          +
          +          (c) the licenses granted in Sections 2.2(a) and 2.2(b) are
          +          effective on the date Contributor first makes Commercial Use of
          +          the Covered Code.
          +
          +          (d)    Notwithstanding Section 2.2(b) above, no patent license is
          +          granted: 1) for any code that Contributor has deleted from the
          +          Contributor Version; 2)  separate from the Contributor Version;
          +          3)  for infringements caused by: i) third party modifications of
          +          Contributor Version or ii)  the combination of Modifications made
          +          by that Contributor with other software  (except as part of the
          +          Contributor Version) or other devices; or 4) under Patent Claims
          +          infringed by Covered Code in the absence of Modifications made by
          +          that Contributor.
          +
          +3. Distribution Obligations.
          +
          +     3.1. Application of License.
          +     The Modifications which You create or to which You contribute are
          +     governed by the terms of this License, including without limitation
          +     Section 2.2. The Source Code version of Covered Code may be
          +     distributed only under the terms of this License or a future version
          +     of this License released under Section 6.1, and You must include a
          +     copy of this License with every copy of the Source Code You
          +     distribute. You may not offer or impose any terms on any Source Code
          +     version that alters or restricts the applicable version of this
          +     License or the recipients' rights hereunder. However, You may include
          +     an additional document offering the additional rights described in
          +     Section 3.5.
          +
          +     3.2. Availability of Source Code.
          +     Any Modification which You create or to which You contribute must be
          +     made available in Source Code form under the terms of this License
          +     either on the same media as an Executable version or via an accepted
          +     Electronic Distribution Mechanism to anyone to whom you made an
          +     Executable version available; and if made available via Electronic
          +     Distribution Mechanism, must remain available for at least twelve (12)
          +     months after the date it initially became available, or at least six
          +     (6) months after a subsequent version of that particular Modification
          +     has been made available to such recipients. You are responsible for
          +     ensuring that the Source Code version remains available even if the
          +     Electronic Distribution Mechanism is maintained by a third party.
          +
          +     3.3. Description of Modifications.
          +     You must cause all Covered Code to which You contribute to contain a
          +     file documenting the changes You made to create that Covered Code and
          +     the date of any change. You must include a prominent statement that
          +     the Modification is derived, directly or indirectly, from Original
          +     Code provided by the Initial Developer and including the name of the
          +     Initial Developer in (a) the Source Code, and (b) in any notice in an
          +     Executable version or related documentation in which You describe the
          +     origin or ownership of the Covered Code.
          +
          +     3.4. Intellectual Property Matters
          +          (a) Third Party Claims.
          +          If Contributor has knowledge that a license under a third party's
          +          intellectual property rights is required to exercise the rights
          +          granted by such Contributor under Sections 2.1 or 2.2,
          +          Contributor must include a text file with the Source Code
          +          distribution titled "LEGAL" which describes the claim and the
          +          party making the claim in sufficient detail that a recipient will
          +          know whom to contact. If Contributor obtains such knowledge after
          +          the Modification is made available as described in Section 3.2,
          +          Contributor shall promptly modify the LEGAL file in all copies
          +          Contributor makes available thereafter and shall take other steps
          +          (such as notifying appropriate mailing lists or newsgroups)
          +          reasonably calculated to inform those who received the Covered
          +          Code that new knowledge has been obtained.
          +
          +          (b) Contributor APIs.
          +          If Contributor's Modifications include an application programming
          +          interface and Contributor has knowledge of patent licenses which
          +          are reasonably necessary to implement that API, Contributor must
          +          also include this information in the LEGAL file.
          +
          +               (c)    Representations.
          +          Contributor represents that, except as disclosed pursuant to
          +          Section 3.4(a) above, Contributor believes that Contributor's
          +          Modifications are Contributor's original creation(s) and/or
          +          Contributor has sufficient rights to grant the rights conveyed by
          +          this License.
          +
          +     3.5. Required Notices.
          +     You must duplicate the notice in Exhibit A in each file of the Source
          +     Code.  If it is not possible to put such notice in a particular Source
          +     Code file due to its structure, then You must include such notice in a
          +     location (such as a relevant directory) where a user would be likely
          +     to look for such a notice.  If You created one or more Modification(s)
          +     You may add your name as a Contributor to the notice described in
          +     Exhibit A.  You must also duplicate this License in any documentation
          +     for the Source Code where You describe recipients' rights or ownership
          +     rights relating to Covered Code.  You may choose to offer, and to
          +     charge a fee for, warranty, support, indemnity or liability
          +     obligations to one or more recipients of Covered Code. However, You
          +     may do so only on Your own behalf, and not on behalf of the Initial
          +     Developer or any Contributor. You must make it absolutely clear than
          +     any such warranty, support, indemnity or liability obligation is
          +     offered by You alone, and You hereby agree to indemnify the Initial
          +     Developer and every Contributor for any liability incurred by the
          +     Initial Developer or such Contributor as a result of warranty,
          +     support, indemnity or liability terms You offer.
          +
          +     3.6. Distribution of Executable Versions.
          +     You may distribute Covered Code in Executable form only if the
          +     requirements of Section 3.1-3.5 have been met for that Covered Code,
          +     and if You include a notice stating that the Source Code version of
          +     the Covered Code is available under the terms of this License,
          +     including a description of how and where You have fulfilled the
          +     obligations of Section 3.2. The notice must be conspicuously included
          +     in any notice in an Executable version, related documentation or
          +     collateral in which You describe recipients' rights relating to the
          +     Covered Code. You may distribute the Executable version of Covered
          +     Code or ownership rights under a license of Your choice, which may
          +     contain terms different from this License, provided that You are in
          +     compliance with the terms of this License and that the license for the
          +     Executable version does not attempt to limit or alter the recipient's
          +     rights in the Source Code version from the rights set forth in this
          +     License. If You distribute the Executable version under a different
          +     license You must make it absolutely clear that any terms which differ
          +     from this License are offered by You alone, not by the Initial
          +     Developer or any Contributor. You hereby agree to indemnify the
          +     Initial Developer and every Contributor for any liability incurred by
          +     the Initial Developer or such Contributor as a result of any such
          +     terms You offer.
          +
          +     3.7. Larger Works.
          +     You may create a Larger Work by combining Covered Code with other code
          +     not governed by the terms of this License and distribute the Larger
          +     Work as a single product. In such a case, You must make sure the
          +     requirements of this License are fulfilled for the Covered Code.
          +
          +4. Inability to Comply Due to Statute or Regulation.
          +
          +     If it is impossible for You to comply with any of the terms of this
          +     License with respect to some or all of the Covered Code due to
          +     statute, judicial order, or regulation then You must: (a) comply with
          +     the terms of this License to the maximum extent possible; and (b)
          +     describe the limitations and the code they affect. Such description
          +     must be included in the LEGAL file described in Section 3.4 and must
          +     be included with all distributions of the Source Code. Except to the
          +     extent prohibited by statute or regulation, such description must be
          +     sufficiently detailed for a recipient of ordinary skill to be able to
          +     understand it.
          +
          +5. Application of this License.
          +
          +     This License applies to code to which the Initial Developer has
          +     attached the notice in Exhibit A and to related Covered Code.
          +
          +6. Versions of the License.
          +
          +     6.1. New Versions.
          +     Netscape Communications Corporation ("Netscape") may publish revised
          +     and/or new versions of the License from time to time. Each version
          +     will be given a distinguishing version number.
          +
          +     6.2. Effect of New Versions.
          +     Once Covered Code has been published under a particular version of the
          +     License, You may always continue to use it under the terms of that
          +     version. You may also choose to use such Covered Code under the terms
          +     of any subsequent version of the License published by Netscape. No one
          +     other than Netscape has the right to modify the terms applicable to
          +     Covered Code created under this License.
          +
          +     6.3. Derivative Works.
          +     If You create or use a modified version of this License (which you may
          +     only do in order to apply it to code which is not already Covered Code
          +     governed by this License), You must (a) rename Your license so that
          +     the phrases "Mozilla", "MOZILLAPL", "MOZPL", "Netscape",
          +     "MPL", "NPL" or any confusingly similar phrase do not appear in your
          +     license (except to note that your license differs from this License)
          +     and (b) otherwise make it clear that Your version of the license
          +     contains terms which differ from the Mozilla Public License and
          +     Netscape Public License. (Filling in the name of the Initial
          +     Developer, Original Code or Contributor in the notice described in
          +     Exhibit A shall not of themselves be deemed to be modifications of
          +     this License.)
          +
          +7. DISCLAIMER OF WARRANTY.
          +
          +     COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN "AS IS" BASIS,
          +     WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
          +     WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF
          +     DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING.
          +     THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE
          +     IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT,
          +     YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR) ASSUME THE
          +     COST OF ANY NECESSARY SERVICING, REPAIR OR CORRECTION. THIS DISCLAIMER
          +     OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS LICENSE. NO USE OF
          +     ANY COVERED CODE IS AUTHORIZED HEREUNDER EXCEPT UNDER THIS DISCLAIMER.
          +
          +8. TERMINATION.
          +
          +     8.1.  This License and the rights granted hereunder will terminate
          +     automatically if You fail to comply with terms herein and fail to cure
          +     such breach within 30 days of becoming aware of the breach. All
          +     sublicenses to the Covered Code which are properly granted shall
          +     survive any termination of this License. Provisions which, by their
          +     nature, must remain in effect beyond the termination of this License
          +     shall survive.
          +
          +     8.2.  If You initiate litigation by asserting a patent infringement
          +     claim (excluding declatory judgment actions) against Initial Developer
          +     or a Contributor (the Initial Developer or Contributor against whom
          +     You file such action is referred to as "Participant")  alleging that:
          +
          +     (a)  such Participant's Contributor Version directly or indirectly
          +     infringes any patent, then any and all rights granted by such
          +     Participant to You under Sections 2.1 and/or 2.2 of this License
          +     shall, upon 60 days notice from Participant terminate prospectively,
          +     unless if within 60 days after receipt of notice You either: (i)
          +     agree in writing to pay Participant a mutually agreeable reasonable
          +     royalty for Your past and future use of Modifications made by such
          +     Participant, or (ii) withdraw Your litigation claim with respect to
          +     the Contributor Version against such Participant.  If within 60 days
          +     of notice, a reasonable royalty and payment arrangement are not
          +     mutually agreed upon in writing by the parties or the litigation claim
          +     is not withdrawn, the rights granted by Participant to You under
          +     Sections 2.1 and/or 2.2 automatically terminate at the expiration of
          +     the 60 day notice period specified above.
          +
          +     (b)  any software, hardware, or device, other than such Participant's
          +     Contributor Version, directly or indirectly infringes any patent, then
          +     any rights granted to You by such Participant under Sections 2.1(b)
          +     and 2.2(b) are revoked effective as of the date You first made, used,
          +     sold, distributed, or had made, Modifications made by that
          +     Participant.
          +
          +     8.3.  If You assert a patent infringement claim against Participant
          +     alleging that such Participant's Contributor Version directly or
          +     indirectly infringes any patent where such claim is resolved (such as
          +     by license or settlement) prior to the initiation of patent
          +     infringement litigation, then the reasonable value of the licenses
          +     granted by such Participant under Sections 2.1 or 2.2 shall be taken
          +     into account in determining the amount or value of any payment or
          +     license.
          +
          +     8.4.  In the event of termination under Sections 8.1 or 8.2 above,
          +     all end user license agreements (excluding distributors and resellers)
          +     which have been validly granted by You or any distributor hereunder
          +     prior to termination shall survive termination.
          +
          +9. LIMITATION OF LIABILITY.
          +
          +     UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT
          +     (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL
          +     DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE,
          +     OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR
          +     ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY
          +     CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL,
          +     WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY AND ALL OTHER
          +     COMMERCIAL DAMAGES OR LOSSES, EVEN IF SUCH PARTY SHALL HAVE BEEN
          +     INFORMED OF THE POSSIBILITY OF SUCH DAMAGES. THIS LIMITATION OF
          +     LIABILITY SHALL NOT APPLY TO LIABILITY FOR DEATH OR PERSONAL INJURY
          +     RESULTING FROM SUCH PARTY'S NEGLIGENCE TO THE EXTENT APPLICABLE LAW
          +     PROHIBITS SUCH LIMITATION. SOME JURISDICTIONS DO NOT ALLOW THE
          +     EXCLUSION OR LIMITATION OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO
          +     THIS EXCLUSION AND LIMITATION MAY NOT APPLY TO YOU.
          +
          +10. U.S. GOVERNMENT END USERS.
          +
          +     The Covered Code is a "commercial item," as that term is defined in
          +     48 C.F.R. 2.101 (Oct. 1995), consisting of "commercial computer
          +     software" and "commercial computer software documentation," as such
          +     terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48
          +     C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995),
          +     all U.S. Government End Users acquire Covered Code with only those
          +     rights set forth herein.
          +
          +11. MISCELLANEOUS.
          +
          +     This License represents the complete agreement concerning subject
          +     matter hereof. If any provision of this License is held to be
          +     unenforceable, such provision shall be reformed only to the extent
          +     necessary to make it enforceable. This License shall be governed by
          +     California law provisions (except to the extent applicable law, if
          +     any, provides otherwise), excluding its conflict-of-law provisions.
          +     With respect to disputes in which at least one party is a citizen of,
          +     or an entity chartered or registered to do business in the United
          +     States of America, any litigation relating to this License shall be
          +     subject to the jurisdiction of the Federal Courts of the Northern
          +     District of California, with venue lying in Santa Clara County,
          +     California, with the losing party responsible for costs, including
          +     without limitation, court costs and reasonable attorneys' fees and
          +     expenses. The application of the United Nations Convention on
          +     Contracts for the International Sale of Goods is expressly excluded.
          +     Any law or regulation which provides that the language of a contract
          +     shall be construed against the drafter shall not apply to this
          +     License.
          +
          +12. RESPONSIBILITY FOR CLAIMS.
          +
          +     As between Initial Developer and the Contributors, each party is
          +     responsible for claims and damages arising, directly or indirectly,
          +     out of its utilization of rights under this License and You agree to
          +     work with Initial Developer and Contributors to distribute such
          +     responsibility on an equitable basis. Nothing herein is intended or
          +     shall be deemed to constitute any admission of liability.
          +
          +13. MULTIPLE-LICENSED CODE.
          +
          +     Initial Developer may designate portions of the Covered Code as
          +     "Multiple-Licensed".  "Multiple-Licensed" means that the Initial
          +     Developer permits you to utilize portions of the Covered Code under
          +     Your choice of the NPL or the alternative licenses, if any, specified
          +     by the Initial Developer in the file described in Exhibit A.
          +
          +EXHIBIT A -Mozilla Public License.
          +
          +     ``The contents of this file are subject to the Mozilla Public License
          +     Version 1.1 (the "License"); you may not use this file except in
          +     compliance with the License. You may obtain a copy of the License at
          +     http://www.mozilla.org/MPL/
          +
          +     Software distributed under the License is distributed on an "AS IS"
          +     basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
          +     License for the specific language governing rights and limitations
          +     under the License.
          +
          +     The Original Code is ______________________________________.
          +
          +     The Initial Developer of the Original Code is ________________________.
          +     Portions created by ______________________ are Copyright (C) ______
          +     _______________________. All Rights Reserved.
          +
          +     Contributor(s): ______________________________________.
          +
          +     Alternatively, the contents of this file may be used under the terms
          +     of the _____ license (the  "[___] License"), in which case the
          +     provisions of [______] License are applicable instead of those
          +     above.  If you wish to allow use of your version of this file only
          +     under the terms of the [____] License and not to allow others to use
          +     your version of this file under the MPL, indicate your decision by
          +     deleting  the provisions above and replace  them with the notice and
          +     other provisions required by the [___] License.  If you do not delete
          +     the provisions above, a recipient may use your version of this file
          +     under either the MPL or the [___] License."
          +
          +     [NOTE: The text of this Exhibit A may differ slightly from the text of
          +     the notices in the Source Code files of the Original Code. You should
          +     use the text of this Exhibit A rather than the text found in the
          +     Original Code Source Code for Your Modifications.]
          diff --git a/src/bb-modules/Wysiwyg/assets/ckeditor/README.md b/src/bb-modules/Wysiwyg/assets/ckeditor/README.md
          new file mode 100644
          index 000000000..378c267ee
          --- /dev/null
          +++ b/src/bb-modules/Wysiwyg/assets/ckeditor/README.md
          @@ -0,0 +1,39 @@
          +CKEditor 4
          +==========
          +
          +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.  
          +http://ckeditor.com - See LICENSE.md for license information.
          +
          +CKEditor is a text editor to be used inside web pages. It's not a replacement
          +for desktop text editors like Word or OpenOffice, but a component to be used as
          +part of web applications and websites.
          +
          +## Documentation
          +
          +The full editor documentation is available online at the following address:
          +http://docs.ckeditor.com
          +
          +## Installation
          +
          +Installing CKEditor is an easy task. Just follow these simple steps:
          +
          + 1. **Download** the latest version from the CKEditor website:
          +    http://ckeditor.com. You should have already completed this step, but be
          +    sure you have the very latest version.
          + 2. **Extract** (decompress) the downloaded file into the root of your website.
          +
          +**Note:** CKEditor is by default installed in the `ckeditor` folder. You can
          +place the files in whichever you want though.
          +
          +## Checking Your Installation
          +
          +The editor comes with a few sample pages that can be used to verify that
          +installation proceeded properly. Take a look at the `samples` directory.
          +
          +To test your installation, just call the following page at your website:
          +
          +	http:////samples/index.html
          +
          +For example:
          +
          +	http://www.example.com/ckeditor/samples/index.html
          diff --git a/src/bb-modules/Wysiwyg/assets/ckeditor/build-config.js b/src/bb-modules/Wysiwyg/assets/ckeditor/build-config.js
          new file mode 100644
          index 000000000..1b2f0052c
          --- /dev/null
          +++ b/src/bb-modules/Wysiwyg/assets/ckeditor/build-config.js
          @@ -0,0 +1,110 @@
          +
          +/**
          + * @license Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
          + * For licensing, see LICENSE.html or http://ckeditor.com/license
          + */
          +
          +/**
          + * This file was added automatically by CKEditor builder.
          + * You may re-use it at any time at http://ckeditor.com/builder to build CKEditor again.
          + * 
          + * NOTE: 
          + *    This file is not used by CKEditor, you may remove it.
          + *    Changing this file will not change your CKEditor configuration.
          + */
          +
          +var CKBUILDER_CONFIG = {
          +	skin: 'moono',
          +	preset: 'basic',
          +	ignore: [
          +		'dev',
          +		'.gitignore',
          +		'.gitattributes',
          +		'README.md',
          +		'.mailmap'
          +	],
          +	plugins : {
          +		'about' : 1,
          +		'basicstyles' : 1,
          +		'clipboard' : 1,
          +		'toolbar' : 1,
          +		'enterkey' : 1,
          +		'entities' : 1,
          +		'floatingspace' : 1,
          +		'wysiwygarea' : 1,
          +		'indent' : 1,
          +		'link' : 1,
          +		'list' : 1,
          +		'undo' : 1,
          +		'dialog' : 1,
          +		'dialogui' : 1,
          +		'button' : 1,
          +		'fakeobjects' : 1
          +	},
          +	languages : {
          +		'af' : 1,
          +		'sq' : 1,
          +		'ar' : 1,
          +		'eu' : 1,
          +		'bn' : 1,
          +		'bs' : 1,
          +		'bg' : 1,
          +		'ca' : 1,
          +		'zh-cn' : 1,
          +		'zh' : 1,
          +		'hr' : 1,
          +		'cs' : 1,
          +		'da' : 1,
          +		'nl' : 1,
          +		'en' : 1,
          +		'en-au' : 1,
          +		'en-ca' : 1,
          +		'en-gb' : 1,
          +		'eo' : 1,
          +		'et' : 1,
          +		'fo' : 1,
          +		'fi' : 1,
          +		'fr' : 1,
          +		'fr-ca' : 1,
          +		'gl' : 1,
          +		'ka' : 1,
          +		'de' : 1,
          +		'el' : 1,
          +		'gu' : 1,
          +		'he' : 1,
          +		'hi' : 1,
          +		'hu' : 1,
          +		'is' : 1,
          +		'it' : 1,
          +		'ja' : 1,
          +		'km' : 1,
          +		'ko' : 1,
          +		'ku' : 1,
          +		'lv' : 1,
          +		'lt' : 1,
          +		'mk' : 1,
          +		'ms' : 1,
          +		'mn' : 1,
          +		'no' : 1,
          +		'nb' : 1,
          +		'fa' : 1,
          +		'pl' : 1,
          +		'pt-br' : 1,
          +		'pt' : 1,
          +		'ro' : 1,
          +		'ru' : 1,
          +		'sr' : 1,
          +		'sr-latn' : 1,
          +		'si' : 1,
          +		'sk' : 1,
          +		'sl' : 1,
          +		'es' : 1,
          +		'sv' : 1,
          +		'th' : 1,
          +		'tr' : 1,
          +		'ug' : 1,
          +		'uk' : 1,
          +		'vi' : 1,
          +		'cy' : 1,
          +	}
          +};
          \ No newline at end of file
          diff --git a/src/bb-modules/Wysiwyg/assets/ckeditor/ckeditor.js b/src/bb-modules/Wysiwyg/assets/ckeditor/ckeditor.js
          new file mode 100644
          index 000000000..4bbb86efd
          --- /dev/null
          +++ b/src/bb-modules/Wysiwyg/assets/ckeditor/ckeditor.js
          @@ -0,0 +1,661 @@
          +/*
          +Copyright (c) 2003-2013, CKSource - Frederico Knabben. All rights reserved.
          +For licensing, see LICENSE.html or http://ckeditor.com/license
          +*/
          +(function(){if(window.CKEDITOR&&window.CKEDITOR.dom)return;window.CKEDITOR||(window.CKEDITOR=function(){var b={timestamp:"D5AC",version:"4.1.2",revision:"d6f1e0e",rnd:Math.floor(900*Math.random())+100,_:{pending:[]},status:"unloaded",basePath:function(){var a=window.CKEDITOR_BASEPATH||"";if(!a)for(var b=document.getElementsByTagName("script"),d=0;d=0;p--)if(n[p].priority<=l){n.splice(p+1,0,j);return{removeListener:m}}n.unshift(j)}return{removeListener:m}},
          +once:function(){var a=arguments[1];arguments[1]=function(b){b.removeListener();return a.apply(this,arguments)};return this.on.apply(this,arguments)},capture:function(){CKEDITOR.event.useCapture=1;var a=this.on.apply(this,arguments);CKEDITOR.event.useCapture=0;return a},fire:function(){var a=0,b=function(){a=1},d=0,i=function(){d=1};return function(l,j,m){var n=c(this)[l],l=a,q=d;a=d=0;if(n){var p=n.listeners;if(p.length)for(var p=p.slice(0),h,g=0;g=0&&d.listeners.splice(i,1)}},removeAllListeners:function(){var a=c(this),b;for(b in a)delete a[b]},hasListeners:function(a){return(a=c(this)[a])&&a.listeners.length>0}}}());
          +CKEDITOR.editor||(CKEDITOR.editor=function(){CKEDITOR._.pending.push([this,arguments]);CKEDITOR.event.call(this)},CKEDITOR.editor.prototype.fire=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fire.call(this,b,c,this)},CKEDITOR.editor.prototype.fireOnce=function(b,c){b in{instanceReady:1,loaded:1}&&(this[b]=true);return CKEDITOR.event.prototype.fireOnce.call(this,b,c,this)},CKEDITOR.event.implementOn(CKEDITOR.editor.prototype));
          +CKEDITOR.env||(CKEDITOR.env=function(){var b=navigator.userAgent.toLowerCase(),c=window.opera,a={ie:eval("/*@cc_on!@*/false"),opera:!!c&&c.version,webkit:b.indexOf(" applewebkit/")>-1,air:b.indexOf(" adobeair/")>-1,mac:b.indexOf("macintosh")>-1,quirks:document.compatMode=="BackCompat",mobile:b.indexOf("mobile")>-1,iOS:/(ipad|iphone|ipod)/.test(b),isCustomDomain:function(){if(!this.ie)return false;var a=document.domain,e=window.location.hostname;return a!=e&&a!="["+e+"]"},secure:location.protocol==
          +"https:"};a.gecko=navigator.product=="Gecko"&&!a.webkit&&!a.opera;if(a.webkit)b.indexOf("chrome")>-1?a.chrome=true:a.safari=true;var e=0;if(a.ie){e=a.quirks||!document.documentMode?parseFloat(b.match(/msie (\d+)/)[1]):document.documentMode;a.ie9Compat=e==9;a.ie8Compat=e==8;a.ie7Compat=e==7;a.ie6Compat=e<7||a.quirks}if(a.gecko){var f=b.match(/rv:([\d\.]+)/);if(f){f=f[1].split(".");e=f[0]*1E4+(f[1]||0)*100+(f[2]||0)*1}}a.opera&&(e=parseFloat(c.version()));a.air&&(e=parseFloat(b.match(/ adobeair\/(\d+)/)[1]));
          +a.webkit&&(e=parseFloat(b.match(/ applewebkit\/(\d+)/)[1]));a.version=e;a.isCompatible=a.iOS&&e>=534||!a.mobile&&(a.ie&&e>6||a.gecko&&e>=10801||a.opera&&e>=9.5||a.air&&e>=1||a.webkit&&e>=522||false);a.cssClass="cke_browser_"+(a.ie?"ie":a.gecko?"gecko":a.opera?"opera":a.webkit?"webkit":"unknown");if(a.quirks)a.cssClass=a.cssClass+" cke_browser_quirks";if(a.ie){a.cssClass=a.cssClass+(" cke_browser_ie"+(a.quirks||a.version<7?"6":a.version));if(a.quirks)a.cssClass=a.cssClass+" cke_browser_iequirks"}if(a.gecko)if(e<
          +10900)a.cssClass=a.cssClass+" cke_browser_gecko18";else if(e<=11E3)a.cssClass=a.cssClass+" cke_browser_gecko19";if(a.air)a.cssClass=a.cssClass+" cke_browser_air";if(a.iOS)a.cssClass=a.cssClass+" cke_browser_ios";return a}());
          +"unloaded"==CKEDITOR.status&&function(){CKEDITOR.event.implementOn(CKEDITOR);CKEDITOR.loadFullCore=function(){if(CKEDITOR.status!="basic_ready")CKEDITOR.loadFullCore._load=1;else{delete CKEDITOR.loadFullCore;var b=document.createElement("script");b.type="text/javascript";b.src=CKEDITOR.basePath+"ckeditor.js";document.getElementsByTagName("head")[0].appendChild(b)}};CKEDITOR.loadFullCoreTimeout=0;CKEDITOR.add=function(b){(this._.pending||(this._.pending=[])).push(b)};(function(){CKEDITOR.domReady(function(){var b=
          +CKEDITOR.loadFullCore,c=CKEDITOR.loadFullCoreTimeout;if(b){CKEDITOR.status="basic_ready";b&&b._load?b():c&&setTimeout(function(){CKEDITOR.loadFullCore&&CKEDITOR.loadFullCore()},c*1E3)}})})();CKEDITOR.status="basic_loaded"}();CKEDITOR.dom={};
          +(function(){var b=[],c=CKEDITOR.env.gecko?"-moz-":CKEDITOR.env.webkit?"-webkit-":CKEDITOR.env.opera?"-o-":CKEDITOR.env.ie?"-ms-":"";CKEDITOR.on("reset",function(){b=[]});CKEDITOR.tools={arrayCompare:function(a,e){if(!a&&!e)return true;if(!a||!e||a.length!=e.length)return false;for(var b=0;b"+b+""):f.push('');return f.join("")},htmlEncode:function(a){return(""+a).replace(/&/g,"&").replace(/>/g,">").replace(//g,">")},getNextNumber:function(){var a=0;return function(){return++a}}(),getNextId:function(){return"cke_"+this.getNextNumber()},override:function(a,b){var f=b(a);f.prototype=a.prototype;return f},setTimeout:function(a,b,f,d,c){c||(c=window);f||(f=c);return c.setTimeout(function(){d?a.apply(f,[].concat(d)):a.apply(f)},b||0)},trim:function(){var a=/(?:^[ \t\n\r]+)|(?:[ \t\n\r]+$)/g;return function(b){return b.replace(a,"")}}(),ltrim:function(){var a=/^[ \t\n\r]+/g;
          +return function(b){return b.replace(a,"")}}(),rtrim:function(){var a=/[ \t\n\r]+$/g;return function(b){return b.replace(a,"")}}(),indexOf:function(a,b){if(typeof b=="function")for(var f=0,d=a.length;f=0?a[f]:null},bind:function(a,b){return function(){return a.apply(b,arguments)}},createClass:function(a){var b=a.$,
          +f=a.base,d=a.privates||a._,c=a.proto,a=a.statics;!b&&(b=function(){f&&this.base.apply(this,arguments)});if(d)var l=b,b=function(){var a=this._||(this._={}),b;for(b in d){var e=d[b];a[b]=typeof e=="function"?CKEDITOR.tools.bind(e,this):e}l.apply(this,arguments)};if(f){b.prototype=this.prototypedCopy(f.prototype);b.prototype.constructor=b;b.base=f;b.baseProto=f.prototype;b.prototype.base=function(){this.base=f.prototype.base;f.apply(this,arguments);this.base=arguments.callee}}c&&this.extend(b.prototype,
          +c,true);a&&this.extend(b,a,true);return b},addFunction:function(a,e){return b.push(function(){return a.apply(e||this,arguments)})-1},removeFunction:function(a){b[a]=null},callFunction:function(a){var e=b[a];return e&&e.apply(window,Array.prototype.slice.call(arguments,1))},cssLength:function(){var a=/^-?\d+\.?\d*px$/,b;return function(f){b=CKEDITOR.tools.trim(f+"")+"px";return a.test(b)?b:f||""}}(),convertToPx:function(){var a;return function(b){if(!a){a=CKEDITOR.dom.element.createFromHtml('
          ', +CKEDITOR.document);CKEDITOR.document.getBody().append(a)}if(!/%$/.test(b)){a.setStyle("width",b);return a.$.clientWidth}return b}}(),repeat:function(a,b){return Array(b+1).join(a)},tryThese:function(){for(var a,b=0,f=arguments.length;b8)&&c)b=c+":"+b;return new CKEDITOR.dom.nodeList(this.$.getElementsByTagName(b))},getHead:function(){var b=this.$.getElementsByTagName("head")[0];return b= +b?new CKEDITOR.dom.element(b):this.getDocumentElement().append(new CKEDITOR.dom.element("head"),true)},getBody:function(){return new CKEDITOR.dom.element(this.$.body)},getDocumentElement:function(){return new CKEDITOR.dom.element(this.$.documentElement)},getWindow:function(){return new CKEDITOR.dom.window(this.$.parentWindow||this.$.defaultView)},write:function(b){this.$.open("text/html","replace");CKEDITOR.env.ie&&(b=b.replace(/(?:^\s*]*?>)|^/i,'$&\n +{% endif %} + +{% if bb_editor == 'ckeditor' %} +{{ 'ckeditor/ckeditor.js' | mod_asset_url('wysiwyg') | script_tag }} + +{% endif %} \ No newline at end of file diff --git a/src/bb-modules/Wysiwyg/html_admin/mod_wysiwyg_settings.phtml b/src/bb-modules/Wysiwyg/html_admin/mod_wysiwyg_settings.phtml new file mode 100755 index 000000000..aeaa8472b --- /dev/null +++ b/src/bb-modules/Wysiwyg/html_admin/mod_wysiwyg_settings.phtml @@ -0,0 +1,45 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Wysiwyg settings' %}{% endblock %} +{% set active_menu = 'system' %} + + +{% block breadcrumbs %} +
          +{% endblock %} + + +{% block content %} + +
          +
          +
          {% trans 'Wysiwyg settings' %}
          +
          + +{% set params = admin.extension_config_get({"ext":"mod_wysiwyg"}) %} + +
          +
          +
          + +
          + {% for editor,title in admin.wysiwyg_editors %} + +
          +
          + {% endfor %} +
          +
          +
          + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-modules/Wysiwyg/icon.png b/src/bb-modules/Wysiwyg/icon.png new file mode 100755 index 000000000..4de0e208b Binary files /dev/null and b/src/bb-modules/Wysiwyg/icon.png differ diff --git a/src/bb-modules/Wysiwyg/manifest.json b/src/bb-modules/Wysiwyg/manifest.json new file mode 100755 index 000000000..a4d2464c1 --- /dev/null +++ b/src/bb-modules/Wysiwyg/manifest.json @@ -0,0 +1,8 @@ +{ + "id": "wysiwyg", + "type": "mod", + "name": "Wysiwyg", + "description": "Allows the use of client-side editors to edit content. It simplifies the installation and integration of the editor of your choice.", + "icon_url": "icon.png", + "version": "1.0.0" +} \ No newline at end of file diff --git a/src/bb-modules/index.html b/src/bb-modules/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-themes/admin_default/css/bb.css b/src/bb-themes/admin_default/css/bb.css new file mode 100644 index 000000000..57517f19f --- /dev/null +++ b/src/bb-themes/admin_default/css/bb.css @@ -0,0 +1,544 @@ +.breadCrumbHolder.module { + margin-top: 0; +} +.pagination { + margin-top: 40px; + margin-bottom: 40px; +} + +.mainForm input[type="email"]{ + background: white; + width: 100%; + border: 1px solid #D5D5D5; + padding: 5px; + font-size: 11px; + font-family: Arial, Helvetica, sans-serif; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} + +div.help { + border-bottom:1px solid #E7E7E7; + margin:10px 0 0px; + padding: 10px 12px; +} + +div.help h3 { + font-size:1.5em; + margin-bottom: 5px; +} +div.help blockquote { + margin:5px 0; + line-height:1.5em; + padding: 5px; + border: 0; + text-align: left; +} + +.tableStatic thead th { + padding: 3px 0 2px 0; + text-align: center; + border-left: 1px solid #D5D5D5; + background: #EFEFEF url(../images/leftNavBg.png) repeat-x; + border-bottom: 1px solid #D5D5D5; + font-size: 11px; + color: #878787; +} + +.tableStatic.with-tbb{ + border-top: 1px solid #D5D5D5; + border-bottom: 1px solid #D5D5D5; +} + +.tableStatic tfoot tr th, +.tableStatic tfoot tr td{ + padding: 8px 10px; +} + +.tableStatic tfoot tr th:first-child, +.tableStatic tfoot tr td:first-child{ border-top: 1px solid #e7e7e7; } + +.mainForm fieldset legend { + margin: 10px 0 0px; + padding: 10px 12px; + font-size: 1.2em; +} + +.moreFields ul li.sep.txt { color: inherit; } + +.widget .head h5.no-icon { padding-left:9px; } + +/* ===== Conversation ===== */ + +.conversation ul.tabs li span { + display: block; + margin: 10px 0 0 0px; + padding-right: 5px; + float: left; + width: 16px; + height: 16px; + background-position: 0 0; +} +.conversation .gravatar { + padding-top: 1px; + margin-right: 10px; + float: left; +} +.conversation form textarea { + margin-bottom: 22px; +} +.conversation .message .body{ + overflow: auto; +} +.conversation .message blockquote{ + overflow: auto; + width: 97%; +} + +.conversation .canned_response{ + float: right; + margin: 0 2px 22px 0; +} + +.dim +{ + height:100%; + width:100%; + position:fixed; + left:0; + top:0; + z-index:1 !important; + background-color:white; + display: none; + + filter: alpha(opacity=50); /* internet explorer */ + -khtml-opacity: 0.50; /* khtml, old safari */ + -moz-opacity: 0.50; /* mozilla, netscape */ + opacity: 0.50; /* fx, safari, opera */ +} + +table.pp td { + border-top: 1px solid #E7E7E7; + padding: 10px 14px 10px 14px; + margin: 12px 12px 12px 0px; + position: relative; + height: 10px; +} + +table.pp label { + padding: 0px 0 0 0; + width: 130px; +} + +/**************************************/ + + +div.vars div.var_category { + float:left; + width: 50%; +} +div.vars div.var_category h1 { + padding: 0 0 0 10px; +} +div.vars div.var_category ul { + list-style-position: inside; + margin: 10px; + padding: 10px; + border: solid 1px #ccc; + background-color: #fff; +} + +div.bull { + width: 11px; + height: 10px; + display: block; + float: left; + margin-top: 4px; +} +div.bull.charge.yes, +div.bull.task.executed { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAQAAADI+WwIAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAACXZwQWcAAAALAAAACgCF+qVAAAAAhUlEQVQI103NMQqCABgF4C+Fxg7QHDQ0JkFnaKqlKJBu4Np9hEDoBq2doCYP0B4UBKLYUKZvex+P/+9N/dJ3FXl9S9CopbF9U1pOkAgb3irVanOMlGqldeBoo9CmspMFOFmp/hzLmtuXzvrWvpwJFVJvLLqci8Qmzl8OhzBwcMdD6ilXfwAd9B9f78yTCQAAAABJRU5ErkJggg==); +} + +div.bull.task.pending_setup { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAQAAADI+WwIAAAAAmJLR0QA/4ePzL8AAAAJcEhZcwAACxIAAAsSAdLdfvwAAAAJdnBBZwAAAAsAAAAKAIX6pUAAAACTSURBVAjXTY0xCsJAEEVfdiEgpPAWFpYTvMRWSioDwdIuh7GydbEIeAM7sU1lo42tR1CEdSzMJk4178H/H7qTVK4+A0URTNTMmZhVhEHXMK69/UEiS3Z0sOGOQqBMQAr2pABbgKDlujHQHlgQYpdWeRO7z/0Cj8swOcPyxvOEl/vXN/K2+kw5Zq4PipNR/E+Ft8IX7yMjsFUGo0cAAAAcdEVYdFNvZnR3YXJlAEFkb2JlIEZpcmV3b3JrcyBDUzVxteM2AAAAAElFTkSuQmCC); +} +div.bull.charge.no, +div.bull.task.pending_payment { + background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAsAAAAKCAQAAADI+WwIAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAJiS0dEAP+Hj8y/AAAACXBIWXMAAAsTAAALEwEAmpwYAAAACXZwQWcAAAALAAAACgCF+qVAAAAAo0lEQVQI1z2NMQrCQBRE32YxGFDwBGJnYZkll0ilpDISLO28k4lFwN7CTsTKSisbK8ELCJFI/BZJdn41j/kzSqiVuZ3r1yzeAAanoajpcOwsW2dxf+0yWGe6CaVzNmgY4VHyQKAiVsIlUlvc9otK4lXugNnJjKqlkpi86X6exIZfNztZBGhKUgr4hBZ3A3UX4ye/CYdeWHch7MOzJ9R3jFLt8we7izGyoi32iQAAAABJRU5ErkJggg==); +} + +/* theme-settings */ + +#theme-settings h3.section-header { + padding: 2px 5px 2px 10px; + font-size: 14px; + background: #EEE; + border-bottom: 1px solid #CCC; + color: #333; + margin-bottom: 1px; + background-image: url("../images/arrows.png"); + background-position: 98% 10px; + background-repeat: no-repeat; +} + +#theme-settings h3.section-header.collapsed { + background-position: 98% -96px; +} + +#theme-settings h3.section-header:hover{ + background-color:#E6F0F5; + border-bottom-color:#CFDCE4; + background-position:98% -18px; + cursor:pointer; +} +#theme-settings h3.section-header.collapsed:hover { + background-position: 98% -124px; +} + +#theme-settings fieldset { + padding: 15px; + display: none; + + background-color:#FdFdFd; +} + +#theme-settings fieldset legend { + display: none; +} + +#theme-settings fieldset h3 { + font-size: 13px; + font-weight: bold; + color: #444; + padding: 5px 0 5px 0; +} + +#theme-settings table { + border-spacing: 2px; + margin-left: 10px; +} +#theme-settings table td { + vertical-align: middle; + padding-bottom: 5px; +} + +#theme-settings fieldset > table > tbody > tr > td:first-child { + width: 250px; + vertical-align: top; +} + +#theme-settings p { + margin: 0 10px; +} +#theme-settings hr { + background: #d5d5d5; + width: 100%; + height: 1px; + font-size: 1px; /* IE 6 */ + border: 0; +} +#theme-settings .actions { + padding: 10px; + border-top: 1px solid #d5d5d5; +} + +#theme-settings textarea, +#theme-settings input[type="password"], +#theme-settings input[type="email"], +#theme-settings input[type="text"] { + padding: 2px; + border: 1px solid #CCC; + font-family: monospace; + font-size: 9pt; +} +#theme-settings textarea.long, +#theme-settings input.long { + width: 350px; +} + +#theme-settings input.color { + width: 50px; + margin-right: 5px; +} +/* colorpicker */ + +.sp-boxbilling { + padding: 1px !important; + border: 0 !important; + background: #CCC !important; +} +.sp-boxbilling .sp-preview { + margin: 0px !important; + border: 0px solid white !important; + margin: 0px !important; + width: 17px !important; + height: 17px !important; +} +.sp-boxbilling .sp-preview-inner{ + width: 15px !important; + height: 15px !important; + margin: 0px !important; + border: 1px solid white !important; +} +.sp-boxbilling .sp-dd { + display: none; +} + +/* flags */ +.flag { + display: inline-block; + width: 16px; + height: 11px; + background: url(../images/csg-4ffefaac101ed.png) no-repeat top left; +} +.flag-{ background-position: -1000px -1000px; width: 16px; height: 11px; } +.flag-AD{ background-position: 0 0; width: 16px; height: 11px; } +.flag-AE{ background-position: -26px 0; width: 16px; height: 11px; } +.flag-AF{ background-position: -52px 0; width: 16px; height: 11px; } +.flag-AG{ background-position: -78px 0; width: 16px; height: 11px; } +.flag-AI{ background-position: -104px 0; width: 16px; height: 11px; } +.flag-AL{ background-position: -130px 0; width: 16px; height: 11px; } +.flag-AM{ background-position: -156px 0; width: 16px; height: 11px; } +.flag-AN{ background-position: -182px 0; width: 16px; height: 11px; } +.flag-AO{ background-position: -208px 0; width: 16px; height: 11px; } +.flag-AR{ background-position: -234px 0; width: 16px; height: 11px; } +.flag-AS{ background-position: -260px 0; width: 16px; height: 11px; } +.flag-AT{ background-position: -286px 0; width: 16px; height: 11px; } +.flag-AU{ background-position: -312px 0; width: 16px; height: 11px; } +.flag-AW{ background-position: -338px 0; width: 16px; height: 11px; } +.flag-AX{ background-position: -364px 0; width: 16px; height: 11px; } +.flag-AZ{ background-position: -390px 0; width: 16px; height: 11px; } +.flag-BA{ background-position: -416px 0; width: 16px; height: 11px; } +.flag-BB{ background-position: -442px 0; width: 16px; height: 11px; } +.flag-BD{ background-position: -468px 0; width: 16px; height: 11px; } +.flag-BE{ background-position: -494px 0; width: 16px; height: 11px; } +.flag-BF{ background-position: -520px 0; width: 16px; height: 11px; } +.flag-BG{ background-position: -546px 0; width: 16px; height: 11px; } +.flag-BH{ background-position: -572px 0; width: 16px; height: 11px; } +.flag-BI{ background-position: -598px 0; width: 16px; height: 11px; } +.flag-BJ{ background-position: -624px 0; width: 16px; height: 11px; } +.flag-BM{ background-position: -650px 0; width: 16px; height: 11px; } +.flag-BN{ background-position: -676px 0; width: 16px; height: 11px; } +.flag-BO{ background-position: -702px 0; width: 16px; height: 11px; } +.flag-BR{ background-position: -728px 0; width: 16px; height: 11px; } +.flag-BS{ background-position: -754px 0; width: 16px; height: 11px; } +.flag-BT{ background-position: -780px 0; width: 16px; height: 11px; } +.flag-BV{ background-position: -806px 0; width: 16px; height: 11px; } +.flag-BW{ background-position: -832px 0; width: 16px; height: 11px; } +.flag-BY{ background-position: -858px 0; width: 16px; height: 11px; } +.flag-BZ{ background-position: -884px 0; width: 16px; height: 11px; } +.flag-CA{ background-position: -910px 0; width: 16px; height: 11px; } +.flag-CATALONIA{ background-position: -936px 0; width: 16px; height: 11px; } +.flag-CC{ background-position: -962px 0; width: 16px; height: 11px; } +.flag-CD{ background-position: -988px 0; width: 16px; height: 11px; } +.flag-CF{ background-position: -1014px 0; width: 16px; height: 11px; } +.flag-CG{ background-position: -1040px 0; width: 16px; height: 11px; } +.flag-CH{ background-position: -1066px 0; width: 11px; height: 11px; } +.flag-CI{ background-position: -1087px 0; width: 16px; height: 11px; } +.flag-CK{ background-position: -1113px 0; width: 16px; height: 11px; } +.flag-CL{ background-position: -1139px 0; width: 16px; height: 11px; } +.flag-CM{ background-position: -1165px 0; width: 16px; height: 11px; } +.flag-CN{ background-position: -1191px 0; width: 16px; height: 11px; } +.flag-CO{ background-position: -1217px 0; width: 16px; height: 11px; } +.flag-CR{ background-position: -1243px 0; width: 16px; height: 11px; } +.flag-CS{ background-position: -1269px 0; width: 16px; height: 11px; } +.flag-CU{ background-position: -1295px 0; width: 16px; height: 11px; } +.flag-CV{ background-position: -1321px 0; width: 16px; height: 11px; } +.flag-CX{ background-position: -1347px 0; width: 16px; height: 11px; } +.flag-CY{ background-position: -1373px 0; width: 16px; height: 11px; } +.flag-CZ{ background-position: -1399px 0; width: 16px; height: 11px; } +.flag-DE{ background-position: -1425px 0; width: 16px; height: 11px; } +.flag-DJ{ background-position: -1451px 0; width: 16px; height: 11px; } +.flag-DK{ background-position: -1477px 0; width: 16px; height: 11px; } +.flag-DM{ background-position: -1503px 0; width: 16px; height: 11px; } +.flag-DO{ background-position: -1529px 0; width: 16px; height: 11px; } +.flag-DZ{ background-position: -1555px 0; width: 16px; height: 11px; } +.flag-EC{ background-position: -1581px 0; width: 16px; height: 11px; } +.flag-EE{ background-position: -1607px 0; width: 16px; height: 11px; } +.flag-EG{ background-position: -1633px 0; width: 16px; height: 11px; } +.flag-EH{ background-position: -1659px 0; width: 16px; height: 11px; } +.flag-ENGLAND{ background-position: -1685px 0; width: 16px; height: 11px; } +.flag-ER{ background-position: -1711px 0; width: 16px; height: 11px; } +.flag-ES{ background-position: -1737px 0; width: 16px; height: 11px; } +.flag-ET{ background-position: -1763px 0; width: 16px; height: 11px; } +.flag-EUROPEANUNION{ background-position: -1789px 0; width: 16px; height: 11px; } +.flag-FI{ background-position: -1815px 0; width: 16px; height: 11px; } +.flag-FJ{ background-position: -1841px 0; width: 16px; height: 11px; } +.flag-FK{ background-position: -1867px 0; width: 16px; height: 11px; } +.flag-FM{ background-position: -1893px 0; width: 16px; height: 11px; } +.flag-FO{ background-position: -1919px 0; width: 16px; height: 11px; } +.flag-FR{ background-position: -1945px 0; width: 16px; height: 11px; } +.flag-GA{ background-position: -1971px 0; width: 16px; height: 11px; } +.flag-GB{ background-position: 0 -21px; width: 16px; height: 11px; } +.flag-GD{ background-position: -26px -21px; width: 16px; height: 11px; } +.flag-GE{ background-position: -52px -21px; width: 16px; height: 11px; } +.flag-GF{ background-position: -78px -21px; width: 16px; height: 11px; } +.flag-GH{ background-position: -104px -21px; width: 16px; height: 11px; } +.flag-GI{ background-position: -130px -21px; width: 16px; height: 11px; } +.flag-GL{ background-position: -156px -21px; width: 16px; height: 11px; } +.flag-GM{ background-position: -182px -21px; width: 16px; height: 11px; } +.flag-GN{ background-position: -208px -21px; width: 16px; height: 11px; } +.flag-GP{ background-position: -234px -21px; width: 16px; height: 11px; } +.flag-GQ{ background-position: -260px -21px; width: 16px; height: 11px; } +.flag-GR{ background-position: -286px -21px; width: 16px; height: 11px; } +.flag-GS{ background-position: -312px -21px; width: 16px; height: 11px; } +.flag-GT{ background-position: -338px -21px; width: 16px; height: 11px; } +.flag-GU{ background-position: -364px -21px; width: 16px; height: 11px; } +.flag-GW{ background-position: -390px -21px; width: 16px; height: 11px; } +.flag-GY{ background-position: -416px -21px; width: 16px; height: 11px; } +.flag-HK{ background-position: -442px -21px; width: 16px; height: 11px; } +.flag-HM{ background-position: -468px -21px; width: 16px; height: 11px; } +.flag-HN{ background-position: -494px -21px; width: 16px; height: 11px; } +.flag-HR{ background-position: -520px -21px; width: 16px; height: 11px; } +.flag-HT{ background-position: -546px -21px; width: 16px; height: 11px; } +.flag-HU{ background-position: -572px -21px; width: 16px; height: 11px; } +.flag-ID{ background-position: -598px -21px; width: 16px; height: 11px; } +.flag-IE{ background-position: -624px -21px; width: 16px; height: 11px; } +.flag-IL{ background-position: -650px -21px; width: 16px; height: 11px; } +.flag-IN{ background-position: -676px -21px; width: 16px; height: 11px; } +.flag-IO{ background-position: -702px -21px; width: 16px; height: 11px; } +.flag-IQ{ background-position: -728px -21px; width: 16px; height: 11px; } +.flag-IR{ background-position: -754px -21px; width: 16px; height: 11px; } +.flag-IS{ background-position: -780px -21px; width: 16px; height: 11px; } +.flag-IT{ background-position: -806px -21px; width: 16px; height: 11px; } +.flag-JM{ background-position: -832px -21px; width: 16px; height: 11px; } +.flag-JO{ background-position: -858px -21px; width: 16px; height: 11px; } +.flag-JP{ background-position: -884px -21px; width: 16px; height: 11px; } +.flag-KE{ background-position: -910px -21px; width: 16px; height: 11px; } +.flag-KG{ background-position: -936px -21px; width: 16px; height: 11px; } +.flag-KH{ background-position: -962px -21px; width: 16px; height: 11px; } +.flag-KI{ background-position: -988px -21px; width: 16px; height: 11px; } +.flag-KM{ background-position: -1014px -21px; width: 16px; height: 11px; } +.flag-KN{ background-position: -1040px -21px; width: 16px; height: 11px; } +.flag-KP{ background-position: -1066px -21px; width: 16px; height: 11px; } +.flag-KR{ background-position: -1092px -21px; width: 16px; height: 11px; } +.flag-KW{ background-position: -1118px -21px; width: 16px; height: 11px; } +.flag-KY{ background-position: -1144px -21px; width: 16px; height: 11px; } +.flag-KZ{ background-position: -1170px -21px; width: 16px; height: 11px; } +.flag-LA{ background-position: -1196px -21px; width: 16px; height: 11px; } +.flag-LB{ background-position: -1222px -21px; width: 16px; height: 11px; } +.flag-LC{ background-position: -1248px -21px; width: 16px; height: 11px; } +.flag-LI{ background-position: -1274px -21px; width: 16px; height: 11px; } +.flag-LK{ background-position: -1300px -21px; width: 16px; height: 11px; } +.flag-LR{ background-position: -1326px -21px; width: 16px; height: 11px; } +.flag-LS{ background-position: -1352px -21px; width: 16px; height: 11px; } +.flag-LT{ background-position: -1378px -21px; width: 16px; height: 11px; } +.flag-LU{ background-position: -1404px -21px; width: 16px; height: 11px; } +.flag-LV{ background-position: -1430px -21px; width: 16px; height: 11px; } +.flag-LY{ background-position: -1456px -21px; width: 16px; height: 11px; } +.flag-MA{ background-position: -1482px -21px; width: 16px; height: 11px; } +.flag-MC{ background-position: -1508px -21px; width: 16px; height: 11px; } +.flag-MD{ background-position: -1534px -21px; width: 16px; height: 11px; } +.flag-ME{ background-position: -1560px -21px; width: 16px; height: 12px; } +.flag-MG{ background-position: -1586px -21px; width: 16px; height: 11px; } +.flag-MH{ background-position: -1612px -21px; width: 16px; height: 11px; } +.flag-MK{ background-position: -1638px -21px; width: 16px; height: 11px; } +.flag-ML{ background-position: -1664px -21px; width: 16px; height: 11px; } +.flag-MM{ background-position: -1690px -21px; width: 16px; height: 11px; } +.flag-MN{ background-position: -1716px -21px; width: 16px; height: 11px; } +.flag-MO{ background-position: -1742px -21px; width: 16px; height: 11px; } +.flag-MP{ background-position: -1768px -21px; width: 16px; height: 11px; } +.flag-MQ{ background-position: -1794px -21px; width: 16px; height: 11px; } +.flag-MR{ background-position: -1820px -21px; width: 16px; height: 11px; } +.flag-MS{ background-position: -1846px -21px; width: 16px; height: 11px; } +.flag-MT{ background-position: -1872px -21px; width: 16px; height: 11px; } +.flag-MU{ background-position: -1898px -21px; width: 16px; height: 11px; } +.flag-MV{ background-position: -1924px -21px; width: 16px; height: 11px; } +.flag-MW{ background-position: -1950px -21px; width: 16px; height: 11px; } +.flag-MX{ background-position: -1976px -21px; width: 16px; height: 11px; } +.flag-MY{ background-position: 0 -43px; width: 16px; height: 11px; } +.flag-MZ{ background-position: -26px -43px; width: 16px; height: 11px; } +.flag-NA{ background-position: -52px -43px; width: 16px; height: 11px; } +.flag-NC{ background-position: -78px -43px; width: 16px; height: 11px; } +.flag-NE{ background-position: -104px -43px; width: 16px; height: 11px; } +.flag-NF{ background-position: -130px -43px; width: 16px; height: 11px; } +.flag-NG{ background-position: -156px -43px; width: 16px; height: 11px; } +.flag-NI{ background-position: -182px -43px; width: 16px; height: 11px; } +.flag-NL{ background-position: -208px -43px; width: 16px; height: 11px; } +.flag-NO{ background-position: -234px -43px; width: 16px; height: 11px; } +.flag-NP{ background-position: -260px -43px; width: 9px; height: 11px; } +.flag-NR{ background-position: -279px -43px; width: 16px; height: 11px; } +.flag-NU{ background-position: -305px -43px; width: 16px; height: 11px; } +.flag-NZ{ background-position: -331px -43px; width: 16px; height: 11px; } +.flag-OM{ background-position: -357px -43px; width: 16px; height: 11px; } +.flag-PA{ background-position: -383px -43px; width: 16px; height: 11px; } +.flag-PE{ background-position: -409px -43px; width: 16px; height: 11px; } +.flag-PF{ background-position: -435px -43px; width: 16px; height: 11px; } +.flag-PG{ background-position: -461px -43px; width: 16px; height: 11px; } +.flag-PH{ background-position: -487px -43px; width: 16px; height: 11px; } +.flag-PK{ background-position: -513px -43px; width: 16px; height: 11px; } +.flag-PL{ background-position: -539px -43px; width: 16px; height: 11px; } +.flag-PM{ background-position: -565px -43px; width: 16px; height: 11px; } +.flag-PN{ background-position: -591px -43px; width: 16px; height: 11px; } +.flag-PR{ background-position: -617px -43px; width: 16px; height: 11px; } +.flag-PS{ background-position: -643px -43px; width: 16px; height: 11px; } +.flag-PT{ background-position: -669px -43px; width: 16px; height: 11px; } +.flag-PW{ background-position: -695px -43px; width: 16px; height: 11px; } +.flag-PY{ background-position: -721px -43px; width: 16px; height: 11px; } +.flag-QA{ background-position: -747px -43px; width: 16px; height: 11px; } +.flag-RE{ background-position: -773px -43px; width: 16px; height: 11px; } +.flag-RO{ background-position: -799px -43px; width: 16px; height: 11px; } +.flag-RS{ background-position: -825px -43px; width: 16px; height: 11px; } +.flag-RU{ background-position: -851px -43px; width: 16px; height: 11px; } +.flag-RW{ background-position: -877px -43px; width: 16px; height: 11px; } +.flag-SA{ background-position: -903px -43px; width: 16px; height: 11px; } +.flag-SB{ background-position: -929px -43px; width: 16px; height: 11px; } +.flag-SC{ background-position: -955px -43px; width: 16px; height: 11px; } +.flag-SCOTLAND{ background-position: -981px -43px; width: 16px; height: 11px; } +.flag-SD{ background-position: -1007px -43px; width: 16px; height: 11px; } +.flag-SE{ background-position: -1033px -43px; width: 16px; height: 11px; } +.flag-SG{ background-position: -1059px -43px; width: 16px; height: 11px; } +.flag-SH{ background-position: -1085px -43px; width: 16px; height: 11px; } +.flag-SI{ background-position: -1111px -43px; width: 16px; height: 11px; } +.flag-SJ{ background-position: -1137px -43px; width: 16px; height: 11px; } +.flag-SK{ background-position: -1163px -43px; width: 16px; height: 11px; } +.flag-SL{ background-position: -1189px -43px; width: 16px; height: 11px; } +.flag-SM{ background-position: -1215px -43px; width: 16px; height: 11px; } +.flag-SN{ background-position: -1241px -43px; width: 16px; height: 11px; } +.flag-SO{ background-position: -1267px -43px; width: 16px; height: 11px; } +.flag-SR{ background-position: -1293px -43px; width: 16px; height: 11px; } +.flag-ST{ background-position: -1319px -43px; width: 16px; height: 11px; } +.flag-SV{ background-position: -1345px -43px; width: 16px; height: 11px; } +.flag-SY{ background-position: -1371px -43px; width: 16px; height: 11px; } +.flag-SZ{ background-position: -1397px -43px; width: 16px; height: 11px; } +.flag-TC{ background-position: -1423px -43px; width: 16px; height: 11px; } +.flag-TD{ background-position: -1449px -43px; width: 16px; height: 11px; } +.flag-TF{ background-position: -1475px -43px; width: 16px; height: 11px; } +.flag-TG{ background-position: -1501px -43px; width: 16px; height: 11px; } +.flag-TH{ background-position: -1527px -43px; width: 16px; height: 11px; } +.flag-TJ{ background-position: -1553px -43px; width: 16px; height: 11px; } +.flag-TK{ background-position: -1579px -43px; width: 16px; height: 11px; } +.flag-TL{ background-position: -1605px -43px; width: 16px; height: 11px; } +.flag-TM{ background-position: -1631px -43px; width: 16px; height: 11px; } +.flag-TN{ background-position: -1657px -43px; width: 16px; height: 11px; } +.flag-TO{ background-position: -1683px -43px; width: 16px; height: 11px; } +.flag-TR{ background-position: -1709px -43px; width: 16px; height: 11px; } +.flag-TT{ background-position: -1735px -43px; width: 16px; height: 11px; } +.flag-TV{ background-position: -1761px -43px; width: 16px; height: 11px; } +.flag-TW{ background-position: -1787px -43px; width: 16px; height: 11px; } +.flag-TZ{ background-position: -1813px -43px; width: 16px; height: 11px; } +.flag-UA{ background-position: -1839px -43px; width: 16px; height: 11px; } +.flag-UK{ background-position: 0 -21px; width: 16px; height: 11px; } +.flag-UG{ background-position: -1865px -43px; width: 16px; height: 11px; } +.flag-UM{ background-position: -1891px -43px; width: 16px; height: 11px; } +.flag-US{ background-position: -1917px -43px; width: 16px; height: 11px; } +.flag-UY{ background-position: -1943px -43px; width: 16px; height: 11px; } +.flag-UZ{ background-position: -1969px -43px; width: 16px; height: 11px; } +.flag-VA{ background-position: 0 -65px; width: 16px; height: 11px; } +.flag-VC{ background-position: -26px -65px; width: 16px; height: 11px; } +.flag-VE{ background-position: -52px -65px; width: 16px; height: 11px; } +.flag-VG{ background-position: -78px -65px; width: 16px; height: 11px; } +.flag-VI{ background-position: -104px -65px; width: 16px; height: 11px; } +.flag-VN{ background-position: -130px -65px; width: 16px; height: 11px; } +.flag-VU{ background-position: -156px -65px; width: 16px; height: 11px; } +.flag-WALES{ background-position: -182px -65px; width: 16px; height: 11px; } +.flag-WF{ background-position: -208px -65px; width: 16px; height: 11px; } +.flag-WS{ background-position: -234px -65px; width: 16px; height: 11px; } +.flag-YE{ background-position: -260px -65px; width: 16px; height: 11px; } +.flag-YT{ background-position: -286px -65px; width: 16px; height: 11px; } +.flag-ZA{ background-position: -312px -65px; width: 16px; height: 11px; } +.flag-ZM{ background-position: -338px -65px; width: 16px; height: 11px; } +.flag-ZW{ background-position: -364px -65px; width: 16px; height: 11px; } \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/dataTable.css b/src/bb-themes/admin_default/css/dataTable.css new file mode 100644 index 000000000..373dd34c8 --- /dev/null +++ b/src/bb-themes/admin_default/css/dataTable.css @@ -0,0 +1,156 @@ + +/* ===== Dynamic tables ===== */ + +.paging_two_button .ui-button { float: left; cursor: pointer; * cursor: hand; } +.paging_full_numbers .ui-button { padding: 2px 6px; margin: 0; cursor: pointer; * cursor: hand; } +.dataTables_paginate .ui-button { margin-right: -0.1em !important; } +.dataTables_wrapper .ui-toolbar { padding: 5px; } + +.dataTables_paginate { width: auto; } +.dataTables_info { padding: 7px 0 0 80px; color: #878787; } + +table.display thead th { padding: 4px 0px 3px 10px; cursor: pointer; * cursor: hand; font-size: 11px; } + +div.dataTables_wrapper .ui-widget-header { font-weight: normal; background: #efefef url(../images/leftNavBg.png) repeat-x; border-top: 1px solid #D5D5D5; margin-top: -1px; border-right: none; } + + +table.display thead th div.DataTables_sort_wrapper { position: relative; padding-right: 20px; color: #878787; } +table.display thead th div.DataTables_sort_wrapper span { position: absolute; top: 50%; margin-top: -8px; right: 5px; } + + +/* ===== Datatable styles ===== */ + +.dataTables_wrapper { position: relative; min-height: 302px; _height: 302px; clear: both; } +.dataTables_processing { position: absolute; top: 0px; left: 50%; width: 250px; margin-left: -125px; border: 1px solid #ddd; text-align: center; color: #999; font-size: 11px; padding: 2px 0; } +.dataTables_length { float: left; color: #878787; margin: 7px 5px 0 5px; } +.dataTables_length label { padding-top: 10px; font-size: 11px; } +.dataTables_length select { font-size: 11px; margin: 0 5px; } +.dataTables_filter { text-align: left; margin: 4px 8px 2px 10px; position: absolute; right: 0; top: -34px; color: #878787; font-size: 11px; } +.dataTables_filter input[type="text"] { padding: 3px 5px; border: 1px solid #D5D5D5; width: 200px; position: relative; margin-left: 6px; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; color: #878787; } +.dataTables_filter .srch { position: absolute; right: 6px; top: 7px; background: url(../images/searchSmall.png) no-repeat 0 0; border: none; width: 9px; height: 9px; } +.dataTables_info { float: left; } +.dataTables_paginate { text-align: right; margin: 6px; } + + +/* Pagination nested */ +.paginate_disabled_previous, .paginate_enabled_previous, .paginate_disabled_next, .paginate_enabled_next { height: 19px; width: 19px; margin-left: 3px; float: left; } +.paginate_disabled_previous { background-image: url(../images/back_disabled.jpg); } +.paginate_enabled_previous { background-image: url(../images/back_enabled.jpg); } +.paginate_disabled_next { background-image: url(../images/forward_disabled.jpg); } +.paginate_enabled_next { background-image: url(../images/forward_enabled.jpg); } + + +/* DataTables display */ +table.display { margin: 0 auto; width: 100%; clear: both; border-collapse: collapse; } +table.display tfoot th { padding: 3px 0px 3px 10px; font-weight: bold; font-weight: normal; } +table.display tr.heading2 td { border-bottom: 1px solid #aaa; } +table.display td { padding: 8px 10px; } +table.display td.center { text-align: center; } + + +/* DataTables sorting */ +.sorting_asc { background: url(../images/sort_asc.png) no-repeat center right; } +.sorting_desc { background: url(../images/sort_desc.png) no-repeat center right; } +.sorting { background: url(../images/sort_both.png) no-repeat center right; } +.sorting_asc_disabled { background: url(../images/sort_asc_disabled.png) no-repeat center right; } +.sorting_desc_disabled { background: url(../images/sort_desc_disabled.png) no-repeat center right; } + + +/* DataTables row classes*/ +table.display tr.odd.gradeA { background-color: #ddffdd; } +table.display tr.even.gradeA { background-color: #eeffee; } +table.display tr { border-bottom: 1px solid #e7e7e7; } +table.display td { border-left: 1px solid #e7e7e7; } +table.display td:first-child { border-left: none; } +table.display tr.odd.gradeA { background-color: #fafafa; } +table.display tr.even.gradeA { background-color: #f5f5f5; } +table.display tr.odd.gradeC { background-color: #ddddff; } +table.display tr.even.gradeC { background-color: #eeeeff; } +table.display tr.odd.gradeX { background-color: #ffdddd; } +table.display tr.even.gradeX { background-color: #ffeeee; } +table.display tr.odd.gradeU { background-color: #ddd; } +table.display tr.even.gradeU { background-color: #eee; } + +tr.odd { background-color: #E2E4FF; } +tr.even { background-color: white; } + + +/* Misc */ +.dataTables_scroll { clear: both; } +.top, .bottom { padding: 15px; background-color: #F5F5F5; border: 1px solid #CCCCCC; } +.top .dataTables_info { float: none; } +.clear { clear: both; } +.dataTables_empty { text-align: center; } + +tfoot input { margin: 0.5em 0; width: 100%; color: #444; } +tfoot input.search_init { color: #999; } + +td.group { background-color: #d1cfd0; border-bottom: 2px solid #A19B9E; border-top: 2px solid #A19B9E; } +td.details { background-color: #d1cfd0; border: 2px solid #A19B9E; } + +.example_alt_pagination div.dataTables_info { width: 40%; } +.paging_full_numbers span.paginate_button, .paging_full_numbers span.paginate_active { border: 1px solid #aaa; -webkit-border-radius: 5px; -moz-border-radius: 5px; padding: 2px 5px; margin: 0 3px; cursor: pointer; *cursor: hand; } +.paging_full_numbers span.paginate_button { background-color: #ddd; } +.paging_full_numbers span.paginate_button:hover { background-color: #ccc; } +.paging_full_numbers span.paginate_active { background-color: #99B3FF; } + +table.display tr.even.row_selected td { background-color: #B0BED9; } +table.display tr.odd.row_selected td { background-color: #9FAFD1; } + + +/* Sorting classes for columns. For the standard odd/even */ +tr.odd td.sorting_1 { background-color: #D3D6FF; } +tr.odd td.sorting_2 { background-color: #DADCFF; } +tr.odd td.sorting_3 { background-color: #E0E2FF; } + +tr.even td.sorting_1 { background-color: #EAEBFF; } +tr.even td.sorting_2 { background-color: #F2F3FF; } +tr.even td.sorting_3 { background-color: #F9F9FF; } + + +/* For the Conditional-CSS grading rows */ +/* + Colour calculations (based off the main row colours) + Level 1: + dd > c4 + ee > d5 + Level 2: + dd > d1 + ee > e2 + */ +tr.odd.gradeA td.sorting_1 { background-color: #f4f4f4; } +tr.odd.gradeA td.sorting_2 { background-color: #d1ffd1; } +tr.odd.gradeA td.sorting_3 { background-color: #d1ffd1; } + +tr.even.gradeA td.sorting_1 { background-color: #efefef; } +tr.even.gradeA td.sorting_2 { background-color: #e2ffe2; } +tr.even.gradeA td.sorting_3 { background-color: #e2ffe2; } + +tr.odd.gradeC td.sorting_1 { background-color: #c4c4ff; } +tr.odd.gradeC td.sorting_2 { background-color: #d1d1ff; } +tr.odd.gradeC td.sorting_3 { background-color: #d1d1ff; } + +tr.even.gradeC td.sorting_1 { background-color: #d5d5ff; } +tr.even.gradeC td.sorting_2 { background-color: #e2e2ff; } +tr.even.gradeC td.sorting_3 { background-color: #e2e2ff; } + +tr.odd.gradeX td.sorting_1 { background-color: #ffc4c4; } +tr.odd.gradeX td.sorting_2 { background-color: #ffd1d1; } +tr.odd.gradeX td.sorting_3 { background-color: #ffd1d1; } + +tr.even.gradeX td.sorting_1 { background-color: #ffd5d5; } +tr.even.gradeX td.sorting_2 { background-color: #ffe2e2; } +tr.even.gradeX td.sorting_3 { background-color: #ffe2e2; } + +tr.odd.gradeU td.sorting_1 { background-color: #c4c4c4; } +tr.odd.gradeU td.sorting_2 { background-color: #d1d1d1; } +tr.odd.gradeU td.sorting_3 { background-color: #d1d1d1; } + +tr.even.gradeU td.sorting_1 { background-color: #d5d5d5; } +tr.even.gradeU td.sorting_2 { background-color: #e2e2e2; } +tr.even.gradeU td.sorting_3 { background-color: #e2e2e2; } + + +/* Row highlighting example */ +.ex_highlight #example tbody tr.even:hover, #example tbody tr.even td.highlighted { background-color: #ECFFB3; } +.ex_highlight #example tbody tr.odd:hover, #example tbody tr.odd td.highlighted { background-color: #E6FF99; } \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/icons.css b/src/bb-themes/admin_default/css/icons.css new file mode 100644 index 000000000..320a8ba88 --- /dev/null +++ b/src/bb-themes/admin_default/css/icons.css @@ -0,0 +1,324 @@ +/* ===== 14x14 icons ===== */ + +.iAbacus { background: url(../images/icons/dark/abacus.png) no-repeat 12px; } +.iAdd { background: url(../images/icons/dark/add.png) no-repeat 12px; } +.iAddressBook { background: url(../images/icons/dark/addressBook.png) no-repeat 12px; } +.iAdminUser { background: url(../images/icons/dark/adminUser.png) no-repeat 12px; } +.iAdminUser2 { background: url(../images/icons/dark/adminUser2.png) no-repeat 12px; } +.iAirplane { background: url(../images/icons/dark/airplane.png) no-repeat 12px; } +.iAlarm { background: url(../images/icons/dark/alarm.png) no-repeat 12px; } +.iAlert { background: url(../images/icons/dark/alert.png) no-repeat 12px; } +.iAlert2 { background: url(../images/icons/dark/alert2.png) no-repeat 12px; } +.iAndroid { background: url(../images/icons/dark/android.png) no-repeat 12px; } +.iArchive { background: url(../images/icons/dark/archive.png) no-repeat 12px; } +.iArrowDown { background: url(../images/icons/dark/arrowDown.png) no-repeat 12px; } +.iArrowLeft { background: url(../images/icons/dark/arrowLeft.png) no-repeat 12px; } +.iArrowRight { background: url(../images/icons/dark/arrowRight.png) no-repeat 12px; } +.iArrowUp { background: url(../images/icons/dark/arrowUp.png) no-repeat 12px; } + +.iBag { background: url(../images/icons/dark/bag.png) no-repeat 12px; } +.iBaloons { background: url(../images/icons/dark/baloons.png) no-repeat 12px; } +.iBandaid { background: url(../images/icons/dark/bandaid.png) no-repeat 12px; } +.iBasket { background: url(../images/icons/dark/basket.png) no-repeat 12px; } +.iBasket2 { background: url(../images/icons/dark/basket2.png) no-repeat 12px; } +.iBattery { background: url(../images/icons/dark/battery.png) no-repeat 12px; } +.iBatteryFull { background: url(../images/icons/dark/batteryFull.png) no-repeat 12px; } +.iBell { background: url(../images/icons/dark/bell.png) no-repeat 12px; } +.iBell2 { background: url(../images/icons/dark/bell2.png) no-repeat 12px; } +.iBigBrush { background: url(../images/icons/dark/bigBrush.png) no-repeat 12px; } +.iBlackberry { background: url(../images/icons/dark/blackberry.png) no-repeat 12px; } +.iBlock { background: url(../images/icons/dark/block.png) no-repeat 12px; } +.iBlocks { background: url(../images/icons/dark/blocks.png) no-repeat 12px; } +.iBluetooth { background: url(../images/icons/dark/bluetooth.png) no-repeat 12px; } +.iBluetooth2 { background: url(../images/icons/dark/bluetooth2.png) no-repeat 12px; } +.iBluray { background: url(../images/icons/dark/bluray.png) no-repeat 12px; } +.iBook { background: url(../images/icons/dark/book.png) no-repeat 12px; } +.iBookLarge { background: url(../images/icons/dark/bookLarge.png) no-repeat 12px; } +.iBooks { background: url(../images/icons/dark/books.png) no-repeat 12px; } +.iBright { background: url(../images/icons/dark/bright.png) no-repeat 12px; } +.iBubbles { background: url(../images/icons/dark/bubbles.png) no-repeat 12px; } +.iBubbles2 { background: url(../images/icons/dark/bubbles2.png) no-repeat 12px; } +.iBuilding { background: url(../images/icons/dark/building.png) no-repeat 12px; } +.iBullsEye { background: url(../images/icons/dark/bullsEye.png) no-repeat 12px; } +.iBuzz { background: url(../images/icons/dark/buzz.png) no-repeat 12px; } + +.iCalc { background: url(../images/icons/dark/calc.png) no-repeat 12px; } +.iCamera { background: url(../images/icons/dark/camera.png) no-repeat 12px; } +.iCamera2 { background: url(../images/icons/dark/camera2.png) no-repeat 12px; } +.iCar { background: url(../images/icons/dark/car.png) no-repeat 12px; } +.iCart { background: url(../images/icons/dark/cart.png) no-repeat 12px; } +.iCart2 { background: url(../images/icons/dark/cart2.png) no-repeat 12px; } +.iCart3 { background: url(../images/icons/dark/cart3.png) no-repeat 12px; } +.iCart4 { background: url(../images/icons/dark/cart4.png) no-repeat 12px; } +.iCashRegister { background: url(../images/icons/dark/cashRegister.png) no-repeat 12px; } +.iCassette { background: url(../images/icons/dark/cassette.png) no-repeat 12px; } +.iCat { background: url(../images/icons/dark/cat.png) no-repeat 12px; } +.iCd { background: url(../images/icons/dark/cd.png) no-repeat 12px; } +.iChair { background: url(../images/icons/dark/chair.png) no-repeat 12px; } +.iChart { background: url(../images/icons/dark/chart.png) no-repeat 12px; } +.iChart2 { background: url(../images/icons/dark/chart2.png) no-repeat 12px; } +.iChart3 { background: url(../images/icons/dark/chart3.png) no-repeat 12px; } +.iChart4 { background: url(../images/icons/dark/chart4.png) no-repeat 12px; } +.iChart5 { background: url(../images/icons/dark/chart5.png) no-repeat 12px; } +.iChart6 { background: url(../images/icons/dark/chart6.png) no-repeat 12px; } +.iChart7 { background: url(../images/icons/dark/chart7.png) no-repeat 12px; } +.iChart8 { background: url(../images/icons/dark/chart8.png) no-repeat 12px; } +.iCheck { background: url(../images/icons/dark/check.png) no-repeat 12px; } +.iChemical { background: url(../images/icons/dark/chemical.png) no-repeat 12px; } +.iChrome { background: url(../images/icons/dark/chrome.png) no-repeat 12px; } +.iClipboard { background: url(../images/icons/dark/clipboard.png) no-repeat 12px; } +.iClock { background: url(../images/icons/dark/clock.png) no-repeat 12px; } +.iClose { background: url(../images/icons/dark/close.png) no-repeat 12px; } +.iCloud { background: url(../images/icons/dark/cloud.png) no-repeat 12px; } +.iCloudDownload { background: url(../images/icons/dark/cloudDownload.png) no-repeat 12px; } +.iCloudUpload { background: url(../images/icons/dark/cloudUpload.png) no-repeat 12px; } +.iCog { background: url(../images/icons/dark/cog.png) no-repeat 12px; } +.iCog2 { background: url(../images/icons/dark/cog2.png) no-repeat 12px; } +.iCog3 { background: url(../images/icons/dark/cog3.png) no-repeat 12px; } +.iCog4 { background: url(../images/icons/dark/cog4.png) no-repeat 12px; } +.iCompanies { background: url(../images/icons/dark/companies.png) no-repeat 12px; } +.iComputer { background: url(../images/icons/dark/computer.png) no-repeat 12px; } +.iCoverflow { background: url(../images/icons/dark/coverflow.png) no-repeat 12px; } +.iCreate { background: url(../images/icons/dark/create.png) no-repeat 12px; } +.iCup { background: url(../images/icons/dark/cup.png) no-repeat 12px; } +.iCut { background: url(../images/icons/dark/cut.png) no-repeat 12px; } + +.iDayCalendar { background: url(../images/icons/dark/dayCalendar.png) no-repeat 12px; } +.iDelicious { background: url(../images/icons/dark/delicious.png) no-repeat 12px; } +.iDenied { background: url(../images/icons/dark/denied.png) no-repeat 12px; } +.iDialog { background: url(../images/icons/dark/dialog.png) no-repeat 12px; } +.iDigg { background: url(../images/icons/dark/digg.png) no-repeat 12px; } +.iDigg2 { background: url(../images/icons/dark/digg2.png) no-repeat 12px; } +.iDoc { background: url(../images/icons/dark/doc.png) no-repeat 12px; } +.iDocs { background: url(../images/icons/dark/docs.png) no-repeat 12px; } +.iDownload { background: url(../images/icons/dark/download.png) no-repeat 12px; } +.iDownload2 { background: url(../images/icons/dark/download2.png) no-repeat 12px; } +.iDownload3 { background: url(../images/icons/dark/download3.png) no-repeat 12px; } +.iDribbble { background: url(../images/icons/dark/dribbble.png) no-repeat 12px; } +.iDribbble2 { background: url(../images/icons/dark/dribbble2.png) no-repeat 12px; } +.iDrive { background: url(../images/icons/dark/drive.png) no-repeat 12px; } +.iDropbox { background: url(../images/icons/dark/dropbox.png) no-repeat 12px; } +.iDropper { background: url(../images/icons/dark/dropper.png) no-repeat 12px; } +.iDrupal { background: url(../images/icons/dark/drupal.png) no-repeat 12px; } +.iDvd { background: url(../images/icons/dark/dvd.png) no-repeat 12px; } + +.iElectricity { background: url(../images/icons/dark/electricity.png) no-repeat 12px; } +.iElectroPlug { background: url(../images/icons/dark/electroPlug.png) no-repeat 12px; } +.iExcelDoc { background: url(../images/icons/dark/excelDoc.png) no-repeat 12px; } +.iExit { background: url(../images/icons/dark/exit.png) no-repeat 12px; } +.iExpengine { background: url(../images/icons/dark/expengine.png) no-repeat 12px; } +.iExpose { background: url(../images/icons/dark/expose.png) no-repeat 12px; } + +.iFacebook { background: url(../images/icons/dark/facebook.png) no-repeat 12px; } +.iFax { background: url(../images/icons/dark/fax.png) no-repeat 12px; } +.iFemaleContour { background: url(../images/icons/dark/femaleContour.png) no-repeat 12px; } +.iFemaleSymbol { background: url(../images/icons/dark/femaleSymbol.png) no-repeat 12px; } +.iFiles { background: url(../images/icons/dark/files.png) no-repeat 12px; } +.iFilmCamera { background: url(../images/icons/dark/filmCamera.png) no-repeat 12px; } +.iFilmStrip { background: url(../images/icons/dark/filmStrip.png) no-repeat 12px; } +.iFilmStrip2 { background: url(../images/icons/dark/filmStrip2.png) no-repeat 12px; } +.iFirefox { background: url(../images/icons/dark/firefox.png) no-repeat 12px; } +.iFlag { background: url(../images/icons/dark/flag.png) no-repeat 12px; } +.iFlag2 { background: url(../images/icons/dark/flag2.png) no-repeat 12px; } +.iFlagFinished { background: url(../images/icons/dark/flagFinished.png) no-repeat 12px; } +.iFolder { background: url(../images/icons/dark/folder.png) no-repeat 12px; } +.iFootprints { background: url(../images/icons/dark/footprints.png) no-repeat 12px; } +.iFountainPen { background: url(../images/icons/dark/fountainPen.png) no-repeat 12px; } +.iFrames { background: url(../images/icons/dark/frames.png) no-repeat 12px; } +.iFull { background: url(../images/icons/dark/full.png) no-repeat 12px; } +.iFull2 { background: url(../images/icons/dark/full2.png) no-repeat 12px; } +.iFullscreen { background: url(../images/icons/dark/fullscreen.png) no-repeat 12px; } + +.iGlobe { background: url(../images/icons/dark/globe.png) no-repeat 12px; } +.iGlobe2 { background: url(../images/icons/dark/globe2.png) no-repeat 12px; } +.iGmaps { background: url(../images/icons/dark/gmaps.png) no-repeat 12px; } +.iGoBack { background: url(../images/icons/dark/goBack.png) no-repeat 12px; } +.iGoFull { background: url(../images/icons/dark/goFull.png) no-repeat 12px; } +.iGraph { background: url(../images/icons/dark/graph.png) no-repeat 12px; } + +.iHeart { background: url(../images/icons/dark/heart.png) no-repeat 12px; } +.iHd { background: url(../images/icons/dark/hd.png) no-repeat 12px; } +.iHd2 { background: url(../images/icons/dark/hd2.png) no-repeat 12px; } +.iHd3 { background: url(../images/icons/dark/hd3.png) no-repeat 12px; } +.iHeadphones { background: url(../images/icons/dark/headphones.png) no-repeat 12px; } +.iHelp { background: url(../images/icons/dark/help.png) no-repeat 12px; } +.iHome { background: url(../images/icons/dark/home.png) no-repeat 12px; } +.iHome2 { background: url(../images/icons/dark/home2.png) no-repeat 12px; } + +.iIcecream { background: url(../images/icons/dark/icecream.png) no-repeat 12px; } +.iIchat { background: url(../images/icons/dark/ichat.png) no-repeat 12px; } +.iImage { background: url(../images/icons/dark/image.png) no-repeat 12px; } +.iImage2 { background: url(../images/icons/dark/image2.png) no-repeat 12px; } +.iImageList { background: url(../images/icons/dark/imageList.png) no-repeat 12px; } +.iImages { background: url(../images/icons/dark/images.png) no-repeat 12px; } +.iImages2 { background: url(../images/icons/dark/images2.png) no-repeat 12px; } +.iImagesList { background: url(../images/icons/dark/imagesList.png) no-repeat 12px; } +.iInbox { background: url(../images/icons/dark/inbox.png) no-repeat 12px; } +.iInbox2 { background: url(../images/icons/dark/inbox2.png) no-repeat 12px; } +.iIncoming { background: url(../images/icons/dark/incoming.png) no-repeat 12px; } +.iInfo { background: url(../images/icons/dark/info.png) no-repeat 12px; } +.iIpad { background: url(../images/icons/dark/ipad.png) no-repeat 12px; } +.iIphone { background: url(../images/icons/dark/iphone.png) no-repeat 12px; } +.iIpodClassic { background: url(../images/icons/dark/ipodClassic.png) no-repeat 12px; } +.iIpodNano { background: url(../images/icons/dark/ipodNano.png) no-repeat 12px; } + +.iJoomla { background: url(../images/icons/dark/joomla.png) no-repeat 12px; } + +.iKey { background: url(../images/icons/dark/key.png) no-repeat 12px; } + +.iLadyPurse { background: url(../images/icons/dark/ladyPurse.png) no-repeat 12px; } +.iLamp { background: url(../images/icons/dark/lamp.png) no-repeat 12px; } +.iLaptop { background: url(../images/icons/dark/laptop.png) no-repeat 12px; } +.iLastFM { background: url(../images/icons/dark/lastFM.png) no-repeat 12px; } +.iLemonadeStand { background: url(../images/icons/dark/lemonadeStand.png) no-repeat 12px; } +.iLightBulb { background: url(../images/icons/dark/lightBulb.png) no-repeat 12px; } +.iLike { background: url(../images/icons/dark/like.png) no-repeat 12px; } +.iLink { background: url(../images/icons/dark/link.png) no-repeat 12px; } +.iLink2 { background: url(../images/icons/dark/link2.png) no-repeat 12px; } +.iLinux { background: url(../images/icons/dark/linux.png) no-repeat 12px; } +.iList { background: url(../images/icons/dark/list.png) no-repeat 12px; } +.iLoading { background: url(../images/icons/dark/loading.png) no-repeat 12px; } +.iLogoff { background: url(../images/icons/dark/logoff.png) no-repeat 12px; } +.iLocked { background: url(../images/icons/dark/locked.png) no-repeat 12px; } +.iLocked2 { background: url(../images/icons/dark/locked2.png) no-repeat 12px; } + +.iMacos { background: url(../images/icons/dark/macos.png) no-repeat 12px; } +.iMagicMouse { background: url(../images/icons/dark/magicMouse.png) no-repeat 12px; } +.iMagnify { background: url(../images/icons/dark/magnify.png) no-repeat 12px; } +.iMail { background: url(../images/icons/dark/mail.png) no-repeat 12px; } +.iMaleContour { background: url(../images/icons/dark/maleContour.png) no-repeat 12px; } +.iMaleSymbol { background: url(../images/icons/dark/maleSymbol.png) no-repeat 12px; } +.iMap { background: url(../images/icons/dark/map.png) no-repeat 12px; } +.iMedicalCase { background: url(../images/icons/dark/medicalCase.png) no-repeat 12px; } +.iMegaphone { background: url(../images/icons/dark/megaphone.png) no-repeat 12px; } +.iMicrophone { background: url(../images/icons/dark/microphone.png) no-repeat 12px; } +.iMightyMouse { background: url(../images/icons/dark/mightyMouse.png) no-repeat 12px; } +.iMobile { background: url(../images/icons/dark/mobile.png) no-repeat 12px; } +.iMobyPicture { background: url(../images/icons/dark/mobyPicture.png) no-repeat 12px; } +.iMoney { background: url(../images/icons/dark/money.png) no-repeat 12px; } +.iMoney2 { background: url(../images/icons/dark/money2.png) no-repeat 12px; } +.iMonitor { background: url(../images/icons/dark/monitor.png) no-repeat 12px; } +.iMonthCalendar { background: url(../images/icons/dark/monthCalendar.png) no-repeat 12px; } +.iMouse { background: url(../images/icons/dark/mouse.png) no-repeat 12px; } +.iMusic { background: url(../images/icons/dark/music.png) no-repeat 12px; } +.iMyspace { background: url(../images/icons/dark/myspace.png) no-repeat 12px; } + +.iNotebook { background: url(../images/icons/dark/notebook.png) no-repeat 12px; } + +.iOutgoing { background: url(../images/icons/dark/outgoing.png) no-repeat 12px; } + +.iPacman { background: url(../images/icons/dark/pacman.png) no-repeat 12px; } +.iPaintBrush { background: url(../images/icons/dark/paintBrush.png) no-repeat 12px; } +.iPants { background: url(../images/icons/dark/pants.png) no-repeat 12px; } +.iPaperclip { background: url(../images/icons/dark/paperclip.png) no-repeat 12px; } +.iPaypal { background: url(../images/icons/dark/paypal.png) no-repeat 12px; } +.iPaypal2 { background: url(../images/icons/dark/paypal2.png) no-repeat 12px; } +.iPaypal3 { background: url(../images/icons/dark/paypal3.png) no-repeat 12px; } +.iPdfDoc { background: url(../images/icons/dark/pdfDoc.png) no-repeat 12px; } +.iPencil { background: url(../images/icons/dark/pencil.png) no-repeat 12px; } +.iPhone { background: url(../images/icons/dark/phone.png) no-repeat 12px; } +.iPhone2 { background: url(../images/icons/dark/phone2.png) no-repeat 12px; } +.iPhone3 { background: url(../images/icons/dark/phone3.png) no-repeat 12px; } +.iPhotos { background: url(../images/icons/dark/photos.png) no-repeat 12px; } +.iPiggyBank { background: url(../images/icons/dark/piggyBank.png) no-repeat 12px; } +.iPin { background: url(../images/icons/dark/pin.png) no-repeat 12px; } +.iPlaneSuitcase { background: url(../images/icons/dark/planeSuitcase.png) no-repeat 12px; } +.iPlay { background: url(../images/icons/dark/play.png) no-repeat 12px; } +.iPlay2 { background: url(../images/icons/dark/play2.png) no-repeat 12px; } +.iPlixi { background: url(../images/icons/dark/plixi.png) no-repeat 12px; } +.iPodium { background: url(../images/icons/dark/podium.png) no-repeat 12px; } +.iPostcard { background: url(../images/icons/dark/postcard.png) no-repeat 12px; } +.iPower { background: url(../images/icons/dark/power.png) no-repeat 12px; } +.iPowerBattery { background: url(../images/icons/dark/powerBattery.png) no-repeat 12px; } +.iPpDoc { background: url(../images/icons/dark/ppDoc.png) no-repeat 12px; } +.iPresentation { background: url(../images/icons/dark/presentation.png) no-repeat 12px; } +.iPreview { background: url(../images/icons/dark/preview.png) no-repeat 12px; } +.iPriceTag { background: url(../images/icons/dark/pricetag.png) no-repeat 12px; } +.iPriceTags { background: url(../images/icons/dark/priceTags.png) no-repeat 12px; } +.iPrinter { background: url(../images/icons/dark/printer.png) no-repeat 12px; } + +.iRadio { background: url(../images/icons/dark/radio.png) no-repeat 12px; } +.iRecord { background: url(../images/icons/dark/record.png) no-repeat 12px; } +.iRecycle { background: url(../images/icons/dark/recycle.png) no-repeat 12px; } +.iRefresh { background: url(../images/icons/dark/refresh.png) no-repeat 12px; } +.iRefresh2 { background: url(../images/icons/dark/refresh2.png) no-repeat 12px; } +.iRefresh3 { background: url(../images/icons/dark/refresh3.png) no-repeat 12px; } +.iRefresh4 { background: url(../images/icons/dark/refresh4.png) no-repeat 12px; } +.iRepeat { background: url(../images/icons/dark/repeat.png) no-repeat 12px; } +.iRobot { background: url(../images/icons/dark/robot.png) no-repeat 12px; } +.iRss { background: url(../images/icons/dark/iRss.png) no-repeat 12px; } +.iRuler { background: url(../images/icons/dark/ruler.png) no-repeat 12px; } +.iRuler2 { background: url(../images/icons/dark/ruler2.png) no-repeat 12px; } +.iRunningMan { background: url(../images/icons/dark/runningMan.png) no-repeat 12px; } + +.iSafari { background: url(../images/icons/dark/safari.png) no-repeat 12px; } +.iScanLabel { background: url(../images/icons/dark/scanLabel.png) no-repeat 12px; } +.iSd { background: url(../images/icons/dark/sd.png) no-repeat 12px; } +.iSd2 { background: url(../images/icons/dark/sd2.png) no-repeat 12px; } +.iSd3 { background: url(../images/icons/dark/sd3.png) no-repeat 12px; } +.iSettings { background: url(../images/icons/dark/settings.png) no-repeat 12px; } +.iSettings2 { background: url(../images/icons/dark/settings2.png) no-repeat 12px; } +.iShirt { background: url(../images/icons/dark/shirt.png) no-repeat 12px; } +.iShoppingBag { background: url(../images/icons/dark/shoppingBag.png) no-repeat 12px; } +.iShuffle { background: url(../images/icons/dark/shuffle.png) no-repeat 12px; } +.iSignal { background: url(../images/icons/dark/signal.png) no-repeat 12px; } +.iSignPost { background: url(../images/icons/dark/signPost.png) no-repeat 12px; } +.iSkype { background: url(../images/icons/dark/skype.png) no-repeat 12px; } +.iSmallBrush { background: url(../images/icons/dark/smallBrush.png) no-repeat 12px; } +.iSocks { background: url(../images/icons/dark/socks.png) no-repeat 12px; } +.iSound { background: url(../images/icons/dark/sound.png) no-repeat 12px; } +.iSpeech { background: url(../images/icons/dark/speech.png) no-repeat 12px; } +.iSpeech2 { background: url(../images/icons/dark/speech2.png) no-repeat 12px; } +.iStar { background: url(../images/icons/dark/star.png) no-repeat 12px; } +.iStats { background: url(../images/icons/dark/stats.png) no-repeat 12px; } +.iStop { background: url(../images/icons/dark/stop.png) no-repeat 12px; } +.iStopWatch { background: url(../images/icons/dark/stopWatch.png) no-repeat 12px; } +.iStrategy { background: url(../images/icons/dark/strategy.png) no-repeat 12px; } +.iStrategy2 { background: url(../images/icons/dark/strategy2.png) no-repeat 12px; } +.iStumble { background: url(../images/icons/dark/stumble.png) no-repeat 12px; } +.iSuitcase { background: url(../images/icons/dark/suitcase.png) no-repeat 12px; } +.iSwitcher { background: url(../images/icons/dark/switcher.png) no-repeat 12px; } + +.iTable { background: url(../images/icons/dark/table.png) no-repeat 12px; } +.iTag { background: url(../images/icons/dark/tag.png) no-repeat 12px; } +.iTags { background: url(../images/icons/dark/tags.png) no-repeat 12px; } +.iTimer { background: url(../images/icons/dark/timer.png) no-repeat 12px; } +.iTransfer { background: url(../images/icons/dark/transfer.png) no-repeat 12px; } +.iTrash { background: url(../images/icons/dark/trash.png) no-repeat 12px; } +.iTravelSuitcase { background: url(../images/icons/dark/travelSuitcase.png) no-repeat 12px; } +.iTree { background: url(../images/icons/dark/tree.png) no-repeat 12px; } +.iTrolly { background: url(../images/icons/dark/trolly.png) no-repeat 12px; } +.iTruck { background: url(../images/icons/dark/truck.png) no-repeat 12px; } +.iTumbler { background: url(../images/icons/dark/tumbler.png) no-repeat 12px; } +.iTv { background: url(../images/icons/dark/tv.png) no-repeat 12px; } +.iTwitter { background: url(../images/icons/dark/twitter.png) no-repeat 12px; } +.iTwitter2 { background: url(../images/icons/dark/twitter2.png) no-repeat 12px; } + +.iUmbrella { background: url(../images/icons/dark/radio.png) no-repeat 12px; } +.iUnderConstruction { background: url(../images/icons/dark/underConstruction.png) no-repeat 12px; } +.iUnlocked { background: url(../images/icons/dark/unlocked.png) no-repeat 12px; } +.iUpload { background: url(../images/icons/dark/upload.png) no-repeat 12px; } +.iUser { background: url(../images/icons/dark/user.png) no-repeat 12px; } +.iUser2 { background: url(../images/icons/dark/user2.png) no-repeat 12px; } +.iUserComment { background: url(../images/icons/dark/userComment.png) no-repeat 12px; } +.iUsers { background: url(../images/icons/dark/users.png) no-repeat 12px; } +.iUsers2 { background: url(../images/icons/dark/users2.png) no-repeat 12px; } + +.iVault { background: url(../images/icons/dark/vault.png) no-repeat 12px; } +.iVcard { background: url(../images/icons/dark/vcard.png) no-repeat 12px; } +.iView { background: url(../images/icons/dark/view.png) no-repeat 12px; } +.iVimeo { background: url(../images/icons/dark/vimeo.png) no-repeat 12px; } +.iVimeo2 { background: url(../images/icons/dark/vimeo2.png) no-repeat 12px; } + +.iWalkingMan { background: url(../images/icons/dark/walkingMan.png) no-repeat 12px; } +.iWifi { background: url(../images/icons/dark/wifi.png) no-repeat 12px; } +.iWifi2 { background: url(../images/icons/dark/wifi2.png) no-repeat 12px; } +.iWindows { background: url(../images/icons/dark/windows.png) no-repeat 12px; } +.iWordDoc { background: url(../images/icons/dark/wordDoc.png) no-repeat 12px; } +.iWordpress { background: url(../images/icons/dark/wordpress.png) no-repeat 12px; } +.iWordpress2 { background: url(../images/icons/dark/wordpress2.png) no-repeat 12px; } + +.iYoutube { background: url(../images/icons/dark/youtube.png) no-repeat 12px; } + +.iZip { background: url(../images/icons/dark/zip.png) no-repeat 12px; } +.iZipFiles { background: url(../images/icons/dark/zipFiles.png) no-repeat 12px; } diff --git a/src/bb-themes/admin_default/css/jquery-ui.css b/src/bb-themes/admin_default/css/jquery-ui.css new file mode 100644 index 000000000..8a2b01f14 --- /dev/null +++ b/src/bb-themes/admin_default/css/jquery-ui.css @@ -0,0 +1,535 @@ +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-size: 12px; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { } +.ui-widget-content a { color: #222222; } +.ui-widget-header { font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border-left: 1px solid #d5d5d5; font-weight: normal; border-bottom: 1px solid #D5D5D5; } +th.ui-state-default:first-child { border-left: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { background: #fafafa; font-weight: normal; color: #212121; } +.ui-state-hover a, .ui-state-hover a:hover { color: #797979; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { background: #fafafa; font-weight: normal; color: #797979; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #797979; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../images/jquery_ui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-state-default .ui-icon { background-image: url(../images/jquery_ui/ui-icons_888888_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/jquery_ui/ui-icons_454545_256x240.png); } +.ui-state-active .ui-icon {background-image: url(../images/jquery_ui/ui-icons_454545_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(../images/jquery_ui/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/jquery_ui/ui-icons_cd0a0a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +.ui-corner-tl { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; } +.ui-corner-tr { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; } +.ui-corner-br { -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-top { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-right { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-left { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; } +.ui-corner-all { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url(../images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } + + +/* ===== UI resizable ===== */ + +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} + +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } + +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float: left; } +.ui-menu .ui-menu { margin-top: -3px; } +.ui-menu .ui-menu-item { margin:0; padding: 0; zoom: 1; float: left; clear: left; width: 100%; } +.ui-menu .ui-menu-item a { text-decoration:none; display:block; padding:.2em .4em; line-height:1.5; zoom:1; } +.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; +} + + + +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 5px; } +.ui-buttonset .ui-button { margin: 0 3px; background: #FAFAFA; border: 1px solid #D5D5D5; line-height: 14px; font-size: 11px; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ + + + +/* ===== UI Dialog ===== */ + +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { position: relative; } +.ui-dialog .ui-dialog-title { float: left; height: 38px; font-size: 16px; padding: 0 12px 0 12px; line-height: 38px; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: 6px; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px; background: #fafafa; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { font-size: 10px; font-weight: bold; text-transform: uppercase; padding: 3px 12px 4px 12px; cursor: pointer; font-family: Arial, Helvetica, sans-serif; border: 1px solid #d5d5d5; color: #525252; margin: 5px; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } + + + +/* ===== UI Slider ===== */ + +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 16px; height: 16px; cursor: default; background: url(../images/ui/handle.png) no-repeat; border: none; cursor: pointer; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background: url(../images/ui/sliderOverlay.png) repeat-x; -moz-border-radius: 4px; -webkit-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; } + +.ui-slider-horizontal { height: 6px; background: url(../images/ui/sliderBg.png) repeat-x; clear: both; margin-top: 10px; } +.ui-slider-horizontal .ui-slider-handle { top: -5px; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: 6px; height: 100px; background: url(../images/ui/sliderBgVert.png) repeat-y; } +.ui-slider-vertical .ui-slider-handle { left: -5px; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; background: url(../images/ui/sliderOverlayVert.png) repeat-y; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } + + + +/* ===== UI Tabs ===== */ + +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } + + + + +/* ===== UI Datepicker ===== */ + +.datepicker { width: 70px!important; } +.ui-datepicker { width: 17em; padding: .2em .2em 0; border: 1px solid #d5d5d5; background: #fafafa; margin-top: 1px; z-index: 3; display: none; } +.ui-datepicker-append { margin-left: 10px; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border: 1px solid #E7E7E7; background: url(../images/leftNavBg.png) repeat-x; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker table .ui-state-default { border: 1px solid #d5d5d5; } +.ui-datepicker table tbody { font-size: 11px; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + + + +/* ===== UI Progress bar ===== */ + +.ui-progressbar { height: 16px; text-align: left; margin-top: 5px; background: url(../images/ui/progress.png) repeat-x; } +.ui-progressbar .ui-progressbar-value {margin: 0px; height:100%; overflow: hidden; display: block; background: url(../images/ui/progressOverlay.png) repeat-x; border-right: 1px solid #3c95d8; } +.pbar .ui-progressbar-value {display:block !important} +.pbar { overflow: hidden; background: url(../images/ui/progress.png) repeat-x;} +.percent { position: relative; text-align: right; margin-bottom: 5px; font-size: 11px; } +.elapsed { position: relative; text-align: right; margin-top: 5px; font-size: 11px;} + +/* + * jQuery UI Autocomplete 1.8.16 + * + * Copyright 2011, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Autocomplete#theming + */ +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +/* + * jQuery UI Menu 1.8.16 + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Menu#theming + */ +.ui-menu { + list-style:none; + padding: 2px; + margin: 0; + display:block; + float: left; + border: 1px solid #3C4049; + border-top: 0; + z-index: 11; +} +.ui-menu .ui-menu { + margin-top: -3px; +} +.ui-menu .ui-menu-item { + margin:0; + padding: 0; + zoom: 1; + float: left; + clear: left; + width: 100%; + background-color: #F5F5F5; +} +.ui-menu .ui-menu-item a { + text-decoration:none; + display:block; + line-height:1.5; +} +.ui-menu .ui-menu-item a.ui-state-hover, +.ui-menu .ui-menu-item a.ui-state-active { + font-weight: bold; + +} \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/main.css b/src/bb-themes/admin_default/css/main.css new file mode 100644 index 000000000..1fb05474e --- /dev/null +++ b/src/bb-themes/admin_default/css/main.css @@ -0,0 +1,1342 @@ +@import "reset.css"; +@import "dataTable.css"; +@import "ui_custom.css"; +@import "icons.css"; + +html { height: 100%; } +* html body { height: 100%; } +body { margin: 0; padding: 0; background: url(../images/bodyBg.jpg) repeat; font-size: 12px; color: #424242; font-family: Arial, Helvetica, sans-serif; line-height: 20px; min-height: 100%; position: relative; } + + + +/* ================================= + ===== New styles for v2.0 ===== + ================================= */ + +/* ===== Required fields error and field notes styling ===== */ + +label.error { color: #A73939; font-size: 11px; display: block; width: 100%; white-space: nowrap; float: none; margin: 8px 0 -8px 0; padding: 0!important; } +.selector .error { margin-right: -220px; float: right; } +.checker label.error, .radio label.error { display: inline; margin: 0; } +.req { margin-left: 5px; color: #DB6464; } + +.formNote { display: block; text-align: left; font-size: 11px; padding-top: 5px; color: #939393; } + + +/* ===== Tags input ===== */ + +div.tagsinput { border: 1px solid #ddd; background: #FFF; padding: 5px; width: 100%; overflow-y: auto; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } +div.tagsinput span.tag { border: 1px solid #a5d24a; display: block; float: left; padding: 3px 8px 2px 8px; background: #cde69c; color: #638421; margin: 5px 5px 5px 5px; } +div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; font-size: 11px; float: right; margin-top: -1px; } +div.tagsinput input { width: 80px; border: none; padding: 5px; background: transparent; margin: 5px 5px 0 0; } +div.tagsinput div { display: block; float: left; } +.tags_clear { clear: both; width: 100%; height: 0px; } +.not_valid { background: #FBD8DB !important; color: #90111A !important;} + + +/* ===== Limit box for textareas ===== */ + +.limiterBox { border: 1px solid #ddd; border-top: none; background: #efefef url(../images/leftNavBg.png) repeat-x; padding: 4px 6px; font-size: 11px; margin-top:1px; } + + +/* ===== Placeholder colors ===== */ + +::-webkit-input-placeholder { color: #b3b3b3; } +:-moz-placeholder { color: #b3b3b3; } + + +/* ===== Fixing bottom corners on main nav dropdown ===== */ + +.corner { -webkit-border-bottom-left-radius: 0!important; -webkit-border-bottom-right-radius: 0!important; -moz-border-radius-bottomleft: 0!important; -moz-border-radius-bottomright: 0!important; } + + + + +/* ================================= + ===== General styles ===== + ================================= */ + +.wrapper { margin: 0 5%; clear: both; } +.img { border: 1px solid #d5d5d5; } + + +/* ========== Typo ========== */ + +h1, h2, h3, h4, h5, h6, ul.tabs li a, .leftNav ul li a, .stats ul li span, .userLink, .errorPage p, .ui-dialog .ui-dialog-title { font-family: 'Cuprum', sans-serif; font-weight: normal; } +h1 { font-size: 24px; } +h2 { font-size: 22px; } +h3 { font-size: 20px; } +h4 { font-size: 18px; } +h5 { font-size: 16px; } +h6 { font-size: 14px; } + +blockquote { border : 1px solid #d5d5d5; margin-top: 40px; padding: 15px 10px; quotes: "\201C" "\201D"; background: #fafafa; text-align: center; font-style: italic; font-size: 12px; border-left: 4px solid #d5d5d5; } +blockquote:before { content: open-quote; font-weight: bold; } +blockquote:after { content: close-quote; font-weight: bold; } + +.red { color: #B55D5C; } +.green { color: #2a8827; } + +p { padding: 12px 0 0 0; } +.p12 { padding: 12px; } +.pt12 { padding-top: 12px; } + +.legendLabel span { display: block; margin: 0 5px; } +.legendColorBox { padding-left: 10px; } + + +/* ========== Additional reset classes ========== */ + +.mt40 { margin-top: 40px; } +.nomargin { margin: 0!important; } +.nopadding { padding: 0!important; } +.noborder { border: none!important; } +.nobg { background: none!important; } +.floatleft { display: block; float: left; } +.floatright { display: block; float: right; } +.aligncenter { text-align: center; } +.fix { clear: both; } +.first { margin-top: 25px!important; } +.inactive { margin-top: 0px; color: #2B6893; } +.displayNone { display: none; } +.wide { width: 100%} +.currency { text-align: right; font-weight: bold; } + +.ml122 { margin-left: 122px; } +.w40 { width: 40%; position: relative; } + + +/* ========== Login page ========== */ + +.loginPanel { width: 320px; background: #fafafa; border: 1px solid #d5d5d5; border-top: 0; display: block; height: 212px; } +.loginWrapper { margin: -106px 0 0 -160px; position: absolute; top: 50%; left: 50%; } +.loginLogo { position: absolute; width: 190px; height: 44px; display: block; top: -80px; left: 50%; margin-left: -95px; } +.loginPanel h5 { font-weight: normal; padding: 9px 12px 9px 35px; float: left; } + +.loginPanel label { width: 60px; } +.rememberMe { margin-left: 12px; } +.rememberMe label { padding: 4px 12px!important; width: auto; } +.loginInput { width: 200px; float: left; } +.loginRow { border-top: 1px solid #e7e7e7; padding: 15px 0; position: relative; } +.loginRow:first-child { border-top: none; } + +.backTo a:hover { background: #212121; } +.backTo span { padding: 8px 14px 8px 8px; display: block; float: left; } +.backTo img { margin: 13px 2px 11px 14px; float: left; display: block; } +.backTo a { float: left; color: #eeeeee; font-size: 11px; border-right: 1px solid #2F2F2F; border-left: 1px solid #2F2F2F; } + + +/* ========== Buttons ========== */ + +input[type=submit], input[type=reset], input[type=button], button, .button { font-size: 10px; font-weight: bold; text-transform: uppercase; padding: 5px 14px 6px 14px; cursor: pointer; font-family: Arial, Helvetica, sans-serif; line-height: 12px; } + +.basicBtn { background: url(../images/ui/basicBtn.png) repeat-x 0 0; border: 1px solid #d5d5d5; color: #525252; } +.basicBtn:hover { background-position: 0 -25px; border-color: #c9c9c9; } +.basicBtn:active { background-position: 0 -50px; } + +.blueBtn { background: url(../images/ui/blueBtn.png) repeat-x 0 0; border: 1px solid #3581c1; color: #fff; } +.blueBtn:hover { background-position: 0 -25px; } +.blueBtn:active { background-position: 0 -50px; } + +.redBtn { background: url(../images/ui/redBtn.png) repeat-x 0 0; border: 1px solid #9d342a; color: #fff; } +.redBtn:hover { background-position: 0 -25px; } +.redBtn:active { background-position: 0 -50px; } + +.seaBtn { background: url(../images/ui/seaBtn.png) repeat-x 0 0; border: 1px solid #306873; color: #fff; } +.seaBtn:hover { background-position: 0 -25px; } +.seaBtn:active { background-position: 0 -50px; } + +.blackBtn { background: url(../images/ui/blackBtn.png) repeat-x 0 0; border: 1px solid #353535; color: #fff; } +.blackBtn:hover { background-position: 0 -25px; } +.blackBtn:active { background-position: 0 -50px; } + +.greyishBtn { background: url(../images/ui/greyishBtn.png) repeat-x 0 0; border: 1px solid #4f5a68; color: #fff; } +.greyishBtn:hover { background-position: 0 -25px; } +.greyishBtn:active { background-position: 0 -50px; } + +.greenBtn { background: url(../images/ui/greenBtn.png) repeat-x 0 0; border: 1px solid #418d4f; color: #fff; } +.greenBtn:hover { background-position: 0 -25px; } +.greenBtn:active { background-position: 0 -50px; } + + +.btn14 { border: 1px solid #d5d5d5; background: url(../images/leftNavBg.png) repeat-x 0 0; padding: 6px 8px; display: inline-block; } +.btn14:hover { background: #f6f6f6; } +.btn14:active { background: #f1f1f1; } + +.btn55 { background: #efefef url(../images/middlebg.png) repeat-x 0 0; border: 1px solid #d5d5d5; padding: 8px 6px 2px 6px; display: inline-block; } +.btn55:hover { background: #f6f6f6; } +.btn55:active { background: #f1f1f1; } +.btn55 span { display: block; padding: 5px 5px 0 5px; color: #595858; } + +.btnIconLeft { border: 1px solid #d5d5d5; background: url(../images/leftNavBg.png) repeat-x 0 0; display: inline-block; color: #595858; } +.btnIconLeft:hover { background: #f6f6f6; color: #B55D5C; } +.btnIconLeft:active { background: #f1f1f1; } +.btnIconLeft .icon { float: left; border-right: 1px solid #d5d5d5; padding: 8px; } +.btnIconLeft span { display: block; float: left; padding: 5px 10px; font-weight: bold; } + + + +/* ========== Pagination ========== */ + +.pagination { margin: auto; width: auto; text-align: center; margin-top: 40px; } +.pages { } +.pages li.prev { margin-right: 15px; } +.pages li.next { margin-left: 15px; } +.pages li { display: inline; margin: 0 2px; } +.pages li a { height: 25px; padding: 4px 8px; text-decoration: none; color: #666666; font-weight: bold; background: url(../images/ui/pagination.png) repeat-x 0 0; border: 1px solid #d5d5d5; font-size: 11px; } +.pages li a:hover { background: #efefef; } +.pages li .active { background-position: 0 -26px; color: #fff; border-color: #687282; } +.pages li .active:hover { background: #687282; } + + +/* ========== Numbers notifications ========== */ + +.numberTop, .numberMiddle, .numberLeft { text-align: center; background: url(../images/number.png) repeat-x; display: inline-block; padding: 1px 5px; color: #fff; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; float: right; margin: 10px 15px 10px -5px; font-size: 11px; line-height: 14px; } +.numberTop { margin: 10px 15px 10px -5px; padding: 1px 5px!important; } +.numberMiddle { margin: 0; position: absolute; top: -5px; right: -5px; font-size: 11px; } +.numberLeft { margin: 0; position: absolute; top: 12px; right: 8px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; float: none; background: url(../images/number.png) repeat-x!important; padding: 1px 5px!important; } + + +/* ===== Top navigation ===== */ + +#topNav { height: 36px; display: block; } +.fixed { position: fixed; background: url(../images/topNav.jpg) repeat; width: 100%; color: #eeeeee; border-bottom: 1px solid #fff; z-index: 999; } + +.welcome { float: left; } +.welcome img { float: left; margin: 8px 8px 8px 0 } +.welcome span { padding: 8px 5px; display: block; white-space: nowrap; float: left; font-size: 11px; } + +.userNav { float: right; z-index: 6000; position: relative; font-size: 11px; } +.userNav .lastNav { width: 2px; height: 36px; background: url(../images/navSep.png) repeat-y; position: absolute; top: 0; right: 0; } +.userNav ul { margin-right: 2px; } +.userNav ul li { display: inline; float: left; position: relative; cursor: pointer; border-right: 1px solid #2f2f2f; } +.userNav ul li:first-child { border-left: 1px solid #2f2f2f; } +.userNav ul li a { color: #eeeeee; text-decoration: none; display: block; float: left; } +.userNav ul li:hover, .selected { background: #212121; } +.userNav ul li span { display: block; padding: 8px 14px 8px 8px; float: left; } +.userNav ul li img { float: left; display: block; padding: 13px 2px 11px 14px; } + +.userNav ul li ul { position: absolute; left: -1px; display: none; top: 35px; margin-top: 0px; background: #2f2f2f; padding: 0 1px 1px 1px; border: 1px solid #1d1d1d; z-index: 100; } +.userNav ul li ul li { display: block; float: none; border-top: 1px solid #2f2f2f; background: #212121; border-right: none; border-bottom: 1px solid #141414; } +.userNav ul li ul li:first-child { border-left: none!important; } +.userNav ul li ul li a { width: 100px; padding: 6px 10px 7px 36px; font-size: 11px; text-transform: none; color: #c5c5c5; font-weight: normal; background-color: none; float: none; } +.userNav ul li ul li a:hover { background-color: none; font-weight: normal; color: #a4a4a4; } +.userNav ul li ul li:hover { background: #1d1d1d!important; } + +.sAdd { background: url(../images/icons/topnav/subAdd.png) no-repeat 15px 13px; } +.sInbox { background: url(../images/icons/topnav/subInbox.png) no-repeat 14px 12px; } +.sOutbox { background: url(../images/icons/topnav/subOutbox.png) no-repeat 14px 11px; } +.sTrash { background: url(../images/icons/topnav/subTrash.png) no-repeat 14px 12px; } + + + + +/* ===== Header ===== */ + +#header { height: 106px; clear: both; } +.logo { float: left; margin-top: 30px; } + +.middleNav { float: right; margin-right: 1px; } +.middleNav ul { margin-top: 25px; } +.middleNav ul li { height: 55px; text-align: center; display: block; float: left; margin-left: 25px; position: relative; } +.middleNav ul li:first-child { margin: 0; } +.middleNav ul li a { display: block; border: 1px solid #d5d5d5; background: url(../images/middlebg.png) repeat-x 0 0; -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; color: #595858; font-size: 12px; position: relative; -moz-box-shadow: 0 2px 1px #fff; -webkit-box-shadow: 0 2px 1px #fff; box-shadow: 0 2px 1px #fff; } +.middleNav ul li a span { display: block; padding: 34px 10px 0 10px; } + +.middleNav ul li.iHome a span { background: url(../images/icons/middlenav/home.png) no-repeat 50% 8px; } +.middleNav ul li.iMes a span { background: url(../images/icons/middlenav/dialog.png) no-repeat 50% 8px; } +.middleNav ul li.iSpeech a span { background: url(../images/icons/middlenav/speech.png) no-repeat 50% 8px; } +.middleNav ul li.iStat a span { background: url(../images/icons/middlenav/graph.png) no-repeat 50% 8px; } +.middleNav ul li.iUser a span { background: url(../images/icons/middlenav/users.png) no-repeat 50% 8px; } +.middleNav ul li.iOrders a span { background: url(../images/icons/middlenav/basket2.png) no-repeat 50% 8px; } +.middleNav ul li.iInvoices a span { background: url(../images/icons/middlenav/money.png) no-repeat 50% 8px; } +.middleNav ul li.iTransactions a span { background: url(../images/icons/middlenav/transfer.png) no-repeat 50% 8px; } +.middleNav ul li.iPlugin a span { background: url(../images/icons/middlenav/electroPlug.png) no-repeat 50% 8px; } +.middleNav ul li.iMegaphone a span { background: url(../images/icons/middlenav/megaphone.png) no-repeat 50% 8px; } + +.middleNav ul li a:hover { background: #f6f6f6; } +.middleNav ul li a:active { background: #f1f1f1; } + + +/* ===== Left navigation ===== */ +.leftNav { width: 212px; max-width: 36%; margin-top: -1px; float: left; margin-bottom: 80px; margin-right: 41px; } + +/*.leftNav { width: 212px; max-width: 36%; margin-top: -1px; float: left; margin-bottom: 80px; margin-right: 41px; }*/ +.leftNav .last { border-bottom: none; } + +.leftNav ul li { position: relative; } +.leftNav ul li a { color: #494949; font-size: 15px; display: block; background: #efefef url(../images/leftNavBg.png) repeat-x 0 0; border: 1px solid #d5d5d5; margin-top: 1px; } +.leftNav ul li a:hover, .leftNav ul li a.active { background: url(../images/darkBg.jpg) repeat-x; color: #fff; border: 1px solid #3c4049; } +.leftNav ul li a span { padding: 9px 0 9px 35px; display: block; } + + +/* Left navigation icons */ + +.leftNav ul li.home a span { background: url(../images/icons/dark/home.png) no-repeat 10px; } +.leftNav ul li.graphs span { background: url(../images/icons/dark/graph.png) no-repeat 10px; } +.leftNav ul li.settings a span { background: url(../images/icons/dark/cog3.png) no-repeat 10px; } +.leftNav ul li.invoices a span { background: url(../images/icons/dark/money.png) no-repeat 10px; } +.leftNav ul li.transactions a span { background: url(../images/icons/dark/transfer.png) no-repeat 10px; } +.leftNav ul li.orders a span { background: url(../images/icons/dark/basket.png) no-repeat 10px; } +.leftNav ul li.contacts a span { background: url(../images/icons/dark/users.png) no-repeat 10px; } +.leftNav ul li.support a span { background: url(../images/icons/dark/dialog.png) no-repeat 10px; } +.leftNav ul li.iPlugin a span { background: url(../images/icons/dark/electroPlug.png) no-repeat 10px; } +.leftNav ul li.dash a span { background-image: url(../images/icons/dark/download.png); } +.leftNav ul li.graphs a span { background-image: url(../images/icons/dark/graph.png); } +.leftNav ul li.forms a span { background-image: url(../images/icons/dark/pencil.png); } +.leftNav ul li.gallery a span { background-image: url(../images/icons/dark/preview.png); } +.leftNav ul li.typo span { background-image: url(../images/icons/dark/create.png); } +.leftNav ul li.tables a span { background-image: url(../images/icons/dark/frames.png); } +.leftNav ul li.cal a span { background-image: url(../images/icons/dark/dayCalendar.png); } +.leftNav ul li.errors a span { background-image: url(../images/icons/dark/alert.png); } +.leftNav ul li.files a span { background-image: url(../images/icons/dark/files.png); } +.leftNav ul li.login a span { background-image: url(../images/icons/dark/user.png); } +.leftNav ul li.pic a span { background-image: url(../images/icons/dark/blocks.png); } +.leftNav ul li.widgets a span { background-image: url(../images/icons/dark/full.png); } +.leftNav ul li.contacts a span { background-image: url(../images/icons/dark/users.png); } + +.leftNav ul li a span { background-position: 10px; background-repeat: no-repeat; } + + +/* Left navigation subnav */ + +ul.sub { border: 2px solid #3c4049; border-top: none; background: url(../images/leftNavSub.png) repeat; } +ul.sub li { border-bottom: 1px dotted #d5d5d5; padding: 1px; } +ul.sub li a { background: url(../images/arrow.gif) no-repeat 8px 16px; border: none; font-family: Arial, Helvetica, sans-serif; color: #494949; font-size: 11px; padding: 8px 10px 8px 18px; } +ul.sub li a:hover, .sub li a:active { font-style: normal; border: none; color: #676767; background: url(../images/arrow.gif) no-repeat 8px 16px; } + +ul.sub li ul { border: none; border-top: 1px solid #c9c9c9; } +ul.sub li ul li { padding-left: 10px; } + + + +/* ===== Statistics ===== */ + +.stats { margin-top: 25px; } +.stats ul { } +.stats ul li { display: block; + float: left; + margin-left: 5%; + vertical-align: top; + width: 21.2%; } +.stats ul li:first-child { margin: 0; } +.stats ul li span { color: #424242; font-size: 16px; display: block; vertical-align: middle; white-space: normal; } +.count { font-size: 26px; height: 40px; display: inline-block; float: left; line-height: 41px; padding: 0 10px; -moz-box-shadow: 0 1px 0 #fff; -webkit-box-shadow: 0 1px 0 #fff; box-shadow: 0 1px 0 #fff; margin-right: 10px; } + +.stats a.blue { background: url(../images/count/blue.png) repeat-x 0 0; border: 1px solid #2e6590; color: #f7f7f7; } +.stats a.blue:hover { background-position: 0 -41px; } +.stats a.blue:active { background-position: 0 -82px; } + +.stats a.grey { background: #efefef url(../images/leftNavBg.png) repeat-x; border: 1px solid #d5d5d5; color: #b55d5c; } +.stats a.grey:hover { background: #f6f6f6; } +.stats a.grey:active { background: #f1f1f1; } + +.stats a.green { background: url(../images/count/green.png) repeat-x; border: 1px solid #19710e; color: #f7f7f7; } +.stats a.green:hover { background-position: 0 -41px; } +.stats a.green:active { background-position: 0 -82px; } + +.stats a.red { background: #efefef url(../images/count/red.png) repeat-x; border: 1px solid #7b2f2f; color: #f7f7f7; } +.stats a.red:hover { background-position: 0 -41px; } +.stats a.red:active { background-position: 0 -82px; } + + +/* ===== Right side content ===== */ + +.fc-button-prev .fc-button-content { width: 10px; background: url(../images/leftArrow.png) no-repeat 15px 13px; } +.fc-button-next .fc-button-content { width: 10px; background: url(../images/rightArrow.png) no-repeat 15px 13px; } + + + +/* ===== Right side content ===== */ + +.widget { /*width: 342px;*/ /*width: 100%;*/ margin-top: 40px; border: 1px solid #d5d5d5; display: block; background: #fafafa; clear: both; border-top: none; } +.widgetS { /*width: 342px;*/ /*width: 100%;*/ margin-top: 40px; border: 1px solid #d5d5d5; display: block; background: #fafafa; border-top: none; min-width: 25%; float: left; margin-right: 40px; } +.head { background: #efefef url(../images/leftNavBg.png) repeat-x; height: 38px; border-top: 1px solid #d5d5d5; border-bottom: 1px solid #d5d5d5; position: relative; } +.widget .head h5, .table h5 { font-weight: normal; padding: 9px 12px 9px 35px; float: left; } +.widget .body { padding: 12px 14px; } +.widget .normal h5, .accordion-close h5 { background: url(../images/aNormal.png) no-repeat 15px 15px; padding: 9px 12px 9px 32px!important } +.widget .inactive h5, .accordion-open h5 { background: url(../images/aInactive.png) no-repeat 12px 17px; padding: 9px 12px 9px 32px!important; } + +.widget .num { float: right; display: inline-block; text-align: center; margin: 9px 9px 0 0; font-size: 11px; } +.widget .num span { margin-right: 10px; } +.widget .num a { background: url(../images/ui/numDataBg.png) repeat-x; height: 19px; padding: 2px 5px; color: #fefefe; } + +.widget .num a.blueNum { background-position: 0 0; border: 1px solid #606873; } +.widget .num a.blueNum:hover { background-position: 0 -19px; } +.widget .num a.blueNum:active { background-position: 0 -38px; } + +.widget .num a.redNum { background-position: 0 -57px; border: 1px solid #9d382f; } +.widget .num a.redNum:hover { background-position: 0 -76px; } +.widget .num a.redNum:active { background-position: 0 -95px; } + +.widget .num a.greenNum { background-position: 0 -114px; border: 1px solid #218516; } +.widget .num a.greenNum:hover { background-position: 0 -133px; } +.widget .num a.greenNum:active { background-position: 0 -152px; } + +.widget .loader { float: right; margin: 14px 12px 0 0; } + +.userLink { font-size: 16px; padding-top: 3px; display: block; margin-left: 25px; white-space: nowrap; } +.userWidget { padding: 6px 12px 0 12px; display: block; float: left; } + + +/* ========== Classes for collapsing ========== */ + +.normal, .inactive { cursor: pointer; } +.normal, .accordion-close { border-bottom: none; } + +.standalone { float: left; width: 300px; margin-left: 40px; } +.standalone:first-child { margin-left: 0; } + + + +/* ===== Gallery ===== */ + +.pics { padding-bottom: 14px; margin: auto; padding: 0 6px 14px 6px; text-align: center; } +.pics ul li { display: inline-block; height: 102px; margin: 16px 6px 0 6px; border: 1px solid #d5d5d5; position: relative; } +.pics ul li:hover { border-color: #bbc1c9; } +.pics .actions { background: #000; opacity: 0.8; position: absolute; bottom: 0; right: 0; display: none; } +.pics .actions a { color: #fff; font-size: 11px; display: block; padding: 3px 4px; float: left; } +.pics .actions a:first-child { padding-right: 0; } + + + +/* ===== Tabs ===== */ + +ul.tabs { background: url(../images/leftNavBg.png) repeat-x; height: 38px; border-bottom: 1px solid #d5d5d5; border-top: 1px solid #d5d5d5; } +ul.tabs li { float: left; height: 38px; line-height: 39px; border-left: none; overflow: hidden; position: relative; border-right: 1px solid #d5d5d5; font-size: 15px; } +ul.tabs li a { text-decoration: none; display: block; padding: 0px 12px; outline: none; color: #424242; } +ul.tabs li a:hover { color: #797979; } +html ul.tabs li.activeTab { background-color: #fafafa; height: 39px; } +html ul.tabs li.activeTab a { color: #797979; } + +.tab_container { overflow: hidden; clear: both; float: left; width: 100%; } +.tab_content { padding: 10px 12px; } + +.tabsRight { position: relative; } +.tabsRight ul.tabs { float: right; background: url(../images/leftNavBg.png) repeat-x; height: 38px; border-bottom: 1px solid #d5d5d5; position: absolute; top: 0; right: 0; } +.tabsRight ul.tabs li { border-left: 1px solid #d5d5d5; border-right: none; } +.tabsRight ul.tabs li.activeTab { background-color: #fafafa; height: 38px; } + + +/* ===== Widgets ===== */ + +.twoOne { width: 50%; } +.widget, .content .title, .count, .widget .num a, a.count1, .table, .breadCrumb, .earnings, .leftNav ul li a, .listData .cNote, .pages li a, .errorPage, .btn14, .btn55, .loginPanel, .customfile { -moz-border-radius: 2px; -webkit-border-radius: 2px; -khtml-border-radius: 2px; border-radius: 2px; } + +.widgets { clear: both; } +.widgets .left { float: left; /*width: 344px;*/ width: 48%; margin-right: 4%; } +.widgets .right { float: right; /*width: 344px;*/ width: 48%; } + +.content { padding-bottom: 80px; overflow: hidden; } +.content .title { background: url(../images/darkBg.jpg) repeat-x; height: 36px; -moz-box-shadow: 0 1px 0 #fff; -webkit-box-shadow: 0 1px 0 #fff; box-shadow: 0 1px 0 #fff; } +.content .title h5 { float: left; color: #fafafa; font-weight: normal; display: block; padding: 7px 15px; } + + +/* Support ticket and Latest orders */ +.supTicket { background: url(../images/linesSep.png) 0 0 repeat-x; padding: 12px 12px 15px 12px; } +.supTicket .issueType { color: #515e70; clear: both; font-weight: bold; background: url(../images/dashed.png) repeat-x 0; } +.supTicket .issueType .issueInfo { float: left; display: block; background: #fafafa; padding-right: 5px; } +.supTicket .issueType .issueNum { float: right; display: block; background: #fafafa; padding-left: 5px; padding-right: 1px; } + +.issueSummary { clear: both; padding-top: 14px; } +.issueSummary img { border: 1px solid #d5d5d5; } + +.ticketInfo ul { float: left; width: 100%; margin-bottom: -6px; } +.ticketInfo ul li { width: 50%; margin-top: -2px; display: inline-block; float: left; margin-bottom: 6px; padding: 0; } +.ticketInfo ul li.even { text-align: right; } +.ticketInfo { margin-top: -3px; margin-bottom: -11px; margin-left: 50px; } + + +/* User */ +.userSummary { background: url(../images/linesSep.png) 0 100% repeat-x; } +.userSummary ul { } +.userSummary ul li { width: 127px; display: block; float: left; margin-bottom: 12px; margin-top: -1px; } +.userSummary ul li.even { text-align: right; } + +.userSummary .infoLeft { width: 153px; float: left; } +.userSummary .infoLeft div, .userSummary .infoRight div { padding-top: 12px; } +.userSummary .infoLeft div:first-child, .userSummary .infoRight div:first-child { padding: 0; } + +.userSummary .infoRight { width: 153px; float: right; text-align: right; } + +.userAlt { padding: 0 12px; background: url(../images/leftNavBg.png) repeat-x; } +.userAlt img { float: left; display: block; margin: 4px 8px 0 0; } +.userEmail { display: block; white-space: nowrap; } +.botRow span { float: left; display: block; margin-right: 10px; } + +#eq span { height: 120px; float: left; margin-right: 30px; display: block; } + +/* Search */ +.searchWidget { position: relative; margin-top: 40px; } +.searchWidget input[type=text] { background: #fafafa; border: 1px solid #d5d5d5; padding: 10px; width: 100%; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } +.searchWidget input[type=submit] { background: url(../images/searchBtn.png) no-repeat 0 0; position: absolute; top: 0; right: 0; border: none; width: 36px; height: 36px; } + +/* Website stats */ +.webStatsLink { font-size: 16px; color: #B55D5C; font-weight: bold; } +.statPlus, .statMinus { padding-left: 12px; font-size: 12px; } +.statPlus { color: #549332; background: url(../images/topArrow.png) no-repeat 0 3px; } +.statMinus { color: #B55D5C; background: url(../images/botArrow.png) no-repeat 0 3px; } + +/* Accordion */ +.menu_body { display: none; padding: 12px 14px; } +.acc .head { margin-bottom: -1px; cursor: pointer; } +.acc .head h5 { padding: 9px 14px; } + + + + +/* ===== Flot ===== */ + +.chart, .autoUpdate, .bars { height: 220px; z-index: 90; margin: 10px 0 0 0; max-width: 100%; } +.pieWidget { width: 100%; height: 316px; margin: 0 auto; } + + + +/* ===== Footer ===== */ + +#footer { clear: both; /*height: 36px;*/ background: url(../images/topNav.jpg) repeat; width: 100%; color: #eeeeee; margin-top: 42px; position: absolute; bottom: 0; } +#footer span { color: #696969; padding: 9px 5px; display: block; font-size: 11px; } +#footer span a { color: #eeeeee; } + + + +/* ===== Table ===== */ + +.tableStatic thead td { padding: 3px 0 2px 0; text-align: center; border-left: 1px solid #D5D5D5; background: #efefef url(../images/leftNavBg.png) repeat-x; border-bottom: 1px solid #D5D5D5; font-size: 11px; color: #878787; } +.tableStatic thead td:first-child { border-left: none; } + +.tableStatic tbody tr { border-top: 1px solid #e7e7e7; } +.tableStatic tbody tr:nth-child(even) { background-color:#f5f5f5; } + +.tableStatic tbody td { border-left: 1px solid #e7e7e7; padding: 8px 10px; vertical-align: middle; } +.tableStatic tbody td:first-child { border-left: none; } + + + +/* ===== Forms ===== */ + +.mainForm label { margin-right: 15px; display: block; float: left; padding: 4px 10px; } + +.datepicker { width: 58px!important; cursor: pointer; } +.colorpick { width: 58px!important; float: left; cursor: pointer; } +.pick { width: 16px; height: 16px; float: left; background: url(../images/color.png) no-repeat 0; margin: 2px 5px; cursor: pointer; padding: 4px 0!important; } +.colorP { position: relative; width: 58px; } + +.multiple { width: 100%; height: 200px; padding: 5px; border: 1px solid #d5d5d5; } + +.sliderSpecs label { padding: 0!important; font-size: 11px; line-height: 14px; } +.sliderSpecs input { float: left; width: auto!important; background: none!important; border: 0!important; font-weight: bold; color: #3a6fa5; padding: 0!important; margin-left: 10px; } + + +.moreFields ul li { float: left; width: 8%; margin: 0; } +.moreFields ul li.sep { padding: 3px 5px 3px 6px; display: block; margin: 0; width: auto; color: #d5d5d5; } +.moreFields ul li span { display: block; padding: 3px 12px; white-space: nowrap; } +.moreFields ul li div.selector span {padding: 0} +.itemDisabled { color: #b7b7b7; } + +.rowElem { clear: both; border-top: 1px solid #e7e7e7; padding: 10px 16px; position: relative; } + +.formRight { float: right; width: 76%; margin: 12px 0; display: block; position: relative; } +.formRight label, .loginRow label { cursor: pointer; } +.formBottom { /*width: 688px;*/ margin: 12px 12px 12px 0; } +.rowElem > label { padding: 15px 0; width: 14%; } +.rowElem .topLabel { padding: 5px 12px 12px 0; width: 100%; } + +#valid input { position: relative; } + + + +/* ===== Form styling ===== */ + +.mainForm input[type=text], .mainForm textarea, .mainForm input[type=password], .mainForm input[type=email] { background: #fff; width: 100%; border: 1px solid #d5d5d5; padding: 5px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } +.mainForm input[type=text]:hover, .mainForm input[type=password]:hover, .mainForm textarea:hover { background: #fcfcfc; border: 1px solid #d1d1d1; } +.mainForm input[type=text]:focus, .mainForm input[type=password]:focus, .mainForm textarea:focus { border: 1px solid #bbc1c9; background: #fff; } + +.submitForm { float: right; margin: 1px 16px 22px 16px; } + + +/* Select */ + +div.selector { position: relative; height: 26px; background: url(../images/chosenSelect.png) repeat-x; float: left; width: 190px; position: relative; padding-left: 10px; border: 1px solid #D5D5D5; } +div.selector span { width: 190px; cursor: pointer; position: absolute; right: -1px; height: 26px; background: url(../images/forms/select_right.png) no-repeat center right; top: 0px; line-height: 27px; font-size: 11px; } +div.selector select { width: 202px; cursor: pointer; font-size: 12px; position: absolute; height: 26px; top: 2px; left: -1px; } + +li div.selector { padding-left: 13px; } +li div.selector span { top: -3px; } + +.dataTables_length div.selector { width: 45px; float: left; height: 20px; padding-left: 8px; } +.dataTables_length div.selector span { width: 45px; height: 22px; background: url(../images/forms/select_right_datatable.png) no-repeat center right; line-height: 22px; top: -1px; } +.dataTables_length div.selector select { width: 65px; left: -5px; height: 22px; } + + +/* Checker */ + +div.checker { width: 15px; height: 15px; position: relative; float: left; margin-top: 6px; } +div.checker input { width: 15px; height: 15px; opacity: 0; filter: alpha(opacity:0); display: inline-block; background: none; } +div.checker span { background: transparent url(../images/forms/checkbox.png) no-repeat 0 0px ; vertical-align: middle; height: 15px; width: 15px; display: -moz-inline-box; display: inline-block; text-align: center; } +div.checker span.checked { background-position: center bottom; } + + +/* Radio */ + +div.radio { width: 18px; height: 18px; position: relative; float: left; margin-top: 5px; } +div.radio input { opacity: 0; filter: alpha(opacity:0); text-align: center; display: inline-block; background: none; width: 18px; height: 18px; } +div.radio span { background: transparent url(../images/forms/radio.png) no-repeat 0 0; vertical-align: middle; height: 15px; width: 15px; display: block; display: -moz-inline-box; display: inline-block; text-align: center; } +div.radio span.checked { background-position: center bottom; } + + +/* Uploader */ + +div.uploader { width: 240px; position: relative; overflow: hidden; border: 1px solid #d5d5d5; background: white; padding: 2px 2px 2px 8px; } +div.uploader span.action { width: 22px; background: #fff url(../images/addFiles.png) no-repeat 0 0; height: 22px; font-size: 11px; font-weight: bold; cursor: pointer; float: right; text-indent: -9999px; display: inline; overflow: hidden; cursor: pointer; } +div.uploader:hover span.action { background-position: 0 -27px; } +div.uploader:active span.action { background-position: 0 -54px; } +div.uploader span.filename { color: #777; max-width: 200px; font-size: 11px; line-height: 22px; float: left; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: default; } +div.uploader input { width: 266px; opacity: 0; filter: alpha(opacity:0); position: absolute; top: 0; right: 0; bottom: 0; float: right; height: 26px; border: none; cursor: pointer; } +.uploader { display: -moz-inline-box; display: inline-block; vertical-align: middle; zoom: 1; *display: inline; } + + + + +/* ===== List styles ===== */ + +.list { } +.list .legend { display: block; font-weight: bold; padding-bottom: 4px; } +.list ul li { padding: 0 0 0 15px; } + +.plusBlue li { background: url(../images/icons/lists/plusBlue.png) no-repeat 0 7px; } +.plusRed li { background: url(../images/icons/lists/plusRed.png) no-repeat 0 7px; } +.plusGrey li { background: url(../images/icons/lists/plusGrey.png) no-repeat 0 7px; } +.plusGreen li { background: url(../images/icons/lists/plusGreen.png) no-repeat 0 7px; } + +.tipBlue ul li { background: url(../images/icons/lists/tipBlue.png) no-repeat 0 6px; } +.tipRed ul li { background: url(../images/icons/lists/tipRed.png) no-repeat 0 6px; } +.tipGrey ul li { background: url(../images/icons/lists/tipGrey.png) no-repeat 0 6px; } +.tipGreen ul li { background: url(../images/icons/lists/tipGreen.png) no-repeat 0 6px; } + +.arrowBlue ul li { background: url(../images/icons/lists/arrowBlue.png) no-repeat 1px 6px; } +.arrowRed ul li { background: url(../images/icons/lists/arrowRed.png) no-repeat 1px 6px; } +.arrowGrey ul li { background: url(../images/icons/lists/arrowGrey.png) no-repeat 1px 6px; } +.arrowGreen ul li { background: url(../images/icons/lists/arrowGreen.png) no-repeat 1px 6px; } + +.arrow2Blue ul li { background: url(../images/icons/lists/arrow2Blue.png) no-repeat 1px 6px; } +.arrow2Red ul li { background: url(../images/icons/lists/arrow2Red.png) no-repeat 1px 6px; } +.arrow2Grey ul li { background: url(../images/icons/lists/arrow2Grey.png) no-repeat 1px 6px; } +.arrow2Green ul li { background: url(../images/icons/lists/arrow2Green.png) no-repeat 1px 6px; } + + + +/* ===== Tooltip ===== */ + +.tipsy { padding: 4px; font-size: 10px; opacity: 0.8; filter: alpha(opacity=80); background-repeat: no-repeat; background-image: url(../images/tipsy.gif); } +.tipsy-inner { padding: 2px 8px 2px 8px; background-color: black; color: white; max-width: 200px; text-align: center; } +.tipsy-inner { -moz-border-radius:3px; -webkit-border-radius:3px; } +.tipsy-north { background-position: top center; } +.tipsy-south { background-position: bottom center; } +.tipsy-east { background-position: right center; } +.tipsy-west { background-position: left center; } + + + +/* ===== Notification messages ===== */ + +.nNote { cursor: pointer; clear: both; margin: 20px 0px 20px 0px; } +.nNote strong { margin-right: 5px; } +.nNote p { font-size: 11px; padding: 10px 25px 10px 54px; margin: 0px; color: #565656; } +.nMessage p { font-size: 11px; } +.nWarning { background: #ffe9ad url(../images/icons/notifications/error.png) no-repeat 15px center; border: 1px solid #eac572; color: #826200; } +.nSuccess { background: #effeb9 url(../images/icons/notifications/accept.png) no-repeat 15px center; border: 1px solid #c1d779; color: #3C5A01; } +.nFailure { background: #fccac1 url(../images/icons/notifications/exclamation.png) no-repeat 15px center; border: 1px solid #e18b7c; color: #AC260F; } +.nInformation { background: #d1e4f3 url(../images/icons/notifications/information.png) no-repeat 15px center; border: 1px solid #99c4ea; color: #235685; } +.nLightbulb { background: #FEF0CB url(../images/icons/notifications/lightbulb.png) no-repeat 15px center; border: 1px solid #D3A350; color: #835F21; } +.nMessages { background: #9DDFFF url(../images/icons/notifications/email.png) no-repeat 15px center; border: 1px solid #42B4FF; color: #835F21; } + + + +/* ===== Dynamic table headers ===== */ + +.table { margin-top: 40px; border: 1px solid #d5d5d5; border-top: none; } +.headTitle { background: #efefef url(../images/leftNavBg.png) repeat-x; height: 37px; border-bottom: 1px solid #d5d5d5; } + + + +/* ===== Spinner ===== */ + +.ui-spinner { width: 10em; display: block; position: relative; overflow: hidden; border: 1px solid #D5D5D5; background: url(../images/forms/spinnerBg.png) repeat-x top left!important; height: 25px; padding: 0 6px; } +.ui-spinner-disabled { background: #F4F4F4; color: #CCC; } +.ui-spinner input.ui-spinner-box { border: none!important; background: none!important; padding: 6px 0; } +.ui-spinner-up, .ui-spinner-down { width: 18px; padding: 0; margin: 0; z-index: 100; position: absolute; right: 0; cursor: default; border: none; } +.ui-spinner-up { background: url(../images/forms/spinnerTop.png) no-repeat; height: 13px; top: 0; } +.ui-spinner-down { height: 12px; bottom: 0px; background: url(../images/forms/spinnerBottom.png) no-repeat; } +.ui-spinner-pressed { } +.ui-spinner-list, .ui-spinner-listitem { margin: 0; padding: 0; font-size: 11px; } +.ui-spinner ul li, .ui-spinner-data { line-height: 25px; height: 25px; } + + + +/* ===== Growl notifications ===== */ + +div.jGrowl { z-index: 9999; color: #fff; font-size: 12px; } +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +div.jGrowl { position: absolute; } +body > div.jGrowl { position: fixed; } +div.jGrowl.top-left { left: 0px; top: 0px; } +div.jGrowl.top-right { right: 0px; top: 36px; } +div.jGrowl.bottom-left { left: 0px; bottom: 0px; } +div.jGrowl.bottom-right { right: 0px; bottom: 0px; } +div.jGrowl.center { top: 0px; width: 50%; left: 25%; } + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { margin-left: auto; margin-right: auto; } +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: black; + opacity: .85; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-family: Tahoma,Arial,Helvetica,sans-serif; + font-size: 1em; + text-align: left; + display: none; +} + +div.jGrowl div.jGrowl-notification { min-height: 40px; } +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { margin: 10px; } +div.jGrowl div.jGrowl-notification div.jGrowl-header { font-weight: bold; font-size: .85em; } +div.jGrowl div.jGrowl-notification div.jGrowl-close { z-index: 99; float: right; font-weight: bold; font-size: 1em; cursor: pointer; } +div.jGrowl div.jGrowl-closer { padding-top: 4px; padding-bottom: 4px; cursor: pointer; font-size: .9em; font-weight: bold; text-align: center; } + +/** Hide jGrowl when printing **/ +@media print { div.jGrowl { display: none; } } + + + +/* ===== Page scrolling ===== */ + +#toTop { display:none; text-decoration:none; position:fixed; bottom:10px; right:10px; overflow:hidden; width:21px; height:21px; border:none; text-indent:-999px; background:url(../images/ui.totop.png) no-repeat left top; } +#toTopHover { background:url(../images/ui.totop.png) no-repeat left -22px; width:21px; height:21px; display:block; overflow:hidden; float:left; opacity: 0; -moz-opacity: 0; filter:alpha(opacity=0); } +#toTop:active, #toTop:focus { outline:none; } + + + +/* ===== Contact list ===== */ + +.listNav { margin:0 0 10px; } + +.ln-letters { overflow: hidden; width: 100%; margin-top: -1px; text-align: center; } +.ln-letters a { font-size: 11px; display: inline-block; padding: 4px 1%; border: 1px solid #D5D5D5; margin-right: -1px; text-decoration: none; background: #EFEFEF url(../images/leftNavBg.png) repeat-x; } + +ul.listData { float: right; text-align: right; margin-top: -1px; font-size: 11px; } +ul.listData li { display: inline-block; padding: 0 6px 1px 6px!important; border: none!important; margin-left: 6px } +.listData .cNote { background: #FAFAFA; display: block; padding: 0 6px; border: 1px solid #D5D5D5; color: #878787; } + +.ln-letters a.ln-last { } +.ln-letters a:first-child { } +.ln-letters a:hover, +.ln-letters a.ln-selected { background:#eaeaea; } +.ln-letters a.ln-disabled { color:#ccc; } +.ln-letter-count { text-align:center; font-size:0.8em; line-height:1; margin-bottom:3px; color:#336699; } + +#myList > li { padding: 8px 0 8px 12px; border-top: 1px solid #ebebeb; } +#myList > li:hover { background: #fff; } +#myList > li:first-child { padding-top: 8px; } + + + +/* ===== PRE tag styles ===== */ + +.SRC_Wrap { height:auto; font-size:12px; } +.SRC_Title { text-align:center; color:#555; border-bottom:2px solid #999; font-size:14px; font-family:Verdana, Geneva, sans-serif; padding:5px; font-weight:700; } +.SRC_Line { width:100%; background-color:#fafafa; min-height:28px; line-height: 28px; } +.SRC_Line:nth-child(even) { background-color:#f5f5f5; } +.SRC_NumBox { width:5%; float:left; } +.SRC_Num { font-family: Verdana, Geneva, sans-serif; font-size: 12px; text-align:right; color:#555; font-weight:500; padding-right:2px; width:100%; height:auto; min-height:28px; line-height:28px; } +.SRC_CodeContent { white-space: pre-wrap; border-left:1px solid #d5d5d5; font-size:12px; padding-left:6px; font-family:"Courier New", Courier, monospace; margin:0px; min-height:28px; line-height:28px; } +.SRC_NumContent { text-align:right; margin-right:4px; color:#555; } +.SRC_CodeBox { float:left; width:95%; } + +.SC_blue { color: blue; } +.SC_grey { color: grey; } +.SC_navy { color: navy; } +.SC_green { color: green; } +.SC_orange { color: #930; } +.SC_red { color: #F00; } +.SC_teal { color: teal; } +.SC_gold { color: #FC0; } +.SC_pink { color: #ff68a4; } +.SC_bold { font-weight: 700; } + + + +/* ===== Breadcrumbs ===== */ + +.module:after { clear: both; content: "."; display: block; height: 0; visibility: hidden; } +* html .module { height: 1%; overflow: visible; } +* + html .module { min-height: 1%; } + +.breadCrumbHolder.module { border: solid 1px #D5D5D5; background: #FAFAFA; margin-top: 20px; } +.breadCrumb { float: left; display: block; height: 21px; overflow: hidden; width: 100%; padding: 5px; } +.breadCrumb ul { margin: 0; padding: 0; height: 21px; display: block; } +.breadCrumb ul li { display: block; float: left; position: relative; height: 21px; overflow: hidden; line-height: 21px; margin: 0px 6px 0px 0; padding: 0px 12px 0px 2px; font-size: .9167em; background: url(../images/Chevron.gif) no-repeat 100% 0; } +.breadCrumb ul li div.chevronOverlay { position: absolute; right: 0; top: 0; z-index: 2; } +.breadCrumb ul li span { display: block; overflow: hidden; } +.breadCrumb ul li a { display: block; position: relative; height: 21px; line-height: 21px; overflow: hidden; float: left; } +.breadCrumb ul li.firstB a { height: 16px !important; text-indent:-1000em; width:16px; padding: 0; margin-top: 2px; overflow: hidden; background:url(../images/IconHome.gif) no-repeat 0 0; } +.breadCrumb ul li.firstB a:hover { background-position: 0 -16px; } +.breadCrumb ul li.lastB { background: none; margin-right: 0; padding-right: 0; } + +.chevronOverlay { display: none; background: url(../images/ChevronOverlay.png) no-repeat 100% 0; width: 13px; height: 20px; } + + + +/* ===== Form validation ===== */ + +.inputContainer { position: relative; float: left; } +.formError { position: absolute; top: 300px; left: 280px; display: block; z-index: 500; cursor: pointer; } +.ajaxSubmit { padding: 20px; background: #55ea55; border: 1px solid #999; display: none; } + +.formError .formErrorContent { background: #202020; position:relative; z-index:5001; color: #fff; width: 160px; font-size: 11px; border: 1px solid #000; padding: 4px 10px 4px 10px; border-radius: 2px; -moz-border-radius: 2px; -webkit-border-radius: 2px; } +.greenPopup .formErrorContent { background: #33be40; } +.blackPopup .formErrorContent { background: #393939; color: #FFF; } +.formError .formErrorArrow { width: 15px; margin: -2px 0 0 13px; position:relative; z-index: 5006; } +.formError .formErrorArrowBottom { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; margin: 0px 0 0 12px; top:2px; } +.formError .formErrorArrow div { font-size: 0px; height: 1px; background: #202020; margin: 0 auto; line-height: 0; font-size: 0; display: block; } +.formError .formErrorArrowBottom div { box-shadow: none; -moz-box-shadow: none; -webkit-box-shadow: none; } + +.greenPopup .formErrorArrow div { background: #33be40; } +.blackPopup .formErrorArrow div { background: #393939; color: #FFF; } + +.formError .formErrorArrow .line10 { width: 15px; border: none; } +.formError .formErrorArrow .line9 { width: 13px; border: none; } +.formError .formErrorArrow .line8 { width: 11px; } +.formError .formErrorArrow .line7 { width: 9px; } +.formError .formErrorArrow .line6 { width: 7px; } +.formError .formErrorArrow .line5 { width: 5px; } +.formError .formErrorArrow .line4 { width: 3px; } +.formError .formErrorArrow .line3 { width: 1px; border-left: 2px solid #ddd; border-right: 2px solid #ddd; border-bottom: 0 solid #ddd; } +.formError .formErrorArrow .line2 { width: 3px; border: none; background: #ddd; } +.formError .formErrorArrow .line1 { width: 1px; border: none; background: #ddd; } + + + +/* ===== Color picker ===== */ + +.colorpicker { width: 356px; height: 176px; overflow: hidden; position: absolute; background: url(../images/colorPicker/colorpicker_background.png); font-family: Arial, Helvetica, sans-serif; display: none; } +.colorpicker_color { width: 150px; height: 150px; left: 14px; top: 13px; position: absolute; background: #f00; overflow: hidden; cursor: crosshair; } +.colorpicker_color div { position: absolute; top: 0; left: 0; width: 150px; height: 150px; background: url(../images/colorPicker/colorpicker_overlay.png); } +.colorpicker_color div div { position: absolute; top: 0; left: 0; width: 11px; height: 11px; overflow: hidden; background: url(../images/colorPicker/colorpicker_select.gif); margin: -5px 0 0 -5px; } +.colorpicker_hue { position: absolute; top: 13px; left: 171px; width: 35px; height: 150px; cursor: n-resize; } +.colorpicker_hue div { position: absolute; width: 35px; height: 9px; overflow: hidden; background: url(../images/colorPicker/colorpicker_indic.gif) left top; margin: -4px 0 0 0; left: 0px; } +.colorpicker_new_color { position: absolute; width: 60px; height: 30px; left: 213px; top: 13px; background: #f00; } +.colorpicker_current_color { position: absolute; width: 60px; height: 30px; left: 283px; top: 13px; background: #f00; } +.colorpicker input { background-color: transparent; border: 1px solid transparent; position: absolute; font-size: 10px; font-family: Arial, Helvetica, sans-serif; color: #898989; top: 4px; right: 11px; text-align: right; margin: 0; padding: 0; height: 11px; } +.colorpicker_hex { position: absolute; width: 72px; height: 22px; background: url(../images/colorPicker/colorpicker_hex.png) top; left: 212px; top: 142px; } +.colorpicker_hex input { right: 6px; } + +.colorpicker_field { height: 22px; width: 62px; background-position: top; position: absolute; } +.colorpicker_field span { position: absolute; width: 12px; height: 22px; overflow: hidden; top: 0; right: 0; cursor: n-resize; } + +.colorpicker_rgb_r { background-image: url(../images/colorPicker/colorpicker_rgb_r.png); top: 52px; left: 212px; } +.colorpicker_rgb_g { background-image: url(../images/colorPicker/colorpicker_rgb_g.png); top: 82px; left: 212px; } +.colorpicker_rgb_b { background-image: url(../images/colorPicker/colorpicker_rgb_b.png); top: 112px; left: 212px; } + +.colorpicker_hsb_h { background-image: url(../images/colorPicker/colorpicker_hsb_h.png); top: 52px; left: 282px; } +.colorpicker_hsb_s { background-image: url(../images/colorPicker/colorpicker_hsb_s.png); top: 82px; left: 282px; } +.colorpicker_hsb_b { background-image: url(../images/colorPicker/colorpicker_hsb_b.png); top: 112px; left: 282px; } + +.colorpicker_submit { position: absolute; width: 22px; height: 22px; background: url(../images/colorPicker/colorpicker_submit.png) top; left: 322px; top: 142px; overflow: hidden; } +.colorpicker_focus { background-position: center; } +.colorpicker_hex.colorpicker_focus { background-position: bottom; } +.colorpicker_submit.colorpicker_focus { background-position: bottom; } +.colorpicker_slider { background-position: bottom; } + +#colorSelector { position: relative; width: 36px; height: 36px; background: url(../images/colorPicker/select.png); } +#colorSelector div { position: absolute; top: 3px; left: 3px; width: 30px; height: 30px; background: url(../images/colorPicker/select.png) center; } +#colorSelector2 { position: absolute; top: 0; left: 0; width: 36px; height: 36px; background: url(../images/colorPicker/select2.png); } +#colorSelector2 div { position: absolute; top: 4px; left: 4px; width: 28px; height: 28px; background: url(../images/colorPicker/select2.png) center; } +#colorpickerHolder2 { top: 32px; left: 0; width: 356px; height: 0; overflow: hidden; position: absolute; } +#colorpickerHolder2 .colorpicker { background-image: url(../images/colorPicker/custom_background.png); position: absolute; bottom: 0; left: 0; } +#colorpickerHolder2 .colorpicker_hue div { background-image: url(../images/colorPicker/custom_indic.gif); } +#colorpickerHolder2 .colorpicker_hex { background-image: url(../images/colorPicker/custom_hex.png); } +#colorpickerHolder2 .colorpicker_rgb_r { background-image: url(../images/colorPicker/custom_rgb_r.png); } +#colorpickerHolder2 .colorpicker_rgb_g { background-image: url(../images/colorPicker/custom_rgb_g.png); } +#colorpickerHolder2 .colorpicker_rgb_b { background-image: url(../images/colorPicker/custom_rgb_b.png); } +#colorpickerHolder2 .colorpicker_hsb_s { background-image: url(../images/colorPicker/custom_hsb_s.png); display: none; } +#colorpickerHolder2 .colorpicker_hsb_h { background-image: url(../images/colorPicker/custom_hsb_h.png); display: none; } +#colorpickerHolder2 .colorpicker_hsb_b { background-image: url(../images/colorPicker/custom_hsb_b.png); display: none; } +#colorpickerHolder2 .colorpicker_submit { background-image: url(../images/colorPicker/custom_submit.png); } +#colorpickerHolder2 .colorpicker input { color: #778398; } +#customWidget { position: relative; height: 36px; } + + + +#popup_container { min-width: 300px; max-width: 600px; background: url(../images/alertOpacityOverlay.png) repeat; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; max-height:101%; top:0; } +#popup_title { text-align: center; background: url(../images/leftNavBg.png) repeat-x; border-bottom: 1px solid #d5d5d5; cursor: default; padding: 9px 0 9px 0px; margin: 0em; height: 20px; } +#popup_content { background: #fafafa; padding: 1em 1.75em; margin: 0em; } +#popup_message { text-align: center; } +#popup_panel { text-align: center; margin: 1em 0em 0em 0em; } +#popup_message input[type=text] { background: #FCFCFC; border: 1px solid #D1D1D1; padding: 5px; width: 258px; } +#popup_prompt { margin: .5em 0em; } + + +#suspend_popup { min-width: 300px; max-width: 600px; background: url(../images/alertOpacityOverlay.png) repeat; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; max-height:101%; top:0; } +#suspend_popup_title { text-align: center; background: url(../images/leftNavBg.png) repeat-x; border-bottom: 1px solid #d5d5d5; cursor: default; padding: 9px 0 9px 0px; margin: 0em; height: 20px; } +#suspend_popup_content { background: #fafafa; padding: 1em 1.75em; margin: 0em; } +#suspend_popup_message { text-align: center; } +#suspend_popup_message .item { text-align: left; } +#suspend_popup_message .item input { width: auto; } +#suspend_popup_panel { text-align: center; margin: 1em 0em 0em 0em; } +#suspend_popup_prompt { margin: .5em 0em; } +#suspend_popup_panel #popup_ok, #suspend_popup_panel #popup_cancel { width: auto; } + +#help_popup { min-width: 300px; max-width: 600px; background: url(../images/alertOpacityOverlay.png) repeat; -moz-border-radius: 5px; -webkit-border-radius: 5px; border-radius: 5px; max-height:101%; top:0; } +#help_popup_title { text-align: center; background: url(../images/leftNavBg.png) repeat-x; border-bottom: 1px solid #d5d5d5; cursor: default; padding: 9px 0 9px 0px; margin: 0em; height: 20px; } +#help_popup_content { background: #fafafa; padding: 1em 1.75em; margin: 0em; } +#help_popup_message { text-align: center; } +#help_popup_message .item { text-align: left; } +#help_popup_message .item input { width: auto; } +#help_popup_panel { text-align: center; margin: 1em 0em 0em 0em; } +#help_popup_prompt { margin: .5em 0em; } +#help_popup_panel #popup_ok, #help_popup_panel #popup_cancel { width: auto; } + + + +/* ===== Error pages ===== */ + +.errorPage { width: 370px; margin: 100px auto 80px auto; position: relative; } +.errorPage .errorTitle, .weAreOff { background: url(../images/linesSep.png) repeat-x 0 100%; width: 290px; padding-bottom: 15px; } +.weAreOff { width: 100% } +.errorPage h1 { color: #404040; font-size: 140px; margin: 80px 0; position: relative; padding-left: 10px; } +.errorPage h2 { font-size: 22px; font-weight: normal; } +.errorPage h2 span { background: url(../images/sadEmo.png) no-repeat 0; padding-left: 26px; } +.errorPage .bubbles { position: absolute; background: url(../images/error.png) no-repeat 0 0; width: 138px; height: 133px; top: -10px; left: 225px; } +.errorPage p { width: 100%; padding: 13px 0; background: url(../images/linesSep.png) repeat-x 0 0; font-size: 20px; text-align: center; } +.backToDash { text-align: center; margin: 10px; } + + + +/* ===== File uploader ===== */ + +.plupload_button { font-size: 10px; font-weight: bold; text-transform: uppercase; color: #fff; line-height: 12px; margin-top: 3px; } + +.plupload_start { float: left; background: url(../images/ui/greenBtn.png) repeat-x 0 0; border: 1px solid #418d4f; } +.plupload_start span { background: url(../images/upload.png) no-repeat 10px; padding: 5px 13px 6px 26px; display: block; } +.plupload_start:hover { background-position: 0 -25px; } +.plupload_start:active { background-position: 0 -50px; } + +.plupload_disabled, a.plupload_disabled:hover { color: #a6a6a6; border: 1px solid #e9e9e9; background: url(../images/ui/uploadDisabled.png) repeat-x; cursor: default; } +.plupload_disabled span { padding: 5px 13px 6px 13px; } + +.plupload_add { margin-right: 10px; background: url(../images/ui/greyishBtn.png) repeat-x 0 0; border: 1px solid #4F5A68; float: left; } +.plupload_add span { background: url(../images/add.png) no-repeat 10px; padding: 5px 13px 6px 26px; display: block; } +.plupload_add:hover { background-position: 0 -25px; } +.plupload_add:active { background-position: 0 -50px; } + +.plupload_wrapper { font-size: 11px;; width: 100%; } + +.plupload_container { } +.plupload_container input { border: 1px solid #DDD; font-size: 11px; width: 98%; } + +.plupload_filelist { margin: 0; padding: 0; list-style: none; } +.plupload_scroll .plupload_filelist { height: 185px; background: #fafafa; overflow-y: scroll; } +.plupload_filelist li { padding: 10px 12px; background: whiteSmoke; border-bottom: 1px solid #E7E7E7; } +.plupload_filelist li:hover { background: #fdfdfd; } + +.plupload_filelist_header, .plupload_filelist_footer { background: #EFEFEF url(../images/leftNavBg.png) repeat-x; padding: 3px 12px; color: #878787; } +.plupload_filelist_header { border-bottom: 1px solid #d5d5d5; } + +.plupload_filelist_footer { border-top: 1px solid #D5D5D5; height: 31px; line-height: 30px; vertical-align: middle; } +.plupload_file_name { float: left; overflow: hidden; } +.plupload_file_status { color: #777; } +.plupload_file_status span {} +.plupload_file_size, .plupload_file_status, .plupload_progress { float: right; width: 80px; } +.plupload_file_size, .plupload_file_status, .plupload_file_action { text-align: right; } +.plupload_filelist .plupload_file_name { width: 205px; } +.plupload_file_action { float: right; width: 14px; margin-top: 3px; height: 14px; margin-left: 15px; } +.plupload_file_action * { display: none; width: 14px; height: 14px; } + +li.plupload_uploading { } +li.plupload_done { color: #AAA; } +li.plupload_delete a { background: url(../images/uploader/deleteFile.png) no-repeat 0; } +li.plupload_failed a { background: url(../images/uploader/error.png) no-repeat 0; cursor: default; } +li.plupload_done a { background: url(../images/uploader/uploaded.png) no-repeat 0; cursor: default; } + +.plupload_progress, .plupload_upload_status { display: none; } +.plupload_progress_container { margin-top: 10px; border: 1px solid #CCC; background: #FFF; padding: 1px; } +.plupload_progress_bar { width: 0px; height: 7px; background: #CDEB8B; } +.plupload_scroll .plupload_filelist_header .plupload_file_action, .plupload_scroll .plupload_filelist_footer .plupload_file_action { margin-right: 17px; } + +/* Floats */ + +.plupload_clear,.plupload_clearer { clear: both; } +.plupload_clearer, .plupload_progress_bar { display: block; font-size: 0; line-height: 0; } + +li.plupload_droptext { background: transparent; text-align: center; vertical-align: middle; border: 0; line-height: 165px; } + + + +/* ===== Wizard ===== */ + +.swMain { position: relative; } +.swMain .stepContainer { display: block; position: relative; overflow: hidden; clear: both; } +.swMain .stepContainer div.wContent { display:block; position: absolute; float:left; margin: 0; text-align:left; overflow:visible; z-index:88; clear:both; width: 100%; } +.swMain .stepContainer div.wContent p { padding: 12px; } + +.swMain div.actionBar { display: block; position: relative; clear: both; padding: 0; color: #5A5655; height: 41px; text-align:left; overflow:auto; z-index:88; left:0; background: #efefef url(../images/leftNavBg.png) repeat-x; border-top: 1px solid #d5d5d5; } +.actionBar a.button { box-shadow: none; } + +.swMain .stepContainer .StepTitle { display: block; position: relative; margin: 0; border: 1px solid #E0E0E0; padding: 5px; color: #5A5655; clear: both; text-align: left; z-index: 88; } + +.swMain ul.anchor { position: relative; display: block; float: left; list-style: none; padding: 0px; clear: both; border-top: 1px solid #d5d5d5; border-bottom: 1px solid #d5d5d5; width: 100%; } +.swMain ul.anchor li { position: relative; display: block; margin: 0; padding: 0; float: left; width: 25%; } +.swMain ul.anchor li:first-child { border-left: none; } +.swMain ul.anchor li a { display: block; position: relative; float: left; margin: 0; height: 38px; width: 100%; text-decoration: none; outline-style: none; z-index: 99; cursor: pointer; background: url(../images/leftNavBg.png) repeat-x; border-left: 1px solid #D5D5D5; } +.swMain ul.anchor li:first-child a { border-left: none; } +.swMain ul.anchor li a .stepNumber { position:relative; float:left; width:30px; text-align: center; padding:5px; padding-top:0; } +.swMain ul.anchor li a .stepDesc { position:relative; display:block; float:left; text-align: left; padding: 8px 12px 8px 35px; white-space: nowrap; } +.swMain ul.anchor li a.selected { color: #3581c1; background: #fafafa; } +.swMain ul.anchor li a.done { position: relative; color: #aaaaaa; z-index: 99; background: #efefef; } +.swMain ul.anchor li a.done:hover { color:#5A5655; } +.swMain ul.anchor li a.disabled { color: #424242; cursor: text; } +.swMain ul.anchor li a.error { color:#6c6c6c !important; border: 1px solid #fb3500 !important; } +.swMain ul.anchor li a.error:hover { color:#000 !important; } + +.swMain .buttonNext { display:block; float:right; margin: 8px 12px 0 12px; padding: 6px 12px; } +.swMain .buttonDisabled { color: #D5D5D5!important; cursor: text; background: #F1F1F1!important; margin-top: 8px!important; border: 1px solid #E1E1E1; } +.swMain .buttonPrevious { display:block; float:right; margin: 8px 0px 0 0px; padding: 6px 12px; } +.swMain .buttonFinish { display:block; float:right; margin: 8px 12px 0 0px; padding: 6px 12px; } + +/* Form Styles */ + +.swMain .loader { position: relative; display: none; float: left; margin: 2px 0 0 2px; padding: 8px 10px 8px 40px; border: 1px solid #FFD700; color: #5A5655; background: url(../images/loaders/loader.gif) no-repeat 5px; z-index: 998; } +.swMain .msgBox { position:relative; display:none; float:left; margin: 4px 0 0 5px; padding:5px; border: 1px solid #FFD700; background-color: #FFFFDD; color:#5A5655; z-index:999; min-width:200px; } +.swMain .msgBox .content { padding: 0px; float:left; } +.swMain .msgBox .close { border: 1px solid #d5d5d5; color: #CCC; display: block; float: right; margin: 0 0 0 5px; outline-style: none; padding: 0 2px 0 2px; position: relative; text-align: center; text-decoration: none; } +.swMain .msgBox .close:hover { color: #EA8511; border: 1px solid #d5d5d5; } + +.bordLeft { border-top-left-radius: 3px; -moz-border-radius-topleft: 3px; -webkit-border-top-left-radius: 3px; } +.bordRight { border-top-right-radius: 3px; -moz-border-radius-topright: 3px; -webkit-border-top-right-radius: 3px; } + +.contentHead { padding: 16px 12px 15px 35px; } + + + +/* ===== Timepicker ===== */ + +.timepicker { width: 60px!important; } +.timeEntry_control { vertical-align: middle; margin-left: -1px; margin-top: -2px; cursor: pointer; } +* html .timeEntry_control { margin-top: -4px; } + + + +/* ===== Dual select boxes ===== */ + +.dualBoxes { padding: 22px 16px; position: relative; } + +.dualBtn { padding: 6px 8px; cursor: pointer; line-height: 12px; background: url(../images/ui/basicBtn.png) repeat-x 0 0; border: 1px solid #d5d5d5; color: #525252; margin-left: -1px; } +.dualBtn:hover { background-position: 0 -25px; border-color: #c9c9c9; } +.dualBtn:active { background-position: 0 -50px; } + +.fltr { position: absolute; right: 0; } + +.boxFilter { margin-bottom: 15px; } +.dualControl { text-align: center; width: 90px; margin: 150px 1px; position: absolute; left: 50%; margin-left: -45px; } +.countLabel { color: gray; font-style:italic; margin-top: 10px; display: block; } +.storageBox { display:none; } +.copiedOption { background-color: Yellow; } + + + +/* ===== Single file input ===== */ + +.feat { margin-left: 5px; background: url(../images/forms/fileUpload.png) no-repeat 0 0; width: 94px; height: 26px; } +.feat:hover { background-position: 0 -27px; } +.feat:active { background-position: 0 -54px; } +.fileInput { background: #fff; border: 1px solid #d5d5d5; padding: 5px; font-size: 11px; font-family: Arial, Helvetica, sans-serif; } +.fileInput:hover { background: #fcfcfc; border: 1px solid #d1d1d1; } +.fileInput:focus { border: 1px solid #bbc1c9; background: #fff; } + + + +/* ===== Wizard with form validation ===== */ + +.step { position: relative; } +.step label.error { color: #b84646; padding-left: 0; font-size: 11px; white-space: nowrap; padding-bottom: 0; } +.selector .error { position: absolute; right: -114px; } +.step h5 { position: absolute; left: 12px; top: -30px; } +.wizNav { padding: 14px 16px; border-top: 1px solid #e7e7e7; text-align: right; } +.wizNav input { margin-left: 10px; } +.wizNav input[disabled] { background: #fcfcfc; border: 1px solid #eaeaea; color: #d5d5d5; } + + + +/* ===== Chosen multiple select plugin with dropdown ===== */ + +.chzn-container { position: relative; display: inline-block; zoom: 1; *display: inline; } + +.noSearch .chzn-search, .searchDrop .selector, .noSearch .selector { display: none; } +.formRight .chzn-container-multi { width: 100%!important; } + +.noSearch .chzn-results { margin: 0!important; padding: 2px!important; } + +.chzn-container > .chzn-drop { background: #fff; border: 1px solid #d5d5d5; border-top: 0; position: absolute; top: 29px; margin-top: 1px; left: 0; z-index: 998; width: 100%!important; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing: border-box; box-sizing: border-box; } + +.chzn-container-single .chzn-single { background: url(../images/chosenSelect.png) repeat-x; border: 1px solid #d8d8d8; display: block; overflow: hidden; white-space: nowrap; position: relative; height: 26px; line-height: 27px; padding: 0 0 0 8px; color: #595959; text-decoration: none; } +.chzn-container-single .chzn-single span { margin-right: 26px; display: block; font-size: 11px; overflow: hidden; white-space: nowrap; -o-text-overflow: ellipsis; -ms-text-overflow: ellipsis; text-overflow: ellipsis; } +.chzn-container-single .chzn-single abbr { display: block; position: absolute; right: 26px; top: 6px; width: 12px; height: 13px; font-size: 1px; } +.chzn-container-single .chzn-single abbr:hover { } +.chzn-container-single .chzn-single div { position: absolute; right: -1px; top: -1px; display: block; height: 28px; width: 27px; } +.chzn-container-single .chzn-single div b { background: url(../images/forms/select_right.png) no-repeat center right; display: block; width: 27px; height: 28px; } +.chzn-container-single .chzn-search { padding: 3px 4px; position: relative; margin: 0; white-space: nowrap; z-index: 1010; } +.chzn-container-single .chzn-search input { margin: 1px 0; padding: 4px 20px 4px 5px; outline: 0; border: 1px solid #aaa; font-family: sans-serif; font-size: 11px; background: url(../images/searchSmall.png) no-repeat 98% !important; box-sizing: content-box; -webkit-box-sizing: content-box; -moz-box-sizing: content-box; -ms-box-sizing: content-box; } +.chzn-container-single .chzn-drop {} + +.chzn-container-single-nosearch .chzn-search input { position: absolute; left: -9000px; } + +/*.chzn-container-multi { width: 50%!important; }*/ +.chzn-container-multi .chzn-choices { border: 1px solid #ddd; margin: 0; cursor: text; overflow: hidden; height: auto !important; height: 1%; position: relative; + font-size: 12px; + padding: 4px; + background: white; + color: #656565; +} +.chzn-container-multi .chzn-choices li { float: left; list-style: none; } +.chzn-container-multi .chzn-choices .search-field { white-space: nowrap; margin: 0; padding: 0; } +.chzn-container-multi .chzn-choices .search-field input { color: #666; background: transparent !important; border: 0 !important; font-family: sans-serif; font-size: 12px!important; padding: 11px 4px 10px 4px!important; margin: 0; outline: 0; box-shadow: none!important; } +.chzn-container-multi .chzn-choices .search-field .default { color: #999; } +.chzn-container-multi .chzn-choices .search-choice { position: relative; line-height: 16px; font-size: 11px; border: 1px solid #A5D24A; display: block; float: left; padding: 5px 24px 5px 8px; background: #CDE69C; color: #638421; margin: 4px; } + +.chzn-container-multi .chzn-choices .search-choice-focus { background: #d4d4d4; } +.chzn-container-multi .chzn-choices .search-choice .search-choice-close { display: block; position: absolute; right: 6px; top: 8px; width: 10px; height: 10px; font-size: 1px; background: url(../images/icons/closeSelection.png) 50% no-repeat; } +.chzn-container-multi .chzn-choices .search-choice-focus .search-choice-close { background-position: right -11px; } + +.chzn-container .chzn-results { margin: 0 4px 4px 0; max-height: 240px; padding: 0 0 0 4px; position: relative; overflow-x: hidden; overflow-y: auto; } +.chzn-container-multi .chzn-results { padding: 0; margin: 0; } +.chzn-container .chzn-results li { display: none; line-height: 14px; padding: 5px 6px; margin: 0; list-style: none; font-size: 11px; } +.chzn-container .chzn-results .active-result { cursor: pointer; display: list-item; } +.chzn-container .chzn-results .highlighted { background-color: #3875d7; color: #fff; } +.chzn-container .chzn-results li em { background: #feffde; font-style: normal; } +.chzn-container .chzn-results .highlighted em { background: transparent; } +.chzn-container .chzn-results .no-results { background: #f4f4f4; display: list-item; } +.chzn-container .chzn-results .group-result { cursor: default; color: #2e74a6; font-weight: bold; font-size: 10px; border-bottom: 1px solid #DDD; border-top: 1px solid #DDD; } +.chzn-container .chzn-results .group-option { padding-left: 15px; } +.chzn-container-multi .chzn-drop .result-selected { display: none; } +.chzn-container .chzn-results-scroll { background: white; margin: 0 4px; position: absolute; text-align: center; width: 321px; /* This should be dynamic with js */ z-index: 1; } +.chzn-container .chzn-results-scroll span { display: inline-block; height: 17px; text-indent: -5000px; width: 9px; } +.chzn-container .chzn-results-scroll-down { bottom: 0; } +.chzn-container .chzn-results-scroll-down span { } +.chzn-container .chzn-results-scroll-up span { } + +.chzn-container-active .chzn-single-with-drop div { background: transparent; border-left: none; } +.chzn-container-active .chzn-single-with-drop div b { } +.chzn-container-active .chzn-choices { border: 1px solid #d5d5d5; } +.chzn-container-active .chzn-choices .search-field input { color: #111 !important; } + +.chzn-disabled { cursor: default; opacity:0.5 !important; } +.chzn-disabled .chzn-single { cursor: default; } +.chzn-disabled .chzn-choices .search-choice .search-choice-close { cursor: default; } + + + + +/* ===== Media queries ===== */ + +/* Devices and browsers with max of 799px */ +@media only screen and (max-width: 799px) { + + .leftNav { float: none; background: url(../images/linesSep.png) repeat-x; padding-top: 24px; text-align: center; padding-bottom: 20px; margin: 0; width: 100%; max-width: none; } + .leftNav ul li { width: 49px; display: inline-block; margin: 0 0 4px 0; position: static; } + .leftNav ul li a span { text-indent: -9999px; background-position: 16px; } + .leftNav ul li a { margin-bottom: 3px; } + + .numberLeft { display: none!important; } + .widgets .left { float: none; width: 100%; margin-right: 0; } + .widgets .right { float: none; width: 100%; } + + #header { text-align: center; height: 100%; margin-bottom: 22px; } + + ul.sub { position: absolute; width: 100%; left: 0; z-index: 999; border: 1px solid #d5d5d5; border-bottom: 0; } + ul.sub li { display: block; width: 50%; float: left; margin-bottom: 0; text-align: left; border-bottom: 1px solid #d5d5d5; padding: 0; } + ul.sub li a { padding: 8px 10px 8px 24px; background: url(../images/arrow.gif) no-repeat 12px 16px; } + ul.sub li a:hover, .sub li a:active { background-position: 12px 16px; } + ul.sub li:nth-child(even) { } + ul.sub li:nth-child(odd) { background: url(../images/tabsSepR.png) repeat-y 100% 0; } + ul#menu { position: relative; } + .leftNav .last { border-bottom: 1px solid #d5d5d5; } + +} + +/* Devices and browsers with max of 767px and less than 799px */ +@media only screen and (max-width: 767px) { + + .stats ul li { display: inline-block; float: none; margin-left: 18px; vertical-align: top; width: 21%; text-align: center; } + .stats ul { text-align: center; } + .count { display: inline-block; float: none; padding: 0 15px; text-align: center; margin-bottom: 4px; margin-right: 0; } + + .middleNav { float: none; margin-right: 0px; display: block; text-align: center; margin-top: 2px; } + .middleNav ul { } + .middleNav ul li { text-align: center; display: inline-block; float: none; margin-left: 5%; position: relative; } + .middleNav ul li:first-child { margin-left: 0; } + + .logo { float: none; } + + .userNav ul li span { display: none; } + .userNav ul li img { padding: 13px 14px 11px 14px; margin: 0; } + .userNav ul li ul { right: -3px; left: auto; } + + .listData .cNote { display: none; } + ul.listData li { padding: 0 0 1px 6px!important; } + + .rowElem > label { width: 100%; float: none; padding: 8px 0 6px 0; } + .formRight { width: 100%; margin: 0; padding: 12px 0; float: none; } + .rowElem .topLabel { padding: 5px 12px 5px 0; } + + .fc-header-right { width: 50%; } + .ln-letters a { padding: 4px 2%; margin-bottom: 1px; } + + #eq span { margin-right: 0; margin-left: 30px; } + #eq span:first-child { margin-left: 5px; } + + .formError { left: auto!important; right: 30px; } + .formErrorContent { width: 140px; } + + .formRight div.checker, .formRight div.radio { padding-bottom: 0; padding-top: 0; margin-top: 2px; } + div.selector { margin-bottom: 10px; } + .formRight > label { padding-top: 0; } + .rowElem > label { padding-bottom: 0; } + .step label.error { padding-top: 3px; } + + .userWidget .checker { margin-top: 6px; } + +} + +/* Devices and browsers with min of 800px and max of 979px */ +@media only screen and (min-width: 800px) and (max-width: 979px) { + + .leftNav { width: 24%; } + +} + +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ +@media only screen and (min-width: 320px) and (max-width: 479px) { + + .logo { float: none; text-align: center; } + .welcome { display: none; } + .userNav { float: none; text-align: center; position: relative; } + .userNav ul { height: 36px; text-align: center; } + .userNav > ul > li { display: inline-block; float: none; position: static; margin-left: -3px; } + .userNav ul li ul { height: auto; text-align: left; position: absolute; top: 36px; left: 50%; margin-left: -85px; width: 162px; } + + .middleNav ul { text-align: center; } + .middleNav ul li { text-align: center; display: inline-block; float: none; margin: 0 2%; position: relative; width: 45%; margin-bottom: 10px; } + .middleNav ul li:first-child { margin: 0 2%; } + + .stats ul { text-align: center; } + .stats ul li { display: inline-block; float: none; margin: 5px; vertical-align: top; width: 46%; text-align: center; } + .stats ul li:first-child { margin: 5px; } + .count { display: inline-block; float: none; padding: 0 15px; text-align: center; margin-bottom: 4px; margin-right: 0; width: 75%; } + + .w40 { width: auto; } + .floatleft, .floatright { float: none; } + .floatright { margin-top: 95px; } + .countLabel { text-align: center; } + .dualControl { text-align: center; width: 90px; margin: 10px 1px; position: absolute; left: 50%; margin-left: -45px; } + + .moreFields ul li { width: 11.8%; } + .moreFields ul li span { display: none; } + + #header { margin-bottom: 15px; } + + .radio, .checker { clear: both; } + + .plupload_file_size, .plupload_file_status, .plupload_progress { width: 12%; } + .plupload_disabled span { padding: 5px 8px 6px 8px; } + .plupload_add span { background: url(../images/add.png) no-repeat 10px; padding: 5px 8px 6px 20px; display: block; } + + .fc-header-right { width: auto; } + + .dataTables_filter input[type="text"] { width: 86px; } + .dataTables_paginate { float: left; } + .dataTables_paginate .ui-buttonset .ui-button { margin: 0 1px; } + + .issueSummary .floatleft { display: none; } + .ticketInfo { margin-left: 0; } + + .breadCrumb { overflow: hidden; height: 100%; } + + .pages li { display: inline-block; margin: 4px 2px; } + + #popup_container { min-width: 250px; max-width: 300px; } + + .el-finder-nav { width: 100px; } + + .errorPage { width: auto; } + .errorPage .bubbles { display: none; } + .errorPage .errorTitle, .weAreOff { width: auto; } + .errorPage h1 { padding: 0; text-align: center; } + + #myList > li { clear: both; } + ul.listData { float: left; text-align: center; margin: 3px 0 5px 0; font-size: 11px; } + ul.listData li { padding: 0; margin: 0 20px 0 -6px; clear: both; } + + .displayNone { display: none; } + + .pieWidget { width: 100%; height: 250px; margin: 0 auto; } + + .paging_full_numbers .ui-button { padding: 2px 5px; } + table.display { table-layout: fixed; } + table.display thead th div.DataTables_sort_wrapper { overflow: hidden; padding-right: 10px; } + table.display thead th div.DataTables_sort_wrapper span { display: none; } + table.display td { overflow: hidden; } + .dataTables_length { float: none; margin: 6px auto 0 auto; width: 140px; } + .dataTables_paginate { float: none; width: 253px; display: inline-block; text-align: center; margin-top: 2px; } + + .chzn-container { width: 254px!important; } + .chzn-container-single .chzn-search input { max-width: 218px; } + +} + +/* Mobile Portrait Size to Mobile Landscape Size (devices and browsers) */ +@media only screen and (min-width: 480px) and (max-width: 767px) { + + .moreFields ul li { width: 13.4%; } + .moreFields ul li span { display: none; } + +} + +/* Fix for uniform radio */ +.moreFields div.radio span{ + padding: 0; +} \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/reset.css b/src/bb-themes/admin_default/css/reset.css new file mode 100644 index 000000000..ed4ec45b1 --- /dev/null +++ b/src/bb-themes/admin_default/css/reset.css @@ -0,0 +1,125 @@ + +/* ===== CSS reset ===== */ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, em, font, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, ol, ul, li, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-size: 100%; vertical-align: baseline; background: transparent; } +ol, ul { list-style: none; } +blockquote, q { quotes: none; } +blockquote:before, blockquote:after, +q:before, q:after { content: ''; content: none; } +/* remember to define focus styles! */ +:focus { outline: 0; } +/* remember to highlight inserts somehow! padding: 9px 17px 9px 17px; */ +ins { text-decoration: none; } +del { text-decoration: line-through; } +/* tables still need 'cellspacing="0"' in the markup */ +table { border-collapse: collapse; } +*, * focus { + outline: none; + margin: 0; + padding: 0; +} +textarea { overflow: auto; } +textarea, input[type=text], input[type=password] { font-family: Arial, Helvetica, sans-serif; font-size: 11px; } +button, input[type=submit] { font-family: Arial, Helvetica, sans-serif; } + +img { border: 0; } +ul { list-style: none; margin: 0; padding: 0; } +p { margin: 0; padding: 0; } +:focus { outline: 0; } +a { text-decoration: none; color: #2b6893; } + +.normal { font-style: normal; } +.normalFont { font-style: normal; font-weight: normal; } + + +/* ========== Correction classes ========== */ +.mt40 { margin-top: 40px; } + +.nomargin { margin: 0!important; } + +/* + Correction margins + */ +.m10 { margin: 10px 0; } +.m15 { margin: 15px 0; } +.m20 { margin: 20px 0; } + +.mr5 { margin-right: 5px; } +.mr10 { margin-right: 10px; } +.mr15 { margin-right: 15px; } +.mr20 { margin-right: 20px; } +.mr25 { margin-right: 25px; } +.mr30 { margin-right: 30px; } + +.mb0 { margin-bottom: 0; } +.mb5 { margin-bottom: 5px; } +.mb10 { margin-bottom: 10px; } +.mb15 { margin-bottom: 15px; } +.mb20 { margin-bottom: 20px; } +.mb25 { margin-bottom: 25px; } +.mb30 { margin-bottom: 30px; } +.mb40 { margin-bottom: 40px; } + + +.mt0 { margin-top: 0; } +.mt5 { margin-top: 5px; } +.mt10 { margin-top: 10px; } +.mt12 { margin-top: 12px; } +.mt15 { margin-top: 15px; } +.mt20 { margin-top: 20px; } +.mt25 { margin-top: 25px; } +.mt30 { margin-top: 30px; } + + +.ml5 { margin-left: 5px; } +.ml10 { margin-left: 10px; } +.ml15 { margin-left: 15px; } +.ml20 { margin-left: 20px; } +.ml25 { margin-left: 25px; } +.ml30 { margin-left: 30px; } + + +.mr5 { margin-right: 5px; } +.mr10 { margin-right: 10px; } +.mr15 { margin-right: 15px; } +.mr20 { margin-right: 20px; } +.mr25 { margin-right: 25px; } +.mr30 { margin-right: 30px; } + + + +/* + Correction paddings + */ +.pb0 { padding-bottom: 0!important; } +.pb5 { padding-bottom: 5px; } +.pb10 { padding-bottom: 10px; } +.pb15 { padding-bottom: 15px; } +.pb20 { padding-bottom: 20px; } +.pb25 { padding-bottom: 25px; } +.pb30 { padding-bottom: 30px; } + +.pt0 { padding-top: 0; } +.pt5 { padding-top: 5px; } +.pt10 { padding-top: 10px; } +.pt15 { padding-top: 15px; } +.pt20 { padding-top: 20px; } +.pt25 { padding-top: 25px; } +.pt30 { padding-top: 30px; } + + +input::-moz-focus-inner /*Remove button padding in FF*/ +{ + border: 0; + padding: 0; +} + +a.button::-moz-focus-inner /*Remove button padding in FF*/ +{ + border: 0; + padding-top: 20px; +} \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/spectrum.css b/src/bb-themes/admin_default/css/spectrum.css new file mode 100644 index 000000000..a90feb78e --- /dev/null +++ b/src/bb-themes/admin_default/css/spectrum.css @@ -0,0 +1,467 @@ +/*** +Spectrum: The No Hassle Colorpicker +https://github.com/bgrins/spectrum + +Author: Brian Grinstead +License: MIT +***/ + +.sp-container { + position:absolute; + top:0; + left:0; + display:inline-block; + *display: inline; + *zoom: 1; + z-index: 2147483647; + overflow: hidden; +} +.sp-container.sp-flat { + position: relative; +} + +/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */ +.sp-top { + position:relative; + width: 100%; + display:inline-block; +} +.sp-top-inner { + position:absolute; + top:0; + left:0; + bottom:0; + right:0; +} +.sp-color { + position: absolute; + top:0; + left:0; + bottom:0; + right:20%; +} +.sp-hue { + position: absolute; + top:0; + right:0; + bottom:0; + left:84%; + height: 100%; +} +.sp-fill { + padding-top: 80%; +} +.sp-sat, .sp-val { + position: absolute; + top:0; + left:0; + right:0; + bottom:0; +} + +.sp-alpha-enabled .sp-top +{ + margin-bottom: 18px; +} +.sp-alpha-enabled .sp-alpha +{ + display: block; +} + +.sp-alpha-handle +{ + position:absolute; + top:-4px; + bottom: -4px; + width: 6px; + left: 50%; + cursor: pointer; + border: 1px solid black; + background: white; + opacity: .8; +} + +.sp-alpha +{ + display: none; + position: absolute; + bottom: -14px; + right: 0; + left: 0; + height: 8px; +} +.sp-alpha-inner{ + border: solid 1px #333; +} + +/* Don't allow text selection */ +.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button { + -webkit-user-select:none; + -moz-user-select: -moz-none; + -o-user-select:none; + user-select: none; +} + +.sp-container.sp-input-disabled .sp-input-container { + display: none; +} +.sp-container.sp-buttons-disabled .sp-button-container { + display: none; +} +.sp-palette-only .sp-picker-container { + display: none; +} +.sp-palette-disabled .sp-palette-container { + display: none; +} + +.sp-initial-disabled .sp-initial { + display: none; +} + + +/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */ +.sp-sat { + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)"; + filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81'); +} +.sp-val { + background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0))); + background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0)); + background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0)); + background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0)); + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)"; + filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000'); +} + +.sp-hue { + background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); + background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000)); + background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%); +} + +/* IE filters do not support multiple color stops. + Generate 6 divs, line them up, and do two color gradients for each. + Yes, really. + */ + +.sp-1 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00'); +} +.sp-2 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00'); +} +.sp-3 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff'); +} +.sp-4 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff'); +} +.sp-5 { + height:16%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff'); +} +.sp-6 { + height:17%; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000'); +} + +/* Clearfix hack */ +.sp-cf:before, .sp-cf:after { content: ""; display: table; } +.sp-cf:after { clear: both; } +.sp-cf { *zoom: 1; } + +/* Mobile devices, make hue slider bigger so it is easier to slide */ +@media (max-device-width: 480px) { + .sp-color { right: 40%; } + .sp-hue { left: 63%; } + .sp-fill { padding-top: 60%; } +} + +.sp-dragger { + border-radius: 5px; + height: 5px; + width: 5px; + border: 1px solid #fff; + background: #000; + cursor: pointer; + position:absolute; + top:0; + left: 0; +} +.sp-slider { + position: absolute; + top:0; + cursor:pointer; + height: 3px; + left: -1px; + right: -1px; + border: 1px solid #000; + background: white; + opacity: .8; +} + +/* Basic display options (colors, fonts, global widths) */ +.sp-container { + border-radius: 0; + background-color: #ECECEC; + border: solid 1px #f0c49B; + padding: 0; +} +.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue +{ + font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + box-sizing: border-box; +} +.sp-top +{ + margin-bottom: 3px; +} +.sp-color, .sp-hue +{ + border: solid 1px #666; +} + +/* Input */ +.sp-input-container { + float:right; + width: 100px; + margin-bottom: 4px; +} +.sp-initial-disabled .sp-input-container { + width: 100%; +} +.sp-input { + font-size: 12px !important; + border: 1px inset; + padding: 4px 5px; + margin: 0; + width: 100%; + background:transparent; + border-radius: 3px; + color: #222; +} +.sp-input:focus { + border: 1px solid orange; +} +.sp-input.sp-validation-error +{ + border: 1px solid red; + background: #fdd; +} +.sp-picker-container , .sp-palette-container +{ + float:left; + position: relative; + padding: 10px; + padding-bottom: 300px; + margin-bottom: -290px; +} +.sp-picker-container +{ + width: 172px; + border-left: solid 1px #fff; +} + +/* Palettes */ +.sp-palette-container +{ + border-right: solid 1px #ccc; +} + +.sp-palette .sp-thumb-el { + display: block; + position:relative; + float:left; + width: 24px; + height: 15px; + margin: 3px; + cursor: pointer; + border:solid 2px transparent; +} +.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active { + border-color: orange; +} +.sp-thumb-el +{ + position:relative; +} + +/* Initial */ +.sp-initial +{ + float: left; + border: solid 1px #333; +} +.sp-initial span { + width: 30px; + height: 25px; + border:none; + display:block; + float:left; + margin:0; +} + +/* Buttons */ +.sp-button-container { + float: right; +} + +/* Replacer (the little preview div that shows up instead of the ) */ +.sp-replacer { + margin:0; + overflow:hidden; + cursor:pointer; + padding: 4px; + display:inline-block; + *zoom: 1; + *display: inline; + border: solid 1px #D5D5D5; + background: #eee; + color: #333; + vertical-align: middle; +} +.sp-replacer:hover, .sp-replacer.sp-active { + border-color: #BBC1C9; + color: #111; +} +.sp-dd { + padding: 2px 0; + height: 16px; + line-height: 16px; + float:left; + font-size:10px; +} +.sp-preview +{ + position:relative; + width:25px; + height: 20px; + border: solid 1px #222; + margin-right: 5px; + float:left; + z-index: 0; +} + +.sp-palette +{ + *width: 220px; + max-width: 220px; +} +.sp-palette .sp-thumb-el +{ + width:16px; + height: 16px; + margin:2px 1px; + border: solid 1px #d0d0d0; +} + +.sp-container +{ + padding-bottom:0; +} + + +/* Buttons: http://hellohappy.org/css3-buttons/ */ +.sp-container button { + background-color: #eeeeee; + background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc); + background-image: -moz-linear-gradient(top, #eeeeee, #cccccc); + background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); + background-image: -o-linear-gradient(top, #eeeeee, #cccccc); + background-image: -ms-linear-gradient(top, #eeeeee, #cccccc); + background-image: linear-gradient(to bottom, #eeeeee, #cccccc); + border: 1px solid #ccc; + border-bottom: 1px solid #bbb; + border-radius: 3px; + color: #333; + font-size: 14px; + line-height: 1; + padding: 5px 4px; + text-align: center; + text-shadow: 0 1px 0 #eee; + vertical-align: middle; +} +.sp-container button:hover { + background-color: #dddddd; + background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -o-linear-gradient(top, #dddddd, #bbbbbb); + background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb); + background-image: linear-gradient(to bottom, #dddddd, #bbbbbb); + border: 1px solid #bbb; + border-bottom: 1px solid #999; + cursor: pointer; + text-shadow: 0 1px 0 #ddd; +} +.sp-container button:active { + border: 1px solid #aaa; + border-bottom: 1px solid #888; + -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; + box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee; +} +.sp-cancel +{ + font-size: 11px; + color: #d93f3f !important; + margin:0; + padding:2px; + margin-right: 5px; + vertical-align: middle; + text-decoration:none; + +} +.sp-cancel:hover +{ + color: #d93f3f !important; + text-decoration: underline; +} + + +.sp-palette span:hover, .sp-palette span.sp-thumb-active +{ + border-color: #000; +} + +.sp-preview, .sp-alpha, .sp-thumb-el +{ + position:relative; + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==); +} +.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner +{ + display:block; + position:absolute; + top:0;left:0;bottom:0;right:0; +} + +.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=); +} + +.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner +{ + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=); +} \ No newline at end of file diff --git a/src/bb-themes/admin_default/css/ui_custom.css b/src/bb-themes/admin_default/css/ui_custom.css new file mode 100644 index 000000000..46d25c765 --- /dev/null +++ b/src/bb-themes/admin_default/css/ui_custom.css @@ -0,0 +1,479 @@ +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + */ + +/* Layout helpers +----------------------------------*/ +.ui-helper-hidden { display: none; } +.ui-helper-hidden-accessible { position: absolute; left: -99999999px; } +.ui-helper-reset { margin: 0; padding: 0; border: 0; outline: 0; line-height: 1.3; text-decoration: none; font-size: 100%; list-style: none; } +.ui-helper-clearfix:after { content: "."; display: block; height: 0; clear: both; visibility: hidden; } +.ui-helper-clearfix { display: inline-block; } +/* required comment for clearfix to work in Opera \*/ +* html .ui-helper-clearfix { height:1%; } +.ui-helper-clearfix { display:block; } +/* end clearfix */ +.ui-helper-zfix { width: 100%; height: 100%; top: 0; left: 0; position: absolute; opacity: 0; filter:Alpha(Opacity=0); } + + +/* Interaction Cues +----------------------------------*/ +.ui-state-disabled { cursor: default !important; } + + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { display: block; text-indent: -99999px; overflow: hidden; background-repeat: no-repeat; } + + +/* Misc visuals +----------------------------------*/ + +/* Overlays */ +.ui-widget-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; } + + +/* + * jQuery UI CSS Framework @VERSION + * + * Copyright 2010, AUTHORS.txt (http://jqueryui.com/about) + * Dual licensed under the MIT or GPL Version 2 licenses. + * http://jquery.org/license + * + * http://docs.jquery.com/UI/Theming/API + * + */ + + +/* Component containers +----------------------------------*/ +.ui-widget { font-size: 12px; } +.ui-widget .ui-widget { font-size: 1em; } +.ui-widget input, .ui-widget select, .ui-widget textarea, .ui-widget button { font-family: Verdana,Arial,sans-serif; font-size: 1em; } +.ui-widget-content { } +.ui-widget-content a { color: #222222; } +.ui-widget-header { font-weight: bold; } +.ui-widget-header a { color: #222222; } + +/* Interaction states +----------------------------------*/ +.ui-state-default, .ui-widget-content .ui-state-default, .ui-widget-header .ui-state-default { border-left: 1px solid #d5d5d5; font-weight: normal; border-bottom: 1px solid #D5D5D5; } +th.ui-state-default:first-child { border-left: none; } +.ui-state-default a, .ui-state-default a:link, .ui-state-default a:visited { color: #555555; text-decoration: none; } +.ui-state-hover, .ui-widget-content .ui-state-hover, .ui-widget-header .ui-state-hover, .ui-state-focus, .ui-widget-content .ui-state-focus, .ui-widget-header .ui-state-focus { background: #fafafa; font-weight: normal; color: #212121; } +.ui-state-hover a, .ui-state-hover a:hover { color: #797979; text-decoration: none; } +.ui-state-active, .ui-widget-content .ui-state-active, .ui-widget-header .ui-state-active { background: #fafafa; font-weight: normal; color: #797979; } +.ui-state-active a, .ui-state-active a:link, .ui-state-active a:visited { color: #797979; text-decoration: none; } +.ui-widget :active { outline: none; } + +/* Interaction Cues +----------------------------------*/ +.ui-state-highlight a, .ui-widget-content .ui-state-highlight a,.ui-widget-header .ui-state-highlight a { color: #363636; } +.ui-state-error, .ui-widget-content .ui-state-error, .ui-widget-header .ui-state-error {border: 1px solid #cd0a0a; background: #fef1ec url(../images/jquery_ui/ui-bg_glass_95_fef1ec_1x400.png) 50% 50% repeat-x; color: #cd0a0a; } +.ui-state-error a, .ui-widget-content .ui-state-error a, .ui-widget-header .ui-state-error a { color: #cd0a0a; } +.ui-state-error-text, .ui-widget-content .ui-state-error-text, .ui-widget-header .ui-state-error-text { color: #cd0a0a; } +.ui-priority-primary, .ui-widget-content .ui-priority-primary, .ui-widget-header .ui-priority-primary { font-weight: bold; } +.ui-priority-secondary, .ui-widget-content .ui-priority-secondary, .ui-widget-header .ui-priority-secondary { opacity: .7; filter:Alpha(Opacity=70); font-weight: normal; } +.ui-state-disabled, .ui-widget-content .ui-state-disabled, .ui-widget-header .ui-state-disabled { opacity: .35; filter:Alpha(Opacity=35); background-image: none; } + +/* Icons +----------------------------------*/ + +/* states and images */ +.ui-icon { width: 16px; height: 16px; background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-widget-content .ui-icon {background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-widget-header .ui-icon {background-image: url(../images/jquery_ui/ui-icons_222222_256x240.png); } +.ui-state-default .ui-icon { background-image: url(../images/jquery_ui/ui-icons_888888_256x240.png); } +.ui-state-hover .ui-icon, .ui-state-focus .ui-icon {background-image: url(../images/jquery_ui/ui-icons_454545_256x240.png); } +.ui-state-active .ui-icon {background-image: url(../images/jquery_ui/ui-icons_454545_256x240.png); } +.ui-state-highlight .ui-icon {background-image: url(../images/jquery_ui/ui-icons_2e83ff_256x240.png); } +.ui-state-error .ui-icon, .ui-state-error-text .ui-icon {background-image: url(../images/jquery_ui/ui-icons_cd0a0a_256x240.png); } + +/* positioning */ +.ui-icon-carat-1-n { background-position: 0 0; } +.ui-icon-carat-1-ne { background-position: -16px 0; } +.ui-icon-carat-1-e { background-position: -32px 0; } +.ui-icon-carat-1-se { background-position: -48px 0; } +.ui-icon-carat-1-s { background-position: -64px 0; } +.ui-icon-carat-1-sw { background-position: -80px 0; } +.ui-icon-carat-1-w { background-position: -96px 0; } +.ui-icon-carat-1-nw { background-position: -112px 0; } +.ui-icon-carat-2-n-s { background-position: -128px 0; } +.ui-icon-carat-2-e-w { background-position: -144px 0; } +.ui-icon-triangle-1-n { background-position: 0 -16px; } +.ui-icon-triangle-1-ne { background-position: -16px -16px; } +.ui-icon-triangle-1-e { background-position: -32px -16px; } +.ui-icon-triangle-1-se { background-position: -48px -16px; } +.ui-icon-triangle-1-s { background-position: -64px -16px; } +.ui-icon-triangle-1-sw { background-position: -80px -16px; } +.ui-icon-triangle-1-w { background-position: -96px -16px; } +.ui-icon-triangle-1-nw { background-position: -112px -16px; } +.ui-icon-triangle-2-n-s { background-position: -128px -16px; } +.ui-icon-triangle-2-e-w { background-position: -144px -16px; } +.ui-icon-arrow-1-n { background-position: 0 -32px; } +.ui-icon-arrow-1-ne { background-position: -16px -32px; } +.ui-icon-arrow-1-e { background-position: -32px -32px; } +.ui-icon-arrow-1-se { background-position: -48px -32px; } +.ui-icon-arrow-1-s { background-position: -64px -32px; } +.ui-icon-arrow-1-sw { background-position: -80px -32px; } +.ui-icon-arrow-1-w { background-position: -96px -32px; } +.ui-icon-arrow-1-nw { background-position: -112px -32px; } +.ui-icon-arrow-2-n-s { background-position: -128px -32px; } +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; } +.ui-icon-arrow-2-e-w { background-position: -160px -32px; } +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; } +.ui-icon-arrowstop-1-n { background-position: -192px -32px; } +.ui-icon-arrowstop-1-e { background-position: -208px -32px; } +.ui-icon-arrowstop-1-s { background-position: -224px -32px; } +.ui-icon-arrowstop-1-w { background-position: -240px -32px; } +.ui-icon-arrowthick-1-n { background-position: 0 -48px; } +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; } +.ui-icon-arrowthick-1-e { background-position: -32px -48px; } +.ui-icon-arrowthick-1-se { background-position: -48px -48px; } +.ui-icon-arrowthick-1-s { background-position: -64px -48px; } +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; } +.ui-icon-arrowthick-1-w { background-position: -96px -48px; } +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; } +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; } +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; } +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; } +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; } +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; } +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; } +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; } +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; } +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; } +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; } +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; } +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; } +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; } +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; } +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; } +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; } +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; } +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; } +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; } +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; } +.ui-icon-arrow-4 { background-position: 0 -80px; } +.ui-icon-arrow-4-diag { background-position: -16px -80px; } +.ui-icon-extlink { background-position: -32px -80px; } +.ui-icon-newwin { background-position: -48px -80px; } +.ui-icon-refresh { background-position: -64px -80px; } +.ui-icon-shuffle { background-position: -80px -80px; } +.ui-icon-transfer-e-w { background-position: -96px -80px; } +.ui-icon-transferthick-e-w { background-position: -112px -80px; } +.ui-icon-folder-collapsed { background-position: 0 -96px; } +.ui-icon-folder-open { background-position: -16px -96px; } +.ui-icon-document { background-position: -32px -96px; } +.ui-icon-document-b { background-position: -48px -96px; } +.ui-icon-note { background-position: -64px -96px; } +.ui-icon-mail-closed { background-position: -80px -96px; } +.ui-icon-mail-open { background-position: -96px -96px; } +.ui-icon-suitcase { background-position: -112px -96px; } +.ui-icon-comment { background-position: -128px -96px; } +.ui-icon-person { background-position: -144px -96px; } +.ui-icon-print { background-position: -160px -96px; } +.ui-icon-trash { background-position: -176px -96px; } +.ui-icon-locked { background-position: -192px -96px; } +.ui-icon-unlocked { background-position: -208px -96px; } +.ui-icon-bookmark { background-position: -224px -96px; } +.ui-icon-tag { background-position: -240px -96px; } +.ui-icon-home { background-position: 0 -112px; } +.ui-icon-flag { background-position: -16px -112px; } +.ui-icon-calendar { background-position: -32px -112px; } +.ui-icon-cart { background-position: -48px -112px; } +.ui-icon-pencil { background-position: -64px -112px; } +.ui-icon-clock { background-position: -80px -112px; } +.ui-icon-disk { background-position: -96px -112px; } +.ui-icon-calculator { background-position: -112px -112px; } +.ui-icon-zoomin { background-position: -128px -112px; } +.ui-icon-zoomout { background-position: -144px -112px; } +.ui-icon-search { background-position: -160px -112px; } +.ui-icon-wrench { background-position: -176px -112px; } +.ui-icon-gear { background-position: -192px -112px; } +.ui-icon-heart { background-position: -208px -112px; } +.ui-icon-star { background-position: -224px -112px; } +.ui-icon-link { background-position: -240px -112px; } +.ui-icon-cancel { background-position: 0 -128px; } +.ui-icon-plus { background-position: -16px -128px; } +.ui-icon-plusthick { background-position: -32px -128px; } +.ui-icon-minus { background-position: -48px -128px; } +.ui-icon-minusthick { background-position: -64px -128px; } +.ui-icon-close { background-position: -80px -128px; } +.ui-icon-closethick { background-position: -96px -128px; } +.ui-icon-key { background-position: -112px -128px; } +.ui-icon-lightbulb { background-position: -128px -128px; } +.ui-icon-scissors { background-position: -144px -128px; } +.ui-icon-clipboard { background-position: -160px -128px; } +.ui-icon-copy { background-position: -176px -128px; } +.ui-icon-contact { background-position: -192px -128px; } +.ui-icon-image { background-position: -208px -128px; } +.ui-icon-video { background-position: -224px -128px; } +.ui-icon-script { background-position: -240px -128px; } +.ui-icon-alert { background-position: 0 -144px; } +.ui-icon-info { background-position: -16px -144px; } +.ui-icon-notice { background-position: -32px -144px; } +.ui-icon-help { background-position: -48px -144px; } +.ui-icon-check { background-position: -64px -144px; } +.ui-icon-bullet { background-position: -80px -144px; } +.ui-icon-radio-off { background-position: -96px -144px; } +.ui-icon-radio-on { background-position: -112px -144px; } +.ui-icon-pin-w { background-position: -128px -144px; } +.ui-icon-pin-s { background-position: -144px -144px; } +.ui-icon-play { background-position: 0 -160px; } +.ui-icon-pause { background-position: -16px -160px; } +.ui-icon-seek-next { background-position: -32px -160px; } +.ui-icon-seek-prev { background-position: -48px -160px; } +.ui-icon-seek-end { background-position: -64px -160px; } +.ui-icon-seek-start { background-position: -80px -160px; } +.ui-icon-seek-first { background-position: -80px -160px; } +.ui-icon-stop { background-position: -96px -160px; } +.ui-icon-eject { background-position: -112px -160px; } +.ui-icon-volume-off { background-position: -128px -160px; } +.ui-icon-volume-on { background-position: -144px -160px; } +.ui-icon-power { background-position: 0 -176px; } +.ui-icon-signal-diag { background-position: -16px -176px; } +.ui-icon-signal { background-position: -32px -176px; } +.ui-icon-battery-0 { background-position: -48px -176px; } +.ui-icon-battery-1 { background-position: -64px -176px; } +.ui-icon-battery-2 { background-position: -80px -176px; } +.ui-icon-battery-3 { background-position: -96px -176px; } +.ui-icon-circle-plus { background-position: 0 -192px; } +.ui-icon-circle-minus { background-position: -16px -192px; } +.ui-icon-circle-close { background-position: -32px -192px; } +.ui-icon-circle-triangle-e { background-position: -48px -192px; } +.ui-icon-circle-triangle-s { background-position: -64px -192px; } +.ui-icon-circle-triangle-w { background-position: -80px -192px; } +.ui-icon-circle-triangle-n { background-position: -96px -192px; } +.ui-icon-circle-arrow-e { background-position: -112px -192px; } +.ui-icon-circle-arrow-s { background-position: -128px -192px; } +.ui-icon-circle-arrow-w { background-position: -144px -192px; } +.ui-icon-circle-arrow-n { background-position: -160px -192px; } +.ui-icon-circle-zoomin { background-position: -176px -192px; } +.ui-icon-circle-zoomout { background-position: -192px -192px; } +.ui-icon-circle-check { background-position: -208px -192px; } +.ui-icon-circlesmall-plus { background-position: 0 -208px; } +.ui-icon-circlesmall-minus { background-position: -16px -208px; } +.ui-icon-circlesmall-close { background-position: -32px -208px; } +.ui-icon-squaresmall-plus { background-position: -48px -208px; } +.ui-icon-squaresmall-minus { background-position: -64px -208px; } +.ui-icon-squaresmall-close { background-position: -80px -208px; } +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; } +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; } +.ui-icon-grip-solid-vertical { background-position: -32px -224px; } +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; } +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; } +.ui-icon-grip-diagonal-se { background-position: -80px -224px; } + + +/* Misc visuals +----------------------------------*/ + +.ui-corner-tl { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; } +.ui-corner-tr { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; } +.ui-corner-bl { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; } +.ui-corner-br { -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-top { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; } +.ui-corner-bottom { -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-right { -moz-border-radius-topright: 2px; -webkit-border-top-right-radius: 2px; border-top-right-radius: 2px; -moz-border-radius-bottomright: 2px; -webkit-border-bottom-right-radius: 2px; border-bottom-right-radius: 2px; } +.ui-corner-left { -moz-border-radius-topleft: 2px; -webkit-border-top-left-radius: 2px; border-top-left-radius: 2px; -moz-border-radius-bottomleft: 2px; -webkit-border-bottom-left-radius: 2px; border-bottom-left-radius: 2px; } +.ui-corner-all { -moz-border-radius: 2px; -webkit-border-radius: 2px; border-radius: 2px; } + +/* Overlays */ +.ui-widget-overlay { background: #aaaaaa url(../images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); } +.ui-widget-shadow { margin: -8px 0 0 -8px; padding: 8px; background: #aaaaaa url(../images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png) 50% 50% repeat-x; opacity: .30;filter:Alpha(Opacity=30); -moz-border-radius: 8px; -webkit-border-radius: 8px; border-radius: 8px; } + + +/* ===== UI resizable ===== */ + +.ui-resizable { position: relative;} +.ui-resizable-handle { position: absolute;font-size: 0.1px;z-index: 99999; display: block;} +.ui-resizable-disabled .ui-resizable-handle, .ui-resizable-autohide .ui-resizable-handle { display: none; } +.ui-resizable-n { cursor: n-resize; height: 7px; width: 100%; top: -5px; left: 0; } +.ui-resizable-s { cursor: s-resize; height: 7px; width: 100%; bottom: -5px; left: 0; } +.ui-resizable-e { cursor: e-resize; width: 7px; right: -5px; top: 0; height: 100%; } +.ui-resizable-w { cursor: w-resize; width: 7px; left: -5px; top: 0; height: 100%; } +.ui-resizable-se { cursor: se-resize; width: 12px; height: 12px; right: 1px; bottom: 1px; } +.ui-resizable-sw { cursor: sw-resize; width: 9px; height: 9px; left: -5px; bottom: -5px; } +.ui-resizable-nw { cursor: nw-resize; width: 9px; height: 9px; left: -5px; top: -5px; } +.ui-resizable-ne { cursor: ne-resize; width: 9px; height: 9px; right: -5px; top: -5px;} + +.ui-selectable-helper { position: absolute; z-index: 100; border:1px dotted black; } + +.ui-accordion { width: 100%; } +.ui-accordion .ui-accordion-header { cursor: pointer; position: relative; margin-top: 1px; zoom: 1; } +.ui-accordion .ui-accordion-li-fix { display: inline; } +.ui-accordion .ui-accordion-header-active { border-bottom: 0 !important; } +.ui-accordion .ui-accordion-header a { display: block; font-size: 1em; padding: .5em .5em .5em .7em; } +.ui-accordion-icons .ui-accordion-header a { padding-left: 2.2em; } +.ui-accordion .ui-accordion-header .ui-icon { position: absolute; left: .5em; top: 50%; margin-top: -8px; } +.ui-accordion .ui-accordion-content { padding: 1em 2.2em; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; display: none; zoom: 1; } +.ui-accordion .ui-accordion-content-active { display: block; } +.ui-autocomplete { position: absolute; cursor: default; } + +/* workarounds */ +* html .ui-autocomplete { width:1px; } /* without this, the menu expands to 100% in IE6 */ + +.ui-menu { list-style:none; padding: 2px; margin: 0; display:block; float: left; } +.ui-menu .ui-menu { margin-top: -3px; } +.ui-menu .ui-menu-item { margin:0; padding: 0; zoom: 1; float: left; clear: left; width: 100%; } +.ui-menu .ui-menu-item a { text-decoration:none; display:block; padding:.2em .4em; line-height:1.5; zoom:1; } +.ui-menu .ui-menu-item a.ui-state-hover, .ui-menu .ui-menu-item a.ui-state-active { font-weight: normal; margin: -1px; +} + + + +.ui-button { display: inline-block; position: relative; padding: 0; margin-right: .1em; text-decoration: none !important; cursor: pointer; text-align: center; zoom: 1; overflow: visible; } /* the overflow property removes extra width in IE */ +.ui-button-icon-only { width: 2.2em; } /* to make room for the icon, a width needs to be set here */ +button.ui-button-icon-only { width: 2.4em; } /* button elements seem to need a little more width */ +.ui-button-icons-only { width: 3.4em; } +button.ui-button-icons-only { width: 3.7em; } + +/*button text element */ +.ui-button .ui-button-text { display: block; line-height: 1.4; } +.ui-button-icon-only .ui-button-text, .ui-button-icons-only .ui-button-text { padding: .4em; text-indent: -9999999px; } +.ui-button-text-icon-primary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 1em .4em 2.1em; } +.ui-button-text-icon-secondary .ui-button-text, .ui-button-text-icons .ui-button-text { padding: .4em 2.1em .4em 1em; } +.ui-button-text-icons .ui-button-text { padding-left: 2.1em; padding-right: 2.1em; } +/* no icon support for input elements, provide padding by default */ +input.ui-button { padding: .4em 1em; } + +/*button icon element(s) */ +.ui-button-icon-only .ui-icon, .ui-button-text-icon-primary .ui-icon, .ui-button-text-icon-secondary .ui-icon, .ui-button-text-icons .ui-icon, .ui-button-icons-only .ui-icon { position: absolute; top: 50%; margin-top: -8px; } +.ui-button-icon-only .ui-icon { left: 50%; margin-left: -8px; } +.ui-button-text-icon-primary .ui-button-icon-primary, .ui-button-text-icons .ui-button-icon-primary, .ui-button-icons-only .ui-button-icon-primary { left: .5em; } +.ui-button-text-icon-secondary .ui-button-icon-secondary, .ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } +.ui-button-text-icons .ui-button-icon-secondary, .ui-button-icons-only .ui-button-icon-secondary { right: .5em; } + +/*button sets*/ +.ui-buttonset { margin-right: 5px; } +.ui-buttonset .ui-button { margin: 0 3px; background: #FAFAFA; border: 1px solid #D5D5D5; line-height: 14px; font-size: 11px; } + +/* workarounds */ +button.ui-button::-moz-focus-inner { border: 0; padding: 0; } /* reset extra padding in Firefox */ + + + +/* ===== UI Dialog ===== */ + +.ui-dialog { position: absolute; padding: .2em; width: 300px; overflow: hidden; } +.ui-dialog .ui-dialog-titlebar { position: relative; } +.ui-dialog .ui-dialog-title { float: left; height: 38px; font-size: 16px; padding: 0 12px 0 12px; line-height: 38px; } +.ui-dialog .ui-dialog-titlebar-close { position: absolute; right: 6px; top: 50%; width: 19px; margin: -10px 0 0 0; padding: 1px; height: 18px; } +.ui-dialog .ui-dialog-titlebar-close span { display: block; margin: 1px; } +.ui-dialog .ui-dialog-titlebar-close:hover, .ui-dialog .ui-dialog-titlebar-close:focus { padding: 1px; background: #fafafa; } +.ui-dialog .ui-dialog-content { position: relative; border: 0; padding: .5em 1em; background: none; overflow: auto; zoom: 1; } +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset { float: right; } +.ui-dialog .ui-dialog-buttonpane button { font-size: 10px; font-weight: bold; text-transform: uppercase; padding: 3px 12px 4px 12px; cursor: pointer; font-family: Arial, Helvetica, sans-serif; border: 1px solid #d5d5d5; color: #525252; margin: 5px; } +.ui-dialog .ui-resizable-se { width: 14px; height: 14px; right: 3px; bottom: 3px; } +.ui-draggable .ui-dialog-titlebar { cursor: move; } + + + +/* ===== UI Slider ===== */ + +.ui-slider { position: relative; text-align: left; } +.ui-slider .ui-slider-handle { position: absolute; z-index: 2; width: 16px; height: 16px; cursor: default; background: url(../images/ui/handle.png) no-repeat; border: none; cursor: pointer; } +.ui-slider .ui-slider-range { position: absolute; z-index: 1; font-size: .7em; display: block; border: 0; background: url(../images/ui/sliderOverlay.png) repeat-x; -moz-border-radius: 4px; -webkit-border-radius: 4px; -khtml-border-radius: 4px; border-radius: 4px; } + +.ui-slider-horizontal { height: 6px; background: url(../images/ui/sliderBg.png) repeat-x; clear: both; margin-top: 10px; } +.ui-slider-horizontal .ui-slider-handle { top: -5px; margin-left: -.6em; } +.ui-slider-horizontal .ui-slider-range { top: 0; height: 100%; } +.ui-slider-horizontal .ui-slider-range-min { left: 0; } +.ui-slider-horizontal .ui-slider-range-max { right: 0; } + +.ui-slider-vertical { width: 6px; height: 100px; background: url(../images/ui/sliderBgVert.png) repeat-y; } +.ui-slider-vertical .ui-slider-handle { left: -5px; margin-left: 0; margin-bottom: -.6em; } +.ui-slider-vertical .ui-slider-range { left: 0; width: 100%; background: url(../images/ui/sliderOverlayVert.png) repeat-y; } +.ui-slider-vertical .ui-slider-range-min { bottom: 0; } +.ui-slider-vertical .ui-slider-range-max { top: 0; } + + + +/* ===== UI Tabs ===== */ + +.ui-tabs { position: relative; padding: .2em; zoom: 1; } /* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */ +.ui-tabs .ui-tabs-nav { margin: 0; padding: .2em .2em 0; } +.ui-tabs .ui-tabs-nav li { list-style: none; float: left; position: relative; top: 1px; margin: 0 .2em 1px 0; border-bottom: 0 !important; padding: 0; white-space: nowrap; } +.ui-tabs .ui-tabs-nav li a { float: left; padding: .5em 1em; text-decoration: none; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected { margin-bottom: 0; padding-bottom: 1px; } +.ui-tabs .ui-tabs-nav li.ui-tabs-selected a, .ui-tabs .ui-tabs-nav li.ui-state-disabled a, .ui-tabs .ui-tabs-nav li.ui-state-processing a { cursor: text; } +.ui-tabs .ui-tabs-nav li a, .ui-tabs.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-selected a { cursor: pointer; } /* first selector in group seems obsolete, but required to overcome bug in Opera applying cursor: text overall if defined elsewhere... */ +.ui-tabs .ui-tabs-panel { display: block; border-width: 0; padding: 1em 1.4em; background: none; } +.ui-tabs .ui-tabs-hide { display: none !important; } + + + + +/* ===== UI Datepicker ===== */ + +.datepicker { width: 58px!important; } +.ui-datepicker { width: 17em; padding: .2em .2em 0; border: 1px solid #d5d5d5; background: #fafafa; margin-top: 1px; z-index: 3; display: none; } +.ui-datepicker-append { margin-left: 10px; } +.ui-datepicker .ui-datepicker-header { position:relative; padding:.2em 0; border: 1px solid #E7E7E7; background: url(../images/leftNavBg.png) repeat-x; } +.ui-datepicker .ui-datepicker-prev, .ui-datepicker .ui-datepicker-next { position:absolute; top: 2px; width: 1.8em; height: 1.8em; } +.ui-datepicker .ui-datepicker-prev-hover, .ui-datepicker .ui-datepicker-next-hover { top: 1px; } +.ui-datepicker .ui-datepicker-prev { left:2px; } +.ui-datepicker .ui-datepicker-next { right:2px; } +.ui-datepicker .ui-datepicker-prev-hover { left:1px; } +.ui-datepicker .ui-datepicker-next-hover { right:1px; } +.ui-datepicker .ui-datepicker-prev span, .ui-datepicker .ui-datepicker-next span { display: block; position: absolute; left: 50%; margin-left: -8px; top: 50%; margin-top: -8px; } +.ui-datepicker .ui-datepicker-title { margin: 0 2.3em; line-height: 1.8em; text-align: center; } +.ui-datepicker .ui-datepicker-title select { font-size:1em; margin:1px 0; } +.ui-datepicker select.ui-datepicker-month-year {width: 100%;} +.ui-datepicker select.ui-datepicker-month, +.ui-datepicker select.ui-datepicker-year { width: 49%;} +.ui-datepicker table {width: 100%; font-size: .9em; border-collapse: collapse; margin:0 0 .4em; } +.ui-datepicker table .ui-state-default { border: 1px solid #d5d5d5; } +.ui-datepicker table tbody { font-size: 11px; } +.ui-datepicker th { padding: .7em .3em; text-align: center; font-weight: bold; border: 0; } +.ui-datepicker td { border: 0; padding: 1px; } +.ui-datepicker td span, .ui-datepicker td a { display: block; padding: .2em; text-align: right; text-decoration: none; } +.ui-datepicker .ui-datepicker-buttonpane { background-image: none; margin: .7em 0 0 0; padding:0 .2em; border-left: 0; border-right: 0; border-bottom: 0; } +.ui-datepicker .ui-datepicker-buttonpane button { float: right; margin: .5em .2em .4em; cursor: pointer; padding: .2em .6em .3em .6em; width:auto; overflow:visible; } +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current { float:left; } + +/* with multiple calendars */ +.ui-datepicker.ui-datepicker-multi { width:auto; } +.ui-datepicker-multi .ui-datepicker-group { float:left; } +.ui-datepicker-multi .ui-datepicker-group table { width:95%; margin:0 auto .4em; } +.ui-datepicker-multi-2 .ui-datepicker-group { width:50%; } +.ui-datepicker-multi-3 .ui-datepicker-group { width:33.3%; } +.ui-datepicker-multi-4 .ui-datepicker-group { width:25%; } +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header { border-left-width:0; } +.ui-datepicker-multi .ui-datepicker-buttonpane { clear:left; } +.ui-datepicker-row-break { clear:both; width:100%; } + + +/* RTL support */ +.ui-datepicker-rtl { direction: rtl; } +.ui-datepicker-rtl .ui-datepicker-prev { right: 2px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next { left: 2px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-prev:hover { right: 1px; left: auto; } +.ui-datepicker-rtl .ui-datepicker-next:hover { left: 1px; right: auto; } +.ui-datepicker-rtl .ui-datepicker-buttonpane { clear:right; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button { float: left; } +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current { float:right; } +.ui-datepicker-rtl .ui-datepicker-group { float:right; } +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header { border-right-width:0; border-left-width:1px; } +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header { border-right-width:0; border-left-width:1px; } + + + +/* ===== UI Progress bar ===== */ + +.ui-progressbar { height: 16px; text-align: left; margin-top: 5px; background: url(../images/ui/progress.png) repeat-x; } +.ui-progressbar .ui-progressbar-value {margin: 0px; height:100%; overflow: hidden; display: block; background: url(../images/ui/progressOverlay.png) repeat-x; border-right: 1px solid #3c95d8; } +.pbar .ui-progressbar-value {display:block !important} +.pbar { overflow: hidden; background: url(../images/ui/progress.png) repeat-x;} +.percent { position: relative; text-align: right; margin-bottom: 5px; font-size: 11px; } +.elapsed { position: relative; text-align: right; margin-top: 5px; font-size: 11px;} \ No newline at end of file diff --git a/src/bb-themes/admin_default/favicon.ico b/src/bb-themes/admin_default/favicon.ico new file mode 100644 index 000000000..83db9f93a Binary files /dev/null and b/src/bb-themes/admin_default/favicon.ico differ diff --git a/src/bb-themes/admin_default/html/404.phtml b/src/bb-themes/admin_default/html/404.phtml new file mode 100644 index 000000000..52c52c959 --- /dev/null +++ b/src/bb-themes/admin_default/html/404.phtml @@ -0,0 +1,22 @@ +{% extends "layout_login.phtml" %} +{% block meta_title %}{% trans 'Error' %} {{ exception.getCode }}{% endblock %} +{% set help_query = exception.getMessage %} + +{% block content %} + + +
          +
          +

          {% trans 'Something went wrong here' %}

          +

          {% if exception.getCode == 0%}500{% else %} {{ exception.getCode }} {% endif %}

          + +

          {{ exception.getMessage }}!

          + {% if exception.getCode == 403 %} + + {% else %} + + {% endif %} +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/index.html b/src/bb-themes/admin_default/html/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-themes/admin_default/html/layout_blank.phtml b/src/bb-themes/admin_default/html/layout_blank.phtml new file mode 100644 index 000000000..372c1bbc9 --- /dev/null +++ b/src/bb-themes/admin_default/html/layout_blank.phtml @@ -0,0 +1 @@ +{% block content %}{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/layout_default.phtml b/src/bb-themes/admin_default/html/layout_default.phtml new file mode 100644 index 000000000..c65889a1d --- /dev/null +++ b/src/bb-themes/admin_default/html/layout_default.phtml @@ -0,0 +1,147 @@ +{% import "macro_functions.phtml" as mf %} +{% set profile = admin.profile_get %} +{% set company = guest.system_company %} + + + + {% block meta_title %}{% endblock %} - {{ company.name }} + + + + + + {% include "partial_bb_meta.phtml" %} + + {% include "partial_styles.phtml" %} + + + + + + + + + + + + {% block head %}{% endblock %} + + + +{% if not admin %} + +{% else %} +
          +
          +
          +
          {{ profile.name }}{% trans 'Hi,' %} {{ profile.name }}!
          +
          + +
          +
          +
          +
          +
          + + + + +
          + + {% if hide_menu %} + + {% block content_wide %}{% endblock %} + + {% else %} +
          + {% block left_top %}{% endblock %} + {% block nav %}{% include "partial_menu.phtml" %}{% endblock %} + {% block left_bottom %}{% endblock %} +
          + + {% block before_content %}{% endblock %} +
          + + + + {% block top_content %}{% endblock %} + {% block content %}{% endblock %} +
          + {% endif %} +
          +
          + + +
          + {% block js %}{% endblock %} + +{% endif %} + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/layout_login.phtml b/src/bb-themes/admin_default/html/layout_login.phtml new file mode 100644 index 000000000..e3f1efea7 --- /dev/null +++ b/src/bb-themes/admin_default/html/layout_login.phtml @@ -0,0 +1,51 @@ + + + + {% block meta_title %}{% endblock %} + + + + {% include "partial_bb_meta.phtml" %} + + + + + + + + + + + + + + + + + +
          +
          +
          + +
          + +
          +
          +
          +
          +
          + +{% block content %}{% endblock %} + + + +{% block js %}{% endblock %} + + diff --git a/src/bb-themes/admin_default/html/macro_functions.phtml b/src/bb-themes/admin_default/html/macro_functions.phtml new file mode 100644 index 000000000..c3f0af8f4 --- /dev/null +++ b/src/bb-themes/admin_default/html/macro_functions.phtml @@ -0,0 +1,140 @@ +{% macro q(bool) %} +{% if bool %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %} +{% endmacro %} + +{% macro selectbox(name, options, selected, required, nullOption) %} + +{% endmacro %} + +{% macro selectboxtld(name, options, selected, required) %} + +{% endmacro %} + +{% macro table_search() %} +
          +
          +
          + +
          +
          +
          +{% endmacro %} + +{% macro build_form(elements, values) %} + {% for name, element in elements %} +
          + {% if element[0] == 'select'%} + +
          + +
          +
          + {% elseif element[0] == 'radio'%} + +
          + {% for k,v in element[1].multiOptions %} + + {% endfor %} +
          +
          + {% elseif element[0] == 'textarea'%} + +
          + +
          +
          + {% else %} + +
          + +
          +
          + {% endif %} +
          + {% endfor %} +{% endmacro %} + +{% macro currency_format(price, currency) %} + {% set c = guest.currency_get({"code":currency}) %} + {% set p = (price)|number %} + {% if c.price_format == 1 %} + {% set p = p|number('2', '.', '') %} + {% elseif c.price_format == 2 %} + {% set p = p|number('2', '.', ',') %} + {% elseif c.price_format == 3 %} + {% set p = p|number('2', ',', '.') %} + {% elseif c.price_format == 4 %} + {% set p = p|number('0', '', ',') %} + {% elseif c.price_format == 5 %} + {% set p = p|number(0, '', '') %} + {% endif %} + {{ c.format|replace({'{{price}}': p }) }} +{% endmacro %} + +{% macro currency(price, currency) %} + {% if currency == NULL %} + {% set c = guest.cart_get_currency %} + {% else %} + {% set c = guest.currency_get({"code":currency}) %} + {% endif %} + + {% set p = (price * c.conversion_rate) %} + + {% if c.price_format == 1 %} + {% set p = p|number('2', '.', '') %} + {% elseif c.price_format == 2 %} + {% set p = p|number('2', '.', ',') %} + {% elseif c.price_format == 3 %} + {% set p = p|number('2', ',', '.') %} + {% elseif c.price_format == 4 %} + {% set p = p|number('0', '', ',') %} + {% elseif c.price_format == 5 %} + {% set p = p|number(0, '', '') %} + {% endif %} + + {{ c.format|replace({'{{price}}': p }) }} +{% endmacro %} + +{% macro status_name(status) %}{% if status %}{{ status|replace({'_': " "})|title|trans }}{% else %}-{% endif %}{% endmacro %} + +{% macro period_name(period) %} + {{ guest.system_period_title({"code":period}) }} +{% endmacro %} + +{% macro markdown_quote(text) %} + + + +{% for line in text|split('\n') %} +> {{ line }} +{% endfor %} +{% endmacro %} + +{% macro bb_editor(selector) %} +{% if guest.extension_is_on({"mod":"wysiwyg"}) %} +{% include "mod_wysiwyg_js.phtml" with {"class":selector|trim('.#')} %} +{% else %} + + + + + +{% endif %} +{% endmacro %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_activity_index.phtml b/src/bb-themes/admin_default/html/mod_activity_index.phtml new file mode 100644 index 000000000..141f30f9a --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_activity_index.phtml @@ -0,0 +1,57 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}System activity{% endblock %} +{% set active_menu = 'activity' %} + +{% block content %} +
          +
          {% trans 'System activity' %}
          + +{{ mf.table_search }} + + + + + + + + + + + + + {% set events = admin.activity_log_get_list({"per_page":10, "page":request.page}|merge(request)) %} + {% for i, event in events.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Message' %}{% trans 'Ip' %}{% trans 'Country' %}{% trans 'Date' %} 
          + {% if event.client %} + {{ event.client.name }} {{ event.client.name }} + {% elseif event.staff %} + {{ event.staff.name }} {{ event.staff.name }} + {% else %} + Guest + {% endif %} +
          {{ event.message }}
          {{ event.ip }}{{ event.ip|ipcountryname }}{{ event.created_at|date('Y-m-d H:i') }} + +
          + {% trans 'The list is empty' %} +
          + +
          + +{% include "partial_pagination.phtml" with {'list': events, 'url':'activity'} %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_client_group.phtml b/src/bb-themes/admin_default/html/mod_client_group.phtml new file mode 100644 index 000000000..1147d701c --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_client_group.phtml @@ -0,0 +1,37 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'client' %} +{% block meta_title %}{{ group.title}}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} +
          + +
          +
          {{ group.title}}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_client_index.phtml b/src/bb-themes/admin_default/html/mod_client_index.phtml new file mode 100644 index 000000000..2e2984a3b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_client_index.phtml @@ -0,0 +1,331 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'client' %} +{% block meta_title %}{% trans 'Clients' %}{% endblock %} + +{% block top_content %} +{% if request.show_filter %} +
          +
          {% trans 'Filter clients' %}
          +
          + +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('group_id', admin.client_group_get_pairs, request.group_id, 0, 'All groups') }} +
          +
          +
          + +
          + +
          + + + + +
          +
          +
          + +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +{% else %} +{% set count_clients = admin.client_get_statuses %} + +{% endif %} +{% endblock %} + +{% block content %} +
          + + + +
          + +
          +
          + {{ mf.table_search }} + + + + + + + + + + + + + + {% set clients = admin.client_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for client in clients.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Name' %}{% trans 'Company' %}{% trans 'Email' %}{% trans 'Status' %}{% trans 'Date' %} 
          + {{ client.id }} + + + {{ client.first_name|truncate('1', null, '.') }} {{ client.last_name|truncate(15) }}{{ client.company|default('-')|truncate(30) }}{{ client.email|truncate(30) }}{{ mf.status_name(client.status) }}{{ client.created_at|date('Y-m-d') }} + + +
          {% trans 'The list is empty' %}
          + + {% include "partial_pagination.phtml" with {'list': clients, 'url':'client'} %} +
          + +
          + +
          + +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('group_id', admin.client_group_get_pairs, request.group_id, 0, 'Select group') }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + {# mf.selectbox('state', guest.system_states, request.state, 0, 'Select state') #} + +
          +
          +
          +
          + +
          + {{ mf.selectbox('country', guest.system_countries, request.country, 0, 'Select country') }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, request.currency, 0, 'Select currency') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          + + + + + + + + + + {% for id,group in admin.client_group_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Actions' %}
          {{ group }} + + +
          {% trans 'The list is empty' %}
          +
          + + +
          + +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block js %} + + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_client_login_history.phtml b/src/bb-themes/admin_default/html/mod_client_login_history.phtml new file mode 100644 index 000000000..2657b6043 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_client_login_history.phtml @@ -0,0 +1,48 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Clients login history{% endblock %} +{% set active_menu = 'activity' %} + +{% block content %} +
          +
          {% trans 'Clients logins history' %}
          + +{{ mf.table_search }} + + + + + + + + + + + + + {% set history = admin.client_login_history_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, event in history.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + + +
          {% trans 'Client' %}{% trans 'IP' %}{% trans 'Country' %}{% trans 'Date' %} 
          {{ event.client.email }}{{ event.client.first_name }} {{ event.client.last_name }}{{ event.ip }}{{ event.ip|ipcountryname|default('Unknown') }}{{ event.created_at|date('Y-m-d H:i') }} + +
          + {% trans 'The list is empty' %} +
          +{% include "partial_pagination.phtml" with {'list': history, 'url':'client/logins'} %} +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_client_manage.phtml b/src/bb-themes/admin_default/html/mod_client_manage.phtml new file mode 100644 index 000000000..02881ff52 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_client_manage.phtml @@ -0,0 +1,720 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'client' %} +{% block meta_title %}{{ client.first_name }} {{ client.last_name }}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + + + +
          +
          +
          + +
          + {{ client.first_name }} {{ client.last_name }} +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          ID:{{ client.id }}
          Name:{{ client.first_name }} {{ client.last_name }}
          Company:{{ client.company|default('-') }}
          Email:{{ client.email }}
          Status:{{ mf.status_name(client.status) }}
          Group:{{ client.group|default('-') }}
          Currency:{{ client.currency|default('-') }}
          IP:{{ client.ip|default('-') }} {{ client.ip|ipcountryname }}
          API Key:{{ client.api_token|default('-') }}
          Address: + + {{ guest.system_countries[client.country] }} {{ client.state }} {{ client.address_1 }} {{ client.address_2 }} {{ client.city }} {{ client.postcode }} +
          Registered at:{{ client.created_at|date('M d, Y') }}
          + Login to client area + Delete +
          +
          + +
          + +
          +

          {% trans 'Client profile details' %}

          +
          + +
          +
          +
          + +
          + + + +
          +
          +
          +
          + +
          + + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('group_id', admin.client_group_get_pairs, client.group_id, 0, 'Select group') }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          +
          +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          • +
          • +
          • +
          +
          +
          +
          + +
          + +
          + {% trans 'Address and contact details' %} +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('country', guest.system_countries, client.country, 0, 'Select country') }} +
          +
          +
          +
          + +
          + {# mf.selectbox('state', guest.system_states, client.state, 0, 'Select state') #} + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • +
          • +
          +
          +
          +
          + +
          + +
          + {% trans 'Additional settings' %} +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, client.currency, 0, 'Select currency') }} +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          + +
          +

          {% trans 'Change password' %}

          +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +

          {% trans 'Custom fields' %}

          +

          {% trans 'Use these fields to define custom client details' %}

          +
          + +
          +
          + {% for i in 1..10 %} + {% set fn = 'custom_'~i %} +
          + +
          + +
          +
          +
          + {% endfor %} + + + +
          +
          +
          + +
          +
          +

          {% trans 'Client payments history' %}

          +
          + + + + + + + + + + + + + {% set transactions = admin.client_balance_get_list({"per_page":20, "client_id":client.id}) %} + {% for i, tx in transactions.list %} + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
          {% trans 'Amount' %}{% trans 'Description' %}{% trans 'Date' %} 
          {{mf.currency_format(tx.amount, tx.currency)}}{{tx.description}}{{tx.created_at|date("Y-m-d H:i")}} + +
          {% trans 'The list is empty' %}
          {% trans 'Balance' %}: {{ mf.currency_format(client.balance, client.currency) }}
          + +
          +

          {% trans 'Add funds for client' %}

          +
          + +
          +
          +
          + +
          + {{ client.currency }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +
          +
          +

          {% trans 'Client orders' %}

          +
          + + + + + + + + + + + + + + {% set orders = admin.order_get_list({"per_page":"20", "hide_addons":1, "client_id":client.id}) %} + {% for order in orders.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
          IDTitleAmountPeriodStatus 
          {{order.id}}{{order.title|truncate(30) }}{{ mf.currency_format( order.total, order.currency) }}{{ mf.period_name( order.period) }}{{ mf.status_name(order.status) }}
          {% trans 'The list is empty' %}
          + New order +
          +
          + +
          +
          +

          {% trans 'Client invoices' %}

          +
          + + + + + + + + + + + + + + {% set invoices = admin.invoice_get_list({"per_page":"20", "client_id":client.id}) %} + {% for invoice in invoices.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
          #AmountIssued atPaid atStatus 
          {{invoice.serie_nr}}{{ mf.currency_format( invoice.total, invoice.currency) }}{{ invoice.created_at|date('Y-m-d') }}{% if invoice.paid_at %}{{ invoice.paid_at|date('Y-m-d') }}{% else %}-{% endif %}{{ mf.status_name(invoice.status) }}
          {% trans 'The list is empty' %}
          + New invoice +
          +
          + +
          +
          +

          {% trans 'Client support tickets' %}

          +
          + + + + + + + + + + + + + {% set tickets = admin.support_ticket_get_list({"per_page":"20", "client_id":client.id}) %} + {% for ticket in tickets.list %} + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
          IDSubjectHelp deskStatus 
          {{ ticket.id }}{{ ticket.subject|truncate(30) }}{{ ticket.helpdesk.name }}{{ mf.status_name(ticket.status) }}
          {% trans 'The list is empty' %}
          + New support ticket +
          +
          + +
          +
          +

          {% trans 'Logins history' %}

          +
          + + + + + + + + + + + + {% set logins = admin.client_login_history_get_list({"per_page":10, "page":request.page, "client_id":client.id}) %} + {% for i, login in logins.list %} + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'IP' %}{% trans 'Country' %}{% trans 'Date' %}
          {{login.ip}}{{login.ip|ipcountryname}}{{login.created_at|date('l, d F Y')}}
          {% trans 'The list is empty' %}
          +
          + +
          +
          +

          {% trans 'Emails sent to client' %}

          +
          + + + + + + + + + + + + + {% set emails = admin.email_email_get_list({"per_page":"20", "client_id":client.id}) %} + {% for i, email in emails.list %} + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Email subject' %}{% trans 'To' %}{% trans 'Date sent' %} 
          {{email.subject}}{{ email.recipients }}{{email.created_at|date('l, d F Y')}}
          {% trans 'The list is empty' %}
          +
          + +
          +
          +

          {% trans 'Transactions received' %}

          +
          + + {% set transactions = admin.invoice_transaction_get_list({"client_id":client.id,"per_page":100 }).list %} + + + + + + + + + + + + + + + {% for i, tx in transactions %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'ID' %}{% trans 'Type' %}{% trans 'Gateway' %}{% trans 'Amount' %}{% trans 'Status' %}{% trans 'Date' %} 
          {{tx.txn_id}}{{tx.type}}{{tx.gateway}}{{ mf.currency_format( tx.amount, tx.currency) }}{{ mf.status_name(tx.status) }}{{tx.created_at|bb_datetime}} + +
          {% trans 'The list is empty' %}
          +
          +
          +
          + + +{# +
          +
          +
          +
          +
          {{ client.first_name }} {{ client.last_name }}
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          Company:{{ client.company }}
          Registered at:{{ client.created_at|date('M d, Y') }}
          Email:{{ client.email }}
          Status:{{ mf.status_name(client.status) }}
          IP:{{ client.ip }} {{ client.ip|ipcountryname }}
          Address:{{ client.address_1 }} {{ client.address_2 }}
          +
          +
          + +
          + +
          +
          2 Latest orders
          + + {% set orders = admin.order_get_list({"per_page":"2", "hide_addons":1, "client_id":client.id}) %} + {% for order in orders.list %} +
          + + +
          + +
          + +
          +
          +
          +
          +
          + {% else %} +
          + The list is empty +
          + {% endfor %} +
          +
          +
          +
          +#} + +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_extension_index.phtml b/src/bb-themes/admin_default/html/mod_extension_index.phtml new file mode 100644 index 000000000..12387708e --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_extension_index.phtml @@ -0,0 +1,190 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Extensions' %}{% endblock %} +{% set active_menu = 'extensions' %} + +{% block content %} +
          + + + +
          + +
          +
          +
          +
          BoxBilling extensions
          +

          {% trans %}Activate or deactivate extensions{% endtrans %}

          +
          + + + + + + + + + + + + {% for ext in admin.extension_get_list %} + + + + + + + {% else %} + + + + {% endfor %} + + + + + + +
           {% trans 'Extension' %}{% trans 'Description' %}{% trans 'Actions' %}
          {{ext.name}}{{ ext.name }} {{ ext.version }}
          by {{ ext.author }}
          + {{ ext.description|bbmd }} + Learn more + + {% if ext.type == 'mod' %} + {% if ext.status == 'installed' %} + + {% else %} + Activate + {% endif %} + {% else %} +   + {% endif %} + + {% if ext.has_settings %} + + {% endif %} +
          + {% trans 'The list is empty' %} +
          + +
          +
          BoxBilling modules on extension site
          +
          + {% include "partial_extensions.phtml" %} +
          + +
          + + + + + + + + + + {% for hook in admin.hook_get_list({"per_page":90}).list %} + + + + + {% endfor %} + +
          {% trans 'Extension' %}{% trans 'Hook' %}
          + {{ hook.rel_id | capitalize}} + + {{ hook.event }} +
          +
          + +
          +
          +

          {% trans 'Automatic update' %}

          +

          {% trans %}Automatic updater is a tool to update BoxBilling to latest version in one click. Works on these hosting environments where PHP has permissions to overwrite files uploaded via FTP.{% endtrans %}

          +
          + + + +
          +

          {% trans %}Manual update{% endtrans %}

          +

          {% trans %}Manual update is a solution when auto updater can not work on current installation environment{% endtrans %}

          +
          + +
          +
            +
          • Download latest BoxBilling from www.boxbilling.com
          • +
          • Extract files at your computer
          • +
          • Upload (overwrite) extracted files via FTP to {{ constant('BB_PATH_ROOT') }}
          • +
          • When upload is complete, execute {{constant('BB_URL')}}bb-update.php in your browser
          • +
          • Your BoxBilling is now updated to latest version.
          • +
          +
          +
          + +
          +
          +

          {% trans 'Extending BoxBilling' %}

          +

          {% trans %}BoxBilling gives developers all the capabilities to customize, integrate & extend the core system into your own website & applications.{% endtrans %}

          +
          +
          +

          More extensions

          +

          If you can not find extensions you are looking for in this admin area, please visit extensions site at http://extensions.boxbilling.com

          + +

          How to create new extension

          +
          +
            +
          • Create free account at Github
          • +
          • Create new public repository dedicated for extension only
          • +
          • Repository must have plugin json file. More information
          • +
          • Login to BoxBilling extensions site with github account.
          • +
          • If your repository contains valid json file, it can be registered in extensions site.
          • +
          • Registered extensions can be visible in every BoxBilling admin area.
          • +
          +
          + +

          Supported extension types

          +
          +
            +
          • Payment gateways
          • +
          • Server managers
          • +
          • Domain registrars
          • +
          • Client area themes
          • +
          • Admin area themes
          • +
          • Translations for client and admin areas
          • +
          • Event hooks - Hooks can be injected into the process, change its behaviour, stop executing actions
          • +
          • API module - External program which uses BoxBilling API
          • +
          +
          + +

          Extension support

          +

          Contact extensions developers directly for support. You can find issue tracker on extension site.

          +
          +
          +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_extension_languages.phtml b/src/bb-themes/admin_default/html/mod_extension_languages.phtml new file mode 100644 index 000000000..c2508261e --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_extension_languages.phtml @@ -0,0 +1,70 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Client area languages{% endblock %} +{% set active_menu = 'extensions' %} + +{% block content %} +
          + + + +
          +
          +
          + + + + + + + + + + {% for lang in admin.extension_languages %} + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Language' %}{% trans 'Code' %}
          {{ lang.title }}{{ lang.locale }}
          + {% trans 'The list is empty' %} +
          +
          + +
          + {% include "partial_extensions.phtml" with {'type': 'translation', 'header':"List of translations on extensions site"} only %} +
          +

          {% trans 'BoxBilling in your language' %}

          +

          {% trans %}Although BoxBilling displays in U.S. English by default, the software has the built-in capability to be used in any language. Follow instructions bellow to install new language.{% endtrans %}

          + +
          + +
          + +
          {% trans 'Changing default language' %}
          +

          {% trans %}Default language can be set in{% endtrans %} bb-config.php parameter define('BB_LOCALE', 'en_US');

          + +
          {% trans 'Removing language' %}
          +

          {% trans %}Removing languages from BoxBilling is really simple. Just delete language folder you wish from{% endtrans %} {{ constant('BB_PATH_LANGS') }}

          +
          +
          +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_index_dashboard.phtml b/src/bb-themes/admin_default/html/mod_index_dashboard.phtml new file mode 100644 index 000000000..1dafbf75a --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_index_dashboard.phtml @@ -0,0 +1,321 @@ +{% extends "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Dashboard' %}{% endblock %} + +{% block content %} + +{% for msg in admin.system_messages({"type":"info"}) %} +
          +

          {% trans 'INFORMATION' %}: {{ msg }}

          +
          +{% endfor %} + +{% if admin.system_is_allowed({"mod":"stats"}) %} +
          +
          {{ guest.system_company.name }} {% trans 'Statistics' %}
          + {% set stats = admin.stats_get_summary %} + {% set income = admin.stats_get_summary_income %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {% trans 'Metric' %}{% trans 'Today' %}{% trans 'Yesterday' %}{% trans 'This month so far' %}{% trans 'Last month' %}{% trans 'Total' %}
          {% trans 'Income' %}{{ mf.currency_format(income.today) }}{{ mf.currency_format(income.yesterday) }}{{ mf.currency_format(income.this_month) }}{{ mf.currency_format(income.last_month) }}{{ mf.currency_format(income.total) }}
          {% trans 'Clients' %}{{ stats.clients_today }}{{ stats.clients_yesterday }}{{ stats.clients_this_month }}{{ stats.clients_last_month }}{{ stats.clients_total }}
          {% trans 'Orders' %}{{ stats.orders_today }}{{ stats.orders_yesterday }}{{ stats.orders_this_month }}{{ stats.orders_last_month }}{{ stats.orders_total }}
          {% trans 'Invoices' %}{{ stats.invoices_today }}{{ stats.invoices_yesterday }}{{ stats.invoices_this_month }}{{ stats.invoices_last_month }}{{ stats.invoices_total }}
          {% trans 'Tickets' %}{{ stats.tickets_today }}{{ stats.tickets_yesterday }}{{ stats.tickets_this_month }}{{ stats.tickets_last_month }}{{ stats.tickets_total }}
          +
          +{% endif %} + +{% set orders = admin.order_get_list({"per_page":"5", "hide_addons":1, "status":"active"}) %} +{% if orders.list|length > 0 %} +
          +
          +
          +
          +
          {% trans 'Latest orders' %}
          + +
          +
          + + + + + + + + + {% for order in orders.list %} + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Order' %}{% trans 'Client' %}
          {{ order.title|truncate(35) }}{{ order.client.first_name|truncate(1, null, '.') }} {{ order.client.last_name }}
          {% trans 'The list is empty' %}
          +
          +
          +
          + +
          +
          +
          +
          {% trans 'Product sales' %}
          +
          +
          + + + + + + + + + {% for p in admin.stats_get_product_summary %} + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Product/Service' %}{% trans 'Orders' %}
          {{ p.title|truncate(35) }}{{ p.orders }}
          {% trans 'No active orders available' %}
          +
          +
          +
          +
          +
          +{% endif %} + +{% if admin.system_is_allowed({"mod":"stats"}) %} +
          +
          +
          {% trans 'Define date interval for graphs' %}
          +
          +
          + +
          +
          +
          +
            +
          • +
          • -
          • +
          • +
          • +
          +
          +
          +
          +
          +
          +
          + +
          +
          +
          {% trans 'Income' %}
          +
          +
          +
          +
          +
          + +
          +
          +
          {% trans 'Orders' %}
          +
          +
          +
          +
          +
          + +
          +
          +
          {% trans 'Invoices' %}
          +
          +
          +
          +
          +
          + +
          +
          +
          {% trans 'Clients' %}
          +
          +
          +
          +
          +
          + +
          +
          +
          {% trans 'Support tickets' %}
          +
          +
          +
          +
          +
          +{% endif %} + +{% if admin.system_is_allowed({"mod":"activity"}) %} +
          + + +
          +
          + +
          + + + {% set events = admin.activity_log_get_list({"per_page":10,"only_clients":1}) %} + {% for i, event in events.list %} + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {{ event.client.name }}{{ event.client.name|truncate(40) }}{{ event.message|truncate(50) }}{{ event.created_at|timeago }} ago
          + {% trans 'The list is empty' %} +
          +
          + +
          + + + {% set events = admin.activity_log_get_list({"per_page":10,"only_staff":1}) %} + {% for i, event in events.list %} + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {{ event.staff.name }}{{ event.staff.name }}{{ event.message|truncate(50) }}{{ event.created_at|timeago }} ago
          + {% trans 'The list is empty' %} +
          +
          + +
          + +
          +
          +{% endif %} + +{% endblock %} + +{% block js %} + +{% if admin.system_is_allowed({"mod":"stats"}) %} + + + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_gateway.phtml b/src/bb-themes/admin_default/html/mod_invoice_gateway.phtml new file mode 100644 index 000000000..e453cc2eb --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_gateway.phtml @@ -0,0 +1,110 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Gateway' %} {{ gateway.title }}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          +
          +
          {% trans 'Payment gateway configuration' %} {{ gateway.title }}
          +
          + +
          +
          {{ gateway.title }}
          + {{ gateway.description|raw }} +
          + +
          +
          +
          + +
          + +
          +
          +
          + + {# Build form elements from registrar configuration array #} + {{ mf.build_form(gateway.form, gateway.config) }} + +
          + +
          + {% set currencies = guest.currency_get_pairs %} + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + {% if gateway.supports_one_time_payments %} +
          + +
          + + +
          +
          +
          + {% else %} + + {% endif %} + + {% if gateway.supports_subscriptions %} +
          + +
          + + +
          +
          +
          + {% else %} + + {% endif %} + +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_gateways.phtml b/src/bb-themes/admin_default/html/mod_invoice_gateways.phtml new file mode 100644 index 000000000..88efd1bd4 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_gateways.phtml @@ -0,0 +1,111 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'system' %} +{% block meta_title %}Payment gateways{% endblock %} + +{% block content %} +
          + + + +
          +
          +
          + {{ mf.table_search }} + + + + + + + + + + + + + + {% for gateway in admin.invoice_gateway_get_list({"per_page":100}|merge(request)).list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Title' %}{% trans 'Code' %}{% trans 'Enabled' %}{% trans 'Allow one time payments' %}{% trans 'Allow subscriptions' %} 
          {{ gateway.title }}{{ gateway.code }}{{ mf.q(gateway.enabled) }}{{ mf.q(gateway.allow_single) }}{{ mf.q(gateway.allow_recurrent) }} + + + +
          + {% trans 'The list is empty' %} +
          +
          + +
          + {% include "partial_extensions.phtml" with {'type': 'payment-gateway', 'header':"List of payment gateways on extensions site"} only %} +
          +

          {% trans 'Adding new payment gateway' %}

          +

          {% trans 'Although BoxBilling ships with most popular payment gateways, you can install other gateways.' %}

          +

          {% trans 'Follow these instructions to install new payment gateway.' %}

          +
          +
            +
          • {% trans 'Check for payment gateway at' %} BoxBilling extensions site {% trans 'for more payment gateways' %}
          • +
          • {% trans 'Download payment gateway extension file and place it to' %}{{ constant('BB_PATH_LIBRARY') }}/Payment/Adapter
          • +
          • {% trans 'After file is uploaded in place, reload this page.' %}
          • +
          • {% trans 'Select uploaded file name and click on install.' %}
          • +
          • {% trans 'Payment gateway will be installed in BoxBilling and can be configured in \"Payment gateways\" tab.' %}
          • +
          • {% trans 'For developers. Read' %} BoxBilling documentation {% trans 'to learn how to create your own payment gateway and share it with community' %}
          • +
          +
          +
          + + {% if admin.invoice_gateway_get_available|length > 0 %} + + + + + + + + + + {% for gtw in admin.invoice_gateway_get_available %} + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Code' %}{% trans 'Install' %}
          {{ gtw }} + +
          + {% trans 'All payment gateways installed' %} +
          + {% endif %} +
          + +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_invoice_index.phtml b/src/bb-themes/admin_default/html/mod_invoice_index.phtml new file mode 100644 index 000000000..d090ac589 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_index.phtml @@ -0,0 +1,211 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Invoices' %}{% endblock %} +{% set active_menu = 'invoice' %} + +{% block top_content %} +{% if request.show_filter %} +
          +
          {% trans 'Filter invoices' %}
          +
          + +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, request.currency, 0, 'All currencies') }} +
          +
          +
          + +
          + +
          + + + + +
          +
          +
          + + {# +
          + +
          + + + +
          +
          +
          + #} +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +{% else %} +{% set statuses = admin.invoice_get_statuses %} +
          + +
          +
          +{% endif %} + +{% endblock %} + +{% block content %} + + +
          + + +
          +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set invoices = admin.invoice_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for invoice in invoices.list %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Invoice' %}{% trans 'Amount' %}{% trans 'Issued at' %}{% trans 'Paid at' %}{% trans 'Status' %} 
          {{ invoice.buyer.email }}{{invoice.client.first_name|truncate(1, null, '.')}} {{invoice.client.last_name|truncate(20)}}{{ invoice.serie_nr }}{{ mf.currency_format( invoice.total, invoice.currency) }}{{ invoice.created_at|date('Y-m-d') }}{% if invoice.paid_at %}{{ invoice.paid_at|date('Y-m-d') }}{% else %}-{% endif %}{{ mf.status_name(invoice.status) }} + + +
          {% trans 'The list is empty' %}
          + + {% include "partial_pagination.phtml" with {'list': invoices, 'url':'invoice'} %} +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          +
          +
          +
          +
          + +{% endblock %} + + +{% block head %} + + +{% endblock %} + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_invoice.phtml b/src/bb-themes/admin_default/html/mod_invoice_invoice.phtml new file mode 100644 index 000000000..dfb972c5c --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_invoice.phtml @@ -0,0 +1,621 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Invoice' %} {{ invoice.serie }}{{ "%05s"|format(invoice.nr) }}{% endblock %} +{% set active_menu = 'invoice' %} + + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + +
          +
          +
          {% trans 'Invoice' %} #{{ invoice.id }}
          +
          + + + +
          +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + {% if invoice.tax %} + + + + + {% endif %} + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if invoice.notes %} + + + + + {% endif %} + + + + + + + +
          {{ invoice.id }}
          {{ invoice.serie }}{{ "%05s"|format(invoice.nr) }}
          {{ invoice.currency }}
          {{ invoice.client.first_name }} {{ invoice.client.last_name }}
          {{ mf.status_name(invoice.status) }}
          {{ mf.currency_format(invoice.tax, invoice.currency) }}
          {{ mf.currency_format(invoice.total, invoice.currency) }}
          {{ invoice.created_at|bb_date }}
          {{ invoice.due_at|bb_date }}
          {% if invoice.paid_at %}{{ invoice.paid_at|bb_date }}{% else %}-{% endif %}
          {% if invoice.reminded_at %}{{ invoice.reminded_at|bb_date }} ({{invoice.reminded_at|timeago}} ago) {% endif %}
          {{ invoice.notes|bbmd }}
          +
          + View as client + Delete + {% if invoice.status == 'unpaid' %} + Send reminder + Mark as paid + {% endif %} + + {% if invoice.status == 'paid' %} + Refund + {% endif %} +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          +
            +
          • + +
          • +
          •  
          • +
          • + +
          • +
          +
          +
          +
          + +
          + +
          +
            +
          • + +
          • +
          •  
          • +
          • + +
          • +
          • %
          • +
          +
          +
          +
          +
          + +
          + {{ mf.selectbox('gateway_id', guest.invoice_gateways({"format":"pairs"}), invoice.gateway_id, 0, 'Select payment method') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +
          +
          +
          + + +
          + +
          + + + + +
          +
          + +
          +
          + +
          + {% set seller = invoice.seller %} +
          +
          + Company details at the moment of purchase + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +
          + + +
          + {% set buyer = invoice.buyer %} +
          +
          + Client details at the moment of purchase + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {# mf.selectbox('buyer_state', guest.system_states, buyer.state, 0, 'Select state') #} + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('buyer_country', guest.system_countries, buyer.country, 0, 'Select country') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +
          + +
          +
          + + +
          +
          +
          {% trans 'Invoice items' %}
          +
          + +{% if not invoice.approved %} + +
          +
          + + + + + + + + + + + + {% for i, item in invoice.lines %} + + + + + + + {% endfor %} + + + + + + + + + + + + + + + + + + + + + + + +
          {% trans 'Title' %}{% trans 'Price' %}{% trans 'Tax' %} 
          {{ invoice.currency }} + + + +
          {{ invoice.currency }} 
          + Subtotal: {{ mf.currency_format(invoice.subtotal, invoice.currency) }} +
          + {{ invoice.taxname }} {{ invoice.taxrate }}%: {{ mf.currency_format(invoice.tax, invoice.currency) }} +
          + Total: {{ mf.currency_format(invoice.total, invoice.currency) }} +
          + {% if not invoice.approved %} + Approve + {% endif %} + +
          +
          + + +
          + +{% else %} + + + + + + + + + + + + {% for i, item in invoice.lines %} + + + + + + + + + + {% endfor %} + + + + + + + + + + + + + +
          {% trans 'Title' %}{% trans 'Tax' %}{% trans 'Total' %}
          {{ i+1 }}. +
          +
          +
          + {% if item.order_id %} + {{ item.title }} {% if item.quantity > 1 %} x {{ item.quantity }} {# item.unit #}{% endif %} + {% else %} + {{ item.title }} {% if item.quantity > 1 %} x {{ item.quantity }} {# item.unit #}{% endif %} + {% endif %} + {{ mf.currency_format(item.tax,invoice.currency) }}{{ mf.currency_format( item.total, invoice.currency) }}
          + Subtotal: {{ mf.currency_format(invoice.subtotal, invoice.currency) }} +
          + {{ invoice.taxname }} {{ invoice.taxrate }}%: {{ mf.currency_format(invoice.tax, invoice.currency) }} +
          + Total: {{ mf.currency_format(invoice.total, invoice.currency) }} +
          +{% endif %} + +
          + +{% set transactions = admin.invoice_transaction_get_list({"invoice_id":invoice.id,"per_page":100 }).list %} + +{% if transactions|length > 0 %} + +
          +
          +
          {% trans 'Transactions' %}
          +
          + + + + + + + + + + + + + + + {% for i, tx in transactions %} + + + + + + + + + + {% endfor %} + +
          {% trans 'ID' %}{% trans 'Type' %}{% trans 'Gateway' %}{% trans 'Amount' %}{% trans 'Status' %}{% trans 'Date' %} 
          {{tx.txn_id}}{{tx.type}}{{tx.gateway}}{{ mf.currency_format( tx.amount, tx.currency) }}{{ mf.status_name(tx.status) }}{{tx.created_at|bb_datetime}} + +
          +
          + +{% endif %} + +{% endblock %} + +{% block sidebar2 %} + +
          +
          +

          {% trans 'Actions' %}

          +
          +
          + + {% if invoice.status == 'unpaid' %} + {% trans 'Delete' %} + {% endif %} +
          +
          + + +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_subscription.phtml b/src/bb-themes/admin_default/html/mod_invoice_subscription.phtml new file mode 100644 index 000000000..0606813f4 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_subscription.phtml @@ -0,0 +1,134 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% set active_menu = 'invoice' %} +{% block meta_title %}Subscription {{ subscription.sid }}{% endblock %} + +{% block content %} + +
          + + + +
          + +
          +
          +

          {% trans 'Subscription details' %}

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if subscription.created_at != subscription.updated_at %} + + + + + {% endif %} + + + + + + + +
          {% trans 'Client' %}{{ subscription.client.first_name }} {{ subscription.client.last_name }}
          {% trans 'Amount' %}{{ mf.currency_format( subscription.amount, subscription.currency) }} {{ mf.period_name(subscription.period) }}
          {% trans 'Payment gateway' %}{{subscription.gateway.title}}
          {% trans 'Subscription ID on payment gateway' %}{{subscription.sid|default('-')}}
          {% trans 'Status' %}{{ mf.status_name(subscription.status) }}
          {% trans 'Created at' %}{{subscription.created_at|date('l, d F Y')}}
          {% trans 'Updated at' %}{{subscription.updated_at|date('l, d F Y')}}
          + +
          + +
          + +
          +
          +
          +
          + +
          + {{ mf.selectbox('gateway_id', admin.invoice_gateway_get_pairs, subscription.gateway.id, 0, 'Select payment gateway') }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('period', guest.system_periods, subscription.period, 1, 'Select period') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, subscription.currency, 1, 'Select currency') }} +
          +
          +
          + + + +
          +
          +
          + +
          + +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_subscriptions.phtml b/src/bb-themes/admin_default/html/mod_invoice_subscriptions.phtml new file mode 100644 index 000000000..4b0f54544 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_subscriptions.phtml @@ -0,0 +1,161 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Subscriptions' %}{% endblock %} +{% set active_menu = 'invoice' %} + +{% block content %} + +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set subscriptions = admin.invoice_subscription_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, subscription in subscriptions.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'ID' %}{% trans 'Status' %}{% trans 'Gateway' %}{% trans 'Amount' %} 
          {{ subscription.client.email }}{{ subscription.sid }}{{ mf.status_name(subscription.status) }}{{ subscription.gateway.title }}{{ mf.currency_format( subscription.amount, subscription.currency) }} {{ mf.period_name(subscription.period) }} + + +
          + {% trans 'The list is empty' %} +
          + + {% include "partial_pagination.phtml" with {'list': subscriptions, 'url':'invoice/subscriptions'} %} +
          + +
          + +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('gateway_id', admin.invoice_gateway_get_pairs, request.gateway_id, 0, 'Select payment gateway') }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {{ mf.selectbox('period', guest.system_periods, request.period, 1, 'Select period') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, request.currency, 1, 'Select currency') }} +
          +
          +
          + + +
          +
          +
          + +
          +
          +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_tax.phtml b/src/bb-themes/admin_default/html/mod_invoice_tax.phtml new file mode 100644 index 000000000..ab48fc880 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_tax.phtml @@ -0,0 +1,152 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Tax{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} +
          + + + +
          +
          +
          + + + + + + + + + + + + + {% for tax in admin.invoice_tax_get_list({"per_page":100}).list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %}{% trans 'Country' %}{% trans 'State/Region' %}{% trans 'Tax rate' %}{% trans 'Actions' %}
          {{ tax.name }} + {% if tax.country %} + {{ guest.system_countries[tax.country] }} + {% else %} + {% trans 'Applies to any country' %} + {% endif %} + + {% if tax.state %} + {{ tax.state }} + {% else %} + {% trans 'Applies to any state' %} + {% endif %} + {{ tax.taxrate }}% + +
          + {% trans 'The list is empty' %} +
          +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + +
          +
          +
          + +
          + +
          +

          {% trans 'Automatic VAT Tax Rules Setup' %}

          +

          {% trans 'If you would like BoxBilling to automatically setup the EU VAT tax rules for you for all EU Member States then simply enter your VAT Label & local VAT rate below and click the submit button. This action will delete any existing tax rules and configure the VAT rates for all EU countries.' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + % +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + % +
          +
          +
          +
          + +
          + {{ mf.selectbox('country', guest.system_countries, request.country, 0, 'Apply to all countries') }} +
          +
          +
          +
          + +
          + {# mf.selectbox('state', guest.system_states, request.state, 0, 'Apply to all states') #} + +
          +
          +
          + +
          +
          +
          +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_invoice_transaction.phtml b/src/bb-themes/admin_default/html/mod_invoice_transaction.phtml new file mode 100644 index 000000000..0d5296b70 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_transaction.phtml @@ -0,0 +1,296 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% set active_menu = 'invoice' %} +{% block meta_title %}Transaction {{ transaction.txn_id }}{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + + + +
          + +
          +
          +

          {% trans 'Transaction details' %} #{{transaction.id}}

          +
          + + {% if transaction.error %} +
          + {{ transaction.error_code }} - {{ transaction.error }} +

          {% trans 'If you are sure that this transaction is valid you can update transaction details in "Manage" tab and try processing transaction again' %}

          +
          + {% endif%} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if transaction.note %} + + + + + {% endif %} + + + + + + + {% if transaction.created_at != transaction.updated_at %} + + + + + {% endif %} + + + + + + + +
          {% trans 'ID' %}{{transaction.id}}
          {% trans 'Invoice Id' %}{{transaction.invoice_id|default('-')}}
          {% trans 'Amount' %}{{transaction.amount}} {{transaction.currency}}
          {% trans 'Payment gateway' %}{{transaction.gateway|default('-')}}
          {% trans 'Transaction ID on payment gateway' %}{{transaction.txn_id|default('-')}}
          {% trans 'Transaction status on payment gateway' %}{{ mf.status_name(transaction.txn_status) }}
          {% trans 'Status' %}{{ mf.status_name(transaction.status) }}
          {% trans 'IP' %}{{ transaction.ip }} {{ transaction.ip|ipcountryname }}
          {% trans 'Note' %}{{ transaction.note }}
          {% trans 'Received at' %}{{transaction.created_at|date('l, d F Y')}}
          {% trans 'Updated at' %}{{transaction.updated_at|date('l, d F Y')}}
          + +
          + +
          + +
          +
          +
          + Transaction payment information +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + {% trans 'Transaction processing information' %} +
          + +
          + {{ mf.selectbox('gateway_id', admin.invoice_gateway_get_pairs, transaction.gateway_id, 0, 'Select payment gateway') }} +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {% trans 'Transaction information on payment gateway' %} +
          + +
          + {{ mf.selectbox('type', admin.invoice_transaction_types, transaction.type, 0, 'Select transaction type') }} +
          +
          +
          +
          + +
          + {{ mf.selectbox('txn_status', admin.invoice_transaction_gateway_statuses, transaction.txn_status, 0, 'Select status') }} +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          +
          +

          {% trans 'Note about this transaction' %}

          +
          +
          +
          +
          +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + +
          + + +
          +

          {% trans 'GET' %}

          +
          + {% if transaction.ipn.get %} + + + {% for key,val in transaction.ipn.get %} + + + + + {% endfor %} + +
          {{ key }}{{ val }}
          + {% else %} +
          +

          {% trans 'No GET parameters received' %}

          +
          + {% endif %} + + +
          +

          {% trans 'POST' %}

          +
          + {% if transaction.ipn.post %} + + + {% for key,val in transaction.ipn.post %} + + + + + {% endfor %} + +
          {{ key }}{{ val }}
          + {% else %} +
          +

          {% trans 'No POST parameters received' %}

          +
          + {% endif %} + +
          +

          {% trans 'SERVER' %}

          +
          + {% if transaction.ipn.server %} + + + {% for key,val in transaction.ipn.server %} + + + + + {% endfor %} + +
          {{ key }}{{ val }}
          + {% else %} +
          +

          {% trans 'No SERVER parameters logged' %}

          +
          + {% endif %} + + +
          +

          {{ 'http_raw_post_data'|upper}}

          +
          + {% if transaction.ipn.http_raw_post_data %} +
          + {{transaction.ipn.http_raw_post_data }} +
          + {% else %} +
          +

          No {{ 'http_raw_post_data'|upper}} parameters received

          +
          + {% endif %} +
          +
          +
          + +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_invoice_transactions.phtml b/src/bb-themes/admin_default/html/mod_invoice_transactions.phtml new file mode 100644 index 000000000..b0c8f5ed4 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_invoice_transactions.phtml @@ -0,0 +1,144 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Transactions' %}{% endblock %} +{% set active_menu = 'invoice' %} + + +{% block top_content %} +{% if request.show_filter %} +
          +
          {% trans 'Filter transactions' %}
          +
          + +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('currency', guest.currency_get_pairs, request.currency, 0, 'All currencies') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.invoice_transaction_get_statuses_pairs, request.status, 0, 'All statuses') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('gateway_id', admin.invoice_gateway_get_pairs, request.gateway_id, 0, 'All payment gateways') }} +
          +
          +
          + +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +{% else %} +{% set statuses = admin.invoice_transaction_get_statuses %} +
          + +
          +
          +{% endif %} + +{% endblock %} + +{% block content %} + +
          +
          {% trans 'Transactions' %}
          + + {{ mf.table_search }} + + + + + + + + + + + + + + + {% set transactions = admin.invoice_transaction_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, tx in transactions.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Invoice' %}{% trans 'Type' %}{% trans 'Status' %}{% trans 'Gateway' %}{% trans 'Amount' %}{% trans 'Date' %} 
          {% if tx.invoice_id %}#{{ tx.invoice_id }}{%else%}n/a{% endif %}{{mf.status_name(tx.type|default('-')) }}{% if tx.error %}{{ tx.error_code }}{% else %}{{mf.status_name(tx.status) }}{% endif %}{{tx.gateway}}{{ mf.currency_format( tx.amount, tx.currency) }}{{tx.created_at|date('Y-m-d H:i')}} + + + +
          + {% trans 'The list is empty' %} +
          +
          +{% include "partial_pagination.phtml" with {'list': transactions, 'url':'invoice/transactions'} %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_order_index.phtml b/src/bb-themes/admin_default/html/mod_order_index.phtml new file mode 100644 index 000000000..0f32f956e --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_order_index.phtml @@ -0,0 +1,234 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% set active_menu = 'order' %} +{% import "macro_functions.phtml" as mf %} + +{% block meta_title %}{% trans 'Orders' %}{% endblock %} + +{% block top_content %} +{% if request.show_filter %} +
          +
          {% trans 'Filter orders' %}
          +
          + +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.order_get_status_pairs, request.status, 0, 'All statuses') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('type', admin.product_get_types, request.type, 0, 'All types') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('product_id', admin.product_get_pairs, request.product_id, 0, 'All products') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('period', guest.system_periods, request.period, 0, 'All periods') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('invoice_option', admin.order_get_invoice_options, request.invoice_option, 0, 'All types') }} +
          +
          +
          + +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +{% else %} +{% set count_orders = admin.order_get_statuses %} +
          + +
          +
          + +{% endif %} + +{% endblock %} + +{% block content %} + +
          + + +
          +
          +
          + {{ mf.table_search }} + + + + + + + + + + + + + + + {% set orders = admin.order_get_list({"per_page":30, "page":request.page, "hide_addons":1}|merge(request)) %} + {% for i, order in orders.list %} + + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'ID' %}{% trans 'Client' %}{% trans 'Title' %}{% trans 'Amount' %}{% trans 'Period' %}{% trans 'Status' %} 
          {{order.id}}{{ order.client.email }}{{order.client.first_name}} {{order.client.last_name}}{{order.title|truncate(30) }}{{ mf.currency_format( order.total, order.currency) }}{{ mf.period_name(order.period) }}{{ mf.status_name(order.status) }} + + +
          {% trans 'The list is empty' %}
          + {% include "partial_pagination.phtml" with {'list': orders, 'url':'order'} %} +
          +
          + +
          +
          +
          +
          + +
          + {% if not request.client_id %} + + + {% else %} + {% set client = admin.client_get({"id":request.client_id}) %} + {{ client.first_name }} {{ client.last_name }} + {% endif %} +
          +
          +
          +
          + +
          + {{ mf.selectbox('product_id', admin.product_get_pairs, request.product_id, 1) }} +
          +
          +
          + + + {% if request.client_id %} + + {% endif %} +
          +
          +
          +
          + +{% endblock %} + +{% block head %} + + +{% endblock %} + +{% block js%} +{% if not request.client_id %} + +{% endif %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_order_manage.phtml b/src/bb-themes/admin_default/html/mod_order_manage.phtml new file mode 100644 index 000000000..22353d6d6 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_order_manage.phtml @@ -0,0 +1,498 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ order.title }}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% set active_menu = 'order' %} + +{% set service_partial = "mod_service" ~ order.service_type ~ "_manage.phtml" %} +{% if order.group_master == 1 %} + {% set addons = admin.order_addons({"id":order.id}) %} +{% endif %} + +{% block content %} + +
          + +
          +
          {% trans 'Order management' %}
          +
          + + + +
          +
          +
          +
          +

          {{ order.title }}

          +
          + +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if order.promo_id %} + + + + + {% endif %} + + {% if order.active_tickets > 0 %} + + + + + {% endif %} + + + + + + + +
          #{{ order.id }} ({{ order.service_type }})
          {{ order.client.first_name }} {{ order.client.last_name }}
          {{ order.title }}
          {{ mf.currency_format( order.total, order.currency) }} {% if order.period %}{{mf.period_name(order.period)}}{% endif %} {% if order.quantity > 1 %}({{ order.quantity }} x {{ mf.currency_format( order.price, order.currency) }}){% endif %}
          {{mf.status_name(order.status)}}
          {{ order.created_at|date('l, d F Y') }}
          {% if order.activated_at %}{{ order.activated_at|date('l, d F Y')}} {% else %}-{% endif %}
          {% if order.expires_at %}{{ order.expires_at|date('l, d F Y')}}{% else %}-{% endif %}
          {{ order.notes|bbmd }}
          {{ order.group_id|default('-') }}
          + {% set promo = admin.product_promo_get({"id":order.promo_id}) %} + {{ promo.code }} +
          + +
          + +
          + {% set order_actions %} + + {% if order.status == 'pending_setup' or order.status == 'failed_setup' %} + Activate + {% endif %} + + {% if order.status == 'active' %} + {% set params = admin.extension_config_get({"ext":"mod_order"}) %} + Renew + + {% if params.suspend_reason_list|trim == null %} + Suspend + + {% else %} + + Suspend + {% endif %} + Cancel + {% endif %} + + {% if order.status == 'suspended' %} + Unsuspend + {% endif %} + + {% if order.status == 'canceled' %} + Activate + {% endif %} + + Delete + + {% if not order.unpaid_invoice_id %} + Issue invoice + {% endif %} + {% endset %} + + {{ order_actions }} +
          +
          +
          + +
          + +
          +
          +

          Order management

          +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.order_get_status_pairs, order.status, 0, 'Select status') }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('invoice_option', admin.order_get_invoice_options, order.invoice_option) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('period', guest.system_periods, order.period, 0, 'Not recurrent') }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          + +
          + + {# +
          +
          + Order promotion code + +
          + +
          + +
          +
          +
          + + +
          + +
          + #} + {# order_actions #} + + {# if order.status == 'pending_setup' or order.status == 'failed_setup' %} +
          +

          Order parameters

          +
          + +
          +
          + + {% for name, value in order.config %} +
          + +
          + +
          +
          +
          + {% endfor %} + + + +
          +
          + {% endif #} +
          + +
          +
          +

          {% trans 'Addons you have ordered with this service' %}

          +
          + + + + + + + + + + + + + + {% for i, addon in addons %} + + + + + + + + + {% endfor %} + +
          {% trans 'Product/Service' %}{% trans 'Price' %}{% trans 'Billing Cycle' %}{% trans 'Next due date' %}{% trans 'Status' %} 
          {{addon.title}}{{ mf.currency_format( addon.total, addon.currency) }}{{ mf.period_name(addon.period) }}{% if addon.expires_at %}{{addon.expires_at|date('l, d F Y')}}{% else %}-{% endif %}{{ mf.status_name(addon.status) }}
          +
          + +
          + {% if guest.system_template_exists({"file":service_partial}) %} + {% set service = admin.order_service({"id":order.id}) %} + {% include service_partial with {'order' : order, 'service':service} %} + {% elseif order.form_id and guest.extension_is_on({"mod":"formbuilder"}) %} + {% include 'mod_formbuilder_manage.phtml' with order %} + {% else %} + {# trans 'Order form was not found' #} + {% endif %} +
          + +
          +
          +

          {% trans 'Order invoices' %}

          +
          + + + + + + + + + + + + + + + {% set invoices = admin.invoice_get_list({"per_page":50, "order_id":order.id}) %} + {% for invoice in invoices.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          ID{% trans 'Amount' %}{% trans 'Issued at' %}{% trans 'Paid at' %}{% trans 'Status' %} 
          {{invoice.id}}{{ mf.currency_format( invoice.total, invoice.currency, 1) }}{{ invoice.created_at|date('Y-m-d') }}{% if invoice.paid_at %}{{ invoice.paid_at|date('Y-m-d') }}{% else %}-{% endif %}{{ mf.status_name(invoice.status) }}
          {% trans 'The list is empty' %}
          +
          + +
          +
          +

          {% trans 'Order status change history' %}

          +
          + + + + + + + + + + + {% set statuses = admin.order_status_history_get_list({"per_page":50, "id":order.id}) %} + {% for i,sh in statuses.list %} + + + + + + + {% endfor %} + +
          {% trans 'Status' %}{% trans 'Note' %}{% trans 'Date' %}{% trans 'Actions' %}
          {{ mf.status_name(sh.status) }}
          {{ sh.notes }}
          {{ sh.created_at|date('Y-m-d H:i') }} + +
          +
          + +
          +
          +

          {% trans 'Support tickets regarding this order' %}

          +
          + + + + + + + + + + + + + {% set tickets = admin.support_ticket_get_list({"per_page":"20", "order_id":order.id}) %} + {% for ticket in tickets.list %} + + + + + + + + {% else %} + + + + {% endfor %} + +
          ID{% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %} 
          {{ ticket.id }}{{ ticket.subject|truncate(30) }}{{ ticket.helpdesk.name }}{{ mf.status_name(ticket.status) }}
          {% trans 'The list is empty' %}
          +
          +
          + +
          +{% endblock %} +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_order_new.phtml b/src/bb-themes/admin_default/html/mod_order_new.phtml new file mode 100644 index 000000000..cfd5dd82e --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_order_new.phtml @@ -0,0 +1,73 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% set active_menu = 'order' %} +{% import "macro_functions.phtml" as mf %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block meta_title %}{% trans 'Create new order' %}{% endblock %} + +{% block content %} +
          +
          {% trans 'Create new order' %}
          +
          +

          "{{ product.title }}" {% trans 'for' %} {{ client.first_name }} {{ client.last_name }}

          +
          +
          +
          + +
          + +
          + {{ mf.selectbox('invoice_option', admin.order_get_invoice_options, order.invoice_option) }} +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + {% if product.pricing.type == 'recurrent' %} +
          + +
          + {{ mf.selectbox('period', guest.system_periods, request.period, 1) }} +
          +
          +
          + {% endif %} + + {% set product_order = 'mod_service'~product.type~'_order.phtml' %} + {% if admin.system_template_exists({"file":product_order}) %} + {% include product_order %} + {% endif %} + + + + +
          +
          +
          + +{% endblock %} + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_product_addon_manage.phtml b/src/bb-themes/admin_default/html/mod_product_addon_manage.phtml new file mode 100644 index 000000000..865761f0c --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_addon_manage.phtml @@ -0,0 +1,74 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'products' %} +{% block meta_title %}Product addon management{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {% trans 'Edit product addon' %}
          +
          + +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + {% include "partial_pricing.phtml" with {'product': product} %} + + +
          + + +
          +
          + + + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_product_addons.phtml b/src/bb-themes/admin_default/html/mod_product_addons.phtml new file mode 100644 index 000000000..afc32bfb5 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_addons.phtml @@ -0,0 +1,113 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'products' %} +{% block meta_title %}{% trans 'Addons' %}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + + + +
          + +
          +
          + + + + {% for addon_id, addon_title in admin.product_addon_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + +
          + + +
          {% trans 'The list is empty' %}
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          + +
          + +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_product_category.phtml b/src/bb-themes/admin_default/html/mod_product_category.phtml new file mode 100644 index 000000000..7b78fa00a --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_category.phtml @@ -0,0 +1,61 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'products' %} +{% block meta_title %}{{ category.title}}{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {{ category.title}}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + + + + +
          +
          +
          + +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_product_index.phtml b/src/bb-themes/admin_default/html/mod_product_index.phtml new file mode 100644 index 000000000..2f706c3a2 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_index.phtml @@ -0,0 +1,172 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'products' %} +{% block meta_title %}{% trans 'Products' %}{% endblock %} + +{% block content %} + +
          + + + +
          +
          + +
          + + {{ mf.table_search }} +
          +
          + + + + + + + + + + + + + {% set products = admin.product_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for product in products.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          TitleStatusCategoryType{% trans 'Priority' %} 
          {{ product.title }}{{ mf.status_name(product.status) }}{{product.category.title}}{{ mf.status_name(product.type) }} + + +
          {% trans 'The list is empty' %}
          + + {% include "partial_pagination.phtml" with {'list': products, 'url':'product'} %} + + +
          +
          +
          + +
          +
          +
          +
          + +
          + {{ mf.selectbox('type', admin.product_get_types, request.type, 1) }} +
          +
          +
          +
          + +
          + {{ mf.selectbox('product_category_id', admin.product_category_get_pairs, request.product_category_id, 1) }} +
          +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          + + + {% for cat_id, cat_title in admin.product_category_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + +
          {{cat_title}} + + +
          {% trans 'The list is empty' %}
          +
          + +
          + +
          + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_product_manage.phtml b/src/bb-themes/admin_default/html/mod_product_manage.phtml new file mode 100644 index 000000000..4400280e1 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_manage.phtml @@ -0,0 +1,267 @@ +{% extends "layout_default.phtml" %} +{% set active_menu = 'products' %} +{% block meta_title %}{% trans 'Product configuration' %}{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + + + +
          +
          +
          +
          + +
          +
          {{ product.type|title }} {% trans 'General settings' %}
          +
          + +
          +
          + +
          + {{ mf.selectbox('product_category_id', guest.product_category_get_pairs, product.product_category_id, 0, 'None') }} +
          +
          +
          + + {% if guest.extension_is_on({"mod":"formbuilder"}) %} +
          + +
          + {% set tpl = "mod_service"~product.type~"_order_form.phtml" %} + {% if guest.system_template_exists({"file":tpl}) %} +

          Please edit {{tpl}} file in order to change order form for {{product.type}} category products.

          + {% trans 'Open Editor' %} + {% else %} + {{ mf.selectbox('form_id', admin.formbuilder_get_pairs, product.form_id, 0, 'None') }} +             + {{ (product.form_id) ? 'Edit Form' : 'Add new form'}} + {% endif %} +
          +
          +
          + {% endif %} +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + {% include "partial_pricing.phtml" with {'product': product} %} + +
          + +
          + {% trans 'Product / service description' %} + + + +
          +
          +
          + +
          +
          +
          {% trans 'Choose which addons you would like to offer with' %} {{ product.title }}
          +
          + + + + {% for addon_id, addon_title in admin.product_addon_get_pairs %} + + + + + + {% else %} + + + + {% endfor %} + + + + + + +
          + + +
          {% trans 'The list is empty' %}
          + {% trans 'Create new addon' %} +
          + + + +
          +
          + +
          +
          +
          {% trans 'Choose which products can client upgrade to' %}
          +
          +
          +
          + +
          + {% set products = admin.product_get_pairs %} + + +
          +
          +
          + + +
          +
          + + +
          + +
          + {% set service_partial = "mod_service" ~ product.type ~ "_config.phtml" %} + {% if admin.system_template_exists({"file":service_partial}) %} + {% include service_partial with {'product': product} %} + {% else %} +
          +
          {% trans 'No additional configuration for this product is required' %}
          +
          + {% endif %} +
          +
          + + + +
          + +
          +{% endblock %} + + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_product_promo.phtml b/src/bb-themes/admin_default/html/mod_product_promo.phtml new file mode 100644 index 000000000..741de7823 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_promo.phtml @@ -0,0 +1,140 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Product promos{% endblock %} +{% set active_menu = 'products' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          {% trans 'Manage coupon code' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • + + +
          • +
          • +
          +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + {% trans %}Promo code limitations{% endtrans %} + +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          +
          + +
          + {% set products = admin.product_get_pairs %} + + +
          +
          +
          +
          + +
          + {% set periods = guest.system_periods %} + +
          +
          +
          + + +
          +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_product_promos.phtml b/src/bb-themes/admin_default/html/mod_product_promos.phtml new file mode 100644 index 000000000..6d9200fd8 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_product_promos.phtml @@ -0,0 +1,208 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}{% trans 'Product promotions' %}{% endblock %} +{% set active_menu = 'products' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + + + {% set promos = admin.product_promo_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for promo in promos.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Code' %}{% trans 'Discount' %}{% trans 'Applies to' %}{% trans 'Valid period' %}{% trans 'Enabled' %}{% trans 'Usage' %} 
          {{ promo.code }}{% if promo.type == 'percentage' %}{{ promo.value }}%{% endif %}{% if promo.type == 'absolute' %}{{ mf.currency_format(promo.value) }}{% endif %}{% for pid,product in promo.applies_to %} + {{ product|truncate(15) }}
          + {% else %} + All products + {% endfor %} +
          + From {% if promo.start_at %}{{ promo.start_at|date('Y-m-d') }}{% else %}now{% endif %} + untill {% if promo.end_at %}{{ promo.end_at|date('Y-m-d') }}{% else %}disabled{% endif %} + {{ mf.q(promo.active) }}{{ promo.used }} / {% if promo.maxuses %}{{ promo.maxuses }}{% else %}∞{% endif %} + + +
          + {% trans 'The list is empty' %} +
          + + {% include "partial_pagination.phtml" with {'list': promos, 'url':'product/promos'} %} +
          + +
          +
          +

          {% trans 'Create new coupon code' %}

          +

          {% trans %}Create special offers for your clients by creating coupon codes.{% endtrans %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • + + +
          • +
          • +
          +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + {% trans 'Promo code limitations' %} + +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          +
          + +
          + {% set products = admin.product_get_pairs %} + +
          +
          +
          +
          + +
          + {% set periods = guest.system_periods %} + +
          +
          +
          + {# +
          + +
          + {% set products = admin.product_addon_get_pairs %} + +
          +
          +
          + #} + +
          +
          +
          + +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_servicecustom_config.phtml b/src/bb-themes/admin_default/html/mod_servicecustom_config.phtml new file mode 100644 index 000000000..d741f4454 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicecustom_config.phtml @@ -0,0 +1,94 @@ +
          +
          {% trans 'Stock control settings' %}
          +
          + +
          +
          +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          + + +
          + +
          +
          {% trans 'Plugin' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + +
          + + +
          + +
          +
          + Custom parameters + {% for k,v in product.config %} +
          + +
          + +
          +
          +
          + {% endfor %} +
          + +
          + Add custom parameter +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicecustom_manage.phtml b/src/bb-themes/admin_default/html/mod_servicecustom_manage.phtml new file mode 100644 index 000000000..02615cfbf --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicecustom_manage.phtml @@ -0,0 +1,28 @@ +
          +

          {{ order.title }} {% trans 'management' %}

          +
          + +{# + "plugin" variable contains partial name, ie: plugin_PLUGINNAME_manage.html + "service" variable contains product configuration + order form values as key value pairs +#} + +{# include plugin #} + +
          +
          + + {% for name, value in service %} +
          + +
          + +
          +
          +
          + {% endfor %} + + + +
          +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedomain_config.phtml b/src/bb-themes/admin_default/html/mod_servicedomain_config.phtml new file mode 100644 index 000000000..115c758f8 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedomain_config.phtml @@ -0,0 +1,9 @@ +
          +
          {% trans 'Domains management' %}
          +
          + +
          + +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedomain_index.phtml b/src/bb-themes/admin_default/html/mod_servicedomain_index.phtml new file mode 100644 index 000000000..be6cf3539 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedomain_index.phtml @@ -0,0 +1,281 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Domain management{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} + +
          + + + +
          +
          +
          + +
          +
          {% trans 'Manage TLDs' %}
          +

          {% trans 'Setup domain pricing and allowed operations. Assign specific domain registrars for each Top Level Domain (TLD)' %}

          +
          + + + + + + + + + + + + + + + + {% for tld in admin.servicedomain_tld_get_list({"per_page":99}).list %} + + + + + + + + + + {% endfor %} + + +
          {% trans 'TLD' %}{% trans 'Registration' %}{% trans 'Renew' %}{% trans 'Transfer' %} {% trans 'Operations' %}{% trans 'Registrar' %} 
          {{ tld.tld }}{{ mf.currency_format(tld.price_registration) }}{{ mf.currency_format(tld.price_renew) }}{{ mf.currency_format(tld.price_transfer) }} + {% trans 'Allow register:' %} {% if tld.allow_register %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %}
          + {% trans 'Allow transfer:' %} {% if tld.allow_transfer %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %}
          + {% trans 'Active:' %} {% if tld.active %}{% trans 'Yes' %}{% else %}{% trans 'No' %}{% endif %} +
          {{ tld.registrar.title }} + + +
          +
          + +
          + +
          +
          {% trans 'Add new top level domain' %}
          +

          {% trans 'Setup new TLD prices and properties' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + +
          +
          + +
          + +
          + +
          +
          {% trans 'Domain registrars' %}
          +

          {% trans 'Manage domain registrars' %}

          +
          + + + + + + + + + + {% for registrar in admin.servicedomain_registrar_get_list.list %} + + + + + {% endfor %} + +
          {% trans 'Title' %} 
          {{ registrar.title }} + + + +
          + +
          + +
          + +
          +
          {% trans 'Nameservers' %}
          +

          {% trans 'Setup default nameservers that will be used for new domain registrations if client have not provided his own nameservers in order form' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          + {% include "partial_extensions.phtml" with {'type': 'domain-registrar', 'header':"List of domain registrars on extensions site"} only %} +
          +

          {% trans 'Adding new domain registrar' %}

          +

          {% trans 'Follow instrunctions bellow to install new domain registrar.' %}

          + +
          +
            +
          • {% trans 'Check domain registrar you are looking for is available at' %} BoxBilling extensions site
          • +
          • {% trans 'Download domain registrar file and place to' %} {{ constant('BB_PATH_LIBRARY') }}/Registrar/Adapter
          • +
          • {% trans 'Reload this page to see newly detected domain registrar' %}
          • +
          • {% trans 'Click on install button. Now you will be able to create top level domains with new domain registrar' %}
          • +
          • {% trans 'For developers. Read' %} {% trans 'BoxBilling documentation' %} {% trans 'to learn how to create your own domain registrar.' %}
          • +
          +
          + +
          + + {% if admin.servicedomain_registrar_get_available|length > 0 %} + + + + + + + + + + {% for code in admin.servicedomain_registrar_get_available %} + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Code' %}{% trans 'Install' %}
          {{ code }} + +
          + {% trans 'All payment gateways installed' %} +
          + {% endif %} +
          +
          +
          +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_servicedomain_manage.phtml b/src/bb-themes/admin_default/html/mod_servicedomain_manage.phtml new file mode 100644 index 000000000..bc13f2c73 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedomain_manage.phtml @@ -0,0 +1,376 @@ +
          +

          {% trans 'Domain details' %}

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
          {% trans 'Domain' %}{{ service.domain }}
          {% trans 'Registrar' %}{{ service.registrar }}
          {% trans 'Nameserver 1' %}
          {{ service.ns1 }}
          {% trans 'Nameserver 2' %}
          {{ service.ns2 }}
          {% trans 'Nameserver 3' %}
          {{ service.ns3 }}
          {% trans 'Nameserver 4' %}
          {{ service.ns4 }}
          {% trans 'Transfer code' %}
          {{ service.transfer_code }}
          {% trans 'Privacy protected' %}
          {{ service.privacy }}
          {% trans 'Locked' %}
          {{ service.locked }}
          {% trans 'Registration/Renewal years' %}
          {{ service.period }}
          {% trans 'Registration date' %}{{ service.registered_at|date('l, d F Y') }}
          {% trans 'Expires at' %}{{ service.expires_at|date('l, d F Y') }}
          +
          + {{ order_actions }} + {% if order.status == 'active' %} + Get EPP + {% trans 'Unlock' %} + {% trans 'Lock' %} + {% trans 'Disable privacy protection' %} + {% trans 'Enable privacy protection' %} + {% endif %} +
          +
          + +{% if order.status == 'active' %} +
          +

          {% trans 'Nameservers' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +
          + {% trans 'Update domain contact details' %} +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + + +
          +
          + +{% endif %} + + + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedomain_registrar.phtml b/src/bb-themes/admin_default/html/mod_servicedomain_registrar.phtml new file mode 100644 index 000000000..868219091 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedomain_registrar.phtml @@ -0,0 +1,55 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Registrar' %} {{ registrar.title }}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          +
          +
          {% trans 'Registrar configuration' %}
          +
          + +
          +
          {{ registrar.title }}
          +

          {{ registrar.label }}

          +
          + +
          +
          +
          + +
          + + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + {# Build form elements from registrar configuration array #} + {{ mf.build_form(registrar.form, registrar.config) }} + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedomain_tld.phtml b/src/bb-themes/admin_default/html/mod_servicedomain_tld.phtml new file mode 100644 index 000000000..629c78ebd --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedomain_tld.phtml @@ -0,0 +1,103 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ tld.tld }}{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + +
          + +
          +
          {{ tld.tld }} {% trans 'Top level domain management' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedownloadable_config.phtml b/src/bb-themes/admin_default/html/mod_servicedownloadable_config.phtml new file mode 100644 index 000000000..2181df5f4 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedownloadable_config.phtml @@ -0,0 +1,49 @@ +
          +
          {% trans 'File' %}
          +
          + +
          +
          + {% if product.config.filename %} +
          + +
          + {{ product.config.filename }} +
          +
          +
          + {% endif %} + +
          + +
          + +
          +
          +
          + + +
          + + +
          + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicedownloadable_manage.phtml b/src/bb-themes/admin_default/html/mod_servicedownloadable_manage.phtml new file mode 100644 index 000000000..da9ae695b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicedownloadable_manage.phtml @@ -0,0 +1,70 @@ +
          +

          {% trans 'File information' %}

          +
          + + + + + + + + + + + + + + + + + + + + + + + + +
          {% trans 'Filename' %}:{{ service.filename }}
          {% trans 'Location' %}:{{ service.path }}
          {% trans 'Downloads' %}:{{ service.downloads }}
          + +
          +

          {% trans 'Upload new file for this order' %}

          +

          {% trans 'Use this function to update existing order file. Client will be able to download new file from client area' %}

          +
          + +
          +
          + +
          + +
          + +
          +
          +
          + + +
          + + +
          + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicehosting_config.phtml b/src/bb-themes/admin_default/html/mod_servicehosting_config.phtml new file mode 100644 index 000000000..f74757fba --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicehosting_config.phtml @@ -0,0 +1,114 @@ +
          +
          {% trans 'Hosting settings' %}
          +
          + +
          +
          +
          + +
          + {{ mf.selectbox('config[server_id]', admin.servicehosting_server_get_pairs, product.config.server_id, 0, 'Select server') }} +
          +
          +
          +
          + +
          + {{ mf.selectbox('config[hosting_plan_id]', admin.servicehosting_hp_get_pairs, product.config.hosting_plan_id, 0, 'Select hosting plan') }} +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          + + +
          + +
          +
          {% trans 'Hosting plans' %}
          +
          + + + + + + + + + + {% for id, plan in admin.servicehosting_hp_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + + + + + + +
          Title 
          {{plan}}
          {% trans 'The list is empty' %}
          + New hosting plan +
          + +
          +
          {% trans 'Servers' %}
          +
          + + + + + + + + + + {% for id, server in admin.servicehosting_server_get_pairs %} + + + + + {% else %} + + + + {% endfor %} + + + + + + +
          Title 
          {{server}}
          {% trans 'The list is empty' %}
          + New server +
          diff --git a/src/bb-themes/admin_default/html/mod_servicehosting_hp.phtml b/src/bb-themes/admin_default/html/mod_servicehosting_hp.phtml new file mode 100644 index 000000000..30305cc32 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicehosting_hp.phtml @@ -0,0 +1,129 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Hosting management{% endblock %} +{% set active_menu = 'system' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          + +
          +
          Manage hosting plan
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + + {% if hp.config|length > 0 %} +
          + {% trans 'Server manager specific parameters' %} + {% for name, value in hp.config %} +
          + +
          + +
          +
          +
          + {% endfor %} +
          + {% endif %} + +
          + + +
          +
          + +
          +

          {% trans 'Hosting plan additional parameters' %}

          +

          {% trans 'Depending on server manager used to setup hosting account you may require provide additional parameters. List of parameters server managers requires you can find on extensions page.' %}

          +
          + +
          +
          +
          +
          +
          +
          +
          + +
          +
          + +
          +
          +
          +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicehosting_index.phtml b/src/bb-themes/admin_default/html/mod_servicehosting_index.phtml new file mode 100644 index 000000000..7869cc414 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicehosting_index.phtml @@ -0,0 +1,277 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}{% trans 'Hosting plans and servers' %}{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} +
          + + + +
          +
          +
          + +
          +
          {% trans 'Servers' %}
          +
          + + + + + + + + + + + + + {% set servers = admin.servicehosting_server_get_list({"per_page":100}) %} + {% for server in servers.list %} + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + +
          {% trans 'Name' %}{% trans 'IP' %}{% trans 'Server manager' %}{% trans 'Active' %} 
          {{server.name}}{{server.ip}}{{ mf.status_name(server.manager) }}{{ mf.q(server.active) }} + + + + +
          {% trans 'The list is empty' %}
          + +
          +
          {% trans 'Hosting plans' %}
          +
          + + + + + + + + + + + + + + {% set hps = admin.servicehosting_hp_get_list({"per_page":100}) %} + {% for hp in hps.list %} + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Addon domains' %}{% trans 'Disk space' %}{% trans 'Bandwidth' %} 
          {{hp.name}}{{hp.max_addon}}{{hp.quota}}{{hp.bandwidth}} + + +
          {% trans 'The list is empty' %}
          + + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + Nameservers +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + Server manager +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + +
          +
          +
          + +
          +
          +

          {% trans 'Adding new hosting plan' %}

          +

          {% trans 'Depending on server manager used to setup hosting account you may require provide additional parameters in next step. In this step provide basic hosting plan information.' %}

          +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          +
          +
          + + + +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicehosting_manage.phtml b/src/bb-themes/admin_default/html/mod_servicehosting_manage.phtml new file mode 100644 index 000000000..927446644 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicehosting_manage.phtml @@ -0,0 +1,224 @@ +{% set server = service.server %} +{% set hp = service.hosting_plan %} + +
          +

          {% trans 'Details' %}

          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if server.ns3 %} + + + + + {% endif %} + + {% if server.ns4 %} + + + + + {% endif %} + + + + + + + + + + + + + + + + +
          {% trans 'Status' %}:{{mf.status_name(order.status)}}
          {% trans 'Domain' %}: + {{ service.domain }} +
          {% trans 'Server Name' %}:{{ server.name }}
          {% trans 'Hosting plan' %}:{{ hp.name }}
          {% trans 'Server IP' %}:{{ server.ip }}
          {% trans 'Account IP' %}:
          {{ service.ip }}
          {% trans 'Username' %}:
          {{ service.username }}
          {% trans 'Nameserver 1' %}:{{ server.ns1 }}
          {% trans 'Nameserver 2' %}:{{ server.ns2 }}
          {% trans 'Nameserver 3' %}:{{ server.ns3 }}
          {% trans 'Nameserver 4' %}:{{ server.ns4 }}
          {% trans 'Bandwidth' %}:{{ hp.bandwidth }} MB / {% trans 'per month' %}
          {% trans 'Disk quota' %}:{{ hp.quota }} MB
          +
          + {{ order_actions }} + {% trans 'Jump to cPanel' %} + {% if service.reseller %} + {% trans 'Reseller control panel' %} + {% endif %} + + Sync with server +
          +
          + +
          +

          {% trans 'Change hosting plan' %}

          +
          + +
          +
          +
          + +
          + {{ mf.selectbox('plan_id', admin.servicehosting_hp_get_pairs, hp.id, 1) }} +
          +
          +
          + + + +
          +
          + +
          +

          {% trans 'Change account password' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +

          {% trans 'Change IP' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +

          {% trans 'Change username' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          +

          {% trans 'Change domain' %}

          +
          +
          +
          +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          + +
          +
          + + + +
          +
          + + + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicehosting_server.phtml b/src/bb-themes/admin_default/html/mod_servicehosting_server.phtml new file mode 100644 index 000000000..a46b71f41 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicehosting_server.phtml @@ -0,0 +1,177 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Hosting management{% endblock %} +{% set active_menu = 'system' %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} +
          +
          +
          Server management
          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + {# +
          + +
          + +
          +
          +
          + #} +
          + +
          + + +
          +
          +
          +
          + +
          + Server manager +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          + + +
          + + +
          + Nameservers +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + + +
          +
          + +{% endblock %} + +{% block js%} + + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_servicelicense_config.phtml b/src/bb-themes/admin_default/html/mod_servicelicense_config.phtml new file mode 100644 index 000000000..4d214878a --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicelicense_config.phtml @@ -0,0 +1,80 @@ +
          +
          {% trans 'License settings' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + {{ mf.selectbox('config[plugin]', admin.servicelicense_plugin_get_pairs, product.config.plugin, 1) }} +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          + + +
          + +
          +

          {% trans 'License plugins' %}

          +

          {% trans 'BoxBilling gives you ability to provide your own license generation script. Follow instructions bellow to install new license plugin' %}

          + +
          +
            +
          • {% trans 'License plugin is PHP class "License_PluginName" with one method' %} generate
          • +
          • {% trans 'Take a look at default plugin at' %} {{ constant('BB_PATH_LIBRARY') }}/License/Default.php
          • +
          • {% trans 'Create your plugin and place it to' %} {{ constant('BB_PATH_LIBRARY') }}/License/PluginName.php
          • +
          • {% trans 'BoxBilling will automatically detect new plugin' %}
          • +
          • {% trans 'Read' %} {% trans 'BoxBilling documentation' %} {% trans 'for more information.' %}
          • +
          +
          +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicelicense_manage.phtml b/src/bb-themes/admin_default/html/mod_servicelicense_manage.phtml new file mode 100644 index 000000000..b6861e4ec --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicelicense_manage.phtml @@ -0,0 +1,140 @@ +
          +

          {% trans 'License details' %}

          +
          +{% set service = admin.order_service({"id":order.id}) %} + + + + + + + + + + + + + + + + + + + + + + + + +
          + {% trans 'Key' %} + +
          {{ service.license_key }}
          +
          + {% trans 'Plugin' %} +
          {{ service.plugin }}
          + {% trans 'Last ping' %} + {{ service.pinged_at|date }} ({{ service.pinged_at|timeago }} ago)
          +
          + {{ order_actions }} +
          +
          + +
          +
          + License validation rules +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          + + + + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicemembership_config.phtml b/src/bb-themes/admin_default/html/mod_servicemembership_config.phtml new file mode 100644 index 000000000..7a87edd68 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicemembership_config.phtml @@ -0,0 +1,4 @@ +
          +
          {% trans 'Membership settings' %}
          +

          {% trans 'Membership service does not have any configuration options' %}

          +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_servicemembership_manage.phtml b/src/bb-themes/admin_default/html/mod_servicemembership_manage.phtml new file mode 100644 index 000000000..afc5b5af2 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_servicemembership_manage.phtml @@ -0,0 +1,3 @@ +
          +

          {% trans 'Membership details' %}

          +
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_staff_group.phtml b/src/bb-themes/admin_default/html/mod_staff_group.phtml new file mode 100644 index 000000000..929f57d89 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_group.phtml @@ -0,0 +1,40 @@ +{% extends "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Staff Group management' %}{% endblock %} +{% set active_menu = 'system' %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          + +
          +
          {% trans 'Manage staff member details' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_staff_index.phtml b/src/bb-themes/admin_default/html/mod_staff_index.phtml new file mode 100644 index 000000000..cffd9e3c3 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_index.phtml @@ -0,0 +1,178 @@ +{% extends "layout_default.phtml" %} +{% block meta_title %}Staff{% endblock %} +{% set active_menu = 'system' %} + +{% block content %} +
          + + + +
          +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set members = admin.staff_get_list({"per_page":100, "page":request.page}|merge(request)) %} + {% for i, member in members.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %}{% trans 'Email' %}{% trans 'Group' %}{% trans 'Status' %} 
          {{ member.id }}{{ member.name }}{{ member.email }}{{member.group.name}}{{ mf.status_name(member.status) }} + + +
          + {% trans 'The list is empty' %} +
          + +
          + +
          +
          +
          +
          +
          + +
          + {{ mf.selectbox('admin_group_id', admin.staff_group_get_pairs, '', 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          + + +
          +
          +
          + +
          +
          + + + + + + + + + + {% set groups = admin.staff_group_get_list({"per_page":100, "page":request.page}) %} + {% for i, group in groups.list %} + + + + + + + + {% else %} + + + + + + {% endfor %} +
          {% trans 'Name' %} 
          {{ group.name }} + + +
          + {% trans 'The list is empty' %} +
          + +
          + +
          +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_staff_login.phtml b/src/bb-themes/admin_default/html/mod_staff_login.phtml new file mode 100644 index 000000000..2137f85f0 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_login.phtml @@ -0,0 +1,60 @@ +{% extends "layout_login.phtml" %} + +{% block meta_title %}{% trans 'Login' %}{% endblock %} + +{% block content %} + + +
          + +
          + {% if create_admin %} +
          {% trans 'Create main administrator account' %}
          +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + {% else %} +
          {% trans 'Login' %}
          +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          + +
          +
          +
          +
          + {% endif %} +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_staff_login_history.phtml b/src/bb-themes/admin_default/html/mod_staff_login_history.phtml new file mode 100644 index 000000000..770f51b7c --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_login_history.phtml @@ -0,0 +1,48 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Staff members login history{% endblock %} +{% set active_menu = 'activity' %} + +{% block content %} +
          +
          {% trans 'Staff members logins history' %}
          + +{{ mf.table_search }} + + + + + + + + + + + + + {% set history = admin.staff_login_history_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, event in history.list %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Admin' %}{% trans 'IP' %}{% trans 'Country' %}{% trans 'Date' %} 
          {{ event.staff.email }}{{ event.staff.name }}{{ event.ip }}{{ event.ip|ipcountryname|default('Unknown') }}{{ event.created_at|date('Y-m-d H:i') }} + +
          + {% trans 'The list is empty' %} +
          + +
          + +{% include "partial_pagination.phtml" with {'list': history, 'url':'staff/logins'} %} +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_staff_manage.phtml b/src/bb-themes/admin_default/html/mod_staff_manage.phtml new file mode 100644 index 000000000..7aab76a39 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_manage.phtml @@ -0,0 +1,203 @@ +{% extends "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Profile' %}{% endblock %} +{% set active_menu = 'system' %} + + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +{% if staff.role == 'cron' %} +
          +

          {% trans 'INFORMATION' %}: {% trans 'This staff member is used by BoxBilling to perform system tasks and can not be removed.' %}

          +
          +{% endif %} + + +
          + + +
          +
          + +
          +

          {% trans 'Manage staff member details' %}

          +
          + +
          +
          +
          + +
          + {{ mf.selectbox('admin_group_id', admin.staff_group_get_pairs, staff.group.id, 1) }} +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          +
          + {% set member_name = staff.name %} +

          {% trans %}{{ member_name }} permissions{% endtrans %}

          +
          + + {% if staff.role == 'admin' %} +
          +

          {% trans 'Administrator account is allowed to do everything' %}

          +
          + {% else %} + {% set prms = admin.staff_permissions_get({"id":staff.id}) %} +
          + + + + + + + + + + + + {% for mod in mods %} + + + + + {% endfor %} + + + + + + + +
          + + {% trans 'Module' %}
          + + {{mod|title}}
          + + +
          +
          + {% endif %} +
          + +
          +
          +

          {% trans 'Change staff member password' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +
          +
          +

          {% trans 'Api key is used to manage system via other interfaces.' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          + +
          +
          +
          +
          + +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_staff_profile.phtml b/src/bb-themes/admin_default/html/mod_staff_profile.phtml new file mode 100644 index 000000000..0ee65c70b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_staff_profile.phtml @@ -0,0 +1,120 @@ +{% extends "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Profile' %}{% endblock %} + +{# block top_content %} +
          Manage your profile
          +{% endblock #} + +{% block content %} + +
          + + +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          +
          + +
          + + +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + +
          +
          +
          + +
          + +
          +

          {% trans 'API Key' %}

          +

          {% trans 'API key allows integration with external applications. You will need this key for authentication.' %}

          +

          {% trans 'External application can control every aspect of BoxBilling using this API key.' %}

          +

          {% trans 'Warning! Resetting the key will break existing applications using it.' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          +

          {% trans 'Gravatar' %}

          +

          {% trans 'Change your avatar at' %} gravatar.com

          +
          +
          +
          +
          +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_support_canned_category.phtml b/src/bb-themes/admin_default/html/mod_support_canned_category.phtml new file mode 100644 index 000000000..771f6ca4b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_canned_category.phtml @@ -0,0 +1,41 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}Canned category{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} +
          + +
          +
          {% trans 'Canned category' %}
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + + + +
          +
          + +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_support_canned_response.phtml b/src/bb-themes/admin_default/html/mod_support_canned_response.phtml new file mode 100644 index 000000000..d45c1d1ed --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_canned_response.phtml @@ -0,0 +1,66 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% set active_menu = 'support' %} +{% block meta_title %}{% trans 'Canned response' %}{% endblock %} + + +{% block breadcrumbs %} + +{% endblock %} + + +{% block content %} + +
          + +
          +
          {% trans 'Canned response' %}
          +
          + +
          +
          +
          + +
          + {{ mf.selectbox('category_id', admin.support_canned_category_pairs, response.category.id, 1) }} +
          +
          +
          +
          + +
          + +
          +
          +
          + + +
          +
          +
          + + +
          +
          +
          {{response.title}}
          +
          + +
          +
          + + + +
          +
          +
          + + +{% endblock %} + + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_support_canned_responses.phtml b/src/bb-themes/admin_default/html/mod_support_canned_responses.phtml new file mode 100644 index 000000000..aad752f8e --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_canned_responses.phtml @@ -0,0 +1,133 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} + +{% block breadcrumbs %} + +{% endblock %} + +{% set active_menu = 'support' %} +{% block meta_title %}Canned responses{% endblock %} + +{% block content %} +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + {% set responses = admin.support_canned_get_list({"per_page":90, "page":request.page}|merge(request)) %} + {% for i, response in responses.list %} + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Title' %}{% trans 'Category' %} 
          {{ response.title }}{{response.category.title}} + + +
          + {% trans 'The list is empty' %} +
          + {% include "partial_pagination.phtml" with {'list': responses, 'url':'support/canned-responses'} %} +
          + +
          + +
          +
          +
          + +
          + {{ mf.selectbox('category_id', admin.support_canned_category_pairs, '', 1) }} +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          +
          +
          + +
          + + + {% for cat_id, cat_title in admin.support_canned_category_pairs %} + + + + + {% else %} + + + + {% endfor %} + +
          {{cat_title}} + + +
          {% trans 'The list is empty' %}
          +
          + +
          +
          + +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_support_public_ticket.phtml b/src/bb-themes/admin_default/html/mod_support_public_ticket.phtml new file mode 100644 index 000000000..8960caef1 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_public_ticket.phtml @@ -0,0 +1,182 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}}{% endblock %} +{% set active_menu = 'support' %} + +{% block breadcrumbs %} + +{% endblock %} + +{% block content %} + +
          +
          +
          {{ ticket.subject }}
          +
          + + + +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.created_at != ticket.updated_at %} + + + + + {% endif %} + + + + + + + +
          {% trans 'Ticket ID' %}#{{ticket.id}}
          {% trans 'Author' %}{{ ticket.author_name }}
          {% trans 'Email' %}{{ ticket.author_email }}
          {% trans 'Status' %}{{ mf.status_name(ticket.status) }}
          {% trans 'Time opened' %}{{ticket.created_at|date('l, d F Y')}}
          {% trans 'Last updated' %}{{ticket.updated_at|timeago}} ago
          +
          + {% if ticket.status != 'closed' %} + Close ticket + {% endif %} + Delete + Open as client +
          +
          +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.support_ticket_get_statuses({"titles":1}), ticket.status, 1) }} +
          +
          +
          + + +
          + +
          +
          + +
          +
          + +{% set canned_response_selector %} +
          + +
          +{% endset %} + +
          +{% for i, message in ticket.messages %} +
          +
          +
          {{ message.author.email }} {{ message.author.name }}
          +
          {{ message.created_at|bb_datetime }}
          +
          +
          + {{ message.content|bbmd }} +
          +
          +
          +
          +{% endfor %} +
          + +
          +
          +
          {% trans 'Reply as' %} {{ profile.name }}
          + {% include 'mod_support_canned_selector.phtml' %} +
          + +
          +
          + + + + + +
          + Show/Hide messages + + {% if ticket.messages|length > 2 and ticket.status != 'closed' %} + Close ticket + {% endif %} +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block js%} + +{% endblock %} + + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_support_public_tickets.phtml b/src/bb-themes/admin_default/html/mod_support_public_tickets.phtml new file mode 100644 index 000000000..2417d6a4b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_public_tickets.phtml @@ -0,0 +1,55 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}Public tickets{% endblock %} +{% set active_menu = 'support' %} +{% block content %} +{% set statuses = admin.support_public_ticket_get_statuses %} +
          + +
          +
          + +
          +
          {% trans 'Public tickets' %}
          + +{{ mf.table_search }} + + + + + + + + + + + + + {% set tickets = admin.support_public_ticket_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, ticket in tickets.list %} + + + + + + + + {% else %} + + + + {% endfor %} + +
          {% trans 'Subject' %}{% trans 'Email' %}{% trans 'Status' %}{% trans 'Date' %} 
          #{{ ticket.id }} - {{ ticket.subject }} ({{ ticket.messages|length}}){{ ticket.author_email }}{{ mf.status_name(ticket.status) }}{{ ticket.updated_at|date('Y-m-d') }} + +
          + {% trans 'The list is empty' %} +
          +
          +{% include "partial_pagination.phtml" with {'list': tickets, 'url':'support/public-tickets'} %} +{% endblock %} diff --git a/src/bb-themes/admin_default/html/mod_support_ticket.phtml b/src/bb-themes/admin_default/html/mod_support_ticket.phtml new file mode 100644 index 000000000..3e2b54055 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_ticket.phtml @@ -0,0 +1,313 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}} - {{ ticket.messages|length }} {% trans 'message(s)' %}{% endblock %} + +{% block breadcrumbs %} + +{% endblock %} + +{% set active_menu = 'support' %} +{% block content %} + +
          +
          +
          {{ ticket.subject }}
          +
          + + + +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% set task = ticket.rel %} + + {% if task.task %} + + + + + {% endif %} + + {% if task.type == 'order' %} + + + + + {% endif %} + + {% if task.task == 'upgrade' %} + + + + + {% endif %} + + + + + + + + +
          {% trans 'Ticket ID' %}#{{ticket.id}}
          {% trans 'Client' %}#{{ticket.client.id}} {{ticket.client.first_name}} {{ticket.client.last_name}}
          {% trans 'Help desk' %} + {{ mf.selectbox('support_helpdesk_id', admin.support_helpdesk_get_pairs, ticket.support_helpdesk_id, 1) }} +
          {% trans 'Status' %} + {% for tcode,tstatus in admin.support_ticket_get_statuses({"titles":1}) %} + + {% endfor %} +
          {% trans 'Time opened' %}{{ticket.created_at|date('l, d F Y')}}
          {{ mf.status_name(task.task) }}
          Order #{{ task.id }}
          {{ admin.product_get_pairs[task.new_value] }}
          +
          + {% if ticket.status != 'closed' %} + Close ticket + {% endif %} + Delete + + {% if task.status == 'pending' %} + Set Task complete + {% endif %} +
          +
          +
          +
          + +
          +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('support_helpdesk_id', admin.support_helpdesk_get_pairs, ticket.support_helpdesk_id, 1) }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.support_ticket_get_statuses({"titles":1}), ticket.status, 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          +
          + +
          + + + {% for note in ticket.notes %} + + + + + + {% endfor %} + + + + + +
          {{ note.note }}{{ note.author.name }} + +
          + +
          +
          + + + +
          +
          + +
          +
          + +
          + + + + + + + + + + + + + {% set tickets = admin.support_ticket_get_list({"per_page":"20", "client_id":ticket.client.id}) %} + {% for ticket in tickets.list %} + + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
          IDSubjectHelp deskStatus 
          {{ ticket.id }}{{ ticket.subject|truncate(30) }}{{ ticket.helpdesk.name }}{{ mf.status_name(ticket.status) }}
          {% trans 'The list is empty' %}
          + New support ticket +
          +
          + +
          +
          + +
          +{% for i, message in ticket.messages %} +
          +
          +
          {{ message.author.name }} {{ message.author.name }}
          +
          {{ message.created_at|bb_datetime }}
          +
          + +
          + {{ message.content|bbmd }} +
          +
          +
          +{% endfor %} +
          + + +
          +
          +
          {% trans 'Reply as' %} {{ profile.name }}
          + {% include 'mod_support_canned_selector.phtml' %} +
          + +
          +
          + + + + + +
          + Show/Hide messages + + {% if ticket.messages|length > 2 and ticket.status != 'closed' %} + Close ticket + {% endif %} +
          +
          +
          + +
          +
          + +{% endblock %} + +{% block js%} + +{% endblock %} + +{% block head %}{{ mf.bb_editor('.bb-textarea') }}{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_support_tickets.phtml b/src/bb-themes/admin_default/html/mod_support_tickets.phtml new file mode 100644 index 000000000..3d2f467d9 --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_support_tickets.phtml @@ -0,0 +1,319 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Support tickets' %}{% endblock %} +{% set active_menu = 'support' %} +{% block top_content %} +{% if request.show_filter %} +
          +
          {% trans 'Filter support tickets' %}
          +
          + +
          + +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + {{ mf.selectbox('status', admin.support_ticket_get_statuses({"titles":1}), request.status, 0, "All statuses") }} +
          +
          +
          + +
          + +
          + {{ mf.selectbox('support_helpdesk_id', admin.support_helpdesk_get_pairs, request.support_helpdesk_id, 0, "All help desks") }} +
          +
          +
          + +
          + +
          +
            +
          • +
          • -
          • +
          • +
          +
          +
          +
          + + + +
          +
          +
          +
          +
          +{% else %} +{% set statuses = admin.support_ticket_get_statuses %} +
          + +
          +
          +{% endif %} + +{% endblock %} + +{% block content %} + +
          + + + +
          + +
          +
          + + {{ mf.table_search }} + + + + + + + + + + + + + {% set tickets = admin.support_ticket_get_list({"per_page":30, "page":request.page}|merge(request)) %} + {% for i, ticket in tickets.list %} + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + +
          {% trans 'Client' %}{% trans 'Subject' %}{% trans 'Status' %}{% trans 'Helpdesk' %} 
          gravatar{{ ticket.client.first_name|truncate(1, null, '.') }} {{ ticket.client.last_name }} + #{{ticket.id}} - {{ticket.subject|truncate(50)}} ({{ ticket.replies }}) +
          + {% if ticket.notes|length %} + + {% endif %} + {{ticket.updated_at|timeago}} {% trans 'ago' %} +
          {{mf.status_name(ticket.status)}}{{ticket.helpdesk.name}} + + +
          {% trans 'The list is empty' %}
          + {% include "partial_pagination.phtml" with {'list': tickets, 'url':'support'} %} +
          + +
          +
          +

          {% trans 'Open ticket for existing client' %}

          +
          + +
          +
          + {% if not request.client_id %} +
          + +
          + +
          +
          +
          + {% endif %} +
          + +
          + {{ mf.selectbox('support_helpdesk_id', admin.support_helpdesk_get_pairs, '', 1) }} +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +
          +
          +

          {% trans 'Open public ticket for non client' %}

          +
          + +
          +
          +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + +
          + +
          + +
          +
          +
          + + + +
          +
          +
          + +
          + +
          + +{% endblock %} + + +{% block js%} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/mod_system_index.phtml b/src/bb-themes/admin_default/html/mod_system_index.phtml new file mode 100644 index 000000000..827d1d29b --- /dev/null +++ b/src/bb-themes/admin_default/html/mod_system_index.phtml @@ -0,0 +1,72 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Settings' %}{% endblock %} +{% set active_menu = 'system' %} +{% set params = admin.system_get_params %} +{% block content %} + +
          + + + +
          +
          +
          + {{ mf.table_search }} + + + {% for ext in admin.extension_get_list({"active":1, "has_settings":1}|merge(request)) %} + + + + + + {% endfor %} + +
          {{ext.name}}{{ ext.name }}
          +
          + +
          + +
          +

          {% trans 'License' %}

          +

          {% trans 'After purchase you have received an e-mail with license key. Update license key to unlock all features of BoxBilling' %}

          +

          {% trans 'To change license key, change BB_LICENSE value in bb-config.php file' %}.

          +

          {% trans 'Edit bb-config.php file' %} (File must be writable by web server)

          +
          + + {% set env = admin.system_env %} + {% set license = admin.system_license_info %} + + + + + + + + + + + + {% if license.expires_at %} + + + + + {% endif %} + + + + + + +
          {% trans 'Licensed to' %}{{ license.licensed_to }}
          {% trans 'Key' %}{{ license.key }}
          {% trans 'Expires at' %}{{ license.expires_at|date('Y-m-d') }}
          {% trans 'IP' %}{{ env.ip }}
          +
          + +
          + +
          +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_bb_meta.phtml b/src/bb-themes/admin_default/html/partial_bb_meta.phtml new file mode 100644 index 000000000..84399bc94 --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_bb_meta.phtml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_extensions.phtml b/src/bb-themes/admin_default/html/partial_extensions.phtml new file mode 100644 index 000000000..cd661b814 --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_extensions.phtml @@ -0,0 +1,44 @@ +{% if header %} +
          +
          {{ header }}
          +
          +{% endif %} + + + + + + + + + + + + {% set extensions = admin.extension_get_latest({"type":type}) %} + {% for extension in extensions %} + + + + + + + {% else %} + + + + {% endfor %} + + + + + + + +
           ExtensionDescription 
          {{ extension.name }} + {{ extension.name|truncate(40) }} {{ extension.version }} +
          by {{extension.author}} +
          {{ extension.description|truncate(150) }} + + + +
          Explore BoxBilling extensions
          \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_footer.phtml b/src/bb-themes/admin_default/html/partial_footer.phtml new file mode 100644 index 000000000..4cdfb8dc3 --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_footer.phtml @@ -0,0 +1,44 @@ + © Copyright {{ now|date('Y') }}. All rights reserved. Powered by BoxBilling {{ guest.system_version }} + Help + + + + + {% block js %} + + {% endblock %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_menu.phtml b/src/bb-themes/admin_default/html/partial_menu.phtml new file mode 100644 index 000000000..d52b00e89 --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_menu.phtml @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_menu_top.phtml b/src/bb-themes/admin_default/html/partial_menu_top.phtml new file mode 100644 index 000000000..036e3a12d --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_menu_top.phtml @@ -0,0 +1,33 @@ + \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_pagination.phtml b/src/bb-themes/admin_default/html/partial_pagination.phtml new file mode 100644 index 000000000..be5e2dfaa --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_pagination.phtml @@ -0,0 +1,36 @@ +{% if list.pages > 1 %} +{% set currentPage = request.page|default(1) %} +{% set paginator = guest.system_paginator({"total":list.total, "page":currentPage, "per_page":list.per_page}) %} + + +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/admin_default/html/partial_pricing.phtml b/src/bb-themes/admin_default/html/partial_pricing.phtml new file mode 100644 index 000000000..57247194a --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_pricing.phtml @@ -0,0 +1,127 @@ +{% if product.type != 'domain' %} +
          + +
          + + + +
          +
          +
          + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
           {% trans 'Setup price' %} ({{ admin.currency_get_default.code }}){% trans 'Price' %} ({{ admin.currency_get_default.code }}){% trans 'Total' %} 
           
           {% trans 'Setup price' %} ({{ admin.currency_get_default.code }}){% trans 'Price for period' %} ({{ admin.currency_get_default.code }}){% trans 'First payment sum' %}{% trans 'On' %}
          + + +{% endif %} + diff --git a/src/bb-themes/admin_default/html/partial_styles.phtml b/src/bb-themes/admin_default/html/partial_styles.phtml new file mode 100644 index 000000000..efd36e04d --- /dev/null +++ b/src/bb-themes/admin_default/html/partial_styles.phtml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/src/bb-themes/admin_default/images/Chevron.gif b/src/bb-themes/admin_default/images/Chevron.gif new file mode 100644 index 000000000..ef4233145 Binary files /dev/null and b/src/bb-themes/admin_default/images/Chevron.gif differ diff --git a/src/bb-themes/admin_default/images/ChevronOverlay.png b/src/bb-themes/admin_default/images/ChevronOverlay.png new file mode 100644 index 000000000..184ee63cb Binary files /dev/null and b/src/bb-themes/admin_default/images/ChevronOverlay.png differ diff --git a/src/bb-themes/admin_default/images/IconHome.gif b/src/bb-themes/admin_default/images/IconHome.gif new file mode 100644 index 000000000..0ab9e101c Binary files /dev/null and b/src/bb-themes/admin_default/images/IconHome.gif differ diff --git a/src/bb-themes/admin_default/images/aInactive.png b/src/bb-themes/admin_default/images/aInactive.png new file mode 100644 index 000000000..d2b01d6f5 Binary files /dev/null and b/src/bb-themes/admin_default/images/aInactive.png differ diff --git a/src/bb-themes/admin_default/images/aNormal.png b/src/bb-themes/admin_default/images/aNormal.png new file mode 100644 index 000000000..5946ece0b Binary files /dev/null and b/src/bb-themes/admin_default/images/aNormal.png differ diff --git a/src/bb-themes/admin_default/images/add.png b/src/bb-themes/admin_default/images/add.png new file mode 100644 index 000000000..383263657 Binary files /dev/null and b/src/bb-themes/admin_default/images/add.png differ diff --git a/src/bb-themes/admin_default/images/addFiles.png b/src/bb-themes/admin_default/images/addFiles.png new file mode 100755 index 000000000..b50e83c64 Binary files /dev/null and b/src/bb-themes/admin_default/images/addFiles.png differ diff --git a/src/bb-themes/admin_default/images/alertOpacityOverlay.png b/src/bb-themes/admin_default/images/alertOpacityOverlay.png new file mode 100644 index 000000000..ffc7286d6 Binary files /dev/null and b/src/bb-themes/admin_default/images/alertOpacityOverlay.png differ diff --git a/src/bb-themes/admin_default/images/arrow.gif b/src/bb-themes/admin_default/images/arrow.gif new file mode 100644 index 000000000..58cf7e9e3 Binary files /dev/null and b/src/bb-themes/admin_default/images/arrow.gif differ diff --git a/src/bb-themes/admin_default/images/arrows.png b/src/bb-themes/admin_default/images/arrows.png new file mode 100644 index 000000000..6c9170344 Binary files /dev/null and b/src/bb-themes/admin_default/images/arrows.png differ diff --git a/src/bb-themes/admin_default/images/avatar.png b/src/bb-themes/admin_default/images/avatar.png new file mode 100644 index 000000000..90c9e0dc8 Binary files /dev/null and b/src/bb-themes/admin_default/images/avatar.png differ diff --git a/src/bb-themes/admin_default/images/bodyBg.jpg b/src/bb-themes/admin_default/images/bodyBg.jpg new file mode 100644 index 000000000..6eda4d031 Binary files /dev/null and b/src/bb-themes/admin_default/images/bodyBg.jpg differ diff --git a/src/bb-themes/admin_default/images/botArrow.png b/src/bb-themes/admin_default/images/botArrow.png new file mode 100644 index 000000000..8d6ef09eb Binary files /dev/null and b/src/bb-themes/admin_default/images/botArrow.png differ diff --git a/src/bb-themes/admin_default/images/calActiveBg.png b/src/bb-themes/admin_default/images/calActiveBg.png new file mode 100644 index 000000000..1c185fcae Binary files /dev/null and b/src/bb-themes/admin_default/images/calActiveBg.png differ diff --git a/src/bb-themes/admin_default/images/chosenSelect.png b/src/bb-themes/admin_default/images/chosenSelect.png new file mode 100755 index 000000000..3c8e77ac9 Binary files /dev/null and b/src/bb-themes/admin_default/images/chosenSelect.png differ diff --git a/src/bb-themes/admin_default/images/color.png b/src/bb-themes/admin_default/images/color.png new file mode 100644 index 000000000..6e6e85212 Binary files /dev/null and b/src/bb-themes/admin_default/images/color.png differ diff --git a/src/bb-themes/admin_default/images/count/blue.png b/src/bb-themes/admin_default/images/count/blue.png new file mode 100644 index 000000000..719636255 Binary files /dev/null and b/src/bb-themes/admin_default/images/count/blue.png differ diff --git a/src/bb-themes/admin_default/images/count/green.png b/src/bb-themes/admin_default/images/count/green.png new file mode 100644 index 000000000..6ed1657a9 Binary files /dev/null and b/src/bb-themes/admin_default/images/count/green.png differ diff --git a/src/bb-themes/admin_default/images/count/red.png b/src/bb-themes/admin_default/images/count/red.png new file mode 100644 index 000000000..adac18483 Binary files /dev/null and b/src/bb-themes/admin_default/images/count/red.png differ diff --git a/src/bb-themes/admin_default/images/csg-4ffefaac101ed.png b/src/bb-themes/admin_default/images/csg-4ffefaac101ed.png new file mode 100644 index 000000000..7741aa953 Binary files /dev/null and b/src/bb-themes/admin_default/images/csg-4ffefaac101ed.png differ diff --git a/src/bb-themes/admin_default/images/darkBg.jpg b/src/bb-themes/admin_default/images/darkBg.jpg new file mode 100644 index 000000000..a4963fb96 Binary files /dev/null and b/src/bb-themes/admin_default/images/darkBg.jpg differ diff --git a/src/bb-themes/admin_default/images/dashed.png b/src/bb-themes/admin_default/images/dashed.png new file mode 100644 index 000000000..a78e13648 Binary files /dev/null and b/src/bb-themes/admin_default/images/dashed.png differ diff --git a/src/bb-themes/admin_default/images/delete.png b/src/bb-themes/admin_default/images/delete.png new file mode 100644 index 000000000..bd778bc2a Binary files /dev/null and b/src/bb-themes/admin_default/images/delete.png differ diff --git a/src/bb-themes/admin_default/images/edit.png b/src/bb-themes/admin_default/images/edit.png new file mode 100644 index 000000000..a5fc0d8e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/edit.png differ diff --git a/src/bb-themes/admin_default/images/email.png b/src/bb-themes/admin_default/images/email.png new file mode 100644 index 000000000..61c4754e8 Binary files /dev/null and b/src/bb-themes/admin_default/images/email.png differ diff --git a/src/bb-themes/admin_default/images/error.png b/src/bb-themes/admin_default/images/error.png new file mode 100644 index 000000000..e745632b0 Binary files /dev/null and b/src/bb-themes/admin_default/images/error.png differ diff --git a/src/bb-themes/admin_default/images/forms/checkbox.png b/src/bb-themes/admin_default/images/forms/checkbox.png new file mode 100644 index 000000000..329b86d49 Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/checkbox.png differ diff --git a/src/bb-themes/admin_default/images/forms/radio.png b/src/bb-themes/admin_default/images/forms/radio.png new file mode 100644 index 000000000..1fe59b1be Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/radio.png differ diff --git a/src/bb-themes/admin_default/images/forms/select_left.png b/src/bb-themes/admin_default/images/forms/select_left.png new file mode 100644 index 000000000..e7adcf7a7 Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/select_left.png differ diff --git a/src/bb-themes/admin_default/images/forms/select_right.png b/src/bb-themes/admin_default/images/forms/select_right.png new file mode 100644 index 000000000..4010b0507 Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/select_right.png differ diff --git a/src/bb-themes/admin_default/images/forms/spinnerBg.png b/src/bb-themes/admin_default/images/forms/spinnerBg.png new file mode 100644 index 000000000..754073503 Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/spinnerBg.png differ diff --git a/src/bb-themes/admin_default/images/forms/spinnerBottom.png b/src/bb-themes/admin_default/images/forms/spinnerBottom.png new file mode 100644 index 000000000..78d5b75eb Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/spinnerBottom.png differ diff --git a/src/bb-themes/admin_default/images/forms/spinnerTop.png b/src/bb-themes/admin_default/images/forms/spinnerTop.png new file mode 100644 index 000000000..6534f8777 Binary files /dev/null and b/src/bb-themes/admin_default/images/forms/spinnerTop.png differ diff --git a/src/bb-themes/admin_default/images/hover.png b/src/bb-themes/admin_default/images/hover.png new file mode 100644 index 000000000..92f004665 Binary files /dev/null and b/src/bb-themes/admin_default/images/hover.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/abacus.png b/src/bb-themes/admin_default/images/icons/dark/abacus.png new file mode 100644 index 000000000..bc4299428 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/abacus.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/add.png b/src/bb-themes/admin_default/images/icons/dark/add.png new file mode 100644 index 000000000..c4077a28f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/add.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/addressBook.png b/src/bb-themes/admin_default/images/icons/dark/addressBook.png new file mode 100644 index 000000000..a62c7558c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/addressBook.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/adminUser.png b/src/bb-themes/admin_default/images/icons/dark/adminUser.png new file mode 100644 index 000000000..804e5854a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/adminUser.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/adminUser2.png b/src/bb-themes/admin_default/images/icons/dark/adminUser2.png new file mode 100644 index 000000000..d2b04f5e7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/adminUser2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/airplane.png b/src/bb-themes/admin_default/images/icons/dark/airplane.png new file mode 100644 index 000000000..bc7c8b400 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/airplane.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/alarm.png b/src/bb-themes/admin_default/images/icons/dark/alarm.png new file mode 100644 index 000000000..f188dc30f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/alarm.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/alert.png b/src/bb-themes/admin_default/images/icons/dark/alert.png new file mode 100644 index 000000000..c3b591f4d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/alert.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/alert2.png b/src/bb-themes/admin_default/images/icons/dark/alert2.png new file mode 100644 index 000000000..f4567eafd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/alert2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/android.png b/src/bb-themes/admin_default/images/icons/dark/android.png new file mode 100644 index 000000000..289cde27e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/android.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/archive.png b/src/bb-themes/admin_default/images/icons/dark/archive.png new file mode 100644 index 000000000..547e79e57 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/archive.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/arrowDown.png b/src/bb-themes/admin_default/images/icons/dark/arrowDown.png new file mode 100644 index 000000000..41a7e2036 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/arrowDown.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/arrowLeft.png b/src/bb-themes/admin_default/images/icons/dark/arrowLeft.png new file mode 100644 index 000000000..c82970cfa Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/arrowLeft.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/arrowRight.png b/src/bb-themes/admin_default/images/icons/dark/arrowRight.png new file mode 100644 index 000000000..3f63dcc39 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/arrowRight.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/arrowUp.png b/src/bb-themes/admin_default/images/icons/dark/arrowUp.png new file mode 100644 index 000000000..d136373c4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/arrowUp.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bag.png b/src/bb-themes/admin_default/images/icons/dark/bag.png new file mode 100644 index 000000000..43e0f3d83 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bag.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/baloons.png b/src/bb-themes/admin_default/images/icons/dark/baloons.png new file mode 100644 index 000000000..8c3bae2fc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/baloons.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bandaid.png b/src/bb-themes/admin_default/images/icons/dark/bandaid.png new file mode 100644 index 000000000..d44139a35 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bandaid.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/basket.png b/src/bb-themes/admin_default/images/icons/dark/basket.png new file mode 100644 index 000000000..d11fe8b8f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/basket.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/basket2.png b/src/bb-themes/admin_default/images/icons/dark/basket2.png new file mode 100644 index 000000000..5d1296230 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/basket2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/battery.png b/src/bb-themes/admin_default/images/icons/dark/battery.png new file mode 100644 index 000000000..a824e4777 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/battery.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/batteryFull.png b/src/bb-themes/admin_default/images/icons/dark/batteryFull.png new file mode 100644 index 000000000..59a98a712 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/batteryFull.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bell.png b/src/bb-themes/admin_default/images/icons/dark/bell.png new file mode 100644 index 000000000..a5b43632f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bell.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bell2.png b/src/bb-themes/admin_default/images/icons/dark/bell2.png new file mode 100644 index 000000000..835b3b7fe Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bell2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bigBrush.png b/src/bb-themes/admin_default/images/icons/dark/bigBrush.png new file mode 100644 index 000000000..02478982e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bigBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/blackberry.png b/src/bb-themes/admin_default/images/icons/dark/blackberry.png new file mode 100644 index 000000000..4f019302b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/blackberry.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/block.png b/src/bb-themes/admin_default/images/icons/dark/block.png new file mode 100644 index 000000000..c757ce6b0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/block.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/blocks.png b/src/bb-themes/admin_default/images/icons/dark/blocks.png new file mode 100644 index 000000000..21333e4de Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/blocks.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bluetooth.png b/src/bb-themes/admin_default/images/icons/dark/bluetooth.png new file mode 100644 index 000000000..174ce4f37 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bluetooth.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bluetooth2.png b/src/bb-themes/admin_default/images/icons/dark/bluetooth2.png new file mode 100644 index 000000000..d8cca4853 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bluetooth2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bluray.png b/src/bb-themes/admin_default/images/icons/dark/bluray.png new file mode 100644 index 000000000..a01284fda Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bluray.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/book.png b/src/bb-themes/admin_default/images/icons/dark/book.png new file mode 100644 index 000000000..fcd008ec5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/book.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bookLarge.png b/src/bb-themes/admin_default/images/icons/dark/bookLarge.png new file mode 100644 index 000000000..488e5d955 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bookLarge.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/books.png b/src/bb-themes/admin_default/images/icons/dark/books.png new file mode 100644 index 000000000..950387f0d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/books.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bright.png b/src/bb-themes/admin_default/images/icons/dark/bright.png new file mode 100644 index 000000000..7d90563fe Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bright.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bubbles.png b/src/bb-themes/admin_default/images/icons/dark/bubbles.png new file mode 100644 index 000000000..ba0b65fc4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bubbles.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bubbles2.png b/src/bb-themes/admin_default/images/icons/dark/bubbles2.png new file mode 100644 index 000000000..45b6e2a37 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bubbles2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/building.png b/src/bb-themes/admin_default/images/icons/dark/building.png new file mode 100644 index 000000000..fdd0d9b00 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/building.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/bullsEye.png b/src/bb-themes/admin_default/images/icons/dark/bullsEye.png new file mode 100644 index 000000000..be9ec9640 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/bullsEye.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/buzz.png b/src/bb-themes/admin_default/images/icons/dark/buzz.png new file mode 100644 index 000000000..7dc9835b8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/buzz.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/calc.png b/src/bb-themes/admin_default/images/icons/dark/calc.png new file mode 100644 index 000000000..f8ca1e62e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/calc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/camera.png b/src/bb-themes/admin_default/images/icons/dark/camera.png new file mode 100644 index 000000000..5aebed30b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/camera.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/camera2.png b/src/bb-themes/admin_default/images/icons/dark/camera2.png new file mode 100644 index 000000000..49ca62089 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/camera2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/car.png b/src/bb-themes/admin_default/images/icons/dark/car.png new file mode 100644 index 000000000..30cd68a89 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/car.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cart.png b/src/bb-themes/admin_default/images/icons/dark/cart.png new file mode 100644 index 000000000..71432b521 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cart.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cart2.png b/src/bb-themes/admin_default/images/icons/dark/cart2.png new file mode 100644 index 000000000..8fd8a6c70 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cart2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cart3.png b/src/bb-themes/admin_default/images/icons/dark/cart3.png new file mode 100644 index 000000000..17ccabec5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cart3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cart4.png b/src/bb-themes/admin_default/images/icons/dark/cart4.png new file mode 100644 index 000000000..4b5ddc3dc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cart4.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cashRegister.png b/src/bb-themes/admin_default/images/icons/dark/cashRegister.png new file mode 100644 index 000000000..b92d79a65 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cashRegister.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cassette.png b/src/bb-themes/admin_default/images/icons/dark/cassette.png new file mode 100644 index 000000000..bda3edd88 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cassette.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cat.png b/src/bb-themes/admin_default/images/icons/dark/cat.png new file mode 100644 index 000000000..fb3729b0a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cat.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cd.png b/src/bb-themes/admin_default/images/icons/dark/cd.png new file mode 100644 index 000000000..df315a97c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cd.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chair.png b/src/bb-themes/admin_default/images/icons/dark/chair.png new file mode 100644 index 000000000..1293ff212 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chair.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart.png b/src/bb-themes/admin_default/images/icons/dark/chart.png new file mode 100644 index 000000000..7de2f14ff Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart2.png b/src/bb-themes/admin_default/images/icons/dark/chart2.png new file mode 100644 index 000000000..e5f85b49c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart3.png b/src/bb-themes/admin_default/images/icons/dark/chart3.png new file mode 100644 index 000000000..70aa33332 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart4.png b/src/bb-themes/admin_default/images/icons/dark/chart4.png new file mode 100644 index 000000000..310f0d497 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart4.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart5.png b/src/bb-themes/admin_default/images/icons/dark/chart5.png new file mode 100644 index 000000000..65c6f2cd9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart5.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart6.png b/src/bb-themes/admin_default/images/icons/dark/chart6.png new file mode 100644 index 000000000..6ada4bc2d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart6.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart7.png b/src/bb-themes/admin_default/images/icons/dark/chart7.png new file mode 100644 index 000000000..2953652db Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart7.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chart8.png b/src/bb-themes/admin_default/images/icons/dark/chart8.png new file mode 100644 index 000000000..b67c97308 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chart8.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/check.png b/src/bb-themes/admin_default/images/icons/dark/check.png new file mode 100644 index 000000000..c4b1285b9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/check.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chemical.png b/src/bb-themes/admin_default/images/icons/dark/chemical.png new file mode 100644 index 000000000..d338f527b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chemical.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/chrome.png b/src/bb-themes/admin_default/images/icons/dark/chrome.png new file mode 100644 index 000000000..1e216b10b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/chrome.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/clipboard.png b/src/bb-themes/admin_default/images/icons/dark/clipboard.png new file mode 100644 index 000000000..039ce92fe Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/clipboard.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/clock.png b/src/bb-themes/admin_default/images/icons/dark/clock.png new file mode 100644 index 000000000..fc8e130b7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/clock.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/close.png b/src/bb-themes/admin_default/images/icons/dark/close.png new file mode 100644 index 000000000..406bd1807 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/close.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cloud.png b/src/bb-themes/admin_default/images/icons/dark/cloud.png new file mode 100644 index 000000000..79defe908 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cloud.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cloudDownload.png b/src/bb-themes/admin_default/images/icons/dark/cloudDownload.png new file mode 100644 index 000000000..12037b58b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cloudDownload.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cloudUpload.png b/src/bb-themes/admin_default/images/icons/dark/cloudUpload.png new file mode 100644 index 000000000..f16b1b929 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cloudUpload.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cog.png b/src/bb-themes/admin_default/images/icons/dark/cog.png new file mode 100644 index 000000000..72f9b532a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cog.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cog2.png b/src/bb-themes/admin_default/images/icons/dark/cog2.png new file mode 100644 index 000000000..f6e892c09 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cog2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cog3.png b/src/bb-themes/admin_default/images/icons/dark/cog3.png new file mode 100644 index 000000000..a857b399c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cog3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cog4.png b/src/bb-themes/admin_default/images/icons/dark/cog4.png new file mode 100644 index 000000000..5c6ddb2be Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cog4.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/companies.png b/src/bb-themes/admin_default/images/icons/dark/companies.png new file mode 100644 index 000000000..63075e1d5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/companies.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/computer.png b/src/bb-themes/admin_default/images/icons/dark/computer.png new file mode 100644 index 000000000..9d56f7e7f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/computer.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/coverflow.png b/src/bb-themes/admin_default/images/icons/dark/coverflow.png new file mode 100644 index 000000000..44f28d507 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/coverflow.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/create.png b/src/bb-themes/admin_default/images/icons/dark/create.png new file mode 100644 index 000000000..90ed3fac4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/create.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cup.png b/src/bb-themes/admin_default/images/icons/dark/cup.png new file mode 100644 index 000000000..2ae3f9f72 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cup.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/cut.png b/src/bb-themes/admin_default/images/icons/dark/cut.png new file mode 100644 index 000000000..893667c6b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/cut.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dayCalendar.png b/src/bb-themes/admin_default/images/icons/dark/dayCalendar.png new file mode 100644 index 000000000..e2ae552a7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dayCalendar.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/delicious.png b/src/bb-themes/admin_default/images/icons/dark/delicious.png new file mode 100644 index 000000000..6a694dae3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/delicious.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/denied.png b/src/bb-themes/admin_default/images/icons/dark/denied.png new file mode 100644 index 000000000..116a864f0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/denied.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dialog.png b/src/bb-themes/admin_default/images/icons/dark/dialog.png new file mode 100644 index 000000000..caa7457d9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dialog.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/digg.png b/src/bb-themes/admin_default/images/icons/dark/digg.png new file mode 100644 index 000000000..0ba47bb91 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/digg.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/digg2.png b/src/bb-themes/admin_default/images/icons/dark/digg2.png new file mode 100644 index 000000000..ea3e660e4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/digg2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/doc.png b/src/bb-themes/admin_default/images/icons/dark/doc.png new file mode 100644 index 000000000..ee9dce503 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/doc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/docs.png b/src/bb-themes/admin_default/images/icons/dark/docs.png new file mode 100644 index 000000000..830b23804 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/docs.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/download.png b/src/bb-themes/admin_default/images/icons/dark/download.png new file mode 100644 index 000000000..553170657 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/download.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/download2.png b/src/bb-themes/admin_default/images/icons/dark/download2.png new file mode 100644 index 000000000..d00b5ed63 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/download2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/download3.png b/src/bb-themes/admin_default/images/icons/dark/download3.png new file mode 100644 index 000000000..66f3e653f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/download3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dribbble.png b/src/bb-themes/admin_default/images/icons/dark/dribbble.png new file mode 100644 index 000000000..cc2ee9b33 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dribbble.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dribbble2.png b/src/bb-themes/admin_default/images/icons/dark/dribbble2.png new file mode 100644 index 000000000..2c839598b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dribbble2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/drive.png b/src/bb-themes/admin_default/images/icons/dark/drive.png new file mode 100644 index 000000000..ce5f4b92d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/drive.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dropbox.png b/src/bb-themes/admin_default/images/icons/dark/dropbox.png new file mode 100644 index 000000000..afc3e726f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dropbox.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dropper.png b/src/bb-themes/admin_default/images/icons/dark/dropper.png new file mode 100644 index 000000000..5eab84c1e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dropper.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/drupal.png b/src/bb-themes/admin_default/images/icons/dark/drupal.png new file mode 100644 index 000000000..ae1463482 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/drupal.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/dvd.png b/src/bb-themes/admin_default/images/icons/dark/dvd.png new file mode 100644 index 000000000..27961f41b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/dvd.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/electricity.png b/src/bb-themes/admin_default/images/icons/dark/electricity.png new file mode 100644 index 000000000..b00fa1044 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/electricity.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/electroPlug.png b/src/bb-themes/admin_default/images/icons/dark/electroPlug.png new file mode 100644 index 000000000..f54dfe1e4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/electroPlug.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/excelDoc.png b/src/bb-themes/admin_default/images/icons/dark/excelDoc.png new file mode 100644 index 000000000..ccd846bcf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/excelDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/exit.png b/src/bb-themes/admin_default/images/icons/dark/exit.png new file mode 100644 index 000000000..ab609b16c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/exit.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/expengine.png b/src/bb-themes/admin_default/images/icons/dark/expengine.png new file mode 100644 index 000000000..dcab7ea60 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/expengine.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/expose.png b/src/bb-themes/admin_default/images/icons/dark/expose.png new file mode 100644 index 000000000..7d1d5d8b5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/expose.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/facebook.png b/src/bb-themes/admin_default/images/icons/dark/facebook.png new file mode 100644 index 000000000..dd9c38771 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/facebook.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/fax.png b/src/bb-themes/admin_default/images/icons/dark/fax.png new file mode 100644 index 000000000..ba34e871f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/fax.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/femaleContour.png b/src/bb-themes/admin_default/images/icons/dark/femaleContour.png new file mode 100644 index 000000000..bc87dedea Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/femaleContour.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/femaleSymbol.png b/src/bb-themes/admin_default/images/icons/dark/femaleSymbol.png new file mode 100644 index 000000000..a319e432c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/femaleSymbol.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/files.png b/src/bb-themes/admin_default/images/icons/dark/files.png new file mode 100644 index 000000000..cc2641796 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/files.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/filmCamera.png b/src/bb-themes/admin_default/images/icons/dark/filmCamera.png new file mode 100644 index 000000000..72f97182b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/filmCamera.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/filmStrip.png b/src/bb-themes/admin_default/images/icons/dark/filmStrip.png new file mode 100644 index 000000000..fdf83fed8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/filmStrip.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/filmStrip2.png b/src/bb-themes/admin_default/images/icons/dark/filmStrip2.png new file mode 100644 index 000000000..ba57e23d8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/filmStrip2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/firefox.png b/src/bb-themes/admin_default/images/icons/dark/firefox.png new file mode 100644 index 000000000..edf98be23 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/firefox.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/flag.png b/src/bb-themes/admin_default/images/icons/dark/flag.png new file mode 100644 index 000000000..e9cedac6c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/flag.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/flag2.png b/src/bb-themes/admin_default/images/icons/dark/flag2.png new file mode 100644 index 000000000..e6135a51f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/flag2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/flagFinished.png b/src/bb-themes/admin_default/images/icons/dark/flagFinished.png new file mode 100644 index 000000000..860a88ae1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/flagFinished.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/folder.png b/src/bb-themes/admin_default/images/icons/dark/folder.png new file mode 100644 index 000000000..948dfcdc0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/folder.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/footprints.png b/src/bb-themes/admin_default/images/icons/dark/footprints.png new file mode 100644 index 000000000..5afa884ba Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/footprints.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/fountainPen.png b/src/bb-themes/admin_default/images/icons/dark/fountainPen.png new file mode 100644 index 000000000..b86e302f8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/fountainPen.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/frames.png b/src/bb-themes/admin_default/images/icons/dark/frames.png new file mode 100644 index 000000000..2cf2bd6cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/frames.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/full.png b/src/bb-themes/admin_default/images/icons/dark/full.png new file mode 100644 index 000000000..49427016b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/full.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/full2.png b/src/bb-themes/admin_default/images/icons/dark/full2.png new file mode 100644 index 000000000..0605fac67 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/full2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/fullscreen.png b/src/bb-themes/admin_default/images/icons/dark/fullscreen.png new file mode 100644 index 000000000..468d839af Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/fullscreen.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/globe.png b/src/bb-themes/admin_default/images/icons/dark/globe.png new file mode 100644 index 000000000..ace66aea0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/globe.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/globe2.png b/src/bb-themes/admin_default/images/icons/dark/globe2.png new file mode 100644 index 000000000..757a3b105 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/globe2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/gmaps.png b/src/bb-themes/admin_default/images/icons/dark/gmaps.png new file mode 100644 index 000000000..25482603d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/gmaps.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/goBack.png b/src/bb-themes/admin_default/images/icons/dark/goBack.png new file mode 100644 index 000000000..b136a3cd4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/goBack.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/goFull.png b/src/bb-themes/admin_default/images/icons/dark/goFull.png new file mode 100644 index 000000000..ae563dd57 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/goFull.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/graph.png b/src/bb-themes/admin_default/images/icons/dark/graph.png new file mode 100644 index 000000000..c6ee91f2c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/graph.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/hd.png b/src/bb-themes/admin_default/images/icons/dark/hd.png new file mode 100644 index 000000000..ebca290b2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/hd.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/hd2.png b/src/bb-themes/admin_default/images/icons/dark/hd2.png new file mode 100644 index 000000000..8c10bf444 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/hd2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/hd3.png b/src/bb-themes/admin_default/images/icons/dark/hd3.png new file mode 100644 index 000000000..b454dab6f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/hd3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/headphones.png b/src/bb-themes/admin_default/images/icons/dark/headphones.png new file mode 100644 index 000000000..d3d58e22a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/headphones.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/heart.png b/src/bb-themes/admin_default/images/icons/dark/heart.png new file mode 100644 index 000000000..2c1e968f2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/heart.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/help.png b/src/bb-themes/admin_default/images/icons/dark/help.png new file mode 100644 index 000000000..c421fe1d9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/help.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/home.png b/src/bb-themes/admin_default/images/icons/dark/home.png new file mode 100644 index 000000000..e1c8310b2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/home.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/home2.png b/src/bb-themes/admin_default/images/icons/dark/home2.png new file mode 100644 index 000000000..ae78c0ad3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/home2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/icecream.png b/src/bb-themes/admin_default/images/icons/dark/icecream.png new file mode 100644 index 000000000..6dbaa53cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/icecream.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ichat.png b/src/bb-themes/admin_default/images/icons/dark/ichat.png new file mode 100644 index 000000000..b6a63deb6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ichat.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/image.png b/src/bb-themes/admin_default/images/icons/dark/image.png new file mode 100644 index 000000000..c4371c24a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/image.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/image2.png b/src/bb-themes/admin_default/images/icons/dark/image2.png new file mode 100644 index 000000000..5f0be0819 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/image2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/imageList.png b/src/bb-themes/admin_default/images/icons/dark/imageList.png new file mode 100644 index 000000000..68f15541f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/imageList.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/images.png b/src/bb-themes/admin_default/images/icons/dark/images.png new file mode 100644 index 000000000..b792ce593 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/images.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/images2.png b/src/bb-themes/admin_default/images/icons/dark/images2.png new file mode 100644 index 000000000..0ce2a62ef Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/images2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/imagesList.png b/src/bb-themes/admin_default/images/icons/dark/imagesList.png new file mode 100644 index 000000000..f63ca4ef3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/imagesList.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/inbox.png b/src/bb-themes/admin_default/images/icons/dark/inbox.png new file mode 100644 index 000000000..f478ccd32 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/inbox.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/inbox2.png b/src/bb-themes/admin_default/images/icons/dark/inbox2.png new file mode 100644 index 000000000..dfaa0dff5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/inbox2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/incoming.png b/src/bb-themes/admin_default/images/icons/dark/incoming.png new file mode 100644 index 000000000..fd596a8eb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/incoming.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/info.png b/src/bb-themes/admin_default/images/icons/dark/info.png new file mode 100644 index 000000000..b48c27628 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/info.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ipad.png b/src/bb-themes/admin_default/images/icons/dark/ipad.png new file mode 100644 index 000000000..76acc558c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ipad.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/iphone.png b/src/bb-themes/admin_default/images/icons/dark/iphone.png new file mode 100644 index 000000000..c19dd56be Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/iphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ipodClassic.png b/src/bb-themes/admin_default/images/icons/dark/ipodClassic.png new file mode 100644 index 000000000..b9dfdabfd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ipodClassic.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ipodNano.png b/src/bb-themes/admin_default/images/icons/dark/ipodNano.png new file mode 100644 index 000000000..dcb0069bf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ipodNano.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/joomla.png b/src/bb-themes/admin_default/images/icons/dark/joomla.png new file mode 100644 index 000000000..2c10fad04 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/joomla.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/key.png b/src/bb-themes/admin_default/images/icons/dark/key.png new file mode 100644 index 000000000..831bd775c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/key.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ladyPurse.png b/src/bb-themes/admin_default/images/icons/dark/ladyPurse.png new file mode 100644 index 000000000..4e207ae90 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ladyPurse.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/lamp.png b/src/bb-themes/admin_default/images/icons/dark/lamp.png new file mode 100644 index 000000000..08e562dd0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/lamp.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/laptop.png b/src/bb-themes/admin_default/images/icons/dark/laptop.png new file mode 100644 index 000000000..5c20eb635 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/laptop.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/lastFM.png b/src/bb-themes/admin_default/images/icons/dark/lastFM.png new file mode 100644 index 000000000..037539cde Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/lastFM.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/lemonadeStand.png b/src/bb-themes/admin_default/images/icons/dark/lemonadeStand.png new file mode 100644 index 000000000..e69f914c5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/lemonadeStand.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/lightBulb.png b/src/bb-themes/admin_default/images/icons/dark/lightBulb.png new file mode 100644 index 000000000..5c748ca28 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/lightBulb.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/like.png b/src/bb-themes/admin_default/images/icons/dark/like.png new file mode 100644 index 000000000..2e2e50339 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/like.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/link.png b/src/bb-themes/admin_default/images/icons/dark/link.png new file mode 100644 index 000000000..053cbe60e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/link.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/link2.png b/src/bb-themes/admin_default/images/icons/dark/link2.png new file mode 100644 index 000000000..f25f48baf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/link2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/linux.png b/src/bb-themes/admin_default/images/icons/dark/linux.png new file mode 100644 index 000000000..dcf0edbe4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/linux.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/list.png b/src/bb-themes/admin_default/images/icons/dark/list.png new file mode 100644 index 000000000..0f99d25dc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/list.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/loading.png b/src/bb-themes/admin_default/images/icons/dark/loading.png new file mode 100644 index 000000000..128188fe8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/loading.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/locked.png b/src/bb-themes/admin_default/images/icons/dark/locked.png new file mode 100644 index 000000000..2abd7542a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/locked.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/locked2.png b/src/bb-themes/admin_default/images/icons/dark/locked2.png new file mode 100644 index 000000000..54ab6dd54 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/locked2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/logoff.png b/src/bb-themes/admin_default/images/icons/dark/logoff.png new file mode 100644 index 000000000..936be9d4a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/logoff.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/macos.png b/src/bb-themes/admin_default/images/icons/dark/macos.png new file mode 100644 index 000000000..990f7f7a0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/macos.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/magicMouse.png b/src/bb-themes/admin_default/images/icons/dark/magicMouse.png new file mode 100644 index 000000000..15b83ad62 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/magicMouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/magnify.png b/src/bb-themes/admin_default/images/icons/dark/magnify.png new file mode 100644 index 000000000..2afdfdbd4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/magnify.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/mail.png b/src/bb-themes/admin_default/images/icons/dark/mail.png new file mode 100644 index 000000000..de18ed175 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/mail.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/maleContour.png b/src/bb-themes/admin_default/images/icons/dark/maleContour.png new file mode 100644 index 000000000..cfb5e6e25 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/maleContour.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/maleSymbol.png b/src/bb-themes/admin_default/images/icons/dark/maleSymbol.png new file mode 100644 index 000000000..47da25afb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/maleSymbol.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/map.png b/src/bb-themes/admin_default/images/icons/dark/map.png new file mode 100644 index 000000000..229a803cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/map.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/medicalCase.png b/src/bb-themes/admin_default/images/icons/dark/medicalCase.png new file mode 100644 index 000000000..5aa70d57c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/medicalCase.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/megaphone.png b/src/bb-themes/admin_default/images/icons/dark/megaphone.png new file mode 100644 index 000000000..843aae75d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/megaphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/microphone.png b/src/bb-themes/admin_default/images/icons/dark/microphone.png new file mode 100644 index 000000000..b53b94155 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/microphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/mightyMouse.png b/src/bb-themes/admin_default/images/icons/dark/mightyMouse.png new file mode 100644 index 000000000..4f828e245 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/mightyMouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/mobile.png b/src/bb-themes/admin_default/images/icons/dark/mobile.png new file mode 100644 index 000000000..164145680 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/mobile.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/mobyPicture.png b/src/bb-themes/admin_default/images/icons/dark/mobyPicture.png new file mode 100644 index 000000000..1ca402a45 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/mobyPicture.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/money.png b/src/bb-themes/admin_default/images/icons/dark/money.png new file mode 100644 index 000000000..8e7bee575 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/money.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/money2.png b/src/bb-themes/admin_default/images/icons/dark/money2.png new file mode 100644 index 000000000..c6c0c12b6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/money2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/monitor.png b/src/bb-themes/admin_default/images/icons/dark/monitor.png new file mode 100644 index 000000000..d1a112d3d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/monitor.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/monthCalendar.png b/src/bb-themes/admin_default/images/icons/dark/monthCalendar.png new file mode 100644 index 000000000..c5024823a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/monthCalendar.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/mouse.png b/src/bb-themes/admin_default/images/icons/dark/mouse.png new file mode 100644 index 000000000..db8a1f22a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/mouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/music.png b/src/bb-themes/admin_default/images/icons/dark/music.png new file mode 100644 index 000000000..6ede3b274 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/music.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/myspace.png b/src/bb-themes/admin_default/images/icons/dark/myspace.png new file mode 100644 index 000000000..ee25d49eb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/myspace.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/notebook.png b/src/bb-themes/admin_default/images/icons/dark/notebook.png new file mode 100644 index 000000000..e9d40fd50 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/notebook.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/outgoing.png b/src/bb-themes/admin_default/images/icons/dark/outgoing.png new file mode 100644 index 000000000..e74b811c2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/outgoing.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/pacman.png b/src/bb-themes/admin_default/images/icons/dark/pacman.png new file mode 100644 index 000000000..266e0e976 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/pacman.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/paintBrush.png b/src/bb-themes/admin_default/images/icons/dark/paintBrush.png new file mode 100644 index 000000000..1bded1968 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/paintBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/pants.png b/src/bb-themes/admin_default/images/icons/dark/pants.png new file mode 100644 index 000000000..babdd5b23 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/pants.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/paperclip.png b/src/bb-themes/admin_default/images/icons/dark/paperclip.png new file mode 100644 index 000000000..6fccd1a9a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/paperclip.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/paypal.png b/src/bb-themes/admin_default/images/icons/dark/paypal.png new file mode 100644 index 000000000..693f72a07 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/paypal.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/paypal2.png b/src/bb-themes/admin_default/images/icons/dark/paypal2.png new file mode 100644 index 000000000..6499f08bd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/paypal2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/paypal3.png b/src/bb-themes/admin_default/images/icons/dark/paypal3.png new file mode 100644 index 000000000..a5188a3d1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/paypal3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/pdfDoc.png b/src/bb-themes/admin_default/images/icons/dark/pdfDoc.png new file mode 100644 index 000000000..dac04a466 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/pdfDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/pencil.png b/src/bb-themes/admin_default/images/icons/dark/pencil.png new file mode 100644 index 000000000..ab59b9f3c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/pencil.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/phone.png b/src/bb-themes/admin_default/images/icons/dark/phone.png new file mode 100644 index 000000000..37f757bc2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/phone.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/phone2.png b/src/bb-themes/admin_default/images/icons/dark/phone2.png new file mode 100644 index 000000000..3d785f398 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/phone2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/phone3.png b/src/bb-themes/admin_default/images/icons/dark/phone3.png new file mode 100644 index 000000000..8ba17054a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/phone3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/photos.png b/src/bb-themes/admin_default/images/icons/dark/photos.png new file mode 100644 index 000000000..381fef23e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/photos.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/piggyBank.png b/src/bb-themes/admin_default/images/icons/dark/piggyBank.png new file mode 100644 index 000000000..053895703 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/piggyBank.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/pin.png b/src/bb-themes/admin_default/images/icons/dark/pin.png new file mode 100644 index 000000000..43057dc9c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/pin.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/planeSuitcase.png b/src/bb-themes/admin_default/images/icons/dark/planeSuitcase.png new file mode 100644 index 000000000..5283cedd2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/planeSuitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/play.png b/src/bb-themes/admin_default/images/icons/dark/play.png new file mode 100644 index 000000000..d5861251c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/play.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/play2.png b/src/bb-themes/admin_default/images/icons/dark/play2.png new file mode 100644 index 000000000..9450bf16e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/play2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/plixi.png b/src/bb-themes/admin_default/images/icons/dark/plixi.png new file mode 100644 index 000000000..8bba31a68 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/plixi.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/podium.png b/src/bb-themes/admin_default/images/icons/dark/podium.png new file mode 100644 index 000000000..f56fb6c75 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/podium.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/postcard.png b/src/bb-themes/admin_default/images/icons/dark/postcard.png new file mode 100644 index 000000000..a6cfecf1b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/postcard.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/power.png b/src/bb-themes/admin_default/images/icons/dark/power.png new file mode 100644 index 000000000..791af2128 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/power.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/powerBattery.png b/src/bb-themes/admin_default/images/icons/dark/powerBattery.png new file mode 100644 index 000000000..56173dc81 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/powerBattery.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ppDoc.png b/src/bb-themes/admin_default/images/icons/dark/ppDoc.png new file mode 100644 index 000000000..49c9955ec Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ppDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/presentation.png b/src/bb-themes/admin_default/images/icons/dark/presentation.png new file mode 100644 index 000000000..7fa6d29df Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/presentation.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/preview.png b/src/bb-themes/admin_default/images/icons/dark/preview.png new file mode 100644 index 000000000..06b5a9f2d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/preview.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/priceTag.png b/src/bb-themes/admin_default/images/icons/dark/priceTag.png new file mode 100644 index 000000000..3aa581f89 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/priceTag.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/priceTags.png b/src/bb-themes/admin_default/images/icons/dark/priceTags.png new file mode 100644 index 000000000..242fd9629 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/priceTags.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/printer.png b/src/bb-themes/admin_default/images/icons/dark/printer.png new file mode 100644 index 000000000..ac02c7852 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/printer.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/radio.png b/src/bb-themes/admin_default/images/icons/dark/radio.png new file mode 100644 index 000000000..260e5a4cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/radio.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/record.png b/src/bb-themes/admin_default/images/icons/dark/record.png new file mode 100644 index 000000000..7b140f852 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/record.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/recycle.png b/src/bb-themes/admin_default/images/icons/dark/recycle.png new file mode 100644 index 000000000..99dd5b233 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/recycle.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/refresh.png b/src/bb-themes/admin_default/images/icons/dark/refresh.png new file mode 100644 index 000000000..06dbd754e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/refresh.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/refresh2.png b/src/bb-themes/admin_default/images/icons/dark/refresh2.png new file mode 100644 index 000000000..2dff0dd21 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/refresh2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/refresh3.png b/src/bb-themes/admin_default/images/icons/dark/refresh3.png new file mode 100644 index 000000000..fa42eea34 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/refresh3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/refresh4.png b/src/bb-themes/admin_default/images/icons/dark/refresh4.png new file mode 100644 index 000000000..f8d0ff1a8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/refresh4.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/repeat.png b/src/bb-themes/admin_default/images/icons/dark/repeat.png new file mode 100644 index 000000000..8f9a7607e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/repeat.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/robot.png b/src/bb-themes/admin_default/images/icons/dark/robot.png new file mode 100644 index 000000000..efa9c6603 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/robot.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/rss.png b/src/bb-themes/admin_default/images/icons/dark/rss.png new file mode 100644 index 000000000..9f7f43b96 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/rss.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ruler.png b/src/bb-themes/admin_default/images/icons/dark/ruler.png new file mode 100644 index 000000000..e68b5de6c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ruler.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/ruler2.png b/src/bb-themes/admin_default/images/icons/dark/ruler2.png new file mode 100644 index 000000000..3a2bd045c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/ruler2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/runningMan.png b/src/bb-themes/admin_default/images/icons/dark/runningMan.png new file mode 100644 index 000000000..7ade843d0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/runningMan.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/safari.png b/src/bb-themes/admin_default/images/icons/dark/safari.png new file mode 100644 index 000000000..92562c0dc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/safari.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/scanLabel.png b/src/bb-themes/admin_default/images/icons/dark/scanLabel.png new file mode 100644 index 000000000..f9d835ee1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/scanLabel.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/sd.png b/src/bb-themes/admin_default/images/icons/dark/sd.png new file mode 100644 index 000000000..9267826e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/sd.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/sd2.png b/src/bb-themes/admin_default/images/icons/dark/sd2.png new file mode 100644 index 000000000..f1df8e952 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/sd2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/sd3.png b/src/bb-themes/admin_default/images/icons/dark/sd3.png new file mode 100644 index 000000000..263b71aa9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/sd3.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/settings.png b/src/bb-themes/admin_default/images/icons/dark/settings.png new file mode 100644 index 000000000..dab94c82e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/settings.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/settings2.png b/src/bb-themes/admin_default/images/icons/dark/settings2.png new file mode 100644 index 000000000..1c4a9a334 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/settings2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/shirt.png b/src/bb-themes/admin_default/images/icons/dark/shirt.png new file mode 100644 index 000000000..fedf977f2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/shirt.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/shoppingBag.png b/src/bb-themes/admin_default/images/icons/dark/shoppingBag.png new file mode 100644 index 000000000..ec80ec791 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/shoppingBag.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/shuffle.png b/src/bb-themes/admin_default/images/icons/dark/shuffle.png new file mode 100644 index 000000000..4d0990534 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/shuffle.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/signPost.png b/src/bb-themes/admin_default/images/icons/dark/signPost.png new file mode 100644 index 000000000..edac7fed6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/signPost.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/signal.png b/src/bb-themes/admin_default/images/icons/dark/signal.png new file mode 100644 index 000000000..94181fd68 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/signal.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/skype.png b/src/bb-themes/admin_default/images/icons/dark/skype.png new file mode 100644 index 000000000..58fc9ab11 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/skype.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/smallBrush.png b/src/bb-themes/admin_default/images/icons/dark/smallBrush.png new file mode 100644 index 000000000..c0155ddb9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/smallBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/socks.png b/src/bb-themes/admin_default/images/icons/dark/socks.png new file mode 100644 index 000000000..e427332c2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/socks.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/sound.png b/src/bb-themes/admin_default/images/icons/dark/sound.png new file mode 100644 index 000000000..62c38733f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/sound.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/speech.png b/src/bb-themes/admin_default/images/icons/dark/speech.png new file mode 100644 index 000000000..99314b60f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/speech.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/speech2.png b/src/bb-themes/admin_default/images/icons/dark/speech2.png new file mode 100644 index 000000000..0838d1d5d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/speech2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/star.png b/src/bb-themes/admin_default/images/icons/dark/star.png new file mode 100644 index 000000000..c463ab5f1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/star.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/stats.png b/src/bb-themes/admin_default/images/icons/dark/stats.png new file mode 100644 index 000000000..b4963f6df Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/stats.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/stop.png b/src/bb-themes/admin_default/images/icons/dark/stop.png new file mode 100644 index 000000000..1b0577e56 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/stop.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/stopWatch.png b/src/bb-themes/admin_default/images/icons/dark/stopWatch.png new file mode 100644 index 000000000..c9721cafd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/stopWatch.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/strategy.png b/src/bb-themes/admin_default/images/icons/dark/strategy.png new file mode 100644 index 000000000..fab8b0732 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/strategy.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/strategy2.png b/src/bb-themes/admin_default/images/icons/dark/strategy2.png new file mode 100644 index 000000000..fc008adc0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/strategy2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/stumble.png b/src/bb-themes/admin_default/images/icons/dark/stumble.png new file mode 100644 index 000000000..ab61fdfd0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/stumble.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/suitcase.png b/src/bb-themes/admin_default/images/icons/dark/suitcase.png new file mode 100644 index 000000000..6bb19c04e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/suitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/switcher.png b/src/bb-themes/admin_default/images/icons/dark/switcher.png new file mode 100644 index 000000000..a373e2cff Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/switcher.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/table.png b/src/bb-themes/admin_default/images/icons/dark/table.png new file mode 100644 index 000000000..b9f1c4d6e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/table.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/tag.png b/src/bb-themes/admin_default/images/icons/dark/tag.png new file mode 100644 index 000000000..84a39a3a3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/tag.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/tags.png b/src/bb-themes/admin_default/images/icons/dark/tags.png new file mode 100644 index 000000000..c1796d3e6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/tags.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/timer.png b/src/bb-themes/admin_default/images/icons/dark/timer.png new file mode 100644 index 000000000..8fa44bf5a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/timer.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/transfer.png b/src/bb-themes/admin_default/images/icons/dark/transfer.png new file mode 100644 index 000000000..44941b090 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/transfer.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/trash.png b/src/bb-themes/admin_default/images/icons/dark/trash.png new file mode 100644 index 000000000..bebe8cbca Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/trash.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/travelSuitcase.png b/src/bb-themes/admin_default/images/icons/dark/travelSuitcase.png new file mode 100644 index 000000000..659b813a9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/travelSuitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/tree.png b/src/bb-themes/admin_default/images/icons/dark/tree.png new file mode 100644 index 000000000..e10463b4a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/tree.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/trolly.png b/src/bb-themes/admin_default/images/icons/dark/trolly.png new file mode 100644 index 000000000..d433a93c1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/trolly.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/truck.png b/src/bb-themes/admin_default/images/icons/dark/truck.png new file mode 100644 index 000000000..eead68925 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/truck.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/tumbler.png b/src/bb-themes/admin_default/images/icons/dark/tumbler.png new file mode 100644 index 000000000..7575bc6eb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/tumbler.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/tv.png b/src/bb-themes/admin_default/images/icons/dark/tv.png new file mode 100644 index 000000000..79f34cc20 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/tv.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/twitter.png b/src/bb-themes/admin_default/images/icons/dark/twitter.png new file mode 100644 index 000000000..75a00f2c2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/twitter.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/twitter2.png b/src/bb-themes/admin_default/images/icons/dark/twitter2.png new file mode 100644 index 000000000..5acd85882 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/twitter2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/umbrella.png b/src/bb-themes/admin_default/images/icons/dark/umbrella.png new file mode 100644 index 000000000..c112b4b1e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/umbrella.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/underConstruction.png b/src/bb-themes/admin_default/images/icons/dark/underConstruction.png new file mode 100644 index 000000000..a96965d8d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/underConstruction.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/unlocked.png b/src/bb-themes/admin_default/images/icons/dark/unlocked.png new file mode 100644 index 000000000..d7270b6c3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/unlocked.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/upload.png b/src/bb-themes/admin_default/images/icons/dark/upload.png new file mode 100644 index 000000000..2966ea7da Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/upload.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/user.png b/src/bb-themes/admin_default/images/icons/dark/user.png new file mode 100644 index 000000000..d7676cf13 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/user.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/user2.png b/src/bb-themes/admin_default/images/icons/dark/user2.png new file mode 100644 index 000000000..108081168 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/user2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/userComment.png b/src/bb-themes/admin_default/images/icons/dark/userComment.png new file mode 100644 index 000000000..8383b9ddc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/userComment.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/users.png b/src/bb-themes/admin_default/images/icons/dark/users.png new file mode 100644 index 000000000..02bc74b2a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/users.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/users2.png b/src/bb-themes/admin_default/images/icons/dark/users2.png new file mode 100644 index 000000000..150e930ba Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/users2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/vault.png b/src/bb-themes/admin_default/images/icons/dark/vault.png new file mode 100644 index 000000000..d8e5e0b38 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/vault.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/vcard.png b/src/bb-themes/admin_default/images/icons/dark/vcard.png new file mode 100644 index 000000000..913f658d3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/vcard.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/view.png b/src/bb-themes/admin_default/images/icons/dark/view.png new file mode 100644 index 000000000..b5002dc00 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/view.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/vimeo.png b/src/bb-themes/admin_default/images/icons/dark/vimeo.png new file mode 100644 index 000000000..098215f14 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/vimeo.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/vimeo2.png b/src/bb-themes/admin_default/images/icons/dark/vimeo2.png new file mode 100644 index 000000000..3270b1cff Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/vimeo2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/walkingMan.png b/src/bb-themes/admin_default/images/icons/dark/walkingMan.png new file mode 100644 index 000000000..3b398d2a4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/walkingMan.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/wifi.png b/src/bb-themes/admin_default/images/icons/dark/wifi.png new file mode 100644 index 000000000..43ceb6134 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/wifi.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/wifi2.png b/src/bb-themes/admin_default/images/icons/dark/wifi2.png new file mode 100644 index 000000000..42e1536e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/wifi2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/windows.png b/src/bb-themes/admin_default/images/icons/dark/windows.png new file mode 100644 index 000000000..7a4561ba6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/windows.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/wordDoc.png b/src/bb-themes/admin_default/images/icons/dark/wordDoc.png new file mode 100644 index 000000000..ca9c4f756 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/wordDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/wordpress.png b/src/bb-themes/admin_default/images/icons/dark/wordpress.png new file mode 100644 index 000000000..899fe198f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/wordpress.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/wordpress2.png b/src/bb-themes/admin_default/images/icons/dark/wordpress2.png new file mode 100644 index 000000000..31fa0c733 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/wordpress2.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/youtube.png b/src/bb-themes/admin_default/images/icons/dark/youtube.png new file mode 100644 index 000000000..0d7191af6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/youtube.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/zip.png b/src/bb-themes/admin_default/images/icons/dark/zip.png new file mode 100644 index 000000000..36922a6a0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/zip.png differ diff --git a/src/bb-themes/admin_default/images/icons/dark/zipFiles.png b/src/bb-themes/admin_default/images/icons/dark/zipFiles.png new file mode 100644 index 000000000..65d7ea977 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/dark/zipFiles.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrow2Blue.png b/src/bb-themes/admin_default/images/icons/lists/arrow2Blue.png new file mode 100644 index 000000000..e37bfa248 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrow2Blue.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrow2Green.png b/src/bb-themes/admin_default/images/icons/lists/arrow2Green.png new file mode 100644 index 000000000..71219baf2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrow2Green.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrow2Grey.png b/src/bb-themes/admin_default/images/icons/lists/arrow2Grey.png new file mode 100644 index 000000000..4b98c1fa8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrow2Grey.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrow2Red.png b/src/bb-themes/admin_default/images/icons/lists/arrow2Red.png new file mode 100644 index 000000000..1910e46f7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrow2Red.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrowBlue.png b/src/bb-themes/admin_default/images/icons/lists/arrowBlue.png new file mode 100644 index 000000000..62bdf5aba Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrowBlue.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrowGreen.png b/src/bb-themes/admin_default/images/icons/lists/arrowGreen.png new file mode 100644 index 000000000..bb1b91740 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrowGreen.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrowGrey.png b/src/bb-themes/admin_default/images/icons/lists/arrowGrey.png new file mode 100644 index 000000000..d303bd926 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrowGrey.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/arrowRed.png b/src/bb-themes/admin_default/images/icons/lists/arrowRed.png new file mode 100644 index 000000000..06112d9f9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/arrowRed.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/plusBlue.png b/src/bb-themes/admin_default/images/icons/lists/plusBlue.png new file mode 100644 index 000000000..35e0e016e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/plusBlue.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/plusGreen.png b/src/bb-themes/admin_default/images/icons/lists/plusGreen.png new file mode 100644 index 000000000..a7f7bb6bc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/plusGreen.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/plusGrey.png b/src/bb-themes/admin_default/images/icons/lists/plusGrey.png new file mode 100644 index 000000000..51ad9aa9c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/plusGrey.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/plusRed.png b/src/bb-themes/admin_default/images/icons/lists/plusRed.png new file mode 100644 index 000000000..1e6b0f9d1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/plusRed.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/tipBlue.png b/src/bb-themes/admin_default/images/icons/lists/tipBlue.png new file mode 100644 index 000000000..180ca6f46 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/tipBlue.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/tipGreen.png b/src/bb-themes/admin_default/images/icons/lists/tipGreen.png new file mode 100644 index 000000000..005b570a0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/tipGreen.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/tipGrey.png b/src/bb-themes/admin_default/images/icons/lists/tipGrey.png new file mode 100644 index 000000000..bcf307351 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/tipGrey.png differ diff --git a/src/bb-themes/admin_default/images/icons/lists/tipRed.png b/src/bb-themes/admin_default/images/icons/lists/tipRed.png new file mode 100644 index 000000000..0e1cdae43 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/lists/tipRed.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/abacus.png b/src/bb-themes/admin_default/images/icons/middlenav/abacus.png new file mode 100644 index 000000000..76824a389 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/abacus.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/add.png b/src/bb-themes/admin_default/images/icons/middlenav/add.png new file mode 100644 index 000000000..acd578db2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/add.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/addressBook.png b/src/bb-themes/admin_default/images/icons/middlenav/addressBook.png new file mode 100644 index 000000000..18db203f7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/addressBook.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/adminUser.png b/src/bb-themes/admin_default/images/icons/middlenav/adminUser.png new file mode 100644 index 000000000..c5497d534 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/adminUser.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/adminUser2.png b/src/bb-themes/admin_default/images/icons/middlenav/adminUser2.png new file mode 100644 index 000000000..9a2ac4af7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/adminUser2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/airplane.png b/src/bb-themes/admin_default/images/icons/middlenav/airplane.png new file mode 100644 index 000000000..6ba08776c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/airplane.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/alarm.png b/src/bb-themes/admin_default/images/icons/middlenav/alarm.png new file mode 100644 index 000000000..0f263fcb8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/alarm.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/alert.png b/src/bb-themes/admin_default/images/icons/middlenav/alert.png new file mode 100644 index 000000000..7c64f73b7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/alert.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/alert2.png b/src/bb-themes/admin_default/images/icons/middlenav/alert2.png new file mode 100644 index 000000000..fb9d0e237 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/alert2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/android.png b/src/bb-themes/admin_default/images/icons/middlenav/android.png new file mode 100644 index 000000000..afa4cd649 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/android.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/archive.png b/src/bb-themes/admin_default/images/icons/middlenav/archive.png new file mode 100644 index 000000000..1bca0554f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/archive.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/arrowDown.png b/src/bb-themes/admin_default/images/icons/middlenav/arrowDown.png new file mode 100644 index 000000000..488c87007 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/arrowDown.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/arrowLeft.png b/src/bb-themes/admin_default/images/icons/middlenav/arrowLeft.png new file mode 100644 index 000000000..496917138 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/arrowLeft.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/arrowRight.png b/src/bb-themes/admin_default/images/icons/middlenav/arrowRight.png new file mode 100644 index 000000000..d8f867a06 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/arrowRight.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/arrowUp.png b/src/bb-themes/admin_default/images/icons/middlenav/arrowUp.png new file mode 100644 index 000000000..dbeb1df2d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/arrowUp.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bag.png b/src/bb-themes/admin_default/images/icons/middlenav/bag.png new file mode 100644 index 000000000..a584c3e0e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/balloons.png b/src/bb-themes/admin_default/images/icons/middlenav/balloons.png new file mode 100644 index 000000000..460d07484 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/balloons.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/baloons.png b/src/bb-themes/admin_default/images/icons/middlenav/baloons.png new file mode 100644 index 000000000..aec6e777a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/baloons.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bandaid.png b/src/bb-themes/admin_default/images/icons/middlenav/bandaid.png new file mode 100644 index 000000000..adac65fab Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bandaid.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/basket.png b/src/bb-themes/admin_default/images/icons/middlenav/basket.png new file mode 100644 index 000000000..8e17b98b6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/basket.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/basket2.png b/src/bb-themes/admin_default/images/icons/middlenav/basket2.png new file mode 100644 index 000000000..320ae89a7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/basket2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/battery.png b/src/bb-themes/admin_default/images/icons/middlenav/battery.png new file mode 100644 index 000000000..ccc62cf4b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/battery.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/batteryFull.png b/src/bb-themes/admin_default/images/icons/middlenav/batteryFull.png new file mode 100644 index 000000000..f6ed2fad0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/batteryFull.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bell.png b/src/bb-themes/admin_default/images/icons/middlenav/bell.png new file mode 100644 index 000000000..b2abae3a6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bell.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bell2.png b/src/bb-themes/admin_default/images/icons/middlenav/bell2.png new file mode 100644 index 000000000..f1342ce19 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bell2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bigBrush.png b/src/bb-themes/admin_default/images/icons/middlenav/bigBrush.png new file mode 100644 index 000000000..bcb59f3ab Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bigBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/blackberry.png b/src/bb-themes/admin_default/images/icons/middlenav/blackberry.png new file mode 100644 index 000000000..eff830616 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/blackberry.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/block.png b/src/bb-themes/admin_default/images/icons/middlenav/block.png new file mode 100644 index 000000000..8cb2679a8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/block.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/blocks.png b/src/bb-themes/admin_default/images/icons/middlenav/blocks.png new file mode 100644 index 000000000..7e8f08841 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/blocks.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bluetooth.png b/src/bb-themes/admin_default/images/icons/middlenav/bluetooth.png new file mode 100644 index 000000000..661355cdc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bluetooth.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bluetooth2.png b/src/bb-themes/admin_default/images/icons/middlenav/bluetooth2.png new file mode 100644 index 000000000..4d3f02dfc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bluetooth2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bluray.png b/src/bb-themes/admin_default/images/icons/middlenav/bluray.png new file mode 100644 index 000000000..ee3561932 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bluray.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/book.png b/src/bb-themes/admin_default/images/icons/middlenav/book.png new file mode 100644 index 000000000..07d068376 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/book.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bookLarge.png b/src/bb-themes/admin_default/images/icons/middlenav/bookLarge.png new file mode 100644 index 000000000..0b3951821 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bookLarge.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/books.png b/src/bb-themes/admin_default/images/icons/middlenav/books.png new file mode 100644 index 000000000..b7a56b533 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/books.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bright.png b/src/bb-themes/admin_default/images/icons/middlenav/bright.png new file mode 100644 index 000000000..95cdff691 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bright.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bubbles.png b/src/bb-themes/admin_default/images/icons/middlenav/bubbles.png new file mode 100644 index 000000000..49f25a090 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bubbles.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bubbles2.png b/src/bb-themes/admin_default/images/icons/middlenav/bubbles2.png new file mode 100644 index 000000000..605a87030 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bubbles2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/building.png b/src/bb-themes/admin_default/images/icons/middlenav/building.png new file mode 100644 index 000000000..a496f3720 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/building.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/bullsEye.png b/src/bb-themes/admin_default/images/icons/middlenav/bullsEye.png new file mode 100644 index 000000000..0d59e1902 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/bullsEye.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/buzz.png b/src/bb-themes/admin_default/images/icons/middlenav/buzz.png new file mode 100644 index 000000000..0fdfc408b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/buzz.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/calc.png b/src/bb-themes/admin_default/images/icons/middlenav/calc.png new file mode 100644 index 000000000..ad12c14ba Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/calc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/camera.png b/src/bb-themes/admin_default/images/icons/middlenav/camera.png new file mode 100644 index 000000000..ce6f7c4f3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/camera.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/camera2.png b/src/bb-themes/admin_default/images/icons/middlenav/camera2.png new file mode 100644 index 000000000..8cd743022 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/camera2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/car.png b/src/bb-themes/admin_default/images/icons/middlenav/car.png new file mode 100644 index 000000000..0f96d3a59 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/car.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cart.png b/src/bb-themes/admin_default/images/icons/middlenav/cart.png new file mode 100644 index 000000000..8b4bf912f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cart.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cart2.png b/src/bb-themes/admin_default/images/icons/middlenav/cart2.png new file mode 100644 index 000000000..2bb4024e0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cart2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cart3.png b/src/bb-themes/admin_default/images/icons/middlenav/cart3.png new file mode 100644 index 000000000..e17b7fda8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cart3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cart4.png b/src/bb-themes/admin_default/images/icons/middlenav/cart4.png new file mode 100644 index 000000000..5f42401df Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cart4.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cashRegister.png b/src/bb-themes/admin_default/images/icons/middlenav/cashRegister.png new file mode 100644 index 000000000..8715138ef Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cashRegister.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cassette.png b/src/bb-themes/admin_default/images/icons/middlenav/cassette.png new file mode 100644 index 000000000..df0ec1d32 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cassette.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cat.png b/src/bb-themes/admin_default/images/icons/middlenav/cat.png new file mode 100644 index 000000000..cc640039e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cat.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cd.png b/src/bb-themes/admin_default/images/icons/middlenav/cd.png new file mode 100644 index 000000000..539d8d4a3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cd.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chair.png b/src/bb-themes/admin_default/images/icons/middlenav/chair.png new file mode 100644 index 000000000..ec45ad942 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chair.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart.png b/src/bb-themes/admin_default/images/icons/middlenav/chart.png new file mode 100644 index 000000000..99e7d9098 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart2.png b/src/bb-themes/admin_default/images/icons/middlenav/chart2.png new file mode 100644 index 000000000..4784b7ea5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart3.png b/src/bb-themes/admin_default/images/icons/middlenav/chart3.png new file mode 100644 index 000000000..19bf5bd5f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart4.png b/src/bb-themes/admin_default/images/icons/middlenav/chart4.png new file mode 100644 index 000000000..8f7d7e22a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart4.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart5.png b/src/bb-themes/admin_default/images/icons/middlenav/chart5.png new file mode 100644 index 000000000..96dc83c51 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart5.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart6.png b/src/bb-themes/admin_default/images/icons/middlenav/chart6.png new file mode 100644 index 000000000..bef76c6e6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart6.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart7.png b/src/bb-themes/admin_default/images/icons/middlenav/chart7.png new file mode 100644 index 000000000..06dfc8b3b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart7.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chart8.png b/src/bb-themes/admin_default/images/icons/middlenav/chart8.png new file mode 100644 index 000000000..94c329b18 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chart8.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/check.png b/src/bb-themes/admin_default/images/icons/middlenav/check.png new file mode 100644 index 000000000..6a7e15651 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/check.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chemical.png b/src/bb-themes/admin_default/images/icons/middlenav/chemical.png new file mode 100644 index 000000000..4bbcbaaf7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chemical.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/chrome.png b/src/bb-themes/admin_default/images/icons/middlenav/chrome.png new file mode 100644 index 000000000..a2ab886ec Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/chrome.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/clipboard.png b/src/bb-themes/admin_default/images/icons/middlenav/clipboard.png new file mode 100644 index 000000000..75a6e432b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/clipboard.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/clock.png b/src/bb-themes/admin_default/images/icons/middlenav/clock.png new file mode 100644 index 000000000..495a03308 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/clock.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/close.png b/src/bb-themes/admin_default/images/icons/middlenav/close.png new file mode 100644 index 000000000..1a990c74d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/close.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cloud.png b/src/bb-themes/admin_default/images/icons/middlenav/cloud.png new file mode 100644 index 000000000..ce6b325fe Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cloud.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cloudDownload.png b/src/bb-themes/admin_default/images/icons/middlenav/cloudDownload.png new file mode 100644 index 000000000..b4e399b39 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cloudDownload.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cloudUpload.png b/src/bb-themes/admin_default/images/icons/middlenav/cloudUpload.png new file mode 100644 index 000000000..59796e8d1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cloudUpload.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cog.png b/src/bb-themes/admin_default/images/icons/middlenav/cog.png new file mode 100644 index 000000000..d82b95089 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cog.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cog2.png b/src/bb-themes/admin_default/images/icons/middlenav/cog2.png new file mode 100644 index 000000000..871f10902 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cog2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cog3.png b/src/bb-themes/admin_default/images/icons/middlenav/cog3.png new file mode 100644 index 000000000..db5b48372 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cog3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cog4.png b/src/bb-themes/admin_default/images/icons/middlenav/cog4.png new file mode 100644 index 000000000..943d18c25 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cog4.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/companies.png b/src/bb-themes/admin_default/images/icons/middlenav/companies.png new file mode 100644 index 000000000..7cc523102 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/companies.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/computer.png b/src/bb-themes/admin_default/images/icons/middlenav/computer.png new file mode 100644 index 000000000..df5a83c43 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/computer.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/coverflow.png b/src/bb-themes/admin_default/images/icons/middlenav/coverflow.png new file mode 100644 index 000000000..c1021b9ea Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/coverflow.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/create.png b/src/bb-themes/admin_default/images/icons/middlenav/create.png new file mode 100644 index 000000000..a8d94e384 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/create.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cup.png b/src/bb-themes/admin_default/images/icons/middlenav/cup.png new file mode 100644 index 000000000..1897d8ca8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cup.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/cut.png b/src/bb-themes/admin_default/images/icons/middlenav/cut.png new file mode 100644 index 000000000..6587349bd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/cut.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dayCalendar.png b/src/bb-themes/admin_default/images/icons/middlenav/dayCalendar.png new file mode 100644 index 000000000..9c9c75f66 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dayCalendar.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/delicious.png b/src/bb-themes/admin_default/images/icons/middlenav/delicious.png new file mode 100644 index 000000000..53068fe54 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/delicious.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/denied.png b/src/bb-themes/admin_default/images/icons/middlenav/denied.png new file mode 100644 index 000000000..5f0d55f1b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/denied.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dialog.png b/src/bb-themes/admin_default/images/icons/middlenav/dialog.png new file mode 100644 index 000000000..7dfaba53f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dialog.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/digg.png b/src/bb-themes/admin_default/images/icons/middlenav/digg.png new file mode 100644 index 000000000..7f64c2db3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/digg.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/digg2.png b/src/bb-themes/admin_default/images/icons/middlenav/digg2.png new file mode 100644 index 000000000..94dcc70f1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/digg2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/doc.png b/src/bb-themes/admin_default/images/icons/middlenav/doc.png new file mode 100644 index 000000000..b3ad32e83 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/doc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/docs.png b/src/bb-themes/admin_default/images/icons/middlenav/docs.png new file mode 100644 index 000000000..ee3d10935 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/docs.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/download.png b/src/bb-themes/admin_default/images/icons/middlenav/download.png new file mode 100644 index 000000000..7714cef4a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/download.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/download2.png b/src/bb-themes/admin_default/images/icons/middlenav/download2.png new file mode 100644 index 000000000..484703829 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/download2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/download3.png b/src/bb-themes/admin_default/images/icons/middlenav/download3.png new file mode 100644 index 000000000..2a54b322d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/download3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dribbble.png b/src/bb-themes/admin_default/images/icons/middlenav/dribbble.png new file mode 100644 index 000000000..ac66b47ff Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dribbble.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dribbble2.png b/src/bb-themes/admin_default/images/icons/middlenav/dribbble2.png new file mode 100644 index 000000000..65d385c60 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dribbble2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/drive.png b/src/bb-themes/admin_default/images/icons/middlenav/drive.png new file mode 100644 index 000000000..f1fab418b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/drive.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dropbox.png b/src/bb-themes/admin_default/images/icons/middlenav/dropbox.png new file mode 100644 index 000000000..6671655b3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dropbox.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dropper.png b/src/bb-themes/admin_default/images/icons/middlenav/dropper.png new file mode 100644 index 000000000..71d3e35a9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dropper.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/drupal.png b/src/bb-themes/admin_default/images/icons/middlenav/drupal.png new file mode 100644 index 000000000..c85a23102 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/drupal.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/dvd.png b/src/bb-themes/admin_default/images/icons/middlenav/dvd.png new file mode 100644 index 000000000..9efe7bbb1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/dvd.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/electricity.png b/src/bb-themes/admin_default/images/icons/middlenav/electricity.png new file mode 100644 index 000000000..c017dac48 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/electricity.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/electroPlug.png b/src/bb-themes/admin_default/images/icons/middlenav/electroPlug.png new file mode 100644 index 000000000..80584bd0e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/electroPlug.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/excelDoc.png b/src/bb-themes/admin_default/images/icons/middlenav/excelDoc.png new file mode 100644 index 000000000..aa5755f8c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/excelDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/exit.png b/src/bb-themes/admin_default/images/icons/middlenav/exit.png new file mode 100644 index 000000000..d407068af Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/exit.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/expengine.png b/src/bb-themes/admin_default/images/icons/middlenav/expengine.png new file mode 100644 index 000000000..02f67011f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/expengine.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/expose.png b/src/bb-themes/admin_default/images/icons/middlenav/expose.png new file mode 100644 index 000000000..a7c7a1fc4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/expose.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/facebook.png b/src/bb-themes/admin_default/images/icons/middlenav/facebook.png new file mode 100644 index 000000000..c71264d7a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/facebook.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/fax.png b/src/bb-themes/admin_default/images/icons/middlenav/fax.png new file mode 100644 index 000000000..239672779 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/fax.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/femaleContour.png b/src/bb-themes/admin_default/images/icons/middlenav/femaleContour.png new file mode 100644 index 000000000..ae55f1151 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/femaleContour.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/femaleSymbol.png b/src/bb-themes/admin_default/images/icons/middlenav/femaleSymbol.png new file mode 100644 index 000000000..9ef6fadc7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/femaleSymbol.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/files.png b/src/bb-themes/admin_default/images/icons/middlenav/files.png new file mode 100644 index 000000000..f80125118 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/files.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/filmStrip.png b/src/bb-themes/admin_default/images/icons/middlenav/filmStrip.png new file mode 100644 index 000000000..04d0433f8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/filmStrip.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/filmStrip2.png b/src/bb-themes/admin_default/images/icons/middlenav/filmStrip2.png new file mode 100644 index 000000000..479648898 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/filmStrip2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/fimlCamera.png b/src/bb-themes/admin_default/images/icons/middlenav/fimlCamera.png new file mode 100644 index 000000000..c4a727a30 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/fimlCamera.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/finishFlag.png b/src/bb-themes/admin_default/images/icons/middlenav/finishFlag.png new file mode 100644 index 000000000..79ce3045f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/finishFlag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/firefox.png b/src/bb-themes/admin_default/images/icons/middlenav/firefox.png new file mode 100644 index 000000000..f34b4d654 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/firefox.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/flag.png b/src/bb-themes/admin_default/images/icons/middlenav/flag.png new file mode 100644 index 000000000..e4bb0322a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/flag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/flag2.png b/src/bb-themes/admin_default/images/icons/middlenav/flag2.png new file mode 100644 index 000000000..2c2e3c643 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/flag2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/folder.png b/src/bb-themes/admin_default/images/icons/middlenav/folder.png new file mode 100644 index 000000000..5c43722dc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/folder.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/footprints.png b/src/bb-themes/admin_default/images/icons/middlenav/footprints.png new file mode 100644 index 000000000..ea4ea790e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/footprints.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/fountainPen.png b/src/bb-themes/admin_default/images/icons/middlenav/fountainPen.png new file mode 100644 index 000000000..2e8ef5e2f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/fountainPen.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/frames.png b/src/bb-themes/admin_default/images/icons/middlenav/frames.png new file mode 100644 index 000000000..f8c4018e8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/frames.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/full.png b/src/bb-themes/admin_default/images/icons/middlenav/full.png new file mode 100644 index 000000000..b50f8c06d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/full.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/full2.png b/src/bb-themes/admin_default/images/icons/middlenav/full2.png new file mode 100644 index 000000000..881b9a3d6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/full2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/fullscreen.png b/src/bb-themes/admin_default/images/icons/middlenav/fullscreen.png new file mode 100644 index 000000000..a978ea313 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/fullscreen.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/globe.png b/src/bb-themes/admin_default/images/icons/middlenav/globe.png new file mode 100644 index 000000000..6cf2f9f9d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/globe.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/globe2.png b/src/bb-themes/admin_default/images/icons/middlenav/globe2.png new file mode 100644 index 000000000..e29ce3054 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/globe2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/gmaps.png b/src/bb-themes/admin_default/images/icons/middlenav/gmaps.png new file mode 100644 index 000000000..233fa5451 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/gmaps.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/goBack.png b/src/bb-themes/admin_default/images/icons/middlenav/goBack.png new file mode 100644 index 000000000..0f08ecfd6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/goBack.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/goFull.png b/src/bb-themes/admin_default/images/icons/middlenav/goFull.png new file mode 100644 index 000000000..8402e67cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/goFull.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/graph.png b/src/bb-themes/admin_default/images/icons/middlenav/graph.png new file mode 100644 index 000000000..870aac708 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/graph.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/hd.png b/src/bb-themes/admin_default/images/icons/middlenav/hd.png new file mode 100644 index 000000000..98c5e28d2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/hd.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/hd2.png b/src/bb-themes/admin_default/images/icons/middlenav/hd2.png new file mode 100644 index 000000000..03ef3b867 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/hd2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/hd3.png b/src/bb-themes/admin_default/images/icons/middlenav/hd3.png new file mode 100644 index 000000000..205b2d90e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/hd3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/headphones.png b/src/bb-themes/admin_default/images/icons/middlenav/headphones.png new file mode 100644 index 000000000..9782271f4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/headphones.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/heart.png b/src/bb-themes/admin_default/images/icons/middlenav/heart.png new file mode 100644 index 000000000..9b8b26b46 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/heart.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/help.png b/src/bb-themes/admin_default/images/icons/middlenav/help.png new file mode 100644 index 000000000..a4265a82c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/help.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/home.png b/src/bb-themes/admin_default/images/icons/middlenav/home.png new file mode 100644 index 000000000..1f494c781 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/home.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/home2.png b/src/bb-themes/admin_default/images/icons/middlenav/home2.png new file mode 100644 index 000000000..da576fa6a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/home2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/icecream.png b/src/bb-themes/admin_default/images/icons/middlenav/icecream.png new file mode 100644 index 000000000..b5e81d1cb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/icecream.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ichat.png b/src/bb-themes/admin_default/images/icons/middlenav/ichat.png new file mode 100644 index 000000000..5fddcc125 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ichat.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/image.png b/src/bb-themes/admin_default/images/icons/middlenav/image.png new file mode 100644 index 000000000..dde9c441f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/image.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/image2.png b/src/bb-themes/admin_default/images/icons/middlenav/image2.png new file mode 100644 index 000000000..0ac535bed Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/image2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/imageList.png b/src/bb-themes/admin_default/images/icons/middlenav/imageList.png new file mode 100644 index 000000000..a5c6ff28c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/imageList.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/images.png b/src/bb-themes/admin_default/images/icons/middlenav/images.png new file mode 100644 index 000000000..d2e670671 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/images.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/images2.png b/src/bb-themes/admin_default/images/icons/middlenav/images2.png new file mode 100644 index 000000000..9a2d4a064 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/images2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/imagesList.png b/src/bb-themes/admin_default/images/icons/middlenav/imagesList.png new file mode 100644 index 000000000..a1e465e88 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/imagesList.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/inbox.png b/src/bb-themes/admin_default/images/icons/middlenav/inbox.png new file mode 100644 index 000000000..1795c90c5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/inbox.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/inbox2.png b/src/bb-themes/admin_default/images/icons/middlenav/inbox2.png new file mode 100644 index 000000000..cf54f467e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/inbox2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/incoming.png b/src/bb-themes/admin_default/images/icons/middlenav/incoming.png new file mode 100644 index 000000000..f44b47351 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/incoming.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/info.png b/src/bb-themes/admin_default/images/icons/middlenav/info.png new file mode 100644 index 000000000..498bbe2ba Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/info.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ipad.png b/src/bb-themes/admin_default/images/icons/middlenav/ipad.png new file mode 100644 index 000000000..b83e8a49d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ipad.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/iphone.png b/src/bb-themes/admin_default/images/icons/middlenav/iphone.png new file mode 100644 index 000000000..40f0059a6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/iphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ipodClassic.png b/src/bb-themes/admin_default/images/icons/middlenav/ipodClassic.png new file mode 100644 index 000000000..113153cb3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ipodClassic.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ipodNano.png b/src/bb-themes/admin_default/images/icons/middlenav/ipodNano.png new file mode 100644 index 000000000..0be30a56e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ipodNano.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/joomla.png b/src/bb-themes/admin_default/images/icons/middlenav/joomla.png new file mode 100644 index 000000000..5bc75b31c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/joomla.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/key.png b/src/bb-themes/admin_default/images/icons/middlenav/key.png new file mode 100644 index 000000000..8c36d5542 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/key.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ladyPurse.png b/src/bb-themes/admin_default/images/icons/middlenav/ladyPurse.png new file mode 100644 index 000000000..b6fdecce8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ladyPurse.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/lamp.png b/src/bb-themes/admin_default/images/icons/middlenav/lamp.png new file mode 100644 index 000000000..3e2bce410 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/lamp.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/laptop.png b/src/bb-themes/admin_default/images/icons/middlenav/laptop.png new file mode 100644 index 000000000..ea2aed600 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/laptop.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/lastFM.png b/src/bb-themes/admin_default/images/icons/middlenav/lastFM.png new file mode 100644 index 000000000..d39291fb9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/lastFM.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/lemonadeStand.png b/src/bb-themes/admin_default/images/icons/middlenav/lemonadeStand.png new file mode 100644 index 000000000..0fe157326 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/lemonadeStand.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/lightBulb.png b/src/bb-themes/admin_default/images/icons/middlenav/lightBulb.png new file mode 100644 index 000000000..086c53e2b Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/lightBulb.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/like.png b/src/bb-themes/admin_default/images/icons/middlenav/like.png new file mode 100644 index 000000000..9f315e867 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/like.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/link.png b/src/bb-themes/admin_default/images/icons/middlenav/link.png new file mode 100644 index 000000000..28d7f0e0f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/link.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/link2.png b/src/bb-themes/admin_default/images/icons/middlenav/link2.png new file mode 100644 index 000000000..b18bcd40a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/link2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/linux.png b/src/bb-themes/admin_default/images/icons/middlenav/linux.png new file mode 100644 index 000000000..53a56f220 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/linux.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/list.png b/src/bb-themes/admin_default/images/icons/middlenav/list.png new file mode 100644 index 000000000..d5a1c7641 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/list.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/loading.png b/src/bb-themes/admin_default/images/icons/middlenav/loading.png new file mode 100644 index 000000000..6457818e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/loading.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/locked.png b/src/bb-themes/admin_default/images/icons/middlenav/locked.png new file mode 100644 index 000000000..06fc4fefc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/locked.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/locked2.png b/src/bb-themes/admin_default/images/icons/middlenav/locked2.png new file mode 100644 index 000000000..ff381d9ab Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/locked2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/logoff.png b/src/bb-themes/admin_default/images/icons/middlenav/logoff.png new file mode 100644 index 000000000..80cbfa53a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/logoff.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/macos.png b/src/bb-themes/admin_default/images/icons/middlenav/macos.png new file mode 100644 index 000000000..7cd781e8f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/macos.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/magicMouse.png b/src/bb-themes/admin_default/images/icons/middlenav/magicMouse.png new file mode 100644 index 000000000..99289190a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/magicMouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/magnify.png b/src/bb-themes/admin_default/images/icons/middlenav/magnify.png new file mode 100644 index 000000000..b0b937ba4 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/magnify.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/mail.png b/src/bb-themes/admin_default/images/icons/middlenav/mail.png new file mode 100644 index 000000000..adabc587f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/mail.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/maleContour.png b/src/bb-themes/admin_default/images/icons/middlenav/maleContour.png new file mode 100644 index 000000000..7e1b89d2d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/maleContour.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/maleSymbol.png b/src/bb-themes/admin_default/images/icons/middlenav/maleSymbol.png new file mode 100644 index 000000000..ed6080306 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/maleSymbol.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/map.png b/src/bb-themes/admin_default/images/icons/middlenav/map.png new file mode 100644 index 000000000..d3a3f0717 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/map.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/medicalCase.png b/src/bb-themes/admin_default/images/icons/middlenav/medicalCase.png new file mode 100644 index 000000000..68292943c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/medicalCase.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/megaphone.png b/src/bb-themes/admin_default/images/icons/middlenav/megaphone.png new file mode 100644 index 000000000..7071d2e64 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/megaphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/microphone.png b/src/bb-themes/admin_default/images/icons/middlenav/microphone.png new file mode 100644 index 000000000..4c93175dd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/microphone.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/mightyMouse.png b/src/bb-themes/admin_default/images/icons/middlenav/mightyMouse.png new file mode 100644 index 000000000..45de297f8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/mightyMouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/mobile.png b/src/bb-themes/admin_default/images/icons/middlenav/mobile.png new file mode 100644 index 000000000..e566dce13 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/mobile.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/mobyPicture.png b/src/bb-themes/admin_default/images/icons/middlenav/mobyPicture.png new file mode 100644 index 000000000..f799bb5c8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/mobyPicture.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/money.png b/src/bb-themes/admin_default/images/icons/middlenav/money.png new file mode 100644 index 000000000..5c0711723 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/money.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/money2.png b/src/bb-themes/admin_default/images/icons/middlenav/money2.png new file mode 100644 index 000000000..cb81f660a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/money2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/monitor.png b/src/bb-themes/admin_default/images/icons/middlenav/monitor.png new file mode 100644 index 000000000..7ed609ce1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/monitor.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/monthCalendar.png b/src/bb-themes/admin_default/images/icons/middlenav/monthCalendar.png new file mode 100644 index 000000000..dc56256f7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/monthCalendar.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/mouse.png b/src/bb-themes/admin_default/images/icons/middlenav/mouse.png new file mode 100644 index 000000000..3c271a067 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/mouse.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/music.png b/src/bb-themes/admin_default/images/icons/middlenav/music.png new file mode 100644 index 000000000..e9a485c25 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/music.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/myspace.png b/src/bb-themes/admin_default/images/icons/middlenav/myspace.png new file mode 100644 index 000000000..e2d9ca991 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/myspace.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/notebook.png b/src/bb-themes/admin_default/images/icons/middlenav/notebook.png new file mode 100644 index 000000000..da5e190f0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/notebook.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/outgoing.png b/src/bb-themes/admin_default/images/icons/middlenav/outgoing.png new file mode 100644 index 000000000..145e786f6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/outgoing.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/pacman.png b/src/bb-themes/admin_default/images/icons/middlenav/pacman.png new file mode 100644 index 000000000..1af66c884 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/pacman.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/paintBrush.png b/src/bb-themes/admin_default/images/icons/middlenav/paintBrush.png new file mode 100644 index 000000000..db3b11351 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/paintBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/pants.png b/src/bb-themes/admin_default/images/icons/middlenav/pants.png new file mode 100644 index 000000000..e3a4a11bd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/pants.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/paperclip.png b/src/bb-themes/admin_default/images/icons/middlenav/paperclip.png new file mode 100644 index 000000000..03c8bad19 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/paperclip.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/paypal.png b/src/bb-themes/admin_default/images/icons/middlenav/paypal.png new file mode 100644 index 000000000..359a2a504 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/paypal.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/paypal2.png b/src/bb-themes/admin_default/images/icons/middlenav/paypal2.png new file mode 100644 index 000000000..478ffd5e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/paypal2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/paypal3.png b/src/bb-themes/admin_default/images/icons/middlenav/paypal3.png new file mode 100644 index 000000000..be341c04c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/paypal3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/pdfDoc.png b/src/bb-themes/admin_default/images/icons/middlenav/pdfDoc.png new file mode 100644 index 000000000..0fa091407 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/pdfDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/pencil.png b/src/bb-themes/admin_default/images/icons/middlenav/pencil.png new file mode 100644 index 000000000..b0f8745b8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/pencil.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/phone.png b/src/bb-themes/admin_default/images/icons/middlenav/phone.png new file mode 100644 index 000000000..e0dad464e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/phone.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/phone2.png b/src/bb-themes/admin_default/images/icons/middlenav/phone2.png new file mode 100644 index 000000000..8c4a8917c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/phone2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/phone3.png b/src/bb-themes/admin_default/images/icons/middlenav/phone3.png new file mode 100644 index 000000000..f1a2cc051 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/phone3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/photos.png b/src/bb-themes/admin_default/images/icons/middlenav/photos.png new file mode 100644 index 000000000..7c0172fc7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/photos.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/piggyBank.png b/src/bb-themes/admin_default/images/icons/middlenav/piggyBank.png new file mode 100644 index 000000000..9a7b13cb7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/piggyBank.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/pin.png b/src/bb-themes/admin_default/images/icons/middlenav/pin.png new file mode 100644 index 000000000..1ed871e36 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/pin.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/planeSuitcase.png b/src/bb-themes/admin_default/images/icons/middlenav/planeSuitcase.png new file mode 100644 index 000000000..e84f11bfd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/planeSuitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/play.png b/src/bb-themes/admin_default/images/icons/middlenav/play.png new file mode 100644 index 000000000..f2eda9ce2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/play.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/play2.png b/src/bb-themes/admin_default/images/icons/middlenav/play2.png new file mode 100644 index 000000000..c7107dee7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/play2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/plixi.png b/src/bb-themes/admin_default/images/icons/middlenav/plixi.png new file mode 100644 index 000000000..7a7123c39 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/plixi.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/podium.png b/src/bb-themes/admin_default/images/icons/middlenav/podium.png new file mode 100644 index 000000000..f98b3dbc2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/podium.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/postcard.png b/src/bb-themes/admin_default/images/icons/middlenav/postcard.png new file mode 100644 index 000000000..9628dabb2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/postcard.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/power.png b/src/bb-themes/admin_default/images/icons/middlenav/power.png new file mode 100644 index 000000000..e8d9d3bd8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/power.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ppDoc.png b/src/bb-themes/admin_default/images/icons/middlenav/ppDoc.png new file mode 100644 index 000000000..d7c90cf94 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ppDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/presentation.png b/src/bb-themes/admin_default/images/icons/middlenav/presentation.png new file mode 100644 index 000000000..385f4e234 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/presentation.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/preview.png b/src/bb-themes/admin_default/images/icons/middlenav/preview.png new file mode 100644 index 000000000..715b97b86 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/preview.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/priceTag.png b/src/bb-themes/admin_default/images/icons/middlenav/priceTag.png new file mode 100644 index 000000000..32cc77f59 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/priceTag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/priceTags.png b/src/bb-themes/admin_default/images/icons/middlenav/priceTags.png new file mode 100644 index 000000000..f90907e07 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/priceTags.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/printer.png b/src/bb-themes/admin_default/images/icons/middlenav/printer.png new file mode 100644 index 000000000..964a1b471 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/printer.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/radio.png b/src/bb-themes/admin_default/images/icons/middlenav/radio.png new file mode 100644 index 000000000..12380e9e3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/radio.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/record.png b/src/bb-themes/admin_default/images/icons/middlenav/record.png new file mode 100644 index 000000000..541ac4c79 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/record.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/recycle.png b/src/bb-themes/admin_default/images/icons/middlenav/recycle.png new file mode 100644 index 000000000..51325866c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/recycle.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/refresh.png b/src/bb-themes/admin_default/images/icons/middlenav/refresh.png new file mode 100644 index 000000000..7a8149463 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/refresh.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/refresh2.png b/src/bb-themes/admin_default/images/icons/middlenav/refresh2.png new file mode 100644 index 000000000..b62fbd967 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/refresh2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/refresh3.png b/src/bb-themes/admin_default/images/icons/middlenav/refresh3.png new file mode 100644 index 000000000..c90bcd86e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/refresh3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/refresh4.png b/src/bb-themes/admin_default/images/icons/middlenav/refresh4.png new file mode 100644 index 000000000..15500e264 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/refresh4.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/repeat.png b/src/bb-themes/admin_default/images/icons/middlenav/repeat.png new file mode 100644 index 000000000..5b8656870 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/repeat.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/robot.png b/src/bb-themes/admin_default/images/icons/middlenav/robot.png new file mode 100644 index 000000000..932c1903f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/robot.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/rss.png b/src/bb-themes/admin_default/images/icons/middlenav/rss.png new file mode 100644 index 000000000..9e0773081 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/rss.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ruler.png b/src/bb-themes/admin_default/images/icons/middlenav/ruler.png new file mode 100644 index 000000000..25a632e8f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ruler.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/ruler2.png b/src/bb-themes/admin_default/images/icons/middlenav/ruler2.png new file mode 100644 index 000000000..97e3ea9eb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/ruler2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/runningMan.png b/src/bb-themes/admin_default/images/icons/middlenav/runningMan.png new file mode 100644 index 000000000..1bf8da6bb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/runningMan.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/safari.png b/src/bb-themes/admin_default/images/icons/middlenav/safari.png new file mode 100644 index 000000000..b23e1c3d2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/safari.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/scanLabel.png b/src/bb-themes/admin_default/images/icons/middlenav/scanLabel.png new file mode 100644 index 000000000..12328c2a5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/scanLabel.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/sd.png b/src/bb-themes/admin_default/images/icons/middlenav/sd.png new file mode 100644 index 000000000..417d7b68d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/sd.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/sd2.png b/src/bb-themes/admin_default/images/icons/middlenav/sd2.png new file mode 100644 index 000000000..c69e4ce80 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/sd2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/sd3.png b/src/bb-themes/admin_default/images/icons/middlenav/sd3.png new file mode 100644 index 000000000..3a6c37024 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/sd3.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/settings.png b/src/bb-themes/admin_default/images/icons/middlenav/settings.png new file mode 100644 index 000000000..8ed57c1c1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/settings.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/settings2.png b/src/bb-themes/admin_default/images/icons/middlenav/settings2.png new file mode 100644 index 000000000..4578ea4b9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/settings2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/shirt.png b/src/bb-themes/admin_default/images/icons/middlenav/shirt.png new file mode 100644 index 000000000..9841e7cd5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/shirt.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/shoppingBag.png b/src/bb-themes/admin_default/images/icons/middlenav/shoppingBag.png new file mode 100644 index 000000000..2623331bc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/shoppingBag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/shuffle.png b/src/bb-themes/admin_default/images/icons/middlenav/shuffle.png new file mode 100644 index 000000000..3c56758ff Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/shuffle.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/signPost.png b/src/bb-themes/admin_default/images/icons/middlenav/signPost.png new file mode 100644 index 000000000..6515b069a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/signPost.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/signal.png b/src/bb-themes/admin_default/images/icons/middlenav/signal.png new file mode 100644 index 000000000..5b639fe49 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/signal.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/skype.png b/src/bb-themes/admin_default/images/icons/middlenav/skype.png new file mode 100644 index 000000000..3ad8b7558 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/skype.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/smallBrush.png b/src/bb-themes/admin_default/images/icons/middlenav/smallBrush.png new file mode 100644 index 000000000..c1679e667 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/smallBrush.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/socks.png b/src/bb-themes/admin_default/images/icons/middlenav/socks.png new file mode 100644 index 000000000..622526dc0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/socks.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/sound.png b/src/bb-themes/admin_default/images/icons/middlenav/sound.png new file mode 100644 index 000000000..150ad7c7d Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/sound.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/speech.png b/src/bb-themes/admin_default/images/icons/middlenav/speech.png new file mode 100644 index 000000000..e0d4f0fcd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/speech.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/speech2.png b/src/bb-themes/admin_default/images/icons/middlenav/speech2.png new file mode 100644 index 000000000..8ac5bc1d7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/speech2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/star.png b/src/bb-themes/admin_default/images/icons/middlenav/star.png new file mode 100644 index 000000000..fa7814ab2 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/star.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/stats.png b/src/bb-themes/admin_default/images/icons/middlenav/stats.png new file mode 100644 index 000000000..f9c0cdc67 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/stats.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/stop.png b/src/bb-themes/admin_default/images/icons/middlenav/stop.png new file mode 100644 index 000000000..47e159ccf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/stop.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/stopWatch.png b/src/bb-themes/admin_default/images/icons/middlenav/stopWatch.png new file mode 100644 index 000000000..0e119abd0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/stopWatch.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/strategy.png b/src/bb-themes/admin_default/images/icons/middlenav/strategy.png new file mode 100644 index 000000000..34dc767a3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/strategy.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/strategy2.png b/src/bb-themes/admin_default/images/icons/middlenav/strategy2.png new file mode 100644 index 000000000..0d47ac1a5 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/strategy2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/stumble.png b/src/bb-themes/admin_default/images/icons/middlenav/stumble.png new file mode 100644 index 000000000..d4de04f3f Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/stumble.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/suitcase.png b/src/bb-themes/admin_default/images/icons/middlenav/suitcase.png new file mode 100644 index 000000000..109ba05bf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/suitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/switcher.png b/src/bb-themes/admin_default/images/icons/middlenav/switcher.png new file mode 100644 index 000000000..a9f0e8aa8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/switcher.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tag.png b/src/bb-themes/admin_default/images/icons/middlenav/tag.png new file mode 100644 index 000000000..eff889be9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tag.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tags.png b/src/bb-themes/admin_default/images/icons/middlenav/tags.png new file mode 100644 index 000000000..92765a7b6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tags.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tanle.png b/src/bb-themes/admin_default/images/icons/middlenav/tanle.png new file mode 100644 index 000000000..3d43dcf53 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tanle.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/timer.png b/src/bb-themes/admin_default/images/icons/middlenav/timer.png new file mode 100644 index 000000000..6d308964c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/timer.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/transfer.png b/src/bb-themes/admin_default/images/icons/middlenav/transfer.png new file mode 100644 index 000000000..748a4d672 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/transfer.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/trash.png b/src/bb-themes/admin_default/images/icons/middlenav/trash.png new file mode 100644 index 000000000..25aac525c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/trash.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/travelSuitcase.png b/src/bb-themes/admin_default/images/icons/middlenav/travelSuitcase.png new file mode 100644 index 000000000..93f914cf6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/travelSuitcase.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tree.png b/src/bb-themes/admin_default/images/icons/middlenav/tree.png new file mode 100644 index 000000000..6d1d68770 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tree.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/trolly.png b/src/bb-themes/admin_default/images/icons/middlenav/trolly.png new file mode 100644 index 000000000..db0dac710 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/trolly.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/truck.png b/src/bb-themes/admin_default/images/icons/middlenav/truck.png new file mode 100644 index 000000000..bac4e1f91 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/truck.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tumbler.png b/src/bb-themes/admin_default/images/icons/middlenav/tumbler.png new file mode 100644 index 000000000..2f31de078 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tumbler.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/tv.png b/src/bb-themes/admin_default/images/icons/middlenav/tv.png new file mode 100644 index 000000000..b50c51922 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/tv.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/twitter.png b/src/bb-themes/admin_default/images/icons/middlenav/twitter.png new file mode 100644 index 000000000..2bed62ae8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/twitter.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/twitter2.png b/src/bb-themes/admin_default/images/icons/middlenav/twitter2.png new file mode 100644 index 000000000..f3024b405 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/twitter2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/umbrella.png b/src/bb-themes/admin_default/images/icons/middlenav/umbrella.png new file mode 100644 index 000000000..2b5efc287 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/umbrella.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/underConstruction.png b/src/bb-themes/admin_default/images/icons/middlenav/underConstruction.png new file mode 100644 index 000000000..30b1963da Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/underConstruction.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/unlocked.png b/src/bb-themes/admin_default/images/icons/middlenav/unlocked.png new file mode 100644 index 000000000..8f883950a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/unlocked.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/upload.png b/src/bb-themes/admin_default/images/icons/middlenav/upload.png new file mode 100644 index 000000000..300f75d5a Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/upload.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/user.png b/src/bb-themes/admin_default/images/icons/middlenav/user.png new file mode 100644 index 000000000..255c87420 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/user.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/user2.png b/src/bb-themes/admin_default/images/icons/middlenav/user2.png new file mode 100644 index 000000000..971402d49 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/user2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/userComment.png b/src/bb-themes/admin_default/images/icons/middlenav/userComment.png new file mode 100644 index 000000000..866e8af20 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/userComment.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/users.png b/src/bb-themes/admin_default/images/icons/middlenav/users.png new file mode 100644 index 000000000..85db57870 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/users.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/users2.png b/src/bb-themes/admin_default/images/icons/middlenav/users2.png new file mode 100644 index 000000000..d18425ba0 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/users2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/vault.png b/src/bb-themes/admin_default/images/icons/middlenav/vault.png new file mode 100644 index 000000000..e2695cdae Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/vault.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/vcard.png b/src/bb-themes/admin_default/images/icons/middlenav/vcard.png new file mode 100644 index 000000000..aea9c4462 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/vcard.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/view.png b/src/bb-themes/admin_default/images/icons/middlenav/view.png new file mode 100644 index 000000000..4fbbd0b16 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/view.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/vimeo.png b/src/bb-themes/admin_default/images/icons/middlenav/vimeo.png new file mode 100644 index 000000000..2228dea7e Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/vimeo.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/vimeo2.png b/src/bb-themes/admin_default/images/icons/middlenav/vimeo2.png new file mode 100644 index 000000000..2b6548bd8 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/vimeo2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/walkingMan.png b/src/bb-themes/admin_default/images/icons/middlenav/walkingMan.png new file mode 100644 index 000000000..c70f38026 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/walkingMan.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/wifi.png b/src/bb-themes/admin_default/images/icons/middlenav/wifi.png new file mode 100644 index 000000000..1484933dd Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/wifi.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/wifi2.png b/src/bb-themes/admin_default/images/icons/middlenav/wifi2.png new file mode 100644 index 000000000..da74fa9f1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/wifi2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/windows.png b/src/bb-themes/admin_default/images/icons/middlenav/windows.png new file mode 100644 index 000000000..a203e5b10 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/windows.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/wordDoc.png b/src/bb-themes/admin_default/images/icons/middlenav/wordDoc.png new file mode 100644 index 000000000..414732edf Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/wordDoc.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/wordpress.png b/src/bb-themes/admin_default/images/icons/middlenav/wordpress.png new file mode 100644 index 000000000..3829545eb Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/wordpress.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/wordpress2.png b/src/bb-themes/admin_default/images/icons/middlenav/wordpress2.png new file mode 100644 index 000000000..c7437b754 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/wordpress2.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/youtube.png b/src/bb-themes/admin_default/images/icons/middlenav/youtube.png new file mode 100644 index 000000000..77280a3d7 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/youtube.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/zip.png b/src/bb-themes/admin_default/images/icons/middlenav/zip.png new file mode 100644 index 000000000..ff5370b81 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/zip.png differ diff --git a/src/bb-themes/admin_default/images/icons/middlenav/zipFiles.png b/src/bb-themes/admin_default/images/icons/middlenav/zipFiles.png new file mode 100644 index 000000000..7270148ac Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/middlenav/zipFiles.png differ diff --git a/src/bb-themes/admin_default/images/icons/notifications/accept.png b/src/bb-themes/admin_default/images/icons/notifications/accept.png new file mode 100644 index 000000000..388b1d2d1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/notifications/accept.png differ diff --git a/src/bb-themes/admin_default/images/icons/notifications/error.png b/src/bb-themes/admin_default/images/icons/notifications/error.png new file mode 100644 index 000000000..1b68d5496 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/notifications/error.png differ diff --git a/src/bb-themes/admin_default/images/icons/notifications/exclamation.png b/src/bb-themes/admin_default/images/icons/notifications/exclamation.png new file mode 100644 index 000000000..001738cad Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/notifications/exclamation.png differ diff --git a/src/bb-themes/admin_default/images/icons/notifications/information.png b/src/bb-themes/admin_default/images/icons/notifications/information.png new file mode 100644 index 000000000..534845ca6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/notifications/information.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/contactAdmin.png b/src/bb-themes/admin_default/images/icons/topnav/contactAdmin.png new file mode 100644 index 000000000..f1cc728dc Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/contactAdmin.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/help.png b/src/bb-themes/admin_default/images/icons/topnav/help.png new file mode 100644 index 000000000..80e5bd1af Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/help.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/logout.png b/src/bb-themes/admin_default/images/icons/topnav/logout.png new file mode 100644 index 000000000..f9664d630 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/logout.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/mainWebsite.png b/src/bb-themes/admin_default/images/icons/topnav/mainWebsite.png new file mode 100644 index 000000000..387efd980 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/mainWebsite.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/messages.png b/src/bb-themes/admin_default/images/icons/topnav/messages.png new file mode 100644 index 000000000..0687de6e1 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/messages.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/profile.png b/src/bb-themes/admin_default/images/icons/topnav/profile.png new file mode 100644 index 000000000..944f911d6 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/profile.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/register.png b/src/bb-themes/admin_default/images/icons/topnav/register.png new file mode 100644 index 000000000..18a7720c3 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/register.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/settings.png b/src/bb-themes/admin_default/images/icons/topnav/settings.png new file mode 100644 index 000000000..e955a578c Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/settings.png differ diff --git a/src/bb-themes/admin_default/images/icons/topnav/tasks.png b/src/bb-themes/admin_default/images/icons/topnav/tasks.png new file mode 100644 index 000000000..38dc3aad9 Binary files /dev/null and b/src/bb-themes/admin_default/images/icons/topnav/tasks.png differ diff --git a/src/bb-themes/admin_default/images/img.png b/src/bb-themes/admin_default/images/img.png new file mode 100644 index 000000000..f4211009d Binary files /dev/null and b/src/bb-themes/admin_default/images/img.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png new file mode 100644 index 000000000..5b5dab2ab Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_0_aaaaaa_40x100.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_75_ffffff_40x100.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_75_ffffff_40x100.png new file mode 100644 index 000000000..ac8b229af Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_flat_75_ffffff_40x100.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_55_fbf9ee_1x400.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_55_fbf9ee_1x400.png new file mode 100644 index 000000000..ad3d6346e Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_55_fbf9ee_1x400.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_65_ffffff_1x400.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_65_ffffff_1x400.png new file mode 100644 index 000000000..42ccba269 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_65_ffffff_1x400.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_dadada_1x400.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_dadada_1x400.png new file mode 100644 index 000000000..5a46b47cb Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_dadada_1x400.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_e6e6e6_1x400.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_e6e6e6_1x400.png new file mode 100644 index 000000000..86c2baa65 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_75_e6e6e6_1x400.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_95_fef1ec_1x400.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_95_fef1ec_1x400.png new file mode 100644 index 000000000..4443fdc1a Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_glass_95_fef1ec_1x400.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-bg_highlight-soft_75_cccccc_1x100.png b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_highlight-soft_75_cccccc_1x100.png new file mode 100644 index 000000000..7c9fa6c6e Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-bg_highlight-soft_75_cccccc_1x100.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-icons_222222_256x240.png b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_222222_256x240.png new file mode 100644 index 000000000..ee039dc09 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_222222_256x240.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-icons_2e83ff_256x240.png b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_2e83ff_256x240.png new file mode 100644 index 000000000..45e8928e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_2e83ff_256x240.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-icons_454545_256x240.png b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_454545_256x240.png new file mode 100644 index 000000000..7ec70d11b Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_454545_256x240.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-icons_888888_256x240.png b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_888888_256x240.png new file mode 100644 index 000000000..5ba708c39 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_888888_256x240.png differ diff --git a/src/bb-themes/admin_default/images/jquery_ui/ui-icons_cd0a0a_256x240.png b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_cd0a0a_256x240.png new file mode 100644 index 000000000..7930a5580 Binary files /dev/null and b/src/bb-themes/admin_default/images/jquery_ui/ui-icons_cd0a0a_256x240.png differ diff --git a/src/bb-themes/admin_default/images/leftArrow.png b/src/bb-themes/admin_default/images/leftArrow.png new file mode 100644 index 000000000..3cebce2ca Binary files /dev/null and b/src/bb-themes/admin_default/images/leftArrow.png differ diff --git a/src/bb-themes/admin_default/images/leftNavBg.png b/src/bb-themes/admin_default/images/leftNavBg.png new file mode 100644 index 000000000..8edaedf71 Binary files /dev/null and b/src/bb-themes/admin_default/images/leftNavBg.png differ diff --git a/src/bb-themes/admin_default/images/leftNavSub.png b/src/bb-themes/admin_default/images/leftNavSub.png new file mode 100644 index 000000000..74f70b738 Binary files /dev/null and b/src/bb-themes/admin_default/images/leftNavSub.png differ diff --git a/src/bb-themes/admin_default/images/linesSep.png b/src/bb-themes/admin_default/images/linesSep.png new file mode 100644 index 000000000..59f81434e Binary files /dev/null and b/src/bb-themes/admin_default/images/linesSep.png differ diff --git a/src/bb-themes/admin_default/images/loader.gif b/src/bb-themes/admin_default/images/loader.gif new file mode 100644 index 000000000..044d8df6e Binary files /dev/null and b/src/bb-themes/admin_default/images/loader.gif differ diff --git a/src/bb-themes/admin_default/images/loaders/loader7.gif b/src/bb-themes/admin_default/images/loaders/loader7.gif new file mode 100644 index 000000000..d84f65378 Binary files /dev/null and b/src/bb-themes/admin_default/images/loaders/loader7.gif differ diff --git a/src/bb-themes/admin_default/images/loginLogo.png b/src/bb-themes/admin_default/images/loginLogo.png new file mode 100644 index 000000000..1fe6ead61 Binary files /dev/null and b/src/bb-themes/admin_default/images/loginLogo.png differ diff --git a/src/bb-themes/admin_default/images/middlebg.png b/src/bb-themes/admin_default/images/middlebg.png new file mode 100644 index 000000000..8647c6f85 Binary files /dev/null and b/src/bb-themes/admin_default/images/middlebg.png differ diff --git a/src/bb-themes/admin_default/images/navSep.png b/src/bb-themes/admin_default/images/navSep.png new file mode 100644 index 000000000..4d34de2cd Binary files /dev/null and b/src/bb-themes/admin_default/images/navSep.png differ diff --git a/src/bb-themes/admin_default/images/navSepHover.png b/src/bb-themes/admin_default/images/navSepHover.png new file mode 100644 index 000000000..ee31772a4 Binary files /dev/null and b/src/bb-themes/admin_default/images/navSepHover.png differ diff --git a/src/bb-themes/admin_default/images/number.png b/src/bb-themes/admin_default/images/number.png new file mode 100644 index 000000000..e04bfa721 Binary files /dev/null and b/src/bb-themes/admin_default/images/number.png differ diff --git a/src/bb-themes/admin_default/images/patbg1.png b/src/bb-themes/admin_default/images/patbg1.png new file mode 100644 index 000000000..9ed6d85c6 Binary files /dev/null and b/src/bb-themes/admin_default/images/patbg1.png differ diff --git a/src/bb-themes/admin_default/images/patbg2.png b/src/bb-themes/admin_default/images/patbg2.png new file mode 100644 index 000000000..831904688 Binary files /dev/null and b/src/bb-themes/admin_default/images/patbg2.png differ diff --git a/src/bb-themes/admin_default/images/patbg3.png b/src/bb-themes/admin_default/images/patbg3.png new file mode 100644 index 000000000..3bb33c3da Binary files /dev/null and b/src/bb-themes/admin_default/images/patbg3.png differ diff --git a/src/bb-themes/admin_default/images/patbg4.png b/src/bb-themes/admin_default/images/patbg4.png new file mode 100644 index 000000000..e926f99aa Binary files /dev/null and b/src/bb-themes/admin_default/images/patbg4.png differ diff --git a/src/bb-themes/admin_default/images/patbg5.png b/src/bb-themes/admin_default/images/patbg5.png new file mode 100644 index 000000000..07cd5f5c4 Binary files /dev/null and b/src/bb-themes/admin_default/images/patbg5.png differ diff --git a/src/bb-themes/admin_default/images/rightArrow.png b/src/bb-themes/admin_default/images/rightArrow.png new file mode 100644 index 000000000..66a260340 Binary files /dev/null and b/src/bb-themes/admin_default/images/rightArrow.png differ diff --git a/src/bb-themes/admin_default/images/sadEmo.png b/src/bb-themes/admin_default/images/sadEmo.png new file mode 100644 index 000000000..9eee81d7f Binary files /dev/null and b/src/bb-themes/admin_default/images/sadEmo.png differ diff --git a/src/bb-themes/admin_default/images/searchBtn.png b/src/bb-themes/admin_default/images/searchBtn.png new file mode 100644 index 000000000..51a6da32e Binary files /dev/null and b/src/bb-themes/admin_default/images/searchBtn.png differ diff --git a/src/bb-themes/admin_default/images/searchSmall.png b/src/bb-themes/admin_default/images/searchSmall.png new file mode 100644 index 000000000..5182c3044 Binary files /dev/null and b/src/bb-themes/admin_default/images/searchSmall.png differ diff --git a/src/bb-themes/admin_default/images/spinner-bg.gif b/src/bb-themes/admin_default/images/spinner-bg.gif new file mode 100644 index 000000000..914b6d1ba Binary files /dev/null and b/src/bb-themes/admin_default/images/spinner-bg.gif differ diff --git a/src/bb-themes/admin_default/images/tabsSep.png b/src/bb-themes/admin_default/images/tabsSep.png new file mode 100644 index 000000000..82b93e17f Binary files /dev/null and b/src/bb-themes/admin_default/images/tabsSep.png differ diff --git a/src/bb-themes/admin_default/images/tabsSepR.png b/src/bb-themes/admin_default/images/tabsSepR.png new file mode 100644 index 000000000..003a14e5e Binary files /dev/null and b/src/bb-themes/admin_default/images/tabsSepR.png differ diff --git a/src/bb-themes/admin_default/images/tipsy.gif b/src/bb-themes/admin_default/images/tipsy.gif new file mode 100644 index 000000000..eb7718dfc Binary files /dev/null and b/src/bb-themes/admin_default/images/tipsy.gif differ diff --git a/src/bb-themes/admin_default/images/topArrow.png b/src/bb-themes/admin_default/images/topArrow.png new file mode 100644 index 000000000..227ed5156 Binary files /dev/null and b/src/bb-themes/admin_default/images/topArrow.png differ diff --git a/src/bb-themes/admin_default/images/topNav.jpg b/src/bb-themes/admin_default/images/topNav.jpg new file mode 100644 index 000000000..b1aa19880 Binary files /dev/null and b/src/bb-themes/admin_default/images/topNav.jpg differ diff --git a/src/bb-themes/admin_default/images/ui.totop.png b/src/bb-themes/admin_default/images/ui.totop.png new file mode 100644 index 000000000..130cab44f Binary files /dev/null and b/src/bb-themes/admin_default/images/ui.totop.png differ diff --git a/src/bb-themes/admin_default/images/ui/basicBtn.png b/src/bb-themes/admin_default/images/ui/basicBtn.png new file mode 100644 index 000000000..4da5a87a7 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/basicBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/blackBtn.png b/src/bb-themes/admin_default/images/ui/blackBtn.png new file mode 100644 index 000000000..0f48ad6ee Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/blackBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/blueBtn.png b/src/bb-themes/admin_default/images/ui/blueBtn.png new file mode 100644 index 000000000..bcba4db3f Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/blueBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/greenBtn.png b/src/bb-themes/admin_default/images/ui/greenBtn.png new file mode 100644 index 000000000..5f2e2d2e7 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/greenBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/greyishBtn.png b/src/bb-themes/admin_default/images/ui/greyishBtn.png new file mode 100644 index 000000000..6e0d908bd Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/greyishBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/handle.png b/src/bb-themes/admin_default/images/ui/handle.png new file mode 100644 index 000000000..91b926655 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/handle.png differ diff --git a/src/bb-themes/admin_default/images/ui/numDataBg.png b/src/bb-themes/admin_default/images/ui/numDataBg.png new file mode 100644 index 000000000..f4f75f504 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/numDataBg.png differ diff --git a/src/bb-themes/admin_default/images/ui/pagination.png b/src/bb-themes/admin_default/images/ui/pagination.png new file mode 100644 index 000000000..d11e3d48f Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/pagination.png differ diff --git a/src/bb-themes/admin_default/images/ui/progress.png b/src/bb-themes/admin_default/images/ui/progress.png new file mode 100644 index 000000000..fa3580aef Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/progress.png differ diff --git a/src/bb-themes/admin_default/images/ui/progressOverlay.png b/src/bb-themes/admin_default/images/ui/progressOverlay.png new file mode 100644 index 000000000..2eed7a2e5 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/progressOverlay.png differ diff --git a/src/bb-themes/admin_default/images/ui/redBtn.png b/src/bb-themes/admin_default/images/ui/redBtn.png new file mode 100644 index 000000000..7f62bb71c Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/redBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/seaBtn.png b/src/bb-themes/admin_default/images/ui/seaBtn.png new file mode 100644 index 000000000..e1b5d6b91 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/seaBtn.png differ diff --git a/src/bb-themes/admin_default/images/ui/sliderBg.png b/src/bb-themes/admin_default/images/ui/sliderBg.png new file mode 100644 index 000000000..b0be889e3 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/sliderBg.png differ diff --git a/src/bb-themes/admin_default/images/ui/sliderBgVert.png b/src/bb-themes/admin_default/images/ui/sliderBgVert.png new file mode 100644 index 000000000..fa93dbb61 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/sliderBgVert.png differ diff --git a/src/bb-themes/admin_default/images/ui/sliderOverlay.png b/src/bb-themes/admin_default/images/ui/sliderOverlay.png new file mode 100644 index 000000000..caa782042 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/sliderOverlay.png differ diff --git a/src/bb-themes/admin_default/images/ui/sliderOverlayVert.png b/src/bb-themes/admin_default/images/ui/sliderOverlayVert.png new file mode 100644 index 000000000..81ad77e49 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/sliderOverlayVert.png differ diff --git a/src/bb-themes/admin_default/images/ui/uploadDisabled.png b/src/bb-themes/admin_default/images/ui/uploadDisabled.png new file mode 100644 index 000000000..bc1fc9481 Binary files /dev/null and b/src/bb-themes/admin_default/images/ui/uploadDisabled.png differ diff --git a/src/bb-themes/admin_default/images/upload.png b/src/bb-themes/admin_default/images/upload.png new file mode 100644 index 000000000..a94715615 Binary files /dev/null and b/src/bb-themes/admin_default/images/upload.png differ diff --git a/src/bb-themes/admin_default/images/user.png b/src/bb-themes/admin_default/images/user.png new file mode 100644 index 000000000..772e0d2d2 Binary files /dev/null and b/src/bb-themes/admin_default/images/user.png differ diff --git a/src/bb-themes/admin_default/images/userPic.png b/src/bb-themes/admin_default/images/userPic.png new file mode 100644 index 000000000..3eb6530c2 Binary files /dev/null and b/src/bb-themes/admin_default/images/userPic.png differ diff --git a/src/bb-themes/admin_default/index.html b/src/bb-themes/admin_default/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-themes/admin_default/js/bb-admin.js b/src/bb-themes/admin_default/js/bb-admin.js new file mode 100644 index 000000000..80aefceb7 --- /dev/null +++ b/src/bb-themes/admin_default/js/bb-admin.js @@ -0,0 +1,273 @@ +var bb = { + post: function(url, params, jsonp) { + $.ajax({ + type: "POST", + url: bb.restUrl(url), + data: params, + dataType: 'json', + error: function(jqXHR, textStatus, e) { + bb.msg(e, 'error'); + }, + success: function(data) { + if(data.error) { + bb.msg(data.error.message, 'error'); + } else { + if(typeof jsonp === 'function') { + return jsonp(data.result); + } else if(window.hasOwnProperty('console')) { + console.log(data.result); + } + } + } + }); + }, + get: function(url, params, jsonp) { + $.ajax({ + type: "GET", + url: bb.restUrl(url), + data: params, + dataType: 'json', + error: function(jqXHR, textStatus, e) { + bb.msg(e, 'error'); + }, + success: function(data) { + if(data.error) { + bb.msg(data.error.message, 'error'); + } else { + if(typeof jsonp === 'function') { + return jsonp(data.result); + } else if(window.hasOwnProperty('console')) { + console.log(data.result); + } + } + } + }); + }, + restUrl: function(url) { + if(url.indexOf('http://') > -1) { + return url; + } + return $('meta[property="bb:url"]').attr("content") + 'index.php?_url=/api/' + url; + }, + error: function(txt, code) { + jAlert(txt, 'Error code: '+code); + }, + msg: function(txt, type) { + jAlert(txt, type); + }, + redirect: function(url) { + if(url === undefined) { + this.reload(); + + } + window.location = url; + }, + reload: function() { + window.location.reload(true); + }, + load: function(url, params) { + var r = ''; + $.ajax({ + url: url, + data: params, + type: "GET", + success: function(data){ r = data; }, + async: false + }); + return r; + }, + _afterComplete: function(obj, result) { + var jsonp = obj.attr('data-api-jsonp'); + if(jsonp !== undefined && window.hasOwnProperty(jsonp)) { + return window[jsonp](result); + } + if(obj.hasClass('bb-rm-tr')) { + obj.closest('tr').addClass('highlight').fadeOut(); + return; + } + if(obj.attr('data-api-reload') !== undefined) { + this.reload(); + return; + } + if(obj.attr('data-api-redirect') !== undefined) { + return this.redirect(obj.attr('data-api-redirect')); + } + if(obj.attr('data-api-msg') !== undefined) { + this.msg(obj.attr('data-api-msg'), 'success'); + return ; + } + if(result) { + this.msg('Form updated', 'success'); + return ; + } + }, + apiForm: function() { + $('form.api-form').bind('submit', function(){ + var obj = $(this); + bb.post(obj.attr('action'), obj.serialize(), function(result) {return bb._afterComplete(obj, result);}); + return false; + }); + }, + apiLink: function() { + $("a.api-link").bind('click', function(){ + var obj = $(this); + if(obj.attr('data-api-confirm') !== undefined) { + jConfirm(obj.attr('data-api-confirm'), 'Confirm your action', function(r) { + if(r) bb.get( obj.attr('href'), {}, function(result) {return bb._afterComplete(obj, result);} ); + }); + } else if(obj.attr('data-api-prompt') !== undefined) { + jPrompt(obj.attr('data-api-prompt-text'), obj.attr('data-api-prompt-default'), obj.attr('data-api-prompt-title'), function(r) { + if(r) { + var p = {}; + var name = obj.attr('data-api-prompt-key'); + p[name] = r; + bb.get( obj.attr('href'), p, function(result) {return bb._afterComplete(obj, result);} ); + } + }); + } else { + bb.get( obj.attr('href'), {}, function(result) {return bb._afterComplete(obj, result);} ); + } + return false; + }); + }, + menuAutoActive: function() { + var matches = $('ul#menu li a').filter(function() { + return document.location.href == this.href; + }); + matches.parents('li').addClass('active'); + }, + insertToTextarea: function(areaId, text){ + + var txtarea = document.getElementById(areaId); + var scrollPos = txtarea.scrollTop; + var strPos = 0; + var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ? + "ff" : (document.selection ? "ie" : false ) ); + if (br == "ie") { + txtarea.focus(); + var range = document.selection.createRange(); + range.moveStart ('character', -txtarea.value.length); + strPos = range.text.length; + } + else if (br == "ff") strPos = txtarea.selectionStart; + + var front = (txtarea.value).substring(0,strPos); + var back = (txtarea.value).substring(strPos,txtarea.value.length); + txtarea.value=front+text+back; + strPos = strPos + text.length; + if (br == "ie") { + txtarea.focus(); + var range = document.selection.createRange(); + range.moveStart ('character', -txtarea.value.length); + range.moveStart ('character', strPos); + range.moveEnd ('character', 0); + range.select(); + } + else if (br == "ff") { + txtarea.selectionStart = strPos; + txtarea.selectionEnd = strPos; + txtarea.focus(); + } + txtarea.scrollTop = scrollPos; + + return false + } +} + +//===== Left navigation submenu animation =====// + +$("ul.sub li a").hover(function() { +$(this).stop().animate({color: "#3a6fa5"}, 400); +},function() { +$(this).stop().animate({color: "#494949"}, 400); +}); + + +//===== Tabs =====// +$.fn.simpleTabs = function(){ + + //Default Action + $(this).find(".tab_content").hide(); //Hide all content + $(this).find("ul.tabs li:first").addClass("activeTab").show(); //Activate first tab + $(this).find(".tab_content:first").show(); //Show first tab content + + //On Click Event + $("ul.tabs li").click(function() { + $(this).parent().parent().find("ul.tabs li").removeClass("activeTab"); //Remove any "active" class + $(this).addClass("activeTab"); //Add "active" class to selected tab + $(this).parent().parent().find(".tab_content").hide(); //Hide all tab content + var activeTab = $(this).find("a").attr("href"); //Find the rel attribute value to identify the active tab + content + $(activeTab).show(); //Fade in the active content + //document.location.hash = activeTab; + return false; + }); + + // select active tab + if($(document.location.hash).length) { + $('a[href="'+document.location.hash+'"]').parent().click(); + $(window).scrollTo(window.location.href.indexOf('#')) + } + +};//end function + +$(function() { + + //===== Global ajax methods =====// + $('.loading').ajaxStart(function() { + //bb.msg('Loading...'); + $(this).show(); + }).ajaxStop(function() { + $(this).hide(); + }); + + //===== Api forms and links =====// + if($("form.api-form").length){bb.apiForm();} + if($("a.api-link").length){bb.apiLink();} + //if($("ul#menu").length){bb.menuAutoActive();} + + $().UItoTop(); + + //===== Datepickers =====// + $( ".datepicker" ).datepicker({ + defaultDate: +7, + autoSize: true, + //appendText: '(yyyy-mm-dd)', + dateFormat: 'yy-mm-dd' + }); + + //===== Tooltip =====// + + $('.leftDir').tipsy({fade: true, gravity: 'e'}); + $('.rightDir').tipsy({fade: true, gravity: 'w'}); + $('.topDir').tipsy({fade: true, gravity: 's'}); + $('.botDir').tipsy({fade: true, gravity: 'n'}); + + $('.dd').click(function () { + $('ul.menu_body', this).slideToggle(100); + }); + + //===== Form elements styling =====// + $(".mainForm select, .mainForm input:checkbox, .mainForm input:radio, .mainForm input:file").uniform(); + + //===== Collapsible elements management =====// + $('.exp').collapsible({ + defaultOpen: 'current', + cookieName: 'navAct', + cssOpen: 'active', + cssClose: 'inactive', + speed: 300 + }); + + $("div.simpleTabs").simpleTabs(); + + + $(document).delegate('div.msg span.close', 'click', function() { + $(this).parent().slideUp(70); + return false; + }); + + //===== Information boxes =====// + $(".hideit").click(function() { + $(this).fadeOut(400); + }); +}); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/flot/excanvas.min.js b/src/bb-themes/admin_default/js/flot/excanvas.min.js new file mode 100644 index 000000000..fcf876c74 --- /dev/null +++ b/src/bb-themes/admin_default/js/flot/excanvas.min.js @@ -0,0 +1 @@ +if(!document.createElement("canvas").getContext){(function(){var ab=Math;var n=ab.round;var l=ab.sin;var A=ab.cos;var H=ab.abs;var N=ab.sqrt;var d=10;var f=d/2;var z=+navigator.userAgent.match(/MSIE ([\d.]+)?/)[1];function y(){return this.context_||(this.context_=new D(this))}var t=Array.prototype.slice;function g(j,m,p){var i=t.call(arguments,2);return function(){return j.apply(m,i.concat(t.call(arguments)))}}function af(i){return String(i).replace(/&/g,"&").replace(/"/g,""")}function Y(m,j,i){if(!m.namespaces[j]){m.namespaces.add(j,i,"#default#VML")}}function R(j){Y(j,"g_vml_","urn:schemas-microsoft-com:vml");Y(j,"g_o_","urn:schemas-microsoft-com:office:office");if(!j.styleSheets.ex_canvas_){var i=j.createStyleSheet();i.owningElement.id="ex_canvas_";i.cssText="canvas{display:inline-block;overflow:hidden;text-align:left;width:300px;height:150px}"}}R(document);var e={init:function(i){var j=i||document;j.createElement("canvas");j.attachEvent("onreadystatechange",g(this.init_,this,j))},init_:function(p){var m=p.getElementsByTagName("canvas");for(var j=0;j1){m--}if(6*m<1){return j+(i-j)*6*m}else{if(2*m<1){return i}else{if(3*m<2){return j+(i-j)*(2/3-m)*6}else{return j}}}}var C={};function F(j){if(j in C){return C[j]}var ag,Z=1;j=String(j);if(j.charAt(0)=="#"){ag=j}else{if(/^rgb/.test(j)){var p=M(j);var ag="#",ah;for(var m=0;m<3;m++){if(p[m].indexOf("%")!=-1){ah=Math.floor(c(p[m])*255)}else{ah=+p[m]}ag+=k[r(ah,0,255)]}Z=+p[3]}else{if(/^hsl/.test(j)){var p=M(j);ag=I(p);Z=p[3]}else{ag=b[j]||j}}}return C[j]={color:ag,alpha:Z}}var o={style:"normal",variant:"normal",weight:"normal",size:10,family:"sans-serif"};var L={};function E(i){if(L[i]){return L[i]}var p=document.createElement("div");var m=p.style;try{m.font=i}catch(j){}return L[i]={style:m.fontStyle||o.style,variant:m.fontVariant||o.variant,weight:m.fontWeight||o.weight,size:m.fontSize||o.size,family:m.fontFamily||o.family}}function u(m,j){var i={};for(var ah in m){i[ah]=m[ah]}var ag=parseFloat(j.currentStyle.fontSize),Z=parseFloat(m.size);if(typeof m.size=="number"){i.size=m.size}else{if(m.size.indexOf("px")!=-1){i.size=Z}else{if(m.size.indexOf("em")!=-1){i.size=ag*Z}else{if(m.size.indexOf("%")!=-1){i.size=(ag/100)*Z}else{if(m.size.indexOf("pt")!=-1){i.size=Z/0.75}else{i.size=ag}}}}}i.size*=0.981;return i}function ac(i){return i.style+" "+i.variant+" "+i.weight+" "+i.size+"px "+i.family}var s={butt:"flat",round:"round"};function S(i){return s[i]||"square"}function D(i){this.m_=B();this.mStack_=[];this.aStack_=[];this.currentPath_=[];this.strokeStyle="#000";this.fillStyle="#000";this.lineWidth=1;this.lineJoin="miter";this.lineCap="butt";this.miterLimit=d*1;this.globalAlpha=1;this.font="10px sans-serif";this.textAlign="left";this.textBaseline="alphabetic";this.canvas=i;var m="width:"+i.clientWidth+"px;height:"+i.clientHeight+"px;overflow:hidden;position:absolute";var j=i.ownerDocument.createElement("div");j.style.cssText=m;i.appendChild(j);var p=j.cloneNode(false);p.style.backgroundColor="red";p.style.filter="alpha(opacity=0)";i.appendChild(p);this.element_=j;this.arcScaleX_=1;this.arcScaleY_=1;this.lineScale_=1}var q=D.prototype;q.clearRect=function(){if(this.textMeasureEl_){this.textMeasureEl_.removeNode(true);this.textMeasureEl_=null}this.element_.innerHTML=""};q.beginPath=function(){this.currentPath_=[]};q.moveTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"moveTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.lineTo=function(j,i){var m=V(this,j,i);this.currentPath_.push({type:"lineTo",x:m.x,y:m.y});this.currentX_=m.x;this.currentY_=m.y};q.bezierCurveTo=function(m,j,ak,aj,ai,ag){var i=V(this,ai,ag);var ah=V(this,m,j);var Z=V(this,ak,aj);K(this,ah,Z,i)};function K(i,Z,m,j){i.currentPath_.push({type:"bezierCurveTo",cp1x:Z.x,cp1y:Z.y,cp2x:m.x,cp2y:m.y,x:j.x,y:j.y});i.currentX_=j.x;i.currentY_=j.y}q.quadraticCurveTo=function(ai,m,j,i){var ah=V(this,ai,m);var ag=V(this,j,i);var aj={x:this.currentX_+2/3*(ah.x-this.currentX_),y:this.currentY_+2/3*(ah.y-this.currentY_)};var Z={x:aj.x+(ag.x-this.currentX_)/3,y:aj.y+(ag.y-this.currentY_)/3};K(this,aj,Z,ag)};q.arc=function(al,aj,ak,ag,j,m){ak*=d;var ap=m?"at":"wa";var am=al+A(ag)*ak-f;var ao=aj+l(ag)*ak-f;var i=al+A(j)*ak-f;var an=aj+l(j)*ak-f;if(am==i&&!m){am+=0.125}var Z=V(this,al,aj);var ai=V(this,am,ao);var ah=V(this,i,an);this.currentPath_.push({type:ap,x:Z.x,y:Z.y,radius:ak,xStart:ai.x,yStart:ai.y,xEnd:ah.x,yEnd:ah.y})};q.rect=function(m,j,i,p){this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath()};q.strokeRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.stroke();this.currentPath_=Z};q.fillRect=function(m,j,i,p){var Z=this.currentPath_;this.beginPath();this.moveTo(m,j);this.lineTo(m+i,j);this.lineTo(m+i,j+p);this.lineTo(m,j+p);this.closePath();this.fill();this.currentPath_=Z};q.createLinearGradient=function(j,p,i,m){var Z=new U("gradient");Z.x0_=j;Z.y0_=p;Z.x1_=i;Z.y1_=m;return Z};q.createRadialGradient=function(p,ag,m,j,Z,i){var ah=new U("gradientradial");ah.x0_=p;ah.y0_=ag;ah.r0_=m;ah.x1_=j;ah.y1_=Z;ah.r1_=i;return ah};q.drawImage=function(aq,m){var aj,ah,al,ay,ao,am,at,aA;var ak=aq.runtimeStyle.width;var ap=aq.runtimeStyle.height;aq.runtimeStyle.width="auto";aq.runtimeStyle.height="auto";var ai=aq.width;var aw=aq.height;aq.runtimeStyle.width=ak;aq.runtimeStyle.height=ap;if(arguments.length==3){aj=arguments[1];ah=arguments[2];ao=am=0;at=al=ai;aA=ay=aw}else{if(arguments.length==5){aj=arguments[1];ah=arguments[2];al=arguments[3];ay=arguments[4];ao=am=0;at=ai;aA=aw}else{if(arguments.length==9){ao=arguments[1];am=arguments[2];at=arguments[3];aA=arguments[4];aj=arguments[5];ah=arguments[6];al=arguments[7];ay=arguments[8]}else{throw Error("Invalid number of arguments")}}}var az=V(this,aj,ah);var p=at/2;var j=aA/2;var ax=[];var i=10;var ag=10;ax.push(" ','","");this.element_.insertAdjacentHTML("BeforeEnd",ax.join(""))};q.stroke=function(ao){var Z=10;var ap=10;var ag=5000;var ai={x:null,y:null};var an={x:null,y:null};for(var aj=0;ajan.x){an.x=m.x}if(ai.y==null||m.yan.y){an.y=m.y}}}am.push(' ">');if(!ao){w(this,am)}else{G(this,am,ai,an)}am.push("");this.element_.insertAdjacentHTML("beforeEnd",am.join(""))}};function w(m,ag){var j=F(m.strokeStyle);var p=j.color;var Z=j.alpha*m.globalAlpha;var i=m.lineScale_*m.lineWidth;if(i<1){Z*=i}ag.push("')}function G(aq,ai,aK,ar){var aj=aq.fillStyle;var aB=aq.arcScaleX_;var aA=aq.arcScaleY_;var j=ar.x-aK.x;var p=ar.y-aK.y;if(aj instanceof U){var an=0;var aF={x:0,y:0};var ax=0;var am=1;if(aj.type_=="gradient"){var al=aj.x0_/aB;var m=aj.y0_/aA;var ak=aj.x1_/aB;var aM=aj.y1_/aA;var aJ=V(aq,al,m);var aI=V(aq,ak,aM);var ag=aI.x-aJ.x;var Z=aI.y-aJ.y;an=Math.atan2(ag,Z)*180/Math.PI;if(an<0){an+=360}if(an<0.000001){an=0}}else{var aJ=V(aq,aj.x0_,aj.y0_);aF={x:(aJ.x-aK.x)/j,y:(aJ.y-aK.y)/p};j/=aB*d;p/=aA*d;var aD=ab.max(j,p);ax=2*aj.r0_/aD;am=2*aj.r1_/aD-ax}var av=aj.colors_;av.sort(function(aN,i){return aN.offset-i.offset});var ap=av.length;var au=av[0].color;var at=av[ap-1].color;var az=av[0].alpha*aq.globalAlpha;var ay=av[ap-1].alpha*aq.globalAlpha;var aE=[];for(var aH=0;aH')}else{if(aj instanceof T){if(j&&p){var ah=-aK.x;var aC=-aK.y;ai.push("')}}else{var aL=F(aq.fillStyle);var aw=aL.color;var aG=aL.alpha*aq.globalAlpha;ai.push('')}}}q.fill=function(){this.stroke(true)};q.closePath=function(){this.currentPath_.push({type:"close"})};function V(j,Z,p){var i=j.m_;return{x:d*(Z*i[0][0]+p*i[1][0]+i[2][0])-f,y:d*(Z*i[0][1]+p*i[1][1]+i[2][1])-f}}q.save=function(){var i={};v(this,i);this.aStack_.push(i);this.mStack_.push(this.m_);this.m_=J(B(),this.m_)};q.restore=function(){if(this.aStack_.length){v(this.aStack_.pop(),this);this.m_=this.mStack_.pop()}};function h(i){return isFinite(i[0][0])&&isFinite(i[0][1])&&isFinite(i[1][0])&&isFinite(i[1][1])&&isFinite(i[2][0])&&isFinite(i[2][1])}function aa(j,i,p){if(!h(i)){return}j.m_=i;if(p){var Z=i[0][0]*i[1][1]-i[0][1]*i[1][0];j.lineScale_=N(H(Z))}}q.translate=function(m,j){var i=[[1,0,0],[0,1,0],[m,j,1]];aa(this,J(i,this.m_),false)};q.rotate=function(j){var p=A(j);var m=l(j);var i=[[p,m,0],[-m,p,0],[0,0,1]];aa(this,J(i,this.m_),false)};q.scale=function(m,j){this.arcScaleX_*=m;this.arcScaleY_*=j;var i=[[m,0,0],[0,j,0],[0,0,1]];aa(this,J(i,this.m_),true)};q.transform=function(Z,p,ah,ag,j,i){var m=[[Z,p,0],[ah,ag,0],[j,i,1]];aa(this,J(m,this.m_),true)};q.setTransform=function(ag,Z,ai,ah,p,j){var i=[[ag,Z,0],[ai,ah,0],[p,j,1]];aa(this,i,true)};q.drawText_=function(am,ak,aj,ap,ai){var ao=this.m_,at=1000,j=0,ar=at,ah={x:0,y:0},ag=[];var i=u(E(this.font),this.element_);var p=ac(i);var au=this.element_.currentStyle;var Z=this.textAlign.toLowerCase();switch(Z){case"left":case"center":case"right":break;case"end":Z=au.direction=="ltr"?"right":"left";break;case"start":Z=au.direction=="rtl"?"right":"left";break;default:Z="left"}switch(this.textBaseline){case"hanging":case"top":ah.y=i.size/1.75;break;case"middle":break;default:case null:case"alphabetic":case"ideographic":case"bottom":ah.y=-i.size/2.25;break}switch(Z){case"right":j=at;ar=0.05;break;case"center":j=ar=at/2;break}var aq=V(this,ak+ah.x,aj+ah.y);ag.push('');if(ai){w(this,ag)}else{G(this,ag,{x:-j,y:0},{x:ar,y:i.size})}var an=ao[0][0].toFixed(3)+","+ao[1][0].toFixed(3)+","+ao[0][1].toFixed(3)+","+ao[1][1].toFixed(3)+",0,0";var al=n(aq.x/d)+","+n(aq.y/d);ag.push('','','');this.element_.insertAdjacentHTML("beforeEnd",ag.join(""))};q.fillText=function(m,i,p,j){this.drawText_(m,i,p,j,false)};q.strokeText=function(m,i,p,j){this.drawText_(m,i,p,j,true)};q.measureText=function(m){if(!this.textMeasureEl_){var i='';this.element_.insertAdjacentHTML("beforeEnd",i);this.textMeasureEl_=this.element_.lastChild}var j=this.element_.ownerDocument;this.textMeasureEl_.innerHTML="";this.textMeasureEl_.style.font=this.font;this.textMeasureEl_.appendChild(j.createTextNode(m));return{width:this.textMeasureEl_.offsetWidth}};q.clip=function(){};q.arcTo=function(){};q.createPattern=function(j,i){return new T(j,i)};function U(i){this.type_=i;this.x0_=0;this.y0_=0;this.r0_=0;this.x1_=0;this.y1_=0;this.r1_=0;this.colors_=[]}U.prototype.addColorStop=function(j,i){i=F(i);this.colors_.push({offset:j,color:i.color,alpha:i.alpha})};function T(j,i){Q(j);switch(i){case"repeat":case null:case"":this.repetition_="repeat";break;case"repeat-x":case"repeat-y":case"no-repeat":this.repetition_=i;break;default:O("SYNTAX_ERR")}this.src_=j.src;this.width_=j.width;this.height_=j.height}function O(i){throw new P(i)}function Q(i){if(!i||i.nodeType!=1||i.tagName!="IMG"){O("TYPE_MISMATCH_ERR")}if(i.readyState!="complete"){O("INVALID_STATE_ERR")}}function P(i){this.code=this[i];this.message=i+": DOM Exception "+this.code}var X=P.prototype=new Error;X.INDEX_SIZE_ERR=1;X.DOMSTRING_SIZE_ERR=2;X.HIERARCHY_REQUEST_ERR=3;X.WRONG_DOCUMENT_ERR=4;X.INVALID_CHARACTER_ERR=5;X.NO_DATA_ALLOWED_ERR=6;X.NO_MODIFICATION_ALLOWED_ERR=7;X.NOT_FOUND_ERR=8;X.NOT_SUPPORTED_ERR=9;X.INUSE_ATTRIBUTE_ERR=10;X.INVALID_STATE_ERR=11;X.SYNTAX_ERR=12;X.INVALID_MODIFICATION_ERR=13;X.NAMESPACE_ERR=14;X.INVALID_ACCESS_ERR=15;X.VALIDATION_ERR=16;X.TYPE_MISMATCH_ERR=17;G_vmlCanvasManager=e;CanvasRenderingContext2D=D;CanvasGradient=U;CanvasPattern=T;DOMException=P})()}; \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/flot/jquery.flot.js b/src/bb-themes/admin_default/js/flot/jquery.flot.js new file mode 100644 index 000000000..55bd5ac3b --- /dev/null +++ b/src/bb-themes/admin_default/js/flot/jquery.flot.js @@ -0,0 +1,2599 @@ +/*! Javascript plotting library for jQuery, v. 0.7. + * + * Released under the MIT license by IOLA, December 2007. + * + */ + +// first an inline dependency, jquery.colorhelpers.js, we inline it here +// for convenience + +/* Plugin for jQuery for working with colors. + * + * Version 1.1. + * + * Inspiration from jQuery color animation plugin by John Resig. + * + * Released under the MIT license by Ole Laursen, October 2009. + * + * Examples: + * + * $.color.parse("#fff").scale('rgb', 0.25).add('a', -0.5).toString() + * var c = $.color.extract($("#mydiv"), 'background-color'); + * console.log(c.r, c.g, c.b, c.a); + * $.color.make(100, 50, 25, 0.4).toString() // returns "rgba(100,50,25,0.4)" + * + * Note that .scale() and .add() return the same modified object + * instead of making a new one. + * + * V. 1.1: Fix error handling so e.g. parsing an empty string does + * produce a color rather than just crashing. + */ +(function(B){B.color={};B.color.make=function(F,E,C,D){var G={};G.r=F||0;G.g=E||0;G.b=C||0;G.a=D!=null?D:1;G.add=function(J,I){for(var H=0;H=1){return"rgb("+[G.r,G.g,G.b].join(",")+")"}else{return"rgba("+[G.r,G.g,G.b,G.a].join(",")+")"}};G.normalize=function(){function H(J,K,I){return KI?I:K)}G.r=H(0,parseInt(G.r),255);G.g=H(0,parseInt(G.g),255);G.b=H(0,parseInt(G.b),255);G.a=H(0,G.a,1);return G};G.clone=function(){return B.color.make(G.r,G.b,G.g,G.a)};return G.normalize()};B.color.extract=function(D,C){var E;do{E=D.css(C).toLowerCase();if(E!=""&&E!="transparent"){break}D=D.parent()}while(!B.nodeName(D.get(0),"body"));if(E=="rgba(0, 0, 0, 0)"){E="transparent"}return B.color.parse(E)};B.color.parse=function(F){var E,C=B.color.make;if(E=/rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10))}if(E=/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(F)){return C(parseInt(E[1],10),parseInt(E[2],10),parseInt(E[3],10),parseFloat(E[4]))}if(E=/rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55)}if(E=/rgba\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\s*\)/.exec(F)){return C(parseFloat(E[1])*2.55,parseFloat(E[2])*2.55,parseFloat(E[3])*2.55,parseFloat(E[4]))}if(E=/#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(F)){return C(parseInt(E[1],16),parseInt(E[2],16),parseInt(E[3],16))}if(E=/#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(F)){return C(parseInt(E[1]+E[1],16),parseInt(E[2]+E[2],16),parseInt(E[3]+E[3],16))}var D=B.trim(F).toLowerCase();if(D=="transparent"){return C(255,255,255,0)}else{E=A[D]||[0,0,0];return C(E[0],E[1],E[2])}};var A={aqua:[0,255,255],azure:[240,255,255],beige:[245,245,220],black:[0,0,0],blue:[0,0,255],brown:[165,42,42],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgrey:[169,169,169],darkgreen:[0,100,0],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkviolet:[148,0,211],fuchsia:[255,0,255],gold:[255,215,0],green:[0,128,0],indigo:[75,0,130],khaki:[240,230,140],lightblue:[173,216,230],lightcyan:[224,255,255],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightyellow:[255,255,224],lime:[0,255,0],magenta:[255,0,255],maroon:[128,0,0],navy:[0,0,128],olive:[128,128,0],orange:[255,165,0],pink:[255,192,203],purple:[128,0,128],violet:[128,0,128],red:[255,0,0],silver:[192,192,192],white:[255,255,255],yellow:[255,255,0]}})(jQuery); + +// the actual Flot code +(function($) { + function Plot(placeholder, data_, options_, plugins) { + // data is on the form: + // [ series1, series2 ... ] + // where series is either just the data as [ [x1, y1], [x2, y2], ... ] + // or { data: [ [x1, y1], [x2, y2], ... ], label: "some label", ... } + + var series = [], + options = { + // the color theme used for graphs + colors: ["#ee7951", "#afd8f8", "#cb4b4b", "#4da74d", "#9440ed"], + legend: { + show: true, + noColumns: 0, // number of colums in legend table + labelFormatter: null, // fn: string -> string + labelBoxBorderColor: "#ccc", // border color for the little label boxes + container: null, // container (as jQuery object) to put legend in, null means default on top of graph + position: "ne", // position of default legend container within plot + margin: [-5, -25], // distance from grid edge to default legend container within plot + backgroundColor: "#fafafa", // null means auto-detect + backgroundOpacity: 1 // set to 0 to avoid background + }, + xaxis: { + show: null, // null = auto-detect, true = always, false = never + position: "bottom", // or "top" + mode: null, // null or "time" + color: null, // base color, labels, ticks + tickColor: null, // possibly different color of ticks, e.g. "rgba(0,0,0,0.15)" + transform: null, // null or f: number -> number to transform axis + inverseTransform: null, // if transform is set, this should be the inverse function + min: null, // min. value to show, null means set automatically + max: null, // max. value to show, null means set automatically + autoscaleMargin: null, // margin in % to add if auto-setting min/max + ticks: null, // either [1, 3] or [[1, "a"], 3] or (fn: axis info -> ticks) or app. number of ticks for auto-ticks + tickFormatter: null, // fn: number -> string + labelWidth: null, // size of tick labels in pixels + labelHeight: null, + reserveSpace: null, // whether to reserve space even if axis isn't shown + tickLength: null, // size in pixels of ticks, or "full" for whole line + alignTicksWithAxis: null, // axis number or null for no sync + + // mode specific options + tickDecimals: null, // no. of decimals, null means auto + tickSize: null, // number or [number, "unit"] + minTickSize: null, // number or [number, "unit"] + monthNames: null, // list of names of months + timeformat: null, // format string to use + twelveHourClock: false // 12 or 24 time in time mode + }, + yaxis: { + autoscaleMargin: 0.02, + position: "left" // or "right" + }, + xaxes: [], + yaxes: [], + series: { + points: { + show: false, + radius: 3, + lineWidth: 2, // in pixels + fill: true, + fillColor: "#ffffff", + symbol: "circle" // or callback + }, + lines: { + // we don't put in show: false so we can see + // whether lines were actively disabled + lineWidth: 2, // in pixels + fill: false, + fillColor: null, + steps: false + }, + bars: { + show: false, + lineWidth: 2, // in pixels + barWidth: 1, // in units of the x axis + fill: true, + fillColor: null, + align: "left", // or "center" + horizontal: false + }, + shadowSize: 0 + }, + grid: { + show: true, + aboveData: false, + color: "#545454", // primary color used for outline and labels + backgroundColor: null, // null for transparent, else color + borderColor: "#e3e3e3", // set if different from the grid color + tickColor: "#e3e3e3", // color for the ticks, e.g. "rgba(0,0,0,0.15)" + labelMargin: 5, // in pixels + axisMargin: 8, // in pixels + borderWidth: 0, // in pixels + minBorderMargin: 10, // in pixels, null means taken from points radius + markings: null, // array of ranges or fn: axes -> array of ranges + markingsColor: "#f4f4f4", + markingsLineWidth: 2, + // interactive stuff + clickable: false, + hoverable: false, + autoHighlight: true, // highlight in case mouse is near + mouseActiveRadius: 5 // how far the mouse can be away to activate an item + }, + hooks: {} + }, + canvas = null, // the canvas for the plot itself + overlay = null, // canvas for interactive stuff on top of plot + eventHolder = null, // jQuery object that events should be bound to + ctx = null, octx = null, + xaxes = [], yaxes = [], + plotOffset = { left: 0, right: 0, top: 0, bottom: 0}, + canvasWidth = 0, canvasHeight = 0, + plotWidth = 0, plotHeight = 0, + hooks = { + processOptions: [], + processRawData: [], + processDatapoints: [], + drawSeries: [], + draw: [], + bindEvents: [], + drawOverlay: [], + shutdown: [] + }, + plot = this; + + // public functions + plot.setData = setData; + plot.setupGrid = setupGrid; + plot.draw = draw; + plot.getPlaceholder = function() { return placeholder; }; + plot.getCanvas = function() { return canvas; }; + plot.getPlotOffset = function() { return plotOffset; }; + plot.width = function () { return plotWidth; }; + plot.height = function () { return plotHeight; }; + plot.offset = function () { + var o = eventHolder.offset(); + o.left += plotOffset.left; + o.top += plotOffset.top; + return o; + }; + plot.getData = function () { return series; }; + plot.getAxes = function () { + var res = {}, i; + $.each(xaxes.concat(yaxes), function (_, axis) { + if (axis) + res[axis.direction + (axis.n != 1 ? axis.n : "") + "axis"] = axis; + }); + return res; + }; + plot.getXAxes = function () { return xaxes; }; + plot.getYAxes = function () { return yaxes; }; + plot.c2p = canvasToAxisCoords; + plot.p2c = axisToCanvasCoords; + plot.getOptions = function () { return options; }; + plot.highlight = highlight; + plot.unhighlight = unhighlight; + plot.triggerRedrawOverlay = triggerRedrawOverlay; + plot.pointOffset = function(point) { + return { + left: parseInt(xaxes[axisNumber(point, "x") - 1].p2c(+point.x) + plotOffset.left), + top: parseInt(yaxes[axisNumber(point, "y") - 1].p2c(+point.y) + plotOffset.top) + }; + }; + plot.shutdown = shutdown; + plot.resize = function () { + getCanvasDimensions(); + resizeCanvas(canvas); + resizeCanvas(overlay); + }; + + // public attributes + plot.hooks = hooks; + + // initialize + initPlugins(plot); + parseOptions(options_); + setupCanvases(); + setData(data_); + setupGrid(); + draw(); + bindEvents(); + + + function executeHooks(hook, args) { + args = [plot].concat(args); + for (var i = 0; i < hook.length; ++i) + hook[i].apply(this, args); + } + + function initPlugins() { + for (var i = 0; i < plugins.length; ++i) { + var p = plugins[i]; + p.init(plot); + if (p.options) + $.extend(true, options, p.options); + } + } + + function parseOptions(opts) { + var i; + + $.extend(true, options, opts); + + if (options.xaxis.color == null) + options.xaxis.color = options.grid.color; + if (options.yaxis.color == null) + options.yaxis.color = options.grid.color; + + if (options.xaxis.tickColor == null) // backwards-compatibility + options.xaxis.tickColor = options.grid.tickColor; + if (options.yaxis.tickColor == null) // backwards-compatibility + options.yaxis.tickColor = options.grid.tickColor; + + if (options.grid.borderColor == null) + options.grid.borderColor = options.grid.color; + if (options.grid.tickColor == null) + options.grid.tickColor = $.color.parse(options.grid.color).scale('a', 0.22).toString(); + + // fill in defaults in axes, copy at least always the + // first as the rest of the code assumes it'll be there + for (i = 0; i < Math.max(1, options.xaxes.length); ++i) + options.xaxes[i] = $.extend(true, {}, options.xaxis, options.xaxes[i]); + for (i = 0; i < Math.max(1, options.yaxes.length); ++i) + options.yaxes[i] = $.extend(true, {}, options.yaxis, options.yaxes[i]); + + // backwards compatibility, to be removed in future + if (options.xaxis.noTicks && options.xaxis.ticks == null) + options.xaxis.ticks = options.xaxis.noTicks; + if (options.yaxis.noTicks && options.yaxis.ticks == null) + options.yaxis.ticks = options.yaxis.noTicks; + if (options.x2axis) { + options.xaxes[1] = $.extend(true, {}, options.xaxis, options.x2axis); + options.xaxes[1].position = "top"; + } + if (options.y2axis) { + options.yaxes[1] = $.extend(true, {}, options.yaxis, options.y2axis); + options.yaxes[1].position = "right"; + } + if (options.grid.coloredAreas) + options.grid.markings = options.grid.coloredAreas; + if (options.grid.coloredAreasColor) + options.grid.markingsColor = options.grid.coloredAreasColor; + if (options.lines) + $.extend(true, options.series.lines, options.lines); + if (options.points) + $.extend(true, options.series.points, options.points); + if (options.bars) + $.extend(true, options.series.bars, options.bars); + if (options.shadowSize != null) + options.series.shadowSize = options.shadowSize; + + // save options on axes for future reference + for (i = 0; i < options.xaxes.length; ++i) + getOrCreateAxis(xaxes, i + 1).options = options.xaxes[i]; + for (i = 0; i < options.yaxes.length; ++i) + getOrCreateAxis(yaxes, i + 1).options = options.yaxes[i]; + + // add hooks from options + for (var n in hooks) + if (options.hooks[n] && options.hooks[n].length) + hooks[n] = hooks[n].concat(options.hooks[n]); + + executeHooks(hooks.processOptions, [options]); + } + + function setData(d) { + series = parseData(d); + fillInSeriesOptions(); + processData(); + } + + function parseData(d) { + var res = []; + for (var i = 0; i < d.length; ++i) { + var s = $.extend(true, {}, options.series); + + if (d[i].data != null) { + s.data = d[i].data; // move the data instead of deep-copy + delete d[i].data; + + $.extend(true, s, d[i]); + + d[i].data = s.data; + } + else + s.data = d[i]; + res.push(s); + } + + return res; + } + + function axisNumber(obj, coord) { + var a = obj[coord + "axis"]; + if (typeof a == "object") // if we got a real axis, extract number + a = a.n; + if (typeof a != "number") + a = 1; // default to first axis + return a; + } + + function allAxes() { + // return flat array without annoying null entries + return $.grep(xaxes.concat(yaxes), function (a) { return a; }); + } + + function canvasToAxisCoords(pos) { + // return an object with x/y corresponding to all used axes + var res = {}, i, axis; + for (i = 0; i < xaxes.length; ++i) { + axis = xaxes[i]; + if (axis && axis.used) + res["x" + axis.n] = axis.c2p(pos.left); + } + + for (i = 0; i < yaxes.length; ++i) { + axis = yaxes[i]; + if (axis && axis.used) + res["y" + axis.n] = axis.c2p(pos.top); + } + + if (res.x1 !== undefined) + res.x = res.x1; + if (res.y1 !== undefined) + res.y = res.y1; + + return res; + } + + function axisToCanvasCoords(pos) { + // get canvas coords from the first pair of x/y found in pos + var res = {}, i, axis, key; + + for (i = 0; i < xaxes.length; ++i) { + axis = xaxes[i]; + if (axis && axis.used) { + key = "x" + axis.n; + if (pos[key] == null && axis.n == 1) + key = "x"; + + if (pos[key] != null) { + res.left = axis.p2c(pos[key]); + break; + } + } + } + + for (i = 0; i < yaxes.length; ++i) { + axis = yaxes[i]; + if (axis && axis.used) { + key = "y" + axis.n; + if (pos[key] == null && axis.n == 1) + key = "y"; + + if (pos[key] != null) { + res.top = axis.p2c(pos[key]); + break; + } + } + } + + return res; + } + + function getOrCreateAxis(axes, number) { + if (!axes[number - 1]) + axes[number - 1] = { + n: number, // save the number for future reference + direction: axes == xaxes ? "x" : "y", + options: $.extend(true, {}, axes == xaxes ? options.xaxis : options.yaxis) + }; + + return axes[number - 1]; + } + + function fillInSeriesOptions() { + var i; + + // collect what we already got of colors + var neededColors = series.length, + usedColors = [], + assignedColors = []; + for (i = 0; i < series.length; ++i) { + var sc = series[i].color; + if (sc != null) { + --neededColors; + if (typeof sc == "number") + assignedColors.push(sc); + else + usedColors.push($.color.parse(series[i].color)); + } + } + + // we might need to generate more colors if higher indices + // are assigned + for (i = 0; i < assignedColors.length; ++i) { + neededColors = Math.max(neededColors, assignedColors[i] + 1); + } + + // produce colors as needed + var colors = [], variation = 0; + i = 0; + while (colors.length < neededColors) { + var c; + if (options.colors.length == i) // check degenerate case + c = $.color.make(100, 100, 100); + else + c = $.color.parse(options.colors[i]); + + // vary color if needed + var sign = variation % 2 == 1 ? -1 : 1; + c.scale('rgb', 1 + sign * Math.ceil(variation / 2) * 0.2) + + // FIXME: if we're getting to close to something else, + // we should probably skip this one + colors.push(c); + + ++i; + if (i >= options.colors.length) { + i = 0; + ++variation; + } + } + + // fill in the options + var colori = 0, s; + for (i = 0; i < series.length; ++i) { + s = series[i]; + + // assign colors + if (s.color == null) { + s.color = colors[colori].toString(); + ++colori; + } + else if (typeof s.color == "number") + s.color = colors[s.color].toString(); + + // turn on lines automatically in case nothing is set + if (s.lines.show == null) { + var v, show = true; + for (v in s) + if (s[v] && s[v].show) { + show = false; + break; + } + if (show) + s.lines.show = true; + } + + // setup axes + s.xaxis = getOrCreateAxis(xaxes, axisNumber(s, "x")); + s.yaxis = getOrCreateAxis(yaxes, axisNumber(s, "y")); + } + } + + function processData() { + var topSentry = Number.POSITIVE_INFINITY, + bottomSentry = Number.NEGATIVE_INFINITY, + fakeInfinity = Number.MAX_VALUE, + i, j, k, m, length, + s, points, ps, x, y, axis, val, f, p; + + function updateAxis(axis, min, max) { + if (min < axis.datamin && min != -fakeInfinity) + axis.datamin = min; + if (max > axis.datamax && max != fakeInfinity) + axis.datamax = max; + } + + $.each(allAxes(), function (_, axis) { + // init axis + axis.datamin = topSentry; + axis.datamax = bottomSentry; + axis.used = false; + }); + + for (i = 0; i < series.length; ++i) { + s = series[i]; + s.datapoints = { points: [] }; + + executeHooks(hooks.processRawData, [ s, s.data, s.datapoints ]); + } + + // first pass: clean and copy data + for (i = 0; i < series.length; ++i) { + s = series[i]; + + var data = s.data, format = s.datapoints.format; + + if (!format) { + format = []; + // find out how to copy + format.push({ x: true, number: true, required: true }); + format.push({ y: true, number: true, required: true }); + + if (s.bars.show || (s.lines.show && s.lines.fill)) { + format.push({ y: true, number: true, required: false, defaultValue: 0 }); + if (s.bars.horizontal) { + delete format[format.length - 1].y; + format[format.length - 1].x = true; + } + } + + s.datapoints.format = format; + } + + if (s.datapoints.pointsize != null) + continue; // already filled in + + s.datapoints.pointsize = format.length; + + ps = s.datapoints.pointsize; + points = s.datapoints.points; + + insertSteps = s.lines.show && s.lines.steps; + s.xaxis.used = s.yaxis.used = true; + + for (j = k = 0; j < data.length; ++j, k += ps) { + p = data[j]; + + var nullify = p == null; + if (!nullify) { + for (m = 0; m < ps; ++m) { + val = p[m]; + f = format[m]; + + if (f) { + if (f.number && val != null) { + val = +val; // convert to number + if (isNaN(val)) + val = null; + else if (val == Infinity) + val = fakeInfinity; + else if (val == -Infinity) + val = -fakeInfinity; + } + + if (val == null) { + if (f.required) + nullify = true; + + if (f.defaultValue != null) + val = f.defaultValue; + } + } + + points[k + m] = val; + } + } + + if (nullify) { + for (m = 0; m < ps; ++m) { + val = points[k + m]; + if (val != null) { + f = format[m]; + // extract min/max info + if (f.x) + updateAxis(s.xaxis, val, val); + if (f.y) + updateAxis(s.yaxis, val, val); + } + points[k + m] = null; + } + } + else { + // a little bit of line specific stuff that + // perhaps shouldn't be here, but lacking + // better means... + if (insertSteps && k > 0 + && points[k - ps] != null + && points[k - ps] != points[k] + && points[k - ps + 1] != points[k + 1]) { + // copy the point to make room for a middle point + for (m = 0; m < ps; ++m) + points[k + ps + m] = points[k + m]; + + // middle point has same y + points[k + 1] = points[k - ps + 1]; + + // we've added a point, better reflect that + k += ps; + } + } + } + } + + // give the hooks a chance to run + for (i = 0; i < series.length; ++i) { + s = series[i]; + + executeHooks(hooks.processDatapoints, [ s, s.datapoints]); + } + + // second pass: find datamax/datamin for auto-scaling + for (i = 0; i < series.length; ++i) { + s = series[i]; + points = s.datapoints.points, + ps = s.datapoints.pointsize; + + var xmin = topSentry, ymin = topSentry, + xmax = bottomSentry, ymax = bottomSentry; + + for (j = 0; j < points.length; j += ps) { + if (points[j] == null) + continue; + + for (m = 0; m < ps; ++m) { + val = points[j + m]; + f = format[m]; + if (!f || val == fakeInfinity || val == -fakeInfinity) + continue; + + if (f.x) { + if (val < xmin) + xmin = val; + if (val > xmax) + xmax = val; + } + if (f.y) { + if (val < ymin) + ymin = val; + if (val > ymax) + ymax = val; + } + } + } + + if (s.bars.show) { + // make sure we got room for the bar on the dancing floor + var delta = s.bars.align == "left" ? 0 : -s.bars.barWidth/2; + if (s.bars.horizontal) { + ymin += delta; + ymax += delta + s.bars.barWidth; + } + else { + xmin += delta; + xmax += delta + s.bars.barWidth; + } + } + + updateAxis(s.xaxis, xmin, xmax); + updateAxis(s.yaxis, ymin, ymax); + } + + $.each(allAxes(), function (_, axis) { + if (axis.datamin == topSentry) + axis.datamin = null; + if (axis.datamax == bottomSentry) + axis.datamax = null; + }); + } + + function makeCanvas(skipPositioning, cls) { + var c = document.createElement('canvas'); + c.className = cls; + c.width = canvasWidth; + c.height = canvasHeight; + + if (!skipPositioning) + $(c).css({ position: 'absolute', left: 0, top: 0 }); + + $(c).appendTo(placeholder); + + if (!c.getContext) // excanvas hack + c = window.G_vmlCanvasManager.initElement(c); + + // used for resetting in case we get replotted + c.getContext("2d").save(); + + return c; + } + + function getCanvasDimensions() { + canvasWidth = placeholder.width(); + canvasHeight = placeholder.height(); + + if (canvasWidth <= 0 || canvasHeight <= 0) + throw "Invalid dimensions for plot, width = " + canvasWidth + ", height = " + canvasHeight; + } + + function resizeCanvas(c) { + // resizing should reset the state (excanvas seems to be + // buggy though) + if (c.width != canvasWidth) + c.width = canvasWidth; + + if (c.height != canvasHeight) + c.height = canvasHeight; + + // so try to get back to the initial state (even if it's + // gone now, this should be safe according to the spec) + var cctx = c.getContext("2d"); + cctx.restore(); + + // and save again + cctx.save(); + } + + function setupCanvases() { + var reused, + existingCanvas = placeholder.children("canvas.base"), + existingOverlay = placeholder.children("canvas.overlay"); + + if (existingCanvas.length == 0 || existingOverlay == 0) { + // init everything + + placeholder.html(""); // make sure placeholder is clear + + placeholder.css({ padding: 0 }); // padding messes up the positioning + + if (placeholder.css("position") == 'static') + placeholder.css("position", "relative"); // for positioning labels and overlay + + getCanvasDimensions(); + + canvas = makeCanvas(true, "base"); + overlay = makeCanvas(false, "overlay"); // overlay canvas for interactive features + + reused = false; + } + else { + // reuse existing elements + + canvas = existingCanvas.get(0); + overlay = existingOverlay.get(0); + + reused = true; + } + + ctx = canvas.getContext("2d"); + octx = overlay.getContext("2d"); + + // we include the canvas in the event holder too, because IE 7 + // sometimes has trouble with the stacking order + eventHolder = $([overlay, canvas]); + + if (reused) { + // run shutdown in the old plot object + placeholder.data("plot").shutdown(); + + // reset reused canvases + plot.resize(); + + // make sure overlay pixels are cleared (canvas is cleared when we redraw) + octx.clearRect(0, 0, canvasWidth, canvasHeight); + + // then whack any remaining obvious garbage left + eventHolder.unbind(); + placeholder.children().not([canvas, overlay]).remove(); + } + + // save in case we get replotted + placeholder.data("plot", plot); + } + + function bindEvents() { + // bind events + if (options.grid.hoverable) { + eventHolder.mousemove(onMouseMove); + eventHolder.mouseleave(onMouseLeave); + } + + if (options.grid.clickable) + eventHolder.click(onClick); + + executeHooks(hooks.bindEvents, [eventHolder]); + } + + function shutdown() { + if (redrawTimeout) + clearTimeout(redrawTimeout); + + eventHolder.unbind("mousemove", onMouseMove); + eventHolder.unbind("mouseleave", onMouseLeave); + eventHolder.unbind("click", onClick); + + executeHooks(hooks.shutdown, [eventHolder]); + } + + function setTransformationHelpers(axis) { + // set helper functions on the axis, assumes plot area + // has been computed already + + function identity(x) { return x; } + + var s, m, t = axis.options.transform || identity, + it = axis.options.inverseTransform; + + // precompute how much the axis is scaling a point + // in canvas space + if (axis.direction == "x") { + s = axis.scale = plotWidth / Math.abs(t(axis.max) - t(axis.min)); + m = Math.min(t(axis.max), t(axis.min)); + } + else { + s = axis.scale = plotHeight / Math.abs(t(axis.max) - t(axis.min)); + s = -s; + m = Math.max(t(axis.max), t(axis.min)); + } + + // data point to canvas coordinate + if (t == identity) // slight optimization + axis.p2c = function (p) { return (p - m) * s; }; + else + axis.p2c = function (p) { return (t(p) - m) * s; }; + // canvas coordinate to data point + if (!it) + axis.c2p = function (c) { return m + c / s; }; + else + axis.c2p = function (c) { return it(m + c / s); }; + } + + function measureTickLabels(axis) { + var opts = axis.options, i, ticks = axis.ticks || [], labels = [], + l, w = opts.labelWidth, h = opts.labelHeight, dummyDiv; + + function makeDummyDiv(labels, width) { + return $('
          ' + + '
          ' + + labels.join("") + '
          ') + .appendTo(placeholder); + } + + if (axis.direction == "x") { + // to avoid measuring the widths of the labels (it's slow), we + // construct fixed-size boxes and put the labels inside + // them, we don't need the exact figures and the + // fixed-size box content is easy to center + if (w == null) + w = Math.floor(canvasWidth / (ticks.length > 0 ? ticks.length : 1)); + + // measure x label heights + if (h == null) { + labels = []; + for (i = 0; i < ticks.length; ++i) { + l = ticks[i].label; + if (l) + labels.push('
          ' + l + '
          '); + } + + if (labels.length > 0) { + // stick them all in the same div and measure + // collective height + labels.push('
          '); + dummyDiv = makeDummyDiv(labels, "width:10000px;"); + h = dummyDiv.height(); + dummyDiv.remove(); + } + } + } + else if (w == null || h == null) { + // calculate y label dimensions + for (i = 0; i < ticks.length; ++i) { + l = ticks[i].label; + if (l) + labels.push('
          ' + l + '
          '); + } + + if (labels.length > 0) { + dummyDiv = makeDummyDiv(labels, ""); + if (w == null) + w = dummyDiv.children().width(); + if (h == null) + h = dummyDiv.find("div.tickLabel").height(); + dummyDiv.remove(); + } + } + + if (w == null) + w = 0; + if (h == null) + h = 0; + + axis.labelWidth = w; + axis.labelHeight = h; + } + + function allocateAxisBoxFirstPhase(axis) { + // find the bounding box of the axis by looking at label + // widths/heights and ticks, make room by diminishing the + // plotOffset + + var lw = axis.labelWidth, + lh = axis.labelHeight, + pos = axis.options.position, + tickLength = axis.options.tickLength, + axismargin = options.grid.axisMargin, + padding = options.grid.labelMargin, + all = axis.direction == "x" ? xaxes : yaxes, + index; + + // determine axis margin + var samePosition = $.grep(all, function (a) { + return a && a.options.position == pos && a.reserveSpace; + }); + if ($.inArray(axis, samePosition) == samePosition.length - 1) + axismargin = 0; // outermost + + // determine tick length - if we're innermost, we can use "full" + if (tickLength == null) + tickLength = "full"; + + var sameDirection = $.grep(all, function (a) { + return a && a.reserveSpace; + }); + + var innermost = $.inArray(axis, sameDirection) == 0; + if (!innermost && tickLength == "full") + tickLength = 5; + + if (!isNaN(+tickLength)) + padding += +tickLength; + + // compute box + if (axis.direction == "x") { + lh += padding; + + if (pos == "bottom") { + plotOffset.bottom += lh + axismargin; + axis.box = { top: canvasHeight - plotOffset.bottom, height: lh }; + } + else { + axis.box = { top: plotOffset.top + axismargin, height: lh }; + plotOffset.top += lh + axismargin; + } + } + else { + lw += padding; + + if (pos == "left") { + axis.box = { left: plotOffset.left + axismargin, width: lw }; + plotOffset.left += lw + axismargin; + } + else { + plotOffset.right += lw + axismargin; + axis.box = { left: canvasWidth - plotOffset.right, width: lw }; + } + } + + // save for future reference + axis.position = pos; + axis.tickLength = tickLength; + axis.box.padding = padding; + axis.innermost = innermost; + } + + function allocateAxisBoxSecondPhase(axis) { + // set remaining bounding box coordinates + if (axis.direction == "x") { + axis.box.left = plotOffset.left; + axis.box.width = plotWidth; + } + else { + axis.box.top = plotOffset.top; + axis.box.height = plotHeight; + } + } + + function setupGrid() { + var i, axes = allAxes(); + + // first calculate the plot and axis box dimensions + + $.each(axes, function (_, axis) { + axis.show = axis.options.show; + if (axis.show == null) + axis.show = axis.used; // by default an axis is visible if it's got data + + axis.reserveSpace = axis.show || axis.options.reserveSpace; + + setRange(axis); + }); + + allocatedAxes = $.grep(axes, function (axis) { return axis.reserveSpace; }); + + plotOffset.left = plotOffset.right = plotOffset.top = plotOffset.bottom = 0; + if (options.grid.show) { + $.each(allocatedAxes, function (_, axis) { + // make the ticks + setupTickGeneration(axis); + setTicks(axis); + snapRangeToTicks(axis, axis.ticks); + + // find labelWidth/Height for axis + measureTickLabels(axis); + }); + + // with all dimensions in house, we can compute the + // axis boxes, start from the outside (reverse order) + for (i = allocatedAxes.length - 1; i >= 0; --i) + allocateAxisBoxFirstPhase(allocatedAxes[i]); + + // make sure we've got enough space for things that + // might stick out + var minMargin = options.grid.minBorderMargin; + if (minMargin == null) { + minMargin = 0; + for (i = 0; i < series.length; ++i) + minMargin = Math.max(minMargin, series[i].points.radius + series[i].points.lineWidth/2); + } + + for (var a in plotOffset) { + plotOffset[a] += options.grid.borderWidth; + plotOffset[a] = Math.max(minMargin, plotOffset[a]); + } + } + + plotWidth = canvasWidth - plotOffset.left - plotOffset.right; + plotHeight = canvasHeight - plotOffset.bottom - plotOffset.top; + + // now we got the proper plotWidth/Height, we can compute the scaling + $.each(axes, function (_, axis) { + setTransformationHelpers(axis); + }); + + if (options.grid.show) { + $.each(allocatedAxes, function (_, axis) { + allocateAxisBoxSecondPhase(axis); + }); + + insertAxisLabels(); + } + + insertLegend(); + } + + function setRange(axis) { + var opts = axis.options, + min = +(opts.min != null ? opts.min : axis.datamin), + max = +(opts.max != null ? opts.max : axis.datamax), + delta = max - min; + + if (delta == 0.0) { + // degenerate case + var widen = max == 0 ? 1 : 0.01; + + if (opts.min == null) + min -= widen; + // always widen max if we couldn't widen min to ensure we + // don't fall into min == max which doesn't work + if (opts.max == null || opts.min != null) + max += widen; + } + else { + // consider autoscaling + var margin = opts.autoscaleMargin; + if (margin != null) { + if (opts.min == null) { + min -= delta * margin; + // make sure we don't go below zero if all values + // are positive + if (min < 0 && axis.datamin != null && axis.datamin >= 0) + min = 0; + } + if (opts.max == null) { + max += delta * margin; + if (max > 0 && axis.datamax != null && axis.datamax <= 0) + max = 0; + } + } + } + axis.min = min; + axis.max = max; + } + + function setupTickGeneration(axis) { + var opts = axis.options; + + // estimate number of ticks + var noTicks; + if (typeof opts.ticks == "number" && opts.ticks > 0) + noTicks = opts.ticks; + else + // heuristic based on the model a*sqrt(x) fitted to + // some data points that seemed reasonable + noTicks = 0.3 * Math.sqrt(axis.direction == "x" ? canvasWidth : canvasHeight); + + var delta = (axis.max - axis.min) / noTicks, + size, generator, unit, formatter, i, magn, norm; + + if (opts.mode == "time") { + // pretty handling of time + + // map of app. size of time units in milliseconds + var timeUnitSize = { + "second": 1000, + "minute": 60 * 1000, + "hour": 60 * 60 * 1000, + "day": 24 * 60 * 60 * 1000, + "month": 30 * 24 * 60 * 60 * 1000, + "year": 365.2425 * 24 * 60 * 60 * 1000 + }; + + + // the allowed tick sizes, after 1 year we use + // an integer algorithm + var spec = [ + [1, "second"], [2, "second"], [5, "second"], [10, "second"], + [30, "second"], + [1, "minute"], [2, "minute"], [5, "minute"], [10, "minute"], + [30, "minute"], + [1, "hour"], [2, "hour"], [4, "hour"], + [8, "hour"], [12, "hour"], + [1, "day"], [2, "day"], [3, "day"], + [0.25, "month"], [0.5, "month"], [1, "month"], + [2, "month"], [3, "month"], [6, "month"], + [1, "year"] + ]; + + var minSize = 0; + if (opts.minTickSize != null) { + if (typeof opts.tickSize == "number") + minSize = opts.tickSize; + else + minSize = opts.minTickSize[0] * timeUnitSize[opts.minTickSize[1]]; + } + + for (var i = 0; i < spec.length - 1; ++i) + if (delta < (spec[i][0] * timeUnitSize[spec[i][1]] + + spec[i + 1][0] * timeUnitSize[spec[i + 1][1]]) / 2 + && spec[i][0] * timeUnitSize[spec[i][1]] >= minSize) + break; + size = spec[i][0]; + unit = spec[i][1]; + + // special-case the possibility of several years + if (unit == "year") { + magn = Math.pow(10, Math.floor(Math.log(delta / timeUnitSize.year) / Math.LN10)); + norm = (delta / timeUnitSize.year) / magn; + if (norm < 1.5) + size = 1; + else if (norm < 3) + size = 2; + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + } + + axis.tickSize = opts.tickSize || [size, unit]; + + generator = function(axis) { + var ticks = [], + tickSize = axis.tickSize[0], unit = axis.tickSize[1], + d = new Date(axis.min); + + var step = tickSize * timeUnitSize[unit]; + + if (unit == "second") + d.setUTCSeconds(floorInBase(d.getUTCSeconds(), tickSize)); + if (unit == "minute") + d.setUTCMinutes(floorInBase(d.getUTCMinutes(), tickSize)); + if (unit == "hour") + d.setUTCHours(floorInBase(d.getUTCHours(), tickSize)); + if (unit == "month") + d.setUTCMonth(floorInBase(d.getUTCMonth(), tickSize)); + if (unit == "year") + d.setUTCFullYear(floorInBase(d.getUTCFullYear(), tickSize)); + + // reset smaller components + d.setUTCMilliseconds(0); + if (step >= timeUnitSize.minute) + d.setUTCSeconds(0); + if (step >= timeUnitSize.hour) + d.setUTCMinutes(0); + if (step >= timeUnitSize.day) + d.setUTCHours(0); + if (step >= timeUnitSize.day * 4) + d.setUTCDate(1); + if (step >= timeUnitSize.year) + d.setUTCMonth(0); + + + var carry = 0, v = Number.NaN, prev; + do { + prev = v; + v = d.getTime(); + ticks.push(v); + if (unit == "month") { + if (tickSize < 1) { + // a bit complicated - we'll divide the month + // up but we need to take care of fractions + // so we don't end up in the middle of a day + d.setUTCDate(1); + var start = d.getTime(); + d.setUTCMonth(d.getUTCMonth() + 1); + var end = d.getTime(); + d.setTime(v + carry * timeUnitSize.hour + (end - start) * tickSize); + carry = d.getUTCHours(); + d.setUTCHours(0); + } + else + d.setUTCMonth(d.getUTCMonth() + tickSize); + } + else if (unit == "year") { + d.setUTCFullYear(d.getUTCFullYear() + tickSize); + } + else + d.setTime(v + step); + } while (v < axis.max && v != prev); + + return ticks; + }; + + formatter = function (v, axis) { + var d = new Date(v); + + // first check global format + if (opts.timeformat != null) + return $.plot.formatDate(d, opts.timeformat, opts.monthNames); + + var t = axis.tickSize[0] * timeUnitSize[axis.tickSize[1]]; + var span = axis.max - axis.min; + var suffix = (opts.twelveHourClock) ? " %p" : ""; + + if (t < timeUnitSize.minute) + fmt = "%h:%M:%S" + suffix; + else if (t < timeUnitSize.day) { + if (span < 2 * timeUnitSize.day) + fmt = "%h:%M" + suffix; + else + fmt = "%b %d %h:%M" + suffix; + } + else if (t < timeUnitSize.month) + fmt = "%b %d"; + else if (t < timeUnitSize.year) { + if (span < timeUnitSize.year) + fmt = "%b"; + else + fmt = "%b %y"; + } + else + fmt = "%y"; + + return $.plot.formatDate(d, fmt, opts.monthNames); + }; + } + else { + // pretty rounding of base-10 numbers + var maxDec = opts.tickDecimals; + var dec = -Math.floor(Math.log(delta) / Math.LN10); + if (maxDec != null && dec > maxDec) + dec = maxDec; + + magn = Math.pow(10, -dec); + norm = delta / magn; // norm is between 1.0 and 10.0 + + if (norm < 1.5) + size = 1; + else if (norm < 3) { + size = 2; + // special case for 2.5, requires an extra decimal + if (norm > 2.25 && (maxDec == null || dec + 1 <= maxDec)) { + size = 2.5; + ++dec; + } + } + else if (norm < 7.5) + size = 5; + else + size = 10; + + size *= magn; + + if (opts.minTickSize != null && size < opts.minTickSize) + size = opts.minTickSize; + + axis.tickDecimals = Math.max(0, maxDec != null ? maxDec : dec); + axis.tickSize = opts.tickSize || size; + + generator = function (axis) { + var ticks = []; + + // spew out all possible ticks + var start = floorInBase(axis.min, axis.tickSize), + i = 0, v = Number.NaN, prev; + do { + prev = v; + v = start + i * axis.tickSize; + ticks.push(v); + ++i; + } while (v < axis.max && v != prev); + return ticks; + }; + + formatter = function (v, axis) { + return v.toFixed(axis.tickDecimals); + }; + } + + if (opts.alignTicksWithAxis != null) { + var otherAxis = (axis.direction == "x" ? xaxes : yaxes)[opts.alignTicksWithAxis - 1]; + if (otherAxis && otherAxis.used && otherAxis != axis) { + // consider snapping min/max to outermost nice ticks + var niceTicks = generator(axis); + if (niceTicks.length > 0) { + if (opts.min == null) + axis.min = Math.min(axis.min, niceTicks[0]); + if (opts.max == null && niceTicks.length > 1) + axis.max = Math.max(axis.max, niceTicks[niceTicks.length - 1]); + } + + generator = function (axis) { + // copy ticks, scaled to this axis + var ticks = [], v, i; + for (i = 0; i < otherAxis.ticks.length; ++i) { + v = (otherAxis.ticks[i].v - otherAxis.min) / (otherAxis.max - otherAxis.min); + v = axis.min + v * (axis.max - axis.min); + ticks.push(v); + } + return ticks; + }; + + // we might need an extra decimal since forced + // ticks don't necessarily fit naturally + if (axis.mode != "time" && opts.tickDecimals == null) { + var extraDec = Math.max(0, -Math.floor(Math.log(delta) / Math.LN10) + 1), + ts = generator(axis); + + // only proceed if the tick interval rounded + // with an extra decimal doesn't give us a + // zero at end + if (!(ts.length > 1 && /\..*0$/.test((ts[1] - ts[0]).toFixed(extraDec)))) + axis.tickDecimals = extraDec; + } + } + } + + axis.tickGenerator = generator; + if ($.isFunction(opts.tickFormatter)) + axis.tickFormatter = function (v, axis) { return "" + opts.tickFormatter(v, axis); }; + else + axis.tickFormatter = formatter; + } + + function setTicks(axis) { + var oticks = axis.options.ticks, ticks = []; + if (oticks == null || (typeof oticks == "number" && oticks > 0)) + ticks = axis.tickGenerator(axis); + else if (oticks) { + if ($.isFunction(oticks)) + // generate the ticks + ticks = oticks({ min: axis.min, max: axis.max }); + else + ticks = oticks; + } + + // clean up/labelify the supplied ticks, copy them over + var i, v; + axis.ticks = []; + for (i = 0; i < ticks.length; ++i) { + var label = null; + var t = ticks[i]; + if (typeof t == "object") { + v = +t[0]; + if (t.length > 1) + label = t[1]; + } + else + v = +t; + if (label == null) + label = axis.tickFormatter(v, axis); + if (!isNaN(v)) + axis.ticks.push({ v: v, label: label }); + } + } + + function snapRangeToTicks(axis, ticks) { + if (axis.options.autoscaleMargin && ticks.length > 0) { + // snap to ticks + if (axis.options.min == null) + axis.min = Math.min(axis.min, ticks[0].v); + if (axis.options.max == null && ticks.length > 1) + axis.max = Math.max(axis.max, ticks[ticks.length - 1].v); + } + } + + function draw() { + ctx.clearRect(0, 0, canvasWidth, canvasHeight); + + var grid = options.grid; + + // draw background, if any + if (grid.show && grid.backgroundColor) + drawBackground(); + + if (grid.show && !grid.aboveData) + drawGrid(); + + for (var i = 0; i < series.length; ++i) { + executeHooks(hooks.drawSeries, [ctx, series[i]]); + drawSeries(series[i]); + } + + executeHooks(hooks.draw, [ctx]); + + if (grid.show && grid.aboveData) + drawGrid(); + } + + function extractRange(ranges, coord) { + var axis, from, to, key, axes = allAxes(); + + for (i = 0; i < axes.length; ++i) { + axis = axes[i]; + if (axis.direction == coord) { + key = coord + axis.n + "axis"; + if (!ranges[key] && axis.n == 1) + key = coord + "axis"; // support x1axis as xaxis + if (ranges[key]) { + from = ranges[key].from; + to = ranges[key].to; + break; + } + } + } + + // backwards-compat stuff - to be removed in future + if (!ranges[key]) { + axis = coord == "x" ? xaxes[0] : yaxes[0]; + from = ranges[coord + "1"]; + to = ranges[coord + "2"]; + } + + // auto-reverse as an added bonus + if (from != null && to != null && from > to) { + var tmp = from; + from = to; + to = tmp; + } + + return { from: from, to: to, axis: axis }; + } + + function drawBackground() { + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + ctx.fillStyle = getColorOrGradient(options.grid.backgroundColor, plotHeight, 0, "rgba(255, 255, 255, 0)"); + ctx.fillRect(0, 0, plotWidth, plotHeight); + ctx.restore(); + } + + function drawGrid() { + var i; + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + // draw markings + var markings = options.grid.markings; + if (markings) { + if ($.isFunction(markings)) { + var axes = plot.getAxes(); + // xmin etc. is backwards compatibility, to be + // removed in the future + axes.xmin = axes.xaxis.min; + axes.xmax = axes.xaxis.max; + axes.ymin = axes.yaxis.min; + axes.ymax = axes.yaxis.max; + + markings = markings(axes); + } + + for (i = 0; i < markings.length; ++i) { + var m = markings[i], + xrange = extractRange(m, "x"), + yrange = extractRange(m, "y"); + + // fill in missing + if (xrange.from == null) + xrange.from = xrange.axis.min; + if (xrange.to == null) + xrange.to = xrange.axis.max; + if (yrange.from == null) + yrange.from = yrange.axis.min; + if (yrange.to == null) + yrange.to = yrange.axis.max; + + // clip + if (xrange.to < xrange.axis.min || xrange.from > xrange.axis.max || + yrange.to < yrange.axis.min || yrange.from > yrange.axis.max) + continue; + + xrange.from = Math.max(xrange.from, xrange.axis.min); + xrange.to = Math.min(xrange.to, xrange.axis.max); + yrange.from = Math.max(yrange.from, yrange.axis.min); + yrange.to = Math.min(yrange.to, yrange.axis.max); + + if (xrange.from == xrange.to && yrange.from == yrange.to) + continue; + + // then draw + xrange.from = xrange.axis.p2c(xrange.from); + xrange.to = xrange.axis.p2c(xrange.to); + yrange.from = yrange.axis.p2c(yrange.from); + yrange.to = yrange.axis.p2c(yrange.to); + + if (xrange.from == xrange.to || yrange.from == yrange.to) { + // draw line + ctx.beginPath(); + ctx.strokeStyle = m.color || options.grid.markingsColor; + ctx.lineWidth = m.lineWidth || options.grid.markingsLineWidth; + ctx.moveTo(xrange.from, yrange.from); + ctx.lineTo(xrange.to, yrange.to); + ctx.stroke(); + } + else { + // fill area + ctx.fillStyle = m.color || options.grid.markingsColor; + ctx.fillRect(xrange.from, yrange.to, + xrange.to - xrange.from, + yrange.from - yrange.to); + } + } + } + + // draw the ticks + var axes = allAxes(), bw = options.grid.borderWidth; + + for (var j = 0; j < axes.length; ++j) { + var axis = axes[j], box = axis.box, + t = axis.tickLength, x, y, xoff, yoff; + if (!axis.show || axis.ticks.length == 0) + continue + + ctx.strokeStyle = axis.options.tickColor || $.color.parse(axis.options.color).scale('a', 0.22).toString(); + ctx.lineWidth = 1; + + // find the edges + if (axis.direction == "x") { + x = 0; + if (t == "full") + y = (axis.position == "top" ? 0 : plotHeight); + else + y = box.top - plotOffset.top + (axis.position == "top" ? box.height : 0); + } + else { + y = 0; + if (t == "full") + x = (axis.position == "left" ? 0 : plotWidth); + else + x = box.left - plotOffset.left + (axis.position == "left" ? box.width : 0); + } + + // draw tick bar + if (!axis.innermost) { + ctx.beginPath(); + xoff = yoff = 0; + if (axis.direction == "x") + xoff = plotWidth; + else + yoff = plotHeight; + + if (ctx.lineWidth == 1) { + x = Math.floor(x) + 0.5; + y = Math.floor(y) + 0.5; + } + + ctx.moveTo(x, y); + ctx.lineTo(x + xoff, y + yoff); + ctx.stroke(); + } + + // draw ticks + ctx.beginPath(); + for (i = 0; i < axis.ticks.length; ++i) { + var v = axis.ticks[i].v; + + xoff = yoff = 0; + + if (v < axis.min || v > axis.max + // skip those lying on the axes if we got a border + || (t == "full" && bw > 0 + && (v == axis.min || v == axis.max))) + continue; + + if (axis.direction == "x") { + x = axis.p2c(v); + yoff = t == "full" ? -plotHeight : t; + + if (axis.position == "top") + yoff = -yoff; + } + else { + y = axis.p2c(v); + xoff = t == "full" ? -plotWidth : t; + + if (axis.position == "left") + xoff = -xoff; + } + + if (ctx.lineWidth == 1) { + if (axis.direction == "x") + x = Math.floor(x) + 0.5; + else + y = Math.floor(y) + 0.5; + } + + ctx.moveTo(x, y); + ctx.lineTo(x + xoff, y + yoff); + } + + ctx.stroke(); + } + + + // draw border + if (bw) { + ctx.lineWidth = bw; + ctx.strokeStyle = options.grid.borderColor; + ctx.strokeRect(-bw/2, -bw/2, plotWidth + bw, plotHeight + bw); + } + + ctx.restore(); + } + + function insertAxisLabels() { + placeholder.find(".tickLabels").remove(); + + var html = ['
          ']; + + var axes = allAxes(); + for (var j = 0; j < axes.length; ++j) { + var axis = axes[j], box = axis.box; + if (!axis.show) + continue; + //debug: html.push('
          ') + html.push('
          '); + for (var i = 0; i < axis.ticks.length; ++i) { + var tick = axis.ticks[i]; + if (!tick.label || tick.v < axis.min || tick.v > axis.max) + continue; + + var pos = {}, align; + + if (axis.direction == "x") { + align = "center"; + pos.left = Math.round(plotOffset.left + axis.p2c(tick.v) - axis.labelWidth/2); + if (axis.position == "bottom") + pos.top = box.top + box.padding; + else + pos.bottom = canvasHeight - (box.top + box.height - box.padding); + } + else { + pos.top = Math.round(plotOffset.top + axis.p2c(tick.v) - axis.labelHeight/2); + if (axis.position == "left") { + pos.right = canvasWidth - (box.left + box.width - box.padding) + align = "right"; + } + else { + pos.left = box.left + box.padding; + align = "left"; + } + } + + pos.width = axis.labelWidth; + + var style = ["position:absolute", "text-align:" + align ]; + for (var a in pos) + style.push(a + ":" + pos[a] + "px") + + html.push('
          ' + tick.label + '
          '); + } + html.push('
          '); + } + + html.push('
          '); + + placeholder.append(html.join("")); + } + + function drawSeries(series) { + if (series.lines.show) + drawSeriesLines(series); + if (series.bars.show) + drawSeriesBars(series); + if (series.points.show) + drawSeriesPoints(series); + } + + function drawSeriesLines(series) { + function plotLine(datapoints, xoffset, yoffset, axisx, axisy) { + var points = datapoints.points, + ps = datapoints.pointsize, + prevx = null, prevy = null; + + ctx.beginPath(); + for (var i = ps; i < points.length; i += ps) { + var x1 = points[i - ps], y1 = points[i - ps + 1], + x2 = points[i], y2 = points[i + 1]; + + if (x1 == null || x2 == null) + continue; + + // clip with ymin + if (y1 <= y2 && y1 < axisy.min) { + if (y2 < axisy.min) + continue; // line segment is outside + // compute new intersection point + x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.min; + } + else if (y2 <= y1 && y2 < axisy.min) { + if (y1 < axisy.min) + continue; + x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > axisy.max) { + if (y2 > axisy.max) + continue; + x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.max; + } + else if (y2 >= y1 && y2 > axisy.max) { + if (y1 > axisy.max) + continue; + x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.max; + } + + // clip with xmin + if (x1 <= x2 && x1 < axisx.min) { + if (x2 < axisx.min) + continue; + y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.min; + } + else if (x2 <= x1 && x2 < axisx.min) { + if (x1 < axisx.min) + continue; + y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > axisx.max) { + if (x2 > axisx.max) + continue; + y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.max; + } + else if (x2 >= x1 && x2 > axisx.max) { + if (x1 > axisx.max) + continue; + y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.max; + } + + if (x1 != prevx || y1 != prevy) + ctx.moveTo(axisx.p2c(x1) + xoffset, axisy.p2c(y1) + yoffset); + + prevx = x2; + prevy = y2; + ctx.lineTo(axisx.p2c(x2) + xoffset, axisy.p2c(y2) + yoffset); + } + ctx.stroke(); + } + + function plotLineArea(datapoints, axisx, axisy) { + var points = datapoints.points, + ps = datapoints.pointsize, + bottom = Math.min(Math.max(0, axisy.min), axisy.max), + i = 0, top, areaOpen = false, + ypos = 1, segmentStart = 0, segmentEnd = 0; + + // we process each segment in two turns, first forward + // direction to sketch out top, then once we hit the + // end we go backwards to sketch the bottom + while (true) { + if (ps > 0 && i > points.length + ps) + break; + + i += ps; // ps is negative if going backwards + + var x1 = points[i - ps], + y1 = points[i - ps + ypos], + x2 = points[i], y2 = points[i + ypos]; + + if (areaOpen) { + if (ps > 0 && x1 != null && x2 == null) { + // at turning point + segmentEnd = i; + ps = -ps; + ypos = 2; + continue; + } + + if (ps < 0 && i == segmentStart + ps) { + // done with the reverse sweep + ctx.fill(); + areaOpen = false; + ps = -ps; + ypos = 1; + i = segmentStart = segmentEnd + ps; + continue; + } + } + + if (x1 == null || x2 == null) + continue; + + // clip x values + + // clip with xmin + if (x1 <= x2 && x1 < axisx.min) { + if (x2 < axisx.min) + continue; + y1 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.min; + } + else if (x2 <= x1 && x2 < axisx.min) { + if (x1 < axisx.min) + continue; + y2 = (axisx.min - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.min; + } + + // clip with xmax + if (x1 >= x2 && x1 > axisx.max) { + if (x2 > axisx.max) + continue; + y1 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x1 = axisx.max; + } + else if (x2 >= x1 && x2 > axisx.max) { + if (x1 > axisx.max) + continue; + y2 = (axisx.max - x1) / (x2 - x1) * (y2 - y1) + y1; + x2 = axisx.max; + } + + if (!areaOpen) { + // open area + ctx.beginPath(); + ctx.moveTo(axisx.p2c(x1), axisy.p2c(bottom)); + areaOpen = true; + } + + // now first check the case where both is outside + if (y1 >= axisy.max && y2 >= axisy.max) { + ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.max)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.max)); + continue; + } + else if (y1 <= axisy.min && y2 <= axisy.min) { + ctx.lineTo(axisx.p2c(x1), axisy.p2c(axisy.min)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(axisy.min)); + continue; + } + + // else it's a bit more complicated, there might + // be a flat maxed out rectangle first, then a + // triangular cutout or reverse; to find these + // keep track of the current x values + var x1old = x1, x2old = x2; + + // clip the y values, without shortcutting, we + // go through all cases in turn + + // clip with ymin + if (y1 <= y2 && y1 < axisy.min && y2 >= axisy.min) { + x1 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.min; + } + else if (y2 <= y1 && y2 < axisy.min && y1 >= axisy.min) { + x2 = (axisy.min - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.min; + } + + // clip with ymax + if (y1 >= y2 && y1 > axisy.max && y2 <= axisy.max) { + x1 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y1 = axisy.max; + } + else if (y2 >= y1 && y2 > axisy.max && y1 <= axisy.max) { + x2 = (axisy.max - y1) / (y2 - y1) * (x2 - x1) + x1; + y2 = axisy.max; + } + + // if the x value was changed we got a rectangle + // to fill + if (x1 != x1old) { + ctx.lineTo(axisx.p2c(x1old), axisy.p2c(y1)); + // it goes to (x1, y1), but we fill that below + } + + // fill triangular section, this sometimes result + // in redundant points if (x1, y1) hasn't changed + // from previous line to, but we just ignore that + ctx.lineTo(axisx.p2c(x1), axisy.p2c(y1)); + ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); + + // fill the other rectangle if it's there + if (x2 != x2old) { + ctx.lineTo(axisx.p2c(x2), axisy.p2c(y2)); + ctx.lineTo(axisx.p2c(x2old), axisy.p2c(y2)); + } + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + ctx.lineJoin = "round"; + + var lw = series.lines.lineWidth, + sw = series.shadowSize; + // FIXME: consider another form of shadow when filling is turned on + if (lw > 0 && sw > 0) { + // draw shadow as a thick and thin line with transparency + ctx.lineWidth = sw; + ctx.strokeStyle = "rgba(0,0,0,0.1)"; + // position shadow at angle from the mid of line + var angle = Math.PI/18; + plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/2), Math.cos(angle) * (lw/2 + sw/2), series.xaxis, series.yaxis); + ctx.lineWidth = sw/2; + plotLine(series.datapoints, Math.sin(angle) * (lw/2 + sw/4), Math.cos(angle) * (lw/2 + sw/4), series.xaxis, series.yaxis); + } + + ctx.lineWidth = lw; + ctx.strokeStyle = series.color; + var fillStyle = getFillStyle(series.lines, series.color, 0, plotHeight); + if (fillStyle) { + ctx.fillStyle = fillStyle; + plotLineArea(series.datapoints, series.xaxis, series.yaxis); + } + + if (lw > 0) + plotLine(series.datapoints, 0, 0, series.xaxis, series.yaxis); + ctx.restore(); + } + + function drawSeriesPoints(series) { + function plotPoints(datapoints, radius, fillStyle, offset, shadow, axisx, axisy, symbol) { + var points = datapoints.points, ps = datapoints.pointsize; + + for (var i = 0; i < points.length; i += ps) { + var x = points[i], y = points[i + 1]; + if (x == null || x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) + continue; + + ctx.beginPath(); + x = axisx.p2c(x); + y = axisy.p2c(y) + offset; + if (symbol == "circle") + ctx.arc(x, y, radius, 0, shadow ? Math.PI : Math.PI * 2, false); + else + symbol(ctx, x, y, radius, shadow); + ctx.closePath(); + + if (fillStyle) { + ctx.fillStyle = fillStyle; + ctx.fill(); + } + ctx.stroke(); + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + var lw = series.points.lineWidth, + sw = series.shadowSize, + radius = series.points.radius, + symbol = series.points.symbol; + if (lw > 0 && sw > 0) { + // draw shadow in two steps + var w = sw / 2; + ctx.lineWidth = w; + ctx.strokeStyle = "rgba(0,0,0,0.1)"; + plotPoints(series.datapoints, radius, null, w + w/2, true, + series.xaxis, series.yaxis, symbol); + + ctx.strokeStyle = "rgba(0,0,0,0.2)"; + plotPoints(series.datapoints, radius, null, w/2, true, + series.xaxis, series.yaxis, symbol); + } + + ctx.lineWidth = lw; + ctx.strokeStyle = series.color; + plotPoints(series.datapoints, radius, + getFillStyle(series.points, series.color), 0, false, + series.xaxis, series.yaxis, symbol); + ctx.restore(); + } + + function drawBar(x, y, b, barLeft, barRight, offset, fillStyleCallback, axisx, axisy, c, horizontal, lineWidth) { + var left, right, bottom, top, + drawLeft, drawRight, drawTop, drawBottom, + tmp; + + // in horizontal mode, we start the bar from the left + // instead of from the bottom so it appears to be + // horizontal rather than vertical + if (horizontal) { + drawBottom = drawRight = drawTop = true; + drawLeft = false; + left = b; + right = x; + top = y + barLeft; + bottom = y + barRight; + + // account for negative bars + if (right < left) { + tmp = right; + right = left; + left = tmp; + drawLeft = true; + drawRight = false; + } + } + else { + drawLeft = drawRight = drawTop = true; + drawBottom = false; + left = x + barLeft; + right = x + barRight; + bottom = b; + top = y; + + // account for negative bars + if (top < bottom) { + tmp = top; + top = bottom; + bottom = tmp; + drawBottom = true; + drawTop = false; + } + } + + // clip + if (right < axisx.min || left > axisx.max || + top < axisy.min || bottom > axisy.max) + return; + + if (left < axisx.min) { + left = axisx.min; + drawLeft = false; + } + + if (right > axisx.max) { + right = axisx.max; + drawRight = false; + } + + if (bottom < axisy.min) { + bottom = axisy.min; + drawBottom = false; + } + + if (top > axisy.max) { + top = axisy.max; + drawTop = false; + } + + left = axisx.p2c(left); + bottom = axisy.p2c(bottom); + right = axisx.p2c(right); + top = axisy.p2c(top); + + // fill the bar + if (fillStyleCallback) { + c.beginPath(); + c.moveTo(left, bottom); + c.lineTo(left, top); + c.lineTo(right, top); + c.lineTo(right, bottom); + c.fillStyle = fillStyleCallback(bottom, top); + c.fill(); + } + + // draw outline + if (lineWidth > 0 && (drawLeft || drawRight || drawTop || drawBottom)) { + c.beginPath(); + + // FIXME: inline moveTo is buggy with excanvas + c.moveTo(left, bottom + offset); + if (drawLeft) + c.lineTo(left, top + offset); + else + c.moveTo(left, top + offset); + if (drawTop) + c.lineTo(right, top + offset); + else + c.moveTo(right, top + offset); + if (drawRight) + c.lineTo(right, bottom + offset); + else + c.moveTo(right, bottom + offset); + if (drawBottom) + c.lineTo(left, bottom + offset); + else + c.moveTo(left, bottom + offset); + c.stroke(); + } + } + + function drawSeriesBars(series) { + function plotBars(datapoints, barLeft, barRight, offset, fillStyleCallback, axisx, axisy) { + var points = datapoints.points, ps = datapoints.pointsize; + + for (var i = 0; i < points.length; i += ps) { + if (points[i] == null) + continue; + drawBar(points[i], points[i + 1], points[i + 2], barLeft, barRight, offset, fillStyleCallback, axisx, axisy, ctx, series.bars.horizontal, series.bars.lineWidth); + } + } + + ctx.save(); + ctx.translate(plotOffset.left, plotOffset.top); + + // FIXME: figure out a way to add shadows (for instance along the right edge) + ctx.lineWidth = series.bars.lineWidth; + ctx.strokeStyle = series.color; + var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2; + var fillStyleCallback = series.bars.fill ? function (bottom, top) { return getFillStyle(series.bars, series.color, bottom, top); } : null; + plotBars(series.datapoints, barLeft, barLeft + series.bars.barWidth, 0, fillStyleCallback, series.xaxis, series.yaxis); + ctx.restore(); + } + + function getFillStyle(filloptions, seriesColor, bottom, top) { + var fill = filloptions.fill; + if (!fill) + return null; + + if (filloptions.fillColor) + return getColorOrGradient(filloptions.fillColor, bottom, top, seriesColor); + + var c = $.color.parse(seriesColor); + c.a = typeof fill == "number" ? fill : 0.4; + c.normalize(); + return c.toString(); + } + + function insertLegend() { + placeholder.find(".legend").remove(); + + if (!options.legend.show) + return; + + var fragments = [], rowStarted = false, + lf = options.legend.labelFormatter, s, label; + for (var i = 0; i < series.length; ++i) { + s = series[i]; + label = s.label; + if (!label) + continue; + + if (i % options.legend.noColumns == 0) { + if (rowStarted) + fragments.push(''); + fragments.push(''); + rowStarted = true; + } + + if (lf) + label = lf(label, s); + + fragments.push( + '
          ' + + '' + label + ''); + } + if (rowStarted) + fragments.push(''); + + if (fragments.length == 0) + return; + + var table = '' + fragments.join("") + '
          '; + if (options.legend.container != null) + $(options.legend.container).html(table); + else { + var pos = "", + p = options.legend.position, + m = options.legend.margin; + if (m[0] == null) + m = [m, m]; + if (p.charAt(0) == "n") + pos += 'top:' + (m[1] + plotOffset.top) + 'px;'; + else if (p.charAt(0) == "s") + pos += 'bottom:' + (m[1] + plotOffset.bottom) + 'px;'; + if (p.charAt(1) == "e") + pos += 'right:' + (m[0] + plotOffset.right) + 'px;'; + else if (p.charAt(1) == "w") + pos += 'left:' + (m[0] + plotOffset.left) + 'px;'; + var legend = $('
          ' + table.replace('style="', 'style="position:absolute;' + pos +';') + '
          ').appendTo(placeholder); + if (options.legend.backgroundOpacity != 0.0) { + // put in the transparent background + // separately to avoid blended labels and + // label boxes + var c = options.legend.backgroundColor; + if (c == null) { + c = options.grid.backgroundColor; + if (c && typeof c == "string") + c = $.color.parse(c); + else + c = $.color.extract(legend, 'background-color'); + c.a = 1; + c = c.toString(); + } + var div = legend.children(); + $('
          ').prependTo(legend).css('opacity', options.legend.backgroundOpacity); + } + } + } + + + // interactive features + + var highlights = [], + redrawTimeout = null; + + // returns the data item the mouse is over, or null if none is found + function findNearbyItem(mouseX, mouseY, seriesFilter) { + var maxDistance = options.grid.mouseActiveRadius, + smallestDistance = maxDistance * maxDistance + 1, + item = null, foundPoint = false, i, j; + + for (i = series.length - 1; i >= 0; --i) { + if (!seriesFilter(series[i])) + continue; + + var s = series[i], + axisx = s.xaxis, + axisy = s.yaxis, + points = s.datapoints.points, + ps = s.datapoints.pointsize, + mx = axisx.c2p(mouseX), // precompute some stuff to make the loop faster + my = axisy.c2p(mouseY), + maxx = maxDistance / axisx.scale, + maxy = maxDistance / axisy.scale; + + // with inverse transforms, we can't use the maxx/maxy + // optimization, sadly + if (axisx.options.inverseTransform) + maxx = Number.MAX_VALUE; + if (axisy.options.inverseTransform) + maxy = Number.MAX_VALUE; + + if (s.lines.show || s.points.show) { + for (j = 0; j < points.length; j += ps) { + var x = points[j], y = points[j + 1]; + if (x == null) + continue; + + // For points and lines, the cursor must be within a + // certain distance to the data point + if (x - mx > maxx || x - mx < -maxx || + y - my > maxy || y - my < -maxy) + continue; + + // We have to calculate distances in pixels, not in + // data units, because the scales of the axes may be different + var dx = Math.abs(axisx.p2c(x) - mouseX), + dy = Math.abs(axisy.p2c(y) - mouseY), + dist = dx * dx + dy * dy; // we save the sqrt + + // use <= to ensure last point takes precedence + // (last generally means on top of) + if (dist < smallestDistance) { + smallestDistance = dist; + item = [i, j / ps]; + } + } + } + + if (s.bars.show && !item) { // no other point can be nearby + var barLeft = s.bars.align == "left" ? 0 : -s.bars.barWidth/2, + barRight = barLeft + s.bars.barWidth; + + for (j = 0; j < points.length; j += ps) { + var x = points[j], y = points[j + 1], b = points[j + 2]; + if (x == null) + continue; + + // for a bar graph, the cursor must be inside the bar + if (series[i].bars.horizontal ? + (mx <= Math.max(b, x) && mx >= Math.min(b, x) && + my >= y + barLeft && my <= y + barRight) : + (mx >= x + barLeft && mx <= x + barRight && + my >= Math.min(b, y) && my <= Math.max(b, y))) + item = [i, j / ps]; + } + } + } + + if (item) { + i = item[0]; + j = item[1]; + ps = series[i].datapoints.pointsize; + + return { datapoint: series[i].datapoints.points.slice(j * ps, (j + 1) * ps), + dataIndex: j, + series: series[i], + seriesIndex: i }; + } + + return null; + } + + function onMouseMove(e) { + if (options.grid.hoverable) + triggerClickHoverEvent("plothover", e, + function (s) { return s["hoverable"] != false; }); + } + + function onMouseLeave(e) { + if (options.grid.hoverable) + triggerClickHoverEvent("plothover", e, + function (s) { return false; }); + } + + function onClick(e) { + triggerClickHoverEvent("plotclick", e, + function (s) { return s["clickable"] != false; }); + } + + // trigger click or hover event (they send the same parameters + // so we share their code) + function triggerClickHoverEvent(eventname, event, seriesFilter) { + var offset = eventHolder.offset(), + canvasX = event.pageX - offset.left - plotOffset.left, + canvasY = event.pageY - offset.top - plotOffset.top, + pos = canvasToAxisCoords({ left: canvasX, top: canvasY }); + + pos.pageX = event.pageX; + pos.pageY = event.pageY; + + var item = findNearbyItem(canvasX, canvasY, seriesFilter); + + if (item) { + // fill in mouse pos for any listeners out there + item.pageX = parseInt(item.series.xaxis.p2c(item.datapoint[0]) + offset.left + plotOffset.left); + item.pageY = parseInt(item.series.yaxis.p2c(item.datapoint[1]) + offset.top + plotOffset.top); + } + + if (options.grid.autoHighlight) { + // clear auto-highlights + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.auto == eventname && + !(item && h.series == item.series && + h.point[0] == item.datapoint[0] && + h.point[1] == item.datapoint[1])) + unhighlight(h.series, h.point); + } + + if (item) + highlight(item.series, item.datapoint, eventname); + } + + placeholder.trigger(eventname, [ pos, item ]); + } + + function triggerRedrawOverlay() { + if (!redrawTimeout) + redrawTimeout = setTimeout(drawOverlay, 30); + } + + function drawOverlay() { + redrawTimeout = null; + + // draw highlights + octx.save(); + octx.clearRect(0, 0, canvasWidth, canvasHeight); + octx.translate(plotOffset.left, plotOffset.top); + + var i, hi; + for (i = 0; i < highlights.length; ++i) { + hi = highlights[i]; + + if (hi.series.bars.show) + drawBarHighlight(hi.series, hi.point); + else + drawPointHighlight(hi.series, hi.point); + } + octx.restore(); + + executeHooks(hooks.drawOverlay, [octx]); + } + + function highlight(s, point, auto) { + if (typeof s == "number") + s = series[s]; + + if (typeof point == "number") { + var ps = s.datapoints.pointsize; + point = s.datapoints.points.slice(ps * point, ps * (point + 1)); + } + + var i = indexOfHighlight(s, point); + if (i == -1) { + highlights.push({ series: s, point: point, auto: auto }); + + triggerRedrawOverlay(); + } + else if (!auto) + highlights[i].auto = false; + } + + function unhighlight(s, point) { + if (s == null && point == null) { + highlights = []; + triggerRedrawOverlay(); + } + + if (typeof s == "number") + s = series[s]; + + if (typeof point == "number") + point = s.data[point]; + + var i = indexOfHighlight(s, point); + if (i != -1) { + highlights.splice(i, 1); + + triggerRedrawOverlay(); + } + } + + function indexOfHighlight(s, p) { + for (var i = 0; i < highlights.length; ++i) { + var h = highlights[i]; + if (h.series == s && h.point[0] == p[0] + && h.point[1] == p[1]) + return i; + } + return -1; + } + + function drawPointHighlight(series, point) { + var x = point[0], y = point[1], + axisx = series.xaxis, axisy = series.yaxis; + + if (x < axisx.min || x > axisx.max || y < axisy.min || y > axisy.max) + return; + + var pointRadius = series.points.radius + series.points.lineWidth / 2; + octx.lineWidth = pointRadius; + octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var radius = 1.5 * pointRadius, + x = axisx.p2c(x), + y = axisy.p2c(y); + + octx.beginPath(); + if (series.points.symbol == "circle") + octx.arc(x, y, radius, 0, 2 * Math.PI, false); + else + series.points.symbol(octx, x, y, radius, false); + octx.closePath(); + octx.stroke(); + } + + function drawBarHighlight(series, point) { + octx.lineWidth = series.bars.lineWidth; + octx.strokeStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var fillStyle = $.color.parse(series.color).scale('a', 0.5).toString(); + var barLeft = series.bars.align == "left" ? 0 : -series.bars.barWidth/2; + drawBar(point[0], point[1], point[2] || 0, barLeft, barLeft + series.bars.barWidth, + 0, function () { return fillStyle; }, series.xaxis, series.yaxis, octx, series.bars.horizontal, series.bars.lineWidth); + } + + function getColorOrGradient(spec, bottom, top, defaultColor) { + if (typeof spec == "string") + return spec; + else { + // assume this is a gradient spec; IE currently only + // supports a simple vertical gradient properly, so that's + // what we support too + var gradient = ctx.createLinearGradient(0, top, 0, bottom); + + for (var i = 0, l = spec.colors.length; i < l; ++i) { + var c = spec.colors[i]; + if (typeof c != "string") { + var co = $.color.parse(defaultColor); + if (c.brightness != null) + co = co.scale('rgb', c.brightness) + if (c.opacity != null) + co.a *= c.opacity; + c = co.toString(); + } + gradient.addColorStop(i / (l - 1), c); + } + + return gradient; + } + } + } + + $.plot = function(placeholder, data, options) { + //var t0 = new Date(); + var plot = new Plot($(placeholder), data, options, $.plot.plugins); + //(window.console ? console.log : alert)("time used (msecs): " + ((new Date()).getTime() - t0.getTime())); + return plot; + }; + + $.plot.version = "0.7"; + + $.plot.plugins = []; + + // returns a string with the date d formatted according to fmt + $.plot.formatDate = function(d, fmt, monthNames) { + var leftPad = function(n) { + n = "" + n; + return n.length == 1 ? "0" + n : n; + }; + + var r = []; + var escape = false, padNext = false; + var hours = d.getUTCHours(); + var isAM = hours < 12; + if (monthNames == null) + monthNames = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]; + + if (fmt.search(/%p|%P/) != -1) { + if (hours > 12) { + hours = hours - 12; + } else if (hours == 0) { + hours = 12; + } + } + for (var i = 0; i < fmt.length; ++i) { + var c = fmt.charAt(i); + + if (escape) { + switch (c) { + case 'h': c = "" + hours; break; + case 'H': c = leftPad(hours); break; + case 'M': c = leftPad(d.getUTCMinutes()); break; + case 'S': c = leftPad(d.getUTCSeconds()); break; + case 'd': c = "" + d.getUTCDate(); break; + case 'm': c = "" + (d.getUTCMonth() + 1); break; + case 'y': c = "" + d.getUTCFullYear(); break; + case 'b': c = "" + monthNames[d.getUTCMonth()]; break; + case 'p': c = (isAM) ? ("" + "am") : ("" + "pm"); break; + case 'P': c = (isAM) ? ("" + "AM") : ("" + "PM"); break; + case '0': c = ""; padNext = true; break; + } + if (c && padNext) { + c = leftPad(c); + padNext = false; + } + r.push(c); + if (!padNext) + escape = false; + } + else { + if (c == "%") + escape = true; + else + r.push(c); + } + } + return r.join(""); + }; + + // round to nearby lower multiple of base + function floorInBase(n, base) { + return base * Math.floor(n / base); + } + +})(jQuery); diff --git a/src/bb-themes/admin_default/js/flot/jquery.flot.pie.js b/src/bb-themes/admin_default/js/flot/jquery.flot.pie.js new file mode 100644 index 000000000..b46c03c27 --- /dev/null +++ b/src/bb-themes/admin_default/js/flot/jquery.flot.pie.js @@ -0,0 +1,750 @@ +/* +Flot plugin for rendering pie charts. The plugin assumes the data is +coming is as a single data value for each series, and each of those +values is a positive value or zero (negative numbers don't make +any sense and will cause strange effects). The data values do +NOT need to be passed in as percentage values because it +internally calculates the total and percentages. + +* Created by Brian Medendorp, June 2009 +* Updated November 2009 with contributions from: btburnett3, Anthony Aragues and Xavi Ivars + +* Changes: + 2009-10-22: lineJoin set to round + 2009-10-23: IE full circle fix, donut + 2009-11-11: Added basic hover from btburnett3 - does not work in IE, and center is off in Chrome and Opera + 2009-11-17: Added IE hover capability submitted by Anthony Aragues + 2009-11-18: Added bug fix submitted by Xavi Ivars (issues with arrays when other JS libraries are included as well) + + +Available options are: +series: { + pie: { + show: true/false + radius: 0-1 for percentage of fullsize, or a specified pixel length, or 'auto' + innerRadius: 0-1 for percentage of fullsize or a specified pixel length, for creating a donut effect + startAngle: 0-2 factor of PI used for starting angle (in radians) i.e 3/2 starts at the top, 0 and 2 have the same result + tilt: 0-1 for percentage to tilt the pie, where 1 is no tilt, and 0 is completely flat (nothing will show) + offset: { + top: integer value to move the pie up or down + left: integer value to move the pie left or right, or 'auto' + }, + stroke: { + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#FFF') + width: integer pixel width of the stroke + }, + label: { + show: true/false, or 'auto' + formatter: a user-defined function that modifies the text/style of the label text + radius: 0-1 for percentage of fullsize, or a specified pixel length + background: { + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#000') + opacity: 0-1 + }, + threshold: 0-1 for the percentage value at which to hide labels (if they're too small) + }, + combine: { + threshold: 0-1 for the percentage value at which to combine slices (if they're too small) + color: any hexidecimal color value (other formats may or may not work, so best to stick with something like '#CCC'), if null, the plugin will automatically use the color of the first slice to be combined + label: any text value of what the combined slice should be labeled + } + highlight: { + opacity: 0-1 + } + } +} + +More detail and specific examples can be found in the included HTML file. + +*/ + +(function ($) +{ + function init(plot) // this is the "body" of the plugin + { + var canvas = null; + var target = null; + var maxRadius = null; + var centerLeft = null; + var centerTop = null; + var total = 0; + var redraw = true; + var redrawAttempts = 10; + var shrink = 0.95; + var legendWidth = 0; + var processed = false; + var raw = false; + + // interactive variables + var highlights = []; + + // add hook to determine if pie plugin in enabled, and then perform necessary operations + plot.hooks.processOptions.push(checkPieEnabled); + plot.hooks.bindEvents.push(bindEvents); + + // check to see if the pie plugin is enabled + function checkPieEnabled(plot, options) + { + if (options.series.pie.show) + { + //disable grid + options.grid.show = false; + + // set labels.show + if (options.series.pie.label.show=='auto') + if (options.legend.show) + options.series.pie.label.show = false; + else + options.series.pie.label.show = true; + + // set radius + if (options.series.pie.radius=='auto') + if (options.series.pie.label.show) + options.series.pie.radius = 3/4; + else + options.series.pie.radius = 1; + + // ensure sane tilt + if (options.series.pie.tilt>1) + options.series.pie.tilt=1; + if (options.series.pie.tilt<0) + options.series.pie.tilt=0; + + // add processData hook to do transformations on the data + plot.hooks.processDatapoints.push(processDatapoints); + plot.hooks.drawOverlay.push(drawOverlay); + + // add draw hook + plot.hooks.draw.push(draw); + } + } + + // bind hoverable events + function bindEvents(plot, eventHolder) + { + var options = plot.getOptions(); + + if (options.series.pie.show && options.grid.hoverable) + eventHolder.unbind('mousemove').mousemove(onMouseMove); + + if (options.series.pie.show && options.grid.clickable) + eventHolder.unbind('click').click(onClick); + } + + + // debugging function that prints out an object + function alertObject(obj) + { + var msg = ''; + function traverse(obj, depth) + { + if (!depth) + depth = 0; + for (var i = 0; i < obj.length; ++i) + { + for (var j=0; jcanvas.width-maxRadius) + centerLeft = canvas.width-maxRadius; + } + + function fixData(data) + { + for (var i = 0; i < data.length; ++i) + { + if (typeof(data[i].data)=='number') + data[i].data = [[1,data[i].data]]; + else if (typeof(data[i].data)=='undefined' || typeof(data[i].data[0])=='undefined') + { + if (typeof(data[i].data)!='undefined' && typeof(data[i].data.label)!='undefined') + data[i].label = data[i].data.label; // fix weirdness coming from flot + data[i].data = [[1,0]]; + + } + } + return data; + } + + function combine(data) + { + data = fixData(data); + calcTotal(data); + var combined = 0; + var numCombined = 0; + var color = options.series.pie.combine.color; + + var newdata = []; + for (var i = 0; i < data.length; ++i) + { + // make sure its a number + data[i].data[0][1] = parseFloat(data[i].data[0][1]); + if (!data[i].data[0][1]) + data[i].data[0][1] = 0; + + if (data[i].data[0][1]/total<=options.series.pie.combine.threshold) + { + combined += data[i].data[0][1]; + numCombined++; + if (!color) + color = data[i].color; + } + else + { + newdata.push({ + data: [[1,data[i].data[0][1]]], + color: data[i].color, + label: data[i].label, + angle: (data[i].data[0][1]*(Math.PI*2))/total, + percent: (data[i].data[0][1]/total*100) + }); + } + } + if (numCombined>0) + newdata.push({ + data: [[1,combined]], + color: color, + label: options.series.pie.combine.label, + angle: (combined*(Math.PI*2))/total, + percent: (combined/total*100) + }); + return newdata; + } + + function draw(plot, newCtx) + { + if (!target) return; // if no series were passed + ctx = newCtx; + + setupPie(); + var slices = plot.getData(); + + var attempts = 0; + while (redraw && attempts0) + maxRadius *= shrink; + attempts += 1; + clear(); + if (options.series.pie.tilt<=0.8) + drawShadow(); + drawPie(); + } + if (attempts >= redrawAttempts) { + clear(); + target.prepend('
          Could not draw pie with labels contained inside canvas
          '); + } + + if ( plot.setSeries && plot.insertLegend ) + { + plot.setSeries(slices); + plot.insertLegend(); + } + + // we're actually done at this point, just defining internal functions at this point + + function clear() + { + ctx.clearRect(0,0,canvas.width,canvas.height); + target.children().filter('.pieLabel, .pieLabelBackground').remove(); + } + + function drawShadow() + { + var shadowLeft = 5; + var shadowTop = 15; + var edge = 10; + var alpha = 0.02; + + // set radius + if (options.series.pie.radius>1) + var radius = options.series.pie.radius; + else + var radius = maxRadius * options.series.pie.radius; + + if (radius>=(canvas.width/2)-shadowLeft || radius*options.series.pie.tilt>=(canvas.height/2)-shadowTop || radius<=edge) + return; // shadow would be outside canvas, so don't draw it + + ctx.save(); + ctx.translate(shadowLeft,shadowTop); + ctx.globalAlpha = alpha; + ctx.fillStyle = '#000'; + + // center and rotate to starting position + ctx.translate(centerLeft,centerTop); + ctx.scale(1, options.series.pie.tilt); + + //radius -= edge; + for (var i=1; i<=edge; i++) + { + ctx.beginPath(); + ctx.arc(0,0,radius,0,Math.PI*2,false); + ctx.fill(); + radius -= i; + } + + ctx.restore(); + } + + function drawPie() + { + startAngle = Math.PI*options.series.pie.startAngle; + + // set radius + if (options.series.pie.radius>1) + var radius = options.series.pie.radius; + else + var radius = maxRadius * options.series.pie.radius; + + // center and rotate to starting position + ctx.save(); + ctx.translate(centerLeft,centerTop); + ctx.scale(1, options.series.pie.tilt); + //ctx.rotate(startAngle); // start at top; -- This doesn't work properly in Opera + + // draw slices + ctx.save(); + var currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) + { + slices[i].startAngle = currentAngle; + drawSlice(slices[i].angle, slices[i].color, true); + } + ctx.restore(); + + // draw slice outlines + ctx.save(); + ctx.lineWidth = options.series.pie.stroke.width; + currentAngle = startAngle; + for (var i = 0; i < slices.length; ++i) + drawSlice(slices[i].angle, options.series.pie.stroke.color, false); + ctx.restore(); + + // draw donut hole + drawDonutHole(ctx); + + // draw labels + if (options.series.pie.label.show) + drawLabels(); + + // restore to original state + ctx.restore(); + + function drawSlice(angle, color, fill) + { + if (angle<=0) + return; + + if (fill) + ctx.fillStyle = color; + else + { + ctx.strokeStyle = color; + ctx.lineJoin = 'round'; + } + + ctx.beginPath(); + if (Math.abs(angle - Math.PI*2) > 0.000000001) + ctx.moveTo(0,0); // Center of the pie + else if ($.browser.msie) + angle -= 0.0001; + //ctx.arc(0,0,radius,0,angle,false); // This doesn't work properly in Opera + ctx.arc(0,0,radius,currentAngle,currentAngle+angle,false); + ctx.closePath(); + //ctx.rotate(angle); // This doesn't work properly in Opera + currentAngle += angle; + + if (fill) + ctx.fill(); + else + ctx.stroke(); + } + + function drawLabels() + { + var currentAngle = startAngle; + + // set radius + if (options.series.pie.label.radius>1) + var radius = options.series.pie.label.radius; + else + var radius = maxRadius * options.series.pie.label.radius; + + for (var i = 0; i < slices.length; ++i) + { + if (slices[i].percent >= options.series.pie.label.threshold*100) + drawLabel(slices[i], currentAngle, i); + currentAngle += slices[i].angle; + } + + function drawLabel(slice, startAngle, index) + { + if (slice.data[0][1]==0) + return; + + // format label text + var lf = options.legend.labelFormatter, text, plf = options.series.pie.label.formatter; + if (lf) + text = lf(slice.label, slice); + else + text = slice.label; + if (plf) + text = plf(text, slice); + + var halfAngle = ((startAngle+slice.angle) + startAngle)/2; + var x = centerLeft + Math.round(Math.cos(halfAngle) * radius); + var y = centerTop + Math.round(Math.sin(halfAngle) * radius) * options.series.pie.tilt; + + var html = '' + text + ""; + target.append(html); + var label = target.children('#pieLabel'+index); + var labelTop = (y - label.height()/2); + var labelLeft = (x - label.width()/2); + label.css('top', labelTop); + label.css('left', labelLeft); + + // check to make sure that the label is not outside the canvas + if (0-labelTop>0 || 0-labelLeft>0 || canvas.height-(labelTop+label.height())<0 || canvas.width-(labelLeft+label.width())<0) + redraw = true; + + if (options.series.pie.label.background.opacity != 0) { + // put in the transparent background separately to avoid blended labels and label boxes + var c = options.series.pie.label.background.color; + if (c == null) { + c = slice.color; + } + var pos = 'top:'+labelTop+'px;left:'+labelLeft+'px;'; + $('
          ').insertBefore(label).css('opacity', options.series.pie.label.background.opacity); + } + } // end individual label function + } // end drawLabels function + } // end drawPie function + } // end draw function + + // Placed here because it needs to be accessed from multiple locations + function drawDonutHole(layer) + { + // draw donut hole + if(options.series.pie.innerRadius > 0) + { + // subtract the center + layer.save(); + innerRadius = options.series.pie.innerRadius > 1 ? options.series.pie.innerRadius : maxRadius * options.series.pie.innerRadius; + layer.globalCompositeOperation = 'destination-out'; // this does not work with excanvas, but it will fall back to using the stroke color + layer.beginPath(); + layer.fillStyle = options.series.pie.stroke.color; + layer.arc(0,0,innerRadius,0,Math.PI*2,false); + layer.fill(); + layer.closePath(); + layer.restore(); + + // add inner stroke + layer.save(); + layer.beginPath(); + layer.strokeStyle = options.series.pie.stroke.color; + layer.arc(0,0,innerRadius,0,Math.PI*2,false); + layer.stroke(); + layer.closePath(); + layer.restore(); + // TODO: add extra shadow inside hole (with a mask) if the pie is tilted. + } + } + + //-- Additional Interactive related functions -- + + function isPointInPoly(poly, pt) + { + for(var c = false, i = -1, l = poly.length, j = l - 1; ++i < l; j = i) + ((poly[i][1] <= pt[1] && pt[1] < poly[j][1]) || (poly[j][1] <= pt[1] && pt[1]< poly[i][1])) + && (pt[0] < (poly[j][0] - poly[i][0]) * (pt[1] - poly[i][1]) / (poly[j][1] - poly[i][1]) + poly[i][0]) + && (c = !c); + return c; + } + + function findNearbySlice(mouseX, mouseY) + { + var slices = plot.getData(), + options = plot.getOptions(), + radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; + + for (var i = 0; i < slices.length; ++i) + { + var s = slices[i]; + + if(s.pie.show) + { + ctx.save(); + ctx.beginPath(); + ctx.moveTo(0,0); // Center of the pie + //ctx.scale(1, options.series.pie.tilt); // this actually seems to break everything when here. + ctx.arc(0,0,radius,s.startAngle,s.startAngle+s.angle,false); + ctx.closePath(); + x = mouseX-centerLeft; + y = mouseY-centerTop; + if(ctx.isPointInPath) + { + if (ctx.isPointInPath(mouseX-centerLeft, mouseY-centerTop)) + { + //alert('found slice!'); + ctx.restore(); + return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; + } + } + else + { + // excanvas for IE doesn;t support isPointInPath, this is a workaround. + p1X = (radius * Math.cos(s.startAngle)); + p1Y = (radius * Math.sin(s.startAngle)); + p2X = (radius * Math.cos(s.startAngle+(s.angle/4))); + p2Y = (radius * Math.sin(s.startAngle+(s.angle/4))); + p3X = (radius * Math.cos(s.startAngle+(s.angle/2))); + p3Y = (radius * Math.sin(s.startAngle+(s.angle/2))); + p4X = (radius * Math.cos(s.startAngle+(s.angle/1.5))); + p4Y = (radius * Math.sin(s.startAngle+(s.angle/1.5))); + p5X = (radius * Math.cos(s.startAngle+s.angle)); + p5Y = (radius * Math.sin(s.startAngle+s.angle)); + arrPoly = [[0,0],[p1X,p1Y],[p2X,p2Y],[p3X,p3Y],[p4X,p4Y],[p5X,p5Y]]; + arrPoint = [x,y]; + // TODO: perhaps do some mathmatical trickery here with the Y-coordinate to compensate for pie tilt? + if(isPointInPoly(arrPoly, arrPoint)) + { + ctx.restore(); + return {datapoint: [s.percent, s.data], dataIndex: 0, series: s, seriesIndex: i}; + } + } + ctx.restore(); + } + } + + return null; + } + + function onMouseMove(e) + { + triggerClickHoverEvent('plothover', e); + } + + function onClick(e) + { + triggerClickHoverEvent('plotclick', e); + } + + // trigger click or hover event (they send the same parameters so we share their code) + function triggerClickHoverEvent(eventname, e) + { + var offset = plot.offset(), + canvasX = parseInt(e.pageX - offset.left), + canvasY = parseInt(e.pageY - offset.top), + item = findNearbySlice(canvasX, canvasY); + + if (options.grid.autoHighlight) + { + // clear auto-highlights + for (var i = 0; i < highlights.length; ++i) + { + var h = highlights[i]; + if (h.auto == eventname && !(item && h.series == item.series)) + unhighlight(h.series); + } + } + + // highlight the slice + if (item) + highlight(item.series, eventname); + + // trigger any hover bind events + var pos = { pageX: e.pageX, pageY: e.pageY }; + target.trigger(eventname, [ pos, item ]); + } + + function highlight(s, auto) + { + if (typeof s == "number") + s = series[s]; + + var i = indexOfHighlight(s); + if (i == -1) + { + highlights.push({ series: s, auto: auto }); + plot.triggerRedrawOverlay(); + } + else if (!auto) + highlights[i].auto = false; + } + + function unhighlight(s) + { + if (s == null) + { + highlights = []; + plot.triggerRedrawOverlay(); + } + + if (typeof s == "number") + s = series[s]; + + var i = indexOfHighlight(s); + if (i != -1) + { + highlights.splice(i, 1); + plot.triggerRedrawOverlay(); + } + } + + function indexOfHighlight(s) + { + for (var i = 0; i < highlights.length; ++i) + { + var h = highlights[i]; + if (h.series == s) + return i; + } + return -1; + } + + function drawOverlay(plot, octx) + { + //alert(options.series.pie.radius); + var options = plot.getOptions(); + //alert(options.series.pie.radius); + + var radius = options.series.pie.radius > 1 ? options.series.pie.radius : maxRadius * options.series.pie.radius; + + octx.save(); + octx.translate(centerLeft, centerTop); + octx.scale(1, options.series.pie.tilt); + + for (i = 0; i < highlights.length; ++i) + drawHighlight(highlights[i].series); + + drawDonutHole(octx); + + octx.restore(); + + function drawHighlight(series) + { + if (series.angle < 0) return; + + //octx.fillStyle = parseColor(options.series.pie.highlight.color).scale(null, null, null, options.series.pie.highlight.opacity).toString(); + octx.fillStyle = "rgba(255, 255, 255, "+options.series.pie.highlight.opacity+")"; // this is temporary until we have access to parseColor + + octx.beginPath(); + if (Math.abs(series.angle - Math.PI*2) > 0.000000001) + octx.moveTo(0,0); // Center of the pie + octx.arc(0,0,radius,series.startAngle,series.startAngle+series.angle,false); + octx.closePath(); + octx.fill(); + } + + } + + } // end init (plugin body) + + // define pie specific options and their default values + var options = { + series: { + pie: { + show: false, + radius: 'auto', // actual radius of the visible pie (based on full calculated radius if <=1, or hard pixel value) + innerRadius:0, /* for donut */ + startAngle: 3/2, + tilt: 1, + offset: { + top: 0, + left: 'auto' + }, + stroke: { + color: '#FFF', + width: 1 + }, + label: { + show: 'auto', + formatter: function(label, slice){ + return '
          '+label+'
          '+Math.round(slice.percent)+'%
          '; + }, // formatter function + radius: 1, // radius at which to place the labels (based on full calculated radius if <=1, or hard pixel value) + background: { + color: null, + opacity: 0 + }, + threshold: 0 // percentage at which to hide the label (i.e. the slice is too narrow) + }, + combine: { + threshold: -1, // percentage at which to combine little slices into one larger slice + color: null, // color to give the new slice (auto-generated if null) + label: 'Other' // label to give the new slice + }, + highlight: { + //color: '#FFF', // will add this functionality once parseColor is available + opacity: 0.5 + } + } + } + }; + + $.plot.plugins.push({ + init: init, + options: options, + name: "pie", + version: "1.0" + }); +})(jQuery); diff --git a/src/bb-themes/admin_default/js/forms/autogrowtextarea.js b/src/bb-themes/admin_default/js/forms/autogrowtextarea.js new file mode 100755 index 000000000..bc0a3dbc6 --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/autogrowtextarea.js @@ -0,0 +1,26 @@ +/*! + * Autogrow Textarea Plugin Version v2.0 + * http://www.technoreply.com/autogrow-textarea-plugin-version-2-0 + * + * Copyright 2011, Jevin O. Sewaruth + * + * Date: March 13, 2011 + */ +jQuery.fn.autoGrow = function(){return this.each(function(){var colsDefault = this.cols;var rowsDefault = this.rows;var grow = function() {growByRef(this);} +var growByRef = function(obj) {var linesCount = 0;var lines = obj.value.split('\n');for (var i=lines.length-1; i>=0; --i){linesCount += Math.floor((lines[i].length / colsDefault) + 1);} +if (linesCount >= rowsDefault)obj.rows = linesCount + 1;else obj.rows = rowsDefault;} +var characterWidth = function (obj){var characterWidth = 0; var temp1 = 0; var temp2 = 0; var tempCols = obj.cols; obj.cols = 1; temp1 = obj.offsetWidth; obj.cols = 2; temp2 = obj.offsetWidth; characterWidth = temp2 - temp1; obj.cols = tempCols; return characterWidth;} +this.style.height = "auto";this.style.overflow = "hidden";this.onkeyup = grow;this.onfocus = grow;this.onblur = grow;growByRef(this);});}; + + +/* +* Placeholder plugin for jQuery +* --- +* Copyright 2010, Daniel Stocks (http://webcloud.se) +* Released under the MIT, BSD, and GPL Licenses. +*/ + +(function(b){function d(a){this.input=a;a.attr("type")=="password"&&this.handlePassword();b(a[0].form).submit(function(){if(a.hasClass("placeholder")&&a[0].value==a.attr("placeholder"))a[0].value=""})}d.prototype={show:function(a){if(this.input[0].value===""||a&&this.valueIsPlaceholder()){if(this.isPassword)try{this.input[0].setAttribute("type","text")}catch(b){this.input.before(this.fakePassword.show()).hide()}this.input.addClass("placeholder");this.input[0].value=this.input.attr("placeholder")}}, +hide:function(){if(this.valueIsPlaceholder()&&this.input.hasClass("placeholder")&&(this.input.removeClass("placeholder"),this.input[0].value="",this.isPassword)){try{this.input[0].setAttribute("type","password")}catch(a){}this.input.show();this.input[0].focus()}},valueIsPlaceholder:function(){return this.input[0].value==this.input.attr("placeholder")},handlePassword:function(){var a=this.input;a.attr("realType","password");this.isPassword=!0;if(b.browser.msie&&a[0].outerHTML){var c=b(a[0].outerHTML.replace(/type=(['"])?password\1/gi, +"type=$1text$1"));this.fakePassword=c.val(a.attr("placeholder")).addClass("placeholder").focus(function(){a.trigger("focus");b(this).hide()});b(a[0].form).submit(function(){c.remove();a.show()})}}};var e=!!("placeholder"in document.createElement("input"));b.fn.placeholder=function(){return e?this:this.each(function(){var a=b(this),c=new d(a);c.show(!0);a.focus(function(){c.hide()});a.blur(function(){c.show(!1)});b.browser.msie&&(b(window).load(function(){a.val()&&a.removeClass("placeholder");c.show(!0)}), +a.focus(function(){if(this.value==""){var a=this.createTextRange();a.collapse(!0);a.moveStart("character",0);a.select()}}))})}})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/autotab.js b/src/bb-themes/admin_default/js/forms/autotab.js new file mode 100755 index 000000000..838da1d4e --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/autotab.js @@ -0,0 +1,257 @@ +/** + * Autotab - jQuery plugin 1.1b + * http://www.lousyllama.com/sandbox/jquery-autotab + * + * Copyright (c) 2008 Matthew Miller + * + * Dual licensed under the MIT and GPL licenses: + * http://www.opensource.org/licenses/mit-license.php + * http://www.gnu.org/licenses/gpl.html + * + * Revised: 2008-09-10 16:55:08 + */ + +(function($) { +// Look for an element based on ID or name +var check_element = function(name) { + var obj = null; + var check_id = $('#' + name); + var check_name = $('input[name=' + name + ']'); + + if(check_id.length) + obj = check_id; + else if(check_name != undefined) + obj = check_name; + + return obj; +}; + +/** + * autotab_magic automatically establishes autotabbing with the + * next and previous elements as provided by :input. + * + * autotab_magic should called after applying filters, if used. + * If any filters are applied after calling autotab_magic, then + * Autotab may not protect against brute force typing. + * + * @name autotab_magic + * @param focus Applies focus on the specified element + * @example $(':input').autotab_magic(); + */ +$.fn.autotab_magic = function(focus) { + for(var i = 0; i < this.length; i++) + { + var n = i + 1; + var p = i - 1; + + if(i > 0 && n < this.length) + $(this[i]).autotab({ target: $(this[n]), previous: $(this[p]) }); + else if(i > 0) + $(this[i]).autotab({ previous: $(this[p]) }); + else + $(this[i]).autotab({ target: $(this[n]) }); + + // Set the focus on the specified element + if(focus != null && (isNaN(focus) && focus == $(this[i]).attr('id')) || (!isNaN(focus) && focus == i)) + $(this[i]).focus(); + } + return this; +}; + +/** + * This will take any of the text that is typed and + * format it according to the options specified. + * + * Option values: + * format text|number|alphanumeric|all|custom + * - Text Allows all characters except numbers + * - Number Allows only numbers + * - Alphanumeric Allows only letters and numbers + * - All Allows any and all characters + * - Custom Allows developer to provide their own filter + * + * uppercase true|false + * - Converts a string to UPPERCASE + * + * lowercase true|false + * - Converts a string to lowecase + * + * nospace true|false + * - Remove spaces in the user input + * + * pattern null|(regular expression) + * - Custom regular expression for the filter + * + * @name autotab_filter + * @param options Can be a string, function or a list of options. If a string or + * function is passed, it will be assumed to be a format option. + * @example $('#number1, #number2, #number3').autotab_filter('number'); + * @example $('#product_key').autotab_filter({ format: 'alphanumeric', nospace: true }); + * @example $('#unique_id').autotab_filter({ format: 'custom', pattern: '[^0-9\.]' }); + */ +$.fn.autotab_filter = function(options) { + var defaults = { + format: 'all', + uppercase: false, + lowercase: false, + nospace: false, + pattern: null + }; + + if(typeof options == 'string' || typeof options == 'function') + defaults.format = options; + else + $.extend(defaults, options); + + for(var i = 0; i < this.length; i++) + { + $(this[i]).bind('keyup', function(e) { + var val = this.value; + + switch(defaults.format) + { + case 'text': + var pattern = new RegExp('[0-9]+', 'g'); + val = val.replace(pattern, ''); + break; + + case 'alpha': + var pattern = new RegExp('[^a-zA-Z]+', 'g'); + val = val.replace(pattern, ''); + break; + + case 'number': + case 'numeric': + var pattern = new RegExp('[^0-9]+', 'g'); + val = val.replace(pattern, ''); + break; + + case 'alphanumeric': + var pattern = new RegExp('[^0-9a-zA-Z]+', 'g'); + val = val.replace(pattern, ''); + break; + + case 'custom': + var pattern = new RegExp(defaults.pattern, 'g'); + val = val.replace(pattern, ''); + break; + + case 'all': + default: + if(typeof defaults.format == 'function') + var val = defaults.format(val); + + break; + } + + if(defaults.nospace) + { + var pattern = new RegExp('[ ]+', 'g'); + val = val.replace(pattern, ''); + } + + if(defaults.uppercase) + val = val.toUpperCase(); + + if(defaults.lowercase) + val = val.toLowerCase(); + + if(val != this.value) + this.value = val; + }); + } +}; + +/** + * Provides the autotabbing mechanism for the supplied element and passes + * any formatting options to autotab_filter. + * + * Refer to autotab_filter's description for a detailed explanation of + * the options available. + * + * @name autotab + * @param options + * @example $('#phone').autotab({ format: 'number' }); + * @example $('#username').autotab({ format: 'alphanumeric', target: 'password' }); + * @example $('#password').autotab({ previous: 'username', target: 'confirm' }); + */ +$.fn.autotab = function(options) { + var defaults = { + format: 'all', + maxlength: 2147483647, + uppercase: false, + lowercase: false, + nospace: false, + target: null, + previous: null, + pattern: null + }; + + $.extend(defaults, options); + + // Sets targets to element based on the name or ID + // passed if they are not currently objects + if(typeof defaults.target == 'string') + defaults.target = check_element(defaults.target); + + if(typeof defaults.previous == 'string') + defaults.previous = check_element(defaults.previous); + + var maxlength = $(this).attr('maxlength'); + + // defaults.maxlength has not changed and maxlength was specified + if(defaults.maxlength == 2147483647 && maxlength != 2147483647) + defaults.maxlength = maxlength; + // defaults.maxlength overrides maxlength + else if(defaults.maxlength > 0) + $(this).attr('maxlength', defaults.maxlength) + // defaults.maxlength and maxlength have not been specified + // A target cannot be used since there is no defined maxlength + else + defaults.target = null; + + if(defaults.format != 'all') + $(this).autotab_filter(defaults); + + // Go to the previous element when backspace + // is pressed in an empty input field + return $(this).bind('keydown', function(e) { + if(e.which == 8 && this.value.length == 0 && defaults.previous) + defaults.previous.focus().val(defaults.previous.val()); + }).bind('keyup', function(e) { + /** + * Do not auto tab when the following keys are pressed + * 8: Backspace + * 9: Tab + * 16: Shift + * 17: Ctrl + * 18: Alt + * 19: Pause Break + * 20: Caps Lock + * 27: Esc + * 33: Page Up + * 34: Page Down + * 35: End + * 36: Home + * 37: Left Arrow + * 38: Up Arrow + * 39: Right Arrow + * 40: Down Arrow + * 45: Insert + * 46: Delete + * 144: Num Lock + * 145: Scroll Lock + */ + var keys = [8, 9, 16, 17, 18, 19, 20, 27, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46, 144, 145]; + + if(e.which != 8) + { + var val = $(this).val(); + + if($.inArray(e.which, keys) == -1 && val.length == defaults.maxlength && defaults.target) + defaults.target.focus(); + } + }); +}; + +})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/chosen.jquery.min.js b/src/bb-themes/admin_default/js/forms/chosen.jquery.min.js new file mode 100755 index 000000000..930fb9a50 --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/chosen.jquery.min.js @@ -0,0 +1,10 @@ +// Chosen, a Select Box Enhancer for jQuery and Protoype +// by Patrick Filler for Harvest, http://getharvest.com +// +// Version 0.9.7 +// Full source at https://github.com/harvesthq/chosen +// Copyright (c) 2011 Harvest http://getharvest.com + +// MIT License, https://github.com/harvesthq/chosen/blob/master/LICENSE.md +// This file is generated by `cake build`, do not edit it by hand. +((function(){var a;a=function(){function a(){this.options_index=0,this.parsed=[]}return a.prototype.add_node=function(a){return a.nodeName==="OPTGROUP"?this.add_group(a):this.add_option(a)},a.prototype.add_group=function(a){var b,c,d,e,f,g;b=this.parsed.length,this.parsed.push({array_index:b,group:!0,label:a.label,children:0,disabled:a.disabled}),f=a.childNodes,g=[];for(d=0,e=f.length;d"+a.html+"")},a.prototype.results_update_field=function(){return this.result_clear_highlight(),this.result_single_selected=null,this.results_build()},a.prototype.results_toggle=function(){return this.results_showing?this.results_hide():this.results_show()},a.prototype.results_search=function(a){return this.results_showing?this.winnow_results():this.results_show()},a.prototype.keyup_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale();switch(b){case 8:if(this.is_multiple&&this.backstroke_length<1&&this.choices>0)return this.keydown_backstroke();if(!this.pending_backstroke)return this.result_clear_highlight(),this.results_search();break;case 13:a.preventDefault();if(this.results_showing)return this.result_select(a);break;case 27:return this.results_showing&&this.results_hide(),!0;case 9:case 38:case 40:case 16:case 91:case 17:break;default:return this.results_search()}},a.prototype.generate_field_id=function(){var a;return a=this.generate_random_id(),this.form_field.id=a,a},a.prototype.generate_random_char=function(){var a,b,c;return a="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZ",c=Math.floor(Math.random()*a.length),b=a.substring(c,c+1)},a}(),b.AbstractChosen=a}.call(this),function(){var a,b,c,d,e=Object.prototype.hasOwnProperty,f=function(a,b){function d(){this.constructor=a}for(var c in b)e.call(b,c)&&(a[c]=b[c]);return d.prototype=b.prototype,a.prototype=new d,a.__super__=b.prototype,a};d=this,a=jQuery,a.fn.extend({chosen:function(c){return!a.browser.msie||a.browser.version!=="6.0"&&a.browser.version!=="7.0"?a(this).each(function(d){if(!a(this).hasClass("chzn-done"))return new b(this,c)}):this}}),b=function(b){function e(){e.__super__.constructor.apply(this,arguments)}return f(e,b),e.prototype.setup=function(){return this.form_field_jq=a(this.form_field),this.is_rtl=this.form_field_jq.hasClass("chzn-rtl")},e.prototype.finish_setup=function(){return this.form_field_jq.addClass("chzn-done")},e.prototype.set_up_html=function(){var b,d,e,f;return this.container_id=this.form_field.id.length?this.form_field.id.replace(/(:|\.)/g,"_"):this.generate_field_id(),this.container_id+="_chzn",this.f_width=this.form_field_jq.outerWidth(),this.default_text=this.form_field_jq.data("placeholder")?this.form_field_jq.data("placeholder"):this.default_text_default,b=a("
          ",{id:this.container_id,"class":"chzn-container"+(this.is_rtl?" chzn-rtl":""),style:"width: "+this.f_width+"px;"}),this.is_multiple?b.html('
            '):b.html(''+this.default_text+'
              '),this.form_field_jq.hide().after(b),this.container=a("#"+this.container_id),this.container.addClass("chzn-container-"+(this.is_multiple?"multi":"single")),this.dropdown=this.container.find("div.chzn-drop").first(),d=this.container.height(),e=this.f_width-c(this.dropdown),this.dropdown.css({width:e+"px",top:d+"px"}),this.search_field=this.container.find("input").first(),this.search_results=this.container.find("ul.chzn-results").first(),this.search_field_scale(),this.search_no_results=this.container.find("li.no-results").first(),this.is_multiple?(this.search_choices=this.container.find("ul.chzn-choices").first(),this.search_container=this.container.find("li.search-field").first()):(this.search_container=this.container.find("div.chzn-search").first(),this.selected_item=this.container.find(".chzn-single").first(),f=e-c(this.search_container)-c(this.search_field),this.search_field.css({width:f+"px"})),this.results_build(),this.set_tab_index(),this.form_field_jq.trigger("liszt:ready",{chosen:this})},e.prototype.register_observers=function(){var a=this;return this.container.mousedown(function(b){return a.container_mousedown(b)}),this.container.mouseup(function(b){return a.container_mouseup(b)}),this.container.mouseenter(function(b){return a.mouse_enter(b)}),this.container.mouseleave(function(b){return a.mouse_leave(b)}),this.search_results.mouseup(function(b){return a.search_results_mouseup(b)}),this.search_results.mouseover(function(b){return a.search_results_mouseover(b)}),this.search_results.mouseout(function(b){return a.search_results_mouseout(b)}),this.form_field_jq.bind("liszt:updated",function(b){return a.results_update_field(b)}),this.search_field.blur(function(b){return a.input_blur(b)}),this.search_field.keyup(function(b){return a.keyup_checker(b)}),this.search_field.keydown(function(b){return a.keydown_checker(b)}),this.is_multiple?(this.search_choices.click(function(b){return a.choices_click(b)}),this.search_field.focus(function(b){return a.input_focus(b)})):this.container.click(function(a){return a.preventDefault()})},e.prototype.search_field_disabled=function(){this.is_disabled=this.form_field_jq[0].disabled;if(this.is_disabled)return this.container.addClass("chzn-disabled"),this.search_field[0].disabled=!0,this.is_multiple||this.selected_item.unbind("focus",this.activate_action),this.close_field();this.container.removeClass("chzn-disabled"),this.search_field[0].disabled=!1;if(!this.is_multiple)return this.selected_item.bind("focus",this.activate_action)},e.prototype.container_mousedown=function(b){var c;if(!this.is_disabled)return c=b!=null?a(b.target).hasClass("search-choice-close"):!1,b&&b.type==="mousedown"&&b.stopPropagation(),!this.pending_destroy_click&&!c?(this.active_field?!this.is_multiple&&b&&(a(b.target)[0]===this.selected_item[0]||a(b.target).parents("a.chzn-single").length)&&(b.preventDefault(),this.results_toggle()):(this.is_multiple&&this.search_field.val(""),a(document).click(this.click_test_action),this.results_show()),this.activate_field()):this.pending_destroy_click=!1},e.prototype.container_mouseup=function(a){if(a.target.nodeName==="ABBR")return this.results_reset(a)},e.prototype.blur_test=function(a){if(!this.active_field&&this.container.hasClass("chzn-container-active"))return this.close_field()},e.prototype.close_field=function(){return a(document).unbind("click",this.click_test_action),this.is_multiple||(this.selected_item.attr("tabindex",this.search_field.attr("tabindex")),this.search_field.attr("tabindex",-1)),this.active_field=!1,this.results_hide(),this.container.removeClass("chzn-container-active"),this.winnow_results_clear(),this.clear_backstroke(),this.show_search_field_default(),this.search_field_scale()},e.prototype.activate_field=function(){return!this.is_multiple&&!this.active_field&&(this.search_field.attr("tabindex",this.selected_item.attr("tabindex")),this.selected_item.attr("tabindex",-1)),this.container.addClass("chzn-container-active"),this.active_field=!0,this.search_field.val(this.search_field.val()),this.search_field.focus()},e.prototype.test_active_click=function(b){return a(b.target).parents("#"+this.container_id).length?this.active_field=!0:this.close_field()},e.prototype.results_build=function(){var a,b,c,e,f;this.parsing=!0,this.results_data=d.SelectParser.select_to_array(this.form_field),this.is_multiple&&this.choices>0?(this.search_choices.find("li.search-choice").remove(),this.choices=0):this.is_multiple||(this.selected_item.find("span").text(this.default_text),this.form_field.options.length<=this.disable_search_threshold?this.container.addClass("chzn-container-single-nosearch"):this.container.removeClass("chzn-container-single-nosearch")),a="",f=this.results_data;for(c=0,e=f.length;c'+a("
              ").text(b.label).html()+"")},e.prototype.result_do_highlight=function(a){var b,c,d,e,f;if(a.length){this.result_clear_highlight(),this.result_highlight=a,this.result_highlight.addClass("highlighted"),d=parseInt(this.search_results.css("maxHeight"),10),f=this.search_results.scrollTop(),e=d+f,c=this.result_highlight.position().top+this.search_results.scrollTop(),b=c+this.result_highlight.outerHeight();if(b>=e)return this.search_results.scrollTop(b-d>0?b-d:0);if(c'+b.html+''),d=a("#"+c).find("a").first(),d.click(function(a){return e.choice_destroy_link_click(a)})},e.prototype.choice_destroy_link_click=function(b){return b.preventDefault(),this.is_disabled?b.stopPropagation:(this.pending_destroy_click=!0,this.choice_destroy(a(b.target)))},e.prototype.choice_destroy=function(a){return this.choices-=1,this.show_search_field_default(),this.is_multiple&&this.choices>0&&this.search_field.val().length<1&&this.results_hide(),this.result_deselect(a.attr("rel")),a.parents("li").first().remove()},e.prototype.results_reset=function(b){this.form_field.options[0].selected=!0,this.selected_item.find("span").text(this.default_text),this.show_search_field_default(),a(b.target).remove(),this.form_field_jq.trigger("change");if(this.active_field)return this.results_hide()},e.prototype.result_select=function(a){var b,c,d,e;if(this.result_highlight)return b=this.result_highlight,c=b.attr("id"),this.result_clear_highlight(),this.is_multiple?this.result_deactivate(b):(this.search_results.find(".result-selected").removeClass("result-selected"),this.result_single_selected=b),b.addClass("result-selected"),e=c.substr(c.lastIndexOf("_")+1),d=this.results_data[e],d.selected=!0,this.form_field.options[d.options_index].selected=!0,this.is_multiple?this.choice_build(d):(this.selected_item.find("span").first().text(d.text),this.allow_single_deselect&&this.single_deselect_control_build()),(!a.metaKey||!this.is_multiple)&&this.results_hide(),this.search_field.val(""),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.result_activate=function(a){return a.addClass("active-result")},e.prototype.result_deactivate=function(a){return a.removeClass("active-result")},e.prototype.result_deselect=function(b){var c,d;return d=this.results_data[b],d.selected=!1,this.form_field.options[d.options_index].selected=!1,c=a("#"+this.container_id+"_o_"+b),c.removeClass("result-selected").addClass("active-result").show(),this.result_clear_highlight(),this.winnow_results(),this.form_field_jq.trigger("change"),this.search_field_scale()},e.prototype.single_deselect_control_build=function(){if(this.allow_single_deselect&&this.selected_item.find("abbr").length<1)return this.selected_item.find("span").first().after('')},e.prototype.winnow_results=function(){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r;this.no_results_clear(),i=0,j=this.search_field.val()===this.default_text?"":a("
              ").text(a.trim(this.search_field.val())).html(),f=new RegExp("^"+j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),m=new RegExp(j.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),"i"),r=this.results_data;for(n=0,p=r.length;n=0||c.html.indexOf("[")===0){e=c.html.replace(/\[|\]/g,"").split(" ");if(e.length)for(o=0,q=e.length;o"+c.html.substr(k+j.length),l=l.substr(0,k)+""+l.substr(k)):l=c.html,g.html(l),this.result_activate(g),c.group_array_index!=null&&a("#"+this.results_data[c.group_array_index].dom_id).css("display","list-item")):(this.result_highlight&&h===this.result_highlight.attr("id")&&this.result_clear_highlight(),this.result_deactivate(g))}}return i<1&&j.length?this.no_results(j):this.winnow_results_set_highlight()},e.prototype.winnow_results_clear=function(){var b,c,d,e,f;this.search_field.val(""),c=this.search_results.find("li"),f=[];for(d=0,e=c.length;d'+this.results_none_found+' ""'),c.find("span").first().html(b),this.search_results.append(c)},e.prototype.no_results_clear=function(){return this.search_results.find(".no-results").remove()},e.prototype.keydown_arrow=function(){var b,c;this.result_highlight?this.results_showing&&(c=this.result_highlight.nextAll("li.active-result").first(),c&&this.result_do_highlight(c)):(b=this.search_results.find("li.active-result").first(),b&&this.result_do_highlight(a(b)));if(!this.results_showing)return this.results_show()},e.prototype.keyup_arrow=function(){var a;if(!this.results_showing&&!this.is_multiple)return this.results_show();if(this.result_highlight)return a=this.result_highlight.prevAll("li.active-result"),a.length?this.result_do_highlight(a.first()):(this.choices>0&&this.results_hide(),this.result_clear_highlight())},e.prototype.keydown_backstroke=function(){return this.pending_backstroke?(this.choice_destroy(this.pending_backstroke.find("a").first()),this.clear_backstroke()):(this.pending_backstroke=this.search_container.siblings("li.search-choice").last(),this.pending_backstroke.addClass("search-choice-focus"))},e.prototype.clear_backstroke=function(){return this.pending_backstroke&&this.pending_backstroke.removeClass("search-choice-focus"),this.pending_backstroke=null},e.prototype.keydown_checker=function(a){var b,c;b=(c=a.which)!=null?c:a.keyCode,this.search_field_scale(),b!==8&&this.pending_backstroke&&this.clear_backstroke();switch(b){case 8:this.backstroke_length=this.search_field.val().length;break;case 9:this.results_showing&&!this.is_multiple&&this.result_select(a),this.mouse_on_container=!1;break;case 13:a.preventDefault();break;case 38:a.preventDefault(),this.keyup_arrow();break;case 40:this.keydown_arrow()}},e.prototype.search_field_scale=function(){var b,c,d,e,f,g,h,i,j;if(this.is_multiple){d=0,h=0,f="position:absolute; left: -1000px; top: -1000px; display:none;",g=["font-size","font-style","font-weight","font-family","line-height","text-transform","letter-spacing"];for(i=0,j=g.length;i",{style:f}),c.text(this.search_field.val()),a("body").append(c),h=c.width()+25,c.remove(),h>this.f_width-10&&(h=this.f_width-10),this.search_field.css({width:h+"px"}),b=this.container.height(),this.dropdown.css({top:b+"px"})}},e.prototype.generate_random_id=function(){var b;b="sel"+this.generate_random_char()+this.generate_random_char()+this.generate_random_char();while(a("#"+b).length>0)b+=this.generate_random_char();return b},e}(AbstractChosen),c=function(a){var b;return b=a.outerWidth()-a.width()},d.get_side_border_padding=c}.call(this) \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/forms.js b/src/bb-themes/admin_default/js/forms/forms.js new file mode 100755 index 000000000..84fc8ca16 --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/forms.js @@ -0,0 +1 @@ +(function(a){a.uniform={options:{selectClass:"selector",radioClass:"radio",checkboxClass:"checker",fileClass:"uploader",filenameClass:"filename",fileBtnClass:"action",fileDefaultText:"No file selected",fileBtnText:"Choose File",checkedClass:"checked",focusClass:"focus",disabledClass:"disabled",buttonClass:"button",activeClass:"active",hoverClass:"hover",useID:true,idPrefix:"uniform",resetSelector:false,autoHide:true},elements:[]};if(a.browser.msie&&a.browser.version<7){a.support.selectOpacity=false}else{a.support.selectOpacity=true}a.fn.uniform=function(k){k=a.extend(a.uniform.options,k);var d=this;if(k.resetSelector!=false){a(k.resetSelector).mouseup(function(){function l(){a.uniform.update(d)}setTimeout(l,10)})}function j(l){$el=a(l);$el.addClass($el.attr("type"));b(l)}function g(l){a(l).addClass("uniform");b(l)}function i(o){var m=a(o);var p=a("
              "),l=a("");p.addClass(k.buttonClass);if(k.useID&&m.attr("id")!=""){p.attr("id",k.idPrefix+"-"+m.attr("id"))}var n;if(m.is("a")||m.is("button")){n=m.text()}else{if(m.is(":submit")||m.is(":reset")||m.is("input[type=button]")){n=m.attr("value")}}n=n==""?m.is(":reset")?"Reset":"Submit":n;l.html(n);m.css("opacity",0);m.wrap(p);m.wrap(l);p=m.closest("div");l=m.closest("span");if(m.is(":disabled")){p.addClass(k.disabledClass)}p.bind({"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(r){if(a(r.target).is("span")||a(r.target).is("div")){if(o[0].dispatchEvent){var q=document.createEvent("MouseEvents");q.initEvent("click",true,true);o[0].dispatchEvent(q)}else{o[0].click()}}}});o.bind({"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass)}});a.uniform.noSelect(p);b(o)}function e(o){var m=a(o);var p=a("
              "),l=a("");if(!m.css("display")=="none"&&k.autoHide){p.hide()}p.addClass(k.selectClass);if(k.useID&&o.attr("id")!=""){p.attr("id",k.idPrefix+"-"+o.attr("id"))}var n=o.find(":selected:first");if(n.length==0){n=o.find("option:first")}l.html(n.html());o.css("opacity",0);o.wrap(p);o.before(l);p=o.parent("div");l=o.siblings("span");o.bind({"change.uniform":function(){l.text(o.find(":selected").html());p.removeClass(k.activeClass)},"focus.uniform":function(){p.addClass(k.focusClass)},"blur.uniform":function(){p.removeClass(k.focusClass);p.removeClass(k.activeClass)},"mousedown.uniform touchbegin.uniform":function(){p.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"click.uniform touchend.uniform":function(){p.removeClass(k.activeClass)},"mouseenter.uniform":function(){p.addClass(k.hoverClass)},"mouseleave.uniform":function(){p.removeClass(k.hoverClass);p.removeClass(k.activeClass)},"keyup.uniform":function(){l.text(o.find(":selected").html())}});if(a(o).attr("disabled")){p.addClass(k.disabledClass)}a.uniform.noSelect(l);b(o)}function f(n){var m=a(n);var o=a("
              "),l=a("");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.checkboxClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{l.addClass(k.checkedClass)}},"mousedown.uniform touchbegin.uniform":function(){o.addClass(k.activeClass)},"mouseup.uniform touchend.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function c(n){var m=a(n);var o=a("
              "),l=a("");if(!m.css("display")=="none"&&k.autoHide){o.hide()}o.addClass(k.radioClass);if(k.useID&&n.attr("id")!=""){o.attr("id",k.idPrefix+"-"+n.attr("id"))}a(n).wrap(o);a(n).wrap(l);l=n.parent();o=l.parent();a(n).css("opacity",0).bind({"focus.uniform":function(){o.addClass(k.focusClass)},"blur.uniform":function(){o.removeClass(k.focusClass)},"click.uniform touchend.uniform":function(){if(!a(n).attr("checked")){l.removeClass(k.checkedClass)}else{var p=k.radioClass.split(" ")[0];a("."+p+" span."+k.checkedClass+":has([name='"+a(n).attr("name")+"'])").removeClass(k.checkedClass);l.addClass(k.checkedClass)}},"mousedown.uniform touchend.uniform":function(){if(!a(n).is(":disabled")){o.addClass(k.activeClass)}},"mouseup.uniform touchbegin.uniform":function(){o.removeClass(k.activeClass)},"mouseenter.uniform touchend.uniform":function(){o.addClass(k.hoverClass)},"mouseleave.uniform":function(){o.removeClass(k.hoverClass);o.removeClass(k.activeClass)}});if(a(n).attr("checked")){l.addClass(k.checkedClass)}if(a(n).attr("disabled")){o.addClass(k.disabledClass)}b(n)}function h(q){var o=a(q);var r=a("
              "),p=a(""+k.fileDefaultText+""),m=a(""+k.fileBtnText+"");if(!o.css("display")=="none"&&k.autoHide){r.hide()}r.addClass(k.fileClass);p.addClass(k.filenameClass);m.addClass(k.fileBtnClass);if(k.useID&&o.attr("id")!=""){r.attr("id",k.idPrefix+"-"+o.attr("id"))}o.wrap(r);o.after(m);o.after(p);r=o.closest("div");p=o.siblings("."+k.filenameClass);m=o.siblings("."+k.fileBtnClass);if(!o.attr("size")){var l=r.width();o.attr("size",l/10)}var n=function(){var s=o.val();if(s===""){s=k.fileDefaultText}else{s=s.split(/[\/\\]+/);s=s[(s.length-1)]}p.text(s)};n();o.css("opacity",0).bind({"focus.uniform":function(){r.addClass(k.focusClass)},"blur.uniform":function(){r.removeClass(k.focusClass)},"mousedown.uniform":function(){if(!a(q).is(":disabled")){r.addClass(k.activeClass)}},"mouseup.uniform":function(){r.removeClass(k.activeClass)},"mouseenter.uniform":function(){r.addClass(k.hoverClass)},"mouseleave.uniform":function(){r.removeClass(k.hoverClass);r.removeClass(k.activeClass)}});if(a.browser.msie){o.bind("click.uniform.ie7",function(){setTimeout(n,0)})}else{o.bind("change.uniform",n)}if(o.attr("disabled")){r.addClass(k.disabledClass)}a.uniform.noSelect(p);a.uniform.noSelect(m);b(q)}a.uniform.restore=function(l){if(l==undefined){l=a(a.uniform.elements)}a(l).each(function(){if(a(this).is(":checkbox")){a(this).unwrap().unwrap()}else{if(a(this).is("select")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is(":radio")){a(this).unwrap().unwrap()}else{if(a(this).is(":file")){a(this).siblings("span").remove();a(this).unwrap()}else{if(a(this).is("button, :submit, :reset, a, input[type='button']")){a(this).unwrap().unwrap()}}}}}a(this).unbind(".uniform");a(this).css("opacity","1");var m=a.inArray(a(l),a.uniform.elements);a.uniform.elements.splice(m,1)})};function b(l){l=a(l).get();if(l.length>1){a.each(l,function(m,n){a.uniform.elements.push(n)})}else{a.uniform.elements.push(l)}}a.uniform.noSelect=function(l){function m(){return false}a(l).each(function(){this.onselectstart=this.ondragstart=m;a(this).mousedown(m).css({MozUserSelect:"none"})})};a.uniform.update=function(l){if(l==undefined){l=a(a.uniform.elements)}l=a(l);l.each(function(){var n=a(this);if(n.is("select")){var m=n.siblings("span");var p=n.parent("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.html(n.find(":selected").html());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":checkbox")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":radio")){var m=n.closest("span");var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);m.removeClass(k.checkedClass);if(n.is(":checked")){m.addClass(k.checkedClass)}if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":file")){var p=n.parent("div");var o=n.siblings(k.filenameClass);btnTag=n.siblings(k.fileBtnClass);p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);o.text(n.val());if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}else{if(n.is(":submit")||n.is(":reset")||n.is("button")||n.is("a")||l.is("input[type=button]")){var p=n.closest("div");p.removeClass(k.hoverClass+" "+k.focusClass+" "+k.activeClass);if(n.is(":disabled")){p.addClass(k.disabledClass)}else{p.removeClass(k.disabledClass)}}}}}}})};return this.each(function(){if(a.support.selectOpacity){var l=a(this);if(l.is("select")){if(l.attr("multiple")!=true && l.attr("multiple") != "multiple"){if(l.attr("size")==undefined||l.attr("size")<=1){e(l)}}}else{if(l.is(":checkbox")){f(l)}else{if(l.is(":radio")){c(l)}else{if(l.is(":file")){h(l)}else{if(l.is(":text, :password, input[type='email']")){j(l)}else{if(l.is("textarea")){g(l)}else{if(l.is("a")||l.is(":submit")||l.is(":reset")||l.is("button")||l.is("input[type=button]")){i(l)}}}}}}}}})}})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/jquery.dualListBox.js b/src/bb-themes/admin_default/js/forms/jquery.dualListBox.js new file mode 100755 index 000000000..34b98e75f --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/jquery.dualListBox.js @@ -0,0 +1,12 @@ +/* +* Developed by Justin Mead +* ©2011 MeadMiracle +* www.meadmiracle.com / meadmiracle@gmail.com +* Version 1.3 +* Testing: IE8/Windows XP +* Firefox/Windows XP +* Chrome/Windows XP +* Licensed under the Creative Commons GPL http://creativecommons.org/licenses/GPL/2.0/ +*/ + +(function($) { var settings = new Array(); var group1 = new Array(); var group2 = new Array(); var onSort = new Array(); $.configureBoxes = function(options) { var index = settings.push({ box1View: 'box1View', box1Storage: 'box1Storage', box1Filter: 'box1Filter', box1Clear: 'box1Clear', box1Counter: 'box1Counter', box2View: 'box2View', box2Storage: 'box2Storage', box2Filter: 'box2Filter', box2Clear: 'box2Clear', box2Counter: 'box2Counter', to1: 'to1', allTo1: 'allTo1', to2: 'to2', allTo2: 'allTo2', transferMode: 'move', sortBy: 'text', useFilters: true, useCounters: true, useSorting: true, selectOnSubmit: true }); index--; $.extend(settings[index], options); group1.push({ view: settings[index].box1View, storage: settings[index].box1Storage, filter: settings[index].box1Filter, clear: settings[index].box1Clear, counter: settings[index].box1Counter, index: index }); group2.push({ view: settings[index].box2View, storage: settings[index].box2Storage, filter: settings[index].box2Filter, clear: settings[index].box2Clear, counter: settings[index].box2Counter, index: index }); if (settings[index].sortBy == 'text') { onSort.push(function(a, b) { var aVal = a.text.toLowerCase(); var bVal = b.text.toLowerCase(); if (aVal < bVal) { return -1; } if (aVal > bVal) { return 1; } return 0; }); } else { onSort.push(function(a, b) { var aVal = a.value.toLowerCase(); var bVal = b.value.toLowerCase(); if (aVal < bVal) { return -1; } if (aVal > bVal) { return 1; } return 0; }); } if (settings[index].useFilters) { $('#' + group1[index].filter).keyup(function() { Filter(group1[index]); }); $('#' + group2[index].filter).keyup(function() { Filter(group2[index]); }); $('#' + group1[index].clear).click(function() { ClearFilter(group1[index]); }); $('#' + group2[index].clear).click(function() { ClearFilter(group2[index]); }); } if (IsMoveMode(settings[index])) { $('#' + group2[index].view).dblclick(function() { MoveSelected(group2[index], group1[index]); }); $('#' + settings[index].to1).click(function() { MoveSelected(group2[index], group1[index]); }); $('#' + settings[index].allTo1).click(function() { MoveAll(group2[index], group1[index]); }); } else { $('#' + group2[index].view).dblclick(function() { RemoveSelected(group2[index], group1[index]); }); $('#' + settings[index].to1).click(function() { RemoveSelected(group2[index], group1[index]); }); $('#' + settings[index].allTo1).click(function() { RemoveAll(group2[index], group1[index]); }); } $('#' + group1[index].view).dblclick(function() { MoveSelected(group1[index], group2[index]); }); $('#' + settings[index].to2).click(function() { MoveSelected(group1[index], group2[index]); }); $('#' + settings[index].allTo2).click(function() { MoveAll(group1[index], group2[index]); }); if (settings[index].useCounters) { UpdateLabel(group1[index]); UpdateLabel(group2[index]); } if (settings[index].useSorting) { SortOptions(group1[index]); SortOptions(group2[index]); } $('#' + group1[index].storage + ',#' + group2[index].storage).css('display', 'none'); if (settings[index].selectOnSubmit) { $('#' + settings[index].box2View).closest('form').submit(function() { $('#' + settings[index].box2View).children('option').attr('selected', 'selected'); }); } }; function UpdateLabel(group) { var showingCount = $("#" + group.view + " option").size(); var hiddenCount = $("#" + group.storage + " option").size(); $("#" + group.counter).text('Showing ' + showingCount + ' of ' + (showingCount + hiddenCount)); } function Filter(group) { var index = group.index; var filterLower; if (settings[index].useFilters) { filterLower = $('#' + group.filter).val().toString().toLowerCase(); } else { filterLower = ''; } $('#' + group.view + ' option').filter(function(i) { var toMatch = $(this).text().toString().toLowerCase(); return toMatch.indexOf(filterLower) == -1; }).appendTo('#' + group.storage); $('#' + group.storage + ' option').filter(function(i) { var toMatch = $(this).text().toString().toLowerCase(); return toMatch.indexOf(filterLower) != -1; }).appendTo('#' + group.view); try { $('#' + group.view + ' option').removeAttr('selected'); } catch (ex) { } if (settings[index].useSorting) { SortOptions(group); } if (settings[index].useCounters) { UpdateLabel(group); } } function SortOptions(group) { var $toSortOptions = $('#' + group.view + ' option'); $toSortOptions.sort(onSort[group.index]); $('#' + group.view).empty().append($toSortOptions); } function MoveSelected(fromGroup, toGroup) { if (IsMoveMode(settings[fromGroup.index])) { $('#' + fromGroup.view + ' option:selected').appendTo('#' + toGroup.view); } else { $('#' + fromGroup.view + ' option:selected:not([class*=copiedOption])').clone().appendTo('#' + toGroup.view).end().end().addClass('copiedOption'); } try { $('#' + fromGroup.view + ' option,#' + toGroup.view + ' option').removeAttr('selected'); } catch (ex) { } Filter(toGroup); if (settings[fromGroup.index].useCounters) { UpdateLabel(fromGroup); } } function MoveAll(fromGroup, toGroup) { if (IsMoveMode(settings[fromGroup.index])) { $('#' + fromGroup.view + ' option').appendTo('#' + toGroup.view); } else { $('#' + fromGroup.view + ' option:not([class*=copiedOption])').clone().appendTo('#' + toGroup.view).end().end().addClass('copiedOption'); } try { $('#' + fromGroup.view + ' option,#' + toGroup.view + ' option').removeAttr('selected'); } catch (ex) { } Filter(toGroup); if (settings[fromGroup.index].useCounters) { UpdateLabel(fromGroup); } } function RemoveSelected(removeGroup, otherGroup) { $('#' + otherGroup.view + ' option.copiedOption').add('#' + otherGroup.storage + ' option.copiedOption').remove(); try { $('#' + removeGroup.view + ' option:selected').appendTo('#' + otherGroup.view).removeAttr('selected'); } catch (ex) { } $('#' + removeGroup.view + ' option').add('#' + removeGroup.storage + ' option').clone().addClass('copiedOption').appendTo('#' + otherGroup.view); Filter(otherGroup); if (settings[removeGroup.index].useCounters) { UpdateLabel(removeGroup); } } function RemoveAll(removeGroup, otherGroup) { $('#' + otherGroup.view + ' option.copiedOption').add('#' + otherGroup.storage + ' option.copiedOption').remove(); try { $('#' + removeGroup.storage + ' option').clone().addClass('copiedOption').add('#' + removeGroup.view + ' option').appendTo('#' + otherGroup.view).removeAttr('selected'); } catch (ex) { } Filter(otherGroup); if (settings[removeGroup.index].useCounters) { UpdateLabel(removeGroup); } } function ClearFilter(group) { $('#' + group.filter).val(''); $('#' + group.storage + ' option').appendTo('#' + group.view); try { $('#' + group.view + ' option').removeAttr('selected'); } catch (ex) { } if (settings[group.index].useSorting) { SortOptions(group); } if (settings[group.index].useCounters) { UpdateLabel(group); } } function IsMoveMode(currSettings) { return currSettings.transferMode == 'move'; } })(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/jquery.inputlimiter.min.js b/src/bb-themes/admin_default/js/forms/jquery.inputlimiter.min.js new file mode 100755 index 000000000..7420e32e7 --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/jquery.inputlimiter.min.js @@ -0,0 +1,7 @@ +(function($){$.fn.inputlimiter=function(options){var opts=$.extend({},$.fn.inputlimiter.defaults,options);if(opts.boxAttach&&!$('#'+opts.boxId).length){$('
              ').appendTo("body").attr({id:opts.boxId,'class':opts.boxClass}).css({'position':'absolute'}).hide();if($.fn.bgiframe){$('#'+opts.boxId).bgiframe();}} +var inputlimiterKeyup=function(e){if(!opts.allowExceed&&$(this).val().length>opts.limit){$(this).val($(this).val().substring(0,opts.limit));} +if(opts.boxAttach){$('#'+opts.boxId).css({'width':$(this).outerWidth()-($('#'+opts.boxId).outerWidth()-$('#'+opts.boxId).width())+'px','left':$(this).offset().left+'px','top':($(this).offset().top+$(this).outerHeight())-1+'px','z-index':2000});} +var charsRemaining=opts.limit-$(this).val().length,remText=opts.remTextFilter(opts,charsRemaining),limitText=opts.limitTextFilter(opts);if(opts.limitTextShow){$('#'+opts.boxId).html(remText+' '+limitText);var textWidth=$("").appendTo("body").attr({id:'19cc9195583bfae1fad88e19d443be7a','class':opts.boxClass}).html(remText+' '+limitText).innerWidth();$("#19cc9195583bfae1fad88e19d443be7a").remove();if(textWidth>$('#'+opts.boxId).innerWidth()){$('#'+opts.boxId).html(remText+'
              '+limitText);} +$('#'+opts.boxId).show();}else{$('#'+opts.boxId).html(remText).show();}},inputlimiterKeypress=function(e){if(!opts.allowExceed&&(!e.keyCode||(e.keyCode>46&&e.keyCode<90)||e.keyCode===13)&&$(this).val().length>=opts.limit){return false;}},inputlimiterBlur=function(){if(opts.boxAttach){$('#'+opts.boxId).fadeOut('fast');}else if(opts.remTextHideOnBlur){var limitText=opts.limitText;limitText=limitText.replace(/\%n/g,opts.limit);limitText=limitText.replace(/\%s/g,(opts.limit===1?'':'s'));$('#'+opts.boxId).html(limitText);}} +$(this).each(function(i){$(this).bind('keyup',inputlimiterKeyup);$(this).bind('keypress',inputlimiterKeypress);$(this).bind('blur',inputlimiterBlur);});};$.fn.inputlimiter.remtextfilter=function(opts,charsRemaining){var remText=opts.remText;if(charsRemaining===0&&opts.remFullText!==null){remText=opts.remFullText;} +remText=remText.replace(/\%n/g,charsRemaining);remText=remText.replace(/\%s/g,(opts.zeroPlural?(charsRemaining===1?'':'s'):(charsRemaining<=1?'':'s')));return remText;};$.fn.inputlimiter.limittextfilter=function(opts){var limitText=opts.limitText;limitText=limitText.replace(/\%n/g,opts.limit);limitText=limitText.replace(/\%s/g,(opts.limit<=1?'':'s'));return limitText;};$.fn.inputlimiter.defaults={limit:255,boxAttach:true,boxId:'limiterBox',boxClass:'limiterBox',remText:'%n character%s remaining.',remTextFilter:$.fn.inputlimiter.remtextfilter,remTextHideOnBlur:true,remFullText:null,limitTextShow:true,limitText:'Field limited to %n character%s.',limitTextFilter:$.fn.inputlimiter.limittextfilter,zeroPlural:true,allowExceed:false};})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/forms/jquery.maskedinput.min.js b/src/bb-themes/admin_default/js/forms/jquery.maskedinput.min.js new file mode 100755 index 000000000..c4742a04b --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/jquery.maskedinput.min.js @@ -0,0 +1,258 @@ +/* + Masked Input plugin for jQuery + Copyright (c) 2007-2011 Josh Bush (digitalbush.com) + Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license) + Version: 1.3 +*/ +(function($) { + var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask"; + var iPhone = (window.orientation != undefined); + + $.mask = { + //Predefined character definitions + definitions: { + '9': "[0-9]", + 'a': "[A-Za-z]", + '*': "[A-Za-z0-9]" + }, + dataName:"rawMaskFn" + }; + + $.fn.extend({ + //Helper Function for Caret positioning + caret: function(begin, end) { + if (this.length == 0) return; + if (typeof begin == 'number') { + end = (typeof end == 'number') ? end : begin; + return this.each(function() { + if (this.setSelectionRange) { + this.setSelectionRange(begin, end); + } else if (this.createTextRange) { + var range = this.createTextRange(); + range.collapse(true); + range.moveEnd('character', end); + range.moveStart('character', begin); + range.select(); + } + }); + } else { + if (this[0].setSelectionRange) { + begin = this[0].selectionStart; + end = this[0].selectionEnd; + } else if (document.selection && document.selection.createRange) { + var range = document.selection.createRange(); + begin = 0 - range.duplicate().moveStart('character', -100000); + end = begin + range.text.length; + } + return { begin: begin, end: end }; + } + }, + unmask: function() { return this.trigger("unmask"); }, + mask: function(mask, settings) { + if (!mask && this.length > 0) { + var input = $(this[0]); + return input.data($.mask.dataName)(); + } + settings = $.extend({ + placeholder: "_", + completed: null + }, settings); + + var defs = $.mask.definitions; + var tests = []; + var partialPosition = mask.length; + var firstNonMaskPos = null; + var len = mask.length; + + $.each(mask.split(""), function(i, c) { + if (c == '?') { + len--; + partialPosition = i; + } else if (defs[c]) { + tests.push(new RegExp(defs[c])); + if(firstNonMaskPos==null) + firstNonMaskPos = tests.length - 1; + } else { + tests.push(null); + } + }); + + return this.trigger("unmask").each(function() { + var input = $(this); + var buffer = $.map(mask.split(""), function(c, i) { if (c != '?') return defs[c] ? settings.placeholder : c }); + var focusText = input.val(); + + function seekNext(pos) { + while (++pos <= len && !tests[pos]); + return pos; + }; + function seekPrev(pos) { + while (--pos >= 0 && !tests[pos]); + return pos; + }; + + function shiftL(begin,end) { + if(begin<0) + return; + for (var i = begin,j = seekNext(end); i < len; i++) { + if (tests[i]) { + if (j < len && tests[i].test(buffer[j])) { + buffer[i] = buffer[j]; + buffer[j] = settings.placeholder; + } else + break; + j = seekNext(j); + } + } + writeBuffer(); + input.caret(Math.max(firstNonMaskPos, begin)); + }; + + function shiftR(pos) { + for (var i = pos, c = settings.placeholder; i < len; i++) { + if (tests[i]) { + var j = seekNext(i); + var t = buffer[i]; + buffer[i] = c; + if (j < len && tests[j].test(t)) + c = t; + else + break; + } + } + }; + + function keydownEvent(e) { + var k=e.which; + + //backspace, delete, and escape get special treatment + if(k == 8 || k == 46 || (iPhone && k == 127)){ + var pos = input.caret(), + begin = pos.begin, + end = pos.end; + + if(end-begin==0){ + begin=k!=46?seekPrev(begin):(end=seekNext(begin-1)); + end=k==46?seekNext(end):end; + } + clearBuffer(begin, end); + shiftL(begin,end-1); + + return false; + } else if (k == 27) {//escape + input.val(focusText); + input.caret(0, checkVal()); + return false; + } + }; + + function keypressEvent(e) { + var k = e.which, + pos = input.caret(); + if (e.ctrlKey || e.altKey || e.metaKey || k<32) {//Ignore + return true; + } else if (k) { + if(pos.end-pos.begin!=0){ + clearBuffer(pos.begin, pos.end); + shiftL(pos.begin, pos.end-1); + } + + var p = seekNext(pos.begin - 1); + if (p < len) { + var c = String.fromCharCode(k); + if (tests[p].test(c)) { + shiftR(p); + buffer[p] = c; + writeBuffer(); + var next = seekNext(p); + input.caret(next); + if (settings.completed && next >= len) + settings.completed.call(input); + } + } + return false; + } + }; + + function clearBuffer(start, end) { + for (var i = start; i < end && i < len; i++) { + if (tests[i]) + buffer[i] = settings.placeholder; + } + }; + + function writeBuffer() { return input.val(buffer.join('')).val(); }; + + function checkVal(allow) { + //try to place characters where they belong + var test = input.val(); + var lastMatch = -1; + for (var i = 0, pos = 0; i < len; i++) { + if (tests[i]) { + buffer[i] = settings.placeholder; + while (pos++ < test.length) { + var c = test.charAt(pos - 1); + if (tests[i].test(c)) { + buffer[i] = c; + lastMatch = i; + break; + } + } + if (pos > test.length) + break; + } else if (buffer[i] == test.charAt(pos) && i!=partialPosition) { + pos++; + lastMatch = i; + } + } + if (!allow && lastMatch + 1 < partialPosition) { + input.val(""); + clearBuffer(0, len); + } else if (allow || lastMatch + 1 >= partialPosition) { + writeBuffer(); + if (!allow) input.val(input.val().substring(0, lastMatch + 1)); + } + return (partialPosition ? i : firstNonMaskPos); + }; + + input.data($.mask.dataName,function(){ + return $.map(buffer, function(c, i) { + return tests[i]&&c!=settings.placeholder ? c : null; + }).join(''); + }) + + if (!input.attr("readonly")) + input + .one("unmask", function() { + input + .unbind(".mask") + .removeData($.mask.dataName); + }) + .bind("focus.mask", function() { + focusText = input.val(); + var pos = checkVal(); + writeBuffer(); + var moveCaret=function(){ + if (pos == mask.length) + input.caret(0, pos); + else + input.caret(pos); + }; + ($.browser.msie ? moveCaret:function(){setTimeout(moveCaret,0)})(); + }) + .bind("blur.mask", function() { + checkVal(); + if (input.val() != focusText) + input.change(); + }) + .bind("keydown.mask", keydownEvent) + .bind("keypress.mask", keypressEvent) + .bind(pasteEventName, function() { + setTimeout(function() { input.caret(checkVal(true)); }, 0); + }); + + checkVal(); //Perform initial check for existing values + }); + } + }); +})(jQuery); diff --git a/src/bb-themes/admin_default/js/forms/jquery.tagsinput.min.js b/src/bb-themes/admin_default/js/forms/jquery.tagsinput.min.js new file mode 100755 index 000000000..038fc6045 --- /dev/null +++ b/src/bb-themes/admin_default/js/forms/jquery.tagsinput.min.js @@ -0,0 +1 @@ +(function(a){var b=new Array;var c=new Array;a.fn.doAutosize=function(b){var c=a(this).data("minwidth"),d=a(this).data("maxwidth"),e="",f=a(this),g=a("#"+a(this).data("tester_id"));if(e===(e=f.val())){return}var h=e.replace(/&/g,"&").replace(/\s/g," ").replace(//g,">");g.html(h);var i=g.width(),j=i+b.comfortZone>=c?i+b.comfortZone:c,k=f.width(),l=j=c||j>c&&j").css({position:"absolute",top:-9999,left:-9999,width:"auto",fontSize:f.css("fontSize"),fontFamily:f.css("fontFamily"),fontWeight:f.css("fontWeight"),letterSpacing:f.css("letterSpacing"),whiteSpace:"nowrap"}),h=a(this).attr("id")+"_autosize_tester";if(!a("#"+h).length>0){g.attr("id",h);g.appendTo("body")}f.data("minwidth",c);f.data("maxwidth",d);f.data("tester_id",h);f.css("width",c)};a.fn.addTag=function(d,e){e=jQuery.extend({focus:false,callback:true},e);this.each(function(){var f=a(this).attr("id");var g=a(this).val().split(b[f]);if(g[0]==""){g=new Array}d=jQuery.trim(d);if(e.unique){var h=a(g).tagExist(d);if(h==true){a("#"+f+"_tag").addClass("not_valid")}}else{var h=false}if(d!=""&&h!=true){a("").addClass("tag").append(a("").text(d).append("  "),a("",{href:"#",title:"Removing tag",text:"x"}).click(function(){return a("#"+f).removeTag(escape(d))})).insertBefore("#"+f+"_addTag");g.push(d);a("#"+f+"_tag").val("");if(e.focus){a("#"+f+"_tag").focus()}else{a("#"+f+"_tag").blur()}a.fn.tagsInput.updateTagsField(this,g);if(e.callback&&c[f]&&c[f]["onAddTag"]){var i=c[f]["onAddTag"];i.call(this,d)}if(c[f]&&c[f]["onChange"]){var j=g.length;var i=c[f]["onChange"];i.call(this,a(this),g[j-1])}}});return false};a.fn.removeTag=function(d){d=unescape(d);this.each(function(){var e=a(this).attr("id");var f=a(this).val().split(b[e]);a("#"+e+"_tagsinput .tag").remove();str="";for(i=0;i=0};a.fn.importTags=function(b){id=a(this).attr("id");a("#"+id+"_tagsinput .tag").remove();a.fn.tagsInput.importTags(this,b)};a.fn.tagsInput=function(d){var e=jQuery.extend({interactive:true,defaultText:"add a tag",minChars:0,autocomplete:{selectFirst:false},hide:true,delimiter:",",unique:true,removeWithBackspace:true,placeholderColor:"#666666",autosize:true,comfortZone:20,inputPadding:6*2},d);this.each(function(){if(e.hide){a(this).hide()}var d=a(this).attr("id");var f=jQuery.extend({pid:d,real_input:"#"+d,holder:"#"+d+"_tagsinput",input_wrapper:"#"+d+"_addTag",fake_input:"#"+d+"_tag"},e);b[d]=f.delimiter;if(e.onAddTag||e.onRemoveTag||e.onChange){c[d]=new Array;c[d]["onAddTag"]=e.onAddTag;c[d]["onRemoveTag"]=e.onRemoveTag;c[d]["onChange"]=e.onChange}var g='
              ';if(e.interactive){g=g+''}g=g+'
              ';a(g).insertAfter(this);a(f.holder).css("width",e.width);a(f.holder).css("height",e.height);if(a(f.real_input).val()!=""){a.fn.tagsInput.importTags(a(f.real_input),a(f.real_input).val())}if(e.interactive){a(f.fake_input).val(a(f.fake_input).attr("data-default"));a(f.fake_input).css("color",e.placeholderColor);a(f.fake_input).resetAutosize(e);a(f.holder).bind("click",f,function(b){a(b.data.fake_input).focus()});a(f.fake_input).bind("focus",f,function(b){if(a(b.data.fake_input).val()==a(b.data.fake_input).attr("data-default")){a(b.data.fake_input).val("")}a(b.data.fake_input).css("color","#000000")});if(e.autocomplete_url!=undefined){autocomplete_options={source:e.autocomplete_url};for(attrname in e.autocomplete){autocomplete_options[attrname]=e.autocomplete[attrname]}if(jQuery.Autocompleter!==undefined){a(f.fake_input).autocomplete(e.autocomplete_url,e.autocomplete);a(f.fake_input).bind("result",f,function(b,c,f){if(c){a("#"+d).addTag(c[0]+"",{focus:true,unique:e.unique})}})}else if(jQuery.ui.autocomplete!==undefined){a(f.fake_input).autocomplete(autocomplete_options);a(f.fake_input).bind("autocompleteselect",f,function(b,c){a(b.data.real_input).addTag(c.item.value,{focus:true,unique:e.unique});return false})}}else{a(f.fake_input).bind("blur",f,function(b){var c=a(this).attr("data-default");if(a(b.data.fake_input).val()!=""&&a(b.data.fake_input).val()!=c){if(b.data.minChars<=a(b.data.fake_input).val().length&&(!b.data.maxChars||b.data.maxChars>=a(b.data.fake_input).val().length))a(b.data.real_input).addTag(a(b.data.fake_input).val(),{focus:true,unique:e.unique})}else{a(b.data.fake_input).val(a(b.data.fake_input).attr("data-default"));a(b.data.fake_input).css("color",e.placeholderColor)}return false})}a(f.fake_input).bind("keypress",f,function(b){if(b.which==b.data.delimiter.charCodeAt(0)||b.which==13){b.preventDefault();if(b.data.minChars<=a(b.data.fake_input).val().length&&(!b.data.maxChars||b.data.maxChars>=a(b.data.fake_input).val().length))a(b.data.real_input).addTag(a(b.data.fake_input).val(),{focus:true,unique:e.unique});a(b.data.fake_input).resetAutosize(e);return false}else if(b.data.autosize){a(b.data.fake_input).doAutosize(e)}});f.removeWithBackspace&&a(f.fake_input).bind("keydown",function(b){if(b.keyCode==8&&a(this).val()==""){b.preventDefault();var c=a(this).closest(".tagsinput").find(".tag:last").text();var d=a(this).attr("id").replace(/_tag$/,"");c=c.replace(/[\s]+x$/,"");a("#"+d).removeTag(escape(c));a(this).trigger("focus")}});a(f.fake_input).blur();if(f.unique){a(f.fake_input).keydown(function(b){if(b.keyCode==8||String.fromCharCode(b.which).match(/\w+|[áéíóúÁÉÍÓÚñÑ,/]+/)){a(this).removeClass("not_valid")}})}}return false});return this};a.fn.tagsInput.updateTagsField=function(c,d){var e=a(c).attr("id");a(c).val(d.join(b[e]))};a.fn.tagsInput.importTags=function(d,e){a(d).val("");var f=a(d).attr("id");var g=e.split(b[f]);for(i=0;i"; + options.isError = true; + + } + + } + // If the rules required is not added, an empty field is not validated + if(!required){ + if(field.val() == "") options.isError = false; + } + + // Hack for radio/checkbox group button, the validation go into the + // first radio/checkbox of the group + var fieldType = field.attr("type"); + + if ((fieldType == "radio" || fieldType == "checkbox") && $("input[name='" + fieldName + "']").size() > 1) { + field = $($("input[name='" + fieldName + "'][type!=hidden]:first")); + options.showArrow = false; + } + if (fieldType == "text" && $("input[name='" + fieldName + "']").size() > 1) { + field = $($("input[name='" + fieldName + "'][type!=hidden]:first")); + options.showArrow = false; + } + + if (options.isError){ + + methods._showPrompt(field, promptText, "", false, options); + }else{ + if (!isAjaxValidator) methods._closePrompt(field); + } + field.trigger("jqv.field.result", [field, options.isError, promptText]); + return options.isError; + }, + /** + * Required validation + * + * @param {jqObject} field + * @param {Array[String]} rules + * @param {int} i rules index + * @param {Map} + * user options + * @return an error string if validation failed + */ + _required: function(field, rules, i, options) { + switch (field.attr("type")) { + case "text": + case "password": + case "textarea": + case "file": + default: + if (!field.val()) + return options.allrules[rules[i]].alertText; + break; + case "radio": + case "checkbox": + var name = field.attr("name"); + if ($("input[name='" + name + "']:checked").size() == 0) { + if ($("input[name='" + name + "']").size() == 1) + return options.allrules[rules[i]].alertTextCheckboxe; + else + return options.allrules[rules[i]].alertTextCheckboxMultiple; + } + break; + // required for ');this._dialogInput.keydown(this._doKeyDown);d("body").append(this._dialogInput);a=this._dialogInst=this._newInst(this._dialogInput,false);a.settings={};d.data(this._dialogInput[0],"datepicker",a)}H(a.settings,e||{});b=b&&b.constructor==Date?this._formatDate(a,b):b;this._dialogInput.val(b);this._pos=f?f.length?f:[f.pageX,f.pageY]:null;if(!this._pos)this._pos=[document.documentElement.clientWidth/ +2-100+(document.documentElement.scrollLeft||document.body.scrollLeft),document.documentElement.clientHeight/2-150+(document.documentElement.scrollTop||document.body.scrollTop)];this._dialogInput.css("left",this._pos[0]+20+"px").css("top",this._pos[1]+"px");a.settings.onSelect=c;this._inDialog=true;this.dpDiv.addClass(this._dialogClass);this._showDatepicker(this._dialogInput[0]);d.blockUI&&d.blockUI(this.dpDiv);d.data(this._dialogInput[0],"datepicker",a);return this},_destroyDatepicker:function(a){var b= +d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();d.removeData(a,"datepicker");if(e=="input"){c.append.remove();c.trigger.remove();b.removeClass(this.markerClassName).unbind("focus",this._showDatepicker).unbind("keydown",this._doKeyDown).unbind("keypress",this._doKeyPress).unbind("keyup",this._doKeyUp)}else if(e=="div"||e=="span")b.removeClass(this.markerClassName).empty()}},_enableDatepicker:function(a){var b=d(a),c=d.data(a,"datepicker");if(b.hasClass(this.markerClassName)){var e= +a.nodeName.toLowerCase();if(e=="input"){a.disabled=false;c.trigger.filter("button").each(function(){this.disabled=false}).end().filter("img").css({opacity:"1.0",cursor:""})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().removeClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f==a?null:f})}},_disableDatepicker:function(a){var b=d(a),c=d.data(a, +"datepicker");if(b.hasClass(this.markerClassName)){var e=a.nodeName.toLowerCase();if(e=="input"){a.disabled=true;c.trigger.filter("button").each(function(){this.disabled=true}).end().filter("img").css({opacity:"0.5",cursor:"default"})}else if(e=="div"||e=="span"){b=b.children("."+this._inlineClass);b.children().addClass("ui-state-disabled");b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled","disabled")}this._disabledInputs=d.map(this._disabledInputs,function(f){return f== +a?null:f});this._disabledInputs[this._disabledInputs.length]=a}},_isDisabledDatepicker:function(a){if(!a)return false;for(var b=0;b-1}},_doKeyUp:function(a){a=d.datepicker._getInst(a.target);if(a.input.val()!=a.lastVal)try{if(d.datepicker.parseDate(d.datepicker._get(a,"dateFormat"),a.input?a.input.val():null,d.datepicker._getFormatConfig(a))){d.datepicker._setDateFromField(a);d.datepicker._updateAlternate(a);d.datepicker._updateDatepicker(a)}}catch(b){d.datepicker.log(b)}return true},_showDatepicker:function(a){a=a.target||a;if(a.nodeName.toLowerCase()!="input")a=d("input", +a.parentNode)[0];if(!(d.datepicker._isDisabledDatepicker(a)||d.datepicker._lastInput==a)){var b=d.datepicker._getInst(a);if(d.datepicker._curInst&&d.datepicker._curInst!=b){d.datepicker._datepickerShowing&&d.datepicker._triggerOnClose(d.datepicker._curInst);d.datepicker._curInst.dpDiv.stop(true,true)}var c=d.datepicker._get(b,"beforeShow");c=c?c.apply(a,[a,b]):{};if(c!==false){H(b.settings,c);b.lastVal=null;d.datepicker._lastInput=a;d.datepicker._setDateFromField(b);if(d.datepicker._inDialog)a.value= +"";if(!d.datepicker._pos){d.datepicker._pos=d.datepicker._findPos(a);d.datepicker._pos[1]+=a.offsetHeight}var e=false;d(a).parents().each(function(){e|=d(this).css("position")=="fixed";return!e});if(e&&d.browser.opera){d.datepicker._pos[0]-=document.documentElement.scrollLeft;d.datepicker._pos[1]-=document.documentElement.scrollTop}c={left:d.datepicker._pos[0],top:d.datepicker._pos[1]};d.datepicker._pos=null;b.dpDiv.empty();b.dpDiv.css({position:"absolute",display:"block",top:"-1000px"});d.datepicker._updateDatepicker(b); +c=d.datepicker._checkOffset(b,c,e);b.dpDiv.css({position:d.datepicker._inDialog&&d.blockUI?"static":e?"fixed":"absolute",display:"none",left:c.left+"px",top:c.top+"px"});if(!b.inline){c=d.datepicker._get(b,"showAnim");var f=d.datepicker._get(b,"duration"),h=function(){var i=b.dpDiv.find("iframe.ui-datepicker-cover");if(i.length){var g=d.datepicker._getBorders(b.dpDiv);i.css({left:-g[0],top:-g[1],width:b.dpDiv.outerWidth(),height:b.dpDiv.outerHeight()})}};b.dpDiv.zIndex(d(a).zIndex()+1);d.datepicker._datepickerShowing= +true;d.effects&&d.effects[c]?b.dpDiv.show(c,d.datepicker._get(b,"showOptions"),f,h):b.dpDiv[c||"show"](c?f:null,h);if(!c||!f)h();b.input.is(":visible")&&!b.input.is(":disabled")&&b.input.focus();d.datepicker._curInst=b}}}},_updateDatepicker:function(a){this.maxRows=4;var b=d.datepicker._getBorders(a.dpDiv);J=a;a.dpDiv.empty().append(this._generateHTML(a));var c=a.dpDiv.find("iframe.ui-datepicker-cover");c.length&&c.css({left:-b[0],top:-b[1],width:a.dpDiv.outerWidth(),height:a.dpDiv.outerHeight()}); +a.dpDiv.find("."+this._dayOverClass+" a").mouseover();b=this._getNumberOfMonths(a);c=b[1];a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");c>1&&a.dpDiv.addClass("ui-datepicker-multi-"+c).css("width",17*c+"em");a.dpDiv[(b[0]!=1||b[1]!=1?"add":"remove")+"Class"]("ui-datepicker-multi");a.dpDiv[(this._get(a,"isRTL")?"add":"remove")+"Class"]("ui-datepicker-rtl");a==d.datepicker._curInst&&d.datepicker._datepickerShowing&&a.input&&a.input.is(":visible")&& +!a.input.is(":disabled")&&a.input[0]!=document.activeElement&&a.input.focus();if(a.yearshtml){var e=a.yearshtml;setTimeout(function(){e===a.yearshtml&&a.yearshtml&&a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);e=a.yearshtml=null},0)}},_getBorders:function(a){var b=function(c){return{thin:1,medium:2,thick:3}[c]||c};return[parseFloat(b(a.css("border-left-width"))),parseFloat(b(a.css("border-top-width")))]},_checkOffset:function(a,b,c){var e=a.dpDiv.outerWidth(),f=a.dpDiv.outerHeight(), +h=a.input?a.input.outerWidth():0,i=a.input?a.input.outerHeight():0,g=document.documentElement.clientWidth+d(document).scrollLeft(),j=document.documentElement.clientHeight+d(document).scrollTop();b.left-=this._get(a,"isRTL")?e-h:0;b.left-=c&&b.left==a.input.offset().left?d(document).scrollLeft():0;b.top-=c&&b.top==a.input.offset().top+i?d(document).scrollTop():0;b.left-=Math.min(b.left,b.left+e>g&&g>e?Math.abs(b.left+e-g):0);b.top-=Math.min(b.top,b.top+f>j&&j>f?Math.abs(f+i):0);return b},_findPos:function(a){for(var b= +this._get(this._getInst(a),"isRTL");a&&(a.type=="hidden"||a.nodeType!=1||d.expr.filters.hidden(a));)a=a[b?"previousSibling":"nextSibling"];a=d(a).offset();return[a.left,a.top]},_triggerOnClose:function(a){var b=this._get(a,"onClose");if(b)b.apply(a.input?a.input[0]:null,[a.input?a.input.val():"",a])},_hideDatepicker:function(a){var b=this._curInst;if(!(!b||a&&b!=d.data(a,"datepicker")))if(this._datepickerShowing){a=this._get(b,"showAnim");var c=this._get(b,"duration"),e=function(){d.datepicker._tidyDialog(b); +this._curInst=null};d.effects&&d.effects[a]?b.dpDiv.hide(a,d.datepicker._get(b,"showOptions"),c,e):b.dpDiv[a=="slideDown"?"slideUp":a=="fadeIn"?"fadeOut":"hide"](a?c:null,e);a||e();d.datepicker._triggerOnClose(b);this._datepickerShowing=false;this._lastInput=null;if(this._inDialog){this._dialogInput.css({position:"absolute",left:"0",top:"-100px"});if(d.blockUI){d.unblockUI();d("body").append(this.dpDiv)}}this._inDialog=false}},_tidyDialog:function(a){a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")}, +_checkExternalClick:function(a){if(d.datepicker._curInst){a=d(a.target);a[0].id!=d.datepicker._mainDivId&&a.parents("#"+d.datepicker._mainDivId).length==0&&!a.hasClass(d.datepicker.markerClassName)&&!a.hasClass(d.datepicker._triggerClass)&&d.datepicker._datepickerShowing&&!(d.datepicker._inDialog&&d.blockUI)&&d.datepicker._hideDatepicker()}},_adjustDate:function(a,b,c){a=d(a);var e=this._getInst(a[0]);if(!this._isDisabledDatepicker(a[0])){this._adjustInstDate(e,b+(c=="M"?this._get(e,"showCurrentAtPos"): +0),c);this._updateDatepicker(e)}},_gotoToday:function(a){a=d(a);var b=this._getInst(a[0]);if(this._get(b,"gotoCurrent")&&b.currentDay){b.selectedDay=b.currentDay;b.drawMonth=b.selectedMonth=b.currentMonth;b.drawYear=b.selectedYear=b.currentYear}else{var c=new Date;b.selectedDay=c.getDate();b.drawMonth=b.selectedMonth=c.getMonth();b.drawYear=b.selectedYear=c.getFullYear()}this._notifyChange(b);this._adjustDate(a)},_selectMonthYear:function(a,b,c){a=d(a);var e=this._getInst(a[0]);e["selected"+(c=="M"? +"Month":"Year")]=e["draw"+(c=="M"?"Month":"Year")]=parseInt(b.options[b.selectedIndex].value,10);this._notifyChange(e);this._adjustDate(a)},_selectDay:function(a,b,c,e){var f=d(a);if(!(d(e).hasClass(this._unselectableClass)||this._isDisabledDatepicker(f[0]))){f=this._getInst(f[0]);f.selectedDay=f.currentDay=d("a",e).html();f.selectedMonth=f.currentMonth=b;f.selectedYear=f.currentYear=c;this._selectDate(a,this._formatDate(f,f.currentDay,f.currentMonth,f.currentYear))}},_clearDate:function(a){a=d(a); +this._getInst(a[0]);this._selectDate(a,"")},_selectDate:function(a,b){a=this._getInst(d(a)[0]);b=b!=null?b:this._formatDate(a);a.input&&a.input.val(b);this._updateAlternate(a);var c=this._get(a,"onSelect");if(c)c.apply(a.input?a.input[0]:null,[b,a]);else a.input&&a.input.trigger("change");if(a.inline)this._updateDatepicker(a);else{this._hideDatepicker();this._lastInput=a.input[0];typeof a.input[0]!="object"&&a.input.focus();this._lastInput=null}},_updateAlternate:function(a){var b=this._get(a,"altField"); +if(b){var c=this._get(a,"altFormat")||this._get(a,"dateFormat"),e=this._getDate(a),f=this.formatDate(c,e,this._getFormatConfig(a));d(b).each(function(){d(this).val(f)})}},noWeekends:function(a){a=a.getDay();return[a>0&&a<6,""]},iso8601Week:function(a){a=new Date(a.getTime());a.setDate(a.getDate()+4-(a.getDay()||7));var b=a.getTime();a.setMonth(0);a.setDate(1);return Math.floor(Math.round((b-a)/864E5)/7)+1},parseDate:function(a,b,c){if(a==null||b==null)throw"Invalid arguments";b=typeof b=="object"? +b.toString():b+"";if(b=="")return null;var e=(c?c.shortYearCutoff:null)||this._defaults.shortYearCutoff;e=typeof e!="string"?e:(new Date).getFullYear()%100+parseInt(e,10);for(var f=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,h=(c?c.dayNames:null)||this._defaults.dayNames,i=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort,g=(c?c.monthNames:null)||this._defaults.monthNames,j=c=-1,l=-1,u=-1,k=false,o=function(p){(p=A+1-1){j=1;l=u;do{e=this._getDaysInMonth(c,j-1);if(l<=e)break;j++;l-=e}while(1)}v=this._daylightSavingAdjust(new Date(c,j-1,l));if(v.getFullYear()!=c||v.getMonth()+1!=j||v.getDate()!=l)throw"Invalid date";return v},ATOM:"yy-mm-dd", +COOKIE:"D, dd M yy",ISO_8601:"yy-mm-dd",RFC_822:"D, d M y",RFC_850:"DD, dd-M-y",RFC_1036:"D, d M y",RFC_1123:"D, d M yy",RFC_2822:"D, d M yy",RSS:"D, d M y",TICKS:"!",TIMESTAMP:"@",W3C:"yy-mm-dd",_ticksTo1970:(718685+Math.floor(492.5)-Math.floor(19.7)+Math.floor(4.925))*24*60*60*1E7,formatDate:function(a,b,c){if(!b)return"";var e=(c?c.dayNamesShort:null)||this._defaults.dayNamesShort,f=(c?c.dayNames:null)||this._defaults.dayNames,h=(c?c.monthNamesShort:null)||this._defaults.monthNamesShort;c=(c?c.monthNames: +null)||this._defaults.monthNames;var i=function(o){(o=k+1 +12?a.getHours()+2:0);return a},_setDate:function(a,b,c){var e=!b,f=a.selectedMonth,h=a.selectedYear;b=this._restrictMinMax(a,this._determineDate(a,b,new Date));a.selectedDay=a.currentDay=b.getDate();a.drawMonth=a.selectedMonth=a.currentMonth=b.getMonth();a.drawYear=a.selectedYear=a.currentYear=b.getFullYear();if((f!=a.selectedMonth||h!=a.selectedYear)&&!c)this._notifyChange(a);this._adjustInstDate(a);if(a.input)a.input.val(e?"":this._formatDate(a))},_getDate:function(a){return!a.currentYear||a.input&& +a.input.val()==""?null:this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay))},_generateHTML:function(a){var b=new Date;b=this._daylightSavingAdjust(new Date(b.getFullYear(),b.getMonth(),b.getDate()));var c=this._get(a,"isRTL"),e=this._get(a,"showButtonPanel"),f=this._get(a,"hideIfNoPrevNext"),h=this._get(a,"navigationAsDateFormat"),i=this._getNumberOfMonths(a),g=this._get(a,"showCurrentAtPos"),j=this._get(a,"stepMonths"),l=i[0]!=1||i[1]!=1,u=this._daylightSavingAdjust(!a.currentDay? +new Date(9999,9,9):new Date(a.currentYear,a.currentMonth,a.currentDay)),k=this._getMinMaxDate(a,"min"),o=this._getMinMaxDate(a,"max");g=a.drawMonth-g;var m=a.drawYear;if(g<0){g+=12;m--}if(o){var n=this._daylightSavingAdjust(new Date(o.getFullYear(),o.getMonth()-i[0]*i[1]+1,o.getDate()));for(n=k&&nn;){g--;if(g<0){g=11;m--}}}a.drawMonth=g;a.drawYear=m;n=this._get(a,"prevText");n=!h?n:this.formatDate(n,this._daylightSavingAdjust(new Date(m,g-j,1)),this._getFormatConfig(a)); +n=this._canAdjustMonth(a,-1,m,g)?'
              '+n+"":f?"":''+n+"";var s=this._get(a,"nextText");s=!h?s:this.formatDate(s,this._daylightSavingAdjust(new Date(m, +g+j,1)),this._getFormatConfig(a));f=this._canAdjustMonth(a,+1,m,g)?''+s+"":f?"":''+s+"";j=this._get(a,"currentText");s=this._get(a,"gotoCurrent")&& +a.currentDay?u:b;j=!h?j:this.formatDate(j,s,this._getFormatConfig(a));h=!a.inline?'":"";e=e?'
              '+(c?h:"")+(this._isInRange(a,s)?'":"")+(c?"":h)+"
              ":"";h=parseInt(this._get(a,"firstDay"),10);h=isNaN(h)?0:h;j=this._get(a,"showWeek");s=this._get(a,"dayNames");this._get(a,"dayNamesShort");var q=this._get(a,"dayNamesMin"),A=this._get(a,"monthNames"),v=this._get(a,"monthNamesShort"),p=this._get(a,"beforeShowDay"),D=this._get(a,"showOtherMonths"),K=this._get(a,"selectOtherMonths");this._get(a,"calculateWeek");for(var E=this._getDefaultDate(a),w="",x=0;x1)switch(G){case 0:y+=" ui-datepicker-group-first";t=" ui-corner-"+(c?"right":"left");break;case i[1]-1:y+=" ui-datepicker-group-last";t=" ui-corner-"+(c?"left":"right");break;default:y+=" ui-datepicker-group-middle";t="";break}y+='">'}y+='
              '+(/all|left/.test(t)&& +x==0?c?f:n:"")+(/all|right/.test(t)&&x==0?c?n:f:"")+this._generateMonthYearHeader(a,g,m,k,o,x>0||G>0,A,v)+'
              ';var z=j?'":"";for(t=0;t<7;t++){var r=(t+h)%7;z+="=5?' class="ui-datepicker-week-end"':"")+'>'+q[r]+""}y+=z+"";z=this._getDaysInMonth(m,g);if(m==a.selectedYear&&g==a.selectedMonth)a.selectedDay=Math.min(a.selectedDay, +z);t=(this._getFirstDayOfMonth(m,g)-h+7)%7;z=Math.ceil((t+z)/7);this.maxRows=z=l?this.maxRows>z?this.maxRows:z:z;r=this._daylightSavingAdjust(new Date(m,g,1-t));for(var Q=0;Q";var R=!j?"":'";for(t=0;t<7;t++){var I=p?p.apply(a.input?a.input[0]:null,[r]):[true,""],F=r.getMonth()!=g,L=F&&!K||!I[0]||k&&ro;R+='";r.setDate(r.getDate()+1);r=this._daylightSavingAdjust(r)}y+=R+""}g++;if(g>11){g=0;m++}y+="
              '+this._get(a,"weekHeader")+"
              '+this._get(a,"calculateWeek")(r)+""+(F&&!D?" ":L?''+ +r.getDate()+"":''+r.getDate()+"")+"
              "+(l?"
              "+(i[0]>0&&G==i[1]-1?'
              ':""):"");O+=y}w+=O}w+=e+(d.browser.msie&&parseInt(d.browser.version,10)<7&&!a.inline?'': +"");a._keyEvent=false;return w},_generateMonthYearHeader:function(a,b,c,e,f,h,i,g){var j=this._get(a,"changeMonth"),l=this._get(a,"changeYear"),u=this._get(a,"showMonthAfterYear"),k='
              ',o="";if(h||!j)o+=''+i[b]+"";else{i=e&&e.getFullYear()==c;var m=f&&f.getFullYear()==c;o+='"}u||(k+=o+(h||!(j&&l)?" ":""));if(!a.yearshtml){a.yearshtml="";if(h||!l)k+=''+c+"";else{g=this._get(a,"yearRange").split(":");var s=(new Date).getFullYear();i=function(q){q=q.match(/c[+-].*/)?c+parseInt(q.substring(1),10):q.match(/[+-].*/)?s+parseInt(q,10):parseInt(q,10);return isNaN(q)?s:q};b=i(g[0]);g=Math.max(b,i(g[1]||""));b=e?Math.max(b, +e.getFullYear()):b;g=f?Math.min(g,f.getFullYear()):g;for(a.yearshtml+='";k+=a.yearshtml;a.yearshtml=null}}k+=this._get(a,"yearSuffix");if(u)k+=(h||!(j&&l)?" ":"")+o;k+="
              ";return k},_adjustInstDate:function(a,b,c){var e=a.drawYear+(c=="Y"?b:0),f=a.drawMonth+ +(c=="M"?b:0);b=Math.min(a.selectedDay,this._getDaysInMonth(e,f))+(c=="D"?b:0);e=this._restrictMinMax(a,this._daylightSavingAdjust(new Date(e,f,b)));a.selectedDay=e.getDate();a.drawMonth=a.selectedMonth=e.getMonth();a.drawYear=a.selectedYear=e.getFullYear();if(c=="M"||c=="Y")this._notifyChange(a)},_restrictMinMax:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");b=c&&ba?a:b},_notifyChange:function(a){var b=this._get(a,"onChangeMonthYear");if(b)b.apply(a.input? +a.input[0]:null,[a.selectedYear,a.selectedMonth+1,a])},_getNumberOfMonths:function(a){a=this._get(a,"numberOfMonths");return a==null?[1,1]:typeof a=="number"?[1,a]:a},_getMinMaxDate:function(a,b){return this._determineDate(a,this._get(a,b+"Date"),null)},_getDaysInMonth:function(a,b){return 32-this._daylightSavingAdjust(new Date(a,b,32)).getDate()},_getFirstDayOfMonth:function(a,b){return(new Date(a,b,1)).getDay()},_canAdjustMonth:function(a,b,c,e){var f=this._getNumberOfMonths(a);c=this._daylightSavingAdjust(new Date(c, +e+(b<0?b:f[0]*f[1]),1));b<0&&c.setDate(this._getDaysInMonth(c.getFullYear(),c.getMonth()));return this._isInRange(a,c)},_isInRange:function(a,b){var c=this._getMinMaxDate(a,"min");a=this._getMinMaxDate(a,"max");return(!c||b.getTime()>=c.getTime())&&(!a||b.getTime()<=a.getTime())},_getFormatConfig:function(a){var b=this._get(a,"shortYearCutoff");b=typeof b!="string"?b:(new Date).getFullYear()%100+parseInt(b,10);return{shortYearCutoff:b,dayNamesShort:this._get(a,"dayNamesShort"),dayNames:this._get(a, +"dayNames"),monthNamesShort:this._get(a,"monthNamesShort"),monthNames:this._get(a,"monthNames")}},_formatDate:function(a,b,c,e){if(!b){a.currentDay=a.selectedDay;a.currentMonth=a.selectedMonth;a.currentYear=a.selectedYear}b=b?typeof b=="object"?b:this._daylightSavingAdjust(new Date(e,c,b)):this._daylightSavingAdjust(new Date(a.currentYear,a.currentMonth,a.currentDay));return this.formatDate(this._get(a,"dateFormat"),b,this._getFormatConfig(a))}});d.fn.datepicker=function(a){if(!this.length)return this; +if(!d.datepicker.initialized){d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);d.datepicker.initialized=true}var b=Array.prototype.slice.call(arguments,1);if(typeof a=="string"&&(a=="isDisabled"||a=="getDate"||a=="widget"))return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));if(a=="option"&&arguments.length==2&&typeof arguments[1]=="string")return d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this[0]].concat(b));return this.each(function(){typeof a== +"string"?d.datepicker["_"+a+"Datepicker"].apply(d.datepicker,[this].concat(b)):d.datepicker._attachDatepicker(this,a)})};d.datepicker=new M;d.datepicker.initialized=false;d.datepicker.uuid=(new Date).getTime();d.datepicker.version="1.8.16";window["DP_jQuery_"+B]=d})(jQuery); +; \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/jquery.ToTop.js b/src/bb-themes/admin_default/js/jquery.ToTop.js new file mode 100644 index 000000000..bceb1a4ab --- /dev/null +++ b/src/bb-themes/admin_default/js/jquery.ToTop.js @@ -0,0 +1,57 @@ +(function($){ + + + + +/* ===== UItoTop jQuery Plugin 1.1 (http://www.mattvarone.com/web-design/uitotop-jquery-plugin/) ===== */ + + $.fn.UItoTop = function(options) { + + var defaults = { + text: 'To Top', + min: 200, + inDelay:600, + outDelay:400, + containerID: 'toTop', + containerHoverID: 'toTopHover', + scrollSpeed: 100, + easingType: 'linear' + }; + + var settings = $.extend(defaults, options); + var containerIDhash = '#' + settings.containerID; + var containerHoverIDHash = '#'+settings.containerHoverID; + + $('body').append(''+settings.text+''); + $(containerIDhash).hide().click(function(){ + $('html, body').animate({scrollTop:0}, settings.scrollSpeed, settings.easingType); + $('#'+settings.containerHoverID, this).stop().animate({'opacity': 0 }, settings.inDelay, settings.easingType); + return false; + }) + .prepend('') + .hover(function() { + $(containerHoverIDHash, this).stop().animate({ + 'opacity': 1 + }, 300, 'linear'); + }, function() { + $(containerHoverIDHash, this).stop().animate({ + 'opacity': 0 + }, 300, 'linear'); + }); + + $(window).scroll(function() { + var sd = $(window).scrollTop(); + if(typeof document.body.style.maxHeight === "undefined") { + $(containerIDhash).css({ + 'position': 'absolute', + 'top': $(window).scrollTop() + $(window).height() - 50 + }); + } + if ( sd > settings.min ) + $(containerIDhash).fadeIn(settings.inDelay); + else + $(containerIDhash).fadeOut(settings.Outdelay); + }); + +}; +})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/jquery.collapsible.min.js b/src/bb-themes/admin_default/js/jquery.collapsible.min.js new file mode 100644 index 000000000..fe83af20a --- /dev/null +++ b/src/bb-themes/admin_default/js/jquery.collapsible.min.js @@ -0,0 +1,11 @@ +/** + * Collapsible, jQuery Plugin + * + * This plugin enables the management of + * collapsibles on the page with cookie support. + * + * Copyright (c) 2010 John Snyder (snyderplace.com) + * @license http://www.snyderplace.com/collapsible/license.txt New BSD + * @version 1.1 + */ +(function($){$.fn.collapsible=function(cmd,arg){if(typeof cmd=='string'){return $.fn.collapsible.dispatcher[cmd](this,arg);}return $.fn.collapsible.dispatcher['_create'](this,cmd);};$.fn.collapsible.dispatcher={_create:function(obj,arg){createCollapsible(obj,arg);},toggle:function(obj){toggle(obj,loadOpts(obj));return obj;},open:function(obj){open(obj,loadOpts(obj));return obj;},close:function(obj){close(obj,loadOpts(obj));return obj;},collapsed:function(obj){return collapsed(obj,loadOpts(obj));}};function createCollapsible(obj,options){var opts=$.extend({},$.fn.collapsible.defaults,options);var opened=new Array();obj.each(function(){var $this=$(this);saveOpts($this,opts);if(opts.bind=='mouseenter'){$this.bind('mouseenter',function(e){e.preventDefault();toggle($this,opts);});}if(opts.bind=='mouseover'){$this.bind('mouseover',function(e){e.preventDefault();toggle($this,opts);});}if(opts.bind=='click'){$this.bind('click',function(e){e.preventDefault();toggle($this,opts);});}if(opts.bind=='dblclick'){$this.bind('dblclick',function(e){e.preventDefault();toggle($this,opts);});}id=$this.attr('id');if(!useCookies(opts)){dOpenIndex=inDefaultOpen(id,opts);if(dOpenIndex===false){$this.addClass(opts.cssClose);$this.next().hide();}else{$this.addClass(opts.cssOpen);$this.next().show();opened.push(id);}}else{if(issetCookie(opts)){cookieIndex=inCookie(id,opts);if(cookieIndex===false){$this.addClass(opts.cssClose);$this.next().hide();}else{$this.addClass(opts.cssOpen);$this.next().show();opened.push(id);}}else{dOpenIndex=inDefaultOpen(id,opts);if(dOpenIndex===false){$this.addClass(opts.cssClose);$this.next().hide();}else{$this.addClass(opts.cssOpen);$this.next().show();opened.push(id);}}}});if(opened.length>0&&useCookies(opts)){setCookie(opened.toString(),opts);}else{setCookie('',opts);}return obj;};function loadOpts($this){return $this.data('collapsible-opts');}function saveOpts($this,opts){return $this.data('collapsible-opts',opts);}function collapsed($this,opts){return $this.hasClass(opts.cssClose);}function close($this,opts){$this.addClass(opts.cssClose).removeClass(opts.cssOpen);opts.animateOpen($this,opts);if(useCookies(opts)){id=$this.attr('id');unsetCookieId(id,opts);}}function open($this,opts){$this.removeClass(opts.cssClose).addClass(opts.cssOpen);opts.animateClose($this,opts);if(useCookies(opts)){id=$this.attr('id');appendCookie(id,opts);}}function toggle($this,opts){if(collapsed($this,opts)){open($this,opts);}else{close($this,opts);}return false;}function useCookies(opts){if(!$.cookie||opts.cookieName==''){return false;}return true;}function appendCookie(value,opts){if(!useCookies(opts)){return false;}if(!issetCookie(opts)){setCookie(value,opts);return true;}if(inCookie(value,opts)){return true;}cookie=$.cookie(opts.cookieName);cookie=unescape(cookie);cookieArray=cookie.split(',');cookieArray.push(value);setCookie(cookieArray.toString(),opts);return true;}function unsetCookieId(value,opts){if(!useCookies(opts)){return false;}if(!issetCookie(opts)){return true;}cookieIndex=inCookie(value,opts);if(cookieIndex===false){return true;}cookie=$.cookie(opts.cookieName);cookie=unescape(cookie);cookieArray=cookie.split(',');cookieArray.splice(cookieIndex,1);setCookie(cookieArray.toString(),opts);}function setCookie(value,opts){if(!useCookies(opts)){return false;}$.cookie(opts.cookieName,value,opts.cookieOptions);}function inCookie(value,opts){if(!useCookies(opts)){return false;}if(!issetCookie(opts)){return false;}cookie=unescape($.cookie(opts.cookieName));cookieArray=cookie.split(',');cookieIndex=$.inArray(value,cookieArray);if(cookieIndex==-1){return false;}return cookieIndex;}function issetCookie(opts){if(!useCookies(opts)){return false;}if($.cookie(opts.cookieName)==null){return false;}return true;}function inDefaultOpen(id,opts){defaultOpen=getDefaultOpen(opts);index=$.inArray(id,defaultOpen);if(index==-1){return false;}return index;}function getDefaultOpen(opts){defaultOpen=new Array();if(opts.defaultOpen!=''){defaultOpen=opts.defaultOpen.split(',');}return defaultOpen;}$.fn.collapsible.defaults={cssClose:'collapse-close',cssOpen:'collapse-open',cookieName:'collapsible',cookieOptions:{path:'/',expires:7,domain:'',secure:''},defaultOpen:'',speed:'slow',bind:'click',animateOpen:function(elem,opts){elem.next().slideUp(opts.speed);},animateClose:function(elem,opts){elem.next().slideDown(opts.speed);}};})(jQuery); \ No newline at end of file diff --git a/src/bb-themes/admin_default/js/jquery.jeditable.min.js b/src/bb-themes/admin_default/js/jquery.jeditable.min.js new file mode 100644 index 000000000..ef885f060 --- /dev/null +++ b/src/bb-themes/admin_default/js/jquery.jeditable.min.js @@ -0,0 +1,38 @@ + +(function($){$.fn.editable=function(target,options){if('disable'==target){$(this).data('disabled.editable',true);return;} +if('enable'==target){$(this).data('disabled.editable',false);return;} +if('destroy'==target){$(this).unbind($(this).data('event.editable')).removeData('disabled.editable').removeData('event.editable');return;} +var settings=$.extend({},$.fn.editable.defaults,{target:target},options);var plugin=$.editable.types[settings.type].plugin||function(){};var submit=$.editable.types[settings.type].submit||function(){};var buttons=$.editable.types[settings.type].buttons||$.editable.types['defaults'].buttons;var content=$.editable.types[settings.type].content||$.editable.types['defaults'].content;var element=$.editable.types[settings.type].element||$.editable.types['defaults'].element;var reset=$.editable.types[settings.type].reset||$.editable.types['defaults'].reset;var callback=settings.callback||function(){};var onedit=settings.onedit||function(){};var onsubmit=settings.onsubmit||function(){};var onreset=settings.onreset||function(){};var onerror=settings.onerror||reset;if(settings.tooltip){$(this).attr('title',settings.tooltip);} +settings.autowidth='auto'==settings.width;settings.autoheight='auto'==settings.height;return this.each(function(){var self=this;var savedwidth=$(self).width();var savedheight=$(self).height();$(this).data('event.editable',settings.event);if(!$.trim($(this).html())){$(this).html(settings.placeholder);} +$(this).bind(settings.event,function(e){if(true===$(this).data('disabled.editable')){return;} +if(self.editing){return;} +if(false===onedit.apply(this,[settings,self])){return;} +e.preventDefault();e.stopPropagation();if(settings.tooltip){$(self).removeAttr('title');} +if(0==$(self).width()){settings.width=savedwidth;settings.height=savedheight;}else{if(settings.width!='none'){settings.width=settings.autowidth?$(self).width():settings.width;} +if(settings.height!='none'){settings.height=settings.autoheight?$(self).height():settings.height;}} +if($(this).html().toLowerCase().replace(/(;|")/g,'')==settings.placeholder.toLowerCase().replace(/(;|")/g,'')){$(this).html('');} +self.editing=true;self.revert=$(self).html();$(self).html('');var form=$('
              ');if(settings.cssclass){if('inherit'==settings.cssclass){form.attr('class',$(self).attr('class'));}else{form.attr('class',settings.cssclass);}} +if(settings.style){if('inherit'==settings.style){form.attr('style',$(self).attr('style'));form.css('display',$(self).css('display'));}else{form.attr('style',settings.style);}} +var input=element.apply(form,[settings,self]);var input_content;if(settings.loadurl){var t=setTimeout(function(){input.disabled=true;content.apply(form,[settings.loadtext,settings,self]);},100);var loaddata={};loaddata[settings.id]=self.id;if($.isFunction(settings.loaddata)){$.extend(loaddata,settings.loaddata.apply(self,[self.revert,settings]));}else{$.extend(loaddata,settings.loaddata);} +$.ajax({type:settings.loadtype,url:settings.loadurl,data:loaddata,async:false,success:function(result){window.clearTimeout(t);input_content=result;input.disabled=false;}});}else if(settings.data){input_content=settings.data;if($.isFunction(settings.data)){input_content=settings.data.apply(self,[self.revert,settings]);}}else{input_content=self.revert;} +content.apply(form,[input_content,settings,self]);input.attr('name',settings.name);buttons.apply(form,[settings,self]);$(self).append(form);plugin.apply(form,[settings,self]);$(':input:visible:enabled:first',form).focus();if(settings.select){input.select();} +input.keydown(function(e){if(e.keyCode==27){e.preventDefault();reset.apply(form,[settings,self]);}});var t;if('cancel'==settings.onblur){input.blur(function(e){t=setTimeout(function(){reset.apply(form,[settings,self]);},500);});}else if('submit'==settings.onblur){input.blur(function(e){t=setTimeout(function(){form.submit();},200);});}else if($.isFunction(settings.onblur)){input.blur(function(e){settings.onblur.apply(self,[input.val(),settings]);});}else{input.blur(function(e){});} +form.submit(function(e){if(t){clearTimeout(t);} +e.preventDefault();if(false!==onsubmit.apply(form,[settings,self])){if(false!==submit.apply(form,[settings,self])){if($.isFunction(settings.target)){var str=settings.target.apply(self,[input.val(),settings]);$(self).html(str);self.editing=false;callback.apply(self,[self.innerHTML,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}}else{var submitdata={};submitdata[settings.name]=input.val();submitdata[settings.id]=self.id;if($.isFunction(settings.submitdata)){$.extend(submitdata,settings.submitdata.apply(self,[self.revert,settings]));}else{$.extend(submitdata,settings.submitdata);} +if('PUT'==settings.method){submitdata['_method']='put';} +$(self).html(settings.indicator);var ajaxoptions={type:'POST',data:submitdata,dataType:'html',url:settings.target,success:function(result,status){if(ajaxoptions.dataType=='html'){$(self).html(result);} +self.editing=false;callback.apply(self,[result,settings]);if(!$.trim($(self).html())){$(self).html(settings.placeholder);}},error:function(xhr,status,error){onerror.apply(form,[settings,self,xhr]);}};$.extend(ajaxoptions,settings.ajaxoptions);$.ajax(ajaxoptions);}}} +$(self).attr('title',settings.tooltip);return false;});});this.reset=function(form){if(this.editing){if(false!==onreset.apply(form,[settings,self])){$(self).html(self.revert);self.editing=false;if(!$.trim($(self).html())){$(self).html(settings.placeholder);} +if(settings.tooltip){$(self).attr('title',settings.tooltip);}}}};});};$.editable={types:{defaults:{element:function(settings,original){var input=$('');$(this).append(input);return(input);},content:function(string,settings,original){$(':input:first',this).val(string);},reset:function(settings,original){original.reset(this);},buttons:function(settings,original){var form=this;if(settings.submit){if(settings.submit.match(/>$/)){var submit=$(settings.submit).click(function(){if(submit.attr("type")!="submit"){form.submit();}});}else{var submit=$('
              + +
              +
              +
              + {% else %} + +
              +
              +
              +
              +
              +

              {% trans 'Sign in' %}

              +
              +
              + {% trans 'Login to client area' %} +

              + + +

              +

              + + +

              + + {% trans 'Reset password' %} +
              +
              +
              +
              +
              + +
              + + {% if not request.register %} +
              +

              {% trans 'Do not have an account yet?' %}

              + + {% if guest.extension_is_on({"mod":"oauth"}) %} + {% include "mod_oauth_buttons.phtml" with {"redirect_to":"cart"}%} + {% endif %} +
              + {% endif %} + +
              +

              {% trans 'Enter your details below' %}

              +
              + {% set r = guest.client_required %} +
              +
              + {% trans 'Create new profile' %} +

              + + +

              +

              + + +

              + + {% if 'last_name' in r %} +

              + + +

              + {% endif %} + + {% if 'company' in r %} +

              + + +

              + {% endif %} + + {% if 'birthday' in r %} +

              + + +

              + {% endif %} + + {% if 'gender' in r %} +

              + + +

              + {% endif %} + + {% if 'address_1' in r %} +

              + + +

              + {% endif %} + + {% if 'address_2' in r %} +

              + + +

              + {% endif %} + + {% if 'city' in r %} +

              + + +

              + {% endif %} + + {% if 'country' in r %} +

              + + {{ mf.selectbox('country', guest.system_countries, request.country, 0, 'Select country') }} +

              + {% endif %} + + {% if 'state' in r %} +

              + + {# mf.selectbox('state', guest.system_states, request.state, 0, 'Select state') #} + +

              + {% endif %} + + {% if 'postcode' in r %} +

              + + +

              + {% endif %} + + {% if 'phone' in r %} +

              + +
              + + +

              + {% endif %} + +

              + + +

              + +

              + + +

              + + {{ mf.recaptcha }} + + + +
              +
              +
              +
              +
              +
              +
              +
              + + {% endif %} +
              +
              +
              +
              + +{% else %} + +
              +
              +
              3
              +

              {% trans 'You have not selected any product' %}

              +
              + +
              + +{% endif %} +{% endblock %} + +{% block sidebar2 %} + {% include 'partial_currency.phtml' %} +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_client_balance.phtml b/src/bb-themes/boxbilling/html/mod_client_balance.phtml new file mode 100644 index 000000000..66f4b2d01 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_client_balance.phtml @@ -0,0 +1,81 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Payments history' %}{% endblock %} +{% set profile = client.client_get %} + +{% block content %} + +
              +
              +
              +

              {% trans 'Payments history'%}

              +

              {% trans 'Here you can track your payments you have made and what you have been charged for' %}

              +
              +
              + + + + + + + + + + + {% set transactions = client.client_balance_get_list({"per_page":10, "page":request.page}) %} + {% for i, tx in transactions.list %} + + + + + + {% else %} + + + + {% endfor %} + + + + + + + + +
              {% trans 'Amount' %}{% trans 'Description' %}{% trans 'Date' %}
              {{ tx.amount | money(tx.currency) }}{{tx.description}}{{tx.created_at|bb_date}}
              {% trans 'The list is empty' %}
              {% trans 'Add Funds' %}{% trans 'Balance' %}: {{ profile.balance | money(profile.currency) }}
              +
              +
              + +{% include "partial_pagination.phtml" with {'list': transactions} %} + +
              + +
              + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_client_profile.phtml b/src/bb-themes/boxbilling/html/mod_client_profile.phtml new file mode 100644 index 000000000..11d064497 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_client_profile.phtml @@ -0,0 +1,217 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Profile details' %}{% endblock %} + +{% block content %} + +{% import "macro_functions.phtml" as mf %} +{% set profile = client.client_get %} + +
              +
              +
              +

              {% trans 'Profile details' %}

              +

              {% trans 'Keep your profile up to date' %}

              +
              +
              +
              +
              +

              {% trans 'Manage profile' %}

              +
              + +
              + +
              +
              +
              +
              +

              {% trans 'Update profile' %}

              +
              +
              +

              + + +

              +

              + + +

              +

              + + +

              +

              + + +

              +

              + + +

              +

              + + +

              + +
              +
              +
              +
              +
              +
              +

               

              +
              +
              +

              + + +

              +

              + + +

              +

              + + +

              +

              + + {{ mf.selectbox('country', guest.system_countries, profile.country, 1, 'Select country') }} +

              +

              + + {# mf.selectbox('state', guest.system_states, profile.state, 0, 'Select state') #} + +

              +

              + + +

              +
              +
              +
              +
              +
              +
              + +
              +
              +

              {% trans 'Change password' %}

              +
              +
              +
              + {% trans 'Enter new password' %} +

              + + +

              +

              + + +

              + +
              +
              +
              +
              +
              + +
              +
              +

              {% trans 'API key' %}

              +

              {% trans 'API key allows integration with external applications. You will need this key for authentication.' %}

              +

              {% trans 'Warning! Resetting the key will break existing applications using it.' %}

              +
              +
              +
              +

              + + +

              + +
              +
              +
              +
              +
              + +
              +
              +

              {% trans 'Gravatar' %}

              +
              + Gravatar +

              {% trans 'Please register with'%} {{ profile.email }} {% trans 'at ' %}Gravatar.com {% trans 'to change your profile image. Gravatar image updates may not appear immediately.' %}

              +
              +
              +
              +
              + +
              +
              +

              {% trans 'Currency' %}

              +
              + {% if profile.currency %} +

              {% trans 'Your profile currency is' %} {{ profile.currency }}

              +

              {% trans 'Create new client profile if you want to manage your money in other currency' %}

              + {% else %} +

              {% trans 'Your profile currency will be defined after your first order. Once your currency is set, all your profile accounting will be managed in that currency and can not be changed.' %}

              + {% endif %} +
              +
              +
              + +
              +
              +
              +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_email_email.phtml b/src/bb-themes/boxbilling/html/mod_email_email.phtml new file mode 100644 index 000000000..6a6775221 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_email_email.phtml @@ -0,0 +1,89 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{email.subject}}{% endblock %} + +{% block content %} +
              +
              +
              +

              {{email.subject}}

              +
              +
              +
              +
              + {{email.content_html|raw}} +
              +
              +
              +
              +
              + +

              {% trans 'Back to emails' %}

              + +{% endblock %} + +{% block content_after %} + +
              +
              +

              {% trans 'Details' %}

              +
              + + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'From' %}{{email.sender}}
              {% trans 'To' %}{{email.recipients}}
              {% trans 'Sent' %}{{email.created_at|bb_date}}
              + {% trans 'Resend' %} + {% trans 'Delete' %} +
              +
              +{% endblock %} + + +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_email_index.phtml b/src/bb-themes/boxbilling/html/mod_email_index.phtml new file mode 100644 index 000000000..c7a1c1b0a --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_email_index.phtml @@ -0,0 +1,45 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Emails' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {% trans 'Emails we have sent you'%}

              +

              {% trans 'Here you can track emails we have sent you' %}

              +
              +
              + + + + + + + + + + + + {% set emails = client.email_get_list({"per_page":10, "page":request.page}) %} + {% for i, email in emails.list %} + + + + + + + {% else %} + + + + {% endfor %} + +
              {% trans 'Email subject' %}{% trans 'To' %}{% trans 'Date sent' %} 
              {{email.subject}}{{ email.recipients }}{{email.created_at|bb_date}}
              {% trans 'The list is empty' %}
              +
              +
              + +{% include "partial_pagination.phtml" with {'list': emails} %} + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_forum_forum.phtml b/src/bb-themes/boxbilling/html/mod_forum_forum.phtml new file mode 100644 index 000000000..c2a130160 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_forum_forum.phtml @@ -0,0 +1,125 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{ forum.title }}{% endblock %} + +{% block content %} +
              +
              +
              +

              {{ forum.title }}

              +

              {{ forum.description }}

              +
              +
              + + + + + + + + + + + + + + + {% set topics = guest.forum_get_topic_list({"forum_id":forum.id, "per_page":10,"page":request.page}) %} + {% for i, topic in topics.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + +
                {% trans 'Thread / Thread Starter' %}{% trans 'Last post' %}{% trans 'Replies' %}{% trans 'Views' %}
              + + + {{ topic.first.author.name }} + + {{topic.title}} +

              {{ topic.first.author.name }}

              +
              + {{ topic.last.created_at|bb_date }} +

              {% trans 'by' %} {{ topic.last.author.name }} {#{{ topic.last.author.name }}#}

              +
              {{ topic.stats.posts_count }}{{ topic.stats.views_count }}
              {% trans 'The list is empty' %}
              + +
              +
              + + {% include "partial_pagination.phtml" with {'list': topics} %} + +

              + + {% if client %} + + {% else %} + + {% endif %} +

              + + + +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_forum_index.phtml b/src/bb-themes/boxbilling/html/mod_forum_index.phtml new file mode 100644 index 000000000..0bd959011 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_forum_index.phtml @@ -0,0 +1,100 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Forum' %}{% endblock %} + +{% block content %} +
              +
              +
              +

              {% trans 'Forum' %}

              +

              {% trans 'Welcome to our forums. If you wish to become a member and post, you have to be registered member.' %}

              +
              +
              + + {% for cat_name, forums in guest.forum_get_categories %} + + + + + + + + + + + + + {% for forum in forums %} + + + + + + + {% endfor %} + +
              {{cat_name}}
               {% trans 'Forum' %}{% trans 'Threads' %}{% trans 'Posts' %}
              + + + {{forum.title}} +

              {{forum.description}}

              +
              + {{forum.stats.topics_count|default(0)}} + {{forum.stats.posts_count|default(0)}}
              + {% endfor %} + + {% if client and client.forum_favorites %} +

              {% trans 'Favorite topics' %}

              + + + + + + + + + + + + + + {% for i, topic in client.forum_favorites %} + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + +
                {% trans 'Thread / Thread Starter' %}{% trans 'Last post' %}{% trans 'Replies' %}{% trans 'Views' %}
              + + + {{ topic.first.author.name }} + + {{topic.title}} +

              {{ topic.first.author.name }}

              +
              + {{ topic.last.created_at|bb_date }} +

              {% trans 'by' %} {{ topic.last.author.name }} {#{{ topic.last.author.name }}#}

              +
              {{ topic.stats.posts_count }}{{ topic.stats.views_count }}
              {% trans 'The list is empty' %}
              + {% endif %} +
              +
              + + {% if not client %} +

              + {% endif %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_forum_topic.phtml b/src/bb-themes/boxbilling/html/mod_forum_topic.phtml new file mode 100644 index 000000000..66bdfeb6e --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_forum_topic.phtml @@ -0,0 +1,140 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ topic.title }}{% endblock %} + +{% block content_after %} + +
              +
              +

              {% trans 'Topic information' %}

              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if client %} + + + + + + {% endif %} +
              {% trans 'Forum' %}{{ forum.title }}
              {% trans 'Topic' %}{{ topic.title }}
              {% trans 'Started By' %}{{ topic.first.author.name }}
              {% trans 'Views' %}{{ topic.stats.views_count }}
              {% trans 'Messages' %}{{ topic.stats.posts_count }}
              {% trans 'Since' %}{{topic.created_at|bb_date}}
              + {% if client.forum_is_favorite({"id":topic.id}) %} + Remove from favorites + {% else %} + Add to favorites + {% endif %} + + {% if client.forum_is_subscribed({"id":topic.id}) %} + Disable notifications for this topic + {% else %} + Subscribe to notifications + {% endif %} +
              +
              + +

              + {% trans 'Back to threads list' %} +

              + +{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{ topic.title }}

              +

              {{ topic.first.message|truncate(100) }}

              +
              +
              + {% set messages = guest.forum_get_topic_message_list({"forum_topic_id":topic.id, "page":request.page, "per_page":10}) %} + {% for i, message in messages.list %} +
              +
              +

              {{ message.author.name }}

              +

              {{ message.created_at|bb_date }}

              +
              + +
              +
              +
              + {{ message.author.name }} +
              +
              +
              +
              + {{ message.message|bbmd }} +
              +
              +
              +
              +
              +
              +
              +
              +
              + {% trans 'Post new message in forum' %} +

              + +

              + + +
              +
              +
              + +
              +
              +
              + {% trans 'Post new message in forum' %} +

              + +

              + + +
              +
              +
              +
              +
              + + {% else %} +
              +
              {% trans 'No replies in this topic' %}
              +
              + {% endfor %} +
              +
              + + {% include "partial_pagination.phtml" with {'list': messages} %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_index_dashboard.phtml b/src/bb-themes/boxbilling/html/mod_index_dashboard.phtml new file mode 100644 index 000000000..05c9e57f7 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_index_dashboard.phtml @@ -0,0 +1,312 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Client Area' %}{% endblock %} +{% import "macro_functions.phtml" as mf %} + +{% block content %} +
              +{% if client %} + +{% set tickets = client.support_ticket_get_list({"status":'on_hold'}) %} +{% if tickets.total > 0 %} +
              +
              +

              {% trans 'Tickets waiting your reply' %}

              +
              + + + + + + + + + + + + + {% for i, ticket in tickets.list %} + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + +
              {% trans 'Id' %}{% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %}{% trans 'Submitted' %}
              {{ticket.id}}{{ticket.subject}}{{ticket.helpdesk.name}}{{mf.status_name(ticket.status)}}{{ticket.created_at|bb_date}}
              {% trans 'The list is empty' %}
              +
              +{% endif %} + +{% set profile = client.client_get %} +
              +
              +
              +

              {% trans 'Profile' %}

              +
              + + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'ID' %}#{{ profile.id }}
              {% trans 'Email' %}{{ profile.email }}
              {% trans 'Balance' %}{{ profile.balance | money(profile.currency) }}
              + {% trans 'Manage profile' %} +
              +
              +
              + +
              +
              +
              +

              {% trans 'Invoices' %}

              +
              + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'Total' %}{{ client.invoice_get_list().total }}
              {% trans 'Paid' %}{{ client.invoice_get_list({"status":"paid"}).total }}
              {% trans 'Unpaid' %}{{ client.invoice_get_list({"status":"unpaid"}).total }}
              + {% trans 'All Invoices' %} +
              +
              +
              + +
              +
              +
              +

              {% trans 'Services' %}

              +
              + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'Total' %}{{ client.order_get_list({"hide_addons":1}).total }}
              {% trans 'Active' %}{{ client.order_get_list({"hide_addons":1, "status":"active"}).total }}
              {% trans 'Soon expires' %}{{ client.order_get_list({"expiring":1}).total }}
              + {% trans 'All services' %} + {% trans 'New order' %} +
              +
              +
              + +
              +
              +
              +

              {% trans 'Tickets' %}

              +
              + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'Total' %}{{ client.support_ticket_get_list().total }}
              {% trans 'Open' %}{{ client.support_ticket_get_list({"status":'open'}).total }}
              {% trans 'On Hold' %}{{ client.support_ticket_get_list({"status":'on_hold'}).total }}
              + {% trans 'All tickets' %} + {% trans 'New ticket' %} +
              +
              +
              + +
              +
              +
              +

              {% trans 'Recent orders' %}

              +
              + + + {% for i, order in client.order_get_list({"per_page":5, "page":request.page, "hide_addons":1}).list %} + + + + + {% else %} + + + + {% endfor %} + +
              {{ order.title|truncate(30) }}{{ mf.status_name(order.status) }}
              {% trans 'The list is empty' %}
              +
              +
              + +
              +
              +
              +

              {% trans 'Recent emails' %}

              +
              + + + {% for i, email in client.email_get_list({"per_page":5}).list %} + + + + + {% else %} + + + + {% endfor %} + +
              {{email.subject|truncate(30)}}{{ email.created_at|timeago }} {% trans 'ago' %}
              {% trans 'The list is empty' %}
              +
              +
              +
              + +{% else %} + +
              +
              +

              {% trans 'Order' %}

              +
              +

              {% trans 'Order products and services' %}

              +
              +
              +
              + +
              +
              +

              {% trans 'Register' %}

              +
              +

              {% trans 'Become a member and manage services' %}

              +
              +
              +
              +
              +
              +

              {% trans 'Contact Us' %}

              +
              +

              {% trans 'Contact us for more information' %}

              +
              +
              +
              + + {% if guest.extension_is_on({"mod":"news"}) %} +
              +
              +

              {% trans 'Announcements' %}

              +
              +

              {% trans 'Latest news & announcements' %}

              +
              +
              +
              + {% endif %} + + {% if guest.extension_is_on({"mod":"kb"}) %} +
              +
              +

              {% trans 'Knowledge Base' %}

              +
              +

              {% trans 'Browse our KB for answers and FAQs' %}

              +
              +
              +
              + {% endif %} + + {% if guest.extension_is_on({"mod":"branding"}) %} +
              +
              +

              {% trans 'Invoicing Software' %}

              +
              +

              {% trans 'Powered by BoxBilling invoicing software' %}

              +
              +
              +
              + {% endif %} +
              +{% endif %} + +
              +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_invoice_banklink.phtml b/src/bb-themes/boxbilling/html/mod_invoice_banklink.phtml new file mode 100644 index 000000000..5c965b3d7 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_invoice_banklink.phtml @@ -0,0 +1,33 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Processing payment ...' %}{% endblock %} + +{% block content %} + +{# +
              {% debug invoice %}
              +
              {% debug payment %}
              +#} + +{% if payment.type == 'html' %} + {{ payment.result|raw }} +{% endif %} + +{% if payment.type == 'form' %} +

              {% trans 'Redirecting to payment gateway..' %}

              +
              + {% for key, value in payment.result %} + + {% endfor %} + +
              + + +{% endif %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_invoice_index.phtml b/src/bb-themes/boxbilling/html/mod_invoice_index.phtml new file mode 100644 index 000000000..0754bd039 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_invoice_index.phtml @@ -0,0 +1,102 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Invoices' %}{% endblock %} + +{% block content %} + +{% set unpaid_invoices = client.invoice_get_list({"status":"unpaid", "per_page":100}).list %} + +
              +
              +
              +

              {% trans 'Invoices' %}

              +

              {% trans 'List of invoices' %}

              +
              + +
              +
              +
              +

              {% trans 'Invoice management' %}

              +
              + +
              + + {% if unpaid_invoices|length %} +
              + + + + + + + + + + + + + + {% for i, invoice in unpaid_invoices %} + + + + + + + + + {% else %} + + + + {% endfor %} + +
              {% trans 'Title' %}{% trans 'Issue Date' %}{% trans 'Due Date' %}{% trans 'Total' %} 
              {{ "Proforma invoice #%05s"|format(invoice.id) }}{{ invoice.created_at|bb_date }}{{ invoice.due_at|bb_date }}{{ invoice.total | money(invoice.currency) }}{% trans 'Pay' %}
              {% trans 'The list is empty' %}
              +
              + {% endif %} + +
              + + + + + + + + + + + + + {% set paid_invoices = client.invoice_get_list({"per_page":10, "page":request.page, "status":"paid"}) %} + {% for i, invoice in paid_invoices.list %} + + + + + + + + + + {% else %} + + + + {% endfor %} + +
              {% trans 'Title' %}{% trans 'Issue Date' %}{% trans 'Paid at' %}{% trans 'Total' %} 
              {{ "Proforma invoice #%05s"|format(invoice.id) }}{{ invoice.created_at|bb_date }}{{ invoice.paid_at|bb_date }}{{ invoice.total | money(invoice.currency) }}
              {% trans 'The list is empty' %}
              + {% include "partial_pagination.phtml" with {'list': paid_invoices} %} + +
              +
              +
              +
              +
              + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_invoice_invoice.phtml b/src/bb-themes/boxbilling/html/mod_invoice_invoice.phtml new file mode 100644 index 000000000..96301b23d --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_invoice_invoice.phtml @@ -0,0 +1,320 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Proforma invoice' %}{% endblock %} + +{% block content_before %} +{% if invoice.status == 'unpaid' %} + {% include "partial_steps.phtml" with {'selected': 4} %} +{% endif%} +{% endblock %} + +{% block content %} +{% set nr = invoice.serie ~ "%05s"|format(invoice.nr) %} +{% set seller = invoice.seller %} +{% set buyer = invoice.buyer %} +{% set company = guest.system_company %} + +
              +
              +
              + {% if invoice.status == 'unpaid' %} +

              {% trans 'Proforma Invoice' %}

              +

              {% trans 'Please choose payment type and pay for your chosen products.' %}

              + {% else %} +

              {% trans 'Invoice' %} {{ nr }}

              +

              {% trans 'Invoice is paid' %}

              + {% endif %} +
              +
              +
              + +
              +
              +
              + {% if company.logo_url %} + {{company.name}} + {% else %} + {{company.name}} + {% endif %} +
              +
              +
              + +
              +
              +
              +

              {% trans 'Invoice' %} {{ invoice.serie_nr }}

              +

              {{ invoice.created_at|bb_date }}

              + +

              {% if invoice.status == 'unpaid' %}{% trans 'Unpaid' %}{% else %}{% trans 'Paid' %}{% endif %}

              +
              +
              +
              + +
              + +
              + + {% if seller.company %} + + + + {% endif %} + + {% if seller.address %} + + + + {% endif %} + + {% if seller.phone %} + + + + {% endif %} + + {% if seller.email %} + + + + {% endif %} + + {% if company.account_number %} + + + + {% endif %} + + {% if company.number %} + + + + {% endif %} + + {% if company.vat_number %} + + + + {% endif %} + + {# Company note #} + {# if company.note %} + + + + {% endif #} +
              {{ seller.company }}
              {{ seller.address }}
              {{ seller.phone }}
              {{ seller.email }}
              {% trans 'Account' %}: {{ company.account_number }}
              {% trans 'Company number' %}: {{ company.number }}
              {% trans 'VAT' %}: {{ company.vat_number }}
              {{ company.note }}
              +
              + +
              + + {% if buyer.company %} + + + + {% endif %} + + {% if buyer.first_name or buyer.last_name %} + + + + {% endif %} + + {% if buyer.email %} + + + + {% endif %} + + {% if buyer.address %} + + + + {% endif %} + + {% if buyer.phone %} + + + + {% endif %} + +
              {{ buyer.company }}
              {{ buyer.first_name }} {{ buyer.last_name }}
              {{ buyer.email }}
              {{ buyer.address }} {{ buyer.city }} {{ buyer.state }} {{ buyer.postcode }} {{ buyer.country }}
              {{ buyer.phone }}
              +
              + + {% if invoice.text_1 %} +
              +
              + {{ invoice.text_1|markdown }} +
              +
              + {% endif %} + +
              +
              + + + + + + + + + + + + + {% for i, item in invoice.lines %} + + + + + + + + + {% endfor %} + + + + {% if invoice.tax > 0 %} + + + + + {% endif %} + + {% if invoice.discount > 0 %} + + + + + {% endif %} + + + + + +
              #{% trans 'Title' %}{% trans 'Price' %}{% trans 'Total' %}
              {{ i+1 }}. + {% if item.order_id%} + {{ item.title }} + {% else %} + {{ item.title }} + {% endif %} + + {{ item.price | money(invoice.currency) }} + {% if item.quantity > 1 %} + x {{ item.quantity }} {# item.unit #} + {% endif %} + {{ item.total | money(invoice.currency) }}
              {{ invoice.taxname }} {{ invoice.taxrate }}%{{ invoice.tax | money(invoice.currency) }}
              {% trans 'Discount' %}{{ invoice.discount | money(invoice.currency) }}
              {% trans 'Total' %}{{ invoice.total | money(invoice.currency) }}
              + + {% if invoice.text_2 %} +
              +
              + {{ invoice.text_2|markdown }} +
              +
              + {% endif %} + + {% if invoice.status == 'unpaid' %} + + {% if invoice.gateway_id and not request.change_payment_method %} + +
              +
              + {{ guest.invoice_payment({"gateway_id":invoice.gateway_id, "hash":invoice.hash, "auto_redirect":request.auto_redirect}).result|raw }} +
              +
              + +
              + + {% endif %} + + {% if request.change_payment_method %} + +
              +
              +
              +
              + {% for gtw in guest.invoice_gateways %} + {% if invoice.currency in gtw.accepted_currencies %} + + {% endif %} + {% endfor %} +
              +
              +
              +
              + +
              +
              +
              +

              {% trans 'Total:' %}

              +
              {{ invoice.total | money(invoice.currency) }}
              + +
              +
              +
              + +
              + + {% endif %} + {% endif %} +
              +
              +
              + +{% set transactions = client.invoice_transaction_get_list({"invoice_id":invoice.id, "type":"payment","per_page":100 }).list %} + +{% if transactions|length > 0 %} + +
              +
              +

              {% trans 'Transactions' %}

              +
              + + + + + + + + + + + + {% for i, tx in transactions %} + + + + + + + {% endfor %} + + + +
              {% trans 'Transaction Date' %}{% trans 'Transaction ID' %}{% trans 'Gateway' %}{% trans 'Amount' %}
              {{tx.created_at|bb_date }}{{tx.txn_id}}{{tx.gateway|default('-')}}{{ tx.amount | money(tx.currency) }}
              +
              + +{% endif %} + + +{% endblock %} + +{% block sidebar2 %} + +
              +
              +

              {% trans 'Actions' %}

              +
              +
              + {% if invoice.status == 'unpaid' %} + {% trans 'Change payment method' %} + {% endif %} +
              +
              + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_invoice_thankyou.phtml b/src/bb-themes/boxbilling/html/mod_invoice_thankyou.phtml new file mode 100644 index 000000000..04c188cb4 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_invoice_thankyou.phtml @@ -0,0 +1,24 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Thank you' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {% trans 'Thank you' %}

              +
              +
              +
              +

              {% trans %}Payment for invoice received{% endtrans %}

              +

              {% trans%}Your payment is being processed right now. This takes about 5 minutes to complete.{% endtrans %}

              +

              {% trans%}You will be automatically redirected to invoice page after 5 minutes.{% endtrans %}

              + + +
              +
              +
              + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_kb_article.phtml b/src/bb-themes/boxbilling/html/mod_kb_article.phtml new file mode 100644 index 000000000..5eccd8673 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_kb_article.phtml @@ -0,0 +1,63 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{article.title}}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{article.title}}

              +

              {{article.created_at|bb_date }} | {% trans 'Views' %}: {{ article.views }}

              +
              +
              + + {# +
              + +
              + #} + +
              +
              + {{article.content|bbmd}} +
              +
              +
              +
              + +

              {% trans 'Back to list' %}

              +{% endblock %} + +{% block content_after %} +
              +
              +
              +

              {%trans 'Similiar articles' %}

              +
              + +
              +
              +
              +
              +
              +

              {%trans 'Knowledge base categories'%}

              +
              + +
              +
              + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_kb_category.phtml b/src/bb-themes/boxbilling/html/mod_kb_category.phtml new file mode 100644 index 000000000..e857ebce7 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_kb_category.phtml @@ -0,0 +1,27 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{category.title}}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{category.title}}

              +

              {{category.description }}

              +
              +
              +
              +
              + +
              +
              +
              +
              + +

              {% trans 'Back to list' %}

              +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_kb_index.phtml b/src/bb-themes/boxbilling/html/mod_kb_index.phtml new file mode 100644 index 000000000..048f19106 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_kb_index.phtml @@ -0,0 +1,47 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{%trans 'Knowledge base'%}{% endblock %} + +{% block content %} + + {% if request.q %} + {% set kbcategories = guest.kb_category_get_list({"q": request.q}) %} + {% else %} + {% set kbcategories = guest.kb_category_get_list %} + {% endif %} + +
              +
              +
              +

              {% trans 'Knowledge base' %}

              +
              +
              +
              + +
              + + {% for i, category in kbcategories.list %} +
              +

              {{category.title}}

              + +
              + + {% else %} +

              + {% trans 'Try using other keyword. No matches not for keyword:' %} + {{ request.q }} +

              + {% endfor %} +
              +
              + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_news_index.phtml b/src/bb-themes/boxbilling/html/mod_news_index.phtml new file mode 100644 index 000000000..9956e7cc4 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_news_index.phtml @@ -0,0 +1,34 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{% trans 'Blog'%}{% endblock %} + +{% block content %} +
              +
              +
              +

              {% trans 'News & Announcements' %}

              +

              {% trans 'Track our latest posts' %}

              +
              +
              + {% set posts = guest.news_get_list({"page":request.page,"per_page": 5}) %} + {% for i, post in posts.list %} +
              +

              {{post.title}}

              + {% if post.excerpt %} + {{post.excerpt|bbmd}} + {% else %} + {{ post.content|bbmd }} + {% endif %} +

              {{post.updated_at|bb_date}}

              + {% trans 'Read more..' %} +
              + {% else %} +

              The list is empty

              + {% endfor %} +
              +
              +
              + +{% include "partial_pagination.phtml" with {'list': posts} %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_news_post.phtml b/src/bb-themes/boxbilling/html/mod_news_post.phtml new file mode 100644 index 000000000..7eda6690d --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_news_post.phtml @@ -0,0 +1,58 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% block meta_title %}{{post.title}}{% endblock %} + +{% block opengraph %} + + + + + + + + {% if post.published_at %}{% endif %} + {% if post.updated_at %}{% endif %} + {% if post.expires_at %}{% endif %} + {% if post.section %}{% endif %} + {% if post.tags %}{% endif %} + +{% endblock %} + +{% block content %} +
              +
              +
              +

              {{post.title|truncate(50)}}

              +

              {{post.created_at|bb_date}} {% trans 'by '%} {{ post.author.name }}

              +
              +
              +
              + {% if post.image %}{{post.title}}{% endif %} + {{ post.content|bbmd }} + {# if post.tags %}Tags: {{ post.tags|join(', ') }}{% endif #} +
              +
              +
              + + {% if guest.extension_is_on({"mod":"comment"}) %}{% include "mod_comment_block.phtml" %}{% endif %} + +

              {% trans 'Back to list' %}

              + +{% endblock %} + +{# block sidebar2 %} +
              +

              {% trans 'Other recent posts' %}

              +
              + +
              +
              + +{% endblock #} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_order_index.phtml b/src/bb-themes/boxbilling/html/mod_order_index.phtml new file mode 100644 index 000000000..8fd732c6a --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_order_index.phtml @@ -0,0 +1,122 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Order' %}{% endblock %} + +{% set periods = guest.system_periods %} + +{% block content_before %} +{% include "partial_steps.phtml" with {'selected': 1} %} +{% endblock %} + +{% block content %} + +
              +
              +
              1
              +

              {% trans 'Select Product' %}

              +

              {% trans 'Choose products we offer for selling' %}

              +
              +
              + {% for i, category in guest.product_category_get_list.list %} +
              +
              + {% if category.icon_url %} +
              + {{ category.icon_url | img_tag }} +
              + {% endif %} +
              + {% trans 'Starting from:' %} +
              {{ category.price_starting_from | money_convert }}
              + {% trans 'View products' %} +
              +
              +

              {{ category.title }}

              + {{ category.description|bbmd }} +
              +
              +
              + +
              + {% endfor %} +
              +
              +
              +{% endblock %} + +{% block sidebar2 %} + {% include 'partial_currency.phtml' %} +{% endblock %} + +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_order_list.phtml b/src/bb-themes/boxbilling/html/mod_order_list.phtml new file mode 100644 index 000000000..82b00cab9 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_order_list.phtml @@ -0,0 +1,58 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% import "macro_functions.phtml" as mf %} + +{% block meta_title %}{% trans 'My Products & Services' %}{% endblock %} + +{% block content %} +
              +
              +
              +

              {% trans 'Ordered Services' %}

              +
              +
              + + + + + + + + + + + + + + {% set orders = client.order_get_list({"per_page":10, "page":request.page, "hide_addons":1}) %} + {% for i, order in orders.list %} + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + +
              {% trans 'Product/Service' %}{% trans 'Price' %}{% trans 'Next due date' %}{% trans 'Status' %} 
              {{order.title}}{{ order.total | money(order.currency) }} {% if order.period%}{{ order.period | period_title }}{% endif %}{% if order.expires_at %}{{order.expires_at|bb_date}}{% else %}-{% endif %}{{ mf.status_name(order.status) }}
              {% trans 'The list is empty' %}
              + + +
              +
              + +{% include "partial_pagination.phtml" with {'list': orders} %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_order_manage.phtml b/src/bb-themes/boxbilling/html/mod_order_manage.phtml new file mode 100644 index 000000000..40715fb1c --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_order_manage.phtml @@ -0,0 +1,345 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ order.title }}{% endblock %} + +{% set service_partial = "mod_service" ~ order.service_type ~ "_manage.phtml" %} +{% set upgradables = client.order_upgradables({'id':order.id}) %} + +{% block content %} + +
              +
              +
              +

              {% trans 'Service details' %}

              +

              {% trans 'All information about your service' %}

              +
              +
              + + + + + + + + + + + + + + + + + + {% if order.period %} + + + + + {% endif %} + + + + + + + + + + + + + + + + + {% if order.period %} + + + + + {% endif %} + + {% if order.notes %} + + + + + {% endif %} + + {% if order.active_tickets > 0 %} + + + + + {% endif %} + + + + + + + +
              #{{ order.id }}
              {{ order.title }}
              {{ order.total | money(order.currency) }}
              {{ order.period | period_title }}
              {{mf.status_name(order.status)}}
              {{ order.created_at|bb_date }}
              {% if order.activated_at %}{{ order.activated_at|bb_date }}{% else %}-{% endif %}
              {% if order.expires_at %}{{ order.expires_at|bb_date }}{% else %}-{% endif %}
              {{ order.notes|bbmd }}
              + + {# #} + {# #} +
              + + {% if order.period %} + + {% endif %} + + {% if upgradables %} + + {% endif %} + + + {% if order.status == 'pending_setup' %} + {% trans 'Cancel' %} + {% endif %} + + {% if order.status == 'active' %} + + {% endif %} + +
              +
              +
              + + + + + + + +{% if order.group_master == 1 %} +{% set addons = client.order_addons({"id":order.id}) %} +{% if addons|length > 0 %} +
              +
              +

              {% trans 'Addons you have ordered with this service' %}

              +
              + + + + + + + + + + + + + + {% for i, addon in addons %} + + + + + + + + + {% endfor %} + +
              {% trans 'Product/Service' %}{% trans 'Price' %}{% trans 'Billing Cycle' %}{% trans 'Next due date' %}{% trans 'Status' %} 
              {{addon.title}}{{ addon.total | money(addon.currency) }}{{ addon.period | period_title }}{% if addon.expires_at %}{{addon.expires_at|bb_date }}{% else %}-{% endif %}{{ mf.status_name(addon.status) }}
              +
              +{% endif %} +{% endif %} + +

              {% trans 'Back to services' %}

              + + +{% if guest.system_template_exists({"file":service_partial})%} + {% set service = client.order_service({"id":order.id}) %} + {% include service_partial with {'order': order, 'service': service} %} +{% else %} + {# trans 'Service does not have configuration page' #} +{% endif %} + +{% endblock %} + +{# block sidebar2 %} +
              +
              +

              {% trans 'Actions' %}

              +
              +
              + {% if order.period %} +

              + {% endif %} + + {% if upgradables %} +

              + {% endif %} + +

              + {% if order.status == 'pending_setup' %} +

              {% trans 'Cancel' %}

              + {% endif %} + + {% if order.status == 'active' %} +

              + {% endif %} + +
              +
              +{% endblock #} + +{% block js %} +{% autoescape true js %} + +{% endautoescape %} +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_order_product.phtml b/src/bb-themes/boxbilling/html/mod_order_product.phtml new file mode 100644 index 000000000..d81a3b548 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_order_product.phtml @@ -0,0 +1,69 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ product.title }}{% endblock %} + +{% block content_before %} +{% include "partial_steps.phtml" with {'selected': 2} %} +{% endblock %} + +{% block content %} + +{% set periods = guest.system_periods %} +{% set pricing = product.pricing %} + +
              +
              +
              +
              2
              +

              {% trans 'Configure' %}

              +

              {% trans 'The product/service you have chosen has the following configuration options for you to choose from.' %}

              +
              +
              +
              +
              +
              +

              {{ product.title }}

              + {{ product.description|bbmd }} +
              +
              +
              +
              + {% include 'partial_pricing.phtml' with {'product': product} %} +
              +
              +
              +
              + {% include 'partial_addons.phtml' with {'product': product} %} + +
              +{% endblock %} + +{% block sidebar2 %} + {% include 'partial_currency.phtml' %} +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_about-us.phtml b/src/bb-themes/boxbilling/html/mod_page_about-us.phtml new file mode 100644 index 000000000..53ac7c22d --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_about-us.phtml @@ -0,0 +1,19 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'About us' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {% trans 'About us' %}

              +

              {{ company.signature }}

              +
              +
              +
              + {{ company.note|bbmd }} +
              +
              +
              + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_login.phtml b/src/bb-themes/boxbilling/html/mod_page_login.phtml new file mode 100644 index 000000000..9d4464982 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_login.phtml @@ -0,0 +1,240 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% import "macro_functions.phtml" as mf %} + +{% block meta_title %}{% trans 'Login / Sign up' %}{% endblock %} +{% block content %} + +
              +
              +
              +

              {% trans 'Sign In / Create new account' %}

              +

              {% trans 'Become a member to participate in forum, contact support, order new services' %}

              +
              +
              +
              +
              +
              +
              +

              {% trans 'Sign in' %}

              +
              +
              + {% trans 'Login to client area' %} +

              + + +

              + +

              + + +

              + + + {% trans 'Reset password' %} +
              +
              +
              +
              +
              + +
              +
              +

              {% trans 'Do not have an account yet?' %}

              + + {% if guest.extension_is_on({"mod":"oauth"}) %} + {% include "mod_oauth_buttons.phtml" with {"redirect_to":"client/me"} %} + {% endif %} +
              +
              +
              +
              +
              + +
              +
              +
              +
              + {% set r = guest.client_required %} +

              {% trans 'Enter your details below' %}

              +
              +
              + {% trans 'Create new profile' %} +

              + + +

              +

              + + +

              + {% if 'last_name' in r %} +

              + + +

              + {% endif %} + + {% if 'company' in r %} +

              + + +

              + {% endif %} + + {% if 'birthday' in r %} +

              + + +

              + {% endif %} + + {% if 'gender' in r %} +

              + + +

              + {% endif %} + +

              + + +

              + +

              + + +

              + + {{ mf.recaptcha }} + +
              +
              +
              +
              + +
              +
              +

               

              +
              +
              + {% trans 'Create new profile' %} + + {% if 'address_1' in r %} +

              + + +

              + {% endif %} + + {% if 'address_2' in r %} +

              + + +

              + {% endif %} + + {% if 'city' in r %} +

              + + +

              + {% endif %} + + {% if 'country' in r %} +

              + + {{ mf.selectbox('country', guest.system_countries, request.country, 0, 'Select country') }} +

              + {% endif %} + + {% if 'state' in r %} +

              + + {# mf.selectbox('state', guest.system_states, request.state, 0, 'Select state') #} + +

              + {% endif %} + + {% if 'postcode' in r %} +

              + + +

              + {% endif %} + + {% if 'phone' in r %} +

              + +
              + +

              + {% endif %} + +
              +
              +
              +
              +
              +
              +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_preview_markdown.phtml b/src/bb-themes/boxbilling/html/mod_page_preview_markdown.phtml new file mode 100644 index 000000000..1f1415788 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_preview_markdown.phtml @@ -0,0 +1,13 @@ + + + + +Markdown preview +{{ 'style.css' | asset_url | stylesheet_tag }} + + +
              + {{ post.content|bbmd }} +
              + + \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_privacy-policy.phtml b/src/bb-themes/boxbilling/html/mod_page_privacy-policy.phtml new file mode 100644 index 000000000..24597165a --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_privacy-policy.phtml @@ -0,0 +1,19 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Privacy policy' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{ company.name }} {% trans 'Privacy policy' %}

              +

              {{ company.signature }}

              +
              +
              +
              + {{ company.privacy_policy|bbmd }} +
              +
              +
              + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_reset-password.phtml b/src/bb-themes/boxbilling/html/mod_page_reset-password.phtml new file mode 100644 index 000000000..d04ddc467 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_reset-password.phtml @@ -0,0 +1,44 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% import "macro_functions.phtml" as mf %} + +{% block meta_title %}{% trans 'Reset password' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {% trans 'How to reset my password?' %}

              +

              {% trans 'Enter your email to reset password. You will receive new password after reset link is confirmed.' %}

              +
              +
              +
              +
              + {% trans 'Reset password' %} + + + +
              +
              +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_sitemap.xml b/src/bb-themes/boxbilling/html/mod_page_sitemap.xml new file mode 100644 index 000000000..a9b879e4d --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_sitemap.xml @@ -0,0 +1,48 @@ + + +{# products #} +{% for i, product in guest.product_get_list({"per_page": 50}).list %} + + {{ 'order'|link }}/{{product.slug}} + {{product.updated_at|date('Y-m-d')}} + 0.9 + weekly + +{% endfor %} + +{# news items #} +{% if guest.extension_is_on({"mod":'news'}) %} +{% for i, article in guest.news_get_list({"per_page": 50}).list %} + + {{ 'news'|link }}/{{article.slug}} + {{article.updated_at|date('Y-m-d')}} + 0.9 + weekly + +{% endfor %} +{% endif %} + +{# knowledge base items #} +{% if guest.extension_is_on({"mod":'kb'}) %} +{% for i, article in guest.kb_article_get_list({"per_page":50}).list %} + + {{ 'kb'|link }}/{{article.category.slug}}/{{article.slug}} + {{article.updated_at|date('Y-m-d')}} + 0.9 + weekly + +{% endfor %} +{% endif %} + +{# forum topics #} +{% if guest.extension_is_on({"mod":'forum'}) %} +{% for topic in guest.forum_get_topic_list({"per_page":100}).list %} + + {{ '/forum'|link }}/{{topic.forum.slug}}/{{topic.slug}} + {{topic.created_at|date('Y-m-d')}} + 0.9 + daily + +{% endfor %} +{% endif %} + \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_page_tos.phtml b/src/bb-themes/boxbilling/html/mod_page_tos.phtml new file mode 100644 index 000000000..8232822c5 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_page_tos.phtml @@ -0,0 +1,19 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% block meta_title %}{% trans 'Terms and Conditions' %}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{ company.name }} {% trans 'Terms and Conditions' %}

              +

              {{ company.signature }}

              +
              +
              +
              + {{ company.tos|bbmd }} +
              +
              +
              + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicedomain_manage.phtml b/src/bb-themes/boxbilling/html/mod_servicedomain_manage.phtml new file mode 100644 index 000000000..23ba49b68 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicedomain_manage.phtml @@ -0,0 +1,272 @@ +{% if order.status == 'active' %} +
              +
              +

              {% trans 'Domain management' %}

              +
              + + + +
              + +
              +

              {% trans 'Domain details' %}

              + + + + + + + + + + + + + + + + + +
              {% trans 'Domain' %}{{ service.domain }}
              {% trans 'Registration date' %}{{ service.registered_at|bb_date }}
              {% trans 'Expires at' %}{{ service.expires_at|bb_date }}
              +
              + +
              +

              {% trans 'Domain Secret' %}

              +
              +

              {% trans 'All domain names (except a .EU, .UK domain name) have a Domain (Transfer) Secret Key/Authorization Code (EPP Code) associated with them. This would be required if you want to transfer service.' %}

              +

              +
              +
              + +
              +

              {% trans 'Domain Protection' %}

              + +
              +

              {% trans 'Domain locking is a security enhancement to prevent unauthorized transfers of your domain to another registrar or web host by "locking" your domain name servers.' %}

              +

              + + +

              +
              +
              + +
              +

              {% trans 'Domain Privacy Settings' %}

              +
              +

              {% trans 'If you would like to hide domain contact information which is shown on WHOIS you can enable privacy protection. Once domain privacy protection is enabled no one will know who registered this service. And once you decide to disable privacy protection, information that is listed above on "Update Domain Contact Details" section will be seen on domain WHOIS again.' %}

              +

              + + +

              +
              +
              + +
              +

              {% trans 'Domain Nameservers' %}

              +
              +

              {% trans 'If you would like to host this domain with another company you can update nameservers.' %}

              +
              +
              + {% trans 'Update nameservers' %} +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + + +
              +
              + +
              +
              + +
              +

              {% trans 'Domain Contact Details' %}

              +
              +

              {% trans 'Domain contact details will be displayed once someone will check WHOIS output (which is public) of your service. This will update Technical, Billing and Admin contacts for this service. You can enable domain privacy protection if you want to hide your public WHOIS information.' %}

              +
              +
              + {% trans 'Update domain contact details' %} +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + + + +
              +
              +
              +
              +
              +
              + + + +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicedomain_order.phtml b/src/bb-themes/boxbilling/html/mod_servicedomain_order.phtml new file mode 100644 index 000000000..47b798737 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicedomain_order.phtml @@ -0,0 +1,199 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} + +{% import "macro_functions.phtml" as mf %} + +{% block meta_title %}{% trans 'Register new domain' %}{% endblock %} + +{% block content_before %} +{% include "partial_steps.phtml" with {'selected': 2} %} +{% endblock %} + +{% block content %} + +{% set periods = guest.system_periods %} +{% set pricing = product.pricing %} + +
              +
              +
              +
              2
              +

              {% trans 'Configure' %}

              +

              {% trans 'The product/service you have chosen has the following configuration options for you to choose from.' %}

              +
              +
              + +
              +
              + {#

              {% trans 'Domain configuration' %}

              #} +
              + + + +
              + +
              + +
              + {% trans 'Check domain availability' %} +

              + + {{ mf.selectboxtld('register_tld', guest.serviceDomain_tlds({"allow_register":1})) }} +

              + + + + + +
              +
              + +
              +
              +

              + + {{ mf.selectboxtld('transfer_tld', guest.serviceDomain_tlds({"allow_transfer":1})) }} +

              + + + + + +
              +
              +
              +
              +
              + +
              +
              +
              +
              + {% include 'partial_addons.phtml' with {'product': product} %} + + + +
              +{% endblock %} + +{% block sidebar2 %} + {% include 'partial_currency.phtml' %} +{% endblock %} + +{% block js %} +{% set currency = guest.cart_get_currency %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicedownloadable_manage.phtml b/src/bb-themes/boxbilling/html/mod_servicedownloadable_manage.phtml new file mode 100644 index 000000000..5117e2bb4 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicedownloadable_manage.phtml @@ -0,0 +1,16 @@ +{% if order.status == 'active' %} +
              +
              +

              {{ service.title }}

              +
              +
              +
              +

              {% trans 'Download file' %}

              + +
              +
              +
              +
              +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicehosting_manage.phtml b/src/bb-themes/boxbilling/html/mod_servicehosting_manage.phtml new file mode 100644 index 000000000..503d93256 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicehosting_manage.phtml @@ -0,0 +1,252 @@ +{% if order.status == 'active' %} +
              +
              +

              {% trans 'Manage hosting account' %}

              +
              + + + +
              + +
              +
              +
              +

              {% trans 'Details' %}

              +
              + {% set server = service.server %} + {% set hp = service.hosting_plan %} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
              {% trans 'Domain' %}: + {{ service.domain }} +
              {% trans 'Server IP' %}:{{ server.ip }}
              {% trans 'Server Hostname' %}:{{ server.hostname }}
              {% trans 'Username' %}:{{ service.username }}
              {% trans 'Password' %}:******
              {% trans 'Hosting plan' %}:{{ hp.name }}
              {% trans 'Bandwidth' %}:{{ hp.bandwidth }} MB / {% trans 'per month' %}
              {% trans 'Disk quota' %}:{{ hp.quota }} MB
              + +

              + {% if service.domain_order_id %} + {% trans 'Manage domain' %} + {% endif %} + + {% trans 'Jump to cPanel' %} + + {% if service.reseller %} + {% trans 'Reseller control panel' %} + {% endif %} +

              +
              +
              +
              + +
              + +
              +

              {% trans 'Nameservers' %}

              +
              + + + + + + + + + + + + + {% if server.ns3 %} + + + + + {% endif %} + + {% if server.ns4 %} + + + + + {% endif %} + +
              {% trans 'Nameserver 1' %}:{{ server.ns1 }}
              {% trans 'Nameserver 2' %}:{{ server.ns2 }}
              {% trans 'Nameserver 3' %}:{{ server.ns3 }}
              {% trans 'Nameserver 4' %}:{{ server.ns4 }}
              +
              +
              + +
              +

              {% trans 'FTP details' %}

              +
              +

              {% trans 'Use these details to connect to your FTP account.' %}

              + + + + + + + + + + + + + + + + + + + +
              {% trans 'FTP IP' %}:{{ server.ip }}
              {% trans 'FTP Username' %}:{{ service.username }}
              {% trans 'FTP Password' %}:******
              +
              +
              +
              +
              +
              + +
              +

              {% trans 'Change account password' %}

              +
              +

              {% trans 'Change your FTP cPanel SSH password.' %}

              +
              +
              + {% trans 'Change account password' %} +

              + + +

              + +

              + + +

              + + + +
              +
              +
              +
              + +
              +

              {% trans 'Change username' %}

              +
              +
              +
              + {% trans 'Change username' %} +

              + + +

              + + + +
              +
              +
              +
              + +
              +

              {% trans 'Change domain' %}

              +
              +
              +
              + {% trans 'Change domain' %} +

              + + + +

              + + + +
              +
              +
              +
              + +
              + +
              +
              + + +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicehosting_order.phtml b/src/bb-themes/boxbilling/html/mod_servicehosting_order.phtml new file mode 100644 index 000000000..6dc241c56 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicehosting_order.phtml @@ -0,0 +1,214 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{product.title}}{% endblock %} + +{% block content_before %} +{% include "partial_steps.phtml" with {'selected': 2} %} +{% endblock %} + +{% block content %} + +{% set periods = guest.system_periods %} +{% set pricing = product.pricing %} + +
              + +
              +
              +
              2
              +

              {{ product.title }}

              +

              {% trans 'Please configure domain for your hosting account' %}

              + {#{ product.description|bbmd }#} +
              +
              + {# +
              +
              +
              +

              {{ product.title }}

              + {{ product.description|bbmd }} +
              +
              +
              + #} +
              +
              +
              +
              + {#

              {% trans 'Domain configuration' %}

              #} +
              + + + +
              + +
              +
              + {% trans 'I will use my existing domain and update nameservers' %} +

              + + +

              +
              +
              + +
              +
              + {% trans 'Register a new domain' %} +

              + + {{ mf.selectboxtld('domain[register_tld]', guest.serviceDomain_tlds({"allow_register":1})) }} +

              + + + + +
              +
              + +
              +
              + {% trans 'Transfer your domain from another registrar' %} +

              + + {{ mf.selectboxtld('domain[transfer_tld]', guest.serviceDomain_tlds({"allow_transfer":1})) }} +

              + + + + + +
              +
              + +
              +
              +
              + +
              + {% include 'partial_pricing.phtml' with {'product': product} %} +
              + +
              +
              +
              + + {% include 'partial_addons.phtml' with {'product': product} %} + + + +
              +{% endblock %} + +{% block sidebar2 %} + {% include 'partial_currency.phtml' %} +{% endblock %} + +{% block js %} + +{% set currency = guest.cart_get_currency %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_servicelicense_manage.phtml b/src/bb-themes/boxbilling/html/mod_servicelicense_manage.phtml new file mode 100644 index 000000000..1b5ca9b60 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_servicelicense_manage.phtml @@ -0,0 +1,112 @@ +{% if order.status == 'active' %} +
              +
              +

              {{ order.title }}

              +
              +
              +
              +

              {% trans 'License details' %}

              + + + + + + + + {% if service.validate_ip %} + + + + + {% endif %} + + {% if service.validate_host %} + + + + + {% endif %} + + {% if service.validate_version %} + + + + + {% endif %} + + {% if service.validate_path %} + + + + + {% endif %} + + +
              + {% trans 'Key' %} + + {{ service.license_key }} +
              + {% trans 'Valid IPs' %} + + {% for ip in service.ips %} + {{ ip }}
              + {% else %} + {% trans 'All ips' %} + {% endfor %} +
              + {% trans 'Valid Domains' %} + + {% for host in service.hosts %} + {{ host }}
              + {% else %} + {% trans 'All hosts' %} + {% endfor %} +
              + {% trans 'Valid Versions' %} + + {% for version in service.versions %} + {{ version }}
              + {% else %} + {% trans 'All versions' %} + {% endfor %} +
              + {% trans 'Valid Install paths' %} + + {% for path in service.paths %} + {{ path }}
              + {% else %} + {% trans 'All paths' %} + {% endfor %} +
              +
              +
              +
              +
              +

              {% trans 'Reset license' %}

              +

              {% trans 'You can reset your license parameters if you have changed your server' %}

              +
              +

              +
              +
              +
              +
              +
              + + +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_support_contact_us.phtml b/src/bb-themes/boxbilling/html/mod_support_contact_us.phtml new file mode 100644 index 000000000..adcc76f13 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_support_contact_us.phtml @@ -0,0 +1,98 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Contact us' %}{% endblock %} + +{% block content %} +{% set company = guest.system_company %} + +
              +
              +
              +

              {% trans 'Contact us' %}

              +

              {{ company.signature }}

              +
              +
              + +
              +
              +
              +

              + + +

              + +

              + + +

              + +

              + + +

              + +

              + + +

              + + {{ mf.recaptcha }} + + + +
              + + +
              + +
              + +
              +
                +
              • + {{ company.name }} +
              • +
              • + {{ company.address_1 }} +
              • +
              • + {{ company.address_2 }} +
              • +
              • + {{ company.address_3 }} +
              • +
              • + {{ company.tel }} +
              • +
              • + {{ company.www }} +
              • +
              • + {{ company.email }} +
              • +
              +
              +
              +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} diff --git a/src/bb-themes/boxbilling/html/mod_support_contact_us_conversation.phtml b/src/bb-themes/boxbilling/html/mod_support_contact_us_conversation.phtml new file mode 100644 index 000000000..a36c3445c --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_support_contact_us_conversation.phtml @@ -0,0 +1,133 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{ ticket.subject }}

              +
              +
              + {% for i, message in ticket.messages %} +
              +
              +

              {{ message.author.name }}

              +

              {{ message.created_at|bb_date }}

              +
              + +
              +
              +
              + {{ message.author.name }} +
              +
              +
              +
              + {{ message.content|bbmd }} +
              +
              +
              +
              +
              +
              +
              +
              +
              +

              + +

              + + +
              +
              +
              + +
              +
              +
              +

              + +

              + + +
              +
              +
              +
              +
              + {% endfor %} +
              +
              + +{% endblock %} + +{% block content_after %} + +
              +
              +

              {% trans 'Ticket details' %}

              +
              + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.status != 'closed' %} + + + + + + {% endif %} +
              {% trans 'Subject' %}{{ticket.subject}}
              {% trans 'Author' %}{{ticket.author.name}}
              {% trans 'Email' %}{{ticket.author.email}}
              {% trans 'Status' %}{{mf.status_name(ticket.status) }}
              {% trans 'Time opened' %}{{ticket.created_at|bb_date }}
              + {% trans 'Close ticket' %} +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_support_ticket.phtml b/src/bb-themes/boxbilling/html/mod_support_ticket.phtml new file mode 100644 index 000000000..e8cf01a64 --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_support_ticket.phtml @@ -0,0 +1,138 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{{ticket.subject}}{% endblock %} + +{% block content %} + +
              +
              +
              +

              {{ ticket.subject|truncate(60) }}

              +

              #{{ ticket.id }} - {{ticket.helpdesk.name}}

              +
              +
              + {% for i, message in ticket.messages %} +
              +
              +

              {{ message.author.name }}

              +

              {{ message.created_at|bb_date }}

              +
              + +
              +
              +
              + {{ message.author.name }} +
              +
              +
              +
              + {{ message.content|bbmd }} +
              +
              +
              +
              +
              +
              +
              +
              +
              +

              + +

              + + +
              +
              +
              + +
              +
              +
              +

              + +

              + + +
              +
              +
              +
              +
              + {% endfor %} +
              +
              + +
              +
              +
              +

              {{ticket.subject|truncate(95)}}

              +
              + + + + + + + + + + + + + + + + + + + + + + + {% if ticket.rel_type == 'order' and ticket.rel_id %} + + + + + {% endif %} + + + + + + + +
              {% trans 'Ticket ID' %}#{{ticket.id}}
              {% trans 'Help desk' %}{{ticket.helpdesk.name}}
              {% trans 'Status' %}{{mf.status_name(ticket.status)}}
              {% trans 'Time opened' %}{{ticket.created_at|bb_date }}
              {% trans 'Related to' %}{% trans 'Service #' %} {{ ticket.rel_id }}
              + + {% trans 'Tickets list' %} + + {% if ticket.status != 'closed' %} + + {% endif %} +
              +
              +
              + +{% endblock %} + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/mod_support_tickets.phtml b/src/bb-themes/boxbilling/html/mod_support_tickets.phtml new file mode 100644 index 000000000..d1636e77c --- /dev/null +++ b/src/bb-themes/boxbilling/html/mod_support_tickets.phtml @@ -0,0 +1,130 @@ +{% extends request.ajax ? "layout_blank.phtml" : "layout_default.phtml" %} +{% import "macro_functions.phtml" as mf %} +{% block meta_title %}{% trans 'Support tickets' %}{% endblock %} + +{% block content %} +
              +
              +
              +

              {% trans 'Support tickets' %}

              +

              {% trans 'Need an answer? We are here to help' %}

              +
              +
              + + + + + + + + + + + + + + {% set tickets = client.support_ticket_get_list({"per_page":10, "page":request.page}) %} + {% for i, ticket in tickets.list %} + + + + + + + + + + + {% else %} + + + + + + {% endfor %} + + + + + + + + + + +
              {% trans 'Id' %}{% trans 'Subject' %}{% trans 'Help desk' %}{% trans 'Status' %}{% trans 'Submitted' %} 
              #{{ticket.id}}{{ticket.subject|truncate(40)}}{{ticket.helpdesk.name}}{{mf.status_name(ticket.status)}}{{ticket.created_at|timeago}} {% trans 'ago' %}
              {% trans 'The list is empty' %}
              {% trans 'Submit new ticket' %} + {% include "partial_pagination.phtml" with {'list': tickets} %} +
              +
              +
              + +
              +
              +

              {% trans 'Submit new ticket' %}

              +
              +
              +
              +
              + {% trans 'Submit new support ticket' %} +

              + + {{ mf.selectbox('support_helpdesk_id', client.support_helpdesk_get_pairs, request.support_helpdesk_id, 1) }} +

              + +

              + + +

              + +

              + + +

              + + +
              +
              +
              +
              +{% endblock %} +{% block sidebar2 %} + +{% if guest.extension_is_on({"mod":'kb'}) %} +
              +
              +

              {%trans 'Knowledge base'%}

              +
              + +
              +{% endif %} + +{% endblock %} + + +{% block js %} + +{% endblock %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_addons.phtml b/src/bb-themes/boxbilling/html/partial_addons.phtml new file mode 100644 index 000000000..3fbab9fd0 --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_addons.phtml @@ -0,0 +1,59 @@ +{% if product.addons|length > 0 %} + +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_currency.phtml b/src/bb-themes/boxbilling/html/partial_currency.phtml new file mode 100644 index 000000000..8a5b83dce --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_currency.phtml @@ -0,0 +1,16 @@ +{% set currencies = guest.currency_get_pairs %} +{% if currencies|length > 1 %} +
              +
              +

              {% trans 'Select currency' %}

              +
              +
              + +
              +
              +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_menu.phtml b/src/bb-themes/boxbilling/html/partial_menu.phtml new file mode 100644 index 000000000..485fbf833 --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_menu.phtml @@ -0,0 +1,68 @@ + \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_message.phtml b/src/bb-themes/boxbilling/html/partial_message.phtml new file mode 100644 index 000000000..c7fdf52f5 --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_message.phtml @@ -0,0 +1,8 @@ +{% for label, messages in flashes %} + {% for msg in messages %} +
              +

              {{label}}

              +

              {{msg}}

              +
              + {% endfor %} +{% endfor %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_pagination.phtml b/src/bb-themes/boxbilling/html/partial_pagination.phtml new file mode 100644 index 000000000..54745412b --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_pagination.phtml @@ -0,0 +1,18 @@ +{% if list.pages > 1 %} +{% set page = list.page %} + +
              +
                + {% for i in 1..list.pages %} +
              • + {% if i == page %} + {{ i }} + {%else%} + {{ i }} + {% endif %} +
              • + {% endfor %} +
              +
              +
              +{% endif %} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_pricing.phtml b/src/bb-themes/boxbilling/html/partial_pricing.phtml new file mode 100644 index 000000000..02b830818 --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_pricing.phtml @@ -0,0 +1,83 @@ +
              +
              + +
              + {% if pricing.type == 'free' %} + + {% if product.allow_quantity_select %} + +
              + {% endif %} + +

              {% trans 'Total price:' %}

              +
              {{ 0 | money_convert }}
              + {% endif %} + + {% if pricing.type == 'once' %} + {% if product.allow_quantity_select %} + +
              + {% endif %} + +

              {% trans 'Total price:' %}

              +
              {{ (pricing.once.price + pricing.once.setup) | money_convert }}
              + {% endif %} + + + {% if pricing.type == 'recurrent' %} + + {% if product.allow_quantity_select %} + +
              + {% endif %} + + + + {% for code,prices in pricing.recurrent %} + {% if prices.enabled %} + {% if prices.setup > 0 %} + + {% endif %} + {% endif %} + + {% endfor %} + +
              +

              {% trans 'Total price:' %}

              + {% for code,prices in pricing.recurrent %} +
              {{ (prices.price + prices.setup) | money_convert }}
              + {% endfor %} + + {% endif %} +
              + + {% if product.addons|length > 0 %} + + {% else %} + + {% endif %} +
              +
              \ No newline at end of file diff --git a/src/bb-themes/boxbilling/html/partial_steps.phtml b/src/bb-themes/boxbilling/html/partial_steps.phtml new file mode 100644 index 000000000..29e43c8be --- /dev/null +++ b/src/bb-themes/boxbilling/html/partial_steps.phtml @@ -0,0 +1,24 @@ +
              + +
              + 1 +

              {% trans 'Select product' %}

              +
              + +
              + 2 +

              {% trans 'Configure' %}

              +
              + +
              + 3 +

              {% trans 'Confirm' %}

              +
              + +
              + 4 +

              {% trans 'Checkout' %}

              +
              + +
              +
              \ No newline at end of file diff --git a/src/bb-themes/boxbilling/index.html b/src/bb-themes/boxbilling/index.html new file mode 100644 index 000000000..e69de29bb diff --git a/src/bb-themes/boxbilling/manifest.json b/src/bb-themes/boxbilling/manifest.json new file mode 100644 index 000000000..952985051 --- /dev/null +++ b/src/bb-themes/boxbilling/manifest.json @@ -0,0 +1,8 @@ +{ + "name": "BoxBilling", + "version": "2.0.0", + "description": "Default client area theme", + "icon": "screenshot.jpg", + "author": "BoxBilling", + "author_url": "http://www.boxbilling.com/" +} \ No newline at end of file diff --git a/src/bb-themes/boxbilling/screenshot.jpg b/src/bb-themes/boxbilling/screenshot.jpg new file mode 100644 index 000000000..bdb4109cb Binary files /dev/null and b/src/bb-themes/boxbilling/screenshot.jpg differ diff --git a/src/bb-themes/huraga/assets/css/bootstrap-responsive.css b/src/bb-themes/huraga/assets/css/bootstrap-responsive.css new file mode 100644 index 000000000..fcd72f7a7 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/bootstrap-responsive.css @@ -0,0 +1,1109 @@ +/*! + * Bootstrap Responsive v2.3.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +@-ms-viewport { + width: device-width; +} + +.hidden { + display: none; + visibility: hidden; +} + +.visible-phone { + display: none !important; +} + +.visible-tablet { + display: none !important; +} + +.hidden-desktop { + display: none !important; +} + +.visible-desktop { + display: inherit !important; +} + +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} + +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} + +.visible-print { + display: none !important; +} + +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} + +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} + +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + line-height: 0; + content: ""; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + line-height: 0; + content: ""; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} + +@media (max-width: 767px) { + body { + padding-right: 20px; + padding-left: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-right: -20px; + margin-left: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + width: auto; + clear: none; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + display: block; + float: none; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + right: 20px; + left: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} + +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 20px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-right: 10px; + padding-left: 10px; + } + .media .pull-left, + .media .pull-right { + display: block; + float: none; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + right: 10px; + left: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} + +@media (max-width: 979px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 20px; + } + .navbar-fixed-bottom { + margin-top: 20px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-right: 10px; + padding-left: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 10px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #777777; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #777777; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + padding: 0; + margin-top: 5px; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + display: none; + float: none; + max-width: none; + padding: 0; + margin: 0 15px; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 10px 15px; + margin: 10px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + height: 0; + overflow: hidden; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-right: 10px; + padding-left: 10px; + } +} + +@media (min-width: 980px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} diff --git a/src/bb-themes/huraga/assets/css/bootstrap-responsive.min.css b/src/bb-themes/huraga/assets/css/bootstrap-responsive.min.css new file mode 100644 index 000000000..d1b7f4b0b --- /dev/null +++ b/src/bb-themes/huraga/assets/css/bootstrap-responsive.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap Responsive v2.3.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}@-ms-viewport{width:device-width}.hidden{display:none;visibility:hidden}.visible-phone{display:none!important}.visible-tablet{display:none!important}.hidden-desktop{display:none!important}.visible-desktop{display:inherit!important}@media(min-width:768px) and (max-width:979px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-tablet{display:inherit!important}.hidden-tablet{display:none!important}}@media(max-width:767px){.hidden-desktop{display:inherit!important}.visible-desktop{display:none!important}.visible-phone{display:inherit!important}.hidden-phone{display:none!important}}.visible-print{display:none!important}@media print{.visible-print{display:inherit!important}.hidden-print{display:none!important}}@media(min-width:1200px){.row{margin-left:-30px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:30px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:1170px}.span12{width:1170px}.span11{width:1070px}.span10{width:970px}.span9{width:870px}.span8{width:770px}.span7{width:670px}.span6{width:570px}.span5{width:470px}.span4{width:370px}.span3{width:270px}.span2{width:170px}.span1{width:70px}.offset12{margin-left:1230px}.offset11{margin-left:1130px}.offset10{margin-left:1030px}.offset9{margin-left:930px}.offset8{margin-left:830px}.offset7{margin-left:730px}.offset6{margin-left:630px}.offset5{margin-left:530px}.offset4{margin-left:430px}.offset3{margin-left:330px}.offset2{margin-left:230px}.offset1{margin-left:130px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.564102564102564%;*margin-left:2.5109110747408616%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.564102564102564%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.45299145299145%;*width:91.39979996362975%}.row-fluid .span10{width:82.90598290598291%;*width:82.8527914166212%}.row-fluid .span9{width:74.35897435897436%;*width:74.30578286961266%}.row-fluid .span8{width:65.81196581196582%;*width:65.75877432260411%}.row-fluid .span7{width:57.26495726495726%;*width:57.21176577559556%}.row-fluid .span6{width:48.717948717948715%;*width:48.664757228587014%}.row-fluid .span5{width:40.17094017094017%;*width:40.11774868157847%}.row-fluid .span4{width:31.623931623931625%;*width:31.570740134569924%}.row-fluid .span3{width:23.076923076923077%;*width:23.023731587561375%}.row-fluid .span2{width:14.52991452991453%;*width:14.476723040552828%}.row-fluid .span1{width:5.982905982905983%;*width:5.929714493544281%}.row-fluid .offset12{margin-left:105.12820512820512%;*margin-left:105.02182214948171%}.row-fluid .offset12:first-child{margin-left:102.56410256410257%;*margin-left:102.45771958537915%}.row-fluid .offset11{margin-left:96.58119658119658%;*margin-left:96.47481360247316%}.row-fluid .offset11:first-child{margin-left:94.01709401709402%;*margin-left:93.91071103837061%}.row-fluid .offset10{margin-left:88.03418803418803%;*margin-left:87.92780505546462%}.row-fluid .offset10:first-child{margin-left:85.47008547008548%;*margin-left:85.36370249136206%}.row-fluid .offset9{margin-left:79.48717948717949%;*margin-left:79.38079650845607%}.row-fluid .offset9:first-child{margin-left:76.92307692307693%;*margin-left:76.81669394435352%}.row-fluid .offset8{margin-left:70.94017094017094%;*margin-left:70.83378796144753%}.row-fluid .offset8:first-child{margin-left:68.37606837606839%;*margin-left:68.26968539734497%}.row-fluid .offset7{margin-left:62.393162393162385%;*margin-left:62.28677941443899%}.row-fluid .offset7:first-child{margin-left:59.82905982905982%;*margin-left:59.72267685033642%}.row-fluid .offset6{margin-left:53.84615384615384%;*margin-left:53.739770867430444%}.row-fluid .offset6:first-child{margin-left:51.28205128205128%;*margin-left:51.175668303327875%}.row-fluid .offset5{margin-left:45.299145299145295%;*margin-left:45.1927623204219%}.row-fluid .offset5:first-child{margin-left:42.73504273504273%;*margin-left:42.62865975631933%}.row-fluid .offset4{margin-left:36.75213675213675%;*margin-left:36.645753773413354%}.row-fluid .offset4:first-child{margin-left:34.18803418803419%;*margin-left:34.081651209310785%}.row-fluid .offset3{margin-left:28.205128205128204%;*margin-left:28.0987452264048%}.row-fluid .offset3:first-child{margin-left:25.641025641025642%;*margin-left:25.53464266230224%}.row-fluid .offset2{margin-left:19.65811965811966%;*margin-left:19.551736679396257%}.row-fluid .offset2:first-child{margin-left:17.094017094017094%;*margin-left:16.98763411529369%}.row-fluid .offset1{margin-left:11.11111111111111%;*margin-left:11.004728132387708%}.row-fluid .offset1:first-child{margin-left:8.547008547008547%;*margin-left:8.440625568285142%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:30px}input.span12,textarea.span12,.uneditable-input.span12{width:1156px}input.span11,textarea.span11,.uneditable-input.span11{width:1056px}input.span10,textarea.span10,.uneditable-input.span10{width:956px}input.span9,textarea.span9,.uneditable-input.span9{width:856px}input.span8,textarea.span8,.uneditable-input.span8{width:756px}input.span7,textarea.span7,.uneditable-input.span7{width:656px}input.span6,textarea.span6,.uneditable-input.span6{width:556px}input.span5,textarea.span5,.uneditable-input.span5{width:456px}input.span4,textarea.span4,.uneditable-input.span4{width:356px}input.span3,textarea.span3,.uneditable-input.span3{width:256px}input.span2,textarea.span2,.uneditable-input.span2{width:156px}input.span1,textarea.span1,.uneditable-input.span1{width:56px}.thumbnails{margin-left:-30px}.thumbnails>li{margin-left:30px}.row-fluid .thumbnails{margin-left:0}}@media(min-width:768px) and (max-width:979px){.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:724px}.span12{width:724px}.span11{width:662px}.span10{width:600px}.span9{width:538px}.span8{width:476px}.span7{width:414px}.span6{width:352px}.span5{width:290px}.span4{width:228px}.span3{width:166px}.span2{width:104px}.span1{width:42px}.offset12{margin-left:764px}.offset11{margin-left:702px}.offset10{margin-left:640px}.offset9{margin-left:578px}.offset8{margin-left:516px}.offset7{margin-left:454px}.offset6{margin-left:392px}.offset5{margin-left:330px}.offset4{margin-left:268px}.offset3{margin-left:206px}.offset2{margin-left:144px}.offset1{margin-left:82px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.7624309392265194%;*margin-left:2.709239449864817%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.7624309392265194%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.43646408839778%;*width:91.38327259903608%}.row-fluid .span10{width:82.87292817679558%;*width:82.81973668743387%}.row-fluid .span9{width:74.30939226519337%;*width:74.25620077583166%}.row-fluid .span8{width:65.74585635359117%;*width:65.69266486422946%}.row-fluid .span7{width:57.18232044198895%;*width:57.12912895262725%}.row-fluid .span6{width:48.61878453038674%;*width:48.56559304102504%}.row-fluid .span5{width:40.05524861878453%;*width:40.00205712942283%}.row-fluid .span4{width:31.491712707182323%;*width:31.43852121782062%}.row-fluid .span3{width:22.92817679558011%;*width:22.87498530621841%}.row-fluid .span2{width:14.3646408839779%;*width:14.311449394616199%}.row-fluid .span1{width:5.801104972375691%;*width:5.747913483013988%}.row-fluid .offset12{margin-left:105.52486187845304%;*margin-left:105.41847889972962%}.row-fluid .offset12:first-child{margin-left:102.76243093922652%;*margin-left:102.6560479605031%}.row-fluid .offset11{margin-left:96.96132596685082%;*margin-left:96.8549429881274%}.row-fluid .offset11:first-child{margin-left:94.1988950276243%;*margin-left:94.09251204890089%}.row-fluid .offset10{margin-left:88.39779005524862%;*margin-left:88.2914070765252%}.row-fluid .offset10:first-child{margin-left:85.6353591160221%;*margin-left:85.52897613729868%}.row-fluid .offset9{margin-left:79.8342541436464%;*margin-left:79.72787116492299%}.row-fluid .offset9:first-child{margin-left:77.07182320441989%;*margin-left:76.96544022569647%}.row-fluid .offset8{margin-left:71.2707182320442%;*margin-left:71.16433525332079%}.row-fluid .offset8:first-child{margin-left:68.50828729281768%;*margin-left:68.40190431409427%}.row-fluid .offset7{margin-left:62.70718232044199%;*margin-left:62.600799341718584%}.row-fluid .offset7:first-child{margin-left:59.94475138121547%;*margin-left:59.838368402492065%}.row-fluid .offset6{margin-left:54.14364640883978%;*margin-left:54.037263430116376%}.row-fluid .offset6:first-child{margin-left:51.38121546961326%;*margin-left:51.27483249088986%}.row-fluid .offset5{margin-left:45.58011049723757%;*margin-left:45.47372751851417%}.row-fluid .offset5:first-child{margin-left:42.81767955801105%;*margin-left:42.71129657928765%}.row-fluid .offset4{margin-left:37.01657458563536%;*margin-left:36.91019160691196%}.row-fluid .offset4:first-child{margin-left:34.25414364640884%;*margin-left:34.14776066768544%}.row-fluid .offset3{margin-left:28.45303867403315%;*margin-left:28.346655695309746%}.row-fluid .offset3:first-child{margin-left:25.69060773480663%;*margin-left:25.584224756083227%}.row-fluid .offset2{margin-left:19.88950276243094%;*margin-left:19.783119783707537%}.row-fluid .offset2:first-child{margin-left:17.12707182320442%;*margin-left:17.02068884448102%}.row-fluid .offset1{margin-left:11.32596685082873%;*margin-left:11.219583872105325%}.row-fluid .offset1:first-child{margin-left:8.56353591160221%;*margin-left:8.457152932878806%}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:710px}input.span11,textarea.span11,.uneditable-input.span11{width:648px}input.span10,textarea.span10,.uneditable-input.span10{width:586px}input.span9,textarea.span9,.uneditable-input.span9{width:524px}input.span8,textarea.span8,.uneditable-input.span8{width:462px}input.span7,textarea.span7,.uneditable-input.span7{width:400px}input.span6,textarea.span6,.uneditable-input.span6{width:338px}input.span5,textarea.span5,.uneditable-input.span5{width:276px}input.span4,textarea.span4,.uneditable-input.span4{width:214px}input.span3,textarea.span3,.uneditable-input.span3{width:152px}input.span2,textarea.span2,.uneditable-input.span2{width:90px}input.span1,textarea.span1,.uneditable-input.span1{width:28px}}@media(max-width:767px){body{padding-right:20px;padding-left:20px}.navbar-fixed-top,.navbar-fixed-bottom,.navbar-static-top{margin-right:-20px;margin-left:-20px}.container-fluid{padding:0}.dl-horizontal dt{float:none;width:auto;clear:none;text-align:left}.dl-horizontal dd{margin-left:0}.container{width:auto}.row-fluid{width:100%}.row,.thumbnails{margin-left:0}.thumbnails>li{float:none;margin-left:0}[class*="span"],.uneditable-input[class*="span"],.row-fluid [class*="span"]{display:block;float:none;width:100%;margin-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.span12,.row-fluid .span12{width:100%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="offset"]:first-child{margin-left:0}.input-large,.input-xlarge,.input-xxlarge,input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.input-prepend input,.input-append input,.input-prepend input[class*="span"],.input-append input[class*="span"]{display:inline-block;width:auto}.controls-row [class*="span"]+[class*="span"]{margin-left:0}.modal{position:fixed;top:20px;right:20px;left:20px;width:auto;margin:0}.modal.fade{top:-100px}.modal.fade.in{top:20px}}@media(max-width:480px){.nav-collapse{-webkit-transform:translate3d(0,0,0)}.page-header h1 small{display:block;line-height:20px}input[type="checkbox"],input[type="radio"]{border:1px solid #ccc}.form-horizontal .control-label{float:none;width:auto;padding-top:0;text-align:left}.form-horizontal .controls{margin-left:0}.form-horizontal .control-list{padding-top:0}.form-horizontal .form-actions{padding-right:10px;padding-left:10px}.media .pull-left,.media .pull-right{display:block;float:none;margin-bottom:10px}.media-object{margin-right:0;margin-left:0}.modal{top:10px;right:10px;left:10px}.modal-header .close{padding:10px;margin:-10px}.carousel-caption{position:static}}@media(max-width:979px){body{padding-top:0}.navbar-fixed-top,.navbar-fixed-bottom{position:static}.navbar-fixed-top{margin-bottom:20px}.navbar-fixed-bottom{margin-top:20px}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding:5px}.navbar .container{width:auto;padding:0}.navbar .brand{padding-right:10px;padding-left:10px;margin:0 0 0 -5px}.nav-collapse{clear:both}.nav-collapse .nav{float:none;margin:0 0 10px}.nav-collapse .nav>li{float:none}.nav-collapse .nav>li>a{margin-bottom:2px}.nav-collapse .nav>.divider-vertical{display:none}.nav-collapse .nav .nav-header{color:#777;text-shadow:none}.nav-collapse .nav>li>a,.nav-collapse .dropdown-menu a{padding:9px 15px;font-weight:bold;color:#777;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.nav-collapse .btn{padding:4px 10px 4px;font-weight:normal;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.nav-collapse .dropdown-menu li+li a{margin-bottom:2px}.nav-collapse .nav>li>a:hover,.nav-collapse .nav>li>a:focus,.nav-collapse .dropdown-menu a:hover,.nav-collapse .dropdown-menu a:focus{background-color:#f2f2f2}.navbar-inverse .nav-collapse .nav>li>a,.navbar-inverse .nav-collapse .dropdown-menu a{color:#999}.navbar-inverse .nav-collapse .nav>li>a:hover,.navbar-inverse .nav-collapse .nav>li>a:focus,.navbar-inverse .nav-collapse .dropdown-menu a:hover,.navbar-inverse .nav-collapse .dropdown-menu a:focus{background-color:#111}.nav-collapse.in .btn-group{padding:0;margin-top:5px}.nav-collapse .dropdown-menu{position:static;top:auto;left:auto;display:none;float:none;max-width:none;padding:0;margin:0 15px;background-color:transparent;border:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.nav-collapse .open>.dropdown-menu{display:block}.nav-collapse .dropdown-menu:before,.nav-collapse .dropdown-menu:after{display:none}.nav-collapse .dropdown-menu .divider{display:none}.nav-collapse .nav>li>.dropdown-menu:before,.nav-collapse .nav>li>.dropdown-menu:after{display:none}.nav-collapse .navbar-form,.nav-collapse .navbar-search{float:none;padding:10px 15px;margin:10px 0;border-top:1px solid #f2f2f2;border-bottom:1px solid #f2f2f2;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.1)}.navbar-inverse .nav-collapse .navbar-form,.navbar-inverse .nav-collapse .navbar-search{border-top-color:#111;border-bottom-color:#111}.navbar .nav-collapse .nav.pull-right{float:none;margin-left:0}.nav-collapse,.nav-collapse.collapse{height:0;overflow:hidden}.navbar .btn-navbar{display:block}.navbar-static .navbar-inner{padding-right:10px;padding-left:10px}}@media(min-width:980px){.nav-collapse.collapse{height:auto!important;overflow:visible!important}} diff --git a/src/bb-themes/huraga/assets/css/bootstrap.css b/src/bb-themes/huraga/assets/css/bootstrap.css new file mode 100644 index 000000000..2f56af33f --- /dev/null +++ b/src/bb-themes/huraga/assets/css/bootstrap.css @@ -0,0 +1,6158 @@ +/*! + * Bootstrap v2.3.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */ + +.clearfix { + *zoom: 1; +} + +.clearfix:before, +.clearfix:after { + display: table; + line-height: 0; + content: ""; +} + +.clearfix:after { + clear: both; +} + +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} + +.input-block-level { + display: block; + width: 100%; + min-height: 30px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} + +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} + +audio:not([controls]) { + display: none; +} + +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} + +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +a:hover, +a:active { + outline: 0; +} + +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + width: auto\9; + height: auto; + max-width: 100%; + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} + +#map_canvas img, +.google-maps img { + max-width: none; +} + +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} + +button, +input { + *overflow: visible; + line-height: normal; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + cursor: pointer; + -webkit-appearance: button; +} + +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} + +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} + +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} + +textarea { + overflow: auto; + vertical-align: top; +} + +@media print { + * { + color: #000 !important; + text-shadow: none !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} + +body { + margin: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 14px; + line-height: 20px; + color: #333333; + background-color: #ffffff; +} + +a { + color: #0088cc; + text-decoration: none; +} + +a:hover, +a:focus { + color: #005580; + text-decoration: underline; +} + +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} + +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} + +.row { + margin-left: -20px; + *zoom: 1; +} + +.row:before, +.row:after { + display: table; + line-height: 0; + content: ""; +} + +.row:after { + clear: both; +} + +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} + +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.span12 { + width: 940px; +} + +.span11 { + width: 860px; +} + +.span10 { + width: 780px; +} + +.span9 { + width: 700px; +} + +.span8 { + width: 620px; +} + +.span7 { + width: 540px; +} + +.span6 { + width: 460px; +} + +.span5 { + width: 380px; +} + +.span4 { + width: 300px; +} + +.span3 { + width: 220px; +} + +.span2 { + width: 140px; +} + +.span1 { + width: 60px; +} + +.offset12 { + margin-left: 980px; +} + +.offset11 { + margin-left: 900px; +} + +.offset10 { + margin-left: 820px; +} + +.offset9 { + margin-left: 740px; +} + +.offset8 { + margin-left: 660px; +} + +.offset7 { + margin-left: 580px; +} + +.offset6 { + margin-left: 500px; +} + +.offset5 { + margin-left: 420px; +} + +.offset4 { + margin-left: 340px; +} + +.offset3 { + margin-left: 260px; +} + +.offset2 { + margin-left: 180px; +} + +.offset1 { + margin-left: 100px; +} + +.row-fluid { + width: 100%; + *zoom: 1; +} + +.row-fluid:before, +.row-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.row-fluid:after { + clear: both; +} + +.row-fluid [class*="span"] { + display: block; + float: left; + width: 100%; + min-height: 30px; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} + +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} + +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} + +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} + +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} + +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} + +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} + +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} + +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} + +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} + +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} + +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} + +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} + +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} + +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} + +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} + +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} + +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} + +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} + +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} + +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} + +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} + +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} + +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} + +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} + +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} + +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} + +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} + +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} + +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} + +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} + +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} + +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} + +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} + +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} + +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} + +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} + +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} + +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} + +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} + +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} + +.container:before, +.container:after { + display: table; + line-height: 0; + content: ""; +} + +.container:after { + clear: both; +} + +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} + +.container-fluid:before, +.container-fluid:after { + display: table; + line-height: 0; + content: ""; +} + +.container-fluid:after { + clear: both; +} + +p { + margin: 0 0 10px; +} + +.lead { + margin-bottom: 20px; + font-size: 21px; + font-weight: 200; + line-height: 30px; +} + +small { + font-size: 85%; +} + +strong { + font-weight: bold; +} + +em { + font-style: italic; +} + +cite { + font-style: normal; +} + +.muted { + color: #999999; +} + +a.muted:hover, +a.muted:focus { + color: #808080; +} + +.text-warning { + color: #c09853; +} + +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} + +.text-error { + color: #b94a48; +} + +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} + +.text-info { + color: #3a87ad; +} + +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} + +.text-success { + color: #468847; +} + +a.text-success:hover, +a.text-success:focus { + color: #356635; +} + +.text-left { + text-align: left; +} + +.text-right { + text-align: right; +} + +.text-center { + text-align: center; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 10px 0; + font-family: inherit; + font-weight: bold; + line-height: 20px; + color: inherit; + text-rendering: optimizelegibility; +} + +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} + +h1, +h2, +h3 { + line-height: 40px; +} + +h1 { + font-size: 38.5px; +} + +h2 { + font-size: 31.5px; +} + +h3 { + font-size: 24.5px; +} + +h4 { + font-size: 17.5px; +} + +h5 { + font-size: 14px; +} + +h6 { + font-size: 11.9px; +} + +h1 small { + font-size: 24.5px; +} + +h2 small { + font-size: 17.5px; +} + +h3 small { + font-size: 14px; +} + +h4 small { + font-size: 14px; +} + +.page-header { + padding-bottom: 9px; + margin: 20px 0 30px; + border-bottom: 1px solid #eeeeee; +} + +ul, +ol { + padding: 0; + margin: 0 0 10px 25px; +} + +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} + +li { + line-height: 20px; +} + +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} + +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} + +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + padding-right: 5px; + padding-left: 5px; + *zoom: 1; +} + +dl { + margin-bottom: 20px; +} + +dt, +dd { + line-height: 20px; +} + +dt { + font-weight: bold; +} + +dd { + margin-left: 10px; +} + +.dl-horizontal { + *zoom: 1; +} + +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + line-height: 0; + content: ""; +} + +.dl-horizontal:after { + clear: both; +} + +.dl-horizontal dt { + float: left; + width: 160px; + overflow: hidden; + clear: left; + text-align: right; + text-overflow: ellipsis; + white-space: nowrap; +} + +.dl-horizontal dd { + margin-left: 180px; +} + +hr { + margin: 20px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} + +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} + +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} + +blockquote { + padding: 0 0 0 15px; + margin: 0 0 20px; + border-left: 5px solid #eeeeee; +} + +blockquote p { + margin-bottom: 0; + font-size: 17.5px; + font-weight: 300; + line-height: 1.25; +} + +blockquote small { + display: block; + line-height: 20px; + color: #999999; +} + +blockquote small:before { + content: '\2014 \00A0'; +} + +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} + +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} + +blockquote.pull-right small:before { + content: ''; +} + +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} + +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} + +address { + display: block; + margin-bottom: 20px; + font-style: normal; + line-height: 20px; +} + +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 12px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +code { + padding: 2px 4px; + color: #d14; + white-space: nowrap; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; +} + +pre { + display: block; + padding: 9.5px; + margin: 0 0 10px; + font-size: 13px; + line-height: 20px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +pre.prettyprint { + margin-bottom: 20px; +} + +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} + +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} + +form { + margin: 0 0 20px; +} + +fieldset { + padding: 0; + margin: 0; + border: 0; +} + +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 20px; + font-size: 21px; + line-height: 40px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} + +legend small { + font-size: 15px; + color: #999999; +} + +label, +input, +button, +select, +textarea { + font-size: 14px; + font-weight: normal; + line-height: 20px; +} + +input, +button, +select, +textarea { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; +} + +label { + display: block; + margin-bottom: 5px; +} + +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 20px; + padding: 4px 6px; + margin-bottom: 10px; + font-size: 14px; + line-height: 20px; + color: #555555; + vertical-align: middle; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +input, +textarea, +.uneditable-input { + width: 206px; +} + +textarea { + height: auto; +} + +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear 0.2s, box-shadow linear 0.2s; + -moz-transition: border linear 0.2s, box-shadow linear 0.2s; + -o-transition: border linear 0.2s, box-shadow linear 0.2s; + transition: border linear 0.2s, box-shadow linear 0.2s; +} + +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 8px rgba(82, 168, 236, 0.6); +} + +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + margin-top: 1px \9; + *margin-top: 0; + line-height: normal; +} + +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} + +select, +input[type="file"] { + height: 30px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 30px; +} + +select { + width: 220px; + background-color: #ffffff; + border: 1px solid #cccccc; +} + +select[multiple], +select[size] { + height: auto; +} + +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.uneditable-input, +.uneditable-textarea { + color: #999999; + cursor: not-allowed; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); +} + +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} + +.uneditable-textarea { + width: auto; + height: auto; +} + +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} + +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} + +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} + +.radio, +.checkbox { + min-height: 20px; + padding-left: 20px; +} + +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} + +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} + +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} + +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} + +.input-mini { + width: 60px; +} + +.input-small { + width: 90px; +} + +.input-medium { + width: 150px; +} + +.input-large { + width: 210px; +} + +.input-xlarge { + width: 270px; +} + +.input-xxlarge { + width: 530px; +} + +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} + +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} + +input, +textarea, +.uneditable-input { + margin-left: 0; +} + +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} + +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} + +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} + +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} + +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} + +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} + +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} + +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} + +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} + +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} + +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} + +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} + +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} + +.controls-row { + *zoom: 1; +} + +.controls-row:before, +.controls-row:after { + display: table; + line-height: 0; + content: ""; +} + +.controls-row:after { + clear: both; +} + +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} + +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} + +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} + +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} + +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} + +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} + +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} + +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} + +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} + +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} + +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} + +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} + +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} + +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} + +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} + +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} + +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} + +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} + +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} + +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} + +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} + +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} + +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} + +.form-actions { + padding: 19px 20px 20px; + margin-top: 20px; + margin-bottom: 20px; + background-color: #f5f5f5; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} + +.form-actions:before, +.form-actions:after { + display: table; + line-height: 0; + content: ""; +} + +.form-actions:after { + clear: both; +} + +.help-block, +.help-inline { + color: #595959; +} + +.help-block { + display: block; + margin-bottom: 10px; +} + +.help-inline { + display: inline-block; + *display: inline; + padding-left: 5px; + vertical-align: middle; + *zoom: 1; +} + +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 10px; + font-size: 0; + white-space: nowrap; + vertical-align: middle; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 14px; +} + +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} + +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 20px; + min-width: 16px; + padding: 4px 5px; + font-size: 14px; + font-weight: normal; + line-height: 20px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} + +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} + +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} + +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} + +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} + +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +/* Allow for input prepend/append in search forms */ + +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} + +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} + +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + margin-bottom: 0; + vertical-align: middle; + *zoom: 1; +} + +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} + +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} + +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} + +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} + +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} + +.control-group { + margin-bottom: 10px; +} + +legend + .control-group { + margin-top: 20px; + -webkit-margin-top-collapse: separate; +} + +.form-horizontal .control-group { + margin-bottom: 20px; + *zoom: 1; +} + +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + line-height: 0; + content: ""; +} + +.form-horizontal .control-group:after { + clear: both; +} + +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} + +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} + +.form-horizontal .controls:first-child { + *padding-left: 180px; +} + +.form-horizontal .help-block { + margin-bottom: 0; +} + +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 10px; +} + +.form-horizontal .form-actions { + padding-left: 180px; +} + +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} + +.table { + width: 100%; + margin-bottom: 20px; +} + +.table th, +.table td { + padding: 8px; + line-height: 20px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} + +.table th { + font-weight: bold; +} + +.table thead th { + vertical-align: bottom; +} + +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} + +.table tbody + tbody { + border-top: 2px solid #dddddd; +} + +.table .table { + background-color: #ffffff; +} + +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} + +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} + +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} + +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; +} + +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; +} + +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; +} + +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; +} + +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} + +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} + +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} + +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} + +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} + +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} + +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} + +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} + +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} + +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} + +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} + +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} + +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} + +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} + +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} + +.table tbody tr.success > td { + background-color: #dff0d8; +} + +.table tbody tr.error > td { + background-color: #f2dede; +} + +.table tbody tr.warning > td { + background-color: #fcf8e3; +} + +.table tbody tr.info > td { + background-color: #d9edf7; +} + +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} + +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} + +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} + +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} + +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + margin-top: 1px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; +} + +/* White icons with optional class, or on hover/focus/active states of certain elements */ + +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/glyphicons-halflings-white.png"); +} + +.icon-glass { + background-position: 0 0; +} + +.icon-music { + background-position: -24px 0; +} + +.icon-search { + background-position: -48px 0; +} + +.icon-envelope { + background-position: -72px 0; +} + +.icon-heart { + background-position: -96px 0; +} + +.icon-star { + background-position: -120px 0; +} + +.icon-star-empty { + background-position: -144px 0; +} + +.icon-user { + background-position: -168px 0; +} + +.icon-film { + background-position: -192px 0; +} + +.icon-th-large { + background-position: -216px 0; +} + +.icon-th { + background-position: -240px 0; +} + +.icon-th-list { + background-position: -264px 0; +} + +.icon-ok { + background-position: -288px 0; +} + +.icon-remove { + background-position: -312px 0; +} + +.icon-zoom-in { + background-position: -336px 0; +} + +.icon-zoom-out { + background-position: -360px 0; +} + +.icon-off { + background-position: -384px 0; +} + +.icon-signal { + background-position: -408px 0; +} + +.icon-cog { + background-position: -432px 0; +} + +.icon-trash { + background-position: -456px 0; +} + +.icon-home { + background-position: 0 -24px; +} + +.icon-file { + background-position: -24px -24px; +} + +.icon-time { + background-position: -48px -24px; +} + +.icon-road { + background-position: -72px -24px; +} + +.icon-download-alt { + background-position: -96px -24px; +} + +.icon-download { + background-position: -120px -24px; +} + +.icon-upload { + background-position: -144px -24px; +} + +.icon-inbox { + background-position: -168px -24px; +} + +.icon-play-circle { + background-position: -192px -24px; +} + +.icon-repeat { + background-position: -216px -24px; +} + +.icon-refresh { + background-position: -240px -24px; +} + +.icon-list-alt { + background-position: -264px -24px; +} + +.icon-lock { + background-position: -287px -24px; +} + +.icon-flag { + background-position: -312px -24px; +} + +.icon-headphones { + background-position: -336px -24px; +} + +.icon-volume-off { + background-position: -360px -24px; +} + +.icon-volume-down { + background-position: -384px -24px; +} + +.icon-volume-up { + background-position: -408px -24px; +} + +.icon-qrcode { + background-position: -432px -24px; +} + +.icon-barcode { + background-position: -456px -24px; +} + +.icon-tag { + background-position: 0 -48px; +} + +.icon-tags { + background-position: -25px -48px; +} + +.icon-book { + background-position: -48px -48px; +} + +.icon-bookmark { + background-position: -72px -48px; +} + +.icon-print { + background-position: -96px -48px; +} + +.icon-camera { + background-position: -120px -48px; +} + +.icon-font { + background-position: -144px -48px; +} + +.icon-bold { + background-position: -167px -48px; +} + +.icon-italic { + background-position: -192px -48px; +} + +.icon-text-height { + background-position: -216px -48px; +} + +.icon-text-width { + background-position: -240px -48px; +} + +.icon-align-left { + background-position: -264px -48px; +} + +.icon-align-center { + background-position: -288px -48px; +} + +.icon-align-right { + background-position: -312px -48px; +} + +.icon-align-justify { + background-position: -336px -48px; +} + +.icon-list { + background-position: -360px -48px; +} + +.icon-indent-left { + background-position: -384px -48px; +} + +.icon-indent-right { + background-position: -408px -48px; +} + +.icon-facetime-video { + background-position: -432px -48px; +} + +.icon-picture { + background-position: -456px -48px; +} + +.icon-pencil { + background-position: 0 -72px; +} + +.icon-map-marker { + background-position: -24px -72px; +} + +.icon-adjust { + background-position: -48px -72px; +} + +.icon-tint { + background-position: -72px -72px; +} + +.icon-edit { + background-position: -96px -72px; +} + +.icon-share { + background-position: -120px -72px; +} + +.icon-check { + background-position: -144px -72px; +} + +.icon-move { + background-position: -168px -72px; +} + +.icon-step-backward { + background-position: -192px -72px; +} + +.icon-fast-backward { + background-position: -216px -72px; +} + +.icon-backward { + background-position: -240px -72px; +} + +.icon-play { + background-position: -264px -72px; +} + +.icon-pause { + background-position: -288px -72px; +} + +.icon-stop { + background-position: -312px -72px; +} + +.icon-forward { + background-position: -336px -72px; +} + +.icon-fast-forward { + background-position: -360px -72px; +} + +.icon-step-forward { + background-position: -384px -72px; +} + +.icon-eject { + background-position: -408px -72px; +} + +.icon-chevron-left { + background-position: -432px -72px; +} + +.icon-chevron-right { + background-position: -456px -72px; +} + +.icon-plus-sign { + background-position: 0 -96px; +} + +.icon-minus-sign { + background-position: -24px -96px; +} + +.icon-remove-sign { + background-position: -48px -96px; +} + +.icon-ok-sign { + background-position: -72px -96px; +} + +.icon-question-sign { + background-position: -96px -96px; +} + +.icon-info-sign { + background-position: -120px -96px; +} + +.icon-screenshot { + background-position: -144px -96px; +} + +.icon-remove-circle { + background-position: -168px -96px; +} + +.icon-ok-circle { + background-position: -192px -96px; +} + +.icon-ban-circle { + background-position: -216px -96px; +} + +.icon-arrow-left { + background-position: -240px -96px; +} + +.icon-arrow-right { + background-position: -264px -96px; +} + +.icon-arrow-up { + background-position: -289px -96px; +} + +.icon-arrow-down { + background-position: -312px -96px; +} + +.icon-share-alt { + background-position: -336px -96px; +} + +.icon-resize-full { + background-position: -360px -96px; +} + +.icon-resize-small { + background-position: -384px -96px; +} + +.icon-plus { + background-position: -408px -96px; +} + +.icon-minus { + background-position: -433px -96px; +} + +.icon-asterisk { + background-position: -456px -96px; +} + +.icon-exclamation-sign { + background-position: 0 -120px; +} + +.icon-gift { + background-position: -24px -120px; +} + +.icon-leaf { + background-position: -48px -120px; +} + +.icon-fire { + background-position: -72px -120px; +} + +.icon-eye-open { + background-position: -96px -120px; +} + +.icon-eye-close { + background-position: -120px -120px; +} + +.icon-warning-sign { + background-position: -144px -120px; +} + +.icon-plane { + background-position: -168px -120px; +} + +.icon-calendar { + background-position: -192px -120px; +} + +.icon-random { + width: 16px; + background-position: -216px -120px; +} + +.icon-comment { + background-position: -240px -120px; +} + +.icon-magnet { + background-position: -264px -120px; +} + +.icon-chevron-up { + background-position: -288px -120px; +} + +.icon-chevron-down { + background-position: -313px -119px; +} + +.icon-retweet { + background-position: -336px -120px; +} + +.icon-shopping-cart { + background-position: -360px -120px; +} + +.icon-folder-close { + width: 16px; + background-position: -384px -120px; +} + +.icon-folder-open { + width: 16px; + background-position: -408px -120px; +} + +.icon-resize-vertical { + background-position: -432px -119px; +} + +.icon-resize-horizontal { + background-position: -456px -118px; +} + +.icon-hdd { + background-position: 0 -144px; +} + +.icon-bullhorn { + background-position: -24px -144px; +} + +.icon-bell { + background-position: -48px -144px; +} + +.icon-certificate { + background-position: -72px -144px; +} + +.icon-thumbs-up { + background-position: -96px -144px; +} + +.icon-thumbs-down { + background-position: -120px -144px; +} + +.icon-hand-right { + background-position: -144px -144px; +} + +.icon-hand-left { + background-position: -168px -144px; +} + +.icon-hand-up { + background-position: -192px -144px; +} + +.icon-hand-down { + background-position: -216px -144px; +} + +.icon-circle-arrow-right { + background-position: -240px -144px; +} + +.icon-circle-arrow-left { + background-position: -264px -144px; +} + +.icon-circle-arrow-up { + background-position: -288px -144px; +} + +.icon-circle-arrow-down { + background-position: -312px -144px; +} + +.icon-globe { + background-position: -336px -144px; +} + +.icon-wrench { + background-position: -360px -144px; +} + +.icon-tasks { + background-position: -384px -144px; +} + +.icon-filter { + background-position: -408px -144px; +} + +.icon-briefcase { + background-position: -432px -144px; +} + +.icon-fullscreen { + background-position: -456px -144px; +} + +.dropup, +.dropdown { + position: relative; +} + +.dropdown-toggle { + *margin-bottom: -3px; +} + +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} + +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} + +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} + +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 20px; + color: #333333; + white-space: nowrap; +} + +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #ffffff; + text-decoration: none; + background-color: #0081c2; + background-image: -moz-linear-gradient(top, #0088cc, #0077b3); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3)); + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3); + background-image: -o-linear-gradient(top, #0088cc, #0077b3); + background-image: linear-gradient(to bottom, #0088cc, #0077b3); + background-repeat: repeat-x; + outline: 0; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0); +} + +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} + +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.open { + *z-index: 1000; +} + +.open > .dropdown-menu { + display: block; +} + +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} + +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} + +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} + +.dropdown-submenu > a:after { + display: block; + float: right; + width: 0; + height: 0; + margin-top: 5px; + margin-right: -10px; + border-color: transparent; + border-left-color: #cccccc; + border-style: solid; + border-width: 5px 0 5px 5px; + content: " "; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.dropdown .dropdown-menu .nav-header { + padding-right: 20px; + padding-left: 20px; +} + +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} + +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} + +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} + +.fade.in { + opacity: 1; +} + +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} + +.collapse.in { + height: auto; +} + +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 20px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} + +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} + +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} + +.btn { + display: inline-block; + *display: inline; + padding: 4px 12px; + margin-bottom: 0; + *margin-left: .3em; + font-size: 14px; + line-height: 20px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + cursor: pointer; + background-color: #f5f5f5; + *background-color: #e6e6e6; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + border: 1px solid #cccccc; + *border: 0; + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + border-bottom-color: #b3b3b3; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} + +.btn:active, +.btn.active { + background-color: #cccccc \9; +} + +.btn:first-child { + *margin-left: 0; +} + +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} + +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} + +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-large { + padding: 11px 19px; + font-size: 17.5px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} + +.btn-small { + padding: 2px 10px; + font-size: 11.9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} + +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} + +.btn-mini { + padding: 0 6px; + font-size: 10.5px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.btn-block { + display: block; + width: 100%; + padding-right: 0; + padding-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.btn-block + .btn-block { + margin-top: 5px; +} + +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} + +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} + +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #006dcc; + *background-color: #0044cc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(to bottom, #0088cc, #0044cc); + background-repeat: repeat-x; + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0044cc', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #0044cc; + *background-color: #003bb3; +} + +.btn-primary:active, +.btn-primary.active { + background-color: #003399 \9; +} + +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + *background-color: #f89406; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} + +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} + +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #da4f49; + *background-color: #bd362f; + background-image: -moz-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#bd362f)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #bd362f); + background-image: -o-linear-gradient(top, #ee5f5b, #bd362f); + background-image: linear-gradient(to bottom, #ee5f5b, #bd362f); + background-repeat: repeat-x; + border-color: #bd362f #bd362f #802420; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffbd362f', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #bd362f; + *background-color: #a9302a; +} + +.btn-danger:active, +.btn-danger.active { + background-color: #942a25 \9; +} + +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5bb75b; + *background-color: #51a351; + background-image: -moz-linear-gradient(top, #62c462, #51a351); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#51a351)); + background-image: -webkit-linear-gradient(top, #62c462, #51a351); + background-image: -o-linear-gradient(top, #62c462, #51a351); + background-image: linear-gradient(to bottom, #62c462, #51a351); + background-repeat: repeat-x; + border-color: #51a351 #51a351 #387038; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff51a351', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #51a351; + *background-color: #499249; +} + +.btn-success:active, +.btn-success.active { + background-color: #408140 \9; +} + +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #49afcd; + *background-color: #2f96b4; + background-image: -moz-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#2f96b4)); + background-image: -webkit-linear-gradient(top, #5bc0de, #2f96b4); + background-image: -o-linear-gradient(top, #5bc0de, #2f96b4); + background-image: linear-gradient(to bottom, #5bc0de, #2f96b4); + background-repeat: repeat-x; + border-color: #2f96b4 #2f96b4 #1f6377; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff2f96b4', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #2f96b4; + *background-color: #2a85a0; +} + +.btn-info:active, +.btn-info.active { + background-color: #24748c \9; +} + +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #363636; + *background-color: #222222; + background-image: -moz-linear-gradient(top, #444444, #222222); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#444444), to(#222222)); + background-image: -webkit-linear-gradient(top, #444444, #222222); + background-image: -o-linear-gradient(top, #444444, #222222); + background-image: linear-gradient(to bottom, #444444, #222222); + background-repeat: repeat-x; + border-color: #222222 #222222 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444', endColorstr='#ff222222', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #222222; + *background-color: #151515; +} + +.btn-inverse:active, +.btn-inverse.active { + background-color: #080808 \9; +} + +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} + +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} + +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} + +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} + +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} + +.btn-link { + color: #0088cc; + cursor: pointer; + border-color: transparent; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-link:hover, +.btn-link:focus { + color: #005580; + text-decoration: underline; + background-color: transparent; +} + +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} + +.btn-group { + position: relative; + display: inline-block; + *display: inline; + *margin-left: .3em; + font-size: 0; + white-space: nowrap; + vertical-align: middle; + *zoom: 1; +} + +.btn-group:first-child { + *margin-left: 0; +} + +.btn-group + .btn-group { + margin-left: 5px; +} + +.btn-toolbar { + margin-top: 10px; + margin-bottom: 10px; + font-size: 0; +} + +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} + +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group > .btn + .btn { + margin-left: -1px; +} + +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 14px; +} + +.btn-group > .btn-mini { + font-size: 10.5px; +} + +.btn-group > .btn-small { + font-size: 11.9px; +} + +.btn-group > .btn-large { + font-size: 17.5px; +} + +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} + +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} + +.btn-group > .btn + .dropdown-toggle { + *padding-top: 5px; + padding-right: 8px; + *padding-bottom: 5px; + padding-left: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 1px 0 0 rgba(255, 255, 255, 0.125), inset 0 1px 0 rgba(255, 255, 255, 0.2), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group > .btn-mini + .dropdown-toggle { + *padding-top: 2px; + padding-right: 5px; + *padding-bottom: 2px; + padding-left: 5px; +} + +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} + +.btn-group > .btn-large + .dropdown-toggle { + *padding-top: 7px; + padding-right: 12px; + *padding-bottom: 7px; + padding-left: 12px; +} + +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15), 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} + +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #0044cc; +} + +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} + +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #bd362f; +} + +.btn-group.open .btn-success.dropdown-toggle { + background-color: #51a351; +} + +.btn-group.open .btn-info.dropdown-toggle { + background-color: #2f96b4; +} + +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #222222; +} + +.btn .caret { + margin-top: 8px; + margin-left: 0; +} + +.btn-large .caret { + margin-top: 6px; +} + +.btn-large .caret { + border-top-width: 5px; + border-right-width: 5px; + border-left-width: 5px; +} + +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} + +.dropup .btn-large .caret { + border-bottom-width: 5px; +} + +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} + +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.btn-group-vertical > .btn + .btn { + margin-top: -1px; + margin-left: 0; +} + +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} + +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 20px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.alert, +.alert h4 { + color: #c09853; +} + +.alert h4 { + margin: 0; +} + +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 20px; +} + +.alert-success { + color: #468847; + background-color: #dff0d8; + border-color: #d6e9c6; +} + +.alert-success h4 { + color: #468847; +} + +.alert-danger, +.alert-error { + color: #b94a48; + background-color: #f2dede; + border-color: #eed3d7; +} + +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} + +.alert-info { + color: #3a87ad; + background-color: #d9edf7; + border-color: #bce8f1; +} + +.alert-info h4 { + color: #3a87ad; +} + +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} + +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} + +.alert-block p + p { + margin-top: 5px; +} + +.nav { + margin-bottom: 20px; + margin-left: 0; + list-style: none; +} + +.nav > li > a { + display: block; +} + +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} + +.nav > li > a > img { + max-width: none; +} + +.nav > .pull-right { + float: right; +} + +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 20px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} + +.nav li + .nav-header { + margin-top: 9px; +} + +.nav-list { + padding-right: 15px; + padding-left: 15px; + margin-bottom: 0; +} + +.nav-list > li > a, +.nav-list .nav-header { + margin-right: -15px; + margin-left: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} + +.nav-list > li > a { + padding: 3px 15px; +} + +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #0088cc; +} + +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} + +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 9px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} + +.nav-tabs, +.nav-pills { + *zoom: 1; +} + +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + line-height: 0; + content: ""; +} + +.nav-tabs:after, +.nav-pills:after { + clear: both; +} + +.nav-tabs > li, +.nav-pills > li { + float: left; +} + +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} + +.nav-tabs { + border-bottom: 1px solid #ddd; +} + +.nav-tabs > li { + margin-bottom: -1px; +} + +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 20px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} + +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} + +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + cursor: default; + background-color: #ffffff; + border: 1px solid #ddd; + border-bottom-color: transparent; +} + +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} + +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #0088cc; +} + +.nav-stacked > li { + float: none; +} + +.nav-stacked > li > a { + margin-right: 0; +} + +.nav-tabs.nav-stacked { + border-bottom: 0; +} + +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-topleft: 4px; +} + +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -moz-border-radius-bottomleft: 4px; +} + +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + z-index: 2; + border-color: #ddd; +} + +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} + +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} + +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} + +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.nav .dropdown-toggle .caret { + margin-top: 6px; + border-top-color: #0088cc; + border-bottom-color: #0088cc; +} + +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #005580; + border-bottom-color: #005580; +} + +/* move down carets for tabs */ + +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} + +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} + +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} + +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} + +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} + +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} + +.tabbable { + *zoom: 1; +} + +.tabbable:before, +.tabbable:after { + display: table; + line-height: 0; + content: ""; +} + +.tabbable:after { + clear: both; +} + +.tab-content { + overflow: auto; +} + +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} + +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} + +.tab-content > .active, +.pill-content > .active { + display: block; +} + +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} + +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} + +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} + +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-top-color: #ddd; + border-bottom-color: transparent; +} + +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} + +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} + +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} + +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} + +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} + +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} + +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} + +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} + +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} + +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} + +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} + +.nav > .disabled > a { + color: #999999; +} + +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + cursor: default; + background-color: transparent; +} + +.navbar { + *position: relative; + *z-index: 2; + margin-bottom: 20px; + overflow: visible; +} + +.navbar-inner { + min-height: 40px; + padding-right: 20px; + padding-left: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + border: 1px solid #d4d4d4; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + *zoom: 1; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); +} + +.navbar-inner:before, +.navbar-inner:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-inner:after { + clear: both; +} + +.navbar .container { + width: auto; +} + +.nav-collapse.collapse { + height: auto; + overflow: visible; +} + +.navbar .brand { + display: block; + float: left; + padding: 10px 20px 10px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #777777; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} + +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #777777; +} + +.navbar-link { + color: #777777; +} + +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} + +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-right: 1px solid #ffffff; + border-left: 1px solid #f2f2f2; +} + +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} + +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} + +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} + +.navbar-form:before, +.navbar-form:after { + display: table; + line-height: 0; + content: ""; +} + +.navbar-form:after { + clear: both; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} + +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} + +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} + +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} + +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} + +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} + +.navbar-search .search-query { + padding: 4px 14px; + margin-bottom: 0; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.navbar-static-top { + position: static; + margin-bottom: 0; +} + +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} + +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-right: 0; + padding-left: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} + +.navbar-fixed-top { + top: 0; +} + +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar-fixed-bottom { + bottom: 0; +} + +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); + box-shadow: 0 -1px 10px rgba(0, 0, 0, 0.1); +} + +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} + +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} + +.navbar .nav > li { + float: left; +} + +.navbar .nav > li > a { + float: none; + padding: 10px 15px 10px; + color: #777777; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} + +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} + +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + color: #333333; + text-decoration: none; + background-color: transparent; +} + +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} + +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-right: 5px; + margin-left: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + *background-color: #e5e5e5; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); + -webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + -moz-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); + box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 1px 0 rgba(255, 255, 255, 0.075); +} + +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} + +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} + +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} + +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} + +.navbar .nav > li > .dropdown-menu:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.navbar .nav > li > .dropdown-menu:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + border-left: 6px solid transparent; + content: ''; +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + top: auto; + bottom: -7px; + border-top: 7px solid #ccc; + border-bottom: 0; + border-top-color: rgba(0, 0, 0, 0.2); +} + +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + top: auto; + bottom: -6px; + border-top: 6px solid #ffffff; + border-bottom: 0; +} + +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + color: #555555; + background-color: #e5e5e5; +} + +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #777777; + border-bottom-color: #777777; +} + +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} + +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + right: 0; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + right: 12px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + right: 13px; + left: auto; +} + +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + right: 100%; + left: auto; + margin-right: -1px; + margin-left: 0; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} + +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + border-color: #252525; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); +} + +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} + +.navbar-inverse .brand { + color: #999999; +} + +.navbar-inverse .navbar-text { + color: #999999; +} + +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + color: #ffffff; + background-color: transparent; +} + +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .navbar-link { + color: #999999; +} + +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} + +.navbar-inverse .divider-vertical { + border-right-color: #222222; + border-left-color: #111111; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + color: #ffffff; + background-color: #111111; +} + +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} + +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} + +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} + +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} + +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + outline: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} + +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + *background-color: #040404; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + filter: progid:DXImageTransform.Microsoft.gradient(enabled=false); +} + +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} + +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} + +.breadcrumb { + padding: 8px 15px; + margin: 0 0 20px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.breadcrumb > li { + display: inline-block; + *display: inline; + text-shadow: 0 1px 0 #ffffff; + *zoom: 1; +} + +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} + +.breadcrumb > .active { + color: #999999; +} + +.pagination { + margin: 20px 0; +} + +.pagination ul { + display: inline-block; + *display: inline; + margin-bottom: 0; + margin-left: 0; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + *zoom: 1; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} + +.pagination ul > li { + display: inline; +} + +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 20px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} + +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} + +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} + +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + cursor: default; + background-color: transparent; +} + +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -webkit-border-top-left-radius: 4px; + border-top-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + -moz-border-radius-topleft: 4px; +} + +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 4px; + border-top-right-radius: 4px; + -webkit-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; + -moz-border-radius-topright: 4px; + -moz-border-radius-bottomright: 4px; +} + +.pagination-centered { + text-align: center; +} + +.pagination-right { + text-align: right; +} + +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 17.5px; +} + +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-bottom-left-radius: 6px; + border-bottom-left-radius: 6px; + -webkit-border-top-left-radius: 6px; + border-top-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + -moz-border-radius-topleft: 6px; +} + +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + border-bottom-right-radius: 6px; + -moz-border-radius-topright: 6px; + -moz-border-radius-bottomright: 6px; +} + +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-bottom-left-radius: 3px; + border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + border-top-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + -moz-border-radius-topleft: 3px; +} + +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + border-bottom-right-radius: 3px; + -moz-border-radius-topright: 3px; + -moz-border-radius-bottomright: 3px; +} + +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.9px; +} + +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0 6px; + font-size: 10.5px; +} + +.pager { + margin: 20px 0; + text-align: center; + list-style: none; + *zoom: 1; +} + +.pager:before, +.pager:after { + display: table; + line-height: 0; + content: ""; +} + +.pager:after { + clear: both; +} + +.pager li { + display: inline; +} + +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} + +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} + +.pager .next > a, +.pager .next > span { + float: right; +} + +.pager .previous > a, +.pager .previous > span { + float: left; +} + +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + cursor: default; + background-color: #fff; +} + +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} + +.modal-backdrop.fade { + opacity: 0; +} + +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + outline: none; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; +} + +.modal.fade { + top: -25%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out; +} + +.modal.fade.in { + top: 10%; +} + +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} + +.modal-header .close { + margin-top: 2px; +} + +.modal-header h3 { + margin: 0; + line-height: 30px; +} + +.modal-body { + position: relative; + max-height: 400px; + padding: 15px; + overflow-y: auto; +} + +.modal-form { + margin-bottom: 0; +} + +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + *zoom: 1; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; +} + +.modal-footer:before, +.modal-footer:after { + display: table; + line-height: 0; + content: ""; +} + +.modal-footer:after { + clear: both; +} + +.modal-footer .btn + .btn { + margin-bottom: 0; + margin-left: 5px; +} + +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} + +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} + +.tooltip { + position: absolute; + z-index: 1030; + display: block; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); + visibility: visible; +} + +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} + +.tooltip.top { + padding: 5px 0; + margin-top: -3px; +} + +.tooltip.right { + padding: 0 5px; + margin-left: 3px; +} + +.tooltip.bottom { + padding: 5px 0; + margin-top: 3px; +} + +.tooltip.left { + padding: 0 5px; + margin-left: -3px; +} + +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-top-color: #000000; + border-width: 5px 5px 0; +} + +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-right-color: #000000; + border-width: 5px 5px 5px 0; +} + +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-left-color: #000000; + border-width: 5px 0 5px 5px; +} + +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-bottom-color: #000000; + border-width: 0 5px 5px; +} + +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + white-space: normal; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} + +.popover.top { + margin-top: -10px; +} + +.popover.right { + margin-left: 10px; +} + +.popover.bottom { + margin-top: 10px; +} + +.popover.left { + margin-left: -10px; +} + +.popover-title { + padding: 8px 14px; + margin: 0; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} + +.popover-title:empty { + display: none; +} + +.popover-content { + padding: 9px 14px; +} + +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} + +.popover .arrow { + border-width: 11px; +} + +.popover .arrow:after { + border-width: 10px; + content: ""; +} + +.popover.top .arrow { + bottom: -11px; + left: 50%; + margin-left: -11px; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + border-bottom-width: 0; +} + +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-top-color: #ffffff; + border-bottom-width: 0; +} + +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); + border-left-width: 0; +} + +.popover.right .arrow:after { + bottom: -10px; + left: 1px; + border-right-color: #ffffff; + border-left-width: 0; +} + +.popover.bottom .arrow { + top: -11px; + left: 50%; + margin-left: -11px; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + border-top-width: 0; +} + +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-bottom-color: #ffffff; + border-top-width: 0; +} + +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); + border-right-width: 0; +} + +.popover.left .arrow:after { + right: 1px; + bottom: -10px; + border-left-color: #ffffff; + border-right-width: 0; +} + +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} + +.thumbnails:before, +.thumbnails:after { + display: table; + line-height: 0; + content: ""; +} + +.thumbnails:after { + clear: both; +} + +.row-fluid .thumbnails { + margin-left: 0; +} + +.thumbnails > li { + float: left; + margin-bottom: 20px; + margin-left: 20px; +} + +.thumbnail { + display: block; + padding: 4px; + line-height: 20px; + border: 1px solid #ddd; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} + +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #0088cc; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} + +.thumbnail > img { + display: block; + max-width: 100%; + margin-right: auto; + margin-left: auto; +} + +.thumbnail .caption { + padding: 9px; + color: #555555; +} + +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} + +.media, +.media .media { + margin-top: 15px; +} + +.media:first-child { + margin-top: 0; +} + +.media-object { + display: block; +} + +.media-heading { + margin: 0 0 5px; +} + +.media > .pull-left { + margin-right: 10px; +} + +.media > .pull-right { + margin-left: 10px; +} + +.media-list { + margin-left: 0; + list-style: none; +} + +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 11.844px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + white-space: nowrap; + vertical-align: baseline; + background-color: #999999; +} + +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} + +.badge { + padding-right: 9px; + padding-left: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} + +.label:empty, +.badge:empty { + display: none; +} + +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} + +.label-important, +.badge-important { + background-color: #b94a48; +} + +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} + +.label-warning, +.badge-warning { + background-color: #f89406; +} + +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} + +.label-success, +.badge-success { + background-color: #468847; +} + +.label-success[href], +.badge-success[href] { + background-color: #356635; +} + +.label-info, +.badge-info { + background-color: #3a87ad; +} + +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} + +.label-inverse, +.badge-inverse { + background-color: #333333; +} + +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} + +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} + +.btn-mini .label, +.btn-mini .badge { + top: 0; +} + +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} + +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} + +.progress { + height: 20px; + margin-bottom: 20px; + overflow: hidden; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); +} + +.progress .bar { + float: left; + width: 0; + height: 100%; + font-size: 12px; + color: #ffffff; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} + +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 1px 0 0 rgba(0, 0, 0, 0.15), inset 0 -1px 0 rgba(0, 0, 0, 0.15); +} + +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} + +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} + +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} + +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} + +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} + +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} + +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} + +.accordion { + margin-bottom: 20px; +} + +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.accordion-heading { + border-bottom: 0; +} + +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} + +.accordion-toggle { + cursor: pointer; +} + +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} + +.carousel { + position: relative; + margin-bottom: 20px; + line-height: 1; +} + +.carousel-inner { + position: relative; + width: 100%; + overflow: hidden; +} + +.carousel-inner > .item { + position: relative; + display: none; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} + +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} + +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} + +.carousel-inner > .active { + left: 0; +} + +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} + +.carousel-inner > .next { + left: 100%; +} + +.carousel-inner > .prev { + left: -100%; +} + +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} + +.carousel-inner > .active.left { + left: -100%; +} + +.carousel-inner > .active.right { + left: 100%; +} + +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} + +.carousel-control.right { + right: 15px; + left: auto; +} + +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} + +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} + +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} + +.carousel-indicators .active { + background-color: #fff; +} + +.carousel-caption { + position: absolute; + right: 0; + bottom: 0; + left: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} + +.carousel-caption h4, +.carousel-caption p { + line-height: 20px; + color: #ffffff; +} + +.carousel-caption h4 { + margin: 0 0 5px; +} + +.carousel-caption p { + margin-bottom: 0; +} + +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 30px; + color: inherit; + background-color: #eeeeee; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} + +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + letter-spacing: -1px; + color: inherit; +} + +.hero-unit li { + line-height: 30px; +} + +.pull-right { + float: right; +} + +.pull-left { + float: left; +} + +.hide { + display: none; +} + +.show { + display: block; +} + +.invisible { + visibility: hidden; +} + +.affix { + position: fixed; +} diff --git a/src/bb-themes/huraga/assets/css/bootstrap.min.css b/src/bb-themes/huraga/assets/css/bootstrap.min.css new file mode 100644 index 000000000..c10c7f417 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/bootstrap.min.css @@ -0,0 +1,9 @@ +/*! + * Bootstrap v2.3.1 + * + * Copyright 2012 Twitter, Inc + * Licensed under the Apache License v2.0 + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Designed and built with all the love in the world @twitter by @mdo and @fat. + */.clearfix{*zoom:1}.clearfix:before,.clearfix:after{display:table;line-height:0;content:""}.clearfix:after{clear:both}.hide-text{font:0/0 a;color:transparent;text-shadow:none;background-color:transparent;border:0}.input-block-level{display:block;width:100%;min-height:30px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}article,aside,details,figcaption,figure,footer,header,hgroup,nav,section{display:block}audio,canvas,video{display:inline-block;*display:inline;*zoom:1}audio:not([controls]){display:none}html{font-size:100%;-webkit-text-size-adjust:100%;-ms-text-size-adjust:100%}a:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}a:hover,a:active{outline:0}sub,sup{position:relative;font-size:75%;line-height:0;vertical-align:baseline}sup{top:-0.5em}sub{bottom:-0.25em}img{width:auto\9;height:auto;max-width:100%;vertical-align:middle;border:0;-ms-interpolation-mode:bicubic}#map_canvas img,.google-maps img{max-width:none}button,input,select,textarea{margin:0;font-size:100%;vertical-align:middle}button,input{*overflow:visible;line-height:normal}button::-moz-focus-inner,input::-moz-focus-inner{padding:0;border:0}button,html input[type="button"],input[type="reset"],input[type="submit"]{cursor:pointer;-webkit-appearance:button}label,select,button,input[type="button"],input[type="reset"],input[type="submit"],input[type="radio"],input[type="checkbox"]{cursor:pointer}input[type="search"]{-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box;-webkit-appearance:textfield}input[type="search"]::-webkit-search-decoration,input[type="search"]::-webkit-search-cancel-button{-webkit-appearance:none}textarea{overflow:auto;vertical-align:top}@media print{*{color:#000!important;text-shadow:none!important;background:transparent!important;box-shadow:none!important}a,a:visited{text-decoration:underline}a[href]:after{content:" (" attr(href) ")"}abbr[title]:after{content:" (" attr(title) ")"}.ir a:after,a[href^="javascript:"]:after,a[href^="#"]:after{content:""}pre,blockquote{border:1px solid #999;page-break-inside:avoid}thead{display:table-header-group}tr,img{page-break-inside:avoid}img{max-width:100%!important}@page{margin:.5cm}p,h2,h3{orphans:3;widows:3}h2,h3{page-break-after:avoid}}body{margin:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:14px;line-height:20px;color:#333;background-color:#fff}a{color:#08c;text-decoration:none}a:hover,a:focus{color:#005580;text-decoration:underline}.img-rounded{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.img-polaroid{padding:4px;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.1);box-shadow:0 1px 3px rgba(0,0,0,0.1)}.img-circle{-webkit-border-radius:500px;-moz-border-radius:500px;border-radius:500px}.row{margin-left:-20px;*zoom:1}.row:before,.row:after{display:table;line-height:0;content:""}.row:after{clear:both}[class*="span"]{float:left;min-height:1px;margin-left:20px}.container,.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.span12{width:940px}.span11{width:860px}.span10{width:780px}.span9{width:700px}.span8{width:620px}.span7{width:540px}.span6{width:460px}.span5{width:380px}.span4{width:300px}.span3{width:220px}.span2{width:140px}.span1{width:60px}.offset12{margin-left:980px}.offset11{margin-left:900px}.offset10{margin-left:820px}.offset9{margin-left:740px}.offset8{margin-left:660px}.offset7{margin-left:580px}.offset6{margin-left:500px}.offset5{margin-left:420px}.offset4{margin-left:340px}.offset3{margin-left:260px}.offset2{margin-left:180px}.offset1{margin-left:100px}.row-fluid{width:100%;*zoom:1}.row-fluid:before,.row-fluid:after{display:table;line-height:0;content:""}.row-fluid:after{clear:both}.row-fluid [class*="span"]{display:block;float:left;width:100%;min-height:30px;margin-left:2.127659574468085%;*margin-left:2.074468085106383%;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.row-fluid [class*="span"]:first-child{margin-left:0}.row-fluid .controls-row [class*="span"]+[class*="span"]{margin-left:2.127659574468085%}.row-fluid .span12{width:100%;*width:99.94680851063829%}.row-fluid .span11{width:91.48936170212765%;*width:91.43617021276594%}.row-fluid .span10{width:82.97872340425532%;*width:82.92553191489361%}.row-fluid .span9{width:74.46808510638297%;*width:74.41489361702126%}.row-fluid .span8{width:65.95744680851064%;*width:65.90425531914893%}.row-fluid .span7{width:57.44680851063829%;*width:57.39361702127659%}.row-fluid .span6{width:48.93617021276595%;*width:48.88297872340425%}.row-fluid .span5{width:40.42553191489362%;*width:40.37234042553192%}.row-fluid .span4{width:31.914893617021278%;*width:31.861702127659576%}.row-fluid .span3{width:23.404255319148934%;*width:23.351063829787233%}.row-fluid .span2{width:14.893617021276595%;*width:14.840425531914894%}.row-fluid .span1{width:6.382978723404255%;*width:6.329787234042553%}.row-fluid .offset12{margin-left:104.25531914893617%;*margin-left:104.14893617021275%}.row-fluid .offset12:first-child{margin-left:102.12765957446808%;*margin-left:102.02127659574467%}.row-fluid .offset11{margin-left:95.74468085106382%;*margin-left:95.6382978723404%}.row-fluid .offset11:first-child{margin-left:93.61702127659574%;*margin-left:93.51063829787232%}.row-fluid .offset10{margin-left:87.23404255319149%;*margin-left:87.12765957446807%}.row-fluid .offset10:first-child{margin-left:85.1063829787234%;*margin-left:84.99999999999999%}.row-fluid .offset9{margin-left:78.72340425531914%;*margin-left:78.61702127659572%}.row-fluid .offset9:first-child{margin-left:76.59574468085106%;*margin-left:76.48936170212764%}.row-fluid .offset8{margin-left:70.2127659574468%;*margin-left:70.10638297872339%}.row-fluid .offset8:first-child{margin-left:68.08510638297872%;*margin-left:67.9787234042553%}.row-fluid .offset7{margin-left:61.70212765957446%;*margin-left:61.59574468085106%}.row-fluid .offset7:first-child{margin-left:59.574468085106375%;*margin-left:59.46808510638297%}.row-fluid .offset6{margin-left:53.191489361702125%;*margin-left:53.085106382978715%}.row-fluid .offset6:first-child{margin-left:51.063829787234035%;*margin-left:50.95744680851063%}.row-fluid .offset5{margin-left:44.68085106382979%;*margin-left:44.57446808510638%}.row-fluid .offset5:first-child{margin-left:42.5531914893617%;*margin-left:42.4468085106383%}.row-fluid .offset4{margin-left:36.170212765957444%;*margin-left:36.06382978723405%}.row-fluid .offset4:first-child{margin-left:34.04255319148936%;*margin-left:33.93617021276596%}.row-fluid .offset3{margin-left:27.659574468085104%;*margin-left:27.5531914893617%}.row-fluid .offset3:first-child{margin-left:25.53191489361702%;*margin-left:25.425531914893618%}.row-fluid .offset2{margin-left:19.148936170212764%;*margin-left:19.04255319148936%}.row-fluid .offset2:first-child{margin-left:17.02127659574468%;*margin-left:16.914893617021278%}.row-fluid .offset1{margin-left:10.638297872340425%;*margin-left:10.53191489361702%}.row-fluid .offset1:first-child{margin-left:8.51063829787234%;*margin-left:8.404255319148938%}[class*="span"].hide,.row-fluid [class*="span"].hide{display:none}[class*="span"].pull-right,.row-fluid [class*="span"].pull-right{float:right}.container{margin-right:auto;margin-left:auto;*zoom:1}.container:before,.container:after{display:table;line-height:0;content:""}.container:after{clear:both}.container-fluid{padding-right:20px;padding-left:20px;*zoom:1}.container-fluid:before,.container-fluid:after{display:table;line-height:0;content:""}.container-fluid:after{clear:both}p{margin:0 0 10px}.lead{margin-bottom:20px;font-size:21px;font-weight:200;line-height:30px}small{font-size:85%}strong{font-weight:bold}em{font-style:italic}cite{font-style:normal}.muted{color:#999}a.muted:hover,a.muted:focus{color:#808080}.text-warning{color:#c09853}a.text-warning:hover,a.text-warning:focus{color:#a47e3c}.text-error{color:#b94a48}a.text-error:hover,a.text-error:focus{color:#953b39}.text-info{color:#3a87ad}a.text-info:hover,a.text-info:focus{color:#2d6987}.text-success{color:#468847}a.text-success:hover,a.text-success:focus{color:#356635}.text-left{text-align:left}.text-right{text-align:right}.text-center{text-align:center}h1,h2,h3,h4,h5,h6{margin:10px 0;font-family:inherit;font-weight:bold;line-height:20px;color:inherit;text-rendering:optimizelegibility}h1 small,h2 small,h3 small,h4 small,h5 small,h6 small{font-weight:normal;line-height:1;color:#999}h1,h2,h3{line-height:40px}h1{font-size:38.5px}h2{font-size:31.5px}h3{font-size:24.5px}h4{font-size:17.5px}h5{font-size:14px}h6{font-size:11.9px}h1 small{font-size:24.5px}h2 small{font-size:17.5px}h3 small{font-size:14px}h4 small{font-size:14px}.page-header{padding-bottom:9px;margin:20px 0 30px;border-bottom:1px solid #eee}ul,ol{padding:0;margin:0 0 10px 25px}ul ul,ul ol,ol ol,ol ul{margin-bottom:0}li{line-height:20px}ul.unstyled,ol.unstyled{margin-left:0;list-style:none}ul.inline,ol.inline{margin-left:0;list-style:none}ul.inline>li,ol.inline>li{display:inline-block;*display:inline;padding-right:5px;padding-left:5px;*zoom:1}dl{margin-bottom:20px}dt,dd{line-height:20px}dt{font-weight:bold}dd{margin-left:10px}.dl-horizontal{*zoom:1}.dl-horizontal:before,.dl-horizontal:after{display:table;line-height:0;content:""}.dl-horizontal:after{clear:both}.dl-horizontal dt{float:left;width:160px;overflow:hidden;clear:left;text-align:right;text-overflow:ellipsis;white-space:nowrap}.dl-horizontal dd{margin-left:180px}hr{margin:20px 0;border:0;border-top:1px solid #eee;border-bottom:1px solid #fff}abbr[title],abbr[data-original-title]{cursor:help;border-bottom:1px dotted #999}abbr.initialism{font-size:90%;text-transform:uppercase}blockquote{padding:0 0 0 15px;margin:0 0 20px;border-left:5px solid #eee}blockquote p{margin-bottom:0;font-size:17.5px;font-weight:300;line-height:1.25}blockquote small{display:block;line-height:20px;color:#999}blockquote small:before{content:'\2014 \00A0'}blockquote.pull-right{float:right;padding-right:15px;padding-left:0;border-right:5px solid #eee;border-left:0}blockquote.pull-right p,blockquote.pull-right small{text-align:right}blockquote.pull-right small:before{content:''}blockquote.pull-right small:after{content:'\00A0 \2014'}q:before,q:after,blockquote:before,blockquote:after{content:""}address{display:block;margin-bottom:20px;font-style:normal;line-height:20px}code,pre{padding:0 3px 2px;font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:12px;color:#333;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}code{padding:2px 4px;color:#d14;white-space:nowrap;background-color:#f7f7f9;border:1px solid #e1e1e8}pre{display:block;padding:9.5px;margin:0 0 10px;font-size:13px;line-height:20px;word-break:break-all;word-wrap:break-word;white-space:pre;white-space:pre-wrap;background-color:#f5f5f5;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.15);-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}pre.prettyprint{margin-bottom:20px}pre code{padding:0;color:inherit;white-space:pre;white-space:pre-wrap;background-color:transparent;border:0}.pre-scrollable{max-height:340px;overflow-y:scroll}form{margin:0 0 20px}fieldset{padding:0;margin:0;border:0}legend{display:block;width:100%;padding:0;margin-bottom:20px;font-size:21px;line-height:40px;color:#333;border:0;border-bottom:1px solid #e5e5e5}legend small{font-size:15px;color:#999}label,input,button,select,textarea{font-size:14px;font-weight:normal;line-height:20px}input,button,select,textarea{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}label{display:block;margin-bottom:5px}select,textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{display:inline-block;height:20px;padding:4px 6px;margin-bottom:10px;font-size:14px;line-height:20px;color:#555;vertical-align:middle;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}input,textarea,.uneditable-input{width:206px}textarea{height:auto}textarea,input[type="text"],input[type="password"],input[type="datetime"],input[type="datetime-local"],input[type="date"],input[type="month"],input[type="time"],input[type="week"],input[type="number"],input[type="email"],input[type="url"],input[type="search"],input[type="tel"],input[type="color"],.uneditable-input{background-color:#fff;border:1px solid #ccc;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-webkit-transition:border linear .2s,box-shadow linear .2s;-moz-transition:border linear .2s,box-shadow linear .2s;-o-transition:border linear .2s,box-shadow linear .2s;transition:border linear .2s,box-shadow linear .2s}textarea:focus,input[type="text"]:focus,input[type="password"]:focus,input[type="datetime"]:focus,input[type="datetime-local"]:focus,input[type="date"]:focus,input[type="month"]:focus,input[type="time"]:focus,input[type="week"]:focus,input[type="number"]:focus,input[type="email"]:focus,input[type="url"]:focus,input[type="search"]:focus,input[type="tel"]:focus,input[type="color"]:focus,.uneditable-input:focus{border-color:rgba(82,168,236,0.8);outline:0;outline:thin dotted \9;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 8px rgba(82,168,236,0.6)}input[type="radio"],input[type="checkbox"]{margin:4px 0 0;margin-top:1px \9;*margin-top:0;line-height:normal}input[type="file"],input[type="image"],input[type="submit"],input[type="reset"],input[type="button"],input[type="radio"],input[type="checkbox"]{width:auto}select,input[type="file"]{height:30px;*margin-top:4px;line-height:30px}select{width:220px;background-color:#fff;border:1px solid #ccc}select[multiple],select[size]{height:auto}select:focus,input[type="file"]:focus,input[type="radio"]:focus,input[type="checkbox"]:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.uneditable-input,.uneditable-textarea{color:#999;cursor:not-allowed;background-color:#fcfcfc;border-color:#ccc;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.025);box-shadow:inset 0 1px 2px rgba(0,0,0,0.025)}.uneditable-input{overflow:hidden;white-space:nowrap}.uneditable-textarea{width:auto;height:auto}input:-moz-placeholder,textarea:-moz-placeholder{color:#999}input:-ms-input-placeholder,textarea:-ms-input-placeholder{color:#999}input::-webkit-input-placeholder,textarea::-webkit-input-placeholder{color:#999}.radio,.checkbox{min-height:20px;padding-left:20px}.radio input[type="radio"],.checkbox input[type="checkbox"]{float:left;margin-left:-20px}.controls>.radio:first-child,.controls>.checkbox:first-child{padding-top:5px}.radio.inline,.checkbox.inline{display:inline-block;padding-top:5px;margin-bottom:0;vertical-align:middle}.radio.inline+.radio.inline,.checkbox.inline+.checkbox.inline{margin-left:10px}.input-mini{width:60px}.input-small{width:90px}.input-medium{width:150px}.input-large{width:210px}.input-xlarge{width:270px}.input-xxlarge{width:530px}input[class*="span"],select[class*="span"],textarea[class*="span"],.uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"]{float:none;margin-left:0}.input-append input[class*="span"],.input-append .uneditable-input[class*="span"],.input-prepend input[class*="span"],.input-prepend .uneditable-input[class*="span"],.row-fluid input[class*="span"],.row-fluid select[class*="span"],.row-fluid textarea[class*="span"],.row-fluid .uneditable-input[class*="span"],.row-fluid .input-prepend [class*="span"],.row-fluid .input-append [class*="span"]{display:inline-block}input,textarea,.uneditable-input{margin-left:0}.controls-row [class*="span"]+[class*="span"]{margin-left:20px}input.span12,textarea.span12,.uneditable-input.span12{width:926px}input.span11,textarea.span11,.uneditable-input.span11{width:846px}input.span10,textarea.span10,.uneditable-input.span10{width:766px}input.span9,textarea.span9,.uneditable-input.span9{width:686px}input.span8,textarea.span8,.uneditable-input.span8{width:606px}input.span7,textarea.span7,.uneditable-input.span7{width:526px}input.span6,textarea.span6,.uneditable-input.span6{width:446px}input.span5,textarea.span5,.uneditable-input.span5{width:366px}input.span4,textarea.span4,.uneditable-input.span4{width:286px}input.span3,textarea.span3,.uneditable-input.span3{width:206px}input.span2,textarea.span2,.uneditable-input.span2{width:126px}input.span1,textarea.span1,.uneditable-input.span1{width:46px}.controls-row{*zoom:1}.controls-row:before,.controls-row:after{display:table;line-height:0;content:""}.controls-row:after{clear:both}.controls-row [class*="span"],.row-fluid .controls-row [class*="span"]{float:left}.controls-row .checkbox[class*="span"],.controls-row .radio[class*="span"]{padding-top:5px}input[disabled],select[disabled],textarea[disabled],input[readonly],select[readonly],textarea[readonly]{cursor:not-allowed;background-color:#eee}input[type="radio"][disabled],input[type="checkbox"][disabled],input[type="radio"][readonly],input[type="checkbox"][readonly]{background-color:transparent}.control-group.warning .control-label,.control-group.warning .help-block,.control-group.warning .help-inline{color:#c09853}.control-group.warning .checkbox,.control-group.warning .radio,.control-group.warning input,.control-group.warning select,.control-group.warning textarea{color:#c09853}.control-group.warning input,.control-group.warning select,.control-group.warning textarea{border-color:#c09853;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.warning input:focus,.control-group.warning select:focus,.control-group.warning textarea:focus{border-color:#a47e3c;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #dbc59e}.control-group.warning .input-prepend .add-on,.control-group.warning .input-append .add-on{color:#c09853;background-color:#fcf8e3;border-color:#c09853}.control-group.error .control-label,.control-group.error .help-block,.control-group.error .help-inline{color:#b94a48}.control-group.error .checkbox,.control-group.error .radio,.control-group.error input,.control-group.error select,.control-group.error textarea{color:#b94a48}.control-group.error input,.control-group.error select,.control-group.error textarea{border-color:#b94a48;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.error input:focus,.control-group.error select:focus,.control-group.error textarea:focus{border-color:#953b39;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #d59392}.control-group.error .input-prepend .add-on,.control-group.error .input-append .add-on{color:#b94a48;background-color:#f2dede;border-color:#b94a48}.control-group.success .control-label,.control-group.success .help-block,.control-group.success .help-inline{color:#468847}.control-group.success .checkbox,.control-group.success .radio,.control-group.success input,.control-group.success select,.control-group.success textarea{color:#468847}.control-group.success input,.control-group.success select,.control-group.success textarea{border-color:#468847;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.success input:focus,.control-group.success select:focus,.control-group.success textarea:focus{border-color:#356635;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7aba7b}.control-group.success .input-prepend .add-on,.control-group.success .input-append .add-on{color:#468847;background-color:#dff0d8;border-color:#468847}.control-group.info .control-label,.control-group.info .help-block,.control-group.info .help-inline{color:#3a87ad}.control-group.info .checkbox,.control-group.info .radio,.control-group.info input,.control-group.info select,.control-group.info textarea{color:#3a87ad}.control-group.info input,.control-group.info select,.control-group.info textarea{border-color:#3a87ad;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075);box-shadow:inset 0 1px 1px rgba(0,0,0,0.075)}.control-group.info input:focus,.control-group.info select:focus,.control-group.info textarea:focus{border-color:#2d6987;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3;box-shadow:inset 0 1px 1px rgba(0,0,0,0.075),0 0 6px #7ab5d3}.control-group.info .input-prepend .add-on,.control-group.info .input-append .add-on{color:#3a87ad;background-color:#d9edf7;border-color:#3a87ad}input:focus:invalid,textarea:focus:invalid,select:focus:invalid{color:#b94a48;border-color:#ee5f5b}input:focus:invalid:focus,textarea:focus:invalid:focus,select:focus:invalid:focus{border-color:#e9322d;-webkit-box-shadow:0 0 6px #f8b9b7;-moz-box-shadow:0 0 6px #f8b9b7;box-shadow:0 0 6px #f8b9b7}.form-actions{padding:19px 20px 20px;margin-top:20px;margin-bottom:20px;background-color:#f5f5f5;border-top:1px solid #e5e5e5;*zoom:1}.form-actions:before,.form-actions:after{display:table;line-height:0;content:""}.form-actions:after{clear:both}.help-block,.help-inline{color:#595959}.help-block{display:block;margin-bottom:10px}.help-inline{display:inline-block;*display:inline;padding-left:5px;vertical-align:middle;*zoom:1}.input-append,.input-prepend{display:inline-block;margin-bottom:10px;font-size:0;white-space:nowrap;vertical-align:middle}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input,.input-append .dropdown-menu,.input-prepend .dropdown-menu,.input-append .popover,.input-prepend .popover{font-size:14px}.input-append input,.input-prepend input,.input-append select,.input-prepend select,.input-append .uneditable-input,.input-prepend .uneditable-input{position:relative;margin-bottom:0;*margin-left:0;vertical-align:top;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append input:focus,.input-prepend input:focus,.input-append select:focus,.input-prepend select:focus,.input-append .uneditable-input:focus,.input-prepend .uneditable-input:focus{z-index:2}.input-append .add-on,.input-prepend .add-on{display:inline-block;width:auto;height:20px;min-width:16px;padding:4px 5px;font-size:14px;font-weight:normal;line-height:20px;text-align:center;text-shadow:0 1px 0 #fff;background-color:#eee;border:1px solid #ccc}.input-append .add-on,.input-prepend .add-on,.input-append .btn,.input-prepend .btn,.input-append .btn-group>.dropdown-toggle,.input-prepend .btn-group>.dropdown-toggle{vertical-align:top;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-append .active,.input-prepend .active{background-color:#a9dba9;border-color:#46a546}.input-prepend .add-on,.input-prepend .btn{margin-right:-1px}.input-prepend .add-on:first-child,.input-prepend .btn:first-child{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input,.input-append select,.input-append .uneditable-input{-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-append input+.btn-group .btn:last-child,.input-append select+.btn-group .btn:last-child,.input-append .uneditable-input+.btn-group .btn:last-child{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-append .add-on,.input-append .btn,.input-append .btn-group{margin-left:-1px}.input-append .add-on:last-child,.input-append .btn:last-child,.input-append .btn-group:last-child>.dropdown-toggle{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append input,.input-prepend.input-append select,.input-prepend.input-append .uneditable-input{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.input-prepend.input-append input+.btn-group .btn,.input-prepend.input-append select+.btn-group .btn,.input-prepend.input-append .uneditable-input+.btn-group .btn{-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .add-on:first-child,.input-prepend.input-append .btn:first-child{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.input-prepend.input-append .add-on:last-child,.input-prepend.input-append .btn:last-child{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.input-prepend.input-append .btn-group:first-child{margin-left:0}input.search-query{padding-right:14px;padding-right:4px \9;padding-left:14px;padding-left:4px \9;margin-bottom:0;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.form-search .input-append .search-query,.form-search .input-prepend .search-query{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.form-search .input-append .search-query{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search .input-append .btn{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .search-query{-webkit-border-radius:0 14px 14px 0;-moz-border-radius:0 14px 14px 0;border-radius:0 14px 14px 0}.form-search .input-prepend .btn{-webkit-border-radius:14px 0 0 14px;-moz-border-radius:14px 0 0 14px;border-radius:14px 0 0 14px}.form-search input,.form-inline input,.form-horizontal input,.form-search textarea,.form-inline textarea,.form-horizontal textarea,.form-search select,.form-inline select,.form-horizontal select,.form-search .help-inline,.form-inline .help-inline,.form-horizontal .help-inline,.form-search .uneditable-input,.form-inline .uneditable-input,.form-horizontal .uneditable-input,.form-search .input-prepend,.form-inline .input-prepend,.form-horizontal .input-prepend,.form-search .input-append,.form-inline .input-append,.form-horizontal .input-append{display:inline-block;*display:inline;margin-bottom:0;vertical-align:middle;*zoom:1}.form-search .hide,.form-inline .hide,.form-horizontal .hide{display:none}.form-search label,.form-inline label,.form-search .btn-group,.form-inline .btn-group{display:inline-block}.form-search .input-append,.form-inline .input-append,.form-search .input-prepend,.form-inline .input-prepend{margin-bottom:0}.form-search .radio,.form-search .checkbox,.form-inline .radio,.form-inline .checkbox{padding-left:0;margin-bottom:0;vertical-align:middle}.form-search .radio input[type="radio"],.form-search .checkbox input[type="checkbox"],.form-inline .radio input[type="radio"],.form-inline .checkbox input[type="checkbox"]{float:left;margin-right:3px;margin-left:0}.control-group{margin-bottom:10px}legend+.control-group{margin-top:20px;-webkit-margin-top-collapse:separate}.form-horizontal .control-group{margin-bottom:20px;*zoom:1}.form-horizontal .control-group:before,.form-horizontal .control-group:after{display:table;line-height:0;content:""}.form-horizontal .control-group:after{clear:both}.form-horizontal .control-label{float:left;width:160px;padding-top:5px;text-align:right}.form-horizontal .controls{*display:inline-block;*padding-left:20px;margin-left:180px;*margin-left:0}.form-horizontal .controls:first-child{*padding-left:180px}.form-horizontal .help-block{margin-bottom:0}.form-horizontal input+.help-block,.form-horizontal select+.help-block,.form-horizontal textarea+.help-block,.form-horizontal .uneditable-input+.help-block,.form-horizontal .input-prepend+.help-block,.form-horizontal .input-append+.help-block{margin-top:10px}.form-horizontal .form-actions{padding-left:180px}table{max-width:100%;background-color:transparent;border-collapse:collapse;border-spacing:0}.table{width:100%;margin-bottom:20px}.table th,.table td{padding:8px;line-height:20px;text-align:left;vertical-align:top;border-top:1px solid #ddd}.table th{font-weight:bold}.table thead th{vertical-align:bottom}.table caption+thead tr:first-child th,.table caption+thead tr:first-child td,.table colgroup+thead tr:first-child th,.table colgroup+thead tr:first-child td,.table thead:first-child tr:first-child th,.table thead:first-child tr:first-child td{border-top:0}.table tbody+tbody{border-top:2px solid #ddd}.table .table{background-color:#fff}.table-condensed th,.table-condensed td{padding:4px 5px}.table-bordered{border:1px solid #ddd;border-collapse:separate;*border-collapse:collapse;border-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.table-bordered th,.table-bordered td{border-left:1px solid #ddd}.table-bordered caption+thead tr:first-child th,.table-bordered caption+tbody tr:first-child th,.table-bordered caption+tbody tr:first-child td,.table-bordered colgroup+thead tr:first-child th,.table-bordered colgroup+tbody tr:first-child th,.table-bordered colgroup+tbody tr:first-child td,.table-bordered thead:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child th,.table-bordered tbody:first-child tr:first-child td{border-top:0}.table-bordered thead:first-child tr:first-child>th:first-child,.table-bordered tbody:first-child tr:first-child>td:first-child,.table-bordered tbody:first-child tr:first-child>th:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered thead:first-child tr:first-child>th:last-child,.table-bordered tbody:first-child tr:first-child>td:last-child,.table-bordered tbody:first-child tr:first-child>th:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-bordered thead:last-child tr:last-child>th:first-child,.table-bordered tbody:last-child tr:last-child>td:first-child,.table-bordered tbody:last-child tr:last-child>th:first-child,.table-bordered tfoot:last-child tr:last-child>td:first-child,.table-bordered tfoot:last-child tr:last-child>th:first-child{-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomleft:4px}.table-bordered thead:last-child tr:last-child>th:last-child,.table-bordered tbody:last-child tr:last-child>td:last-child,.table-bordered tbody:last-child tr:last-child>th:last-child,.table-bordered tfoot:last-child tr:last-child>td:last-child,.table-bordered tfoot:last-child tr:last-child>th:last-child{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-bottomright:4px}.table-bordered tfoot+tbody:last-child tr:last-child td:first-child{-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomleft:0}.table-bordered tfoot+tbody:last-child tr:last-child td:last-child{-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;-moz-border-radius-bottomright:0}.table-bordered caption+thead tr:first-child th:first-child,.table-bordered caption+tbody tr:first-child td:first-child,.table-bordered colgroup+thead tr:first-child th:first-child,.table-bordered colgroup+tbody tr:first-child td:first-child{-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topleft:4px}.table-bordered caption+thead tr:first-child th:last-child,.table-bordered caption+tbody tr:first-child td:last-child,.table-bordered colgroup+thead tr:first-child th:last-child,.table-bordered colgroup+tbody tr:first-child td:last-child{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-topright:4px}.table-striped tbody>tr:nth-child(odd)>td,.table-striped tbody>tr:nth-child(odd)>th{background-color:#f9f9f9}.table-hover tbody tr:hover>td,.table-hover tbody tr:hover>th{background-color:#f5f5f5}table td[class*="span"],table th[class*="span"],.row-fluid table td[class*="span"],.row-fluid table th[class*="span"]{display:table-cell;float:none;margin-left:0}.table td.span1,.table th.span1{float:none;width:44px;margin-left:0}.table td.span2,.table th.span2{float:none;width:124px;margin-left:0}.table td.span3,.table th.span3{float:none;width:204px;margin-left:0}.table td.span4,.table th.span4{float:none;width:284px;margin-left:0}.table td.span5,.table th.span5{float:none;width:364px;margin-left:0}.table td.span6,.table th.span6{float:none;width:444px;margin-left:0}.table td.span7,.table th.span7{float:none;width:524px;margin-left:0}.table td.span8,.table th.span8{float:none;width:604px;margin-left:0}.table td.span9,.table th.span9{float:none;width:684px;margin-left:0}.table td.span10,.table th.span10{float:none;width:764px;margin-left:0}.table td.span11,.table th.span11{float:none;width:844px;margin-left:0}.table td.span12,.table th.span12{float:none;width:924px;margin-left:0}.table tbody tr.success>td{background-color:#dff0d8}.table tbody tr.error>td{background-color:#f2dede}.table tbody tr.warning>td{background-color:#fcf8e3}.table tbody tr.info>td{background-color:#d9edf7}.table-hover tbody tr.success:hover>td{background-color:#d0e9c6}.table-hover tbody tr.error:hover>td{background-color:#ebcccc}.table-hover tbody tr.warning:hover>td{background-color:#faf2cc}.table-hover tbody tr.info:hover>td{background-color:#c4e3f3}[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;margin-top:1px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat}.icon-white,.nav-pills>.active>a>[class^="icon-"],.nav-pills>.active>a>[class*=" icon-"],.nav-list>.active>a>[class^="icon-"],.nav-list>.active>a>[class*=" icon-"],.navbar-inverse .nav>.active>a>[class^="icon-"],.navbar-inverse .nav>.active>a>[class*=" icon-"],.dropdown-menu>li>a:hover>[class^="icon-"],.dropdown-menu>li>a:focus>[class^="icon-"],.dropdown-menu>li>a:hover>[class*=" icon-"],.dropdown-menu>li>a:focus>[class*=" icon-"],.dropdown-menu>.active>a>[class^="icon-"],.dropdown-menu>.active>a>[class*=" icon-"],.dropdown-submenu:hover>a>[class^="icon-"],.dropdown-submenu:focus>a>[class^="icon-"],.dropdown-submenu:hover>a>[class*=" icon-"],.dropdown-submenu:focus>a>[class*=" icon-"]{background-image:url("../img/glyphicons-halflings-white.png")}.icon-glass{background-position:0 0}.icon-music{background-position:-24px 0}.icon-search{background-position:-48px 0}.icon-envelope{background-position:-72px 0}.icon-heart{background-position:-96px 0}.icon-star{background-position:-120px 0}.icon-star-empty{background-position:-144px 0}.icon-user{background-position:-168px 0}.icon-film{background-position:-192px 0}.icon-th-large{background-position:-216px 0}.icon-th{background-position:-240px 0}.icon-th-list{background-position:-264px 0}.icon-ok{background-position:-288px 0}.icon-remove{background-position:-312px 0}.icon-zoom-in{background-position:-336px 0}.icon-zoom-out{background-position:-360px 0}.icon-off{background-position:-384px 0}.icon-signal{background-position:-408px 0}.icon-cog{background-position:-432px 0}.icon-trash{background-position:-456px 0}.icon-home{background-position:0 -24px}.icon-file{background-position:-24px -24px}.icon-time{background-position:-48px -24px}.icon-road{background-position:-72px -24px}.icon-download-alt{background-position:-96px -24px}.icon-download{background-position:-120px -24px}.icon-upload{background-position:-144px -24px}.icon-inbox{background-position:-168px -24px}.icon-play-circle{background-position:-192px -24px}.icon-repeat{background-position:-216px -24px}.icon-refresh{background-position:-240px -24px}.icon-list-alt{background-position:-264px -24px}.icon-lock{background-position:-287px -24px}.icon-flag{background-position:-312px -24px}.icon-headphones{background-position:-336px -24px}.icon-volume-off{background-position:-360px -24px}.icon-volume-down{background-position:-384px -24px}.icon-volume-up{background-position:-408px -24px}.icon-qrcode{background-position:-432px -24px}.icon-barcode{background-position:-456px -24px}.icon-tag{background-position:0 -48px}.icon-tags{background-position:-25px -48px}.icon-book{background-position:-48px -48px}.icon-bookmark{background-position:-72px -48px}.icon-print{background-position:-96px -48px}.icon-camera{background-position:-120px -48px}.icon-font{background-position:-144px -48px}.icon-bold{background-position:-167px -48px}.icon-italic{background-position:-192px -48px}.icon-text-height{background-position:-216px -48px}.icon-text-width{background-position:-240px -48px}.icon-align-left{background-position:-264px -48px}.icon-align-center{background-position:-288px -48px}.icon-align-right{background-position:-312px -48px}.icon-align-justify{background-position:-336px -48px}.icon-list{background-position:-360px -48px}.icon-indent-left{background-position:-384px -48px}.icon-indent-right{background-position:-408px -48px}.icon-facetime-video{background-position:-432px -48px}.icon-picture{background-position:-456px -48px}.icon-pencil{background-position:0 -72px}.icon-map-marker{background-position:-24px -72px}.icon-adjust{background-position:-48px -72px}.icon-tint{background-position:-72px -72px}.icon-edit{background-position:-96px -72px}.icon-share{background-position:-120px -72px}.icon-check{background-position:-144px -72px}.icon-move{background-position:-168px -72px}.icon-step-backward{background-position:-192px -72px}.icon-fast-backward{background-position:-216px -72px}.icon-backward{background-position:-240px -72px}.icon-play{background-position:-264px -72px}.icon-pause{background-position:-288px -72px}.icon-stop{background-position:-312px -72px}.icon-forward{background-position:-336px -72px}.icon-fast-forward{background-position:-360px -72px}.icon-step-forward{background-position:-384px -72px}.icon-eject{background-position:-408px -72px}.icon-chevron-left{background-position:-432px -72px}.icon-chevron-right{background-position:-456px -72px}.icon-plus-sign{background-position:0 -96px}.icon-minus-sign{background-position:-24px -96px}.icon-remove-sign{background-position:-48px -96px}.icon-ok-sign{background-position:-72px -96px}.icon-question-sign{background-position:-96px -96px}.icon-info-sign{background-position:-120px -96px}.icon-screenshot{background-position:-144px -96px}.icon-remove-circle{background-position:-168px -96px}.icon-ok-circle{background-position:-192px -96px}.icon-ban-circle{background-position:-216px -96px}.icon-arrow-left{background-position:-240px -96px}.icon-arrow-right{background-position:-264px -96px}.icon-arrow-up{background-position:-289px -96px}.icon-arrow-down{background-position:-312px -96px}.icon-share-alt{background-position:-336px -96px}.icon-resize-full{background-position:-360px -96px}.icon-resize-small{background-position:-384px -96px}.icon-plus{background-position:-408px -96px}.icon-minus{background-position:-433px -96px}.icon-asterisk{background-position:-456px -96px}.icon-exclamation-sign{background-position:0 -120px}.icon-gift{background-position:-24px -120px}.icon-leaf{background-position:-48px -120px}.icon-fire{background-position:-72px -120px}.icon-eye-open{background-position:-96px -120px}.icon-eye-close{background-position:-120px -120px}.icon-warning-sign{background-position:-144px -120px}.icon-plane{background-position:-168px -120px}.icon-calendar{background-position:-192px -120px}.icon-random{width:16px;background-position:-216px -120px}.icon-comment{background-position:-240px -120px}.icon-magnet{background-position:-264px -120px}.icon-chevron-up{background-position:-288px -120px}.icon-chevron-down{background-position:-313px -119px}.icon-retweet{background-position:-336px -120px}.icon-shopping-cart{background-position:-360px -120px}.icon-folder-close{width:16px;background-position:-384px -120px}.icon-folder-open{width:16px;background-position:-408px -120px}.icon-resize-vertical{background-position:-432px -119px}.icon-resize-horizontal{background-position:-456px -118px}.icon-hdd{background-position:0 -144px}.icon-bullhorn{background-position:-24px -144px}.icon-bell{background-position:-48px -144px}.icon-certificate{background-position:-72px -144px}.icon-thumbs-up{background-position:-96px -144px}.icon-thumbs-down{background-position:-120px -144px}.icon-hand-right{background-position:-144px -144px}.icon-hand-left{background-position:-168px -144px}.icon-hand-up{background-position:-192px -144px}.icon-hand-down{background-position:-216px -144px}.icon-circle-arrow-right{background-position:-240px -144px}.icon-circle-arrow-left{background-position:-264px -144px}.icon-circle-arrow-up{background-position:-288px -144px}.icon-circle-arrow-down{background-position:-312px -144px}.icon-globe{background-position:-336px -144px}.icon-wrench{background-position:-360px -144px}.icon-tasks{background-position:-384px -144px}.icon-filter{background-position:-408px -144px}.icon-briefcase{background-position:-432px -144px}.icon-fullscreen{background-position:-456px -144px}.dropup,.dropdown{position:relative}.dropdown-toggle{*margin-bottom:-3px}.dropdown-toggle:active,.open .dropdown-toggle{outline:0}.caret{display:inline-block;width:0;height:0;vertical-align:top;border-top:4px solid #000;border-right:4px solid transparent;border-left:4px solid transparent;content:""}.dropdown .caret{margin-top:8px;margin-left:2px}.dropdown-menu{position:absolute;top:100%;left:0;z-index:1000;display:none;float:left;min-width:160px;padding:5px 0;margin:2px 0 0;list-style:none;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);*border-right-width:2px;*border-bottom-width:2px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.dropdown-menu.pull-right{right:0;left:auto}.dropdown-menu .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.dropdown-menu>li>a{display:block;padding:3px 20px;clear:both;font-weight:normal;line-height:20px;color:#333;white-space:nowrap}.dropdown-menu>li>a:hover,.dropdown-menu>li>a:focus,.dropdown-submenu:hover>a,.dropdown-submenu:focus>a{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.active>a,.dropdown-menu>.active>a:hover,.dropdown-menu>.active>a:focus{color:#fff;text-decoration:none;background-color:#0081c2;background-image:-moz-linear-gradient(top,#08c,#0077b3);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#0077b3));background-image:-webkit-linear-gradient(top,#08c,#0077b3);background-image:-o-linear-gradient(top,#08c,#0077b3);background-image:linear-gradient(to bottom,#08c,#0077b3);background-repeat:repeat-x;outline:0;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0077b3',GradientType=0)}.dropdown-menu>.disabled>a,.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{color:#999}.dropdown-menu>.disabled>a:hover,.dropdown-menu>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent;background-image:none;filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.open{*z-index:1000}.open>.dropdown-menu{display:block}.pull-right>.dropdown-menu{right:0;left:auto}.dropup .caret,.navbar-fixed-bottom .dropdown .caret{border-top:0;border-bottom:4px solid #000;content:""}.dropup .dropdown-menu,.navbar-fixed-bottom .dropdown .dropdown-menu{top:auto;bottom:100%;margin-bottom:1px}.dropdown-submenu{position:relative}.dropdown-submenu>.dropdown-menu{top:0;left:100%;margin-top:-6px;margin-left:-1px;-webkit-border-radius:0 6px 6px 6px;-moz-border-radius:0 6px 6px 6px;border-radius:0 6px 6px 6px}.dropdown-submenu:hover>.dropdown-menu{display:block}.dropup .dropdown-submenu>.dropdown-menu{top:auto;bottom:0;margin-top:0;margin-bottom:-2px;-webkit-border-radius:5px 5px 5px 0;-moz-border-radius:5px 5px 5px 0;border-radius:5px 5px 5px 0}.dropdown-submenu>a:after{display:block;float:right;width:0;height:0;margin-top:5px;margin-right:-10px;border-color:transparent;border-left-color:#ccc;border-style:solid;border-width:5px 0 5px 5px;content:" "}.dropdown-submenu:hover>a:after{border-left-color:#fff}.dropdown-submenu.pull-left{float:none}.dropdown-submenu.pull-left>.dropdown-menu{left:-100%;margin-left:10px;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.dropdown .dropdown-menu .nav-header{padding-right:20px;padding-left:20px}.typeahead{z-index:1051;margin-top:2px;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.well{min-height:20px;padding:19px;margin-bottom:20px;background-color:#f5f5f5;border:1px solid #e3e3e3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 1px rgba(0,0,0,0.05);box-shadow:inset 0 1px 1px rgba(0,0,0,0.05)}.well blockquote{border-color:#ddd;border-color:rgba(0,0,0,0.15)}.well-large{padding:24px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.well-small{padding:9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.fade{opacity:0;-webkit-transition:opacity .15s linear;-moz-transition:opacity .15s linear;-o-transition:opacity .15s linear;transition:opacity .15s linear}.fade.in{opacity:1}.collapse{position:relative;height:0;overflow:hidden;-webkit-transition:height .35s ease;-moz-transition:height .35s ease;-o-transition:height .35s ease;transition:height .35s ease}.collapse.in{height:auto}.close{float:right;font-size:20px;font-weight:bold;line-height:20px;color:#000;text-shadow:0 1px 0 #fff;opacity:.2;filter:alpha(opacity=20)}.close:hover,.close:focus{color:#000;text-decoration:none;cursor:pointer;opacity:.4;filter:alpha(opacity=40)}button.close{padding:0;cursor:pointer;background:transparent;border:0;-webkit-appearance:none}.btn{display:inline-block;*display:inline;padding:4px 12px;margin-bottom:0;*margin-left:.3em;font-size:14px;line-height:20px;color:#333;text-align:center;text-shadow:0 1px 1px rgba(255,255,255,0.75);vertical-align:middle;cursor:pointer;background-color:#f5f5f5;*background-color:#e6e6e6;background-image:-moz-linear-gradient(top,#fff,#e6e6e6);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#e6e6e6));background-image:-webkit-linear-gradient(top,#fff,#e6e6e6);background-image:-o-linear-gradient(top,#fff,#e6e6e6);background-image:linear-gradient(to bottom,#fff,#e6e6e6);background-repeat:repeat-x;border:1px solid #ccc;*border:0;border-color:#e6e6e6 #e6e6e6 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);border-bottom-color:#b3b3b3;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#ffe6e6e6',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);*zoom:1;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn:hover,.btn:focus,.btn:active,.btn.active,.btn.disabled,.btn[disabled]{color:#333;background-color:#e6e6e6;*background-color:#d9d9d9}.btn:active,.btn.active{background-color:#ccc \9}.btn:first-child{*margin-left:0}.btn:hover,.btn:focus{color:#333;text-decoration:none;background-position:0 -15px;-webkit-transition:background-position .1s linear;-moz-transition:background-position .1s linear;-o-transition:background-position .1s linear;transition:background-position .1s linear}.btn:focus{outline:thin dotted #333;outline:5px auto -webkit-focus-ring-color;outline-offset:-2px}.btn.active,.btn:active{background-image:none;outline:0;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn.disabled,.btn[disabled]{cursor:default;background-image:none;opacity:.65;filter:alpha(opacity=65);-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-large{padding:11px 19px;font-size:17.5px;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.btn-large [class^="icon-"],.btn-large [class*=" icon-"]{margin-top:4px}.btn-small{padding:2px 10px;font-size:11.9px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-small [class^="icon-"],.btn-small [class*=" icon-"]{margin-top:0}.btn-mini [class^="icon-"],.btn-mini [class*=" icon-"]{margin-top:-1px}.btn-mini{padding:0 6px;font-size:10.5px;-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.btn-block{display:block;width:100%;padding-right:0;padding-left:0;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.btn-block+.btn-block{margin-top:5px}input[type="submit"].btn-block,input[type="reset"].btn-block,input[type="button"].btn-block{width:100%}.btn-primary.active,.btn-warning.active,.btn-danger.active,.btn-success.active,.btn-info.active,.btn-inverse.active{color:rgba(255,255,255,0.75)}.btn-primary{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#006dcc;*background-color:#04c;background-image:-moz-linear-gradient(top,#08c,#04c);background-image:-webkit-gradient(linear,0 0,0 100%,from(#08c),to(#04c));background-image:-webkit-linear-gradient(top,#08c,#04c);background-image:-o-linear-gradient(top,#08c,#04c);background-image:linear-gradient(to bottom,#08c,#04c);background-repeat:repeat-x;border-color:#04c #04c #002a80;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0088cc',endColorstr='#ff0044cc',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-primary:hover,.btn-primary:focus,.btn-primary:active,.btn-primary.active,.btn-primary.disabled,.btn-primary[disabled]{color:#fff;background-color:#04c;*background-color:#003bb3}.btn-primary:active,.btn-primary.active{background-color:#039 \9}.btn-warning{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#faa732;*background-color:#f89406;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;border-color:#f89406 #f89406 #ad6704;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-warning:hover,.btn-warning:focus,.btn-warning:active,.btn-warning.active,.btn-warning.disabled,.btn-warning[disabled]{color:#fff;background-color:#f89406;*background-color:#df8505}.btn-warning:active,.btn-warning.active{background-color:#c67605 \9}.btn-danger{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#da4f49;*background-color:#bd362f;background-image:-moz-linear-gradient(top,#ee5f5b,#bd362f);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#bd362f));background-image:-webkit-linear-gradient(top,#ee5f5b,#bd362f);background-image:-o-linear-gradient(top,#ee5f5b,#bd362f);background-image:linear-gradient(to bottom,#ee5f5b,#bd362f);background-repeat:repeat-x;border-color:#bd362f #bd362f #802420;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffbd362f',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-danger:hover,.btn-danger:focus,.btn-danger:active,.btn-danger.active,.btn-danger.disabled,.btn-danger[disabled]{color:#fff;background-color:#bd362f;*background-color:#a9302a}.btn-danger:active,.btn-danger.active{background-color:#942a25 \9}.btn-success{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#5bb75b;*background-color:#51a351;background-image:-moz-linear-gradient(top,#62c462,#51a351);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#51a351));background-image:-webkit-linear-gradient(top,#62c462,#51a351);background-image:-o-linear-gradient(top,#62c462,#51a351);background-image:linear-gradient(to bottom,#62c462,#51a351);background-repeat:repeat-x;border-color:#51a351 #51a351 #387038;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff51a351',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-success:hover,.btn-success:focus,.btn-success:active,.btn-success.active,.btn-success.disabled,.btn-success[disabled]{color:#fff;background-color:#51a351;*background-color:#499249}.btn-success:active,.btn-success.active{background-color:#408140 \9}.btn-info{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#49afcd;*background-color:#2f96b4;background-image:-moz-linear-gradient(top,#5bc0de,#2f96b4);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#2f96b4));background-image:-webkit-linear-gradient(top,#5bc0de,#2f96b4);background-image:-o-linear-gradient(top,#5bc0de,#2f96b4);background-image:linear-gradient(to bottom,#5bc0de,#2f96b4);background-repeat:repeat-x;border-color:#2f96b4 #2f96b4 #1f6377;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff2f96b4',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-info:hover,.btn-info:focus,.btn-info:active,.btn-info.active,.btn-info.disabled,.btn-info[disabled]{color:#fff;background-color:#2f96b4;*background-color:#2a85a0}.btn-info:active,.btn-info.active{background-color:#24748c \9}.btn-inverse{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#363636;*background-color:#222;background-image:-moz-linear-gradient(top,#444,#222);background-image:-webkit-gradient(linear,0 0,0 100%,from(#444),to(#222));background-image:-webkit-linear-gradient(top,#444,#222);background-image:-o-linear-gradient(top,#444,#222);background-image:linear-gradient(to bottom,#444,#222);background-repeat:repeat-x;border-color:#222 #222 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff444444',endColorstr='#ff222222',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.btn-inverse:hover,.btn-inverse:focus,.btn-inverse:active,.btn-inverse.active,.btn-inverse.disabled,.btn-inverse[disabled]{color:#fff;background-color:#222;*background-color:#151515}.btn-inverse:active,.btn-inverse.active{background-color:#080808 \9}button.btn,input[type="submit"].btn{*padding-top:3px;*padding-bottom:3px}button.btn::-moz-focus-inner,input[type="submit"].btn::-moz-focus-inner{padding:0;border:0}button.btn.btn-large,input[type="submit"].btn.btn-large{*padding-top:7px;*padding-bottom:7px}button.btn.btn-small,input[type="submit"].btn.btn-small{*padding-top:3px;*padding-bottom:3px}button.btn.btn-mini,input[type="submit"].btn.btn-mini{*padding-top:1px;*padding-bottom:1px}.btn-link,.btn-link:active,.btn-link[disabled]{background-color:transparent;background-image:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none}.btn-link{color:#08c;cursor:pointer;border-color:transparent;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-link:hover,.btn-link:focus{color:#005580;text-decoration:underline;background-color:transparent}.btn-link[disabled]:hover,.btn-link[disabled]:focus{color:#333;text-decoration:none}.btn-group{position:relative;display:inline-block;*display:inline;*margin-left:.3em;font-size:0;white-space:nowrap;vertical-align:middle;*zoom:1}.btn-group:first-child{*margin-left:0}.btn-group+.btn-group{margin-left:5px}.btn-toolbar{margin-top:10px;margin-bottom:10px;font-size:0}.btn-toolbar>.btn+.btn,.btn-toolbar>.btn-group+.btn,.btn-toolbar>.btn+.btn-group{margin-left:5px}.btn-group>.btn{position:relative;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group>.btn+.btn{margin-left:-1px}.btn-group>.btn,.btn-group>.dropdown-menu,.btn-group>.popover{font-size:14px}.btn-group>.btn-mini{font-size:10.5px}.btn-group>.btn-small{font-size:11.9px}.btn-group>.btn-large{font-size:17.5px}.btn-group>.btn:first-child{margin-left:0;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.btn-group>.btn:last-child,.btn-group>.dropdown-toggle{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.btn-group>.btn.large:first-child{margin-left:0;-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.btn-group>.btn.large:last-child,.btn-group>.large.dropdown-toggle{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.btn-group>.btn:hover,.btn-group>.btn:focus,.btn-group>.btn:active,.btn-group>.btn.active{z-index:2}.btn-group .dropdown-toggle:active,.btn-group.open .dropdown-toggle{outline:0}.btn-group>.btn+.dropdown-toggle{*padding-top:5px;padding-right:8px;*padding-bottom:5px;padding-left:8px;-webkit-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 1px 0 0 rgba(255,255,255,0.125),inset 0 1px 0 rgba(255,255,255,0.2),0 1px 2px rgba(0,0,0,0.05)}.btn-group>.btn-mini+.dropdown-toggle{*padding-top:2px;padding-right:5px;*padding-bottom:2px;padding-left:5px}.btn-group>.btn-small+.dropdown-toggle{*padding-top:5px;*padding-bottom:4px}.btn-group>.btn-large+.dropdown-toggle{*padding-top:7px;padding-right:12px;*padding-bottom:7px;padding-left:12px}.btn-group.open .dropdown-toggle{background-image:none;-webkit-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05);box-shadow:inset 0 2px 4px rgba(0,0,0,0.15),0 1px 2px rgba(0,0,0,0.05)}.btn-group.open .btn.dropdown-toggle{background-color:#e6e6e6}.btn-group.open .btn-primary.dropdown-toggle{background-color:#04c}.btn-group.open .btn-warning.dropdown-toggle{background-color:#f89406}.btn-group.open .btn-danger.dropdown-toggle{background-color:#bd362f}.btn-group.open .btn-success.dropdown-toggle{background-color:#51a351}.btn-group.open .btn-info.dropdown-toggle{background-color:#2f96b4}.btn-group.open .btn-inverse.dropdown-toggle{background-color:#222}.btn .caret{margin-top:8px;margin-left:0}.btn-large .caret{margin-top:6px}.btn-large .caret{border-top-width:5px;border-right-width:5px;border-left-width:5px}.btn-mini .caret,.btn-small .caret{margin-top:8px}.dropup .btn-large .caret{border-bottom-width:5px}.btn-primary .caret,.btn-warning .caret,.btn-danger .caret,.btn-info .caret,.btn-success .caret,.btn-inverse .caret{border-top-color:#fff;border-bottom-color:#fff}.btn-group-vertical{display:inline-block;*display:inline;*zoom:1}.btn-group-vertical>.btn{display:block;float:none;max-width:100%;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.btn-group-vertical>.btn+.btn{margin-top:-1px;margin-left:0}.btn-group-vertical>.btn:first-child{-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.btn-group-vertical>.btn:last-child{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.btn-group-vertical>.btn-large:first-child{-webkit-border-radius:6px 6px 0 0;-moz-border-radius:6px 6px 0 0;border-radius:6px 6px 0 0}.btn-group-vertical>.btn-large:last-child{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.alert{padding:8px 35px 8px 14px;margin-bottom:20px;text-shadow:0 1px 0 rgba(255,255,255,0.5);background-color:#fcf8e3;border:1px solid #fbeed5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.alert,.alert h4{color:#c09853}.alert h4{margin:0}.alert .close{position:relative;top:-2px;right:-21px;line-height:20px}.alert-success{color:#468847;background-color:#dff0d8;border-color:#d6e9c6}.alert-success h4{color:#468847}.alert-danger,.alert-error{color:#b94a48;background-color:#f2dede;border-color:#eed3d7}.alert-danger h4,.alert-error h4{color:#b94a48}.alert-info{color:#3a87ad;background-color:#d9edf7;border-color:#bce8f1}.alert-info h4{color:#3a87ad}.alert-block{padding-top:14px;padding-bottom:14px}.alert-block>p,.alert-block>ul{margin-bottom:0}.alert-block p+p{margin-top:5px}.nav{margin-bottom:20px;margin-left:0;list-style:none}.nav>li>a{display:block}.nav>li>a:hover,.nav>li>a:focus{text-decoration:none;background-color:#eee}.nav>li>a>img{max-width:none}.nav>.pull-right{float:right}.nav-header{display:block;padding:3px 15px;font-size:11px;font-weight:bold;line-height:20px;color:#999;text-shadow:0 1px 0 rgba(255,255,255,0.5);text-transform:uppercase}.nav li+.nav-header{margin-top:9px}.nav-list{padding-right:15px;padding-left:15px;margin-bottom:0}.nav-list>li>a,.nav-list .nav-header{margin-right:-15px;margin-left:-15px;text-shadow:0 1px 0 rgba(255,255,255,0.5)}.nav-list>li>a{padding:3px 15px}.nav-list>.active>a,.nav-list>.active>a:hover,.nav-list>.active>a:focus{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.2);background-color:#08c}.nav-list [class^="icon-"],.nav-list [class*=" icon-"]{margin-right:2px}.nav-list .divider{*width:100%;height:1px;margin:9px 1px;*margin:-5px 0 5px;overflow:hidden;background-color:#e5e5e5;border-bottom:1px solid #fff}.nav-tabs,.nav-pills{*zoom:1}.nav-tabs:before,.nav-pills:before,.nav-tabs:after,.nav-pills:after{display:table;line-height:0;content:""}.nav-tabs:after,.nav-pills:after{clear:both}.nav-tabs>li,.nav-pills>li{float:left}.nav-tabs>li>a,.nav-pills>li>a{padding-right:12px;padding-left:12px;margin-right:2px;line-height:14px}.nav-tabs{border-bottom:1px solid #ddd}.nav-tabs>li{margin-bottom:-1px}.nav-tabs>li>a{padding-top:8px;padding-bottom:8px;line-height:20px;border:1px solid transparent;-webkit-border-radius:4px 4px 0 0;-moz-border-radius:4px 4px 0 0;border-radius:4px 4px 0 0}.nav-tabs>li>a:hover,.nav-tabs>li>a:focus{border-color:#eee #eee #ddd}.nav-tabs>.active>a,.nav-tabs>.active>a:hover,.nav-tabs>.active>a:focus{color:#555;cursor:default;background-color:#fff;border:1px solid #ddd;border-bottom-color:transparent}.nav-pills>li>a{padding-top:8px;padding-bottom:8px;margin-top:2px;margin-bottom:2px;-webkit-border-radius:5px;-moz-border-radius:5px;border-radius:5px}.nav-pills>.active>a,.nav-pills>.active>a:hover,.nav-pills>.active>a:focus{color:#fff;background-color:#08c}.nav-stacked>li{float:none}.nav-stacked>li>a{margin-right:0}.nav-tabs.nav-stacked{border-bottom:0}.nav-tabs.nav-stacked>li>a{border:1px solid #ddd;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.nav-tabs.nav-stacked>li:first-child>a{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-topleft:4px}.nav-tabs.nav-stacked>li:last-child>a{-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-moz-border-radius-bottomright:4px;-moz-border-radius-bottomleft:4px}.nav-tabs.nav-stacked>li>a:hover,.nav-tabs.nav-stacked>li>a:focus{z-index:2;border-color:#ddd}.nav-pills.nav-stacked>li>a{margin-bottom:3px}.nav-pills.nav-stacked>li:last-child>a{margin-bottom:1px}.nav-tabs .dropdown-menu{-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px}.nav-pills .dropdown-menu{-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.nav .dropdown-toggle .caret{margin-top:6px;border-top-color:#08c;border-bottom-color:#08c}.nav .dropdown-toggle:hover .caret,.nav .dropdown-toggle:focus .caret{border-top-color:#005580;border-bottom-color:#005580}.nav-tabs .dropdown-toggle .caret{margin-top:8px}.nav .active .dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.nav-tabs .active .dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.nav>.dropdown.active>a:hover,.nav>.dropdown.active>a:focus{cursor:pointer}.nav-tabs .open .dropdown-toggle,.nav-pills .open .dropdown-toggle,.nav>li.dropdown.open.active>a:hover,.nav>li.dropdown.open.active>a:focus{color:#fff;background-color:#999;border-color:#999}.nav li.dropdown.open .caret,.nav li.dropdown.open.active .caret,.nav li.dropdown.open a:hover .caret,.nav li.dropdown.open a:focus .caret{border-top-color:#fff;border-bottom-color:#fff;opacity:1;filter:alpha(opacity=100)}.tabs-stacked .open>a:hover,.tabs-stacked .open>a:focus{border-color:#999}.tabbable{*zoom:1}.tabbable:before,.tabbable:after{display:table;line-height:0;content:""}.tabbable:after{clear:both}.tab-content{overflow:auto}.tabs-below>.nav-tabs,.tabs-right>.nav-tabs,.tabs-left>.nav-tabs{border-bottom:0}.tab-content>.tab-pane,.pill-content>.pill-pane{display:none}.tab-content>.active,.pill-content>.active{display:block}.tabs-below>.nav-tabs{border-top:1px solid #ddd}.tabs-below>.nav-tabs>li{margin-top:-1px;margin-bottom:0}.tabs-below>.nav-tabs>li>a{-webkit-border-radius:0 0 4px 4px;-moz-border-radius:0 0 4px 4px;border-radius:0 0 4px 4px}.tabs-below>.nav-tabs>li>a:hover,.tabs-below>.nav-tabs>li>a:focus{border-top-color:#ddd;border-bottom-color:transparent}.tabs-below>.nav-tabs>.active>a,.tabs-below>.nav-tabs>.active>a:hover,.tabs-below>.nav-tabs>.active>a:focus{border-color:transparent #ddd #ddd #ddd}.tabs-left>.nav-tabs>li,.tabs-right>.nav-tabs>li{float:none}.tabs-left>.nav-tabs>li>a,.tabs-right>.nav-tabs>li>a{min-width:74px;margin-right:0;margin-bottom:3px}.tabs-left>.nav-tabs{float:left;margin-right:19px;border-right:1px solid #ddd}.tabs-left>.nav-tabs>li>a{margin-right:-1px;-webkit-border-radius:4px 0 0 4px;-moz-border-radius:4px 0 0 4px;border-radius:4px 0 0 4px}.tabs-left>.nav-tabs>li>a:hover,.tabs-left>.nav-tabs>li>a:focus{border-color:#eee #ddd #eee #eee}.tabs-left>.nav-tabs .active>a,.tabs-left>.nav-tabs .active>a:hover,.tabs-left>.nav-tabs .active>a:focus{border-color:#ddd transparent #ddd #ddd;*border-right-color:#fff}.tabs-right>.nav-tabs{float:right;margin-left:19px;border-left:1px solid #ddd}.tabs-right>.nav-tabs>li>a{margin-left:-1px;-webkit-border-radius:0 4px 4px 0;-moz-border-radius:0 4px 4px 0;border-radius:0 4px 4px 0}.tabs-right>.nav-tabs>li>a:hover,.tabs-right>.nav-tabs>li>a:focus{border-color:#eee #eee #eee #ddd}.tabs-right>.nav-tabs .active>a,.tabs-right>.nav-tabs .active>a:hover,.tabs-right>.nav-tabs .active>a:focus{border-color:#ddd #ddd #ddd transparent;*border-left-color:#fff}.nav>.disabled>a{color:#999}.nav>.disabled>a:hover,.nav>.disabled>a:focus{text-decoration:none;cursor:default;background-color:transparent}.navbar{*position:relative;*z-index:2;margin-bottom:20px;overflow:visible}.navbar-inner{min-height:40px;padding-right:20px;padding-left:20px;background-color:#fafafa;background-image:-moz-linear-gradient(top,#fff,#f2f2f2);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fff),to(#f2f2f2));background-image:-webkit-linear-gradient(top,#fff,#f2f2f2);background-image:-o-linear-gradient(top,#fff,#f2f2f2);background-image:linear-gradient(to bottom,#fff,#f2f2f2);background-repeat:repeat-x;border:1px solid #d4d4d4;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff',endColorstr='#fff2f2f2',GradientType=0);*zoom:1;-webkit-box-shadow:0 1px 4px rgba(0,0,0,0.065);-moz-box-shadow:0 1px 4px rgba(0,0,0,0.065);box-shadow:0 1px 4px rgba(0,0,0,0.065)}.navbar-inner:before,.navbar-inner:after{display:table;line-height:0;content:""}.navbar-inner:after{clear:both}.navbar .container{width:auto}.nav-collapse.collapse{height:auto;overflow:visible}.navbar .brand{display:block;float:left;padding:10px 20px 10px;margin-left:-20px;font-size:20px;font-weight:200;color:#777;text-shadow:0 1px 0 #fff}.navbar .brand:hover,.navbar .brand:focus{text-decoration:none}.navbar-text{margin-bottom:0;line-height:40px;color:#777}.navbar-link{color:#777}.navbar-link:hover,.navbar-link:focus{color:#333}.navbar .divider-vertical{height:40px;margin:0 9px;border-right:1px solid #fff;border-left:1px solid #f2f2f2}.navbar .btn,.navbar .btn-group{margin-top:5px}.navbar .btn-group .btn,.navbar .input-prepend .btn,.navbar .input-append .btn,.navbar .input-prepend .btn-group,.navbar .input-append .btn-group{margin-top:0}.navbar-form{margin-bottom:0;*zoom:1}.navbar-form:before,.navbar-form:after{display:table;line-height:0;content:""}.navbar-form:after{clear:both}.navbar-form input,.navbar-form select,.navbar-form .radio,.navbar-form .checkbox{margin-top:5px}.navbar-form input,.navbar-form select,.navbar-form .btn{display:inline-block;margin-bottom:0}.navbar-form input[type="image"],.navbar-form input[type="checkbox"],.navbar-form input[type="radio"]{margin-top:3px}.navbar-form .input-append,.navbar-form .input-prepend{margin-top:5px;white-space:nowrap}.navbar-form .input-append input,.navbar-form .input-prepend input{margin-top:0}.navbar-search{position:relative;float:left;margin-top:5px;margin-bottom:0}.navbar-search .search-query{padding:4px 14px;margin-bottom:0;font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:13px;font-weight:normal;line-height:1;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.navbar-static-top{position:static;margin-bottom:0}.navbar-static-top .navbar-inner{-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-fixed-top,.navbar-fixed-bottom{position:fixed;right:0;left:0;z-index:1030;margin-bottom:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{border-width:0 0 1px}.navbar-fixed-bottom .navbar-inner{border-width:1px 0 0}.navbar-fixed-top .navbar-inner,.navbar-fixed-bottom .navbar-inner{padding-right:0;padding-left:0;-webkit-border-radius:0;-moz-border-radius:0;border-radius:0}.navbar-static-top .container,.navbar-fixed-top .container,.navbar-fixed-bottom .container{width:940px}.navbar-fixed-top{top:0}.navbar-fixed-top .navbar-inner,.navbar-static-top .navbar-inner{-webkit-box-shadow:0 1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 1px 10px rgba(0,0,0,0.1);box-shadow:0 1px 10px rgba(0,0,0,0.1)}.navbar-fixed-bottom{bottom:0}.navbar-fixed-bottom .navbar-inner{-webkit-box-shadow:0 -1px 10px rgba(0,0,0,0.1);-moz-box-shadow:0 -1px 10px rgba(0,0,0,0.1);box-shadow:0 -1px 10px rgba(0,0,0,0.1)}.navbar .nav{position:relative;left:0;display:block;float:left;margin:0 10px 0 0}.navbar .nav.pull-right{float:right;margin-right:0}.navbar .nav>li{float:left}.navbar .nav>li>a{float:none;padding:10px 15px 10px;color:#777;text-decoration:none;text-shadow:0 1px 0 #fff}.navbar .nav .dropdown-toggle .caret{margin-top:8px}.navbar .nav>li>a:focus,.navbar .nav>li>a:hover{color:#333;text-decoration:none;background-color:transparent}.navbar .nav>.active>a,.navbar .nav>.active>a:hover,.navbar .nav>.active>a:focus{color:#555;text-decoration:none;background-color:#e5e5e5;-webkit-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);-moz-box-shadow:inset 0 3px 8px rgba(0,0,0,0.125);box-shadow:inset 0 3px 8px rgba(0,0,0,0.125)}.navbar .btn-navbar{display:none;float:right;padding:7px 10px;margin-right:5px;margin-left:5px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#ededed;*background-color:#e5e5e5;background-image:-moz-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f2f2f2),to(#e5e5e5));background-image:-webkit-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:-o-linear-gradient(top,#f2f2f2,#e5e5e5);background-image:linear-gradient(to bottom,#f2f2f2,#e5e5e5);background-repeat:repeat-x;border-color:#e5e5e5 #e5e5e5 #bfbfbf;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2',endColorstr='#ffe5e5e5',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);-moz-box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075);box-shadow:inset 0 1px 0 rgba(255,255,255,0.1),0 1px 0 rgba(255,255,255,0.075)}.navbar .btn-navbar:hover,.navbar .btn-navbar:focus,.navbar .btn-navbar:active,.navbar .btn-navbar.active,.navbar .btn-navbar.disabled,.navbar .btn-navbar[disabled]{color:#fff;background-color:#e5e5e5;*background-color:#d9d9d9}.navbar .btn-navbar:active,.navbar .btn-navbar.active{background-color:#ccc \9}.navbar .btn-navbar .icon-bar{display:block;width:18px;height:2px;background-color:#f5f5f5;-webkit-border-radius:1px;-moz-border-radius:1px;border-radius:1px;-webkit-box-shadow:0 1px 0 rgba(0,0,0,0.25);-moz-box-shadow:0 1px 0 rgba(0,0,0,0.25);box-shadow:0 1px 0 rgba(0,0,0,0.25)}.btn-navbar .icon-bar+.icon-bar{margin-top:3px}.navbar .nav>li>.dropdown-menu:before{position:absolute;top:-7px;left:9px;display:inline-block;border-right:7px solid transparent;border-bottom:7px solid #ccc;border-left:7px solid transparent;border-bottom-color:rgba(0,0,0,0.2);content:''}.navbar .nav>li>.dropdown-menu:after{position:absolute;top:-6px;left:10px;display:inline-block;border-right:6px solid transparent;border-bottom:6px solid #fff;border-left:6px solid transparent;content:''}.navbar-fixed-bottom .nav>li>.dropdown-menu:before{top:auto;bottom:-7px;border-top:7px solid #ccc;border-bottom:0;border-top-color:rgba(0,0,0,0.2)}.navbar-fixed-bottom .nav>li>.dropdown-menu:after{top:auto;bottom:-6px;border-top:6px solid #fff;border-bottom:0}.navbar .nav li.dropdown>a:hover .caret,.navbar .nav li.dropdown>a:focus .caret{border-top-color:#333;border-bottom-color:#333}.navbar .nav li.dropdown.open>.dropdown-toggle,.navbar .nav li.dropdown.active>.dropdown-toggle,.navbar .nav li.dropdown.open.active>.dropdown-toggle{color:#555;background-color:#e5e5e5}.navbar .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#777;border-bottom-color:#777}.navbar .nav li.dropdown.open>.dropdown-toggle .caret,.navbar .nav li.dropdown.active>.dropdown-toggle .caret,.navbar .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#555;border-bottom-color:#555}.navbar .pull-right>li>.dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right{right:0;left:auto}.navbar .pull-right>li>.dropdown-menu:before,.navbar .nav>li>.dropdown-menu.pull-right:before{right:12px;left:auto}.navbar .pull-right>li>.dropdown-menu:after,.navbar .nav>li>.dropdown-menu.pull-right:after{right:13px;left:auto}.navbar .pull-right>li>.dropdown-menu .dropdown-menu,.navbar .nav>li>.dropdown-menu.pull-right .dropdown-menu{right:100%;left:auto;margin-right:-1px;margin-left:0;-webkit-border-radius:6px 0 6px 6px;-moz-border-radius:6px 0 6px 6px;border-radius:6px 0 6px 6px}.navbar-inverse .navbar-inner{background-color:#1b1b1b;background-image:-moz-linear-gradient(top,#222,#111);background-image:-webkit-gradient(linear,0 0,0 100%,from(#222),to(#111));background-image:-webkit-linear-gradient(top,#222,#111);background-image:-o-linear-gradient(top,#222,#111);background-image:linear-gradient(to bottom,#222,#111);background-repeat:repeat-x;border-color:#252525;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222',endColorstr='#ff111111',GradientType=0)}.navbar-inverse .brand,.navbar-inverse .nav>li>a{color:#999;text-shadow:0 -1px 0 rgba(0,0,0,0.25)}.navbar-inverse .brand:hover,.navbar-inverse .nav>li>a:hover,.navbar-inverse .brand:focus,.navbar-inverse .nav>li>a:focus{color:#fff}.navbar-inverse .brand{color:#999}.navbar-inverse .navbar-text{color:#999}.navbar-inverse .nav>li>a:focus,.navbar-inverse .nav>li>a:hover{color:#fff;background-color:transparent}.navbar-inverse .nav .active>a,.navbar-inverse .nav .active>a:hover,.navbar-inverse .nav .active>a:focus{color:#fff;background-color:#111}.navbar-inverse .navbar-link{color:#999}.navbar-inverse .navbar-link:hover,.navbar-inverse .navbar-link:focus{color:#fff}.navbar-inverse .divider-vertical{border-right-color:#222;border-left-color:#111}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle{color:#fff;background-color:#111}.navbar-inverse .nav li.dropdown>a:hover .caret,.navbar-inverse .nav li.dropdown>a:focus .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .nav li.dropdown>.dropdown-toggle .caret{border-top-color:#999;border-bottom-color:#999}.navbar-inverse .nav li.dropdown.open>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.active>.dropdown-toggle .caret,.navbar-inverse .nav li.dropdown.open.active>.dropdown-toggle .caret{border-top-color:#fff;border-bottom-color:#fff}.navbar-inverse .navbar-search .search-query{color:#fff;background-color:#515151;border-color:#111;-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1),0 1px 0 rgba(255,255,255,0.15);-webkit-transition:none;-moz-transition:none;-o-transition:none;transition:none}.navbar-inverse .navbar-search .search-query:-moz-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:-ms-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder{color:#ccc}.navbar-inverse .navbar-search .search-query:focus,.navbar-inverse .navbar-search .search-query.focused{padding:5px 15px;color:#333;text-shadow:0 1px 0 #fff;background-color:#fff;border:0;outline:0;-webkit-box-shadow:0 0 3px rgba(0,0,0,0.15);-moz-box-shadow:0 0 3px rgba(0,0,0,0.15);box-shadow:0 0 3px rgba(0,0,0,0.15)}.navbar-inverse .btn-navbar{color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e0e0e;*background-color:#040404;background-image:-moz-linear-gradient(top,#151515,#040404);background-image:-webkit-gradient(linear,0 0,0 100%,from(#151515),to(#040404));background-image:-webkit-linear-gradient(top,#151515,#040404);background-image:-o-linear-gradient(top,#151515,#040404);background-image:linear-gradient(to bottom,#151515,#040404);background-repeat:repeat-x;border-color:#040404 #040404 #000;border-color:rgba(0,0,0,0.1) rgba(0,0,0,0.1) rgba(0,0,0,0.25);filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515',endColorstr='#ff040404',GradientType=0);filter:progid:DXImageTransform.Microsoft.gradient(enabled=false)}.navbar-inverse .btn-navbar:hover,.navbar-inverse .btn-navbar:focus,.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active,.navbar-inverse .btn-navbar.disabled,.navbar-inverse .btn-navbar[disabled]{color:#fff;background-color:#040404;*background-color:#000}.navbar-inverse .btn-navbar:active,.navbar-inverse .btn-navbar.active{background-color:#000 \9}.breadcrumb{padding:8px 15px;margin:0 0 20px;list-style:none;background-color:#f5f5f5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.breadcrumb>li{display:inline-block;*display:inline;text-shadow:0 1px 0 #fff;*zoom:1}.breadcrumb>li>.divider{padding:0 5px;color:#ccc}.breadcrumb>.active{color:#999}.pagination{margin:20px 0}.pagination ul{display:inline-block;*display:inline;margin-bottom:0;margin-left:0;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;*zoom:1;-webkit-box-shadow:0 1px 2px rgba(0,0,0,0.05);-moz-box-shadow:0 1px 2px rgba(0,0,0,0.05);box-shadow:0 1px 2px rgba(0,0,0,0.05)}.pagination ul>li{display:inline}.pagination ul>li>a,.pagination ul>li>span{float:left;padding:4px 12px;line-height:20px;text-decoration:none;background-color:#fff;border:1px solid #ddd;border-left-width:0}.pagination ul>li>a:hover,.pagination ul>li>a:focus,.pagination ul>.active>a,.pagination ul>.active>span{background-color:#f5f5f5}.pagination ul>.active>a,.pagination ul>.active>span{color:#999;cursor:default}.pagination ul>.disabled>span,.pagination ul>.disabled>a,.pagination ul>.disabled>a:hover,.pagination ul>.disabled>a:focus{color:#999;cursor:default;background-color:transparent}.pagination ul>li:first-child>a,.pagination ul>li:first-child>span{border-left-width:1px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-moz-border-radius-topleft:4px}.pagination ul>li:last-child>a,.pagination ul>li:last-child>span{-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px;-moz-border-radius-topright:4px;-moz-border-radius-bottomright:4px}.pagination-centered{text-align:center}.pagination-right{text-align:right}.pagination-large ul>li>a,.pagination-large ul>li>span{padding:11px 19px;font-size:17.5px}.pagination-large ul>li:first-child>a,.pagination-large ul>li:first-child>span{-webkit-border-bottom-left-radius:6px;border-bottom-left-radius:6px;-webkit-border-top-left-radius:6px;border-top-left-radius:6px;-moz-border-radius-bottomleft:6px;-moz-border-radius-topleft:6px}.pagination-large ul>li:last-child>a,.pagination-large ul>li:last-child>span{-webkit-border-top-right-radius:6px;border-top-right-radius:6px;-webkit-border-bottom-right-radius:6px;border-bottom-right-radius:6px;-moz-border-radius-topright:6px;-moz-border-radius-bottomright:6px}.pagination-mini ul>li:first-child>a,.pagination-small ul>li:first-child>a,.pagination-mini ul>li:first-child>span,.pagination-small ul>li:first-child>span{-webkit-border-bottom-left-radius:3px;border-bottom-left-radius:3px;-webkit-border-top-left-radius:3px;border-top-left-radius:3px;-moz-border-radius-bottomleft:3px;-moz-border-radius-topleft:3px}.pagination-mini ul>li:last-child>a,.pagination-small ul>li:last-child>a,.pagination-mini ul>li:last-child>span,.pagination-small ul>li:last-child>span{-webkit-border-top-right-radius:3px;border-top-right-radius:3px;-webkit-border-bottom-right-radius:3px;border-bottom-right-radius:3px;-moz-border-radius-topright:3px;-moz-border-radius-bottomright:3px}.pagination-small ul>li>a,.pagination-small ul>li>span{padding:2px 10px;font-size:11.9px}.pagination-mini ul>li>a,.pagination-mini ul>li>span{padding:0 6px;font-size:10.5px}.pager{margin:20px 0;text-align:center;list-style:none;*zoom:1}.pager:before,.pager:after{display:table;line-height:0;content:""}.pager:after{clear:both}.pager li{display:inline}.pager li>a,.pager li>span{display:inline-block;padding:5px 14px;background-color:#fff;border:1px solid #ddd;-webkit-border-radius:15px;-moz-border-radius:15px;border-radius:15px}.pager li>a:hover,.pager li>a:focus{text-decoration:none;background-color:#f5f5f5}.pager .next>a,.pager .next>span{float:right}.pager .previous>a,.pager .previous>span{float:left}.pager .disabled>a,.pager .disabled>a:hover,.pager .disabled>a:focus,.pager .disabled>span{color:#999;cursor:default;background-color:#fff}.modal-backdrop{position:fixed;top:0;right:0;bottom:0;left:0;z-index:1040;background-color:#000}.modal-backdrop.fade{opacity:0}.modal-backdrop,.modal-backdrop.fade.in{opacity:.8;filter:alpha(opacity=80)}.modal{position:fixed;top:10%;left:50%;z-index:1050;width:560px;margin-left:-280px;background-color:#fff;border:1px solid #999;border:1px solid rgba(0,0,0,0.3);*border:1px solid #999;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;outline:0;-webkit-box-shadow:0 3px 7px rgba(0,0,0,0.3);-moz-box-shadow:0 3px 7px rgba(0,0,0,0.3);box-shadow:0 3px 7px rgba(0,0,0,0.3);-webkit-background-clip:padding-box;-moz-background-clip:padding-box;background-clip:padding-box}.modal.fade{top:-25%;-webkit-transition:opacity .3s linear,top .3s ease-out;-moz-transition:opacity .3s linear,top .3s ease-out;-o-transition:opacity .3s linear,top .3s ease-out;transition:opacity .3s linear,top .3s ease-out}.modal.fade.in{top:10%}.modal-header{padding:9px 15px;border-bottom:1px solid #eee}.modal-header .close{margin-top:2px}.modal-header h3{margin:0;line-height:30px}.modal-body{position:relative;max-height:400px;padding:15px;overflow-y:auto}.modal-form{margin-bottom:0}.modal-footer{padding:14px 15px 15px;margin-bottom:0;text-align:right;background-color:#f5f5f5;border-top:1px solid #ddd;-webkit-border-radius:0 0 6px 6px;-moz-border-radius:0 0 6px 6px;border-radius:0 0 6px 6px;*zoom:1;-webkit-box-shadow:inset 0 1px 0 #fff;-moz-box-shadow:inset 0 1px 0 #fff;box-shadow:inset 0 1px 0 #fff}.modal-footer:before,.modal-footer:after{display:table;line-height:0;content:""}.modal-footer:after{clear:both}.modal-footer .btn+.btn{margin-bottom:0;margin-left:5px}.modal-footer .btn-group .btn+.btn{margin-left:-1px}.modal-footer .btn-block+.btn-block{margin-left:0}.tooltip{position:absolute;z-index:1030;display:block;font-size:11px;line-height:1.4;opacity:0;filter:alpha(opacity=0);visibility:visible}.tooltip.in{opacity:.8;filter:alpha(opacity=80)}.tooltip.top{padding:5px 0;margin-top:-3px}.tooltip.right{padding:0 5px;margin-left:3px}.tooltip.bottom{padding:5px 0;margin-top:3px}.tooltip.left{padding:0 5px;margin-left:-3px}.tooltip-inner{max-width:200px;padding:8px;color:#fff;text-align:center;text-decoration:none;background-color:#000;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.tooltip-arrow{position:absolute;width:0;height:0;border-color:transparent;border-style:solid}.tooltip.top .tooltip-arrow{bottom:0;left:50%;margin-left:-5px;border-top-color:#000;border-width:5px 5px 0}.tooltip.right .tooltip-arrow{top:50%;left:0;margin-top:-5px;border-right-color:#000;border-width:5px 5px 5px 0}.tooltip.left .tooltip-arrow{top:50%;right:0;margin-top:-5px;border-left-color:#000;border-width:5px 0 5px 5px}.tooltip.bottom .tooltip-arrow{top:0;left:50%;margin-left:-5px;border-bottom-color:#000;border-width:0 5px 5px}.popover{position:absolute;top:0;left:0;z-index:1010;display:none;max-width:276px;padding:1px;text-align:left;white-space:normal;background-color:#fff;border:1px solid #ccc;border:1px solid rgba(0,0,0,0.2);-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px;-webkit-box-shadow:0 5px 10px rgba(0,0,0,0.2);-moz-box-shadow:0 5px 10px rgba(0,0,0,0.2);box-shadow:0 5px 10px rgba(0,0,0,0.2);-webkit-background-clip:padding-box;-moz-background-clip:padding;background-clip:padding-box}.popover.top{margin-top:-10px}.popover.right{margin-left:10px}.popover.bottom{margin-top:10px}.popover.left{margin-left:-10px}.popover-title{padding:8px 14px;margin:0;font-size:14px;font-weight:normal;line-height:18px;background-color:#f7f7f7;border-bottom:1px solid #ebebeb;-webkit-border-radius:5px 5px 0 0;-moz-border-radius:5px 5px 0 0;border-radius:5px 5px 0 0}.popover-title:empty{display:none}.popover-content{padding:9px 14px}.popover .arrow,.popover .arrow:after{position:absolute;display:block;width:0;height:0;border-color:transparent;border-style:solid}.popover .arrow{border-width:11px}.popover .arrow:after{border-width:10px;content:""}.popover.top .arrow{bottom:-11px;left:50%;margin-left:-11px;border-top-color:#999;border-top-color:rgba(0,0,0,0.25);border-bottom-width:0}.popover.top .arrow:after{bottom:1px;margin-left:-10px;border-top-color:#fff;border-bottom-width:0}.popover.right .arrow{top:50%;left:-11px;margin-top:-11px;border-right-color:#999;border-right-color:rgba(0,0,0,0.25);border-left-width:0}.popover.right .arrow:after{bottom:-10px;left:1px;border-right-color:#fff;border-left-width:0}.popover.bottom .arrow{top:-11px;left:50%;margin-left:-11px;border-bottom-color:#999;border-bottom-color:rgba(0,0,0,0.25);border-top-width:0}.popover.bottom .arrow:after{top:1px;margin-left:-10px;border-bottom-color:#fff;border-top-width:0}.popover.left .arrow{top:50%;right:-11px;margin-top:-11px;border-left-color:#999;border-left-color:rgba(0,0,0,0.25);border-right-width:0}.popover.left .arrow:after{right:1px;bottom:-10px;border-left-color:#fff;border-right-width:0}.thumbnails{margin-left:-20px;list-style:none;*zoom:1}.thumbnails:before,.thumbnails:after{display:table;line-height:0;content:""}.thumbnails:after{clear:both}.row-fluid .thumbnails{margin-left:0}.thumbnails>li{float:left;margin-bottom:20px;margin-left:20px}.thumbnail{display:block;padding:4px;line-height:20px;border:1px solid #ddd;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;-webkit-box-shadow:0 1px 3px rgba(0,0,0,0.055);-moz-box-shadow:0 1px 3px rgba(0,0,0,0.055);box-shadow:0 1px 3px rgba(0,0,0,0.055);-webkit-transition:all .2s ease-in-out;-moz-transition:all .2s ease-in-out;-o-transition:all .2s ease-in-out;transition:all .2s ease-in-out}a.thumbnail:hover,a.thumbnail:focus{border-color:#08c;-webkit-box-shadow:0 1px 4px rgba(0,105,214,0.25);-moz-box-shadow:0 1px 4px rgba(0,105,214,0.25);box-shadow:0 1px 4px rgba(0,105,214,0.25)}.thumbnail>img{display:block;max-width:100%;margin-right:auto;margin-left:auto}.thumbnail .caption{padding:9px;color:#555}.media,.media-body{overflow:hidden;*overflow:visible;zoom:1}.media,.media .media{margin-top:15px}.media:first-child{margin-top:0}.media-object{display:block}.media-heading{margin:0 0 5px}.media>.pull-left{margin-right:10px}.media>.pull-right{margin-left:10px}.media-list{margin-left:0;list-style:none}.label,.badge{display:inline-block;padding:2px 4px;font-size:11.844px;font-weight:bold;line-height:14px;color:#fff;text-shadow:0 -1px 0 rgba(0,0,0,0.25);white-space:nowrap;vertical-align:baseline;background-color:#999}.label{-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px}.badge{padding-right:9px;padding-left:9px;-webkit-border-radius:9px;-moz-border-radius:9px;border-radius:9px}.label:empty,.badge:empty{display:none}a.label:hover,a.label:focus,a.badge:hover,a.badge:focus{color:#fff;text-decoration:none;cursor:pointer}.label-important,.badge-important{background-color:#b94a48}.label-important[href],.badge-important[href]{background-color:#953b39}.label-warning,.badge-warning{background-color:#f89406}.label-warning[href],.badge-warning[href]{background-color:#c67605}.label-success,.badge-success{background-color:#468847}.label-success[href],.badge-success[href]{background-color:#356635}.label-info,.badge-info{background-color:#3a87ad}.label-info[href],.badge-info[href]{background-color:#2d6987}.label-inverse,.badge-inverse{background-color:#333}.label-inverse[href],.badge-inverse[href]{background-color:#1a1a1a}.btn .label,.btn .badge{position:relative;top:-1px}.btn-mini .label,.btn-mini .badge{top:0}@-webkit-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-moz-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-ms-keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}@-o-keyframes progress-bar-stripes{from{background-position:0 0}to{background-position:40px 0}}@keyframes progress-bar-stripes{from{background-position:40px 0}to{background-position:0 0}}.progress{height:20px;margin-bottom:20px;overflow:hidden;background-color:#f7f7f7;background-image:-moz-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#f5f5f5),to(#f9f9f9));background-image:-webkit-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:-o-linear-gradient(top,#f5f5f5,#f9f9f9);background-image:linear-gradient(to bottom,#f5f5f5,#f9f9f9);background-repeat:repeat-x;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5',endColorstr='#fff9f9f9',GradientType=0);-webkit-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);-moz-box-shadow:inset 0 1px 2px rgba(0,0,0,0.1);box-shadow:inset 0 1px 2px rgba(0,0,0,0.1)}.progress .bar{float:left;width:0;height:100%;font-size:12px;color:#fff;text-align:center;text-shadow:0 -1px 0 rgba(0,0,0,0.25);background-color:#0e90d2;background-image:-moz-linear-gradient(top,#149bdf,#0480be);background-image:-webkit-gradient(linear,0 0,0 100%,from(#149bdf),to(#0480be));background-image:-webkit-linear-gradient(top,#149bdf,#0480be);background-image:-o-linear-gradient(top,#149bdf,#0480be);background-image:linear-gradient(to bottom,#149bdf,#0480be);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf',endColorstr='#ff0480be',GradientType=0);-webkit-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 0 -1px 0 rgba(0,0,0,0.15);-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;-webkit-transition:width .6s ease;-moz-transition:width .6s ease;-o-transition:width .6s ease;transition:width .6s ease}.progress .bar+.bar{-webkit-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);-moz-box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15);box-shadow:inset 1px 0 0 rgba(0,0,0,0.15),inset 0 -1px 0 rgba(0,0,0,0.15)}.progress-striped .bar{background-color:#149bdf;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);-webkit-background-size:40px 40px;-moz-background-size:40px 40px;-o-background-size:40px 40px;background-size:40px 40px}.progress.active .bar{-webkit-animation:progress-bar-stripes 2s linear infinite;-moz-animation:progress-bar-stripes 2s linear infinite;-ms-animation:progress-bar-stripes 2s linear infinite;-o-animation:progress-bar-stripes 2s linear infinite;animation:progress-bar-stripes 2s linear infinite}.progress-danger .bar,.progress .bar-danger{background-color:#dd514c;background-image:-moz-linear-gradient(top,#ee5f5b,#c43c35);background-image:-webkit-gradient(linear,0 0,0 100%,from(#ee5f5b),to(#c43c35));background-image:-webkit-linear-gradient(top,#ee5f5b,#c43c35);background-image:-o-linear-gradient(top,#ee5f5b,#c43c35);background-image:linear-gradient(to bottom,#ee5f5b,#c43c35);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b',endColorstr='#ffc43c35',GradientType=0)}.progress-danger.progress-striped .bar,.progress-striped .bar-danger{background-color:#ee5f5b;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-success .bar,.progress .bar-success{background-color:#5eb95e;background-image:-moz-linear-gradient(top,#62c462,#57a957);background-image:-webkit-gradient(linear,0 0,0 100%,from(#62c462),to(#57a957));background-image:-webkit-linear-gradient(top,#62c462,#57a957);background-image:-o-linear-gradient(top,#62c462,#57a957);background-image:linear-gradient(to bottom,#62c462,#57a957);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462',endColorstr='#ff57a957',GradientType=0)}.progress-success.progress-striped .bar,.progress-striped .bar-success{background-color:#62c462;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-info .bar,.progress .bar-info{background-color:#4bb1cf;background-image:-moz-linear-gradient(top,#5bc0de,#339bb9);background-image:-webkit-gradient(linear,0 0,0 100%,from(#5bc0de),to(#339bb9));background-image:-webkit-linear-gradient(top,#5bc0de,#339bb9);background-image:-o-linear-gradient(top,#5bc0de,#339bb9);background-image:linear-gradient(to bottom,#5bc0de,#339bb9);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de',endColorstr='#ff339bb9',GradientType=0)}.progress-info.progress-striped .bar,.progress-striped .bar-info{background-color:#5bc0de;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.progress-warning .bar,.progress .bar-warning{background-color:#faa732;background-image:-moz-linear-gradient(top,#fbb450,#f89406);background-image:-webkit-gradient(linear,0 0,0 100%,from(#fbb450),to(#f89406));background-image:-webkit-linear-gradient(top,#fbb450,#f89406);background-image:-o-linear-gradient(top,#fbb450,#f89406);background-image:linear-gradient(to bottom,#fbb450,#f89406);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450',endColorstr='#fff89406',GradientType=0)}.progress-warning.progress-striped .bar,.progress-striped .bar-warning{background-color:#fbb450;background-image:-webkit-gradient(linear,0 100%,100% 0,color-stop(0.25,rgba(255,255,255,0.15)),color-stop(0.25,transparent),color-stop(0.5,transparent),color-stop(0.5,rgba(255,255,255,0.15)),color-stop(0.75,rgba(255,255,255,0.15)),color-stop(0.75,transparent),to(transparent));background-image:-webkit-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-moz-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:-o-linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent);background-image:linear-gradient(45deg,rgba(255,255,255,0.15) 25%,transparent 25%,transparent 50%,rgba(255,255,255,0.15) 50%,rgba(255,255,255,0.15) 75%,transparent 75%,transparent)}.accordion{margin-bottom:20px}.accordion-group{margin-bottom:2px;border:1px solid #e5e5e5;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px}.accordion-heading{border-bottom:0}.accordion-heading .accordion-toggle{display:block;padding:8px 15px}.accordion-toggle{cursor:pointer}.accordion-inner{padding:9px 15px;border-top:1px solid #e5e5e5}.carousel{position:relative;margin-bottom:20px;line-height:1}.carousel-inner{position:relative;width:100%;overflow:hidden}.carousel-inner>.item{position:relative;display:none;-webkit-transition:.6s ease-in-out left;-moz-transition:.6s ease-in-out left;-o-transition:.6s ease-in-out left;transition:.6s ease-in-out left}.carousel-inner>.item>img,.carousel-inner>.item>a>img{display:block;line-height:1}.carousel-inner>.active,.carousel-inner>.next,.carousel-inner>.prev{display:block}.carousel-inner>.active{left:0}.carousel-inner>.next,.carousel-inner>.prev{position:absolute;top:0;width:100%}.carousel-inner>.next{left:100%}.carousel-inner>.prev{left:-100%}.carousel-inner>.next.left,.carousel-inner>.prev.right{left:0}.carousel-inner>.active.left{left:-100%}.carousel-inner>.active.right{left:100%}.carousel-control{position:absolute;top:40%;left:15px;width:40px;height:40px;margin-top:-20px;font-size:60px;font-weight:100;line-height:30px;color:#fff;text-align:center;background:#222;border:3px solid #fff;-webkit-border-radius:23px;-moz-border-radius:23px;border-radius:23px;opacity:.5;filter:alpha(opacity=50)}.carousel-control.right{right:15px;left:auto}.carousel-control:hover,.carousel-control:focus{color:#fff;text-decoration:none;opacity:.9;filter:alpha(opacity=90)}.carousel-indicators{position:absolute;top:15px;right:15px;z-index:5;margin:0;list-style:none}.carousel-indicators li{display:block;float:left;width:10px;height:10px;margin-left:5px;text-indent:-999px;background-color:#ccc;background-color:rgba(255,255,255,0.25);border-radius:5px}.carousel-indicators .active{background-color:#fff}.carousel-caption{position:absolute;right:0;bottom:0;left:0;padding:15px;background:#333;background:rgba(0,0,0,0.75)}.carousel-caption h4,.carousel-caption p{line-height:20px;color:#fff}.carousel-caption h4{margin:0 0 5px}.carousel-caption p{margin-bottom:0}.hero-unit{padding:60px;margin-bottom:30px;font-size:18px;font-weight:200;line-height:30px;color:inherit;background-color:#eee;-webkit-border-radius:6px;-moz-border-radius:6px;border-radius:6px}.hero-unit h1{margin-bottom:0;font-size:60px;line-height:1;letter-spacing:-1px;color:inherit}.hero-unit li{line-height:30px}.pull-right{float:right}.pull-left{float:left}.hide{display:none}.show{display:block}.invisible{visibility:hidden}.affix{position:fixed} diff --git a/src/bb-themes/huraga/assets/css/font/Elusive-Icons.eot b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.eot new file mode 100644 index 000000000..babaf9132 Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.eot differ diff --git a/src/bb-themes/huraga/assets/css/font/Elusive-Icons.svg b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.svg new file mode 100644 index 000000000..541142a82 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.svg @@ -0,0 +1,285 @@ + + + + +This is a custom SVG font generated by IcoMoon. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/font/Elusive-Icons.ttf b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.ttf new file mode 100644 index 000000000..138f20997 Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.ttf differ diff --git a/src/bb-themes/huraga/assets/css/font/Elusive-Icons.woff b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.woff new file mode 100644 index 000000000..e4324595f Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/Elusive-Icons.woff differ diff --git a/src/bb-themes/huraga/assets/css/font/FontAwesome.otf b/src/bb-themes/huraga/assets/css/font/FontAwesome.otf new file mode 100644 index 000000000..32dd8b1cd Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/FontAwesome.otf differ diff --git a/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.eot b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.eot new file mode 100644 index 000000000..c080283bd Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.eot differ diff --git a/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.svg b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.svg new file mode 100644 index 000000000..10a1e1bbf --- /dev/null +++ b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.svg @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.ttf b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.ttf new file mode 100644 index 000000000..908f69ec9 Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.ttf differ diff --git a/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.woff b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.woff new file mode 100644 index 000000000..a33af950a Binary files /dev/null and b/src/bb-themes/huraga/assets/css/font/fontawesome-webfont.woff differ diff --git a/src/bb-themes/huraga/assets/css/huraga-blue.css b/src/bb-themes/huraga/assets/css/huraga-blue.css new file mode 100644 index 000000000..ffc059f18 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/huraga-blue.css @@ -0,0 +1,13000 @@ +/*! + * Walkin Pixels - Huraga v1.7 + * www.walkingpixels.com + * + * Blue color + * + */ +@import url("http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold"); +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, +a:active { + outline: 0; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + + max-width: 100%; + /* Part 1: Set a maxium relative to the parent */ + + width: auto\9; + /* IE7-8 need help adjusting responsive images */ + + height: auto; + /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} +#map_canvas img, +.google-maps img { + max-width: none; +} +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +@media print { + * { + text-shadow: none !important; + color: #000 !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body { + margin: 0; + font-family: "PT Sans", Arial, sans-serif; + font-size: 13px; + line-height: 18px; + color: #939699; + background-color: #f5f5f5; +} +a { + color: #4986e7; + text-decoration: none; +} +a:hover, +a:focus { + color: #1853b2; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; +} +.offset3 { + margin-left: 260px; +} +.offset2 { + margin-left: 180px; +} +.offset1 { + margin-left: 100px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; +} +.container:after { + clear: both; +} +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 9px; +} +.lead { + margin-bottom: 18px; + font-size: 19.5px; + font-weight: 200; + line-height: 27px; +} +small { + font-size: 85%; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +cite { + font-style: normal; +} +.muted { + color: #999999; +} +a.muted:hover, +a.muted:focus { + color: #808080; +} +.text-warning { + color: #c09853; +} +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover, +a.text-success:focus { + color: #356635; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 9px 0; + font-family: inherit; + font-weight: bold; + line-height: 18px; + color: #525252; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 36px; +} +h1 { + font-size: 35.75px; +} +h2 { + font-size: 29.25px; +} +h3 { + font-size: 22.75px; +} +h4 { + font-size: 16.25px; +} +h5 { + font-size: 13px; +} +h6 { + font-size: 11.049999999999999px; +} +h1 small { + font-size: 22.75px; +} +h2 small { + font-size: 16.25px; +} +h3 small { + font-size: 13px; +} +h4 small { + font-size: 13px; +} +.page-header { + padding-bottom: 8px; + margin: 18px 0 27px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 9px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 18px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding-left: 5px; + padding-right: 5px; +} +dl { + margin-bottom: 18px; +} +dt, +dd { + line-height: 18px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 9px; +} +.dl-horizontal { + *zoom: 1; +} +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 18px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16.25px; + font-weight: 300; + line-height: 1.25; +} +blockquote small { + display: block; + line-height: 18px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 18px; + font-style: normal; + line-height: 18px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 11px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} +pre { + display: block; + padding: 8.5px; + margin: 0 0 9px; + font-size: 12px; + line-height: 18px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +pre.prettyprint { + margin-bottom: 18px; +} +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 18px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 18px; + font-size: 19.5px; + line-height: 36px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 13.5px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 13px; + font-weight: normal; + line-height: 18px; +} +input, +button, +select, +textarea { + font-family: "PT Sans", Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 18px; + padding: 4px 6px; + margin-bottom: 9px; + font-size: 13px; + line-height: 18px; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 28px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 28px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 18px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 17px 20px 18px; + margin-top: 18px; + margin-bottom: 18px; + background-color: #ffffff; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #babcbe; +} +.help-block { + display: block; + margin-bottom: 9px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 9px; + vertical-align: middle; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 13px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 18px; + min-width: 16px; + padding: 4px 5px; + font-size: 13px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 9px; +} +legend + .control-group { + margin-top: 18px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 18px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 9px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 18px; +} +.table th, +.table td { + padding: 8px; + line-height: 18px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table .table { + background-color: #f5f5f5; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success > td { + background-color: #dff0d8; +} +.table tbody tr.error > td { + background-color: #f2dede; +} +.table tbody tr.warning > td { + background-color: #fcf8e3; +} +.table tbody tr.info > td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/icons/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/focus/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/icons/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; + width: 16px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; +} +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + text-decoration: none; + color: #ffffff; + background-color: #4080e6; + background-image: -moz-linear-gradient(top, #4986e7, #3277e4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#3277e4)); + background-image: -webkit-linear-gradient(top, #4986e7, #3277e4); + background-image: -o-linear-gradient(top, #4986e7, #3277e4); + background-image: linear-gradient(to bottom, #4986e7, #3277e4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff3277e4', GradientType=0); +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #333333; + text-decoration: none; + outline: 0; + background-color: #4080e6; + background-image: -moz-linear-gradient(top, #4986e7, #3277e4); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#3277e4)); + background-image: -webkit-linear-gradient(top, #4986e7, #3277e4); + background-image: -o-linear-gradient(top, #4986e7, #3277e4); + background-image: linear-gradient(to bottom, #4986e7, #3277e4); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff3277e4', GradientType=0); +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 16.25px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 0px 6px; + font-size: 9.75px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.btn-primary:active, +.btn-primary.active { + background-color: #1d38e0 \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e43838; + background-image: -moz-linear-gradient(top, #e74949, #e01d1d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e01d1d)); + background-image: -webkit-linear-gradient(top, #e74949, #e01d1d); + background-image: -o-linear-gradient(top, #e74949, #e01d1d); + background-image: linear-gradient(to bottom, #e74949, #e01d1d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe01d1d', GradientType=0); + border-color: #e01d1d #e01d1d #9c1515; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e01d1d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #e01d1d; + *background-color: #c91b1b; +} +.btn-danger:active, +.btn-danger.active { + background-color: #b21818 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f8a1d; + background-image: -moz-linear-gradient(top, #6b9b20, #4e7117); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4e7117)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4e7117); + background-image: -o-linear-gradient(top, #6b9b20, #4e7117); + background-image: linear-gradient(to bottom, #6b9b20, #4e7117); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4e7117', GradientType=0); + border-color: #4e7117 #4e7117 #22310a; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4e7117; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #4e7117; + *background-color: #3f5c13; +} +.btn-success:active, +.btn-success.active { + background-color: #31460f \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.btn-info:active, +.btn-info.active { + background-color: #1d38e0 \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #373a42; + background-image: -moz-linear-gradient(top, #40444d, #292b31); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#292b31)); + background-image: -webkit-linear-gradient(top, #40444d, #292b31); + background-image: -o-linear-gradient(top, #40444d, #292b31); + background-image: linear-gradient(to bottom, #40444d, #292b31); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff292b31', GradientType=0); + border-color: #292b31 #292b31 #060707; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #292b31; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #292b31; + *background-color: #1d1f23; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #121315 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #4986e7; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover, +.btn-link:focus { + color: #1853b2; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 9px; + margin-bottom: 9px; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 13px; +} +.btn-group > .btn-mini { + font-size: 9.75px; +} +.btn-group > .btn-small { + font-size: 11.049999999999999px; +} +.btn-group > .btn-large { + font-size: 16.25px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #495fe7; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #e01d1d; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #4e7117; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #495fe7; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #292b31; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 18px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-success h4 { + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-info h4 { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 18px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li > a > img { + max-width: none; +} +.nav > .pull-right { + float: right; +} +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 18px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #4986e7; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; +} +.nav-tabs:after, +.nav-pills:after { + clear: both; +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 18px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + background-color: #f5f5f5; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #4986e7; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #4986e7; + border-bottom-color: #4986e7; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #1853b2; + border-bottom-color: #1853b2; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 18px; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 11px 20px 11px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #555555; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #555555; +} +.navbar-link { + color: #555555; +} +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 11px 15px 11px; + color: #555555; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; +} +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} +.navbar-inverse .brand { + color: #999999; +} +.navbar-inverse .navbar-text { + color: #999999; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 18px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.breadcrumb > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} +.breadcrumb > .active { + color: #999999; +} +.pagination { + margin: 18px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.pagination ul > li { + display: inline; +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 18px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 16.25px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0px 6px; + font-size: 9.75px; +} +.pager { + margin: 18px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-title:empty { + display: none; +} +.popover-content { + padding: 9px 14px; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: 11px; +} +.popover .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right .arrow:after { + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left .arrow:after { + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, +.thumbnails:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails:after { + clear: both; +} +.row-fluid .thumbnails { + margin-left: 0; +} +.thumbnails > li { + float: left; + margin-bottom: 18px; + margin-left: 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 18px; + border: 1px solid #ddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #4986e7; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; + color: #555555; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 10.998px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; +} +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +.label:empty, +.badge:empty { + display: none; +} +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label-important, +.badge-important { + background-color: #b94a48; +} +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} +.label-warning, +.badge-warning { + background-color: #f89406; +} +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} +.label-success, +.badge-success { + background-color: #468847; +} +.label-success[href], +.badge-success[href] { + background-color: #356635; +} +.label-info, +.badge-info { + background-color: #3a87ad; +} +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} +.label-inverse, +.badge-inverse { + background-color: #333333; +} +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} +.btn-mini .label, +.btn-mini .badge { + top: 0; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 18px; + margin-bottom: 18px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.accordion { + margin-bottom: 18px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-toggle { + cursor: pointer; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 18px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} +.carousel-indicators .active { + background-color: #fff; +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 18px; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 27px; + color: #cccccc; + background-color: #40444d; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: #ffffff; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 27px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +@media (max-width: 767px) { + body { + padding-left: 20px; + padding-right: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 18px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-left: 10px; + padding-right: 10px; + } + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} +@media (max-width: 767px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 18px; + } + .navbar-fixed-bottom { + margin-top: 18px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 9px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #555555; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 9px 15px; + margin: 9px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } +} +@media (min-width: 768px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} +@-ms-viewport { + width: device-width; +} +.hidden { + display: none; + visibility: hidden; +} +.visible-phone { + display: none !important; +} +.visible-tablet { + display: none !important; +} +.hidden-desktop { + display: none !important; +} +.visible-desktop { + display: inherit !important; +} +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} +/* Emoticon icon set */ +[class^="emo-"], +[class*=" emo-"] { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + vertical-align: text-top; + background-image: url("../img/icons/emoticons-icons.png"); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; +} +[class^="emo-"]:last-child, +[class*=" emo-"]:last-child { + *margin-left: 0; +} +.emo-8ball { + background-position: 0 0; +} +.emo-basketball { + background-position: -32px 0; +} +.emo-football { + background-position: -288px 0; +} +.emo-golf { + background-position: -320px 0; +} +.emo-raquet { + background-position: -512px 0; +} +.emo-rocket { + background-position: -576px 0; +} +.emo-soccer { + background-position: -736px 0; +} +.emo-tennis { + background-position: -800px 0; +} +.emo-shuttlecock { + background-position: -640px 0; +} +.emo-bomb { + background-position: -64px 0; +} +.emo-bug { + background-position: -96px 0; +} +.emo-confuse { + background-position: -128px 0; +} +.emo-cool { + background-position: -160px 0; +} +.emo-cry { + background-position: -192px 0; +} +.emo-evilgrin { + background-position: -224px 0; +} +.emo-fat { + background-position: -256px 0; +} +.emo-grin { + background-position: -352px 0; +} +.emo-happy { + background-position: -384px 0; +} +.emo-heart { + background-position: -416px 0; +} +.emo-mad { + background-position: -448px 0; +} +.emo-neutral { + background-position: -480px 0; +} +.emo-red { + background-position: -544px 0; +} +.emo-roll { + background-position: -608px 0; +} +.emo-slim { + background-position: -672px 0; +} +.emo-smile { + background-position: -704px 0; +} +.emo-surprised { + background-position: -768px 0; +} +.emo-tongue { + background-position: -832px 0; +} +.emo-unhappy { + background-position: -864px 0; +} +.emo-waii { + background-position: -896px 0; +} +.emo-wink { + background-position: -928px 0; +} +.emo-yell { + background-position: -960px 0; +} +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ +@font-face { + font-family: 'FontAwesome'; + src: url('../css/font/fontawesome-webfont.eot?v=3.0.1'); + src: url('../css/font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), url('../css/font/fontawesome-webfont.woff?v=3.0.1') format('woff'), url('../css/font/fontawesome-webfont.ttf?v=3.0.1') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="awe-"], +[class*=" awe-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + /* sprites.less reset */ + + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.awe-white, +.nav-pills > .active > a > [class^="awe-"], +.nav-pills > .active > a > [class*=" awe-"], +.nav-list > .active > a > [class^="awe-"], +.nav-list > .active > a > [class*=" awe-"], +.navbar-inverse .nav > .active > a > [class^="awe-"], +.navbar-inverse .nav > .active > a > [class*=" awe-"], +.dropdown-menu > li > a:hover > [class^="awe-"], +.dropdown-menu > li > a:hover > [class*=" awe-"], +.dropdown-menu > .active > a > [class^="awe-"], +.dropdown-menu > .active > a > [class*=" awe-"], +.dropdown-submenu:hover > a > [class^="awe-"], +.dropdown-submenu:hover > a > [class*=" awe-"] { + background-image: none; +} +[class^="awe-"]:before, +[class*=" awe-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="awe-"], +a [class*=" awe-"] { + display: inline-block; +} +/* makes the font 33% larger relative to the icon container */ +.awe-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} +.btn [class^="awe-"], +.nav [class^="awe-"], +.btn [class*=" awe-"], +.nav [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.btn [class^="awe-"].awe-large, +.nav [class^="awe-"].awe-large, +.btn [class*=" awe-"].awe-large, +.nav [class*=" awe-"].awe-large { + line-height: .9em; +} +.btn [class^="awe-"].awe-spin, +.nav [class^="awe-"].awe-spin, +.btn [class*=" awe-"].awe-spin, +.nav [class*=" awe-"].awe-spin { + display: inline-block; +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"] { + /* keeps button heights with and without icons the same */ + +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"], +.nav-tabs [class^="awe-"].awe-large, +.nav-pills [class^="awe-"].awe-large, +.nav-tabs [class*=" awe-"].awe-large, +.nav-pills [class*=" awe-"].awe-large { + line-height: .9em; +} +li [class^="awe-"], +.nav li [class^="awe-"], +li [class*=" awe-"], +.nav li [class*=" awe-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="awe-"].awe-large, +.nav li [class^="awe-"].awe-large, +li [class*=" awe-"].awe-large, +.nav li [class*=" awe-"].awe-large { + /* increased font size for awe-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="awe-"], +ul.icons li [class*=" awe-"] { + width: .75em; +} +.awe-muted { + color: #eeeeee; +} +.awe-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.awe-2x { + font-size: 2em; +} +.awe-2x.awe-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.awe-3x { + font-size: 3em; +} +.awe-3x.awe-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.awe-4x { + font-size: 4em; +} +.awe-4x.awe-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="awe-"].pull-left, +[class*=" awe-"].pull-left { + margin-right: .3em; +} +[class^="awe-"].pull-right, +[class*=" awe-"].pull-right { + margin-left: .3em; +} +.btn [class^="awe-"].pull-left.awe-2x, +.btn [class*=" awe-"].pull-left.awe-2x, +.btn [class^="awe-"].pull-right.awe-2x, +.btn [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.btn [class^="awe-"].awe-spin.awe-large, +.btn [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.btn.btn-small [class^="awe-"].pull-left.awe-2x, +.btn.btn-small [class*=" awe-"].pull-left.awe-2x, +.btn.btn-small [class^="awe-"].pull-right.awe-2x, +.btn.btn-small [class*=" awe-"].pull-right.awe-2x { + margin-top: .25em; +} +.btn.btn-large [class^="awe-"], +.btn.btn-large [class*=" awe-"] { + margin-top: 0; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x, +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-top: .05em; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x { + margin-right: .2em; +} +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-left: .2em; +} +.awe-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +@-moz-document url-prefix() { + .awe-spin { + height: .9em; + } + .btn .awe-spin { + height: auto; + } + .awe-spin.awe-large { + height: 1.25em; + } + .btn .awe-spin.awe-large { + height: .75em; + } +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.awe-glass:before { + content: "\f000"; +} +.awe-music:before { + content: "\f001"; +} +.awe-search:before { + content: "\f002"; +} +.awe-envelope:before { + content: "\f003"; +} +.awe-heart:before { + content: "\f004"; +} +.awe-star:before { + content: "\f005"; +} +.awe-star-empty:before { + content: "\f006"; +} +.awe-user:before { + content: "\f007"; +} +.awe-film:before { + content: "\f008"; +} +.awe-th-large:before { + content: "\f009"; +} +.awe-th:before { + content: "\f00a"; +} +.awe-th-list:before { + content: "\f00b"; +} +.awe-ok:before { + content: "\f00c"; +} +.awe-remove:before { + content: "\f00d"; +} +.awe-zoom-in:before { + content: "\f00e"; +} +.awe-zoom-out:before { + content: "\f010"; +} +.awe-off:before { + content: "\f011"; +} +.awe-signal:before { + content: "\f012"; +} +.awe-cog:before { + content: "\f013"; +} +.awe-trash:before { + content: "\f014"; +} +.awe-home:before { + content: "\f015"; +} +.awe-file:before { + content: "\f016"; +} +.awe-time:before { + content: "\f017"; +} +.awe-road:before { + content: "\f018"; +} +.awe-download-alt:before { + content: "\f019"; +} +.awe-download:before { + content: "\f01a"; +} +.awe-upload:before { + content: "\f01b"; +} +.awe-inbox:before { + content: "\f01c"; +} +.awe-play-circle:before { + content: "\f01d"; +} +.awe-repeat:before, +.awe-rotate-right:before { + content: "\f01e"; +} +/* F020 doesn't work in Safari. all shifted one down */ +.awe-refresh:before { + content: "\f021"; +} +.awe-list-alt:before { + content: "\f022"; +} +.awe-lock:before { + content: "\f023"; +} +.awe-flag:before { + content: "\f024"; +} +.awe-headphones:before { + content: "\f025"; +} +.awe-volume-off:before { + content: "\f026"; +} +.awe-volume-down:before { + content: "\f027"; +} +.awe-volume-up:before { + content: "\f028"; +} +.awe-qrcode:before { + content: "\f029"; +} +.awe-barcode:before { + content: "\f02a"; +} +.awe-tag:before { + content: "\f02b"; +} +.awe-tags:before { + content: "\f02c"; +} +.awe-book:before { + content: "\f02d"; +} +.awe-bookmark:before { + content: "\f02e"; +} +.awe-print:before { + content: "\f02f"; +} +.awe-camera:before { + content: "\f030"; +} +.awe-font:before { + content: "\f031"; +} +.awe-bold:before { + content: "\f032"; +} +.awe-italic:before { + content: "\f033"; +} +.awe-text-height:before { + content: "\f034"; +} +.awe-text-width:before { + content: "\f035"; +} +.awe-align-left:before { + content: "\f036"; +} +.awe-align-center:before { + content: "\f037"; +} +.awe-align-right:before { + content: "\f038"; +} +.awe-align-justify:before { + content: "\f039"; +} +.awe-list:before { + content: "\f03a"; +} +.awe-indent-left:before { + content: "\f03b"; +} +.awe-indent-right:before { + content: "\f03c"; +} +.awe-facetime-video:before { + content: "\f03d"; +} +.awe-picture:before { + content: "\f03e"; +} +.awe-pencil:before { + content: "\f040"; +} +.awe-map-marker:before { + content: "\f041"; +} +.awe-adjust:before { + content: "\f042"; +} +.awe-tint:before { + content: "\f043"; +} +.awe-edit:before { + content: "\f044"; +} +.awe-share:before { + content: "\f045"; +} +.awe-check:before { + content: "\f046"; +} +.awe-move:before { + content: "\f047"; +} +.awe-step-backward:before { + content: "\f048"; +} +.awe-fast-backward:before { + content: "\f049"; +} +.awe-backward:before { + content: "\f04a"; +} +.awe-play:before { + content: "\f04b"; +} +.awe-pause:before { + content: "\f04c"; +} +.awe-stop:before { + content: "\f04d"; +} +.awe-forward:before { + content: "\f04e"; +} +.awe-fast-forward:before { + content: "\f050"; +} +.awe-step-forward:before { + content: "\f051"; +} +.awe-eject:before { + content: "\f052"; +} +.awe-chevron-left:before { + content: "\f053"; +} +.awe-chevron-right:before { + content: "\f054"; +} +.awe-plus-sign:before { + content: "\f055"; +} +.awe-minus-sign:before { + content: "\f056"; +} +.awe-remove-sign:before { + content: "\f057"; +} +.awe-ok-sign:before { + content: "\f058"; +} +.awe-question-sign:before { + content: "\f059"; +} +.awe-info-sign:before { + content: "\f05a"; +} +.awe-screenshot:before { + content: "\f05b"; +} +.awe-remove-circle:before { + content: "\f05c"; +} +.awe-ok-circle:before { + content: "\f05d"; +} +.awe-ban-circle:before { + content: "\f05e"; +} +.awe-arrow-left:before { + content: "\f060"; +} +.awe-arrow-right:before { + content: "\f061"; +} +.awe-arrow-up:before { + content: "\f062"; +} +.awe-arrow-down:before { + content: "\f063"; +} +.awe-share-alt:before, +.awe-mail-forward:before { + content: "\f064"; +} +.awe-resize-full:before { + content: "\f065"; +} +.awe-resize-small:before { + content: "\f066"; +} +.awe-plus:before { + content: "\f067"; +} +.awe-minus:before { + content: "\f068"; +} +.awe-asterisk:before { + content: "\f069"; +} +.awe-exclamation-sign:before { + content: "\f06a"; +} +.awe-gift:before { + content: "\f06b"; +} +.awe-leaf:before { + content: "\f06c"; +} +.awe-fire:before { + content: "\f06d"; +} +.awe-eye-open:before { + content: "\f06e"; +} +.awe-eye-close:before { + content: "\f070"; +} +.awe-warning-sign:before { + content: "\f071"; +} +.awe-plane:before { + content: "\f072"; +} +.awe-calendar:before { + content: "\f073"; +} +.awe-random:before { + content: "\f074"; +} +.awe-comment:before { + content: "\f075"; +} +.awe-magnet:before { + content: "\f076"; +} +.awe-chevron-up:before { + content: "\f077"; +} +.awe-chevron-down:before { + content: "\f078"; +} +.awe-retweet:before { + content: "\f079"; +} +.awe-shopping-cart:before { + content: "\f07a"; +} +.awe-folder-close:before { + content: "\f07b"; +} +.awe-folder-open:before { + content: "\f07c"; +} +.awe-resize-vertical:before { + content: "\f07d"; +} +.awe-resize-horizontal:before { + content: "\f07e"; +} +.awe-bar-chart:before { + content: "\f080"; +} +.awe-twitter-sign:before { + content: "\f081"; +} +.awe-facebook-sign:before { + content: "\f082"; +} +.awe-camera-retro:before { + content: "\f083"; +} +.awe-key:before { + content: "\f084"; +} +.awe-cogs:before { + content: "\f085"; +} +.awe-comments:before { + content: "\f086"; +} +.awe-thumbs-up:before { + content: "\f087"; +} +.awe-thumbs-down:before { + content: "\f088"; +} +.awe-star-half:before { + content: "\f089"; +} +.awe-heart-empty:before { + content: "\f08a"; +} +.awe-signout:before { + content: "\f08b"; +} +.awe-linkedin-sign:before { + content: "\f08c"; +} +.awe-pushpin:before { + content: "\f08d"; +} +.awe-external-link:before { + content: "\f08e"; +} +.awe-signin:before { + content: "\f090"; +} +.awe-trophy:before { + content: "\f091"; +} +.awe-github-sign:before { + content: "\f092"; +} +.awe-upload-alt:before { + content: "\f093"; +} +.awe-lemon:before { + content: "\f094"; +} +.awe-phone:before { + content: "\f095"; +} +.awe-check-empty:before { + content: "\f096"; +} +.awe-bookmark-empty:before { + content: "\f097"; +} +.awe-phone-sign:before { + content: "\f098"; +} +.awe-twitter:before { + content: "\f099"; +} +.awe-facebook:before { + content: "\f09a"; +} +.awe-github:before { + content: "\f09b"; +} +.awe-unlock:before { + content: "\f09c"; +} +.awe-credit-card:before { + content: "\f09d"; +} +.awe-rss:before { + content: "\f09e"; +} +.awe-hdd:before { + content: "\f0a0"; +} +.awe-bullhorn:before { + content: "\f0a1"; +} +.awe-bell:before { + content: "\f0a2"; +} +.awe-certificate:before { + content: "\f0a3"; +} +.awe-hand-right:before { + content: "\f0a4"; +} +.awe-hand-left:before { + content: "\f0a5"; +} +.awe-hand-up:before { + content: "\f0a6"; +} +.awe-hand-down:before { + content: "\f0a7"; +} +.awe-circle-arrow-left:before { + content: "\f0a8"; +} +.awe-circle-arrow-right:before { + content: "\f0a9"; +} +.awe-circle-arrow-up:before { + content: "\f0aa"; +} +.awe-circle-arrow-down:before { + content: "\f0ab"; +} +.awe-globe:before { + content: "\f0ac"; +} +.awe-wrench:before { + content: "\f0ad"; +} +.awe-tasks:before { + content: "\f0ae"; +} +.awe-filter:before { + content: "\f0b0"; +} +.awe-briefcase:before { + content: "\f0b1"; +} +.awe-fullscreen:before { + content: "\f0b2"; +} +.awe-group:before { + content: "\f0c0"; +} +.awe-link:before { + content: "\f0c1"; +} +.awe-cloud:before { + content: "\f0c2"; +} +.awe-beaker:before { + content: "\f0c3"; +} +.awe-cut:before { + content: "\f0c4"; +} +.awe-copy:before { + content: "\f0c5"; +} +.awe-paper-clip:before { + content: "\f0c6"; +} +.awe-save:before { + content: "\f0c7"; +} +.awe-sign-blank:before { + content: "\f0c8"; +} +.awe-reorder:before { + content: "\f0c9"; +} +.awe-list-ul:before { + content: "\f0ca"; +} +.awe-list-ol:before { + content: "\f0cb"; +} +.awe-strikethrough:before { + content: "\f0cc"; +} +.awe-underline:before { + content: "\f0cd"; +} +.awe-table:before { + content: "\f0ce"; +} +.awe-magic:before { + content: "\f0d0"; +} +.awe-truck:before { + content: "\f0d1"; +} +.awe-pinterest:before { + content: "\f0d2"; +} +.awe-pinterest-sign:before { + content: "\f0d3"; +} +.awe-google-plus-sign:before { + content: "\f0d4"; +} +.awe-google-plus:before { + content: "\f0d5"; +} +.awe-money:before { + content: "\f0d6"; +} +.awe-caret-down:before { + content: "\f0d7"; +} +.awe-caret-up:before { + content: "\f0d8"; +} +.awe-caret-left:before { + content: "\f0d9"; +} +.awe-caret-right:before { + content: "\f0da"; +} +.awe-columns:before { + content: "\f0db"; +} +.awe-sort:before { + content: "\f0dc"; +} +.awe-sort-down:before { + content: "\f0dd"; +} +.awe-sort-up:before { + content: "\f0de"; +} +.awe-envelope-alt:before { + content: "\f0e0"; +} +.awe-linkedin:before { + content: "\f0e1"; +} +.awe-undo:before, +.awe-rotate-left:before { + content: "\f0e2"; +} +.awe-legal:before { + content: "\f0e3"; +} +.awe-dashboard:before { + content: "\f0e4"; +} +.awe-comment-alt:before { + content: "\f0e5"; +} +.awe-comments-alt:before { + content: "\f0e6"; +} +.awe-bolt:before { + content: "\f0e7"; +} +.awe-sitemap:before { + content: "\f0e8"; +} +.awe-umbrella:before { + content: "\f0e9"; +} +.awe-paste:before { + content: "\f0ea"; +} +.awe-lightbulb:before { + content: "\f0eb"; +} +.awe-exchange:before { + content: "\f0ec"; +} +.awe-cloud-download:before { + content: "\f0ed"; +} +.awe-cloud-upload:before { + content: "\f0ee"; +} +.awe-user-md:before { + content: "\f0f0"; +} +.awe-stethoscope:before { + content: "\f0f1"; +} +.awe-suitcase:before { + content: "\f0f2"; +} +.awe-bell-alt:before { + content: "\f0f3"; +} +.awe-coffee:before { + content: "\f0f4"; +} +.awe-food:before { + content: "\f0f5"; +} +.awe-file-alt:before { + content: "\f0f6"; +} +.awe-building:before { + content: "\f0f7"; +} +.awe-hospital:before { + content: "\f0f8"; +} +.awe-ambulance:before { + content: "\f0f9"; +} +.awe-medkit:before { + content: "\f0fa"; +} +.awe-fighter-jet:before { + content: "\f0fb"; +} +.awe-beer:before { + content: "\f0fc"; +} +.awe-h-sign:before { + content: "\f0fd"; +} +.awe-plus-sign-alt:before { + content: "\f0fe"; +} +.awe-double-angle-left:before { + content: "\f100"; +} +.awe-double-angle-right:before { + content: "\f101"; +} +.awe-double-angle-up:before { + content: "\f102"; +} +.awe-double-angle-down:before { + content: "\f103"; +} +.awe-angle-left:before { + content: "\f104"; +} +.awe-angle-right:before { + content: "\f105"; +} +.awe-angle-up:before { + content: "\f106"; +} +.awe-angle-down:before { + content: "\f107"; +} +.awe-desktop:before { + content: "\f108"; +} +.awe-laptop:before { + content: "\f109"; +} +.awe-tablet:before { + content: "\f10a"; +} +.awe-mobile-phone:before { + content: "\f10b"; +} +.awe-circle-blank:before { + content: "\f10c"; +} +.awe-quote-left:before { + content: "\f10d"; +} +.awe-quote-right:before { + content: "\f10e"; +} +.awe-spinner:before { + content: "\f110"; +} +.awe-circle:before { + content: "\f111"; +} +.awe-reply:before, +.awe-mail-reply:before { + content: "\f112"; +} +.awe-folder-close-alt:before { + content: "\f114"; +} +.awe-folder-open-alt:before { + content: "\f115"; +} +.awe-expand-alt:before { + content: "\f116"; +} +.awe-collapse-alt:before { + content: "\f117"; +} +.awe-smile:before { + content: "\f118"; +} +.awe-frown:before { + content: "\f119"; +} +.awe-meh:before { + content: "\f11a"; +} +.awe-gamepad:before { + content: "\f11b"; +} +.awe-keyboard:before { + content: "\f11c"; +} +.awe-flag-alt:before { + content: "\f11d"; +} +.awe-flag-checkered:before { + content: "\f11e"; +} +.awe-terminal:before { + content: "\f120"; +} +.awe-code:before { + content: "\f121"; +} +.awe-reply-all:before { + content: "\f122"; +} +.awe-mail-reply-all:before { + content: "\f122"; +} +.awe-star-half-full:before, +.awe-star-half-empty:before { + content: "\f123"; +} +.awe-location-arrow:before { + content: "\f124"; +} +.awe-crop:before { + content: "\f125"; +} +.awe-code-fork:before { + content: "\f126"; +} +.awe-unlink:before { + content: "\f127"; +} +.awe-question:before { + content: "\f128"; +} +.awe-info:before { + content: "\f129"; +} +.awe-exclamation:before { + content: "\f12a"; +} +.awe-superscript:before { + content: "\f12b"; +} +.awe-subscript:before { + content: "\f12c"; +} +.awe-eraser:before { + content: "\f12d"; +} +.awe-puzzle-piece:before { + content: "\f12e"; +} +.awe-microphone:before { + content: "\f130"; +} +.awe-microphone-off:before { + content: "\f131"; +} +.awe-shield:before { + content: "\f132"; +} +.awe-calendar-empty:before { + content: "\f133"; +} +.awe-fire-extinguisher:before { + content: "\f134"; +} +.awe-rocket:before { + content: "\f135"; +} +.awe-maxcdn:before { + content: "\f136"; +} +.awe-chevron-sign-left:before { + content: "\f137"; +} +.awe-chevron-sign-right:before { + content: "\f138"; +} +.awe-chevron-sign-up:before { + content: "\f139"; +} +.awe-chevron-sign-down:before { + content: "\f13a"; +} +.awe-html5:before { + content: "\f13b"; +} +.awe-css3:before { + content: "\f13c"; +} +.awe-anchor:before { + content: "\f13d"; +} +.awe-unlock-alt:before { + content: "\f13e"; +} +.awe-bullseye:before { + content: "\f140"; +} +.awe-ellipsis-horizontal:before { + content: "\f141"; +} +.awe-ellipsis-vertical:before { + content: "\f142"; +} +.awe-rss-sign:before { + content: "\f143"; +} +.awe-play-sign:before { + content: "\f144"; +} +.awe-ticket:before { + content: "\f145"; +} +.awe-minus-sign-alt:before { + content: "\f146"; +} +.awe-check-minus:before { + content: "\f147"; +} +.awe-level-up:before { + content: "\f148"; +} +.awe-level-down:before { + content: "\f149"; +} +.awe-check-sign:before { + content: "\f14a"; +} +.awe-edit-sign:before { + content: "\f14b"; +} +.awe-external-link-sign:before { + content: "\f14c"; +} +.awe-share-sign:before { + content: "\f14d"; +} + +/* Global styles */ +html, +body { + height: 100%; +} +body { + background-image: url("../img/assets/bg_body.jpg"); + background-repeat: repeat; + background-position: center center; + position: relative; +} +.container, +.ie8 .container { + width: 940px; +} +.navigation-block { + width: 220px; + float: left; + *zoom: 1; +} +.navigation-block:before, +.navigation-block:after { + display: table; + content: ""; + line-height: 0; +} +.navigation-block:after { + clear: both; +} +.navigation-block.affix { + position: fixed; + top: 20px; +} +.navigation-block.affix-bottom { + position: absolute; + top: auto; + bottom: 60px; +} +.navigation-block .navbar { + margin-bottom: 0; +} +.navigation-block .navbar .btn-navbar { + float: none; + margin: 0; + color: #40444d; + text-shadow: none; + text-align: left; +} +.navigation-block .navbar + .side-note { + margin-top: 10px; +} +.content-block { + width: 700px; + float: right; + margin-left: 20px; + *zoom: 1; +} +.content-block:before, +.content-block:after { + display: table; + content: ""; + line-height: 0; +} +.content-block:after { + clear: both; +} +#wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 0 -50px; +} +#push { + height: 50px; +} +/* Main header */ +#header { + position: relative; + padding: 20px 0; + margin-bottom: 20px; + border-bottom: 1px solid #dedede; +} +#header > h1 { + margin: 0; +} +#header > h1 + p { + margin: 0; + font-size: 11.049999999999999px; + text-shadow: 0 1px 0 #fff; +} +#header .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +#header nav { + float: right; + margin-top: -20px; + height: 30px; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul { + margin: 0; + *zoom: 1; +} +#header nav ul:before, +#header nav ul:after { + display: table; + content: ""; + line-height: 0; +} +#header nav ul:after { + clear: both; +} +#header nav ul > li { + float: left; + display: block; +} +#header nav ul > li + li { + border-right: 1px solid #363840; +} +#header nav ul > li:last-child { + border: none; +} +#header nav ul > li > a, +#header nav ul > li a.btn { + font-size: 11.049999999999999px !important; + padding: 6px 15px 0; + color: #b8babf; + display: block; + text-shadow: 0 1px 0 #000; + background: none; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li > a:hover, +#header nav ul > li a.btn:hover, +#header nav ul > li > a a.btn:hover, +#header nav ul > li a.btn a.btn:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li > a:hover .caret, +#header nav ul > li a.btn:hover .caret, +#header nav ul > li > a a.btn:hover .caret, +#header nav ul > li a.btn a.btn:hover .caret { + border-top-color: #fff; +} +#header nav ul > li a.btn { + padding: 6px 15px 5px; +} +#header nav ul > li .dropdown-menu { + margin: 0; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul > li .dropdown-menu li { + float: none; + border: none; +} +#header nav ul > li .dropdown-menu a { + color: #b8babf; + padding: 5px 15px; + text-shadow: 0 1px 0 #000; + background: none; +} +#header nav ul > li .dropdown-menu a:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li .btn-group.open .btn.dropdown-toggle { + color: #fff; + text-decoration: none; + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .btn .caret { + margin-left: 3px; + border-top-color: #b8babf; +} +#header nav ul > li .nav-search { + background-color: transparent; + border: none; + margin: 4px 0 4px 4px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .nav-search input { + height: 14px; + width: 100px; + margin: 0; + padding: 3px; + border-color: #fff; + -webkit-transition: width 0.3s ease; + -moz-transition: width 0.3s ease; + -o-transition: width 0.3s ease; + transition: width 0.3s ease; +} +#header nav ul > li .nav-search input:focus { + width: 180px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Main footer */ +#footer { + background-image: url("../img/assets/bg_footer.png"); + background-repeat: repeat-x; + background-position: top; + *zoom: 1; +} +#footer:before, +#footer:after { + display: table; + content: ""; + line-height: 0; +} +#footer:after { + clear: both; +} +#footer p { + margin: 20px 0 10px; + float: left; +} +#footer p a { + color: #525459; +} +#footer p a:hover { + color: #3a3b3e; +} +#footer p + ul { + margin-left: 10px; +} +#footer ul { + margin: 20px 0 0; + padding: 0; + list-style: none; + float: left; + *zoom: 1; +} +#footer ul:before, +#footer ul:after { + display: table; + content: ""; + line-height: 0; +} +#footer ul:after { + clear: both; +} +#footer ul li { + float: left; + display: block; +} +#footer ul li + li { + margin-left: 10px; +} +#footer .btn.btn-flat { + margin-top: 15px; + padding: 1px 8px; + font-size: 11.049999999999999px; +} +/* Navigation */ +.main-navigation { + margin-bottom: 20px; +} +.main-navigation > ul { + margin: 0; + list-style: none; + border-bottom: 1px solid #dedede; +} +.main-navigation > ul > li { + border-top: 1px solid #dedede; +} +.main-navigation > ul > li a { + color: #939699; + display: block; + background-repeat: no-repeat; +} +.main-navigation > ul > li > a { + line-height: 30px; +} +.main-navigation > ul > li > a:hover { + color: #4986e7; + text-decoration: none; + background-color: #fafafa; +} +.main-navigation > ul > li > a:hover + ul { + background-color: #fafafa; +} +.main-navigation > ul > li > a [class^="awe-"], +.main-navigation > ul > li > a [class*=" awe-"] { + margin-right: 5px; + font-size: 15px; +} +.main-navigation > ul > li ul { + display: none; + margin: 0; + padding: 0 0 10px; + list-style: none; +} +.main-navigation > ul > li ul li.active a { + color: #525252; +} +.main-navigation > ul > li ul a { + line-height: 24px; + padding-left: 36px; + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: 22px 9px; +} +.main-navigation > ul > li ul a.current, +.main-navigation > ul > li ul a:hover { + color: #525252; + text-decoration: none; +} +.main-navigation > ul > li.current > a { + color: #4986e7; +} +.main-navigation > ul > li.current > a [class^="awe-"], +.main-navigation > ul > li.current > a [class*=" awe-"] { + color: #4986e7; +} +.main-navigation > ul > li.current > a + ul { + display: block; +} +/* Badge for navigation */ +.main-navigation .badge { + float: right; + padding: 1px 5px 2px; + margin: 7px 0 0 0; + font-size: 11.049999999999999px; + color: #ffffff; + background-color: #4986e7; + cursor: help; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* User avatar */ +.user-profile { + margin-bottom: 20px; +} +.user-profile figure { + margin: 0; + *zoom: 1; +} +.user-profile figure:before, +.user-profile figure:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figure:after { + clear: both; +} +.user-profile img { + border: 1px solid #bec2c8; + background-color: #ffffff; + padding: 4px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + width: 60px; + height: 60px; +} +.user-profile figcaption { + float: right; + margin-left: 15px; + padding-top: 6px; + width: 130px; +} +.user-profile figcaption strong { + display: block; + line-height: 13px; +} +.user-profile figcaption strong a { + color: #525252; +} +.user-profile figcaption strong a:hover { + color: #000000; + text-decoration: none; +} +.user-profile figcaption em { + font-style: normal; + font-size: 9.75px; +} +.user-profile figcaption ul { + margin: 5px 0 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.user-profile figcaption ul:before, +.user-profile figcaption ul:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figcaption ul:after { + clear: both; +} +.user-profile figcaption ul > li { + float: left; + display: block; +} +.user-profile figcaption ul > li + li { + margin-left: 5px; +} +.user-profile figcaption ul .btn.btn-flat { + font-size: 11.049999999999999px; + padding: 1px 8px; +} +/* Side notes */ +.side-note { + background-image: url("../img/assets/bg-sidenote-top.png"); + background-repeat: no-repeat; + background-position: top center; + padding-top: 38px; + margin-bottom: 10px; +} +.side-note .side-note-container { + background-image: url("../img/assets/bg-sidenote-middle.png"); + background-repeat: repeat-y; + background-position: top center; + padding: 1px 20px 0; +} +.side-note .side-note-container p, +.side-note .side-note-container h2 { + margin: 0; + color: #807160; + line-height: 20px; + font-size: 11.049999999999999px; +} +.side-note .side-note-container h2 { + color: #665b4c; +} +.side-note .side-note-bottom { + background-image: url("../img/assets/bg-sidenote-bottom.png"); + background-repeat: no-repeat; + background-position: bottom center; + padding-bottom: 34px; +} +/* Balance */ +.balance { + border-top: 1px solid #dedede; + padding: 20px 0; +} +.balance h2 { + margin: 0; + font-size: 13px; + font-weight: normal; + line-height: normal; + color: #939699; +} +.balance strong { + font-size: 26px; + line-height: normal; + color: #525252; +} +/* Side search */ +.side-search { + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.side-search input { + width: 190px; + margin-bottom: 0; + padding-left: 14px; + padding-right: 14px; + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + line-height: normal; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; +} +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} +h1 { + font-size: 26px; + margin: 20px 0; +} +h2 { + font-size: 19.5px; + margin: 18px 0; +} +h3 { + font-size: 14.95px; + margin: 16px 0; +} +h4 { + font-size: 13px; + margin: 14px 0; +} +h5 { + font-size: 11.049999999999999px; + text-transform: uppercase; + margin: 12px 0; +} +h6 { + font-size: 9.75px; + text-transform: uppercase; + margin: 10px 0; +} +nav ul, +nav ol { + margin: 0; + padding: 0; + list-style: none; + list-style-image: none; +} +blockquote, +blockquote.pull-right { + clear: both; + margin: 0 0 20px; +} +blockquote small, +blockquote.pull-right small { + font-size: 10px; +} +code { + padding: 1px 3px; + background-color: #40444d; + border: 1px solid #000; + color: #ffffff; +} +pre { + border-color: #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); +} +.label { + padding: 1px 4px; +} +a.label:hover { + color: #ffffff; + background-color: #808080; + text-decoration: none; + cursor: pointer; +} +a.label-important:hover { + background-color: #953b39; +} +a.label-warning:hover { + background-color: #c67605; +} +a.label-success:hover { + background-color: #356635; +} +a.label-info:hover { + background-color: #2d6987; +} +a.label-inverse:hover { + background-color: #1a1a1a; +} +dl.dl-horizontal dt, +dl.dl-horizontal dd { + line-height: 21.599999999999998px; +} +dl.dl-horizontal dt { + width: 100px; +} +dl.dl-horizontal dd { + margin-left: 130px; +} +.data-block ol, +.data-block ul { + margin-bottom: 20px; +} +.data-block ol.checkmark, +.data-block ul.checkmark, +.data-block ol.crossmark, +.data-block ul.crossmark, +.data-block ol.pointmark, +.data-block ul.pointmark { + list-style: none; + margin-left: 0; +} +.data-block ol.checkmark li, +.data-block ul.checkmark li, +.data-block ol.crossmark li, +.data-block ul.crossmark li, +.data-block ol.pointmark li, +.data-block ul.pointmark li { + padding-left: 15px; + background-position: left 7px; + background-color: transparent; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_list_style_check.png"); +} +.data-block ol.crossmark li, +.data-block ul.crossmark li { + background-image: url("../img/icons/icon_list_style_cross.png"); +} +.data-block ol.pointmark li, +.data-block ul.pointmark li { + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: left 8px; +} +.data-block li { + line-height: 20px; +} +.well { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; +} +.well blockquote { + border-color: rgba(0, 0, 0, 0.15); +} +.well.large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well.small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* Content */ +/* Data block grid */ +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.span12 { + width: 700px; +} +.span11 { + width: 640px; +} +.span10 { + width: 580px; +} +.span9 { + width: 520px; +} +.span8 { + width: 460px; +} +.span7 { + width: 400px; +} +.span6 { + width: 340px; +} +.span5 { + width: 280px; +} +.span4 { + width: 220px; +} +.span3 { + width: 160px; +} +.span2 { + width: 100px; +} +.span1 { + width: 40px; +} +.offset12 { + margin-left: 740px; +} +.offset11 { + margin-left: 680px; +} +.offset10 { + margin-left: 620px; +} +.offset9 { + margin-left: 560px; +} +.offset8 { + margin-left: 500px; +} +.offset7 { + margin-left: 440px; +} +.offset6 { + margin-left: 380px; +} +.offset5 { + margin-left: 320px; +} +.offset4 { + margin-left: 260px; +} +.offset3 { + margin-left: 200px; +} +.offset2 { + margin-left: 140px; +} +.offset1 { + margin-left: 80px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.386363636363636%; + *margin-left: 2.3331721470019335%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.386363636363636%; +} +.row-fluid .span12 { + width: 99.88636363636363%; + *width: 99.83317214700192%; +} +.row-fluid .span11 { + width: 91.36363636363636%; + *width: 91.31044487427465%; +} +.row-fluid .span10 { + width: 82.84090909090908%; + *width: 82.78771760154737%; +} +.row-fluid .span9 { + width: 74.31818181818181%; + *width: 74.2649903288201%; +} +.row-fluid .span8 { + width: 65.79545454545453%; + *width: 65.74226305609282%; +} +.row-fluid .span7 { + width: 57.272727272727266%; + *width: 57.219535783365565%; +} +.row-fluid .span6 { + width: 48.74999999999999%; + *width: 48.69680851063829%; +} +.row-fluid .span5 { + width: 40.22727272727272%; + *width: 40.17408123791102%; +} +.row-fluid .span4 { + width: 31.70454545454545%; + *width: 31.65135396518375%; +} +.row-fluid .span3 { + width: 23.18181818181818%; + *width: 23.12862669245648%; +} +.row-fluid .span2 { + width: 14.659090909090907%; + *width: 14.605899419729205%; +} +.row-fluid .span1 { + width: 6.136363636363636%; + *width: 6.0831721470019335%; +} +.row-fluid .offset12 { + margin-left: 104.65909090909089%; + *margin-left: 104.55270793036748%; +} +.row-fluid .offset12:first-child { + margin-left: 102.27272727272727%; + *margin-left: 102.16634429400385%; +} +.row-fluid .offset11 { + margin-left: 96.13636363636363%; + *margin-left: 96.02998065764021%; +} +.row-fluid .offset11:first-child { + margin-left: 93.75%; + *margin-left: 93.64361702127658%; +} +.row-fluid .offset10 { + margin-left: 87.61363636363635%; + *margin-left: 87.50725338491293%; +} +.row-fluid .offset10:first-child { + margin-left: 85.22727272727272%; + *margin-left: 85.1208897485493%; +} +.row-fluid .offset9 { + margin-left: 79.09090909090908%; + *margin-left: 78.98452611218566%; +} +.row-fluid .offset9:first-child { + margin-left: 76.70454545454545%; + *margin-left: 76.59816247582204%; +} +.row-fluid .offset8 { + margin-left: 70.5681818181818%; + *margin-left: 70.46179883945838%; +} +.row-fluid .offset8:first-child { + margin-left: 68.18181818181817%; + *margin-left: 68.07543520309476%; +} +.row-fluid .offset7 { + margin-left: 62.04545454545454%; + *margin-left: 61.93907156673114%; +} +.row-fluid .offset7:first-child { + margin-left: 59.6590909090909%; + *margin-left: 59.5527079303675%; +} +.row-fluid .offset6 { + margin-left: 53.522727272727266%; + *margin-left: 53.41634429400386%; +} +.row-fluid .offset6:first-child { + margin-left: 51.136363636363626%; + *margin-left: 51.02998065764022%; +} +.row-fluid .offset5 { + margin-left: 44.99999999999999%; + *margin-left: 44.89361702127659%; +} +.row-fluid .offset5:first-child { + margin-left: 42.61363636363635%; + *margin-left: 42.50725338491295%; +} +.row-fluid .offset4 { + margin-left: 36.47727272727272%; + *margin-left: 36.37088974854932%; +} +.row-fluid .offset4:first-child { + margin-left: 34.090909090909086%; + *margin-left: 33.984526112185684%; +} +.row-fluid .offset3 { + margin-left: 27.954545454545453%; + *margin-left: 27.84816247582205%; +} +.row-fluid .offset3:first-child { + margin-left: 25.568181818181817%; + *margin-left: 25.461798839458414%; +} +.row-fluid .offset2 { + margin-left: 19.43181818181818%; + *margin-left: 19.325435203094777%; +} +.row-fluid .offset2:first-child { + margin-left: 17.045454545454543%; + *margin-left: 16.93907156673114%; +} +.row-fluid .offset1 { + margin-left: 10.909090909090907%; + *margin-left: 10.802707930367504%; +} +.row-fluid .offset1:first-child { + margin-left: 8.522727272727272%; + *margin-left: 8.416344294003867%; +} +[class*="span"] { + margin-bottom: 20px; +} +.data-block .row .row { + margin-left: -20px; + *zoom: 1; +} +.data-block .row .row:before, +.data-block .row .row:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .row .row:after { + clear: both; +} +.data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.data-block .row .container, +.data-block .row .navbar-static-top .container, +.data-block .row .navbar-fixed-top .container, +.data-block .row .navbar-fixed-bottom .container { + width: 652px; +} +.data-block .row .span12 { + width: 652px; +} +.data-block .row .span11 { + width: 596px; +} +.data-block .row .span10 { + width: 540px; +} +.data-block .row .span9 { + width: 484px; +} +.data-block .row .span8 { + width: 428px; +} +.data-block .row .span7 { + width: 372px; +} +.data-block .row .span6 { + width: 316px; +} +.data-block .row .span5 { + width: 260px; +} +.data-block .row .span4 { + width: 204px; +} +.data-block .row .span3 { + width: 148px; +} +.data-block .row .span2 { + width: 92px; +} +.data-block .row .span1 { + width: 36px; +} +.data-block .row .offset12 { + margin-left: 692px; +} +.data-block .row .offset11 { + margin-left: 636px; +} +.data-block .row .offset10 { + margin-left: 580px; +} +.data-block .row .offset9 { + margin-left: 524px; +} +.data-block .row .offset8 { + margin-left: 468px; +} +.data-block .row .offset7 { + margin-left: 412px; +} +.data-block .row .offset6 { + margin-left: 356px; +} +.data-block .row .offset5 { + margin-left: 300px; +} +.data-block .row .offset4 { + margin-left: 244px; +} +.data-block .row .offset3 { + margin-left: 188px; +} +.data-block .row .offset2 { + margin-left: 132px; +} +.data-block .row .offset1 { + margin-left: 76px; +} +.data-block .row > [class*="span"]:first-child { + margin-left: 0; +} +.data-block .data-container > *:last-child { + margin-bottom: 20px; +} +.data-block .row, +.data-block .row .row, +.data-block .row-fluid { + margin-left: 0; +} +.data-block.span1 [class*="span"], +.data-block.span2 [class*="span"], +.data-block.span3 [class*="span"] { + width: auto; + float: none; + margin: 0 0 20px 0; +} +/* Data blocks */ +.data-block { + position: relative; + margin-bottom: 20px; + color: #525459; +} +.data-block .data-container { + padding: 23px 23px 3px 23px; + background-color: #ffffff; + border: 1px solid #bec2c8; + *zoom: 1; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; +} +.data-block .data-container:before, +.data-block .data-container:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .data-container:after { + clear: both; +} +.data-block .data-container p { + line-height: 160%; +} +.data-block .data-container + .data-container { + margin-top: 20px; +} +.data-block > .data-block { + margin-top: 20px; +} +.data-block.decent .data-container { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} +.data-block.raw { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.raw .data-container { + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.raw.fit { + margin-top: 25px; +} +/* Data block header */ +.data-block header { + border-bottom: 1px solid #dedede; + padding-bottom: 10px; + margin-bottom: 20px; + *zoom: 1; +} +.data-block header:before, +.data-block header:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header:after { + clear: both; +} +.data-block header h1 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 21.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.data-block header h2 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 16.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +/* Data block footer */ +.data-block footer { + text-transform: uppercase; + font-size: 10px; + margin: 23px 0 20px; + color: #a4a5aa; +} +.data-block footer.info, +.data-block footer.warning { + padding-left: 22px; + background-position: left center; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_footer_info.png"); +} +.data-block footer.warning { + background-image: url("../img/icons/icon_footer_warning.png"); +} +.data-block footer p { + font-size: 10px; + line-height: normal; + margin: 0; +} +/* Page header */ +.page-header { + margin: 0 0 40px; + padding-bottom: 0; + border-bottom: none; +} +.page-header h1 { + margin: 0 0 20px; + line-height: normal; +} +/* Hero unit */ +.hero-unit { + margin-bottom: 20px; + -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); +} +.hero-unit h1 { + text-shadow: 0 1px 1px #000; + letter-spacing: normal; +} +/* Buttons */ +.btn { + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.btn.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.btn.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.btn.btn-alt { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); +} +.btn.btn-alt.btn-large { + -webkit-border-radius: 22px; + -moz-border-radius: 22px; + border-radius: 22px; +} +.btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); +} +.btn-group > .btn-alt { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn.btn-alt:first-child { + -webkit-border-top-left-radius: 18px; + -moz-border-radius-topleft: 18px; + border-top-left-radius: 18px; + -webkit-border-bottom-left-radius: 18px; + -moz-border-radius-bottomleft: 18px; + border-bottom-left-radius: 18px; +} +.btn-group > .btn.btn-alt:last-child, +.btn-group > .btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 18px; + -moz-border-radius-topright: 18px; + border-top-right-radius: 18px; + -webkit-border-bottom-right-radius: 18px; + -moz-border-radius-bottomright: 18px; + border-bottom-right-radius: 18px; +} +.btn-group > .btn.btn-large.btn-alt:first-child { + -webkit-border-top-left-radius: 22px; + -moz-border-radius-topleft: 22px; + border-top-left-radius: 22px; + -webkit-border-bottom-left-radius: 22px; + -moz-border-radius-bottomleft: 22px; + border-bottom-left-radius: 22px; +} +.btn-group > .btn.btn-large.btn-alt:last-child, +.btn-group > .btn-large.btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 22px; + -moz-border-radius-topright: 22px; + border-top-right-radius: 22px; + -webkit-border-bottom-right-radius: 22px; + -moz-border-radius-bottomright: 22px; + border-bottom-right-radius: 22px; +} +.btn.btn-flat { + padding: 5px 12px; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e6e6e6; + color: #939699; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat:hover, +.btn.btn-flat:active, +.btn.btn-flat.active, +.btn.btn-flat.disabled, +.btn.btn-flat[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat:active, +.btn.btn-flat.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-primary { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #4986e7; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-primary:hover, +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active, +.btn.btn-flat.btn-primary.disabled, +.btn.btn-flat.btn-primary[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-warning { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #fbb450; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-warning:hover, +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active, +.btn.btn-flat.btn-warning.disabled, +.btn.btn-flat.btn-warning[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-danger { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e74949; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-danger:hover, +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active, +.btn.btn-flat.btn-danger.disabled, +.btn.btn-flat.btn-danger[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-success { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #6b9b20; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-success:hover, +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active, +.btn.btn-flat.btn-success.disabled, +.btn.btn-flat.btn-success[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-info { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #4986e7; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-info:hover, +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active, +.btn.btn-flat.btn-info.disabled, +.btn.btn-flat.btn-info[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-inverse { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #40444d; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-inverse:hover, +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active, +.btn.btn-flat.btn-inverse.disabled, +.btn.btn-flat.btn-inverse[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Tables */ +.table { + margin-bottom: 20px; +} +.table th, +.table td { + border-top: 1px dotted #dedede; +} +.table thead th { + border-bottom: 2px solid #bec2c8; +} +.table tbody th { + border-top: none; + border-right: 2px solid #bec2c8; +} +.table .btn-group { + float: right; + margin: 0; +} +.table.table-striped { + border-bottom: 1px dotted #dedede; +} +.table.table-striped tbody tr:nth-child(2n+1) td, +.table.table-striped tbody tr:nth-child(2n+1) th { + background-color: #f8f8f8; +} +.table.table-bordered { + border-bottom: 1px solid #dedede; +} +.table.table-bordered th, +.table.table-bordered td { + border-top: 1px solid #dedede; +} +.table.table-bordered thead th { + border-bottom: none; +} +.table [class*="span"] { + margin-left: 0; + float: none; +} +.table td.toolbar, +.table th.toolbar { + text-align: right; + padding: 4px; +} +.table td.toolbar .btn-flat, +.table th.toolbar .btn-flat { + padding: 4px 8px; +} +.table td.toolbar > a span, +.table th.toolbar > a span { + margin-top: 4px; +} +.table-media tr td { + vertical-align: middle; +} +.table-media tr td:first-child, +.table-media tr th:first-child { + width: 20px; + text-align: center; +} +.table-media .thumbnail { + display: table-cell; + width: 45px; + border-right: none; + border-bottom: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Forms */ +.data-block input[class*="span"], +.data-block select[class*="span"], +.data-block textarea[class*="span"], +.data-block .uneditable-input[class*="span"], +.data-block .row-fluid input[class*="span"], +.data-block .row-fluid select[class*="span"], +.data-block .row-fluid textarea[class*="span"], +.data-block .row-fluid .uneditable-input[class*="span"] { + float: none; + display: inline-block; + margin-left: 0; +} +form { + margin-bottom: 20px; + background: none; + border: 0px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; +} +legend { + padding: 20px 20px 0; + margin-bottom: 0; + border: none; + width: auto; +} +legend + .control-group { + margin-top: 0; +} +label { + font-weight: bold; + color: #525252; +} +label.radio, +label.checkbox { + font-weight: normal; + color: #525459; +} +.form-inline .control-label { + margin: 10px 0; +} +.form-inline .control-label:first-child { + margin-top: 0; +} +.form-horizontal .control-label { + text-align: left; +} +.form-search input { + margin-right: 5px; +} +.control-group, +.form-horizontal .control-group { + margin: 0; + padding: 20px; + border-bottom: 1px dashed #dedede; +} +.control-group:last-child, +.form-horizontal .control-group:last-child { + border: none; +} +.form-actions { + border: none; + background-color: transparent; + margin: 0; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +select:focus, +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: #bfbfbf; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); +} +input[type="radio"], +input[type="checkbox"] { + margin-top: 3px; +} +.ie8 .input-medium { + width: 110px; +} +.ie8 .input-small { + width: 70px; +} +.ie8 .input-mini { + width: 50px; +} +.ie8 .form-horizontal .control-label { + width: 120px; +} +.ie8 .form-horizontal .controls { + margin-left: 140px; +} +/* Bootstrap File & Image input */ +.btn-file { + position: relative; + overflow: hidden; + vertical-align: middle; +} +.btn-file > input { + position: absolute; + top: 0; + right: 0; + margin: 0; + cursor: pointer; + direction: ltr; + font-size: 23px; + transform: translate(-300px, 0) scale(4); + opacity: 0; + filter: alpha(opacity=0); +} +.fileupload { + padding-left: 0; + margin-bottom: 20px; +} +.fileupload h4 { + margin: 0 0 10px; +} +.fileupload .thumbnail { + display: inline-block; + margin-bottom: 5px; + overflow: hidden; + text-align: center; + vertical-align: middle; + background-color: #ffffff; +} +.fileupload .thumbnail > img { + display: block; + max-height: 100%; + vertical-align: middle; +} +.fileupload .thumbnail.fileupload-small { + width: 50px; + height: 50px; +} +.fileupload .thumbnail.fileupload-small.flexible { + width: auto; + height: auto; + max-width: 75px; + max-height: 75px; +} +.fileupload .thumbnail.fileupload-large { + width: 250px; + height: 150px; +} +.fileupload .thumbnail.fileupload-large.flexible { + width: auto; + height: auto; + max-width: 350px; + max-height: 250px; +} +.fileupload .thumbnail + .btn { + margin-bottom: 5px; +} +.fileupload .thumbnail + .btn + .btn { + margin-bottom: 5px; +} +.fileupload .raw.thumbnail { + padding: 0; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.fileupload .btn { + vertical-align: middle; +} +.fileupload .uneditable-input { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + cursor: text; +} +.fileupload-exists .fileupload-new, +.fileupload-new .fileupload-exists { + display: none; +} +.fileupload-new .input-append .btn-file { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.fileupload-exists .input-append .btn-file { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Form gallery */ +.form-gallery { + background: none; + border: none; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.form-gallery li input[type="checkbox"] { + margin: 0; + position: absolute; + top: 10px; + left: 10px; +} +.form-gallery .thumbnails .thumbnail { + background-color: #ffffff; +} +.form-gallery .thumbnails .thumbnail.active { + border-color: #4986e7; + background-color: #76a4ed; +} +.form-gallery .form-actions { + padding: 0; + margin: 0; + border: none; + background: none; +} +.form-gallery .form-actions [class*="span"] { + margin-bottom: 0; +} +/* Gallery */ +.thumbnails .row { + margin-left: -20px; + *zoom: 1; +} +.thumbnails .row:before, +.thumbnails .row:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails .row:after { + clear: both; +} +.thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.thumbnails .container, +.thumbnails .navbar-static-top .container, +.thumbnails .navbar-fixed-top .container, +.thumbnails .navbar-fixed-bottom .container { + width: 640px; +} +.thumbnails .span12 { + width: 640px; +} +.thumbnails .span11 { + width: 585px; +} +.thumbnails .span10 { + width: 530px; +} +.thumbnails .span9 { + width: 475px; +} +.thumbnails .span8 { + width: 420px; +} +.thumbnails .span7 { + width: 365px; +} +.thumbnails .span6 { + width: 310px; +} +.thumbnails .span5 { + width: 255px; +} +.thumbnails .span4 { + width: 200px; +} +.thumbnails .span3 { + width: 145px; +} +.thumbnails .span2 { + width: 90px; +} +.thumbnails .span1 { + width: 35px; +} +.thumbnails .offset12 { + margin-left: 680px; +} +.thumbnails .offset11 { + margin-left: 625px; +} +.thumbnails .offset10 { + margin-left: 570px; +} +.thumbnails .offset9 { + margin-left: 515px; +} +.thumbnails .offset8 { + margin-left: 460px; +} +.thumbnails .offset7 { + margin-left: 405px; +} +.thumbnails .offset6 { + margin-left: 350px; +} +.thumbnails .offset5 { + margin-left: 295px; +} +.thumbnails .offset4 { + margin-left: 240px; +} +.thumbnails .offset3 { + margin-left: 185px; +} +.thumbnails .offset2 { + margin-left: 130px; +} +.thumbnails .offset1 { + margin-left: 75px; +} +.thumbnails li { + margin: 0; + position: relative; + margin-bottom: 20px; + margin-left: 20px; +} +.thumbnails li .thumbnail-actions { + margin: 0; + display: block; + position: absolute; + bottom: 10px; + right: 10px; + font-size: 11.049999999999999px; + list-style: none; + color: #ffffff; + background-color: #4986e7; + opacity: 0; + filter: alpha(opacity=0); +} +.thumbnails li .thumbnail-actions li { + margin: 0; + display: inline-block; +} +.thumbnails li .thumbnail-actions li a { + padding: 2px 4px 3px; + display: block; + color: #ffffff; + opacity: 0.8; + filter: alpha(opacity=80); +} +.thumbnails li .thumbnail-actions li a:hover { + opacity: 1; + filter: alpha(opacity=100); + text-decoration: none; +} +.thumbnails li:hover .thumbnail-actions { + opacity: 0.85; + filter: alpha(opacity=85); +} +.thumbnail + p { + margin-top: 20px; +} +.data-block .thumbnails { + margin-bottom: 0; +} +.data-block .thumbnails.row-fluid { + margin-left: 0; +} +.data-block .thumbnails .thumbnail { + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block .thumbnails.raw .thumbnail { + border: none; + padding: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); +} +.data-block.raw .thumbnails { + margin-left: auto; + margin-right: auto; +} +.data-block.raw section > * + .thumbnails { + margin-top: 20px; +} +/* Icons */ +[class^="awe-"], +[class*=" awe-"] { + height: auto; + width: auto; + line-height: normal; + vertical-align: middle; + background-image: none; + padding-right: 7px; +} +/* Alerts */ +.alert h4 { + margin: 0; +} +.alert.alert-white { + background-color: #ffffff; + border-color: #dedede; + color: #525459; +} +.alert.alert-inverse { + background-color: #40444d; + border-color: #000; + color: #ffffff; + text-shadow: none; +} +.alert.alert-inverse .close { + color: white; +} +.raw .alert { + -webkit-box-shadow: '0 1px 0 #fff'; + -moz-box-shadow: '0 1px 0 #fff'; + box-shadow: '0 1px 0 #fff'; +} +form .alert { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Accordion */ +.data-block section .accordion .accordion-group { + margin: 0; + border-color: #dedede; + border-width: 0 1px 1px 1px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block section .accordion .accordion-group:first-child { + border-width: 1px; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.data-block section .accordion .accordion-group:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.data-block section .accordion .accordion-toggle { + font-weight: bold; + font-size: 16px; + color: #525252; +} +.data-block section .accordion .accordion-toggle:hover { + color: #4986e7; + text-decoration: none; +} +.data-block.raw .accordion-toggle { + background-color: #ffffff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block.raw .accordion-toggle:hover { + background-color: #4986e7; + color: #ffffff; + text-decoration: none; +} +.accordion .collapse { + overflow: hidden; +} +/* Progress bars */ +.progress { + margin-bottom: 10px; + background-image: none; + border: 1px solid #e0e0e0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.progress:last-child { + margin-bottom: 0; +} +.progress .bar:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.progress.progress-line { + height: 9px; +} +.progress-inverse .bar { + background-color: #484d54; + background-image: -moz-linear-gradient(top, #565c64, #33363b); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#565c64), to(#33363b)); + background-image: -webkit-linear-gradient(top, #565c64, #33363b); + background-image: -o-linear-gradient(top, #565c64, #33363b); + background-image: linear-gradient(to bottom, #565c64, #33363b); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff565c64', endColorstr='#ff33363b', GradientType=0); +} +.progress-inverse.progress-striped .bar { + background-color: #565c64; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +/* Pagination */ +.pagination { + height: auto; +} +.pagination ul { + margin-top: -5px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + *zoom: 1; +} +.pagination ul:before, +.pagination ul:after { + display: table; + content: ""; + line-height: 0; +} +.pagination ul:after { + clear: both; +} +.pagination ul li { + display: block; + float: left; + margin-top: 5px; + margin-right: 4px; +} +.pagination ul li:first-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li:last-child { + margin-right: 0; +} +.pagination ul li:last-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li a { + border-width: 1px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + line-height: 24px; + padding: 0 10px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pagination ul li.disabled > span, +.pagination ul li.disabled a, +.pagination ul li.disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pagination ul li a:hover, +.pagination ul li.active a { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.pagination ul li [class^="awe-"], +.pagination ul li [class*=" awe-"], +.pagination ul li [class^="icon-"], +.pagination ul li [class*=" icon-"], +.pagination ul li [class^="fam-"], +.pagination ul li [class*=" fam-"] { + float: none; + border: none; + padding: 0; + background-color: transparent; + line-height: 0; +} +.pager .disabled a, +.pager .disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pager li > a { + padding: 4px 14px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pager li > a:hover { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +/* Tabs */ +.nav-tabs > li { + margin-bottom: 0; +} +.tabs-left .tab-content { + margin: 0; + padding-left: 20px; + border-left: 1px solid #dedede; +} +.tabs-left > .nav-tabs { + border-right: 1px solid #dedede; + margin-right: -1px; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + color: #4986e7; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-left > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: transparent #dedede transparent transparent; + background-color: #ffffff; + color: #4986e7; +} +.tabs-right .tab-content { + padding-right: 20px; + border-right: 1px solid #dedede; +} +.tabs-right > .nav-tabs { + border-left: 1px solid #dedede; + margin-left: -1px; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + color: #4986e7; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-right > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: transparent transparent transparent #dedede; + background-color: #ffffff; + color: #4986e7; +} +.tab-content { + overflow: visible; +} +.tabbable .tab-content { + overflow: auto; +} +/* Popover */ +.popover .popover-title { + margin: 0; +} +/* Modal */ +.modal .modal-header * { + margin: 0; +} +.modal .modal-header > .close { + margin-top: 2px; +} +/* Loading */ +.loading { + display: inline-block; + background-image: url("../img/icons/loading_blue.gif"); + background-repeat: no-repeat; + background-position: center; + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + width: 24px; + height: 24px; +} +.loading.dark { + background-image: url("../img/icons/loading_dark.gif"); +} +.loading.red { + background-image: url("../img/icons/loading_red.gif"); +} +.loading.green { + background-image: url("../img/icons/loading_green.gif"); +} +.loading.blue { + background-image: url("../img/icons/loading_blue.gif"); +} +/* Data block components */ +/* Data block header controls */ +.data-block header h2 + .btn, +.data-block header h2 + .btn-group, +.data-block header .data-header-actions { + float: right; + margin: -5px 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.data-block header h2 + .btn:before, +.data-block header h2 + .btn-group:before, +.data-block header .data-header-actions:before, +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + clear: both; +} +.data-block header h2 + .btn li, +.data-block header h2 + .btn-group li, +.data-block header .data-header-actions li { + float: left; + display: block; +} +.data-block header h2 + .btn li + li, +.data-block header h2 + .btn-group li + li, +.data-block header .data-header-actions li + li { + margin-left: 5px; +} +.data-block header h2 + .btn li.active .btn, +.data-block header h2 + .btn-group li.active .btn, +.data-block header .data-header-actions li.active .btn { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-primary { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-warning { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-danger { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-success, +.data-block header .data-header-actions li.active .btn.btn-success { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-info, +.data-block header .data-header-actions li.active .btn.btn-info { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-inverse { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat, +.data-block header h2 + .btn-group li.active .btn.btn-flat, +.data-block header .data-header-actions li.active .btn.btn-flat { + background-color: #d9d9d9; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-primary { + background-color: #1b5ec9; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-warning { + background-color: #f89406; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-danger { + background-color: #c91b1b; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-success, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-success { + background-color: #3f5c13; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-info, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-info { + background-color: #1b5ec9; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-inverse { + background-color: #1d1f23; +} +.data-block header h2 + .btn li.active .btn.btn-alt, +.data-block header h2 + .btn-group li.active .btn.btn-alt, +.data-block header .data-header-actions li.active .btn.btn-alt { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-success, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-info, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.data-block header h2 + .btn li .loading, +.data-block header h2 + .btn-group li .loading, +.data-block header .data-header-actions li .loading { + display: block; +} +.data-block.raw header .data-header-actions { + margin: 0; +} +/* Data block header search */ +.data-block header .header-search { + display: inline; + float: right; + background-color: transparent; + border: none; + margin: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block header .header-search input { + margin: 0; + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Data accordion block */ +.data-block.accordion-block .accordion { + margin-bottom: 0; +} +.data-block.accordion-block .data-container { + padding: 0; +} +.data-block.accordion-block .accordion-group { + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.accordion-block .accordion-group + .accordion-group { + border-top: 1px solid #e5e5e5; +} +.data-block.accordion-block .accordion-toggle { + color: #525252; + font-size: 16px; + font-weight: bold; + line-height: normal; +} +.data-block.accordion-block .accordion-toggle:hover { + color: #4986e7; + text-decoration: none; +} +/* Data todo block */ +.data-block.todo-block header { + margin-bottom: 0; +} +.data-block.todo-block form { + margin: 0; + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.todo-block table { + margin: 0; +} +.data-block.todo-block table tr:first-child td { + border-top: 0; +} +.data-block.todo-block table tr.done { + opacity: 0.4; + filter: alpha(opacity=40); +} +.data-block.todo-block table tr.done p { + text-decoration: line-through; +} +.data-block.todo-block table tr.done:hover { + opacity: 1; + filter: alpha(opacity=100); +} +.data-block.todo-block table tr p { + margin: 0; + line-height: normal; +} +.data-block.todo-block table tr p + span { + font-size: 9.75px; + color: #a4a5aa; +} +.data-block.todo-block table tr input { + margin-top: 0; +} +/* Wizard */ +.wizard { + overflow: visible; +} +.wizard .stepContainer { + display: block; + position: relative; + overflow: hidden; + height: 100%; +} +.wizard .stepContainer > div.content { + margin: 0; + padding: 20px; + display: block; + position: absolute; + text-align: left; + overflow: visible; + z-index: 88; +} +.wizard .stepContainer .StepTitle { + display: block; + z-index: 88; + *zoom: 1; +} +.wizard .stepContainer .StepTitle:before, +.wizard .stepContainer .StepTitle:after { + display: table; + content: ""; + line-height: 0; +} +.wizard .stepContainer .StepTitle:after { + clear: both; +} +.wizard ul.anchor { + margin: 0 0 10px; + text-align: center; + background-color: #f5f5f5; + border: 1px solid #dedede; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.wizard ul.anchor li { + margin-left: 20px; + display: inline-block; +} +.wizard ul.anchor li:first-child { + margin: 0; +} +.wizard ul.anchor li a { + display: block; + font-size: 15px; + line-height: 36px; + text-decoration: none; + outline-style: none; + *zoom: 1; + z-index: 99; +} +.wizard ul.anchor li a:before, +.wizard ul.anchor li a:after { + display: table; + content: ""; + line-height: 0; +} +.wizard ul.anchor li a:after { + clear: both; +} +.wizard ul.anchor li a.selected { + color: #4986e7; + cursor: text; +} +.wizard ul.anchor li a.done { + color: #4986e7; + text-decoration: line-through; +} +.wizard ul.anchor li a.done .stepDesc { + color: #4986e7; +} +.wizard ul.anchor li a.disabled { + color: #939699; + cursor: text; +} +.wizard > div.actionBar { + margin-top: 6.666666666666667px; + display: block; + text-align: left; + overflow: auto; + z-index: 88; + *zoom: 1; +} +.wizard > div.actionBar:before, +.wizard > div.actionBar:after { + display: table; + content: ""; + line-height: 0; +} +.wizard > div.actionBar:after { + clear: both; +} +.wizard .buttonDisabled { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + cursor: text !important; +} +.wizard .buttonNext, +.wizard .buttonPrevious, +.wizard .buttonFinish { + display: block; + text-decoration: none; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + *background-color: #e6e6e6; + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #cccccc \9; +} +.wizard .buttonNext:first-child, +.wizard .buttonPrevious:first-child, +.wizard .buttonFinish:first-child { + *margin-left: 0; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.wizard .buttonNext .label, +.wizard .buttonPrevious .label, +.wizard .buttonFinish .label, +.wizard .buttonNext .badge, +.wizard .buttonPrevious .badge, +.wizard .buttonFinish .badge { + position: relative; + top: -1px; +} +.wizard .buttonNext [class^="awe-"], +.wizard .buttonPrevious [class^="awe-"], +.wizard .buttonFinish [class^="awe-"], +.wizard .buttonNext [class*=" awe-"], +.wizard .buttonPrevious [class*=" awe-"], +.wizard .buttonFinish [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.wizard .buttonNext [class^="awe-"].awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-large, +.wizard .buttonFinish [class^="awe-"].awe-large, +.wizard .buttonNext [class*=" awe-"].awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-large { + line-height: .9em; +} +.wizard .buttonNext [class^="awe-"].awe-spin, +.wizard .buttonPrevious [class^="awe-"].awe-spin, +.wizard .buttonFinish [class^="awe-"].awe-spin, +.wizard .buttonNext [class*=" awe-"].awe-spin, +.wizard .buttonPrevious [class*=" awe-"].awe-spin, +.wizard .buttonFinish [class*=" awe-"].awe-spin { + display: inline-block; +} +.wizard .buttonNext [class^="awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-left.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonNext [class^="awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-right.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.wizard .buttonNext [class^="awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class^="awe-"].awe-spin.awe-large, +.wizard .buttonNext [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.wizard .buttonNext.btn-mini, +.wizard .buttonPrevious.btn-mini, +.wizard .buttonFinish.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.wizard .buttonNext.btn-small, +.wizard .buttonPrevious.btn-small, +.wizard .buttonFinish.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.wizard .buttonNext.btn-large, +.wizard .buttonPrevious.btn-large, +.wizard .buttonFinish.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #1d38e0 \9; +} +.wizard .buttonNext .caret, +.wizard .buttonPrevious .caret, +.wizard .buttonFinish .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.wizard .buttonNext { + float: right; + margin-right: 5px; +} +.wizard .buttonPrevious { + float: left; +} +.wizard .buttonFinish { + float: right; +} +.wizard .loader { + position: relative; + display: none; + float: left; + margin: 2px 0 0 2px; + padding: 8px 10px 8px 40px; + z-index: 998; +} +/* Widgets */ +.widgets { + text-align: center; + list-style: none; + *zoom: 1; +} +.widgets:before, +.widgets:after { + display: table; + content: ""; + line-height: 0; +} +.widgets:after { + clear: both; +} +.widgets > li { + min-height: 90px; + text-align: center; + border-right: 1px dotted #dedede; +} +.widgets > li:last-child { + border-right: none; +} +.widgets > li > a .widget-label { + color: #999999; +} +.widgets > li > a:hover { + text-decoration: none; +} +.widgets > li > a:hover strong { + color: #4986e7; +} +.widgets > li .widget-label { + display: block; + margin: 20px 0 5px; + color: #999999; + text-transform: uppercase; +} +.widgets > li strong { + display: block; + color: #525252; + font-size: 19px; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline { + display: block; + margin: 5px auto; +} +.widgets > li .sparkline canvas { + display: block !important; + margin: 0 auto; +} +.widgets > li .sparkline + strong, +.widgets > li .sparkline + a { + color: #525252; + font-size: 13px; + font-weight: normal; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline + a:hover { + color: #4986e7; +} +.ie8 .widgets [class*="span"] { + margin: 0; + width: 150px; +} +.filter-bar .form-inline { + margin-bottom: 0; +} +.filter-bar .form-inline .control-group, +.filter-bar .form-inline .controls { + display: inline-block; +} +.filter-bar .form-inline .control-group { + border-bottom: none; + border-right: 1px dashed #dedede; +} +.filter-bar .form-inline .control-group:last-child { + border-right: none; +} +.filter-bar .form-inline .note-inline { + margin-left: 10px; +} +.filter-bar .form-inline .note-inline:first-child { + margin-left: 0; +} +.filter-bar .form-inline .control-label { + margin: 0 10px 0 0; +} +.filter-bar .form-inline .input-mini { + width: 30px; +} +.breadcrumb { + padding: 0; +} +/* Plugins */ +.has-switch { + display: inline-block; + cursor: pointer; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + min-width: 100px; +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch > div.switch-off { + left: -49%; +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch span.switch-mini, +.has-switch label.switch-mini { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch span.switch-small, +.has-switch label.switch-small { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch span.switch-large, +.has-switch label.switch-large { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch label { + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 34%; + border-left: 1px solid #bbbbbb; + border-right: 1px solid #bbbbbb; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch label:hover, +.has-switch label:focus, +.has-switch label:active, +.has-switch label.active, +.has-switch label.disabled, +.has-switch label[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.has-switch label:active, +.has-switch label.active { + background-color: #cccccc \9; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33%; +} +.has-switch span.switch-left { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.has-switch span.switch-right { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-right:hover, +.has-switch span.switch-right:focus, +.has-switch span.switch-right:active, +.has-switch span.switch-right.active, +.has-switch span.switch-right.disabled, +.has-switch span.switch-right[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-right:active, +.has-switch span.switch-right.active { + background-color: #e6e6e6 \9; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #496ee7; + background-image: -moz-linear-gradient(top, #495fe7, #4986e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#495fe7), to(#4986e7)); + background-image: -webkit-linear-gradient(top, #495fe7, #4986e7); + background-image: -o-linear-gradient(top, #495fe7, #4986e7); + background-image: linear-gradient(to bottom, #495fe7, #4986e7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff495fe7', endColorstr='#ff4986e7', GradientType=0); + border-color: #4986e7 #4986e7 #1b5ec9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4986e7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-primary:hover, +.has-switch span.switch-left:hover, +.has-switch span.switch-primary:focus, +.has-switch span.switch-left:focus, +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active, +.has-switch span.switch-primary.disabled, +.has-switch span.switch-left.disabled, +.has-switch span.switch-primary[disabled], +.has-switch span.switch-left[disabled] { + color: #ffffff; + background-color: #4986e7; + *background-color: #3277e4; +} +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active { + background-color: #1d68e0 \9; +} +.has-switch span.switch-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #496ee7; + background-image: -moz-linear-gradient(top, #495fe7, #4986e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#495fe7), to(#4986e7)); + background-image: -webkit-linear-gradient(top, #495fe7, #4986e7); + background-image: -o-linear-gradient(top, #495fe7, #4986e7); + background-image: linear-gradient(to bottom, #495fe7, #4986e7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff495fe7', endColorstr='#ff4986e7', GradientType=0); + border-color: #4986e7 #4986e7 #1b5ec9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4986e7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-info:hover, +.has-switch span.switch-info:focus, +.has-switch span.switch-info:active, +.has-switch span.switch-info.active, +.has-switch span.switch-info.disabled, +.has-switch span.switch-info[disabled] { + color: #ffffff; + background-color: #4986e7; + *background-color: #3277e4; +} +.has-switch span.switch-info:active, +.has-switch span.switch-info.active { + background-color: #1d68e0 \9; +} +.has-switch span.switch-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #59821b; + background-image: -moz-linear-gradient(top, #4e7117, #6b9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e7117), to(#6b9b20)); + background-image: -webkit-linear-gradient(top, #4e7117, #6b9b20); + background-image: -o-linear-gradient(top, #4e7117, #6b9b20); + background-image: linear-gradient(to bottom, #4e7117, #6b9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e7117', endColorstr='#ff6b9b20', GradientType=0); + border-color: #6b9b20 #6b9b20 #3f5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #6b9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-success:hover, +.has-switch span.switch-success:focus, +.has-switch span.switch-success:active, +.has-switch span.switch-success.active, +.has-switch span.switch-success.disabled, +.has-switch span.switch-success[disabled] { + color: #ffffff; + background-color: #6b9b20; + *background-color: #5c861c; +} +.has-switch span.switch-success:active, +.has-switch span.switch-success.active { + background-color: #4e7117 \9; +} +.has-switch span.switch-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f9a123; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0); + border-color: #fbb450 #fbb450 #f89406; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #fbb450; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-warning:hover, +.has-switch span.switch-warning:focus, +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active, +.has-switch span.switch-warning.disabled, +.has-switch span.switch-warning[disabled] { + color: #ffffff; + background-color: #fbb450; + *background-color: #faa937; +} +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active { + background-color: #fa9f1e \9; +} +.has-switch span.switch-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e32f2f; + background-image: -moz-linear-gradient(top, #e01d1d, #e74949); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e01d1d), to(#e74949)); + background-image: -webkit-linear-gradient(top, #e01d1d, #e74949); + background-image: -o-linear-gradient(top, #e01d1d, #e74949); + background-image: linear-gradient(to bottom, #e01d1d, #e74949); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe01d1d', endColorstr='#ffe74949', GradientType=0); + border-color: #e74949 #e74949 #c91b1b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e74949; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-danger:hover, +.has-switch span.switch-danger:focus, +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active, +.has-switch span.switch-danger.disabled, +.has-switch span.switch-danger[disabled] { + color: #ffffff; + background-color: #e74949; + *background-color: #e43232; +} +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active { + background-color: #e01d1d \9; +} +/* jQuery FullCalendar */ +.full-calendar .fc-header { + margin-bottom: 10px; +} +.full-calendar .fc-header h2 { + margin: 0; +} +.full-calendar .fc-content { + background-color: #FFFBEA; +} +.full-calendar .fc-button.fc-state-default { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.full-calendar .fc-button.fc-state-default:hover, +.full-calendar .fc-button.fc-state-default:focus, +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active, +.full-calendar .fc-button.fc-state-default.disabled, +.full-calendar .fc-button.fc-state-default[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-active { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-image: none; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + outline: 0; +} +.full-calendar .fc-button.fc-state-active:hover, +.full-calendar .fc-button.fc-state-active:focus, +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active, +.full-calendar .fc-button.fc-state-active.disabled, +.full-calendar .fc-button.fc-state-active[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-disabled { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + cursor: default; + background-image: none; + background-color: #e6e6e6; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-state-disabled:active { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-corner-left { + margin-left: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -moz-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.full-calendar .fc-button.fc-corner-right { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + -moz-border-bottom-right-radius: 3px; + -moz-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.full-calendar .fc-state-default .fc-button-inner { + background: transparent; + border-width: 0; +} +.full-calendar .fc-button-content { + line-height: 18px; + height: 18px; + padding: 0; +} +.full-calendar .fc-state-default .fc-button-effect span { + display: none; +} +.full-calendar .fc-state-default, +.full-calendar .fc-state-default .fc-button-inner { + color: #525459; +} +.full-calendar .fc-state-active .fc-button-inner { + color: #525459; +} +.full-calendar .fc-button-content [class^="awe-"], +.full-calendar .fc-button-content [class*=" awe-"] { + font-size: 15px; +} +.full-calendar .fc-state-highlight { + background-color: #ffffff; +} +.full-calendar .fc-widget-header, +.full-calendar .fc-widget-content { + border-color: #dedacb; +} +.full-calendar .fc-widget-header { + padding: 5px 0; + color: #665B4C; +} +/* jQuery FullCalendar event style */ +.full-calendar .fc-event { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar a.fc-event:hover { + text-decoration: none; +} +.full-calendar .fc-event-skin { + border: none; + background-color: #4986e7; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar .fc-event-skin > span:first-child { + margin-left: 3px; +} +/* jQuery Visualize */ +.visualize { + margin: 50px auto 30px; + margin-bottom: 30px !important; + background-color: transparent; + border: none; + width: 100%; +} +.visualize.visualize-pie { + margin-bottom: 0 !important; +} +.visualize .visualize-info { + border: none; + padding: 0; + font-size: 11.049999999999999px; + right: auto; + left: -10px; + top: -48px; + background-color: transparent; + opacity: 1; + filter: alpha(opacity=100); +} +.visualize .visualize-title { + font-weight: bold; + margin-bottom: 0; + color: #525252; +} +p + table + .visualize { + margin-top: 70px; +} +.visualize .label { + padding: 0; + background-color: transparent; + font-size: 9.75px; + font-weight: normal; + line-height: 14px; + text-shadow: none; + color: #999999; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; +} +.content .page-container [class*="span"] .visualize { + margin: 20px 0 20px auto; +} +.ie8 .visualize-interaction-tracker { + margin-top: 0 !important; +} +/* jQuery Flot */ +.flot { + margin: 10px auto; + min-height: 280px; + height: 280px; +} +.flot .legend { + padding: 0 2px; +} +.modal-open { + overflow: hidden; +} +.modal-open.page-overflow .page-container, +.modal-open.page-overflow .page-container .navbar-fixed-top, +.modal-open.page-overflow .page-container .navbar-fixed-bottom, +.modal-open.page-overflow .modal-scrollable { + overflow-y: scroll; +} +.modal-scrollable { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + overflow: auto; +} +.modal { + outline: none; + position: absolute; + margin-top: 0; + top: 50%; + overflow: visible; +} +.modal.fade { + top: -100%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; +} +.modal.fade.in { + top: 50%; +} +.modal.container { + width: 940px; + margin-left: -470px; +} +.modal.modal-absolute { + position: absolute; + z-index: 950; +} +.modal .loading-mask { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fff; + border-radius: 6px; +} +.modal-body { + max-height: none; + overflow: visible; +} +.modal-backdrop.modal-absolute { + position: absolute; + z-index: 940; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.7; + filter: alpha(opacity=70); + background: #000; +} +.modal-overflow.modal { + top: 1%; +} +.modal-overflow.modal.fade { + top: -100%; +} +.modal-overflow.modal.fade.in { + top: 1%; +} +.modal-overflow .modal-body { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +@media (min-width: 1200px) { + .modal.container { + width: 1170px; + margin-left: -585px; + } +} +@media (max-width: 979px) { + .modal-open.page-overflow .page-container .navbar-fixed-top, + .modal-open.page-overflow .page-container .navbar-fixed-bottom { + overflow-y: visible; + } + .modal, + .modal.container, + .modal.modal-overflow { + top: 1%; + right: 1%; + left: 1%; + bottom: auto; + width: auto !important; + height: auto !important; + margin: 0 !important; + padding: 0 !important; + } + .modal.fade.in, + .modal.container.fade.in, + .modal.modal-overflow.fade.in { + top: 1%; + bottom: auto; + } + .modal-body, + .modal-overflow .modal-body { + position: static; + margin: 0; + height: auto !important; + max-height: none !important; + overflow: visible !important; + } + .modal-footer, + .modal-overflow .modal-footer { + position: static; + } +} +.loading-spinner { + position: absolute; + top: 50%; + left: 50%; + margin: -12px 0 0 -12px; +} +.animated { + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} +@-webkit-keyframes shake { + 0%, + 100% { + -webkit-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + } +} +@-moz-keyframes shake { + 0%, + 100% { + -moz-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -moz-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -moz-transform: translateX(10px); + } +} +@-o-keyframes shake { + 0%, + 100% { + -o-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -o-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -o-transform: translateX(10px); + } +} +@keyframes shake { + 0%, + 100% { + transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + transform: translateX(10px); + } +} +.shake { + -webkit-animation-name: shake; + -moz-animation-name: shake; + -o-animation-name: shake; + animation-name: shake; +} +.elfinder { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.elfinder .elfinder-navbar { + height: 100%; + background: #f5f5f5; + border-color: #dedede; +} +.elfinder .elfinder-navbar .ui-state-hover { + background: transparent; + border-color: transparent; +} +.elfinder .elfinder-navbar .ui-state-active { + color: #ffffff; + background: #a6a6a6; + border-color: #999999; +} +.elfinder .elfinder-button-search.elfinder-button { + width: 192px; + margin: 0; +} +.elfinder .elfinder-button-search.elfinder-button input { + margin: 0; + padding-left: 20px; +} +.elfinder .elfinder-button-search.elfinder-button .ui-icon-close { + margin-right: 6.666666666666667px; +} +.elfinder .elfinder-statusbar { + color: #555555; +} +.elfinder .elfinder-statusbar a { + text-decoration: none; + color: #555555; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder .elfinder-cwd table td.ui-state-hover, +.elfinder .elfinder-button-menu .ui-state-hover { + color: #ffffff; + background: #4986e7; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover { + background: #eeeeee; +} +.elfinder .elfinder-cwd table tr { + border-top: 1px dotted #dedede; +} +.elfinder .elfinder-cwd table tr:nth-child(odd) { + background-color: #f8f8f8; +} +.elfinder-disabled .elfinder-navbar .ui-state-active { + color: #eeeeee; + background: #bfbfbf; + border-color: #b3b3b3; +} +.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder-disabled .elfinder-cwd table td.ui-state-hover { + background: #bfbfbf; +} +.elfinder-contextmenu .ui-state-hover { + background: #3875d7; + color: #fff; +} +.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow { + background-image: url('../img/arrows-active.png'); +} +#elfinder .elfinder-cwd-view-icons .elfinder-cwd-file { + width: 120px; + height: 95px; +} +.elfinder { + border-color: #dedede; +} +.elfinder .ui-widget-header { + background: #f5f5f5; + border-color: #dedede; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +/* jQuery DataTables */ +.dataTables_wrapper > .row:first-child, +.dataTables_wrapper > .row-fluid:first-child { + margin-bottom: 10px; +} +.dataTables_wrapper .row [class*="span"], +.dataTables_wrapper .row-fluid [class*="span"] { + margin-bottom: 0; +} +.dataTables_wrapper table.table { + clear: both; + margin-bottom: 10px; +} +.dataTables_wrapper div.dataTables_length label { + float: left; + text-align: left; +} +.dataTables_wrapper div.dataTables_length select { + width: 75px; +} +.dataTables_wrapper div.dataTables_filter label { + float: right; +} +.dataTables_wrapper .dataTables_paginate { + margin: 0; + float: right; +} +.dataTables_wrapper table thead .sorting, +.dataTables_wrapper table thead .sorting_asc, +.dataTables_wrapper table thead .sorting_desc, +.dataTables_wrapper table thead .sorting_asc_disabled, +.dataTables_wrapper table thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} +.dataTables_wrapper table.table thead .sorting { + background-image: url("../img/plugins/dataTables/sort_both.png"); +} +.dataTables_wrapper table.table thead .sorting_asc { + background-image: url("../img/plugins/dataTables/sort_asc.png"); +} +.dataTables_wrapper table.table thead .sorting_desc { + background-image: url("../img/plugins/dataTables/sort_desc.png"); +} +.dataTables_wrapper table.table thead .sorting_asc_disabled { + background-image: url("../img/plugins/dataTables/sort_asc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-image: url("../img/plugins/dataTables/sort_desc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting, +.dataTables_wrapper table.table thead .sorting_asc, +.dataTables_wrapper table.table thead .sorting_desc, +.dataTables_wrapper table.table thead .sorting_asc_disabled, +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-position: center right; + background-repeat: no-repeat; +} +.dataTables_wrapper table.dataTable th:active { + outline: none; +} +.dataTables_wrapper .dataTables_info { + margin-top: 10px; +} +/* jQuery DataTable filter */ +.datatable-controls li { + padding: 3px 15px; +} +/* jQuery Snippet */ +.snippet-container pre .snippet-num, +.snippet-container .snippet-wrap .snippet-num { + margin: 0; +} +.snippet-container pre pre.sh_sourceCode, +.snippet-container .snippet-wrap pre.sh_sourceCode { + margin: 0; + border: 1px solid #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.snippet-container .snippet-menu pre { + border: none; +} +/* jQuery Tags Input */ +div.tagsinput { + padding: 0; + margin: 0; + width: auto !important; + height: auto !important; + color: #555555; + background-color: transparent; + border: none; + -webkit-transition: 'border linear .2s, box-shadow linear .2s'; + -moz-transition: 'border linear .2s, box-shadow linear .2s'; + -o-transition: 'border linear .2s, box-shadow linear .2s'; + transition: 'border linear .2s, box-shadow linear .2s'; +} +div.tagsinput.focused { + outline: 0; + border-color: rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); +} +div.tagsinput span.tag { + text-shadow: none; + line-height: normal; + padding: 4px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: #4986e7; + border-color: #4986e7; + color: #ffffff; +} +div.tagsinput span.tag a { + color: #ffffff; + opacity: 0.5; + filter: alpha(opacity=50); +} +div.tagsinput span.tag a:hover { + opacity: 1; + filter: alpha(opacity=100); +} +div.tagsinput input { + margin: 0; +} +/* jQuery jWYSIWYG */ +div.wysiwyg { + background: none; + width: auto !important; + border: none; +} +div.wysiwyg .toolbar-container { + padding: 5px; +} +div.wysiwyg iframe { + margin-top: 10px; + background-color: #ffffff; + width: 100% !important; + min-height: 250px; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.wysiwyg ul.toolbar { + margin-bottom: 0; + border: none; +} +div.wysiwyg ul.toolbar li { + background-image: url("../img/plugins/jWYSIWYG/jquery.wysiwyg.gif"); +} +/* Bootstrap wysihtml5 */ +.wysihtml5 { + width: 95% !important; +} +ul.wysihtml5-toolbar { + margin-bottom: 0; +} +.wysihtml5-sandbox { + margin-bottom: 0 !important; +} +/* jQuery jGrowl */ +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + color: #ffffff; + background-color: #40444d; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + opacity: 0.9; + filter: alpha(opacity=90); +} +div.jGrowl div.jGrowl-closer { + opacity: 0.35; + filter: alpha(opacity=35); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.jGrowl div.jGrowl-closer:hover { + opacity: 0.9; + filter: alpha(opacity=90); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); +} +div.jGrowl div.primary { + background-color: #4986e7; + color: #ffffff; +} +div.jGrowl div.primary a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.primary a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.danger { + background-color: #e74949; + color: #ffffff; +} +div.jGrowl div.danger a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.danger a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.info { + background-color: #4986e7; + color: #ffffff; +} +div.jGrowl div.info a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.info a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.success { + background-color: #6b9b20; + color: #ffffff; +} +div.jGrowl div.success a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.success a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +/* Color picker */ +.colorpicker-saturation { + width: 100px; + height: 100px; + background-image: url("../img/plugins/colorpicker/saturation.png"); + cursor: crosshair; + float: left; +} +.colorpicker-saturation i { + display: block; + height: 5px; + width: 5px; + border: 1px solid #000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + position: absolute; + top: 0; + left: 0; + margin: -4px 0 0 -4px; +} +.colorpicker-saturation i b { + display: block; + height: 5px; + width: 5px; + border: 1px solid #fff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.colorpicker-hue, +.colorpicker-alpha { + width: 15px; + height: 100px; + float: left; + cursor: row-resize; + margin-left: 4px; + margin-bottom: 4px; +} +.colorpicker-hue i, +.colorpicker-alpha i { + display: block; + height: 1px; + background: #000; + border-top: 1px solid #fff; + position: absolute; + top: 0; + left: 0; + width: 100%; + margin-top: -1px; +} +.colorpicker-hue { + background-image: url("../img/plugins/colorpicker/hue.png"); +} +.colorpicker-alpha { + background-image: url("../img/plugins/colorpicker/alpha.png"); + display: none; +} +.colorpicker { + *zoom: 1; + top: 0; + left: 0; + padding: 4px; + min-width: 120px; +} +.colorpicker:before, +.colorpicker:after { + display: table; + content: ""; + line-height: 0; +} +.colorpicker:after { + clear: both; +} +.colorpicker div { + position: relative; +} +.colorpicker.alpha { + min-width: 140px; +} +.colorpicker.alpha .colorpicker-alpha { + display: block; +} +.colorpicker-color { + height: 10px; + margin-top: 5px; + clear: both; + background-image: url("../img/plugins/colorpicker/alpha.png"); + background-position: 0 100%; +} +.colorpicker-color div { + height: 10px; +} +.input-append.color .add-on i, +.input-prepend.color .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.colorpicker-preview { + display: block; + width: 18px; + height: 18px; +} +/* Date picker */ +.datepicker { + top: 0; + left: 0; + padding: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td { + color: #4d4d4d; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.old, +.datepicker td.new { + color: #999999; +} +.datepicker td.active, +.datepicker td.active:hover { + color: #fff; + background-color: #4986e7; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #fff; + background-color: #4986e7; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.datepicker + .add-on .icon-calendar { + font-size: 20px; +} +/* Time picker */ +.bootstrap-timepicker-widget.dropdown-menu { + min-width: 0px; +} +.bootstrap-timepicker-widget table { + width: auto; +} +.bootstrap-timepicker-widget table td { + height: 0; +} +.bootstrap-timepicker-widget table td a { + padding: 0; + width: auto; + display: block; +} +/* Login page style */ +.container.login { + width: 340px; + margin-top: 150px; +} +.container.login .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +.container.login form { + margin: 0; + border: none; + background-color: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.container.login form .control-group { + padding: 0; + border: none; +} +.container.login form .form-actions { + padding: 10px 0 0; +} +.container.login form .form-actions .btn { + padding-left: 20px; + padding-right: 20px; + display: block; + margin: 0 auto; +} +.container.login form input[type="text"], +.container.login form input[type="password"] { + width: 277px; +} +.container.login .login-footer { + text-align: right; + *zoom: 1; +} +.container.login .login-footer:before, +.container.login .login-footer:after { + display: table; + content: ""; + line-height: 0; +} +.container.login .login-footer:after { + clear: both; +} +.container.login .login-footer li { + display: inline-block; +} +/* Error pages */ +.error-page { + background-image: none; + position: static; +} +.error-page .error-container { + width: 90%; + max-width: 600px; + text-align: center; + margin: 80px auto 0; + *zoom: 1; +} +.error-page .error-container:before, +.error-page .error-container:after { + display: table; + content: ""; + line-height: 0; +} +.error-page .error-container:after { + clear: both; +} +.error-page .error-container h1 { + margin: 0; + font-size: 169px; + line-height: normal; + color: #ffffff; + text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.2), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); + -webkit-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -moz-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -o-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); +} +.error-page .error-container p { + margin: 10px 0 20px; +} +.error-page .error-container p.description { + margin: 10px 0; + font-size: 39px; + line-height: normal; + color: #525252; +} +.no-textshadow .error-page .error-container h1 { + text-shadow: none; + color: #4986e7; +} +/* Responsive styles */ +/* Up to landscape phone */ +@media (max-width: 480px) { + #header nav { + float: left; + margin-bottom: 20px; + } +} +/* Landscape phone to small desktop and portrait tablet */ +@media (max-width: 767px) { + #header > h1 { + clear: both; + } + .container, + .content-block, + .navigation-block { + width: auto; + position: static !important; + } + .content-block, + .navigation-block { + float: none; + margin: 0; + } + .row, + .row-fluid { + margin-left: 0; + } + .main-navigation > ul > li:first-child { + margin-top: 6.666666666666667px; + border-top: none; + } + .side-note { + padding: 20px; + background-image: none; + background-color: #fffbea; + border: 1px solid #dedacb; + } + .side-note .side-note-container, + .side-note .side-note-bottom { + padding: 0; + background-image: none; + } + .user-profile figure img { + float: left; + } + .user-profile figure figcaption { + float: left; + } + .content-block [class*="span"], + .content-block .row [class*="span"], + .content-block .row-fluid [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .input-append .add-on, + .input-prepend .add-on, + .input-append .btn, + .input-prepend .btn { + line-height: 20px; + } + .input-append .add-on, + .input-prepend .add-on { + height: 18px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Portrait tablet to default desktop */ +@media (min-width: 768px) and (max-width: 979px) { + .content-block { + width: 464px; + } + #wrapper > .container, + #footer.container { + width: 724px; + } + .row { + margin-left: 0; + } + .data-block[class*="span"] { + width: auto; + } + .content-block > [class*="span"], + .content-block .row > [class*="span"], + .content-block .row-fluid > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .data-block .data-container { + padding: 15px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Tablets and below */ +@media (max-width: 979px) { + .data-block[class*="span"] { + width: auto; + } + .content-block .row > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .row, + .row .row, + .row-fluid { + margin-bottom: 0; + } + [class*="span"] { + margin-bottom: 20px; + } + .data-block .data-container { + padding: 15px; + } + .data-block .thumbnails li img { + width: 100%; + } + .form-horizontal .control-label { + float: none; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .form-actions { + padding-left: 20px; + } + .content-block .input-append input[class*="span"], + .content-block .input-prepend input[class*="span"], + .content-block .uneditable-input[class*="span"] { + display: inline-block; + } + .uneditable-input { + min-height: 20px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + border: none; + } +} +/* Default desktop */ +@media (min-width: 980px) and (max-width: 1199px) { + .content-block { + width: 700px; + } + #wrapper > .container, + #footer.container { + width: 940px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 700px; + } + .span12 { + width: 700px; + } + .span11 { + width: 640px; + } + .span10 { + width: 580px; + } + .span9 { + width: 520px; + } + .span8 { + width: 460px; + } + .span7 { + width: 400px; + } + .span6 { + width: 340px; + } + .span5 { + width: 280px; + } + .span4 { + width: 220px; + } + .span3 { + width: 160px; + } + .span2 { + width: 100px; + } + .span1 { + width: 40px; + } + .offset12 { + margin-left: 740px; + } + .offset11 { + margin-left: 680px; + } + .offset10 { + margin-left: 620px; + } + .offset9 { + margin-left: 560px; + } + .offset8 { + margin-left: 500px; + } + .offset7 { + margin-left: 440px; + } + .offset6 { + margin-left: 380px; + } + .offset5 { + margin-left: 320px; + } + .offset4 { + margin-left: 260px; + } + .offset3 { + margin-left: 200px; + } + .offset2 { + margin-left: 140px; + } + .offset1 { + margin-left: 80px; + } + .data-block .row .row { + margin-left: -20px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 652px; + } + .data-block .row .span12 { + width: 652px; + } + .data-block .row .span11 { + width: 596px; + } + .data-block .row .span10 { + width: 540px; + } + .data-block .row .span9 { + width: 484px; + } + .data-block .row .span8 { + width: 428px; + } + .data-block .row .span7 { + width: 372px; + } + .data-block .row .span6 { + width: 316px; + } + .data-block .row .span5 { + width: 260px; + } + .data-block .row .span4 { + width: 204px; + } + .data-block .row .span3 { + width: 148px; + } + .data-block .row .span2 { + width: 92px; + } + .data-block .row .span1 { + width: 36px; + } + .data-block .row .offset12 { + margin-left: 692px; + } + .data-block .row .offset11 { + margin-left: 636px; + } + .data-block .row .offset10 { + margin-left: 580px; + } + .data-block .row .offset9 { + margin-left: 524px; + } + .data-block .row .offset8 { + margin-left: 468px; + } + .data-block .row .offset7 { + margin-left: 412px; + } + .data-block .row .offset6 { + margin-left: 356px; + } + .data-block .row .offset5 { + margin-left: 300px; + } + .data-block .row .offset4 { + margin-left: 244px; + } + .data-block .row .offset3 { + margin-left: 188px; + } + .data-block .row .offset2 { + margin-left: 132px; + } + .data-block .row .offset1 { + margin-left: 76px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .form-horizontal .control-label { + width: 90px; + } + .form-horizontal .controls { + margin-left: 100px; + } + .form-horizontal .form-actions { + padding-left: 120px; + } + .btn-toolbar .btn-group { + margin: 2px 0; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + margin: 0; + } +} +/* Large desktop */ +@media (min-width: 1200px) { + .content-block { + width: 930px; + } + #wrapper .container, + #footer.container { + width: 1170px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 928px; + } + .span12 { + width: 928px; + } + .span11 { + width: 849px; + } + .span10 { + width: 770px; + } + .span9 { + width: 691px; + } + .span8 { + width: 612px; + } + .span7 { + width: 533px; + } + .span6 { + width: 454px; + } + .span5 { + width: 375px; + } + .span4 { + width: 296px; + } + .span3 { + width: 217px; + } + .span2 { + width: 138px; + } + .span1 { + width: 59px; + } + .offset12 { + margin-left: 968px; + } + .offset11 { + margin-left: 889px; + } + .offset10 { + margin-left: 810px; + } + .offset9 { + margin-left: 731px; + } + .offset8 { + margin-left: 652px; + } + .offset7 { + margin-left: 573px; + } + .offset6 { + margin-left: 494px; + } + .offset5 { + margin-left: 415px; + } + .offset4 { + margin-left: 336px; + } + .offset3 { + margin-left: 257px; + } + .offset2 { + margin-left: 178px; + } + .offset1 { + margin-left: 99px; + } + .data-block .row .row { + margin-left: -21px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 879px; + } + .data-block .row .span12 { + width: 879px; + } + .data-block .row .span11 { + width: 804px; + } + .data-block .row .span10 { + width: 729px; + } + .data-block .row .span9 { + width: 654px; + } + .data-block .row .span8 { + width: 579px; + } + .data-block .row .span7 { + width: 504px; + } + .data-block .row .span6 { + width: 429px; + } + .data-block .row .span5 { + width: 354px; + } + .data-block .row .span4 { + width: 279px; + } + .data-block .row .span3 { + width: 204px; + } + .data-block .row .span2 { + width: 129px; + } + .data-block .row .span1 { + width: 54px; + } + .data-block .row .offset12 { + margin-left: 921px; + } + .data-block .row .offset11 { + margin-left: 846px; + } + .data-block .row .offset10 { + margin-left: 771px; + } + .data-block .row .offset9 { + margin-left: 696px; + } + .data-block .row .offset8 { + margin-left: 621px; + } + .data-block .row .offset7 { + margin-left: 546px; + } + .data-block .row .offset6 { + margin-left: 471px; + } + .data-block .row .offset5 { + margin-left: 396px; + } + .data-block .row .offset4 { + margin-left: 321px; + } + .data-block .row .offset3 { + margin-left: 246px; + } + .data-block .row .offset2 { + margin-left: 171px; + } + .data-block .row .offset1 { + margin-left: 96px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .thumbnails { + margin-left: -21px; + } + .thumbnails .row { + margin-left: -21px; + *zoom: 1; + } + .thumbnails .row:before, + .thumbnails .row:after { + display: table; + content: ""; + line-height: 0; + } + .thumbnails .row:after { + clear: both; + } + .thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .thumbnails .container, + .thumbnails .navbar-static-top .container, + .thumbnails .navbar-fixed-top .container, + .thumbnails .navbar-fixed-bottom .container { + width: 879px; + } + .thumbnails .span12 { + width: 879px; + } + .thumbnails .span11 { + width: 804px; + } + .thumbnails .span10 { + width: 729px; + } + .thumbnails .span9 { + width: 654px; + } + .thumbnails .span8 { + width: 579px; + } + .thumbnails .span7 { + width: 504px; + } + .thumbnails .span6 { + width: 429px; + } + .thumbnails .span5 { + width: 354px; + } + .thumbnails .span4 { + width: 279px; + } + .thumbnails .span3 { + width: 204px; + } + .thumbnails .span2 { + width: 129px; + } + .thumbnails .span1 { + width: 54px; + } + .thumbnails .offset12 { + margin-left: 921px; + } + .thumbnails .offset11 { + margin-left: 846px; + } + .thumbnails .offset10 { + margin-left: 771px; + } + .thumbnails .offset9 { + margin-left: 696px; + } + .thumbnails .offset8 { + margin-left: 621px; + } + .thumbnails .offset7 { + margin-left: 546px; + } + .thumbnails .offset6 { + margin-left: 471px; + } + .thumbnails .offset5 { + margin-left: 396px; + } + .thumbnails .offset4 { + margin-left: 321px; + } + .thumbnails .offset3 { + margin-left: 246px; + } + .thumbnails .offset2 { + margin-left: 171px; + } + .thumbnails .offset1 { + margin-left: 96px; + } + .thumbnails li { + margin-bottom: 21px; + margin-left: 21px; + } + .form-horizontal .control-label { + width: 160px; + } + .form-horizontal .controls { + margin-left: 180px; + } + .form-horizontal .form-actions { + padding-left: 200px; + } + .widgets > li { + margin: 0; + } +} +/* Demo styles */ +.data-block .row-fluid.demo, +.data-block .row.demo { + color: #fff; + line-height: 30px; + min-height: 30px; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block .row-fluid.demo:last-child, +.data-block .row.demo:last-child { + margin-bottom: 0; +} +.data-block .row-fluid.demo > div, +.data-block .row.demo > div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #4A525A; +} +.data-block .row-fluid.demo > div > .row > div, +.data-block .row.demo > div > .row > div, +.data-block .row-fluid.demo > div > .row-fluid > div, +.data-block .row.demo > div > .row-fluid > div { + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #657078; +} +.demo > input, +.demo > select { + display: block !important; + margin-bottom: 10px; +} +.navigation-block > a { + margin: 0 0 20px; +} +.navigation-block > a span { + font-size: 11.049999999999999px; +} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/huraga-dark.css b/src/bb-themes/huraga/assets/css/huraga-dark.css new file mode 100644 index 000000000..6aaaf4689 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/huraga-dark.css @@ -0,0 +1,12999 @@ +/*! + * Walkin Pixels - Huraga v1.7 + * www.walkingpixels.com + * + * Dark color + * + */ +@import url("http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold"); +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, +a:active { + outline: 0; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + + max-width: 100%; + /* Part 1: Set a maxium relative to the parent */ + + width: auto\9; + /* IE7-8 need help adjusting responsive images */ + + height: auto; + /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} +#map_canvas img, +.google-maps img { + max-width: none; +} +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +@media print { + * { + text-shadow: none !important; + color: #000 !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body { + margin: 0; + font-family: "PT Sans", Arial, sans-serif; + font-size: 13px; + line-height: 18px; + color: #939699; + background-color: #f5f5f5; +} +a { + color: #40444d; + text-decoration: none; +} +a:hover, +a:focus { + color: #121315; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; +} +.offset3 { + margin-left: 260px; +} +.offset2 { + margin-left: 180px; +} +.offset1 { + margin-left: 100px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; +} +.container:after { + clear: both; +} +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 9px; +} +.lead { + margin-bottom: 18px; + font-size: 19.5px; + font-weight: 200; + line-height: 27px; +} +small { + font-size: 85%; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +cite { + font-style: normal; +} +.muted { + color: #999999; +} +a.muted:hover, +a.muted:focus { + color: #808080; +} +.text-warning { + color: #c09853; +} +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover, +a.text-success:focus { + color: #356635; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 9px 0; + font-family: inherit; + font-weight: bold; + line-height: 18px; + color: #525252; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 36px; +} +h1 { + font-size: 35.75px; +} +h2 { + font-size: 29.25px; +} +h3 { + font-size: 22.75px; +} +h4 { + font-size: 16.25px; +} +h5 { + font-size: 13px; +} +h6 { + font-size: 11.049999999999999px; +} +h1 small { + font-size: 22.75px; +} +h2 small { + font-size: 16.25px; +} +h3 small { + font-size: 13px; +} +h4 small { + font-size: 13px; +} +.page-header { + padding-bottom: 8px; + margin: 18px 0 27px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 9px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 18px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding-left: 5px; + padding-right: 5px; +} +dl { + margin-bottom: 18px; +} +dt, +dd { + line-height: 18px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 9px; +} +.dl-horizontal { + *zoom: 1; +} +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 18px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16.25px; + font-weight: 300; + line-height: 1.25; +} +blockquote small { + display: block; + line-height: 18px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 18px; + font-style: normal; + line-height: 18px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 11px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} +pre { + display: block; + padding: 8.5px; + margin: 0 0 9px; + font-size: 12px; + line-height: 18px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +pre.prettyprint { + margin-bottom: 18px; +} +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 18px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 18px; + font-size: 19.5px; + line-height: 36px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 13.5px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 13px; + font-weight: normal; + line-height: 18px; +} +input, +button, +select, +textarea { + font-family: "PT Sans", Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 18px; + padding: 4px 6px; + margin-bottom: 9px; + font-size: 13px; + line-height: 18px; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 28px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 28px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 18px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 17px 20px 18px; + margin-top: 18px; + margin-bottom: 18px; + background-color: #ffffff; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #babcbe; +} +.help-block { + display: block; + margin-bottom: 9px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 9px; + vertical-align: middle; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 13px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 18px; + min-width: 16px; + padding: 4px 5px; + font-size: 13px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 9px; +} +legend + .control-group { + margin-top: 18px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 18px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 9px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 18px; +} +.table th, +.table td { + padding: 8px; + line-height: 18px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table .table { + background-color: #f5f5f5; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success > td { + background-color: #dff0d8; +} +.table tbody tr.error > td { + background-color: #f2dede; +} +.table tbody tr.warning > td { + background-color: #fcf8e3; +} +.table tbody tr.info > td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/icons/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/focus/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/icons/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; + width: 16px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; +} +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + text-decoration: none; + color: #ffffff; + background-color: #3b3f47; + background-image: -moz-linear-gradient(top, #40444d, #34383f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#34383f)); + background-image: -webkit-linear-gradient(top, #40444d, #34383f); + background-image: -o-linear-gradient(top, #40444d, #34383f); + background-image: linear-gradient(to bottom, #40444d, #34383f); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff34383f', GradientType=0); +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #333333; + text-decoration: none; + outline: 0; + background-color: #3b3f47; + background-image: -moz-linear-gradient(top, #40444d, #34383f); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#34383f)); + background-image: -webkit-linear-gradient(top, #40444d, #34383f); + background-image: -o-linear-gradient(top, #40444d, #34383f); + background-image: linear-gradient(to bottom, #40444d, #34383f); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff34383f', GradientType=0); +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 16.25px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 0px 6px; + font-size: 9.75px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #40434d; + background-image: -moz-linear-gradient(top, #40444d, #40414d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#40414d)); + background-image: -webkit-linear-gradient(top, #40444d, #40414d); + background-image: -o-linear-gradient(top, #40444d, #40414d); + background-image: linear-gradient(to bottom, #40444d, #40414d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff40414d', GradientType=0); + border-color: #40414d #40414d #1d1e23; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #40414d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #40414d; + *background-color: #34353f; +} +.btn-primary:active, +.btn-primary.active { + background-color: #292931 \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e43838; + background-image: -moz-linear-gradient(top, #e74949, #e01d1d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e01d1d)); + background-image: -webkit-linear-gradient(top, #e74949, #e01d1d); + background-image: -o-linear-gradient(top, #e74949, #e01d1d); + background-image: linear-gradient(to bottom, #e74949, #e01d1d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe01d1d', GradientType=0); + border-color: #e01d1d #e01d1d #9c1515; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e01d1d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #e01d1d; + *background-color: #c91b1b; +} +.btn-danger:active, +.btn-danger.active { + background-color: #b21818 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f8a1d; + background-image: -moz-linear-gradient(top, #6b9b20, #4e7117); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4e7117)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4e7117); + background-image: -o-linear-gradient(top, #6b9b20, #4e7117); + background-image: linear-gradient(to bottom, #6b9b20, #4e7117); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4e7117', GradientType=0); + border-color: #4e7117 #4e7117 #22310a; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4e7117; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #4e7117; + *background-color: #3f5c13; +} +.btn-success:active, +.btn-success.active { + background-color: #31460f \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.btn-info:active, +.btn-info.active { + background-color: #1d38e0 \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #373a42; + background-image: -moz-linear-gradient(top, #40444d, #292b31); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#292b31)); + background-image: -webkit-linear-gradient(top, #40444d, #292b31); + background-image: -o-linear-gradient(top, #40444d, #292b31); + background-image: linear-gradient(to bottom, #40444d, #292b31); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff292b31', GradientType=0); + border-color: #292b31 #292b31 #060707; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #292b31; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #292b31; + *background-color: #1d1f23; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #121315 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #40444d; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover, +.btn-link:focus { + color: #121315; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 9px; + margin-bottom: 9px; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 13px; +} +.btn-group > .btn-mini { + font-size: 9.75px; +} +.btn-group > .btn-small { + font-size: 11.049999999999999px; +} +.btn-group > .btn-large { + font-size: 16.25px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #40414d; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #e01d1d; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #4e7117; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #495fe7; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #292b31; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 18px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-success h4 { + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-info h4 { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 18px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li > a > img { + max-width: none; +} +.nav > .pull-right { + float: right; +} +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 18px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #40444d; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; +} +.nav-tabs:after, +.nav-pills:after { + clear: both; +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 18px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + background-color: #f5f5f5; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #40444d; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #40444d; + border-bottom-color: #40444d; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #121315; + border-bottom-color: #121315; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 18px; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 11px 20px 11px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #555555; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #555555; +} +.navbar-link { + color: #555555; +} +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 11px 15px 11px; + color: #555555; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; +} +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} +.navbar-inverse .brand { + color: #999999; +} +.navbar-inverse .navbar-text { + color: #999999; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 18px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.breadcrumb > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} +.breadcrumb > .active { + color: #999999; +} +.pagination { + margin: 18px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.pagination ul > li { + display: inline; +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 18px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 16.25px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0px 6px; + font-size: 9.75px; +} +.pager { + margin: 18px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-title:empty { + display: none; +} +.popover-content { + padding: 9px 14px; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: 11px; +} +.popover .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right .arrow:after { + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left .arrow:after { + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, +.thumbnails:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails:after { + clear: both; +} +.row-fluid .thumbnails { + margin-left: 0; +} +.thumbnails > li { + float: left; + margin-bottom: 18px; + margin-left: 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 18px; + border: 1px solid #ddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #40444d; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; + color: #555555; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 10.998px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; +} +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +.label:empty, +.badge:empty { + display: none; +} +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label-important, +.badge-important { + background-color: #b94a48; +} +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} +.label-warning, +.badge-warning { + background-color: #f89406; +} +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} +.label-success, +.badge-success { + background-color: #468847; +} +.label-success[href], +.badge-success[href] { + background-color: #356635; +} +.label-info, +.badge-info { + background-color: #3a87ad; +} +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} +.label-inverse, +.badge-inverse { + background-color: #333333; +} +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} +.btn-mini .label, +.btn-mini .badge { + top: 0; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 18px; + margin-bottom: 18px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.accordion { + margin-bottom: 18px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-toggle { + cursor: pointer; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 18px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} +.carousel-indicators .active { + background-color: #fff; +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 18px; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 27px; + color: #cccccc; + background-color: #40444d; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: #ffffff; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 27px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +@media (max-width: 767px) { + body { + padding-left: 20px; + padding-right: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 18px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-left: 10px; + padding-right: 10px; + } + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} +@media (max-width: 767px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 18px; + } + .navbar-fixed-bottom { + margin-top: 18px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 9px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #555555; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 9px 15px; + margin: 9px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } +} +@media (min-width: 768px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} +@-ms-viewport { + width: device-width; +} +.hidden { + display: none; + visibility: hidden; +} +.visible-phone { + display: none !important; +} +.visible-tablet { + display: none !important; +} +.hidden-desktop { + display: none !important; +} +.visible-desktop { + display: inherit !important; +} +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} +/* Emoticon icon set */ +[class^="emo-"], +[class*=" emo-"] { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + vertical-align: text-top; + background-image: url("../img/icons/emoticons-icons.png"); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; +} +[class^="emo-"]:last-child, +[class*=" emo-"]:last-child { + *margin-left: 0; +} +.emo-8ball { + background-position: 0 0; +} +.emo-basketball { + background-position: -32px 0; +} +.emo-football { + background-position: -288px 0; +} +.emo-golf { + background-position: -320px 0; +} +.emo-raquet { + background-position: -512px 0; +} +.emo-rocket { + background-position: -576px 0; +} +.emo-soccer { + background-position: -736px 0; +} +.emo-tennis { + background-position: -800px 0; +} +.emo-shuttlecock { + background-position: -640px 0; +} +.emo-bomb { + background-position: -64px 0; +} +.emo-bug { + background-position: -96px 0; +} +.emo-confuse { + background-position: -128px 0; +} +.emo-cool { + background-position: -160px 0; +} +.emo-cry { + background-position: -192px 0; +} +.emo-evilgrin { + background-position: -224px 0; +} +.emo-fat { + background-position: -256px 0; +} +.emo-grin { + background-position: -352px 0; +} +.emo-happy { + background-position: -384px 0; +} +.emo-heart { + background-position: -416px 0; +} +.emo-mad { + background-position: -448px 0; +} +.emo-neutral { + background-position: -480px 0; +} +.emo-red { + background-position: -544px 0; +} +.emo-roll { + background-position: -608px 0; +} +.emo-slim { + background-position: -672px 0; +} +.emo-smile { + background-position: -704px 0; +} +.emo-surprised { + background-position: -768px 0; +} +.emo-tongue { + background-position: -832px 0; +} +.emo-unhappy { + background-position: -864px 0; +} +.emo-waii { + background-position: -896px 0; +} +.emo-wink { + background-position: -928px 0; +} +.emo-yell { + background-position: -960px 0; +} +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ +@font-face { + font-family: 'FontAwesome'; + src: url('../css/font/fontawesome-webfont.eot?v=3.0.1'); + src: url('../css/font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), url('../css/font/fontawesome-webfont.woff?v=3.0.1') format('woff'), url('../css/font/fontawesome-webfont.ttf?v=3.0.1') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="awe-"], +[class*=" awe-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + /* sprites.less reset */ + + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.awe-white, +.nav-pills > .active > a > [class^="awe-"], +.nav-pills > .active > a > [class*=" awe-"], +.nav-list > .active > a > [class^="awe-"], +.nav-list > .active > a > [class*=" awe-"], +.navbar-inverse .nav > .active > a > [class^="awe-"], +.navbar-inverse .nav > .active > a > [class*=" awe-"], +.dropdown-menu > li > a:hover > [class^="awe-"], +.dropdown-menu > li > a:hover > [class*=" awe-"], +.dropdown-menu > .active > a > [class^="awe-"], +.dropdown-menu > .active > a > [class*=" awe-"], +.dropdown-submenu:hover > a > [class^="awe-"], +.dropdown-submenu:hover > a > [class*=" awe-"] { + background-image: none; +} +[class^="awe-"]:before, +[class*=" awe-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="awe-"], +a [class*=" awe-"] { + display: inline-block; +} +/* makes the font 33% larger relative to the icon container */ +.awe-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} +.btn [class^="awe-"], +.nav [class^="awe-"], +.btn [class*=" awe-"], +.nav [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.btn [class^="awe-"].awe-large, +.nav [class^="awe-"].awe-large, +.btn [class*=" awe-"].awe-large, +.nav [class*=" awe-"].awe-large { + line-height: .9em; +} +.btn [class^="awe-"].awe-spin, +.nav [class^="awe-"].awe-spin, +.btn [class*=" awe-"].awe-spin, +.nav [class*=" awe-"].awe-spin { + display: inline-block; +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"] { + /* keeps button heights with and without icons the same */ + +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"], +.nav-tabs [class^="awe-"].awe-large, +.nav-pills [class^="awe-"].awe-large, +.nav-tabs [class*=" awe-"].awe-large, +.nav-pills [class*=" awe-"].awe-large { + line-height: .9em; +} +li [class^="awe-"], +.nav li [class^="awe-"], +li [class*=" awe-"], +.nav li [class*=" awe-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="awe-"].awe-large, +.nav li [class^="awe-"].awe-large, +li [class*=" awe-"].awe-large, +.nav li [class*=" awe-"].awe-large { + /* increased font size for awe-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="awe-"], +ul.icons li [class*=" awe-"] { + width: .75em; +} +.awe-muted { + color: #eeeeee; +} +.awe-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.awe-2x { + font-size: 2em; +} +.awe-2x.awe-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.awe-3x { + font-size: 3em; +} +.awe-3x.awe-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.awe-4x { + font-size: 4em; +} +.awe-4x.awe-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="awe-"].pull-left, +[class*=" awe-"].pull-left { + margin-right: .3em; +} +[class^="awe-"].pull-right, +[class*=" awe-"].pull-right { + margin-left: .3em; +} +.btn [class^="awe-"].pull-left.awe-2x, +.btn [class*=" awe-"].pull-left.awe-2x, +.btn [class^="awe-"].pull-right.awe-2x, +.btn [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.btn [class^="awe-"].awe-spin.awe-large, +.btn [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.btn.btn-small [class^="awe-"].pull-left.awe-2x, +.btn.btn-small [class*=" awe-"].pull-left.awe-2x, +.btn.btn-small [class^="awe-"].pull-right.awe-2x, +.btn.btn-small [class*=" awe-"].pull-right.awe-2x { + margin-top: .25em; +} +.btn.btn-large [class^="awe-"], +.btn.btn-large [class*=" awe-"] { + margin-top: 0; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x, +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-top: .05em; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x { + margin-right: .2em; +} +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-left: .2em; +} +.awe-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +@-moz-document url-prefix() { + .awe-spin { + height: .9em; + } + .btn .awe-spin { + height: auto; + } + .awe-spin.awe-large { + height: 1.25em; + } + .btn .awe-spin.awe-large { + height: .75em; + } +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.awe-glass:before { + content: "\f000"; +} +.awe-music:before { + content: "\f001"; +} +.awe-search:before { + content: "\f002"; +} +.awe-envelope:before { + content: "\f003"; +} +.awe-heart:before { + content: "\f004"; +} +.awe-star:before { + content: "\f005"; +} +.awe-star-empty:before { + content: "\f006"; +} +.awe-user:before { + content: "\f007"; +} +.awe-film:before { + content: "\f008"; +} +.awe-th-large:before { + content: "\f009"; +} +.awe-th:before { + content: "\f00a"; +} +.awe-th-list:before { + content: "\f00b"; +} +.awe-ok:before { + content: "\f00c"; +} +.awe-remove:before { + content: "\f00d"; +} +.awe-zoom-in:before { + content: "\f00e"; +} +.awe-zoom-out:before { + content: "\f010"; +} +.awe-off:before { + content: "\f011"; +} +.awe-signal:before { + content: "\f012"; +} +.awe-cog:before { + content: "\f013"; +} +.awe-trash:before { + content: "\f014"; +} +.awe-home:before { + content: "\f015"; +} +.awe-file:before { + content: "\f016"; +} +.awe-time:before { + content: "\f017"; +} +.awe-road:before { + content: "\f018"; +} +.awe-download-alt:before { + content: "\f019"; +} +.awe-download:before { + content: "\f01a"; +} +.awe-upload:before { + content: "\f01b"; +} +.awe-inbox:before { + content: "\f01c"; +} +.awe-play-circle:before { + content: "\f01d"; +} +.awe-repeat:before, +.awe-rotate-right:before { + content: "\f01e"; +} +/* F020 doesn't work in Safari. all shifted one down */ +.awe-refresh:before { + content: "\f021"; +} +.awe-list-alt:before { + content: "\f022"; +} +.awe-lock:before { + content: "\f023"; +} +.awe-flag:before { + content: "\f024"; +} +.awe-headphones:before { + content: "\f025"; +} +.awe-volume-off:before { + content: "\f026"; +} +.awe-volume-down:before { + content: "\f027"; +} +.awe-volume-up:before { + content: "\f028"; +} +.awe-qrcode:before { + content: "\f029"; +} +.awe-barcode:before { + content: "\f02a"; +} +.awe-tag:before { + content: "\f02b"; +} +.awe-tags:before { + content: "\f02c"; +} +.awe-book:before { + content: "\f02d"; +} +.awe-bookmark:before { + content: "\f02e"; +} +.awe-print:before { + content: "\f02f"; +} +.awe-camera:before { + content: "\f030"; +} +.awe-font:before { + content: "\f031"; +} +.awe-bold:before { + content: "\f032"; +} +.awe-italic:before { + content: "\f033"; +} +.awe-text-height:before { + content: "\f034"; +} +.awe-text-width:before { + content: "\f035"; +} +.awe-align-left:before { + content: "\f036"; +} +.awe-align-center:before { + content: "\f037"; +} +.awe-align-right:before { + content: "\f038"; +} +.awe-align-justify:before { + content: "\f039"; +} +.awe-list:before { + content: "\f03a"; +} +.awe-indent-left:before { + content: "\f03b"; +} +.awe-indent-right:before { + content: "\f03c"; +} +.awe-facetime-video:before { + content: "\f03d"; +} +.awe-picture:before { + content: "\f03e"; +} +.awe-pencil:before { + content: "\f040"; +} +.awe-map-marker:before { + content: "\f041"; +} +.awe-adjust:before { + content: "\f042"; +} +.awe-tint:before { + content: "\f043"; +} +.awe-edit:before { + content: "\f044"; +} +.awe-share:before { + content: "\f045"; +} +.awe-check:before { + content: "\f046"; +} +.awe-move:before { + content: "\f047"; +} +.awe-step-backward:before { + content: "\f048"; +} +.awe-fast-backward:before { + content: "\f049"; +} +.awe-backward:before { + content: "\f04a"; +} +.awe-play:before { + content: "\f04b"; +} +.awe-pause:before { + content: "\f04c"; +} +.awe-stop:before { + content: "\f04d"; +} +.awe-forward:before { + content: "\f04e"; +} +.awe-fast-forward:before { + content: "\f050"; +} +.awe-step-forward:before { + content: "\f051"; +} +.awe-eject:before { + content: "\f052"; +} +.awe-chevron-left:before { + content: "\f053"; +} +.awe-chevron-right:before { + content: "\f054"; +} +.awe-plus-sign:before { + content: "\f055"; +} +.awe-minus-sign:before { + content: "\f056"; +} +.awe-remove-sign:before { + content: "\f057"; +} +.awe-ok-sign:before { + content: "\f058"; +} +.awe-question-sign:before { + content: "\f059"; +} +.awe-info-sign:before { + content: "\f05a"; +} +.awe-screenshot:before { + content: "\f05b"; +} +.awe-remove-circle:before { + content: "\f05c"; +} +.awe-ok-circle:before { + content: "\f05d"; +} +.awe-ban-circle:before { + content: "\f05e"; +} +.awe-arrow-left:before { + content: "\f060"; +} +.awe-arrow-right:before { + content: "\f061"; +} +.awe-arrow-up:before { + content: "\f062"; +} +.awe-arrow-down:before { + content: "\f063"; +} +.awe-share-alt:before, +.awe-mail-forward:before { + content: "\f064"; +} +.awe-resize-full:before { + content: "\f065"; +} +.awe-resize-small:before { + content: "\f066"; +} +.awe-plus:before { + content: "\f067"; +} +.awe-minus:before { + content: "\f068"; +} +.awe-asterisk:before { + content: "\f069"; +} +.awe-exclamation-sign:before { + content: "\f06a"; +} +.awe-gift:before { + content: "\f06b"; +} +.awe-leaf:before { + content: "\f06c"; +} +.awe-fire:before { + content: "\f06d"; +} +.awe-eye-open:before { + content: "\f06e"; +} +.awe-eye-close:before { + content: "\f070"; +} +.awe-warning-sign:before { + content: "\f071"; +} +.awe-plane:before { + content: "\f072"; +} +.awe-calendar:before { + content: "\f073"; +} +.awe-random:before { + content: "\f074"; +} +.awe-comment:before { + content: "\f075"; +} +.awe-magnet:before { + content: "\f076"; +} +.awe-chevron-up:before { + content: "\f077"; +} +.awe-chevron-down:before { + content: "\f078"; +} +.awe-retweet:before { + content: "\f079"; +} +.awe-shopping-cart:before { + content: "\f07a"; +} +.awe-folder-close:before { + content: "\f07b"; +} +.awe-folder-open:before { + content: "\f07c"; +} +.awe-resize-vertical:before { + content: "\f07d"; +} +.awe-resize-horizontal:before { + content: "\f07e"; +} +.awe-bar-chart:before { + content: "\f080"; +} +.awe-twitter-sign:before { + content: "\f081"; +} +.awe-facebook-sign:before { + content: "\f082"; +} +.awe-camera-retro:before { + content: "\f083"; +} +.awe-key:before { + content: "\f084"; +} +.awe-cogs:before { + content: "\f085"; +} +.awe-comments:before { + content: "\f086"; +} +.awe-thumbs-up:before { + content: "\f087"; +} +.awe-thumbs-down:before { + content: "\f088"; +} +.awe-star-half:before { + content: "\f089"; +} +.awe-heart-empty:before { + content: "\f08a"; +} +.awe-signout:before { + content: "\f08b"; +} +.awe-linkedin-sign:before { + content: "\f08c"; +} +.awe-pushpin:before { + content: "\f08d"; +} +.awe-external-link:before { + content: "\f08e"; +} +.awe-signin:before { + content: "\f090"; +} +.awe-trophy:before { + content: "\f091"; +} +.awe-github-sign:before { + content: "\f092"; +} +.awe-upload-alt:before { + content: "\f093"; +} +.awe-lemon:before { + content: "\f094"; +} +.awe-phone:before { + content: "\f095"; +} +.awe-check-empty:before { + content: "\f096"; +} +.awe-bookmark-empty:before { + content: "\f097"; +} +.awe-phone-sign:before { + content: "\f098"; +} +.awe-twitter:before { + content: "\f099"; +} +.awe-facebook:before { + content: "\f09a"; +} +.awe-github:before { + content: "\f09b"; +} +.awe-unlock:before { + content: "\f09c"; +} +.awe-credit-card:before { + content: "\f09d"; +} +.awe-rss:before { + content: "\f09e"; +} +.awe-hdd:before { + content: "\f0a0"; +} +.awe-bullhorn:before { + content: "\f0a1"; +} +.awe-bell:before { + content: "\f0a2"; +} +.awe-certificate:before { + content: "\f0a3"; +} +.awe-hand-right:before { + content: "\f0a4"; +} +.awe-hand-left:before { + content: "\f0a5"; +} +.awe-hand-up:before { + content: "\f0a6"; +} +.awe-hand-down:before { + content: "\f0a7"; +} +.awe-circle-arrow-left:before { + content: "\f0a8"; +} +.awe-circle-arrow-right:before { + content: "\f0a9"; +} +.awe-circle-arrow-up:before { + content: "\f0aa"; +} +.awe-circle-arrow-down:before { + content: "\f0ab"; +} +.awe-globe:before { + content: "\f0ac"; +} +.awe-wrench:before { + content: "\f0ad"; +} +.awe-tasks:before { + content: "\f0ae"; +} +.awe-filter:before { + content: "\f0b0"; +} +.awe-briefcase:before { + content: "\f0b1"; +} +.awe-fullscreen:before { + content: "\f0b2"; +} +.awe-group:before { + content: "\f0c0"; +} +.awe-link:before { + content: "\f0c1"; +} +.awe-cloud:before { + content: "\f0c2"; +} +.awe-beaker:before { + content: "\f0c3"; +} +.awe-cut:before { + content: "\f0c4"; +} +.awe-copy:before { + content: "\f0c5"; +} +.awe-paper-clip:before { + content: "\f0c6"; +} +.awe-save:before { + content: "\f0c7"; +} +.awe-sign-blank:before { + content: "\f0c8"; +} +.awe-reorder:before { + content: "\f0c9"; +} +.awe-list-ul:before { + content: "\f0ca"; +} +.awe-list-ol:before { + content: "\f0cb"; +} +.awe-strikethrough:before { + content: "\f0cc"; +} +.awe-underline:before { + content: "\f0cd"; +} +.awe-table:before { + content: "\f0ce"; +} +.awe-magic:before { + content: "\f0d0"; +} +.awe-truck:before { + content: "\f0d1"; +} +.awe-pinterest:before { + content: "\f0d2"; +} +.awe-pinterest-sign:before { + content: "\f0d3"; +} +.awe-google-plus-sign:before { + content: "\f0d4"; +} +.awe-google-plus:before { + content: "\f0d5"; +} +.awe-money:before { + content: "\f0d6"; +} +.awe-caret-down:before { + content: "\f0d7"; +} +.awe-caret-up:before { + content: "\f0d8"; +} +.awe-caret-left:before { + content: "\f0d9"; +} +.awe-caret-right:before { + content: "\f0da"; +} +.awe-columns:before { + content: "\f0db"; +} +.awe-sort:before { + content: "\f0dc"; +} +.awe-sort-down:before { + content: "\f0dd"; +} +.awe-sort-up:before { + content: "\f0de"; +} +.awe-envelope-alt:before { + content: "\f0e0"; +} +.awe-linkedin:before { + content: "\f0e1"; +} +.awe-undo:before, +.awe-rotate-left:before { + content: "\f0e2"; +} +.awe-legal:before { + content: "\f0e3"; +} +.awe-dashboard:before { + content: "\f0e4"; +} +.awe-comment-alt:before { + content: "\f0e5"; +} +.awe-comments-alt:before { + content: "\f0e6"; +} +.awe-bolt:before { + content: "\f0e7"; +} +.awe-sitemap:before { + content: "\f0e8"; +} +.awe-umbrella:before { + content: "\f0e9"; +} +.awe-paste:before { + content: "\f0ea"; +} +.awe-lightbulb:before { + content: "\f0eb"; +} +.awe-exchange:before { + content: "\f0ec"; +} +.awe-cloud-download:before { + content: "\f0ed"; +} +.awe-cloud-upload:before { + content: "\f0ee"; +} +.awe-user-md:before { + content: "\f0f0"; +} +.awe-stethoscope:before { + content: "\f0f1"; +} +.awe-suitcase:before { + content: "\f0f2"; +} +.awe-bell-alt:before { + content: "\f0f3"; +} +.awe-coffee:before { + content: "\f0f4"; +} +.awe-food:before { + content: "\f0f5"; +} +.awe-file-alt:before { + content: "\f0f6"; +} +.awe-building:before { + content: "\f0f7"; +} +.awe-hospital:before { + content: "\f0f8"; +} +.awe-ambulance:before { + content: "\f0f9"; +} +.awe-medkit:before { + content: "\f0fa"; +} +.awe-fighter-jet:before { + content: "\f0fb"; +} +.awe-beer:before { + content: "\f0fc"; +} +.awe-h-sign:before { + content: "\f0fd"; +} +.awe-plus-sign-alt:before { + content: "\f0fe"; +} +.awe-double-angle-left:before { + content: "\f100"; +} +.awe-double-angle-right:before { + content: "\f101"; +} +.awe-double-angle-up:before { + content: "\f102"; +} +.awe-double-angle-down:before { + content: "\f103"; +} +.awe-angle-left:before { + content: "\f104"; +} +.awe-angle-right:before { + content: "\f105"; +} +.awe-angle-up:before { + content: "\f106"; +} +.awe-angle-down:before { + content: "\f107"; +} +.awe-desktop:before { + content: "\f108"; +} +.awe-laptop:before { + content: "\f109"; +} +.awe-tablet:before { + content: "\f10a"; +} +.awe-mobile-phone:before { + content: "\f10b"; +} +.awe-circle-blank:before { + content: "\f10c"; +} +.awe-quote-left:before { + content: "\f10d"; +} +.awe-quote-right:before { + content: "\f10e"; +} +.awe-spinner:before { + content: "\f110"; +} +.awe-circle:before { + content: "\f111"; +} +.awe-reply:before, +.awe-mail-reply:before { + content: "\f112"; +} +.awe-folder-close-alt:before { + content: "\f114"; +} +.awe-folder-open-alt:before { + content: "\f115"; +} +.awe-expand-alt:before { + content: "\f116"; +} +.awe-collapse-alt:before { + content: "\f117"; +} +.awe-smile:before { + content: "\f118"; +} +.awe-frown:before { + content: "\f119"; +} +.awe-meh:before { + content: "\f11a"; +} +.awe-gamepad:before { + content: "\f11b"; +} +.awe-keyboard:before { + content: "\f11c"; +} +.awe-flag-alt:before { + content: "\f11d"; +} +.awe-flag-checkered:before { + content: "\f11e"; +} +.awe-terminal:before { + content: "\f120"; +} +.awe-code:before { + content: "\f121"; +} +.awe-reply-all:before { + content: "\f122"; +} +.awe-mail-reply-all:before { + content: "\f122"; +} +.awe-star-half-full:before, +.awe-star-half-empty:before { + content: "\f123"; +} +.awe-location-arrow:before { + content: "\f124"; +} +.awe-crop:before { + content: "\f125"; +} +.awe-code-fork:before { + content: "\f126"; +} +.awe-unlink:before { + content: "\f127"; +} +.awe-question:before { + content: "\f128"; +} +.awe-info:before { + content: "\f129"; +} +.awe-exclamation:before { + content: "\f12a"; +} +.awe-superscript:before { + content: "\f12b"; +} +.awe-subscript:before { + content: "\f12c"; +} +.awe-eraser:before { + content: "\f12d"; +} +.awe-puzzle-piece:before { + content: "\f12e"; +} +.awe-microphone:before { + content: "\f130"; +} +.awe-microphone-off:before { + content: "\f131"; +} +.awe-shield:before { + content: "\f132"; +} +.awe-calendar-empty:before { + content: "\f133"; +} +.awe-fire-extinguisher:before { + content: "\f134"; +} +.awe-rocket:before { + content: "\f135"; +} +.awe-maxcdn:before { + content: "\f136"; +} +.awe-chevron-sign-left:before { + content: "\f137"; +} +.awe-chevron-sign-right:before { + content: "\f138"; +} +.awe-chevron-sign-up:before { + content: "\f139"; +} +.awe-chevron-sign-down:before { + content: "\f13a"; +} +.awe-html5:before { + content: "\f13b"; +} +.awe-css3:before { + content: "\f13c"; +} +.awe-anchor:before { + content: "\f13d"; +} +.awe-unlock-alt:before { + content: "\f13e"; +} +.awe-bullseye:before { + content: "\f140"; +} +.awe-ellipsis-horizontal:before { + content: "\f141"; +} +.awe-ellipsis-vertical:before { + content: "\f142"; +} +.awe-rss-sign:before { + content: "\f143"; +} +.awe-play-sign:before { + content: "\f144"; +} +.awe-ticket:before { + content: "\f145"; +} +.awe-minus-sign-alt:before { + content: "\f146"; +} +.awe-check-minus:before { + content: "\f147"; +} +.awe-level-up:before { + content: "\f148"; +} +.awe-level-down:before { + content: "\f149"; +} +.awe-check-sign:before { + content: "\f14a"; +} +.awe-edit-sign:before { + content: "\f14b"; +} +.awe-external-link-sign:before { + content: "\f14c"; +} +.awe-share-sign:before { + content: "\f14d"; +} +/* Global styles */ +html, +body { + height: 100%; +} +body { + background-image: url("../img/assets/bg_body.jpg"); + background-repeat: repeat; + background-position: center center; + position: relative; +} +.container, +.ie8 .container { + width: 940px; +} +.navigation-block { + width: 220px; + float: left; + *zoom: 1; +} +.navigation-block:before, +.navigation-block:after { + display: table; + content: ""; + line-height: 0; +} +.navigation-block:after { + clear: both; +} +.navigation-block.affix { + position: fixed; + top: 20px; +} +.navigation-block.affix-bottom { + position: absolute; + top: auto; + bottom: 60px; +} +.navigation-block .navbar { + margin-bottom: 0; +} +.navigation-block .navbar .btn-navbar { + float: none; + margin: 0; + color: #40444d; + text-shadow: none; + text-align: left; +} +.navigation-block .navbar + .side-note { + margin-top: 10px; +} +.content-block { + width: 700px; + float: right; + margin-left: 20px; + *zoom: 1; +} +.content-block:before, +.content-block:after { + display: table; + content: ""; + line-height: 0; +} +.content-block:after { + clear: both; +} +#wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 0 -50px; +} +#push { + height: 50px; +} +/* Main header */ +#header { + position: relative; + padding: 20px 0; + margin-bottom: 20px; + border-bottom: 1px solid #dedede; +} +#header > h1 { + margin: 0; +} +#header > h1 + p { + margin: 0; + font-size: 11.049999999999999px; + text-shadow: 0 1px 0 #fff; +} +#header .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +#header nav { + float: right; + margin-top: -20px; + height: 30px; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul { + margin: 0; + *zoom: 1; +} +#header nav ul:before, +#header nav ul:after { + display: table; + content: ""; + line-height: 0; +} +#header nav ul:after { + clear: both; +} +#header nav ul > li { + float: left; + display: block; +} +#header nav ul > li + li { + border-right: 1px solid #363840; +} +#header nav ul > li:last-child { + border: none; +} +#header nav ul > li > a, +#header nav ul > li a.btn { + font-size: 11.049999999999999px !important; + padding: 6px 15px 0; + color: #b8babf; + display: block; + text-shadow: 0 1px 0 #000; + background: none; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li > a:hover, +#header nav ul > li a.btn:hover, +#header nav ul > li > a a.btn:hover, +#header nav ul > li a.btn a.btn:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li > a:hover .caret, +#header nav ul > li a.btn:hover .caret, +#header nav ul > li > a a.btn:hover .caret, +#header nav ul > li a.btn a.btn:hover .caret { + border-top-color: #fff; +} +#header nav ul > li a.btn { + padding: 6px 15px 5px; +} +#header nav ul > li .dropdown-menu { + margin: 0; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul > li .dropdown-menu li { + float: none; + border: none; +} +#header nav ul > li .dropdown-menu a { + color: #b8babf; + padding: 5px 15px; + text-shadow: 0 1px 0 #000; + background: none; +} +#header nav ul > li .dropdown-menu a:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li .btn-group.open .btn.dropdown-toggle { + color: #fff; + text-decoration: none; + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .btn .caret { + margin-left: 3px; + border-top-color: #b8babf; +} +#header nav ul > li .nav-search { + background-color: transparent; + border: none; + margin: 4px 0 4px 4px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .nav-search input { + height: 14px; + width: 100px; + margin: 0; + padding: 3px; + border-color: #fff; + -webkit-transition: width 0.3s ease; + -moz-transition: width 0.3s ease; + -o-transition: width 0.3s ease; + transition: width 0.3s ease; +} +#header nav ul > li .nav-search input:focus { + width: 180px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Main footer */ +#footer { + background-image: url("../img/assets/bg_footer.png"); + background-repeat: repeat-x; + background-position: top; + *zoom: 1; +} +#footer:before, +#footer:after { + display: table; + content: ""; + line-height: 0; +} +#footer:after { + clear: both; +} +#footer p { + margin: 20px 0 10px; + float: left; +} +#footer p a { + color: #525459; +} +#footer p a:hover { + color: #3a3b3e; +} +#footer p + ul { + margin-left: 10px; +} +#footer ul { + margin: 20px 0 0; + padding: 0; + list-style: none; + float: left; + *zoom: 1; +} +#footer ul:before, +#footer ul:after { + display: table; + content: ""; + line-height: 0; +} +#footer ul:after { + clear: both; +} +#footer ul li { + float: left; + display: block; +} +#footer ul li + li { + margin-left: 10px; +} +#footer .btn.btn-flat { + margin-top: 15px; + padding: 1px 8px; + font-size: 11.049999999999999px; +} +/* Navigation */ +.main-navigation { + margin-bottom: 20px; +} +.main-navigation > ul { + margin: 0; + list-style: none; + border-bottom: 1px solid #dedede; +} +.main-navigation > ul > li { + border-top: 1px solid #dedede; +} +.main-navigation > ul > li a { + color: #939699; + display: block; + background-repeat: no-repeat; +} +.main-navigation > ul > li > a { + line-height: 30px; +} +.main-navigation > ul > li > a:hover { + color: #40444d; + text-decoration: none; + background-color: #fafafa; +} +.main-navigation > ul > li > a:hover + ul { + background-color: #fafafa; +} +.main-navigation > ul > li > a [class^="awe-"], +.main-navigation > ul > li > a [class*=" awe-"] { + margin-right: 5px; + font-size: 15px; +} +.main-navigation > ul > li ul { + display: none; + margin: 0; + padding: 0 0 10px; + list-style: none; +} +.main-navigation > ul > li ul li.active a { + color: #525252; +} +.main-navigation > ul > li ul a { + line-height: 24px; + padding-left: 36px; + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: 22px 9px; +} +.main-navigation > ul > li ul a.current, +.main-navigation > ul > li ul a:hover { + color: #525252; + text-decoration: none; +} +.main-navigation > ul > li.current > a { + color: #40444d; +} +.main-navigation > ul > li.current > a [class^="awe-"], +.main-navigation > ul > li.current > a [class*=" awe-"] { + color: #40444d; +} +.main-navigation > ul > li.current > a + ul { + display: block; +} +/* Badge for navigation */ +.main-navigation .badge { + float: right; + padding: 1px 5px 2px; + margin: 7px 0 0 0; + font-size: 11.049999999999999px; + color: #ffffff; + background-color: #40444d; + cursor: help; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* User avatar */ +.user-profile { + margin-bottom: 20px; +} +.user-profile figure { + margin: 0; + *zoom: 1; +} +.user-profile figure:before, +.user-profile figure:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figure:after { + clear: both; +} +.user-profile img { + border: 1px solid #bec2c8; + background-color: #ffffff; + padding: 4px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + width: 60px; + height: 60px; +} +.user-profile figcaption { + float: right; + margin-left: 15px; + padding-top: 6px; + width: 130px; +} +.user-profile figcaption strong { + display: block; + line-height: 13px; +} +.user-profile figcaption strong a { + color: #525252; +} +.user-profile figcaption strong a:hover { + color: #000000; + text-decoration: none; +} +.user-profile figcaption em { + font-style: normal; + font-size: 9.75px; +} +.user-profile figcaption ul { + margin: 5px 0 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.user-profile figcaption ul:before, +.user-profile figcaption ul:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figcaption ul:after { + clear: both; +} +.user-profile figcaption ul > li { + float: left; + display: block; +} +.user-profile figcaption ul > li + li { + margin-left: 5px; +} +.user-profile figcaption ul .btn.btn-flat { + font-size: 11.049999999999999px; + padding: 1px 8px; +} +/* Side notes */ +.side-note { + background-image: url("../img/assets/bg-sidenote-top.png"); + background-repeat: no-repeat; + background-position: top center; + padding-top: 38px; + margin-bottom: 10px; +} +.side-note .side-note-container { + background-image: url("../img/assets/bg-sidenote-middle.png"); + background-repeat: repeat-y; + background-position: top center; + padding: 1px 20px 0; +} +.side-note .side-note-container p, +.side-note .side-note-container h2 { + margin: 0; + color: #807160; + line-height: 20px; + font-size: 11.049999999999999px; +} +.side-note .side-note-container h2 { + color: #665b4c; +} +.side-note .side-note-bottom { + background-image: url("../img/assets/bg-sidenote-bottom.png"); + background-repeat: no-repeat; + background-position: bottom center; + padding-bottom: 34px; +} +/* Balance */ +.balance { + border-top: 1px solid #dedede; + padding: 20px 0; +} +.balance h2 { + margin: 0; + font-size: 13px; + font-weight: normal; + line-height: normal; + color: #939699; +} +.balance strong { + font-size: 26px; + line-height: normal; + color: #525252; +} +/* Side search */ +.side-search { + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.side-search input { + width: 190px; + margin-bottom: 0; + padding-left: 14px; + padding-right: 14px; + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + line-height: normal; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; +} +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} +h1 { + font-size: 26px; + margin: 20px 0; +} +h2 { + font-size: 19.5px; + margin: 18px 0; +} +h3 { + font-size: 14.95px; + margin: 16px 0; +} +h4 { + font-size: 13px; + margin: 14px 0; +} +h5 { + font-size: 11.049999999999999px; + text-transform: uppercase; + margin: 12px 0; +} +h6 { + font-size: 9.75px; + text-transform: uppercase; + margin: 10px 0; +} +nav ul, +nav ol { + margin: 0; + padding: 0; + list-style: none; + list-style-image: none; +} +blockquote, +blockquote.pull-right { + clear: both; + margin: 0 0 20px; +} +blockquote small, +blockquote.pull-right small { + font-size: 10px; +} +code { + padding: 1px 3px; + background-color: #40444d; + border: 1px solid #000; + color: #ffffff; +} +pre { + border-color: #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); +} +.label { + padding: 1px 4px; +} +a.label:hover { + color: #ffffff; + background-color: #808080; + text-decoration: none; + cursor: pointer; +} +a.label-important:hover { + background-color: #953b39; +} +a.label-warning:hover { + background-color: #c67605; +} +a.label-success:hover { + background-color: #356635; +} +a.label-info:hover { + background-color: #2d6987; +} +a.label-inverse:hover { + background-color: #1a1a1a; +} +dl.dl-horizontal dt, +dl.dl-horizontal dd { + line-height: 21.599999999999998px; +} +dl.dl-horizontal dt { + width: 100px; +} +dl.dl-horizontal dd { + margin-left: 130px; +} +.data-block ol, +.data-block ul { + margin-bottom: 20px; +} +.data-block ol.checkmark, +.data-block ul.checkmark, +.data-block ol.crossmark, +.data-block ul.crossmark, +.data-block ol.pointmark, +.data-block ul.pointmark { + list-style: none; + margin-left: 0; +} +.data-block ol.checkmark li, +.data-block ul.checkmark li, +.data-block ol.crossmark li, +.data-block ul.crossmark li, +.data-block ol.pointmark li, +.data-block ul.pointmark li { + padding-left: 15px; + background-position: left 7px; + background-color: transparent; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_list_style_check.png"); +} +.data-block ol.crossmark li, +.data-block ul.crossmark li { + background-image: url("../img/icons/icon_list_style_cross.png"); +} +.data-block ol.pointmark li, +.data-block ul.pointmark li { + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: left 8px; +} +.data-block li { + line-height: 20px; +} +.well { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; +} +.well blockquote { + border-color: rgba(0, 0, 0, 0.15); +} +.well.large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well.small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* Content */ +/* Data block grid */ +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.span12 { + width: 700px; +} +.span11 { + width: 640px; +} +.span10 { + width: 580px; +} +.span9 { + width: 520px; +} +.span8 { + width: 460px; +} +.span7 { + width: 400px; +} +.span6 { + width: 340px; +} +.span5 { + width: 280px; +} +.span4 { + width: 220px; +} +.span3 { + width: 160px; +} +.span2 { + width: 100px; +} +.span1 { + width: 40px; +} +.offset12 { + margin-left: 740px; +} +.offset11 { + margin-left: 680px; +} +.offset10 { + margin-left: 620px; +} +.offset9 { + margin-left: 560px; +} +.offset8 { + margin-left: 500px; +} +.offset7 { + margin-left: 440px; +} +.offset6 { + margin-left: 380px; +} +.offset5 { + margin-left: 320px; +} +.offset4 { + margin-left: 260px; +} +.offset3 { + margin-left: 200px; +} +.offset2 { + margin-left: 140px; +} +.offset1 { + margin-left: 80px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.386363636363636%; + *margin-left: 2.3331721470019335%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.386363636363636%; +} +.row-fluid .span12 { + width: 99.88636363636363%; + *width: 99.83317214700192%; +} +.row-fluid .span11 { + width: 91.36363636363636%; + *width: 91.31044487427465%; +} +.row-fluid .span10 { + width: 82.84090909090908%; + *width: 82.78771760154737%; +} +.row-fluid .span9 { + width: 74.31818181818181%; + *width: 74.2649903288201%; +} +.row-fluid .span8 { + width: 65.79545454545453%; + *width: 65.74226305609282%; +} +.row-fluid .span7 { + width: 57.272727272727266%; + *width: 57.219535783365565%; +} +.row-fluid .span6 { + width: 48.74999999999999%; + *width: 48.69680851063829%; +} +.row-fluid .span5 { + width: 40.22727272727272%; + *width: 40.17408123791102%; +} +.row-fluid .span4 { + width: 31.70454545454545%; + *width: 31.65135396518375%; +} +.row-fluid .span3 { + width: 23.18181818181818%; + *width: 23.12862669245648%; +} +.row-fluid .span2 { + width: 14.659090909090907%; + *width: 14.605899419729205%; +} +.row-fluid .span1 { + width: 6.136363636363636%; + *width: 6.0831721470019335%; +} +.row-fluid .offset12 { + margin-left: 104.65909090909089%; + *margin-left: 104.55270793036748%; +} +.row-fluid .offset12:first-child { + margin-left: 102.27272727272727%; + *margin-left: 102.16634429400385%; +} +.row-fluid .offset11 { + margin-left: 96.13636363636363%; + *margin-left: 96.02998065764021%; +} +.row-fluid .offset11:first-child { + margin-left: 93.75%; + *margin-left: 93.64361702127658%; +} +.row-fluid .offset10 { + margin-left: 87.61363636363635%; + *margin-left: 87.50725338491293%; +} +.row-fluid .offset10:first-child { + margin-left: 85.22727272727272%; + *margin-left: 85.1208897485493%; +} +.row-fluid .offset9 { + margin-left: 79.09090909090908%; + *margin-left: 78.98452611218566%; +} +.row-fluid .offset9:first-child { + margin-left: 76.70454545454545%; + *margin-left: 76.59816247582204%; +} +.row-fluid .offset8 { + margin-left: 70.5681818181818%; + *margin-left: 70.46179883945838%; +} +.row-fluid .offset8:first-child { + margin-left: 68.18181818181817%; + *margin-left: 68.07543520309476%; +} +.row-fluid .offset7 { + margin-left: 62.04545454545454%; + *margin-left: 61.93907156673114%; +} +.row-fluid .offset7:first-child { + margin-left: 59.6590909090909%; + *margin-left: 59.5527079303675%; +} +.row-fluid .offset6 { + margin-left: 53.522727272727266%; + *margin-left: 53.41634429400386%; +} +.row-fluid .offset6:first-child { + margin-left: 51.136363636363626%; + *margin-left: 51.02998065764022%; +} +.row-fluid .offset5 { + margin-left: 44.99999999999999%; + *margin-left: 44.89361702127659%; +} +.row-fluid .offset5:first-child { + margin-left: 42.61363636363635%; + *margin-left: 42.50725338491295%; +} +.row-fluid .offset4 { + margin-left: 36.47727272727272%; + *margin-left: 36.37088974854932%; +} +.row-fluid .offset4:first-child { + margin-left: 34.090909090909086%; + *margin-left: 33.984526112185684%; +} +.row-fluid .offset3 { + margin-left: 27.954545454545453%; + *margin-left: 27.84816247582205%; +} +.row-fluid .offset3:first-child { + margin-left: 25.568181818181817%; + *margin-left: 25.461798839458414%; +} +.row-fluid .offset2 { + margin-left: 19.43181818181818%; + *margin-left: 19.325435203094777%; +} +.row-fluid .offset2:first-child { + margin-left: 17.045454545454543%; + *margin-left: 16.93907156673114%; +} +.row-fluid .offset1 { + margin-left: 10.909090909090907%; + *margin-left: 10.802707930367504%; +} +.row-fluid .offset1:first-child { + margin-left: 8.522727272727272%; + *margin-left: 8.416344294003867%; +} +[class*="span"] { + margin-bottom: 20px; +} +.data-block .row .row { + margin-left: -20px; + *zoom: 1; +} +.data-block .row .row:before, +.data-block .row .row:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .row .row:after { + clear: both; +} +.data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.data-block .row .container, +.data-block .row .navbar-static-top .container, +.data-block .row .navbar-fixed-top .container, +.data-block .row .navbar-fixed-bottom .container { + width: 652px; +} +.data-block .row .span12 { + width: 652px; +} +.data-block .row .span11 { + width: 596px; +} +.data-block .row .span10 { + width: 540px; +} +.data-block .row .span9 { + width: 484px; +} +.data-block .row .span8 { + width: 428px; +} +.data-block .row .span7 { + width: 372px; +} +.data-block .row .span6 { + width: 316px; +} +.data-block .row .span5 { + width: 260px; +} +.data-block .row .span4 { + width: 204px; +} +.data-block .row .span3 { + width: 148px; +} +.data-block .row .span2 { + width: 92px; +} +.data-block .row .span1 { + width: 36px; +} +.data-block .row .offset12 { + margin-left: 692px; +} +.data-block .row .offset11 { + margin-left: 636px; +} +.data-block .row .offset10 { + margin-left: 580px; +} +.data-block .row .offset9 { + margin-left: 524px; +} +.data-block .row .offset8 { + margin-left: 468px; +} +.data-block .row .offset7 { + margin-left: 412px; +} +.data-block .row .offset6 { + margin-left: 356px; +} +.data-block .row .offset5 { + margin-left: 300px; +} +.data-block .row .offset4 { + margin-left: 244px; +} +.data-block .row .offset3 { + margin-left: 188px; +} +.data-block .row .offset2 { + margin-left: 132px; +} +.data-block .row .offset1 { + margin-left: 76px; +} +.data-block .row > [class*="span"]:first-child { + margin-left: 0; +} +.data-block .data-container > *:last-child { + margin-bottom: 20px; +} +.data-block .row, +.data-block .row .row, +.data-block .row-fluid { + margin-left: 0; +} +.data-block.span1 [class*="span"], +.data-block.span2 [class*="span"], +.data-block.span3 [class*="span"] { + width: auto; + float: none; + margin: 0 0 20px 0; +} +/* Data blocks */ +.data-block { + position: relative; + margin-bottom: 20px; + color: #525459; +} +.data-block .data-container { + padding: 23px 23px 3px 23px; + background-color: #ffffff; + border: 1px solid #bec2c8; + *zoom: 1; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; +} +.data-block .data-container:before, +.data-block .data-container:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .data-container:after { + clear: both; +} +.data-block .data-container p { + line-height: 160%; +} +.data-block .data-container + .data-container { + margin-top: 20px; +} +.data-block > .data-block { + margin-top: 20px; +} +.data-block.decent .data-container { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} +.data-block.raw { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.raw .data-container { + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.raw.fit { + margin-top: 25px; +} +/* Data block header */ +.data-block header { + border-bottom: 1px solid #dedede; + padding-bottom: 10px; + margin-bottom: 20px; + *zoom: 1; +} +.data-block header:before, +.data-block header:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header:after { + clear: both; +} +.data-block header h1 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 21.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.data-block header h2 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 16.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +/* Data block footer */ +.data-block footer { + text-transform: uppercase; + font-size: 10px; + margin: 23px 0 20px; + color: #a4a5aa; +} +.data-block footer.info, +.data-block footer.warning { + padding-left: 22px; + background-position: left center; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_footer_info.png"); +} +.data-block footer.warning { + background-image: url("../img/icons/icon_footer_warning.png"); +} +.data-block footer p { + font-size: 10px; + line-height: normal; + margin: 0; +} +/* Page header */ +.page-header { + margin: 0 0 40px; + padding-bottom: 0; + border-bottom: none; +} +.page-header h1 { + margin: 0 0 20px; + line-height: normal; +} +/* Hero unit */ +.hero-unit { + margin-bottom: 20px; + -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); +} +.hero-unit h1 { + text-shadow: 0 1px 1px #000; + letter-spacing: normal; +} +/* Buttons */ +.btn { + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.btn.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.btn.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.btn.btn-alt { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); +} +.btn.btn-alt.btn-large { + -webkit-border-radius: 22px; + -moz-border-radius: 22px; + border-radius: 22px; +} +.btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); +} +.btn-group > .btn-alt { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn.btn-alt:first-child { + -webkit-border-top-left-radius: 18px; + -moz-border-radius-topleft: 18px; + border-top-left-radius: 18px; + -webkit-border-bottom-left-radius: 18px; + -moz-border-radius-bottomleft: 18px; + border-bottom-left-radius: 18px; +} +.btn-group > .btn.btn-alt:last-child, +.btn-group > .btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 18px; + -moz-border-radius-topright: 18px; + border-top-right-radius: 18px; + -webkit-border-bottom-right-radius: 18px; + -moz-border-radius-bottomright: 18px; + border-bottom-right-radius: 18px; +} +.btn-group > .btn.btn-large.btn-alt:first-child { + -webkit-border-top-left-radius: 22px; + -moz-border-radius-topleft: 22px; + border-top-left-radius: 22px; + -webkit-border-bottom-left-radius: 22px; + -moz-border-radius-bottomleft: 22px; + border-bottom-left-radius: 22px; +} +.btn-group > .btn.btn-large.btn-alt:last-child, +.btn-group > .btn-large.btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 22px; + -moz-border-radius-topright: 22px; + border-top-right-radius: 22px; + -webkit-border-bottom-right-radius: 22px; + -moz-border-radius-bottomright: 22px; + border-bottom-right-radius: 22px; +} +.btn.btn-flat { + padding: 5px 12px; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e6e6e6; + color: #939699; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat:hover, +.btn.btn-flat:active, +.btn.btn-flat.active, +.btn.btn-flat.disabled, +.btn.btn-flat[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat:active, +.btn.btn-flat.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-primary { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #40444d; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-primary:hover, +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active, +.btn.btn-flat.btn-primary.disabled, +.btn.btn-flat.btn-primary[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-warning { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #fbb450; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-warning:hover, +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active, +.btn.btn-flat.btn-warning.disabled, +.btn.btn-flat.btn-warning[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-danger { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e74949; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-danger:hover, +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active, +.btn.btn-flat.btn-danger.disabled, +.btn.btn-flat.btn-danger[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-success { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #6b9b20; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-success:hover, +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active, +.btn.btn-flat.btn-success.disabled, +.btn.btn-flat.btn-success[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-info { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #4986e7; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-info:hover, +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active, +.btn.btn-flat.btn-info.disabled, +.btn.btn-flat.btn-info[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-inverse { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #40444d; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-inverse:hover, +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active, +.btn.btn-flat.btn-inverse.disabled, +.btn.btn-flat.btn-inverse[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Tables */ +.table { + margin-bottom: 20px; +} +.table th, +.table td { + border-top: 1px dotted #dedede; +} +.table thead th { + border-bottom: 2px solid #bec2c8; +} +.table tbody th { + border-top: none; + border-right: 2px solid #bec2c8; +} +.table .btn-group { + float: right; + margin: 0; +} +.table.table-striped { + border-bottom: 1px dotted #dedede; +} +.table.table-striped tbody tr:nth-child(2n+1) td, +.table.table-striped tbody tr:nth-child(2n+1) th { + background-color: #f8f8f8; +} +.table.table-bordered { + border-bottom: 1px solid #dedede; +} +.table.table-bordered th, +.table.table-bordered td { + border-top: 1px solid #dedede; +} +.table.table-bordered thead th { + border-bottom: none; +} +.table [class*="span"] { + margin-left: 0; + float: none; +} +.table td.toolbar, +.table th.toolbar { + text-align: right; + padding: 4px; +} +.table td.toolbar .btn-flat, +.table th.toolbar .btn-flat { + padding: 4px 8px; +} +.table td.toolbar > a span, +.table th.toolbar > a span { + margin-top: 4px; +} +.table-media tr td { + vertical-align: middle; +} +.table-media tr td:first-child, +.table-media tr th:first-child { + width: 20px; + text-align: center; +} +.table-media .thumbnail { + display: table-cell; + width: 45px; + border-right: none; + border-bottom: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Forms */ +.data-block input[class*="span"], +.data-block select[class*="span"], +.data-block textarea[class*="span"], +.data-block .uneditable-input[class*="span"], +.data-block .row-fluid input[class*="span"], +.data-block .row-fluid select[class*="span"], +.data-block .row-fluid textarea[class*="span"], +.data-block .row-fluid .uneditable-input[class*="span"] { + float: none; + display: inline-block; + margin-left: 0; +} +form { + margin-bottom: 20px; + background: none; + border: 0px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; +} +legend { + padding: 20px 20px 0; + margin-bottom: 0; + border: none; + width: auto; +} +legend + .control-group { + margin-top: 0; +} +label { + font-weight: bold; + color: #525252; +} +label.radio, +label.checkbox { + font-weight: normal; + color: #525459; +} +.form-inline .control-label { + margin: 10px 0; +} +.form-inline .control-label:first-child { + margin-top: 0; +} +.form-horizontal .control-label { + text-align: left; +} +.form-search input { + margin-right: 5px; +} +.control-group, +.form-horizontal .control-group { + margin: 0; + padding: 20px; + border-bottom: 1px dashed #dedede; +} +.control-group:last-child, +.form-horizontal .control-group:last-child { + border: none; +} +.form-actions { + border: none; + background-color: transparent; + margin: 0; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +select:focus, +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: #bfbfbf; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); +} +input[type="radio"], +input[type="checkbox"] { + margin-top: 3px; +} +.ie8 .input-medium { + width: 110px; +} +.ie8 .input-small { + width: 70px; +} +.ie8 .input-mini { + width: 50px; +} +.ie8 .form-horizontal .control-label { + width: 120px; +} +.ie8 .form-horizontal .controls { + margin-left: 140px; +} +/* Bootstrap File & Image input */ +.btn-file { + position: relative; + overflow: hidden; + vertical-align: middle; +} +.btn-file > input { + position: absolute; + top: 0; + right: 0; + margin: 0; + cursor: pointer; + direction: ltr; + font-size: 23px; + transform: translate(-300px, 0) scale(4); + opacity: 0; + filter: alpha(opacity=0); +} +.fileupload { + padding-left: 0; + margin-bottom: 20px; +} +.fileupload h4 { + margin: 0 0 10px; +} +.fileupload .thumbnail { + display: inline-block; + margin-bottom: 5px; + overflow: hidden; + text-align: center; + vertical-align: middle; + background-color: #ffffff; +} +.fileupload .thumbnail > img { + display: block; + max-height: 100%; + vertical-align: middle; +} +.fileupload .thumbnail.fileupload-small { + width: 50px; + height: 50px; +} +.fileupload .thumbnail.fileupload-small.flexible { + width: auto; + height: auto; + max-width: 75px; + max-height: 75px; +} +.fileupload .thumbnail.fileupload-large { + width: 250px; + height: 150px; +} +.fileupload .thumbnail.fileupload-large.flexible { + width: auto; + height: auto; + max-width: 350px; + max-height: 250px; +} +.fileupload .thumbnail + .btn { + margin-bottom: 5px; +} +.fileupload .thumbnail + .btn + .btn { + margin-bottom: 5px; +} +.fileupload .raw.thumbnail { + padding: 0; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.fileupload .btn { + vertical-align: middle; +} +.fileupload .uneditable-input { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + cursor: text; +} +.fileupload-exists .fileupload-new, +.fileupload-new .fileupload-exists { + display: none; +} +.fileupload-new .input-append .btn-file { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.fileupload-exists .input-append .btn-file { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Form gallery */ +.form-gallery { + background: none; + border: none; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.form-gallery li input[type="checkbox"] { + margin: 0; + position: absolute; + top: 10px; + left: 10px; +} +.form-gallery .thumbnails .thumbnail { + background-color: #ffffff; +} +.form-gallery .thumbnails .thumbnail.active { + border-color: #40444d; + background-color: #575d69; +} +.form-gallery .form-actions { + padding: 0; + margin: 0; + border: none; + background: none; +} +.form-gallery .form-actions [class*="span"] { + margin-bottom: 0; +} +/* Gallery */ +.thumbnails .row { + margin-left: -20px; + *zoom: 1; +} +.thumbnails .row:before, +.thumbnails .row:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails .row:after { + clear: both; +} +.thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.thumbnails .container, +.thumbnails .navbar-static-top .container, +.thumbnails .navbar-fixed-top .container, +.thumbnails .navbar-fixed-bottom .container { + width: 640px; +} +.thumbnails .span12 { + width: 640px; +} +.thumbnails .span11 { + width: 585px; +} +.thumbnails .span10 { + width: 530px; +} +.thumbnails .span9 { + width: 475px; +} +.thumbnails .span8 { + width: 420px; +} +.thumbnails .span7 { + width: 365px; +} +.thumbnails .span6 { + width: 310px; +} +.thumbnails .span5 { + width: 255px; +} +.thumbnails .span4 { + width: 200px; +} +.thumbnails .span3 { + width: 145px; +} +.thumbnails .span2 { + width: 90px; +} +.thumbnails .span1 { + width: 35px; +} +.thumbnails .offset12 { + margin-left: 680px; +} +.thumbnails .offset11 { + margin-left: 625px; +} +.thumbnails .offset10 { + margin-left: 570px; +} +.thumbnails .offset9 { + margin-left: 515px; +} +.thumbnails .offset8 { + margin-left: 460px; +} +.thumbnails .offset7 { + margin-left: 405px; +} +.thumbnails .offset6 { + margin-left: 350px; +} +.thumbnails .offset5 { + margin-left: 295px; +} +.thumbnails .offset4 { + margin-left: 240px; +} +.thumbnails .offset3 { + margin-left: 185px; +} +.thumbnails .offset2 { + margin-left: 130px; +} +.thumbnails .offset1 { + margin-left: 75px; +} +.thumbnails li { + margin: 0; + position: relative; + margin-bottom: 20px; + margin-left: 20px; +} +.thumbnails li .thumbnail-actions { + margin: 0; + display: block; + position: absolute; + bottom: 10px; + right: 10px; + font-size: 11.049999999999999px; + list-style: none; + color: #ffffff; + background-color: #40444d; + opacity: 0; + filter: alpha(opacity=0); +} +.thumbnails li .thumbnail-actions li { + margin: 0; + display: inline-block; +} +.thumbnails li .thumbnail-actions li a { + padding: 2px 4px 3px; + display: block; + color: #ffffff; + opacity: 0.8; + filter: alpha(opacity=80); +} +.thumbnails li .thumbnail-actions li a:hover { + opacity: 1; + filter: alpha(opacity=100); + text-decoration: none; +} +.thumbnails li:hover .thumbnail-actions { + opacity: 0.85; + filter: alpha(opacity=85); +} +.thumbnail + p { + margin-top: 20px; +} +.data-block .thumbnails { + margin-bottom: 0; +} +.data-block .thumbnails.row-fluid { + margin-left: 0; +} +.data-block .thumbnails .thumbnail { + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block .thumbnails.raw .thumbnail { + border: none; + padding: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); +} +.data-block.raw .thumbnails { + margin-left: auto; + margin-right: auto; +} +.data-block.raw section > * + .thumbnails { + margin-top: 20px; +} +/* Icons */ +[class^="awe-"], +[class*=" awe-"] { + height: auto; + width: auto; + line-height: normal; + vertical-align: middle; + background-image: none; + padding-right: 7px; +} +/* Alerts */ +.alert h4 { + margin: 0; +} +.alert.alert-white { + background-color: #ffffff; + border-color: #dedede; + color: #525459; +} +.alert.alert-inverse { + background-color: #40444d; + border-color: #000; + color: #ffffff; + text-shadow: none; +} +.alert.alert-inverse .close { + color: white; +} +.raw .alert { + -webkit-box-shadow: '0 1px 0 #fff'; + -moz-box-shadow: '0 1px 0 #fff'; + box-shadow: '0 1px 0 #fff'; +} +form .alert { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Accordion */ +.data-block section .accordion .accordion-group { + margin: 0; + border-color: #dedede; + border-width: 0 1px 1px 1px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block section .accordion .accordion-group:first-child { + border-width: 1px; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.data-block section .accordion .accordion-group:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.data-block section .accordion .accordion-toggle { + font-weight: bold; + font-size: 16px; + color: #525252; +} +.data-block section .accordion .accordion-toggle:hover { + color: #40444d; + text-decoration: none; +} +.data-block.raw .accordion-toggle { + background-color: #ffffff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block.raw .accordion-toggle:hover { + background-color: #40444d; + color: #ffffff; + text-decoration: none; +} +.accordion .collapse { + overflow: hidden; +} +/* Progress bars */ +.progress { + margin-bottom: 10px; + background-image: none; + border: 1px solid #e0e0e0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.progress:last-child { + margin-bottom: 0; +} +.progress .bar:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.progress.progress-line { + height: 9px; +} +.progress-inverse .bar { + background-color: #484d54; + background-image: -moz-linear-gradient(top, #565c64, #33363b); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#565c64), to(#33363b)); + background-image: -webkit-linear-gradient(top, #565c64, #33363b); + background-image: -o-linear-gradient(top, #565c64, #33363b); + background-image: linear-gradient(to bottom, #565c64, #33363b); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff565c64', endColorstr='#ff33363b', GradientType=0); +} +.progress-inverse.progress-striped .bar { + background-color: #565c64; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +/* Pagination */ +.pagination { + height: auto; +} +.pagination ul { + margin-top: -5px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + *zoom: 1; +} +.pagination ul:before, +.pagination ul:after { + display: table; + content: ""; + line-height: 0; +} +.pagination ul:after { + clear: both; +} +.pagination ul li { + display: block; + float: left; + margin-top: 5px; + margin-right: 4px; +} +.pagination ul li:first-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li:last-child { + margin-right: 0; +} +.pagination ul li:last-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li a { + border-width: 1px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + line-height: 24px; + padding: 0 10px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pagination ul li.disabled > span, +.pagination ul li.disabled a, +.pagination ul li.disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pagination ul li a:hover, +.pagination ul li.active a { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.pagination ul li [class^="awe-"], +.pagination ul li [class*=" awe-"], +.pagination ul li [class^="icon-"], +.pagination ul li [class*=" icon-"], +.pagination ul li [class^="fam-"], +.pagination ul li [class*=" fam-"] { + float: none; + border: none; + padding: 0; + background-color: transparent; + line-height: 0; +} +.pager .disabled a, +.pager .disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pager li > a { + padding: 4px 14px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pager li > a:hover { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +/* Tabs */ +.nav-tabs > li { + margin-bottom: 0; +} +.tabs-left .tab-content { + margin: 0; + padding-left: 20px; + border-left: 1px solid #dedede; +} +.tabs-left > .nav-tabs { + border-right: 1px solid #dedede; + margin-right: -1px; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + color: #40444d; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-left > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: transparent #dedede transparent transparent; + background-color: #ffffff; + color: #40444d; +} +.tabs-right .tab-content { + padding-right: 20px; + border-right: 1px solid #dedede; +} +.tabs-right > .nav-tabs { + border-left: 1px solid #dedede; + margin-left: -1px; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + color: #40444d; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-right > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: transparent transparent transparent #dedede; + background-color: #ffffff; + color: #40444d; +} +.tab-content { + overflow: visible; +} +.tabbable .tab-content { + overflow: auto; +} +/* Popover */ +.popover .popover-title { + margin: 0; +} +/* Modal */ +.modal .modal-header * { + margin: 0; +} +.modal .modal-header > .close { + margin-top: 2px; +} +/* Loading */ +.loading { + display: inline-block; + background-image: url("../img/icons/loading_dark.gif"); + background-repeat: no-repeat; + background-position: center; + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + width: 24px; + height: 24px; +} +.loading.dark { + background-image: url("../img/icons/loading_dark.gif"); +} +.loading.red { + background-image: url("../img/icons/loading_red.gif"); +} +.loading.green { + background-image: url("../img/icons/loading_green.gif"); +} +.loading.blue { + background-image: url("../img/icons/loading_blue.gif"); +} +/* Data block components */ +/* Data block header controls */ +.data-block header h2 + .btn, +.data-block header h2 + .btn-group, +.data-block header .data-header-actions { + float: right; + margin: -5px 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.data-block header h2 + .btn:before, +.data-block header h2 + .btn-group:before, +.data-block header .data-header-actions:before, +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + clear: both; +} +.data-block header h2 + .btn li, +.data-block header h2 + .btn-group li, +.data-block header .data-header-actions li { + float: left; + display: block; +} +.data-block header h2 + .btn li + li, +.data-block header h2 + .btn-group li + li, +.data-block header .data-header-actions li + li { + margin-left: 5px; +} +.data-block header h2 + .btn li.active .btn, +.data-block header h2 + .btn-group li.active .btn, +.data-block header .data-header-actions li.active .btn { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-primary { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-warning { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-danger { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-success, +.data-block header .data-header-actions li.active .btn.btn-success { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-info, +.data-block header .data-header-actions li.active .btn.btn-info { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-inverse { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat, +.data-block header h2 + .btn-group li.active .btn.btn-flat, +.data-block header .data-header-actions li.active .btn.btn-flat { + background-color: #d9d9d9; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-primary { + background-color: #1d1f23; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-warning { + background-color: #f89406; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-danger { + background-color: #c91b1b; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-success, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-success { + background-color: #3f5c13; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-info, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-info { + background-color: #1b5ec9; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-inverse { + background-color: #1d1f23; +} +.data-block header h2 + .btn li.active .btn.btn-alt, +.data-block header h2 + .btn-group li.active .btn.btn-alt, +.data-block header .data-header-actions li.active .btn.btn-alt { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-success, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-info, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.data-block header h2 + .btn li .loading, +.data-block header h2 + .btn-group li .loading, +.data-block header .data-header-actions li .loading { + display: block; +} +.data-block.raw header .data-header-actions { + margin: 0; +} +/* Data block header search */ +.data-block header .header-search { + display: inline; + float: right; + background-color: transparent; + border: none; + margin: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block header .header-search input { + margin: 0; + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Data accordion block */ +.data-block.accordion-block .accordion { + margin-bottom: 0; +} +.data-block.accordion-block .data-container { + padding: 0; +} +.data-block.accordion-block .accordion-group { + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.accordion-block .accordion-group + .accordion-group { + border-top: 1px solid #e5e5e5; +} +.data-block.accordion-block .accordion-toggle { + color: #525252; + font-size: 16px; + font-weight: bold; + line-height: normal; +} +.data-block.accordion-block .accordion-toggle:hover { + color: #40444d; + text-decoration: none; +} +/* Data todo block */ +.data-block.todo-block header { + margin-bottom: 0; +} +.data-block.todo-block form { + margin: 0; + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.todo-block table { + margin: 0; +} +.data-block.todo-block table tr:first-child td { + border-top: 0; +} +.data-block.todo-block table tr.done { + opacity: 0.4; + filter: alpha(opacity=40); +} +.data-block.todo-block table tr.done p { + text-decoration: line-through; +} +.data-block.todo-block table tr.done:hover { + opacity: 1; + filter: alpha(opacity=100); +} +.data-block.todo-block table tr p { + margin: 0; + line-height: normal; +} +.data-block.todo-block table tr p + span { + font-size: 9.75px; + color: #a4a5aa; +} +.data-block.todo-block table tr input { + margin-top: 0; +} +/* Wizard */ +.wizard { + overflow: visible; +} +.wizard .stepContainer { + display: block; + position: relative; + overflow: hidden; + height: 100%; +} +.wizard .stepContainer > div.content { + margin: 0; + padding: 20px; + display: block; + position: absolute; + text-align: left; + overflow: visible; + z-index: 88; +} +.wizard .stepContainer .StepTitle { + display: block; + z-index: 88; + *zoom: 1; +} +.wizard .stepContainer .StepTitle:before, +.wizard .stepContainer .StepTitle:after { + display: table; + content: ""; + line-height: 0; +} +.wizard .stepContainer .StepTitle:after { + clear: both; +} +.wizard ul.anchor { + margin: 0 0 10px; + text-align: center; + background-color: #f5f5f5; + border: 1px solid #dedede; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.wizard ul.anchor li { + margin-left: 20px; + display: inline-block; +} +.wizard ul.anchor li:first-child { + margin: 0; +} +.wizard ul.anchor li a { + display: block; + font-size: 15px; + line-height: 36px; + text-decoration: none; + outline-style: none; + *zoom: 1; + z-index: 99; +} +.wizard ul.anchor li a:before, +.wizard ul.anchor li a:after { + display: table; + content: ""; + line-height: 0; +} +.wizard ul.anchor li a:after { + clear: both; +} +.wizard ul.anchor li a.selected { + color: #40444d; + cursor: text; +} +.wizard ul.anchor li a.done { + color: #40444d; + text-decoration: line-through; +} +.wizard ul.anchor li a.done .stepDesc { + color: #40444d; +} +.wizard ul.anchor li a.disabled { + color: #939699; + cursor: text; +} +.wizard > div.actionBar { + margin-top: 6.666666666666667px; + display: block; + text-align: left; + overflow: auto; + z-index: 88; + *zoom: 1; +} +.wizard > div.actionBar:before, +.wizard > div.actionBar:after { + display: table; + content: ""; + line-height: 0; +} +.wizard > div.actionBar:after { + clear: both; +} +.wizard .buttonDisabled { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + cursor: text !important; +} +.wizard .buttonNext, +.wizard .buttonPrevious, +.wizard .buttonFinish { + display: block; + text-decoration: none; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + *background-color: #e6e6e6; + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #40434d; + background-image: -moz-linear-gradient(top, #40444d, #40414d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#40414d)); + background-image: -webkit-linear-gradient(top, #40444d, #40414d); + background-image: -o-linear-gradient(top, #40444d, #40414d); + background-image: linear-gradient(to bottom, #40444d, #40414d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff40414d', GradientType=0); + border-color: #40414d #40414d #1d1e23; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #40414d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #cccccc \9; +} +.wizard .buttonNext:first-child, +.wizard .buttonPrevious:first-child, +.wizard .buttonFinish:first-child { + *margin-left: 0; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.wizard .buttonNext .label, +.wizard .buttonPrevious .label, +.wizard .buttonFinish .label, +.wizard .buttonNext .badge, +.wizard .buttonPrevious .badge, +.wizard .buttonFinish .badge { + position: relative; + top: -1px; +} +.wizard .buttonNext [class^="awe-"], +.wizard .buttonPrevious [class^="awe-"], +.wizard .buttonFinish [class^="awe-"], +.wizard .buttonNext [class*=" awe-"], +.wizard .buttonPrevious [class*=" awe-"], +.wizard .buttonFinish [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.wizard .buttonNext [class^="awe-"].awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-large, +.wizard .buttonFinish [class^="awe-"].awe-large, +.wizard .buttonNext [class*=" awe-"].awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-large { + line-height: .9em; +} +.wizard .buttonNext [class^="awe-"].awe-spin, +.wizard .buttonPrevious [class^="awe-"].awe-spin, +.wizard .buttonFinish [class^="awe-"].awe-spin, +.wizard .buttonNext [class*=" awe-"].awe-spin, +.wizard .buttonPrevious [class*=" awe-"].awe-spin, +.wizard .buttonFinish [class*=" awe-"].awe-spin { + display: inline-block; +} +.wizard .buttonNext [class^="awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-left.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonNext [class^="awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-right.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.wizard .buttonNext [class^="awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class^="awe-"].awe-spin.awe-large, +.wizard .buttonNext [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.wizard .buttonNext.btn-mini, +.wizard .buttonPrevious.btn-mini, +.wizard .buttonFinish.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.wizard .buttonNext.btn-small, +.wizard .buttonPrevious.btn-small, +.wizard .buttonFinish.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.wizard .buttonNext.btn-large, +.wizard .buttonPrevious.btn-large, +.wizard .buttonFinish.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #ffffff; + background-color: #40414d; + *background-color: #34353f; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #292931 \9; +} +.wizard .buttonNext .caret, +.wizard .buttonPrevious .caret, +.wizard .buttonFinish .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.wizard .buttonNext { + float: right; + margin-right: 5px; +} +.wizard .buttonPrevious { + float: left; +} +.wizard .buttonFinish { + float: right; +} +.wizard .loader { + position: relative; + display: none; + float: left; + margin: 2px 0 0 2px; + padding: 8px 10px 8px 40px; + z-index: 998; +} +/* Widgets */ +.widgets { + text-align: center; + list-style: none; + *zoom: 1; +} +.widgets:before, +.widgets:after { + display: table; + content: ""; + line-height: 0; +} +.widgets:after { + clear: both; +} +.widgets > li { + min-height: 90px; + text-align: center; + border-right: 1px dotted #dedede; +} +.widgets > li:last-child { + border-right: none; +} +.widgets > li > a .widget-label { + color: #999999; +} +.widgets > li > a:hover { + text-decoration: none; +} +.widgets > li > a:hover strong { + color: #40444d; +} +.widgets > li .widget-label { + display: block; + margin: 20px 0 5px; + color: #999999; + text-transform: uppercase; +} +.widgets > li strong { + display: block; + color: #525252; + font-size: 19px; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline { + display: block; + margin: 5px auto; +} +.widgets > li .sparkline canvas { + display: block !important; + margin: 0 auto; +} +.widgets > li .sparkline + strong, +.widgets > li .sparkline + a { + color: #525252; + font-size: 13px; + font-weight: normal; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline + a:hover { + color: #40444d; +} +.ie8 .widgets [class*="span"] { + margin: 0; + width: 150px; +} +.filter-bar .form-inline { + margin-bottom: 0; +} +.filter-bar .form-inline .control-group, +.filter-bar .form-inline .controls { + display: inline-block; +} +.filter-bar .form-inline .control-group { + border-bottom: none; + border-right: 1px dashed #dedede; +} +.filter-bar .form-inline .control-group:last-child { + border-right: none; +} +.filter-bar .form-inline .note-inline { + margin-left: 10px; +} +.filter-bar .form-inline .note-inline:first-child { + margin-left: 0; +} +.filter-bar .form-inline .control-label { + margin: 0 10px 0 0; +} +.filter-bar .form-inline .input-mini { + width: 30px; +} +.breadcrumb { + padding: 0; +} +/* Plugins */ +.has-switch { + display: inline-block; + cursor: pointer; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + min-width: 100px; +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch > div.switch-off { + left: -49%; +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch span.switch-mini, +.has-switch label.switch-mini { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch span.switch-small, +.has-switch label.switch-small { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch span.switch-large, +.has-switch label.switch-large { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch label { + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 34%; + border-left: 1px solid #bbbbbb; + border-right: 1px solid #bbbbbb; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch label:hover, +.has-switch label:focus, +.has-switch label:active, +.has-switch label.active, +.has-switch label.disabled, +.has-switch label[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.has-switch label:active, +.has-switch label.active { + background-color: #cccccc \9; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33%; +} +.has-switch span.switch-left { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.has-switch span.switch-right { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-right:hover, +.has-switch span.switch-right:focus, +.has-switch span.switch-right:active, +.has-switch span.switch-right.active, +.has-switch span.switch-right.disabled, +.has-switch span.switch-right[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-right:active, +.has-switch span.switch-right.active { + background-color: #e6e6e6 \9; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #40424d; + background-image: -moz-linear-gradient(top, #40414d, #40444d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40414d), to(#40444d)); + background-image: -webkit-linear-gradient(top, #40414d, #40444d); + background-image: -o-linear-gradient(top, #40414d, #40444d); + background-image: linear-gradient(to bottom, #40414d, #40444d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40414d', endColorstr='#ff40444d', GradientType=0); + border-color: #40444d #40444d #1d1f23; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #40444d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-primary:hover, +.has-switch span.switch-left:hover, +.has-switch span.switch-primary:focus, +.has-switch span.switch-left:focus, +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active, +.has-switch span.switch-primary.disabled, +.has-switch span.switch-left.disabled, +.has-switch span.switch-primary[disabled], +.has-switch span.switch-left[disabled] { + color: #ffffff; + background-color: #40444d; + *background-color: #34383f; +} +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active { + background-color: #292b31 \9; +} +.has-switch span.switch-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #496ee7; + background-image: -moz-linear-gradient(top, #495fe7, #4986e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#495fe7), to(#4986e7)); + background-image: -webkit-linear-gradient(top, #495fe7, #4986e7); + background-image: -o-linear-gradient(top, #495fe7, #4986e7); + background-image: linear-gradient(to bottom, #495fe7, #4986e7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff495fe7', endColorstr='#ff4986e7', GradientType=0); + border-color: #4986e7 #4986e7 #1b5ec9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4986e7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-info:hover, +.has-switch span.switch-info:focus, +.has-switch span.switch-info:active, +.has-switch span.switch-info.active, +.has-switch span.switch-info.disabled, +.has-switch span.switch-info[disabled] { + color: #ffffff; + background-color: #4986e7; + *background-color: #3277e4; +} +.has-switch span.switch-info:active, +.has-switch span.switch-info.active { + background-color: #1d68e0 \9; +} +.has-switch span.switch-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #59821b; + background-image: -moz-linear-gradient(top, #4e7117, #6b9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e7117), to(#6b9b20)); + background-image: -webkit-linear-gradient(top, #4e7117, #6b9b20); + background-image: -o-linear-gradient(top, #4e7117, #6b9b20); + background-image: linear-gradient(to bottom, #4e7117, #6b9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e7117', endColorstr='#ff6b9b20', GradientType=0); + border-color: #6b9b20 #6b9b20 #3f5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #6b9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-success:hover, +.has-switch span.switch-success:focus, +.has-switch span.switch-success:active, +.has-switch span.switch-success.active, +.has-switch span.switch-success.disabled, +.has-switch span.switch-success[disabled] { + color: #ffffff; + background-color: #6b9b20; + *background-color: #5c861c; +} +.has-switch span.switch-success:active, +.has-switch span.switch-success.active { + background-color: #4e7117 \9; +} +.has-switch span.switch-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f9a123; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0); + border-color: #fbb450 #fbb450 #f89406; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #fbb450; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-warning:hover, +.has-switch span.switch-warning:focus, +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active, +.has-switch span.switch-warning.disabled, +.has-switch span.switch-warning[disabled] { + color: #ffffff; + background-color: #fbb450; + *background-color: #faa937; +} +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active { + background-color: #fa9f1e \9; +} +.has-switch span.switch-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e32f2f; + background-image: -moz-linear-gradient(top, #e01d1d, #e74949); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e01d1d), to(#e74949)); + background-image: -webkit-linear-gradient(top, #e01d1d, #e74949); + background-image: -o-linear-gradient(top, #e01d1d, #e74949); + background-image: linear-gradient(to bottom, #e01d1d, #e74949); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe01d1d', endColorstr='#ffe74949', GradientType=0); + border-color: #e74949 #e74949 #c91b1b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e74949; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-danger:hover, +.has-switch span.switch-danger:focus, +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active, +.has-switch span.switch-danger.disabled, +.has-switch span.switch-danger[disabled] { + color: #ffffff; + background-color: #e74949; + *background-color: #e43232; +} +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active { + background-color: #e01d1d \9; +} +/* jQuery FullCalendar */ +.full-calendar .fc-header { + margin-bottom: 10px; +} +.full-calendar .fc-header h2 { + margin: 0; +} +.full-calendar .fc-content { + background-color: #FFFBEA; +} +.full-calendar .fc-button.fc-state-default { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.full-calendar .fc-button.fc-state-default:hover, +.full-calendar .fc-button.fc-state-default:focus, +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active, +.full-calendar .fc-button.fc-state-default.disabled, +.full-calendar .fc-button.fc-state-default[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-active { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-image: none; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + outline: 0; +} +.full-calendar .fc-button.fc-state-active:hover, +.full-calendar .fc-button.fc-state-active:focus, +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active, +.full-calendar .fc-button.fc-state-active.disabled, +.full-calendar .fc-button.fc-state-active[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-disabled { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + cursor: default; + background-image: none; + background-color: #e6e6e6; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-state-disabled:active { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-corner-left { + margin-left: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -moz-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.full-calendar .fc-button.fc-corner-right { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + -moz-border-bottom-right-radius: 3px; + -moz-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.full-calendar .fc-state-default .fc-button-inner { + background: transparent; + border-width: 0; +} +.full-calendar .fc-button-content { + line-height: 18px; + height: 18px; + padding: 0; +} +.full-calendar .fc-state-default .fc-button-effect span { + display: none; +} +.full-calendar .fc-state-default, +.full-calendar .fc-state-default .fc-button-inner { + color: #525459; +} +.full-calendar .fc-state-active .fc-button-inner { + color: #525459; +} +.full-calendar .fc-button-content [class^="awe-"], +.full-calendar .fc-button-content [class*=" awe-"] { + font-size: 15px; +} +.full-calendar .fc-state-highlight { + background-color: #ffffff; +} +.full-calendar .fc-widget-header, +.full-calendar .fc-widget-content { + border-color: #dedacb; +} +.full-calendar .fc-widget-header { + padding: 5px 0; + color: #665B4C; +} +/* jQuery FullCalendar event style */ +.full-calendar .fc-event { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar a.fc-event:hover { + text-decoration: none; +} +.full-calendar .fc-event-skin { + border: none; + background-color: #40444d; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar .fc-event-skin > span:first-child { + margin-left: 3px; +} +/* jQuery Visualize */ +.visualize { + margin: 50px auto 30px; + margin-bottom: 30px !important; + background-color: transparent; + border: none; + width: 100%; +} +.visualize.visualize-pie { + margin-bottom: 0 !important; +} +.visualize .visualize-info { + border: none; + padding: 0; + font-size: 11.049999999999999px; + right: auto; + left: -10px; + top: -48px; + background-color: transparent; + opacity: 1; + filter: alpha(opacity=100); +} +.visualize .visualize-title { + font-weight: bold; + margin-bottom: 0; + color: #525252; +} +p + table + .visualize { + margin-top: 70px; +} +.visualize .label { + padding: 0; + background-color: transparent; + font-size: 9.75px; + font-weight: normal; + line-height: 14px; + text-shadow: none; + color: #999999; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; +} +.content .page-container [class*="span"] .visualize { + margin: 20px 0 20px auto; +} +.ie8 .visualize-interaction-tracker { + margin-top: 0 !important; +} +/* jQuery Flot */ +.flot { + margin: 10px auto; + min-height: 280px; + height: 280px; +} +.flot .legend { + padding: 0 2px; +} +.modal-open { + overflow: hidden; +} +.modal-open.page-overflow .page-container, +.modal-open.page-overflow .page-container .navbar-fixed-top, +.modal-open.page-overflow .page-container .navbar-fixed-bottom, +.modal-open.page-overflow .modal-scrollable { + overflow-y: scroll; +} +.modal-scrollable { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + overflow: auto; +} +.modal { + outline: none; + position: absolute; + margin-top: 0; + top: 50%; + overflow: visible; +} +.modal.fade { + top: -100%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; +} +.modal.fade.in { + top: 50%; +} +.modal.container { + width: 940px; + margin-left: -470px; +} +.modal.modal-absolute { + position: absolute; + z-index: 950; +} +.modal .loading-mask { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fff; + border-radius: 6px; +} +.modal-body { + max-height: none; + overflow: visible; +} +.modal-backdrop.modal-absolute { + position: absolute; + z-index: 940; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.7; + filter: alpha(opacity=70); + background: #000; +} +.modal-overflow.modal { + top: 1%; +} +.modal-overflow.modal.fade { + top: -100%; +} +.modal-overflow.modal.fade.in { + top: 1%; +} +.modal-overflow .modal-body { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +@media (min-width: 1200px) { + .modal.container { + width: 1170px; + margin-left: -585px; + } +} +@media (max-width: 979px) { + .modal-open.page-overflow .page-container .navbar-fixed-top, + .modal-open.page-overflow .page-container .navbar-fixed-bottom { + overflow-y: visible; + } + .modal, + .modal.container, + .modal.modal-overflow { + top: 1%; + right: 1%; + left: 1%; + bottom: auto; + width: auto !important; + height: auto !important; + margin: 0 !important; + padding: 0 !important; + } + .modal.fade.in, + .modal.container.fade.in, + .modal.modal-overflow.fade.in { + top: 1%; + bottom: auto; + } + .modal-body, + .modal-overflow .modal-body { + position: static; + margin: 0; + height: auto !important; + max-height: none !important; + overflow: visible !important; + } + .modal-footer, + .modal-overflow .modal-footer { + position: static; + } +} +.loading-spinner { + position: absolute; + top: 50%; + left: 50%; + margin: -12px 0 0 -12px; +} +.animated { + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} +@-webkit-keyframes shake { + 0%, + 100% { + -webkit-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + } +} +@-moz-keyframes shake { + 0%, + 100% { + -moz-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -moz-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -moz-transform: translateX(10px); + } +} +@-o-keyframes shake { + 0%, + 100% { + -o-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -o-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -o-transform: translateX(10px); + } +} +@keyframes shake { + 0%, + 100% { + transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + transform: translateX(10px); + } +} +.shake { + -webkit-animation-name: shake; + -moz-animation-name: shake; + -o-animation-name: shake; + animation-name: shake; +} +.elfinder { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.elfinder .elfinder-navbar { + height: 100%; + background: #f5f5f5; + border-color: #dedede; +} +.elfinder .elfinder-navbar .ui-state-hover { + background: transparent; + border-color: transparent; +} +.elfinder .elfinder-navbar .ui-state-active { + color: #ffffff; + background: #a6a6a6; + border-color: #999999; +} +.elfinder .elfinder-button-search.elfinder-button { + width: 192px; + margin: 0; +} +.elfinder .elfinder-button-search.elfinder-button input { + margin: 0; + padding-left: 20px; +} +.elfinder .elfinder-button-search.elfinder-button .ui-icon-close { + margin-right: 6.666666666666667px; +} +.elfinder .elfinder-statusbar { + color: #555555; +} +.elfinder .elfinder-statusbar a { + text-decoration: none; + color: #555555; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder .elfinder-cwd table td.ui-state-hover, +.elfinder .elfinder-button-menu .ui-state-hover { + color: #ffffff; + background: #40444d; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover { + background: #eeeeee; +} +.elfinder .elfinder-cwd table tr { + border-top: 1px dotted #dedede; +} +.elfinder .elfinder-cwd table tr:nth-child(odd) { + background-color: #f8f8f8; +} +.elfinder-disabled .elfinder-navbar .ui-state-active { + color: #eeeeee; + background: #bfbfbf; + border-color: #b3b3b3; +} +.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder-disabled .elfinder-cwd table td.ui-state-hover { + background: #bfbfbf; +} +.elfinder-contextmenu .ui-state-hover { + background: #3875d7; + color: #fff; +} +.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow { + background-image: url('../img/arrows-active.png'); +} +#elfinder .elfinder-cwd-view-icons .elfinder-cwd-file { + width: 120px; + height: 95px; +} +.elfinder { + border-color: #dedede; +} +.elfinder .ui-widget-header { + background: #f5f5f5; + border-color: #dedede; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +/* jQuery DataTables */ +.dataTables_wrapper > .row:first-child, +.dataTables_wrapper > .row-fluid:first-child { + margin-bottom: 10px; +} +.dataTables_wrapper .row [class*="span"], +.dataTables_wrapper .row-fluid [class*="span"] { + margin-bottom: 0; +} +.dataTables_wrapper table.table { + clear: both; + margin-bottom: 10px; +} +.dataTables_wrapper div.dataTables_length label { + float: left; + text-align: left; +} +.dataTables_wrapper div.dataTables_length select { + width: 75px; +} +.dataTables_wrapper div.dataTables_filter label { + float: right; +} +.dataTables_wrapper .dataTables_paginate { + margin: 0; + float: right; +} +.dataTables_wrapper table thead .sorting, +.dataTables_wrapper table thead .sorting_asc, +.dataTables_wrapper table thead .sorting_desc, +.dataTables_wrapper table thead .sorting_asc_disabled, +.dataTables_wrapper table thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} +.dataTables_wrapper table.table thead .sorting { + background-image: url("../img/plugins/dataTables/sort_both.png"); +} +.dataTables_wrapper table.table thead .sorting_asc { + background-image: url("../img/plugins/dataTables/sort_asc.png"); +} +.dataTables_wrapper table.table thead .sorting_desc { + background-image: url("../img/plugins/dataTables/sort_desc.png"); +} +.dataTables_wrapper table.table thead .sorting_asc_disabled { + background-image: url("../img/plugins/dataTables/sort_asc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-image: url("../img/plugins/dataTables/sort_desc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting, +.dataTables_wrapper table.table thead .sorting_asc, +.dataTables_wrapper table.table thead .sorting_desc, +.dataTables_wrapper table.table thead .sorting_asc_disabled, +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-position: center right; + background-repeat: no-repeat; +} +.dataTables_wrapper table.dataTable th:active { + outline: none; +} +.dataTables_wrapper .dataTables_info { + margin-top: 10px; +} +/* jQuery DataTable filter */ +.datatable-controls li { + padding: 3px 15px; +} +/* jQuery Snippet */ +.snippet-container pre .snippet-num, +.snippet-container .snippet-wrap .snippet-num { + margin: 0; +} +.snippet-container pre pre.sh_sourceCode, +.snippet-container .snippet-wrap pre.sh_sourceCode { + margin: 0; + border: 1px solid #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.snippet-container .snippet-menu pre { + border: none; +} +/* jQuery Tags Input */ +div.tagsinput { + padding: 0; + margin: 0; + width: auto !important; + height: auto !important; + color: #555555; + background-color: transparent; + border: none; + -webkit-transition: 'border linear .2s, box-shadow linear .2s'; + -moz-transition: 'border linear .2s, box-shadow linear .2s'; + -o-transition: 'border linear .2s, box-shadow linear .2s'; + transition: 'border linear .2s, box-shadow linear .2s'; +} +div.tagsinput.focused { + outline: 0; + border-color: rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); +} +div.tagsinput span.tag { + text-shadow: none; + line-height: normal; + padding: 4px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: #40444d; + border-color: #40444d; + color: #ffffff; +} +div.tagsinput span.tag a { + color: #ffffff; + opacity: 0.5; + filter: alpha(opacity=50); +} +div.tagsinput span.tag a:hover { + opacity: 1; + filter: alpha(opacity=100); +} +div.tagsinput input { + margin: 0; +} +/* jQuery jWYSIWYG */ +div.wysiwyg { + background: none; + width: auto !important; + border: none; +} +div.wysiwyg .toolbar-container { + padding: 5px; +} +div.wysiwyg iframe { + margin-top: 10px; + background-color: #ffffff; + width: 100% !important; + min-height: 250px; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.wysiwyg ul.toolbar { + margin-bottom: 0; + border: none; +} +div.wysiwyg ul.toolbar li { + background-image: url("../img/plugins/jWYSIWYG/jquery.wysiwyg.gif"); +} +/* Bootstrap wysihtml5 */ +.wysihtml5 { + width: 95% !important; +} +ul.wysihtml5-toolbar { + margin-bottom: 0; +} +.wysihtml5-sandbox { + margin-bottom: 0 !important; +} +/* jQuery jGrowl */ +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + color: #ffffff; + background-color: #40444d; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + opacity: 0.9; + filter: alpha(opacity=90); +} +div.jGrowl div.jGrowl-closer { + opacity: 0.35; + filter: alpha(opacity=35); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.jGrowl div.jGrowl-closer:hover { + opacity: 0.9; + filter: alpha(opacity=90); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); +} +div.jGrowl div.primary { + background-color: #40444d; + color: #ffffff; +} +div.jGrowl div.primary a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.primary a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.danger { + background-color: #e74949; + color: #ffffff; +} +div.jGrowl div.danger a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.danger a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.info { + background-color: #4986e7; + color: #ffffff; +} +div.jGrowl div.info a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.info a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.success { + background-color: #6b9b20; + color: #ffffff; +} +div.jGrowl div.success a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.success a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +/* Color picker */ +.colorpicker-saturation { + width: 100px; + height: 100px; + background-image: url("../img/plugins/colorpicker/saturation.png"); + cursor: crosshair; + float: left; +} +.colorpicker-saturation i { + display: block; + height: 5px; + width: 5px; + border: 1px solid #000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + position: absolute; + top: 0; + left: 0; + margin: -4px 0 0 -4px; +} +.colorpicker-saturation i b { + display: block; + height: 5px; + width: 5px; + border: 1px solid #fff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.colorpicker-hue, +.colorpicker-alpha { + width: 15px; + height: 100px; + float: left; + cursor: row-resize; + margin-left: 4px; + margin-bottom: 4px; +} +.colorpicker-hue i, +.colorpicker-alpha i { + display: block; + height: 1px; + background: #000; + border-top: 1px solid #fff; + position: absolute; + top: 0; + left: 0; + width: 100%; + margin-top: -1px; +} +.colorpicker-hue { + background-image: url("../img/plugins/colorpicker/hue.png"); +} +.colorpicker-alpha { + background-image: url("../img/plugins/colorpicker/alpha.png"); + display: none; +} +.colorpicker { + *zoom: 1; + top: 0; + left: 0; + padding: 4px; + min-width: 120px; +} +.colorpicker:before, +.colorpicker:after { + display: table; + content: ""; + line-height: 0; +} +.colorpicker:after { + clear: both; +} +.colorpicker div { + position: relative; +} +.colorpicker.alpha { + min-width: 140px; +} +.colorpicker.alpha .colorpicker-alpha { + display: block; +} +.colorpicker-color { + height: 10px; + margin-top: 5px; + clear: both; + background-image: url("../img/plugins/colorpicker/alpha.png"); + background-position: 0 100%; +} +.colorpicker-color div { + height: 10px; +} +.input-append.color .add-on i, +.input-prepend.color .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.colorpicker-preview { + display: block; + width: 18px; + height: 18px; +} +/* Date picker */ +.datepicker { + top: 0; + left: 0; + padding: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td { + color: #4d4d4d; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.old, +.datepicker td.new { + color: #999999; +} +.datepicker td.active, +.datepicker td.active:hover { + color: #fff; + background-color: #40444d; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #fff; + background-color: #40444d; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.datepicker + .add-on .icon-calendar { + font-size: 20px; +} +/* Time picker */ +.bootstrap-timepicker-widget.dropdown-menu { + min-width: 0px; +} +.bootstrap-timepicker-widget table { + width: auto; +} +.bootstrap-timepicker-widget table td { + height: 0; +} +.bootstrap-timepicker-widget table td a { + padding: 0; + width: auto; + display: block; +} +/* Login page style */ +.container.login { + width: 340px; + margin-top: 150px; +} +.container.login .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +.container.login form { + margin: 0; + border: none; + background-color: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.container.login form .control-group { + padding: 0; + border: none; +} +.container.login form .form-actions { + padding: 10px 0 0; +} +.container.login form .form-actions .btn { + padding-left: 20px; + padding-right: 20px; + display: block; + margin: 0 auto; +} +.container.login form input[type="text"], +.container.login form input[type="password"] { + width: 277px; +} +.container.login .login-footer { + text-align: right; + *zoom: 1; +} +.container.login .login-footer:before, +.container.login .login-footer:after { + display: table; + content: ""; + line-height: 0; +} +.container.login .login-footer:after { + clear: both; +} +.container.login .login-footer li { + display: inline-block; +} +/* Error pages */ +.error-page { + background-image: none; + position: static; +} +.error-page .error-container { + width: 90%; + max-width: 600px; + text-align: center; + margin: 80px auto 0; + *zoom: 1; +} +.error-page .error-container:before, +.error-page .error-container:after { + display: table; + content: ""; + line-height: 0; +} +.error-page .error-container:after { + clear: both; +} +.error-page .error-container h1 { + margin: 0; + font-size: 169px; + line-height: normal; + color: #ffffff; + text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.2), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); + -webkit-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -moz-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -o-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); +} +.error-page .error-container p { + margin: 10px 0 20px; +} +.error-page .error-container p.description { + margin: 10px 0; + font-size: 39px; + line-height: normal; + color: #525252; +} +.no-textshadow .error-page .error-container h1 { + text-shadow: none; + color: #40444d; +} +/* Responsive styles */ +/* Up to landscape phone */ +@media (max-width: 480px) { + #header nav { + float: left; + margin-bottom: 20px; + } +} +/* Landscape phone to small desktop and portrait tablet */ +@media (max-width: 767px) { + #header > h1 { + clear: both; + } + .container, + .content-block, + .navigation-block { + width: auto; + position: static !important; + } + .content-block, + .navigation-block { + float: none; + margin: 0; + } + .row, + .row-fluid { + margin-left: 0; + } + .main-navigation > ul > li:first-child { + margin-top: 6.666666666666667px; + border-top: none; + } + .side-note { + padding: 20px; + background-image: none; + background-color: #fffbea; + border: 1px solid #dedacb; + } + .side-note .side-note-container, + .side-note .side-note-bottom { + padding: 0; + background-image: none; + } + .user-profile figure img { + float: left; + } + .user-profile figure figcaption { + float: left; + } + .content-block [class*="span"], + .content-block .row [class*="span"], + .content-block .row-fluid [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .input-append .add-on, + .input-prepend .add-on, + .input-append .btn, + .input-prepend .btn { + line-height: 20px; + } + .input-append .add-on, + .input-prepend .add-on { + height: 18px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Portrait tablet to default desktop */ +@media (min-width: 768px) and (max-width: 979px) { + .content-block { + width: 464px; + } + #wrapper > .container, + #footer.container { + width: 724px; + } + .row { + margin-left: 0; + } + .data-block[class*="span"] { + width: auto; + } + .content-block > [class*="span"], + .content-block .row > [class*="span"], + .content-block .row-fluid > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .data-block .data-container { + padding: 15px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Tablets and below */ +@media (max-width: 979px) { + .data-block[class*="span"] { + width: auto; + } + .content-block .row > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .row, + .row .row, + .row-fluid { + margin-bottom: 0; + } + [class*="span"] { + margin-bottom: 20px; + } + .data-block .data-container { + padding: 15px; + } + .data-block .thumbnails li img { + width: 100%; + } + .form-horizontal .control-label { + float: none; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .form-actions { + padding-left: 20px; + } + .content-block .input-append input[class*="span"], + .content-block .input-prepend input[class*="span"], + .content-block .uneditable-input[class*="span"] { + display: inline-block; + } + .uneditable-input { + min-height: 20px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + border: none; + } +} +/* Default desktop */ +@media (min-width: 980px) and (max-width: 1199px) { + .content-block { + width: 700px; + } + #wrapper > .container, + #footer.container { + width: 940px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 700px; + } + .span12 { + width: 700px; + } + .span11 { + width: 640px; + } + .span10 { + width: 580px; + } + .span9 { + width: 520px; + } + .span8 { + width: 460px; + } + .span7 { + width: 400px; + } + .span6 { + width: 340px; + } + .span5 { + width: 280px; + } + .span4 { + width: 220px; + } + .span3 { + width: 160px; + } + .span2 { + width: 100px; + } + .span1 { + width: 40px; + } + .offset12 { + margin-left: 740px; + } + .offset11 { + margin-left: 680px; + } + .offset10 { + margin-left: 620px; + } + .offset9 { + margin-left: 560px; + } + .offset8 { + margin-left: 500px; + } + .offset7 { + margin-left: 440px; + } + .offset6 { + margin-left: 380px; + } + .offset5 { + margin-left: 320px; + } + .offset4 { + margin-left: 260px; + } + .offset3 { + margin-left: 200px; + } + .offset2 { + margin-left: 140px; + } + .offset1 { + margin-left: 80px; + } + .data-block .row .row { + margin-left: -20px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 652px; + } + .data-block .row .span12 { + width: 652px; + } + .data-block .row .span11 { + width: 596px; + } + .data-block .row .span10 { + width: 540px; + } + .data-block .row .span9 { + width: 484px; + } + .data-block .row .span8 { + width: 428px; + } + .data-block .row .span7 { + width: 372px; + } + .data-block .row .span6 { + width: 316px; + } + .data-block .row .span5 { + width: 260px; + } + .data-block .row .span4 { + width: 204px; + } + .data-block .row .span3 { + width: 148px; + } + .data-block .row .span2 { + width: 92px; + } + .data-block .row .span1 { + width: 36px; + } + .data-block .row .offset12 { + margin-left: 692px; + } + .data-block .row .offset11 { + margin-left: 636px; + } + .data-block .row .offset10 { + margin-left: 580px; + } + .data-block .row .offset9 { + margin-left: 524px; + } + .data-block .row .offset8 { + margin-left: 468px; + } + .data-block .row .offset7 { + margin-left: 412px; + } + .data-block .row .offset6 { + margin-left: 356px; + } + .data-block .row .offset5 { + margin-left: 300px; + } + .data-block .row .offset4 { + margin-left: 244px; + } + .data-block .row .offset3 { + margin-left: 188px; + } + .data-block .row .offset2 { + margin-left: 132px; + } + .data-block .row .offset1 { + margin-left: 76px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .form-horizontal .control-label { + width: 90px; + } + .form-horizontal .controls { + margin-left: 100px; + } + .form-horizontal .form-actions { + padding-left: 120px; + } + .btn-toolbar .btn-group { + margin: 2px 0; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + margin: 0; + } +} +/* Large desktop */ +@media (min-width: 1200px) { + .content-block { + width: 930px; + } + #wrapper .container, + #footer.container { + width: 1170px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 928px; + } + .span12 { + width: 928px; + } + .span11 { + width: 849px; + } + .span10 { + width: 770px; + } + .span9 { + width: 691px; + } + .span8 { + width: 612px; + } + .span7 { + width: 533px; + } + .span6 { + width: 454px; + } + .span5 { + width: 375px; + } + .span4 { + width: 296px; + } + .span3 { + width: 217px; + } + .span2 { + width: 138px; + } + .span1 { + width: 59px; + } + .offset12 { + margin-left: 968px; + } + .offset11 { + margin-left: 889px; + } + .offset10 { + margin-left: 810px; + } + .offset9 { + margin-left: 731px; + } + .offset8 { + margin-left: 652px; + } + .offset7 { + margin-left: 573px; + } + .offset6 { + margin-left: 494px; + } + .offset5 { + margin-left: 415px; + } + .offset4 { + margin-left: 336px; + } + .offset3 { + margin-left: 257px; + } + .offset2 { + margin-left: 178px; + } + .offset1 { + margin-left: 99px; + } + .data-block .row .row { + margin-left: -21px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 879px; + } + .data-block .row .span12 { + width: 879px; + } + .data-block .row .span11 { + width: 804px; + } + .data-block .row .span10 { + width: 729px; + } + .data-block .row .span9 { + width: 654px; + } + .data-block .row .span8 { + width: 579px; + } + .data-block .row .span7 { + width: 504px; + } + .data-block .row .span6 { + width: 429px; + } + .data-block .row .span5 { + width: 354px; + } + .data-block .row .span4 { + width: 279px; + } + .data-block .row .span3 { + width: 204px; + } + .data-block .row .span2 { + width: 129px; + } + .data-block .row .span1 { + width: 54px; + } + .data-block .row .offset12 { + margin-left: 921px; + } + .data-block .row .offset11 { + margin-left: 846px; + } + .data-block .row .offset10 { + margin-left: 771px; + } + .data-block .row .offset9 { + margin-left: 696px; + } + .data-block .row .offset8 { + margin-left: 621px; + } + .data-block .row .offset7 { + margin-left: 546px; + } + .data-block .row .offset6 { + margin-left: 471px; + } + .data-block .row .offset5 { + margin-left: 396px; + } + .data-block .row .offset4 { + margin-left: 321px; + } + .data-block .row .offset3 { + margin-left: 246px; + } + .data-block .row .offset2 { + margin-left: 171px; + } + .data-block .row .offset1 { + margin-left: 96px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .thumbnails { + margin-left: -21px; + } + .thumbnails .row { + margin-left: -21px; + *zoom: 1; + } + .thumbnails .row:before, + .thumbnails .row:after { + display: table; + content: ""; + line-height: 0; + } + .thumbnails .row:after { + clear: both; + } + .thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .thumbnails .container, + .thumbnails .navbar-static-top .container, + .thumbnails .navbar-fixed-top .container, + .thumbnails .navbar-fixed-bottom .container { + width: 879px; + } + .thumbnails .span12 { + width: 879px; + } + .thumbnails .span11 { + width: 804px; + } + .thumbnails .span10 { + width: 729px; + } + .thumbnails .span9 { + width: 654px; + } + .thumbnails .span8 { + width: 579px; + } + .thumbnails .span7 { + width: 504px; + } + .thumbnails .span6 { + width: 429px; + } + .thumbnails .span5 { + width: 354px; + } + .thumbnails .span4 { + width: 279px; + } + .thumbnails .span3 { + width: 204px; + } + .thumbnails .span2 { + width: 129px; + } + .thumbnails .span1 { + width: 54px; + } + .thumbnails .offset12 { + margin-left: 921px; + } + .thumbnails .offset11 { + margin-left: 846px; + } + .thumbnails .offset10 { + margin-left: 771px; + } + .thumbnails .offset9 { + margin-left: 696px; + } + .thumbnails .offset8 { + margin-left: 621px; + } + .thumbnails .offset7 { + margin-left: 546px; + } + .thumbnails .offset6 { + margin-left: 471px; + } + .thumbnails .offset5 { + margin-left: 396px; + } + .thumbnails .offset4 { + margin-left: 321px; + } + .thumbnails .offset3 { + margin-left: 246px; + } + .thumbnails .offset2 { + margin-left: 171px; + } + .thumbnails .offset1 { + margin-left: 96px; + } + .thumbnails li { + margin-bottom: 21px; + margin-left: 21px; + } + .form-horizontal .control-label { + width: 160px; + } + .form-horizontal .controls { + margin-left: 180px; + } + .form-horizontal .form-actions { + padding-left: 200px; + } + .widgets > li { + margin: 0; + } +} +/* Demo styles */ +.data-block .row-fluid.demo, +.data-block .row.demo { + color: #fff; + line-height: 30px; + min-height: 30px; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block .row-fluid.demo:last-child, +.data-block .row.demo:last-child { + margin-bottom: 0; +} +.data-block .row-fluid.demo > div, +.data-block .row.demo > div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #4A525A; +} +.data-block .row-fluid.demo > div > .row > div, +.data-block .row.demo > div > .row > div, +.data-block .row-fluid.demo > div > .row-fluid > div, +.data-block .row.demo > div > .row-fluid > div { + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #657078; +} +.demo > input, +.demo > select { + display: block !important; + margin-bottom: 10px; +} +.navigation-block > a { + margin: 0 0 20px; +} +.navigation-block > a span { + font-size: 11.049999999999999px; +} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/huraga-green.css b/src/bb-themes/huraga/assets/css/huraga-green.css new file mode 100644 index 000000000..6aa215fa6 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/huraga-green.css @@ -0,0 +1,13000 @@ +/*! + * Walkin Pixels - Huraga v1.7 + * www.walkingpixels.com + * + * Green color + * + */ +@import url("http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold"); +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, +a:active { + outline: 0; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + + max-width: 100%; + /* Part 1: Set a maxium relative to the parent */ + + width: auto\9; + /* IE7-8 need help adjusting responsive images */ + + height: auto; + /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} +#map_canvas img, +.google-maps img { + max-width: none; +} +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +@media print { + * { + text-shadow: none !important; + color: #000 !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body { + margin: 0; + font-family: "PT Sans", Arial, sans-serif; + font-size: 13px; + line-height: 18px; + color: #939699; + background-color: #f5f5f5; +} +a { + color: #6b9b20; + text-decoration: none; +} +a:hover, +a:focus { + color: #31460f; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; +} +.offset3 { + margin-left: 260px; +} +.offset2 { + margin-left: 180px; +} +.offset1 { + margin-left: 100px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; +} +.container:after { + clear: both; +} +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 9px; +} +.lead { + margin-bottom: 18px; + font-size: 19.5px; + font-weight: 200; + line-height: 27px; +} +small { + font-size: 85%; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +cite { + font-style: normal; +} +.muted { + color: #999999; +} +a.muted:hover, +a.muted:focus { + color: #808080; +} +.text-warning { + color: #c09853; +} +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover, +a.text-success:focus { + color: #356635; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 9px 0; + font-family: inherit; + font-weight: bold; + line-height: 18px; + color: #525252; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 36px; +} +h1 { + font-size: 35.75px; +} +h2 { + font-size: 29.25px; +} +h3 { + font-size: 22.75px; +} +h4 { + font-size: 16.25px; +} +h5 { + font-size: 13px; +} +h6 { + font-size: 11.049999999999999px; +} +h1 small { + font-size: 22.75px; +} +h2 small { + font-size: 16.25px; +} +h3 small { + font-size: 13px; +} +h4 small { + font-size: 13px; +} +.page-header { + padding-bottom: 8px; + margin: 18px 0 27px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 9px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 18px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding-left: 5px; + padding-right: 5px; +} +dl { + margin-bottom: 18px; +} +dt, +dd { + line-height: 18px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 9px; +} +.dl-horizontal { + *zoom: 1; +} +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 18px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16.25px; + font-weight: 300; + line-height: 1.25; +} +blockquote small { + display: block; + line-height: 18px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 18px; + font-style: normal; + line-height: 18px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 11px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} +pre { + display: block; + padding: 8.5px; + margin: 0 0 9px; + font-size: 12px; + line-height: 18px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +pre.prettyprint { + margin-bottom: 18px; +} +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 18px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 18px; + font-size: 19.5px; + line-height: 36px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 13.5px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 13px; + font-weight: normal; + line-height: 18px; +} +input, +button, +select, +textarea { + font-family: "PT Sans", Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 18px; + padding: 4px 6px; + margin-bottom: 9px; + font-size: 13px; + line-height: 18px; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 28px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 28px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 18px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 17px 20px 18px; + margin-top: 18px; + margin-bottom: 18px; + background-color: #ffffff; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #babcbe; +} +.help-block { + display: block; + margin-bottom: 9px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 9px; + vertical-align: middle; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 13px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 18px; + min-width: 16px; + padding: 4px 5px; + font-size: 13px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 9px; +} +legend + .control-group { + margin-top: 18px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 18px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 9px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 18px; +} +.table th, +.table td { + padding: 8px; + line-height: 18px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table .table { + background-color: #f5f5f5; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success > td { + background-color: #dff0d8; +} +.table tbody tr.error > td { + background-color: #f2dede; +} +.table tbody tr.warning > td { + background-color: #fcf8e3; +} +.table tbody tr.info > td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/icons/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/focus/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/icons/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; + width: 16px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; +} +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + text-decoration: none; + color: #ffffff; + background-color: #65931e; + background-image: -moz-linear-gradient(top, #6b9b20, #5c861c); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#5c861c)); + background-image: -webkit-linear-gradient(top, #6b9b20, #5c861c); + background-image: -o-linear-gradient(top, #6b9b20, #5c861c); + background-image: linear-gradient(to bottom, #6b9b20, #5c861c); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff5c861c', GradientType=0); +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #333333; + text-decoration: none; + outline: 0; + background-color: #65931e; + background-image: -moz-linear-gradient(top, #6b9b20, #5c861c); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#5c861c)); + background-image: -webkit-linear-gradient(top, #6b9b20, #5c861c); + background-image: -o-linear-gradient(top, #6b9b20, #5c861c); + background-image: linear-gradient(to bottom, #6b9b20, #5c861c); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff5c861c', GradientType=0); +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 16.25px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 0px 6px; + font-size: 9.75px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f9b20; + background-image: -moz-linear-gradient(top, #6b9b20, #4c9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4c9b20)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4c9b20); + background-image: -o-linear-gradient(top, #6b9b20, #4c9b20); + background-image: linear-gradient(to bottom, #6b9b20, #4c9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4c9b20', GradientType=0); + border-color: #4c9b20 #4c9b20 #2d5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4c9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #4c9b20; + *background-color: #42861c; +} +.btn-primary:active, +.btn-primary.active { + background-color: #377117 \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e43838; + background-image: -moz-linear-gradient(top, #e74949, #e01d1d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e01d1d)); + background-image: -webkit-linear-gradient(top, #e74949, #e01d1d); + background-image: -o-linear-gradient(top, #e74949, #e01d1d); + background-image: linear-gradient(to bottom, #e74949, #e01d1d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe01d1d', GradientType=0); + border-color: #e01d1d #e01d1d #9c1515; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e01d1d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #e01d1d; + *background-color: #c91b1b; +} +.btn-danger:active, +.btn-danger.active { + background-color: #b21818 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f8a1d; + background-image: -moz-linear-gradient(top, #6b9b20, #4e7117); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4e7117)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4e7117); + background-image: -o-linear-gradient(top, #6b9b20, #4e7117); + background-image: linear-gradient(to bottom, #6b9b20, #4e7117); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4e7117', GradientType=0); + border-color: #4e7117 #4e7117 #22310a; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4e7117; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #4e7117; + *background-color: #3f5c13; +} +.btn-success:active, +.btn-success.active { + background-color: #31460f \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.btn-info:active, +.btn-info.active { + background-color: #1d38e0 \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #373a42; + background-image: -moz-linear-gradient(top, #40444d, #292b31); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#292b31)); + background-image: -webkit-linear-gradient(top, #40444d, #292b31); + background-image: -o-linear-gradient(top, #40444d, #292b31); + background-image: linear-gradient(to bottom, #40444d, #292b31); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff292b31', GradientType=0); + border-color: #292b31 #292b31 #060707; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #292b31; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #292b31; + *background-color: #1d1f23; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #121315 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #6b9b20; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover, +.btn-link:focus { + color: #31460f; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 9px; + margin-bottom: 9px; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 13px; +} +.btn-group > .btn-mini { + font-size: 9.75px; +} +.btn-group > .btn-small { + font-size: 11.049999999999999px; +} +.btn-group > .btn-large { + font-size: 16.25px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #4c9b20; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #e01d1d; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #4e7117; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #495fe7; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #292b31; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 18px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-success h4 { + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-info h4 { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 18px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li > a > img { + max-width: none; +} +.nav > .pull-right { + float: right; +} +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 18px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #6b9b20; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; +} +.nav-tabs:after, +.nav-pills:after { + clear: both; +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 18px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + background-color: #f5f5f5; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #6b9b20; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #6b9b20; + border-bottom-color: #6b9b20; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #31460f; + border-bottom-color: #31460f; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 18px; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 11px 20px 11px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #555555; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #555555; +} +.navbar-link { + color: #555555; +} +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 11px 15px 11px; + color: #555555; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; +} +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} +.navbar-inverse .brand { + color: #999999; +} +.navbar-inverse .navbar-text { + color: #999999; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 18px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.breadcrumb > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} +.breadcrumb > .active { + color: #999999; +} +.pagination { + margin: 18px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.pagination ul > li { + display: inline; +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 18px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 16.25px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0px 6px; + font-size: 9.75px; +} +.pager { + margin: 18px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-title:empty { + display: none; +} +.popover-content { + padding: 9px 14px; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: 11px; +} +.popover .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right .arrow:after { + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left .arrow:after { + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, +.thumbnails:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails:after { + clear: both; +} +.row-fluid .thumbnails { + margin-left: 0; +} +.thumbnails > li { + float: left; + margin-bottom: 18px; + margin-left: 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 18px; + border: 1px solid #ddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #6b9b20; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; + color: #555555; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 10.998px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; +} +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +.label:empty, +.badge:empty { + display: none; +} +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label-important, +.badge-important { + background-color: #b94a48; +} +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} +.label-warning, +.badge-warning { + background-color: #f89406; +} +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} +.label-success, +.badge-success { + background-color: #468847; +} +.label-success[href], +.badge-success[href] { + background-color: #356635; +} +.label-info, +.badge-info { + background-color: #3a87ad; +} +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} +.label-inverse, +.badge-inverse { + background-color: #333333; +} +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} +.btn-mini .label, +.btn-mini .badge { + top: 0; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 18px; + margin-bottom: 18px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.accordion { + margin-bottom: 18px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-toggle { + cursor: pointer; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 18px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} +.carousel-indicators .active { + background-color: #fff; +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 18px; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 27px; + color: #cccccc; + background-color: #40444d; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: #ffffff; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 27px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +@media (max-width: 767px) { + body { + padding-left: 20px; + padding-right: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 18px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-left: 10px; + padding-right: 10px; + } + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} +@media (max-width: 767px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 18px; + } + .navbar-fixed-bottom { + margin-top: 18px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 9px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #555555; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 9px 15px; + margin: 9px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } +} +@media (min-width: 768px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} +@-ms-viewport { + width: device-width; +} +.hidden { + display: none; + visibility: hidden; +} +.visible-phone { + display: none !important; +} +.visible-tablet { + display: none !important; +} +.hidden-desktop { + display: none !important; +} +.visible-desktop { + display: inherit !important; +} +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} +/* Emoticon icon set */ +[class^="emo-"], +[class*=" emo-"] { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + vertical-align: text-top; + background-image: url("../img/icons/emoticons-icons.png"); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; +} +[class^="emo-"]:last-child, +[class*=" emo-"]:last-child { + *margin-left: 0; +} +.emo-8ball { + background-position: 0 0; +} +.emo-basketball { + background-position: -32px 0; +} +.emo-football { + background-position: -288px 0; +} +.emo-golf { + background-position: -320px 0; +} +.emo-raquet { + background-position: -512px 0; +} +.emo-rocket { + background-position: -576px 0; +} +.emo-soccer { + background-position: -736px 0; +} +.emo-tennis { + background-position: -800px 0; +} +.emo-shuttlecock { + background-position: -640px 0; +} +.emo-bomb { + background-position: -64px 0; +} +.emo-bug { + background-position: -96px 0; +} +.emo-confuse { + background-position: -128px 0; +} +.emo-cool { + background-position: -160px 0; +} +.emo-cry { + background-position: -192px 0; +} +.emo-evilgrin { + background-position: -224px 0; +} +.emo-fat { + background-position: -256px 0; +} +.emo-grin { + background-position: -352px 0; +} +.emo-happy { + background-position: -384px 0; +} +.emo-heart { + background-position: -416px 0; +} +.emo-mad { + background-position: -448px 0; +} +.emo-neutral { + background-position: -480px 0; +} +.emo-red { + background-position: -544px 0; +} +.emo-roll { + background-position: -608px 0; +} +.emo-slim { + background-position: -672px 0; +} +.emo-smile { + background-position: -704px 0; +} +.emo-surprised { + background-position: -768px 0; +} +.emo-tongue { + background-position: -832px 0; +} +.emo-unhappy { + background-position: -864px 0; +} +.emo-waii { + background-position: -896px 0; +} +.emo-wink { + background-position: -928px 0; +} +.emo-yell { + background-position: -960px 0; +} +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ +@font-face { + font-family: 'FontAwesome'; + src: url('../css/font/fontawesome-webfont.eot?v=3.0.1'); + src: url('../css/font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), url('../css/font/fontawesome-webfont.woff?v=3.0.1') format('woff'), url('../css/font/fontawesome-webfont.ttf?v=3.0.1') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="awe-"], +[class*=" awe-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + /* sprites.less reset */ + + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.awe-white, +.nav-pills > .active > a > [class^="awe-"], +.nav-pills > .active > a > [class*=" awe-"], +.nav-list > .active > a > [class^="awe-"], +.nav-list > .active > a > [class*=" awe-"], +.navbar-inverse .nav > .active > a > [class^="awe-"], +.navbar-inverse .nav > .active > a > [class*=" awe-"], +.dropdown-menu > li > a:hover > [class^="awe-"], +.dropdown-menu > li > a:hover > [class*=" awe-"], +.dropdown-menu > .active > a > [class^="awe-"], +.dropdown-menu > .active > a > [class*=" awe-"], +.dropdown-submenu:hover > a > [class^="awe-"], +.dropdown-submenu:hover > a > [class*=" awe-"] { + background-image: none; +} +[class^="awe-"]:before, +[class*=" awe-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="awe-"], +a [class*=" awe-"] { + display: inline-block; +} +/* makes the font 33% larger relative to the icon container */ +.awe-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} +.btn [class^="awe-"], +.nav [class^="awe-"], +.btn [class*=" awe-"], +.nav [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.btn [class^="awe-"].awe-large, +.nav [class^="awe-"].awe-large, +.btn [class*=" awe-"].awe-large, +.nav [class*=" awe-"].awe-large { + line-height: .9em; +} +.btn [class^="awe-"].awe-spin, +.nav [class^="awe-"].awe-spin, +.btn [class*=" awe-"].awe-spin, +.nav [class*=" awe-"].awe-spin { + display: inline-block; +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"] { + /* keeps button heights with and without icons the same */ + +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"], +.nav-tabs [class^="awe-"].awe-large, +.nav-pills [class^="awe-"].awe-large, +.nav-tabs [class*=" awe-"].awe-large, +.nav-pills [class*=" awe-"].awe-large { + line-height: .9em; +} +li [class^="awe-"], +.nav li [class^="awe-"], +li [class*=" awe-"], +.nav li [class*=" awe-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="awe-"].awe-large, +.nav li [class^="awe-"].awe-large, +li [class*=" awe-"].awe-large, +.nav li [class*=" awe-"].awe-large { + /* increased font size for awe-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="awe-"], +ul.icons li [class*=" awe-"] { + width: .75em; +} +.awe-muted { + color: #eeeeee; +} +.awe-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.awe-2x { + font-size: 2em; +} +.awe-2x.awe-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.awe-3x { + font-size: 3em; +} +.awe-3x.awe-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.awe-4x { + font-size: 4em; +} +.awe-4x.awe-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="awe-"].pull-left, +[class*=" awe-"].pull-left { + margin-right: .3em; +} +[class^="awe-"].pull-right, +[class*=" awe-"].pull-right { + margin-left: .3em; +} +.btn [class^="awe-"].pull-left.awe-2x, +.btn [class*=" awe-"].pull-left.awe-2x, +.btn [class^="awe-"].pull-right.awe-2x, +.btn [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.btn [class^="awe-"].awe-spin.awe-large, +.btn [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.btn.btn-small [class^="awe-"].pull-left.awe-2x, +.btn.btn-small [class*=" awe-"].pull-left.awe-2x, +.btn.btn-small [class^="awe-"].pull-right.awe-2x, +.btn.btn-small [class*=" awe-"].pull-right.awe-2x { + margin-top: .25em; +} +.btn.btn-large [class^="awe-"], +.btn.btn-large [class*=" awe-"] { + margin-top: 0; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x, +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-top: .05em; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x { + margin-right: .2em; +} +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-left: .2em; +} +.awe-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +@-moz-document url-prefix() { + .awe-spin { + height: .9em; + } + .btn .awe-spin { + height: auto; + } + .awe-spin.awe-large { + height: 1.25em; + } + .btn .awe-spin.awe-large { + height: .75em; + } +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.awe-glass:before { + content: "\f000"; +} +.awe-music:before { + content: "\f001"; +} +.awe-search:before { + content: "\f002"; +} +.awe-envelope:before { + content: "\f003"; +} +.awe-heart:before { + content: "\f004"; +} +.awe-star:before { + content: "\f005"; +} +.awe-star-empty:before { + content: "\f006"; +} +.awe-user:before { + content: "\f007"; +} +.awe-film:before { + content: "\f008"; +} +.awe-th-large:before { + content: "\f009"; +} +.awe-th:before { + content: "\f00a"; +} +.awe-th-list:before { + content: "\f00b"; +} +.awe-ok:before { + content: "\f00c"; +} +.awe-remove:before { + content: "\f00d"; +} +.awe-zoom-in:before { + content: "\f00e"; +} +.awe-zoom-out:before { + content: "\f010"; +} +.awe-off:before { + content: "\f011"; +} +.awe-signal:before { + content: "\f012"; +} +.awe-cog:before { + content: "\f013"; +} +.awe-trash:before { + content: "\f014"; +} +.awe-home:before { + content: "\f015"; +} +.awe-file:before { + content: "\f016"; +} +.awe-time:before { + content: "\f017"; +} +.awe-road:before { + content: "\f018"; +} +.awe-download-alt:before { + content: "\f019"; +} +.awe-download:before { + content: "\f01a"; +} +.awe-upload:before { + content: "\f01b"; +} +.awe-inbox:before { + content: "\f01c"; +} +.awe-play-circle:before { + content: "\f01d"; +} +.awe-repeat:before, +.awe-rotate-right:before { + content: "\f01e"; +} +/* F020 doesn't work in Safari. all shifted one down */ +.awe-refresh:before { + content: "\f021"; +} +.awe-list-alt:before { + content: "\f022"; +} +.awe-lock:before { + content: "\f023"; +} +.awe-flag:before { + content: "\f024"; +} +.awe-headphones:before { + content: "\f025"; +} +.awe-volume-off:before { + content: "\f026"; +} +.awe-volume-down:before { + content: "\f027"; +} +.awe-volume-up:before { + content: "\f028"; +} +.awe-qrcode:before { + content: "\f029"; +} +.awe-barcode:before { + content: "\f02a"; +} +.awe-tag:before { + content: "\f02b"; +} +.awe-tags:before { + content: "\f02c"; +} +.awe-book:before { + content: "\f02d"; +} +.awe-bookmark:before { + content: "\f02e"; +} +.awe-print:before { + content: "\f02f"; +} +.awe-camera:before { + content: "\f030"; +} +.awe-font:before { + content: "\f031"; +} +.awe-bold:before { + content: "\f032"; +} +.awe-italic:before { + content: "\f033"; +} +.awe-text-height:before { + content: "\f034"; +} +.awe-text-width:before { + content: "\f035"; +} +.awe-align-left:before { + content: "\f036"; +} +.awe-align-center:before { + content: "\f037"; +} +.awe-align-right:before { + content: "\f038"; +} +.awe-align-justify:before { + content: "\f039"; +} +.awe-list:before { + content: "\f03a"; +} +.awe-indent-left:before { + content: "\f03b"; +} +.awe-indent-right:before { + content: "\f03c"; +} +.awe-facetime-video:before { + content: "\f03d"; +} +.awe-picture:before { + content: "\f03e"; +} +.awe-pencil:before { + content: "\f040"; +} +.awe-map-marker:before { + content: "\f041"; +} +.awe-adjust:before { + content: "\f042"; +} +.awe-tint:before { + content: "\f043"; +} +.awe-edit:before { + content: "\f044"; +} +.awe-share:before { + content: "\f045"; +} +.awe-check:before { + content: "\f046"; +} +.awe-move:before { + content: "\f047"; +} +.awe-step-backward:before { + content: "\f048"; +} +.awe-fast-backward:before { + content: "\f049"; +} +.awe-backward:before { + content: "\f04a"; +} +.awe-play:before { + content: "\f04b"; +} +.awe-pause:before { + content: "\f04c"; +} +.awe-stop:before { + content: "\f04d"; +} +.awe-forward:before { + content: "\f04e"; +} +.awe-fast-forward:before { + content: "\f050"; +} +.awe-step-forward:before { + content: "\f051"; +} +.awe-eject:before { + content: "\f052"; +} +.awe-chevron-left:before { + content: "\f053"; +} +.awe-chevron-right:before { + content: "\f054"; +} +.awe-plus-sign:before { + content: "\f055"; +} +.awe-minus-sign:before { + content: "\f056"; +} +.awe-remove-sign:before { + content: "\f057"; +} +.awe-ok-sign:before { + content: "\f058"; +} +.awe-question-sign:before { + content: "\f059"; +} +.awe-info-sign:before { + content: "\f05a"; +} +.awe-screenshot:before { + content: "\f05b"; +} +.awe-remove-circle:before { + content: "\f05c"; +} +.awe-ok-circle:before { + content: "\f05d"; +} +.awe-ban-circle:before { + content: "\f05e"; +} +.awe-arrow-left:before { + content: "\f060"; +} +.awe-arrow-right:before { + content: "\f061"; +} +.awe-arrow-up:before { + content: "\f062"; +} +.awe-arrow-down:before { + content: "\f063"; +} +.awe-share-alt:before, +.awe-mail-forward:before { + content: "\f064"; +} +.awe-resize-full:before { + content: "\f065"; +} +.awe-resize-small:before { + content: "\f066"; +} +.awe-plus:before { + content: "\f067"; +} +.awe-minus:before { + content: "\f068"; +} +.awe-asterisk:before { + content: "\f069"; +} +.awe-exclamation-sign:before { + content: "\f06a"; +} +.awe-gift:before { + content: "\f06b"; +} +.awe-leaf:before { + content: "\f06c"; +} +.awe-fire:before { + content: "\f06d"; +} +.awe-eye-open:before { + content: "\f06e"; +} +.awe-eye-close:before { + content: "\f070"; +} +.awe-warning-sign:before { + content: "\f071"; +} +.awe-plane:before { + content: "\f072"; +} +.awe-calendar:before { + content: "\f073"; +} +.awe-random:before { + content: "\f074"; +} +.awe-comment:before { + content: "\f075"; +} +.awe-magnet:before { + content: "\f076"; +} +.awe-chevron-up:before { + content: "\f077"; +} +.awe-chevron-down:before { + content: "\f078"; +} +.awe-retweet:before { + content: "\f079"; +} +.awe-shopping-cart:before { + content: "\f07a"; +} +.awe-folder-close:before { + content: "\f07b"; +} +.awe-folder-open:before { + content: "\f07c"; +} +.awe-resize-vertical:before { + content: "\f07d"; +} +.awe-resize-horizontal:before { + content: "\f07e"; +} +.awe-bar-chart:before { + content: "\f080"; +} +.awe-twitter-sign:before { + content: "\f081"; +} +.awe-facebook-sign:before { + content: "\f082"; +} +.awe-camera-retro:before { + content: "\f083"; +} +.awe-key:before { + content: "\f084"; +} +.awe-cogs:before { + content: "\f085"; +} +.awe-comments:before { + content: "\f086"; +} +.awe-thumbs-up:before { + content: "\f087"; +} +.awe-thumbs-down:before { + content: "\f088"; +} +.awe-star-half:before { + content: "\f089"; +} +.awe-heart-empty:before { + content: "\f08a"; +} +.awe-signout:before { + content: "\f08b"; +} +.awe-linkedin-sign:before { + content: "\f08c"; +} +.awe-pushpin:before { + content: "\f08d"; +} +.awe-external-link:before { + content: "\f08e"; +} +.awe-signin:before { + content: "\f090"; +} +.awe-trophy:before { + content: "\f091"; +} +.awe-github-sign:before { + content: "\f092"; +} +.awe-upload-alt:before { + content: "\f093"; +} +.awe-lemon:before { + content: "\f094"; +} +.awe-phone:before { + content: "\f095"; +} +.awe-check-empty:before { + content: "\f096"; +} +.awe-bookmark-empty:before { + content: "\f097"; +} +.awe-phone-sign:before { + content: "\f098"; +} +.awe-twitter:before { + content: "\f099"; +} +.awe-facebook:before { + content: "\f09a"; +} +.awe-github:before { + content: "\f09b"; +} +.awe-unlock:before { + content: "\f09c"; +} +.awe-credit-card:before { + content: "\f09d"; +} +.awe-rss:before { + content: "\f09e"; +} +.awe-hdd:before { + content: "\f0a0"; +} +.awe-bullhorn:before { + content: "\f0a1"; +} +.awe-bell:before { + content: "\f0a2"; +} +.awe-certificate:before { + content: "\f0a3"; +} +.awe-hand-right:before { + content: "\f0a4"; +} +.awe-hand-left:before { + content: "\f0a5"; +} +.awe-hand-up:before { + content: "\f0a6"; +} +.awe-hand-down:before { + content: "\f0a7"; +} +.awe-circle-arrow-left:before { + content: "\f0a8"; +} +.awe-circle-arrow-right:before { + content: "\f0a9"; +} +.awe-circle-arrow-up:before { + content: "\f0aa"; +} +.awe-circle-arrow-down:before { + content: "\f0ab"; +} +.awe-globe:before { + content: "\f0ac"; +} +.awe-wrench:before { + content: "\f0ad"; +} +.awe-tasks:before { + content: "\f0ae"; +} +.awe-filter:before { + content: "\f0b0"; +} +.awe-briefcase:before { + content: "\f0b1"; +} +.awe-fullscreen:before { + content: "\f0b2"; +} +.awe-group:before { + content: "\f0c0"; +} +.awe-link:before { + content: "\f0c1"; +} +.awe-cloud:before { + content: "\f0c2"; +} +.awe-beaker:before { + content: "\f0c3"; +} +.awe-cut:before { + content: "\f0c4"; +} +.awe-copy:before { + content: "\f0c5"; +} +.awe-paper-clip:before { + content: "\f0c6"; +} +.awe-save:before { + content: "\f0c7"; +} +.awe-sign-blank:before { + content: "\f0c8"; +} +.awe-reorder:before { + content: "\f0c9"; +} +.awe-list-ul:before { + content: "\f0ca"; +} +.awe-list-ol:before { + content: "\f0cb"; +} +.awe-strikethrough:before { + content: "\f0cc"; +} +.awe-underline:before { + content: "\f0cd"; +} +.awe-table:before { + content: "\f0ce"; +} +.awe-magic:before { + content: "\f0d0"; +} +.awe-truck:before { + content: "\f0d1"; +} +.awe-pinterest:before { + content: "\f0d2"; +} +.awe-pinterest-sign:before { + content: "\f0d3"; +} +.awe-google-plus-sign:before { + content: "\f0d4"; +} +.awe-google-plus:before { + content: "\f0d5"; +} +.awe-money:before { + content: "\f0d6"; +} +.awe-caret-down:before { + content: "\f0d7"; +} +.awe-caret-up:before { + content: "\f0d8"; +} +.awe-caret-left:before { + content: "\f0d9"; +} +.awe-caret-right:before { + content: "\f0da"; +} +.awe-columns:before { + content: "\f0db"; +} +.awe-sort:before { + content: "\f0dc"; +} +.awe-sort-down:before { + content: "\f0dd"; +} +.awe-sort-up:before { + content: "\f0de"; +} +.awe-envelope-alt:before { + content: "\f0e0"; +} +.awe-linkedin:before { + content: "\f0e1"; +} +.awe-undo:before, +.awe-rotate-left:before { + content: "\f0e2"; +} +.awe-legal:before { + content: "\f0e3"; +} +.awe-dashboard:before { + content: "\f0e4"; +} +.awe-comment-alt:before { + content: "\f0e5"; +} +.awe-comments-alt:before { + content: "\f0e6"; +} +.awe-bolt:before { + content: "\f0e7"; +} +.awe-sitemap:before { + content: "\f0e8"; +} +.awe-umbrella:before { + content: "\f0e9"; +} +.awe-paste:before { + content: "\f0ea"; +} +.awe-lightbulb:before { + content: "\f0eb"; +} +.awe-exchange:before { + content: "\f0ec"; +} +.awe-cloud-download:before { + content: "\f0ed"; +} +.awe-cloud-upload:before { + content: "\f0ee"; +} +.awe-user-md:before { + content: "\f0f0"; +} +.awe-stethoscope:before { + content: "\f0f1"; +} +.awe-suitcase:before { + content: "\f0f2"; +} +.awe-bell-alt:before { + content: "\f0f3"; +} +.awe-coffee:before { + content: "\f0f4"; +} +.awe-food:before { + content: "\f0f5"; +} +.awe-file-alt:before { + content: "\f0f6"; +} +.awe-building:before { + content: "\f0f7"; +} +.awe-hospital:before { + content: "\f0f8"; +} +.awe-ambulance:before { + content: "\f0f9"; +} +.awe-medkit:before { + content: "\f0fa"; +} +.awe-fighter-jet:before { + content: "\f0fb"; +} +.awe-beer:before { + content: "\f0fc"; +} +.awe-h-sign:before { + content: "\f0fd"; +} +.awe-plus-sign-alt:before { + content: "\f0fe"; +} +.awe-double-angle-left:before { + content: "\f100"; +} +.awe-double-angle-right:before { + content: "\f101"; +} +.awe-double-angle-up:before { + content: "\f102"; +} +.awe-double-angle-down:before { + content: "\f103"; +} +.awe-angle-left:before { + content: "\f104"; +} +.awe-angle-right:before { + content: "\f105"; +} +.awe-angle-up:before { + content: "\f106"; +} +.awe-angle-down:before { + content: "\f107"; +} +.awe-desktop:before { + content: "\f108"; +} +.awe-laptop:before { + content: "\f109"; +} +.awe-tablet:before { + content: "\f10a"; +} +.awe-mobile-phone:before { + content: "\f10b"; +} +.awe-circle-blank:before { + content: "\f10c"; +} +.awe-quote-left:before { + content: "\f10d"; +} +.awe-quote-right:before { + content: "\f10e"; +} +.awe-spinner:before { + content: "\f110"; +} +.awe-circle:before { + content: "\f111"; +} +.awe-reply:before, +.awe-mail-reply:before { + content: "\f112"; +} +.awe-folder-close-alt:before { + content: "\f114"; +} +.awe-folder-open-alt:before { + content: "\f115"; +} +.awe-expand-alt:before { + content: "\f116"; +} +.awe-collapse-alt:before { + content: "\f117"; +} +.awe-smile:before { + content: "\f118"; +} +.awe-frown:before { + content: "\f119"; +} +.awe-meh:before { + content: "\f11a"; +} +.awe-gamepad:before { + content: "\f11b"; +} +.awe-keyboard:before { + content: "\f11c"; +} +.awe-flag-alt:before { + content: "\f11d"; +} +.awe-flag-checkered:before { + content: "\f11e"; +} +.awe-terminal:before { + content: "\f120"; +} +.awe-code:before { + content: "\f121"; +} +.awe-reply-all:before { + content: "\f122"; +} +.awe-mail-reply-all:before { + content: "\f122"; +} +.awe-star-half-full:before, +.awe-star-half-empty:before { + content: "\f123"; +} +.awe-location-arrow:before { + content: "\f124"; +} +.awe-crop:before { + content: "\f125"; +} +.awe-code-fork:before { + content: "\f126"; +} +.awe-unlink:before { + content: "\f127"; +} +.awe-question:before { + content: "\f128"; +} +.awe-info:before { + content: "\f129"; +} +.awe-exclamation:before { + content: "\f12a"; +} +.awe-superscript:before { + content: "\f12b"; +} +.awe-subscript:before { + content: "\f12c"; +} +.awe-eraser:before { + content: "\f12d"; +} +.awe-puzzle-piece:before { + content: "\f12e"; +} +.awe-microphone:before { + content: "\f130"; +} +.awe-microphone-off:before { + content: "\f131"; +} +.awe-shield:before { + content: "\f132"; +} +.awe-calendar-empty:before { + content: "\f133"; +} +.awe-fire-extinguisher:before { + content: "\f134"; +} +.awe-rocket:before { + content: "\f135"; +} +.awe-maxcdn:before { + content: "\f136"; +} +.awe-chevron-sign-left:before { + content: "\f137"; +} +.awe-chevron-sign-right:before { + content: "\f138"; +} +.awe-chevron-sign-up:before { + content: "\f139"; +} +.awe-chevron-sign-down:before { + content: "\f13a"; +} +.awe-html5:before { + content: "\f13b"; +} +.awe-css3:before { + content: "\f13c"; +} +.awe-anchor:before { + content: "\f13d"; +} +.awe-unlock-alt:before { + content: "\f13e"; +} +.awe-bullseye:before { + content: "\f140"; +} +.awe-ellipsis-horizontal:before { + content: "\f141"; +} +.awe-ellipsis-vertical:before { + content: "\f142"; +} +.awe-rss-sign:before { + content: "\f143"; +} +.awe-play-sign:before { + content: "\f144"; +} +.awe-ticket:before { + content: "\f145"; +} +.awe-minus-sign-alt:before { + content: "\f146"; +} +.awe-check-minus:before { + content: "\f147"; +} +.awe-level-up:before { + content: "\f148"; +} +.awe-level-down:before { + content: "\f149"; +} +.awe-check-sign:before { + content: "\f14a"; +} +.awe-edit-sign:before { + content: "\f14b"; +} +.awe-external-link-sign:before { + content: "\f14c"; +} +.awe-share-sign:before { + content: "\f14d"; +} + +/* Global styles */ +html, +body { + height: 100%; +} +body { + background-image: url("../img/assets/bg_body.jpg"); + background-repeat: repeat; + background-position: center center; + position: relative; +} +.container, +.ie8 .container { + width: 940px; +} +.navigation-block { + width: 220px; + float: left; + *zoom: 1; +} +.navigation-block:before, +.navigation-block:after { + display: table; + content: ""; + line-height: 0; +} +.navigation-block:after { + clear: both; +} +.navigation-block.affix { + position: fixed; + top: 20px; +} +.navigation-block.affix-bottom { + position: absolute; + top: auto; + bottom: 60px; +} +.navigation-block .navbar { + margin-bottom: 0; +} +.navigation-block .navbar .btn-navbar { + float: none; + margin: 0; + color: #40444d; + text-shadow: none; + text-align: left; +} +.navigation-block .navbar + .side-note { + margin-top: 10px; +} +.content-block { + width: 700px; + float: right; + margin-left: 20px; + *zoom: 1; +} +.content-block:before, +.content-block:after { + display: table; + content: ""; + line-height: 0; +} +.content-block:after { + clear: both; +} +#wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 0 -50px; +} +#push { + height: 50px; +} +/* Main header */ +#header { + position: relative; + padding: 20px 0; + margin-bottom: 20px; + border-bottom: 1px solid #dedede; +} +#header > h1 { + margin: 0; +} +#header > h1 + p { + margin: 0; + font-size: 11.049999999999999px; + text-shadow: 0 1px 0 #fff; +} +#header .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +#header nav { + float: right; + margin-top: -20px; + height: 30px; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul { + margin: 0; + *zoom: 1; +} +#header nav ul:before, +#header nav ul:after { + display: table; + content: ""; + line-height: 0; +} +#header nav ul:after { + clear: both; +} +#header nav ul > li { + float: left; + display: block; +} +#header nav ul > li + li { + border-right: 1px solid #363840; +} +#header nav ul > li:last-child { + border: none; +} +#header nav ul > li > a, +#header nav ul > li a.btn { + font-size: 11.049999999999999px !important; + padding: 6px 15px 0; + color: #b8babf; + display: block; + text-shadow: 0 1px 0 #000; + background: none; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li > a:hover, +#header nav ul > li a.btn:hover, +#header nav ul > li > a a.btn:hover, +#header nav ul > li a.btn a.btn:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li > a:hover .caret, +#header nav ul > li a.btn:hover .caret, +#header nav ul > li > a a.btn:hover .caret, +#header nav ul > li a.btn a.btn:hover .caret { + border-top-color: #fff; +} +#header nav ul > li a.btn { + padding: 6px 15px 5px; +} +#header nav ul > li .dropdown-menu { + margin: 0; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul > li .dropdown-menu li { + float: none; + border: none; +} +#header nav ul > li .dropdown-menu a { + color: #b8babf; + padding: 5px 15px; + text-shadow: 0 1px 0 #000; + background: none; +} +#header nav ul > li .dropdown-menu a:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li .btn-group.open .btn.dropdown-toggle { + color: #fff; + text-decoration: none; + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .btn .caret { + margin-left: 3px; + border-top-color: #b8babf; +} +#header nav ul > li .nav-search { + background-color: transparent; + border: none; + margin: 4px 0 4px 4px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .nav-search input { + height: 14px; + width: 100px; + margin: 0; + padding: 3px; + border-color: #fff; + -webkit-transition: width 0.3s ease; + -moz-transition: width 0.3s ease; + -o-transition: width 0.3s ease; + transition: width 0.3s ease; +} +#header nav ul > li .nav-search input:focus { + width: 180px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Main footer */ +#footer { + background-image: url("../img/assets/bg_footer.png"); + background-repeat: repeat-x; + background-position: top; + *zoom: 1; +} +#footer:before, +#footer:after { + display: table; + content: ""; + line-height: 0; +} +#footer:after { + clear: both; +} +#footer p { + margin: 20px 0 10px; + float: left; +} +#footer p a { + color: #525459; +} +#footer p a:hover { + color: #3a3b3e; +} +#footer p + ul { + margin-left: 10px; +} +#footer ul { + margin: 20px 0 0; + padding: 0; + list-style: none; + float: left; + *zoom: 1; +} +#footer ul:before, +#footer ul:after { + display: table; + content: ""; + line-height: 0; +} +#footer ul:after { + clear: both; +} +#footer ul li { + float: left; + display: block; +} +#footer ul li + li { + margin-left: 10px; +} +#footer .btn.btn-flat { + margin-top: 15px; + padding: 1px 8px; + font-size: 11.049999999999999px; +} +/* Navigation */ +.main-navigation { + margin-bottom: 20px; +} +.main-navigation > ul { + margin: 0; + list-style: none; + border-bottom: 1px solid #dedede; +} +.main-navigation > ul > li { + border-top: 1px solid #dedede; +} +.main-navigation > ul > li a { + color: #939699; + display: block; + background-repeat: no-repeat; +} +.main-navigation > ul > li > a { + line-height: 30px; +} +.main-navigation > ul > li > a:hover { + color: #6b9b20; + text-decoration: none; + background-color: #fafafa; +} +.main-navigation > ul > li > a:hover + ul { + background-color: #fafafa; +} +.main-navigation > ul > li > a [class^="awe-"], +.main-navigation > ul > li > a [class*=" awe-"] { + margin-right: 5px; + font-size: 15px; +} +.main-navigation > ul > li ul { + display: none; + margin: 0; + padding: 0 0 10px; + list-style: none; +} +.main-navigation > ul > li ul li.active a { + color: #525252; +} +.main-navigation > ul > li ul a { + line-height: 24px; + padding-left: 36px; + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: 22px 9px; +} +.main-navigation > ul > li ul a.current, +.main-navigation > ul > li ul a:hover { + color: #525252; + text-decoration: none; +} +.main-navigation > ul > li.current > a { + color: #6b9b20; +} +.main-navigation > ul > li.current > a [class^="awe-"], +.main-navigation > ul > li.current > a [class*=" awe-"] { + color: #6b9b20; +} +.main-navigation > ul > li.current > a + ul { + display: block; +} +/* Badge for navigation */ +.main-navigation .badge { + float: right; + padding: 1px 5px 2px; + margin: 7px 0 0 0; + font-size: 11.049999999999999px; + color: #ffffff; + background-color: #6b9b20; + cursor: help; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* User avatar */ +.user-profile { + margin-bottom: 20px; +} +.user-profile figure { + margin: 0; + *zoom: 1; +} +.user-profile figure:before, +.user-profile figure:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figure:after { + clear: both; +} +.user-profile img { + border: 1px solid #bec2c8; + background-color: #ffffff; + padding: 4px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + width: 60px; + height: 60px; +} +.user-profile figcaption { + float: right; + margin-left: 15px; + padding-top: 6px; + width: 130px; +} +.user-profile figcaption strong { + display: block; + line-height: 13px; +} +.user-profile figcaption strong a { + color: #525252; +} +.user-profile figcaption strong a:hover { + color: #000000; + text-decoration: none; +} +.user-profile figcaption em { + font-style: normal; + font-size: 9.75px; +} +.user-profile figcaption ul { + margin: 5px 0 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.user-profile figcaption ul:before, +.user-profile figcaption ul:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figcaption ul:after { + clear: both; +} +.user-profile figcaption ul > li { + float: left; + display: block; +} +.user-profile figcaption ul > li + li { + margin-left: 5px; +} +.user-profile figcaption ul .btn.btn-flat { + font-size: 11.049999999999999px; + padding: 1px 8px; +} +/* Side notes */ +.side-note { + background-image: url("../img/assets/bg-sidenote-top.png"); + background-repeat: no-repeat; + background-position: top center; + padding-top: 38px; + margin-bottom: 10px; +} +.side-note .side-note-container { + background-image: url("../img/assets/bg-sidenote-middle.png"); + background-repeat: repeat-y; + background-position: top center; + padding: 1px 20px 0; +} +.side-note .side-note-container p, +.side-note .side-note-container h2 { + margin: 0; + color: #807160; + line-height: 20px; + font-size: 11.049999999999999px; +} +.side-note .side-note-container h2 { + color: #665b4c; +} +.side-note .side-note-bottom { + background-image: url("../img/assets/bg-sidenote-bottom.png"); + background-repeat: no-repeat; + background-position: bottom center; + padding-bottom: 34px; +} +/* Balance */ +.balance { + border-top: 1px solid #dedede; + padding: 20px 0; +} +.balance h2 { + margin: 0; + font-size: 13px; + font-weight: normal; + line-height: normal; + color: #939699; +} +.balance strong { + font-size: 26px; + line-height: normal; + color: #525252; +} +/* Side search */ +.side-search { + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.side-search input { + width: 190px; + margin-bottom: 0; + padding-left: 14px; + padding-right: 14px; + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + line-height: normal; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; +} +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} +h1 { + font-size: 26px; + margin: 20px 0; +} +h2 { + font-size: 19.5px; + margin: 18px 0; +} +h3 { + font-size: 14.95px; + margin: 16px 0; +} +h4 { + font-size: 13px; + margin: 14px 0; +} +h5 { + font-size: 11.049999999999999px; + text-transform: uppercase; + margin: 12px 0; +} +h6 { + font-size: 9.75px; + text-transform: uppercase; + margin: 10px 0; +} +nav ul, +nav ol { + margin: 0; + padding: 0; + list-style: none; + list-style-image: none; +} +blockquote, +blockquote.pull-right { + clear: both; + margin: 0 0 20px; +} +blockquote small, +blockquote.pull-right small { + font-size: 10px; +} +code { + padding: 1px 3px; + background-color: #40444d; + border: 1px solid #000; + color: #ffffff; +} +pre { + border-color: #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); +} +.label { + padding: 1px 4px; +} +a.label:hover { + color: #ffffff; + background-color: #808080; + text-decoration: none; + cursor: pointer; +} +a.label-important:hover { + background-color: #953b39; +} +a.label-warning:hover { + background-color: #c67605; +} +a.label-success:hover { + background-color: #356635; +} +a.label-info:hover { + background-color: #2d6987; +} +a.label-inverse:hover { + background-color: #1a1a1a; +} +dl.dl-horizontal dt, +dl.dl-horizontal dd { + line-height: 21.599999999999998px; +} +dl.dl-horizontal dt { + width: 100px; +} +dl.dl-horizontal dd { + margin-left: 130px; +} +.data-block ol, +.data-block ul { + margin-bottom: 20px; +} +.data-block ol.checkmark, +.data-block ul.checkmark, +.data-block ol.crossmark, +.data-block ul.crossmark, +.data-block ol.pointmark, +.data-block ul.pointmark { + list-style: none; + margin-left: 0; +} +.data-block ol.checkmark li, +.data-block ul.checkmark li, +.data-block ol.crossmark li, +.data-block ul.crossmark li, +.data-block ol.pointmark li, +.data-block ul.pointmark li { + padding-left: 15px; + background-position: left 7px; + background-color: transparent; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_list_style_check.png"); +} +.data-block ol.crossmark li, +.data-block ul.crossmark li { + background-image: url("../img/icons/icon_list_style_cross.png"); +} +.data-block ol.pointmark li, +.data-block ul.pointmark li { + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: left 8px; +} +.data-block li { + line-height: 20px; +} +.well { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; +} +.well blockquote { + border-color: rgba(0, 0, 0, 0.15); +} +.well.large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well.small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* Content */ +/* Data block grid */ +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.span12 { + width: 700px; +} +.span11 { + width: 640px; +} +.span10 { + width: 580px; +} +.span9 { + width: 520px; +} +.span8 { + width: 460px; +} +.span7 { + width: 400px; +} +.span6 { + width: 340px; +} +.span5 { + width: 280px; +} +.span4 { + width: 220px; +} +.span3 { + width: 160px; +} +.span2 { + width: 100px; +} +.span1 { + width: 40px; +} +.offset12 { + margin-left: 740px; +} +.offset11 { + margin-left: 680px; +} +.offset10 { + margin-left: 620px; +} +.offset9 { + margin-left: 560px; +} +.offset8 { + margin-left: 500px; +} +.offset7 { + margin-left: 440px; +} +.offset6 { + margin-left: 380px; +} +.offset5 { + margin-left: 320px; +} +.offset4 { + margin-left: 260px; +} +.offset3 { + margin-left: 200px; +} +.offset2 { + margin-left: 140px; +} +.offset1 { + margin-left: 80px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.386363636363636%; + *margin-left: 2.3331721470019335%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.386363636363636%; +} +.row-fluid .span12 { + width: 99.88636363636363%; + *width: 99.83317214700192%; +} +.row-fluid .span11 { + width: 91.36363636363636%; + *width: 91.31044487427465%; +} +.row-fluid .span10 { + width: 82.84090909090908%; + *width: 82.78771760154737%; +} +.row-fluid .span9 { + width: 74.31818181818181%; + *width: 74.2649903288201%; +} +.row-fluid .span8 { + width: 65.79545454545453%; + *width: 65.74226305609282%; +} +.row-fluid .span7 { + width: 57.272727272727266%; + *width: 57.219535783365565%; +} +.row-fluid .span6 { + width: 48.74999999999999%; + *width: 48.69680851063829%; +} +.row-fluid .span5 { + width: 40.22727272727272%; + *width: 40.17408123791102%; +} +.row-fluid .span4 { + width: 31.70454545454545%; + *width: 31.65135396518375%; +} +.row-fluid .span3 { + width: 23.18181818181818%; + *width: 23.12862669245648%; +} +.row-fluid .span2 { + width: 14.659090909090907%; + *width: 14.605899419729205%; +} +.row-fluid .span1 { + width: 6.136363636363636%; + *width: 6.0831721470019335%; +} +.row-fluid .offset12 { + margin-left: 104.65909090909089%; + *margin-left: 104.55270793036748%; +} +.row-fluid .offset12:first-child { + margin-left: 102.27272727272727%; + *margin-left: 102.16634429400385%; +} +.row-fluid .offset11 { + margin-left: 96.13636363636363%; + *margin-left: 96.02998065764021%; +} +.row-fluid .offset11:first-child { + margin-left: 93.75%; + *margin-left: 93.64361702127658%; +} +.row-fluid .offset10 { + margin-left: 87.61363636363635%; + *margin-left: 87.50725338491293%; +} +.row-fluid .offset10:first-child { + margin-left: 85.22727272727272%; + *margin-left: 85.1208897485493%; +} +.row-fluid .offset9 { + margin-left: 79.09090909090908%; + *margin-left: 78.98452611218566%; +} +.row-fluid .offset9:first-child { + margin-left: 76.70454545454545%; + *margin-left: 76.59816247582204%; +} +.row-fluid .offset8 { + margin-left: 70.5681818181818%; + *margin-left: 70.46179883945838%; +} +.row-fluid .offset8:first-child { + margin-left: 68.18181818181817%; + *margin-left: 68.07543520309476%; +} +.row-fluid .offset7 { + margin-left: 62.04545454545454%; + *margin-left: 61.93907156673114%; +} +.row-fluid .offset7:first-child { + margin-left: 59.6590909090909%; + *margin-left: 59.5527079303675%; +} +.row-fluid .offset6 { + margin-left: 53.522727272727266%; + *margin-left: 53.41634429400386%; +} +.row-fluid .offset6:first-child { + margin-left: 51.136363636363626%; + *margin-left: 51.02998065764022%; +} +.row-fluid .offset5 { + margin-left: 44.99999999999999%; + *margin-left: 44.89361702127659%; +} +.row-fluid .offset5:first-child { + margin-left: 42.61363636363635%; + *margin-left: 42.50725338491295%; +} +.row-fluid .offset4 { + margin-left: 36.47727272727272%; + *margin-left: 36.37088974854932%; +} +.row-fluid .offset4:first-child { + margin-left: 34.090909090909086%; + *margin-left: 33.984526112185684%; +} +.row-fluid .offset3 { + margin-left: 27.954545454545453%; + *margin-left: 27.84816247582205%; +} +.row-fluid .offset3:first-child { + margin-left: 25.568181818181817%; + *margin-left: 25.461798839458414%; +} +.row-fluid .offset2 { + margin-left: 19.43181818181818%; + *margin-left: 19.325435203094777%; +} +.row-fluid .offset2:first-child { + margin-left: 17.045454545454543%; + *margin-left: 16.93907156673114%; +} +.row-fluid .offset1 { + margin-left: 10.909090909090907%; + *margin-left: 10.802707930367504%; +} +.row-fluid .offset1:first-child { + margin-left: 8.522727272727272%; + *margin-left: 8.416344294003867%; +} +[class*="span"] { + margin-bottom: 20px; +} +.data-block .row .row { + margin-left: -20px; + *zoom: 1; +} +.data-block .row .row:before, +.data-block .row .row:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .row .row:after { + clear: both; +} +.data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.data-block .row .container, +.data-block .row .navbar-static-top .container, +.data-block .row .navbar-fixed-top .container, +.data-block .row .navbar-fixed-bottom .container { + width: 652px; +} +.data-block .row .span12 { + width: 652px; +} +.data-block .row .span11 { + width: 596px; +} +.data-block .row .span10 { + width: 540px; +} +.data-block .row .span9 { + width: 484px; +} +.data-block .row .span8 { + width: 428px; +} +.data-block .row .span7 { + width: 372px; +} +.data-block .row .span6 { + width: 316px; +} +.data-block .row .span5 { + width: 260px; +} +.data-block .row .span4 { + width: 204px; +} +.data-block .row .span3 { + width: 148px; +} +.data-block .row .span2 { + width: 92px; +} +.data-block .row .span1 { + width: 36px; +} +.data-block .row .offset12 { + margin-left: 692px; +} +.data-block .row .offset11 { + margin-left: 636px; +} +.data-block .row .offset10 { + margin-left: 580px; +} +.data-block .row .offset9 { + margin-left: 524px; +} +.data-block .row .offset8 { + margin-left: 468px; +} +.data-block .row .offset7 { + margin-left: 412px; +} +.data-block .row .offset6 { + margin-left: 356px; +} +.data-block .row .offset5 { + margin-left: 300px; +} +.data-block .row .offset4 { + margin-left: 244px; +} +.data-block .row .offset3 { + margin-left: 188px; +} +.data-block .row .offset2 { + margin-left: 132px; +} +.data-block .row .offset1 { + margin-left: 76px; +} +.data-block .row > [class*="span"]:first-child { + margin-left: 0; +} +.data-block .data-container > *:last-child { + margin-bottom: 20px; +} +.data-block .row, +.data-block .row .row, +.data-block .row-fluid { + margin-left: 0; +} +.data-block.span1 [class*="span"], +.data-block.span2 [class*="span"], +.data-block.span3 [class*="span"] { + width: auto; + float: none; + margin: 0 0 20px 0; +} +/* Data blocks */ +.data-block { + position: relative; + margin-bottom: 20px; + color: #525459; +} +.data-block .data-container { + padding: 23px 23px 3px 23px; + background-color: #ffffff; + border: 1px solid #bec2c8; + *zoom: 1; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; +} +.data-block .data-container:before, +.data-block .data-container:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .data-container:after { + clear: both; +} +.data-block .data-container p { + line-height: 160%; +} +.data-block .data-container + .data-container { + margin-top: 20px; +} +.data-block > .data-block { + margin-top: 20px; +} +.data-block.decent .data-container { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} +.data-block.raw { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.raw .data-container { + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.raw.fit { + margin-top: 25px; +} +/* Data block header */ +.data-block header { + border-bottom: 1px solid #dedede; + padding-bottom: 10px; + margin-bottom: 20px; + *zoom: 1; +} +.data-block header:before, +.data-block header:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header:after { + clear: both; +} +.data-block header h1 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 21.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.data-block header h2 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 16.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +/* Data block footer */ +.data-block footer { + text-transform: uppercase; + font-size: 10px; + margin: 23px 0 20px; + color: #a4a5aa; +} +.data-block footer.info, +.data-block footer.warning { + padding-left: 22px; + background-position: left center; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_footer_info.png"); +} +.data-block footer.warning { + background-image: url("../img/icons/icon_footer_warning.png"); +} +.data-block footer p { + font-size: 10px; + line-height: normal; + margin: 0; +} +/* Page header */ +.page-header { + margin: 0 0 40px; + padding-bottom: 0; + border-bottom: none; +} +.page-header h1 { + margin: 0 0 20px; + line-height: normal; +} +/* Hero unit */ +.hero-unit { + margin-bottom: 20px; + -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); +} +.hero-unit h1 { + text-shadow: 0 1px 1px #000; + letter-spacing: normal; +} +/* Buttons */ +.btn { + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.btn.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.btn.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.btn.btn-alt { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); +} +.btn.btn-alt.btn-large { + -webkit-border-radius: 22px; + -moz-border-radius: 22px; + border-radius: 22px; +} +.btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); +} +.btn-group > .btn-alt { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn.btn-alt:first-child { + -webkit-border-top-left-radius: 18px; + -moz-border-radius-topleft: 18px; + border-top-left-radius: 18px; + -webkit-border-bottom-left-radius: 18px; + -moz-border-radius-bottomleft: 18px; + border-bottom-left-radius: 18px; +} +.btn-group > .btn.btn-alt:last-child, +.btn-group > .btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 18px; + -moz-border-radius-topright: 18px; + border-top-right-radius: 18px; + -webkit-border-bottom-right-radius: 18px; + -moz-border-radius-bottomright: 18px; + border-bottom-right-radius: 18px; +} +.btn-group > .btn.btn-large.btn-alt:first-child { + -webkit-border-top-left-radius: 22px; + -moz-border-radius-topleft: 22px; + border-top-left-radius: 22px; + -webkit-border-bottom-left-radius: 22px; + -moz-border-radius-bottomleft: 22px; + border-bottom-left-radius: 22px; +} +.btn-group > .btn.btn-large.btn-alt:last-child, +.btn-group > .btn-large.btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 22px; + -moz-border-radius-topright: 22px; + border-top-right-radius: 22px; + -webkit-border-bottom-right-radius: 22px; + -moz-border-radius-bottomright: 22px; + border-bottom-right-radius: 22px; +} +.btn.btn-flat { + padding: 5px 12px; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e6e6e6; + color: #939699; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat:hover, +.btn.btn-flat:active, +.btn.btn-flat.active, +.btn.btn-flat.disabled, +.btn.btn-flat[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat:active, +.btn.btn-flat.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-primary { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #6b9b20; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-primary:hover, +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active, +.btn.btn-flat.btn-primary.disabled, +.btn.btn-flat.btn-primary[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-warning { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #fbb450; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-warning:hover, +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active, +.btn.btn-flat.btn-warning.disabled, +.btn.btn-flat.btn-warning[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-danger { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e74949; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-danger:hover, +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active, +.btn.btn-flat.btn-danger.disabled, +.btn.btn-flat.btn-danger[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-success { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #6b9b20; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-success:hover, +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active, +.btn.btn-flat.btn-success.disabled, +.btn.btn-flat.btn-success[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-info { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #4986e7; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-info:hover, +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active, +.btn.btn-flat.btn-info.disabled, +.btn.btn-flat.btn-info[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-inverse { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #40444d; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-inverse:hover, +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active, +.btn.btn-flat.btn-inverse.disabled, +.btn.btn-flat.btn-inverse[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Tables */ +.table { + margin-bottom: 20px; +} +.table th, +.table td { + border-top: 1px dotted #dedede; +} +.table thead th { + border-bottom: 2px solid #bec2c8; +} +.table tbody th { + border-top: none; + border-right: 2px solid #bec2c8; +} +.table .btn-group { + float: right; + margin: 0; +} +.table.table-striped { + border-bottom: 1px dotted #dedede; +} +.table.table-striped tbody tr:nth-child(2n+1) td, +.table.table-striped tbody tr:nth-child(2n+1) th { + background-color: #f8f8f8; +} +.table.table-bordered { + border-bottom: 1px solid #dedede; +} +.table.table-bordered th, +.table.table-bordered td { + border-top: 1px solid #dedede; +} +.table.table-bordered thead th { + border-bottom: none; +} +.table [class*="span"] { + margin-left: 0; + float: none; +} +.table td.toolbar, +.table th.toolbar { + text-align: right; + padding: 4px; +} +.table td.toolbar .btn-flat, +.table th.toolbar .btn-flat { + padding: 4px 8px; +} +.table td.toolbar > a span, +.table th.toolbar > a span { + margin-top: 4px; +} +.table-media tr td { + vertical-align: middle; +} +.table-media tr td:first-child, +.table-media tr th:first-child { + width: 20px; + text-align: center; +} +.table-media .thumbnail { + display: table-cell; + width: 45px; + border-right: none; + border-bottom: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Forms */ +.data-block input[class*="span"], +.data-block select[class*="span"], +.data-block textarea[class*="span"], +.data-block .uneditable-input[class*="span"], +.data-block .row-fluid input[class*="span"], +.data-block .row-fluid select[class*="span"], +.data-block .row-fluid textarea[class*="span"], +.data-block .row-fluid .uneditable-input[class*="span"] { + float: none; + display: inline-block; + margin-left: 0; +} +form { + margin-bottom: 20px; + background: none; + border: 0px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; +} +legend { + padding: 20px 20px 0; + margin-bottom: 0; + border: none; + width: auto; +} +legend + .control-group { + margin-top: 0; +} +label { + font-weight: bold; + color: #525252; +} +label.radio, +label.checkbox { + font-weight: normal; + color: #525459; +} +.form-inline .control-label { + margin: 10px 0; +} +.form-inline .control-label:first-child { + margin-top: 0; +} +.form-horizontal .control-label { + text-align: left; +} +.form-search input { + margin-right: 5px; +} +.control-group, +.form-horizontal .control-group { + margin: 0; + padding: 20px; + border-bottom: 1px dashed #dedede; +} +.control-group:last-child, +.form-horizontal .control-group:last-child { + border: none; +} +.form-actions { + border: none; + background-color: transparent; + margin: 0; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +select:focus, +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: #bfbfbf; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); +} +input[type="radio"], +input[type="checkbox"] { + margin-top: 3px; +} +.ie8 .input-medium { + width: 110px; +} +.ie8 .input-small { + width: 70px; +} +.ie8 .input-mini { + width: 50px; +} +.ie8 .form-horizontal .control-label { + width: 120px; +} +.ie8 .form-horizontal .controls { + margin-left: 140px; +} +/* Bootstrap File & Image input */ +.btn-file { + position: relative; + overflow: hidden; + vertical-align: middle; +} +.btn-file > input { + position: absolute; + top: 0; + right: 0; + margin: 0; + cursor: pointer; + direction: ltr; + font-size: 23px; + transform: translate(-300px, 0) scale(4); + opacity: 0; + filter: alpha(opacity=0); +} +.fileupload { + padding-left: 0; + margin-bottom: 20px; +} +.fileupload h4 { + margin: 0 0 10px; +} +.fileupload .thumbnail { + display: inline-block; + margin-bottom: 5px; + overflow: hidden; + text-align: center; + vertical-align: middle; + background-color: #ffffff; +} +.fileupload .thumbnail > img { + display: block; + max-height: 100%; + vertical-align: middle; +} +.fileupload .thumbnail.fileupload-small { + width: 50px; + height: 50px; +} +.fileupload .thumbnail.fileupload-small.flexible { + width: auto; + height: auto; + max-width: 75px; + max-height: 75px; +} +.fileupload .thumbnail.fileupload-large { + width: 250px; + height: 150px; +} +.fileupload .thumbnail.fileupload-large.flexible { + width: auto; + height: auto; + max-width: 350px; + max-height: 250px; +} +.fileupload .thumbnail + .btn { + margin-bottom: 5px; +} +.fileupload .thumbnail + .btn + .btn { + margin-bottom: 5px; +} +.fileupload .raw.thumbnail { + padding: 0; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.fileupload .btn { + vertical-align: middle; +} +.fileupload .uneditable-input { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + cursor: text; +} +.fileupload-exists .fileupload-new, +.fileupload-new .fileupload-exists { + display: none; +} +.fileupload-new .input-append .btn-file { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.fileupload-exists .input-append .btn-file { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Form gallery */ +.form-gallery { + background: none; + border: none; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.form-gallery li input[type="checkbox"] { + margin: 0; + position: absolute; + top: 10px; + left: 10px; +} +.form-gallery .thumbnails .thumbnail { + background-color: #ffffff; +} +.form-gallery .thumbnails .thumbnail.active { + border-color: #6b9b20; + background-color: #88c529; +} +.form-gallery .form-actions { + padding: 0; + margin: 0; + border: none; + background: none; +} +.form-gallery .form-actions [class*="span"] { + margin-bottom: 0; +} +/* Gallery */ +.thumbnails .row { + margin-left: -20px; + *zoom: 1; +} +.thumbnails .row:before, +.thumbnails .row:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails .row:after { + clear: both; +} +.thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.thumbnails .container, +.thumbnails .navbar-static-top .container, +.thumbnails .navbar-fixed-top .container, +.thumbnails .navbar-fixed-bottom .container { + width: 640px; +} +.thumbnails .span12 { + width: 640px; +} +.thumbnails .span11 { + width: 585px; +} +.thumbnails .span10 { + width: 530px; +} +.thumbnails .span9 { + width: 475px; +} +.thumbnails .span8 { + width: 420px; +} +.thumbnails .span7 { + width: 365px; +} +.thumbnails .span6 { + width: 310px; +} +.thumbnails .span5 { + width: 255px; +} +.thumbnails .span4 { + width: 200px; +} +.thumbnails .span3 { + width: 145px; +} +.thumbnails .span2 { + width: 90px; +} +.thumbnails .span1 { + width: 35px; +} +.thumbnails .offset12 { + margin-left: 680px; +} +.thumbnails .offset11 { + margin-left: 625px; +} +.thumbnails .offset10 { + margin-left: 570px; +} +.thumbnails .offset9 { + margin-left: 515px; +} +.thumbnails .offset8 { + margin-left: 460px; +} +.thumbnails .offset7 { + margin-left: 405px; +} +.thumbnails .offset6 { + margin-left: 350px; +} +.thumbnails .offset5 { + margin-left: 295px; +} +.thumbnails .offset4 { + margin-left: 240px; +} +.thumbnails .offset3 { + margin-left: 185px; +} +.thumbnails .offset2 { + margin-left: 130px; +} +.thumbnails .offset1 { + margin-left: 75px; +} +.thumbnails li { + margin: 0; + position: relative; + margin-bottom: 20px; + margin-left: 20px; +} +.thumbnails li .thumbnail-actions { + margin: 0; + display: block; + position: absolute; + bottom: 10px; + right: 10px; + font-size: 11.049999999999999px; + list-style: none; + color: #ffffff; + background-color: #6b9b20; + opacity: 0; + filter: alpha(opacity=0); +} +.thumbnails li .thumbnail-actions li { + margin: 0; + display: inline-block; +} +.thumbnails li .thumbnail-actions li a { + padding: 2px 4px 3px; + display: block; + color: #ffffff; + opacity: 0.8; + filter: alpha(opacity=80); +} +.thumbnails li .thumbnail-actions li a:hover { + opacity: 1; + filter: alpha(opacity=100); + text-decoration: none; +} +.thumbnails li:hover .thumbnail-actions { + opacity: 0.85; + filter: alpha(opacity=85); +} +.thumbnail + p { + margin-top: 20px; +} +.data-block .thumbnails { + margin-bottom: 0; +} +.data-block .thumbnails.row-fluid { + margin-left: 0; +} +.data-block .thumbnails .thumbnail { + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block .thumbnails.raw .thumbnail { + border: none; + padding: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); +} +.data-block.raw .thumbnails { + margin-left: auto; + margin-right: auto; +} +.data-block.raw section > * + .thumbnails { + margin-top: 20px; +} +/* Icons */ +[class^="awe-"], +[class*=" awe-"] { + height: auto; + width: auto; + line-height: normal; + vertical-align: middle; + background-image: none; + padding-right: 7px; +} +/* Alerts */ +.alert h4 { + margin: 0; +} +.alert.alert-white { + background-color: #ffffff; + border-color: #dedede; + color: #525459; +} +.alert.alert-inverse { + background-color: #40444d; + border-color: #000; + color: #ffffff; + text-shadow: none; +} +.alert.alert-inverse .close { + color: white; +} +.raw .alert { + -webkit-box-shadow: '0 1px 0 #fff'; + -moz-box-shadow: '0 1px 0 #fff'; + box-shadow: '0 1px 0 #fff'; +} +form .alert { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Accordion */ +.data-block section .accordion .accordion-group { + margin: 0; + border-color: #dedede; + border-width: 0 1px 1px 1px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block section .accordion .accordion-group:first-child { + border-width: 1px; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.data-block section .accordion .accordion-group:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.data-block section .accordion .accordion-toggle { + font-weight: bold; + font-size: 16px; + color: #525252; +} +.data-block section .accordion .accordion-toggle:hover { + color: #6b9b20; + text-decoration: none; +} +.data-block.raw .accordion-toggle { + background-color: #ffffff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block.raw .accordion-toggle:hover { + background-color: #6b9b20; + color: #ffffff; + text-decoration: none; +} +.accordion .collapse { + overflow: hidden; +} +/* Progress bars */ +.progress { + margin-bottom: 10px; + background-image: none; + border: 1px solid #e0e0e0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.progress:last-child { + margin-bottom: 0; +} +.progress .bar:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.progress.progress-line { + height: 9px; +} +.progress-inverse .bar { + background-color: #484d54; + background-image: -moz-linear-gradient(top, #565c64, #33363b); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#565c64), to(#33363b)); + background-image: -webkit-linear-gradient(top, #565c64, #33363b); + background-image: -o-linear-gradient(top, #565c64, #33363b); + background-image: linear-gradient(to bottom, #565c64, #33363b); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff565c64', endColorstr='#ff33363b', GradientType=0); +} +.progress-inverse.progress-striped .bar { + background-color: #565c64; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +/* Pagination */ +.pagination { + height: auto; +} +.pagination ul { + margin-top: -5px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + *zoom: 1; +} +.pagination ul:before, +.pagination ul:after { + display: table; + content: ""; + line-height: 0; +} +.pagination ul:after { + clear: both; +} +.pagination ul li { + display: block; + float: left; + margin-top: 5px; + margin-right: 4px; +} +.pagination ul li:first-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li:last-child { + margin-right: 0; +} +.pagination ul li:last-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li a { + border-width: 1px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + line-height: 24px; + padding: 0 10px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pagination ul li.disabled > span, +.pagination ul li.disabled a, +.pagination ul li.disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pagination ul li a:hover, +.pagination ul li.active a { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.pagination ul li [class^="awe-"], +.pagination ul li [class*=" awe-"], +.pagination ul li [class^="icon-"], +.pagination ul li [class*=" icon-"], +.pagination ul li [class^="fam-"], +.pagination ul li [class*=" fam-"] { + float: none; + border: none; + padding: 0; + background-color: transparent; + line-height: 0; +} +.pager .disabled a, +.pager .disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pager li > a { + padding: 4px 14px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pager li > a:hover { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +/* Tabs */ +.nav-tabs > li { + margin-bottom: 0; +} +.tabs-left .tab-content { + margin: 0; + padding-left: 20px; + border-left: 1px solid #dedede; +} +.tabs-left > .nav-tabs { + border-right: 1px solid #dedede; + margin-right: -1px; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + color: #6b9b20; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-left > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: transparent #dedede transparent transparent; + background-color: #ffffff; + color: #6b9b20; +} +.tabs-right .tab-content { + padding-right: 20px; + border-right: 1px solid #dedede; +} +.tabs-right > .nav-tabs { + border-left: 1px solid #dedede; + margin-left: -1px; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + color: #6b9b20; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-right > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: transparent transparent transparent #dedede; + background-color: #ffffff; + color: #6b9b20; +} +.tab-content { + overflow: visible; +} +.tabbable .tab-content { + overflow: auto; +} +/* Popover */ +.popover .popover-title { + margin: 0; +} +/* Modal */ +.modal .modal-header * { + margin: 0; +} +.modal .modal-header > .close { + margin-top: 2px; +} +/* Loading */ +.loading { + display: inline-block; + background-image: url("../img/icons/loading_green.gif"); + background-repeat: no-repeat; + background-position: center; + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + width: 24px; + height: 24px; +} +.loading.dark { + background-image: url("../img/icons/loading_dark.gif"); +} +.loading.red { + background-image: url("../img/icons/loading_red.gif"); +} +.loading.green { + background-image: url("../img/icons/loading_green.gif"); +} +.loading.blue { + background-image: url("../img/icons/loading_blue.gif"); +} +/* Data block components */ +/* Data block header controls */ +.data-block header h2 + .btn, +.data-block header h2 + .btn-group, +.data-block header .data-header-actions { + float: right; + margin: -5px 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.data-block header h2 + .btn:before, +.data-block header h2 + .btn-group:before, +.data-block header .data-header-actions:before, +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + clear: both; +} +.data-block header h2 + .btn li, +.data-block header h2 + .btn-group li, +.data-block header .data-header-actions li { + float: left; + display: block; +} +.data-block header h2 + .btn li + li, +.data-block header h2 + .btn-group li + li, +.data-block header .data-header-actions li + li { + margin-left: 5px; +} +.data-block header h2 + .btn li.active .btn, +.data-block header h2 + .btn-group li.active .btn, +.data-block header .data-header-actions li.active .btn { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-primary { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-warning { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-danger { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-success, +.data-block header .data-header-actions li.active .btn.btn-success { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-info, +.data-block header .data-header-actions li.active .btn.btn-info { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-inverse { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat, +.data-block header h2 + .btn-group li.active .btn.btn-flat, +.data-block header .data-header-actions li.active .btn.btn-flat { + background-color: #d9d9d9; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-primary { + background-color: #3f5c13; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-warning { + background-color: #f89406; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-danger { + background-color: #c91b1b; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-success, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-success { + background-color: #3f5c13; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-info, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-info { + background-color: #1b5ec9; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-inverse { + background-color: #1d1f23; +} +.data-block header h2 + .btn li.active .btn.btn-alt, +.data-block header h2 + .btn-group li.active .btn.btn-alt, +.data-block header .data-header-actions li.active .btn.btn-alt { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-success, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-info, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.data-block header h2 + .btn li .loading, +.data-block header h2 + .btn-group li .loading, +.data-block header .data-header-actions li .loading { + display: block; +} +.data-block.raw header .data-header-actions { + margin: 0; +} +/* Data block header search */ +.data-block header .header-search { + display: inline; + float: right; + background-color: transparent; + border: none; + margin: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block header .header-search input { + margin: 0; + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Data accordion block */ +.data-block.accordion-block .accordion { + margin-bottom: 0; +} +.data-block.accordion-block .data-container { + padding: 0; +} +.data-block.accordion-block .accordion-group { + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.accordion-block .accordion-group + .accordion-group { + border-top: 1px solid #e5e5e5; +} +.data-block.accordion-block .accordion-toggle { + color: #525252; + font-size: 16px; + font-weight: bold; + line-height: normal; +} +.data-block.accordion-block .accordion-toggle:hover { + color: #6b9b20; + text-decoration: none; +} +/* Data todo block */ +.data-block.todo-block header { + margin-bottom: 0; +} +.data-block.todo-block form { + margin: 0; + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.todo-block table { + margin: 0; +} +.data-block.todo-block table tr:first-child td { + border-top: 0; +} +.data-block.todo-block table tr.done { + opacity: 0.4; + filter: alpha(opacity=40); +} +.data-block.todo-block table tr.done p { + text-decoration: line-through; +} +.data-block.todo-block table tr.done:hover { + opacity: 1; + filter: alpha(opacity=100); +} +.data-block.todo-block table tr p { + margin: 0; + line-height: normal; +} +.data-block.todo-block table tr p + span { + font-size: 9.75px; + color: #a4a5aa; +} +.data-block.todo-block table tr input { + margin-top: 0; +} +/* Wizard */ +.wizard { + overflow: visible; +} +.wizard .stepContainer { + display: block; + position: relative; + overflow: hidden; + height: 100%; +} +.wizard .stepContainer > div.content { + margin: 0; + padding: 20px; + display: block; + position: absolute; + text-align: left; + overflow: visible; + z-index: 88; +} +.wizard .stepContainer .StepTitle { + display: block; + z-index: 88; + *zoom: 1; +} +.wizard .stepContainer .StepTitle:before, +.wizard .stepContainer .StepTitle:after { + display: table; + content: ""; + line-height: 0; +} +.wizard .stepContainer .StepTitle:after { + clear: both; +} +.wizard ul.anchor { + margin: 0 0 10px; + text-align: center; + background-color: #f5f5f5; + border: 1px solid #dedede; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.wizard ul.anchor li { + margin-left: 20px; + display: inline-block; +} +.wizard ul.anchor li:first-child { + margin: 0; +} +.wizard ul.anchor li a { + display: block; + font-size: 15px; + line-height: 36px; + text-decoration: none; + outline-style: none; + *zoom: 1; + z-index: 99; +} +.wizard ul.anchor li a:before, +.wizard ul.anchor li a:after { + display: table; + content: ""; + line-height: 0; +} +.wizard ul.anchor li a:after { + clear: both; +} +.wizard ul.anchor li a.selected { + color: #6b9b20; + cursor: text; +} +.wizard ul.anchor li a.done { + color: #6b9b20; + text-decoration: line-through; +} +.wizard ul.anchor li a.done .stepDesc { + color: #6b9b20; +} +.wizard ul.anchor li a.disabled { + color: #939699; + cursor: text; +} +.wizard > div.actionBar { + margin-top: 6.666666666666667px; + display: block; + text-align: left; + overflow: auto; + z-index: 88; + *zoom: 1; +} +.wizard > div.actionBar:before, +.wizard > div.actionBar:after { + display: table; + content: ""; + line-height: 0; +} +.wizard > div.actionBar:after { + clear: both; +} +.wizard .buttonDisabled { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + cursor: text !important; +} +.wizard .buttonNext, +.wizard .buttonPrevious, +.wizard .buttonFinish { + display: block; + text-decoration: none; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + *background-color: #e6e6e6; + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f9b20; + background-image: -moz-linear-gradient(top, #6b9b20, #4c9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4c9b20)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4c9b20); + background-image: -o-linear-gradient(top, #6b9b20, #4c9b20); + background-image: linear-gradient(to bottom, #6b9b20, #4c9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4c9b20', GradientType=0); + border-color: #4c9b20 #4c9b20 #2d5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4c9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #cccccc \9; +} +.wizard .buttonNext:first-child, +.wizard .buttonPrevious:first-child, +.wizard .buttonFinish:first-child { + *margin-left: 0; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.wizard .buttonNext .label, +.wizard .buttonPrevious .label, +.wizard .buttonFinish .label, +.wizard .buttonNext .badge, +.wizard .buttonPrevious .badge, +.wizard .buttonFinish .badge { + position: relative; + top: -1px; +} +.wizard .buttonNext [class^="awe-"], +.wizard .buttonPrevious [class^="awe-"], +.wizard .buttonFinish [class^="awe-"], +.wizard .buttonNext [class*=" awe-"], +.wizard .buttonPrevious [class*=" awe-"], +.wizard .buttonFinish [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.wizard .buttonNext [class^="awe-"].awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-large, +.wizard .buttonFinish [class^="awe-"].awe-large, +.wizard .buttonNext [class*=" awe-"].awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-large { + line-height: .9em; +} +.wizard .buttonNext [class^="awe-"].awe-spin, +.wizard .buttonPrevious [class^="awe-"].awe-spin, +.wizard .buttonFinish [class^="awe-"].awe-spin, +.wizard .buttonNext [class*=" awe-"].awe-spin, +.wizard .buttonPrevious [class*=" awe-"].awe-spin, +.wizard .buttonFinish [class*=" awe-"].awe-spin { + display: inline-block; +} +.wizard .buttonNext [class^="awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-left.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonNext [class^="awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-right.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.wizard .buttonNext [class^="awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class^="awe-"].awe-spin.awe-large, +.wizard .buttonNext [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.wizard .buttonNext.btn-mini, +.wizard .buttonPrevious.btn-mini, +.wizard .buttonFinish.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.wizard .buttonNext.btn-small, +.wizard .buttonPrevious.btn-small, +.wizard .buttonFinish.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.wizard .buttonNext.btn-large, +.wizard .buttonPrevious.btn-large, +.wizard .buttonFinish.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #ffffff; + background-color: #4c9b20; + *background-color: #42861c; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #377117 \9; +} +.wizard .buttonNext .caret, +.wizard .buttonPrevious .caret, +.wizard .buttonFinish .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.wizard .buttonNext { + float: right; + margin-right: 5px; +} +.wizard .buttonPrevious { + float: left; +} +.wizard .buttonFinish { + float: right; +} +.wizard .loader { + position: relative; + display: none; + float: left; + margin: 2px 0 0 2px; + padding: 8px 10px 8px 40px; + z-index: 998; +} +/* Widgets */ +.widgets { + text-align: center; + list-style: none; + *zoom: 1; +} +.widgets:before, +.widgets:after { + display: table; + content: ""; + line-height: 0; +} +.widgets:after { + clear: both; +} +.widgets > li { + min-height: 90px; + text-align: center; + border-right: 1px dotted #dedede; +} +.widgets > li:last-child { + border-right: none; +} +.widgets > li > a .widget-label { + color: #999999; +} +.widgets > li > a:hover { + text-decoration: none; +} +.widgets > li > a:hover strong { + color: #6b9b20; +} +.widgets > li .widget-label { + display: block; + margin: 20px 0 5px; + color: #999999; + text-transform: uppercase; +} +.widgets > li strong { + display: block; + color: #525252; + font-size: 19px; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline { + display: block; + margin: 5px auto; +} +.widgets > li .sparkline canvas { + display: block !important; + margin: 0 auto; +} +.widgets > li .sparkline + strong, +.widgets > li .sparkline + a { + color: #525252; + font-size: 13px; + font-weight: normal; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline + a:hover { + color: #6b9b20; +} +.ie8 .widgets [class*="span"] { + margin: 0; + width: 150px; +} +.filter-bar .form-inline { + margin-bottom: 0; +} +.filter-bar .form-inline .control-group, +.filter-bar .form-inline .controls { + display: inline-block; +} +.filter-bar .form-inline .control-group { + border-bottom: none; + border-right: 1px dashed #dedede; +} +.filter-bar .form-inline .control-group:last-child { + border-right: none; +} +.filter-bar .form-inline .note-inline { + margin-left: 10px; +} +.filter-bar .form-inline .note-inline:first-child { + margin-left: 0; +} +.filter-bar .form-inline .control-label { + margin: 0 10px 0 0; +} +.filter-bar .form-inline .input-mini { + width: 30px; +} +.breadcrumb { + padding: 0; +} +/* Plugins */ +.has-switch { + display: inline-block; + cursor: pointer; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + min-width: 100px; +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch > div.switch-off { + left: -49%; +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch span.switch-mini, +.has-switch label.switch-mini { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch span.switch-small, +.has-switch label.switch-small { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch span.switch-large, +.has-switch label.switch-large { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch label { + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 34%; + border-left: 1px solid #bbbbbb; + border-right: 1px solid #bbbbbb; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch label:hover, +.has-switch label:focus, +.has-switch label:active, +.has-switch label.active, +.has-switch label.disabled, +.has-switch label[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.has-switch label:active, +.has-switch label.active { + background-color: #cccccc \9; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33%; +} +.has-switch span.switch-left { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.has-switch span.switch-right { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-right:hover, +.has-switch span.switch-right:focus, +.has-switch span.switch-right:active, +.has-switch span.switch-right.active, +.has-switch span.switch-right.disabled, +.has-switch span.switch-right[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-right:active, +.has-switch span.switch-right.active { + background-color: #e6e6e6 \9; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #599b20; + background-image: -moz-linear-gradient(top, #4c9b20, #6b9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4c9b20), to(#6b9b20)); + background-image: -webkit-linear-gradient(top, #4c9b20, #6b9b20); + background-image: -o-linear-gradient(top, #4c9b20, #6b9b20); + background-image: linear-gradient(to bottom, #4c9b20, #6b9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4c9b20', endColorstr='#ff6b9b20', GradientType=0); + border-color: #6b9b20 #6b9b20 #3f5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #6b9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-primary:hover, +.has-switch span.switch-left:hover, +.has-switch span.switch-primary:focus, +.has-switch span.switch-left:focus, +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active, +.has-switch span.switch-primary.disabled, +.has-switch span.switch-left.disabled, +.has-switch span.switch-primary[disabled], +.has-switch span.switch-left[disabled] { + color: #ffffff; + background-color: #6b9b20; + *background-color: #5c861c; +} +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active { + background-color: #4e7117 \9; +} +.has-switch span.switch-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #496ee7; + background-image: -moz-linear-gradient(top, #495fe7, #4986e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#495fe7), to(#4986e7)); + background-image: -webkit-linear-gradient(top, #495fe7, #4986e7); + background-image: -o-linear-gradient(top, #495fe7, #4986e7); + background-image: linear-gradient(to bottom, #495fe7, #4986e7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff495fe7', endColorstr='#ff4986e7', GradientType=0); + border-color: #4986e7 #4986e7 #1b5ec9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4986e7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-info:hover, +.has-switch span.switch-info:focus, +.has-switch span.switch-info:active, +.has-switch span.switch-info.active, +.has-switch span.switch-info.disabled, +.has-switch span.switch-info[disabled] { + color: #ffffff; + background-color: #4986e7; + *background-color: #3277e4; +} +.has-switch span.switch-info:active, +.has-switch span.switch-info.active { + background-color: #1d68e0 \9; +} +.has-switch span.switch-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #59821b; + background-image: -moz-linear-gradient(top, #4e7117, #6b9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e7117), to(#6b9b20)); + background-image: -webkit-linear-gradient(top, #4e7117, #6b9b20); + background-image: -o-linear-gradient(top, #4e7117, #6b9b20); + background-image: linear-gradient(to bottom, #4e7117, #6b9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e7117', endColorstr='#ff6b9b20', GradientType=0); + border-color: #6b9b20 #6b9b20 #3f5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #6b9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-success:hover, +.has-switch span.switch-success:focus, +.has-switch span.switch-success:active, +.has-switch span.switch-success.active, +.has-switch span.switch-success.disabled, +.has-switch span.switch-success[disabled] { + color: #ffffff; + background-color: #6b9b20; + *background-color: #5c861c; +} +.has-switch span.switch-success:active, +.has-switch span.switch-success.active { + background-color: #4e7117 \9; +} +.has-switch span.switch-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f9a123; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0); + border-color: #fbb450 #fbb450 #f89406; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #fbb450; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-warning:hover, +.has-switch span.switch-warning:focus, +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active, +.has-switch span.switch-warning.disabled, +.has-switch span.switch-warning[disabled] { + color: #ffffff; + background-color: #fbb450; + *background-color: #faa937; +} +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active { + background-color: #fa9f1e \9; +} +.has-switch span.switch-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e32f2f; + background-image: -moz-linear-gradient(top, #e01d1d, #e74949); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e01d1d), to(#e74949)); + background-image: -webkit-linear-gradient(top, #e01d1d, #e74949); + background-image: -o-linear-gradient(top, #e01d1d, #e74949); + background-image: linear-gradient(to bottom, #e01d1d, #e74949); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe01d1d', endColorstr='#ffe74949', GradientType=0); + border-color: #e74949 #e74949 #c91b1b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e74949; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-danger:hover, +.has-switch span.switch-danger:focus, +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active, +.has-switch span.switch-danger.disabled, +.has-switch span.switch-danger[disabled] { + color: #ffffff; + background-color: #e74949; + *background-color: #e43232; +} +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active { + background-color: #e01d1d \9; +} +/* jQuery FullCalendar */ +.full-calendar .fc-header { + margin-bottom: 10px; +} +.full-calendar .fc-header h2 { + margin: 0; +} +.full-calendar .fc-content { + background-color: #FFFBEA; +} +.full-calendar .fc-button.fc-state-default { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.full-calendar .fc-button.fc-state-default:hover, +.full-calendar .fc-button.fc-state-default:focus, +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active, +.full-calendar .fc-button.fc-state-default.disabled, +.full-calendar .fc-button.fc-state-default[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-active { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-image: none; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + outline: 0; +} +.full-calendar .fc-button.fc-state-active:hover, +.full-calendar .fc-button.fc-state-active:focus, +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active, +.full-calendar .fc-button.fc-state-active.disabled, +.full-calendar .fc-button.fc-state-active[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-disabled { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + cursor: default; + background-image: none; + background-color: #e6e6e6; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-state-disabled:active { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-corner-left { + margin-left: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -moz-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.full-calendar .fc-button.fc-corner-right { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + -moz-border-bottom-right-radius: 3px; + -moz-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.full-calendar .fc-state-default .fc-button-inner { + background: transparent; + border-width: 0; +} +.full-calendar .fc-button-content { + line-height: 18px; + height: 18px; + padding: 0; +} +.full-calendar .fc-state-default .fc-button-effect span { + display: none; +} +.full-calendar .fc-state-default, +.full-calendar .fc-state-default .fc-button-inner { + color: #525459; +} +.full-calendar .fc-state-active .fc-button-inner { + color: #525459; +} +.full-calendar .fc-button-content [class^="awe-"], +.full-calendar .fc-button-content [class*=" awe-"] { + font-size: 15px; +} +.full-calendar .fc-state-highlight { + background-color: #ffffff; +} +.full-calendar .fc-widget-header, +.full-calendar .fc-widget-content { + border-color: #dedacb; +} +.full-calendar .fc-widget-header { + padding: 5px 0; + color: #665B4C; +} +/* jQuery FullCalendar event style */ +.full-calendar .fc-event { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar a.fc-event:hover { + text-decoration: none; +} +.full-calendar .fc-event-skin { + border: none; + background-color: #6b9b20; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar .fc-event-skin > span:first-child { + margin-left: 3px; +} +/* jQuery Visualize */ +.visualize { + margin: 50px auto 30px; + margin-bottom: 30px !important; + background-color: transparent; + border: none; + width: 100%; +} +.visualize.visualize-pie { + margin-bottom: 0 !important; +} +.visualize .visualize-info { + border: none; + padding: 0; + font-size: 11.049999999999999px; + right: auto; + left: -10px; + top: -48px; + background-color: transparent; + opacity: 1; + filter: alpha(opacity=100); +} +.visualize .visualize-title { + font-weight: bold; + margin-bottom: 0; + color: #525252; +} +p + table + .visualize { + margin-top: 70px; +} +.visualize .label { + padding: 0; + background-color: transparent; + font-size: 9.75px; + font-weight: normal; + line-height: 14px; + text-shadow: none; + color: #999999; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; +} +.content .page-container [class*="span"] .visualize { + margin: 20px 0 20px auto; +} +.ie8 .visualize-interaction-tracker { + margin-top: 0 !important; +} +/* jQuery Flot */ +.flot { + margin: 10px auto; + min-height: 280px; + height: 280px; +} +.flot .legend { + padding: 0 2px; +} +.modal-open { + overflow: hidden; +} +.modal-open.page-overflow .page-container, +.modal-open.page-overflow .page-container .navbar-fixed-top, +.modal-open.page-overflow .page-container .navbar-fixed-bottom, +.modal-open.page-overflow .modal-scrollable { + overflow-y: scroll; +} +.modal-scrollable { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + overflow: auto; +} +.modal { + outline: none; + position: absolute; + margin-top: 0; + top: 50%; + overflow: visible; +} +.modal.fade { + top: -100%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; +} +.modal.fade.in { + top: 50%; +} +.modal.container { + width: 940px; + margin-left: -470px; +} +.modal.modal-absolute { + position: absolute; + z-index: 950; +} +.modal .loading-mask { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fff; + border-radius: 6px; +} +.modal-body { + max-height: none; + overflow: visible; +} +.modal-backdrop.modal-absolute { + position: absolute; + z-index: 940; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.7; + filter: alpha(opacity=70); + background: #000; +} +.modal-overflow.modal { + top: 1%; +} +.modal-overflow.modal.fade { + top: -100%; +} +.modal-overflow.modal.fade.in { + top: 1%; +} +.modal-overflow .modal-body { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +@media (min-width: 1200px) { + .modal.container { + width: 1170px; + margin-left: -585px; + } +} +@media (max-width: 979px) { + .modal-open.page-overflow .page-container .navbar-fixed-top, + .modal-open.page-overflow .page-container .navbar-fixed-bottom { + overflow-y: visible; + } + .modal, + .modal.container, + .modal.modal-overflow { + top: 1%; + right: 1%; + left: 1%; + bottom: auto; + width: auto !important; + height: auto !important; + margin: 0 !important; + padding: 0 !important; + } + .modal.fade.in, + .modal.container.fade.in, + .modal.modal-overflow.fade.in { + top: 1%; + bottom: auto; + } + .modal-body, + .modal-overflow .modal-body { + position: static; + margin: 0; + height: auto !important; + max-height: none !important; + overflow: visible !important; + } + .modal-footer, + .modal-overflow .modal-footer { + position: static; + } +} +.loading-spinner { + position: absolute; + top: 50%; + left: 50%; + margin: -12px 0 0 -12px; +} +.animated { + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} +@-webkit-keyframes shake { + 0%, + 100% { + -webkit-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + } +} +@-moz-keyframes shake { + 0%, + 100% { + -moz-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -moz-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -moz-transform: translateX(10px); + } +} +@-o-keyframes shake { + 0%, + 100% { + -o-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -o-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -o-transform: translateX(10px); + } +} +@keyframes shake { + 0%, + 100% { + transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + transform: translateX(10px); + } +} +.shake { + -webkit-animation-name: shake; + -moz-animation-name: shake; + -o-animation-name: shake; + animation-name: shake; +} +.elfinder { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.elfinder .elfinder-navbar { + height: 100%; + background: #f5f5f5; + border-color: #dedede; +} +.elfinder .elfinder-navbar .ui-state-hover { + background: transparent; + border-color: transparent; +} +.elfinder .elfinder-navbar .ui-state-active { + color: #ffffff; + background: #a6a6a6; + border-color: #999999; +} +.elfinder .elfinder-button-search.elfinder-button { + width: 192px; + margin: 0; +} +.elfinder .elfinder-button-search.elfinder-button input { + margin: 0; + padding-left: 20px; +} +.elfinder .elfinder-button-search.elfinder-button .ui-icon-close { + margin-right: 6.666666666666667px; +} +.elfinder .elfinder-statusbar { + color: #555555; +} +.elfinder .elfinder-statusbar a { + text-decoration: none; + color: #555555; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder .elfinder-cwd table td.ui-state-hover, +.elfinder .elfinder-button-menu .ui-state-hover { + color: #ffffff; + background: #6b9b20; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover { + background: #eeeeee; +} +.elfinder .elfinder-cwd table tr { + border-top: 1px dotted #dedede; +} +.elfinder .elfinder-cwd table tr:nth-child(odd) { + background-color: #f8f8f8; +} +.elfinder-disabled .elfinder-navbar .ui-state-active { + color: #eeeeee; + background: #bfbfbf; + border-color: #b3b3b3; +} +.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder-disabled .elfinder-cwd table td.ui-state-hover { + background: #bfbfbf; +} +.elfinder-contextmenu .ui-state-hover { + background: #3875d7; + color: #fff; +} +.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow { + background-image: url('../img/arrows-active.png'); +} +#elfinder .elfinder-cwd-view-icons .elfinder-cwd-file { + width: 120px; + height: 95px; +} +.elfinder { + border-color: #dedede; +} +.elfinder .ui-widget-header { + background: #f5f5f5; + border-color: #dedede; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +/* jQuery DataTables */ +.dataTables_wrapper > .row:first-child, +.dataTables_wrapper > .row-fluid:first-child { + margin-bottom: 10px; +} +.dataTables_wrapper .row [class*="span"], +.dataTables_wrapper .row-fluid [class*="span"] { + margin-bottom: 0; +} +.dataTables_wrapper table.table { + clear: both; + margin-bottom: 10px; +} +.dataTables_wrapper div.dataTables_length label { + float: left; + text-align: left; +} +.dataTables_wrapper div.dataTables_length select { + width: 75px; +} +.dataTables_wrapper div.dataTables_filter label { + float: right; +} +.dataTables_wrapper .dataTables_paginate { + margin: 0; + float: right; +} +.dataTables_wrapper table thead .sorting, +.dataTables_wrapper table thead .sorting_asc, +.dataTables_wrapper table thead .sorting_desc, +.dataTables_wrapper table thead .sorting_asc_disabled, +.dataTables_wrapper table thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} +.dataTables_wrapper table.table thead .sorting { + background-image: url("../img/plugins/dataTables/sort_both.png"); +} +.dataTables_wrapper table.table thead .sorting_asc { + background-image: url("../img/plugins/dataTables/sort_asc.png"); +} +.dataTables_wrapper table.table thead .sorting_desc { + background-image: url("../img/plugins/dataTables/sort_desc.png"); +} +.dataTables_wrapper table.table thead .sorting_asc_disabled { + background-image: url("../img/plugins/dataTables/sort_asc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-image: url("../img/plugins/dataTables/sort_desc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting, +.dataTables_wrapper table.table thead .sorting_asc, +.dataTables_wrapper table.table thead .sorting_desc, +.dataTables_wrapper table.table thead .sorting_asc_disabled, +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-position: center right; + background-repeat: no-repeat; +} +.dataTables_wrapper table.dataTable th:active { + outline: none; +} +.dataTables_wrapper .dataTables_info { + margin-top: 10px; +} +/* jQuery DataTable filter */ +.datatable-controls li { + padding: 3px 15px; +} +/* jQuery Snippet */ +.snippet-container pre .snippet-num, +.snippet-container .snippet-wrap .snippet-num { + margin: 0; +} +.snippet-container pre pre.sh_sourceCode, +.snippet-container .snippet-wrap pre.sh_sourceCode { + margin: 0; + border: 1px solid #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.snippet-container .snippet-menu pre { + border: none; +} +/* jQuery Tags Input */ +div.tagsinput { + padding: 0; + margin: 0; + width: auto !important; + height: auto !important; + color: #555555; + background-color: transparent; + border: none; + -webkit-transition: 'border linear .2s, box-shadow linear .2s'; + -moz-transition: 'border linear .2s, box-shadow linear .2s'; + -o-transition: 'border linear .2s, box-shadow linear .2s'; + transition: 'border linear .2s, box-shadow linear .2s'; +} +div.tagsinput.focused { + outline: 0; + border-color: rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); +} +div.tagsinput span.tag { + text-shadow: none; + line-height: normal; + padding: 4px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: #6b9b20; + border-color: #6b9b20; + color: #ffffff; +} +div.tagsinput span.tag a { + color: #ffffff; + opacity: 0.5; + filter: alpha(opacity=50); +} +div.tagsinput span.tag a:hover { + opacity: 1; + filter: alpha(opacity=100); +} +div.tagsinput input { + margin: 0; +} +/* jQuery jWYSIWYG */ +div.wysiwyg { + background: none; + width: auto !important; + border: none; +} +div.wysiwyg .toolbar-container { + padding: 5px; +} +div.wysiwyg iframe { + margin-top: 10px; + background-color: #ffffff; + width: 100% !important; + min-height: 250px; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.wysiwyg ul.toolbar { + margin-bottom: 0; + border: none; +} +div.wysiwyg ul.toolbar li { + background-image: url("../img/plugins/jWYSIWYG/jquery.wysiwyg.gif"); +} +/* Bootstrap wysihtml5 */ +.wysihtml5 { + width: 95% !important; +} +ul.wysihtml5-toolbar { + margin-bottom: 0; +} +.wysihtml5-sandbox { + margin-bottom: 0 !important; +} +/* jQuery jGrowl */ +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + color: #ffffff; + background-color: #40444d; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + opacity: 0.9; + filter: alpha(opacity=90); +} +div.jGrowl div.jGrowl-closer { + opacity: 0.35; + filter: alpha(opacity=35); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.jGrowl div.jGrowl-closer:hover { + opacity: 0.9; + filter: alpha(opacity=90); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); +} +div.jGrowl div.primary { + background-color: #6b9b20; + color: #ffffff; +} +div.jGrowl div.primary a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.primary a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.danger { + background-color: #e74949; + color: #ffffff; +} +div.jGrowl div.danger a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.danger a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.info { + background-color: #4986e7; + color: #ffffff; +} +div.jGrowl div.info a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.info a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.success { + background-color: #6b9b20; + color: #ffffff; +} +div.jGrowl div.success a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.success a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +/* Color picker */ +.colorpicker-saturation { + width: 100px; + height: 100px; + background-image: url("../img/plugins/colorpicker/saturation.png"); + cursor: crosshair; + float: left; +} +.colorpicker-saturation i { + display: block; + height: 5px; + width: 5px; + border: 1px solid #000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + position: absolute; + top: 0; + left: 0; + margin: -4px 0 0 -4px; +} +.colorpicker-saturation i b { + display: block; + height: 5px; + width: 5px; + border: 1px solid #fff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.colorpicker-hue, +.colorpicker-alpha { + width: 15px; + height: 100px; + float: left; + cursor: row-resize; + margin-left: 4px; + margin-bottom: 4px; +} +.colorpicker-hue i, +.colorpicker-alpha i { + display: block; + height: 1px; + background: #000; + border-top: 1px solid #fff; + position: absolute; + top: 0; + left: 0; + width: 100%; + margin-top: -1px; +} +.colorpicker-hue { + background-image: url("../img/plugins/colorpicker/hue.png"); +} +.colorpicker-alpha { + background-image: url("../img/plugins/colorpicker/alpha.png"); + display: none; +} +.colorpicker { + *zoom: 1; + top: 0; + left: 0; + padding: 4px; + min-width: 120px; +} +.colorpicker:before, +.colorpicker:after { + display: table; + content: ""; + line-height: 0; +} +.colorpicker:after { + clear: both; +} +.colorpicker div { + position: relative; +} +.colorpicker.alpha { + min-width: 140px; +} +.colorpicker.alpha .colorpicker-alpha { + display: block; +} +.colorpicker-color { + height: 10px; + margin-top: 5px; + clear: both; + background-image: url("../img/plugins/colorpicker/alpha.png"); + background-position: 0 100%; +} +.colorpicker-color div { + height: 10px; +} +.input-append.color .add-on i, +.input-prepend.color .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.colorpicker-preview { + display: block; + width: 18px; + height: 18px; +} +/* Date picker */ +.datepicker { + top: 0; + left: 0; + padding: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td { + color: #4d4d4d; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.old, +.datepicker td.new { + color: #999999; +} +.datepicker td.active, +.datepicker td.active:hover { + color: #fff; + background-color: #6b9b20; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #fff; + background-color: #6b9b20; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.datepicker + .add-on .icon-calendar { + font-size: 20px; +} +/* Time picker */ +.bootstrap-timepicker-widget.dropdown-menu { + min-width: 0px; +} +.bootstrap-timepicker-widget table { + width: auto; +} +.bootstrap-timepicker-widget table td { + height: 0; +} +.bootstrap-timepicker-widget table td a { + padding: 0; + width: auto; + display: block; +} +/* Login page style */ +.container.login { + width: 340px; + margin-top: 150px; +} +.container.login .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +.container.login form { + margin: 0; + border: none; + background-color: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.container.login form .control-group { + padding: 0; + border: none; +} +.container.login form .form-actions { + padding: 10px 0 0; +} +.container.login form .form-actions .btn { + padding-left: 20px; + padding-right: 20px; + display: block; + margin: 0 auto; +} +.container.login form input[type="text"], +.container.login form input[type="password"] { + width: 277px; +} +.container.login .login-footer { + text-align: right; + *zoom: 1; +} +.container.login .login-footer:before, +.container.login .login-footer:after { + display: table; + content: ""; + line-height: 0; +} +.container.login .login-footer:after { + clear: both; +} +.container.login .login-footer li { + display: inline-block; +} +/* Error pages */ +.error-page { + background-image: none; + position: static; +} +.error-page .error-container { + width: 90%; + max-width: 600px; + text-align: center; + margin: 80px auto 0; + *zoom: 1; +} +.error-page .error-container:before, +.error-page .error-container:after { + display: table; + content: ""; + line-height: 0; +} +.error-page .error-container:after { + clear: both; +} +.error-page .error-container h1 { + margin: 0; + font-size: 169px; + line-height: normal; + color: #ffffff; + text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.2), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); + -webkit-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -moz-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -o-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); +} +.error-page .error-container p { + margin: 10px 0 20px; +} +.error-page .error-container p.description { + margin: 10px 0; + font-size: 39px; + line-height: normal; + color: #525252; +} +.no-textshadow .error-page .error-container h1 { + text-shadow: none; + color: #6b9b20; +} +/* Responsive styles */ +/* Up to landscape phone */ +@media (max-width: 480px) { + #header nav { + float: left; + margin-bottom: 20px; + } +} +/* Landscape phone to small desktop and portrait tablet */ +@media (max-width: 767px) { + #header > h1 { + clear: both; + } + .container, + .content-block, + .navigation-block { + width: auto; + position: static !important; + } + .content-block, + .navigation-block { + float: none; + margin: 0; + } + .row, + .row-fluid { + margin-left: 0; + } + .main-navigation > ul > li:first-child { + margin-top: 6.666666666666667px; + border-top: none; + } + .side-note { + padding: 20px; + background-image: none; + background-color: #fffbea; + border: 1px solid #dedacb; + } + .side-note .side-note-container, + .side-note .side-note-bottom { + padding: 0; + background-image: none; + } + .user-profile figure img { + float: left; + } + .user-profile figure figcaption { + float: left; + } + .content-block [class*="span"], + .content-block .row [class*="span"], + .content-block .row-fluid [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .input-append .add-on, + .input-prepend .add-on, + .input-append .btn, + .input-prepend .btn { + line-height: 20px; + } + .input-append .add-on, + .input-prepend .add-on { + height: 18px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Portrait tablet to default desktop */ +@media (min-width: 768px) and (max-width: 979px) { + .content-block { + width: 464px; + } + #wrapper > .container, + #footer.container { + width: 724px; + } + .row { + margin-left: 0; + } + .data-block[class*="span"] { + width: auto; + } + .content-block > [class*="span"], + .content-block .row > [class*="span"], + .content-block .row-fluid > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .data-block .data-container { + padding: 15px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Tablets and below */ +@media (max-width: 979px) { + .data-block[class*="span"] { + width: auto; + } + .content-block .row > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .row, + .row .row, + .row-fluid { + margin-bottom: 0; + } + [class*="span"] { + margin-bottom: 20px; + } + .data-block .data-container { + padding: 15px; + } + .data-block .thumbnails li img { + width: 100%; + } + .form-horizontal .control-label { + float: none; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .form-actions { + padding-left: 20px; + } + .content-block .input-append input[class*="span"], + .content-block .input-prepend input[class*="span"], + .content-block .uneditable-input[class*="span"] { + display: inline-block; + } + .uneditable-input { + min-height: 20px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + border: none; + } +} +/* Default desktop */ +@media (min-width: 980px) and (max-width: 1199px) { + .content-block { + width: 700px; + } + #wrapper > .container, + #footer.container { + width: 940px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 700px; + } + .span12 { + width: 700px; + } + .span11 { + width: 640px; + } + .span10 { + width: 580px; + } + .span9 { + width: 520px; + } + .span8 { + width: 460px; + } + .span7 { + width: 400px; + } + .span6 { + width: 340px; + } + .span5 { + width: 280px; + } + .span4 { + width: 220px; + } + .span3 { + width: 160px; + } + .span2 { + width: 100px; + } + .span1 { + width: 40px; + } + .offset12 { + margin-left: 740px; + } + .offset11 { + margin-left: 680px; + } + .offset10 { + margin-left: 620px; + } + .offset9 { + margin-left: 560px; + } + .offset8 { + margin-left: 500px; + } + .offset7 { + margin-left: 440px; + } + .offset6 { + margin-left: 380px; + } + .offset5 { + margin-left: 320px; + } + .offset4 { + margin-left: 260px; + } + .offset3 { + margin-left: 200px; + } + .offset2 { + margin-left: 140px; + } + .offset1 { + margin-left: 80px; + } + .data-block .row .row { + margin-left: -20px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 652px; + } + .data-block .row .span12 { + width: 652px; + } + .data-block .row .span11 { + width: 596px; + } + .data-block .row .span10 { + width: 540px; + } + .data-block .row .span9 { + width: 484px; + } + .data-block .row .span8 { + width: 428px; + } + .data-block .row .span7 { + width: 372px; + } + .data-block .row .span6 { + width: 316px; + } + .data-block .row .span5 { + width: 260px; + } + .data-block .row .span4 { + width: 204px; + } + .data-block .row .span3 { + width: 148px; + } + .data-block .row .span2 { + width: 92px; + } + .data-block .row .span1 { + width: 36px; + } + .data-block .row .offset12 { + margin-left: 692px; + } + .data-block .row .offset11 { + margin-left: 636px; + } + .data-block .row .offset10 { + margin-left: 580px; + } + .data-block .row .offset9 { + margin-left: 524px; + } + .data-block .row .offset8 { + margin-left: 468px; + } + .data-block .row .offset7 { + margin-left: 412px; + } + .data-block .row .offset6 { + margin-left: 356px; + } + .data-block .row .offset5 { + margin-left: 300px; + } + .data-block .row .offset4 { + margin-left: 244px; + } + .data-block .row .offset3 { + margin-left: 188px; + } + .data-block .row .offset2 { + margin-left: 132px; + } + .data-block .row .offset1 { + margin-left: 76px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .form-horizontal .control-label { + width: 90px; + } + .form-horizontal .controls { + margin-left: 100px; + } + .form-horizontal .form-actions { + padding-left: 120px; + } + .btn-toolbar .btn-group { + margin: 2px 0; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + margin: 0; + } +} +/* Large desktop */ +@media (min-width: 1200px) { + .content-block { + width: 930px; + } + #wrapper .container, + #footer.container { + width: 1170px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 928px; + } + .span12 { + width: 928px; + } + .span11 { + width: 849px; + } + .span10 { + width: 770px; + } + .span9 { + width: 691px; + } + .span8 { + width: 612px; + } + .span7 { + width: 533px; + } + .span6 { + width: 454px; + } + .span5 { + width: 375px; + } + .span4 { + width: 296px; + } + .span3 { + width: 217px; + } + .span2 { + width: 138px; + } + .span1 { + width: 59px; + } + .offset12 { + margin-left: 968px; + } + .offset11 { + margin-left: 889px; + } + .offset10 { + margin-left: 810px; + } + .offset9 { + margin-left: 731px; + } + .offset8 { + margin-left: 652px; + } + .offset7 { + margin-left: 573px; + } + .offset6 { + margin-left: 494px; + } + .offset5 { + margin-left: 415px; + } + .offset4 { + margin-left: 336px; + } + .offset3 { + margin-left: 257px; + } + .offset2 { + margin-left: 178px; + } + .offset1 { + margin-left: 99px; + } + .data-block .row .row { + margin-left: -21px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 879px; + } + .data-block .row .span12 { + width: 879px; + } + .data-block .row .span11 { + width: 804px; + } + .data-block .row .span10 { + width: 729px; + } + .data-block .row .span9 { + width: 654px; + } + .data-block .row .span8 { + width: 579px; + } + .data-block .row .span7 { + width: 504px; + } + .data-block .row .span6 { + width: 429px; + } + .data-block .row .span5 { + width: 354px; + } + .data-block .row .span4 { + width: 279px; + } + .data-block .row .span3 { + width: 204px; + } + .data-block .row .span2 { + width: 129px; + } + .data-block .row .span1 { + width: 54px; + } + .data-block .row .offset12 { + margin-left: 921px; + } + .data-block .row .offset11 { + margin-left: 846px; + } + .data-block .row .offset10 { + margin-left: 771px; + } + .data-block .row .offset9 { + margin-left: 696px; + } + .data-block .row .offset8 { + margin-left: 621px; + } + .data-block .row .offset7 { + margin-left: 546px; + } + .data-block .row .offset6 { + margin-left: 471px; + } + .data-block .row .offset5 { + margin-left: 396px; + } + .data-block .row .offset4 { + margin-left: 321px; + } + .data-block .row .offset3 { + margin-left: 246px; + } + .data-block .row .offset2 { + margin-left: 171px; + } + .data-block .row .offset1 { + margin-left: 96px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .thumbnails { + margin-left: -21px; + } + .thumbnails .row { + margin-left: -21px; + *zoom: 1; + } + .thumbnails .row:before, + .thumbnails .row:after { + display: table; + content: ""; + line-height: 0; + } + .thumbnails .row:after { + clear: both; + } + .thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .thumbnails .container, + .thumbnails .navbar-static-top .container, + .thumbnails .navbar-fixed-top .container, + .thumbnails .navbar-fixed-bottom .container { + width: 879px; + } + .thumbnails .span12 { + width: 879px; + } + .thumbnails .span11 { + width: 804px; + } + .thumbnails .span10 { + width: 729px; + } + .thumbnails .span9 { + width: 654px; + } + .thumbnails .span8 { + width: 579px; + } + .thumbnails .span7 { + width: 504px; + } + .thumbnails .span6 { + width: 429px; + } + .thumbnails .span5 { + width: 354px; + } + .thumbnails .span4 { + width: 279px; + } + .thumbnails .span3 { + width: 204px; + } + .thumbnails .span2 { + width: 129px; + } + .thumbnails .span1 { + width: 54px; + } + .thumbnails .offset12 { + margin-left: 921px; + } + .thumbnails .offset11 { + margin-left: 846px; + } + .thumbnails .offset10 { + margin-left: 771px; + } + .thumbnails .offset9 { + margin-left: 696px; + } + .thumbnails .offset8 { + margin-left: 621px; + } + .thumbnails .offset7 { + margin-left: 546px; + } + .thumbnails .offset6 { + margin-left: 471px; + } + .thumbnails .offset5 { + margin-left: 396px; + } + .thumbnails .offset4 { + margin-left: 321px; + } + .thumbnails .offset3 { + margin-left: 246px; + } + .thumbnails .offset2 { + margin-left: 171px; + } + .thumbnails .offset1 { + margin-left: 96px; + } + .thumbnails li { + margin-bottom: 21px; + margin-left: 21px; + } + .form-horizontal .control-label { + width: 160px; + } + .form-horizontal .controls { + margin-left: 180px; + } + .form-horizontal .form-actions { + padding-left: 200px; + } + .widgets > li { + margin: 0; + } +} +/* Demo styles */ +.data-block .row-fluid.demo, +.data-block .row.demo { + color: #fff; + line-height: 30px; + min-height: 30px; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block .row-fluid.demo:last-child, +.data-block .row.demo:last-child { + margin-bottom: 0; +} +.data-block .row-fluid.demo > div, +.data-block .row.demo > div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #4A525A; +} +.data-block .row-fluid.demo > div > .row > div, +.data-block .row.demo > div > .row > div, +.data-block .row-fluid.demo > div > .row-fluid > div, +.data-block .row.demo > div > .row-fluid > div { + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #657078; +} +.demo > input, +.demo > select { + display: block !important; + margin-bottom: 10px; +} +.navigation-block > a { + margin: 0 0 20px; +} +.navigation-block > a span { + font-size: 11.049999999999999px; +} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/huraga-red.css b/src/bb-themes/huraga/assets/css/huraga-red.css new file mode 100644 index 000000000..90c2c6679 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/huraga-red.css @@ -0,0 +1,13000 @@ +/*! + * Walkin Pixels - Huraga v1.7 + * www.walkingpixels.com + * + * Red color + * + */ +@import url("http://fonts.googleapis.com/css?family=PT+Sans:regular,italic,bold"); +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +nav, +section { + display: block; +} +audio, +canvas, +video { + display: inline-block; + *display: inline; + *zoom: 1; +} +audio:not([controls]) { + display: none; +} +html { + font-size: 100%; + -webkit-text-size-adjust: 100%; + -ms-text-size-adjust: 100%; +} +a:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +a:hover, +a:active { + outline: 0; +} +sub, +sup { + position: relative; + font-size: 75%; + line-height: 0; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + /* Responsive images (ensure images don't scale beyond their parents) */ + + max-width: 100%; + /* Part 1: Set a maxium relative to the parent */ + + width: auto\9; + /* IE7-8 need help adjusting responsive images */ + + height: auto; + /* Part 2: Scale the height according to the width, otherwise you get stretching */ + + vertical-align: middle; + border: 0; + -ms-interpolation-mode: bicubic; +} +#map_canvas img, +.google-maps img { + max-width: none; +} +button, +input, +select, +textarea { + margin: 0; + font-size: 100%; + vertical-align: middle; +} +button, +input { + *overflow: visible; + line-height: normal; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + padding: 0; + border: 0; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +label, +select, +button, +input[type="button"], +input[type="reset"], +input[type="submit"], +input[type="radio"], +input[type="checkbox"] { + cursor: pointer; +} +input[type="search"] { + -webkit-box-sizing: content-box; + -moz-box-sizing: content-box; + box-sizing: content-box; + -webkit-appearance: textfield; +} +input[type="search"]::-webkit-search-decoration, +input[type="search"]::-webkit-search-cancel-button { + -webkit-appearance: none; +} +textarea { + overflow: auto; + vertical-align: top; +} +@media print { + * { + text-shadow: none !important; + color: #000 !important; + background: transparent !important; + box-shadow: none !important; + } + a, + a:visited { + text-decoration: underline; + } + a[href]:after { + content: " (" attr(href) ")"; + } + abbr[title]:after { + content: " (" attr(title) ")"; + } + .ir a:after, + a[href^="javascript:"]:after, + a[href^="#"]:after { + content: ""; + } + pre, + blockquote { + border: 1px solid #999; + page-break-inside: avoid; + } + thead { + display: table-header-group; + } + tr, + img { + page-break-inside: avoid; + } + img { + max-width: 100% !important; + } + @page { + margin: 0.5cm; + } + p, + h2, + h3 { + orphans: 3; + widows: 3; + } + h2, + h3 { + page-break-after: avoid; + } +} +.clearfix { + *zoom: 1; +} +.clearfix:before, +.clearfix:after { + display: table; + content: ""; + line-height: 0; +} +.clearfix:after { + clear: both; +} +.hide-text { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; +} +.input-block-level { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +body { + margin: 0; + font-family: "PT Sans", Arial, sans-serif; + font-size: 13px; + line-height: 18px; + color: #939699; + background-color: #f5f5f5; +} +a { + color: #e74949; + text-decoration: none; +} +a:hover, +a:focus { + color: #b21818; + text-decoration: underline; +} +.img-rounded { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.img-polaroid { + padding: 4px; + background-color: #fff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1); +} +.img-circle { + -webkit-border-radius: 500px; + -moz-border-radius: 500px; + border-radius: 500px; +} +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 940px; +} +.span12 { + width: 940px; +} +.span11 { + width: 860px; +} +.span10 { + width: 780px; +} +.span9 { + width: 700px; +} +.span8 { + width: 620px; +} +.span7 { + width: 540px; +} +.span6 { + width: 460px; +} +.span5 { + width: 380px; +} +.span4 { + width: 300px; +} +.span3 { + width: 220px; +} +.span2 { + width: 140px; +} +.span1 { + width: 60px; +} +.offset12 { + margin-left: 980px; +} +.offset11 { + margin-left: 900px; +} +.offset10 { + margin-left: 820px; +} +.offset9 { + margin-left: 740px; +} +.offset8 { + margin-left: 660px; +} +.offset7 { + margin-left: 580px; +} +.offset6 { + margin-left: 500px; +} +.offset5 { + margin-left: 420px; +} +.offset4 { + margin-left: 340px; +} +.offset3 { + margin-left: 260px; +} +.offset2 { + margin-left: 180px; +} +.offset1 { + margin-left: 100px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.127659574468085%; + *margin-left: 2.074468085106383%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.127659574468085%; +} +.row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; +} +.row-fluid .span11 { + width: 91.48936170212765%; + *width: 91.43617021276594%; +} +.row-fluid .span10 { + width: 82.97872340425532%; + *width: 82.92553191489361%; +} +.row-fluid .span9 { + width: 74.46808510638297%; + *width: 74.41489361702126%; +} +.row-fluid .span8 { + width: 65.95744680851064%; + *width: 65.90425531914893%; +} +.row-fluid .span7 { + width: 57.44680851063829%; + *width: 57.39361702127659%; +} +.row-fluid .span6 { + width: 48.93617021276595%; + *width: 48.88297872340425%; +} +.row-fluid .span5 { + width: 40.42553191489362%; + *width: 40.37234042553192%; +} +.row-fluid .span4 { + width: 31.914893617021278%; + *width: 31.861702127659576%; +} +.row-fluid .span3 { + width: 23.404255319148934%; + *width: 23.351063829787233%; +} +.row-fluid .span2 { + width: 14.893617021276595%; + *width: 14.840425531914894%; +} +.row-fluid .span1 { + width: 6.382978723404255%; + *width: 6.329787234042553%; +} +.row-fluid .offset12 { + margin-left: 104.25531914893617%; + *margin-left: 104.14893617021275%; +} +.row-fluid .offset12:first-child { + margin-left: 102.12765957446808%; + *margin-left: 102.02127659574467%; +} +.row-fluid .offset11 { + margin-left: 95.74468085106382%; + *margin-left: 95.6382978723404%; +} +.row-fluid .offset11:first-child { + margin-left: 93.61702127659574%; + *margin-left: 93.51063829787232%; +} +.row-fluid .offset10 { + margin-left: 87.23404255319149%; + *margin-left: 87.12765957446807%; +} +.row-fluid .offset10:first-child { + margin-left: 85.1063829787234%; + *margin-left: 84.99999999999999%; +} +.row-fluid .offset9 { + margin-left: 78.72340425531914%; + *margin-left: 78.61702127659572%; +} +.row-fluid .offset9:first-child { + margin-left: 76.59574468085106%; + *margin-left: 76.48936170212764%; +} +.row-fluid .offset8 { + margin-left: 70.2127659574468%; + *margin-left: 70.10638297872339%; +} +.row-fluid .offset8:first-child { + margin-left: 68.08510638297872%; + *margin-left: 67.9787234042553%; +} +.row-fluid .offset7 { + margin-left: 61.70212765957446%; + *margin-left: 61.59574468085106%; +} +.row-fluid .offset7:first-child { + margin-left: 59.574468085106375%; + *margin-left: 59.46808510638297%; +} +.row-fluid .offset6 { + margin-left: 53.191489361702125%; + *margin-left: 53.085106382978715%; +} +.row-fluid .offset6:first-child { + margin-left: 51.063829787234035%; + *margin-left: 50.95744680851063%; +} +.row-fluid .offset5 { + margin-left: 44.68085106382979%; + *margin-left: 44.57446808510638%; +} +.row-fluid .offset5:first-child { + margin-left: 42.5531914893617%; + *margin-left: 42.4468085106383%; +} +.row-fluid .offset4 { + margin-left: 36.170212765957444%; + *margin-left: 36.06382978723405%; +} +.row-fluid .offset4:first-child { + margin-left: 34.04255319148936%; + *margin-left: 33.93617021276596%; +} +.row-fluid .offset3 { + margin-left: 27.659574468085104%; + *margin-left: 27.5531914893617%; +} +.row-fluid .offset3:first-child { + margin-left: 25.53191489361702%; + *margin-left: 25.425531914893618%; +} +.row-fluid .offset2 { + margin-left: 19.148936170212764%; + *margin-left: 19.04255319148936%; +} +.row-fluid .offset2:first-child { + margin-left: 17.02127659574468%; + *margin-left: 16.914893617021278%; +} +.row-fluid .offset1 { + margin-left: 10.638297872340425%; + *margin-left: 10.53191489361702%; +} +.row-fluid .offset1:first-child { + margin-left: 8.51063829787234%; + *margin-left: 8.404255319148938%; +} +[class*="span"].hide, +.row-fluid [class*="span"].hide { + display: none; +} +[class*="span"].pull-right, +.row-fluid [class*="span"].pull-right { + float: right; +} +.container { + margin-right: auto; + margin-left: auto; + *zoom: 1; +} +.container:before, +.container:after { + display: table; + content: ""; + line-height: 0; +} +.container:after { + clear: both; +} +.container-fluid { + padding-right: 20px; + padding-left: 20px; + *zoom: 1; +} +.container-fluid:before, +.container-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.container-fluid:after { + clear: both; +} +p { + margin: 0 0 9px; +} +.lead { + margin-bottom: 18px; + font-size: 19.5px; + font-weight: 200; + line-height: 27px; +} +small { + font-size: 85%; +} +strong { + font-weight: bold; +} +em { + font-style: italic; +} +cite { + font-style: normal; +} +.muted { + color: #999999; +} +a.muted:hover, +a.muted:focus { + color: #808080; +} +.text-warning { + color: #c09853; +} +a.text-warning:hover, +a.text-warning:focus { + color: #a47e3c; +} +.text-error { + color: #b94a48; +} +a.text-error:hover, +a.text-error:focus { + color: #953b39; +} +.text-info { + color: #3a87ad; +} +a.text-info:hover, +a.text-info:focus { + color: #2d6987; +} +.text-success { + color: #468847; +} +a.text-success:hover, +a.text-success:focus { + color: #356635; +} +.text-left { + text-align: left; +} +.text-right { + text-align: right; +} +.text-center { + text-align: center; +} +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 9px 0; + font-family: inherit; + font-weight: bold; + line-height: 18px; + color: #525252; + text-rendering: optimizelegibility; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; + line-height: 1; + color: #999999; +} +h1, +h2, +h3 { + line-height: 36px; +} +h1 { + font-size: 35.75px; +} +h2 { + font-size: 29.25px; +} +h3 { + font-size: 22.75px; +} +h4 { + font-size: 16.25px; +} +h5 { + font-size: 13px; +} +h6 { + font-size: 11.049999999999999px; +} +h1 small { + font-size: 22.75px; +} +h2 small { + font-size: 16.25px; +} +h3 small { + font-size: 13px; +} +h4 small { + font-size: 13px; +} +.page-header { + padding-bottom: 8px; + margin: 18px 0 27px; + border-bottom: 1px solid #eeeeee; +} +ul, +ol { + padding: 0; + margin: 0 0 9px 25px; +} +ul ul, +ul ol, +ol ol, +ol ul { + margin-bottom: 0; +} +li { + line-height: 18px; +} +ul.unstyled, +ol.unstyled { + margin-left: 0; + list-style: none; +} +ul.inline, +ol.inline { + margin-left: 0; + list-style: none; +} +ul.inline > li, +ol.inline > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding-left: 5px; + padding-right: 5px; +} +dl { + margin-bottom: 18px; +} +dt, +dd { + line-height: 18px; +} +dt { + font-weight: bold; +} +dd { + margin-left: 9px; +} +.dl-horizontal { + *zoom: 1; +} +.dl-horizontal:before, +.dl-horizontal:after { + display: table; + content: ""; + line-height: 0; +} +.dl-horizontal:after { + clear: both; +} +.dl-horizontal dt { + float: left; + width: 160px; + clear: left; + text-align: right; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} +.dl-horizontal dd { + margin-left: 180px; +} +hr { + margin: 18px 0; + border: 0; + border-top: 1px solid #eeeeee; + border-bottom: 1px solid #ffffff; +} +abbr[title], +abbr[data-original-title] { + cursor: help; + border-bottom: 1px dotted #999999; +} +abbr.initialism { + font-size: 90%; + text-transform: uppercase; +} +blockquote { + padding: 0 0 0 15px; + margin: 0 0 18px; + border-left: 5px solid #eeeeee; +} +blockquote p { + margin-bottom: 0; + font-size: 16.25px; + font-weight: 300; + line-height: 1.25; +} +blockquote small { + display: block; + line-height: 18px; + color: #999999; +} +blockquote small:before { + content: '\2014 \00A0'; +} +blockquote.pull-right { + float: right; + padding-right: 15px; + padding-left: 0; + border-right: 5px solid #eeeeee; + border-left: 0; +} +blockquote.pull-right p, +blockquote.pull-right small { + text-align: right; +} +blockquote.pull-right small:before { + content: ''; +} +blockquote.pull-right small:after { + content: '\00A0 \2014'; +} +q:before, +q:after, +blockquote:before, +blockquote:after { + content: ""; +} +address { + display: block; + margin-bottom: 18px; + font-style: normal; + line-height: 18px; +} +code, +pre { + padding: 0 3px 2px; + font-family: Monaco, Menlo, Consolas, "Courier New", monospace; + font-size: 11px; + color: #333333; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +code { + padding: 2px 4px; + color: #d14; + background-color: #f7f7f9; + border: 1px solid #e1e1e8; + white-space: nowrap; +} +pre { + display: block; + padding: 8.5px; + margin: 0 0 9px; + font-size: 12px; + line-height: 18px; + word-break: break-all; + word-wrap: break-word; + white-space: pre; + white-space: pre-wrap; + background-color: #f5f5f5; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.15); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +pre.prettyprint { + margin-bottom: 18px; +} +pre code { + padding: 0; + color: inherit; + white-space: pre; + white-space: pre-wrap; + background-color: transparent; + border: 0; +} +.pre-scrollable { + max-height: 340px; + overflow-y: scroll; +} +form { + margin: 0 0 18px; +} +fieldset { + padding: 0; + margin: 0; + border: 0; +} +legend { + display: block; + width: 100%; + padding: 0; + margin-bottom: 18px; + font-size: 19.5px; + line-height: 36px; + color: #333333; + border: 0; + border-bottom: 1px solid #e5e5e5; +} +legend small { + font-size: 13.5px; + color: #999999; +} +label, +input, +button, +select, +textarea { + font-size: 13px; + font-weight: normal; + line-height: 18px; +} +input, +button, +select, +textarea { + font-family: "PT Sans", Arial, sans-serif; +} +label { + display: block; + margin-bottom: 5px; +} +select, +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + display: inline-block; + height: 18px; + padding: 4px 6px; + margin-bottom: 9px; + font-size: 13px; + line-height: 18px; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + vertical-align: middle; +} +input, +textarea, +.uneditable-input { + width: 206px; +} +textarea { + height: auto; +} +textarea, +input[type="text"], +input[type="password"], +input[type="datetime"], +input[type="datetime-local"], +input[type="date"], +input[type="month"], +input[type="time"], +input[type="week"], +input[type="number"], +input[type="email"], +input[type="url"], +input[type="search"], +input[type="tel"], +input[type="color"], +.uneditable-input { + background-color: #ffffff; + border: 1px solid #cccccc; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -webkit-transition: border linear .2s, box-shadow linear .2s; + -moz-transition: border linear .2s, box-shadow linear .2s; + -o-transition: border linear .2s, box-shadow linear .2s; + transition: border linear .2s, box-shadow linear .2s; +} +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: rgba(82, 168, 236, 0.8); + outline: 0; + outline: thin dotted \9; + /* IE6-9 */ + + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(82,168,236,.6); +} +input[type="radio"], +input[type="checkbox"] { + margin: 4px 0 0; + *margin-top: 0; + /* IE7 */ + + margin-top: 1px \9; + /* IE8-9 */ + + line-height: normal; +} +input[type="file"], +input[type="image"], +input[type="submit"], +input[type="reset"], +input[type="button"], +input[type="radio"], +input[type="checkbox"] { + width: auto; +} +select, +input[type="file"] { + height: 28px; + /* In IE7, the height of the select element cannot be changed by height, only font-size */ + + *margin-top: 4px; + /* For IE7, add top margin to align select with labels */ + + line-height: 28px; +} +select { + width: 220px; + border: 1px solid #cccccc; + background-color: #ffffff; +} +select[multiple], +select[size] { + height: auto; +} +select:focus, +input[type="file"]:focus, +input[type="radio"]:focus, +input[type="checkbox"]:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.uneditable-input, +.uneditable-textarea { + color: #999999; + background-color: #fcfcfc; + border-color: #cccccc; + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.025); + cursor: not-allowed; +} +.uneditable-input { + overflow: hidden; + white-space: nowrap; +} +.uneditable-textarea { + width: auto; + height: auto; +} +input:-moz-placeholder, +textarea:-moz-placeholder { + color: #999999; +} +input:-ms-input-placeholder, +textarea:-ms-input-placeholder { + color: #999999; +} +input::-webkit-input-placeholder, +textarea::-webkit-input-placeholder { + color: #999999; +} +.radio, +.checkbox { + min-height: 18px; + padding-left: 20px; +} +.radio input[type="radio"], +.checkbox input[type="checkbox"] { + float: left; + margin-left: -20px; +} +.controls > .radio:first-child, +.controls > .checkbox:first-child { + padding-top: 5px; +} +.radio.inline, +.checkbox.inline { + display: inline-block; + padding-top: 5px; + margin-bottom: 0; + vertical-align: middle; +} +.radio.inline + .radio.inline, +.checkbox.inline + .checkbox.inline { + margin-left: 10px; +} +.input-mini { + width: 60px; +} +.input-small { + width: 90px; +} +.input-medium { + width: 150px; +} +.input-large { + width: 210px; +} +.input-xlarge { + width: 270px; +} +.input-xxlarge { + width: 530px; +} +input[class*="span"], +select[class*="span"], +textarea[class*="span"], +.uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"] { + float: none; + margin-left: 0; +} +.input-append input[class*="span"], +.input-append .uneditable-input[class*="span"], +.input-prepend input[class*="span"], +.input-prepend .uneditable-input[class*="span"], +.row-fluid input[class*="span"], +.row-fluid select[class*="span"], +.row-fluid textarea[class*="span"], +.row-fluid .uneditable-input[class*="span"], +.row-fluid .input-prepend [class*="span"], +.row-fluid .input-append [class*="span"] { + display: inline-block; +} +input, +textarea, +.uneditable-input { + margin-left: 0; +} +.controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; +} +input.span12, +textarea.span12, +.uneditable-input.span12 { + width: 926px; +} +input.span11, +textarea.span11, +.uneditable-input.span11 { + width: 846px; +} +input.span10, +textarea.span10, +.uneditable-input.span10 { + width: 766px; +} +input.span9, +textarea.span9, +.uneditable-input.span9 { + width: 686px; +} +input.span8, +textarea.span8, +.uneditable-input.span8 { + width: 606px; +} +input.span7, +textarea.span7, +.uneditable-input.span7 { + width: 526px; +} +input.span6, +textarea.span6, +.uneditable-input.span6 { + width: 446px; +} +input.span5, +textarea.span5, +.uneditable-input.span5 { + width: 366px; +} +input.span4, +textarea.span4, +.uneditable-input.span4 { + width: 286px; +} +input.span3, +textarea.span3, +.uneditable-input.span3 { + width: 206px; +} +input.span2, +textarea.span2, +.uneditable-input.span2 { + width: 126px; +} +input.span1, +textarea.span1, +.uneditable-input.span1 { + width: 46px; +} +.controls-row { + *zoom: 1; +} +.controls-row:before, +.controls-row:after { + display: table; + content: ""; + line-height: 0; +} +.controls-row:after { + clear: both; +} +.controls-row [class*="span"], +.row-fluid .controls-row [class*="span"] { + float: left; +} +.controls-row .checkbox[class*="span"], +.controls-row .radio[class*="span"] { + padding-top: 5px; +} +input[disabled], +select[disabled], +textarea[disabled], +input[readonly], +select[readonly], +textarea[readonly] { + cursor: not-allowed; + background-color: #eeeeee; +} +input[type="radio"][disabled], +input[type="checkbox"][disabled], +input[type="radio"][readonly], +input[type="checkbox"][readonly] { + background-color: transparent; +} +.control-group.warning .control-label, +.control-group.warning .help-block, +.control-group.warning .help-inline { + color: #c09853; +} +.control-group.warning .checkbox, +.control-group.warning .radio, +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + color: #c09853; +} +.control-group.warning input, +.control-group.warning select, +.control-group.warning textarea { + border-color: #c09853; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.warning input:focus, +.control-group.warning select:focus, +.control-group.warning textarea:focus { + border-color: #a47e3c; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #dbc59e; +} +.control-group.warning .input-prepend .add-on, +.control-group.warning .input-append .add-on { + color: #c09853; + background-color: #fcf8e3; + border-color: #c09853; +} +.control-group.error .control-label, +.control-group.error .help-block, +.control-group.error .help-inline { + color: #b94a48; +} +.control-group.error .checkbox, +.control-group.error .radio, +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + color: #b94a48; +} +.control-group.error input, +.control-group.error select, +.control-group.error textarea { + border-color: #b94a48; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.error input:focus, +.control-group.error select:focus, +.control-group.error textarea:focus { + border-color: #953b39; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #d59392; +} +.control-group.error .input-prepend .add-on, +.control-group.error .input-append .add-on { + color: #b94a48; + background-color: #f2dede; + border-color: #b94a48; +} +.control-group.success .control-label, +.control-group.success .help-block, +.control-group.success .help-inline { + color: #468847; +} +.control-group.success .checkbox, +.control-group.success .radio, +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + color: #468847; +} +.control-group.success input, +.control-group.success select, +.control-group.success textarea { + border-color: #468847; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.success input:focus, +.control-group.success select:focus, +.control-group.success textarea:focus { + border-color: #356635; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7aba7b; +} +.control-group.success .input-prepend .add-on, +.control-group.success .input-append .add-on { + color: #468847; + background-color: #dff0d8; + border-color: #468847; +} +.control-group.info .control-label, +.control-group.info .help-block, +.control-group.info .help-inline { + color: #3a87ad; +} +.control-group.info .checkbox, +.control-group.info .radio, +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + color: #3a87ad; +} +.control-group.info input, +.control-group.info select, +.control-group.info textarea { + border-color: #3a87ad; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); +} +.control-group.info input:focus, +.control-group.info select:focus, +.control-group.info textarea:focus { + border-color: #2d6987; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075), 0 0 6px #7ab5d3; +} +.control-group.info .input-prepend .add-on, +.control-group.info .input-append .add-on { + color: #3a87ad; + background-color: #d9edf7; + border-color: #3a87ad; +} +input:focus:invalid, +textarea:focus:invalid, +select:focus:invalid { + color: #b94a48; + border-color: #ee5f5b; +} +input:focus:invalid:focus, +textarea:focus:invalid:focus, +select:focus:invalid:focus { + border-color: #e9322d; + -webkit-box-shadow: 0 0 6px #f8b9b7; + -moz-box-shadow: 0 0 6px #f8b9b7; + box-shadow: 0 0 6px #f8b9b7; +} +.form-actions { + padding: 17px 20px 18px; + margin-top: 18px; + margin-bottom: 18px; + background-color: #ffffff; + border-top: 1px solid #e5e5e5; + *zoom: 1; +} +.form-actions:before, +.form-actions:after { + display: table; + content: ""; + line-height: 0; +} +.form-actions:after { + clear: both; +} +.help-block, +.help-inline { + color: #babcbe; +} +.help-block { + display: block; + margin-bottom: 9px; +} +.help-inline { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + vertical-align: middle; + padding-left: 5px; +} +.input-append, +.input-prepend { + display: inline-block; + margin-bottom: 9px; + vertical-align: middle; + font-size: 0; + white-space: nowrap; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input, +.input-append .dropdown-menu, +.input-prepend .dropdown-menu, +.input-append .popover, +.input-prepend .popover { + font-size: 13px; +} +.input-append input, +.input-prepend input, +.input-append select, +.input-prepend select, +.input-append .uneditable-input, +.input-prepend .uneditable-input { + position: relative; + margin-bottom: 0; + *margin-left: 0; + vertical-align: top; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append input:focus, +.input-prepend input:focus, +.input-append select:focus, +.input-prepend select:focus, +.input-append .uneditable-input:focus, +.input-prepend .uneditable-input:focus { + z-index: 2; +} +.input-append .add-on, +.input-prepend .add-on { + display: inline-block; + width: auto; + height: 18px; + min-width: 16px; + padding: 4px 5px; + font-size: 13px; + font-weight: normal; + line-height: 18px; + text-align: center; + text-shadow: 0 1px 0 #ffffff; + background-color: #eeeeee; + border: 1px solid #ccc; +} +.input-append .add-on, +.input-prepend .add-on, +.input-append .btn, +.input-prepend .btn, +.input-append .btn-group > .dropdown-toggle, +.input-prepend .btn-group > .dropdown-toggle { + vertical-align: top; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-append .active, +.input-prepend .active { + background-color: #a9dba9; + border-color: #46a546; +} +.input-prepend .add-on, +.input-prepend .btn { + margin-right: -1px; +} +.input-prepend .add-on:first-child, +.input-prepend .btn:first-child { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input, +.input-append select, +.input-append .uneditable-input { + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-append input + .btn-group .btn:last-child, +.input-append select + .btn-group .btn:last-child, +.input-append .uneditable-input + .btn-group .btn:last-child { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-append .add-on, +.input-append .btn, +.input-append .btn-group { + margin-left: -1px; +} +.input-append .add-on:last-child, +.input-append .btn:last-child, +.input-append .btn-group:last-child > .dropdown-toggle { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append input, +.input-prepend.input-append select, +.input-prepend.input-append .uneditable-input { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.input-prepend.input-append input + .btn-group .btn, +.input-prepend.input-append select + .btn-group .btn, +.input-prepend.input-append .uneditable-input + .btn-group .btn { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .add-on:first-child, +.input-prepend.input-append .btn:first-child { + margin-right: -1px; + -webkit-border-radius: 3px 0 0 3px; + -moz-border-radius: 3px 0 0 3px; + border-radius: 3px 0 0 3px; +} +.input-prepend.input-append .add-on:last-child, +.input-prepend.input-append .btn:last-child { + margin-left: -1px; + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.input-prepend.input-append .btn-group:first-child { + margin-left: 0; +} +input.search-query { + padding-right: 14px; + padding-right: 4px \9; + padding-left: 14px; + padding-left: 4px \9; + /* IE7-8 doesn't have border-radius, so don't indent the padding */ + + margin-bottom: 0; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Allow for input prepend/append in search forms */ +.form-search .input-append .search-query, +.form-search .input-prepend .search-query { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.form-search .input-append .search-query { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search .input-append .btn { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .search-query { + -webkit-border-radius: 0 14px 14px 0; + -moz-border-radius: 0 14px 14px 0; + border-radius: 0 14px 14px 0; +} +.form-search .input-prepend .btn { + -webkit-border-radius: 14px 0 0 14px; + -moz-border-radius: 14px 0 0 14px; + border-radius: 14px 0 0 14px; +} +.form-search input, +.form-inline input, +.form-horizontal input, +.form-search textarea, +.form-inline textarea, +.form-horizontal textarea, +.form-search select, +.form-inline select, +.form-horizontal select, +.form-search .help-inline, +.form-inline .help-inline, +.form-horizontal .help-inline, +.form-search .uneditable-input, +.form-inline .uneditable-input, +.form-horizontal .uneditable-input, +.form-search .input-prepend, +.form-inline .input-prepend, +.form-horizontal .input-prepend, +.form-search .input-append, +.form-inline .input-append, +.form-horizontal .input-append { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .hide, +.form-inline .hide, +.form-horizontal .hide { + display: none; +} +.form-search label, +.form-inline label, +.form-search .btn-group, +.form-inline .btn-group { + display: inline-block; +} +.form-search .input-append, +.form-inline .input-append, +.form-search .input-prepend, +.form-inline .input-prepend { + margin-bottom: 0; +} +.form-search .radio, +.form-search .checkbox, +.form-inline .radio, +.form-inline .checkbox { + padding-left: 0; + margin-bottom: 0; + vertical-align: middle; +} +.form-search .radio input[type="radio"], +.form-search .checkbox input[type="checkbox"], +.form-inline .radio input[type="radio"], +.form-inline .checkbox input[type="checkbox"] { + float: left; + margin-right: 3px; + margin-left: 0; +} +.control-group { + margin-bottom: 9px; +} +legend + .control-group { + margin-top: 18px; + -webkit-margin-top-collapse: separate; +} +.form-horizontal .control-group { + margin-bottom: 18px; + *zoom: 1; +} +.form-horizontal .control-group:before, +.form-horizontal .control-group:after { + display: table; + content: ""; + line-height: 0; +} +.form-horizontal .control-group:after { + clear: both; +} +.form-horizontal .control-label { + float: left; + width: 160px; + padding-top: 5px; + text-align: right; +} +.form-horizontal .controls { + *display: inline-block; + *padding-left: 20px; + margin-left: 180px; + *margin-left: 0; +} +.form-horizontal .controls:first-child { + *padding-left: 180px; +} +.form-horizontal .help-block { + margin-bottom: 0; +} +.form-horizontal input + .help-block, +.form-horizontal select + .help-block, +.form-horizontal textarea + .help-block, +.form-horizontal .uneditable-input + .help-block, +.form-horizontal .input-prepend + .help-block, +.form-horizontal .input-append + .help-block { + margin-top: 9px; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +table { + max-width: 100%; + background-color: transparent; + border-collapse: collapse; + border-spacing: 0; +} +.table { + width: 100%; + margin-bottom: 18px; +} +.table th, +.table td { + padding: 8px; + line-height: 18px; + text-align: left; + vertical-align: top; + border-top: 1px solid #dddddd; +} +.table th { + font-weight: bold; +} +.table thead th { + vertical-align: bottom; +} +.table caption + thead tr:first-child th, +.table caption + thead tr:first-child td, +.table colgroup + thead tr:first-child th, +.table colgroup + thead tr:first-child td, +.table thead:first-child tr:first-child th, +.table thead:first-child tr:first-child td { + border-top: 0; +} +.table tbody + tbody { + border-top: 2px solid #dddddd; +} +.table .table { + background-color: #f5f5f5; +} +.table-condensed th, +.table-condensed td { + padding: 4px 5px; +} +.table-bordered { + border: 1px solid #dddddd; + border-collapse: separate; + *border-collapse: collapse; + border-left: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.table-bordered th, +.table-bordered td { + border-left: 1px solid #dddddd; +} +.table-bordered caption + thead tr:first-child th, +.table-bordered caption + tbody tr:first-child th, +.table-bordered caption + tbody tr:first-child td, +.table-bordered colgroup + thead tr:first-child th, +.table-bordered colgroup + tbody tr:first-child th, +.table-bordered colgroup + tbody tr:first-child td, +.table-bordered thead:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child th, +.table-bordered tbody:first-child tr:first-child td { + border-top: 0; +} +.table-bordered thead:first-child tr:first-child > th:first-child, +.table-bordered tbody:first-child tr:first-child > td:first-child, +.table-bordered tbody:first-child tr:first-child > th:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered thead:first-child tr:first-child > th:last-child, +.table-bordered tbody:first-child tr:first-child > td:last-child, +.table-bordered tbody:first-child tr:first-child > th:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:first-child, +.table-bordered tbody:last-child tr:last-child > td:first-child, +.table-bordered tbody:last-child tr:last-child > th:first-child, +.table-bordered tfoot:last-child tr:last-child > td:first-child, +.table-bordered tfoot:last-child tr:last-child > th:first-child { + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.table-bordered thead:last-child tr:last-child > th:last-child, +.table-bordered tbody:last-child tr:last-child > td:last-child, +.table-bordered tbody:last-child tr:last-child > th:last-child, +.table-bordered tfoot:last-child tr:last-child > td:last-child, +.table-bordered tfoot:last-child tr:last-child > th:last-child { + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:first-child { + -webkit-border-bottom-left-radius: 0; + -moz-border-radius-bottomleft: 0; + border-bottom-left-radius: 0; +} +.table-bordered tfoot + tbody:last-child tr:last-child td:last-child { + -webkit-border-bottom-right-radius: 0; + -moz-border-radius-bottomright: 0; + border-bottom-right-radius: 0; +} +.table-bordered caption + thead tr:first-child th:first-child, +.table-bordered caption + tbody tr:first-child td:first-child, +.table-bordered colgroup + thead tr:first-child th:first-child, +.table-bordered colgroup + tbody tr:first-child td:first-child { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; +} +.table-bordered caption + thead tr:first-child th:last-child, +.table-bordered caption + tbody tr:first-child td:last-child, +.table-bordered colgroup + thead tr:first-child th:last-child, +.table-bordered colgroup + tbody tr:first-child td:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; +} +.table-striped tbody > tr:nth-child(odd) > td, +.table-striped tbody > tr:nth-child(odd) > th { + background-color: #f9f9f9; +} +.table-hover tbody tr:hover > td, +.table-hover tbody tr:hover > th { + background-color: #f5f5f5; +} +table td[class*="span"], +table th[class*="span"], +.row-fluid table td[class*="span"], +.row-fluid table th[class*="span"] { + display: table-cell; + float: none; + margin-left: 0; +} +.table td.span1, +.table th.span1 { + float: none; + width: 44px; + margin-left: 0; +} +.table td.span2, +.table th.span2 { + float: none; + width: 124px; + margin-left: 0; +} +.table td.span3, +.table th.span3 { + float: none; + width: 204px; + margin-left: 0; +} +.table td.span4, +.table th.span4 { + float: none; + width: 284px; + margin-left: 0; +} +.table td.span5, +.table th.span5 { + float: none; + width: 364px; + margin-left: 0; +} +.table td.span6, +.table th.span6 { + float: none; + width: 444px; + margin-left: 0; +} +.table td.span7, +.table th.span7 { + float: none; + width: 524px; + margin-left: 0; +} +.table td.span8, +.table th.span8 { + float: none; + width: 604px; + margin-left: 0; +} +.table td.span9, +.table th.span9 { + float: none; + width: 684px; + margin-left: 0; +} +.table td.span10, +.table th.span10 { + float: none; + width: 764px; + margin-left: 0; +} +.table td.span11, +.table th.span11 { + float: none; + width: 844px; + margin-left: 0; +} +.table td.span12, +.table th.span12 { + float: none; + width: 924px; + margin-left: 0; +} +.table tbody tr.success > td { + background-color: #dff0d8; +} +.table tbody tr.error > td { + background-color: #f2dede; +} +.table tbody tr.warning > td { + background-color: #fcf8e3; +} +.table tbody tr.info > td { + background-color: #d9edf7; +} +.table-hover tbody tr.success:hover > td { + background-color: #d0e9c6; +} +.table-hover tbody tr.error:hover > td { + background-color: #ebcccc; +} +.table-hover tbody tr.warning:hover > td { + background-color: #faf2cc; +} +.table-hover tbody tr.info:hover > td { + background-color: #c4e3f3; +} +[class^="icon-"], +[class*=" icon-"] { + display: inline-block; + width: 14px; + height: 14px; + *margin-right: .3em; + line-height: 14px; + vertical-align: text-top; + background-image: url("../img/icons/glyphicons-halflings.png"); + background-position: 14px 14px; + background-repeat: no-repeat; + margin-top: 1px; +} +/* White icons with optional class, or on hover/focus/active states of certain elements */ +.icon-white, +.nav-pills > .active > a > [class^="icon-"], +.nav-pills > .active > a > [class*=" icon-"], +.nav-list > .active > a > [class^="icon-"], +.nav-list > .active > a > [class*=" icon-"], +.navbar-inverse .nav > .active > a > [class^="icon-"], +.navbar-inverse .nav > .active > a > [class*=" icon-"], +.dropdown-menu > li > a:hover > [class^="icon-"], +.dropdown-menu > li > a:focus > [class^="icon-"], +.dropdown-menu > li > a:hover > [class*=" icon-"], +.dropdown-menu > li > a:focus > [class*=" icon-"], +.dropdown-menu > .active > a > [class^="icon-"], +.dropdown-menu > .active > a > [class*=" icon-"], +.dropdown-submenu:hover > a > [class^="icon-"], +.dropdown-submenu:focus > a > [class^="icon-"], +.dropdown-submenu:hover > a > [class*=" icon-"], +.dropdown-submenu:focus > a > [class*=" icon-"] { + background-image: url("../img/icons/glyphicons-halflings-white.png"); +} +.icon-glass { + background-position: 0 0; +} +.icon-music { + background-position: -24px 0; +} +.icon-search { + background-position: -48px 0; +} +.icon-envelope { + background-position: -72px 0; +} +.icon-heart { + background-position: -96px 0; +} +.icon-star { + background-position: -120px 0; +} +.icon-star-empty { + background-position: -144px 0; +} +.icon-user { + background-position: -168px 0; +} +.icon-film { + background-position: -192px 0; +} +.icon-th-large { + background-position: -216px 0; +} +.icon-th { + background-position: -240px 0; +} +.icon-th-list { + background-position: -264px 0; +} +.icon-ok { + background-position: -288px 0; +} +.icon-remove { + background-position: -312px 0; +} +.icon-zoom-in { + background-position: -336px 0; +} +.icon-zoom-out { + background-position: -360px 0; +} +.icon-off { + background-position: -384px 0; +} +.icon-signal { + background-position: -408px 0; +} +.icon-cog { + background-position: -432px 0; +} +.icon-trash { + background-position: -456px 0; +} +.icon-home { + background-position: 0 -24px; +} +.icon-file { + background-position: -24px -24px; +} +.icon-time { + background-position: -48px -24px; +} +.icon-road { + background-position: -72px -24px; +} +.icon-download-alt { + background-position: -96px -24px; +} +.icon-download { + background-position: -120px -24px; +} +.icon-upload { + background-position: -144px -24px; +} +.icon-inbox { + background-position: -168px -24px; +} +.icon-play-circle { + background-position: -192px -24px; +} +.icon-repeat { + background-position: -216px -24px; +} +.icon-refresh { + background-position: -240px -24px; +} +.icon-list-alt { + background-position: -264px -24px; +} +.icon-lock { + background-position: -287px -24px; +} +.icon-flag { + background-position: -312px -24px; +} +.icon-headphones { + background-position: -336px -24px; +} +.icon-volume-off { + background-position: -360px -24px; +} +.icon-volume-down { + background-position: -384px -24px; +} +.icon-volume-up { + background-position: -408px -24px; +} +.icon-qrcode { + background-position: -432px -24px; +} +.icon-barcode { + background-position: -456px -24px; +} +.icon-tag { + background-position: 0 -48px; +} +.icon-tags { + background-position: -25px -48px; +} +.icon-book { + background-position: -48px -48px; +} +.icon-bookmark { + background-position: -72px -48px; +} +.icon-print { + background-position: -96px -48px; +} +.icon-camera { + background-position: -120px -48px; +} +.icon-font { + background-position: -144px -48px; +} +.icon-bold { + background-position: -167px -48px; +} +.icon-italic { + background-position: -192px -48px; +} +.icon-text-height { + background-position: -216px -48px; +} +.icon-text-width { + background-position: -240px -48px; +} +.icon-align-left { + background-position: -264px -48px; +} +.icon-align-center { + background-position: -288px -48px; +} +.icon-align-right { + background-position: -312px -48px; +} +.icon-align-justify { + background-position: -336px -48px; +} +.icon-list { + background-position: -360px -48px; +} +.icon-indent-left { + background-position: -384px -48px; +} +.icon-indent-right { + background-position: -408px -48px; +} +.icon-facetime-video { + background-position: -432px -48px; +} +.icon-picture { + background-position: -456px -48px; +} +.icon-pencil { + background-position: 0 -72px; +} +.icon-map-marker { + background-position: -24px -72px; +} +.icon-adjust { + background-position: -48px -72px; +} +.icon-tint { + background-position: -72px -72px; +} +.icon-edit { + background-position: -96px -72px; +} +.icon-share { + background-position: -120px -72px; +} +.icon-check { + background-position: -144px -72px; +} +.icon-move { + background-position: -168px -72px; +} +.icon-step-backward { + background-position: -192px -72px; +} +.icon-fast-backward { + background-position: -216px -72px; +} +.icon-backward { + background-position: -240px -72px; +} +.icon-play { + background-position: -264px -72px; +} +.icon-pause { + background-position: -288px -72px; +} +.icon-stop { + background-position: -312px -72px; +} +.icon-forward { + background-position: -336px -72px; +} +.icon-fast-forward { + background-position: -360px -72px; +} +.icon-step-forward { + background-position: -384px -72px; +} +.icon-eject { + background-position: -408px -72px; +} +.icon-chevron-left { + background-position: -432px -72px; +} +.icon-chevron-right { + background-position: -456px -72px; +} +.icon-plus-sign { + background-position: 0 -96px; +} +.icon-minus-sign { + background-position: -24px -96px; +} +.icon-remove-sign { + background-position: -48px -96px; +} +.icon-ok-sign { + background-position: -72px -96px; +} +.icon-question-sign { + background-position: -96px -96px; +} +.icon-info-sign { + background-position: -120px -96px; +} +.icon-screenshot { + background-position: -144px -96px; +} +.icon-remove-circle { + background-position: -168px -96px; +} +.icon-ok-circle { + background-position: -192px -96px; +} +.icon-ban-circle { + background-position: -216px -96px; +} +.icon-arrow-left { + background-position: -240px -96px; +} +.icon-arrow-right { + background-position: -264px -96px; +} +.icon-arrow-up { + background-position: -289px -96px; +} +.icon-arrow-down { + background-position: -312px -96px; +} +.icon-share-alt { + background-position: -336px -96px; +} +.icon-resize-full { + background-position: -360px -96px; +} +.icon-resize-small { + background-position: -384px -96px; +} +.icon-plus { + background-position: -408px -96px; +} +.icon-minus { + background-position: -433px -96px; +} +.icon-asterisk { + background-position: -456px -96px; +} +.icon-exclamation-sign { + background-position: 0 -120px; +} +.icon-gift { + background-position: -24px -120px; +} +.icon-leaf { + background-position: -48px -120px; +} +.icon-fire { + background-position: -72px -120px; +} +.icon-eye-open { + background-position: -96px -120px; +} +.icon-eye-close { + background-position: -120px -120px; +} +.icon-warning-sign { + background-position: -144px -120px; +} +.icon-plane { + background-position: -168px -120px; +} +.icon-calendar { + background-position: -192px -120px; +} +.icon-random { + background-position: -216px -120px; + width: 16px; +} +.icon-comment { + background-position: -240px -120px; +} +.icon-magnet { + background-position: -264px -120px; +} +.icon-chevron-up { + background-position: -288px -120px; +} +.icon-chevron-down { + background-position: -313px -119px; +} +.icon-retweet { + background-position: -336px -120px; +} +.icon-shopping-cart { + background-position: -360px -120px; +} +.icon-folder-close { + background-position: -384px -120px; + width: 16px; +} +.icon-folder-open { + background-position: -408px -120px; + width: 16px; +} +.icon-resize-vertical { + background-position: -432px -119px; +} +.icon-resize-horizontal { + background-position: -456px -118px; +} +.icon-hdd { + background-position: 0 -144px; +} +.icon-bullhorn { + background-position: -24px -144px; +} +.icon-bell { + background-position: -48px -144px; +} +.icon-certificate { + background-position: -72px -144px; +} +.icon-thumbs-up { + background-position: -96px -144px; +} +.icon-thumbs-down { + background-position: -120px -144px; +} +.icon-hand-right { + background-position: -144px -144px; +} +.icon-hand-left { + background-position: -168px -144px; +} +.icon-hand-up { + background-position: -192px -144px; +} +.icon-hand-down { + background-position: -216px -144px; +} +.icon-circle-arrow-right { + background-position: -240px -144px; +} +.icon-circle-arrow-left { + background-position: -264px -144px; +} +.icon-circle-arrow-up { + background-position: -288px -144px; +} +.icon-circle-arrow-down { + background-position: -312px -144px; +} +.icon-globe { + background-position: -336px -144px; +} +.icon-wrench { + background-position: -360px -144px; +} +.icon-tasks { + background-position: -384px -144px; +} +.icon-filter { + background-position: -408px -144px; +} +.icon-briefcase { + background-position: -432px -144px; +} +.icon-fullscreen { + background-position: -456px -144px; +} +.dropup, +.dropdown { + position: relative; +} +.dropdown-toggle { + *margin-bottom: -3px; +} +.dropdown-toggle:active, +.open .dropdown-toggle { + outline: 0; +} +.caret { + display: inline-block; + width: 0; + height: 0; + vertical-align: top; + border-top: 4px solid #000000; + border-right: 4px solid transparent; + border-left: 4px solid transparent; + content: ""; +} +.dropdown .caret { + margin-top: 8px; + margin-left: 2px; +} +.dropdown-menu { + position: absolute; + top: 100%; + left: 0; + z-index: 1000; + display: none; + float: left; + min-width: 160px; + padding: 5px 0; + margin: 2px 0 0; + list-style: none; + background-color: #ffffff; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + *border-right-width: 2px; + *border-bottom-width: 2px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; +} +.dropdown-menu.pull-right { + right: 0; + left: auto; +} +.dropdown-menu .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.dropdown-menu > li > a { + display: block; + padding: 3px 20px; + clear: both; + font-weight: normal; + line-height: 18px; + color: #333333; + white-space: nowrap; +} +.dropdown-menu > li > a:hover, +.dropdown-menu > li > a:focus, +.dropdown-submenu:hover > a, +.dropdown-submenu:focus > a { + text-decoration: none; + color: #ffffff; + background-color: #e64040; + background-image: -moz-linear-gradient(top, #e74949, #e43232); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e43232)); + background-image: -webkit-linear-gradient(top, #e74949, #e43232); + background-image: -o-linear-gradient(top, #e74949, #e43232); + background-image: linear-gradient(to bottom, #e74949, #e43232); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe43232', GradientType=0); +} +.dropdown-menu > .active > a, +.dropdown-menu > .active > a:hover, +.dropdown-menu > .active > a:focus { + color: #333333; + text-decoration: none; + outline: 0; + background-color: #e64040; + background-image: -moz-linear-gradient(top, #e74949, #e43232); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e43232)); + background-image: -webkit-linear-gradient(top, #e74949, #e43232); + background-image: -o-linear-gradient(top, #e74949, #e43232); + background-image: linear-gradient(to bottom, #e74949, #e43232); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe43232', GradientType=0); +} +.dropdown-menu > .disabled > a, +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + color: #999999; +} +.dropdown-menu > .disabled > a:hover, +.dropdown-menu > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + background-image: none; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + cursor: default; +} +.open { + *z-index: 1000; +} +.open > .dropdown-menu { + display: block; +} +.pull-right > .dropdown-menu { + right: 0; + left: auto; +} +.dropup .caret, +.navbar-fixed-bottom .dropdown .caret { + border-top: 0; + border-bottom: 4px solid #000000; + content: ""; +} +.dropup .dropdown-menu, +.navbar-fixed-bottom .dropdown .dropdown-menu { + top: auto; + bottom: 100%; + margin-bottom: 1px; +} +.dropdown-submenu { + position: relative; +} +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px 6px; + border-radius: 0 6px 6px 6px; +} +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} +.dropup .dropdown-submenu > .dropdown-menu { + top: auto; + bottom: 0; + margin-top: 0; + margin-bottom: -2px; + -webkit-border-radius: 5px 5px 5px 0; + -moz-border-radius: 5px 5px 5px 0; + border-radius: 5px 5px 5px 0; +} +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #cccccc; + margin-top: 5px; + margin-right: -10px; +} +.dropdown-submenu:hover > a:after { + border-left-color: #ffffff; +} +.dropdown-submenu.pull-left { + float: none; +} +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.dropdown .dropdown-menu .nav-header { + padding-left: 20px; + padding-right: 20px; +} +.typeahead { + z-index: 1051; + margin-top: 2px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.well { + min-height: 20px; + padding: 19px; + margin-bottom: 20px; + background-color: #f5f5f5; + border: 1px solid #e3e3e3; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.05); +} +.well blockquote { + border-color: #ddd; + border-color: rgba(0, 0, 0, 0.15); +} +.well-large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well-small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.fade { + opacity: 0; + -webkit-transition: opacity 0.15s linear; + -moz-transition: opacity 0.15s linear; + -o-transition: opacity 0.15s linear; + transition: opacity 0.15s linear; +} +.fade.in { + opacity: 1; +} +.collapse { + position: relative; + height: 0; + overflow: hidden; + -webkit-transition: height 0.35s ease; + -moz-transition: height 0.35s ease; + -o-transition: height 0.35s ease; + transition: height 0.35s ease; +} +.collapse.in { + height: auto; +} +.close { + float: right; + font-size: 20px; + font-weight: bold; + line-height: 18px; + color: #000000; + text-shadow: 0 1px 0 #ffffff; + opacity: 0.2; + filter: alpha(opacity=20); +} +.close:hover, +.close:focus { + color: #000000; + text-decoration: none; + cursor: pointer; + opacity: 0.4; + filter: alpha(opacity=40); +} +button.close { + padding: 0; + cursor: pointer; + background: transparent; + border: 0; + -webkit-appearance: none; +} +.btn { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); +} +.btn:hover, +.btn:focus, +.btn:active, +.btn.active, +.btn.disabled, +.btn[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.btn:active, +.btn.active { + background-color: #cccccc \9; +} +.btn:first-child { + *margin-left: 0; +} +.btn:hover, +.btn:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.btn:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.btn.active, +.btn:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-large { + padding: 11px 19px; + font-size: 16.25px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.btn-large [class^="icon-"], +.btn-large [class*=" icon-"] { + margin-top: 4px; +} +.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-small [class^="icon-"], +.btn-small [class*=" icon-"] { + margin-top: 0; +} +.btn-mini [class^="icon-"], +.btn-mini [class*=" icon-"] { + margin-top: -1px; +} +.btn-mini { + padding: 0px 6px; + font-size: 9.75px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.btn-block { + display: block; + width: 100%; + padding-left: 0; + padding-right: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +.btn-block + .btn-block { + margin-top: 5px; +} +input[type="submit"].btn-block, +input[type="reset"].btn-block, +input[type="button"].btn-block { + width: 100%; +} +.btn-primary.active, +.btn-warning.active, +.btn-danger.active, +.btn-success.active, +.btn-info.active, +.btn-inverse.active { + color: rgba(255, 255, 255, 0.75); +} +.btn-primary { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e75949; + background-image: -moz-linear-gradient(top, #e74949, #e77149); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e77149)); + background-image: -webkit-linear-gradient(top, #e74949, #e77149); + background-image: -o-linear-gradient(top, #e74949, #e77149); + background-image: linear-gradient(to bottom, #e74949, #e77149); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe77149', GradientType=0); + border-color: #e77149 #e77149 #c9461b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e77149; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-primary:hover, +.btn-primary:focus, +.btn-primary:active, +.btn-primary.active, +.btn-primary.disabled, +.btn-primary[disabled] { + color: #ffffff; + background-color: #e77149; + *background-color: #e45f32; +} +.btn-primary:active, +.btn-primary.active { + background-color: #e04e1d \9; +} +.btn-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); + border-color: #f89406 #f89406 #ad6704; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #f89406; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-warning:hover, +.btn-warning:focus, +.btn-warning:active, +.btn-warning.active, +.btn-warning.disabled, +.btn-warning[disabled] { + color: #ffffff; + background-color: #f89406; + *background-color: #df8505; +} +.btn-warning:active, +.btn-warning.active { + background-color: #c67605 \9; +} +.btn-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e43838; + background-image: -moz-linear-gradient(top, #e74949, #e01d1d); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e01d1d)); + background-image: -webkit-linear-gradient(top, #e74949, #e01d1d); + background-image: -o-linear-gradient(top, #e74949, #e01d1d); + background-image: linear-gradient(to bottom, #e74949, #e01d1d); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe01d1d', GradientType=0); + border-color: #e01d1d #e01d1d #9c1515; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e01d1d; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-danger:hover, +.btn-danger:focus, +.btn-danger:active, +.btn-danger.active, +.btn-danger.disabled, +.btn-danger[disabled] { + color: #ffffff; + background-color: #e01d1d; + *background-color: #c91b1b; +} +.btn-danger:active, +.btn-danger.active { + background-color: #b21818 \9; +} +.btn-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #5f8a1d; + background-image: -moz-linear-gradient(top, #6b9b20, #4e7117); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#6b9b20), to(#4e7117)); + background-image: -webkit-linear-gradient(top, #6b9b20, #4e7117); + background-image: -o-linear-gradient(top, #6b9b20, #4e7117); + background-image: linear-gradient(to bottom, #6b9b20, #4e7117); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff6b9b20', endColorstr='#ff4e7117', GradientType=0); + border-color: #4e7117 #4e7117 #22310a; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4e7117; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-success:hover, +.btn-success:focus, +.btn-success:active, +.btn-success.active, +.btn-success.disabled, +.btn-success[disabled] { + color: #ffffff; + background-color: #4e7117; + *background-color: #3f5c13; +} +.btn-success:active, +.btn-success.active { + background-color: #31460f \9; +} +.btn-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #4976e7; + background-image: -moz-linear-gradient(top, #4986e7, #495fe7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4986e7), to(#495fe7)); + background-image: -webkit-linear-gradient(top, #4986e7, #495fe7); + background-image: -o-linear-gradient(top, #4986e7, #495fe7); + background-image: linear-gradient(to bottom, #4986e7, #495fe7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4986e7', endColorstr='#ff495fe7', GradientType=0); + border-color: #495fe7 #495fe7 #1b32c9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #495fe7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-info:hover, +.btn-info:focus, +.btn-info:active, +.btn-info.active, +.btn-info.disabled, +.btn-info[disabled] { + color: #ffffff; + background-color: #495fe7; + *background-color: #324be4; +} +.btn-info:active, +.btn-info.active { + background-color: #1d38e0 \9; +} +.btn-inverse { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #373a42; + background-image: -moz-linear-gradient(top, #40444d, #292b31); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#40444d), to(#292b31)); + background-image: -webkit-linear-gradient(top, #40444d, #292b31); + background-image: -o-linear-gradient(top, #40444d, #292b31); + background-image: linear-gradient(to bottom, #40444d, #292b31); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff40444d', endColorstr='#ff292b31', GradientType=0); + border-color: #292b31 #292b31 #060707; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #292b31; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.btn-inverse:hover, +.btn-inverse:focus, +.btn-inverse:active, +.btn-inverse.active, +.btn-inverse.disabled, +.btn-inverse[disabled] { + color: #ffffff; + background-color: #292b31; + *background-color: #1d1f23; +} +.btn-inverse:active, +.btn-inverse.active { + background-color: #121315 \9; +} +button.btn, +input[type="submit"].btn { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn::-moz-focus-inner, +input[type="submit"].btn::-moz-focus-inner { + padding: 0; + border: 0; +} +button.btn.btn-large, +input[type="submit"].btn.btn-large { + *padding-top: 7px; + *padding-bottom: 7px; +} +button.btn.btn-small, +input[type="submit"].btn.btn-small { + *padding-top: 3px; + *padding-bottom: 3px; +} +button.btn.btn-mini, +input[type="submit"].btn.btn-mini { + *padding-top: 1px; + *padding-bottom: 1px; +} +.btn-link, +.btn-link:active, +.btn-link[disabled] { + background-color: transparent; + background-image: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn-link { + border-color: transparent; + cursor: pointer; + color: #e74949; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-link:hover, +.btn-link:focus { + color: #b21818; + text-decoration: underline; + background-color: transparent; +} +.btn-link[disabled]:hover, +.btn-link[disabled]:focus { + color: #333333; + text-decoration: none; +} +.btn-group { + position: relative; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + font-size: 0; + vertical-align: middle; + white-space: nowrap; + *margin-left: .3em; +} +.btn-group:first-child { + *margin-left: 0; +} +.btn-group + .btn-group { + margin-left: 5px; +} +.btn-toolbar { + font-size: 0; + margin-top: 9px; + margin-bottom: 9px; +} +.btn-toolbar > .btn + .btn, +.btn-toolbar > .btn-group + .btn, +.btn-toolbar > .btn + .btn-group { + margin-left: 5px; +} +.btn-group > .btn { + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn + .btn { + margin-left: -1px; +} +.btn-group > .btn, +.btn-group > .dropdown-menu, +.btn-group > .popover { + font-size: 13px; +} +.btn-group > .btn-mini { + font-size: 9.75px; +} +.btn-group > .btn-small { + font-size: 11.049999999999999px; +} +.btn-group > .btn-large { + font-size: 16.25px; +} +.btn-group > .btn:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.btn-group > .btn:last-child, +.btn-group > .dropdown-toggle { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.btn-group > .btn.large:first-child { + margin-left: 0; + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.btn-group > .btn.large:last-child, +.btn-group > .large.dropdown-toggle { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.btn-group > .btn:hover, +.btn-group > .btn:focus, +.btn-group > .btn:active, +.btn-group > .btn.active { + z-index: 2; +} +.btn-group .dropdown-toggle:active, +.btn-group.open .dropdown-toggle { + outline: 0; +} +.btn-group > .btn + .dropdown-toggle { + padding-left: 8px; + padding-right: 8px; + -webkit-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 1px 0 0 rgba(255,255,255,.125), inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + *padding-top: 5px; + *padding-bottom: 5px; +} +.btn-group > .btn-mini + .dropdown-toggle { + padding-left: 5px; + padding-right: 5px; + *padding-top: 2px; + *padding-bottom: 2px; +} +.btn-group > .btn-small + .dropdown-toggle { + *padding-top: 5px; + *padding-bottom: 4px; +} +.btn-group > .btn-large + .dropdown-toggle { + padding-left: 12px; + padding-right: 12px; + *padding-top: 7px; + *padding-bottom: 7px; +} +.btn-group.open .dropdown-toggle { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn-group.open .btn.dropdown-toggle { + background-color: #e6e6e6; +} +.btn-group.open .btn-primary.dropdown-toggle { + background-color: #e77149; +} +.btn-group.open .btn-warning.dropdown-toggle { + background-color: #f89406; +} +.btn-group.open .btn-danger.dropdown-toggle { + background-color: #e01d1d; +} +.btn-group.open .btn-success.dropdown-toggle { + background-color: #4e7117; +} +.btn-group.open .btn-info.dropdown-toggle { + background-color: #495fe7; +} +.btn-group.open .btn-inverse.dropdown-toggle { + background-color: #292b31; +} +.btn .caret { + margin-top: 8px; + margin-left: 0; +} +.btn-large .caret { + margin-top: 6px; +} +.btn-large .caret { + border-left-width: 5px; + border-right-width: 5px; + border-top-width: 5px; +} +.btn-mini .caret, +.btn-small .caret { + margin-top: 8px; +} +.dropup .btn-large .caret { + border-bottom-width: 5px; +} +.btn-primary .caret, +.btn-warning .caret, +.btn-danger .caret, +.btn-info .caret, +.btn-success .caret, +.btn-inverse .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.btn-group-vertical { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.btn-group-vertical > .btn { + display: block; + float: none; + max-width: 100%; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group-vertical > .btn + .btn { + margin-left: 0; + margin-top: -1px; +} +.btn-group-vertical > .btn:first-child { + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.btn-group-vertical > .btn:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.btn-group-vertical > .btn-large:first-child { + -webkit-border-radius: 6px 6px 0 0; + -moz-border-radius: 6px 6px 0 0; + border-radius: 6px 6px 0 0; +} +.btn-group-vertical > .btn-large:last-child { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.alert { + padding: 8px 35px 8px 14px; + margin-bottom: 18px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + background-color: #fcf8e3; + border: 1px solid #fbeed5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.alert, +.alert h4 { + color: #c09853; +} +.alert h4 { + margin: 0; +} +.alert .close { + position: relative; + top: -2px; + right: -21px; + line-height: 18px; +} +.alert-success { + background-color: #dff0d8; + border-color: #d6e9c6; + color: #468847; +} +.alert-success h4 { + color: #468847; +} +.alert-danger, +.alert-error { + background-color: #f2dede; + border-color: #eed3d7; + color: #b94a48; +} +.alert-danger h4, +.alert-error h4 { + color: #b94a48; +} +.alert-info { + background-color: #d9edf7; + border-color: #bce8f1; + color: #3a87ad; +} +.alert-info h4 { + color: #3a87ad; +} +.alert-block { + padding-top: 14px; + padding-bottom: 14px; +} +.alert-block > p, +.alert-block > ul { + margin-bottom: 0; +} +.alert-block p + p { + margin-top: 5px; +} +.nav { + margin-left: 0; + margin-bottom: 18px; + list-style: none; +} +.nav > li > a { + display: block; +} +.nav > li > a:hover, +.nav > li > a:focus { + text-decoration: none; + background-color: #eeeeee; +} +.nav > li > a > img { + max-width: none; +} +.nav > .pull-right { + float: right; +} +.nav-header { + display: block; + padding: 3px 15px; + font-size: 11px; + font-weight: bold; + line-height: 18px; + color: #999999; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); + text-transform: uppercase; +} +.nav li + .nav-header { + margin-top: 9px; +} +.nav-list { + padding-left: 15px; + padding-right: 15px; + margin-bottom: 0; +} +.nav-list > li > a, +.nav-list .nav-header { + margin-left: -15px; + margin-right: -15px; + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5); +} +.nav-list > li > a { + padding: 3px 15px; +} +.nav-list > .active > a, +.nav-list > .active > a:hover, +.nav-list > .active > a:focus { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.2); + background-color: #e74949; +} +.nav-list [class^="icon-"], +.nav-list [class*=" icon-"] { + margin-right: 2px; +} +.nav-list .divider { + *width: 100%; + height: 1px; + margin: 8px 1px; + *margin: -5px 0 5px; + overflow: hidden; + background-color: #e5e5e5; + border-bottom: 1px solid #ffffff; +} +.nav-tabs, +.nav-pills { + *zoom: 1; +} +.nav-tabs:before, +.nav-pills:before, +.nav-tabs:after, +.nav-pills:after { + display: table; + content: ""; + line-height: 0; +} +.nav-tabs:after, +.nav-pills:after { + clear: both; +} +.nav-tabs > li, +.nav-pills > li { + float: left; +} +.nav-tabs > li > a, +.nav-pills > li > a { + padding-right: 12px; + padding-left: 12px; + margin-right: 2px; + line-height: 14px; +} +.nav-tabs { + border-bottom: 1px solid #ddd; +} +.nav-tabs > li { + margin-bottom: -1px; +} +.nav-tabs > li > a { + padding-top: 8px; + padding-bottom: 8px; + line-height: 18px; + border: 1px solid transparent; + -webkit-border-radius: 4px 4px 0 0; + -moz-border-radius: 4px 4px 0 0; + border-radius: 4px 4px 0 0; +} +.nav-tabs > li > a:hover, +.nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #dddddd; +} +.nav-tabs > .active > a, +.nav-tabs > .active > a:hover, +.nav-tabs > .active > a:focus { + color: #555555; + background-color: #f5f5f5; + border: 1px solid #ddd; + border-bottom-color: transparent; + cursor: default; +} +.nav-pills > li > a { + padding-top: 8px; + padding-bottom: 8px; + margin-top: 2px; + margin-bottom: 2px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.nav-pills > .active > a, +.nav-pills > .active > a:hover, +.nav-pills > .active > a:focus { + color: #ffffff; + background-color: #e74949; +} +.nav-stacked > li { + float: none; +} +.nav-stacked > li > a { + margin-right: 0; +} +.nav-tabs.nav-stacked { + border-bottom: 0; +} +.nav-tabs.nav-stacked > li > a { + border: 1px solid #ddd; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.nav-tabs.nav-stacked > li:first-child > a { + -webkit-border-top-right-radius: 4px; + -moz-border-radius-topright: 4px; + border-top-right-radius: 4px; + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; +} +.nav-tabs.nav-stacked > li:last-child > a { + -webkit-border-bottom-right-radius: 4px; + -moz-border-radius-bottomright: 4px; + border-bottom-right-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.nav-tabs.nav-stacked > li > a:hover, +.nav-tabs.nav-stacked > li > a:focus { + border-color: #ddd; + z-index: 2; +} +.nav-pills.nav-stacked > li > a { + margin-bottom: 3px; +} +.nav-pills.nav-stacked > li:last-child > a { + margin-bottom: 1px; +} +.nav-tabs .dropdown-menu { + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; +} +.nav-pills .dropdown-menu { + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.nav .dropdown-toggle .caret { + border-top-color: #e74949; + border-bottom-color: #e74949; + margin-top: 6px; +} +.nav .dropdown-toggle:hover .caret, +.nav .dropdown-toggle:focus .caret { + border-top-color: #b21818; + border-bottom-color: #b21818; +} +/* move down carets for tabs */ +.nav-tabs .dropdown-toggle .caret { + margin-top: 8px; +} +.nav .active .dropdown-toggle .caret { + border-top-color: #fff; + border-bottom-color: #fff; +} +.nav-tabs .active .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.nav > .dropdown.active > a:hover, +.nav > .dropdown.active > a:focus { + cursor: pointer; +} +.nav-tabs .open .dropdown-toggle, +.nav-pills .open .dropdown-toggle, +.nav > li.dropdown.open.active > a:hover, +.nav > li.dropdown.open.active > a:focus { + color: #ffffff; + background-color: #999999; + border-color: #999999; +} +.nav li.dropdown.open .caret, +.nav li.dropdown.open.active .caret, +.nav li.dropdown.open a:hover .caret, +.nav li.dropdown.open a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; + opacity: 1; + filter: alpha(opacity=100); +} +.tabs-stacked .open > a:hover, +.tabs-stacked .open > a:focus { + border-color: #999999; +} +.tabbable { + *zoom: 1; +} +.tabbable:before, +.tabbable:after { + display: table; + content: ""; + line-height: 0; +} +.tabbable:after { + clear: both; +} +.tab-content { + overflow: auto; +} +.tabs-below > .nav-tabs, +.tabs-right > .nav-tabs, +.tabs-left > .nav-tabs { + border-bottom: 0; +} +.tab-content > .tab-pane, +.pill-content > .pill-pane { + display: none; +} +.tab-content > .active, +.pill-content > .active { + display: block; +} +.tabs-below > .nav-tabs { + border-top: 1px solid #ddd; +} +.tabs-below > .nav-tabs > li { + margin-top: -1px; + margin-bottom: 0; +} +.tabs-below > .nav-tabs > li > a { + -webkit-border-radius: 0 0 4px 4px; + -moz-border-radius: 0 0 4px 4px; + border-radius: 0 0 4px 4px; +} +.tabs-below > .nav-tabs > li > a:hover, +.tabs-below > .nav-tabs > li > a:focus { + border-bottom-color: transparent; + border-top-color: #ddd; +} +.tabs-below > .nav-tabs > .active > a, +.tabs-below > .nav-tabs > .active > a:hover, +.tabs-below > .nav-tabs > .active > a:focus { + border-color: transparent #ddd #ddd #ddd; +} +.tabs-left > .nav-tabs > li, +.tabs-right > .nav-tabs > li { + float: none; +} +.tabs-left > .nav-tabs > li > a, +.tabs-right > .nav-tabs > li > a { + min-width: 74px; + margin-right: 0; + margin-bottom: 3px; +} +.tabs-left > .nav-tabs { + float: left; + margin-right: 19px; + border-right: 1px solid #ddd; +} +.tabs-left > .nav-tabs > li > a { + margin-right: -1px; + -webkit-border-radius: 4px 0 0 4px; + -moz-border-radius: 4px 0 0 4px; + border-radius: 4px 0 0 4px; +} +.tabs-left > .nav-tabs > li > a:hover, +.tabs-left > .nav-tabs > li > a:focus { + border-color: #eeeeee #dddddd #eeeeee #eeeeee; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover, +.tabs-left > .nav-tabs .active > a:focus { + border-color: #ddd transparent #ddd #ddd; + *border-right-color: #ffffff; +} +.tabs-right > .nav-tabs { + float: right; + margin-left: 19px; + border-left: 1px solid #ddd; +} +.tabs-right > .nav-tabs > li > a { + margin-left: -1px; + -webkit-border-radius: 0 4px 4px 0; + -moz-border-radius: 0 4px 4px 0; + border-radius: 0 4px 4px 0; +} +.tabs-right > .nav-tabs > li > a:hover, +.tabs-right > .nav-tabs > li > a:focus { + border-color: #eeeeee #eeeeee #eeeeee #dddddd; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover, +.tabs-right > .nav-tabs .active > a:focus { + border-color: #ddd #ddd #ddd transparent; + *border-left-color: #ffffff; +} +.nav > .disabled > a { + color: #999999; +} +.nav > .disabled > a:hover, +.nav > .disabled > a:focus { + text-decoration: none; + background-color: transparent; + cursor: default; +} +.navbar { + overflow: visible; + margin-bottom: 18px; + *position: relative; + *z-index: 2; +} +.navbar-inner { + min-height: 40px; + padding-left: 20px; + padding-right: 20px; + background-color: #fafafa; + background-image: -moz-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#f2f2f2)); + background-image: -webkit-linear-gradient(top, #ffffff, #f2f2f2); + background-image: -o-linear-gradient(top, #ffffff, #f2f2f2); + background-image: linear-gradient(to bottom, #ffffff, #f2f2f2); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#fff2f2f2', GradientType=0); + border: 1px solid #d4d4d4; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + -moz-box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.065); + *zoom: 1; +} +.navbar-inner:before, +.navbar-inner:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-inner:after { + clear: both; +} +.navbar .container { + width: auto; +} +.nav-collapse.collapse { + height: auto; + overflow: visible; +} +.navbar .brand { + float: left; + display: block; + padding: 11px 20px 11px; + margin-left: -20px; + font-size: 20px; + font-weight: 200; + color: #555555; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .brand:hover, +.navbar .brand:focus { + text-decoration: none; +} +.navbar-text { + margin-bottom: 0; + line-height: 40px; + color: #555555; +} +.navbar-link { + color: #555555; +} +.navbar-link:hover, +.navbar-link:focus { + color: #333333; +} +.navbar .divider-vertical { + height: 40px; + margin: 0 9px; + border-left: 1px solid #f2f2f2; + border-right: 1px solid #ffffff; +} +.navbar .btn, +.navbar .btn-group { + margin-top: 5px; +} +.navbar .btn-group .btn, +.navbar .input-prepend .btn, +.navbar .input-append .btn, +.navbar .input-prepend .btn-group, +.navbar .input-append .btn-group { + margin-top: 0; +} +.navbar-form { + margin-bottom: 0; + *zoom: 1; +} +.navbar-form:before, +.navbar-form:after { + display: table; + content: ""; + line-height: 0; +} +.navbar-form:after { + clear: both; +} +.navbar-form input, +.navbar-form select, +.navbar-form .radio, +.navbar-form .checkbox { + margin-top: 5px; +} +.navbar-form input, +.navbar-form select, +.navbar-form .btn { + display: inline-block; + margin-bottom: 0; +} +.navbar-form input[type="image"], +.navbar-form input[type="checkbox"], +.navbar-form input[type="radio"] { + margin-top: 3px; +} +.navbar-form .input-append, +.navbar-form .input-prepend { + margin-top: 5px; + white-space: nowrap; +} +.navbar-form .input-append input, +.navbar-form .input-prepend input { + margin-top: 0; +} +.navbar-search { + position: relative; + float: left; + margin-top: 5px; + margin-bottom: 0; +} +.navbar-search .search-query { + margin-bottom: 0; + padding: 4px 14px; + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 13px; + font-weight: normal; + line-height: 1; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.navbar-static-top { + position: static; + margin-bottom: 0; +} +.navbar-static-top .navbar-inner { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-fixed-top, +.navbar-fixed-bottom { + position: fixed; + right: 0; + left: 0; + z-index: 1030; + margin-bottom: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + border-width: 0 0 1px; +} +.navbar-fixed-bottom .navbar-inner { + border-width: 1px 0 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-fixed-bottom .navbar-inner { + padding-left: 0; + padding-right: 0; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.navbar-fixed-top { + top: 0; +} +.navbar-fixed-top .navbar-inner, +.navbar-static-top .navbar-inner { + -webkit-box-shadow: 0 1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 1px 10px rgba(0,0,0,.1); + box-shadow: 0 1px 10px rgba(0,0,0,.1); +} +.navbar-fixed-bottom { + bottom: 0; +} +.navbar-fixed-bottom .navbar-inner { + -webkit-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + -moz-box-shadow: 0 -1px 10px rgba(0,0,0,.1); + box-shadow: 0 -1px 10px rgba(0,0,0,.1); +} +.navbar .nav { + position: relative; + left: 0; + display: block; + float: left; + margin: 0 10px 0 0; +} +.navbar .nav.pull-right { + float: right; + margin-right: 0; +} +.navbar .nav > li { + float: left; +} +.navbar .nav > li > a { + float: none; + padding: 11px 15px 11px; + color: #555555; + text-decoration: none; + text-shadow: 0 1px 0 #ffffff; +} +.navbar .nav .dropdown-toggle .caret { + margin-top: 8px; +} +.navbar .nav > li > a:focus, +.navbar .nav > li > a:hover { + background-color: transparent; + color: #333333; + text-decoration: none; +} +.navbar .nav > .active > a, +.navbar .nav > .active > a:hover, +.navbar .nav > .active > a:focus { + color: #555555; + text-decoration: none; + background-color: #e5e5e5; + -webkit-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + -moz-box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); + box-shadow: inset 0 3px 8px rgba(0, 0, 0, 0.125); +} +.navbar .btn-navbar { + display: none; + float: right; + padding: 7px 10px; + margin-left: 5px; + margin-right: 5px; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #ededed; + background-image: -moz-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f2f2f2), to(#e5e5e5)); + background-image: -webkit-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: -o-linear-gradient(top, #f2f2f2, #e5e5e5); + background-image: linear-gradient(to bottom, #f2f2f2, #e5e5e5); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff2f2f2', endColorstr='#ffe5e5e5', GradientType=0); + border-color: #e5e5e5 #e5e5e5 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e5e5e5; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.075); +} +.navbar .btn-navbar:hover, +.navbar .btn-navbar:focus, +.navbar .btn-navbar:active, +.navbar .btn-navbar.active, +.navbar .btn-navbar.disabled, +.navbar .btn-navbar[disabled] { + color: #ffffff; + background-color: #e5e5e5; + *background-color: #d9d9d9; +} +.navbar .btn-navbar:active, +.navbar .btn-navbar.active { + background-color: #cccccc \9; +} +.navbar .btn-navbar .icon-bar { + display: block; + width: 18px; + height: 2px; + background-color: #f5f5f5; + -webkit-border-radius: 1px; + -moz-border-radius: 1px; + border-radius: 1px; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.25); +} +.btn-navbar .icon-bar + .icon-bar { + margin-top: 3px; +} +.navbar .nav > li > .dropdown-menu:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 9px; +} +.navbar .nav > li > .dropdown-menu:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 10px; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:before { + border-top: 7px solid #ccc; + border-top-color: rgba(0, 0, 0, 0.2); + border-bottom: 0; + bottom: -7px; + top: auto; +} +.navbar-fixed-bottom .nav > li > .dropdown-menu:after { + border-top: 6px solid #ffffff; + border-bottom: 0; + bottom: -6px; + top: auto; +} +.navbar .nav li.dropdown > a:hover .caret, +.navbar .nav li.dropdown > a:focus .caret { + border-top-color: #333333; + border-bottom-color: #333333; +} +.navbar .nav li.dropdown.open > .dropdown-toggle, +.navbar .nav li.dropdown.active > .dropdown-toggle, +.navbar .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #e5e5e5; + color: #555555; +} +.navbar .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #555555; + border-bottom-color: #555555; +} +.navbar .pull-right > li > .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right { + left: auto; + right: 0; +} +.navbar .pull-right > li > .dropdown-menu:before, +.navbar .nav > li > .dropdown-menu.pull-right:before { + left: auto; + right: 12px; +} +.navbar .pull-right > li > .dropdown-menu:after, +.navbar .nav > li > .dropdown-menu.pull-right:after { + left: auto; + right: 13px; +} +.navbar .pull-right > li > .dropdown-menu .dropdown-menu, +.navbar .nav > li > .dropdown-menu.pull-right .dropdown-menu { + left: auto; + right: 100%; + margin-left: 0; + margin-right: -1px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} +.navbar-inverse .navbar-inner { + background-color: #1b1b1b; + background-image: -moz-linear-gradient(top, #222222, #111111); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#222222), to(#111111)); + background-image: -webkit-linear-gradient(top, #222222, #111111); + background-image: -o-linear-gradient(top, #222222, #111111); + background-image: linear-gradient(to bottom, #222222, #111111); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff222222', endColorstr='#ff111111', GradientType=0); + border-color: #252525; +} +.navbar-inverse .brand, +.navbar-inverse .nav > li > a { + color: #999999; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.navbar-inverse .brand:hover, +.navbar-inverse .nav > li > a:hover, +.navbar-inverse .brand:focus, +.navbar-inverse .nav > li > a:focus { + color: #ffffff; +} +.navbar-inverse .brand { + color: #999999; +} +.navbar-inverse .navbar-text { + color: #999999; +} +.navbar-inverse .nav > li > a:focus, +.navbar-inverse .nav > li > a:hover { + background-color: transparent; + color: #ffffff; +} +.navbar-inverse .nav .active > a, +.navbar-inverse .nav .active > a:hover, +.navbar-inverse .nav .active > a:focus { + color: #ffffff; + background-color: #111111; +} +.navbar-inverse .navbar-link { + color: #999999; +} +.navbar-inverse .navbar-link:hover, +.navbar-inverse .navbar-link:focus { + color: #ffffff; +} +.navbar-inverse .divider-vertical { + border-left-color: #111111; + border-right-color: #222222; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle { + background-color: #111111; + color: #ffffff; +} +.navbar-inverse .nav li.dropdown > a:hover .caret, +.navbar-inverse .nav li.dropdown > a:focus .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .nav li.dropdown > .dropdown-toggle .caret { + border-top-color: #999999; + border-bottom-color: #999999; +} +.navbar-inverse .nav li.dropdown.open > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.active > .dropdown-toggle .caret, +.navbar-inverse .nav li.dropdown.open.active > .dropdown-toggle .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.navbar-inverse .navbar-search .search-query { + color: #ffffff; + background-color: #515151; + border-color: #111111; + -webkit-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -moz-box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + box-shadow: inset 0 1px 2px rgba(0,0,0,.1), 0 1px 0 rgba(255,255,255,.15); + -webkit-transition: none; + -moz-transition: none; + -o-transition: none; + transition: none; +} +.navbar-inverse .navbar-search .search-query:-moz-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:-ms-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query::-webkit-input-placeholder { + color: #cccccc; +} +.navbar-inverse .navbar-search .search-query:focus, +.navbar-inverse .navbar-search .search-query.focused { + padding: 5px 15px; + color: #333333; + text-shadow: 0 1px 0 #ffffff; + background-color: #ffffff; + border: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + outline: 0; +} +.navbar-inverse .btn-navbar { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e0e0e; + background-image: -moz-linear-gradient(top, #151515, #040404); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#151515), to(#040404)); + background-image: -webkit-linear-gradient(top, #151515, #040404); + background-image: -o-linear-gradient(top, #151515, #040404); + background-image: linear-gradient(to bottom, #151515, #040404); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff151515', endColorstr='#ff040404', GradientType=0); + border-color: #040404 #040404 #000000; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #040404; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.navbar-inverse .btn-navbar:hover, +.navbar-inverse .btn-navbar:focus, +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active, +.navbar-inverse .btn-navbar.disabled, +.navbar-inverse .btn-navbar[disabled] { + color: #ffffff; + background-color: #040404; + *background-color: #000000; +} +.navbar-inverse .btn-navbar:active, +.navbar-inverse .btn-navbar.active { + background-color: #000000 \9; +} +.breadcrumb { + padding: 8px 15px; + margin: 0 0 18px; + list-style: none; + background-color: #f5f5f5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.breadcrumb > li { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + text-shadow: 0 1px 0 #ffffff; +} +.breadcrumb > li > .divider { + padding: 0 5px; + color: #ccc; +} +.breadcrumb > .active { + color: #999999; +} +.pagination { + margin: 18px 0; +} +.pagination ul { + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + margin-left: 0; + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.pagination ul > li { + display: inline; +} +.pagination ul > li > a, +.pagination ul > li > span { + float: left; + padding: 4px 12px; + line-height: 18px; + text-decoration: none; + background-color: #ffffff; + border: 1px solid #dddddd; + border-left-width: 0; +} +.pagination ul > li > a:hover, +.pagination ul > li > a:focus, +.pagination ul > .active > a, +.pagination ul > .active > span { + background-color: #f5f5f5; +} +.pagination ul > .active > a, +.pagination ul > .active > span { + color: #999999; + cursor: default; +} +.pagination ul > .disabled > span, +.pagination ul > .disabled > a, +.pagination ul > .disabled > a:hover, +.pagination ul > .disabled > a:focus { + color: #999999; + background-color: transparent; + cursor: default; +} +.pagination ul > li:first-child > a, +.pagination ul > li:first-child > span { + border-left-width: 1px; + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination ul > li:last-child > a, +.pagination ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-centered { + text-align: center; +} +.pagination-right { + text-align: right; +} +.pagination-large ul > li > a, +.pagination-large ul > li > span { + padding: 11px 19px; + font-size: 16.25px; +} +.pagination-large ul > li:first-child > a, +.pagination-large ul > li:first-child > span { + -webkit-border-top-left-radius: 6px; + -moz-border-radius-topleft: 6px; + border-top-left-radius: 6px; + -webkit-border-bottom-left-radius: 6px; + -moz-border-radius-bottomleft: 6px; + border-bottom-left-radius: 6px; +} +.pagination-large ul > li:last-child > a, +.pagination-large ul > li:last-child > span { + -webkit-border-top-right-radius: 6px; + -moz-border-radius-topright: 6px; + border-top-right-radius: 6px; + -webkit-border-bottom-right-radius: 6px; + -moz-border-radius-bottomright: 6px; + border-bottom-right-radius: 6px; +} +.pagination-mini ul > li:first-child > a, +.pagination-small ul > li:first-child > a, +.pagination-mini ul > li:first-child > span, +.pagination-small ul > li:first-child > span { + -webkit-border-top-left-radius: 3px; + -moz-border-radius-topleft: 3px; + border-top-left-radius: 3px; + -webkit-border-bottom-left-radius: 3px; + -moz-border-radius-bottomleft: 3px; + border-bottom-left-radius: 3px; +} +.pagination-mini ul > li:last-child > a, +.pagination-small ul > li:last-child > a, +.pagination-mini ul > li:last-child > span, +.pagination-small ul > li:last-child > span { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.pagination-small ul > li > a, +.pagination-small ul > li > span { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.pagination-mini ul > li > a, +.pagination-mini ul > li > span { + padding: 0px 6px; + font-size: 9.75px; +} +.pager { + margin: 18px 0; + list-style: none; + text-align: center; + *zoom: 1; +} +.pager:before, +.pager:after { + display: table; + content: ""; + line-height: 0; +} +.pager:after { + clear: both; +} +.pager li { + display: inline; +} +.pager li > a, +.pager li > span { + display: inline-block; + padding: 5px 14px; + background-color: #fff; + border: 1px solid #ddd; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +.pager li > a:hover, +.pager li > a:focus { + text-decoration: none; + background-color: #f5f5f5; +} +.pager .next > a, +.pager .next > span { + float: right; +} +.pager .previous > a, +.pager .previous > span { + float: left; +} +.pager .disabled > a, +.pager .disabled > a:hover, +.pager .disabled > a:focus, +.pager .disabled > span { + color: #999999; + background-color: #fff; + cursor: default; +} +.modal-backdrop { + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1040; + background-color: #000000; +} +.modal-backdrop.fade { + opacity: 0; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.modal { + position: fixed; + top: 10%; + left: 50%; + z-index: 1050; + width: 560px; + margin-left: -280px; + background-color: #ffffff; + border: 1px solid #999; + border: 1px solid rgba(0, 0, 0, 0.3); + *border: 1px solid #999; + /* IE6-7 */ + + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -moz-box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + box-shadow: 0 3px 7px rgba(0, 0, 0, 0.3); + -webkit-background-clip: padding-box; + -moz-background-clip: padding-box; + background-clip: padding-box; + outline: none; +} +.modal.fade { + -webkit-transition: opacity .3s linear, top .3s ease-out; + -moz-transition: opacity .3s linear, top .3s ease-out; + -o-transition: opacity .3s linear, top .3s ease-out; + transition: opacity .3s linear, top .3s ease-out; + top: -25%; +} +.modal.fade.in { + top: 10%; +} +.modal-header { + padding: 9px 15px; + border-bottom: 1px solid #eee; +} +.modal-header .close { + margin-top: 2px; +} +.modal-header h3 { + margin: 0; + line-height: 30px; +} +.modal-body { + position: relative; + overflow-y: auto; + max-height: 400px; + padding: 15px; +} +.modal-form { + margin-bottom: 0; +} +.modal-footer { + padding: 14px 15px 15px; + margin-bottom: 0; + text-align: right; + background-color: #f5f5f5; + border-top: 1px solid #ddd; + -webkit-border-radius: 0 0 6px 6px; + -moz-border-radius: 0 0 6px 6px; + border-radius: 0 0 6px 6px; + -webkit-box-shadow: inset 0 1px 0 #ffffff; + -moz-box-shadow: inset 0 1px 0 #ffffff; + box-shadow: inset 0 1px 0 #ffffff; + *zoom: 1; +} +.modal-footer:before, +.modal-footer:after { + display: table; + content: ""; + line-height: 0; +} +.modal-footer:after { + clear: both; +} +.modal-footer .btn + .btn { + margin-left: 5px; + margin-bottom: 0; +} +.modal-footer .btn-group .btn + .btn { + margin-left: -1px; +} +.modal-footer .btn-block + .btn-block { + margin-left: 0; +} +.tooltip { + position: absolute; + z-index: 1030; + display: block; + visibility: visible; + font-size: 11px; + line-height: 1.4; + opacity: 0; + filter: alpha(opacity=0); +} +.tooltip.in { + opacity: 0.8; + filter: alpha(opacity=80); +} +.tooltip.top { + margin-top: -3px; + padding: 5px 0; +} +.tooltip.right { + margin-left: 3px; + padding: 0 5px; +} +.tooltip.bottom { + margin-top: 3px; + padding: 5px 0; +} +.tooltip.left { + margin-left: -3px; + padding: 0 5px; +} +.tooltip-inner { + max-width: 200px; + padding: 8px; + color: #ffffff; + text-align: center; + text-decoration: none; + background-color: #000000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.tooltip-arrow { + position: absolute; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.tooltip.top .tooltip-arrow { + bottom: 0; + left: 50%; + margin-left: -5px; + border-width: 5px 5px 0; + border-top-color: #000000; +} +.tooltip.right .tooltip-arrow { + top: 50%; + left: 0; + margin-top: -5px; + border-width: 5px 5px 5px 0; + border-right-color: #000000; +} +.tooltip.left .tooltip-arrow { + top: 50%; + right: 0; + margin-top: -5px; + border-width: 5px 0 5px 5px; + border-left-color: #000000; +} +.tooltip.bottom .tooltip-arrow { + top: 0; + left: 50%; + margin-left: -5px; + border-width: 0 5px 5px; + border-bottom-color: #000000; +} +.popover { + position: absolute; + top: 0; + left: 0; + z-index: 1010; + display: none; + max-width: 276px; + padding: 1px; + text-align: left; + background-color: #ffffff; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + border: 1px solid #ccc; + border: 1px solid rgba(0, 0, 0, 0.2); + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2); + white-space: normal; +} +.popover.top { + margin-top: -10px; +} +.popover.right { + margin-left: 10px; +} +.popover.bottom { + margin-top: 10px; +} +.popover.left { + margin-left: -10px; +} +.popover-title { + margin: 0; + padding: 8px 14px; + font-size: 14px; + font-weight: normal; + line-height: 18px; + background-color: #f7f7f7; + border-bottom: 1px solid #ebebeb; + -webkit-border-radius: 5px 5px 0 0; + -moz-border-radius: 5px 5px 0 0; + border-radius: 5px 5px 0 0; +} +.popover-title:empty { + display: none; +} +.popover-content { + padding: 9px 14px; +} +.popover .arrow, +.popover .arrow:after { + position: absolute; + display: block; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; +} +.popover .arrow { + border-width: 11px; +} +.popover .arrow:after { + border-width: 10px; + content: ""; +} +.popover.top .arrow { + left: 50%; + margin-left: -11px; + border-bottom-width: 0; + border-top-color: #999; + border-top-color: rgba(0, 0, 0, 0.25); + bottom: -11px; +} +.popover.top .arrow:after { + bottom: 1px; + margin-left: -10px; + border-bottom-width: 0; + border-top-color: #ffffff; +} +.popover.right .arrow { + top: 50%; + left: -11px; + margin-top: -11px; + border-left-width: 0; + border-right-color: #999; + border-right-color: rgba(0, 0, 0, 0.25); +} +.popover.right .arrow:after { + left: 1px; + bottom: -10px; + border-left-width: 0; + border-right-color: #ffffff; +} +.popover.bottom .arrow { + left: 50%; + margin-left: -11px; + border-top-width: 0; + border-bottom-color: #999; + border-bottom-color: rgba(0, 0, 0, 0.25); + top: -11px; +} +.popover.bottom .arrow:after { + top: 1px; + margin-left: -10px; + border-top-width: 0; + border-bottom-color: #ffffff; +} +.popover.left .arrow { + top: 50%; + right: -11px; + margin-top: -11px; + border-right-width: 0; + border-left-color: #999; + border-left-color: rgba(0, 0, 0, 0.25); +} +.popover.left .arrow:after { + right: 1px; + border-right-width: 0; + border-left-color: #ffffff; + bottom: -10px; +} +.thumbnails { + margin-left: -20px; + list-style: none; + *zoom: 1; +} +.thumbnails:before, +.thumbnails:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails:after { + clear: both; +} +.row-fluid .thumbnails { + margin-left: 0; +} +.thumbnails > li { + float: left; + margin-bottom: 18px; + margin-left: 20px; +} +.thumbnail { + display: block; + padding: 4px; + line-height: 18px; + border: 1px solid #ddd; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -moz-box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + box-shadow: 0 1px 3px rgba(0, 0, 0, 0.055); + -webkit-transition: all 0.2s ease-in-out; + -moz-transition: all 0.2s ease-in-out; + -o-transition: all 0.2s ease-in-out; + transition: all 0.2s ease-in-out; +} +a.thumbnail:hover, +a.thumbnail:focus { + border-color: #e74949; + -webkit-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + -moz-box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); + box-shadow: 0 1px 4px rgba(0, 105, 214, 0.25); +} +.thumbnail > img { + display: block; + max-width: 100%; + margin-left: auto; + margin-right: auto; +} +.thumbnail .caption { + padding: 9px; + color: #555555; +} +.label, +.badge { + display: inline-block; + padding: 2px 4px; + font-size: 10.998px; + font-weight: bold; + line-height: 14px; + color: #ffffff; + vertical-align: baseline; + white-space: nowrap; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #999999; +} +.label { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.badge { + padding-left: 9px; + padding-right: 9px; + -webkit-border-radius: 9px; + -moz-border-radius: 9px; + border-radius: 9px; +} +.label:empty, +.badge:empty { + display: none; +} +a.label:hover, +a.label:focus, +a.badge:hover, +a.badge:focus { + color: #ffffff; + text-decoration: none; + cursor: pointer; +} +.label-important, +.badge-important { + background-color: #b94a48; +} +.label-important[href], +.badge-important[href] { + background-color: #953b39; +} +.label-warning, +.badge-warning { + background-color: #f89406; +} +.label-warning[href], +.badge-warning[href] { + background-color: #c67605; +} +.label-success, +.badge-success { + background-color: #468847; +} +.label-success[href], +.badge-success[href] { + background-color: #356635; +} +.label-info, +.badge-info { + background-color: #3a87ad; +} +.label-info[href], +.badge-info[href] { + background-color: #2d6987; +} +.label-inverse, +.badge-inverse { + background-color: #333333; +} +.label-inverse[href], +.badge-inverse[href] { + background-color: #1a1a1a; +} +.btn .label, +.btn .badge { + position: relative; + top: -1px; +} +.btn-mini .label, +.btn-mini .badge { + top: 0; +} +@-webkit-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-moz-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-ms-keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +@-o-keyframes progress-bar-stripes { + from { + background-position: 0 0; + } + to { + background-position: 40px 0; + } +} +@keyframes progress-bar-stripes { + from { + background-position: 40px 0; + } + to { + background-position: 0 0; + } +} +.progress { + overflow: hidden; + height: 18px; + margin-bottom: 18px; + background-color: #f7f7f7; + background-image: -moz-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f5f5f5), to(#f9f9f9)); + background-image: -webkit-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: -o-linear-gradient(top, #f5f5f5, #f9f9f9); + background-image: linear-gradient(to bottom, #f5f5f5, #f9f9f9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff5f5f5', endColorstr='#fff9f9f9', GradientType=0); + -webkit-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.progress .bar { + width: 0%; + height: 100%; + color: #ffffff; + float: left; + font-size: 12px; + text-align: center; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #0e90d2; + background-image: -moz-linear-gradient(top, #149bdf, #0480be); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#149bdf), to(#0480be)); + background-image: -webkit-linear-gradient(top, #149bdf, #0480be); + background-image: -o-linear-gradient(top, #149bdf, #0480be); + background-image: linear-gradient(to bottom, #149bdf, #0480be); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff149bdf', endColorstr='#ff0480be', GradientType=0); + -webkit-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -moz-box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.15); + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-transition: width 0.6s ease; + -moz-transition: width 0.6s ease; + -o-transition: width 0.6s ease; + transition: width 0.6s ease; +} +.progress .bar + .bar { + -webkit-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + -moz-box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); + box-shadow: inset 1px 0 0 rgba(0,0,0,.15), inset 0 -1px 0 rgba(0,0,0,.15); +} +.progress-striped .bar { + background-color: #149bdf; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + -webkit-background-size: 40px 40px; + -moz-background-size: 40px 40px; + -o-background-size: 40px 40px; + background-size: 40px 40px; +} +.progress.active .bar { + -webkit-animation: progress-bar-stripes 2s linear infinite; + -moz-animation: progress-bar-stripes 2s linear infinite; + -ms-animation: progress-bar-stripes 2s linear infinite; + -o-animation: progress-bar-stripes 2s linear infinite; + animation: progress-bar-stripes 2s linear infinite; +} +.progress-danger .bar, +.progress .bar-danger { + background-color: #dd514c; + background-image: -moz-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ee5f5b), to(#c43c35)); + background-image: -webkit-linear-gradient(top, #ee5f5b, #c43c35); + background-image: -o-linear-gradient(top, #ee5f5b, #c43c35); + background-image: linear-gradient(to bottom, #ee5f5b, #c43c35); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffee5f5b', endColorstr='#ffc43c35', GradientType=0); +} +.progress-danger.progress-striped .bar, +.progress-striped .bar-danger { + background-color: #ee5f5b; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-success .bar, +.progress .bar-success { + background-color: #5eb95e; + background-image: -moz-linear-gradient(top, #62c462, #57a957); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#62c462), to(#57a957)); + background-image: -webkit-linear-gradient(top, #62c462, #57a957); + background-image: -o-linear-gradient(top, #62c462, #57a957); + background-image: linear-gradient(to bottom, #62c462, #57a957); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff62c462', endColorstr='#ff57a957', GradientType=0); +} +.progress-success.progress-striped .bar, +.progress-striped .bar-success { + background-color: #62c462; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-info .bar, +.progress .bar-info { + background-color: #4bb1cf; + background-image: -moz-linear-gradient(top, #5bc0de, #339bb9); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#5bc0de), to(#339bb9)); + background-image: -webkit-linear-gradient(top, #5bc0de, #339bb9); + background-image: -o-linear-gradient(top, #5bc0de, #339bb9); + background-image: linear-gradient(to bottom, #5bc0de, #339bb9); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff5bc0de', endColorstr='#ff339bb9', GradientType=0); +} +.progress-info.progress-striped .bar, +.progress-striped .bar-info { + background-color: #5bc0de; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.progress-warning .bar, +.progress .bar-warning { + background-color: #faa732; + background-image: -moz-linear-gradient(top, #fbb450, #f89406); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#fbb450), to(#f89406)); + background-image: -webkit-linear-gradient(top, #fbb450, #f89406); + background-image: -o-linear-gradient(top, #fbb450, #f89406); + background-image: linear-gradient(to bottom, #fbb450, #f89406); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fffbb450', endColorstr='#fff89406', GradientType=0); +} +.progress-warning.progress-striped .bar, +.progress-striped .bar-warning { + background-color: #fbb450; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +.media, +.media-body { + overflow: hidden; + *overflow: visible; + zoom: 1; +} +.media, +.media .media { + margin-top: 15px; +} +.media:first-child { + margin-top: 0; +} +.media-object { + display: block; +} +.media-heading { + margin: 0 0 5px; +} +.media > .pull-left { + margin-right: 10px; +} +.media > .pull-right { + margin-left: 10px; +} +.media-list { + margin-left: 0; + list-style: none; +} +.accordion { + margin-bottom: 18px; +} +.accordion-group { + margin-bottom: 2px; + border: 1px solid #e5e5e5; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.accordion-heading { + border-bottom: 0; +} +.accordion-heading .accordion-toggle { + display: block; + padding: 8px 15px; +} +.accordion-toggle { + cursor: pointer; +} +.accordion-inner { + padding: 9px 15px; + border-top: 1px solid #e5e5e5; +} +.carousel { + position: relative; + margin-bottom: 18px; + line-height: 1; +} +.carousel-inner { + overflow: hidden; + width: 100%; + position: relative; +} +.carousel-inner > .item { + display: none; + position: relative; + -webkit-transition: 0.6s ease-in-out left; + -moz-transition: 0.6s ease-in-out left; + -o-transition: 0.6s ease-in-out left; + transition: 0.6s ease-in-out left; +} +.carousel-inner > .item > img, +.carousel-inner > .item > a > img { + display: block; + line-height: 1; +} +.carousel-inner > .active, +.carousel-inner > .next, +.carousel-inner > .prev { + display: block; +} +.carousel-inner > .active { + left: 0; +} +.carousel-inner > .next, +.carousel-inner > .prev { + position: absolute; + top: 0; + width: 100%; +} +.carousel-inner > .next { + left: 100%; +} +.carousel-inner > .prev { + left: -100%; +} +.carousel-inner > .next.left, +.carousel-inner > .prev.right { + left: 0; +} +.carousel-inner > .active.left { + left: -100%; +} +.carousel-inner > .active.right { + left: 100%; +} +.carousel-control { + position: absolute; + top: 40%; + left: 15px; + width: 40px; + height: 40px; + margin-top: -20px; + font-size: 60px; + font-weight: 100; + line-height: 30px; + color: #ffffff; + text-align: center; + background: #222222; + border: 3px solid #ffffff; + -webkit-border-radius: 23px; + -moz-border-radius: 23px; + border-radius: 23px; + opacity: 0.5; + filter: alpha(opacity=50); +} +.carousel-control.right { + left: auto; + right: 15px; +} +.carousel-control:hover, +.carousel-control:focus { + color: #ffffff; + text-decoration: none; + opacity: 0.9; + filter: alpha(opacity=90); +} +.carousel-indicators { + position: absolute; + top: 15px; + right: 15px; + z-index: 5; + margin: 0; + list-style: none; +} +.carousel-indicators li { + display: block; + float: left; + width: 10px; + height: 10px; + margin-left: 5px; + text-indent: -999px; + background-color: #ccc; + background-color: rgba(255, 255, 255, 0.25); + border-radius: 5px; +} +.carousel-indicators .active { + background-color: #fff; +} +.carousel-caption { + position: absolute; + left: 0; + right: 0; + bottom: 0; + padding: 15px; + background: #333333; + background: rgba(0, 0, 0, 0.75); +} +.carousel-caption h4, +.carousel-caption p { + color: #ffffff; + line-height: 18px; +} +.carousel-caption h4 { + margin: 0 0 5px; +} +.carousel-caption p { + margin-bottom: 0; +} +.hero-unit { + padding: 60px; + margin-bottom: 30px; + font-size: 18px; + font-weight: 200; + line-height: 27px; + color: #cccccc; + background-color: #40444d; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.hero-unit h1 { + margin-bottom: 0; + font-size: 60px; + line-height: 1; + color: #ffffff; + letter-spacing: -1px; +} +.hero-unit li { + line-height: 27px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +.hide { + display: none; +} +.show { + display: block; +} +.invisible { + visibility: hidden; +} +.affix { + position: fixed; +} +@media (max-width: 767px) { + body { + padding-left: 20px; + padding-right: 20px; + } + .navbar-fixed-top, + .navbar-fixed-bottom, + .navbar-static-top { + margin-left: -20px; + margin-right: -20px; + } + .container-fluid { + padding: 0; + } + .dl-horizontal dt { + float: none; + clear: none; + width: auto; + text-align: left; + } + .dl-horizontal dd { + margin-left: 0; + } + .container { + width: auto; + } + .row-fluid { + width: 100%; + } + .row, + .thumbnails { + margin-left: 0; + } + .thumbnails > li { + float: none; + margin-left: 0; + } + [class*="span"], + .uneditable-input[class*="span"], + .row-fluid [class*="span"] { + float: none; + display: block; + width: 100%; + margin-left: 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .span12, + .row-fluid .span12 { + width: 100%; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .row-fluid [class*="offset"]:first-child { + margin-left: 0; + } + .input-large, + .input-xlarge, + .input-xxlarge, + input[class*="span"], + select[class*="span"], + textarea[class*="span"], + .uneditable-input { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + } + .input-prepend input, + .input-append input, + .input-prepend input[class*="span"], + .input-append input[class*="span"] { + display: inline-block; + width: auto; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 0; + } + .modal { + position: fixed; + top: 20px; + left: 20px; + right: 20px; + width: auto; + margin: 0; + } + .modal.fade { + top: -100px; + } + .modal.fade.in { + top: 20px; + } +} +@media (max-width: 480px) { + .nav-collapse { + -webkit-transform: translate3d(0, 0, 0); + } + .page-header h1 small { + display: block; + line-height: 18px; + } + input[type="checkbox"], + input[type="radio"] { + border: 1px solid #ccc; + } + .form-horizontal .control-label { + float: none; + width: auto; + padding-top: 0; + text-align: left; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .control-list { + padding-top: 0; + } + .form-horizontal .form-actions { + padding-left: 10px; + padding-right: 10px; + } + .media .pull-left, + .media .pull-right { + float: none; + display: block; + margin-bottom: 10px; + } + .media-object { + margin-right: 0; + margin-left: 0; + } + .modal { + top: 10px; + left: 10px; + right: 10px; + } + .modal-header .close { + padding: 10px; + margin: -10px; + } + .carousel-caption { + position: static; + } +} +@media (min-width: 768px) and (max-width: 979px) { + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 724px; + } + .span12 { + width: 724px; + } + .span11 { + width: 662px; + } + .span10 { + width: 600px; + } + .span9 { + width: 538px; + } + .span8 { + width: 476px; + } + .span7 { + width: 414px; + } + .span6 { + width: 352px; + } + .span5 { + width: 290px; + } + .span4 { + width: 228px; + } + .span3 { + width: 166px; + } + .span2 { + width: 104px; + } + .span1 { + width: 42px; + } + .offset12 { + margin-left: 764px; + } + .offset11 { + margin-left: 702px; + } + .offset10 { + margin-left: 640px; + } + .offset9 { + margin-left: 578px; + } + .offset8 { + margin-left: 516px; + } + .offset7 { + margin-left: 454px; + } + .offset6 { + margin-left: 392px; + } + .offset5 { + margin-left: 330px; + } + .offset4 { + margin-left: 268px; + } + .offset3 { + margin-left: 206px; + } + .offset2 { + margin-left: 144px; + } + .offset1 { + margin-left: 82px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.7624309392265194%; + *margin-left: 2.709239449864817%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.7624309392265194%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.43646408839778%; + *width: 91.38327259903608%; + } + .row-fluid .span10 { + width: 82.87292817679558%; + *width: 82.81973668743387%; + } + .row-fluid .span9 { + width: 74.30939226519337%; + *width: 74.25620077583166%; + } + .row-fluid .span8 { + width: 65.74585635359117%; + *width: 65.69266486422946%; + } + .row-fluid .span7 { + width: 57.18232044198895%; + *width: 57.12912895262725%; + } + .row-fluid .span6 { + width: 48.61878453038674%; + *width: 48.56559304102504%; + } + .row-fluid .span5 { + width: 40.05524861878453%; + *width: 40.00205712942283%; + } + .row-fluid .span4 { + width: 31.491712707182323%; + *width: 31.43852121782062%; + } + .row-fluid .span3 { + width: 22.92817679558011%; + *width: 22.87498530621841%; + } + .row-fluid .span2 { + width: 14.3646408839779%; + *width: 14.311449394616199%; + } + .row-fluid .span1 { + width: 5.801104972375691%; + *width: 5.747913483013988%; + } + .row-fluid .offset12 { + margin-left: 105.52486187845304%; + *margin-left: 105.41847889972962%; + } + .row-fluid .offset12:first-child { + margin-left: 102.76243093922652%; + *margin-left: 102.6560479605031%; + } + .row-fluid .offset11 { + margin-left: 96.96132596685082%; + *margin-left: 96.8549429881274%; + } + .row-fluid .offset11:first-child { + margin-left: 94.1988950276243%; + *margin-left: 94.09251204890089%; + } + .row-fluid .offset10 { + margin-left: 88.39779005524862%; + *margin-left: 88.2914070765252%; + } + .row-fluid .offset10:first-child { + margin-left: 85.6353591160221%; + *margin-left: 85.52897613729868%; + } + .row-fluid .offset9 { + margin-left: 79.8342541436464%; + *margin-left: 79.72787116492299%; + } + .row-fluid .offset9:first-child { + margin-left: 77.07182320441989%; + *margin-left: 76.96544022569647%; + } + .row-fluid .offset8 { + margin-left: 71.2707182320442%; + *margin-left: 71.16433525332079%; + } + .row-fluid .offset8:first-child { + margin-left: 68.50828729281768%; + *margin-left: 68.40190431409427%; + } + .row-fluid .offset7 { + margin-left: 62.70718232044199%; + *margin-left: 62.600799341718584%; + } + .row-fluid .offset7:first-child { + margin-left: 59.94475138121547%; + *margin-left: 59.838368402492065%; + } + .row-fluid .offset6 { + margin-left: 54.14364640883978%; + *margin-left: 54.037263430116376%; + } + .row-fluid .offset6:first-child { + margin-left: 51.38121546961326%; + *margin-left: 51.27483249088986%; + } + .row-fluid .offset5 { + margin-left: 45.58011049723757%; + *margin-left: 45.47372751851417%; + } + .row-fluid .offset5:first-child { + margin-left: 42.81767955801105%; + *margin-left: 42.71129657928765%; + } + .row-fluid .offset4 { + margin-left: 37.01657458563536%; + *margin-left: 36.91019160691196%; + } + .row-fluid .offset4:first-child { + margin-left: 34.25414364640884%; + *margin-left: 34.14776066768544%; + } + .row-fluid .offset3 { + margin-left: 28.45303867403315%; + *margin-left: 28.346655695309746%; + } + .row-fluid .offset3:first-child { + margin-left: 25.69060773480663%; + *margin-left: 25.584224756083227%; + } + .row-fluid .offset2 { + margin-left: 19.88950276243094%; + *margin-left: 19.783119783707537%; + } + .row-fluid .offset2:first-child { + margin-left: 17.12707182320442%; + *margin-left: 17.02068884448102%; + } + .row-fluid .offset1 { + margin-left: 11.32596685082873%; + *margin-left: 11.219583872105325%; + } + .row-fluid .offset1:first-child { + margin-left: 8.56353591160221%; + *margin-left: 8.457152932878806%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 20px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 710px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 648px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 586px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 524px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 462px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 400px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 338px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 276px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 214px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 152px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 90px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 28px; + } +} +@media (min-width: 1200px) { + .row { + margin-left: -30px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 30px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 1170px; + } + .span12 { + width: 1170px; + } + .span11 { + width: 1070px; + } + .span10 { + width: 970px; + } + .span9 { + width: 870px; + } + .span8 { + width: 770px; + } + .span7 { + width: 670px; + } + .span6 { + width: 570px; + } + .span5 { + width: 470px; + } + .span4 { + width: 370px; + } + .span3 { + width: 270px; + } + .span2 { + width: 170px; + } + .span1 { + width: 70px; + } + .offset12 { + margin-left: 1230px; + } + .offset11 { + margin-left: 1130px; + } + .offset10 { + margin-left: 1030px; + } + .offset9 { + margin-left: 930px; + } + .offset8 { + margin-left: 830px; + } + .offset7 { + margin-left: 730px; + } + .offset6 { + margin-left: 630px; + } + .offset5 { + margin-left: 530px; + } + .offset4 { + margin-left: 430px; + } + .offset3 { + margin-left: 330px; + } + .offset2 { + margin-left: 230px; + } + .offset1 { + margin-left: 130px; + } + .row-fluid { + width: 100%; + *zoom: 1; + } + .row-fluid:before, + .row-fluid:after { + display: table; + content: ""; + line-height: 0; + } + .row-fluid:after { + clear: both; + } + .row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.564102564102564%; + *margin-left: 2.5109110747408616%; + } + .row-fluid [class*="span"]:first-child { + margin-left: 0; + } + .row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.564102564102564%; + } + .row-fluid .span12 { + width: 100%; + *width: 99.94680851063829%; + } + .row-fluid .span11 { + width: 91.45299145299145%; + *width: 91.39979996362975%; + } + .row-fluid .span10 { + width: 82.90598290598291%; + *width: 82.8527914166212%; + } + .row-fluid .span9 { + width: 74.35897435897436%; + *width: 74.30578286961266%; + } + .row-fluid .span8 { + width: 65.81196581196582%; + *width: 65.75877432260411%; + } + .row-fluid .span7 { + width: 57.26495726495726%; + *width: 57.21176577559556%; + } + .row-fluid .span6 { + width: 48.717948717948715%; + *width: 48.664757228587014%; + } + .row-fluid .span5 { + width: 40.17094017094017%; + *width: 40.11774868157847%; + } + .row-fluid .span4 { + width: 31.623931623931625%; + *width: 31.570740134569924%; + } + .row-fluid .span3 { + width: 23.076923076923077%; + *width: 23.023731587561375%; + } + .row-fluid .span2 { + width: 14.52991452991453%; + *width: 14.476723040552828%; + } + .row-fluid .span1 { + width: 5.982905982905983%; + *width: 5.929714493544281%; + } + .row-fluid .offset12 { + margin-left: 105.12820512820512%; + *margin-left: 105.02182214948171%; + } + .row-fluid .offset12:first-child { + margin-left: 102.56410256410257%; + *margin-left: 102.45771958537915%; + } + .row-fluid .offset11 { + margin-left: 96.58119658119658%; + *margin-left: 96.47481360247316%; + } + .row-fluid .offset11:first-child { + margin-left: 94.01709401709402%; + *margin-left: 93.91071103837061%; + } + .row-fluid .offset10 { + margin-left: 88.03418803418803%; + *margin-left: 87.92780505546462%; + } + .row-fluid .offset10:first-child { + margin-left: 85.47008547008548%; + *margin-left: 85.36370249136206%; + } + .row-fluid .offset9 { + margin-left: 79.48717948717949%; + *margin-left: 79.38079650845607%; + } + .row-fluid .offset9:first-child { + margin-left: 76.92307692307693%; + *margin-left: 76.81669394435352%; + } + .row-fluid .offset8 { + margin-left: 70.94017094017094%; + *margin-left: 70.83378796144753%; + } + .row-fluid .offset8:first-child { + margin-left: 68.37606837606839%; + *margin-left: 68.26968539734497%; + } + .row-fluid .offset7 { + margin-left: 62.393162393162385%; + *margin-left: 62.28677941443899%; + } + .row-fluid .offset7:first-child { + margin-left: 59.82905982905982%; + *margin-left: 59.72267685033642%; + } + .row-fluid .offset6 { + margin-left: 53.84615384615384%; + *margin-left: 53.739770867430444%; + } + .row-fluid .offset6:first-child { + margin-left: 51.28205128205128%; + *margin-left: 51.175668303327875%; + } + .row-fluid .offset5 { + margin-left: 45.299145299145295%; + *margin-left: 45.1927623204219%; + } + .row-fluid .offset5:first-child { + margin-left: 42.73504273504273%; + *margin-left: 42.62865975631933%; + } + .row-fluid .offset4 { + margin-left: 36.75213675213675%; + *margin-left: 36.645753773413354%; + } + .row-fluid .offset4:first-child { + margin-left: 34.18803418803419%; + *margin-left: 34.081651209310785%; + } + .row-fluid .offset3 { + margin-left: 28.205128205128204%; + *margin-left: 28.0987452264048%; + } + .row-fluid .offset3:first-child { + margin-left: 25.641025641025642%; + *margin-left: 25.53464266230224%; + } + .row-fluid .offset2 { + margin-left: 19.65811965811966%; + *margin-left: 19.551736679396257%; + } + .row-fluid .offset2:first-child { + margin-left: 17.094017094017094%; + *margin-left: 16.98763411529369%; + } + .row-fluid .offset1 { + margin-left: 11.11111111111111%; + *margin-left: 11.004728132387708%; + } + .row-fluid .offset1:first-child { + margin-left: 8.547008547008547%; + *margin-left: 8.440625568285142%; + } + input, + textarea, + .uneditable-input { + margin-left: 0; + } + .controls-row [class*="span"] + [class*="span"] { + margin-left: 30px; + } + input.span12, + textarea.span12, + .uneditable-input.span12 { + width: 1156px; + } + input.span11, + textarea.span11, + .uneditable-input.span11 { + width: 1056px; + } + input.span10, + textarea.span10, + .uneditable-input.span10 { + width: 956px; + } + input.span9, + textarea.span9, + .uneditable-input.span9 { + width: 856px; + } + input.span8, + textarea.span8, + .uneditable-input.span8 { + width: 756px; + } + input.span7, + textarea.span7, + .uneditable-input.span7 { + width: 656px; + } + input.span6, + textarea.span6, + .uneditable-input.span6 { + width: 556px; + } + input.span5, + textarea.span5, + .uneditable-input.span5 { + width: 456px; + } + input.span4, + textarea.span4, + .uneditable-input.span4 { + width: 356px; + } + input.span3, + textarea.span3, + .uneditable-input.span3 { + width: 256px; + } + input.span2, + textarea.span2, + .uneditable-input.span2 { + width: 156px; + } + input.span1, + textarea.span1, + .uneditable-input.span1 { + width: 56px; + } + .thumbnails { + margin-left: -30px; + } + .thumbnails > li { + margin-left: 30px; + } + .row-fluid .thumbnails { + margin-left: 0; + } +} +@media (max-width: 767px) { + body { + padding-top: 0; + } + .navbar-fixed-top, + .navbar-fixed-bottom { + position: static; + } + .navbar-fixed-top { + margin-bottom: 18px; + } + .navbar-fixed-bottom { + margin-top: 18px; + } + .navbar-fixed-top .navbar-inner, + .navbar-fixed-bottom .navbar-inner { + padding: 5px; + } + .navbar .container { + width: auto; + padding: 0; + } + .navbar .brand { + padding-left: 10px; + padding-right: 10px; + margin: 0 0 0 -5px; + } + .nav-collapse { + clear: both; + } + .nav-collapse .nav { + float: none; + margin: 0 0 9px; + } + .nav-collapse .nav > li { + float: none; + } + .nav-collapse .nav > li > a { + margin-bottom: 2px; + } + .nav-collapse .nav > .divider-vertical { + display: none; + } + .nav-collapse .nav .nav-header { + color: #555555; + text-shadow: none; + } + .nav-collapse .nav > li > a, + .nav-collapse .dropdown-menu a { + padding: 9px 15px; + font-weight: bold; + color: #555555; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .btn { + padding: 4px 10px 4px; + font-weight: normal; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + } + .nav-collapse .dropdown-menu li + li a { + margin-bottom: 2px; + } + .nav-collapse .nav > li > a:hover, + .nav-collapse .nav > li > a:focus, + .nav-collapse .dropdown-menu a:hover, + .nav-collapse .dropdown-menu a:focus { + background-color: #f2f2f2; + } + .navbar-inverse .nav-collapse .nav > li > a, + .navbar-inverse .nav-collapse .dropdown-menu a { + color: #999999; + } + .navbar-inverse .nav-collapse .nav > li > a:hover, + .navbar-inverse .nav-collapse .nav > li > a:focus, + .navbar-inverse .nav-collapse .dropdown-menu a:hover, + .navbar-inverse .nav-collapse .dropdown-menu a:focus { + background-color: #111111; + } + .nav-collapse.in .btn-group { + margin-top: 5px; + padding: 0; + } + .nav-collapse .dropdown-menu { + position: static; + top: auto; + left: auto; + float: none; + display: none; + max-width: none; + margin: 0 15px; + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + } + .nav-collapse .open > .dropdown-menu { + display: block; + } + .nav-collapse .dropdown-menu:before, + .nav-collapse .dropdown-menu:after { + display: none; + } + .nav-collapse .dropdown-menu .divider { + display: none; + } + .nav-collapse .nav > li > .dropdown-menu:before, + .nav-collapse .nav > li > .dropdown-menu:after { + display: none; + } + .nav-collapse .navbar-form, + .nav-collapse .navbar-search { + float: none; + padding: 9px 15px; + margin: 9px 0; + border-top: 1px solid #f2f2f2; + border-bottom: 1px solid #f2f2f2; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + box-shadow: inset 0 1px 0 rgba(255,255,255,.1), 0 1px 0 rgba(255,255,255,.1); + } + .navbar-inverse .nav-collapse .navbar-form, + .navbar-inverse .nav-collapse .navbar-search { + border-top-color: #111111; + border-bottom-color: #111111; + } + .navbar .nav-collapse .nav.pull-right { + float: none; + margin-left: 0; + } + .nav-collapse, + .nav-collapse.collapse { + overflow: hidden; + height: 0; + } + .navbar .btn-navbar { + display: block; + } + .navbar-static .navbar-inner { + padding-left: 10px; + padding-right: 10px; + } +} +@media (min-width: 768px) { + .nav-collapse.collapse { + height: auto !important; + overflow: visible !important; + } +} +@-ms-viewport { + width: device-width; +} +.hidden { + display: none; + visibility: hidden; +} +.visible-phone { + display: none !important; +} +.visible-tablet { + display: none !important; +} +.hidden-desktop { + display: none !important; +} +.visible-desktop { + display: inherit !important; +} +@media (min-width: 768px) and (max-width: 979px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important ; + } + .visible-tablet { + display: inherit !important; + } + .hidden-tablet { + display: none !important; + } +} +@media (max-width: 767px) { + .hidden-desktop { + display: inherit !important; + } + .visible-desktop { + display: none !important; + } + .visible-phone { + display: inherit !important; + } + .hidden-phone { + display: none !important; + } +} +.visible-print { + display: none !important; +} +@media print { + .visible-print { + display: inherit !important; + } + .hidden-print { + display: none !important; + } +} +/* Emoticon icon set */ +[class^="emo-"], +[class*=" emo-"] { + display: inline-block; + width: 16px; + height: 16px; + line-height: 16px; + vertical-align: text-top; + background-image: url("../img/icons/emoticons-icons.png"); + background-position: 16px 16px; + background-repeat: no-repeat; + *margin-right: .3em; +} +[class^="emo-"]:last-child, +[class*=" emo-"]:last-child { + *margin-left: 0; +} +.emo-8ball { + background-position: 0 0; +} +.emo-basketball { + background-position: -32px 0; +} +.emo-football { + background-position: -288px 0; +} +.emo-golf { + background-position: -320px 0; +} +.emo-raquet { + background-position: -512px 0; +} +.emo-rocket { + background-position: -576px 0; +} +.emo-soccer { + background-position: -736px 0; +} +.emo-tennis { + background-position: -800px 0; +} +.emo-shuttlecock { + background-position: -640px 0; +} +.emo-bomb { + background-position: -64px 0; +} +.emo-bug { + background-position: -96px 0; +} +.emo-confuse { + background-position: -128px 0; +} +.emo-cool { + background-position: -160px 0; +} +.emo-cry { + background-position: -192px 0; +} +.emo-evilgrin { + background-position: -224px 0; +} +.emo-fat { + background-position: -256px 0; +} +.emo-grin { + background-position: -352px 0; +} +.emo-happy { + background-position: -384px 0; +} +.emo-heart { + background-position: -416px 0; +} +.emo-mad { + background-position: -448px 0; +} +.emo-neutral { + background-position: -480px 0; +} +.emo-red { + background-position: -544px 0; +} +.emo-roll { + background-position: -608px 0; +} +.emo-slim { + background-position: -672px 0; +} +.emo-smile { + background-position: -704px 0; +} +.emo-surprised { + background-position: -768px 0; +} +.emo-tongue { + background-position: -832px 0; +} +.emo-unhappy { + background-position: -864px 0; +} +.emo-waii { + background-position: -896px 0; +} +.emo-wink { + background-position: -928px 0; +} +.emo-yell { + background-position: -960px 0; +} +/*! + * Font Awesome 3.0.2 + * the iconic font designed for use with Twitter Bootstrap + * ------------------------------------------------------- + * The full suite of pictographic icons, examples, and documentation + * can be found at: http://fortawesome.github.com/Font-Awesome/ + * + * License + * ------------------------------------------------------- + * - The Font Awesome font is licensed under the SIL Open Font License - http://scripts.sil.org/OFL + * - Font Awesome CSS, LESS, and SASS files are licensed under the MIT License - + * http://opensource.org/licenses/mit-license.html + * - The Font Awesome pictograms are licensed under the CC BY 3.0 License - http://creativecommons.org/licenses/by/3.0/ + * - Attribution is no longer required in Font Awesome 3.0, but much appreciated: + * "Font Awesome by Dave Gandy - http://fortawesome.github.com/Font-Awesome" + + * Contact + * ------------------------------------------------------- + * Email: dave@davegandy.com + * Twitter: http://twitter.com/fortaweso_me + * Work: Lead Product Designer @ http://kyruus.com + */ +@font-face { + font-family: 'FontAwesome'; + src: url('../css/font/fontawesome-webfont.eot?v=3.0.1'); + src: url('../css/font/fontawesome-webfont.eot?#iefix&v=3.0.1') format('embedded-opentype'), url('../css/font/fontawesome-webfont.woff?v=3.0.1') format('woff'), url('../css/font/fontawesome-webfont.ttf?v=3.0.1') format('truetype'); + font-weight: normal; + font-style: normal; +} +/* Font Awesome styles + ------------------------------------------------------- */ +[class^="awe-"], +[class*=" awe-"] { + font-family: FontAwesome; + font-weight: normal; + font-style: normal; + text-decoration: inherit; + -webkit-font-smoothing: antialiased; + /* sprites.less reset */ + + display: inline; + width: auto; + height: auto; + line-height: normal; + vertical-align: baseline; + background-image: none; + background-position: 0% 0%; + background-repeat: repeat; + margin-top: 0; +} +/* more sprites.less reset */ +.awe-white, +.nav-pills > .active > a > [class^="awe-"], +.nav-pills > .active > a > [class*=" awe-"], +.nav-list > .active > a > [class^="awe-"], +.nav-list > .active > a > [class*=" awe-"], +.navbar-inverse .nav > .active > a > [class^="awe-"], +.navbar-inverse .nav > .active > a > [class*=" awe-"], +.dropdown-menu > li > a:hover > [class^="awe-"], +.dropdown-menu > li > a:hover > [class*=" awe-"], +.dropdown-menu > .active > a > [class^="awe-"], +.dropdown-menu > .active > a > [class*=" awe-"], +.dropdown-submenu:hover > a > [class^="awe-"], +.dropdown-submenu:hover > a > [class*=" awe-"] { + background-image: none; +} +[class^="awe-"]:before, +[class*=" awe-"]:before { + text-decoration: inherit; + display: inline-block; + speak: none; +} +/* makes sure icons active on rollover in links */ +a [class^="awe-"], +a [class*=" awe-"] { + display: inline-block; +} +/* makes the font 33% larger relative to the icon container */ +.awe-large:before { + vertical-align: -10%; + font-size: 1.3333333333333333em; +} +.btn [class^="awe-"], +.nav [class^="awe-"], +.btn [class*=" awe-"], +.nav [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.btn [class^="awe-"].awe-large, +.nav [class^="awe-"].awe-large, +.btn [class*=" awe-"].awe-large, +.nav [class*=" awe-"].awe-large { + line-height: .9em; +} +.btn [class^="awe-"].awe-spin, +.nav [class^="awe-"].awe-spin, +.btn [class*=" awe-"].awe-spin, +.nav [class*=" awe-"].awe-spin { + display: inline-block; +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"] { + /* keeps button heights with and without icons the same */ + +} +.nav-tabs [class^="awe-"], +.nav-pills [class^="awe-"], +.nav-tabs [class*=" awe-"], +.nav-pills [class*=" awe-"], +.nav-tabs [class^="awe-"].awe-large, +.nav-pills [class^="awe-"].awe-large, +.nav-tabs [class*=" awe-"].awe-large, +.nav-pills [class*=" awe-"].awe-large { + line-height: .9em; +} +li [class^="awe-"], +.nav li [class^="awe-"], +li [class*=" awe-"], +.nav li [class*=" awe-"] { + display: inline-block; + width: 1.25em; + text-align: center; +} +li [class^="awe-"].awe-large, +.nav li [class^="awe-"].awe-large, +li [class*=" awe-"].awe-large, +.nav li [class*=" awe-"].awe-large { + /* increased font size for awe-large */ + + width: 1.5625em; +} +ul.icons { + list-style-type: none; + text-indent: -0.75em; +} +ul.icons li [class^="awe-"], +ul.icons li [class*=" awe-"] { + width: .75em; +} +.awe-muted { + color: #eeeeee; +} +.awe-border { + border: solid 1px #eeeeee; + padding: .2em .25em .15em; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.awe-2x { + font-size: 2em; +} +.awe-2x.awe-border { + border-width: 2px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.awe-3x { + font-size: 3em; +} +.awe-3x.awe-border { + border-width: 3px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; +} +.awe-4x { + font-size: 4em; +} +.awe-4x.awe-border { + border-width: 4px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.pull-right { + float: right; +} +.pull-left { + float: left; +} +[class^="awe-"].pull-left, +[class*=" awe-"].pull-left { + margin-right: .3em; +} +[class^="awe-"].pull-right, +[class*=" awe-"].pull-right { + margin-left: .3em; +} +.btn [class^="awe-"].pull-left.awe-2x, +.btn [class*=" awe-"].pull-left.awe-2x, +.btn [class^="awe-"].pull-right.awe-2x, +.btn [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.btn [class^="awe-"].awe-spin.awe-large, +.btn [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.btn.btn-small [class^="awe-"].pull-left.awe-2x, +.btn.btn-small [class*=" awe-"].pull-left.awe-2x, +.btn.btn-small [class^="awe-"].pull-right.awe-2x, +.btn.btn-small [class*=" awe-"].pull-right.awe-2x { + margin-top: .25em; +} +.btn.btn-large [class^="awe-"], +.btn.btn-large [class*=" awe-"] { + margin-top: 0; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x, +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-top: .05em; +} +.btn.btn-large [class^="awe-"].pull-left.awe-2x, +.btn.btn-large [class*=" awe-"].pull-left.awe-2x { + margin-right: .2em; +} +.btn.btn-large [class^="awe-"].pull-right.awe-2x, +.btn.btn-large [class*=" awe-"].pull-right.awe-2x { + margin-left: .2em; +} +.awe-spin { + display: inline-block; + -moz-animation: spin 2s infinite linear; + -o-animation: spin 2s infinite linear; + -webkit-animation: spin 2s infinite linear; + animation: spin 2s infinite linear; +} +@-moz-keyframes spin { + 0% { + -moz-transform: rotate(0deg); + } + 100% { + -moz-transform: rotate(359deg); + } +} +@-webkit-keyframes spin { + 0% { + -webkit-transform: rotate(0deg); + } + 100% { + -webkit-transform: rotate(359deg); + } +} +@-o-keyframes spin { + 0% { + -o-transform: rotate(0deg); + } + 100% { + -o-transform: rotate(359deg); + } +} +@-ms-keyframes spin { + 0% { + -ms-transform: rotate(0deg); + } + 100% { + -ms-transform: rotate(359deg); + } +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +@-moz-document url-prefix() { + .awe-spin { + height: .9em; + } + .btn .awe-spin { + height: auto; + } + .awe-spin.awe-large { + height: 1.25em; + } + .btn .awe-spin.awe-large { + height: .75em; + } +} +/* Font Awesome uses the Unicode Private Use Area (PUA) to ensure screen + readers do not read off random characters that represent icons */ +.awe-glass:before { + content: "\f000"; +} +.awe-music:before { + content: "\f001"; +} +.awe-search:before { + content: "\f002"; +} +.awe-envelope:before { + content: "\f003"; +} +.awe-heart:before { + content: "\f004"; +} +.awe-star:before { + content: "\f005"; +} +.awe-star-empty:before { + content: "\f006"; +} +.awe-user:before { + content: "\f007"; +} +.awe-film:before { + content: "\f008"; +} +.awe-th-large:before { + content: "\f009"; +} +.awe-th:before { + content: "\f00a"; +} +.awe-th-list:before { + content: "\f00b"; +} +.awe-ok:before { + content: "\f00c"; +} +.awe-remove:before { + content: "\f00d"; +} +.awe-zoom-in:before { + content: "\f00e"; +} +.awe-zoom-out:before { + content: "\f010"; +} +.awe-off:before { + content: "\f011"; +} +.awe-signal:before { + content: "\f012"; +} +.awe-cog:before { + content: "\f013"; +} +.awe-trash:before { + content: "\f014"; +} +.awe-home:before { + content: "\f015"; +} +.awe-file:before { + content: "\f016"; +} +.awe-time:before { + content: "\f017"; +} +.awe-road:before { + content: "\f018"; +} +.awe-download-alt:before { + content: "\f019"; +} +.awe-download:before { + content: "\f01a"; +} +.awe-upload:before { + content: "\f01b"; +} +.awe-inbox:before { + content: "\f01c"; +} +.awe-play-circle:before { + content: "\f01d"; +} +.awe-repeat:before, +.awe-rotate-right:before { + content: "\f01e"; +} +/* F020 doesn't work in Safari. all shifted one down */ +.awe-refresh:before { + content: "\f021"; +} +.awe-list-alt:before { + content: "\f022"; +} +.awe-lock:before { + content: "\f023"; +} +.awe-flag:before { + content: "\f024"; +} +.awe-headphones:before { + content: "\f025"; +} +.awe-volume-off:before { + content: "\f026"; +} +.awe-volume-down:before { + content: "\f027"; +} +.awe-volume-up:before { + content: "\f028"; +} +.awe-qrcode:before { + content: "\f029"; +} +.awe-barcode:before { + content: "\f02a"; +} +.awe-tag:before { + content: "\f02b"; +} +.awe-tags:before { + content: "\f02c"; +} +.awe-book:before { + content: "\f02d"; +} +.awe-bookmark:before { + content: "\f02e"; +} +.awe-print:before { + content: "\f02f"; +} +.awe-camera:before { + content: "\f030"; +} +.awe-font:before { + content: "\f031"; +} +.awe-bold:before { + content: "\f032"; +} +.awe-italic:before { + content: "\f033"; +} +.awe-text-height:before { + content: "\f034"; +} +.awe-text-width:before { + content: "\f035"; +} +.awe-align-left:before { + content: "\f036"; +} +.awe-align-center:before { + content: "\f037"; +} +.awe-align-right:before { + content: "\f038"; +} +.awe-align-justify:before { + content: "\f039"; +} +.awe-list:before { + content: "\f03a"; +} +.awe-indent-left:before { + content: "\f03b"; +} +.awe-indent-right:before { + content: "\f03c"; +} +.awe-facetime-video:before { + content: "\f03d"; +} +.awe-picture:before { + content: "\f03e"; +} +.awe-pencil:before { + content: "\f040"; +} +.awe-map-marker:before { + content: "\f041"; +} +.awe-adjust:before { + content: "\f042"; +} +.awe-tint:before { + content: "\f043"; +} +.awe-edit:before { + content: "\f044"; +} +.awe-share:before { + content: "\f045"; +} +.awe-check:before { + content: "\f046"; +} +.awe-move:before { + content: "\f047"; +} +.awe-step-backward:before { + content: "\f048"; +} +.awe-fast-backward:before { + content: "\f049"; +} +.awe-backward:before { + content: "\f04a"; +} +.awe-play:before { + content: "\f04b"; +} +.awe-pause:before { + content: "\f04c"; +} +.awe-stop:before { + content: "\f04d"; +} +.awe-forward:before { + content: "\f04e"; +} +.awe-fast-forward:before { + content: "\f050"; +} +.awe-step-forward:before { + content: "\f051"; +} +.awe-eject:before { + content: "\f052"; +} +.awe-chevron-left:before { + content: "\f053"; +} +.awe-chevron-right:before { + content: "\f054"; +} +.awe-plus-sign:before { + content: "\f055"; +} +.awe-minus-sign:before { + content: "\f056"; +} +.awe-remove-sign:before { + content: "\f057"; +} +.awe-ok-sign:before { + content: "\f058"; +} +.awe-question-sign:before { + content: "\f059"; +} +.awe-info-sign:before { + content: "\f05a"; +} +.awe-screenshot:before { + content: "\f05b"; +} +.awe-remove-circle:before { + content: "\f05c"; +} +.awe-ok-circle:before { + content: "\f05d"; +} +.awe-ban-circle:before { + content: "\f05e"; +} +.awe-arrow-left:before { + content: "\f060"; +} +.awe-arrow-right:before { + content: "\f061"; +} +.awe-arrow-up:before { + content: "\f062"; +} +.awe-arrow-down:before { + content: "\f063"; +} +.awe-share-alt:before, +.awe-mail-forward:before { + content: "\f064"; +} +.awe-resize-full:before { + content: "\f065"; +} +.awe-resize-small:before { + content: "\f066"; +} +.awe-plus:before { + content: "\f067"; +} +.awe-minus:before { + content: "\f068"; +} +.awe-asterisk:before { + content: "\f069"; +} +.awe-exclamation-sign:before { + content: "\f06a"; +} +.awe-gift:before { + content: "\f06b"; +} +.awe-leaf:before { + content: "\f06c"; +} +.awe-fire:before { + content: "\f06d"; +} +.awe-eye-open:before { + content: "\f06e"; +} +.awe-eye-close:before { + content: "\f070"; +} +.awe-warning-sign:before { + content: "\f071"; +} +.awe-plane:before { + content: "\f072"; +} +.awe-calendar:before { + content: "\f073"; +} +.awe-random:before { + content: "\f074"; +} +.awe-comment:before { + content: "\f075"; +} +.awe-magnet:before { + content: "\f076"; +} +.awe-chevron-up:before { + content: "\f077"; +} +.awe-chevron-down:before { + content: "\f078"; +} +.awe-retweet:before { + content: "\f079"; +} +.awe-shopping-cart:before { + content: "\f07a"; +} +.awe-folder-close:before { + content: "\f07b"; +} +.awe-folder-open:before { + content: "\f07c"; +} +.awe-resize-vertical:before { + content: "\f07d"; +} +.awe-resize-horizontal:before { + content: "\f07e"; +} +.awe-bar-chart:before { + content: "\f080"; +} +.awe-twitter-sign:before { + content: "\f081"; +} +.awe-facebook-sign:before { + content: "\f082"; +} +.awe-camera-retro:before { + content: "\f083"; +} +.awe-key:before { + content: "\f084"; +} +.awe-cogs:before { + content: "\f085"; +} +.awe-comments:before { + content: "\f086"; +} +.awe-thumbs-up:before { + content: "\f087"; +} +.awe-thumbs-down:before { + content: "\f088"; +} +.awe-star-half:before { + content: "\f089"; +} +.awe-heart-empty:before { + content: "\f08a"; +} +.awe-signout:before { + content: "\f08b"; +} +.awe-linkedin-sign:before { + content: "\f08c"; +} +.awe-pushpin:before { + content: "\f08d"; +} +.awe-external-link:before { + content: "\f08e"; +} +.awe-signin:before { + content: "\f090"; +} +.awe-trophy:before { + content: "\f091"; +} +.awe-github-sign:before { + content: "\f092"; +} +.awe-upload-alt:before { + content: "\f093"; +} +.awe-lemon:before { + content: "\f094"; +} +.awe-phone:before { + content: "\f095"; +} +.awe-check-empty:before { + content: "\f096"; +} +.awe-bookmark-empty:before { + content: "\f097"; +} +.awe-phone-sign:before { + content: "\f098"; +} +.awe-twitter:before { + content: "\f099"; +} +.awe-facebook:before { + content: "\f09a"; +} +.awe-github:before { + content: "\f09b"; +} +.awe-unlock:before { + content: "\f09c"; +} +.awe-credit-card:before { + content: "\f09d"; +} +.awe-rss:before { + content: "\f09e"; +} +.awe-hdd:before { + content: "\f0a0"; +} +.awe-bullhorn:before { + content: "\f0a1"; +} +.awe-bell:before { + content: "\f0a2"; +} +.awe-certificate:before { + content: "\f0a3"; +} +.awe-hand-right:before { + content: "\f0a4"; +} +.awe-hand-left:before { + content: "\f0a5"; +} +.awe-hand-up:before { + content: "\f0a6"; +} +.awe-hand-down:before { + content: "\f0a7"; +} +.awe-circle-arrow-left:before { + content: "\f0a8"; +} +.awe-circle-arrow-right:before { + content: "\f0a9"; +} +.awe-circle-arrow-up:before { + content: "\f0aa"; +} +.awe-circle-arrow-down:before { + content: "\f0ab"; +} +.awe-globe:before { + content: "\f0ac"; +} +.awe-wrench:before { + content: "\f0ad"; +} +.awe-tasks:before { + content: "\f0ae"; +} +.awe-filter:before { + content: "\f0b0"; +} +.awe-briefcase:before { + content: "\f0b1"; +} +.awe-fullscreen:before { + content: "\f0b2"; +} +.awe-group:before { + content: "\f0c0"; +} +.awe-link:before { + content: "\f0c1"; +} +.awe-cloud:before { + content: "\f0c2"; +} +.awe-beaker:before { + content: "\f0c3"; +} +.awe-cut:before { + content: "\f0c4"; +} +.awe-copy:before { + content: "\f0c5"; +} +.awe-paper-clip:before { + content: "\f0c6"; +} +.awe-save:before { + content: "\f0c7"; +} +.awe-sign-blank:before { + content: "\f0c8"; +} +.awe-reorder:before { + content: "\f0c9"; +} +.awe-list-ul:before { + content: "\f0ca"; +} +.awe-list-ol:before { + content: "\f0cb"; +} +.awe-strikethrough:before { + content: "\f0cc"; +} +.awe-underline:before { + content: "\f0cd"; +} +.awe-table:before { + content: "\f0ce"; +} +.awe-magic:before { + content: "\f0d0"; +} +.awe-truck:before { + content: "\f0d1"; +} +.awe-pinterest:before { + content: "\f0d2"; +} +.awe-pinterest-sign:before { + content: "\f0d3"; +} +.awe-google-plus-sign:before { + content: "\f0d4"; +} +.awe-google-plus:before { + content: "\f0d5"; +} +.awe-money:before { + content: "\f0d6"; +} +.awe-caret-down:before { + content: "\f0d7"; +} +.awe-caret-up:before { + content: "\f0d8"; +} +.awe-caret-left:before { + content: "\f0d9"; +} +.awe-caret-right:before { + content: "\f0da"; +} +.awe-columns:before { + content: "\f0db"; +} +.awe-sort:before { + content: "\f0dc"; +} +.awe-sort-down:before { + content: "\f0dd"; +} +.awe-sort-up:before { + content: "\f0de"; +} +.awe-envelope-alt:before { + content: "\f0e0"; +} +.awe-linkedin:before { + content: "\f0e1"; +} +.awe-undo:before, +.awe-rotate-left:before { + content: "\f0e2"; +} +.awe-legal:before { + content: "\f0e3"; +} +.awe-dashboard:before { + content: "\f0e4"; +} +.awe-comment-alt:before { + content: "\f0e5"; +} +.awe-comments-alt:before { + content: "\f0e6"; +} +.awe-bolt:before { + content: "\f0e7"; +} +.awe-sitemap:before { + content: "\f0e8"; +} +.awe-umbrella:before { + content: "\f0e9"; +} +.awe-paste:before { + content: "\f0ea"; +} +.awe-lightbulb:before { + content: "\f0eb"; +} +.awe-exchange:before { + content: "\f0ec"; +} +.awe-cloud-download:before { + content: "\f0ed"; +} +.awe-cloud-upload:before { + content: "\f0ee"; +} +.awe-user-md:before { + content: "\f0f0"; +} +.awe-stethoscope:before { + content: "\f0f1"; +} +.awe-suitcase:before { + content: "\f0f2"; +} +.awe-bell-alt:before { + content: "\f0f3"; +} +.awe-coffee:before { + content: "\f0f4"; +} +.awe-food:before { + content: "\f0f5"; +} +.awe-file-alt:before { + content: "\f0f6"; +} +.awe-building:before { + content: "\f0f7"; +} +.awe-hospital:before { + content: "\f0f8"; +} +.awe-ambulance:before { + content: "\f0f9"; +} +.awe-medkit:before { + content: "\f0fa"; +} +.awe-fighter-jet:before { + content: "\f0fb"; +} +.awe-beer:before { + content: "\f0fc"; +} +.awe-h-sign:before { + content: "\f0fd"; +} +.awe-plus-sign-alt:before { + content: "\f0fe"; +} +.awe-double-angle-left:before { + content: "\f100"; +} +.awe-double-angle-right:before { + content: "\f101"; +} +.awe-double-angle-up:before { + content: "\f102"; +} +.awe-double-angle-down:before { + content: "\f103"; +} +.awe-angle-left:before { + content: "\f104"; +} +.awe-angle-right:before { + content: "\f105"; +} +.awe-angle-up:before { + content: "\f106"; +} +.awe-angle-down:before { + content: "\f107"; +} +.awe-desktop:before { + content: "\f108"; +} +.awe-laptop:before { + content: "\f109"; +} +.awe-tablet:before { + content: "\f10a"; +} +.awe-mobile-phone:before { + content: "\f10b"; +} +.awe-circle-blank:before { + content: "\f10c"; +} +.awe-quote-left:before { + content: "\f10d"; +} +.awe-quote-right:before { + content: "\f10e"; +} +.awe-spinner:before { + content: "\f110"; +} +.awe-circle:before { + content: "\f111"; +} +.awe-reply:before, +.awe-mail-reply:before { + content: "\f112"; +} +.awe-folder-close-alt:before { + content: "\f114"; +} +.awe-folder-open-alt:before { + content: "\f115"; +} +.awe-expand-alt:before { + content: "\f116"; +} +.awe-collapse-alt:before { + content: "\f117"; +} +.awe-smile:before { + content: "\f118"; +} +.awe-frown:before { + content: "\f119"; +} +.awe-meh:before { + content: "\f11a"; +} +.awe-gamepad:before { + content: "\f11b"; +} +.awe-keyboard:before { + content: "\f11c"; +} +.awe-flag-alt:before { + content: "\f11d"; +} +.awe-flag-checkered:before { + content: "\f11e"; +} +.awe-terminal:before { + content: "\f120"; +} +.awe-code:before { + content: "\f121"; +} +.awe-reply-all:before { + content: "\f122"; +} +.awe-mail-reply-all:before { + content: "\f122"; +} +.awe-star-half-full:before, +.awe-star-half-empty:before { + content: "\f123"; +} +.awe-location-arrow:before { + content: "\f124"; +} +.awe-crop:before { + content: "\f125"; +} +.awe-code-fork:before { + content: "\f126"; +} +.awe-unlink:before { + content: "\f127"; +} +.awe-question:before { + content: "\f128"; +} +.awe-info:before { + content: "\f129"; +} +.awe-exclamation:before { + content: "\f12a"; +} +.awe-superscript:before { + content: "\f12b"; +} +.awe-subscript:before { + content: "\f12c"; +} +.awe-eraser:before { + content: "\f12d"; +} +.awe-puzzle-piece:before { + content: "\f12e"; +} +.awe-microphone:before { + content: "\f130"; +} +.awe-microphone-off:before { + content: "\f131"; +} +.awe-shield:before { + content: "\f132"; +} +.awe-calendar-empty:before { + content: "\f133"; +} +.awe-fire-extinguisher:before { + content: "\f134"; +} +.awe-rocket:before { + content: "\f135"; +} +.awe-maxcdn:before { + content: "\f136"; +} +.awe-chevron-sign-left:before { + content: "\f137"; +} +.awe-chevron-sign-right:before { + content: "\f138"; +} +.awe-chevron-sign-up:before { + content: "\f139"; +} +.awe-chevron-sign-down:before { + content: "\f13a"; +} +.awe-html5:before { + content: "\f13b"; +} +.awe-css3:before { + content: "\f13c"; +} +.awe-anchor:before { + content: "\f13d"; +} +.awe-unlock-alt:before { + content: "\f13e"; +} +.awe-bullseye:before { + content: "\f140"; +} +.awe-ellipsis-horizontal:before { + content: "\f141"; +} +.awe-ellipsis-vertical:before { + content: "\f142"; +} +.awe-rss-sign:before { + content: "\f143"; +} +.awe-play-sign:before { + content: "\f144"; +} +.awe-ticket:before { + content: "\f145"; +} +.awe-minus-sign-alt:before { + content: "\f146"; +} +.awe-check-minus:before { + content: "\f147"; +} +.awe-level-up:before { + content: "\f148"; +} +.awe-level-down:before { + content: "\f149"; +} +.awe-check-sign:before { + content: "\f14a"; +} +.awe-edit-sign:before { + content: "\f14b"; +} +.awe-external-link-sign:before { + content: "\f14c"; +} +.awe-share-sign:before { + content: "\f14d"; +} + +/* Global styles */ +html, +body { + height: 100%; +} +body { + background-image: url("../img/assets/bg_body.jpg"); + background-repeat: repeat; + background-position: center center; + position: relative; +} +.container, +.ie8 .container { + width: 940px; +} +.navigation-block { + width: 220px; + float: left; + *zoom: 1; +} +.navigation-block:before, +.navigation-block:after { + display: table; + content: ""; + line-height: 0; +} +.navigation-block:after { + clear: both; +} +.navigation-block.affix { + position: fixed; + top: 20px; +} +.navigation-block.affix-bottom { + position: absolute; + top: auto; + bottom: 60px; +} +.navigation-block .navbar { + margin-bottom: 0; +} +.navigation-block .navbar .btn-navbar { + float: none; + margin: 0; + color: #40444d; + text-shadow: none; + text-align: left; +} +.navigation-block .navbar + .side-note { + margin-top: 10px; +} +.content-block { + width: 700px; + float: right; + margin-left: 20px; + *zoom: 1; +} +.content-block:before, +.content-block:after { + display: table; + content: ""; + line-height: 0; +} +.content-block:after { + clear: both; +} +#wrapper { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 0 -50px; +} +#push { + height: 50px; +} +/* Main header */ +#header { + position: relative; + padding: 20px 0; + margin-bottom: 20px; + border-bottom: 1px solid #dedede; +} +#header > h1 { + margin: 0; +} +#header > h1 + p { + margin: 0; + font-size: 11.049999999999999px; + text-shadow: 0 1px 0 #fff; +} +#header .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +#header nav { + float: right; + margin-top: -20px; + height: 30px; + -webkit-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -moz-box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + box-shadow: 0 0 2px rgba(0, 0, 0, 0.4); + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul { + margin: 0; + *zoom: 1; +} +#header nav ul:before, +#header nav ul:after { + display: table; + content: ""; + line-height: 0; +} +#header nav ul:after { + clear: both; +} +#header nav ul > li { + float: left; + display: block; +} +#header nav ul > li + li { + border-right: 1px solid #363840; +} +#header nav ul > li:last-child { + border: none; +} +#header nav ul > li > a, +#header nav ul > li a.btn { + font-size: 11.049999999999999px !important; + padding: 6px 15px 0; + color: #b8babf; + display: block; + text-shadow: 0 1px 0 #000; + background: none; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li > a:hover, +#header nav ul > li a.btn:hover, +#header nav ul > li > a a.btn:hover, +#header nav ul > li a.btn a.btn:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li > a:hover .caret, +#header nav ul > li a.btn:hover .caret, +#header nav ul > li > a a.btn:hover .caret, +#header nav ul > li a.btn a.btn:hover .caret { + border-top-color: #fff; +} +#header nav ul > li a.btn { + padding: 6px 15px 5px; +} +#header nav ul > li .dropdown-menu { + margin: 0; + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; + background-color: #464a52; + background-image: -moz-linear-gradient(top, #4e525a, #3a3d45); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e525a), to(#3a3d45)); + background-image: -webkit-linear-gradient(top, #4e525a, #3a3d45); + background-image: -o-linear-gradient(top, #4e525a, #3a3d45); + background-image: linear-gradient(to bottom, #4e525a, #3a3d45); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e525a', endColorstr='#ff3a3d45', GradientType=0); +} +#header nav ul > li .dropdown-menu li { + float: none; + border: none; +} +#header nav ul > li .dropdown-menu a { + color: #b8babf; + padding: 5px 15px; + text-shadow: 0 1px 0 #000; + background: none; +} +#header nav ul > li .dropdown-menu a:hover { + color: #fff; + text-decoration: none; + background: none; +} +#header nav ul > li .btn-group.open .btn.dropdown-toggle { + color: #fff; + text-decoration: none; + background: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .btn .caret { + margin-left: 3px; + border-top-color: #b8babf; +} +#header nav ul > li .nav-search { + background-color: transparent; + border: none; + margin: 4px 0 4px 4px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +#header nav ul > li .nav-search input { + height: 14px; + width: 100px; + margin: 0; + padding: 3px; + border-color: #fff; + -webkit-transition: width 0.3s ease; + -moz-transition: width 0.3s ease; + -o-transition: width 0.3s ease; + transition: width 0.3s ease; +} +#header nav ul > li .nav-search input:focus { + width: 180px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Main footer */ +#footer { + background-image: url("../img/assets/bg_footer.png"); + background-repeat: repeat-x; + background-position: top; + *zoom: 1; +} +#footer:before, +#footer:after { + display: table; + content: ""; + line-height: 0; +} +#footer:after { + clear: both; +} +#footer p { + margin: 20px 0 10px; + float: left; +} +#footer p a { + color: #525459; +} +#footer p a:hover { + color: #3a3b3e; +} +#footer p + ul { + margin-left: 10px; +} +#footer ul { + margin: 20px 0 0; + padding: 0; + list-style: none; + float: left; + *zoom: 1; +} +#footer ul:before, +#footer ul:after { + display: table; + content: ""; + line-height: 0; +} +#footer ul:after { + clear: both; +} +#footer ul li { + float: left; + display: block; +} +#footer ul li + li { + margin-left: 10px; +} +#footer .btn.btn-flat { + margin-top: 15px; + padding: 1px 8px; + font-size: 11.049999999999999px; +} +/* Navigation */ +.main-navigation { + margin-bottom: 20px; +} +.main-navigation > ul { + margin: 0; + list-style: none; + border-bottom: 1px solid #dedede; +} +.main-navigation > ul > li { + border-top: 1px solid #dedede; +} +.main-navigation > ul > li a { + color: #939699; + display: block; + background-repeat: no-repeat; +} +.main-navigation > ul > li > a { + line-height: 30px; +} +.main-navigation > ul > li > a:hover { + color: #e74949; + text-decoration: none; + background-color: #fafafa; +} +.main-navigation > ul > li > a:hover + ul { + background-color: #fafafa; +} +.main-navigation > ul > li > a [class^="awe-"], +.main-navigation > ul > li > a [class*=" awe-"] { + margin-right: 5px; + font-size: 15px; +} +.main-navigation > ul > li ul { + display: none; + margin: 0; + padding: 0 0 10px; + list-style: none; +} +.main-navigation > ul > li ul li.active a { + color: #525252; +} +.main-navigation > ul > li ul a { + line-height: 24px; + padding-left: 36px; + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: 22px 9px; +} +.main-navigation > ul > li ul a.current, +.main-navigation > ul > li ul a:hover { + color: #525252; + text-decoration: none; +} +.main-navigation > ul > li.current > a { + color: #e74949; +} +.main-navigation > ul > li.current > a [class^="awe-"], +.main-navigation > ul > li.current > a [class*=" awe-"] { + color: #e74949; +} +.main-navigation > ul > li.current > a + ul { + display: block; +} +/* Badge for navigation */ +.main-navigation .badge { + float: right; + padding: 1px 5px 2px; + margin: 7px 0 0 0; + font-size: 11.049999999999999px; + color: #ffffff; + background-color: #e74949; + cursor: help; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* User avatar */ +.user-profile { + margin-bottom: 20px; +} +.user-profile figure { + margin: 0; + *zoom: 1; +} +.user-profile figure:before, +.user-profile figure:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figure:after { + clear: both; +} +.user-profile img { + border: 1px solid #bec2c8; + background-color: #ffffff; + padding: 4px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); + width: 60px; + height: 60px; +} +.user-profile figcaption { + float: right; + margin-left: 15px; + padding-top: 6px; + width: 130px; +} +.user-profile figcaption strong { + display: block; + line-height: 13px; +} +.user-profile figcaption strong a { + color: #525252; +} +.user-profile figcaption strong a:hover { + color: #000000; + text-decoration: none; +} +.user-profile figcaption em { + font-style: normal; + font-size: 9.75px; +} +.user-profile figcaption ul { + margin: 5px 0 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.user-profile figcaption ul:before, +.user-profile figcaption ul:after { + display: table; + content: ""; + line-height: 0; +} +.user-profile figcaption ul:after { + clear: both; +} +.user-profile figcaption ul > li { + float: left; + display: block; +} +.user-profile figcaption ul > li + li { + margin-left: 5px; +} +.user-profile figcaption ul .btn.btn-flat { + font-size: 11.049999999999999px; + padding: 1px 8px; +} +/* Side notes */ +.side-note { + background-image: url("../img/assets/bg-sidenote-top.png"); + background-repeat: no-repeat; + background-position: top center; + padding-top: 38px; + margin-bottom: 10px; +} +.side-note .side-note-container { + background-image: url("../img/assets/bg-sidenote-middle.png"); + background-repeat: repeat-y; + background-position: top center; + padding: 1px 20px 0; +} +.side-note .side-note-container p, +.side-note .side-note-container h2 { + margin: 0; + color: #807160; + line-height: 20px; + font-size: 11.049999999999999px; +} +.side-note .side-note-container h2 { + color: #665b4c; +} +.side-note .side-note-bottom { + background-image: url("../img/assets/bg-sidenote-bottom.png"); + background-repeat: no-repeat; + background-position: bottom center; + padding-bottom: 34px; +} +/* Balance */ +.balance { + border-top: 1px solid #dedede; + padding: 20px 0; +} +.balance h2 { + margin: 0; + font-size: 13px; + font-weight: normal; + line-height: normal; + color: #939699; +} +.balance strong { + font-size: 26px; + line-height: normal; + color: #525252; +} +/* Side search */ +.side-search { + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.side-search input { + width: 190px; + margin-bottom: 0; + padding-left: 14px; + padding-right: 14px; + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 14px; + -moz-border-radius: 14px; + border-radius: 14px; +} +/* Typography */ +h1, +h2, +h3, +h4, +h5, +h6 { + margin: 0; + line-height: normal; +} +h1 small, +h2 small, +h3 small, +h4 small, +h5 small, +h6 small { + font-weight: normal; +} +h1:first-child, +h2:first-child, +h3:first-child, +h4:first-child, +h5:first-child, +h6:first-child { + margin-top: 0; +} +h1 { + font-size: 26px; + margin: 20px 0; +} +h2 { + font-size: 19.5px; + margin: 18px 0; +} +h3 { + font-size: 14.95px; + margin: 16px 0; +} +h4 { + font-size: 13px; + margin: 14px 0; +} +h5 { + font-size: 11.049999999999999px; + text-transform: uppercase; + margin: 12px 0; +} +h6 { + font-size: 9.75px; + text-transform: uppercase; + margin: 10px 0; +} +nav ul, +nav ol { + margin: 0; + padding: 0; + list-style: none; + list-style-image: none; +} +blockquote, +blockquote.pull-right { + clear: both; + margin: 0 0 20px; +} +blockquote small, +blockquote.pull-right small { + font-size: 10px; +} +code { + padding: 1px 3px; + background-color: #40444d; + border: 1px solid #000; + color: #ffffff; +} +pre { + border-color: #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); +} +.label { + padding: 1px 4px; +} +a.label:hover { + color: #ffffff; + background-color: #808080; + text-decoration: none; + cursor: pointer; +} +a.label-important:hover { + background-color: #953b39; +} +a.label-warning:hover { + background-color: #c67605; +} +a.label-success:hover { + background-color: #356635; +} +a.label-info:hover { + background-color: #2d6987; +} +a.label-inverse:hover { + background-color: #1a1a1a; +} +dl.dl-horizontal dt, +dl.dl-horizontal dd { + line-height: 21.599999999999998px; +} +dl.dl-horizontal dt { + width: 100px; +} +dl.dl-horizontal dd { + margin-left: 130px; +} +.data-block ol, +.data-block ul { + margin-bottom: 20px; +} +.data-block ol.checkmark, +.data-block ul.checkmark, +.data-block ol.crossmark, +.data-block ul.crossmark, +.data-block ol.pointmark, +.data-block ul.pointmark { + list-style: none; + margin-left: 0; +} +.data-block ol.checkmark li, +.data-block ul.checkmark li, +.data-block ol.crossmark li, +.data-block ul.crossmark li, +.data-block ol.pointmark li, +.data-block ul.pointmark li { + padding-left: 15px; + background-position: left 7px; + background-color: transparent; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_list_style_check.png"); +} +.data-block ol.crossmark li, +.data-block ul.crossmark li { + background-image: url("../img/icons/icon_list_style_cross.png"); +} +.data-block ol.pointmark li, +.data-block ul.pointmark li { + background-image: url("../img/icons/icon_list_style_arrow.png"); + background-position: left 8px; +} +.data-block li { + line-height: 20px; +} +.well { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; + box-shadow: 0 0 3px rgba(0,0,0,0.05) inset; +} +.well blockquote { + border-color: rgba(0, 0, 0, 0.15); +} +.well.large { + padding: 24px; + -webkit-border-radius: 6px; + -moz-border-radius: 6px; + border-radius: 6px; +} +.well.small { + padding: 9px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +/* Content */ +/* Data block grid */ +.row { + margin-left: -20px; + *zoom: 1; +} +.row:before, +.row:after { + display: table; + content: ""; + line-height: 0; +} +.row:after { + clear: both; +} +[class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.container, +.navbar-static-top .container, +.navbar-fixed-top .container, +.navbar-fixed-bottom .container { + width: 700px; +} +.span12 { + width: 700px; +} +.span11 { + width: 640px; +} +.span10 { + width: 580px; +} +.span9 { + width: 520px; +} +.span8 { + width: 460px; +} +.span7 { + width: 400px; +} +.span6 { + width: 340px; +} +.span5 { + width: 280px; +} +.span4 { + width: 220px; +} +.span3 { + width: 160px; +} +.span2 { + width: 100px; +} +.span1 { + width: 40px; +} +.offset12 { + margin-left: 740px; +} +.offset11 { + margin-left: 680px; +} +.offset10 { + margin-left: 620px; +} +.offset9 { + margin-left: 560px; +} +.offset8 { + margin-left: 500px; +} +.offset7 { + margin-left: 440px; +} +.offset6 { + margin-left: 380px; +} +.offset5 { + margin-left: 320px; +} +.offset4 { + margin-left: 260px; +} +.offset3 { + margin-left: 200px; +} +.offset2 { + margin-left: 140px; +} +.offset1 { + margin-left: 80px; +} +.row-fluid { + width: 100%; + *zoom: 1; +} +.row-fluid:before, +.row-fluid:after { + display: table; + content: ""; + line-height: 0; +} +.row-fluid:after { + clear: both; +} +.row-fluid [class*="span"] { + display: block; + width: 100%; + min-height: 28px; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + float: left; + margin-left: 2.386363636363636%; + *margin-left: 2.3331721470019335%; +} +.row-fluid [class*="span"]:first-child { + margin-left: 0; +} +.row-fluid .controls-row [class*="span"] + [class*="span"] { + margin-left: 2.386363636363636%; +} +.row-fluid .span12 { + width: 99.88636363636363%; + *width: 99.83317214700192%; +} +.row-fluid .span11 { + width: 91.36363636363636%; + *width: 91.31044487427465%; +} +.row-fluid .span10 { + width: 82.84090909090908%; + *width: 82.78771760154737%; +} +.row-fluid .span9 { + width: 74.31818181818181%; + *width: 74.2649903288201%; +} +.row-fluid .span8 { + width: 65.79545454545453%; + *width: 65.74226305609282%; +} +.row-fluid .span7 { + width: 57.272727272727266%; + *width: 57.219535783365565%; +} +.row-fluid .span6 { + width: 48.74999999999999%; + *width: 48.69680851063829%; +} +.row-fluid .span5 { + width: 40.22727272727272%; + *width: 40.17408123791102%; +} +.row-fluid .span4 { + width: 31.70454545454545%; + *width: 31.65135396518375%; +} +.row-fluid .span3 { + width: 23.18181818181818%; + *width: 23.12862669245648%; +} +.row-fluid .span2 { + width: 14.659090909090907%; + *width: 14.605899419729205%; +} +.row-fluid .span1 { + width: 6.136363636363636%; + *width: 6.0831721470019335%; +} +.row-fluid .offset12 { + margin-left: 104.65909090909089%; + *margin-left: 104.55270793036748%; +} +.row-fluid .offset12:first-child { + margin-left: 102.27272727272727%; + *margin-left: 102.16634429400385%; +} +.row-fluid .offset11 { + margin-left: 96.13636363636363%; + *margin-left: 96.02998065764021%; +} +.row-fluid .offset11:first-child { + margin-left: 93.75%; + *margin-left: 93.64361702127658%; +} +.row-fluid .offset10 { + margin-left: 87.61363636363635%; + *margin-left: 87.50725338491293%; +} +.row-fluid .offset10:first-child { + margin-left: 85.22727272727272%; + *margin-left: 85.1208897485493%; +} +.row-fluid .offset9 { + margin-left: 79.09090909090908%; + *margin-left: 78.98452611218566%; +} +.row-fluid .offset9:first-child { + margin-left: 76.70454545454545%; + *margin-left: 76.59816247582204%; +} +.row-fluid .offset8 { + margin-left: 70.5681818181818%; + *margin-left: 70.46179883945838%; +} +.row-fluid .offset8:first-child { + margin-left: 68.18181818181817%; + *margin-left: 68.07543520309476%; +} +.row-fluid .offset7 { + margin-left: 62.04545454545454%; + *margin-left: 61.93907156673114%; +} +.row-fluid .offset7:first-child { + margin-left: 59.6590909090909%; + *margin-left: 59.5527079303675%; +} +.row-fluid .offset6 { + margin-left: 53.522727272727266%; + *margin-left: 53.41634429400386%; +} +.row-fluid .offset6:first-child { + margin-left: 51.136363636363626%; + *margin-left: 51.02998065764022%; +} +.row-fluid .offset5 { + margin-left: 44.99999999999999%; + *margin-left: 44.89361702127659%; +} +.row-fluid .offset5:first-child { + margin-left: 42.61363636363635%; + *margin-left: 42.50725338491295%; +} +.row-fluid .offset4 { + margin-left: 36.47727272727272%; + *margin-left: 36.37088974854932%; +} +.row-fluid .offset4:first-child { + margin-left: 34.090909090909086%; + *margin-left: 33.984526112185684%; +} +.row-fluid .offset3 { + margin-left: 27.954545454545453%; + *margin-left: 27.84816247582205%; +} +.row-fluid .offset3:first-child { + margin-left: 25.568181818181817%; + *margin-left: 25.461798839458414%; +} +.row-fluid .offset2 { + margin-left: 19.43181818181818%; + *margin-left: 19.325435203094777%; +} +.row-fluid .offset2:first-child { + margin-left: 17.045454545454543%; + *margin-left: 16.93907156673114%; +} +.row-fluid .offset1 { + margin-left: 10.909090909090907%; + *margin-left: 10.802707930367504%; +} +.row-fluid .offset1:first-child { + margin-left: 8.522727272727272%; + *margin-left: 8.416344294003867%; +} +[class*="span"] { + margin-bottom: 20px; +} +.data-block .row .row { + margin-left: -20px; + *zoom: 1; +} +.data-block .row .row:before, +.data-block .row .row:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .row .row:after { + clear: both; +} +.data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.data-block .row .container, +.data-block .row .navbar-static-top .container, +.data-block .row .navbar-fixed-top .container, +.data-block .row .navbar-fixed-bottom .container { + width: 652px; +} +.data-block .row .span12 { + width: 652px; +} +.data-block .row .span11 { + width: 596px; +} +.data-block .row .span10 { + width: 540px; +} +.data-block .row .span9 { + width: 484px; +} +.data-block .row .span8 { + width: 428px; +} +.data-block .row .span7 { + width: 372px; +} +.data-block .row .span6 { + width: 316px; +} +.data-block .row .span5 { + width: 260px; +} +.data-block .row .span4 { + width: 204px; +} +.data-block .row .span3 { + width: 148px; +} +.data-block .row .span2 { + width: 92px; +} +.data-block .row .span1 { + width: 36px; +} +.data-block .row .offset12 { + margin-left: 692px; +} +.data-block .row .offset11 { + margin-left: 636px; +} +.data-block .row .offset10 { + margin-left: 580px; +} +.data-block .row .offset9 { + margin-left: 524px; +} +.data-block .row .offset8 { + margin-left: 468px; +} +.data-block .row .offset7 { + margin-left: 412px; +} +.data-block .row .offset6 { + margin-left: 356px; +} +.data-block .row .offset5 { + margin-left: 300px; +} +.data-block .row .offset4 { + margin-left: 244px; +} +.data-block .row .offset3 { + margin-left: 188px; +} +.data-block .row .offset2 { + margin-left: 132px; +} +.data-block .row .offset1 { + margin-left: 76px; +} +.data-block .row > [class*="span"]:first-child { + margin-left: 0; +} +.data-block .data-container > *:last-child { + margin-bottom: 20px; +} +.data-block .row, +.data-block .row .row, +.data-block .row-fluid { + margin-left: 0; +} +.data-block.span1 [class*="span"], +.data-block.span2 [class*="span"], +.data-block.span3 [class*="span"] { + width: auto; + float: none; + margin: 0 0 20px 0; +} +/* Data blocks */ +.data-block { + position: relative; + margin-bottom: 20px; + color: #525459; +} +.data-block .data-container { + padding: 23px 23px 3px 23px; + background-color: #ffffff; + border: 1px solid #bec2c8; + *zoom: 1; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + -webkit-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + -moz-box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; + box-shadow: 0 0 3px rgba(0,0,0,0.15), 0 4px 0 -3px #fff, 0 4px 0 -2px #bec2c8, 0 8px 0 -5px #fff, 0 8px 0 -4px #bec2c8; +} +.data-block .data-container:before, +.data-block .data-container:after { + display: table; + content: ""; + line-height: 0; +} +.data-block .data-container:after { + clear: both; +} +.data-block .data-container p { + line-height: 160%; +} +.data-block .data-container + .data-container { + margin-top: 20px; +} +.data-block > .data-block { + margin-top: 20px; +} +.data-block.decent .data-container { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.15); +} +.data-block.raw { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.raw .data-container { + padding: 0; + background-color: transparent; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.raw.fit { + margin-top: 25px; +} +/* Data block header */ +.data-block header { + border-bottom: 1px solid #dedede; + padding-bottom: 10px; + margin-bottom: 20px; + *zoom: 1; +} +.data-block header:before, +.data-block header:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header:after { + clear: both; +} +.data-block header h1 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 21.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +.data-block header h2 { + margin: 0; + display: inline-block; + line-height: normal; + font-size: 16.25px; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; +} +/* Data block footer */ +.data-block footer { + text-transform: uppercase; + font-size: 10px; + margin: 23px 0 20px; + color: #a4a5aa; +} +.data-block footer.info, +.data-block footer.warning { + padding-left: 22px; + background-position: left center; + background-repeat: no-repeat; + background-image: url("../img/icons/icon_footer_info.png"); +} +.data-block footer.warning { + background-image: url("../img/icons/icon_footer_warning.png"); +} +.data-block footer p { + font-size: 10px; + line-height: normal; + margin: 0; +} +/* Page header */ +.page-header { + margin: 0 0 40px; + padding-bottom: 0; + border-bottom: none; +} +.page-header h1 { + margin: 0 0 20px; + line-height: normal; +} +/* Hero unit */ +.hero-unit { + margin-bottom: 20px; + -webkit-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + -moz-box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); + box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.5); +} +.hero-unit h1 { + text-shadow: 0 1px 1px #000; + letter-spacing: normal; +} +/* Buttons */ +.btn { + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); +} +.btn.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.btn.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.btn.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.btn.btn-alt { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.15); +} +.btn.btn-alt.btn-large { + -webkit-border-radius: 22px; + -moz-border-radius: 22px; + border-radius: 22px; +} +.btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.5); +} +.btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.6); +} +.btn-group > .btn-alt { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.btn-group > .btn.btn-alt:first-child { + -webkit-border-top-left-radius: 18px; + -moz-border-radius-topleft: 18px; + border-top-left-radius: 18px; + -webkit-border-bottom-left-radius: 18px; + -moz-border-radius-bottomleft: 18px; + border-bottom-left-radius: 18px; +} +.btn-group > .btn.btn-alt:last-child, +.btn-group > .btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 18px; + -moz-border-radius-topright: 18px; + border-top-right-radius: 18px; + -webkit-border-bottom-right-radius: 18px; + -moz-border-radius-bottomright: 18px; + border-bottom-right-radius: 18px; +} +.btn-group > .btn.btn-large.btn-alt:first-child { + -webkit-border-top-left-radius: 22px; + -moz-border-radius-topleft: 22px; + border-top-left-radius: 22px; + -webkit-border-bottom-left-radius: 22px; + -moz-border-radius-bottomleft: 22px; + border-bottom-left-radius: 22px; +} +.btn-group > .btn.btn-large.btn-alt:last-child, +.btn-group > .btn-large.btn-alt.dropdown-toggle { + -webkit-border-top-right-radius: 22px; + -moz-border-radius-topright: 22px; + border-top-right-radius: 22px; + -webkit-border-bottom-right-radius: 22px; + -moz-border-radius-bottomright: 22px; + border-bottom-right-radius: 22px; +} +.btn.btn-flat { + padding: 5px 12px; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e6e6e6; + color: #939699; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat:hover, +.btn.btn-flat:active, +.btn.btn-flat.active, +.btn.btn-flat.disabled, +.btn.btn-flat[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat:active, +.btn.btn-flat.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-primary { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e74949; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-primary:hover, +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active, +.btn.btn-flat.btn-primary.disabled, +.btn.btn-flat.btn-primary[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-primary:active, +.btn.btn-flat.btn-primary.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-warning { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #fbb450; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-warning:hover, +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active, +.btn.btn-flat.btn-warning.disabled, +.btn.btn-flat.btn-warning[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-warning:active, +.btn.btn-flat.btn-warning.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-danger { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #e74949; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-danger:hover, +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active, +.btn.btn-flat.btn-danger.disabled, +.btn.btn-flat.btn-danger[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-danger:active, +.btn.btn-flat.btn-danger.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-success { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #6b9b20; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-success:hover, +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active, +.btn.btn-flat.btn-success.disabled, +.btn.btn-flat.btn-success[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-success:active, +.btn.btn-flat.btn-success.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-info { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #4986e7; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-info:hover, +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active, +.btn.btn-flat.btn-info.disabled, +.btn.btn-flat.btn-info[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-info:active, +.btn.btn-flat.btn-info.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.btn-flat.btn-inverse { + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: none; + background-image: none; + background-color: #40444d; + color: #ffffff; + text-shadow: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.btn.btn-flat.btn-inverse:hover, +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active, +.btn.btn-flat.btn-inverse.disabled, +.btn.btn-flat.btn-inverse[disabled] { + color: #ffffff; + background-color: #404040; +} +.btn.btn-flat.btn-inverse:active, +.btn.btn-flat.btn-inverse.active { + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.btn.disabled, +.btn[disabled] { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Tables */ +.table { + margin-bottom: 20px; +} +.table th, +.table td { + border-top: 1px dotted #dedede; +} +.table thead th { + border-bottom: 2px solid #bec2c8; +} +.table tbody th { + border-top: none; + border-right: 2px solid #bec2c8; +} +.table .btn-group { + float: right; + margin: 0; +} +.table.table-striped { + border-bottom: 1px dotted #dedede; +} +.table.table-striped tbody tr:nth-child(2n+1) td, +.table.table-striped tbody tr:nth-child(2n+1) th { + background-color: #f8f8f8; +} +.table.table-bordered { + border-bottom: 1px solid #dedede; +} +.table.table-bordered th, +.table.table-bordered td { + border-top: 1px solid #dedede; +} +.table.table-bordered thead th { + border-bottom: none; +} +.table [class*="span"] { + margin-left: 0; + float: none; +} +.table td.toolbar, +.table th.toolbar { + text-align: right; + padding: 4px; +} +.table td.toolbar .btn-flat, +.table th.toolbar .btn-flat { + padding: 4px 8px; +} +.table td.toolbar > a span, +.table th.toolbar > a span { + margin-top: 4px; +} +.table-media tr td { + vertical-align: middle; +} +.table-media tr td:first-child, +.table-media tr th:first-child { + width: 20px; + text-align: center; +} +.table-media .thumbnail { + display: table-cell; + width: 45px; + border-right: none; + border-bottom: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +/* Forms */ +.data-block input[class*="span"], +.data-block select[class*="span"], +.data-block textarea[class*="span"], +.data-block .uneditable-input[class*="span"], +.data-block .row-fluid input[class*="span"], +.data-block .row-fluid select[class*="span"], +.data-block .row-fluid textarea[class*="span"], +.data-block .row-fluid .uneditable-input[class*="span"] { + float: none; + display: inline-block; + margin-left: 0; +} +form { + margin-bottom: 20px; + background: none; + border: 0px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; + box-shadow: 0 0 3px rgba(0, 0, 0, 0.05) inset; +} +legend { + padding: 20px 20px 0; + margin-bottom: 0; + border: none; + width: auto; +} +legend + .control-group { + margin-top: 0; +} +label { + font-weight: bold; + color: #525252; +} +label.radio, +label.checkbox { + font-weight: normal; + color: #525459; +} +.form-inline .control-label { + margin: 10px 0; +} +.form-inline .control-label:first-child { + margin-top: 0; +} +.form-horizontal .control-label { + text-align: left; +} +.form-search input { + margin-right: 5px; +} +.control-group, +.form-horizontal .control-group { + margin: 0; + padding: 20px; + border-bottom: 1px dashed #dedede; +} +.control-group:last-child, +.form-horizontal .control-group:last-child { + border: none; +} +.form-actions { + border: none; + background-color: transparent; + margin: 0; +} +.form-horizontal .form-actions { + padding-left: 180px; +} +select:focus, +textarea:focus, +input[type="text"]:focus, +input[type="password"]:focus, +input[type="datetime"]:focus, +input[type="datetime-local"]:focus, +input[type="date"]:focus, +input[type="month"]:focus, +input[type="time"]:focus, +input[type="week"]:focus, +input[type="number"]:focus, +input[type="email"]:focus, +input[type="url"]:focus, +input[type="search"]:focus, +input[type="tel"]:focus, +input[type="color"]:focus, +.uneditable-input:focus { + border-color: #bfbfbf; + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 8px rgba(0,0,0,0.2); +} +input[type="radio"], +input[type="checkbox"] { + margin-top: 3px; +} +.ie8 .input-medium { + width: 110px; +} +.ie8 .input-small { + width: 70px; +} +.ie8 .input-mini { + width: 50px; +} +.ie8 .form-horizontal .control-label { + width: 120px; +} +.ie8 .form-horizontal .controls { + margin-left: 140px; +} +/* Bootstrap File & Image input */ +.btn-file { + position: relative; + overflow: hidden; + vertical-align: middle; +} +.btn-file > input { + position: absolute; + top: 0; + right: 0; + margin: 0; + cursor: pointer; + direction: ltr; + font-size: 23px; + transform: translate(-300px, 0) scale(4); + opacity: 0; + filter: alpha(opacity=0); +} +.fileupload { + padding-left: 0; + margin-bottom: 20px; +} +.fileupload h4 { + margin: 0 0 10px; +} +.fileupload .thumbnail { + display: inline-block; + margin-bottom: 5px; + overflow: hidden; + text-align: center; + vertical-align: middle; + background-color: #ffffff; +} +.fileupload .thumbnail > img { + display: block; + max-height: 100%; + vertical-align: middle; +} +.fileupload .thumbnail.fileupload-small { + width: 50px; + height: 50px; +} +.fileupload .thumbnail.fileupload-small.flexible { + width: auto; + height: auto; + max-width: 75px; + max-height: 75px; +} +.fileupload .thumbnail.fileupload-large { + width: 250px; + height: 150px; +} +.fileupload .thumbnail.fileupload-large.flexible { + width: auto; + height: auto; + max-width: 350px; + max-height: 250px; +} +.fileupload .thumbnail + .btn { + margin-bottom: 5px; +} +.fileupload .thumbnail + .btn + .btn { + margin-bottom: 5px; +} +.fileupload .raw.thumbnail { + padding: 0; + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.fileupload .btn { + vertical-align: middle; +} +.fileupload .uneditable-input { + display: inline-block; + margin-bottom: 0; + vertical-align: middle; + cursor: text; +} +.fileupload-exists .fileupload-new, +.fileupload-new .fileupload-exists { + display: none; +} +.fileupload-new .input-append .btn-file { + -webkit-border-radius: 0 3px 3px 0; + -moz-border-radius: 0 3px 3px 0; + border-radius: 0 3px 3px 0; +} +.fileupload-exists .input-append .btn-file { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Form gallery */ +.form-gallery { + background: none; + border: none; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.form-gallery li input[type="checkbox"] { + margin: 0; + position: absolute; + top: 10px; + left: 10px; +} +.form-gallery .thumbnails .thumbnail { + background-color: #ffffff; +} +.form-gallery .thumbnails .thumbnail.active { + border-color: #e74949; + background-color: #ed7676; +} +.form-gallery .form-actions { + padding: 0; + margin: 0; + border: none; + background: none; +} +.form-gallery .form-actions [class*="span"] { + margin-bottom: 0; +} +/* Gallery */ +.thumbnails .row { + margin-left: -20px; + *zoom: 1; +} +.thumbnails .row:before, +.thumbnails .row:after { + display: table; + content: ""; + line-height: 0; +} +.thumbnails .row:after { + clear: both; +} +.thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; +} +.thumbnails .container, +.thumbnails .navbar-static-top .container, +.thumbnails .navbar-fixed-top .container, +.thumbnails .navbar-fixed-bottom .container { + width: 640px; +} +.thumbnails .span12 { + width: 640px; +} +.thumbnails .span11 { + width: 585px; +} +.thumbnails .span10 { + width: 530px; +} +.thumbnails .span9 { + width: 475px; +} +.thumbnails .span8 { + width: 420px; +} +.thumbnails .span7 { + width: 365px; +} +.thumbnails .span6 { + width: 310px; +} +.thumbnails .span5 { + width: 255px; +} +.thumbnails .span4 { + width: 200px; +} +.thumbnails .span3 { + width: 145px; +} +.thumbnails .span2 { + width: 90px; +} +.thumbnails .span1 { + width: 35px; +} +.thumbnails .offset12 { + margin-left: 680px; +} +.thumbnails .offset11 { + margin-left: 625px; +} +.thumbnails .offset10 { + margin-left: 570px; +} +.thumbnails .offset9 { + margin-left: 515px; +} +.thumbnails .offset8 { + margin-left: 460px; +} +.thumbnails .offset7 { + margin-left: 405px; +} +.thumbnails .offset6 { + margin-left: 350px; +} +.thumbnails .offset5 { + margin-left: 295px; +} +.thumbnails .offset4 { + margin-left: 240px; +} +.thumbnails .offset3 { + margin-left: 185px; +} +.thumbnails .offset2 { + margin-left: 130px; +} +.thumbnails .offset1 { + margin-left: 75px; +} +.thumbnails li { + margin: 0; + position: relative; + margin-bottom: 20px; + margin-left: 20px; +} +.thumbnails li .thumbnail-actions { + margin: 0; + display: block; + position: absolute; + bottom: 10px; + right: 10px; + font-size: 11.049999999999999px; + list-style: none; + color: #ffffff; + background-color: #e74949; + opacity: 0; + filter: alpha(opacity=0); +} +.thumbnails li .thumbnail-actions li { + margin: 0; + display: inline-block; +} +.thumbnails li .thumbnail-actions li a { + padding: 2px 4px 3px; + display: block; + color: #ffffff; + opacity: 0.8; + filter: alpha(opacity=80); +} +.thumbnails li .thumbnail-actions li a:hover { + opacity: 1; + filter: alpha(opacity=100); + text-decoration: none; +} +.thumbnails li:hover .thumbnail-actions { + opacity: 0.85; + filter: alpha(opacity=85); +} +.thumbnail + p { + margin-top: 20px; +} +.data-block .thumbnails { + margin-bottom: 0; +} +.data-block .thumbnails.row-fluid { + margin-left: 0; +} +.data-block .thumbnails .thumbnail { + background-color: #ffffff; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block .thumbnails.raw .thumbnail { + border: none; + padding: 0; + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.2); +} +.data-block.raw .thumbnails { + margin-left: auto; + margin-right: auto; +} +.data-block.raw section > * + .thumbnails { + margin-top: 20px; +} +/* Icons */ +[class^="awe-"], +[class*=" awe-"] { + height: auto; + width: auto; + line-height: normal; + vertical-align: middle; + background-image: none; + padding-right: 7px; +} +/* Alerts */ +.alert h4 { + margin: 0; +} +.alert.alert-white { + background-color: #ffffff; + border-color: #dedede; + color: #525459; +} +.alert.alert-inverse { + background-color: #40444d; + border-color: #000; + color: #ffffff; + text-shadow: none; +} +.alert.alert-inverse .close { + color: white; +} +.raw .alert { + -webkit-box-shadow: '0 1px 0 #fff'; + -moz-box-shadow: '0 1px 0 #fff'; + box-shadow: '0 1px 0 #fff'; +} +form .alert { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +/* Accordion */ +.data-block section .accordion .accordion-group { + margin: 0; + border-color: #dedede; + border-width: 0 1px 1px 1px; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block section .accordion .accordion-group:first-child { + border-width: 1px; + -webkit-border-radius: 3px 3px 0 0; + -moz-border-radius: 3px 3px 0 0; + border-radius: 3px 3px 0 0; +} +.data-block section .accordion .accordion-group:last-child { + -webkit-border-radius: 0 0 3px 3px; + -moz-border-radius: 0 0 3px 3px; + border-radius: 0 0 3px 3px; +} +.data-block section .accordion .accordion-toggle { + font-weight: bold; + font-size: 16px; + color: #525252; +} +.data-block section .accordion .accordion-toggle:hover { + color: #e74949; + text-decoration: none; +} +.data-block.raw .accordion-toggle { + background-color: #ffffff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block.raw .accordion-toggle:hover { + background-color: #e74949; + color: #ffffff; + text-decoration: none; +} +.accordion .collapse { + overflow: hidden; +} +/* Progress bars */ +.progress { + margin-bottom: 10px; + background-image: none; + border: 1px solid #e0e0e0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 0px 3px rgba(0, 0, 0, 0.1) inset; + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.progress:last-child { + margin-bottom: 0; +} +.progress .bar:last-child { + -webkit-border-top-right-radius: 3px; + -moz-border-radius-topright: 3px; + border-top-right-radius: 3px; + -webkit-border-bottom-right-radius: 3px; + -moz-border-radius-bottomright: 3px; + border-bottom-right-radius: 3px; +} +.progress.progress-line { + height: 9px; +} +.progress-inverse .bar { + background-color: #484d54; + background-image: -moz-linear-gradient(top, #565c64, #33363b); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#565c64), to(#33363b)); + background-image: -webkit-linear-gradient(top, #565c64, #33363b); + background-image: -o-linear-gradient(top, #565c64, #33363b); + background-image: linear-gradient(to bottom, #565c64, #33363b); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff565c64', endColorstr='#ff33363b', GradientType=0); +} +.progress-inverse.progress-striped .bar { + background-color: #565c64; + background-image: -webkit-gradient(linear, 0 100%, 100% 0, color-stop(0.25, rgba(255, 255, 255, 0.15)), color-stop(0.25, transparent), color-stop(0.5, transparent), color-stop(0.5, rgba(255, 255, 255, 0.15)), color-stop(0.75, rgba(255, 255, 255, 0.15)), color-stop(0.75, transparent), to(transparent)); + background-image: -webkit-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -moz-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: -o-linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); + background-image: linear-gradient(45deg, rgba(255, 255, 255, 0.15) 25%, transparent 25%, transparent 50%, rgba(255, 255, 255, 0.15) 50%, rgba(255, 255, 255, 0.15) 75%, transparent 75%, transparent); +} +/* Pagination */ +.pagination { + height: auto; +} +.pagination ul { + margin-top: -5px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + *zoom: 1; +} +.pagination ul:before, +.pagination ul:after { + display: table; + content: ""; + line-height: 0; +} +.pagination ul:after { + clear: both; +} +.pagination ul li { + display: block; + float: left; + margin-top: 5px; + margin-right: 4px; +} +.pagination ul li:first-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li:last-child { + margin-right: 0; +} +.pagination ul li:last-child a { + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; +} +.pagination ul li a { + border-width: 1px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + line-height: 24px; + padding: 0 10px; + -webkit-border-radius: 18px; + -moz-border-radius: 18px; + border-radius: 18px; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pagination ul li.disabled > span, +.pagination ul li.disabled a, +.pagination ul li.disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pagination ul li a:hover, +.pagination ul li.active a { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.pagination ul li [class^="awe-"], +.pagination ul li [class*=" awe-"], +.pagination ul li [class^="icon-"], +.pagination ul li [class*=" icon-"], +.pagination ul li [class^="fam-"], +.pagination ul li [class*=" fam-"] { + float: none; + border: none; + padding: 0; + background-color: transparent; + line-height: 0; +} +.pager .disabled a, +.pager .disabled a:hover { + border-color: #e6e6e6; + background-color: #e6e6e6; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + opacity: 0.65; + filter: alpha(opacity=65); +} +.pager li > a { + padding: 4px 14px; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + background-color: #40444d; + color: #d9d9d9; + -webkit-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + -moz-box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); + box-shadow: 0 1px 0 rgba(255, 255, 255, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.7); +} +.pager li > a:hover { + color: #ffffff; + background-color: #34383f; + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +/* Tabs */ +.nav-tabs > li { + margin-bottom: 0; +} +.tabs-left .tab-content { + margin: 0; + padding-left: 20px; + border-left: 1px solid #dedede; +} +.tabs-left > .nav-tabs { + border-right: 1px solid #dedede; + margin-right: -1px; +} +.tabs-left > .nav-tabs .active > a, +.tabs-left > .nav-tabs .active > a:hover { + color: #e74949; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-left > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-left > .nav-tabs > li > a:hover { + border-color: transparent #dedede transparent transparent; + background-color: #ffffff; + color: #e74949; +} +.tabs-right .tab-content { + padding-right: 20px; + border-right: 1px solid #dedede; +} +.tabs-right > .nav-tabs { + border-left: 1px solid #dedede; + margin-left: -1px; +} +.tabs-right > .nav-tabs .active > a, +.tabs-right > .nav-tabs .active > a:hover { + color: #e74949; + background-color: #ffffff; + border: none; + border-top: 1px solid #dedede; + border-bottom: 1px solid #dedede; +} +.tabs-right > .nav-tabs > li > a { + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + color: #525459; +} +.tabs-right > .nav-tabs > li > a:hover { + border-color: transparent transparent transparent #dedede; + background-color: #ffffff; + color: #e74949; +} +.tab-content { + overflow: visible; +} +.tabbable .tab-content { + overflow: auto; +} +/* Popover */ +.popover .popover-title { + margin: 0; +} +/* Modal */ +.modal .modal-header * { + margin: 0; +} +.modal .modal-header > .close { + margin-top: 2px; +} +/* Loading */ +.loading { + display: inline-block; + background-image: url("../img/icons/loading_red.gif"); + background-repeat: no-repeat; + background-position: center; + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + width: 24px; + height: 24px; +} +.loading.dark { + background-image: url("../img/icons/loading_dark.gif"); +} +.loading.red { + background-image: url("../img/icons/loading_red.gif"); +} +.loading.green { + background-image: url("../img/icons/loading_green.gif"); +} +.loading.blue { + background-image: url("../img/icons/loading_blue.gif"); +} +/* Data block components */ +/* Data block header controls */ +.data-block header h2 + .btn, +.data-block header h2 + .btn-group, +.data-block header .data-header-actions { + float: right; + margin: -5px 0 0; + padding: 0; + list-style: none; + *zoom: 1; +} +.data-block header h2 + .btn:before, +.data-block header h2 + .btn-group:before, +.data-block header .data-header-actions:before, +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + display: table; + content: ""; + line-height: 0; +} +.data-block header h2 + .btn:after, +.data-block header h2 + .btn-group:after, +.data-block header .data-header-actions:after { + clear: both; +} +.data-block header h2 + .btn li, +.data-block header h2 + .btn-group li, +.data-block header .data-header-actions li { + float: left; + display: block; +} +.data-block header h2 + .btn li + li, +.data-block header h2 + .btn-group li + li, +.data-block header .data-header-actions li + li { + margin-left: 5px; +} +.data-block header h2 + .btn li.active .btn, +.data-block header h2 + .btn-group li.active .btn, +.data-block header .data-header-actions li.active .btn { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-primary { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-warning { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-danger { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-success, +.data-block header .data-header-actions li.active .btn.btn-success { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-info, +.data-block header .data-header-actions li.active .btn.btn-info { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-inverse { + -webkit-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15) inset, 0 1px 2px rgba(0, 0, 0, 0.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat, +.data-block header h2 + .btn-group li.active .btn.btn-flat, +.data-block header .data-header-actions li.active .btn.btn-flat { + background-color: #d9d9d9; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-primary { + background-color: #c91b1b; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-warning { + background-color: #f89406; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-danger { + background-color: #c91b1b; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-success, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-success { + background-color: #3f5c13; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-info, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-info { + background-color: #1b5ec9; +} +.data-block header h2 + .btn li.active .btn.btn-flat.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-flat.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-flat.btn-inverse { + background-color: #1d1f23; +} +.data-block header h2 + .btn li.active .btn.btn-alt, +.data-block header h2 + .btn-group li.active .btn.btn-alt, +.data-block header .data-header-actions li.active .btn.btn-alt { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.1) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-primary, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-primary, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-primary { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-warning, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-warning, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-warning { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-danger, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-danger, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-danger { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-success, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-success, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-success { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-info, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-info, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-info { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.3) inset; +} +.data-block header h2 + .btn li.active .btn.btn-alt.btn-inverse, +.data-block header h2 + .btn-group li.active .btn.btn-alt.btn-inverse, +.data-block header .data-header-actions li.active .btn.btn-alt.btn-inverse { + -webkit-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + -moz-box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; + box-shadow: 0 1px 0 rgba(0, 0, 0, 0.8) inset; +} +.data-block header h2 + .btn li .loading, +.data-block header h2 + .btn-group li .loading, +.data-block header .data-header-actions li .loading { + display: block; +} +.data-block.raw header .data-header-actions { + margin: 0; +} +/* Data block header search */ +.data-block header .header-search { + display: inline; + float: right; + background-color: transparent; + border: none; + margin: 0; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block header .header-search input { + margin: 0; + padding: 2px 10px; + font-size: 11.049999999999999px; + -webkit-border-radius: 15px; + -moz-border-radius: 15px; + border-radius: 15px; +} +/* Data accordion block */ +.data-block.accordion-block .accordion { + margin-bottom: 0; +} +.data-block.accordion-block .data-container { + padding: 0; +} +.data-block.accordion-block .accordion-group { + border: none; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.data-block.accordion-block .accordion-group + .accordion-group { + border-top: 1px solid #e5e5e5; +} +.data-block.accordion-block .accordion-toggle { + color: #525252; + font-size: 16px; + font-weight: bold; + line-height: normal; +} +.data-block.accordion-block .accordion-toggle:hover { + color: #e74949; + text-decoration: none; +} +/* Data todo block */ +.data-block.todo-block header { + margin-bottom: 0; +} +.data-block.todo-block form { + margin: 0; + background-color: transparent; + border: none; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.data-block.todo-block table { + margin: 0; +} +.data-block.todo-block table tr:first-child td { + border-top: 0; +} +.data-block.todo-block table tr.done { + opacity: 0.4; + filter: alpha(opacity=40); +} +.data-block.todo-block table tr.done p { + text-decoration: line-through; +} +.data-block.todo-block table tr.done:hover { + opacity: 1; + filter: alpha(opacity=100); +} +.data-block.todo-block table tr p { + margin: 0; + line-height: normal; +} +.data-block.todo-block table tr p + span { + font-size: 9.75px; + color: #a4a5aa; +} +.data-block.todo-block table tr input { + margin-top: 0; +} +/* Wizard */ +.wizard { + overflow: visible; +} +.wizard .stepContainer { + display: block; + position: relative; + overflow: hidden; + height: 100%; +} +.wizard .stepContainer > div.content { + margin: 0; + padding: 20px; + display: block; + position: absolute; + text-align: left; + overflow: visible; + z-index: 88; +} +.wizard .stepContainer .StepTitle { + display: block; + z-index: 88; + *zoom: 1; +} +.wizard .stepContainer .StepTitle:before, +.wizard .stepContainer .StepTitle:after { + display: table; + content: ""; + line-height: 0; +} +.wizard .stepContainer .StepTitle:after { + clear: both; +} +.wizard ul.anchor { + margin: 0 0 10px; + text-align: center; + background-color: #f5f5f5; + border: 1px solid #dedede; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.wizard ul.anchor li { + margin-left: 20px; + display: inline-block; +} +.wizard ul.anchor li:first-child { + margin: 0; +} +.wizard ul.anchor li a { + display: block; + font-size: 15px; + line-height: 36px; + text-decoration: none; + outline-style: none; + *zoom: 1; + z-index: 99; +} +.wizard ul.anchor li a:before, +.wizard ul.anchor li a:after { + display: table; + content: ""; + line-height: 0; +} +.wizard ul.anchor li a:after { + clear: both; +} +.wizard ul.anchor li a.selected { + color: #e74949; + cursor: text; +} +.wizard ul.anchor li a.done { + color: #e74949; + text-decoration: line-through; +} +.wizard ul.anchor li a.done .stepDesc { + color: #e74949; +} +.wizard ul.anchor li a.disabled { + color: #939699; + cursor: text; +} +.wizard > div.actionBar { + margin-top: 6.666666666666667px; + display: block; + text-align: left; + overflow: auto; + z-index: 88; + *zoom: 1; +} +.wizard > div.actionBar:before, +.wizard > div.actionBar:after { + display: table; + content: ""; + line-height: 0; +} +.wizard > div.actionBar:after { + clear: both; +} +.wizard .buttonDisabled { + cursor: default; + background-color: #e6e6e6; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; + cursor: text !important; +} +.wizard .buttonNext, +.wizard .buttonPrevious, +.wizard .buttonFinish { + display: block; + text-decoration: none; + display: inline-block; + *display: inline; + /* IE7 inline-block hack */ + + *zoom: 1; + padding: 4px 12px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + text-align: center; + vertical-align: middle; + cursor: pointer; + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + *background-color: #e6e6e6; + border: 1px solid #bbbbbb; + *border: 0; + border-bottom-color: #a2a2a2; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + *margin-left: .3em; + -webkit-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05); + padding: 4px 10px; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e75949; + background-image: -moz-linear-gradient(top, #e74949, #e77149); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e74949), to(#e77149)); + background-image: -webkit-linear-gradient(top, #e74949, #e77149); + background-image: -o-linear-gradient(top, #e74949, #e77149); + background-image: linear-gradient(to bottom, #e74949, #e77149); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe74949', endColorstr='#ffe77149', GradientType=0); + border-color: #e77149 #e77149 #c9461b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e77149; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #333333; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #cccccc \9; +} +.wizard .buttonNext:first-child, +.wizard .buttonPrevious:first-child, +.wizard .buttonFinish:first-child { + *margin-left: 0; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + color: #333333; + text-decoration: none; + background-position: 0 -15px; + -webkit-transition: background-position 0.1s linear; + -moz-transition: background-position 0.1s linear; + -o-transition: background-position 0.1s linear; + transition: background-position 0.1s linear; +} +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus { + outline: thin dotted #333; + outline: 5px auto -webkit-focus-ring-color; + outline-offset: -2px; +} +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active { + background-image: none; + outline: 0; + -webkit-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + -moz-box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); + box-shadow: inset 0 2px 4px rgba(0,0,0,.15), 0 1px 2px rgba(0,0,0,.05); +} +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + cursor: default; + background-image: none; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.wizard .buttonNext .label, +.wizard .buttonPrevious .label, +.wizard .buttonFinish .label, +.wizard .buttonNext .badge, +.wizard .buttonPrevious .badge, +.wizard .buttonFinish .badge { + position: relative; + top: -1px; +} +.wizard .buttonNext [class^="awe-"], +.wizard .buttonPrevious [class^="awe-"], +.wizard .buttonFinish [class^="awe-"], +.wizard .buttonNext [class*=" awe-"], +.wizard .buttonPrevious [class*=" awe-"], +.wizard .buttonFinish [class*=" awe-"] { + display: inline; + /* keeps button heights with and without icons the same */ + +} +.wizard .buttonNext [class^="awe-"].awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-large, +.wizard .buttonFinish [class^="awe-"].awe-large, +.wizard .buttonNext [class*=" awe-"].awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-large { + line-height: .9em; +} +.wizard .buttonNext [class^="awe-"].awe-spin, +.wizard .buttonPrevious [class^="awe-"].awe-spin, +.wizard .buttonFinish [class^="awe-"].awe-spin, +.wizard .buttonNext [class*=" awe-"].awe-spin, +.wizard .buttonPrevious [class*=" awe-"].awe-spin, +.wizard .buttonFinish [class*=" awe-"].awe-spin { + display: inline-block; +} +.wizard .buttonNext [class^="awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-left.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-left.awe-2x, +.wizard .buttonNext [class^="awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class^="awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class^="awe-"].pull-right.awe-2x, +.wizard .buttonNext [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonPrevious [class*=" awe-"].pull-right.awe-2x, +.wizard .buttonFinish [class*=" awe-"].pull-right.awe-2x { + margin-top: .18em; +} +.wizard .buttonNext [class^="awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class^="awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class^="awe-"].awe-spin.awe-large, +.wizard .buttonNext [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonPrevious [class*=" awe-"].awe-spin.awe-large, +.wizard .buttonFinish [class*=" awe-"].awe-spin.awe-large { + line-height: .8em; +} +.wizard .buttonNext.btn-mini, +.wizard .buttonPrevious.btn-mini, +.wizard .buttonFinish.btn-mini { + padding: 0px 6px; + font-size: 9.75px; +} +.wizard .buttonNext.btn-small, +.wizard .buttonPrevious.btn-small, +.wizard .buttonFinish.btn-small { + padding: 2px 10px; + font-size: 11.049999999999999px; +} +.wizard .buttonNext.btn-large, +.wizard .buttonPrevious.btn-large, +.wizard .buttonFinish.btn-large { + padding: 11px 19px; + font-size: 15px; +} +.wizard .buttonNext:hover, +.wizard .buttonPrevious:hover, +.wizard .buttonFinish:hover, +.wizard .buttonNext:focus, +.wizard .buttonPrevious:focus, +.wizard .buttonFinish:focus, +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active, +.wizard .buttonNext.disabled, +.wizard .buttonPrevious.disabled, +.wizard .buttonFinish.disabled, +.wizard .buttonNext[disabled], +.wizard .buttonPrevious[disabled], +.wizard .buttonFinish[disabled] { + color: #ffffff; + background-color: #e77149; + *background-color: #e45f32; +} +.wizard .buttonNext:active, +.wizard .buttonPrevious:active, +.wizard .buttonFinish:active, +.wizard .buttonNext.active, +.wizard .buttonPrevious.active, +.wizard .buttonFinish.active { + background-color: #e04e1d \9; +} +.wizard .buttonNext .caret, +.wizard .buttonPrevious .caret, +.wizard .buttonFinish .caret { + border-top-color: #ffffff; + border-bottom-color: #ffffff; +} +.wizard .buttonNext { + float: right; + margin-right: 5px; +} +.wizard .buttonPrevious { + float: left; +} +.wizard .buttonFinish { + float: right; +} +.wizard .loader { + position: relative; + display: none; + float: left; + margin: 2px 0 0 2px; + padding: 8px 10px 8px 40px; + z-index: 998; +} +/* Widgets */ +.widgets { + text-align: center; + list-style: none; + *zoom: 1; +} +.widgets:before, +.widgets:after { + display: table; + content: ""; + line-height: 0; +} +.widgets:after { + clear: both; +} +.widgets > li { + min-height: 90px; + text-align: center; + border-right: 1px dotted #dedede; +} +.widgets > li:last-child { + border-right: none; +} +.widgets > li > a .widget-label { + color: #999999; +} +.widgets > li > a:hover { + text-decoration: none; +} +.widgets > li > a:hover strong { + color: #e74949; +} +.widgets > li .widget-label { + display: block; + margin: 20px 0 5px; + color: #999999; + text-transform: uppercase; +} +.widgets > li strong { + display: block; + color: #525252; + font-size: 19px; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline { + display: block; + margin: 5px auto; +} +.widgets > li .sparkline canvas { + display: block !important; + margin: 0 auto; +} +.widgets > li .sparkline + strong, +.widgets > li .sparkline + a { + color: #525252; + font-size: 13px; + font-weight: normal; + -webkit-transition: color ease 0.3s; + -moz-transition: color ease 0.3s; + -o-transition: color ease 0.3s; + transition: color ease 0.3s; +} +.widgets > li .sparkline + a:hover { + color: #e74949; +} +.ie8 .widgets [class*="span"] { + margin: 0; + width: 150px; +} +.filter-bar .form-inline { + margin-bottom: 0; +} +.filter-bar .form-inline .control-group, +.filter-bar .form-inline .controls { + display: inline-block; +} +.filter-bar .form-inline .control-group { + border-bottom: none; + border-right: 1px dashed #dedede; +} +.filter-bar .form-inline .control-group:last-child { + border-right: none; +} +.filter-bar .form-inline .note-inline { + margin-left: 10px; +} +.filter-bar .form-inline .note-inline:first-child { + margin-left: 0; +} +.filter-bar .form-inline .control-label { + margin: 0 10px 0 0; +} +.filter-bar .form-inline .input-mini { + width: 30px; +} +.breadcrumb { + padding: 0; +} +/* Plugins */ +.has-switch { + display: inline-block; + cursor: pointer; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + border: 1px solid; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + position: relative; + text-align: left; + overflow: hidden; + line-height: 8px; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + min-width: 100px; +} +.has-switch.switch-mini { + min-width: 72px; +} +.has-switch.switch-small { + min-width: 80px; +} +.has-switch.switch-large { + min-width: 120px; +} +.has-switch.deactivate { + opacity: 0.5; + filter: alpha(opacity=50); + cursor: default !important; +} +.has-switch.deactivate label, +.has-switch.deactivate span { + cursor: default !important; +} +.has-switch > div { + display: inline-block; + width: 150%; + position: relative; + top: 0; +} +.has-switch > div.switch-animate { + -webkit-transition: left 0.5s; + -moz-transition: left 0.5s; + -o-transition: left 0.5s; + transition: left 0.5s; +} +.has-switch > div.switch-off { + left: -49%; +} +.has-switch > div.switch-on { + left: 0%; +} +.has-switch input[type=checkbox] { + display: none; +} +.has-switch span, +.has-switch label { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; + cursor: pointer; + position: relative; + display: inline-block; + height: 100%; + padding-bottom: 4px; + padding-top: 4px; + font-size: 14px; + line-height: 20px; +} +.has-switch span.switch-mini, +.has-switch label.switch-mini { + padding-bottom: 4px; + padding-top: 4px; + font-size: 10px; + line-height: 9px; +} +.has-switch span.switch-small, +.has-switch label.switch-small { + padding-bottom: 3px; + padding-top: 3px; + font-size: 12px; + line-height: 18px; +} +.has-switch span.switch-large, +.has-switch label.switch-large { + padding-bottom: 9px; + padding-top: 9px; + font-size: 16px; + line-height: normal; +} +.has-switch label { + margin-top: -1px; + margin-bottom: -1px; + z-index: 100; + width: 34%; + border-left: 1px solid #bbbbbb; + border-right: 1px solid #bbbbbb; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch label:hover, +.has-switch label:focus, +.has-switch label:active, +.has-switch label.active, +.has-switch label.disabled, +.has-switch label[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.has-switch label:active, +.has-switch label.active { + background-color: #cccccc \9; +} +.has-switch span { + text-align: center; + z-index: 1; + width: 33%; +} +.has-switch span.switch-left { + -webkit-border-top-left-radius: 4px; + -moz-border-radius-topleft: 4px; + border-top-left-radius: 4px; + -webkit-border-bottom-left-radius: 4px; + -moz-border-radius-bottomleft: 4px; + border-bottom-left-radius: 4px; +} +.has-switch span.switch-right { + color: #333333; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + background-color: #f0f0f0; + background-image: -moz-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e6e6e6), to(#ffffff)); + background-image: -webkit-linear-gradient(top, #e6e6e6, #ffffff); + background-image: -o-linear-gradient(top, #e6e6e6, #ffffff); + background-image: linear-gradient(to bottom, #e6e6e6, #ffffff); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe6e6e6', endColorstr='#ffffffff', GradientType=0); + border-color: #ffffff #ffffff #d9d9d9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #ffffff; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-right:hover, +.has-switch span.switch-right:focus, +.has-switch span.switch-right:active, +.has-switch span.switch-right.active, +.has-switch span.switch-right.disabled, +.has-switch span.switch-right[disabled] { + color: #333333; + background-color: #ffffff; + *background-color: #f2f2f2; +} +.has-switch span.switch-right:active, +.has-switch span.switch-right.active { + background-color: #e6e6e6 \9; +} +.has-switch span.switch-primary, +.has-switch span.switch-left { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e76149; + background-image: -moz-linear-gradient(top, #e77149, #e74949); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e77149), to(#e74949)); + background-image: -webkit-linear-gradient(top, #e77149, #e74949); + background-image: -o-linear-gradient(top, #e77149, #e74949); + background-image: linear-gradient(to bottom, #e77149, #e74949); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe77149', endColorstr='#ffe74949', GradientType=0); + border-color: #e74949 #e74949 #c91b1b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e74949; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-primary:hover, +.has-switch span.switch-left:hover, +.has-switch span.switch-primary:focus, +.has-switch span.switch-left:focus, +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active, +.has-switch span.switch-primary.disabled, +.has-switch span.switch-left.disabled, +.has-switch span.switch-primary[disabled], +.has-switch span.switch-left[disabled] { + color: #ffffff; + background-color: #e74949; + *background-color: #e43232; +} +.has-switch span.switch-primary:active, +.has-switch span.switch-left:active, +.has-switch span.switch-primary.active, +.has-switch span.switch-left.active { + background-color: #e01d1d \9; +} +.has-switch span.switch-info { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #496ee7; + background-image: -moz-linear-gradient(top, #495fe7, #4986e7); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#495fe7), to(#4986e7)); + background-image: -webkit-linear-gradient(top, #495fe7, #4986e7); + background-image: -o-linear-gradient(top, #495fe7, #4986e7); + background-image: linear-gradient(to bottom, #495fe7, #4986e7); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff495fe7', endColorstr='#ff4986e7', GradientType=0); + border-color: #4986e7 #4986e7 #1b5ec9; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #4986e7; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-info:hover, +.has-switch span.switch-info:focus, +.has-switch span.switch-info:active, +.has-switch span.switch-info.active, +.has-switch span.switch-info.disabled, +.has-switch span.switch-info[disabled] { + color: #ffffff; + background-color: #4986e7; + *background-color: #3277e4; +} +.has-switch span.switch-info:active, +.has-switch span.switch-info.active { + background-color: #1d68e0 \9; +} +.has-switch span.switch-success { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #59821b; + background-image: -moz-linear-gradient(top, #4e7117, #6b9b20); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#4e7117), to(#6b9b20)); + background-image: -webkit-linear-gradient(top, #4e7117, #6b9b20); + background-image: -o-linear-gradient(top, #4e7117, #6b9b20); + background-image: linear-gradient(to bottom, #4e7117, #6b9b20); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff4e7117', endColorstr='#ff6b9b20', GradientType=0); + border-color: #6b9b20 #6b9b20 #3f5c13; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #6b9b20; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-success:hover, +.has-switch span.switch-success:focus, +.has-switch span.switch-success:active, +.has-switch span.switch-success.active, +.has-switch span.switch-success.disabled, +.has-switch span.switch-success[disabled] { + color: #ffffff; + background-color: #6b9b20; + *background-color: #5c861c; +} +.has-switch span.switch-success:active, +.has-switch span.switch-success.active { + background-color: #4e7117 \9; +} +.has-switch span.switch-warning { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f9a123; + background-image: -moz-linear-gradient(top, #f89406, #fbb450); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#f89406), to(#fbb450)); + background-image: -webkit-linear-gradient(top, #f89406, #fbb450); + background-image: -o-linear-gradient(top, #f89406, #fbb450); + background-image: linear-gradient(to bottom, #f89406, #fbb450); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#fff89406', endColorstr='#fffbb450', GradientType=0); + border-color: #fbb450 #fbb450 #f89406; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #fbb450; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-warning:hover, +.has-switch span.switch-warning:focus, +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active, +.has-switch span.switch-warning.disabled, +.has-switch span.switch-warning[disabled] { + color: #ffffff; + background-color: #fbb450; + *background-color: #faa937; +} +.has-switch span.switch-warning:active, +.has-switch span.switch-warning.active { + background-color: #fa9f1e \9; +} +.has-switch span.switch-danger { + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #e32f2f; + background-image: -moz-linear-gradient(top, #e01d1d, #e74949); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#e01d1d), to(#e74949)); + background-image: -webkit-linear-gradient(top, #e01d1d, #e74949); + background-image: -o-linear-gradient(top, #e01d1d, #e74949); + background-image: linear-gradient(to bottom, #e01d1d, #e74949); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffe01d1d', endColorstr='#ffe74949', GradientType=0); + border-color: #e74949 #e74949 #c91b1b; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e74949; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); +} +.has-switch span.switch-danger:hover, +.has-switch span.switch-danger:focus, +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active, +.has-switch span.switch-danger.disabled, +.has-switch span.switch-danger[disabled] { + color: #ffffff; + background-color: #e74949; + *background-color: #e43232; +} +.has-switch span.switch-danger:active, +.has-switch span.switch-danger.active { + background-color: #e01d1d \9; +} +/* jQuery FullCalendar */ +.full-calendar .fc-header { + margin-bottom: 10px; +} +.full-calendar .fc-header h2 { + margin: 0; +} +.full-calendar .fc-content { + background-color: #FFFBEA; +} +.full-calendar .fc-button.fc-state-default { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} +.full-calendar .fc-button.fc-state-default:hover, +.full-calendar .fc-button.fc-state-default:focus, +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active, +.full-calendar .fc-button.fc-state-default.disabled, +.full-calendar .fc-button.fc-state-default[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-default:active, +.full-calendar .fc-button.fc-state-default.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-active { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #525459; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + color: #ffffff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); + background-color: #f5f5f5; + background-image: -moz-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#ffffff), to(#e6e6e6)); + background-image: -webkit-linear-gradient(top, #ffffff, #e6e6e6); + background-image: -o-linear-gradient(top, #ffffff, #e6e6e6); + background-image: linear-gradient(to bottom, #ffffff, #e6e6e6); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffffff', endColorstr='#ffe6e6e6', GradientType=0); + border-color: #e6e6e6 #e6e6e6 #bfbfbf; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + *background-color: #e6e6e6; + /* Darken IE7 buttons by default so they stand out more given they won't have borders */ + + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + cursor: pointer; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + background-image: none; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #e6e6e6; + background-color: #d9d9d9 \9; + outline: 0; +} +.full-calendar .fc-button.fc-state-active:hover, +.full-calendar .fc-button.fc-state-active:focus, +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active, +.full-calendar .fc-button.fc-state-active.disabled, +.full-calendar .fc-button.fc-state-active[disabled] { + color: #ffffff; + background-color: #e6e6e6; + *background-color: #d9d9d9; +} +.full-calendar .fc-button.fc-state-active:active, +.full-calendar .fc-button.fc-state-active.active { + background-color: #cccccc \9; +} +.full-calendar .fc-button.fc-state-disabled { + display: inline-block; + padding: 4px 10px; + margin-bottom: 0; + font-size: 13px; + line-height: 18px; + color: #333333; + text-align: center; + text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); + vertical-align: middle; + border: 1px solid #bbbbbb; + border-bottom-color: #a2a2a2; + position: relative; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; + cursor: default; + background-image: none; + background-color: #e6e6e6; + opacity: 0.65; + filter: alpha(opacity=65); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-state-disabled:active { + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.full-calendar .fc-button.fc-corner-left { + margin-left: 0; + -webkit-border-bottom-left-radius: 3px; + -webkit-border-top-left-radius: 3px; + -moz-border-bottom-left-radius: 3px; + -moz-border-top-left-radius: 3px; + border-bottom-left-radius: 3px; + border-top-left-radius: 3px; +} +.full-calendar .fc-button.fc-corner-right { + -webkit-border-bottom-right-radius: 3px; + -webkit-border-top-right-radius: 3px; + -moz-border-bottom-right-radius: 3px; + -moz-border-top-right-radius: 3px; + border-bottom-right-radius: 3px; + border-top-right-radius: 3px; +} +.full-calendar .fc-state-default .fc-button-inner { + background: transparent; + border-width: 0; +} +.full-calendar .fc-button-content { + line-height: 18px; + height: 18px; + padding: 0; +} +.full-calendar .fc-state-default .fc-button-effect span { + display: none; +} +.full-calendar .fc-state-default, +.full-calendar .fc-state-default .fc-button-inner { + color: #525459; +} +.full-calendar .fc-state-active .fc-button-inner { + color: #525459; +} +.full-calendar .fc-button-content [class^="awe-"], +.full-calendar .fc-button-content [class*=" awe-"] { + font-size: 15px; +} +.full-calendar .fc-state-highlight { + background-color: #ffffff; +} +.full-calendar .fc-widget-header, +.full-calendar .fc-widget-content { + border-color: #dedacb; +} +.full-calendar .fc-widget-header { + padding: 5px 0; + color: #665B4C; +} +/* jQuery FullCalendar event style */ +.full-calendar .fc-event { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar a.fc-event:hover { + text-decoration: none; +} +.full-calendar .fc-event-skin { + border: none; + background-color: #e74949; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.full-calendar .fc-event-skin > span:first-child { + margin-left: 3px; +} +/* jQuery Visualize */ +.visualize { + margin: 50px auto 30px; + margin-bottom: 30px !important; + background-color: transparent; + border: none; + width: 100%; +} +.visualize.visualize-pie { + margin-bottom: 0 !important; +} +.visualize .visualize-info { + border: none; + padding: 0; + font-size: 11.049999999999999px; + right: auto; + left: -10px; + top: -48px; + background-color: transparent; + opacity: 1; + filter: alpha(opacity=100); +} +.visualize .visualize-title { + font-weight: bold; + margin-bottom: 0; + color: #525252; +} +p + table + .visualize { + margin-top: 70px; +} +.visualize .label { + padding: 0; + background-color: transparent; + font-size: 9.75px; + font-weight: normal; + line-height: 14px; + text-shadow: none; + color: #999999; + -webkit-border-radius: none; + -moz-border-radius: none; + border-radius: none; +} +.content .page-container [class*="span"] .visualize { + margin: 20px 0 20px auto; +} +.ie8 .visualize-interaction-tracker { + margin-top: 0 !important; +} +/* jQuery Flot */ +.flot { + margin: 10px auto; + min-height: 280px; + height: 280px; +} +.flot .legend { + padding: 0 2px; +} +.modal-open { + overflow: hidden; +} +.modal-open.page-overflow .page-container, +.modal-open.page-overflow .page-container .navbar-fixed-top, +.modal-open.page-overflow .page-container .navbar-fixed-bottom, +.modal-open.page-overflow .modal-scrollable { + overflow-y: scroll; +} +.modal-scrollable { + position: fixed; + top: 0; + bottom: 0; + left: 0; + right: 0; + overflow: auto; +} +.modal { + outline: none; + position: absolute; + margin-top: 0; + top: 50%; + overflow: visible; +} +.modal.fade { + top: -100%; + -webkit-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -moz-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + -o-transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; + transition: opacity 0.3s linear, top 0.3s ease-out, bottom 0.3s ease-out, margin-top 0.3s ease-out; +} +.modal.fade.in { + top: 50%; +} +.modal.container { + width: 940px; + margin-left: -470px; +} +.modal.modal-absolute { + position: absolute; + z-index: 950; +} +.modal .loading-mask { + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + background: #fff; + border-radius: 6px; +} +.modal-body { + max-height: none; + overflow: visible; +} +.modal-backdrop.modal-absolute { + position: absolute; + z-index: 940; +} +.modal-backdrop, +.modal-backdrop.fade.in { + opacity: 0.7; + filter: alpha(opacity=70); + background: #000; +} +.modal-overflow.modal { + top: 1%; +} +.modal-overflow.modal.fade { + top: -100%; +} +.modal-overflow.modal.fade.in { + top: 1%; +} +.modal-overflow .modal-body { + overflow: auto; + -webkit-overflow-scrolling: touch; +} +@media (min-width: 1200px) { + .modal.container { + width: 1170px; + margin-left: -585px; + } +} +@media (max-width: 979px) { + .modal-open.page-overflow .page-container .navbar-fixed-top, + .modal-open.page-overflow .page-container .navbar-fixed-bottom { + overflow-y: visible; + } + .modal, + .modal.container, + .modal.modal-overflow { + top: 1%; + right: 1%; + left: 1%; + bottom: auto; + width: auto !important; + height: auto !important; + margin: 0 !important; + padding: 0 !important; + } + .modal.fade.in, + .modal.container.fade.in, + .modal.modal-overflow.fade.in { + top: 1%; + bottom: auto; + } + .modal-body, + .modal-overflow .modal-body { + position: static; + margin: 0; + height: auto !important; + max-height: none !important; + overflow: visible !important; + } + .modal-footer, + .modal-overflow .modal-footer { + position: static; + } +} +.loading-spinner { + position: absolute; + top: 50%; + left: 50%; + margin: -12px 0 0 -12px; +} +.animated { + -webkit-animation-duration: 1s; + -moz-animation-duration: 1s; + -o-animation-duration: 1s; + animation-duration: 1s; + -webkit-animation-fill-mode: both; + -moz-animation-fill-mode: both; + -o-animation-fill-mode: both; + animation-fill-mode: both; +} +@-webkit-keyframes shake { + 0%, + 100% { + -webkit-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -webkit-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -webkit-transform: translateX(10px); + } +} +@-moz-keyframes shake { + 0%, + 100% { + -moz-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -moz-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -moz-transform: translateX(10px); + } +} +@-o-keyframes shake { + 0%, + 100% { + -o-transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + -o-transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + -o-transform: translateX(10px); + } +} +@keyframes shake { + 0%, + 100% { + transform: translateX(0); + } + 10%, + 30%, + 50%, + 70%, + 90% { + transform: translateX(-10px); + } + 20%, + 40%, + 60%, + 80% { + transform: translateX(10px); + } +} +.shake { + -webkit-animation-name: shake; + -moz-animation-name: shake; + -o-animation-name: shake; + animation-name: shake; +} +.elfinder { + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} +.elfinder .elfinder-navbar { + height: 100%; + background: #f5f5f5; + border-color: #dedede; +} +.elfinder .elfinder-navbar .ui-state-hover { + background: transparent; + border-color: transparent; +} +.elfinder .elfinder-navbar .ui-state-active { + color: #ffffff; + background: #a6a6a6; + border-color: #999999; +} +.elfinder .elfinder-button-search.elfinder-button { + width: 192px; + margin: 0; +} +.elfinder .elfinder-button-search.elfinder-button input { + margin: 0; + padding-left: 20px; +} +.elfinder .elfinder-button-search.elfinder-button .ui-icon-close { + margin-right: 6.666666666666667px; +} +.elfinder .elfinder-statusbar { + color: #555555; +} +.elfinder .elfinder-statusbar a { + text-decoration: none; + color: #555555; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder .elfinder-cwd table td.ui-state-hover, +.elfinder .elfinder-button-menu .ui-state-hover { + color: #ffffff; + background: #e74949; +} +.elfinder .elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover { + background: #eeeeee; +} +.elfinder .elfinder-cwd table tr { + border-top: 1px dotted #dedede; +} +.elfinder .elfinder-cwd table tr:nth-child(odd) { + background-color: #f8f8f8; +} +.elfinder-disabled .elfinder-navbar .ui-state-active { + color: #eeeeee; + background: #bfbfbf; + border-color: #b3b3b3; +} +.elfinder-disabled .elfinder-cwd-view-icons .elfinder-cwd-file .elfinder-cwd-filename.ui-state-hover, +.elfinder-disabled .elfinder-cwd table td.ui-state-hover { + background: #bfbfbf; +} +.elfinder-contextmenu .ui-state-hover { + background: #3875d7; + color: #fff; +} +.elfinder-contextmenu .ui-state-hover .elfinder-contextmenu-arrow { + background-image: url('../img/arrows-active.png'); +} +#elfinder .elfinder-cwd-view-icons .elfinder-cwd-file { + width: 120px; + height: 95px; +} +.elfinder { + border-color: #dedede; +} +.elfinder .ui-widget-header { + background: #f5f5f5; + border-color: #dedede; + -webkit-border-radius: 2px 2px 0 0; + -moz-border-radius: 2px 2px 0 0; + border-radius: 2px 2px 0 0; +} +/* jQuery DataTables */ +.dataTables_wrapper > .row:first-child, +.dataTables_wrapper > .row-fluid:first-child { + margin-bottom: 10px; +} +.dataTables_wrapper .row [class*="span"], +.dataTables_wrapper .row-fluid [class*="span"] { + margin-bottom: 0; +} +.dataTables_wrapper table.table { + clear: both; + margin-bottom: 10px; +} +.dataTables_wrapper div.dataTables_length label { + float: left; + text-align: left; +} +.dataTables_wrapper div.dataTables_length select { + width: 75px; +} +.dataTables_wrapper div.dataTables_filter label { + float: right; +} +.dataTables_wrapper .dataTables_paginate { + margin: 0; + float: right; +} +.dataTables_wrapper table thead .sorting, +.dataTables_wrapper table thead .sorting_asc, +.dataTables_wrapper table thead .sorting_desc, +.dataTables_wrapper table thead .sorting_asc_disabled, +.dataTables_wrapper table thead .sorting_desc_disabled { + cursor: pointer; + *cursor: hand; +} +.dataTables_wrapper table.table thead .sorting { + background-image: url("../img/plugins/dataTables/sort_both.png"); +} +.dataTables_wrapper table.table thead .sorting_asc { + background-image: url("../img/plugins/dataTables/sort_asc.png"); +} +.dataTables_wrapper table.table thead .sorting_desc { + background-image: url("../img/plugins/dataTables/sort_desc.png"); +} +.dataTables_wrapper table.table thead .sorting_asc_disabled { + background-image: url("../img/plugins/dataTables/sort_asc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-image: url("../img/plugins/dataTables/sort_desc_disabled.png"); +} +.dataTables_wrapper table.table thead .sorting, +.dataTables_wrapper table.table thead .sorting_asc, +.dataTables_wrapper table.table thead .sorting_desc, +.dataTables_wrapper table.table thead .sorting_asc_disabled, +.dataTables_wrapper table.table thead .sorting_desc_disabled { + background-position: center right; + background-repeat: no-repeat; +} +.dataTables_wrapper table.dataTable th:active { + outline: none; +} +.dataTables_wrapper .dataTables_info { + margin-top: 10px; +} +/* jQuery DataTable filter */ +.datatable-controls li { + padding: 3px 15px; +} +/* jQuery Snippet */ +.snippet-container pre .snippet-num, +.snippet-container .snippet-wrap .snippet-num { + margin: 0; +} +.snippet-container pre pre.sh_sourceCode, +.snippet-container .snippet-wrap pre.sh_sourceCode { + margin: 0; + border: 1px solid #bec2c8; + -webkit-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -moz-box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.snippet-container .snippet-menu pre { + border: none; +} +/* jQuery Tags Input */ +div.tagsinput { + padding: 0; + margin: 0; + width: auto !important; + height: auto !important; + color: #555555; + background-color: transparent; + border: none; + -webkit-transition: 'border linear .2s, box-shadow linear .2s'; + -moz-transition: 'border linear .2s, box-shadow linear .2s'; + -o-transition: 'border linear .2s, box-shadow linear .2s'; + transition: 'border linear .2s, box-shadow linear .2s'; +} +div.tagsinput.focused { + outline: 0; + border-color: rgba(0, 0, 0, 0.3); + -webkit-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + -moz-box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); + box-shadow: inset 0 1px 1px rgba(0,0,0,.075), 0 0 5px rgba(0,0,0,.3); +} +div.tagsinput span.tag { + text-shadow: none; + line-height: normal; + padding: 4px; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background: #e74949; + border-color: #e74949; + color: #ffffff; +} +div.tagsinput span.tag a { + color: #ffffff; + opacity: 0.5; + filter: alpha(opacity=50); +} +div.tagsinput span.tag a:hover { + opacity: 1; + filter: alpha(opacity=100); +} +div.tagsinput input { + margin: 0; +} +/* jQuery jWYSIWYG */ +div.wysiwyg { + background: none; + width: auto !important; + border: none; +} +div.wysiwyg .toolbar-container { + padding: 5px; +} +div.wysiwyg iframe { + margin-top: 10px; + background-color: #ffffff; + width: 100% !important; + min-height: 250px; + border: 1px solid #cccccc; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.wysiwyg ul.toolbar { + margin-bottom: 0; + border: none; +} +div.wysiwyg ul.toolbar li { + background-image: url("../img/plugins/jWYSIWYG/jquery.wysiwyg.gif"); +} +/* Bootstrap wysihtml5 */ +.wysihtml5 { + width: 95% !important; +} +ul.wysihtml5-toolbar { + margin-bottom: 0; +} +.wysihtml5-sandbox { + margin-bottom: 0 !important; +} +/* jQuery jGrowl */ +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + color: #ffffff; + background-color: #40444d; + text-shadow: 0 1px 0 rgba(0, 0, 0, 0.5); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + opacity: 0.9; + filter: alpha(opacity=90); +} +div.jGrowl div.jGrowl-closer { + opacity: 0.35; + filter: alpha(opacity=35); + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +div.jGrowl div.jGrowl-closer:hover { + opacity: 0.9; + filter: alpha(opacity=90); + -webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + -moz-box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); + box-shadow: 0 0 3px rgba(0, 0, 0, 0.45); +} +div.jGrowl div.primary { + background-color: #e74949; + color: #ffffff; +} +div.jGrowl div.primary a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.primary a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.danger { + background-color: #e74949; + color: #ffffff; +} +div.jGrowl div.danger a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.danger a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.info { + background-color: #4986e7; + color: #ffffff; +} +div.jGrowl div.info a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.info a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +div.jGrowl div.success { + background-color: #6b9b20; + color: #ffffff; +} +div.jGrowl div.success a { + color: #ffffff; + border-bottom: 1px dotted; +} +div.jGrowl div.success a:hover { + color: #ffffff; + border-bottom: 1px solid; + text-decoration: none; +} +/* Color picker */ +.colorpicker-saturation { + width: 100px; + height: 100px; + background-image: url("../img/plugins/colorpicker/saturation.png"); + cursor: crosshair; + float: left; +} +.colorpicker-saturation i { + display: block; + height: 5px; + width: 5px; + border: 1px solid #000; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + position: absolute; + top: 0; + left: 0; + margin: -4px 0 0 -4px; +} +.colorpicker-saturation i b { + display: block; + height: 5px; + width: 5px; + border: 1px solid #fff; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.colorpicker-hue, +.colorpicker-alpha { + width: 15px; + height: 100px; + float: left; + cursor: row-resize; + margin-left: 4px; + margin-bottom: 4px; +} +.colorpicker-hue i, +.colorpicker-alpha i { + display: block; + height: 1px; + background: #000; + border-top: 1px solid #fff; + position: absolute; + top: 0; + left: 0; + width: 100%; + margin-top: -1px; +} +.colorpicker-hue { + background-image: url("../img/plugins/colorpicker/hue.png"); +} +.colorpicker-alpha { + background-image: url("../img/plugins/colorpicker/alpha.png"); + display: none; +} +.colorpicker { + *zoom: 1; + top: 0; + left: 0; + padding: 4px; + min-width: 120px; +} +.colorpicker:before, +.colorpicker:after { + display: table; + content: ""; + line-height: 0; +} +.colorpicker:after { + clear: both; +} +.colorpicker div { + position: relative; +} +.colorpicker.alpha { + min-width: 140px; +} +.colorpicker.alpha .colorpicker-alpha { + display: block; +} +.colorpicker-color { + height: 10px; + margin-top: 5px; + clear: both; + background-image: url("../img/plugins/colorpicker/alpha.png"); + background-position: 0 100%; +} +.colorpicker-color div { + height: 10px; +} +.input-append.color .add-on i, +.input-prepend.color .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.colorpicker-preview { + display: block; + width: 18px; + height: 18px; +} +/* Date picker */ +.datepicker { + top: 0; + left: 0; + padding: 4px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker:before { + content: ''; + display: inline-block; + border-left: 7px solid transparent; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-bottom-color: rgba(0, 0, 0, 0.2); + position: absolute; + top: -7px; + left: 6px; +} +.datepicker:after { + content: ''; + display: inline-block; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + border-bottom: 6px solid #ffffff; + position: absolute; + top: -6px; + left: 7px; +} +.datepicker > div { + display: none; +} +.datepicker.days div.datepicker-days { + display: block; +} +.datepicker.months div.datepicker-months { + display: block; +} +.datepicker.years div.datepicker-years { + display: block; +} +.datepicker table { + width: 100%; + margin: 0; +} +.datepicker td, +.datepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td { + color: #4d4d4d; +} +.datepicker td.day:hover { + background: #eeeeee; + cursor: pointer; +} +.datepicker td.old, +.datepicker td.new { + color: #999999; +} +.datepicker td.active, +.datepicker td.active:hover { + color: #fff; + background-color: #e74949; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span { + display: block; + width: 47px; + height: 54px; + line-height: 54px; + float: left; + margin: 2px; + cursor: pointer; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} +.datepicker td span:hover { + background: #eeeeee; +} +.datepicker td span.active { + color: #fff; + background-color: #e74949; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} +.datepicker td span.old { + color: #999999; +} +.datepicker th.switch { + width: 145px; +} +.datepicker thead tr:first-child th { + cursor: pointer; +} +.datepicker thead tr:first-child th:hover { + background: #eeeeee; +} +.input-append.date .add-on i, +.input-prepend.date .add-on i { + display: block; + cursor: pointer; + width: 16px; + height: 16px; +} +.datepicker + .add-on .icon-calendar { + font-size: 20px; +} +/* Time picker */ +.bootstrap-timepicker-widget.dropdown-menu { + min-width: 0px; +} +.bootstrap-timepicker-widget table { + width: auto; +} +.bootstrap-timepicker-widget table td { + height: 0; +} +.bootstrap-timepicker-widget table td a { + padding: 0; + width: auto; + display: block; +} +/* Login page style */ +.container.login { + width: 340px; + margin-top: 150px; +} +.container.login .brand { + font: 0/0 a; + color: transparent; + text-shadow: none; + background-color: transparent; + border: 0; + display: block; + width: 114px; + height: 37px; + background-image: url("../img/template_logo.png"); +} +.container.login form { + margin: 0; + border: none; + background-color: transparent; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; +} +.container.login form .control-group { + padding: 0; + border: none; +} +.container.login form .form-actions { + padding: 10px 0 0; +} +.container.login form .form-actions .btn { + padding-left: 20px; + padding-right: 20px; + display: block; + margin: 0 auto; +} +.container.login form input[type="text"], +.container.login form input[type="password"] { + width: 277px; +} +.container.login .login-footer { + text-align: right; + *zoom: 1; +} +.container.login .login-footer:before, +.container.login .login-footer:after { + display: table; + content: ""; + line-height: 0; +} +.container.login .login-footer:after { + clear: both; +} +.container.login .login-footer li { + display: inline-block; +} +/* Error pages */ +.error-page { + background-image: none; + position: static; +} +.error-page .error-container { + width: 90%; + max-width: 600px; + text-align: center; + margin: 80px auto 0; + *zoom: 1; +} +.error-page .error-container:before, +.error-page .error-container:after { + display: table; + content: ""; + line-height: 0; +} +.error-page .error-container:after { + clear: both; +} +.error-page .error-container h1 { + margin: 0; + font-size: 169px; + line-height: normal; + color: #ffffff; + text-shadow: 0 0 10px #ffffff, 0 4px 3px #ffffff, 0 9px 3px #dddddd, 0 12px 1px #cccccc, 0 14px 5px rgba(0, 0, 0, 0.2), 0 20px 10px rgba(0, 0, 0, 0.1), 0 15px 80px rgba(0, 0, 100, 0.2); + -webkit-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -moz-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + -o-transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); + transform: rotate(6.5deg) rotateX(20deg) skewX(-4deg); +} +.error-page .error-container p { + margin: 10px 0 20px; +} +.error-page .error-container p.description { + margin: 10px 0; + font-size: 39px; + line-height: normal; + color: #525252; +} +.no-textshadow .error-page .error-container h1 { + text-shadow: none; + color: #e74949; +} +/* Responsive styles */ +/* Up to landscape phone */ +@media (max-width: 480px) { + #header nav { + float: left; + margin-bottom: 20px; + } +} +/* Landscape phone to small desktop and portrait tablet */ +@media (max-width: 767px) { + #header > h1 { + clear: both; + } + .container, + .content-block, + .navigation-block { + width: auto; + position: static !important; + } + .content-block, + .navigation-block { + float: none; + margin: 0; + } + .row, + .row-fluid { + margin-left: 0; + } + .main-navigation > ul > li:first-child { + margin-top: 6.666666666666667px; + border-top: none; + } + .side-note { + padding: 20px; + background-image: none; + background-color: #fffbea; + border: 1px solid #dedacb; + } + .side-note .side-note-container, + .side-note .side-note-bottom { + padding: 0; + background-image: none; + } + .user-profile figure img { + float: left; + } + .user-profile figure figcaption { + float: left; + } + .content-block [class*="span"], + .content-block .row [class*="span"], + .content-block .row-fluid [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .input-append .add-on, + .input-prepend .add-on, + .input-append .btn, + .input-prepend .btn { + line-height: 20px; + } + .input-append .add-on, + .input-prepend .add-on { + height: 18px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Portrait tablet to default desktop */ +@media (min-width: 768px) and (max-width: 979px) { + .content-block { + width: 464px; + } + #wrapper > .container, + #footer.container { + width: 724px; + } + .row { + margin-left: 0; + } + .data-block[class*="span"] { + width: auto; + } + .content-block > [class*="span"], + .content-block .row > [class*="span"], + .content-block .row-fluid > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .data-block .data-container { + padding: 15px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } +} +/* Tablets and below */ +@media (max-width: 979px) { + .data-block[class*="span"] { + width: auto; + } + .content-block .row > [class*="span"] { + float: none; + display: block; + width: auto; + margin-left: 0; + } + .row, + .row .row, + .row-fluid { + margin-bottom: 0; + } + [class*="span"] { + margin-bottom: 20px; + } + .data-block .data-container { + padding: 15px; + } + .data-block .thumbnails li img { + width: 100%; + } + .form-horizontal .control-label { + float: none; + } + .form-horizontal .controls { + margin-left: 0; + } + .form-horizontal .form-actions { + padding-left: 20px; + } + .content-block .input-append input[class*="span"], + .content-block .input-prepend input[class*="span"], + .content-block .uneditable-input[class*="span"] { + display: inline-block; + } + .uneditable-input { + min-height: 20px; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + border: none; + } +} +/* Default desktop */ +@media (min-width: 980px) and (max-width: 1199px) { + .content-block { + width: 700px; + } + #wrapper > .container, + #footer.container { + width: 940px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 700px; + } + .span12 { + width: 700px; + } + .span11 { + width: 640px; + } + .span10 { + width: 580px; + } + .span9 { + width: 520px; + } + .span8 { + width: 460px; + } + .span7 { + width: 400px; + } + .span6 { + width: 340px; + } + .span5 { + width: 280px; + } + .span4 { + width: 220px; + } + .span3 { + width: 160px; + } + .span2 { + width: 100px; + } + .span1 { + width: 40px; + } + .offset12 { + margin-left: 740px; + } + .offset11 { + margin-left: 680px; + } + .offset10 { + margin-left: 620px; + } + .offset9 { + margin-left: 560px; + } + .offset8 { + margin-left: 500px; + } + .offset7 { + margin-left: 440px; + } + .offset6 { + margin-left: 380px; + } + .offset5 { + margin-left: 320px; + } + .offset4 { + margin-left: 260px; + } + .offset3 { + margin-left: 200px; + } + .offset2 { + margin-left: 140px; + } + .offset1 { + margin-left: 80px; + } + .data-block .row .row { + margin-left: -20px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 652px; + } + .data-block .row .span12 { + width: 652px; + } + .data-block .row .span11 { + width: 596px; + } + .data-block .row .span10 { + width: 540px; + } + .data-block .row .span9 { + width: 484px; + } + .data-block .row .span8 { + width: 428px; + } + .data-block .row .span7 { + width: 372px; + } + .data-block .row .span6 { + width: 316px; + } + .data-block .row .span5 { + width: 260px; + } + .data-block .row .span4 { + width: 204px; + } + .data-block .row .span3 { + width: 148px; + } + .data-block .row .span2 { + width: 92px; + } + .data-block .row .span1 { + width: 36px; + } + .data-block .row .offset12 { + margin-left: 692px; + } + .data-block .row .offset11 { + margin-left: 636px; + } + .data-block .row .offset10 { + margin-left: 580px; + } + .data-block .row .offset9 { + margin-left: 524px; + } + .data-block .row .offset8 { + margin-left: 468px; + } + .data-block .row .offset7 { + margin-left: 412px; + } + .data-block .row .offset6 { + margin-left: 356px; + } + .data-block .row .offset5 { + margin-left: 300px; + } + .data-block .row .offset4 { + margin-left: 244px; + } + .data-block .row .offset3 { + margin-left: 188px; + } + .data-block .row .offset2 { + margin-left: 132px; + } + .data-block .row .offset1 { + margin-left: 76px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .form-horizontal .control-label { + width: 90px; + } + .form-horizontal .controls { + margin-left: 100px; + } + .form-horizontal .form-actions { + padding-left: 120px; + } + .btn-toolbar .btn-group { + margin: 2px 0; + } + .filter-bar .form-inline { + margin-bottom: 0; + } + .filter-bar .form-inline .control-group { + padding: 11px 19px; + display: block; + border-right: none; + border-bottom: 1px dashed #dedede; + } + .filter-bar .form-inline .control-group:last-child { + border-bottom: none; + } + .widgets > li { + margin: 0; + } +} +/* Large desktop */ +@media (min-width: 1200px) { + .content-block { + width: 930px; + } + #wrapper .container, + #footer.container { + width: 1170px; + } + .row { + margin-left: -20px; + *zoom: 1; + } + .row:before, + .row:after { + display: table; + content: ""; + line-height: 0; + } + .row:after { + clear: both; + } + [class*="span"] { + float: left; + min-height: 1px; + margin-left: 20px; + } + .container, + .navbar-static-top .container, + .navbar-fixed-top .container, + .navbar-fixed-bottom .container { + width: 928px; + } + .span12 { + width: 928px; + } + .span11 { + width: 849px; + } + .span10 { + width: 770px; + } + .span9 { + width: 691px; + } + .span8 { + width: 612px; + } + .span7 { + width: 533px; + } + .span6 { + width: 454px; + } + .span5 { + width: 375px; + } + .span4 { + width: 296px; + } + .span3 { + width: 217px; + } + .span2 { + width: 138px; + } + .span1 { + width: 59px; + } + .offset12 { + margin-left: 968px; + } + .offset11 { + margin-left: 889px; + } + .offset10 { + margin-left: 810px; + } + .offset9 { + margin-left: 731px; + } + .offset8 { + margin-left: 652px; + } + .offset7 { + margin-left: 573px; + } + .offset6 { + margin-left: 494px; + } + .offset5 { + margin-left: 415px; + } + .offset4 { + margin-left: 336px; + } + .offset3 { + margin-left: 257px; + } + .offset2 { + margin-left: 178px; + } + .offset1 { + margin-left: 99px; + } + .data-block .row .row { + margin-left: -21px; + *zoom: 1; + } + .data-block .row .row:before, + .data-block .row .row:after { + display: table; + content: ""; + line-height: 0; + } + .data-block .row .row:after { + clear: both; + } + .data-block .row [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .data-block .row .container, + .data-block .row .navbar-static-top .container, + .data-block .row .navbar-fixed-top .container, + .data-block .row .navbar-fixed-bottom .container { + width: 879px; + } + .data-block .row .span12 { + width: 879px; + } + .data-block .row .span11 { + width: 804px; + } + .data-block .row .span10 { + width: 729px; + } + .data-block .row .span9 { + width: 654px; + } + .data-block .row .span8 { + width: 579px; + } + .data-block .row .span7 { + width: 504px; + } + .data-block .row .span6 { + width: 429px; + } + .data-block .row .span5 { + width: 354px; + } + .data-block .row .span4 { + width: 279px; + } + .data-block .row .span3 { + width: 204px; + } + .data-block .row .span2 { + width: 129px; + } + .data-block .row .span1 { + width: 54px; + } + .data-block .row .offset12 { + margin-left: 921px; + } + .data-block .row .offset11 { + margin-left: 846px; + } + .data-block .row .offset10 { + margin-left: 771px; + } + .data-block .row .offset9 { + margin-left: 696px; + } + .data-block .row .offset8 { + margin-left: 621px; + } + .data-block .row .offset7 { + margin-left: 546px; + } + .data-block .row .offset6 { + margin-left: 471px; + } + .data-block .row .offset5 { + margin-left: 396px; + } + .data-block .row .offset4 { + margin-left: 321px; + } + .data-block .row .offset3 { + margin-left: 246px; + } + .data-block .row .offset2 { + margin-left: 171px; + } + .data-block .row .offset1 { + margin-left: 96px; + } + .data-block .row, + .data-block .row .row, + .data-block .row-fluid { + margin-left: 0; + } + .data-block .row > [class*="span"]:first-child { + margin-left: 0; + } + .table [class*="span"] { + margin-left: 0; + float: none; + } + .thumbnails { + margin-left: -21px; + } + .thumbnails .row { + margin-left: -21px; + *zoom: 1; + } + .thumbnails .row:before, + .thumbnails .row:after { + display: table; + content: ""; + line-height: 0; + } + .thumbnails .row:after { + clear: both; + } + .thumbnails [class*="span"] { + float: left; + min-height: 1px; + margin-left: 21px; + } + .thumbnails .container, + .thumbnails .navbar-static-top .container, + .thumbnails .navbar-fixed-top .container, + .thumbnails .navbar-fixed-bottom .container { + width: 879px; + } + .thumbnails .span12 { + width: 879px; + } + .thumbnails .span11 { + width: 804px; + } + .thumbnails .span10 { + width: 729px; + } + .thumbnails .span9 { + width: 654px; + } + .thumbnails .span8 { + width: 579px; + } + .thumbnails .span7 { + width: 504px; + } + .thumbnails .span6 { + width: 429px; + } + .thumbnails .span5 { + width: 354px; + } + .thumbnails .span4 { + width: 279px; + } + .thumbnails .span3 { + width: 204px; + } + .thumbnails .span2 { + width: 129px; + } + .thumbnails .span1 { + width: 54px; + } + .thumbnails .offset12 { + margin-left: 921px; + } + .thumbnails .offset11 { + margin-left: 846px; + } + .thumbnails .offset10 { + margin-left: 771px; + } + .thumbnails .offset9 { + margin-left: 696px; + } + .thumbnails .offset8 { + margin-left: 621px; + } + .thumbnails .offset7 { + margin-left: 546px; + } + .thumbnails .offset6 { + margin-left: 471px; + } + .thumbnails .offset5 { + margin-left: 396px; + } + .thumbnails .offset4 { + margin-left: 321px; + } + .thumbnails .offset3 { + margin-left: 246px; + } + .thumbnails .offset2 { + margin-left: 171px; + } + .thumbnails .offset1 { + margin-left: 96px; + } + .thumbnails li { + margin-bottom: 21px; + margin-left: 21px; + } + .form-horizontal .control-label { + width: 160px; + } + .form-horizontal .controls { + margin-left: 180px; + } + .form-horizontal .form-actions { + padding-left: 200px; + } + .widgets > li { + margin: 0; + } +} +/* Demo styles */ +.data-block .row-fluid.demo, +.data-block .row.demo { + color: #fff; + line-height: 30px; + min-height: 30px; + text-align: center; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; +} +.data-block .row-fluid.demo:last-child, +.data-block .row.demo:last-child { + margin-bottom: 0; +} +.data-block .row-fluid.demo > div, +.data-block .row.demo > div { + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #4A525A; +} +.data-block .row-fluid.demo > div > .row > div, +.data-block .row.demo > div > .row > div, +.data-block .row-fluid.demo > div > .row-fluid > div, +.data-block .row.demo > div > .row-fluid > div { + margin-bottom: 0; + -webkit-border-radius: 3px; + -moz-border-radius: 3px; + border-radius: 3px; + background-color: #657078; +} +.demo > input, +.demo > select { + display: block !important; + margin-bottom: 10px; +} +.navigation-block > a { + margin: 0 0 20px; +} +.navigation-block > a span { + font-size: 11.049999999999999px; +} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/logos.css b/src/bb-themes/huraga/assets/css/logos.css new file mode 100644 index 000000000..398e4ec8d --- /dev/null +++ b/src/bb-themes/huraga/assets/css/logos.css @@ -0,0 +1,96 @@ +.logo-AlertPay{ + background: transparent url("../img/gateway_logos/alertpay.png") no-repeat scroll 0% 0%; + background-size: contain; + width:120px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-AliPay{ + background: transparent url("../img/gateway_logos/alipay.png") no-repeat scroll 0% 0%; + background-size: contain; + width:85px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-AuthorizeNet{ + background: transparent url("../img/gateway_logos/authorizenet.png") no-repeat scroll 0% 0%; + background-size: contain; + width:100px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-BluePay{ + background: transparent url("../img/gateway_logos/bluepay.png") no-repeat scroll 0% 0%; + background-size: contain; + width:90px; + height: 30px; + border: 0; + margin: 10px; +} +.logo-Custom{ + background: transparent url("../img/gateway_logos/custom.png") no-repeat scroll 0% 0%; + background-size: contain; + width:50px; + height: 50px; + border: 0; + margin: 10px; +} +.logo-Interkassa{ + background: transparent url("../img/gateway_logos/interkassa.png") no-repeat scroll 0% 0%; + background-size: contain; + width:100px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-Onebip{ + background: transparent url("../img/gateway_logos/onebip.png") no-repeat scroll 0% 0%; + background-size: contain; + width:100px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-PayPalEmail{ + background: transparent url("../img/gateway_logos/paypal.png") no-repeat scroll 0% 0%; + background-size: contain; + width:85px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-Payza{ + background: transparent url("../img/gateway_logos/payza.png") no-repeat scroll 0% 0%; + background-size: contain; + width:100px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-TwoCheckout{ + background: transparent url("../img/gateway_logos/twocheckout.png") no-repeat scroll 0% 0%; + background-size: contain; + width:80px; + height: 28px; + border: 0; + margin: 10px; +} +.logo-WebMoney{ + background: transparent url("../img/gateway_logos/webmoney.jpg") no-repeat scroll 0% 0%; + background-size: contain; + width:85px; + height: 25px; + border: 0; + margin: 10px; +} +.logo-WebToPay{ + background: transparent url("../img/gateway_logos/webtopay.png") no-repeat scroll 0% 0%; + background-size: contain; + width:135px; + height: 25px; + border: 0; + margin: 10px; +} diff --git a/src/bb-themes/huraga/assets/css/plugins/bootstrap-timepicker.css b/src/bb-themes/huraga/assets/css/plugins/bootstrap-timepicker.css new file mode 100644 index 000000000..873e0c723 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/bootstrap-timepicker.css @@ -0,0 +1,121 @@ +/*! + * Timepicker Component for Twitter Bootstrap + * + * Copyright 2013 Joris de Wit + * + * Contributors https://github.com/jdewit/bootstrap-timepicker/graphs/contributors + * + * For the full copyright and license information, please view the LICENSE + * file that was distributed with this source code. + */ +.bootstrap-timepicker { + position: relative; +} +.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu { + left: auto; + right: 0; +} +.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:before { + left: auto; + right: 12px; +} +.bootstrap-timepicker.pull-right .bootstrap-timepicker-widget.dropdown-menu:after { + left: auto; + right: 13px; +} +.bootstrap-timepicker .add-on { + cursor: pointer; +} +.bootstrap-timepicker .add-on i { + display: inline-block; + width: 16px; + height: 16px; +} +.bootstrap-timepicker-widget.dropdown-menu { + padding: 2px 3px 2px 2px; +} +.bootstrap-timepicker-widget.dropdown-menu.open { + display: inline-block; +} +.bootstrap-timepicker-widget.dropdown-menu:before { + border-bottom: 7px solid rgba(0, 0, 0, 0.2); + border-left: 7px solid transparent; + border-right: 7px solid transparent; + content: ""; + display: inline-block; + left: 9px; + position: absolute; + top: -7px; +} +.bootstrap-timepicker-widget.dropdown-menu:after { + border-bottom: 6px solid #FFFFFF; + border-left: 6px solid transparent; + border-right: 6px solid transparent; + content: ""; + display: inline-block; + left: 10px; + position: absolute; + top: -6px; +} +.bootstrap-timepicker-widget a.btn, +.bootstrap-timepicker-widget input { + border-radius: 4px; +} +.bootstrap-timepicker-widget table { + width: 100%; + margin: 0; +} +.bootstrap-timepicker-widget table td { + text-align: center; + height: 30px; + margin: 0; + padding: 2px; +} +.bootstrap-timepicker-widget table td:not(.separator) { + min-width: 30px; +} +.bootstrap-timepicker-widget table td span { + width: 100%; +} +.bootstrap-timepicker-widget table td a { + border: 1px transparent solid; + width: 100%; + display: inline-block; + margin: 0; + padding: 8px 0; + outline: 0; + color: #333; +} +.bootstrap-timepicker-widget table td a:hover { + text-decoration: none; + background-color: #eee; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + border-color: #ddd; +} +.bootstrap-timepicker-widget table td a i { + margin-top: 2px; +} +.bootstrap-timepicker-widget table td input { + width: 25px; + margin: 0; + text-align: center; +} +.bootstrap-timepicker-widget .modal-content { + padding: 4px; +} +@media (min-width: 767px) { + .bootstrap-timepicker-widget.modal { + width: 200px; + margin-left: -100px; + } +} +@media (max-width: 767px) { + .bootstrap-timepicker { + width: 100%; + } + .bootstrap-timepicker .dropdown-menu { + width: 100%; + } +} diff --git a/src/bb-themes/huraga/assets/css/plugins/bootstrap-wysihtml5.css b/src/bb-themes/huraga/assets/css/plugins/bootstrap-wysihtml5.css new file mode 100644 index 000000000..934c51530 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/bootstrap-wysihtml5.css @@ -0,0 +1,44 @@ +ul.wysihtml5-toolbar { + margin: 0; + padding: 0; + display: block; +} + +ul.wysihtml5-toolbar::after { + clear: both; + display: table; + content: ""; +} + +ul.wysihtml5-toolbar > li { + float: left; + display: list-item; + list-style: none; + margin: 0 5px 10px 0; +} + +ul.wysihtml5-toolbar a[data-wysihtml5-command=bold] { + font-weight: bold; +} + +ul.wysihtml5-toolbar a[data-wysihtml5-command=italic] { + font-style: italic; +} + +ul.wysihtml5-toolbar a[data-wysihtml5-command=underline] { + text-decoration: underline; +} + +ul.wysihtml5-toolbar a.btn.wysihtml5-command-active { + background-image: none; + -webkit-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); + -moz-box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); + box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15),0 1px 2px rgba(0, 0, 0, 0.05); + background-color: #E6E6E6; + background-color: #D9D9D9 9; + outline: 0; +} + +ul.wysihtml5-commands-disabled .dropdown-menu { + display: none !important; +} diff --git a/src/bb-themes/huraga/assets/css/plugins/daterangepicker.css b/src/bb-themes/huraga/assets/css/plugins/daterangepicker.css new file mode 100644 index 000000000..70bbf55c7 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/daterangepicker.css @@ -0,0 +1,213 @@ +.daterangepicker.dropdown-menu { + max-width: none; +} + +.daterangepicker.opensleft .ranges, .daterangepicker.opensleft .calendar { + float: left; + margin: 4px; +} + +.daterangepicker.opensright .ranges, .daterangepicker.opensright .calendar { + float: right; + margin: 4px; +} + +.daterangepicker .ranges { + width: 160px; + text-align: left; +} + +.daterangepicker .ranges .range_inputs>div { + float: left; +} + +.daterangepicker .ranges .range_inputs>div:nth-child(2) { + padding-left: 11px; +} + +.daterangepicker .calendar { + display: none; + max-width: 230px; +} + +.daterangepicker .calendar th, .daterangepicker .calendar td { + font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; + white-space: nowrap; + text-align: center; +} + +.daterangepicker .ranges label { + color: #333; + font-size: 11px; + margin-bottom: 2px; + text-transform: uppercase; + text-shadow: 1px 1px 0 #fff; +} + +.daterangepicker .ranges input { + font-size: 11px; +} + +.daterangepicker .ranges ul { + list-style: none; + margin: 0; + padding: 0; +} + +.daterangepicker .ranges li { + font-size: 13px; + background: #f5f5f5; + border: 1px solid #f5f5f5; + color: #08c; + padding: 3px 12px; + margin-bottom: 8px; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + cursor: pointer; +} + +.daterangepicker .ranges li.active, .daterangepicker .ranges li:hover { + background: #08c; + border: 1px solid #08c; + color: #fff; +} + +.daterangepicker .calendar { + border: 1px solid #ddd; + padding: 4px; + border-radius: 4px; + background: #fff; +} + +.daterangepicker { + position: absolute; + background: #fff; + top: 100px; + left: 20px; + padding: 4px; + margin-top: 1px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; +} + +.daterangepicker.opensleft:before { + position: absolute; + top: -7px; + right: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensleft:after { + position: absolute; + top: -6px; + right: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker.opensright:before { + position: absolute; + top: -7px; + left: 9px; + display: inline-block; + border-right: 7px solid transparent; + border-bottom: 7px solid #ccc; + border-left: 7px solid transparent; + border-bottom-color: rgba(0, 0, 0, 0.2); + content: ''; +} + +.daterangepicker.opensright:after { + position: absolute; + top: -6px; + left: 10px; + display: inline-block; + border-right: 6px solid transparent; + border-bottom: 6px solid #fff; + border-left: 6px solid transparent; + content: ''; +} + +.daterangepicker table { + width: 100%; + margin: 0; +} + +.daterangepicker td, .daterangepicker th { + text-align: center; + width: 20px; + height: 20px; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + border-radius: 4px; + cursor: pointer; + white-space: nowrap; +} + +.daterangepicker td.off { + color: #999; +} + +.daterangepicker td.disabled { + color: #999; +} + +.daterangepicker td.available:hover, .daterangepicker th.available:hover { + background: #eee; +} + +.daterangepicker td.in-range { + background: #ebf4f8; + -webkit-border-radius: 0; + -moz-border-radius: 0; + border-radius: 0; +} + +.daterangepicker td.active, .daterangepicker td.active:hover { + background-color: #006dcc; + background-image: -moz-linear-gradient(top, #0088cc, #0044cc); + background-image: -ms-linear-gradient(top, #0088cc, #0044cc); + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0044cc)); + background-image: -webkit-linear-gradient(top, #0088cc, #0044cc); + background-image: -o-linear-gradient(top, #0088cc, #0044cc); + background-image: linear-gradient(top, #0088cc, #0044cc); + background-repeat: repeat-x; + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0088cc', endColorstr='#0044cc', GradientType=0); + border-color: #0044cc #0044cc #002a80; + border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25); + filter: progid:DXImageTransform.Microsoft.gradient(enabled = false); + color: #fff; + text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25); +} + +.daterangepicker td.week, .daterangepicker th.week { + font-size: 80%; + color: #ccc; +} + +.daterangepicker select.monthselect, .daterangepicker select.yearselect { + font-size: 12px; + padding: 1px; + height: auto; + margin: 0; + cursor: default; +} + +.daterangepicker select.monthselect { + margin-right: 2%; + width: 56%; +} + +.daterangepicker select.yearselect { + width: 40%; +} diff --git a/src/bb-themes/huraga/assets/css/plugins/elfinder.min.css b/src/bb-themes/huraga/assets/css/plugins/elfinder.min.css new file mode 100644 index 000000000..4914ea475 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/elfinder.min.css @@ -0,0 +1,9 @@ +/*! + * elFinder - file manager for web + * Version 2.0 rc1 (2012-04-10) + * http://elfinder.org + * + * Copyright 2009-2012, Studio 42 + * Licensed under a 3 clauses BSD license + */ +.elfinder-dialog-resize{margin-top:.3em}.elfinder-resize-type{float:left;margin-bottom:.4em}.elfinder-resize-control{padding-top:3em}.elfinder-resize-control input[type=text]{border:1px solid #aaa;text-align:right}.elfinder-resize-preview{width:400px;height:400px;padding:10px;background:#fff;border:1px solid #aaa;float:right;position:relative;overflow:auto}.elfinder-resize-handle{position:relative}.elfinder-resize-handle-hline,.elfinder-resize-handle-vline{position:absolute;background-image:url("../../img/plugins/elFinder/crop.gif")}.elfinder-resize-handle-hline{width:100%;height:1px!important;background-repeat:repeat-x}.elfinder-resize-handle-vline{width:1px!important;height:100%;background-repeat:repeat-y}.elfinder-resize-handle-hline-top{top:0;left:0}.elfinder-resize-handle-hline-bottom{bottom:0;left:0}.elfinder-resize-handle-vline-left{top:0;left:0}.elfinder-resize-handle-vline-right{top:0;right:0}.elfinder-resize-handle-point{position:absolute;width:8px;height:8px;border:1px solid #777;background:0 0}.elfinder-resize-handle-point-n{top:0;left:50%;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-ne{top:0;right:0;margin-top:-5px;margin-right:-5px}.elfinder-resize-handle-point-e{top:50%;right:0;margin-top:-5px;margin-right:-5px}.elfinder-resize-handle-point-se{bottom:0;right:0;margin-bottom:-5px;margin-right:-5px}.elfinder-resize-handle-point-s{bottom:0;left:50%;margin-bottom:-5px;margin-left:-5px}.elfinder-resize-handle-point-sw{bottom:0;left:0;margin-bottom:-5px;margin-left:-5px}.elfinder-resize-handle-point-w{top:50%;left:0;margin-top:-5px;margin-left:-5px}.elfinder-resize-handle-point-nw{top:0;left:0;margin-top:-5px;margin-left:-5px}.elfinder-resize-spinner{position:absolute;width:200px;height:30px;top:50%;margin-top:-25px;left:50%;margin-left:-100px;text-align:center;background:url(../../img/plugins/elFinder/progress.gif) center bottom repeat-x}.elfinder-resize-row{margin-bottom:7px;position:relative}.elfinder-resize-label{float:left;width:80px;padding-top:3px}.elfinder-resize-reset{width:16px;height:16px;position:absolute;margin-top:-8px}.elfinder-dialog .elfinder-dialog-resize .ui-resizable-e{height:100%;width:10px}.elfinder-dialog .elfinder-dialog-resize .ui-resizable-s{width:100%;height:10px}.elfinder-dialog .elfinder-dialog-resize .ui-resizable-se{background:0 0;bottom:0;right:0;margin-right:-7px;margin-bottom:-7px}.elfinder-dialog-resize .ui-icon-grip-solid-vertical{position:absolute;top:50%;right:0;margin-top:-8px;margin-right:-11px}.elfinder-dialog-resize .ui-icon-grip-solid-horizontal{position:absolute;left:50%;bottom:0;margin-left:-8px;margin-bottom:-11px}.elfinder-resize-row .elfinder-buttonset{float:right}.elfinder-resize-rotate-slider{float:left;width:195px;margin:7px 7px 0}.elfinder-file-edit{width:99%;height:99%;margin:0;padding:2px;border:1px solid #ccc}.elfinder-help{margin-bottom:.5em}.elfinder-help .ui-tabs-panel{padding:.5em}.elfinder-dialog .ui-tabs .ui-tabs-nav li a{padding:.2em 1em}.elfinder-help-shortcuts{height:300px;padding:1em;margin:.5em 0;overflow:auto}.elfinder-help-shortcut{white-space:nowrap;clear:both}.elfinder-help-shortcut-pattern{float:left;width:160px}.elfinder-help-logo{width:100px;height:96px;float:left;margin-right:1em;background:url('../../img/plugins/elFinder/logo.png') center center no-repeat}.elfinder-help h3{font-size:1.5em;margin:.2em 0 .3em}.elfinder-help-separator{clear:both;padding:.5em}.elfinder-help-link{padding:2px}.elfinder-help .ui-priority-secondary{font-size:.9em}.elfinder-help .ui-priority-primary{margin-bottom:7px}.elfinder-help-team{clear:both;text-align:right;border-bottom:1px solid #ccc;margin:.5em 0;font-size:.9em}.elfinder-help-team div{float:left}.elfinder-help-license{font-size:.9em}.elfinder-help-disabled{font-weight:700;text-align:center;margin:90px 0}.elfinder-help .elfinder-dont-panic{display:block;border:1px solid transparent;width:200px;height:200px;margin:30px auto;text-decoration:none;text-align:center;position:relative;background:#d90004;-moz-box-shadow:5px 5px 9px #111;-webkit-box-shadow:5px 5px 9px #111;box-shadow:5px 5px 9px #111;background:-moz-radial-gradient(80px 80px,circle farthest-corner,#d90004 35%,#960004 100%);background:-webkit-gradient(radial,80 80,60,80 80,120,from(#d90004),to(#960004));-moz-border-radius:100px;-webkit-border-radius:100px;border-radius:100px;outline:none}.elfinder-help .elfinder-dont-panic span{font-size:3em;font-weight:700;text-align:center;color:#fff;position:absolute;left:0;top:45px}.elfinder{padding:0;position:relative;display:block}.elfinder-rtl{text-align:right;direction:rtl}.elfinder-workzone{padding:0;position:relative;overflow:hidden}.elfinder-perms,.elfinder-symlink{position:absolute;width:16px;height:16px;background-image:url(../../img/plugins/elFinder/toolbar.png);background-repeat:no-repeat;background-position:0 -528px}.elfinder-na .elfinder-perms{background-position:0 -96px}.elfinder-ro .elfinder-perms{background-position:0 -64px}.elfinder-wo .elfinder-perms{background-position:0 -80px}.elfinder-drag-helper{width:60px;height:50px;padding:0 0 0 25px;z-index:100000}.elfinder-drag-helper-icon-plus{position:absolute;width:16px;height:16px;left:43px;top:55px;background:url('../../img/plugins/elFinder/toolbar.png') 0 -544px no-repeat;display:none}.elfinder-drag-helper-plus .elfinder-drag-helper-icon-plus{display:block}.elfinder-drag-num{position:absolute;top:0;left:0;width:16px;height:14px;text-align:center;padding-top:2px;font-size:12px;font-weight:700;color:#fff;background-color:red;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-drag-helper .elfinder-cwd-icon{margin:0 0 0 -24px;float:left}.elfinder-overlay{opacity:0;filter:Alpha(Opacity=0)}.elfinder .elfinder-panel{position:relative;background-image:none;padding:7px 12px}.elfinder-contextmenu,.elfinder-contextmenu-sub{display:none;position:absolute;border:1px solid #aaa;background:#fff;color:#555;padding:4px 0}.elfinder-contextmenu-sub{top:5px}.elfinder-contextmenu-ltr .elfinder-contextmenu-sub{margin-left:-5px}.elfinder-contextmenu-rtl .elfinder-contextmenu-sub{margin-right:-5px}.elfinder-contextmenu-item{position:relative;display:block;padding:4px 30px;text-decoration:none;white-space:nowrap;cursor:default}.elfinder-contextmenu .elfinder-contextmenu-item span{font-size:.76em;display:block}.elfinder-contextmenu-ltr .elfinder-contextmenu-item{text-align:left}.elfinder-contextmenu-rtl .elfinder-contextmenu-item{text-align:right}.elfinder-contextmenu-ltr .elfinder-contextmenu-sub .elfinder-contextmenu-item{padding-left:12px}.elfinder-contextmenu-rtl .elfinder-contextmenu-sub .elfinder-contextmenu-item{padding-right:12px}.elfinder-contextmenu-arrow,.elfinder-contextmenu-icon{position:absolute;top:50%;margin-top:-8px}.elfinder-contextmenu-ltr .elfinder-contextmenu-icon{left:8px}.elfinder-contextmenu-rtl .elfinder-contextmenu-icon{right:8px}.elfinder-contextmenu-arrow{width:16px;height:16px;background:url('../../img/plugins/elFinder/arrows-normal.png') 5px 4px no-repeat}.elfinder-contextmenu-ltr .elfinder-contextmenu-arrow{right:5px}.elfinder-contextmenu-rtl .elfinder-contextmenu-arrow{left:5px;background-position:0 -10px}.elfinder-contextmenu .ui-state-hover{border:0 solid;background-image:none}.elfinder-contextmenu-separator{height:0;border-top:1px solid #ccc;margin:0 1px}.elfinder-cwd-wrapper{overflow:auto;position:relative;padding:2px;margin:0}.elfinder-cwd-wrapper-list{padding:0}.elfinder-cwd{position:relative;font-size:.7em;cursor:default;padding:0;margin:0;-moz-user-select:-moz-none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.elfinder .elfinder-cwd-wrapper.elfinder-droppable-active{padding:0;border:2px solid #8cafed}.elfinder-cwd-view-icons .elfinder-cwd-file{width:120px;height:80px;padding-bottom:2px;cursor:default;overflow:hidden}.elfinder-ltr .elfinder-cwd-view-icons .elfinder-cwd-file{float:left;margin:0 3px 12px 0}.elfinder-rtl .elfinder-cwd-view-icons .elfinder-cwd-file{float:right;margin:0 0 5px 3px}.elfinder-cwd-view-icons .elfinder-cwd-file .ui-state-hover{border:0 solid}.elfinder-cwd-view-icons .elfinder-cwd-file-wrapper{width:52px;height:52px;margin:1px auto;padding:2px;position:relative}.elfinder-cwd-view-icons .elfinder-cwd-filename{text-align:center;white-space:pre;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis;margin:3px 1px 0;padding:1px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}.elfinder-cwd-view-icons .elfinder-perms{bottom:4px;right:2px}.elfinder-cwd-view-icons .elfinder-symlink{bottom:6px;left:0}.elfinder-cwd-icon{display:block;width:48px;height:48px;margin:0 auto;background:url('../../img/plugins/elFinder/icons-big.png') 0 0 no-repeat;-moz-background-clip:padding;-webkit-background-clip:padding-box;background-clip:padding-box}.elfinder-cwd .elfinder-droppable-active .elfinder-cwd-icon{background-position:0 -100px}.elfinder-cwd-icon-directory{background-position:0 -50px}.elfinder-cwd-icon-application{background-position:0 -150px}.elfinder-cwd-icon-x-empty,.elfinder-cwd-icon-text{background-position:0 -200px}.elfinder-cwd-icon-image,.elfinder-cwd-icon-vnd-adobe-photoshop,.elfinder-cwd-icon-postscript{background-position:0 -250px}.elfinder-cwd-icon-audio{background-position:0 -300px}.elfinder-cwd-icon-video,.elfinder-cwd-icon-flash-video{background-position:0 -350px}.elfinder-cwd-icon-rtf,.elfinder-cwd-icon-rtfd{background-position:0 -401px}.elfinder-cwd-icon-pdf{background-position:0 -450px}.elfinder-cwd-icon-vnd-ms-office,.elfinder-cwd-icon-msword,.elfinder-cwd-icon-vnd-ms-word,.elfinder-cwd-icon-vnd-oasis-opendocument-text,.elfinder-cwd-icon-ms-excel,.elfinder-cwd-icon-vnd-ms-excel,.elfinder-cwd-icon-vnd-oasis-opendocument-spreadsheet,.elfinder-cwd-icon-vnd-ms-powerpoint,.elfinder-cwd-icon-vnd-oasis-opendocument-presentation{background-position:0 -500px}.elfinder-cwd-icon-html{background-position:0 -550px}.elfinder-cwd-icon-css{background-position:0 -600px}.elfinder-cwd-icon-javascript,.elfinder-cwd-icon-x-javascript{background-position:0 -650px}.elfinder-cwd-icon-x-perl{background-position:0 -700px}.elfinder-cwd-icon-x-python{background-position:0 -750px}.elfinder-cwd-icon-x-ruby{background-position:0 -800px}.elfinder-cwd-icon-x-sh,.elfinder-cwd-icon-x-shellscript{background-position:0 -850px}.elfinder-cwd-icon-x-c,.elfinder-cwd-icon-x-csrc,.elfinder-cwd-icon-x-chdr,.elfinder-cwd-icon-x-c--,.elfinder-cwd-icon-x-c--src,.elfinder-cwd-icon-x-c--hdr,.elfinder-cwd-icon-x-java,.elfinder-cwd-icon-x-java-source{background-position:0 -900px}.elfinder-cwd-icon-x-php{background-position:0 -950px}.elfinder-cwd-icon-xml{background-position:0 -1000px}.elfinder-cwd-icon-zip,.elfinder-cwd-icon-x-zip,.elfinder-cwd-icon-x-7z-compressed{background-position:0 -1050px}.elfinder-cwd-icon-x-gzip,.elfinder-cwd-icon-x-tar{background-position:0 -1100px}.elfinder-cwd-icon-x-bzip,.elfinder-cwd-icon-x-bzip2{background-position:0 -1150px}.elfinder-cwd-icon-x-rar,.elfinder-cwd-icon-x-rar-compressed{background-position:0 -1200px}.elfinder-cwd-icon-x-shockwave-flash{background-position:0 -1250px}.elfinder-cwd-icon-group{background-position:0 -1300px}.elfinder-cwd input{width:100%;border:0 solid;margin:0;padding:0}.elfinder-cwd-view-icons input,.elfinder-cwd-view-icons{text-align:center}.elfinder-cwd table{width:100%;border-collapse:collapse;border:0 solid;margin:0 0 10px}.elfinder .elfinder-cwd table thead tr{border-left:0 solid;border-top:0 solid;border-right:0 solid}.elfinder .elfinder-cwd table thead td{font-size:.9em}.elfinder .elfinder-cwd table td{padding:3px 12px;white-space:pre;overflow:hidden;text-align:right;cursor:default;border:0 solid}.elfinder-ltr .elfinder-cwd table td{text-align:right}.elfinder-ltr .elfinder-cwd table td:first-child{text-align:left}.elfinder-rtl .elfinder-cwd table td{text-align:left}.elfinder-rtl .elfinder-cwd table td:first-child{text-align:right}.elfinder-odd-row{background:#eee}.elfinder-cwd-view-list .elfinder-cwd-file-wrapper{width:97%;position:relative}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-file-wrapper{padding-left:23px}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-file-wrapper{padding-right:23px}.elfinder-cwd-view-list .elfinder-perms,.elfinder-cwd-view-list .elfinder-symlink{top:50%;margin-top:-6px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-perms{left:7px}.elfinder-ltr .elfinder-cwd-view-list .elfinder-symlink{left:-7px}.elfinder-cwd-view-list td .elfinder-cwd-icon{width:16px;height:16px;position:absolute;top:50%;margin-top:-8px;background-image:url(../../img/plugins/elFinder/icons-small.png)}.elfinder-ltr .elfinder-cwd-view-list .elfinder-cwd-icon{left:0}.elfinder-rtl .elfinder-cwd-view-list .elfinder-cwd-icon{right:0}.std42-dialog{padding:0}.std42-dialog .ui-dialog-titlebar{border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent;-moz-border-radius-bottomleft:0;-webkit-border-bottom-left-radius:0;border-bottom-left-radius:0;-moz-border-radius-bottomright:0;-webkit-border-bottom-right-radius:0;border-bottom-right-radius:0;font-size:.82em;font-weight:400;padding:.2em 1em}.std42-dialog .ui-dialog-titlebar-close,.std42-dialog .ui-dialog-titlebar-close:hover{padding:1px}.elfinder-rtl .elfinder-dialog .ui-dialog-titlebar{text-align:right}.elfinder-rtl .elfinder-dialog .ui-dialog-titlebar .ui-dialog-titlebar-close{right:auto;left:.3em}.std42-dialog .ui-dialog-content{padding:.3em .5em;font-size:.72em}.std42-dialog .ui-dialog-buttonpane{border:0 solid;margin:0;padding:.5em .7em;font-size:.76em}.std42-dialog .ui-dialog-buttonpane button{margin:0 0 0 .4em;padding:0;outline:0 solid}.std42-dialog .ui-dialog-buttonpane button span{padding:2px 9px}.elfinder-dialog .ui-resizable-e,.elfinder-dialog .ui-resizable-s{width:0;height:0}.std42-dialog .ui-button input{cursor:pointer}.elfinder-dialog-icon{position:absolute;width:32px;height:32px;left:12px;top:50%;margin-top:-15px;background:url("../../img/plugins/elFinder/dialogs.png") 0 0 no-repeat}.elfinder-rtl .elfinder-dialog-icon{left:auto;right:12px}.elfinder-dialog-error .ui-dialog-content,.elfinder-dialog-confirm .ui-dialog-content{padding-left:56px;min-height:35px}.elfinder-rtl .elfinder-dialog-error .ui-dialog-content,.elfinder-rtl .elfinder-dialog-confirm .ui-dialog-content{padding-left:0;padding-right:56px}.elfinder-dialog-notify .ui-dialog-titlebar-close{display:none}.elfinder-dialog-notify .ui-dialog-content{padding:0}.elfinder-notify{border-bottom:1px solid #ccc;position:relative;padding:.5em;text-align:center;overflow:hidden}.elfinder-ltr .elfinder-notify{padding-left:30px}.elfinder-rtl .elfinder-notify{padding-right:30px}.elfinder-notify:last-child{border:0 solid}.elfinder-notify-progressbar{width:180px;height:8px;border:1px solid #aaa;background:#f5f5f5;margin:5px auto;overflow:hidden}.elfinder-notify-progress{width:100%;height:8px;background:url(../../img/plugins/elFinder/progress.gif) center center repeat-x}.elfinder-notify-progressbar,.elfinder-notify-progress{-moz-border-radius:2px;-webkit-border-radius:2px;border-radius:2px}.elfinder-dialog-icon-open,.elfinder-dialog-icon-file,.elfinder-dialog-icon-reload{background-position:0 -225px}.elfinder-dialog-icon-mkdir{background-position:0 -64px}.elfinder-dialog-icon-mkfile{background-position:0 -96px}.elfinder-dialog-icon-copy,.elfinder-dialog-icon-prepare,.elfinder-dialog-icon-move{background-position:0 -128px}.elfinder-dialog-icon-upload{background-position:0 -160px}.elfinder-dialog-icon-rm{background-position:0 -192px}.elfinder-dialog-icon-download{background-position:0 -260px}.elfinder-dialog-icon-save{background-position:0 -295px}.elfinder-dialog-icon-rename{background-position:0 -330px}.elfinder-dialog-icon-archive,.elfinder-dialog-icon-extract{background-position:0 -365px}.elfinder-dialog-icon-search{background-position:0 -402px}.elfinder-dialog-confirm-applyall{padding-top:3px}.elfinder-dialog-confirm .elfinder-dialog-icon{background-position:0 -32px}.elfinder-info-title .elfinder-cwd-icon{float:left;width:48px;height:48px;margin-right:1em}.elfinder-info-title strong{display:block;padding:.3em 0 .5em}.elfinder-info-tb{min-width:200px;border:0 solid;margin:1em .2em;font-size:.9em}.elfinder-info-tb td{white-space:nowrap;padding:2px}.elfinder-info-tb tr td:first-child{text-align:right}.elfinder-info-tb span{float:left}.elfinder-info-tb a{outline:none;text-decoration:underline}.elfinder-info-tb a:hover{text-decoration:none}.elfinder-info-spinner{width:14px;height:14px;float:left;background:url("../../img/plugins/elFinder/spinner-mini.gif") center center no-repeat;margin:0 5px}.elfinder-upload-dropbox{font-size:1.2em;text-align:center;padding:2em 0;border:3px dashed #aaa}.elfinder-upload-dropbox.ui-state-hover{background:#dfdfdf;border:3px dashed #555}.elfinder-upload-dialog-or{font-size:1.2em;margin:.3em 0;text-align:center}.elfinder-upload-dialog-wrapper{text-align:center}.elfinder-upload-dialog-wrapper .ui-button{position:relative;overflow:hidden}.elfinder-upload-dialog-wrapper .ui-button form{position:absolute;right:0;top:0;opacity:0;filter:Alpha(Opacity=0)}.elfinder-upload-dialog-wrapper .ui-button form input{padding:0 20px;font-size:3em}.dialogelfinder .dialogelfinder-drag{border-left:0 solid;border-top:0 solid;border-right:0 solid;font-weight:400;font-size:.9em;padding:2px 12px;cursor:move;position:relative;text-align:left}.elfinder-rtl .dialogelfinder-drag{text-align:right}.dialogelfinder-drag-close{position:absolute;top:50%;margin-top:-8px}.elfinder-ltr .dialogelfinder-drag-close{right:12px}.elfinder-rtl .dialogelfinder-drag-close{left:12px}.elfinder .elfinder-navbar{width:230px;padding:3px 5px;font-size:.72em;background-image:none;border-top:0 solid;border-bottom:0 solid;overflow:auto;display:none;position:relative;-moz-user-select:none;-khtml-user-select:none;-webkit-user-select:none;user-select:none}.elfinder-ltr .elfinder-navbar{float:left;border-left:0 solid}.elfinder-rtl .elfinder-navbar{float:right;border-right:0 solid}.elfinder-ltr .ui-resizable-e{margin-left:10px}.elfinder-tree{display:table;width:100%;margin:0 0 .5em}.elfinder-navbar-dir{position:relative;display:block;white-space:nowrap;padding:3px 12px;margin:0;outline:0 solid;border:1px solid transparent;cursor:default}.elfinder-ltr .elfinder-navbar-dir{padding-left:35px}.elfinder-rtl .elfinder-navbar-dir{padding-right:35px}.elfinder-navbar-arrow{width:12px;height:14px;position:absolute;display:none;top:50%;margin-top:-8px;background-image:url("../../img/plugins/elFinder/arrows-normal.png");background-repeat:no-repeat}.ui-state-active .elfinder-navbar-arrow{background-image:url("../../img/plugins/elFinder/arrows-active.png")}.elfinder-navbar-collapsed .elfinder-navbar-arrow{display:block}.elfinder-ltr .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 4px;left:0}.elfinder-rtl .elfinder-navbar-collapsed .elfinder-navbar-arrow{background-position:0 -10px;right:0}.elfinder-ltr .elfinder-navbar-expanded .elfinder-navbar-arrow,.elfinder-rtl .elfinder-navbar-expanded .elfinder-navbar-arrow{background-position:0 -21px}.elfinder-navbar-icon{width:16px;height:16px;position:absolute;top:50%;margin-top:-8px;background-image:url("../../img/plugins/elFinder/toolbar.png");background-repeat:no-repeat;background-position:0 -16px}.elfinder-ltr .elfinder-navbar-icon{left:14px}.elfinder-rtl .elfinder-navbar-icon{right:14px}.elfinder-tree .elfinder-navbar-root .elfinder-navbar-icon{background-position:0 0}.elfinder-places .elfinder-navbar-root .elfinder-navbar-icon{background-position:0 -48px}.ui-state-active .elfinder-navbar-icon,.elfinder-droppable-active .elfinder-navbar-icon,.ui-state-hover .elfinder-navbar-icon{background-position:0 -32px}.elfinder-navbar-subtree{display:none}.elfinder-ltr .elfinder-navbar-subtree{margin-left:12px}.elfinder-rtl .elfinder-navbar-subtree{margin-right:12px}.elfinder-navbar-spinner{width:14px;height:14px;position:absolute;display:block;top:50%;margin-top:-7px;background:url("../../img/plugins/elFinder/spinner-mini.gif") center center no-repeat}.elfinder-ltr .elfinder-navbar-spinner{left:0;margin-left:-2px}.elfinder-rtl .elfinder-navbar-spinner{right:0;margin-right:-2px}.elfinder-navbar .elfinder-perms{top:50%;margin-top:-8px}.elfinder-ltr .elfinder-navbar .elfinder-perms{left:18px}.elfinder-rtl .elfinder-navbar .elfinder-perms{right:18px}.elfinder-ltr .elfinder-navbar .elfinder-symlink{left:8px}.elfinder-rtl .elfinder-navbar .elfinder-symlink{right:8px}.elfinder-navbar .ui-resizable-handle{width:12px;background:url('../../img/plugins/elFinder/resize.png') center center no-repeat;left:0}.elfinder-nav-handle-icon{position:absolute;top:50%;margin:-8px 2px 0;opacity:.5;filter:Alpha(Opacity=50)}.elfinder-places{border:1px solid transparent}.elfinder-places.elfinder-droppable-active{border:1px solid #8cafed}.elfinder-place-drag .elfinder-navbar-dir{font-size:.9em}.elfinder-quicklook{position:absolute;background:url("../../img/plugins/elFinder/quicklook-bg.png");display:none;overflow:hidden;border-radius:7px;-moz-border-radius:7px;-webkit-border-radius:7px;padding:20px 0 40px}.elfinder-quicklook .ui-resizable-se{width:14px;height:14px;right:5px;bottom:3px;background:url("../../img/plugins/elFinder/toolbar.png") 0 -496px no-repeat}.elfinder-quicklook-fullscreen{border-radius:0;-moz-border-radius:0;-webkit-border-radius:0;-webkit-background-clip:padding-box;padding:0;background:#000;z-index:90000;display:block}.elfinder-quicklook-fullscreen .elfinder-quicklook-titlebar{display:none}.elfinder-quicklook-fullscreen .elfinder-quicklook-preview{border:0 solid}.elfinder-quicklook-titlebar{text-align:center;background:#777;position:absolute;left:0;top:0;width:100%;height:20px;-moz-border-radius-topleft:7px;-webkit-border-top-left-radius:7px;border-top-left-radius:7px;-moz-border-radius-topright:7px;-webkit-border-top-right-radius:7px;border-top-right-radius:7px;cursor:move}.elfinder-quicklook-title{font-size:.7em;color:#fff;white-space:nowrap;overflow:hidden;padding:2px 0}.elfinder-quicklook-titlebar .ui-icon{position:absolute;left:4px;top:50%;margin-top:-8px;width:16px;height:16px;cursor:default}.elfinder-quicklook-preview{overflow:hidden;position:relative;border:0 solid;border-left:1px solid transparent;border-right:1px solid transparent;height:100%}.elfinder-quicklook-info-wrapper{position:absolute;width:100%;left:0;top:50%;margin-top:-50px}.elfinder-quicklook-info{padding:0 12px 0 112px}.elfinder-quicklook-info .elfinder-quicklook-info-data:first-child{color:#fff;font-weight:700;padding-bottom:.5em}.elfinder-quicklook-info-data{font-size:.72em;padding-bottom:.2em;color:#fff}.elfinder-quicklook .elfinder-cwd-icon{position:absolute;left:32px;top:50%;margin-top:-20px}.elfinder-quicklook-preview img{display:block;margin:0 auto}.elfinder-quicklook-navbar{position:absolute;left:50%;bottom:4px;width:140px;height:32px;padding:0;margin-left:-70px;border:1px solid transparent;border-radius:19px;-moz-border-radius:19px;-webkit-border-radius:19px}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar{width:188px;margin-left:-94px;padding:5px;border:1px solid #eee;background:#000}.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-icon-close,.elfinder-quicklook-fullscreen .elfinder-quicklook-navbar-separator{display:inline}.elfinder-quicklook-navbar-icon{width:32px;height:32px;margin:0 7px;float:left;background:url("../../img/plugins/elFinder/quicklook-icons.png") 0 0 no-repeat}.elfinder-quicklook-navbar-icon-fullscreen{background-position:0 -64px}.elfinder-quicklook-navbar-icon-fullscreen-off{background-position:0 -96px}.elfinder-quicklook-navbar-icon-prev{background-position:0 0}.elfinder-quicklook-navbar-icon-next{background-position:0 -32px}.elfinder-quicklook-navbar-icon-close{background-position:0 -128px;display:none}.elfinder-quicklook-navbar-separator{width:1px;height:32px;float:left;border-left:1px solid #fff;display:none}.elfinder-quicklook-preview-text-wrapper{width:100%;height:100%;background:#fff;color:#222;font-size:.9em;overflow:auto}pre.elfinder-quicklook-preview-text{margin:0;padding:3px 9px}.elfinder-quicklook-preview-html,.elfinder-quicklook-preview-pdf{width:100%;height:100%;background:#fff;border:0 solid;margin:0}.elfinder-quicklook-preview-flash{width:100%;height:100%}.elfinder-quicklook-preview-audio{width:100%;position:absolute;bottom:0;left:0}embed.elfinder-quicklook-preview-audio{height:30px;background:0 0}.elfinder-quicklook-preview-video{width:100%;height:100%}.elfinder-statusbar{text-align:center;font-weight:400;padding:.2em .5em;border-right:0 solid transparent;border-bottom:0 solid transparent;border-left:0 solid transparent}.elfinder-statusbar a{text-decoration:none}.elfinder-statusbar div{font-size:.7em}.elfinder-path{max-width:30%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;-o-text-overflow:ellipsis}.elfinder-ltr .elfinder-path{float:left}.elfinder-rtl .elfinder-path{float:right}.elfinder-stat-size{white-space:nowrap}.elfinder-ltr .elfinder-stat-size{float:right}.elfinder-rtl .elfinder-stat-size{float:left}.elfinder-stat-selected{white-space:nowrap;overflow:hidden}.elfinder-toolbar{padding:4px 0 3px;border-left:0 solid transparent;border-top:0 solid transparent;border-right:0 solid transparent}.elfinder-buttonset{margin:1px 4px;float:left;background:0 0;padding:0;-moz-border-radius:4px;-webkit-border-radius:4px;border-radius:4px}.elfinder .elfinder-button{width:16px;height:16px;margin:0;padding:4px;float:left;overflow:hidden;position:relative;border:0 solid}.elfinder .ui-icon-search{cursor:pointer}.elfinder-button:first-child{-moz-border-radius-topleft:4px;-webkit-border-top-left-radius:4px;border-top-left-radius:4px;-moz-border-radius-bottomleft:4px;-webkit-border-bottom-left-radius:4px;border-bottom-left-radius:4px}.elfinder-button:last-child{-moz-border-radius-topright:4px;-webkit-border-top-right-radius:4px;border-top-right-radius:4px;-moz-border-radius-bottomright:4px;-webkit-border-bottom-right-radius:4px;border-bottom-right-radius:4px}.elfinder-toolbar-button-separator{float:left;padding:0;height:24px;border-top:0 solid;border-right:0 solid;border-bottom:0 solid;width:0}.elfinder .elfinder-button.ui-state-disabled{opacity:1;filter:Alpha(Opacity=100)}.elfinder .elfinder-button.ui-state-disabled .elfinder-button-icon{opacity:.4;filter:Alpha(Opacity=40)}.elfinder-rtl .elfinder-buttonset{float:right}.elfinder-button-icon{width:16px;height:16px;display:block;background:url('../../img/plugins/elFinder/toolbar.png') no-repeat}.elfinder-button-icon-home{background-position:0 0}.elfinder-button-icon-back{background-position:0 -112px}.elfinder-button-icon-forward{background-position:0 -128px}.elfinder-button-icon-up{background-position:0 -144px}.elfinder-button-icon-reload{background-position:0 -160px}.elfinder-button-icon-open{background-position:0 -176px}.elfinder-button-icon-mkdir{background-position:0 -192px}.elfinder-button-icon-mkfile{background-position:0 -208px}.elfinder-button-icon-rm{background-position:0 -224px}.elfinder-button-icon-copy{background-position:0 -240px}.elfinder-button-icon-cut{background-position:0 -256px}.elfinder-button-icon-paste{background-position:0 -272px}.elfinder-button-icon-getfile{background-position:0 -288px}.elfinder-button-icon-duplicate{background-position:0 -304px}.elfinder-button-icon-rename{background-position:0 -320px}.elfinder-button-icon-edit{background-position:0 -336px}.elfinder-button-icon-quicklook{background-position:0 -352px}.elfinder-button-icon-upload{background-position:0 -368px}.elfinder-button-icon-download{background-position:0 -384px}.elfinder-button-icon-info{background-position:0 -400px}.elfinder-button-icon-extract{background-position:0 -416px}.elfinder-button-icon-archive{background-position:0 -432px}.elfinder-button-icon-view{background-position:0 -448px}.elfinder-button-icon-view-list{background-position:0 -464px}.elfinder-button-icon-help{background-position:0 -480px}.elfinder-button-icon-resize{background-position:0 -512px}.elfinder-button-icon-search{background-position:0 -561px}.elfinder-button-icon-sort{background-position:0 -577px}.elfinder-button-icon-rotate-r{background-position:0 -625px}.elfinder-button-icon-rotate-l{background-position:0 -641px}.elfinder .elfinder-menubutton{overflow:visible}.elfinder-button-menu{position:absolute;left:0;top:26px;padding:3px 0}.elfinder-button-menu-item{white-space:nowrap;font-size:.72em;cursor:default;padding:5px 19px;position:relative}.elfinder-button-menu .ui-state-hover{border:0 solid}.elfinder-menu-item-sort-dir{width:16px;height:16px;position:absolute;left:2px;top:50%;margin-top:-8px;background:url("../../img/plugins/elFinder/toolbar.png") 0 -594px no-repeat;display:none}.elfinder-button-menu-item-selected .elfinder-menu-item-sort-dir{display:block}.elfinder-menu-item-sort-desc .elfinder-menu-item-sort-dir{background-position:0 -608px}.elfinder-button form{position:absolute;top:0;right:0;opacity:0;filter:Alpha(Opacity=0);cursor:pointer}.elfinder .elfinder-button form input{background:0 0;cursor:default}.elfinder .elfinder-button-search{border:0 solid;background:0 0;padding:0;margin:1px 4px;height:auto;min-height:26px;float:right;width:202px}.elfinder-ltr .elfinder-button-search{float:right;margin-right:10px}.elfinder-rtl .elfinder-button-search{float:left;margin-left:10px}.elfinder-button-search input{width:160px;height:22px;padding:0 20px;font-size:.8em;line-height:22px;border:1px solid #aaa;-moz-border-radius:12px;-webkit-border-radius:12px;border-radius:12px;outline:0 solid}.elfinder-rtl .elfinder-button-search input{direction:rtl}.elfinder-button-search .ui-icon{position:absolute;height:18px;top:50%;margin:-9px 4px 0;opacity:.6;filter:Alpha(Opacity=60)}.elfinder-ltr .elfinder-button-search .ui-icon-search{left:0}.elfinder-rtl .elfinder-button-search .ui-icon-search,.elfinder-ltr .elfinder-button-search .ui-icon-close{right:0}.elfinder-rtl .elfinder-button-search .ui-icon-close{left:0} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.datatables.css b/src/bb-themes/huraga/assets/css/plugins/jquery.datatables.css new file mode 100644 index 000000000..83df98ea7 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.datatables.css @@ -0,0 +1,220 @@ + +/* + * Table + */ +table.dataTable { + margin: 0 auto; + clear: both; + width: 100%; +} + +table.dataTable thead th { + padding: 3px 18px 3px 10px; + border-bottom: 1px solid black; + font-weight: bold; + cursor: pointer; + *cursor: hand; +} + +table.dataTable tfoot th { + padding: 3px 18px 3px 10px; + border-top: 1px solid black; + font-weight: bold; +} + +table.dataTable td { + padding: 3px 10px; +} + +table.dataTable td.center, +table.dataTable td.dataTables_empty { + text-align: center; +} + +table.dataTable tr.odd { background-color: #E2E4FF; } +table.dataTable tr.even { background-color: white; } + +table.dataTable tr.odd td.sorting_1 { background-color: #D3D6FF; } +table.dataTable tr.odd td.sorting_2 { background-color: #DADCFF; } +table.dataTable tr.odd td.sorting_3 { background-color: #E0E2FF; } +table.dataTable tr.even td.sorting_1 { background-color: #EAEBFF; } +table.dataTable tr.even td.sorting_2 { background-color: #F2F3FF; } +table.dataTable tr.even td.sorting_3 { background-color: #F9F9FF; } + + +/* + * Table wrapper + */ +.dataTables_wrapper { + position: relative; + clear: both; + *zoom: 1; +} + + +/* + * Page length menu + */ +.dataTables_length { + float: left; +} + + +/* + * Filter + */ +.dataTables_filter { + float: right; + text-align: right; +} + + +/* + * Table information + */ +.dataTables_info { + clear: both; + float: left; +} + + +/* + * Pagination + */ +.dataTables_paginate { + float: right; + text-align: right; +} + +/* Two button pagination - previous / next */ +.paginate_disabled_previous, +.paginate_enabled_previous, +.paginate_disabled_next, +.paginate_enabled_next { + height: 19px; + float: left; + cursor: pointer; + *cursor: hand; + color: #111 !important; +} +.paginate_disabled_previous:hover, +.paginate_enabled_previous:hover, +.paginate_disabled_next:hover, +.paginate_enabled_next:hover { + text-decoration: none !important; +} +.paginate_disabled_previous:active, +.paginate_enabled_previous:active, +.paginate_disabled_next:active, +.paginate_enabled_next:active { + outline: none; +} + +.paginate_disabled_previous, +.paginate_disabled_next { + color: #666 !important; +} +.paginate_disabled_previous, +.paginate_enabled_previous { + padding-left: 23px; +} +.paginate_disabled_next, +.paginate_enabled_next { + padding-right: 23px; + margin-left: 10px; +} + +.paginate_enabled_previous { background: url('../images/back_enabled.png') no-repeat top left; } +.paginate_enabled_previous:hover { background: url('../images/back_enabled_hover.png') no-repeat top left; } +.paginate_disabled_previous { background: url('../images/back_disabled.png') no-repeat top left; } + +.paginate_enabled_next { background: url('../images/forward_enabled.png') no-repeat top right; } +.paginate_enabled_next:hover { background: url('../images/forward_enabled_hover.png') no-repeat top right; } +.paginate_disabled_next { background: url('../images/forward_disabled.png') no-repeat top right; } + +/* Full number pagination */ +.paging_full_numbers { + height: 22px; + line-height: 22px; +} +.paging_full_numbers a:active { + outline: none +} +.paging_full_numbers a:hover { + text-decoration: none; +} + +.paging_full_numbers a.paginate_button, +.paging_full_numbers a.paginate_active { + border: 1px solid #aaa; + -webkit-border-radius: 5px; + -moz-border-radius: 5px; + border-radius: 5px; + padding: 2px 5px; + margin: 0 3px; + cursor: pointer; + *cursor: hand; + color: #333 !important; +} + +.paging_full_numbers a.paginate_button { + background-color: #ddd; +} + +.paging_full_numbers a.paginate_button:hover { + background-color: #ccc; + text-decoration: none !important; +} + +.paging_full_numbers a.paginate_active { + background-color: #99B3FF; +} + + +/* + * Processing indicator + */ +.dataTables_processing { + position: absolute; + top: 50%; + left: 50%; + width: 250px; + height: 30px; + margin-left: -125px; + margin-top: -15px; + padding: 14px 0 2px 0; + border: 1px solid #ddd; + text-align: center; + color: #999; + font-size: 14px; + background-color: white; +} + + +/* + * Sorting + */ +.sorting { background: url('../images/sort_both.png') no-repeat center right; } +.sorting_asc { background: url('../images/sort_asc.png') no-repeat center right; } +.sorting_desc { background: url('../images/sort_desc.png') no-repeat center right; } + +.sorting_asc_disabled { background: url('../images/sort_asc_disabled.png') no-repeat center right; } +.sorting_desc_disabled { background: url('../images/sort_desc_disabled.png') no-repeat center right; } + +table.dataTable th:active { + outline: none; +} + + +/* + * Scrolling + */ +.dataTables_scroll { + clear: both; +} + +.dataTables_scrollBody { + *margin-top: -1px; + -webkit-overflow-scrolling: touch; +} + diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.fullcalendar.css b/src/bb-themes/huraga/assets/css/plugins/jquery.fullcalendar.css new file mode 100644 index 000000000..04f118493 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.fullcalendar.css @@ -0,0 +1,618 @@ +/* + * FullCalendar v1.5.3 Stylesheet + * + * Copyright (c) 2011 Adam Shaw + * Dual licensed under the MIT and GPL licenses, located in + * MIT-LICENSE.txt and GPL-LICENSE.txt respectively. + * + * Date: Mon Feb 6 22:40:40 2012 -0800 + * + */ + + +.fc { + direction: ltr; + text-align: left; + } + +.fc table { + border-collapse: collapse; + border-spacing: 0; + } + +html .fc, +.fc table { + font-size: 1em; + } + +.fc td, +.fc th { + padding: 0; + vertical-align: top; + } + + + +/* Header +------------------------------------------------------------------------*/ + +.fc-header td { + white-space: nowrap; + } + +.fc-header-left { + width: 25%; + text-align: left; + } + +.fc-header-center { + text-align: center; + } + +.fc-header-right { + width: 25%; + text-align: right; + } + +.fc-header-title { + display: inline-block; + vertical-align: top; + } + +.fc-header-title h2 { + margin-top: 0; + white-space: nowrap; + } + +.fc .fc-header-space { + padding-left: 10px; + } + +.fc-header .fc-button { + margin-bottom: 1em; + vertical-align: top; + } + +/* buttons edges butting together */ + +.fc-header .fc-button { + margin-right: -1px; + } + +.fc-header .fc-corner-right { + margin-right: 1px; /* back to normal */ + } + +.fc-header .ui-corner-right { + margin-right: 0; /* back to normal */ + } + +/* button layering (for border precedence) */ + +.fc-header .fc-state-hover, +.fc-header .ui-state-hover { + z-index: 2; + } + +.fc-header .fc-state-down { + z-index: 3; + } + +.fc-header .fc-state-active, +.fc-header .ui-state-active { + z-index: 4; + } + + + +/* Content +------------------------------------------------------------------------*/ + +.fc-content { + clear: both; + } + +.fc-view { + width: 100%; /* needed for view switching (when view is absolute) */ + overflow: hidden; + } + + + +/* Cell Styles +------------------------------------------------------------------------*/ + +.fc-widget-header, /* , usually */ +.fc-widget-content { /* , usually */ + border: 1px solid #ccc; + } + +.fc-state-highlight { /* today cell */ /* TODO: add .fc-today to */ + background: #ffc; + } + +.fc-cell-overlay { /* semi-transparent rectangle while dragging */ + background: #9cf; + opacity: .2; + filter: alpha(opacity=20); /* for IE */ + } + + + +/* Buttons +------------------------------------------------------------------------*/ + +.fc-button { + position: relative; + display: inline-block; + cursor: pointer; + } + +.fc-state-default { /* non-theme */ + border-style: solid; + border-width: 1px 0; + } + +.fc-button-inner { + position: relative; + float: left; + overflow: hidden; + } + +.fc-state-default .fc-button-inner { /* non-theme */ + border-style: solid; + border-width: 0 1px; + } + +.fc-button-content { + position: relative; + float: left; + height: 1.9em; + line-height: 1.9em; + padding: 0 .6em; + white-space: nowrap; + } + +/* icon (for jquery ui) */ + +.fc-button-content .fc-icon-wrap { + position: relative; + float: left; + top: 50%; + } + +.fc-button-content .ui-icon { + position: relative; + float: left; + margin-top: -50%; + *margin-top: 0; + *top: -50%; + } + +/* gloss effect */ + +.fc-state-default .fc-button-effect { + position: absolute; + top: 50%; + left: 0; + } + +.fc-state-default .fc-button-effect span { + position: absolute; + top: -100px; + left: 0; + width: 500px; + height: 100px; + border-width: 100px 0 0 1px; + border-style: solid; + border-color: #fff; + background: #444; + opacity: .09; + filter: alpha(opacity=9); + } + +/* button states (determines colors) */ + +.fc-state-default, +.fc-state-default .fc-button-inner { + border-style: solid; + border-color: #ccc #bbb #aaa; + background: #F3F3F3; + color: #000; + } + +.fc-state-hover, +.fc-state-hover .fc-button-inner { + border-color: #999; + } + +.fc-state-down, +.fc-state-down .fc-button-inner { + border-color: #555; + background: #777; + } + +.fc-state-active, +.fc-state-active .fc-button-inner { + border-color: #555; + background: #777; + color: #fff; + } + +.fc-state-disabled, +.fc-state-disabled .fc-button-inner { + color: #999; + border-color: #ddd; + } + +.fc-state-disabled { + cursor: default; + } + +.fc-state-disabled .fc-button-effect { + display: none; + } + + + +/* Global Event Styles +------------------------------------------------------------------------*/ + +.fc-event { + border-style: solid; + border-width: 0; + font-size: .85em; + cursor: default; + } + +a.fc-event, +.fc-event-draggable { + cursor: pointer; + } + +a.fc-event { + text-decoration: none; + } + +.fc-rtl .fc-event { + text-align: right; + } + +.fc-event-skin { + border-color: #36c; /* default BORDER color */ + background-color: #36c; /* default BACKGROUND color */ + color: #fff; /* default TEXT color */ + } + +.fc-event-inner { + position: relative; + width: 100%; + height: 100%; + border-style: solid; + border-width: 0; + overflow: hidden; + } + +.fc-event-time, +.fc-event-title { + padding: 0 1px; + } + +.fc .ui-resizable-handle { /*** TODO: don't use ui-resizable anymore, change class ***/ + display: block; + position: absolute; + z-index: 99999; + overflow: hidden; /* hacky spaces (IE6/7) */ + font-size: 300%; /* */ + line-height: 50%; /* */ + } + + + +/* Horizontal Events +------------------------------------------------------------------------*/ + +.fc-event-hori { + border-width: 1px 0; + margin-bottom: 1px; + } + +/* resizable */ + +.fc-event-hori .ui-resizable-e { + top: 0 !important; /* importants override pre jquery ui 1.7 styles */ + right: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: e-resize; + } + +.fc-event-hori .ui-resizable-w { + top: 0 !important; + left: -3px !important; + width: 7px !important; + height: 100% !important; + cursor: w-resize; + } + +.fc-event-hori .ui-resizable-handle { + _padding-bottom: 14px; /* IE6 had 0 height */ + } + + + +/* Fake Rounded Corners (for buttons and events) +------------------------------------------------------------*/ + +.fc-corner-left { + margin-left: 1px; + } + +.fc-corner-left .fc-button-inner, +.fc-corner-left .fc-event-inner { + margin-left: -1px; + } + +.fc-corner-right { + margin-right: 1px; + } + +.fc-corner-right .fc-button-inner, +.fc-corner-right .fc-event-inner { + margin-right: -1px; + } + +.fc-corner-top { + margin-top: 1px; + } + +.fc-corner-top .fc-event-inner { + margin-top: -1px; + } + +.fc-corner-bottom { + margin-bottom: 1px; + } + +.fc-corner-bottom .fc-event-inner { + margin-bottom: -1px; + } + + + +/* Fake Rounded Corners SPECIFICALLY FOR EVENTS +-----------------------------------------------------------------*/ + +.fc-corner-left .fc-event-inner { + border-left-width: 1px; + } + +.fc-corner-right .fc-event-inner { + border-right-width: 1px; + } + +.fc-corner-top .fc-event-inner { + border-top-width: 1px; + } + +.fc-corner-bottom .fc-event-inner { + border-bottom-width: 1px; + } + + + +/* Reusable Separate-border Table +------------------------------------------------------------*/ + +table.fc-border-separate { + border-collapse: separate; + } + +.fc-border-separate th, +.fc-border-separate td { + border-width: 1px 0 0 1px; + } + +.fc-border-separate th.fc-last, +.fc-border-separate td.fc-last { + border-right-width: 1px; + } + +.fc-border-separate tr.fc-last th, +.fc-border-separate tr.fc-last td { + border-bottom-width: 1px; + } + +.fc-border-separate tbody tr.fc-first td, +.fc-border-separate tbody tr.fc-first th { + border-top-width: 0; + } + + + +/* Month View, Basic Week View, Basic Day View +------------------------------------------------------------------------*/ + +.fc-grid th { + text-align: center; + } + +.fc-grid .fc-day-number { + float: right; + padding: 0 2px; + } + +.fc-grid .fc-other-month .fc-day-number { + opacity: 0.3; + filter: alpha(opacity=30); /* for IE */ + /* opacity with small font can sometimes look too faded + might want to set the 'color' property instead + making day-numbers bold also fixes the problem */ + } + +.fc-grid .fc-day-content { + clear: both; + padding: 2px 2px 1px; /* distance between events and day edges */ + } + +/* event styles */ + +.fc-grid .fc-event-time { + font-weight: bold; + } + +/* right-to-left */ + +.fc-rtl .fc-grid .fc-day-number { + float: left; + } + +.fc-rtl .fc-grid .fc-event-time { + float: right; + } + + + +/* Agenda Week View, Agenda Day View +------------------------------------------------------------------------*/ + +.fc-agenda table { + border-collapse: separate; + } + +.fc-agenda-days th { + text-align: center; + } + +.fc-agenda .fc-agenda-axis { + width: 50px; + padding: 0 4px; + vertical-align: middle; + text-align: right; + white-space: nowrap; + font-weight: normal; + } + +.fc-agenda .fc-day-content { + padding: 2px 2px 1px; + } + +/* make axis border take precedence */ + +.fc-agenda-days .fc-agenda-axis { + border-right-width: 1px; + } + +.fc-agenda-days .fc-col0 { + border-left-width: 0; + } + +/* all-day area */ + +.fc-agenda-allday th { + border-width: 0 1px; + } + +.fc-agenda-allday .fc-day-content { + min-height: 34px; /* TODO: doesnt work well in quirksmode */ + _height: 34px; + } + +/* divider (between all-day and slots) */ + +.fc-agenda-divider-inner { + height: 2px; + overflow: hidden; + } + +.fc-widget-header .fc-agenda-divider-inner { + background: #eee; + } + +/* slot rows */ + +.fc-agenda-slots th { + border-width: 1px 1px 0; + } + +.fc-agenda-slots td { + border-width: 1px 0 0; + background: none; + } + +.fc-agenda-slots td div { + height: 20px; + } + +.fc-agenda-slots tr.fc-slot0 th, +.fc-agenda-slots tr.fc-slot0 td { + border-top-width: 0; + } + +.fc-agenda-slots tr.fc-minor th, +.fc-agenda-slots tr.fc-minor td { + border-top-style: dotted; + } + +.fc-agenda-slots tr.fc-minor th.ui-widget-header { + *border-top-style: solid; /* doesn't work with background in IE6/7 */ + } + + + +/* Vertical Events +------------------------------------------------------------------------*/ + +.fc-event-vert { + border-width: 0 1px; + } + +.fc-event-vert .fc-event-head, +.fc-event-vert .fc-event-content { + position: relative; + z-index: 2; + width: 100%; + overflow: hidden; + } + +.fc-event-vert .fc-event-time { + white-space: nowrap; + font-size: 10px; + } + +.fc-event-vert .fc-event-bg { /* makes the event lighter w/ a semi-transparent overlay */ + position: absolute; + z-index: 1; + top: 0; + left: 0; + width: 100%; + height: 100%; + background: #fff; + opacity: .3; + filter: alpha(opacity=30); + } + +.fc .ui-draggable-dragging .fc-event-bg, /* TODO: something nicer like .fc-opacity */ +.fc-select-helper .fc-event-bg { + display: none\9; /* for IE6/7/8. nested opacity filters while dragging don't work */ + } + +/* resizable */ + +.fc-event-vert .ui-resizable-s { + bottom: 0 !important; /* importants override pre jquery ui 1.7 styles */ + width: 100% !important; + height: 8px !important; + overflow: hidden !important; + line-height: 8px !important; + font-size: 11px !important; + font-family: monospace; + text-align: center; + cursor: s-resize; + } + +.fc-agenda .ui-resizable-resizing { /* TODO: better selector */ + _overflow: hidden; + } + + diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.jgrowl.css b/src/bb-themes/huraga/assets/css/plugins/jquery.jgrowl.css new file mode 100644 index 000000000..dbfde2334 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.jgrowl.css @@ -0,0 +1,136 @@ + +div.jGrowl { + z-index: 9999; + color: #fff; + font-size: 12px; +} + +/** Special IE6 Style Positioning **/ +div.ie6 { + position: absolute; +} + +div.ie6.top-right { + right: auto; + bottom: auto; + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.top-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-right { + left: expression( ( 0 - jGrowl.offsetWidth + ( document.documentElement.clientWidth ? document.documentElement.clientWidth : document.body.clientWidth ) + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.bottom-left { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 - jGrowl.offsetHeight + ( document.documentElement.clientHeight ? document.documentElement.clientHeight : document.body.clientHeight ) + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); +} + +div.ie6.center { + left: expression( ( 0 + ( ignoreMe2 = document.documentElement.scrollLeft ? document.documentElement.scrollLeft : document.body.scrollLeft ) ) + 'px' ); + top: expression( ( 0 + ( ignoreMe = document.documentElement.scrollTop ? document.documentElement.scrollTop : document.body.scrollTop ) ) + 'px' ); + width: 100%; +} + +/** Normal Style Positions **/ +div.jGrowl { + position: absolute; +} + +body > div.jGrowl { + position: fixed; +} + +div.jGrowl.top-left { + left: 0px; + top: 0px; +} + +div.jGrowl.top-right { + right: 0px; + top: 0px; +} + +div.jGrowl.bottom-left { + left: 0px; + bottom: 0px; +} + +div.jGrowl.bottom-right { + right: 0px; + bottom: 0px; +} + +div.jGrowl.center { + top: 0px; + width: 50%; + left: 25%; +} + +/** Cross Browser Styling **/ +div.center div.jGrowl-notification, div.center div.jGrowl-closer { + margin-left: auto; + margin-right: auto; +} + +div.jGrowl div.jGrowl-notification, div.jGrowl div.jGrowl-closer { + background-color: #000; + opacity: .85; + -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=85)"; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); + zoom: 1; + width: 235px; + padding: 10px; + margin-top: 5px; + margin-bottom: 5px; + font-family: Tahoma, Arial, Helvetica, sans-serif; + font-size: 1em; + text-align: left; + display: none; + -moz-border-radius: 5px; + -webkit-border-radius: 5px; +} + +div.jGrowl div.jGrowl-notification { + min-height: 40px; +} + +div.jGrowl div.jGrowl-notification, +div.jGrowl div.jGrowl-closer { + margin: 10px; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-header { + font-weight: bold; + font-size: .85em; +} + +div.jGrowl div.jGrowl-notification div.jGrowl-close { + z-index: 99; + float: right; + font-weight: bold; + font-size: 1em; + cursor: pointer; +} + +div.jGrowl div.jGrowl-closer { + padding-top: 4px; + padding-bottom: 4px; + cursor: pointer; + font-size: .9em; + font-weight: bold; + text-align: center; +} + +/** Hide jGrowl when printing **/ +@media print { + div.jGrowl { + display: none; + } +} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.jwysiwyg.css b/src/bb-themes/huraga/assets/css/plugins/jquery.jwysiwyg.css new file mode 100644 index 000000000..a051cb4de --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.jwysiwyg.css @@ -0,0 +1,96 @@ + +div.wysiwyg { border: 1px solid #999; padding: 0; background: #fff url('jquery.wysiwyg.bg.png') repeat-x top; } +div.wysiwyg * { margin: 0; padding: 0; } + +div.wysiwyg ul.toolbar li.jwysiwyg-custom-command { overflow: hidden; } + +div.wysiwyg ul.toolbar { border-bottom: 1px solid #ccc; float: left; width: 100%; padding: 0; } +div.wysiwyg ul.toolbar li { list-style: none; float: left; margin: 1px 2px 3px 0; background: rgb(240, 240, 240); -moz-user-select: none; -webkit-user-select: none; user-select: none; clear: none; padding: 0 } +div.wysiwyg ul.toolbar li.separator { background: none; width: 1px; height: 20px; margin: 0 4px 0px 5px; border: none; border-left: 1px solid #ccc; } +div.wysiwyg ul.toolbar li { text-indent: -5000px; display: block; width: 18px; height: 18px; background: url('jquery.wysiwyg.gif') no-repeat -640px -800px; border: 1px solid transparent; cursor: pointer; margin: 0px; } +div.wysiwyg ul.toolbar li.wysiwyg-button-hover, div.wysiwyg ul.toolbar li.active { background-color: #DDD; border: 1px solid transparent; } +div.wysiwyg ul.toolbar li.active { background-color: rgb(255, 255, 64); border: 1px solid rgb(208, 208, 208); border-left-color: #aaa; border-top-color: #aaa; height: 18px; width: 18px; padding: -1px 0 0 -1px; margin: 0; } + +div.wysiwyg ul.toolbar li.disabled, div.wysiwyg ul.toolbar li.wysiwyg-button-hover.disabled, div.wysiwyg ul.toolbar li.active.disabled { opacity: 0.5; filter:alpha(opacity=50); border: 0px none transparent; padding: 1px; cursor: auto; } + + +div.wysiwyg ul.toolbar li.bold { background-position: -1px -15px; } +div.wysiwyg ul.toolbar li.italic { background-position: -18px -15px; } +div.wysiwyg ul.toolbar li.strikeThrough { background-position: -36px -15px; } +div.wysiwyg ul.toolbar li.underline { background-position: -55px -15px; } +div.wysiwyg ul.toolbar li.highlight { background-position: -48px -96px; } + +div.wysiwyg ul.toolbar li.justifyLeft { background-position: 0 2px; } +div.wysiwyg ul.toolbar li.justifyCenter { background-position: -18px 2px; } +div.wysiwyg ul.toolbar li.justifyRight { background-position: -36px 2px; } +div.wysiwyg ul.toolbar li.justifyFull { background-position: -55px 2px; } + +div.wysiwyg ul.toolbar li.indent { background-position: -74px 1px; } +div.wysiwyg ul.toolbar li.outdent { background-position: -92px 1px; } + +div.wysiwyg ul.toolbar li.subscript { background-position: -74px -15px; } +div.wysiwyg ul.toolbar li.superscript { background-position: -92px -15px; } + +div.wysiwyg ul.toolbar li.undo { background-position: 0px -68px; } +div.wysiwyg ul.toolbar li.redo { background-position: -18px -69px; } + +div.wysiwyg ul.toolbar li.insertOrderedList { background-position: -36px -49px; } +div.wysiwyg ul.toolbar li.insertUnorderedList { background-position: -19px -49px; } +div.wysiwyg ul.toolbar li.insertHorizontalRule { background-position: 0 -49px; } + +div.wysiwyg ul.toolbar li.h1 { background-position: 0px -31px; } +div.wysiwyg ul.toolbar li.h2 { background-position: -18px -31px; } +div.wysiwyg ul.toolbar li.h3 { background-position: -36px -31px; } +div.wysiwyg ul.toolbar li.h4 { background-position: -55px -31px; } +div.wysiwyg ul.toolbar li.h5 { background-position: -74px -31px; } +div.wysiwyg ul.toolbar li.h6 { background-position: -92px -31px; } + +div.wysiwyg ul.toolbar li.paragraph { background-position: 0px -106px; } +div.wysiwyg ul.toolbar li.colorpicker { background-position: -18px -106px; } +div.wysiwyg ul.toolbar li.fullscreen { background-position: -36px -106px; } + +div.wysiwyg ul.toolbar li.cut { background-position: -36px -68px; } +div.wysiwyg ul.toolbar li.copy { background-position: -55px -68px; } +div.wysiwyg ul.toolbar li.paste { background-position: -74px -68px; } +div.wysiwyg ul.toolbar li.insertTable { background-position: -74px -49px; } + +div.wysiwyg ul.toolbar li.increaseFontSize { background-position: -18px -87px; } +div.wysiwyg ul.toolbar li.decreaseFontSize { background-position: -36px -87px; } + +div.wysiwyg ul.toolbar li.createLink { background-position: -92px -48px; } +div.wysiwyg ul.toolbar li.unLink { background-position: -74px -87px; } +div.wysiwyg ul.toolbar li.insertImage { background-position: -92px -87px; } + +div.wysiwyg ul.toolbar li.html { background-position: -55px -49px; } +div.wysiwyg ul.toolbar li.removeFormat { background-position: -92px -68px; } + +div.wysiwyg ul.toolbar li.empty { background-position: -73px -86px; } + +div.wysiwyg ul.toolbar li.code { background-position: -74px -106px; } +div.wysiwyg ul.toolbar li.cssWrap { background-position: -92px -106px; } + +div.wysiwyg-dialogRow { float:left; width:100%; font-size: 16px; } + +div.wysiwyg iframe { clear: left; +-moz-box-shadow :inset 0 0 10px rgba(0, 0, 0, 0.4); +-webkit-box-shadow :inset 0 0 10px rgba(0, 0, 0, 0.4); +box-shadow :inset 0 0 10px rgba(0, 0, 0, 0.4); +background-color:white; padding:0px; margin:0; display:block; width: 100%; } + +/* dialog */ +.wysiwyg-dialog { position:fixed; top:50px; left:50px; width:450px; height:300px; background:transparent; font:14px "Helvetic Neue", Helvetica,Arial,sans-serif; } +.wysiwyg-dialog .wysiwyg-dialog-topbar { background:#333; border:1px #111 solid; color:white; padding:10px; position:relative; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper .wysiwyg-dialog-close-button { color:white; text-decoration:none; display:block; padding:6px 10px; position:absolute; right:12px; top:50%; height:14px; margin-top:-12px; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-close-wrapper a.wysiwyg-dialog-close-button:hover { background:#666; } +.wysiwyg-dialog .wysiwyg-dialog-topbar .wysiwyg-dialog-title { font-size:20px; font-weight:bold; padding:5px; } +.wysiwyg-dialog .wysiwyg-dialog-content { border:1px #ccc solid; border-top:0; padding:15px; background:white; } +.wysiwyg-dialog-modal-div { position:absolute; top:0px; left:0px; width:100%; height:100%; background-color:rgb(255,255,255); background-color:rgba(0,0,0,0.5); filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000); -ms-filter:"progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000, endColorstr=#99000000)";} +.wysiwyg-dialog-content form.wysiwyg fieldset { border:1px #ccc solid; } +.wysiwyg-dialog-content form.wysiwyg legend { padding:7px; } +.wysiwyg-dialog-content form.wysiwyg .form-row { clear:both; padding:4px 0; } +.wysiwyg-dialog-content form.wysiwyg .form-row label, .wysiwyg-dialog form.wysiwyg .form-row .form-row-key { display:block; float:left; width:35%; text-align:right; padding:4px 5px; } +.wysiwyg-dialog-content form.wysiwyg .form-row .form-row-value { display:block; float:left; width:55%; } +.wysiwyg-dialog-content form.wysiwyg .form-row input.width-auto { width:auto; } +.wysiwyg-dialog-content form.wysiwyg input.width-small { width:50px; min-width:50px; max-width:50px; } +.wysiwyg-dialog-content form.wysiwyg input, .wysiwyg-dialog form.wysiwyg select { padding:2px; width:100%; margin:2px; } +.wysiwyg-dialog-content form.wysiwyg input[type=submit], .wysiwyg-dialog form.wysiwyg input[type=reset] { padding:2px 7px; width:auto; } \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.snippet.css b/src/bb-themes/huraga/assets/css/plugins/jquery.snippet.css new file mode 100644 index 000000000..f98299aa4 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.snippet.css @@ -0,0 +1,40 @@ +.sh_acid .sh_sourceCode{background-color:#eee;color:#000;font-weight:400;font-style:normal;}.sh_acid .sh_sourceCode .sh_type{color:#8080c0;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_comment{color:#ff8000;font-weight:400;font-style:normal;}.sh_acid .sh_sourceCode .sh_number{color:purple;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_preproc{color:#0080c0;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_function{color:#046;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode{background-color:#80bfff;color:#400080;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_type{color:#3f2bf0;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_comment{color:#df0959;font-weight:400;font-style:italic;}.sh_berries-light .sh_sourceCode{background-color:#d7ffff;color:#47406d;font-weight:400;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_type{color:#8b51c0;font-weight:400;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_comment{color:#9c3caf;font-weight:400;font-style:italic;}.sh_bipolar .sh_sourceCode{background-color:#000;color:#d149a6;font-weight:400;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_type{color:#aadd8b;font-weight:700;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_comment{color:#35d6e5;font-weight:400;font-style:italic;}.sh_bipolar .sh_sourceCode .sh_preproc{color:#07f6bf;font-weight:400;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_function{color:#d51993;font-weight:700;font-style:normal;}.sh_blacknblue .sh_sourceCode{background-color:#000;color:#2346d5;font-weight:400;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_type{color:#c06cf8;font-weight:700;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_comment{color:#6fb2c4;font-weight:400;font-style:italic;}.sh_blacknblue .sh_sourceCode .sh_number{color:#c4ac60;font-weight:400;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_preproc{color:#8080ff;font-weight:400;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_function{color:#1c96ed;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode{background-color:#fff;color:#401e7a;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_type{color:#f7b92c;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_comment{color:#38ad24;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_number{color:#32ba06;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_preproc{color:#5374b0;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_function{color:#d11ced;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode{background-color:#ed6104;color:#00f;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode .sh_number{color:#971ad8;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode .sh_preproc{color:#7b44e0;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode .sh_function{color:#fff700;font-weight:700;font-style:normal;}.sh_darkblue .sh_sourceCode{background-color:#000040;color:#C7C7C7;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_type{color:#60ff60;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_comment{color:#80a0ff;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_number{color:#42cad9;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_preproc{color:#ff80ff;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_number{color:#619de7;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_preproc{color:#1da3cf;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_function{color:#f34627;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode{background-color:#af947e;color:#fffdec;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_type{color:#fef8bc;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_comment{color:#a00000;font-weight:400;font-style:italic;}.sh_desert .sh_sourceCode .sh_number{color:#3e3f25;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_preproc{color:#833914;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_function{color:#f3d266;font-weight:700;font-style:normal;}.sh_dull .sh_sourceCode{background-color:#bfbfbf;color:#656565;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_type{color:#3241c6;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_comment{color:#d11d20;font-weight:400;font-style:italic;}.sh_dull .sh_sourceCode .sh_number{color:#16930d;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_preproc{color:#003;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_function{color:#38255c;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode{background-color:#ffff80;color:#2C7B34;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_type{color:#ed0f55;font-weight:700;font-style:normal;}.sh_easter .sh_sourceCode .sh_comment{color:#24c815;font-weight:400;font-style:italic;}.sh_easter .sh_sourceCode .sh_number{color:#e11a70;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_preproc{color:#1583b1;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_function{color:#1d45d6;font-weight:400;font-style:normal;}.sh_emacs .sh_sourceCode .sh_type{color:#208920;font-weight:400;font-style:normal;}.sh_emacs .sh_sourceCode .sh_comment{color:#ac2020;font-weight:400;font-style:italic;}.sh_golden .sh_sourceCode{background-color:#000;color:#db0;font-weight:400;font-style:normal;}.sh_golden .sh_sourceCode .sh_type{color:#ffed8a;font-weight:400;font-style:normal;}.sh_golden .sh_sourceCode .sh_comment{color:#978345;font-weight:400;font-style:italic;}.sh_golden .sh_sourceCode .sh_preproc{color:#fda;font-weight:400;font-style:normal;}.sh_golden .sh_sourceCode .sh_function{color:#db0;font-weight:700;font-style:normal;}.sh_greenlcd .sh_sourceCode{background-color:#003400;color:#0b0;font-weight:400;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_type{color:#00ed00;font-weight:400;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_function{color:#c0ff73;font-weight:400;font-style:normal;}.sh_ide-anjuta .sh_sourceCode .sh_type{color:navy;font-weight:400;font-style:normal;}.sh_ide-anjuta .sh_sourceCode .sh_comment{color:red;font-weight:400;font-style:italic;}.sh_ide-anjuta .sh_sourceCode .sh_preproc{color:#678000;font-weight:400;font-style:normal;}.sh_ide-codewarrior .sh_sourceCode .sh_type{color:#4c73a6;font-weight:400;font-style:normal;}.sh_ide-codewarrior .sh_sourceCode .sh_comment{color:#b30000;font-weight:400;font-style:normal;}.sh_ide-devcpp .sh_sourceCode .sh_comment{color:navy;font-weight:400;font-style:italic;}.sh_ide-eclipse .sh_sourceCode .sh_comment{color:#717ab3;font-weight:400;font-style:normal;}.sh_ide-eclipse .sh_sourceCode .sh_preproc{color:#3f5fbf;font-weight:400;font-style:normal;}.sh_ide-kdev .sh_sourceCode .sh_type{color:#600000;font-weight:400;font-style:normal;}.sh_ide-kdev .sh_sourceCode .sh_comment{color:#bfbfbf;font-weight:400;font-style:italic;}.sh_ide-msvcpp .sh_sourceCode .sh_comment{color:green;font-weight:400;font-style:italic;}.sh_kwrite .sh_sourceCode .sh_type{color:#830000;font-weight:400;font-style:normal;}.sh_kwrite .sh_sourceCode .sh_comment{color:#838183;font-weight:400;font-style:italic;}.sh_kwrite .sh_sourceCode .sh_number{color:#2928ff;font-weight:400;font-style:normal;}.sh_kwrite .sh_sourceCode .sh_preproc{color:#008200;font-weight:400;font-style:normal;}.sh_kwrite .sh_sourceCode .sh_function{color:#010181;font-weight:400;font-style:normal;}.sh_navy .sh_sourceCode{background-color:#000035;color:#008bff;font-weight:400;font-style:normal;}.sh_navy .sh_sourceCode .sh_type{color:#e1e72f;font-weight:400;font-style:normal;}.sh_navy .sh_sourceCode .sh_comment{color:#fb0;font-weight:400;font-style:italic;}.sh_navy .sh_sourceCode .sh_number{color:#f87ff4;font-weight:400;font-style:normal;}.sh_nedit .sh_sourceCode .sh_comment{color:#000;font-weight:400;font-style:italic;}.sh_nedit .sh_sourceCode .sh_preproc{color:#27408b;font-weight:400;font-style:normal;}.sh_night .sh_sourceCode{background-color:#004;color:#d0f;font-weight:400;font-style:normal;}.sh_night .sh_sourceCode .sh_type{color:#f1157c;font-weight:700;font-style:normal;}.sh_night .sh_sourceCode .sh_number{color:#8ee119;font-weight:400;font-style:normal;}.sh_night .sh_sourceCode .sh_preproc{color:#0b0;font-weight:400;font-style:normal;}.sh_night .sh_sourceCode .sh_function{color:#ff06cd;font-weight:700;font-style:normal;}.sh_pablo .sh_sourceCode .sh_type{color:#00c000;font-weight:700;font-style:normal;}.sh_pablo .sh_sourceCode .sh_comment{color:gray;font-weight:400;font-style:normal;}.sh_pablo .sh_sourceCode .sh_function{color:#ff22b9;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode{background-color:#ffdab9;color:#000;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_type{color:#2e8b57;font-weight:700;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_comment{color:#406090;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_preproc{color:#cd00cd;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_function{color:#521cc7;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode{background-color:#fff;color:#121b28;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_type{color:#c42638;font-weight:700;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_number{color:#0da344;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_preproc{color:#620ac6;font-weight:400;font-style:normal;}.sh_the .sh_sourceCode .sh_type{color:#808;font-weight:400;font-style:normal;}.sh_typical .sh_sourceCode .sh_number{color:#a900a9;font-weight:400;font-style:normal;}.sh_typical .sh_sourceCode .sh_preproc{color:#00b800;font-weight:400;font-style:normal;}.sh_vampire .sh_sourceCode{background-color:#000;color:red;font-weight:400;font-style:normal;}.sh_vampire .sh_sourceCode .sh_type{color:#F35E1E;font-weight:700;font-style:normal;}.sh_vampire .sh_sourceCode .sh_function{color:#7bc710;font-weight:400;font-style:normal;}.sh_whatis .sh_sourceCode{background-color:#000;color:#0f0;font-weight:400;font-style:normal;}.sh_whatis .sh_sourceCode .sh_function{color:#e721d3;font-weight:400;font-style:normal;}.sh_whitengrey .sh_sourceCode{background-color:#fff;color:#696969;font-weight:400;font-style:normal;}.sh_whitengrey .sh_sourceCode .sh_type{color:#696969;font-weight:400;font-style:normal;}.sh_whitengrey .sh_sourceCode .sh_comment{color:#1326a2;font-weight:400;font-style:italic;}.sh_whitengrey .sh_sourceCode .sh_preproc{color:#470000;font-weight:400;font-style:normal;}.sh_zellner .sh_sourceCode .sh_preproc{color:#a020f0;font-weight:400;font-style:normal;}.sh_acid,.sh_berries-dark,.sh_berries-light,.sh_bipolar,.sh_blacknblue,.sh_bright,.sh_contrast,.sh_darkblue,.sh_darkness,.sh_desert,.sh_dull,.sh_easter,.sh_emacs,.sh_golden,.sh_greenlcd,.sh_ide-anjuta,.sh_ide-codewarrior,.sh_ide-devcpp,.sh_ide-eclipse,.sh_ide-kdev,.sh_ide-msvcpp,.sh_kwrite,.sh_matlab,.sh_navy,.sh_nedit,.sh_neon,.sh_night,.sh_pablo,.sh_peachpuff,.sh_print,.sh_rand01,.sh_the,.sh_typical,.sh_vampire,.sh_vim-dark,.sh_vim,.sh_whatis,.sh_whitengrey,.sh_zellner{background:none;border:0 none;margin:0;padding:0;}.sh_acid .sh_sourceCode .sh_keyword,.sh_acid .sh_sourceCode .sh_date,.sh_acid .sh_sourceCode .sh_time,.sh_acid .sh_sourceCode .sh_file,.sh_acid .sh_sourceCode .sh_difflines,.sh_acid .sh_sourceCode .sh_property{color:#bb7977;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_string,.sh_acid .sh_sourceCode .sh_regexp,.sh_acid .sh_sourceCode .sh_url,.sh_acid .sh_sourceCode .sh_ip,.sh_acid .sh_sourceCode .sh_name,.sh_acid .sh_sourceCode .sh_newfile,.sh_acid .sh_sourceCode .sh_value{color:#a68500;font-weight:400;font-style:normal;}.sh_acid .sh_sourceCode .sh_specialchar,.sh_acid .sh_sourceCode .sh_oldfile{color:#f0f;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_symbol,.sh_acid .sh_sourceCode .sh_cbracket{color:#ff0080;font-weight:700;font-style:normal;}.sh_acid .sh_sourceCode .sh_variable,.sh_acid .sh_sourceCode .sh_selector{color:#0080c0;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_keyword,.sh_berries-dark .sh_sourceCode .sh_date,.sh_berries-dark .sh_sourceCode .sh_time,.sh_berries-dark .sh_sourceCode .sh_file,.sh_berries-dark .sh_sourceCode .sh_difflines,.sh_berries-dark .sh_sourceCode .sh_property{color:#3f2bf0;font-weight:700;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_string,.sh_berries-dark .sh_sourceCode .sh_regexp,.sh_berries-dark .sh_sourceCode .sh_url,.sh_berries-dark .sh_sourceCode .sh_ip,.sh_berries-dark .sh_sourceCode .sh_name,.sh_berries-dark .sh_sourceCode .sh_newfile,.sh_berries-dark .sh_sourceCode .sh_value{color:#c40000;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_specialchar,.sh_berries-dark .sh_sourceCode .sh_oldfile{color:#77379a;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_number,.sh_berries-light .sh_sourceCode .sh_number{color:#20755a;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_preproc,.sh_berries-light .sh_sourceCode .sh_preproc{color:#0628cb;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_symbol,.sh_berries-dark .sh_sourceCode .sh_cbracket,.sh_contrast .sh_sourceCode .sh_comment,.sh_emacs .sh_sourceCode .sh_number,.sh_emacs .sh_sourceCode .sh_preproc,.sh_emacs .sh_sourceCode .sh_function,.sh_ide-anjuta .sh_sourceCode .sh_function,.sh_ide-codewarrior .sh_sourceCode .sh_number,.sh_ide-codewarrior .sh_sourceCode .sh_function,.sh_ide-devcpp .sh_sourceCode .sh_type,.sh_ide-devcpp .sh_sourceCode .sh_function,.sh_ide-eclipse .sh_sourceCode .sh_number,.sh_ide-eclipse .sh_sourceCode .sh_function,.sh_ide-kdev .sh_sourceCode .sh_function,.sh_ide-msvcpp .sh_sourceCode .sh_string,.sh_ide-msvcpp .sh_sourceCode .sh_regexp,.sh_ide-msvcpp .sh_sourceCode .sh_specialchar,.sh_ide-msvcpp .sh_sourceCode .sh_number,.sh_ide-msvcpp .sh_sourceCode .sh_function,.sh_ide-msvcpp .sh_sourceCode .sh_url,.sh_ide-msvcpp .sh_sourceCode .sh_ip,.sh_ide-msvcpp .sh_sourceCode .sh_name,.sh_ide-msvcpp .sh_sourceCode .sh_oldfile,.sh_ide-msvcpp .sh_sourceCode .sh_newfile,.sh_ide-msvcpp .sh_sourceCode .sh_value,.sh_matlab .sh_sourceCode .sh_type,.sh_matlab .sh_sourceCode .sh_specialchar,.sh_matlab .sh_sourceCode .sh_number,.sh_matlab .sh_sourceCode .sh_function,.sh_matlab .sh_sourceCode .sh_oldfile,.sh_nedit .sh_sourceCode .sh_function,.sh_print .sh_sourceCode .sh_string,.sh_print .sh_sourceCode .sh_regexp,.sh_print .sh_sourceCode .sh_specialchar,.sh_print .sh_sourceCode .sh_number,.sh_print .sh_sourceCode .sh_url,.sh_print .sh_sourceCode .sh_ip,.sh_print .sh_sourceCode .sh_name,.sh_print .sh_sourceCode .sh_oldfile,.sh_print .sh_sourceCode .sh_newfile,.sh_print .sh_sourceCode .sh_value,.sh_the .sh_sourceCode .sh_specialchar,.sh_the .sh_sourceCode .sh_function,.sh_the .sh_sourceCode .sh_oldfile,.sh_vim .sh_sourceCode .sh_function,.sh_whitengrey .sh_sourceCode .sh_function{color:#000;font-weight:400;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_function,.sh_berries-light .sh_sourceCode .sh_function{color:#901164;font-weight:700;font-style:normal;}.sh_berries-dark .sh_sourceCode .sh_variable,.sh_berries-dark .sh_sourceCode .sh_selector{color:#a91ea7;font-weight:400;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_keyword,.sh_berries-light .sh_sourceCode .sh_date,.sh_berries-light .sh_sourceCode .sh_time,.sh_berries-light .sh_sourceCode .sh_file,.sh_berries-light .sh_sourceCode .sh_difflines,.sh_berries-light .sh_sourceCode .sh_property{color:#2cae1e;font-weight:700;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_string,.sh_berries-light .sh_sourceCode .sh_regexp,.sh_berries-light .sh_sourceCode .sh_specialchar,.sh_berries-light .sh_sourceCode .sh_url,.sh_berries-light .sh_sourceCode .sh_ip,.sh_berries-light .sh_sourceCode .sh_name,.sh_berries-light .sh_sourceCode .sh_oldfile,.sh_berries-light .sh_sourceCode .sh_newfile,.sh_berries-light .sh_sourceCode .sh_value{color:#5f81b3;font-weight:400;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_symbol,.sh_berries-light .sh_sourceCode .sh_cbracket{color:#d2073b;font-weight:400;font-style:normal;}.sh_berries-light .sh_sourceCode .sh_variable,.sh_berries-light .sh_sourceCode .sh_selector{color:#0628cb;font-weight:700;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_keyword,.sh_bipolar .sh_sourceCode .sh_date,.sh_bipolar .sh_sourceCode .sh_time,.sh_bipolar .sh_sourceCode .sh_file,.sh_bipolar .sh_sourceCode .sh_difflines,.sh_bipolar .sh_sourceCode .sh_property{color:#ee85e2;font-weight:700;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_string,.sh_bipolar .sh_sourceCode .sh_regexp,.sh_bipolar .sh_sourceCode .sh_specialchar,.sh_bipolar .sh_sourceCode .sh_url,.sh_bipolar .sh_sourceCode .sh_ip,.sh_bipolar .sh_sourceCode .sh_name,.sh_bipolar .sh_sourceCode .sh_oldfile,.sh_bipolar .sh_sourceCode .sh_newfile,.sh_bipolar .sh_sourceCode .sh_value{color:#9ef457;font-weight:400;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_number,.sh_golden .sh_sourceCode .sh_number,.sh_greenlcd .sh_sourceCode .sh_number,.sh_navy .sh_sourceCode .sh_string,.sh_navy .sh_sourceCode .sh_regexp,.sh_navy .sh_sourceCode .sh_specialchar,.sh_navy .sh_sourceCode .sh_symbol,.sh_navy .sh_sourceCode .sh_function,.sh_navy .sh_sourceCode .sh_cbracket,.sh_navy .sh_sourceCode .sh_url,.sh_navy .sh_sourceCode .sh_ip,.sh_navy .sh_sourceCode .sh_name,.sh_navy .sh_sourceCode .sh_oldfile,.sh_navy .sh_sourceCode .sh_newfile,.sh_navy .sh_sourceCode .sh_value,.sh_night .sh_sourceCode .sh_string,.sh_night .sh_sourceCode .sh_regexp,.sh_night .sh_sourceCode .sh_url,.sh_night .sh_sourceCode .sh_ip,.sh_night .sh_sourceCode .sh_name,.sh_night .sh_sourceCode .sh_newfile,.sh_night .sh_sourceCode .sh_value,.sh_vampire .sh_sourceCode .sh_specialchar,.sh_vampire .sh_sourceCode .sh_variable,.sh_vampire .sh_sourceCode .sh_oldfile,.sh_vampire .sh_sourceCode .sh_selector,.sh_vim-dark .sh_sourceCode .sh_function{color:#fff;font-weight:400;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_symbol,.sh_bipolar .sh_sourceCode .sh_cbracket{color:#348fef;font-weight:400;font-style:normal;}.sh_bipolar .sh_sourceCode .sh_variable,.sh_bipolar .sh_sourceCode .sh_selector{color:#72d42c;font-weight:700;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_keyword,.sh_blacknblue .sh_sourceCode .sh_date,.sh_blacknblue .sh_sourceCode .sh_time,.sh_blacknblue .sh_sourceCode .sh_file,.sh_blacknblue .sh_sourceCode .sh_difflines,.sh_blacknblue .sh_sourceCode .sh_property{color:#1ededc;font-weight:700;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_string,.sh_blacknblue .sh_sourceCode .sh_regexp,.sh_blacknblue .sh_sourceCode .sh_url,.sh_blacknblue .sh_sourceCode .sh_ip,.sh_blacknblue .sh_sourceCode .sh_name,.sh_blacknblue .sh_sourceCode .sh_newfile,.sh_blacknblue .sh_sourceCode .sh_value{color:#cfc631;font-weight:400;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_specialchar,.sh_blacknblue .sh_sourceCode .sh_symbol,.sh_blacknblue .sh_sourceCode .sh_cbracket,.sh_blacknblue .sh_sourceCode .sh_oldfile{color:#ccc6c6;font-weight:400;font-style:normal;}.sh_blacknblue .sh_sourceCode .sh_variable,.sh_blacknblue .sh_sourceCode .sh_selector{color:#ecea26;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_keyword,.sh_bright .sh_sourceCode .sh_date,.sh_bright .sh_sourceCode .sh_time,.sh_bright .sh_sourceCode .sh_file,.sh_bright .sh_sourceCode .sh_difflines,.sh_bright .sh_sourceCode .sh_property{color:#ff3030;font-weight:700;font-style:normal;}.sh_bright .sh_sourceCode .sh_string,.sh_bright .sh_sourceCode .sh_regexp,.sh_bright .sh_sourceCode .sh_specialchar,.sh_bright .sh_sourceCode .sh_url,.sh_bright .sh_sourceCode .sh_ip,.sh_bright .sh_sourceCode .sh_name,.sh_bright .sh_sourceCode .sh_oldfile,.sh_bright .sh_sourceCode .sh_newfile,.sh_bright .sh_sourceCode .sh_value{color:#1861a7;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_symbol,.sh_bright .sh_sourceCode .sh_cbracket{color:#3030ee;font-weight:400;font-style:normal;}.sh_bright .sh_sourceCode .sh_variable,.sh_bright .sh_sourceCode .sh_selector,.sh_emacs .sh_sourceCode .sh_variable,.sh_emacs .sh_sourceCode .sh_selector,.sh_ide-anjuta .sh_sourceCode .sh_variable,.sh_ide-anjuta .sh_sourceCode .sh_selector,.sh_ide-devcpp .sh_sourceCode .sh_number,.sh_ide-eclipse .sh_sourceCode .sh_string,.sh_ide-eclipse .sh_sourceCode .sh_regexp,.sh_ide-eclipse .sh_sourceCode .sh_specialchar,.sh_ide-eclipse .sh_sourceCode .sh_url,.sh_ide-eclipse .sh_sourceCode .sh_ip,.sh_ide-eclipse .sh_sourceCode .sh_name,.sh_ide-eclipse .sh_sourceCode .sh_oldfile,.sh_ide-eclipse .sh_sourceCode .sh_newfile,.sh_ide-eclipse .sh_sourceCode .sh_value,.sh_ide-kdev .sh_sourceCode .sh_number,.sh_ide-msvcpp .sh_sourceCode .sh_type,.sh_ide-msvcpp .sh_sourceCode .sh_preproc,.sh_matlab .sh_sourceCode .sh_keyword,.sh_matlab .sh_sourceCode .sh_date,.sh_matlab .sh_sourceCode .sh_time,.sh_matlab .sh_sourceCode .sh_file,.sh_matlab .sh_sourceCode .sh_variable,.sh_matlab .sh_sourceCode .sh_difflines,.sh_matlab .sh_sourceCode .sh_selector,.sh_matlab .sh_sourceCode .sh_property,.sh_pablo .sh_sourceCode .sh_specialchar,.sh_pablo .sh_sourceCode .sh_oldfile,.sh_the .sh_sourceCode .sh_keyword,.sh_the .sh_sourceCode .sh_date,.sh_the .sh_sourceCode .sh_time,.sh_the .sh_sourceCode .sh_file,.sh_the .sh_sourceCode .sh_variable,.sh_the .sh_sourceCode .sh_difflines,.sh_the .sh_sourceCode .sh_selector,.sh_the .sh_sourceCode .sh_property,.sh_typical .sh_sourceCode .sh_type,.sh_vim-dark .sh_sourceCode .sh_comment,.sh_vim .sh_sourceCode .sh_comment,.sh_zellner .sh_sourceCode .sh_type{color:#00f;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode .sh_keyword,.sh_contrast .sh_sourceCode .sh_type,.sh_contrast .sh_sourceCode .sh_date,.sh_contrast .sh_sourceCode .sh_time,.sh_contrast .sh_sourceCode .sh_file,.sh_contrast .sh_sourceCode .sh_difflines,.sh_contrast .sh_sourceCode .sh_property,.sh_darkblue .sh_sourceCode .sh_function,.sh_neon .sh_sourceCode .sh_function,.sh_night .sh_sourceCode .sh_keyword,.sh_night .sh_sourceCode .sh_date,.sh_night .sh_sourceCode .sh_time,.sh_night .sh_sourceCode .sh_file,.sh_night .sh_sourceCode .sh_difflines,.sh_night .sh_sourceCode .sh_property,.sh_vampire .sh_sourceCode .sh_keyword,.sh_vampire .sh_sourceCode .sh_date,.sh_vampire .sh_sourceCode .sh_time,.sh_vampire .sh_sourceCode .sh_file,.sh_vampire .sh_sourceCode .sh_difflines,.sh_vampire .sh_sourceCode .sh_property,.sh_whatis .sh_sourceCode .sh_type{color:#fff;font-weight:700;font-style:normal;}.sh_contrast .sh_sourceCode .sh_string,.sh_contrast .sh_sourceCode .sh_regexp,.sh_contrast .sh_sourceCode .sh_specialchar,.sh_contrast .sh_sourceCode .sh_url,.sh_contrast .sh_sourceCode .sh_ip,.sh_contrast .sh_sourceCode .sh_name,.sh_contrast .sh_sourceCode .sh_oldfile,.sh_contrast .sh_sourceCode .sh_newfile,.sh_contrast .sh_sourceCode .sh_value{color:#11f80c;font-weight:400;font-style:normal;}.sh_contrast .sh_sourceCode .sh_symbol,.sh_contrast .sh_sourceCode .sh_cbracket,.sh_golden .sh_sourceCode .sh_variable,.sh_golden .sh_sourceCode .sh_selector{color:#dedede;font-weight:700;font-style:normal;}.sh_contrast .sh_sourceCode .sh_variable,.sh_contrast .sh_sourceCode .sh_selector{color:#11f80c;font-weight:700;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_keyword,.sh_darkblue .sh_sourceCode .sh_date,.sh_darkblue .sh_sourceCode .sh_time,.sh_darkblue .sh_sourceCode .sh_file,.sh_darkblue .sh_sourceCode .sh_difflines,.sh_darkblue .sh_sourceCode .sh_property{color:#ffff60;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_string,.sh_darkblue .sh_sourceCode .sh_regexp,.sh_darkblue .sh_sourceCode .sh_url,.sh_darkblue .sh_sourceCode .sh_ip,.sh_darkblue .sh_sourceCode .sh_name,.sh_darkblue .sh_sourceCode .sh_newfile,.sh_darkblue .sh_sourceCode .sh_value{color:#ffa0a0;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_specialchar,.sh_darkblue .sh_sourceCode .sh_oldfile{color:orange;font-weight:400;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_symbol,.sh_darkblue .sh_sourceCode .sh_cbracket{color:#d8e91b;font-weight:700;font-style:normal;}.sh_darkblue .sh_sourceCode .sh_variable,.sh_darkblue .sh_sourceCode .sh_selector,.sh_darkness .sh_sourceCode .sh_variable,.sh_darkness .sh_sourceCode .sh_selector{color:#26e0e7;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode,.sh_neon .sh_sourceCode,.sh_pablo .sh_sourceCode,.sh_vim-dark .sh_sourceCode{background-color:#000;color:#fff;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_keyword,.sh_darkness .sh_sourceCode .sh_date,.sh_darkness .sh_sourceCode .sh_time,.sh_darkness .sh_sourceCode .sh_file,.sh_darkness .sh_sourceCode .sh_difflines,.sh_darkness .sh_sourceCode .sh_property{color:#ff0;font-weight:700;font-style:normal;}.sh_darkness .sh_sourceCode .sh_type,.sh_pablo .sh_sourceCode .sh_preproc,.sh_vim-dark .sh_sourceCode .sh_type,.sh_vim .sh_sourceCode .sh_type{color:#0f0;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_string,.sh_darkness .sh_sourceCode .sh_regexp,.sh_darkness .sh_sourceCode .sh_url,.sh_darkness .sh_sourceCode .sh_ip,.sh_darkness .sh_sourceCode .sh_name,.sh_darkness .sh_sourceCode .sh_newfile,.sh_darkness .sh_sourceCode .sh_value{color:#abab00;font-weight:700;font-style:normal;}.sh_darkness .sh_sourceCode .sh_specialchar,.sh_darkness .sh_sourceCode .sh_oldfile,.sh_greenlcd .sh_sourceCode .sh_preproc,.sh_night .sh_sourceCode .sh_comment,.sh_whatis .sh_sourceCode .sh_preproc{color:#bfbfbf;font-weight:400;font-style:normal;}.sh_darkness .sh_sourceCode .sh_comment,.sh_greenlcd .sh_sourceCode .sh_comment{color:#888;font-weight:400;font-style:italic;}.sh_darkness .sh_sourceCode .sh_symbol,.sh_darkness .sh_sourceCode .sh_cbracket,.sh_kwrite .sh_sourceCode .sh_specialchar,.sh_kwrite .sh_sourceCode .sh_oldfile,.sh_neon .sh_sourceCode .sh_number,.sh_zellner .sh_sourceCode .sh_string,.sh_zellner .sh_sourceCode .sh_regexp,.sh_zellner .sh_sourceCode .sh_specialchar,.sh_zellner .sh_sourceCode .sh_number,.sh_zellner .sh_sourceCode .sh_url,.sh_zellner .sh_sourceCode .sh_ip,.sh_zellner .sh_sourceCode .sh_name,.sh_zellner .sh_sourceCode .sh_oldfile,.sh_zellner .sh_sourceCode .sh_newfile,.sh_zellner .sh_sourceCode .sh_value{color:#f0f;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_keyword,.sh_desert .sh_sourceCode .sh_date,.sh_desert .sh_sourceCode .sh_time,.sh_desert .sh_sourceCode .sh_file,.sh_desert .sh_sourceCode .sh_difflines,.sh_desert .sh_sourceCode .sh_property{color:#fef8bc;font-weight:700;font-style:normal;}.sh_desert .sh_sourceCode .sh_string,.sh_desert .sh_sourceCode .sh_regexp,.sh_desert .sh_sourceCode .sh_specialchar,.sh_desert .sh_sourceCode .sh_url,.sh_desert .sh_sourceCode .sh_ip,.sh_desert .sh_sourceCode .sh_name,.sh_desert .sh_sourceCode .sh_oldfile,.sh_desert .sh_sourceCode .sh_newfile,.sh_desert .sh_sourceCode .sh_value{color:#f6f647;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_symbol,.sh_desert .sh_sourceCode .sh_cbracket{color:#66574f;font-weight:400;font-style:normal;}.sh_desert .sh_sourceCode .sh_variable,.sh_desert .sh_sourceCode .sh_selector,.sh_ide-devcpp .sh_sourceCode .sh_keyword,.sh_ide-devcpp .sh_sourceCode .sh_date,.sh_ide-devcpp .sh_sourceCode .sh_time,.sh_ide-devcpp .sh_sourceCode .sh_file,.sh_ide-devcpp .sh_sourceCode .sh_variable,.sh_ide-devcpp .sh_sourceCode .sh_difflines,.sh_ide-devcpp .sh_sourceCode .sh_selector,.sh_ide-devcpp .sh_sourceCode .sh_property,.sh_kwrite .sh_sourceCode .sh_keyword,.sh_kwrite .sh_sourceCode .sh_date,.sh_kwrite .sh_sourceCode .sh_time,.sh_kwrite .sh_sourceCode .sh_file,.sh_kwrite .sh_sourceCode .sh_variable,.sh_kwrite .sh_sourceCode .sh_difflines,.sh_kwrite .sh_sourceCode .sh_selector,.sh_kwrite .sh_sourceCode .sh_property,.sh_nedit .sh_sourceCode .sh_keyword,.sh_nedit .sh_sourceCode .sh_symbol,.sh_nedit .sh_sourceCode .sh_cbracket,.sh_nedit .sh_sourceCode .sh_date,.sh_nedit .sh_sourceCode .sh_time,.sh_nedit .sh_sourceCode .sh_file,.sh_nedit .sh_sourceCode .sh_difflines,.sh_nedit .sh_sourceCode .sh_property,.sh_print .sh_sourceCode .sh_keyword,.sh_print .sh_sourceCode .sh_type,.sh_print .sh_sourceCode .sh_preproc,.sh_print .sh_sourceCode .sh_symbol,.sh_print .sh_sourceCode .sh_cbracket,.sh_print .sh_sourceCode .sh_date,.sh_print .sh_sourceCode .sh_time,.sh_print .sh_sourceCode .sh_file,.sh_print .sh_sourceCode .sh_variable,.sh_print .sh_sourceCode .sh_difflines,.sh_print .sh_sourceCode .sh_selector,.sh_print .sh_sourceCode .sh_property,.sh_rand01 .sh_sourceCode .sh_function,.sh_typical .sh_sourceCode .sh_function,.sh_zellner .sh_sourceCode .sh_function{color:#000;font-weight:700;font-style:normal;}.sh_dull .sh_sourceCode .sh_keyword,.sh_dull .sh_sourceCode .sh_date,.sh_dull .sh_sourceCode .sh_time,.sh_dull .sh_sourceCode .sh_file,.sh_dull .sh_sourceCode .sh_difflines,.sh_dull .sh_sourceCode .sh_property{color:#353535;font-weight:700;font-style:normal;}.sh_dull .sh_sourceCode .sh_string,.sh_dull .sh_sourceCode .sh_regexp,.sh_dull .sh_sourceCode .sh_specialchar,.sh_dull .sh_sourceCode .sh_url,.sh_dull .sh_sourceCode .sh_ip,.sh_dull .sh_sourceCode .sh_name,.sh_dull .sh_sourceCode .sh_oldfile,.sh_dull .sh_sourceCode .sh_newfile,.sh_dull .sh_sourceCode .sh_value{color:#059;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_symbol,.sh_dull .sh_sourceCode .sh_cbracket{color:#222;font-weight:400;font-style:normal;}.sh_dull .sh_sourceCode .sh_variable,.sh_dull .sh_sourceCode .sh_selector{color:#ae5a16;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_keyword,.sh_easter .sh_sourceCode .sh_date,.sh_easter .sh_sourceCode .sh_time,.sh_easter .sh_sourceCode .sh_file,.sh_easter .sh_sourceCode .sh_difflines,.sh_easter .sh_sourceCode .sh_property{color:#1d45d6;font-weight:700;font-style:normal;}.sh_easter .sh_sourceCode .sh_string,.sh_easter .sh_sourceCode .sh_regexp,.sh_easter .sh_sourceCode .sh_specialchar,.sh_easter .sh_sourceCode .sh_url,.sh_easter .sh_sourceCode .sh_ip,.sh_easter .sh_sourceCode .sh_name,.sh_easter .sh_sourceCode .sh_oldfile,.sh_easter .sh_sourceCode .sh_newfile,.sh_easter .sh_sourceCode .sh_value{color:#ca4be3;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_symbol,.sh_easter .sh_sourceCode .sh_cbracket{color:#fa4700;font-weight:400;font-style:normal;}.sh_easter .sh_sourceCode .sh_variable,.sh_easter .sh_sourceCode .sh_selector{color:#26aae7;font-weight:700;font-style:normal;}.sh_emacs .sh_sourceCode,.sh_ide-anjuta .sh_sourceCode,.sh_ide-codewarrior .sh_sourceCode,.sh_ide-devcpp .sh_sourceCode,.sh_ide-eclipse .sh_sourceCode,.sh_ide-kdev .sh_sourceCode,.sh_ide-msvcpp .sh_sourceCode,.sh_kwrite .sh_sourceCode,.sh_matlab .sh_sourceCode,.sh_nedit .sh_sourceCode,.sh_print .sh_sourceCode,.sh_the .sh_sourceCode,.sh_typical .sh_sourceCode,.sh_vim .sh_sourceCode,.sh_zellner .sh_sourceCode{background-color:#fff;color:#000;font-weight:400;font-style:normal;}.sh_emacs .sh_sourceCode .sh_keyword,.sh_emacs .sh_sourceCode .sh_date,.sh_emacs .sh_sourceCode .sh_time,.sh_emacs .sh_sourceCode .sh_file,.sh_emacs .sh_sourceCode .sh_difflines,.sh_emacs .sh_sourceCode .sh_property{color:#9c20ee;font-weight:700;font-style:normal;}.sh_emacs .sh_sourceCode .sh_string,.sh_emacs .sh_sourceCode .sh_regexp,.sh_emacs .sh_sourceCode .sh_specialchar,.sh_emacs .sh_sourceCode .sh_url,.sh_emacs .sh_sourceCode .sh_ip,.sh_emacs .sh_sourceCode .sh_name,.sh_emacs .sh_sourceCode .sh_oldfile,.sh_emacs .sh_sourceCode .sh_newfile,.sh_emacs .sh_sourceCode .sh_value{color:#bd8d8b;font-weight:400;font-style:normal;}.sh_golden .sh_sourceCode .sh_keyword,.sh_golden .sh_sourceCode .sh_date,.sh_golden .sh_sourceCode .sh_time,.sh_golden .sh_sourceCode .sh_file,.sh_golden .sh_sourceCode .sh_difflines,.sh_golden .sh_sourceCode .sh_property{color:#ffed8a;font-weight:700;font-style:normal;}.sh_golden .sh_sourceCode .sh_string,.sh_golden .sh_sourceCode .sh_regexp,.sh_golden .sh_sourceCode .sh_specialchar,.sh_golden .sh_sourceCode .sh_url,.sh_golden .sh_sourceCode .sh_ip,.sh_golden .sh_sourceCode .sh_name,.sh_golden .sh_sourceCode .sh_oldfile,.sh_golden .sh_sourceCode .sh_newfile,.sh_golden .sh_sourceCode .sh_value,.sh_ide-devcpp .sh_sourceCode .sh_string,.sh_ide-devcpp .sh_sourceCode .sh_regexp,.sh_ide-devcpp .sh_sourceCode .sh_specialchar,.sh_ide-devcpp .sh_sourceCode .sh_url,.sh_ide-devcpp .sh_sourceCode .sh_ip,.sh_ide-devcpp .sh_sourceCode .sh_name,.sh_ide-devcpp .sh_sourceCode .sh_oldfile,.sh_ide-devcpp .sh_sourceCode .sh_newfile,.sh_ide-devcpp .sh_sourceCode .sh_value,.sh_ide-kdev .sh_sourceCode .sh_string,.sh_ide-kdev .sh_sourceCode .sh_regexp,.sh_ide-kdev .sh_sourceCode .sh_specialchar,.sh_ide-kdev .sh_sourceCode .sh_url,.sh_ide-kdev .sh_sourceCode .sh_ip,.sh_ide-kdev .sh_sourceCode .sh_name,.sh_ide-kdev .sh_sourceCode .sh_oldfile,.sh_ide-kdev .sh_sourceCode .sh_newfile,.sh_ide-kdev .sh_sourceCode .sh_value,.sh_kwrite .sh_sourceCode .sh_string,.sh_kwrite .sh_sourceCode .sh_regexp,.sh_kwrite .sh_sourceCode .sh_url,.sh_kwrite .sh_sourceCode .sh_ip,.sh_kwrite .sh_sourceCode .sh_name,.sh_kwrite .sh_sourceCode .sh_newfile,.sh_kwrite .sh_sourceCode .sh_value,.sh_pablo .sh_sourceCode .sh_symbol,.sh_pablo .sh_sourceCode .sh_cbracket,.sh_the .sh_sourceCode .sh_number,.sh_the .sh_sourceCode .sh_preproc,.sh_typical .sh_sourceCode .sh_string,.sh_typical .sh_sourceCode .sh_regexp,.sh_typical .sh_sourceCode .sh_symbol,.sh_typical .sh_sourceCode .sh_cbracket,.sh_typical .sh_sourceCode .sh_url,.sh_typical .sh_sourceCode .sh_ip,.sh_typical .sh_sourceCode .sh_name,.sh_typical .sh_sourceCode .sh_newfile,.sh_typical .sh_sourceCode .sh_value,.sh_vim-dark .sh_sourceCode .sh_string,.sh_vim-dark .sh_sourceCode .sh_regexp,.sh_vim-dark .sh_sourceCode .sh_number,.sh_vim-dark .sh_sourceCode .sh_url,.sh_vim-dark .sh_sourceCode .sh_ip,.sh_vim-dark .sh_sourceCode .sh_name,.sh_vim-dark .sh_sourceCode .sh_newfile,.sh_vim-dark .sh_sourceCode .sh_value,.sh_vim .sh_sourceCode .sh_string,.sh_vim .sh_sourceCode .sh_regexp,.sh_vim .sh_sourceCode .sh_number,.sh_vim .sh_sourceCode .sh_url,.sh_vim .sh_sourceCode .sh_ip,.sh_vim .sh_sourceCode .sh_name,.sh_vim .sh_sourceCode .sh_newfile,.sh_vim .sh_sourceCode .sh_value,.sh_whatis .sh_sourceCode .sh_comment,.sh_zellner .sh_sourceCode .sh_comment{color:red;font-weight:400;font-style:normal;}.sh_golden .sh_sourceCode .sh_symbol,.sh_golden .sh_sourceCode .sh_cbracket,.sh_vampire .sh_sourceCode .sh_preproc{color:#ababab;font-weight:400;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_keyword,.sh_greenlcd .sh_sourceCode .sh_date,.sh_greenlcd .sh_sourceCode .sh_time,.sh_greenlcd .sh_sourceCode .sh_file,.sh_greenlcd .sh_sourceCode .sh_difflines,.sh_greenlcd .sh_sourceCode .sh_property{color:#00ed00;font-weight:700;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_string,.sh_greenlcd .sh_sourceCode .sh_regexp,.sh_greenlcd .sh_sourceCode .sh_specialchar,.sh_greenlcd .sh_sourceCode .sh_url,.sh_greenlcd .sh_sourceCode .sh_ip,.sh_greenlcd .sh_sourceCode .sh_name,.sh_greenlcd .sh_sourceCode .sh_oldfile,.sh_greenlcd .sh_sourceCode .sh_newfile,.sh_greenlcd .sh_sourceCode .sh_value{color:#dfdfdf;font-weight:400;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_symbol,.sh_greenlcd .sh_sourceCode .sh_cbracket{color:#2fe7a9;font-weight:400;font-style:normal;}.sh_greenlcd .sh_sourceCode .sh_variable,.sh_greenlcd .sh_sourceCode .sh_selector{color:#beef13;font-weight:400;font-style:normal;}.sh_ide-anjuta .sh_sourceCode .sh_keyword,.sh_ide-anjuta .sh_sourceCode .sh_date,.sh_ide-anjuta .sh_sourceCode .sh_time,.sh_ide-anjuta .sh_sourceCode .sh_file,.sh_ide-anjuta .sh_sourceCode .sh_difflines,.sh_ide-anjuta .sh_sourceCode .sh_property{color:navy;font-weight:700;font-style:normal;}.sh_ide-anjuta .sh_sourceCode .sh_string,.sh_ide-anjuta .sh_sourceCode .sh_regexp,.sh_ide-anjuta .sh_sourceCode .sh_specialchar,.sh_ide-anjuta .sh_sourceCode .sh_url,.sh_ide-anjuta .sh_sourceCode .sh_ip,.sh_ide-anjuta .sh_sourceCode .sh_name,.sh_ide-anjuta .sh_sourceCode .sh_oldfile,.sh_ide-anjuta .sh_sourceCode .sh_newfile,.sh_ide-anjuta .sh_sourceCode .sh_value{color:#db0;font-weight:400;font-style:normal;}.sh_ide-anjuta .sh_sourceCode .sh_number,.sh_whitengrey .sh_sourceCode .sh_string,.sh_whitengrey .sh_sourceCode .sh_regexp,.sh_whitengrey .sh_sourceCode .sh_specialchar,.sh_whitengrey .sh_sourceCode .sh_url,.sh_whitengrey .sh_sourceCode .sh_ip,.sh_whitengrey .sh_sourceCode .sh_name,.sh_whitengrey .sh_sourceCode .sh_oldfile,.sh_whitengrey .sh_sourceCode .sh_newfile,.sh_whitengrey .sh_sourceCode .sh_value{color:#080;font-weight:400;font-style:normal;}.sh_ide-codewarrior .sh_sourceCode .sh_keyword,.sh_ide-codewarrior .sh_sourceCode .sh_preproc,.sh_ide-codewarrior .sh_sourceCode .sh_date,.sh_ide-codewarrior .sh_sourceCode .sh_time,.sh_ide-codewarrior .sh_sourceCode .sh_file,.sh_ide-codewarrior .sh_sourceCode .sh_variable,.sh_ide-codewarrior .sh_sourceCode .sh_difflines,.sh_ide-codewarrior .sh_sourceCode .sh_selector,.sh_ide-codewarrior .sh_sourceCode .sh_property{color:#0000b3;font-weight:400;font-style:normal;}.sh_ide-codewarrior .sh_sourceCode .sh_string,.sh_ide-codewarrior .sh_sourceCode .sh_regexp,.sh_ide-codewarrior .sh_sourceCode .sh_specialchar,.sh_ide-codewarrior .sh_sourceCode .sh_url,.sh_ide-codewarrior .sh_sourceCode .sh_ip,.sh_ide-codewarrior .sh_sourceCode .sh_name,.sh_ide-codewarrior .sh_sourceCode .sh_oldfile,.sh_ide-codewarrior .sh_sourceCode .sh_newfile,.sh_ide-codewarrior .sh_sourceCode .sh_value{color:#666;font-weight:400;font-style:normal;}.sh_ide-devcpp .sh_sourceCode .sh_preproc,.sh_ide-kdev .sh_sourceCode .sh_preproc{color:green;font-weight:400;font-style:normal;}.sh_ide-eclipse .sh_sourceCode .sh_keyword,.sh_ide-eclipse .sh_sourceCode .sh_type,.sh_ide-eclipse .sh_sourceCode .sh_date,.sh_ide-eclipse .sh_sourceCode .sh_time,.sh_ide-eclipse .sh_sourceCode .sh_file,.sh_ide-eclipse .sh_sourceCode .sh_variable,.sh_ide-eclipse .sh_sourceCode .sh_difflines,.sh_ide-eclipse .sh_sourceCode .sh_selector,.sh_ide-eclipse .sh_sourceCode .sh_property{color:#7f0055;font-weight:700;font-style:normal;}.sh_ide-kdev .sh_sourceCode .sh_keyword,.sh_ide-kdev .sh_sourceCode .sh_date,.sh_ide-kdev .sh_sourceCode .sh_time,.sh_ide-kdev .sh_sourceCode .sh_file,.sh_ide-kdev .sh_sourceCode .sh_variable,.sh_ide-kdev .sh_sourceCode .sh_difflines,.sh_ide-kdev .sh_sourceCode .sh_selector,.sh_ide-kdev .sh_sourceCode .sh_property{color:#600000;font-weight:700;font-style:normal;}.sh_ide-msvcpp .sh_sourceCode .sh_keyword,.sh_ide-msvcpp .sh_sourceCode .sh_date,.sh_ide-msvcpp .sh_sourceCode .sh_time,.sh_ide-msvcpp .sh_sourceCode .sh_file,.sh_ide-msvcpp .sh_sourceCode .sh_variable,.sh_ide-msvcpp .sh_sourceCode .sh_difflines,.sh_ide-msvcpp .sh_sourceCode .sh_selector,.sh_ide-msvcpp .sh_sourceCode .sh_property,.sh_typical .sh_sourceCode .sh_keyword,.sh_typical .sh_sourceCode .sh_date,.sh_typical .sh_sourceCode .sh_time,.sh_typical .sh_sourceCode .sh_file,.sh_typical .sh_sourceCode .sh_difflines,.sh_typical .sh_sourceCode .sh_property{color:#00f;font-weight:700;font-style:normal;}.sh_matlab .sh_sourceCode .sh_string,.sh_matlab .sh_sourceCode .sh_regexp,.sh_matlab .sh_sourceCode .sh_url,.sh_matlab .sh_sourceCode .sh_ip,.sh_matlab .sh_sourceCode .sh_name,.sh_matlab .sh_sourceCode .sh_newfile,.sh_matlab .sh_sourceCode .sh_value{color:maroon;font-weight:400;font-style:normal;}.sh_navy .sh_sourceCode .sh_keyword,.sh_navy .sh_sourceCode .sh_date,.sh_navy .sh_sourceCode .sh_time,.sh_navy .sh_sourceCode .sh_file,.sh_navy .sh_sourceCode .sh_difflines,.sh_navy .sh_sourceCode .sh_property{color:#f8c50b;font-weight:700;font-style:normal;}.sh_navy .sh_sourceCode .sh_preproc,.sh_vampire .sh_sourceCode .sh_string,.sh_vampire .sh_sourceCode .sh_regexp,.sh_vampire .sh_sourceCode .sh_number,.sh_vampire .sh_sourceCode .sh_url,.sh_vampire .sh_sourceCode .sh_ip,.sh_vampire .sh_sourceCode .sh_name,.sh_vampire .sh_sourceCode .sh_newfile,.sh_vampire .sh_sourceCode .sh_value,.sh_whitengrey .sh_sourceCode .sh_number{color:#b0f;font-weight:400;font-style:normal;}.sh_navy .sh_sourceCode .sh_variable,.sh_navy .sh_sourceCode .sh_selector{color:#13d8ef;font-weight:400;font-style:normal;}.sh_nedit .sh_sourceCode .sh_type,.sh_peachpuff .sh_sourceCode .sh_keyword,.sh_peachpuff .sh_sourceCode .sh_date,.sh_peachpuff .sh_sourceCode .sh_time,.sh_peachpuff .sh_sourceCode .sh_file,.sh_peachpuff .sh_sourceCode .sh_difflines,.sh_peachpuff .sh_sourceCode .sh_property{color:#a52a2a;font-weight:700;font-style:normal;}.sh_nedit .sh_sourceCode .sh_string,.sh_nedit .sh_sourceCode .sh_regexp,.sh_nedit .sh_sourceCode .sh_number,.sh_nedit .sh_sourceCode .sh_url,.sh_nedit .sh_sourceCode .sh_ip,.sh_nedit .sh_sourceCode .sh_name,.sh_nedit .sh_sourceCode .sh_newfile,.sh_nedit .sh_sourceCode .sh_value{color:#006400;font-weight:400;font-style:normal;}.sh_nedit .sh_sourceCode .sh_specialchar,.sh_nedit .sh_sourceCode .sh_oldfile{color:#2e8b57;font-weight:400;font-style:normal;}.sh_nedit .sh_sourceCode .sh_variable,.sh_nedit .sh_sourceCode .sh_selector{color:#dda0dd;font-weight:700;font-style:normal;}.sh_neon .sh_sourceCode .sh_keyword,.sh_neon .sh_sourceCode .sh_date,.sh_neon .sh_sourceCode .sh_time,.sh_neon .sh_sourceCode .sh_file,.sh_neon .sh_sourceCode .sh_difflines,.sh_neon .sh_sourceCode .sh_property{color:#0ff;font-weight:700;font-style:normal;}.sh_neon .sh_sourceCode .sh_type,.sh_whatis .sh_sourceCode .sh_number{color:#ff0;font-weight:400;font-style:normal;}.sh_neon .sh_sourceCode .sh_string,.sh_neon .sh_sourceCode .sh_regexp,.sh_neon .sh_sourceCode .sh_specialchar,.sh_neon .sh_sourceCode .sh_url,.sh_neon .sh_sourceCode .sh_ip,.sh_neon .sh_sourceCode .sh_name,.sh_neon .sh_sourceCode .sh_oldfile,.sh_neon .sh_sourceCode .sh_newfile,.sh_neon .sh_sourceCode .sh_value{color:#cd00ff;font-weight:400;font-style:normal;}.sh_neon .sh_sourceCode .sh_comment,.sh_the .sh_sourceCode .sh_comment{color:#0f0;font-weight:400;font-style:italic;}.sh_neon .sh_sourceCode .sh_preproc,.sh_whatis .sh_sourceCode .sh_string,.sh_whatis .sh_sourceCode .sh_regexp,.sh_whatis .sh_sourceCode .sh_specialchar,.sh_whatis .sh_sourceCode .sh_url,.sh_whatis .sh_sourceCode .sh_ip,.sh_whatis .sh_sourceCode .sh_name,.sh_whatis .sh_sourceCode .sh_oldfile,.sh_whatis .sh_sourceCode .sh_newfile,.sh_whatis .sh_sourceCode .sh_value{color:#fb0;font-weight:400;font-style:normal;}.sh_neon .sh_sourceCode .sh_symbol,.sh_neon .sh_sourceCode .sh_cbracket{color:#ee5896;font-weight:700;font-style:normal;}.sh_neon .sh_sourceCode .sh_variable,.sh_neon .sh_sourceCode .sh_selector{color:#ef1347;font-weight:700;font-style:normal;}.sh_night .sh_sourceCode .sh_specialchar,.sh_night .sh_sourceCode .sh_oldfile{color:#82d66d;font-weight:400;font-style:normal;}.sh_night .sh_sourceCode .sh_symbol,.sh_night .sh_sourceCode .sh_cbracket{color:#e7ee5c;font-weight:700;font-style:normal;}.sh_night .sh_sourceCode .sh_variable,.sh_night .sh_sourceCode .sh_selector{color:#7aec27;font-weight:700;font-style:normal;}.sh_pablo .sh_sourceCode .sh_keyword,.sh_pablo .sh_sourceCode .sh_date,.sh_pablo .sh_sourceCode .sh_time,.sh_pablo .sh_sourceCode .sh_file,.sh_pablo .sh_sourceCode .sh_difflines,.sh_pablo .sh_sourceCode .sh_property{color:#c0c000;font-weight:700;font-style:normal;}.sh_pablo .sh_sourceCode .sh_string,.sh_pablo .sh_sourceCode .sh_regexp,.sh_pablo .sh_sourceCode .sh_number,.sh_pablo .sh_sourceCode .sh_url,.sh_pablo .sh_sourceCode .sh_ip,.sh_pablo .sh_sourceCode .sh_name,.sh_pablo .sh_sourceCode .sh_newfile,.sh_pablo .sh_sourceCode .sh_value,.sh_whatis .sh_sourceCode .sh_symbol,.sh_whatis .sh_sourceCode .sh_cbracket{color:#0ff;font-weight:400;font-style:normal;}.sh_pablo .sh_sourceCode .sh_variable,.sh_pablo .sh_sourceCode .sh_selector{color:#0000c0;font-weight:700;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_string,.sh_peachpuff .sh_sourceCode .sh_regexp,.sh_peachpuff .sh_sourceCode .sh_number,.sh_peachpuff .sh_sourceCode .sh_url,.sh_peachpuff .sh_sourceCode .sh_ip,.sh_peachpuff .sh_sourceCode .sh_name,.sh_peachpuff .sh_sourceCode .sh_newfile,.sh_peachpuff .sh_sourceCode .sh_value{color:#c00058;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_specialchar,.sh_peachpuff .sh_sourceCode .sh_oldfile{color:#6a5acd;font-weight:400;font-style:normal;}.sh_peachpuff .sh_sourceCode .sh_variable,.sh_peachpuff .sh_sourceCode .sh_selector{color:#275fec;font-weight:700;font-style:normal;}.sh_print .sh_sourceCode .sh_comment,.sh_typical .sh_sourceCode .sh_comment{color:#666;font-weight:400;font-style:italic;}.sh_rand01 .sh_sourceCode .sh_keyword,.sh_rand01 .sh_sourceCode .sh_date,.sh_rand01 .sh_sourceCode .sh_time,.sh_rand01 .sh_sourceCode .sh_file,.sh_rand01 .sh_sourceCode .sh_difflines,.sh_rand01 .sh_sourceCode .sh_property{color:#0a7f6d;font-weight:700;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_string,.sh_rand01 .sh_sourceCode .sh_regexp,.sh_rand01 .sh_sourceCode .sh_url,.sh_rand01 .sh_sourceCode .sh_ip,.sh_rand01 .sh_sourceCode .sh_name,.sh_rand01 .sh_sourceCode .sh_newfile,.sh_rand01 .sh_sourceCode .sh_value{color:#2b83ba;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_specialchar,.sh_rand01 .sh_sourceCode .sh_oldfile{color:#a764cb;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_comment,.sh_vampire .sh_sourceCode .sh_comment{color:#ababab;font-weight:400;font-style:italic;}.sh_rand01 .sh_sourceCode .sh_symbol,.sh_rand01 .sh_sourceCode .sh_cbracket{color:#0000de;font-weight:400;font-style:normal;}.sh_rand01 .sh_sourceCode .sh_variable,.sh_rand01 .sh_sourceCode .sh_selector{color:#e12f76;font-weight:700;font-style:normal;}.sh_the .sh_sourceCode .sh_string,.sh_the .sh_sourceCode .sh_regexp,.sh_the .sh_sourceCode .sh_url,.sh_the .sh_sourceCode .sh_ip,.sh_the .sh_sourceCode .sh_name,.sh_the .sh_sourceCode .sh_newfile,.sh_the .sh_sourceCode .sh_value{color:#008;font-weight:400;font-style:normal;}.sh_typical .sh_sourceCode .sh_specialchar,.sh_typical .sh_sourceCode .sh_oldfile{color:#C42DA8;font-weight:400;font-style:normal;}.sh_typical .sh_sourceCode .sh_variable,.sh_typical .sh_sourceCode .sh_selector{color:#ec7f15;font-weight:400;font-style:normal;}.sh_vampire .sh_sourceCode .sh_symbol,.sh_vampire .sh_sourceCode .sh_cbracket{color:#F3E651;font-weight:400;font-style:normal;}.sh_vim-dark .sh_sourceCode .sh_keyword,.sh_vim-dark .sh_sourceCode .sh_date,.sh_vim-dark .sh_sourceCode .sh_time,.sh_vim-dark .sh_sourceCode .sh_file,.sh_vim-dark .sh_sourceCode .sh_variable,.sh_vim-dark .sh_sourceCode .sh_difflines,.sh_vim-dark .sh_sourceCode .sh_selector,.sh_vim-dark .sh_sourceCode .sh_property,.sh_vim .sh_sourceCode .sh_keyword,.sh_vim .sh_sourceCode .sh_date,.sh_vim .sh_sourceCode .sh_time,.sh_vim .sh_sourceCode .sh_file,.sh_vim .sh_sourceCode .sh_variable,.sh_vim .sh_sourceCode .sh_difflines,.sh_vim .sh_sourceCode .sh_selector,.sh_vim .sh_sourceCode .sh_property{color:#B26818;font-weight:400;font-style:normal;}.sh_vim-dark .sh_sourceCode .sh_specialchar,.sh_vim-dark .sh_sourceCode .sh_preproc,.sh_vim-dark .sh_sourceCode .sh_oldfile,.sh_vim .sh_sourceCode .sh_specialchar,.sh_vim .sh_sourceCode .sh_preproc,.sh_vim .sh_sourceCode .sh_oldfile{color:#f2f;font-weight:400;font-style:normal;}.sh_whatis .sh_sourceCode .sh_keyword,.sh_whatis .sh_sourceCode .sh_date,.sh_whatis .sh_sourceCode .sh_time,.sh_whatis .sh_sourceCode .sh_file,.sh_whatis .sh_sourceCode .sh_difflines,.sh_whatis .sh_sourceCode .sh_property{color:#fa5a03;font-weight:700;font-style:normal;}.sh_whatis .sh_sourceCode .sh_variable,.sh_whatis .sh_sourceCode .sh_selector{color:#efe219;font-weight:700;font-style:normal;}.sh_whitengrey .sh_sourceCode .sh_keyword,.sh_whitengrey .sh_sourceCode .sh_date,.sh_whitengrey .sh_sourceCode .sh_time,.sh_whitengrey .sh_sourceCode .sh_file,.sh_whitengrey .sh_sourceCode .sh_variable,.sh_whitengrey .sh_sourceCode .sh_difflines,.sh_whitengrey .sh_sourceCode .sh_selector,.sh_whitengrey .sh_sourceCode .sh_property{color:#696969;font-weight:700;font-style:normal;}.sh_zellner .sh_sourceCode .sh_keyword,.sh_zellner .sh_sourceCode .sh_date,.sh_zellner .sh_sourceCode .sh_time,.sh_zellner .sh_sourceCode .sh_file,.sh_zellner .sh_sourceCode .sh_difflines,.sh_zellner .sh_sourceCode .sh_property{color:#a52a2a;font-weight:400;font-style:normal;}.sh_zellner .sh_sourceCode .sh_variable,.sh_zellner .sh_sourceCode .sh_selector{color:#225f2d;font-weight:400;font-style:normal;} + +.snippet-wrap {position:relative;} +*:first-child+html .snippet-wrap {display:inline-block;} +* html .snippet-wrap {display:inline-block;} +.snippet-reveal{text-decoration:underline;} +.snippet-wrap .snippet-menu, .snippet-wrap .snippet-hide {position:absolute; top:10px; right:15px; font-size:.9em;z-index:1;background-color:transparent;} +.snippet-wrap .snippet-hide {top:auto; bottom:10px;} +*:first-child+html .snippet-wrap .snippet-hide {bottom:25px;} +* html .snippet-wrap .snippet-hide {bottom:25px;} +.snippet-wrap .snippet-menu pre, .snippet-wrap .snippet-hide pre {background-color:transparent; margin:0; padding:0;} +.snippet-wrap .snippet-menu a, .snippet-wrap .snippet-hide a {padding:0 5px; text-decoration:underline;} +.snippet-wrap pre.sh_sourceCode{padding:1em;line-height:1.8em;overflow:auto;position:relative; +-moz-border-radius:15px; +-webkit-border-radius:15px; +border-radius:15px; +box-shadow: 2px 2px 5px #000; +-moz-box-shadow: 2px 2px 5px #000; +-webkit-box-shadow: 2px 2px 5px #000;} +.snippet-wrap pre.snippet-textonly {padding:2em;} +*:first-child+html .snippet-wrap pre.snippet-formatted {padding:2em 1em;} +* html .snippet-wrap pre.snippet-formatted {padding:2em 1em;} +.snippet-reveal pre.sh_sourceCode {padding:.5em 1em; text-align:right;} +.snippet-wrap .snippet-num li{padding-left:1.5em;} +.snippet-wrap .snippet-no-num{list-style:none; padding:.6em 1em; margin:0;} +.snippet-wrap .snippet-no-num li {list-style:none; padding-left:0;} +.snippet-wrap .snippet-num {margin:1em 0 1em 1em; padding-left:3em;} +.snippet-wrap .snippet-num li {list-style:decimal-leading-zero outside none;} +.snippet-wrap .snippet-no-num li.box {padding:0 6px; margin-left:-6px;} +.snippet-wrap .snippet-num li.box {border:1px solid; list-style-position:inside; margin-left:-3em; padding-left:6px;} +*:first-child+html .snippet-wrap .snippet-num li.box {margin-left:-2.4em;} +* html .snippet-wrap .snippet-num li.box {margin-left:-2.4em;} +.snippet-wrap li.box-top {border-width:1px 1px 0 !important;} +.snippet-wrap li.box-bot {border-width:0 1px 1px !important;} +.snippet-wrap li.box-mid {border-width:0 1px !important;} +.snippet-wrap .snippet-num li .box-sp {width:18px; display:inline-block;} +*:first-child+html .snippet-wrap .snippet-num li .box-sp {width:27px;} +* html .snippet-wrap .snippet-num li .box-sp {width:27px;} +.snippet-wrap .snippet-no-num li.box {border:1px solid;} +.snippet-wrap .snippet-no-num li .box-sp {display:none;} \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.tagsinput.css b/src/bb-themes/huraga/assets/css/plugins/jquery.tagsinput.css new file mode 100644 index 000000000..c595e249f --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.tagsinput.css @@ -0,0 +1,7 @@ +div.tagsinput { border:1px solid #CCC; background: #FFF; padding:5px; width:300px; height:100px; overflow-y: auto;} +div.tagsinput span.tag { border: 1px solid #a5d24a; -moz-border-radius:2px; -webkit-border-radius:2px; display: block; float: left; padding: 5px; text-decoration:none; background: #cde69c; color: #638421; margin-right: 5px; margin-bottom:5px;font-family: helvetica; font-size:13px;} +div.tagsinput span.tag a { font-weight: bold; color: #82ad2b; text-decoration:none; font-size: 11px; } +div.tagsinput input { width:80px; margin:0px; font-family: helvetica; font-size: 13px; border:1px solid transparent; padding:5px; background: transparent; color: #000; outline:0px; margin-right:5px; margin-bottom:5px; } +div.tagsinput div { display:block; float: left; } +.tags_clear { clear: both; width: 100%; height: 0px; } +.not_valid {background: #FBD8DB !important; color: #90111A !important;} diff --git a/src/bb-themes/huraga/assets/css/plugins/jquery.visualize.css b/src/bb-themes/huraga/assets/css/plugins/jquery.visualize.css new file mode 100644 index 000000000..5df94ead1 --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/jquery.visualize.css @@ -0,0 +1,32 @@ +/*plugin styles*/ +.visualize { border: 1px solid #888; position: relative; background: #fafafa; } +.visualize canvas { position: absolute; } +.visualize ul,.visualize li { margin: 0; padding: 0;} + +/*table title, key elements*/ +.visualize .visualize-info { padding: 3px 5px; background: #fafafa; border: 1px solid #888; position: absolute; top: -20px; right: 10px; opacity: .8; } +.visualize .visualize-title { display: block; color: #333; margin-bottom: 3px; font-size: 1.1em; } +.visualize ul.visualize-key { list-style: none; } +.visualize ul.visualize-key li { list-style: none; float: left; margin-right: 10px; padding-left: 10px; position: relative;} +.visualize ul.visualize-key .visualize-key-color { width: 6px; height: 6px; left: 0; position: absolute; top: 50%; margin-top: -3px; } +.visualize ul.visualize-key .visualize-key-label { color: #000; } + +/*pie labels*/ +.visualize-pie .visualize-labels { list-style: none; } +.visualize-pie .visualize-label-pos, .visualize-pie .visualize-label { position: absolute; margin: 0; padding:0; } +.visualize-pie .visualize-label { display: block; color: #fff; font-weight: bold; font-size: 1em; } +.visualize-pie-outside .visualize-label { color: #000; font-weight: normal; } + +/*line,bar, area labels*/ +.visualize-labels-x,.visualize-labels-y { position: absolute; left: 0; top: 0; list-style: none; } +.visualize-labels-x li, .visualize-labels-y li { position: absolute; bottom: 0; } +.visualize-labels-x li span.label, .visualize-labels-y li span.label { position: absolute; color: #555; } +.visualize-labels-x li span.line, .visualize-labels-y li span.line { position: absolute; border: 0 solid #ccc; } +.visualize-labels-x li { height: 100%; } +.visualize-labels-x li span.label { top: 100%; margin-top: 5px; } +.visualize-labels-x li span.line { border-left-width: 1px; height: 100%; display: block; } +.visualize-labels-x li span.line { border: 0;} /*hide vertical lines on area, line, bar*/ +.visualize-labels-y li { width: 100%; } +.visualize-labels-y li span.label { right: 100%; margin-right: 5px; display: block; width: 100px; text-align: right; } +.visualize-labels-y li span.line { border-top-width: 1px; width: 100%; } +.visualize-bar .visualize-labels-x li span.label { width: 100%; text-align: center; } \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/css/plugins/lightbox.css b/src/bb-themes/huraga/assets/css/plugins/lightbox.css new file mode 100644 index 000000000..60c2b276b --- /dev/null +++ b/src/bb-themes/huraga/assets/css/plugins/lightbox.css @@ -0,0 +1,181 @@ +/* line 6, ../sass/lightbox.sass */ +#lightboxOverlay { + position: absolute; + top: 0; + left: 0; + z-index: 9999; + background-color: black; + filter: progid:DXImageTransform.Microsoft.Alpha(Opacity=85); + opacity: 0.85; + display: none; +} + +/* line 15, ../sass/lightbox.sass */ +#lightbox { + position: absolute; + left: 0; + width: 100%; + z-index: 10000; + text-align: center; + line-height: 0; + font-family: "lucida grande", tahoma, verdana, arial, sans-serif; + font-weight: normal; +} +/* line 24, ../sass/lightbox.sass */ +#lightbox img { + width: auto; + height: auto; +} +/* line 27, ../sass/lightbox.sass */ +#lightbox a img { + border: none; +} + +/* line 30, ../sass/lightbox.sass */ +.lb-outerContainer { + position: relative; + background-color: white; + *zoom: 1; + width: 250px; + height: 250px; + margin: 0 auto; + -webkit-border-radius: 4px; + -moz-border-radius: 4px; + -ms-border-radius: 4px; + -o-border-radius: 4px; + border-radius: 4px; +} +/* line 38, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.1/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ +.lb-outerContainer:after { + content: ""; + display: table; + clear: both; +} + +/* line 39, ../sass/lightbox.sass */ +.lb-container { + padding: 10px; +} + +/* line 42, ../sass/lightbox.sass */ +.lb-loader { + position: absolute; + top: 40%; + left: 0%; + height: 25%; + width: 100%; + text-align: center; + line-height: 0; +} + +/* line 51, ../sass/lightbox.sass */ +.lb-nav { + position: absolute; + top: 0; + left: 0; + height: 100%; + width: 100%; + z-index: 10; +} + +/* line 59, ../sass/lightbox.sass */ +.lb-container > .nav { + left: 0; +} + +/* line 62, ../sass/lightbox.sass */ +.lb-nav a { + outline: none; +} + +/* line 65, ../sass/lightbox.sass */ +.lb-prev, .lb-next { + width: 49%; + height: 100%; + background-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7"); + /* Trick IE into showing hover */ + display: block; +} + +/* line 72, ../sass/lightbox.sass */ +.lb-prev { + left: 0; + float: left; +} + +/* line 76, ../sass/lightbox.sass */ +.lb-next { + right: 0; + float: right; +} + +/* line 81, ../sass/lightbox.sass */ +.lb-prev:hover { + background: url(../images/prev.png) left 48% no-repeat; +} + +/* line 85, ../sass/lightbox.sass */ +.lb-next:hover { + background: url(../images/next.png) right 48% no-repeat; +} + +/* line 88, ../sass/lightbox.sass */ +.lb-dataContainer { + margin: 0 auto; + padding-top: 5px; + *zoom: 1; + width: 100%; + -moz-border-radius-bottomleft: 4px; + -webkit-border-bottom-left-radius: 4px; + -ms-border-bottom-left-radius: 4px; + -o-border-bottom-left-radius: 4px; + border-bottom-left-radius: 4px; + -moz-border-radius-bottomright: 4px; + -webkit-border-bottom-right-radius: 4px; + -ms-border-bottom-right-radius: 4px; + -o-border-bottom-right-radius: 4px; + border-bottom-right-radius: 4px; +} +/* line 38, ../../../../.rvm/gems/ruby-1.9.2-p290/gems/compass-0.12.1/frameworks/compass/stylesheets/compass/utilities/general/_clearfix.scss */ +.lb-dataContainer:after { + content: ""; + display: table; + clear: both; +} + +/* line 95, ../sass/lightbox.sass */ +.lb-data { + padding: 0 10px; + color: #bbbbbb; +} +/* line 98, ../sass/lightbox.sass */ +.lb-data .lb-details { + width: 85%; + float: left; + text-align: left; + line-height: 1.1em; +} +/* line 103, ../sass/lightbox.sass */ +.lb-data .lb-caption { + font-size: 13px; + font-weight: bold; + line-height: 1em; +} +/* line 107, ../sass/lightbox.sass */ +.lb-data .lb-number { + display: block; + clear: left; + padding-bottom: 1em; + font-size: 11px; +} +/* line 112, ../sass/lightbox.sass */ +.lb-data .lb-close { + width: 35px; + float: right; + padding-bottom: 0.7em; + outline: none; +} +/* line 117, ../sass/lightbox.sass */ +.lb-data .lb-close:hover { + cursor: pointer; +} diff --git a/src/bb-themes/huraga/assets/favicon.ico b/src/bb-themes/huraga/assets/favicon.ico new file mode 100644 index 000000000..83db9f93a Binary files /dev/null and b/src/bb-themes/huraga/assets/favicon.ico differ diff --git a/src/bb-themes/huraga/assets/img/assets/bg-sidenote-bottom.png b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-bottom.png new file mode 100644 index 000000000..cab92d193 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-bottom.png differ diff --git a/src/bb-themes/huraga/assets/img/assets/bg-sidenote-middle.png b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-middle.png new file mode 100644 index 000000000..34a38f0ac Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-middle.png differ diff --git a/src/bb-themes/huraga/assets/img/assets/bg-sidenote-top.png b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-top.png new file mode 100644 index 000000000..63c4c24d3 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/bg-sidenote-top.png differ diff --git a/src/bb-themes/huraga/assets/img/assets/bg_body.jpg b/src/bb-themes/huraga/assets/img/assets/bg_body.jpg new file mode 100644 index 000000000..2d58397c4 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/bg_body.jpg differ diff --git a/src/bb-themes/huraga/assets/img/assets/bg_footer.png b/src/bb-themes/huraga/assets/img/assets/bg_footer.png new file mode 100644 index 000000000..c8d74876e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/bg_footer.png differ diff --git a/src/bb-themes/huraga/assets/img/assets/breadcrumbs_divider.png b/src/bb-themes/huraga/assets/img/assets/breadcrumbs_divider.png new file mode 100644 index 000000000..c6396516d Binary files /dev/null and b/src/bb-themes/huraga/assets/img/assets/breadcrumbs_divider.png differ diff --git a/src/bb-themes/huraga/assets/img/boxbilling-logo.png b/src/bb-themes/huraga/assets/img/boxbilling-logo.png new file mode 100644 index 000000000..175e08015 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/boxbilling-logo.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/alertpay.png b/src/bb-themes/huraga/assets/img/gateway_logos/alertpay.png new file mode 100644 index 000000000..88df0736c Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/alertpay.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/alipay.png b/src/bb-themes/huraga/assets/img/gateway_logos/alipay.png new file mode 100644 index 000000000..11802320f Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/alipay.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/authorizenet.png b/src/bb-themes/huraga/assets/img/gateway_logos/authorizenet.png new file mode 100644 index 000000000..7f3f44c70 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/authorizenet.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/bluepay.png b/src/bb-themes/huraga/assets/img/gateway_logos/bluepay.png new file mode 100644 index 000000000..8a60f64b9 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/bluepay.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/custom.png b/src/bb-themes/huraga/assets/img/gateway_logos/custom.png new file mode 100644 index 000000000..086188a6b Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/custom.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/interkassa.png b/src/bb-themes/huraga/assets/img/gateway_logos/interkassa.png new file mode 100644 index 000000000..c317b0d90 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/interkassa.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/onebip.png b/src/bb-themes/huraga/assets/img/gateway_logos/onebip.png new file mode 100644 index 000000000..896760424 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/onebip.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/paypal.png b/src/bb-themes/huraga/assets/img/gateway_logos/paypal.png new file mode 100644 index 000000000..799479f8a Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/paypal.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/payza.png b/src/bb-themes/huraga/assets/img/gateway_logos/payza.png new file mode 100644 index 000000000..ec71861ae Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/payza.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/twocheckout.png b/src/bb-themes/huraga/assets/img/gateway_logos/twocheckout.png new file mode 100644 index 000000000..9e3bf708d Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/twocheckout.png differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/webmoney.jpg b/src/bb-themes/huraga/assets/img/gateway_logos/webmoney.jpg new file mode 100644 index 000000000..7196d19b3 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/webmoney.jpg differ diff --git a/src/bb-themes/huraga/assets/img/gateway_logos/webtopay.png b/src/bb-themes/huraga/assets/img/gateway_logos/webtopay.png new file mode 100644 index 000000000..63e1e69e9 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/gateway_logos/webtopay.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/emoticons-icons.png b/src/bb-themes/huraga/assets/img/icons/emoticons-icons.png new file mode 100644 index 000000000..23890eac7 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/emoticons-icons.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/famfamfam-icons.png b/src/bb-themes/huraga/assets/img/icons/famfamfam-icons.png new file mode 100644 index 000000000..16f20c515 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/famfamfam-icons.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings-white.png b/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings-white.png new file mode 100644 index 000000000..3bf6484a2 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings-white.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings.png b/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings.png new file mode 100644 index 000000000..a99699932 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/glyphicons-halflings.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/icon_footer_info.png b/src/bb-themes/huraga/assets/img/icons/icon_footer_info.png new file mode 100644 index 000000000..2ad20dbd0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/icon_footer_info.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/icon_footer_warning.png b/src/bb-themes/huraga/assets/img/icons/icon_footer_warning.png new file mode 100644 index 000000000..3cc619f4e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/icon_footer_warning.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/icon_list_style_arrow.png b/src/bb-themes/huraga/assets/img/icons/icon_list_style_arrow.png new file mode 100644 index 000000000..a3a23683e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/icon_list_style_arrow.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/icon_list_style_check.png b/src/bb-themes/huraga/assets/img/icons/icon_list_style_check.png new file mode 100644 index 000000000..21d5a0b5b Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/icon_list_style_check.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/icon_list_style_cross.png b/src/bb-themes/huraga/assets/img/icons/icon_list_style_cross.png new file mode 100644 index 000000000..f1e14b0a0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/icon_list_style_cross.png differ diff --git a/src/bb-themes/huraga/assets/img/icons/loading_blue.gif b/src/bb-themes/huraga/assets/img/icons/loading_blue.gif new file mode 100644 index 000000000..4ffc35fc0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/loading_blue.gif differ diff --git a/src/bb-themes/huraga/assets/img/icons/loading_dark.gif b/src/bb-themes/huraga/assets/img/icons/loading_dark.gif new file mode 100644 index 000000000..29dd03616 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/loading_dark.gif differ diff --git a/src/bb-themes/huraga/assets/img/icons/loading_green.gif b/src/bb-themes/huraga/assets/img/icons/loading_green.gif new file mode 100644 index 000000000..0de65cc53 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/loading_green.gif differ diff --git a/src/bb-themes/huraga/assets/img/icons/loading_red.gif b/src/bb-themes/huraga/assets/img/icons/loading_red.gif new file mode 100644 index 000000000..cc5685628 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/icons/loading_red.gif differ diff --git a/src/bb-themes/huraga/assets/img/loader.gif b/src/bb-themes/huraga/assets/img/loader.gif new file mode 100644 index 000000000..ab6c94f22 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/loader.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/colorpicker/alpha.png b/src/bb-themes/huraga/assets/img/plugins/colorpicker/alpha.png new file mode 100644 index 000000000..38043f1c8 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/colorpicker/alpha.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/colorpicker/hue.png b/src/bb-themes/huraga/assets/img/plugins/colorpicker/hue.png new file mode 100644 index 000000000..d89560e99 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/colorpicker/hue.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/colorpicker/saturation.png b/src/bb-themes/huraga/assets/img/plugins/colorpicker/saturation.png new file mode 100644 index 000000000..594ae50ed Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/colorpicker/saturation.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/back_disabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_disabled.png new file mode 100644 index 000000000..881de7976 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_disabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled.png new file mode 100644 index 000000000..c608682b0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled_hover.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled_hover.png new file mode 100644 index 000000000..d300f1064 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/back_enabled_hover.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_disabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_disabled.png new file mode 100644 index 000000000..6a6ded7de Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_disabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled.png new file mode 100644 index 000000000..a4e6b5384 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled_hover.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled_hover.png new file mode 100644 index 000000000..fc46c5ebf Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/forward_enabled_hover.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc.png new file mode 100644 index 000000000..85fea1541 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc_disabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc_disabled.png new file mode 100644 index 000000000..36999018e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_asc_disabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_both.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_both.png new file mode 100644 index 000000000..18670406b Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_both.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc.png new file mode 100644 index 000000000..666228698 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc_disabled.png b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc_disabled.png new file mode 100644 index 000000000..7824973cc Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/dataTables/sort_desc_disabled.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-active.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-active.png new file mode 100644 index 000000000..2ad710945 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-active.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-normal.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-normal.png new file mode 100644 index 000000000..9d8b4d2a8 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/arrows-normal.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/crop.gif b/src/bb-themes/huraga/assets/img/plugins/elFinder/crop.gif new file mode 100644 index 000000000..72ea7ccb5 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/crop.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/dialogs.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/dialogs.png new file mode 100644 index 000000000..2d09188c8 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/dialogs.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-big.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-big.png new file mode 100644 index 000000000..00be0a6b0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-big.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-small.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-small.png new file mode 100644 index 000000000..95849dce2 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/icons-small.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/logo.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/logo.png new file mode 100644 index 000000000..c1036de6b Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/logo.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/progress.gif b/src/bb-themes/huraga/assets/img/plugins/elFinder/progress.gif new file mode 100644 index 000000000..8bab11e35 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/progress.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-bg.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-bg.png new file mode 100644 index 000000000..aedeadd63 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-bg.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-icons.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-icons.png new file mode 100644 index 000000000..76df30c99 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/quicklook-icons.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/resize.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/resize.png new file mode 100644 index 000000000..6ec17cd35 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/resize.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/spinner-mini.gif b/src/bb-themes/huraga/assets/img/plugins/elFinder/spinner-mini.gif new file mode 100644 index 000000000..5b33f7e54 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/spinner-mini.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/elFinder/toolbar.png b/src/bb-themes/huraga/assets/img/plugins/elFinder/toolbar.png new file mode 100644 index 000000000..3b51326db Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/elFinder/toolbar.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/ajax-loader.gif b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/ajax-loader.gif new file mode 100644 index 000000000..5b33f7e54 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/ajax-loader.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.bg.png b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.bg.png new file mode 100644 index 000000000..477e85c93 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.bg.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.gif b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.gif new file mode 100644 index 000000000..e24631e58 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.no-alpha.gif b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.no-alpha.gif new file mode 100644 index 000000000..5283e718b Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/jWYSIWYG/jquery.wysiwyg.no-alpha.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/bg-checker.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/bg-checker.png new file mode 100644 index 000000000..e5edf8e5a Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/bg-checker.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/box.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/box.png new file mode 100644 index 000000000..48a6ba717 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/box.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/bullet.gif b/src/bb-themes/huraga/assets/img/plugins/lightbox/bullet.gif new file mode 100644 index 000000000..bf8e3c6cc Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/bullet.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/close.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/close.png new file mode 100644 index 000000000..1b191451c Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/close.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/donate.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/donate.png new file mode 100644 index 000000000..0723c5cc9 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/donate.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/favicon.gif b/src/bb-themes/huraga/assets/img/plugins/lightbox/favicon.gif new file mode 100644 index 000000000..084b09982 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/favicon.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/loading.gif b/src/bb-themes/huraga/assets/img/plugins/lightbox/loading.gif new file mode 100644 index 000000000..5087c2a64 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/loading.gif differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/next.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/next.png new file mode 100644 index 000000000..40b588442 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/next.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/prev.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/prev.png new file mode 100644 index 000000000..6f50afd20 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/prev.png differ diff --git a/src/bb-themes/huraga/assets/img/plugins/lightbox/speech-bubbles.png b/src/bb-themes/huraga/assets/img/plugins/lightbox/speech-bubbles.png new file mode 100644 index 000000000..569cef2d1 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/plugins/lightbox/speech-bubbles.png differ diff --git a/src/bb-themes/huraga/assets/img/sample_content/sample-image-250x150.png b/src/bb-themes/huraga/assets/img/sample_content/sample-image-250x150.png new file mode 100644 index 000000000..577cf3d96 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/sample_content/sample-image-250x150.png differ diff --git a/src/bb-themes/huraga/assets/img/sample_content/sample-image-480x300.png b/src/bb-themes/huraga/assets/img/sample_content/sample-image-480x300.png new file mode 100644 index 000000000..2242bfc51 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/sample_content/sample-image-480x300.png differ diff --git a/src/bb-themes/huraga/assets/img/sample_content/sample-image-50x50.png b/src/bb-themes/huraga/assets/img/sample_content/sample-image-50x50.png new file mode 100644 index 000000000..146c3b41e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/sample_content/sample-image-50x50.png differ diff --git a/src/bb-themes/huraga/assets/img/sample_content/upload-250x150.png b/src/bb-themes/huraga/assets/img/sample_content/upload-250x150.png new file mode 100644 index 000000000..33fc1d49e Binary files /dev/null and b/src/bb-themes/huraga/assets/img/sample_content/upload-250x150.png differ diff --git a/src/bb-themes/huraga/assets/img/sample_content/upload-50x50.png b/src/bb-themes/huraga/assets/img/sample_content/upload-50x50.png new file mode 100644 index 000000000..6273559d0 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/sample_content/upload-50x50.png differ diff --git a/src/bb-themes/huraga/assets/img/template_logo.png b/src/bb-themes/huraga/assets/img/template_logo.png new file mode 100644 index 000000000..175e08015 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/template_logo.png differ diff --git a/src/bb-themes/huraga/assets/img/template_logo.png.bak.png b/src/bb-themes/huraga/assets/img/template_logo.png.bak.png new file mode 100644 index 000000000..4af89a467 Binary files /dev/null and b/src/bb-themes/huraga/assets/img/template_logo.png.bak.png differ diff --git a/src/bb-themes/huraga/assets/js/bb-jquery.js b/src/bb-themes/huraga/assets/js/bb-jquery.js new file mode 100644 index 000000000..26d262e38 --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bb-jquery.js @@ -0,0 +1,260 @@ +var bb = { + post: function(url, params, jsonp) { + $.ajax({ + type: "POST", + url: bb.restUrl(url), + data: params, + dataType: 'json', + error: function(jqXHR, textStatus, e) { + $('.wait').hide(); + bb.msg(e, 'error'); + }, + success: function(data) { + if(data.error) { + $('.wait').hide(); + bb.msg(data.error.message, 'error'); + } else { + if(typeof jsonp === 'function') { + return jsonp(data.result); + } else if(window.hasOwnProperty('console')) { + console.log(data.result); + } + } + } + }); + }, + get: function(url, params, jsonp) { + $.ajax({ + type: "GET", + url: bb.restUrl(url), + data: params, + dataType: 'json', + error: function(jqXHR, textStatus, e) { + $('.wait').hide(); + bb.msg(e, 'error'); + }, + success: function(data) { + if(data.error) { + $('.wait').hide(); + bb.msg(data.error.message, 'error'); + } else { + if(typeof jsonp === 'function') { + return jsonp(data.result); + } else if(window.hasOwnProperty('console')) { + console.log(data.result); + } + } + } + }); + }, + restUrl: function(url) { + if(url.indexOf('http://') > -1) { + return url; + } + return $('meta[property="bb:url"]').attr("content") + 'index.php?_url=/api/' + url; + }, + reload: function() { + location.reload(false); + }, + redirect: function(url) { + if(url === undefined) { + window.location = $('meta[property="bb:url"]').attr("content"); + } else { + window.location = url; + } + }, + currency: function(price, rate, title, multiply) { + price = parseFloat(price) * parseFloat(rate); + if(multiply !== undefined) { + price = price * multiply; + } + return price.toFixed(2) + " " + title; + }, + popup: function(txt) { + + $('#default_popup').remove(); + var popUp = $('') + .find('h3').text(txt) + .parent() + .appendTo('body'); + + var popWidth = 500; //Gets the first query string value + + popUp.show().css({'width': Number( popWidth )}).prepend('X'); + + var popMargTop = (popUp.height() + 80) / 2; + var popMargLeft = (popUp.width() + 80) / 2; + + //Apply Margin to Popup + popUp.css({ + 'margin-top' : -popMargTop, + 'margin-left' : -popMargLeft + }); + + $('body').append('
              '); + $('#fade').show(); + + //Close Popups and Fade Layer + $('a.close, #fade').bind('click', function() { //When clicking on the close or fade layer... + $('#fade , .popup_block').hide(function() { + $('#fade, a.close').remove(); //fade them both out + }); + return false; + }); + $("body").keyup(function(e){ + if(e.keyCode==27){ + $('#fade').click(); + } + }); + }, + msg: function(txt, type) { + $.jGrowl(txt); + }, + apiForm: function() { + $("form.api_form, form.api-form").bind('submit', function(){ + var redirect = $(this).attr('data-api-redirect'); + var jsonp = $(this).attr('data-api-jsonp'); + var msg = $(this).attr('data-api-msg'); + var reload = $(this).attr('data-api-reload'); + var url = $(this).attr('action'); + if($(this).attr('data-api-url')) { + url = $(this).attr('data-api-url'); + } + bb.post( + url, + $(this).serialize(), + function(result) { + if(reload !== undefined) { + bb.reload(); + return; + } + if(redirect !== undefined) { + bb.redirect(redirect); + return; + } + if(msg !== undefined) { + bb.msg(msg); + return; + } + if(jsonp !== undefined && window.hasOwnProperty(jsonp)) { + return window[jsonp](result); + } + } + ); + return false; + }); + }, + apiLink: function() { + $("a.api, a.api-link").bind('click', function(){ + var redirect = $(this).attr('data-api-redirect'); + var reload = $(this).attr('data-api-reload'); + var msg = $(this).attr('data-api-msg'); + var jsonp = $(this).attr('data-api-jsonp'); + bb.get( + $(this).attr('href'), + {}, + function(result) { + if(msg !== undefined) { + bb.msg(msg); + return; + } + if(reload !== undefined) { + bb.reload(); + return; + } + if(jsonp !== undefined && window.hasOwnProperty(jsonp)) { + return window[jsonp](result); + } + bb.redirect(redirect); + } + ); + return false; + }); + }, + MenuAutoActive: function() { + var matches = $('ul.main li a').filter(function() { + return document.location.href == this.href; + }); + matches.parents('li').addClass('active'); + }, + cookieCreate: function (name,value,days) { + if (days) { + var date = new Date(); + date.setTime(date.getTime()+(days*24*60*60*1000)); + var expires = "; expires="+date.toGMTString(); + } + else var expires = ""; + document.cookie = name+"="+value+expires+"; path=/"; + }, + cookieRead: function (name) { + var nameEQ = name + "="; + var ca = document.cookie.split(';'); + for(var i=0;i < ca.length;i++) { + var c = ca[i]; + while (c.charAt(0)==' ') c = c.substring(1,c.length); + if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length); + } + return null; + }, + CurrencySelector: function() { + $("select.currency_selector").bind('change', function(){ + bb.post( + 'guest/cart/set_currency', + {currency: $(this).val()}, + function(result) { + bb.reload(); + } + ); + return false; + }); + }, + LanguageSelector: function() { + + $("select.language_selector").bind('change', function(){ + bb.cookieCreate('BBLANG', $(this).val(), 7); + bb.reload(); + return false; + }).val(bb.cookieRead('BBLANG')); + } +} + +//===== Placeholder for all browsers =====// + +$("input").each( + function(){ + if($(this).val()=="" && $(this).attr("placeholder")!=""){ + $(this).val($(this).attr("placeholder")); + $(this).focus(function(){ + if($(this).val()==$(this).attr("placeholder")) $(this).val(""); + }); + $(this).blur(function(){ + if($(this).val()=="") $(this).val($(this).attr("placeholder")); + }); + } +}); + +jQuery(function ($) { + $('.loading').ajaxStart(function() { + $(this).show(); + }).ajaxStop(function() { + $(this).hide(); + }); + + if($("select.currency_selector").length){bb.CurrencySelector();} + if($("select.language_selector").length){bb.LanguageSelector();} + if($("ul.main").length){bb.MenuAutoActive();} + if($("a.api, a.api-link").length){bb.apiLink();} + if($("form.api_form, form.api-form").length){bb.apiForm();} + + + $('#login-form-link').bind('click', function(){ + $(this).fadeOut(); + $('#login-form').slideDown(); + return false; + }); + + if(jQuery().tipsy) { + $('a.show-tip').tipsy({fade: true, delayIn: 500}); + } + +}); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-affix.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-affix.js new file mode 100644 index 000000000..827ff458e --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-affix.js @@ -0,0 +1,117 @@ +/* ========================================================== + * bootstrap-affix.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#affix + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* AFFIX CLASS DEFINITION + * ====================== */ + + var Affix = function (element, options) { + this.options = $.extend({}, $.fn.affix.defaults, options) + this.$window = $(window) + .on('scroll.affix.data-api', $.proxy(this.checkPosition, this)) + .on('click.affix.data-api', $.proxy(function () { setTimeout($.proxy(this.checkPosition, this), 1) }, this)) + this.$element = $(element) + this.checkPosition() + } + + Affix.prototype.checkPosition = function () { + if (!this.$element.is(':visible')) return + + var scrollHeight = $(document).height() + , scrollTop = this.$window.scrollTop() + , position = this.$element.offset() + , offset = this.options.offset + , offsetBottom = offset.bottom + , offsetTop = offset.top + , reset = 'affix affix-top affix-bottom' + , affix + + if (typeof offset != 'object') offsetBottom = offsetTop = offset + if (typeof offsetTop == 'function') offsetTop = offset.top() + if (typeof offsetBottom == 'function') offsetBottom = offset.bottom() + + affix = this.unpin != null && (scrollTop + this.unpin <= position.top) ? + false : offsetBottom != null && (position.top + this.$element.height() >= scrollHeight - offsetBottom) ? + 'bottom' : offsetTop != null && scrollTop <= offsetTop ? + 'top' : false + + if (this.affixed === affix) return + + this.affixed = affix + this.unpin = affix == 'bottom' ? position.top - scrollTop : null + + this.$element.removeClass(reset).addClass('affix' + (affix ? '-' + affix : '')) + } + + + /* AFFIX PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.affix + + $.fn.affix = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('affix') + , options = typeof option == 'object' && option + if (!data) $this.data('affix', (data = new Affix(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.affix.Constructor = Affix + + $.fn.affix.defaults = { + offset: 0 + } + + + /* AFFIX NO CONFLICT + * ================= */ + + $.fn.affix.noConflict = function () { + $.fn.affix = old + return this + } + + + /* AFFIX DATA-API + * ============== */ + + $(window).on('load', function () { + $('[data-spy="affix"]').each(function () { + var $spy = $(this) + , data = $spy.data() + + data.offset = data.offset || {} + + data.offsetBottom && (data.offset.bottom = data.offsetBottom) + data.offsetTop && (data.offset.top = data.offsetTop) + + $spy.affix(data) + }) + }) + + +}(window.jQuery); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-alert.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-alert.js new file mode 100644 index 000000000..8917f9490 --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-alert.js @@ -0,0 +1,99 @@ +/* ========================================================== + * bootstrap-alert.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#alerts + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* ALERT CLASS DEFINITION + * ====================== */ + + var dismiss = '[data-dismiss="alert"]' + , Alert = function (el) { + $(el).on('click', dismiss, this.close) + } + + Alert.prototype.close = function (e) { + var $this = $(this) + , selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = $(selector) + + e && e.preventDefault() + + $parent.length || ($parent = $this.hasClass('alert') ? $this : $this.parent()) + + $parent.trigger(e = $.Event('close')) + + if (e.isDefaultPrevented()) return + + $parent.removeClass('in') + + function removeElement() { + $parent + .trigger('closed') + .remove() + } + + $.support.transition && $parent.hasClass('fade') ? + $parent.on($.support.transition.end, removeElement) : + removeElement() + } + + + /* ALERT PLUGIN DEFINITION + * ======================= */ + + var old = $.fn.alert + + $.fn.alert = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('alert') + if (!data) $this.data('alert', (data = new Alert(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.alert.Constructor = Alert + + + /* ALERT NO CONFLICT + * ================= */ + + $.fn.alert.noConflict = function () { + $.fn.alert = old + return this + } + + + /* ALERT DATA-API + * ============== */ + + $(document).on('click.alert.data-api', dismiss, Alert.prototype.close) + +}(window.jQuery); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-button.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-button.js new file mode 100644 index 000000000..66df0a296 --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-button.js @@ -0,0 +1,105 @@ +/* ============================================================ + * bootstrap-button.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#buttons + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* BUTTON PUBLIC CLASS DEFINITION + * ============================== */ + + var Button = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.button.defaults, options) + } + + Button.prototype.setState = function (state) { + var d = 'disabled' + , $el = this.$element + , data = $el.data() + , val = $el.is('input') ? 'val' : 'html' + + state = state + 'Text' + data.resetText || $el.data('resetText', $el[val]()) + + $el[val](data[state] || this.options[state]) + + // push to event loop to allow forms to submit + setTimeout(function () { + state == 'loadingText' ? + $el.addClass(d).attr(d, d) : + $el.removeClass(d).removeAttr(d) + }, 0) + } + + Button.prototype.toggle = function () { + var $parent = this.$element.closest('[data-toggle="buttons-radio"]') + + $parent && $parent + .find('.active') + .removeClass('active') + + this.$element.toggleClass('active') + } + + + /* BUTTON PLUGIN DEFINITION + * ======================== */ + + var old = $.fn.button + + $.fn.button = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('button') + , options = typeof option == 'object' && option + if (!data) $this.data('button', (data = new Button(this, options))) + if (option == 'toggle') data.toggle() + else if (option) data.setState(option) + }) + } + + $.fn.button.defaults = { + loadingText: 'loading...' + } + + $.fn.button.Constructor = Button + + + /* BUTTON NO CONFLICT + * ================== */ + + $.fn.button.noConflict = function () { + $.fn.button = old + return this + } + + + /* BUTTON DATA-API + * =============== */ + + $(document).on('click.button.data-api', '[data-toggle^=button]', function (e) { + var $btn = $(e.target) + if (!$btn.hasClass('btn')) $btn = $btn.closest('.btn') + $btn.button('toggle') + }) + +}(window.jQuery); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-carousel.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-carousel.js new file mode 100644 index 000000000..b40edd7bf --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-carousel.js @@ -0,0 +1,207 @@ +/* ========================================================== + * bootstrap-carousel.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#carousel + * ========================================================== + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================== */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* CAROUSEL CLASS DEFINITION + * ========================= */ + + var Carousel = function (element, options) { + this.$element = $(element) + this.$indicators = this.$element.find('.carousel-indicators') + this.options = options + this.options.pause == 'hover' && this.$element + .on('mouseenter', $.proxy(this.pause, this)) + .on('mouseleave', $.proxy(this.cycle, this)) + } + + Carousel.prototype = { + + cycle: function (e) { + if (!e) this.paused = false + if (this.interval) clearInterval(this.interval); + this.options.interval + && !this.paused + && (this.interval = setInterval($.proxy(this.next, this), this.options.interval)) + return this + } + + , getActiveIndex: function () { + this.$active = this.$element.find('.item.active') + this.$items = this.$active.parent().children() + return this.$items.index(this.$active) + } + + , to: function (pos) { + var activeIndex = this.getActiveIndex() + , that = this + + if (pos > (this.$items.length - 1) || pos < 0) return + + if (this.sliding) { + return this.$element.one('slid', function () { + that.to(pos) + }) + } + + if (activeIndex == pos) { + return this.pause().cycle() + } + + return this.slide(pos > activeIndex ? 'next' : 'prev', $(this.$items[pos])) + } + + , pause: function (e) { + if (!e) this.paused = true + if (this.$element.find('.next, .prev').length && $.support.transition.end) { + this.$element.trigger($.support.transition.end) + this.cycle(true) + } + clearInterval(this.interval) + this.interval = null + return this + } + + , next: function () { + if (this.sliding) return + return this.slide('next') + } + + , prev: function () { + if (this.sliding) return + return this.slide('prev') + } + + , slide: function (type, next) { + var $active = this.$element.find('.item.active') + , $next = next || $active[type]() + , isCycling = this.interval + , direction = type == 'next' ? 'left' : 'right' + , fallback = type == 'next' ? 'first' : 'last' + , that = this + , e + + this.sliding = true + + isCycling && this.pause() + + $next = $next.length ? $next : this.$element.find('.item')[fallback]() + + e = $.Event('slide', { + relatedTarget: $next[0] + , direction: direction + }) + + if ($next.hasClass('active')) return + + if (this.$indicators.length) { + this.$indicators.find('.active').removeClass('active') + this.$element.one('slid', function () { + var $nextIndicator = $(that.$indicators.children()[that.getActiveIndex()]) + $nextIndicator && $nextIndicator.addClass('active') + }) + } + + if ($.support.transition && this.$element.hasClass('slide')) { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $next.addClass(type) + $next[0].offsetWidth // force reflow + $active.addClass(direction) + $next.addClass(direction) + this.$element.one($.support.transition.end, function () { + $next.removeClass([type, direction].join(' ')).addClass('active') + $active.removeClass(['active', direction].join(' ')) + that.sliding = false + setTimeout(function () { that.$element.trigger('slid') }, 0) + }) + } else { + this.$element.trigger(e) + if (e.isDefaultPrevented()) return + $active.removeClass('active') + $next.addClass('active') + this.sliding = false + this.$element.trigger('slid') + } + + isCycling && this.cycle() + + return this + } + + } + + + /* CAROUSEL PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.carousel + + $.fn.carousel = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('carousel') + , options = $.extend({}, $.fn.carousel.defaults, typeof option == 'object' && option) + , action = typeof option == 'string' ? option : options.slide + if (!data) $this.data('carousel', (data = new Carousel(this, options))) + if (typeof option == 'number') data.to(option) + else if (action) data[action]() + else if (options.interval) data.pause().cycle() + }) + } + + $.fn.carousel.defaults = { + interval: 5000 + , pause: 'hover' + } + + $.fn.carousel.Constructor = Carousel + + + /* CAROUSEL NO CONFLICT + * ==================== */ + + $.fn.carousel.noConflict = function () { + $.fn.carousel = old + return this + } + + /* CAROUSEL DATA-API + * ================= */ + + $(document).on('click.carousel.data-api', '[data-slide], [data-slide-to]', function (e) { + var $this = $(this), href + , $target = $($this.attr('data-target') || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '')) //strip for ie7 + , options = $.extend({}, $target.data(), $this.data()) + , slideIndex + + $target.carousel(options) + + if (slideIndex = $this.attr('data-slide-to')) { + $target.data('carousel').pause().to(slideIndex).cycle() + } + + e.preventDefault() + }) + +}(window.jQuery); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-collapse.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-collapse.js new file mode 100644 index 000000000..2bede4a88 --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-collapse.js @@ -0,0 +1,167 @@ +/* ============================================================= + * bootstrap-collapse.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#collapse + * ============================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* COLLAPSE PUBLIC CLASS DEFINITION + * ================================ */ + + var Collapse = function (element, options) { + this.$element = $(element) + this.options = $.extend({}, $.fn.collapse.defaults, options) + + if (this.options.parent) { + this.$parent = $(this.options.parent) + } + + this.options.toggle && this.toggle() + } + + Collapse.prototype = { + + constructor: Collapse + + , dimension: function () { + var hasWidth = this.$element.hasClass('width') + return hasWidth ? 'width' : 'height' + } + + , show: function () { + var dimension + , scroll + , actives + , hasData + + if (this.transitioning || this.$element.hasClass('in')) return + + dimension = this.dimension() + scroll = $.camelCase(['scroll', dimension].join('-')) + actives = this.$parent && this.$parent.find('> .accordion-group > .in') + + if (actives && actives.length) { + hasData = actives.data('collapse') + if (hasData && hasData.transitioning) return + actives.collapse('hide') + hasData || actives.data('collapse', null) + } + + this.$element[dimension](0) + this.transition('addClass', $.Event('show'), 'shown') + $.support.transition && this.$element[dimension](this.$element[0][scroll]) + } + + , hide: function () { + var dimension + if (this.transitioning || !this.$element.hasClass('in')) return + dimension = this.dimension() + this.reset(this.$element[dimension]()) + this.transition('removeClass', $.Event('hide'), 'hidden') + this.$element[dimension](0) + } + + , reset: function (size) { + var dimension = this.dimension() + + this.$element + .removeClass('collapse') + [dimension](size || 'auto') + [0].offsetWidth + + this.$element[size !== null ? 'addClass' : 'removeClass']('collapse') + + return this + } + + , transition: function (method, startEvent, completeEvent) { + var that = this + , complete = function () { + if (startEvent.type == 'show') that.reset() + that.transitioning = 0 + that.$element.trigger(completeEvent) + } + + this.$element.trigger(startEvent) + + if (startEvent.isDefaultPrevented()) return + + this.transitioning = 1 + + this.$element[method]('in') + + $.support.transition && this.$element.hasClass('collapse') ? + this.$element.one($.support.transition.end, complete) : + complete() + } + + , toggle: function () { + this[this.$element.hasClass('in') ? 'hide' : 'show']() + } + + } + + + /* COLLAPSE PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.collapse + + $.fn.collapse = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('collapse') + , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option) + if (!data) $this.data('collapse', (data = new Collapse(this, options))) + if (typeof option == 'string') data[option]() + }) + } + + $.fn.collapse.defaults = { + toggle: true + } + + $.fn.collapse.Constructor = Collapse + + + /* COLLAPSE NO CONFLICT + * ==================== */ + + $.fn.collapse.noConflict = function () { + $.fn.collapse = old + return this + } + + + /* COLLAPSE DATA-API + * ================= */ + + $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) { + var $this = $(this), href + , target = $this.attr('data-target') + || e.preventDefault() + || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7 + , option = $(target).data('collapse') ? 'toggle' : $this.data() + $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed') + $(target).collapse(option) + }) + +}(window.jQuery); \ No newline at end of file diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-dropdown.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-dropdown.js new file mode 100644 index 000000000..a1d51519f --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-dropdown.js @@ -0,0 +1,165 @@ +/* ============================================================ + * bootstrap-dropdown.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#dropdowns + * ============================================================ + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================ */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* DROPDOWN CLASS DEFINITION + * ========================= */ + + var toggle = '[data-toggle=dropdown]' + , Dropdown = function (element) { + var $el = $(element).on('click.dropdown.data-api', this.toggle) + $('html').on('click.dropdown.data-api', function () { + $el.parent().removeClass('open') + }) + } + + Dropdown.prototype = { + + constructor: Dropdown + + , toggle: function (e) { + var $this = $(this) + , $parent + , isActive + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + clearMenus() + + if (!isActive) { + $parent.toggleClass('open') + } + + $this.focus() + + return false + } + + , keydown: function (e) { + var $this + , $items + , $active + , $parent + , isActive + , index + + if (!/(38|40|27)/.test(e.keyCode)) return + + $this = $(this) + + e.preventDefault() + e.stopPropagation() + + if ($this.is('.disabled, :disabled')) return + + $parent = getParent($this) + + isActive = $parent.hasClass('open') + + if (!isActive || (isActive && e.keyCode == 27)) { + if (e.which == 27) $parent.find(toggle).focus() + return $this.click() + } + + $items = $('[role=menu] li:not(.divider):visible a', $parent) + + if (!$items.length) return + + index = $items.index($items.filter(':focus')) + + if (e.keyCode == 38 && index > 0) index-- // up + if (e.keyCode == 40 && index < $items.length - 1) index++ // down + if (!~index) index = 0 + + $items + .eq(index) + .focus() + } + + } + + function clearMenus() { + $(toggle).each(function () { + getParent($(this)).removeClass('open') + }) + } + + function getParent($this) { + var selector = $this.attr('data-target') + , $parent + + if (!selector) { + selector = $this.attr('href') + selector = selector && /#/.test(selector) && selector.replace(/.*(?=#[^\s]*$)/, '') //strip for ie7 + } + + $parent = selector && $(selector) + + if (!$parent || !$parent.length) $parent = $this.parent() + + return $parent + } + + + /* DROPDOWN PLUGIN DEFINITION + * ========================== */ + + var old = $.fn.dropdown + + $.fn.dropdown = function (option) { + return this.each(function () { + var $this = $(this) + , data = $this.data('dropdown') + if (!data) $this.data('dropdown', (data = new Dropdown(this))) + if (typeof option == 'string') data[option].call($this) + }) + } + + $.fn.dropdown.Constructor = Dropdown + + + /* DROPDOWN NO CONFLICT + * ==================== */ + + $.fn.dropdown.noConflict = function () { + $.fn.dropdown = old + return this + } + + + /* APPLY TO STANDARD DROPDOWN ELEMENTS + * =================================== */ + + $(document) + .on('click.dropdown.data-api', clearMenus) + .on('click.dropdown.data-api', '.dropdown form', function (e) { e.stopPropagation() }) + .on('click.dropdown-menu', function (e) { e.stopPropagation() }) + .on('click.dropdown.data-api' , toggle, Dropdown.prototype.toggle) + .on('keydown.dropdown.data-api', toggle + ', [role=menu]' , Dropdown.prototype.keydown) + +}(window.jQuery); diff --git a/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-modal.js b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-modal.js new file mode 100644 index 000000000..12abe06f1 --- /dev/null +++ b/src/bb-themes/huraga/assets/js/bootstrap/bootstrap-modal.js @@ -0,0 +1,247 @@ +/* ========================================================= + * bootstrap-modal.js v2.3.1 + * http://twitter.github.com/bootstrap/javascript.html#modals + * ========================================================= + * Copyright 2012 Twitter, Inc. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ========================================================= */ + + +!function ($) { + + "use strict"; // jshint ;_; + + + /* MODAL CLASS DEFINITION + * ====================== */ + + var Modal = function (element, options) { + this.options = options + this.$element = $(element) + .delegate('[data-dismiss="modal"]', 'click.dismiss.modal', $.proxy(this.hide, this)) + this.options.remote && this.$element.find('.modal-body').load(this.options.remote) + } + + Modal.prototype = { + + constructor: Modal + + , toggle: function () { + return this[!this.isShown ? 'show' : 'hide']() + } + + , show: function () { + var that = this + , e = $.Event('show') + + this.$element.trigger(e) + + if (this.isShown || e.isDefaultPrevented()) return + + this.isShown = true + + this.escape() + + this.backdrop(function () { + var transition = $.support.transition && that.$element.hasClass('fade') + + if (!that.$element.parent().length) { + that.$element.appendTo(document.body) //don't move modals dom position + } + + that.$element.show() + + if (transition) { + that.$element[0].offsetWidth // force reflow + } + + that.$element + .addClass('in') + .attr('aria-hidden', false) + + that.enforceFocus() + + transition ? + that.$element.one($.support.transition.end, function () { that.$element.focus().trigger('shown') }) : + that.$element.focus().trigger('shown') + + }) + } + + , hide: function (e) { + e && e.preventDefault() + + var that = this + + e = $.Event('hide') + + this.$element.trigger(e) + + if (!this.isShown || e.isDefaultPrevented()) return + + this.isShown = false + + this.escape() + + $(document).off('focusin.modal') + + this.$element + .removeClass('in') + .attr('aria-hidden', true) + + $.support.transition && this.$element.hasClass('fade') ? + this.hideWithTransition() : + this.hideModal() + } + + , enforceFocus: function () { + var that = this + $(document).on('focusin.modal', function (e) { + if (that.$element[0] !== e.target && !that.$element.has(e.target).length) { + that.$element.focus() + } + }) + } + + , escape: function () { + var that = this + if (this.isShown && this.options.keyboard) { + this.$element.on('keyup.dismiss.modal', function ( e ) { + e.which == 27 && that.hide() + }) + } else if (!this.isShown) { + this.$element.off('keyup.dismiss.modal') + } + } + + , hideWithTransition: function () { + var that = this + , timeout = setTimeout(function () { + that.$element.off($.support.transition.end) + that.hideModal() + }, 500) + + this.$element.one($.support.transition.end, function () { + clearTimeout(timeout) + that.hideModal() + }) + } + + , hideModal: function () { + var that = this + this.$element.hide() + this.backdrop(function () { + that.removeBackdrop() + that.$element.trigger('hidden') + }) + } + + , removeBackdrop: function () { + this.$backdrop && this.$backdrop.remove() + this.$backdrop = null + } + + , backdrop: function (callback) { + var that = this + , animate = this.$element.hasClass('fade') ? 'fade' : '' + + if (this.isShown && this.options.backdrop) { + var doAnimate = $.support.transition && animate + + this.$backdrop = $('