Merge branch 'master' into update/22164-tax-rate-class-table
|
@ -18,7 +18,6 @@ ratings:
|
|||
- "includes/*"
|
||||
exclude_paths:
|
||||
- "tests/"
|
||||
- "apigen/"
|
||||
- "sample-data/"
|
||||
- "i18n/"
|
||||
- "includes/api/legacy/"
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
/.* export-ignore
|
||||
apigen* export-ignore
|
||||
CODE_OF_CONDUCT.md export-ignore
|
||||
CHANGELOG.txt export-ignore
|
||||
composer.* export-ignore
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
### Changes proposed in this Pull Request:
|
||||
|
||||
<!-- Describe the changes made to this Pull Request, and the reason for such changes. -->
|
||||
<!-- Describe the changes made to this Pull Request and the reason for such changes. -->
|
||||
|
||||
Closes # .
|
||||
|
||||
|
@ -24,10 +24,10 @@ Closes # .
|
|||
|
||||
* [ ] Have you added an explanation of what your changes do and why you'd like us to include them?
|
||||
* [ ] Have you written new tests for your changes, as applicable?
|
||||
* [ ] Have you successfully ran tests with your changes locally?
|
||||
* [ ] Have you successfully run tests with your changes locally?
|
||||
|
||||
<!-- Mark completed items with an [x] -->
|
||||
|
||||
### Changelog entry
|
||||
|
||||
> Enter a short summary of all changes on this Pull Request. This will appear in the changelog if accepted.
|
||||
> Enter a summary of all changes on this Pull Request. This will appear in the changelog if accepted.
|
||||
|
|
|
@ -24,9 +24,6 @@ none
|
|||
# Windows junk
|
||||
Thumbs.db
|
||||
|
||||
# ApiGen
|
||||
/wc-apidocs/
|
||||
|
||||
# Behat/CLI Tests
|
||||
tests/cli/installer
|
||||
tests/cli/composer.phar
|
||||
|
|
|
@ -23,7 +23,6 @@ checks:
|
|||
verify_property_names: false
|
||||
filter:
|
||||
excluded_paths:
|
||||
- apigen/
|
||||
- sample-data/
|
||||
- i18n/
|
||||
- includes/api/legacy/
|
||||
|
|
37
.travis.yml
|
@ -1,13 +1,13 @@
|
|||
language: php
|
||||
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
packages:
|
||||
- nginx
|
||||
dist: trusty
|
||||
|
||||
sudo: false
|
||||
|
||||
cache:
|
||||
directories:
|
||||
- vendor
|
||||
- $HOME/.composer/cache
|
||||
|
||||
# Test main supported versions of PHP against latest WP.
|
||||
php:
|
||||
- 5.6
|
||||
|
@ -19,32 +19,34 @@ php:
|
|||
env:
|
||||
- WP_VERSION=latest WP_MULTISITE=0
|
||||
|
||||
# Additional tests against stable PHP (min recommended version is 5.6) and past supported versions of WP
|
||||
# Additional tests against stable PHP (min version is 5.6)
|
||||
# and code coverage report.
|
||||
matrix:
|
||||
fast_finish: true
|
||||
include:
|
||||
- php: 5.3
|
||||
dist: precise
|
||||
- php: 5.2
|
||||
dist: precise
|
||||
- name: "Coding standard check"
|
||||
php: 7.2
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_PHPCS=1
|
||||
- name: "e2e tests"
|
||||
php: 7.2
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_E2E=1
|
||||
addons:
|
||||
chrome: stable
|
||||
apt:
|
||||
packages:
|
||||
- nginx
|
||||
- name: "Unit tests code coverage"
|
||||
php: 7.1
|
||||
php: 7.3
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
- name: "WooCommerce unit tests using WordPress nightly"
|
||||
php: 7.3
|
||||
env: WP_VERSION=nightly WP_MULTISITE=0
|
||||
allow_failures:
|
||||
- php: 7.1
|
||||
- php: 7.3
|
||||
env: WP_VERSION=latest WP_MULTISITE=0 RUN_CODE_COVERAGE=1
|
||||
|
||||
before_script:
|
||||
- export PATH="$HOME/.composer/vendor/bin:$PATH"
|
||||
- |
|
||||
# Remove Xdebug for a huge performance increase:
|
||||
if [ -f ~/.phpenv/versions/$(phpenv version-name)/etc/conf.d/xdebug.ini ]; then
|
||||
|
@ -52,9 +54,12 @@ before_script:
|
|||
else
|
||||
echo "xdebug.ini does not exist"
|
||||
fi
|
||||
- export PATH="$HOME/.config/composer/vendor/bin:$PATH"
|
||||
- bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
|
||||
- bash tests/bin/travis.sh before
|
||||
- |
|
||||
# Install WP Test suite, install PHPUnit globally:
|
||||
if [[ ! -z "$WP_VERSION" ]]; then
|
||||
bash tests/bin/install.sh woocommerce_test root '' localhost $WP_VERSION
|
||||
composer global require "phpunit/phpunit=4.8.*|6.5.*"
|
||||
fi
|
||||
|
||||
script:
|
||||
- bash tests/bin/phpunit.sh
|
||||
|
|
Before Width: | Height: | Size: 120 KiB After Width: | Height: | Size: 78 KiB |
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 38 KiB |
Before Width: | Height: | Size: 4.1 KiB After Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 8.6 KiB After Width: | Height: | Size: 3.6 KiB |
After Width: | Height: | Size: 236 KiB |
Before Width: | Height: | Size: 106 KiB |
After Width: | Height: | Size: 332 KiB |
Before Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 255 KiB |
Before Width: | Height: | Size: 30 KiB |
After Width: | Height: | Size: 242 KiB |
Before Width: | Height: | Size: 50 KiB |
After Width: | Height: | Size: 368 KiB |
Before Width: | Height: | Size: 152 KiB |
After Width: | Height: | Size: 324 KiB |
Before Width: | Height: | Size: 148 KiB |
304
CHANGELOG.txt
|
@ -1,5 +1,307 @@
|
|||
== Changelog ==
|
||||
|
||||
= 3.6.4 - 2019-05-27 =
|
||||
* Enhancement - Add notice to install WooCommerce Admin. #23659
|
||||
* Fix - Tracks: Add check for OBW is-opting-in. #23772
|
||||
* Fix - Use HTTP protocol for schema.org's availability. #23774
|
||||
* Fix - Coupon usage limit checks based on email never ran when orders are created via wp-admin. #23775
|
||||
* Fix - Duplicate out of stock notices when navigating from cart to checkout and back to cart. #23791
|
||||
* Fix - Remove sensitive information from refund reason when manually refunding an order, and move it to an order note. #23739
|
||||
* Tweak - Tracks: set cookie on admin_init instead of wp_loaded. #23787
|
||||
* Dev - Fixed number of arguments for all occurrences of the woocommerce_valid_order_statuses_for_cancel filter. #23704
|
||||
* Dev - REST API - Stop order creation if invalid data is sent. #23325
|
||||
* Dev - Introduce new wc_load_cart function for dynamically loading and initializing the cart. #23794
|
||||
|
||||
= 3.6.3 - 2019-05-16 =
|
||||
* Fix - State not required for Serbia. #23430
|
||||
* Fix - # symbol in product category name broke product export. #23454
|
||||
* Fix - XML export caused fatal errors due to Action Scheduler adding invalid characters. #23456
|
||||
* Fix - Invalid password messages when password contains backslashes. #23499
|
||||
* Fix - Dismiss button in WC admin notices "legacy_shipping" and "no_shipping_methods" were not clickable. #23517
|
||||
* Fix - WC $wpdb->tables not defined early enough. #23529
|
||||
* Fix - Tracks JS not printed on last page of OBW. #23519
|
||||
* Fix - Error in the logic used to build fields for external products when the query string contained full-stops, pluses or spaces in the values of the parameters. #23535
|
||||
* Fix - UI page width issue on OBW. #23526
|
||||
* Fix - Customer address not auto populated on checkout after registering and filling in address prior. #23528
|
||||
* Fix - Available WooCommerce extension updates not showing in System Status report. #23601
|
||||
* Fix - wc_change_get_terms_defaults throwing undefined index notices. #23611
|
||||
* Fix - System Status report alway showing checkmark next to Connected to WooCommerce.com. #23617
|
||||
* Fix - State field never populated when loading customer address on order via wp-admin. #23615
|
||||
* Fix - Order sorting not working in wp-admin when Yoast SEO active. #23590
|
||||
* Fix - Attribute ordering not working in product edit screen. #23625
|
||||
* Fix - Tracks reporting incorrect order totals due to refunds being excluded in calculation. #23671
|
||||
* Fix - Reload state options when creating a new order in WP-Admin and changing country. #23602
|
||||
* Fix - New webhooks not showing in the webhook admin list page when you have object caching enabled. #23713
|
||||
* Fix - Missing coupon expiry dates, restore coupons expiry_date backward compatibility. #23714
|
||||
* Fix - Bulk stock update could result in all products set to out of stock, change ensures consistency between db and Product instance in memory. #23534
|
||||
* Fix - Dashboard stats widget including unpublished products in out of stock and low in stock counts. #23734
|
||||
* Fix - PayPal payment not captured when you transition an order from a custom order status to completed or processing. #23634
|
||||
* Tweak - Confirm before saving empty list of countries to sell to in settings. #23597
|
||||
* Tweak - Change default WC API version used when creating webhooks to the latest WC API version. #23515
|
||||
* Tweak - Report a bug button now points to the new issue template in GitHub. #23580
|
||||
* Tweak - Do not display taxes in totals columns when taxes not enabled. #23579
|
||||
* Tweak - WC WP-CLI upgrade routine mimics wp-admin upgrade when no updates found by setting DB version to current version. #23666
|
||||
* Tweak - Template caching now cache based on WC_VERSION to avoid issues with symlinked plugin folders. #23546
|
||||
* Tweak - OBW payment gateway selection defaults. #23690
|
||||
* Localization - Add Serbia locale defaults. #23428
|
||||
* Localization - Add address format for Serbia. #23429
|
||||
|
||||
= 3.6.2 - 2019-04-24 =
|
||||
* Fix - Fix CSS classname conflict with themes due to missing product object global. #23377
|
||||
* Fix - Fix security check on email template preview page. #23356
|
||||
* Fix - Prevent `wc_ascii_uasort_comparison` throwing notices in some server configs. #23363
|
||||
* Fix - `is_request_to_rest_api` should check for wc endpoints only. #23372
|
||||
* Fix - Fixed use of get_term_meta in REST API endpoints. #23457
|
||||
* Fix - Fixed missing closing tag for log-in link for reviews. #23445
|
||||
* Fix - Fixed average_rating in the db upgrade routine for lookup table. #23465
|
||||
* Fix - More useful update notices if cron is disabled. #23383
|
||||
* Fix - Prevent term ordering queries inserted by wc_terms_clauses from conflicting with custom where clauses. #23449
|
||||
* Fix - When product lookup table is generating for the first time, avoid wrong stock statuses being set for variable products. #23455
|
||||
* Fix - Ensure webhooks respect registered order args. #23444
|
||||
* Fix - REST API - Return custom attribute with defined name instead of lowercase name. #23482
|
||||
* Fix - Fix 3.6 conflict with Woo Blocks plugin 1.4. #23399
|
||||
* Fix - Allow default sorting of WC taxonomies to be overwritten by get_terms orderby. #23477
|
||||
* Fix - Improve wc_rating_count lookup table generation with large numbers of posts. #23486
|
||||
* Fix - Avoid recurring event for suggestions updates. #23484
|
||||
* Fix - Revert selectWoo escaping change and instead escape user names. Avoids issues displaying slash characters. #23334
|
||||
* Fix - If an empty array is passed to the v3 API for images, images should be unset. #23339
|
||||
* Fix - Fix attribute renaming when dealing with unicode characters. #23132
|
||||
* Fix - Preserve full-stops in external product URLs. #23196
|
||||
* Fix - Add check for VAT exemption inside `display_prices_including_tax`. #23201
|
||||
* Fix - Avoid post update in `wc_update_product_stock` to prevent product titles being updated. #23249
|
||||
* Fix - Updated Back to Items link when editing attribute terms. #23238
|
||||
* Fix - Network orders widget not showing orders when installed as a network plugin. #23270
|
||||
* Fix - Correctly map attributes in CSV when the number is not at the end of the cell. #23251
|
||||
* Fix - Fixed highlighting of Orders list item in My Account when looking at individual order. #23236
|
||||
* Fix - Applies `wp_strip_all_tags` to the line item name when building PayPal request URL. #23297
|
||||
* Fix - Non int value handling in `wc_let_to_num`. #23329
|
||||
* Fix - Style span.description elements after select2 boxes. #23252
|
||||
* Fix - Switch to subquery for sale products to prevent large query errors on some hosting environments. #23266
|
||||
* Fix - Add offerCount to variable product structured data. #23349
|
||||
* Fix - Cart widget - Allow title to be removed. #23370
|
||||
* Fix - Prevent order data being escaped incorrectly on save when using quotes. #23380
|
||||
* Fix - Prevent plugins causing notices by calling get_catalog_ordering_args incorrectly. #23451
|
||||
* Fix - Product list view shipping class filter display correct products. #23446
|
||||
* Fix - Twenty Seventeen On Sale badge hidden behind product image. #23450
|
||||
* Fix - Correct postcode validation on my-account page. #23483
|
||||
* Fix - Fixed compatibility with the Jetpack Beta Tester plugin when loading the Tracks client library. #23397
|
||||
* Fix - Updated anchor for "How to create a child theme" with the correct target address in the Codex. #23469
|
||||
* Tweak - Update action scheduler to version 2.2.5. #23489
|
||||
* Tweak - Removed 2 old admin notices for featured moved in past versions. #23263
|
||||
* Localization - Make the state/county field optional at checkout for Greece. #23365
|
||||
|
||||
= 3.6.1 - 2019-04-18 =
|
||||
* Fix - Remove calls to 'header_register_callback' to prevent conflicts with some hosting providers and PHP versions.
|
||||
|
||||
= 3.6.0 - 2019-04-17 =
|
||||
* Enhancement - Merged WooCommerce Gutenberg Products Block feature plugin. Adds blocks for the new editor, including
|
||||
hand picked products, featured products, products by category/attribute, sale products, new products, top rated
|
||||
products, and best selling products. #22954
|
||||
* Enhancement - Only include order erasure bulk action if erasure is enabled in settings. #22354
|
||||
* Enhancement - Customer notes containing URLs now automatically converts to clickable links. #21927
|
||||
* Enhancement - Add increase and decrease stock options to bulk edit form. #22475
|
||||
* Enhancement - Allow states in zones to be searched by country name. #22339
|
||||
* Enhancement - Added registration success notices to account pages. #22650
|
||||
* Enhancement - Store notice is visible again if the notice text is changed. #22645
|
||||
* Enhancement - Add aria-label attribute to shop orderby selector to improve accessibility. #22683
|
||||
* Enhancement - When adding, editing, and deleting items manually from orders, the corresponding product stock will be
|
||||
updated to reflect the event and an order note will log the event. #22329
|
||||
* Enhancement - Added suggestions for official extensions to Products, Edit Product and Orders screens.
|
||||
* Enhancement - Store attribute values as post_excerpt for variations to support easier searching for variations. #22083
|
||||
* Enhancement - Improved username generation and introduced wc_create_new_customer_username function. #23145
|
||||
* Enhancement - Allow opting out of Marketplace Suggestions 23218
|
||||
* Tweak - Generalize shipping estimate text on cart page. #22467
|
||||
* Tweak - Include auto draft orders in order list filters. #22380
|
||||
* Tweak - Only include the network orders widget on the main site dashboard. #22318
|
||||
* Tweak - Only show available shipping continents when selecting shipping zone region. #22131
|
||||
* Tweak - Use Shortcode block on default WooCommerce pages. #21817
|
||||
* Tweak - Show full category hierarchy in product URLs when term IDs are not sequential. #22526
|
||||
* Tweak - Make sure account and checkout endpoints only work under account and checkout pages. #22631
|
||||
* Tweak - Show loading graphic when order form is submitted. #22664
|
||||
* Tweak - Add alt text to gallery images #22863
|
||||
* Tweak - Improved `display_name` generation during checkout. #22786
|
||||
* Tweak - Send correct calling code and phone number to PayPal standard when using non-US addresses. #22693
|
||||
* Tweak - Added tooltip to refund-amount input box and made it readonly when taxes are enabled. #22820
|
||||
* Tweak - Remove admin alert for the WooCommerce Gutenberg Products Block feature plugin. #22982
|
||||
* Tweak - Setup Wizard: support keyboard navigation to toggle on/off features. #22936
|
||||
* Tweak - Set reply-to address for all emails. #22979
|
||||
* Tweak - Setup wizard redirection improvements. #22977
|
||||
* Tweak - Simplify display of discount amounts within orders. #22949
|
||||
* Tewak - Remove Marketplace Suggestions from product listing page. #23211
|
||||
* Template - Moved the order of rememberme checkboxes for accessibility so they tab in order. #21454
|
||||
* Template - New structure for attributes template, including new `woocommerce_display_product_attributes` filter. #22480
|
||||
* Template - Admin cancelled order email reworded. #22971
|
||||
* Dev - Update action scheduler to version 2.2.2. #23162
|
||||
* Dev - Update action scheduler to version 2.2.1. #23016
|
||||
* Dev - Use ActionScheduler for database updates. Improved update notice. #22904
|
||||
* Dev - Introduce `woocommerce_reviews_title` filter. #22216
|
||||
* Dev - Added `woocommerce_cheque_process_payment_order_status` filter allowing plugins to change the order status to the Cheque gateway. #21402
|
||||
* Dev - Add the current coupon object to the `woocommerce_get_shop_coupon_data` filter. #21442
|
||||
* Dev - New filter `woocommerce_gallery_image_html_attachment_image_params` for manipulating gallery images. #22005
|
||||
* Dev - New filter `woocommerce_widget_get_current_page_url` for manipulating links in widgets. #21537
|
||||
* Dev - Move wc_get_template filter to allow plugins to register locations for template files that do not exist in WooCommerce core. #21764
|
||||
* Dev - Add support for custom classes on global/quantity-input.php. #21553
|
||||
* Dev - Pass product object to `woocommerce_add_to_cart_redirect` filter where appropriate. #22123
|
||||
* Dev - Add support for forgetting the cart contents and user session when switching between accounts using the User Switching plugin. #21991
|
||||
* Dev - Added a consistent form class to the Track Order Form. #21991
|
||||
* Dev - Add $orderby and $order params to filter `woocommerce_get_catalog_ordering_args`. #22257
|
||||
* Dev - Add new pre query filter to WC_Product_Data_Store_CPT::search_products(). #22165
|
||||
* Dev - Added additional parameters to the `woocommerce_variation_option_name` filter. #21153
|
||||
* Dev - Added new filter `woocommerce_get_min_max_price_meta_query`. #22255
|
||||
* Dev - Added a filter to WC_REST_CRUD_Controller::get_collection_params method to allow developers to change params in
|
||||
the same way as WP_Rest_Posts_controller::get_collection_params. #21562
|
||||
* Dev - Add $zone param to woocommerce_shipping_zone_before_methods_table and woocommerce_shipping_zone_after_methods_table actions. #21961
|
||||
* Dev - Added `woocommerce_geolocation_ajax_get_location_hash` filter. #22350
|
||||
* Dev - Added `woocommerce_variation_prices_array` filter. #21003
|
||||
* Dev - Added `wc_emptied_cart` javascript event when cart is emptied. #22469
|
||||
* Dev - Switched `woocommerce_ordered_again` hook to ref_array. #22425
|
||||
* Dev - `woocommerce_checkout_before_order_review_heading` action added in checkout form template. #22481
|
||||
* Dev - Added `woocommerce_variation_header` hook in variations list. #21341
|
||||
* Dev - Add a filter, woocommerce_current_user_can_edit_customer_meta_fields, to bypass manage_woocommerce when editing customer meta fields. #22277
|
||||
* Dev - Adds filter on the return value of function 'get_item_tax_rates'. This gives developers the possibility to
|
||||
prevent the mandatory caching of tax rates. #22488
|
||||
* Dev - Add filters for mail callback in WC_Email::send method. #22394
|
||||
* Dev - Add an instance method to WC_Admin_Taxonomies. #21884
|
||||
* Dev - Added `woocommerce_order_is_pending_statuses` filter and `wc_get_is_pending_statuses` function. #22409
|
||||
* Dev - Filter save_payment_method_checkbox to allow "Save to account" checkbox to be removed from the checkout form. #21859
|
||||
* Dev - Added triggers to the gallery script to allow 3rd parties to run scripts before and after initialization. #22501
|
||||
* Dev - Added `woocommerce_add_to_cart_qty_html` filter. #21069
|
||||
* Dev - Prevent extract from polluting hook arguments in wc_get_template(). #21722
|
||||
* Dev - Add `woocommerce_pre_remove_cart_item_from_session` hook to allow removal of cart items when the cart is loaded from the session. #22290
|
||||
* Dev - Add `$attribute` to `woocommerce_product_option_terms` filter. #21648
|
||||
* Dev - Added error handling and timeout to cart fragment ajax call. #21043
|
||||
* Dev - Remove unused legacy 'woocommerce_lock_down_admin' option and use filter only instead. #17796
|
||||
* Dev - Allow custom settings sections in the Shipping tab. #21719
|
||||
* Dev - Update Emogrifier library to 2.1. #22342
|
||||
* Dev - Moved core state codes to a single file. #22339
|
||||
* Dev - Adds filter for product categories displayed by `product_categories` shortcode. #22571
|
||||
* Dev - Moves cart hash calculation to WC_Cart class. #21050
|
||||
* Dev - Removed deprecated Simplify gateway. #22410
|
||||
* Dev - Added `woocommerce_paypal_force_one_line_item` filter to control how items are sent to PayPal. #22653
|
||||
* Dev - Added `woocommerce_update_product_stock_query` to filter the direct sql query to update product stock. #22672
|
||||
* Dev - Added `woocommerce_product_loop_title_classes` filter to modify product title loop classes. #22717
|
||||
* Dev - Delay `woocommerce_loaded` hook until all plugins are loaded. #22536
|
||||
* Dev - Added `woocommerce_product_price_class` filter to modify product price classes. #22748
|
||||
* Dev - `woocommerce_product_stock_status_options` filter added for stock status options. #22834
|
||||
* Dev - `woocommerce_before_cart_emptied` action before cart is emptied. #22846
|
||||
* Dev - Added filters for shipping options - `woocommerce_shipping_ID_option` and `woocommerce_shipping_ID_instance_option`. #22771
|
||||
* Dev - Refactor comment/rating update functions. #22909
|
||||
* Dev - Introduced wc_sanitize_phone_number() function. #22962
|
||||
* Dev - Added `woocommerce_get_product_subcategories_cache_key` filter to allow the cache to be renamed if for instance
|
||||
the site runs in multiple languages and needs a unique cache per language. #22915
|
||||
* Dev - Inactive, MU, Dropin plugins and WooCommerce.com account connection status added to System Status Report. #22887
|
||||
* Dev - Make error handling consistent in payment processing for pay page and checkout. #22916
|
||||
* Dev - Improved usage and event tracking (if opted in). #22955
|
||||
* Dev - Pass class context to woocommerce_email_styles filter. #23027
|
||||
* Fix - Use correct address for taxes when applying/removing coupons. #22802
|
||||
* Fix - Hide ratings on the shop page when reviews are disabled. #22476
|
||||
* Fix - Fix W3C validation of single product page quantity input. #22333
|
||||
* Fix - Give product variations a unique guid after creation. #22324
|
||||
* Fix - Deduct correct refunded amounts in calculated net daily sales export CSV. #22518
|
||||
* Fix - Country sorting for stores which use a language that uses a lot of accented characters, e.g. Spanish. #22417
|
||||
* Fix - Customer VAT exempt status now carries through to order when placed via checkout. #22458
|
||||
* Fix - Handle full refunds for taxes by code report. #21843
|
||||
* Fix - Option "Used for variations" should show only for variable products when saving attributes. #22524
|
||||
* Fix - Allow pa_ in product attribute slugs. #22112
|
||||
* Fix - Fix customer creation dates in API. #22269
|
||||
* Fix - Get widget instance setting defaults so it shows in customiser before save. #22345
|
||||
* Fix - PR state codes. #22339
|
||||
* Fix - Allow selecting states from the Country / State drop-down for your store address when you have the option
|
||||
enabled to sell to specific countries. #22339
|
||||
* Fix - Restrict the price filter widget to filtering the main product query. #22621
|
||||
* Fix - Default placeholder image resizing. #22443
|
||||
* Fix - HTML tags should be stripped from description in Structured Data of Product. #22596
|
||||
* Fix - For logged in customers, pull default address fields from customer object, not session object, to avoid incorrect mixes of data. #22392
|
||||
* Fix - Misc tax rounding improvements. #22420
|
||||
* Fix - Respect shop page subcategories setting when `page/N/` is added to the URL. #22589
|
||||
* Fix - Check for decoded taxonomy name when unsetting product terms. #22740
|
||||
* Fix - If date paid is not set but payment complete status has passed, set it. #22735
|
||||
* Fix - Prevent webhooks for drafts, and correct create vs updated for manual orders. #22731
|
||||
* Fix - Ignore invalid default customer locations. #22357
|
||||
* Fix - The state select field was missing a placeholder. #22357
|
||||
* Fix - Fix state field rendering when customer address is not in a valid selling country. #22357
|
||||
* Fix - Correctly handle negative fees when using the REST API. #22782
|
||||
* Fix - Make sure local_pickup taxes do not hang around when local_pickup is not available for the selected location during checkout. #22826
|
||||
* Fix - Remove Plugin and Theme background installer hooks, cannot run as there are no events scheduled for it. #22799
|
||||
* Fix - Trigger zoom if moving cursor over image quickly in product gallery. #22784
|
||||
* Fix - PayPal: Add meta data, before changing order status. #22892
|
||||
* Fix - Make price filter widget tax aware when you have excl prices entered but show prices incl of tax. #22540
|
||||
* Fix - Loop attribute panels to disable options rather than look at values to prevent notices. #22891
|
||||
* Fix - When deleting zone methods, also remove setting options. #22867
|
||||
* Fix - Correctly show state fields after posting the edit address form. #22948
|
||||
* Fix - Validate coupon usage limit for manual orders correctly before order is saved. #22980
|
||||
* Fix - Make coupon code sanitization match post_title sanitization. #22945
|
||||
* Fix - Ensure WC_Helper sees plugin activation events via CLI. #22972
|
||||
* Fix - Setup wizard redirection improvements. #22977
|
||||
* Fix - Correctly show stock status for products when manually creating an order in the admin. #22997
|
||||
* Fix - After logging in update customer session ID. #23001
|
||||
* Fix - Narrow viewport css in setup wizard. #23033
|
||||
* Fix - Allow entering of date only ( no time ) when placing a singular product on sale. #22973
|
||||
* Fix - Download link URL in helper. #23146
|
||||
* Fix - Completed email wording update. #23128
|
||||
* Fix - REST API: Allow filtering by future status #23138
|
||||
* Fix - Update refund reason to make it clear process is manual. #23149
|
||||
* Fix - Hide stock status for variations when the parent is managing stock. #23069
|
||||
* Fix - Force variation product type in WC_Ajax::add_variation. #23131
|
||||
* Fix - WooCommerce writes current_theme_supports_woocommerce option on every regular page view. #23035
|
||||
* Fix - Update the rating request text in the footer to be friendlier for screen reader users. #23039
|
||||
* Fix - Null check variable before accessing its properties on checkout page. #23047
|
||||
* Fix - Recognize all input fields with ID for checkout fields. #23050
|
||||
* Fix - Avoid regenerating thumbnails on every page load. #21800
|
||||
* Fix - Changed 'private' methods on WC_Breadcrumb class to 'protected'. #23057
|
||||
* Fix - Jumping to top of page when dismissing store notice. #23066
|
||||
* Fix - Backwards compatibility issues with wc_get_template #23197
|
||||
* Fix - Remove date restriction of Facebook Plugin feature in OBW #23210
|
||||
* Fix - Updates to usage tracking logic #23231
|
||||
* Fix - Add get_post_status helper method and ensure prefix gets added for most statuses #23203
|
||||
* Fix - Add link to suggstions management #23229
|
||||
* Fix - Make usage tracking opt-out text more clear #23216
|
||||
* Fix - CSS Issues with suggestions display #23241
|
||||
* Fix - Product search may fail to return valid results when using the 'include' flag to search within a limited set.
|
||||
* Fix - Change aria-labelledby to aria-label on quantity input. #23186
|
||||
* Performance - Product meta data lookup table used for sorting and slow queries. #22718
|
||||
* Performance - Prime caches when reading variations. #22587
|
||||
* Performance - Only include REST API classes and objects during `rest_api_init` hook. #22615
|
||||
* Performance - Improved how versioned transients are set/cleanup to avoid cron. #22511
|
||||
* Performance - Optimized product CSS class functions to avoid multiple product reads and duplication. #22610
|
||||
* Performance - Improved caching of template loader, product types, and layered nav widget. #22612
|
||||
* Performance - Remove external lookup of IP addresses on localhost. #22608
|
||||
* Performance - Improved speed of the `find_matching_product_variation` variation lookup function. #22423
|
||||
* Performance - Prevent frontend code from being loaded during REST API. #21090
|
||||
* Performance - Load only active webhooks on pages and allow limits to be set by developers. #22760
|
||||
* Performance - Index on downloadable_product_permissions to improve speed when fetching downloads for customers. #22906
|
||||
* Performance - Improved term ordering queries, making the sorting apply by default via the DB query rather than sorting
|
||||
all terms with PHP. Removed legacy term meta table usage. #22570
|
||||
* Performance - Use day, not time, in status widget for caching. #22950
|
||||
* Performance - Improve slow term ordering by using queries instead of php. #22570
|
||||
* Performance - Removes legacy woocomerce_termmeta table and swap out all calls to legacy term meta functions to the new WP ones. #22570
|
||||
* Performance - Apply term sorting using get_terms_defaults hook instead of custom parameters. #22570
|
||||
* Performance - Use pre_get_terms hook to detect menu_order sorting param and apply to the term query. Meta sorting is now possible through WP. #22570
|
||||
* Performance - Use terms_clauses hook to support numeric name sorting and to improve the menu order sorting so it works if meta is missing. #22570
|
||||
* Performance - Added caching to System Status Report. #22887
|
||||
* Performance - Delete empty meta on update in data-stores. #22773
|
||||
* Performance - Image regeneration edge cases. #22818
|
||||
* Performance - Don’t query for an order count unnecessarily. #22984
|
||||
* Performance - Add caching to attribute functions. #22938
|
||||
* Performance - Add ability to run product lookup table updates via WP CLI. #23031
|
||||
* Localization - Modify administrative regions of Greece to default to their english ISO 3166-2 names, instead of using the native GR names. #21945
|
||||
* Localization - Added US Minor Outlying Islands as states to avoid confusion with US. #22468
|
||||
* Localization - Dutch postcode validation. #22316
|
||||
* Localization - Made municipality address field optional for Latvia. #22487
|
||||
* Localization - Added new Venezuelan currency Bs S. #22435
|
||||
* Localization - Added Danish locale. #22495
|
||||
* Localization - Update Peruvian currency. #22602
|
||||
* Localization - Update CA address format. #22692
|
||||
* Localization - Updated JP field order. #22774
|
||||
|
||||
= 3.5.8 - 2019-04-16 =
|
||||
* Security - Added escaping for states on the user profile screen.
|
||||
* Security - Added escaping for PhotoSwipe captions.
|
||||
* Security - Added escaping for SelectWoo selected options.
|
||||
|
||||
= 3.5.7 - 2019-03-19 =
|
||||
* Security - Improved the way in which state fields are regenerated by JavaScript to ensure values are properly escaped.
|
||||
|
||||
= 3.5.6 - 2019-03-07 =
|
||||
* Fix - Removes invalid product structured data from archives, and include more data on single product pages. #22925
|
||||
Product structured data should only be generated for visible data, and not on archives when there are single
|
||||
|
@ -3246,7 +3548,7 @@
|
|||
* Feature - Allow setting the product post type slug to a static (non-translatable) text, mainly to be used for translating and WPML setups.
|
||||
* Feature - Added lost password shortcode / email notification (thanks Max Rice).
|
||||
* Feature - Simplified permalink/base settings now found in Settings > Permalinks.
|
||||
* Feature - Support more permalink structures (from https://codex.wordpress.org/Using_Permalinks)
|
||||
* Feature - Support more permalink structures (from https://wordpress.org/support/article/using-permalinks/)
|
||||
* Feature - Added option to resend order emails, checkboxes select which one.
|
||||
* Feature - New layered nav current filters widget. This lists active filters from all layered nav for de-selection.
|
||||
* Feature - Added the option to sell products individually (only allow 1 in the cart).
|
||||
|
|
21
Gruntfile.js
|
@ -88,6 +88,8 @@ module.exports = function( grunt ) {
|
|||
'<%= dirs.js %>/photoswipe/photoswipe.min.js': ['<%= dirs.js %>/photoswipe/photoswipe.js'],
|
||||
'<%= dirs.js %>/photoswipe/photoswipe-ui-default.min.js': ['<%= dirs.js %>/photoswipe/photoswipe-ui-default.js'],
|
||||
'<%= dirs.js %>/round/round.min.js': ['<%= dirs.js %>/round/round.js'],
|
||||
'<%= dirs.js %>/selectWoo/selectWoo.full.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.full.js'],
|
||||
'<%= dirs.js %>/selectWoo/selectWoo.min.js': ['<%= dirs.js %>/selectWoo/selectWoo.js'],
|
||||
'<%= dirs.js %>/stupidtable/stupidtable.min.js': ['<%= dirs.js %>/stupidtable/stupidtable.js'],
|
||||
'<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.min.js': ['<%= dirs.js %>/zeroclipboard/jquery.zeroclipboard.js']
|
||||
}
|
||||
|
@ -195,7 +197,6 @@ module.exports = function( grunt ) {
|
|||
options: {
|
||||
potFilename: 'woocommerce.pot',
|
||||
exclude: [
|
||||
'apigen/.*',
|
||||
'vendor/.*',
|
||||
'tests/.*',
|
||||
'tmp/.*'
|
||||
|
@ -228,7 +229,6 @@ module.exports = function( grunt ) {
|
|||
files: {
|
||||
src: [
|
||||
'**/*.php', // Include all files
|
||||
'!apigen/**', // Exclude apigen/
|
||||
'!includes/libraries/**', // Exclude libraries/
|
||||
'!node_modules/**', // Exclude node_modules/
|
||||
'!tests/**', // Exclude tests/
|
||||
|
@ -245,13 +245,6 @@ module.exports = function( grunt ) {
|
|||
stdout: true,
|
||||
stderr: true
|
||||
},
|
||||
apidocs: {
|
||||
command: [
|
||||
'vendor/bin/apigen generate -q',
|
||||
'cd apigen',
|
||||
'php hook-docs.php'
|
||||
].join( '&&' )
|
||||
},
|
||||
e2e_test: {
|
||||
command: 'npm run --silent test:single tests/e2e-tests/' + grunt.option( 'file' )
|
||||
},
|
||||
|
@ -293,9 +286,6 @@ module.exports = function( grunt ) {
|
|||
|
||||
// Clean the directory.
|
||||
clean: {
|
||||
apidocs: {
|
||||
src: [ 'wc-apidocs' ]
|
||||
},
|
||||
blocks: {
|
||||
src: [
|
||||
'<%= dirs.js %>/blocks',
|
||||
|
@ -313,7 +303,6 @@ module.exports = function( grunt ) {
|
|||
dist: {
|
||||
src: [
|
||||
'**/*.php', // Include all php files.
|
||||
'!apigen/**',
|
||||
'!includes/api/legacy/**',
|
||||
'!includes/libraries/**',
|
||||
'!node_modules/**',
|
||||
|
@ -383,6 +372,7 @@ module.exports = function( grunt ) {
|
|||
)
|
||||
// Replace class & constant prefixes.
|
||||
.replace( /WGPB_/g, 'WC_' )
|
||||
.replace( /FP_VERSION/g, 'WGPB_VERSION' )
|
||||
// Replace file imports
|
||||
.replace( /-wgpb-/g, '-wc-' )
|
||||
}
|
||||
|
@ -436,11 +426,6 @@ module.exports = function( grunt ) {
|
|||
'copy'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'docs', [
|
||||
'clean:apidocs',
|
||||
'shell:apidocs'
|
||||
]);
|
||||
|
||||
grunt.registerTask( 'contributors', [
|
||||
'prompt:contributors',
|
||||
'shell:contributors'
|
||||
|
|
20
apigen.neon
|
@ -1,20 +0,0 @@
|
|||
destination: wc-apidocs
|
||||
templateConfig: apigen/theme-woocommerce/config.neon
|
||||
extensions: [php]
|
||||
source:
|
||||
- woocommerce.php
|
||||
- includes
|
||||
exclude:
|
||||
- includes/libraries/
|
||||
- includes/api/legacy/
|
||||
charset: [UTF-8]
|
||||
main: WC
|
||||
title: WooCommerce Code Reference
|
||||
baseUrl: https://docs.woocommerce.com/wc-apidocs/
|
||||
templateTheme: default
|
||||
php: false
|
||||
sourceCode: true
|
||||
tree: true
|
||||
deprecated: true
|
||||
todo: true
|
||||
download: false
|
|
@ -1,226 +0,0 @@
|
|||
<?php
|
||||
/**
|
||||
* Generate documentation for hooks in WC
|
||||
*/
|
||||
class WC_HookFinder {
|
||||
private static $current_file = '';
|
||||
private static $files_to_scan = array();
|
||||
private static $pattern_custom_actions = '/do_action(.*?);/i';
|
||||
private static $pattern_custom_filters = '/apply_filters(.*?);/i';
|
||||
private static $found_files = array();
|
||||
private static $custom_hooks_found = '';
|
||||
|
||||
private static function get_files( $pattern, $flags = 0, $path = '' ) {
|
||||
|
||||
if ( ! $path && ( $dir = dirname( $pattern ) ) != '.' ) {
|
||||
|
||||
if ( '\\' == $dir || '/' == $dir ) {
|
||||
$dir = '';
|
||||
}
|
||||
|
||||
return self::get_files( basename( $pattern ), $flags, $dir . '/' );
|
||||
|
||||
} // End IF Statement
|
||||
|
||||
$paths = glob( $path . '*', GLOB_ONLYDIR | GLOB_NOSORT );
|
||||
$files = glob( $path . $pattern, $flags );
|
||||
|
||||
if ( is_array( $paths ) ) {
|
||||
foreach ( $paths as $p ) {
|
||||
$found_files = array();
|
||||
$retrieved_files = (array) self::get_files( $pattern, $flags, $p . '/' );
|
||||
foreach ( $retrieved_files as $file ) {
|
||||
if ( ! in_array( $file, self::$found_files ) ) {
|
||||
$found_files[] = $file;
|
||||
}
|
||||
}
|
||||
|
||||
self::$found_files = array_merge( self::$found_files, $found_files );
|
||||
|
||||
if ( is_array( $files ) && is_array( $found_files ) ) {
|
||||
$files = array_merge( $files, $found_files );
|
||||
}
|
||||
} // End FOREACH Loop
|
||||
}
|
||||
return $files;
|
||||
}
|
||||
|
||||
private static function get_hook_link( $hook, $details = array() ) {
|
||||
if ( ! empty( $details['class'] ) ) {
|
||||
$link = 'http://docs.woocommerce.com/wc-apidocs/source-class-' . $details['class'] . '.html#' . $details['line'];
|
||||
} elseif ( ! empty( $details['function'] ) ) {
|
||||
$link = 'http://docs.woocommerce.com/wc-apidocs/source-function-' . $details['function'] . '.html#' . $details['line'];
|
||||
} else {
|
||||
$link = 'https://github.com/woocommerce/woocommerce/search?utf8=%E2%9C%93&q=' . $hook;
|
||||
}
|
||||
|
||||
return '<a href="' . $link . '">' . $hook . '</a>';
|
||||
}
|
||||
|
||||
public static function process_hooks() {
|
||||
self::$files_to_scan = array();
|
||||
|
||||
self::$files_to_scan['Template Files'] = self::get_files( '*.php', GLOB_MARK, '../templates/' );
|
||||
self::$files_to_scan['Template Functions'] = array( '../includes/wc-template-functions.php', '../includes/wc-template-hooks.php' );
|
||||
self::$files_to_scan['Shortcodes'] = self::get_files( '*.php', GLOB_MARK, '../includes/shortcodes/' );
|
||||
self::$files_to_scan['Widgets'] = self::get_files( '*.php', GLOB_MARK, '../includes/widgets/' );
|
||||
self::$files_to_scan['Data Stores'] = self::get_files( '*.php', GLOB_MARK, '../includes/data-stores' );
|
||||
self::$files_to_scan['Core Classes'] = array_merge(
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/abstracts/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/customizer/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/emails/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/export/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/gateways/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/import/' ),
|
||||
self::get_files( '*.php', GLOB_MARK, '../includes/shipping/' )
|
||||
);
|
||||
|
||||
self::$files_to_scan = array_filter( self::$files_to_scan );
|
||||
|
||||
$scanned = array();
|
||||
|
||||
ob_start();
|
||||
|
||||
$index = array();
|
||||
|
||||
foreach ( self::$files_to_scan as $heading => $files ) {
|
||||
$index[] = '<a href="#hooks-' . str_replace( ' ', '-', strtolower( $heading ) ) . '">' . $heading . '</a>';
|
||||
}
|
||||
|
||||
echo '<div id="content">';
|
||||
echo '<h1>Action and Filter Hook Reference</h1>';
|
||||
echo '<div class="description">
|
||||
<p>This is simply a list of action and filter hooks found within WooCommerce files. View the source to see supported params and usage.</p>
|
||||
<p>' . implode( ', ', $index ) . '</p>
|
||||
</div>';
|
||||
|
||||
foreach ( self::$files_to_scan as $heading => $files ) {
|
||||
self::$custom_hooks_found = array();
|
||||
|
||||
foreach ( $files as $f ) {
|
||||
self::$current_file = basename( $f );
|
||||
$tokens = token_get_all( file_get_contents( $f ) );
|
||||
$token_type = false;
|
||||
$current_class = '';
|
||||
$current_function = '';
|
||||
|
||||
if ( in_array( self::$current_file, $scanned ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$scanned[] = self::$current_file;
|
||||
|
||||
foreach ( $tokens as $index => $token ) {
|
||||
if ( is_array( $token ) ) {
|
||||
$trimmed_token_1 = trim( $token[1] );
|
||||
if ( T_CLASS == $token[0] ) {
|
||||
$token_type = 'class';
|
||||
} elseif ( T_FUNCTION == $token[0] ) {
|
||||
$token_type = 'function';
|
||||
} elseif ( 'do_action' === $token[1] ) {
|
||||
$token_type = 'action';
|
||||
} elseif ( 'apply_filters' === $token[1] ) {
|
||||
$token_type = 'filter';
|
||||
} elseif ( $token_type && ! empty( $trimmed_token_1 ) ) {
|
||||
switch ( $token_type ) {
|
||||
case 'class' :
|
||||
$current_class = $token[1];
|
||||
break;
|
||||
case 'function' :
|
||||
$current_function = $token[1];
|
||||
break;
|
||||
case 'filter' :
|
||||
case 'action' :
|
||||
$hook = trim( $token[1], "'" );
|
||||
$hook = str_replace( '_FUNCTION_', strtoupper( $current_function ), $hook );
|
||||
$hook = str_replace( '_CLASS_', strtoupper( $current_class ), $hook );
|
||||
$hook = str_replace( '$this', strtoupper( $current_class ), $hook );
|
||||
$hook = str_replace( array( '.', '{', '}', '"', "'", ' ', ')', '(' ), '', $hook );
|
||||
$loop = 0;
|
||||
|
||||
// Keep adding to hook until we find a comma or colon
|
||||
while ( 1 ) {
|
||||
$loop ++;
|
||||
$prev_hook = is_string( $tokens[ $index + $loop - 1 ] ) ? $tokens[ $index + $loop - 1 ] : $tokens[ $index + $loop - 1 ][1];
|
||||
$next_hook = is_string( $tokens[ $index + $loop ] ) ? $tokens[ $index + $loop ] : $tokens[ $index + $loop ][1];
|
||||
|
||||
if ( in_array( $next_hook, array( '.', '{', '}', '"', "'", ' ', ')', '(' ) ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
if ( in_array( $next_hook, array( ',', ';' ) ) ) {
|
||||
break;
|
||||
}
|
||||
|
||||
$hook_first = substr( $next_hook, 0, 1 );
|
||||
$hook_last = substr( $next_hook, -1, 1 );
|
||||
|
||||
if ( '{' === $hook_first || '}' === $hook_last || '$' === $hook_first || ')' === $hook_last || '>' === substr( $prev_hook, -1, 1 ) ) {
|
||||
$next_hook = strtoupper( $next_hook );
|
||||
}
|
||||
|
||||
$next_hook = str_replace( array( '.', '{', '}', '"', "'", ' ', ')', '(' ), '', $next_hook );
|
||||
|
||||
$hook .= $next_hook;
|
||||
}
|
||||
|
||||
if ( isset( self::$custom_hooks_found[ $hook ] ) ) {
|
||||
self::$custom_hooks_found[ $hook ]['file'][] = self::$current_file;
|
||||
} else {
|
||||
self::$custom_hooks_found[ $hook ] = array(
|
||||
'line' => $token[2],
|
||||
'class' => $current_class,
|
||||
'function' => $current_function,
|
||||
'file' => array( self::$current_file ),
|
||||
'type' => $token_type,
|
||||
);
|
||||
}
|
||||
break;
|
||||
}
|
||||
$token_type = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ( self::$custom_hooks_found as $hook => $details ) {
|
||||
if ( ! strstr( $hook, 'woocommerce' ) && ! strstr( $hook, 'product' ) && ! strstr( $hook, 'wc_' ) ) {
|
||||
//unset( self::$custom_hooks_found[ $hook ] );
|
||||
}
|
||||
}
|
||||
|
||||
ksort( self::$custom_hooks_found );
|
||||
|
||||
if ( ! empty( self::$custom_hooks_found ) ) {
|
||||
echo '<div class="panel panel-default"><div class="panel-heading"><h2 id="hooks-' . str_replace( ' ', '-', strtolower( $heading ) ) . '">' . $heading . '</h2></div>';
|
||||
|
||||
echo '<table class="summary table table-bordered table-striped"><thead><tr><th>Hook</th><th>Type</th><th>File(s)</th></tr></thead><tbody>';
|
||||
|
||||
foreach ( self::$custom_hooks_found as $hook => $details ) {
|
||||
echo '<tr>
|
||||
<td>' . self::get_hook_link( $hook, $details ) . '</td>
|
||||
<td>' . $details['type'] . '</td>
|
||||
<td>' . implode( ', ', array_unique( $details['file'] ) ) . '</td>
|
||||
</tr>' . "\n";
|
||||
}
|
||||
|
||||
echo '</tbody></table></div>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</div><div id="footer">';
|
||||
|
||||
$html = file_get_contents( '../wc-apidocs/tree.html' );
|
||||
$header = explode( '<div id="content">', $html );
|
||||
$header = str_replace( '<li class="active">', '<li>', current( $header ) );
|
||||
$header = str_replace( '<li class="hooks">', '<li class="active">', $header );
|
||||
$header = str_replace( 'Tree | ', 'Hook Reference | ', $header );
|
||||
$footer = explode( '<div id="footer">', $html );
|
||||
|
||||
file_put_contents( '../wc-apidocs/hook-docs.html', $header . ob_get_clean() . end( $footer ) );
|
||||
echo "Hook docs generated :)\n";
|
||||
}
|
||||
}
|
||||
|
||||
WC_HookFinder::process_hooks();
|
|
@ -1,13 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $robots = false}
|
||||
|
||||
{block title}Page not found{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content">
|
||||
<h1>{include title}</h1>
|
||||
<p>The requested page could not be found.</p>
|
||||
<p>You have probably clicked on a link that is outdated and points to a page that does not exist any more or you have made an typing error in the address.</p>
|
||||
<p>To continue please try to find requested page in the menu,{if $config->tree} take a look at <a href="tree.html">the tree view</a> of the whole project{/if} or use search field on the top.</p>
|
||||
</div>
|
||||
{/block}
|
|
@ -1,60 +0,0 @@
|
|||
{define elements}
|
||||
<tr n:foreach="$elements as $element">
|
||||
<td class="name"><a href="{$element|elementUrl}" n:class="$element->deprecated ? deprecated, !$element->valid ? invalid">{if $namespace}{$element->shortName}{else}{$element->name}{/if}</a></td>
|
||||
<td>{$element|shortDescription|noescape}</td>
|
||||
</tr>
|
||||
{/define}
|
||||
|
||||
{if $classes}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Classes summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="classes">
|
||||
{include elements, elements => $classes}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $interfaces}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Interfaces summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="interfaces">
|
||||
{include elements, elements => $interfaces}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $traits}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Traits summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="traits">
|
||||
{include elements, elements => $traits}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $exceptions}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Exceptions summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="exceptions">
|
||||
{include elements, elements => $exceptions}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $constants}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Constants summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="constants">
|
||||
{include elements, elements => $constants}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $functions}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Functions summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="functions">
|
||||
{include elements, elements => $functions}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
|
@ -1,185 +0,0 @@
|
|||
{default $robots = true}
|
||||
{default $active = ''}
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta name="robots" content="noindex" n:if="!$robots">
|
||||
|
||||
<title>{include title}{if 'overview' !== $active && $config->title} | {$config->title}{/if}</title>
|
||||
|
||||
<link rel="stylesheet" href="{='resources/bootstrap.min.css'|staticFile}">
|
||||
<link rel="stylesheet" href="{='resources/style.css'|staticFile}">
|
||||
<link n:if="$config->googleCseId" rel="search" type="application/opensearchdescription+xml" title="{$config->title}" href="{$config->baseUrl}/opensearch.xml">
|
||||
|
||||
<script n:if="$config->googleAnalytics">
|
||||
var _gaq = _gaq || [];
|
||||
_gaq.push(['_setAccount', {$config->googleAnalytics}]);
|
||||
_gaq.push(['_trackPageview']);
|
||||
|
||||
(function() {
|
||||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||||
})();
|
||||
</script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-header">
|
||||
<a href="index.html" class="navbar-brand">{if $config->title}{$config->title}{else}Overview{/if}</a>
|
||||
</div>
|
||||
<div class="collapse navbar-collapse">
|
||||
|
||||
<form{if $config->googleCseId} action="http://www.google.com/cse"{/if} id="search" class="navbar-form navbar-left" role="search">
|
||||
<input type="hidden" name="cx" value="{$config->googleCseId}">
|
||||
<input type="hidden" name="ie" value="UTF-8">
|
||||
<div class="form-group">
|
||||
<input type="text" name="q" class="search-query form-control" placeholder="Search"{if 'overview' === $active} autofocus{/if}>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<ul class="nav navbar-nav">
|
||||
<li n:class="'package' === $active ? active" n:if="$packages">
|
||||
<a n:tag-if="'package' !== $active && $package" href="{$package|packageUrl}" title="Summary of {$package}"><span>Package</span></a>
|
||||
</li>
|
||||
<li n:class="'namespace' === $active ? active" n:if="$namespaces">
|
||||
<a n:tag-if="'namespace' !== $active && $namespace" href="{$namespace|namespaceUrl}" title="Summary of {$namespace}"><span>Namespace</span></a>
|
||||
</li>
|
||||
<li n:class="'class' === $active ? active" n:if="!$function && !$constant">
|
||||
<a n:tag-if="'class' !== $active && $class" href="{$class|classUrl}" title="Summary of {$class->name}"><span>Class</span></a>
|
||||
</li>
|
||||
<li n:class="'function' === $active ? active" n:if="$function">
|
||||
<a n:tag-if="'function' !== $active" href="{$function|functionUrl}" title="Summary of {$function->name}"><span>Function</span></a>
|
||||
</li>
|
||||
<li n:class="'constant' === $active ? active" n:if="$constant">
|
||||
<a n:tag-if="'constant' !== $active" href="{$constant|constantUrl}" title="Summary of {$constant->name}"><span>Constant</span></a>
|
||||
</li>
|
||||
|
||||
<li class="divider-vertical" n:if="$config->tree || $config->deprecated || $config->todo"></li>
|
||||
|
||||
<li n:class="'tree' === $active ? active" n:if="$config->tree">
|
||||
<a n:tag-if="'tree' !== $active" href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
|
||||
</li>
|
||||
|
||||
{foreach $annotationGroups as $annotation}
|
||||
<li n:class="$active === 'annotation-group-' . $annotation ? active">
|
||||
<a n:tag-if="$active !== 'annotation-group-' . $annotation" href="annotation-group-{$annotation}.html" title="List of elements with {$annotation} annotation">
|
||||
<span>{$annotation|firstUpper}</span>
|
||||
</a>
|
||||
</li>
|
||||
{/foreach}
|
||||
|
||||
<li class="divider-vertical"></li>
|
||||
|
||||
<li class="hooks">
|
||||
<a href="hook-docs.html" title="Hooks"><span>Hook Reference</span></a>
|
||||
</li>
|
||||
|
||||
<li class="woocommerce-com-docs">
|
||||
<a href="https://docs.woocommerce.com/"><span>WooCommerce Docs</span></a>
|
||||
</li>
|
||||
|
||||
<li class="api">
|
||||
<a href="https://woocommerce.github.io/woocommerce-rest-api-docs/"><span>REST API Docs</span></a>
|
||||
</li>
|
||||
|
||||
<li class="divider-vertical" n:if="$config->download"></li>
|
||||
|
||||
<li n:if="$config->download">
|
||||
<a href="{$archive}" title="Download documentation as ZIP archive"><span>Download</span></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div id="left">
|
||||
<div id="menu">
|
||||
{define group}
|
||||
<ul>
|
||||
{foreach $groups as $group}
|
||||
{var $nextLevel = substr_count($iterator->nextValue, '\\') > substr_count($group, '\\')}
|
||||
<li n:class="$actualGroup === $group || 0 === strpos($actualGroup, $group . '\\') ? active, $config->main && 0 === strpos($group, $config->main) ? main">
|
||||
<a href="{if $groupBy === 'package'}{$group|packageUrl}{else}{$group|namespaceUrl}{/if}">
|
||||
{$group|subgroupName}<span n:tag-if="$nextLevel"></span>
|
||||
</a>
|
||||
{if $nextLevel}
|
||||
<ul>
|
||||
{else}
|
||||
</li>
|
||||
{if substr_count($iterator->nextValue, '\\') < substr_count($group, '\\')}
|
||||
{='</ul></li>'|repeat:substr_count($group, '\\') - substr_count($iterator->nextValue, '\\')|noescape}
|
||||
{/if}
|
||||
{/if}
|
||||
{/foreach}
|
||||
</ul>
|
||||
{/define}
|
||||
|
||||
<div id="groups">
|
||||
{if $namespaces}
|
||||
<h3>Namespaces</h3>
|
||||
{include group, groups => $namespaces, actualGroup => $namespace, groupBy => 'namespace'}
|
||||
{elseif $packages}
|
||||
<h3>Packages</h3>
|
||||
{include group, groups => $packages, actualGroup => $package, groupBy => 'package'}
|
||||
{/if}
|
||||
</div>
|
||||
|
||||
{define elements}
|
||||
<ul>
|
||||
<li n:foreach="$elements as $element" n:class="$activeElement === $element ? active"><a n:class="$element->deprecated ? deprecated, !$element->valid ? invalid" href="{$element|elementUrl}">{if $namespace}{$element->shortName}{else}{$element->name}{/if}</a></li>
|
||||
</ul>
|
||||
{/define}
|
||||
|
||||
<div id="elements">
|
||||
{if $classes}
|
||||
<h3>Classes</h3>
|
||||
{include elements, elements => $classes, activeElement => $class}
|
||||
{/if}
|
||||
|
||||
{if $interfaces}
|
||||
<h3>Interfaces</h3>
|
||||
{include elements, elements => $interfaces, activeElement => $class}
|
||||
{/if}
|
||||
|
||||
{if $traits}
|
||||
<h3>Traits</h3>
|
||||
{include elements, elements => $traits, activeElement => $class}
|
||||
{/if}
|
||||
|
||||
{if $exceptions}
|
||||
<h3>Exceptions</h3>
|
||||
{include elements, elements => $exceptions, activeElement => $class}
|
||||
{/if}
|
||||
|
||||
{if $constants}
|
||||
<h3>Constants</h3>
|
||||
{include elements, elements => $constants, activeElement => $constant}
|
||||
{/if}
|
||||
|
||||
{if $functions}
|
||||
<h3>Functions</h3>
|
||||
{include elements, elements => $functions, activeElement => $function}
|
||||
{/if}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="splitter"></div>
|
||||
|
||||
<div id="right">
|
||||
<div id="rightInner">
|
||||
{include content}
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
{$config->title} API documentation generated by <a href="http://apigen.org">ApiGen</a>
|
||||
</div>
|
||||
</div>
|
||||
<script src="{='resources/combined.js'|staticFile}"></script>
|
||||
<script src="{='elementlist.js'|staticFile}"></script>
|
||||
</body>
|
||||
</html>
|
|
@ -1,149 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'annotation-group-' . $annotation}
|
||||
|
||||
{block title}{$annotation|firstUpper}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content">
|
||||
<h1>{include title}</h1>
|
||||
|
||||
{if $hasElements}
|
||||
{if $annotationClasses}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Classes summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="classes">
|
||||
{include classes, items => $annotationClasses}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationInterfaces}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Interfaces summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="interfaces">
|
||||
{include classes, items => $annotationInterfaces}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationTraits}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Traits summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="traits">
|
||||
{include classes, items => $annotationTraits}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationExceptions}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Exceptions summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="exceptions">
|
||||
{include classes, items => $annotationExceptions}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationMethods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Methods summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="methods">
|
||||
<tr n:foreach="$annotationMethods as $method">
|
||||
<td class="name"><a href="{$method->declaringClassName|classUrl}">{$method->declaringClassName}</a></td>
|
||||
<td class="name"><code><a href="{$method|methodUrl}">{$method->name}()</a></code></td>
|
||||
<td>
|
||||
{if $method->hasAnnotation($annotation)}
|
||||
{foreach $method->annotations[$annotation] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$method|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
{/if}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationConstants}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Constants summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="constants">
|
||||
<tr n:foreach="$annotationConstants as $constant">
|
||||
{if $constant->declaringClassName}
|
||||
<td class="name"><a href="{$constant->declaringClassName|classUrl}">{$constant->declaringClassName}</a></td>
|
||||
<td class="name"><code><a href="{$constant|constantUrl}"><b>{$constant->name}</b></a></code></td>
|
||||
|
||||
{else}
|
||||
<td class="name" n:if="$namespaces || $classes || $interfaces || $traits || $exceptions"><a n:if="$constant->namespaceName" href="{$constant->namespaceName|namespaceUrl}">{$constant->namespaceName}</a></td>
|
||||
<td n:class="name"><code><a href="{$constant|constantUrl}"><b>{$constant->shortName}</b></a></code></td>
|
||||
{/if}
|
||||
<td>
|
||||
{foreach $constant->annotations[$annotation] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$constant|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationProperties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Properties summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="properties">
|
||||
<tr n:foreach="$annotationProperties as $property">
|
||||
<td class="name"><a href="{$property->declaringClassName|classUrl}">{$property->declaringClassName}</a></td>
|
||||
<td class="name"><a href="{$property|propertyUrl}"><var>${$property->name}</var></a></td>
|
||||
<td>
|
||||
{foreach $property->annotations[$annotation] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$property|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if $annotationFunctions}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Functions summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="functions">
|
||||
<tr n:foreach="$annotationFunctions as $function">
|
||||
<td class="name" n:if="$namespaces"><a n:if="$function->namespaceName" href="{$function->namespaceName|namespaceUrl}">{$function->namespaceName}</a></td>
|
||||
<td class="name"><code><a href="{$function|functionUrl}">{$function->shortName}</a></code></td>
|
||||
<td>
|
||||
{foreach $function->annotations[$annotation] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$function|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
<p>No elements with <code>@{$annotation}</code> annotation found.</p>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
||||
|
||||
|
||||
{define classes}
|
||||
<tr n:foreach="$items as $class">
|
||||
<td class="name"><a href="{$class|classUrl}">{$class->name}</a></td>
|
||||
<td>
|
||||
{foreach $class->annotations[$annotation] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$class|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</td>
|
||||
</tr>
|
||||
{/define}
|
|
@ -1,462 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'class'}
|
||||
|
||||
{block title}{if $class->deprecated}Deprecated {/if}{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->name}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content" class="class">
|
||||
<h1 n:class="$class->deprecated ? deprecated">{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->shortName}</h1>
|
||||
|
||||
{if $class->valid}
|
||||
|
||||
<div class="description" n:if="$template->longDescription($class)">
|
||||
{$class|longDescription|noescape}
|
||||
</div>
|
||||
|
||||
<dl class="tree well" n:if="$class->parentClass || $class->ownInterfaces || $class->ownTraits">
|
||||
<dd n:foreach="$tree as $item" style="padding-left:{($iterator->counter - 1) * 30}px">
|
||||
<img src="resources/inherit.png" alt="Extended by" n:if="$iterator->counter > 1">
|
||||
{if $item->documented}
|
||||
<a href="{$item|classUrl}" n:tag-if="!$iterator->last">{last}<b>{/last}<span n:class="$item->deprecated ? deprecated, !$item->valid ? invalid">{$item->name}</span>{last}</b>{/last}</a>
|
||||
{else}{$item->name}{/if}
|
||||
{var $itemOwnInterfaces = $item->ownInterfaces}
|
||||
{if $itemOwnInterfaces} implements {foreach $itemOwnInterfaces as $interface}
|
||||
<a href="{$interface|classUrl}" n:tag-if="$interface->documented"><span n:class="$interface->deprecated ? deprecated, !$interface->valid ? invalid">{$interface->name}</span></a>{sep}, {/sep}
|
||||
{/foreach}{/if}
|
||||
{var $itemOwnTraits = $item->ownTraits}
|
||||
{if $itemOwnTraits} uses {foreach $itemOwnTraits as $trait}
|
||||
{if is_string($trait)}
|
||||
{$trait} (not available)
|
||||
|
||||
{else}
|
||||
<a href="{$trait|classUrl}" n:tag-if="$trait->documented"><span n:class="$trait->deprecated ? deprecated, !$trait->valid ? invalid">{$trait->name}</span></a>{sep}, {/sep}
|
||||
{/}
|
||||
{/foreach}{/if}
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
{define children}
|
||||
<p class="elementList">
|
||||
{foreach $children as $child}
|
||||
<code><a href="{$child|classUrl}" n:tag-if="$child->documented"><span n:tag-if="$child->deprecated" class="deprecated">{$child->name}</span></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
{/define}
|
||||
|
||||
<div n:if="$directSubClasses">
|
||||
<h3>Direct known subclasses</h3>
|
||||
{include children, children => $directSubClasses}
|
||||
</div>
|
||||
|
||||
<div n:if="$indirectSubClasses">
|
||||
<h3>Indirect known subclasses</h3>
|
||||
{include children, children => $indirectSubClasses}
|
||||
</div>
|
||||
|
||||
<div n:if="$directImplementers">
|
||||
<h3>Direct known implementers</h3>
|
||||
{include children, children => $directImplementers}
|
||||
</div>
|
||||
|
||||
<div n:if="$indirectImplementers">
|
||||
<h3>Indirect known implementers</h3>
|
||||
{include children, children => $indirectImplementers}
|
||||
</div>
|
||||
|
||||
<div n:if="$directUsers">
|
||||
<h3>Direct Known Users</h3>
|
||||
{include children, children => $directUsers}
|
||||
</div>
|
||||
|
||||
<div n:if="$indirectUsers">
|
||||
<h3>Indirect Known Users</h3>
|
||||
{include children, children => $indirectUsers}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{if !$class->interface && !$class->trait && ($class->abstract || $class->final)}<b>{if $class->abstract}Abstract{else}Final{/if}</b><br>{/if}
|
||||
{if $class->internal}<b>PHP Extension:</b> <a href="{$class->extension|manualUrl}" title="Go to PHP documentation">{$class->extension->name|firstUpper}</a><br>{/if}
|
||||
{if $class->inNamespace()}<b>Namespace:</b> {$class->namespaceName|namespaceLinks|noescape}<br>{/if}
|
||||
{if $class->inPackage()}<b>Package:</b> {$class->packageName|packageLinks|noescape}<br>{/if}
|
||||
|
||||
{foreach $template->annotationSort($template->annotationFilter($class->annotations)) as $annotation => $values}
|
||||
{foreach $values as $value}
|
||||
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
|
||||
{$value|annotation:$annotation:$class|noescape}<br>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
{if $class->internal}
|
||||
<b>Documented at</b> <a href="{$class|manualUrl}" title="Go to PHP documentation">php.net</a>
|
||||
{else}
|
||||
<b>Located at</b> <a n:tag-if="$config->sourceCode" href="{$class|sourceUrl}" title="Go to source code">{$class->fileName|relativePath}</a>
|
||||
{/if}
|
||||
<br>
|
||||
</div>
|
||||
|
||||
{var $ownMethods = $class->ownMethods}
|
||||
{var $inheritedMethods = $class->inheritedMethods}
|
||||
{var $usedMethods = $class->usedMethods}
|
||||
{var $ownMagicMethods = $class->ownMagicMethods}
|
||||
{var $inheritedMagicMethods = $class->inheritedMagicMethods}
|
||||
{var $usedMagicMethods = $class->usedMagicMethods}
|
||||
|
||||
{if $ownMethods || $inheritedMethods || $usedMethods || $ownMagicMethods || $usedMagicMethods}
|
||||
{define method}
|
||||
<tr data-order="{$method->name}" id="{if $method->magic}m{/if}_{$method->name}">
|
||||
{var $annotations = $method->annotations}
|
||||
|
||||
<td class="attributes"><code>
|
||||
{if !$class->interface && $method->abstract}abstract{elseif $method->final}final{/if} {if $method->protected}protected{elseif $method->private}private{else}public{/if} {if $method->static}static{/if}
|
||||
{ifset $annotations['return']}{$annotations['return'][0]|typeLinks:$method|noescape}{/ifset}
|
||||
{if $method->returnsReference()}&{/if}
|
||||
</code>
|
||||
</td>
|
||||
|
||||
<td class="name"><div>
|
||||
<a class="anchor" href="#{if $method->magic}m{/if}_{$method->name}">#</a>
|
||||
<code n:class="$method->deprecated ? deprecated">{block|strip}
|
||||
{if $class->internal}
|
||||
<a href="{$method|manualUrl}" title="Go to PHP documentation">{$method->name}</a>(
|
||||
{else}
|
||||
<a n:tag-if="$config->sourceCode" href="{$method|sourceUrl}" title="Go to source code">{$method->name}</a>(
|
||||
{/if}
|
||||
{foreach $method->parameters as $parameter}
|
||||
<span>{$parameter->typeHint|typeLinks:$method|noescape}
|
||||
<var>{if $parameter->passedByReference}& {/if}${$parameter->name}</var>{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$class|noescape}{elseif $parameter->unlimited},…{/if}</span>{sep}, {/sep}
|
||||
{/foreach}
|
||||
){/block}</code>
|
||||
|
||||
{if $config->template['options']['elementDetailsCollapsed']}
|
||||
<div class="description short">
|
||||
{$method|shortDescription:true|noescape}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
|
||||
{$method|longDescription|noescape}
|
||||
|
||||
{if !$class->deprecated && $method->deprecated}
|
||||
<h4>Deprecated</h4>
|
||||
{ifset $annotations['deprecated']}
|
||||
<div class="list">
|
||||
{foreach $annotations['deprecated'] as $description}
|
||||
{if $description}
|
||||
{$description|annotation:'deprecated':$method|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/ifset}
|
||||
{/if}
|
||||
|
||||
{if $method->parameters && isset($annotations['param'])}
|
||||
<h4>Parameters</h4>
|
||||
<div class="list"><dl>
|
||||
{foreach $method->parameters as $parameter}
|
||||
<dt><var>${$parameter->name}</var>{if $parameter->unlimited},…{/if}</dt>
|
||||
<dd>{$parameter->description|description:$method|noescape}</dd>
|
||||
{/foreach}
|
||||
</dl></div>
|
||||
{/if}
|
||||
|
||||
{if isset($annotations['return']) && 'void' !== $annotations['return'][0]}
|
||||
<h4>Returns</h4>
|
||||
<div class="list">
|
||||
{foreach $annotations['return'] as $description}
|
||||
{$description|annotation:'return':$method|noescape}{sep}<br>{/}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{ifset $annotations['throws']}
|
||||
<h4>Throws</h4>
|
||||
<div class="list">
|
||||
{foreach $annotations['throws'] as $description}
|
||||
{$description|annotation:'throws':$method|noescape}{sep}<br>{/}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/ifset}
|
||||
|
||||
{foreach $template->annotationSort($template->annotationFilter($annotations, array('deprecated', 'param', 'return', 'throws'))) as $annotation => $descriptions}
|
||||
<h4>{$annotation|annotationBeautify}</h4>
|
||||
<div class="list">
|
||||
{foreach $descriptions as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$method|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{var $overriddenMethod = $method->overriddenMethod}
|
||||
{if $overriddenMethod}
|
||||
<h4>Overrides</h4>
|
||||
<div class="list"><code><a n:tag-if="$template->getClass($overriddenMethod->declaringClassName)" href="{$overriddenMethod|methodUrl}">{$overriddenMethod->declaringClassName}::{$overriddenMethod->name}</a></code></div>
|
||||
{/if}
|
||||
|
||||
{var $implementedMethod = $method->implementedMethod}
|
||||
{if $implementedMethod}
|
||||
<h4>Implementation of</h4>
|
||||
<div class="list"><code><a n:tag-if="$template->getClass($implementedMethod->declaringClassName)" href="{$implementedMethod|methodUrl}">{$implementedMethod->prettyName}</a></code></div>
|
||||
{/if}
|
||||
</div>
|
||||
</div></td>
|
||||
</tr>
|
||||
{/define}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Methods summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped methods" id="methods" n:if="$ownMethods">
|
||||
{foreach $ownMethods as $method}
|
||||
{include method, method => $method}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{foreach $inheritedMethods as $parentName => $methods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $methods as $method}
|
||||
<code><a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{foreach $usedMethods as $traitName => $methods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $methods as $data}
|
||||
<code><a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->name}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}</code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{if $ownMagicMethods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic methods summary</h3></div>
|
||||
<table class="summary table table-bordered table-striped methods" id="magicMethods" n:if="$ownMagicMethods">
|
||||
{foreach $ownMagicMethods as $method}
|
||||
{include method, method => $method}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{foreach $inheritedMagicMethods as $parentName => $methods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $methods as $method}
|
||||
<code><a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{foreach $usedMagicMethods as $traitName => $methods}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $methods as $data}
|
||||
<code><a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->name}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}</code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
|
||||
{var $ownConstants = $class->ownConstants}
|
||||
{var $inheritedConstants = $class->inheritedConstants}
|
||||
|
||||
{if $ownConstants || $inheritedConstants}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Constants summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped constants" id="constants" n:if="$ownConstants">
|
||||
<tr n:foreach="$ownConstants as $constant" data-order="{$constant->name}" id="{$constant->name}">
|
||||
{var $annotations = $constant->annotations}
|
||||
|
||||
<td class="attributes"><code>{$constant->typeHint|typeLinks:$constant|noescape}</code></td>
|
||||
<td class="name">
|
||||
<code>
|
||||
{if $class->internal}
|
||||
<a href="{$constant|manualUrl}" title="Go to PHP documentation"><b>{$constant->name}</b></a>
|
||||
{else}
|
||||
<a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code"><b>{$constant->name}</b></a>
|
||||
{/if}
|
||||
</code>
|
||||
|
||||
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
|
||||
{$constant|shortDescription:true|noescape}
|
||||
</div>
|
||||
|
||||
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
|
||||
{$constant|longDescription|noescape}
|
||||
|
||||
{foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions}
|
||||
<h4>{$annotation|annotationBeautify}</h4>
|
||||
<div class="list">
|
||||
{foreach $descriptions as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$constant|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
<td class="value">
|
||||
<div>
|
||||
<a href="#{$constant->name}" class="anchor">#</a>
|
||||
<code>{$constant->valueDefinition|highlightValue:$class|noescape}</code>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{foreach $inheritedConstants as $parentName => $constants}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Constants inherited from <a href="{$parentName|classUrl}#constants" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $constants as $constant}
|
||||
<code><a href="{$constant|constantUrl}" n:tag-if="$template->getClass($parentName)"><b><span n:tag-if="$constant->deprecated" class"deprecated">{$constant->name}</span></b></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{var $ownProperties = $class->ownProperties}
|
||||
{var $inheritedProperties = $class->inheritedProperties}
|
||||
{var $usedProperties = $class->usedProperties}
|
||||
{var $ownMagicProperties = $class->ownMagicProperties}
|
||||
{var $inheritedMagicProperties = $class->inheritedMagicProperties}
|
||||
{var $usedMagicProperties = $class->usedMagicProperties}
|
||||
|
||||
{if $ownProperties || $inheritedProperties || $usedProperties || $ownMagicProperties || $inheritedMagicProperties || $usedMagicProperties}
|
||||
{define property}
|
||||
<tr data-order="{$property->name}" id="{if $property->magic}m{/if}${$property->name}">
|
||||
<td class="attributes"><code>
|
||||
{if $property->protected}protected{elseif $property->private}private{else}public{/if} {if $property->static}static{/if} {if $property->readOnly}read-only{elseif $property->writeOnly}write-only{/if}
|
||||
{$property->typeHint|typeLinks:$property|noescape}
|
||||
</code></td>
|
||||
|
||||
<td class="name">
|
||||
{if $class->internal}
|
||||
<a href="{$property|manualUrl}" title="Go to PHP documentation"><var>${$property->name}</var></a>
|
||||
{else}
|
||||
<a n:tag-if="$config->sourceCode" href="{$property|sourceUrl}" title="Go to source code"><var>${$property->name}</var></a>
|
||||
{/if}
|
||||
|
||||
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
|
||||
{$property|shortDescription:true|noescape}
|
||||
</div>
|
||||
|
||||
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
|
||||
{$property|longDescription|noescape}
|
||||
|
||||
{foreach $template->annotationSort($template->annotationFilter($property->annotations, array('var'))) as $annotation => $descriptions}
|
||||
<h4>{$annotation|annotationBeautify}</h4>
|
||||
<div class="list">
|
||||
{foreach $descriptions as $description}
|
||||
{if $description}
|
||||
{$description|annotation:$annotation:$property|noescape}<br>
|
||||
{/if}
|
||||
{/foreach}
|
||||
</div>
|
||||
{/foreach}
|
||||
</div>
|
||||
</td>
|
||||
<td n:if="!$property->magic" class="value">
|
||||
<div>
|
||||
<a href="#{if $property->magic}m{/if}${$property->name}" class="anchor">#</a>
|
||||
<code>{$property->defaultValueDefinition|highlightValue:$class|noescape}</code>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{/define}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Properties summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped properties" id="properties" n:if="$ownProperties">
|
||||
{foreach $ownProperties as $property}
|
||||
{include property, property => $property}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{foreach $inheritedProperties as $parentName => $properties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $properties as $property}
|
||||
<code><a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{foreach $usedProperties as $traitName => $properties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $properties as $property}
|
||||
<code><a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{if $ownMagicProperties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic properties</h3></div>
|
||||
<table class="summary table table-bordered table-striped properties" id="magicProperties">
|
||||
{foreach $ownMagicProperties as $property}
|
||||
{include property, property => $property}
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{foreach $inheritedMagicProperties as $parentName => $properties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $properties as $property}
|
||||
<code><a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
|
||||
{foreach $usedMagicProperties as $traitName => $properties}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h3>Magic properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
|
||||
<p class="elementList">
|
||||
{foreach $properties as $property}
|
||||
<code><a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
|
||||
{/foreach}
|
||||
</p>
|
||||
</div>
|
||||
{/foreach}
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
<div class="alert alert-error">
|
||||
<p>
|
||||
Documentation of this class could not be generated.
|
||||
</p>
|
||||
<p>
|
||||
Class was originally declared in {$class->fileName|relativePath} and is invalid because of:
|
||||
</p>
|
||||
<ul>
|
||||
<li n:foreach="$class->reasons as $reason">Class was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
|
@ -1,10 +0,0 @@
|
|||
{contentType javascript}
|
||||
|
||||
var ApiGen = ApiGen || {};
|
||||
ApiGen.config = {$config->template};
|
||||
|
||||
{var $scripts = ['jquery.min.js', 'jquery.cookie.js', 'jquery.sprintf.js', 'jquery.autocomplete.js', 'jquery.sortElements.js', 'main.js']}
|
||||
|
||||
{foreach $scripts as $script}
|
||||
{file_get_contents("$basePath/js/$script")|noescape}
|
||||
{/foreach}
|
|
@ -1 +0,0 @@
|
|||
name: "Twitter Bootstrap theme"
|
|
@ -1,60 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'constant'}
|
||||
|
||||
{block title}{if $constant->deprecated}Deprecated {/if}Constant {$constant->name}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content" class="constant">
|
||||
<h1 n:class="$constant->deprecated ? deprecated">Constant {$constant->shortName}</h1>
|
||||
|
||||
{if $constant->valid}
|
||||
|
||||
<div class="description" n:if="$template->longDescription($constant)">
|
||||
{$constant|longDescription|noescape}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{if $constant->inNamespace()}<b>Namespace:</b> {$constant->namespaceName|namespaceLinks|noescape}<br>{/if}
|
||||
{if $constant->inPackage()}<b>Package:</b> {$constant->packageName|packageLinks|noescape}<br>{/if}
|
||||
{foreach $template->annotationSort($template->annotationFilter($constant->annotations, array('var'))) as $annotation => $values}
|
||||
{foreach $values as $value}
|
||||
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
|
||||
{$value|annotation:$annotation:$constant|noescape}<br>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<b>Located at</b>
|
||||
<a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code">
|
||||
{$constant->fileName|relativePath}
|
||||
</a><br>
|
||||
</div>
|
||||
|
||||
{var $annotations = $constant->annotations}
|
||||
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Value summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="vars">
|
||||
<tr>
|
||||
<td class="name"><code>{$constant->typeHint|typeLinks:$constant|noescape}</code></td>
|
||||
<td class="value">{block|strip}
|
||||
{var $element = $template->resolveElement($constant->valueDefinition, $constant)}
|
||||
{if $element}<a href="{$element|constantUrl}">{$constant->valueDefinition}</a>{else}<code>{$constant->valueDefinition|highlightValue:$constant|noescape}</code>{/if}
|
||||
{/block}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
{else}
|
||||
<div class="alert alert-error">
|
||||
<p>
|
||||
Documentation of this constant could not be generated.
|
||||
</p>
|
||||
<p>
|
||||
Constant was originally declared in {$constant->fileName|relativePath} and is invalid because of:
|
||||
</p>
|
||||
<ul>
|
||||
<li n:foreach="$constant->reasons as $reason">Constant was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
|
@ -1,4 +0,0 @@
|
|||
{contentType javascript}
|
||||
|
||||
var ApiGen = ApiGen || {};
|
||||
ApiGen.elements = {$elements};
|
|
@ -1,94 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'function'}
|
||||
|
||||
{block title}{if $function->deprecated}Deprecated {/if}Function {$function->name}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content" class="function">
|
||||
<h1 n:class="$function->deprecated ? deprecated">Function {$function->shortName}</h1>
|
||||
|
||||
{if $function->valid}
|
||||
|
||||
<div class="description" n:if="$template->longDescription($function)">
|
||||
{$function|longDescription|noescape}
|
||||
</div>
|
||||
|
||||
<div class="alert alert-info">
|
||||
{if $function->inNamespace()}<b>Namespace:</b> {$function->namespaceName|namespaceLinks|noescape}<br>{/if}
|
||||
{if $function->inPackage()}<b>Package:</b> {$function->packageName|packageLinks|noescape}<br>{/if}
|
||||
{foreach $template->annotationSort($template->annotationFilter($function->annotations, array('param', 'return', 'throws'))) as $annotation => $values}
|
||||
{foreach $values as $value}
|
||||
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
|
||||
{$value|annotation:$annotation:$function|noescape}<br>
|
||||
{/foreach}
|
||||
{/foreach}
|
||||
<b>Located at</b>
|
||||
<a n:tag-if="$config->sourceCode" href="{$function|sourceUrl}" title="Go to source code">
|
||||
{$function->fileName|relativePath}
|
||||
</a><br>
|
||||
</div>
|
||||
|
||||
{var $annotations = $function->annotations}
|
||||
|
||||
{if count($function->parameters)}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Parameters summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="parameters">
|
||||
<tr n:foreach="$function->parameters as $parameter" id="${$parameter->name}">
|
||||
<td class="name"><code>{$parameter->typeHint|typeLinks:$function|noescape}</code></td>
|
||||
<td class="value"><code>{block|strip}
|
||||
<var>{if $parameter->passedByReference}& {/if}${$parameter->name}</var>{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$function|noescape}{elseif $parameter->unlimited},…{/if}
|
||||
{/block}</code></td>
|
||||
<td>{$parameter->description|description:$function}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($annotations['return']) && 'void' !== $annotations['return'][0]}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Return value summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="returns">
|
||||
<tr>
|
||||
<td class="name"><code>
|
||||
{$annotations['return'][0]|typeLinks:$function|noescape}
|
||||
</code></td>
|
||||
<td>
|
||||
{$annotations['return'][0]|description:$function|noescape}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if isset($annotations['throws'])}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Thrown exceptions summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="throws">
|
||||
<tr n:foreach="$annotations['throws'] as $throws">
|
||||
<td class="name"><code>
|
||||
{$throws|typeLinks:$function|noescape}
|
||||
</code></td>
|
||||
<td>
|
||||
{$throws|description:$function|noescape}
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{else}
|
||||
<div class="alert alert-error">
|
||||
<p>
|
||||
Documentation of this function could not be generated.
|
||||
</p>
|
||||
<p>
|
||||
Function was originally declared in {$function->fileName|relativePath} and is invalid because of:
|
||||
</p>
|
||||
<ul>
|
||||
<li n:foreach="$function->reasons as $reason">Function was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
|
||||
</ul>
|
||||
</div>
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
|
@ -1,841 +0,0 @@
|
|||
/*
|
||||
* jQuery Autocomplete plugin 1.2.3
|
||||
*
|
||||
* Copyright (c) 2009 Jörn Zaefferer
|
||||
*
|
||||
* Dual licensed under the MIT and GPL licenses:
|
||||
* http://www.opensource.org/licenses/mit-license.php
|
||||
* http://www.gnu.org/licenses/gpl.html
|
||||
*
|
||||
* With small modifications by Alfonso Gómez-Arzola.
|
||||
* See changelog for details.
|
||||
*
|
||||
*/
|
||||
|
||||
;(function($) {
|
||||
'use strict';
|
||||
$.fn.extend({
|
||||
autocomplete: function(urlOrData, options) {
|
||||
var isUrl = typeof urlOrData == "string";
|
||||
options = $.extend({}, $.Autocompleter.defaults, {
|
||||
url: isUrl ? urlOrData : null,
|
||||
data: isUrl ? null : urlOrData,
|
||||
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
|
||||
max: options && !options.scroll ? 10 : 150,
|
||||
noRecord: "No Records."
|
||||
}, options);
|
||||
|
||||
// if highlight is set to false, replace it with a do-nothing function
|
||||
options.highlight = options.highlight || function(value) { return value; };
|
||||
|
||||
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
|
||||
options.formatMatch = options.formatMatch || options.formatItem;
|
||||
|
||||
return this.each(function() {
|
||||
new $.Autocompleter(this, options);
|
||||
});
|
||||
},
|
||||
result: function(handler) {
|
||||
return this.bind("result", handler);
|
||||
},
|
||||
search: function(handler) {
|
||||
return this.trigger("search", [handler]);
|
||||
},
|
||||
flushCache: function() {
|
||||
return this.trigger("flushCache");
|
||||
},
|
||||
setOptions: function(options){
|
||||
return this.trigger("setOptions", [options]);
|
||||
},
|
||||
unautocomplete: function() {
|
||||
return this.trigger("unautocomplete");
|
||||
}
|
||||
});
|
||||
|
||||
$.Autocompleter = function(input, options) {
|
||||
|
||||
var KEY = {
|
||||
UP: 38,
|
||||
DOWN: 40,
|
||||
DEL: 46,
|
||||
TAB: 9,
|
||||
RETURN: 13,
|
||||
ESC: 27,
|
||||
COMMA: 188,
|
||||
PAGEUP: 33,
|
||||
PAGEDOWN: 34,
|
||||
BACKSPACE: 8
|
||||
};
|
||||
|
||||
var globalFailure = null;
|
||||
if(options.failure != null && typeof options.failure == "function") {
|
||||
globalFailure = options.failure;
|
||||
}
|
||||
|
||||
// Create $ object for input element
|
||||
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
|
||||
|
||||
var timeout;
|
||||
var previousValue = "";
|
||||
var cache = $.Autocompleter.Cache(options);
|
||||
var hasFocus = 0;
|
||||
var lastKeyPressCode;
|
||||
var config = {
|
||||
mouseDownOnSelect: false
|
||||
};
|
||||
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
|
||||
|
||||
var blockSubmit;
|
||||
|
||||
// prevent form submit in opera when selecting with return key
|
||||
navigator.userAgent.indexOf("Opera") != -1 && $(input.form).bind("submit.autocomplete", function() {
|
||||
if (blockSubmit) {
|
||||
blockSubmit = false;
|
||||
return false;
|
||||
}
|
||||
});
|
||||
|
||||
// older versions of opera don't trigger keydown multiple times while pressed, others don't work with keypress at all
|
||||
$input.bind((navigator.userAgent.indexOf("Opera") != -1 && !'KeyboardEvent' in window ? "keypress" : "keydown") + ".autocomplete", function(event) {
|
||||
// a keypress means the input has focus
|
||||
// avoids issue where input had focus before the autocomplete was applied
|
||||
hasFocus = 1;
|
||||
// track last key pressed
|
||||
lastKeyPressCode = event.keyCode;
|
||||
switch(event.keyCode) {
|
||||
|
||||
case KEY.UP:
|
||||
if ( select.visible() ) {
|
||||
event.preventDefault();
|
||||
select.prev();
|
||||
} else {
|
||||
onChange(0, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY.DOWN:
|
||||
if ( select.visible() ) {
|
||||
event.preventDefault();
|
||||
select.next();
|
||||
} else {
|
||||
onChange(0, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY.PAGEUP:
|
||||
if ( select.visible() ) {
|
||||
event.preventDefault();
|
||||
select.pageUp();
|
||||
} else {
|
||||
onChange(0, true);
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY.PAGEDOWN:
|
||||
if ( select.visible() ) {
|
||||
event.preventDefault();
|
||||
select.pageDown();
|
||||
} else {
|
||||
onChange(0, true);
|
||||
}
|
||||
break;
|
||||
|
||||
// matches also semicolon
|
||||
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
|
||||
case KEY.TAB:
|
||||
case KEY.RETURN:
|
||||
if( selectCurrent() ) {
|
||||
// stop default to prevent a form submit, Opera needs special handling
|
||||
event.preventDefault();
|
||||
blockSubmit = true;
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
|
||||
case KEY.ESC:
|
||||
select.hide();
|
||||
break;
|
||||
|
||||
default:
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(onChange, options.delay);
|
||||
break;
|
||||
}
|
||||
}).focus(function(){
|
||||
// track whether the field has focus, we shouldn't process any
|
||||
// results if the field no longer has focus
|
||||
hasFocus++;
|
||||
}).blur(function() {
|
||||
hasFocus = 0;
|
||||
if (!config.mouseDownOnSelect) {
|
||||
hideResults();
|
||||
}
|
||||
}).click(function() {
|
||||
// show select when clicking in a focused field
|
||||
// but if clickFire is true, don't require field
|
||||
// to be focused to begin with; just show select
|
||||
if( options.clickFire ) {
|
||||
if ( !select.visible() ) {
|
||||
onChange(0, true);
|
||||
}
|
||||
} else {
|
||||
if ( hasFocus++ > 1 && !select.visible() ) {
|
||||
onChange(0, true);
|
||||
}
|
||||
}
|
||||
}).bind("search", function() {
|
||||
var fn = (arguments.length > 1) ? arguments[1] : null;
|
||||
function findValueCallback(q, data) {
|
||||
var result;
|
||||
if( data && data.length ) {
|
||||
for (var i=0; i < data.length; i++) {
|
||||
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
|
||||
result = data[i];
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
if( typeof fn == "function" ) fn(result);
|
||||
else $input.trigger("result", result && [result.data, result.value]);
|
||||
}
|
||||
$.each(trimWords($input.val()), function(i, value) {
|
||||
request(value, findValueCallback, findValueCallback);
|
||||
});
|
||||
}).bind("flushCache", function() {
|
||||
cache.flush();
|
||||
}).bind("setOptions", function() {
|
||||
$.extend(true, options, arguments[1]);
|
||||
// if we've updated the data, repopulate
|
||||
if ( "data" in arguments[1] )
|
||||
cache.populate();
|
||||
}).bind("unautocomplete", function() {
|
||||
select.unbind();
|
||||
$input.unbind();
|
||||
$(input.form).unbind(".autocomplete");
|
||||
});
|
||||
|
||||
|
||||
function selectCurrent() {
|
||||
var selected = select.selected();
|
||||
if( !selected )
|
||||
return false;
|
||||
|
||||
var v = selected.result;
|
||||
previousValue = v;
|
||||
|
||||
if ( options.multiple ) {
|
||||
var words = trimWords($input.val());
|
||||
if ( words.length > 1 ) {
|
||||
var seperator = options.multipleSeparator.length;
|
||||
var cursorAt = $(input).selection().start;
|
||||
var wordAt, progress = 0;
|
||||
$.each(words, function(i, word) {
|
||||
progress += word.length;
|
||||
if (cursorAt <= progress) {
|
||||
wordAt = i;
|
||||
return false;
|
||||
}
|
||||
progress += seperator;
|
||||
});
|
||||
words[wordAt] = v;
|
||||
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
|
||||
v = words.join( options.multipleSeparator );
|
||||
}
|
||||
v += options.multipleSeparator;
|
||||
}
|
||||
|
||||
$input.val(v);
|
||||
hideResultsNow();
|
||||
$input.trigger("result", [selected.data, selected.value]);
|
||||
return true;
|
||||
}
|
||||
|
||||
function onChange(crap, skipPrevCheck) {
|
||||
if( lastKeyPressCode == KEY.DEL ) {
|
||||
select.hide();
|
||||
return;
|
||||
}
|
||||
|
||||
var currentValue = $input.val();
|
||||
|
||||
if ( !skipPrevCheck && currentValue == previousValue )
|
||||
return;
|
||||
|
||||
previousValue = currentValue;
|
||||
|
||||
currentValue = lastWord(currentValue);
|
||||
if ( currentValue.length >= options.minChars) {
|
||||
$input.addClass(options.loadingClass);
|
||||
if (!options.matchCase)
|
||||
currentValue = currentValue.toLowerCase();
|
||||
request(currentValue, receiveData, hideResultsNow);
|
||||
} else {
|
||||
stopLoading();
|
||||
select.hide();
|
||||
}
|
||||
};
|
||||
|
||||
function trimWords(value) {
|
||||
if (!value)
|
||||
return [""];
|
||||
if (!options.multiple)
|
||||
return [$.trim(value)];
|
||||
return $.map(value.split(options.multipleSeparator), function(word) {
|
||||
return $.trim(value).length ? $.trim(word) : null;
|
||||
});
|
||||
}
|
||||
|
||||
function lastWord(value) {
|
||||
if ( !options.multiple )
|
||||
return value;
|
||||
var words = trimWords(value);
|
||||
if (words.length == 1)
|
||||
return words[0];
|
||||
var cursorAt = $(input).selection().start;
|
||||
if (cursorAt == value.length) {
|
||||
words = trimWords(value)
|
||||
} else {
|
||||
words = trimWords(value.replace(value.substring(cursorAt), ""));
|
||||
}
|
||||
return words[words.length - 1];
|
||||
}
|
||||
|
||||
// fills in the input box w/the first match (assumed to be the best match)
|
||||
// q: the term entered
|
||||
// sValue: the first matching result
|
||||
function autoFill(q, sValue){
|
||||
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
|
||||
// if the last user key pressed was backspace, don't autofill
|
||||
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
|
||||
// fill in the value (keep the case the user has typed)
|
||||
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
|
||||
// select the portion of the value not typed by the user (so the next character will erase)
|
||||
$(input).selection(previousValue.length, previousValue.length + sValue.length);
|
||||
}
|
||||
};
|
||||
|
||||
function hideResults() {
|
||||
clearTimeout(timeout);
|
||||
timeout = setTimeout(hideResultsNow, 200);
|
||||
};
|
||||
|
||||
function hideResultsNow() {
|
||||
var wasVisible = select.visible();
|
||||
select.hide();
|
||||
clearTimeout(timeout);
|
||||
stopLoading();
|
||||
if (options.mustMatch) {
|
||||
// call search and run callback
|
||||
$input.search(
|
||||
function (result){
|
||||
// if no value found, clear the input box
|
||||
if( !result ) {
|
||||
if (options.multiple) {
|
||||
var words = trimWords($input.val()).slice(0, -1);
|
||||
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
|
||||
}
|
||||
else {
|
||||
$input.val( "" );
|
||||
$input.trigger("result", null);
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
};
|
||||
|
||||
function receiveData(q, data) {
|
||||
if ( data && data.length && hasFocus ) {
|
||||
stopLoading();
|
||||
select.display(data, q);
|
||||
autoFill(q, data[0].value);
|
||||
select.show();
|
||||
} else {
|
||||
hideResultsNow();
|
||||
}
|
||||
};
|
||||
|
||||
function request(term, success, failure) {
|
||||
if (!options.matchCase)
|
||||
term = term.toLowerCase();
|
||||
var data = cache.load(term);
|
||||
// recieve the cached data
|
||||
if (data) {
|
||||
if(data.length) {
|
||||
success(term, data);
|
||||
}
|
||||
else{
|
||||
var parsed = options.parse && options.parse(options.noRecord) || parse(options.noRecord);
|
||||
success(term,parsed);
|
||||
}
|
||||
// if an AJAX url has been supplied, try loading the data now
|
||||
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
|
||||
|
||||
var extraParams = {
|
||||
timestamp: +new Date()
|
||||
};
|
||||
$.each(options.extraParams, function(key, param) {
|
||||
extraParams[key] = typeof param == "function" ? param() : param;
|
||||
});
|
||||
|
||||
$.ajax({
|
||||
// try to leverage ajaxQueue plugin to abort previous requests
|
||||
mode: "abort",
|
||||
// limit abortion to this input
|
||||
port: "autocomplete" + input.name,
|
||||
dataType: options.dataType,
|
||||
url: options.url,
|
||||
data: $.extend({
|
||||
q: lastWord(term),
|
||||
limit: options.max
|
||||
}, extraParams),
|
||||
success: function(data) {
|
||||
var parsed = options.parse && options.parse(data) || parse(data);
|
||||
cache.add(term, parsed);
|
||||
success(term, parsed);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
|
||||
select.emptyList();
|
||||
if(globalFailure != null) {
|
||||
globalFailure();
|
||||
}
|
||||
else {
|
||||
failure(term);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function parse(data) {
|
||||
var parsed = [];
|
||||
var rows = data.split("\n");
|
||||
for (var i=0; i < rows.length; i++) {
|
||||
var row = $.trim(rows[i]);
|
||||
if (row) {
|
||||
row = row.split("|");
|
||||
parsed[parsed.length] = {
|
||||
data: row,
|
||||
value: row[0],
|
||||
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
|
||||
};
|
||||
}
|
||||
}
|
||||
return parsed;
|
||||
};
|
||||
|
||||
function stopLoading() {
|
||||
$input.removeClass(options.loadingClass);
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
$.Autocompleter.defaults = {
|
||||
inputClass: "ac_input",
|
||||
resultsClass: "ac_results",
|
||||
loadingClass: "ac_loading",
|
||||
minChars: 1,
|
||||
delay: 400,
|
||||
matchCase: false,
|
||||
matchSubset: true,
|
||||
matchContains: false,
|
||||
cacheLength: 100,
|
||||
max: 1000,
|
||||
mustMatch: false,
|
||||
extraParams: {},
|
||||
selectFirst: true,
|
||||
formatItem: function(row) { return row[0]; },
|
||||
formatMatch: null,
|
||||
autoFill: false,
|
||||
width: 0,
|
||||
multiple: false,
|
||||
multipleSeparator: " ",
|
||||
inputFocus: true,
|
||||
clickFire: false,
|
||||
highlight: function(value, term) {
|
||||
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
|
||||
},
|
||||
scroll: true,
|
||||
scrollHeight: 180,
|
||||
scrollJumpPosition: true
|
||||
};
|
||||
|
||||
$.Autocompleter.Cache = function(options) {
|
||||
|
||||
var data = {};
|
||||
var length = 0;
|
||||
|
||||
function matchSubset(s, sub) {
|
||||
return (new RegExp(sub.toUpperCase().replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").replace(/[A-Z0-9]/g, function(m, offset) {
|
||||
return offset === 0 ? '(?:' + m + '|^' + m.toLowerCase() + ')' : '(?:.*' + m + '|' + m.toLowerCase() + ')';
|
||||
}))).test(s); // find by initials
|
||||
};
|
||||
|
||||
function add(q, value) {
|
||||
if (length > options.cacheLength){
|
||||
flush();
|
||||
}
|
||||
if (!data[q]){
|
||||
length++;
|
||||
}
|
||||
data[q] = value;
|
||||
}
|
||||
|
||||
function populate(){
|
||||
if( !options.data ) return false;
|
||||
// track the matches
|
||||
var stMatchSets = {},
|
||||
nullData = 0;
|
||||
|
||||
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
|
||||
if( !options.url ) options.cacheLength = 1;
|
||||
|
||||
// track all options for minChars = 0
|
||||
stMatchSets[""] = [];
|
||||
|
||||
// loop through the array and create a lookup structure
|
||||
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
|
||||
var rawValue = options.data[i];
|
||||
// if rawValue is a string, make an array otherwise just reference the array
|
||||
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
|
||||
|
||||
var value = options.formatMatch(rawValue, i+1, options.data.length);
|
||||
if ( typeof(value) === 'undefined' || value === false )
|
||||
continue;
|
||||
|
||||
var firstChar = value.charAt(0).toLowerCase();
|
||||
// if no lookup array for this character exists, look it up now
|
||||
if( !stMatchSets[firstChar] )
|
||||
stMatchSets[firstChar] = [];
|
||||
|
||||
// if the match is a string
|
||||
var row = {
|
||||
value: value,
|
||||
data: rawValue,
|
||||
result: options.formatResult && options.formatResult(rawValue) || value
|
||||
};
|
||||
|
||||
// push the current match into the set list
|
||||
stMatchSets[firstChar].push(row);
|
||||
|
||||
// keep track of minChars zero items
|
||||
if ( nullData++ < options.max ) {
|
||||
stMatchSets[""].push(row);
|
||||
}
|
||||
};
|
||||
|
||||
// add the data items to the cache
|
||||
$.each(stMatchSets, function(i, value) {
|
||||
// increase the cache size
|
||||
options.cacheLength++;
|
||||
// add to the cache
|
||||
add(i, value);
|
||||
});
|
||||
}
|
||||
|
||||
// populate any existing data
|
||||
setTimeout(populate, 25);
|
||||
|
||||
function flush(){
|
||||
data = {};
|
||||
length = 0;
|
||||
}
|
||||
|
||||
return {
|
||||
flush: flush,
|
||||
add: add,
|
||||
populate: populate,
|
||||
load: function(q) {
|
||||
if (!options.cacheLength || !length)
|
||||
return null;
|
||||
/*
|
||||
* if dealing w/local data and matchContains than we must make sure
|
||||
* to loop through all the data collections looking for matches
|
||||
*/
|
||||
if( !options.url && options.matchContains ){
|
||||
// track all matches
|
||||
var csub = [];
|
||||
// loop through all the data grids for matches
|
||||
for( var k in data ){
|
||||
// don't search through the stMatchSets[""] (minChars: 0) cache
|
||||
// this prevents duplicates
|
||||
if( k.length > 0 ){
|
||||
var c = data[k];
|
||||
$.each(c, function(i, x) {
|
||||
// if we've got a match, add it to the array
|
||||
if (matchSubset(x.value, q)) {
|
||||
csub.push(x);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
return csub;
|
||||
} else
|
||||
// if the exact item exists, use it
|
||||
if (data[q]){
|
||||
return data[q];
|
||||
} else
|
||||
if (options.matchSubset) {
|
||||
for (var i = q.length - 1; i >= options.minChars; i--) {
|
||||
var c = data[q.substr(0, i)];
|
||||
if (c) {
|
||||
var csub = [];
|
||||
$.each(c, function(i, x) {
|
||||
if (matchSubset(x.value, q)) {
|
||||
csub[csub.length] = x;
|
||||
}
|
||||
});
|
||||
return csub;
|
||||
}
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
$.Autocompleter.Select = function (options, input, select, config) {
|
||||
var CLASSES = {
|
||||
ACTIVE: "ac_over"
|
||||
};
|
||||
|
||||
var listItems,
|
||||
active = -1,
|
||||
data,
|
||||
term = "",
|
||||
needsInit = true,
|
||||
element,
|
||||
list;
|
||||
|
||||
// Create results
|
||||
function init() {
|
||||
if (!needsInit)
|
||||
return;
|
||||
element = $("<div/>")
|
||||
.hide()
|
||||
.addClass(options.resultsClass)
|
||||
.css("position", "absolute")
|
||||
.appendTo(document.body)
|
||||
.hover(function(event) {
|
||||
// Browsers except FF do not fire mouseup event on scrollbars, resulting in mouseDownOnSelect remaining true, and results list not always hiding.
|
||||
if($(this).is(":visible")) {
|
||||
input.focus();
|
||||
}
|
||||
config.mouseDownOnSelect = false;
|
||||
});
|
||||
|
||||
list = $("<ul/>").appendTo(element).mouseover( function(event) {
|
||||
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
|
||||
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
|
||||
$(target(event)).addClass(CLASSES.ACTIVE);
|
||||
}
|
||||
}).click(function(event) {
|
||||
$(target(event)).addClass(CLASSES.ACTIVE);
|
||||
select();
|
||||
if( options.inputFocus )
|
||||
input.focus();
|
||||
return false;
|
||||
}).mousedown(function() {
|
||||
config.mouseDownOnSelect = true;
|
||||
}).mouseup(function() {
|
||||
config.mouseDownOnSelect = false;
|
||||
});
|
||||
|
||||
if( options.width > 0 )
|
||||
element.css("width", options.width);
|
||||
|
||||
needsInit = false;
|
||||
}
|
||||
|
||||
function target(event) {
|
||||
var element = event.target;
|
||||
while(element && element.tagName != "LI")
|
||||
element = element.parentNode;
|
||||
// more fun with IE, sometimes event.target is empty, just ignore it then
|
||||
if(!element)
|
||||
return [];
|
||||
return element;
|
||||
}
|
||||
|
||||
function moveSelect(step) {
|
||||
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
|
||||
movePosition(step);
|
||||
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
|
||||
if(options.scroll) {
|
||||
var offset = 0;
|
||||
listItems.slice(0, active).each(function() {
|
||||
offset += this.offsetHeight;
|
||||
});
|
||||
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
|
||||
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
|
||||
} else if(offset < list.scrollTop()) {
|
||||
list.scrollTop(offset);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
function movePosition(step) {
|
||||
if (options.scrollJumpPosition || (!options.scrollJumpPosition && !((step < 0 && active == 0) || (step > 0 && active == listItems.length - 1)) )) {
|
||||
active += step;
|
||||
if (active < 0) {
|
||||
active = listItems.length - 1;
|
||||
} else if (active >= listItems.length) {
|
||||
active = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function limitNumberOfItems(available) {
|
||||
return options.max && options.max < available
|
||||
? options.max
|
||||
: available;
|
||||
}
|
||||
|
||||
function fillList() {
|
||||
list.empty();
|
||||
var max = limitNumberOfItems(data.length);
|
||||
for (var i=0; i < max; i++) {
|
||||
if (!data[i])
|
||||
continue;
|
||||
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
|
||||
if ( formatted === false )
|
||||
continue;
|
||||
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
|
||||
$.data(li, "ac_data", data[i]);
|
||||
}
|
||||
listItems = list.find("li");
|
||||
if ( options.selectFirst ) {
|
||||
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
|
||||
active = 0;
|
||||
}
|
||||
// apply bgiframe if available
|
||||
if ( $.fn.bgiframe )
|
||||
list.bgiframe();
|
||||
}
|
||||
|
||||
return {
|
||||
display: function(d, q) {
|
||||
init();
|
||||
data = d;
|
||||
term = q;
|
||||
fillList();
|
||||
},
|
||||
next: function() {
|
||||
moveSelect(1);
|
||||
},
|
||||
prev: function() {
|
||||
moveSelect(-1);
|
||||
},
|
||||
pageUp: function() {
|
||||
if (active != 0 && active - 8 < 0) {
|
||||
moveSelect( -active );
|
||||
} else {
|
||||
moveSelect(-8);
|
||||
}
|
||||
},
|
||||
pageDown: function() {
|
||||
if (active != listItems.length - 1 && active + 8 > listItems.length) {
|
||||
moveSelect( listItems.length - 1 - active );
|
||||
} else {
|
||||
moveSelect(8);
|
||||
}
|
||||
},
|
||||
hide: function() {
|
||||
element && element.hide();
|
||||
listItems && listItems.removeClass(CLASSES.ACTIVE);
|
||||
active = -1;
|
||||
},
|
||||
visible : function() {
|
||||
return element && element.is(":visible");
|
||||
},
|
||||
current: function() {
|
||||
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
|
||||
},
|
||||
show: function() {
|
||||
var offset = $(input).offset();
|
||||
element.css({
|
||||
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
|
||||
top: offset.top + input.offsetHeight,
|
||||
left: offset.left
|
||||
}).show();
|
||||
if(options.scroll) {
|
||||
list.scrollTop(0);
|
||||
list.css({
|
||||
maxHeight: options.scrollHeight,
|
||||
overflow: 'auto'
|
||||
});
|
||||
|
||||
if(navigator.userAgent.indexOf("MSIE") != -1 && typeof document.body.style.maxHeight === "undefined") {
|
||||
var listHeight = 0;
|
||||
listItems.each(function() {
|
||||
listHeight += this.offsetHeight;
|
||||
});
|
||||
var scrollbarsVisible = listHeight > options.scrollHeight;
|
||||
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
|
||||
if (!scrollbarsVisible) {
|
||||
// IE doesn't recalculate width when scrollbar disappears
|
||||
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
selected: function() {
|
||||
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
|
||||
return selected && selected.length && $.data(selected[0], "ac_data");
|
||||
},
|
||||
emptyList: function (){
|
||||
list && list.empty();
|
||||
},
|
||||
unbind: function() {
|
||||
element && element.remove();
|
||||
}
|
||||
};
|
||||
};
|
||||
|
||||
$.fn.selection = function(start, end) {
|
||||
if (start !== undefined) {
|
||||
return this.each(function() {
|
||||
if( this.createTextRange ){
|
||||
var selRange = this.createTextRange();
|
||||
if (end === undefined || start == end) {
|
||||
selRange.move("character", start);
|
||||
selRange.select();
|
||||
} else {
|
||||
selRange.collapse(true);
|
||||
selRange.moveStart("character", start);
|
||||
selRange.moveEnd("character", end);
|
||||
selRange.select();
|
||||
}
|
||||
} else if( this.setSelectionRange ){
|
||||
this.setSelectionRange(start, end);
|
||||
} else if( this.selectionStart ){
|
||||
this.selectionStart = start;
|
||||
this.selectionEnd = end;
|
||||
}
|
||||
});
|
||||
}
|
||||
var field = this[0];
|
||||
if ( field.createTextRange ) {
|
||||
var range = document.selection.createRange(),
|
||||
orig = field.value,
|
||||
teststring = "<->",
|
||||
textLength = range.text.length;
|
||||
range.text = teststring;
|
||||
var caretAt = field.value.indexOf(teststring);
|
||||
field.value = orig;
|
||||
this.selection(caretAt, caretAt + textLength);
|
||||
return {
|
||||
start: caretAt,
|
||||
end: caretAt + textLength
|
||||
}
|
||||
} else if( field.selectionStart !== undefined ){
|
||||
return {
|
||||
start: field.selectionStart,
|
||||
end: field.selectionEnd
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
})(jQuery);
|
|
@ -1,114 +0,0 @@
|
|||
/*!
|
||||
* jQuery Cookie Plugin v1.4.1
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2006, 2014 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD (Register as an anonymous module)
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// Node/CommonJS
|
||||
module.exports = factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluses = /\+/g;
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s);
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s);
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
// This is a quoted cookie as according to RFC2068, unescape...
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||
}
|
||||
|
||||
try {
|
||||
// Replace server-side written pluses with spaces.
|
||||
// If we can't decode the cookie, ignore it, it's unusable.
|
||||
// If we can't parse the cookie, ignore it, it's unusable.
|
||||
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||
return config.json ? JSON.parse(s) : s;
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s);
|
||||
return $.isFunction(converter) ? converter(value) : value;
|
||||
}
|
||||
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
|
||||
// Write
|
||||
|
||||
if (arguments.length > 1 && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encode(key), '=', stringifyCookieValue(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// Read
|
||||
|
||||
var result = key ? undefined : {},
|
||||
// To prevent the for loop in the first place assign an empty array
|
||||
// in case there are no cookies at all. Also prevents odd result when
|
||||
// calling $.cookie().
|
||||
cookies = document.cookie ? document.cookie.split('; ') : [],
|
||||
i = 0,
|
||||
l = cookies.length;
|
||||
|
||||
for (; i < l; i++) {
|
||||
var parts = cookies[i].split('='),
|
||||
name = decode(parts.shift()),
|
||||
cookie = parts.join('=');
|
||||
|
||||
if (key === name) {
|
||||
// If second argument (value) is a function it's a converter...
|
||||
result = read(cookie, value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent storing a cookie that we couldn't decode.
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
config.defaults = {};
|
||||
|
||||
$.removeCookie = function (key, options) {
|
||||
// Must not alter options, thus extending a fresh object...
|
||||
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||
return !$.cookie(key);
|
||||
};
|
||||
|
||||
}));
|
|
@ -1,69 +0,0 @@
|
|||
/**
|
||||
* jQuery.fn.sortElements
|
||||
* --------------
|
||||
* @author James Padolsey (http://james.padolsey.com)
|
||||
* @version 0.11
|
||||
* @updated 18-MAR-2010
|
||||
* --------------
|
||||
* @param Function comparator:
|
||||
* Exactly the same behaviour as [1,2,3].sort(comparator)
|
||||
*
|
||||
* @param Function getSortable
|
||||
* A function that should return the element that is
|
||||
* to be sorted. The comparator will run on the
|
||||
* current collection, but you may want the actual
|
||||
* resulting sort to occur on a parent or another
|
||||
* associated element.
|
||||
*
|
||||
* E.g. $('td').sortElements(comparator, function(){
|
||||
* return this.parentNode;
|
||||
* })
|
||||
*
|
||||
* The <td>'s parent (<tr>) will be sorted instead
|
||||
* of the <td> itself.
|
||||
*/
|
||||
jQuery.fn.sortElements = (function(){
|
||||
|
||||
var sort = [].sort;
|
||||
|
||||
return function(comparator, getSortable) {
|
||||
|
||||
getSortable = getSortable || function(){return this;};
|
||||
|
||||
var placements = this.map(function(){
|
||||
|
||||
var sortElement = getSortable.call(this),
|
||||
parentNode = sortElement.parentNode,
|
||||
|
||||
// Since the element itself will change position, we have
|
||||
// to have some way of storing it's original position in
|
||||
// the DOM. The easiest way is to have a 'flag' node:
|
||||
nextSibling = parentNode.insertBefore(
|
||||
document.createTextNode(''),
|
||||
sortElement.nextSibling
|
||||
);
|
||||
|
||||
return function() {
|
||||
|
||||
if (parentNode === this) {
|
||||
throw new Error(
|
||||
"You can't sort elements if any one is a descendant of another."
|
||||
);
|
||||
}
|
||||
|
||||
// Insert before flag:
|
||||
parentNode.insertBefore(this, nextSibling);
|
||||
// Remove flag:
|
||||
parentNode.removeChild(nextSibling);
|
||||
|
||||
};
|
||||
|
||||
});
|
||||
|
||||
return sort.call(this, comparator).each(function(i){
|
||||
placements[i].call(getSortable.call(this));
|
||||
});
|
||||
|
||||
};
|
||||
|
||||
})();
|
|
@ -1,8 +0,0 @@
|
|||
/*!
|
||||
* sprintf and vsprintf for jQuery
|
||||
* somewhat based on http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/
|
||||
* Copyright (c) 2008 Sabin Iacob (m0n5t3r) <iacobs@m0n5t3r.info>
|
||||
* @license http://www.gnu.org/licenses/gpl.html
|
||||
* @project jquery.sprintf
|
||||
*/
|
||||
(function(d){var a={b:function(e){return parseInt(e,10).toString(2)},c:function(e){return String.fromCharCode(parseInt(e,10))},d:function(e){return parseInt(e,10)},u:function(e){return Math.abs(e)},f:function(f,e){e=parseInt(e,10);f=parseFloat(f);if(isNaN(e&&f)){return NaN}return e&&f.toFixed(e)||f},o:function(e){return parseInt(e,10).toString(8)},s:function(e){return e},x:function(e){return(""+parseInt(e,10).toString(16)).toLowerCase()},X:function(e){return(""+parseInt(e,10).toString(16)).toUpperCase()}};var c=/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g;var b=function(f){if(f.length==1&&typeof f[0]=="object"){f=f[0];return function(i,h,k,j,g,m,l){return a[g](f[j])}}else{var e=0;return function(i,h,k,j,g,m,l){if(g=="%"){return"%"}return a[g](f[e++],k)}}};d.extend({sprintf:function(f){var e=Array.apply(null,arguments).slice(1);return f.replace(c,b(e))},vsprintf:function(f,e){return f.replace(c,b(e))}})})(jQuery);
|
|
@ -1,308 +0,0 @@
|
|||
$(window).load(function() {
|
||||
var $document = $(document);
|
||||
var $navigation = $('#navigation');
|
||||
var navigationHeight = $navigation.height();
|
||||
var $left = $('#left');
|
||||
var $right = $('#right');
|
||||
var $rightInner = $('#rightInner');
|
||||
var $splitter = $('#splitter');
|
||||
var $groups = $('#groups');
|
||||
var $content = $('#content');
|
||||
|
||||
// Menu
|
||||
|
||||
// Hide deep packages and namespaces
|
||||
$('ul span', $groups).click(function(event) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
$(this)
|
||||
.toggleClass('collapsed')
|
||||
.parent()
|
||||
.next('ul')
|
||||
.toggleClass('collapsed');
|
||||
}).click();
|
||||
|
||||
$active = $('ul li.active', $groups);
|
||||
if ($active.length > 0) {
|
||||
// Open active
|
||||
$('> a > span', $active).click();
|
||||
} else {
|
||||
$main = $('> ul > li.main', $groups);
|
||||
if ($main.length > 0) {
|
||||
// Open first level of the main project
|
||||
$('> a > span', $main).click();
|
||||
} else {
|
||||
// Open first level of all
|
||||
$('> ul > li > a > span', $groups).click();
|
||||
}
|
||||
}
|
||||
|
||||
// Content
|
||||
|
||||
// Search autocompletion
|
||||
var autocompleteFound = false;
|
||||
var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'};
|
||||
var $search = $('#search input[name=q]');
|
||||
$search
|
||||
.autocomplete(ApiGen.elements, {
|
||||
matchContains: true,
|
||||
scrollHeight: 200,
|
||||
max: 20,
|
||||
width: 300,
|
||||
noRecord: '',
|
||||
highlight: function(value, term) {
|
||||
var term = term.toUpperCase().replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").replace(/[A-Z0-9]/g, function(m, offset) {
|
||||
return offset === 0 ? '(?:' + m + '|^' + m.toLowerCase() + ')' : '(?:(?:[^<>]|<[^<>]*>)*' + m + '|' + m.toLowerCase() + ')';
|
||||
});
|
||||
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)"), "<strong>$1</strong>");
|
||||
},
|
||||
formatItem: function(data) {
|
||||
return data.length > 1 ? data[1].replace(/^(.+\\)(.+)$/, '<span><small>$1</small>$2</span>') : data[0];
|
||||
},
|
||||
formatMatch: function(data) {
|
||||
return data[1];
|
||||
},
|
||||
formatResult: function(data) {
|
||||
return data[1];
|
||||
},
|
||||
show: function($list) {
|
||||
var $items = $('li span', $list);
|
||||
var maxWidth = Math.max.apply(null, $items.map(function() {
|
||||
return $(this).width();
|
||||
}));
|
||||
// 10px padding
|
||||
$list.width(Math.max(maxWidth + 10, $search.innerWidth()));
|
||||
}
|
||||
}).result(function(event, data) {
|
||||
autocompleteFound = true;
|
||||
var location = window.location.href.split('/');
|
||||
location.pop();
|
||||
var parts = data[1].split(/::|$/);
|
||||
var file = $.sprintf(ApiGen.config.templates[autocompleteFiles[data[0]]].filename, parts[0].replace(/\(\)/, '').replace(/[^\w]/g, '.'));
|
||||
if (parts[1]) {
|
||||
file += '#' + ('mm' === data[0] || 'mp' === data[0] ? 'm' : '') + parts[1].replace(/([\w]+)\(\)/, '_$1');
|
||||
}
|
||||
location.push(file);
|
||||
window.location = location.join('/');
|
||||
|
||||
// Workaround for Opera bug
|
||||
$(this).closest('form').attr('action', location.join('/'));
|
||||
}).closest('form')
|
||||
.submit(function() {
|
||||
var query = $search.val();
|
||||
if ('' === query) {
|
||||
return false;
|
||||
}
|
||||
return !autocompleteFound && '' !== $('#search input[name=cx]').val();
|
||||
});
|
||||
|
||||
// Save natural order
|
||||
$('table.summary tr[data-order]', $content).each(function(index) {
|
||||
do {
|
||||
index = '0' + index;
|
||||
} while (index.length < 3);
|
||||
$(this).attr('data-order-natural', index);
|
||||
});
|
||||
|
||||
// Switch between natural and alphabetical order
|
||||
var $caption = $('table.summary', $content)
|
||||
.filter(':has(tr[data-order])')
|
||||
.prev('h2');
|
||||
$caption
|
||||
.click(function() {
|
||||
var $this = $(this);
|
||||
var order = $this.data('order') || 'natural';
|
||||
order = 'natural' === order ? 'alphabetical' : 'natural';
|
||||
$this.data('order', order);
|
||||
$.cookie('order', order, {expires: 365});
|
||||
var attr = 'alphabetical' === order ? 'data-order' : 'data-order-natural';
|
||||
$this
|
||||
.next('table')
|
||||
.find('tr').sortElements(function(a, b) {
|
||||
return $(a).attr(attr) > $(b).attr(attr) ? 1 : -1;
|
||||
});
|
||||
return false;
|
||||
})
|
||||
.addClass('switchable')
|
||||
.attr('title', 'Switch between natural and alphabetical order');
|
||||
if ((null === $.cookie('order') && 'alphabetical' === ApiGen.config.options.elementsOrder) || 'alphabetical' === $.cookie('order')) {
|
||||
$caption.click();
|
||||
}
|
||||
|
||||
// Open details
|
||||
if (ApiGen.config.options.elementDetailsCollapsed) {
|
||||
$(document.body).on('click', 'tr', function(ev) {
|
||||
|
||||
var short = this.querySelector('.short')
|
||||
, detailed = this.querySelector('.detailed')
|
||||
|
||||
if (!short || !detailed) return
|
||||
|
||||
$(short).toggleClass('hidden')
|
||||
$(detailed).toggleClass('hidden')
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
// Splitter
|
||||
var splitterWidth = $splitter.width();
|
||||
var splitterPosition = $.cookie('splitter') ? parseInt($.cookie('splitter')) : null;
|
||||
var splitterPositionBackup = $.cookie('splitterBackup') ? parseInt($.cookie('splitterBackup')) : null;
|
||||
function setSplitterPosition(position)
|
||||
{
|
||||
splitterPosition = position;
|
||||
|
||||
$left.width(position);
|
||||
$right.css('margin-left', position + splitterWidth);
|
||||
$splitter.css('left', position);
|
||||
}
|
||||
function setNavigationPosition()
|
||||
{
|
||||
var height = $(window).height() - navigationHeight;
|
||||
$left.height(height);
|
||||
$splitter.height(height);
|
||||
$right.height(height);
|
||||
}
|
||||
function setContentWidth()
|
||||
{
|
||||
var width = $rightInner.width();
|
||||
$rightInner
|
||||
.toggleClass('medium', width <= 960)
|
||||
.toggleClass('small', width <= 650);
|
||||
}
|
||||
$splitter.mousedown(function() {
|
||||
$splitter.addClass('active');
|
||||
|
||||
$document.mousemove(function(event) {
|
||||
if (event.pageX >= 230 && $document.width() - event.pageX >= 600 + splitterWidth) {
|
||||
setSplitterPosition(event.pageX);
|
||||
setContentWidth();
|
||||
}
|
||||
});
|
||||
|
||||
$()
|
||||
.add($splitter)
|
||||
.add($document)
|
||||
.mouseup(function() {
|
||||
$splitter
|
||||
.removeClass('active')
|
||||
.unbind('mouseup');
|
||||
$document
|
||||
.unbind('mousemove')
|
||||
.unbind('mouseup');
|
||||
|
||||
$.cookie('splitter', splitterPosition, {expires: 365});
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
$splitter.dblclick(function() {
|
||||
if (splitterPosition) {
|
||||
splitterPositionBackup = $left.width();
|
||||
setSplitterPosition(0);
|
||||
} else {
|
||||
setSplitterPosition(splitterPositionBackup);
|
||||
splitterPositionBackup = null;
|
||||
}
|
||||
|
||||
setContentWidth();
|
||||
|
||||
$.cookie('splitter', splitterPosition, {expires: 365});
|
||||
$.cookie('splitterBackup', splitterPositionBackup, {expires: 365});
|
||||
});
|
||||
if (null !== splitterPosition) {
|
||||
setSplitterPosition(splitterPosition);
|
||||
}
|
||||
setNavigationPosition();
|
||||
setContentWidth();
|
||||
$(window)
|
||||
.resize(setNavigationPosition)
|
||||
.resize(setContentWidth);
|
||||
|
||||
// Select selected lines
|
||||
var matches = window.location.hash.substr(1).match(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/);
|
||||
if (null !== matches) {
|
||||
var lists = matches[0].split(',');
|
||||
for (var i = 0; i < lists.length; i++) {
|
||||
var lines = lists[i].split('-');
|
||||
lines[0] = parseInt(lines[0]);
|
||||
lines[1] = parseInt(lines[1] || lines[0]);
|
||||
for (var j = lines[0]; j <= lines[1]; j++) {
|
||||
$('#' + j).addClass('selected');
|
||||
}
|
||||
}
|
||||
|
||||
var $firstLine = $('#' + parseInt(matches[0]));
|
||||
if ($firstLine.length > 0) {
|
||||
$right.scrollTop($firstLine.position().top);
|
||||
}
|
||||
}
|
||||
|
||||
// Save selected lines
|
||||
var lastLine;
|
||||
$('.l a').click(function(event) {
|
||||
event.preventDefault();
|
||||
|
||||
var selectedLine = $(this).parent().index() + 1;
|
||||
var $selectedLine = $('pre.code .l').eq(selectedLine - 1);
|
||||
|
||||
if (event.shiftKey) {
|
||||
if (lastLine) {
|
||||
for (var i = Math.min(selectedLine, lastLine); i <= Math.max(selectedLine, lastLine); i++) {
|
||||
$('#' + i).addClass('selected');
|
||||
}
|
||||
} else {
|
||||
$selectedLine.addClass('selected');
|
||||
}
|
||||
} else if (event.ctrlKey) {
|
||||
$selectedLine.toggleClass('selected');
|
||||
} else {
|
||||
var $selected = $('.l.selected')
|
||||
.not($selectedLine)
|
||||
.removeClass('selected');
|
||||
if ($selected.length > 0) {
|
||||
$selectedLine.addClass('selected');
|
||||
} else {
|
||||
$selectedLine.toggleClass('selected');
|
||||
}
|
||||
}
|
||||
|
||||
lastLine = $selectedLine.hasClass('selected') ? selectedLine : null;
|
||||
|
||||
// Update hash
|
||||
var lines = $('.l.selected')
|
||||
.map(function() {
|
||||
return parseInt($(this).attr('id'));
|
||||
})
|
||||
.get()
|
||||
.sort(function(a, b) {
|
||||
return a - b;
|
||||
});
|
||||
|
||||
var hash = [];
|
||||
var list = [];
|
||||
for (var j = 0; j < lines.length; j++) {
|
||||
if (0 === j && j + 1 === lines.length) {
|
||||
hash.push(lines[j]);
|
||||
} else if (0 === j) {
|
||||
list[0] = lines[j];
|
||||
} else if (lines[j - 1] + 1 !== lines[j] && j + 1 === lines.length) {
|
||||
hash.push(list.join('-'));
|
||||
hash.push(lines[j]);
|
||||
} else if (lines[j - 1] + 1 !== lines[j]) {
|
||||
hash.push(list.join('-'));
|
||||
list = [lines[j]];
|
||||
} else if (j + 1 === lines.length) {
|
||||
list[1] = lines[j];
|
||||
hash.push(list.join('-'));
|
||||
} else {
|
||||
list[1] = lines[j];
|
||||
}
|
||||
}
|
||||
|
||||
hash = hash.join(',');
|
||||
$backup = $('#' + hash).removeAttr('id');
|
||||
window.location.hash = hash;
|
||||
$backup.attr('id', hash);
|
||||
});
|
||||
});
|
|
@ -1,23 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'namespace'}
|
||||
|
||||
{block title}{if $namespace != 'None'}Namespace {$namespace}{else}No namespace{/if}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content" class="namespace">
|
||||
<h1>{if $namespace != 'None'}Namespace {$namespace|namespaceLinks:false|noescape}{else}No namespace{/if}</h1>
|
||||
|
||||
{if $subnamespaces}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Namespaces summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="namespaces">
|
||||
<tr n:foreach="$subnamespaces as $namespace">
|
||||
<td class="name"><a href="{$namespace|namespaceUrl}">{$namespace}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{include '@elementlist.latte'}
|
||||
</div>
|
||||
{/block}
|
|
@ -1,11 +0,0 @@
|
|||
{contentType xml}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
|
||||
<ShortName>{$config->title}</ShortName>
|
||||
<Description>{$config->title} Documentation</Description>
|
||||
<Url type="text/html" method="GET" template="http://www.google.com/cse?cx={$config->googleCseId|url}&ie=UTF-8&q={l}searchTerms{r}"/>
|
||||
<Image width="16" height="16">{$config->baseUrl}/favicon.ico</Image>
|
||||
<SyndicationRight>open</SyndicationRight>
|
||||
<InputEncoding>UTF-8</InputEncoding>
|
||||
<OutputEncoding>UTF-8</OutputEncoding>
|
||||
</OpenSearchDescription>
|
|
@ -1,48 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'overview'}
|
||||
|
||||
{block title}{$config->title ?: 'Overview'}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content">
|
||||
<h1>{include title}</h1>
|
||||
|
||||
{var $group = false}
|
||||
|
||||
{if count($namespaces)}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Namespaces summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="namespaces">
|
||||
{foreach $namespaces as $namespace}
|
||||
{continueIf $config->main && 0 !== strpos($namespace, $config->main)}
|
||||
<tr>
|
||||
{var $group = true}
|
||||
<td class="name"><a href="{$namespace|namespaceUrl}">{$namespace}</a></td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if count($packages)}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Packages summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="packages">
|
||||
{foreach $packages as $package}
|
||||
{continueIf $config->main && 0 !== strpos($package, $config->main)}
|
||||
<tr>
|
||||
{var $group = true}
|
||||
<td class="name">
|
||||
<a href="{$package|packageUrl}">{$package}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{if ! $group}
|
||||
{include '@elementlist.latte'}
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
|
@ -1,23 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'package'}
|
||||
|
||||
{block title}{if $package != 'None'}Package {$package}{else}No package{/if}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="content" class="package">
|
||||
<h1>{if $package != 'None'}Package {$package|packageLinks:false|noescape}{else}No package{/if}</h1>
|
||||
|
||||
{if $subpackages}
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading"><h2>Packages summary</h2></div>
|
||||
<table class="summary table table-bordered table-striped" id="packages">
|
||||
<tr n:foreach="$subpackages as $package">
|
||||
<td class="name"><a href="{$package|packageUrl}">{$package}</a></td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
{include '@elementlist.latte'}
|
||||
</div>
|
||||
{/block}
|
Before Width: | Height: | Size: 288 B |
Before Width: | Height: | Size: 152 B |
Before Width: | Height: | Size: 216 B |
Before Width: | Height: | Size: 171 B |
|
@ -1,569 +0,0 @@
|
|||
/* Normal styles */
|
||||
|
||||
body {
|
||||
padding: 50px 0 0 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 2em;
|
||||
margin: 0.67em 0;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 1.5em;
|
||||
margin: 0.83em 0;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 1.17em;
|
||||
margin: 1em 0 0.2em 0;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 100%;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.panel-heading h2,
|
||||
.panel-heading h3 {
|
||||
margin-top: 0;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.panel > p {
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
ul, ol {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
a, a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
var {
|
||||
font-weight: bold;
|
||||
font-style: normal;
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
code {
|
||||
color: #000;
|
||||
white-space: nowrap;
|
||||
border: none;
|
||||
background: transparent;
|
||||
padding: 0
|
||||
}
|
||||
|
||||
code:empty {
|
||||
display: none;
|
||||
}
|
||||
|
||||
code a b {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
pre code {
|
||||
white-space: pre;
|
||||
}
|
||||
|
||||
.deprecated {
|
||||
text-decoration: line-through;
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
.invalid {
|
||||
color: #dd1144;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Left side */
|
||||
#left {
|
||||
overflow: auto;
|
||||
width: 270px;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
}
|
||||
|
||||
/* Menu */
|
||||
#menu {
|
||||
padding: 10px;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
#menu h3 {
|
||||
border-bottom: 1px solid #E7E7E7;
|
||||
margin-left: -10px;
|
||||
margin-right: -10px;
|
||||
padding: 0 10px 5px 10px;
|
||||
}
|
||||
|
||||
#menu ul {
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
#menu ul ul {
|
||||
padding-left: 10px;
|
||||
}
|
||||
|
||||
#menu li {
|
||||
white-space: nowrap;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
#menu a {
|
||||
display: block;
|
||||
padding: 3px;
|
||||
border-radius: 3px;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
#menu a:hover {
|
||||
background-color: #a46497;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
#menu .active > a {
|
||||
font-weight: bold;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#menu .active > a.invalid {
|
||||
color: #dd1144;
|
||||
}
|
||||
|
||||
#menu #groups span {
|
||||
position: absolute;
|
||||
top: 6px;
|
||||
right: 3px;
|
||||
cursor: pointer;
|
||||
display: block;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: url('collapsed.png') transparent 0 0 no-repeat;
|
||||
}
|
||||
|
||||
#menu #groups span:hover {
|
||||
background-position: -12px 0;
|
||||
}
|
||||
|
||||
#menu #groups span.collapsed {
|
||||
background-position: 0 -12px;
|
||||
}
|
||||
|
||||
#menu #groups span.collapsed:hover {
|
||||
background-position: -12px -12px;
|
||||
}
|
||||
|
||||
#menu #groups ul.collapsed {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* Autocomplete */
|
||||
.ac_results {
|
||||
border-radius: 4px;
|
||||
margin-top: 2px;
|
||||
background-color: #fff;
|
||||
border: 1px solid #E7E7E7;
|
||||
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.ac_results ul {
|
||||
display: block;
|
||||
list-style: none;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.ac_results li {
|
||||
margin: 0;
|
||||
padding: 0 5px;
|
||||
line-height: 2;
|
||||
cursor: default;
|
||||
display: block;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.ac_results li strong {
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.ac_over {
|
||||
background-color: #a46497;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.ac_results li.ac_over strong {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
/* Right side */
|
||||
#right {
|
||||
overflow: auto;
|
||||
margin-left: 275px;
|
||||
height: 100%;
|
||||
position: relative;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
#rightInner {
|
||||
max-width: 1000px;
|
||||
min-width: 350px;
|
||||
}
|
||||
|
||||
/* Navigation */
|
||||
|
||||
#navigation {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.navbar .nav > li > span {
|
||||
position: relative;
|
||||
display: block;
|
||||
color: #777;
|
||||
line-height: 20px;
|
||||
padding: 15px;
|
||||
}
|
||||
|
||||
.navbar .nav > li.active > span {
|
||||
background-color: #E7E7E7;
|
||||
color: #555;
|
||||
}
|
||||
|
||||
/* Content */
|
||||
#content {
|
||||
clear: both;
|
||||
padding: 5px 15px;
|
||||
}
|
||||
|
||||
#content > .description {
|
||||
margin: 1.2em 0;
|
||||
}
|
||||
|
||||
#content .alert-info {
|
||||
margin-top: 18px;
|
||||
}
|
||||
|
||||
dl.tree {
|
||||
margin: 1.2em 0;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
dl.tree dd {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 18px;
|
||||
}
|
||||
|
||||
.elementList {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
h2.switchable {
|
||||
background: transparent url('sort.png') no-repeat center right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.summary td:first-child {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.summary td hr {
|
||||
margin: 8px -8px;
|
||||
}
|
||||
|
||||
#packages.summary td:first-child, #namespaces.summary td:first-child, .inherited.summary td:first-child, .used.summary td:first-child {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.summary tr:hover td {
|
||||
background: #f6f6f4;
|
||||
}
|
||||
|
||||
.summary .description p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.class #methods.summary .description p:first-child, .summary .description.detailed h4:first-child {
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
.summary .description p + p, .summary .description ul, .summary .description pre, .summary .description.detailed h4 {
|
||||
margin-top: 4px;
|
||||
}
|
||||
|
||||
.summary dl {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.summary dd {
|
||||
margin: 0 0 0 25px;
|
||||
}
|
||||
|
||||
.summary dt, dd {
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.name, .attributes {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.value code {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
td.name, td.attributes {
|
||||
width: 1%;
|
||||
}
|
||||
|
||||
.class .methods .name, .class .properties .name, .class .constants .name {
|
||||
width: auto;
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
.class .methods .name > div > code {
|
||||
white-space: pre-wrap;
|
||||
}
|
||||
|
||||
.class .methods .name > div > code span, .function .value > code {
|
||||
white-space: nowrap;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.class .methods td.name > div, .class td.value > div {
|
||||
position: relative;
|
||||
padding-right: 1em;
|
||||
}
|
||||
|
||||
.attributes code, .name code, dd code {
|
||||
color: #468847;
|
||||
}
|
||||
|
||||
.anchor {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
line-height: 1;
|
||||
font-size: 85%;
|
||||
margin: 0;
|
||||
color: #a46497 !important;
|
||||
}
|
||||
|
||||
.list {
|
||||
margin: 0 0 5px 25px;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
/* Splitter */
|
||||
#splitter {
|
||||
position: fixed;
|
||||
height: 100%;
|
||||
width: 5px;
|
||||
left: 270px;
|
||||
background: #E7E7E7 url('resize.png') left center no-repeat;
|
||||
cursor: e-resize;
|
||||
}
|
||||
|
||||
#splitter.active {
|
||||
opacity: .5;
|
||||
}
|
||||
|
||||
/* Footer */
|
||||
#footer {
|
||||
border-top: 1px solid #e5e5e5;
|
||||
clear: both;
|
||||
color: #808080;
|
||||
text-align: right;
|
||||
padding: 2em 1em;
|
||||
margin: 3em 0 40px 0;
|
||||
}
|
||||
|
||||
/* Tree */
|
||||
div.tree ul {
|
||||
list-style: none;
|
||||
background: url('tree-vertical.png') left repeat-y;
|
||||
padding: 0;
|
||||
margin-left: 20px;
|
||||
}
|
||||
|
||||
div.tree li {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.tree div {
|
||||
padding-left: 30px;
|
||||
}
|
||||
|
||||
div.tree div.notlast {
|
||||
background: url('tree-hasnext.png') left 10px no-repeat;
|
||||
}
|
||||
|
||||
div.tree div.last {
|
||||
background: url('tree-last.png') left -240px no-repeat;
|
||||
}
|
||||
|
||||
div.tree li.last {
|
||||
background: url('tree-cleaner.png') left center repeat-y;
|
||||
}
|
||||
|
||||
div.tree span.padding {
|
||||
padding-left: 15px;
|
||||
}
|
||||
|
||||
/* Source code */
|
||||
#source {
|
||||
margin: 1em 0 1em 1em;
|
||||
border: 1px solid #ccc;
|
||||
border-radius: 4px;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
#source pre {
|
||||
padding: 0;
|
||||
border: none;
|
||||
overflow: visible;
|
||||
}
|
||||
|
||||
#source .numbers {
|
||||
float: left;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
#source .code {
|
||||
|
||||
}
|
||||
|
||||
.php-keyword1 {
|
||||
color: #468847;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.php-keyword2 {
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.php-var {
|
||||
color: #c09853;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.php-num {
|
||||
color: #006dcc;
|
||||
}
|
||||
|
||||
.php-quote {
|
||||
color: #006dcc;
|
||||
}
|
||||
|
||||
.php-comment {
|
||||
color: #929292;
|
||||
}
|
||||
|
||||
.xlang {
|
||||
color: #468847;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
span.l {
|
||||
display: block;
|
||||
}
|
||||
|
||||
span.l.selected {
|
||||
background: #f9f2d2;
|
||||
}
|
||||
|
||||
span.l a {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
span.l a:hover, span.l a:active, span.l a:focus {
|
||||
background: transparent;
|
||||
color: #333333 !important;
|
||||
}
|
||||
|
||||
span.l .php-var a {
|
||||
color: #c09853;
|
||||
}
|
||||
|
||||
span.l .php-var a:hover, span.l .php-var a:active, span.l .php-var a:focus {
|
||||
color: #c09853 !important;
|
||||
}
|
||||
|
||||
span.l a.l {
|
||||
background: #fbfbfc;
|
||||
margin-right: 8px;
|
||||
padding: 2px 2px 2px 8px;
|
||||
color: #c0c0c0;
|
||||
}
|
||||
|
||||
span.l a.l:hover, span.l a.l:active, span.l a.l:focus {
|
||||
background: #fbfbfc;
|
||||
color: #c0c0c0 !important;
|
||||
}
|
||||
|
||||
/* Small screens */
|
||||
#rightInner.medium .name, #rightInner.medium .attributes {
|
||||
white-space: normal;
|
||||
}
|
||||
|
||||
/* global style */
|
||||
.left, .summary td.left {
|
||||
text-align: left;
|
||||
}
|
||||
.right, .summary td.right {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
|
||||
/* Custom styles for Woo */
|
||||
.navbar-header {
|
||||
padding: 10px;
|
||||
}
|
||||
.navbar-brand {
|
||||
background: url(woocommerce_logo_white.png) no-repeat left top;
|
||||
background-size: 149px 30px;
|
||||
width: 159px;
|
||||
padding: 30px 0 0 0;
|
||||
overflow: hidden;
|
||||
height: 0;
|
||||
}
|
||||
|
||||
#navigation {
|
||||
background: #3c3c3c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#navigation a {
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.navbar .nav > li > span {
|
||||
color: #999;
|
||||
}
|
||||
.navbar .nav > li > a:hover > span {
|
||||
color: #a46497;
|
||||
}
|
||||
.navbar .nav > li.active > span, .navbar .nav > li.active > a {
|
||||
background: #a46497;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #a46497;
|
||||
}
|
Before Width: | Height: | Size: 126 B |
Before Width: | Height: | Size: 128 B |
Before Width: | Height: | Size: 172 B |
Before Width: | Height: | Size: 127 B |
Before Width: | Height: | Size: 5.8 KiB |
Before Width: | Height: | Size: 6.1 KiB |
|
@ -1,4 +0,0 @@
|
|||
{contentType text}
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Sitemap: {$config->baseUrl}/sitemap.xml
|
|
@ -1,26 +0,0 @@
|
|||
{contentType xml}
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||
<url>
|
||||
<loc>{$config->baseUrl}/index.html</loc>
|
||||
</url>
|
||||
<url n:foreach="$namespaces as $namespace">
|
||||
<loc>{$config->baseUrl}/{$namespace|namespaceUrl}</loc>
|
||||
</url>
|
||||
<url n:foreach="$packages as $package">
|
||||
<loc>{$config->baseUrl}/{$package|packageUrl}</loc>
|
||||
</url>
|
||||
|
||||
{define elements}
|
||||
<url n:foreach="$elements as $element">
|
||||
<loc>{$config->baseUrl}/{$element|elementUrl}</loc>
|
||||
</url>
|
||||
{/define}
|
||||
|
||||
{include elements, elements => $classes}
|
||||
{include elements, elements => $interfaces}
|
||||
{include elements, elements => $traits}
|
||||
{include elements, elements => $exceptions}
|
||||
{include elements, elements => $constants}
|
||||
{include elements, elements => $functions}
|
||||
</urlset>
|
|
@ -1,12 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $robots = false}
|
||||
|
||||
{block title}File {$fileName}{/block}
|
||||
|
||||
{block content}
|
||||
<div id="source">
|
||||
{var $lineRegex = '~<span class="line">(\s*)(\d+):(\s*)</span>([^\\n]*(?:\\n|$))~'}
|
||||
<pre class="numbers"><code>{$source|replaceRE:$lineRegex,'<span class="l"><a href="#$2">$1$2$3</a></span>'|noescape}</code></pre>
|
||||
<pre class="code"><code>{$source|replaceRE:$lineRegex,'<span id="$2" class="l">$4</span>'|noescape}</code></pre>
|
||||
</div>
|
||||
{/block}
|
|
@ -1,67 +0,0 @@
|
|||
{layout '@layout.latte'}
|
||||
{var $active = 'tree'}
|
||||
|
||||
{block title}Tree{/block}
|
||||
|
||||
{define tree}
|
||||
<div class="tree">
|
||||
<ul>
|
||||
{var $level = -1}
|
||||
{foreach $tree as $reflectionName => $reflection|noiterator}
|
||||
{if $level === $tree->getDepth()}
|
||||
</li>
|
||||
{elseif $level > $tree->getDepth()}
|
||||
{='</ul></li>'|repeat:$level - $tree->getDepth()|noescape}
|
||||
{elseif -1 !== $level}
|
||||
<ul>
|
||||
{/if}
|
||||
|
||||
<li n:class="!$tree->hasSibling() ? last"><div class="{if $tree->hasSibling()}not{/if}last"><a href="{$reflectionName|classUrl}" n:tag-if="$reflection->documented"><span n:class="$reflection->deprecated ? deprecated, !$reflection->valid ? invalid">{$reflectionName}</span></a>
|
||||
{var $interfaces = $reflection->ownInterfaces}
|
||||
{if $interfaces} implements {foreach $interfaces as $interface}
|
||||
<a href="{$interface|classUrl}" n:tag-if="$interface->documented"><span n:class="$interface->deprecated ? deprecated, !$interface->valid ? invalid">{$interface->name}</span></a>{sep}, {/sep}
|
||||
{/foreach}{/if}
|
||||
{var $traits = $reflection->ownTraits}
|
||||
{if $traits}{if $interfaces}<br><span class="padding"></span>{/if} uses {foreach $traits as $trait}
|
||||
{if is_string($trait)}
|
||||
{$trait} (not available)
|
||||
|
||||
{else}
|
||||
<a href="{$trait|classUrl}" n:tag-if="$trait->documented"><span n:class="$trait->deprecated ? deprecated, !$trait->valid ? invalid">{$trait->name}</span></a>{sep}, {/sep}
|
||||
{/}
|
||||
{/foreach}{/if}
|
||||
</div>
|
||||
|
||||
{var $level = $tree->getDepth()}
|
||||
{/foreach}
|
||||
</li>
|
||||
{='</ul></li>'|repeat:$level|noescape}
|
||||
</ul>
|
||||
</div>
|
||||
{/define}
|
||||
|
||||
{block content}
|
||||
<div id="content">
|
||||
<h1>{include title}</h1>
|
||||
|
||||
{if $classTree->valid()}
|
||||
<h2>Classes</h2>
|
||||
{include tree, tree => $classTree}
|
||||
{/if}
|
||||
|
||||
{if $interfaceTree->valid()}
|
||||
<h2>Interfaces</h2>
|
||||
{include tree, tree => $interfaceTree}
|
||||
{/if}
|
||||
|
||||
{if $traitTree->valid()}
|
||||
<h2>Traits</h2>
|
||||
{include tree, tree => $traitTree}
|
||||
{/if}
|
||||
|
||||
{if $exceptionTree->valid()}
|
||||
<h2>Exceptions</h2>
|
||||
{include tree, tree => $exceptionTree}
|
||||
{/if}
|
||||
</div>
|
||||
{/block}
|
|
@ -66,34 +66,3 @@ p.woocommerce-actions,
|
|||
.woocommerce-about-text {
|
||||
margin-bottom: 1em !important;
|
||||
}
|
||||
|
||||
div.woocommerce-legacy-shipping-notice,
|
||||
div.woocommerce-no-shipping-methods-notice {
|
||||
overflow: hidden;
|
||||
padding: 1px 12px;
|
||||
|
||||
p {
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
line-height: 1.5em;
|
||||
margin: 12px 0;
|
||||
|
||||
&.main {
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
||||
|
||||
&::before {
|
||||
content: "\e01b";
|
||||
font-family: "WooCommerce";
|
||||
text-align: center;
|
||||
line-height: 1;
|
||||
color: #f7f1f6;
|
||||
display: block;
|
||||
width: 1em;
|
||||
font-size: 20em;
|
||||
top: 36px;
|
||||
right: 12px;
|
||||
position: absolute;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2263,7 +2263,8 @@ ul.wc_coupon_list_block {
|
|||
|
||||
&::before {
|
||||
content: "";
|
||||
background: url("../images/wpspin.gif") no-repeat center top;
|
||||
background: url("../images/wpspin-2x.gif") no-repeat center top;
|
||||
background-size: 71%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3270,6 +3271,10 @@ table.wc_shipping {
|
|||
margin-top: 0;
|
||||
}
|
||||
|
||||
.wc-shipping-zone-settings tbody {
|
||||
display: inherit;
|
||||
}
|
||||
|
||||
table {
|
||||
|
||||
tr,
|
||||
|
@ -3931,6 +3936,11 @@ img.help_tip {
|
|||
margin-bottom: 3px;
|
||||
}
|
||||
|
||||
.select2-container + span.description {
|
||||
display: block;
|
||||
margin-top: 8px;
|
||||
}
|
||||
|
||||
table.widefat th {
|
||||
padding-right: inherit;
|
||||
}
|
||||
|
@ -4563,6 +4573,7 @@ img.help_tip {
|
|||
}
|
||||
}
|
||||
|
||||
.woocommerce_attribute,
|
||||
.woocommerce_variation {
|
||||
|
||||
h3 .sort {
|
||||
|
@ -4951,6 +4962,7 @@ img.help_tip {
|
|||
}
|
||||
}
|
||||
|
||||
&.woocommerce_attribute h3,
|
||||
&.woocommerce_variation h3 {
|
||||
cursor: pointer;
|
||||
padding: 0.5em 0.75em 0.5em 1em !important;
|
||||
|
@ -6784,7 +6796,7 @@ table.bar_chart {
|
|||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
|
||||
background: #a46497;
|
||||
background: linear-gradient(top, #a46497, #66405f), #a46497;
|
||||
background: linear-gradient(to bottom, #a46497, #66405f), #a46497;
|
||||
transition: width 1s ease;
|
||||
}
|
||||
|
||||
|
@ -6792,7 +6804,7 @@ table.bar_chart {
|
|||
border-radius: 3px;
|
||||
box-shadow: inset 0 1px 1px 0 rgba(255, 255, 255, 0.4);
|
||||
background: #a46497;
|
||||
background: linear-gradient(top, #a46497, #66405f), #a46497;
|
||||
background: linear-gradient(to bottom, #a46497, #66405f), #a46497;
|
||||
transition: width 1s ease;
|
||||
}
|
||||
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
/**
|
||||
* Imports
|
||||
*/
|
||||
@import 'mixins';
|
||||
@import 'variables';
|
||||
@import 'fonts';
|
||||
@import "mixins";
|
||||
@import "variables";
|
||||
@import "fonts";
|
||||
|
||||
/**
|
||||
* Styling begins
|
||||
|
@ -37,7 +37,7 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
strong {
|
||||
font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;
|
||||
font-family: Georgia, "Times New Roman", "Bitstream Charter", Times, serif;
|
||||
font-size: 4em;
|
||||
line-height: 1.2em;
|
||||
font-weight: normal;
|
||||
|
@ -47,13 +47,16 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
#woocommerce_dashboard_status {
|
||||
|
||||
.inside {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.best-seller-this-month {
|
||||
|
||||
a {
|
||||
|
||||
strong {
|
||||
margin-right: 48px;
|
||||
}
|
||||
|
@ -111,6 +114,7 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
&::before {
|
||||
|
||||
@include icon();
|
||||
font-size: 2em;
|
||||
position: relative;
|
||||
|
@ -132,8 +136,8 @@ ul.woocommerce_stats {
|
|||
width: 100%;
|
||||
|
||||
a::before {
|
||||
font-family: 'Dashicons';
|
||||
content: '\f185';
|
||||
font-family: "Dashicons";
|
||||
content: "\f185";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -141,7 +145,7 @@ ul.woocommerce_stats {
|
|||
width: 100%;
|
||||
|
||||
a::before {
|
||||
content: '\e006';
|
||||
content: "\e006";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -149,14 +153,15 @@ ul.woocommerce_stats {
|
|||
border-right: 1px solid #ececec;
|
||||
|
||||
a::before {
|
||||
content: '\e011';
|
||||
content: "\e011";
|
||||
color: $green;
|
||||
}
|
||||
}
|
||||
|
||||
li.on-hold-orders {
|
||||
|
||||
a::before {
|
||||
content: '\e033';
|
||||
content: "\e033";
|
||||
color: #999;
|
||||
}
|
||||
}
|
||||
|
@ -165,14 +170,15 @@ ul.woocommerce_stats {
|
|||
border-right: 1px solid #ececec;
|
||||
|
||||
a::before {
|
||||
content: '\e016';
|
||||
content: "\e016";
|
||||
color: $orange;
|
||||
}
|
||||
}
|
||||
|
||||
li.out-of-stock {
|
||||
|
||||
a::before {
|
||||
content: '\e013';
|
||||
content: "\e013";
|
||||
color: $red;
|
||||
}
|
||||
}
|
||||
|
@ -180,6 +186,7 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
#woocommerce_dashboard_recent_reviews {
|
||||
|
||||
li {
|
||||
line-height: 1.5em;
|
||||
margin-bottom: 12px;
|
||||
|
@ -210,10 +217,10 @@ ul.woocommerce_stats {
|
|||
line-height: 1.5;
|
||||
margin-left: 0.5em;
|
||||
width: 5.4em;
|
||||
font-family: 'WooCommerce' !important;
|
||||
font-family: "WooCommerce" !important;
|
||||
|
||||
&::before {
|
||||
content: '\e021\e021\e021\e021\e021';
|
||||
content: "\e021\e021\e021\e021\e021";
|
||||
color: darken(#ccc, 10%);
|
||||
float: left;
|
||||
top: 0;
|
||||
|
@ -233,7 +240,7 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
span::before {
|
||||
content: '\e020\e020\e020\e020\e020';
|
||||
content: "\e020\e020\e020\e020\e020";
|
||||
top: 0;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -245,6 +252,6 @@ ul.woocommerce_stats {
|
|||
}
|
||||
|
||||
#dash-right-now li.product-count a::before {
|
||||
font-family: 'WooCommerce';
|
||||
content: '\e01d';
|
||||
font-family: "WooCommerce";
|
||||
content: "\e01d";
|
||||
}
|
||||
|
|
|
@ -30,15 +30,24 @@ a.suggestion-dismiss::before {
|
|||
|
||||
#woocommerce-product-data ul.wc-tabs li.marketplace-suggestions_tab {
|
||||
|
||||
|
||||
a::before {
|
||||
|
||||
@include iconbeforedashicons( "\f106" );
|
||||
|
||||
@media only screen and (max-width: 900px) {
|
||||
line-height: 40px;
|
||||
}
|
||||
}
|
||||
|
||||
a span {
|
||||
margin: 0;
|
||||
margin: 0 0.618em;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-metabox-nosuggestions-placeholder {
|
||||
max-width: 325px;
|
||||
margin: auto;
|
||||
margin-top: 4em;
|
||||
margin: 2em auto;
|
||||
text-align: center;
|
||||
|
||||
.marketplace-suggestion-placeholder-content {
|
||||
|
@ -157,6 +166,10 @@ a.suggestion-dismiss::before {
|
|||
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-content.has-manage-link {
|
||||
text-align: right;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -178,51 +191,6 @@ a.suggestion-dismiss::before {
|
|||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-inline"] {
|
||||
|
||||
// hide by default (mobile first)
|
||||
display: none;
|
||||
|
||||
td:first-child {
|
||||
border-left: 4px solid $woocommerce;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container {
|
||||
padding: 0.5em 0 0.5em 1em;
|
||||
|
||||
img.marketplace-suggestion-icon {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-content {
|
||||
|
||||
h4 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
.marketplace-suggestion-container-cta {
|
||||
|
||||
.suggestion-dismiss {
|
||||
position: relative;
|
||||
top: 4px;
|
||||
right: auto;
|
||||
margin-left: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (min-width: 800px) {
|
||||
|
||||
// Display inline table suggestion on desktop only.
|
||||
// The table columns are dynamic, so there's no good way to style the row
|
||||
// content correctly when columns are hidden.
|
||||
display: table-row;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-header"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="products-list-empty-footer"],
|
||||
.marketplace-suggestions-container.showing-suggestion[data-marketplace-suggestions-context="orders-list-empty-header"],
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
font-size: 0.8125rem;
|
||||
text-transform: uppercase;
|
||||
font-weight: 800;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.price {
|
||||
|
|
|
@ -4,26 +4,31 @@ body {
|
|||
background: #f1f1f1;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
#wc-logo {
|
||||
border: 0;
|
||||
margin: 0 0 24px;
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
max-width: 30%;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup {
|
||||
text-align: center;
|
||||
|
||||
.select2-container {
|
||||
text-align: left;
|
||||
width: 100%;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.hidden {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-content {
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
|
||||
padding: 2em;
|
||||
|
@ -33,7 +38,10 @@ body {
|
|||
zoom: 1;
|
||||
text-align: left;
|
||||
|
||||
h1, h2, h3, table {
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
table {
|
||||
margin: 0 0 20px;
|
||||
border: 0;
|
||||
padding: 0;
|
||||
|
@ -41,38 +49,50 @@ body {
|
|||
clear: none;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 20px 0;
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
table {
|
||||
font-size: 1em;
|
||||
line-height: 1.75em;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #a16696;
|
||||
&:hover, &:focus {
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #111;
|
||||
}
|
||||
}
|
||||
|
||||
.form-table {
|
||||
|
||||
th {
|
||||
width: 35%;
|
||||
vertical-align: top;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
td {
|
||||
vertical-align: top;
|
||||
select, input {
|
||||
|
||||
select,
|
||||
input {
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
input[size] {
|
||||
width: auto;
|
||||
}
|
||||
|
||||
.description {
|
||||
line-height: 1.5em;
|
||||
display: block;
|
||||
|
@ -80,7 +100,9 @@ body {
|
|||
color: #999;
|
||||
font-style: italic;
|
||||
}
|
||||
.input-checkbox, .input-radio {
|
||||
|
||||
.input-checkbox,
|
||||
.input-radio {
|
||||
width: auto;
|
||||
box-sizing: inherit;
|
||||
padding: inherit;
|
||||
|
@ -88,37 +110,48 @@ body {
|
|||
box-shadow: none;
|
||||
}
|
||||
}
|
||||
|
||||
.section_title {
|
||||
|
||||
td {
|
||||
padding: 0;
|
||||
h2, p {
|
||||
|
||||
h2,
|
||||
p {
|
||||
margin: 12px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
th, td {
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 12px 0;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
|
||||
&:first-child {
|
||||
padding-right: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
table.tax-rates {
|
||||
width: 100%;
|
||||
font-size: 0.92em;
|
||||
|
||||
th {
|
||||
padding: 0;
|
||||
text-align: center;
|
||||
width: auto;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
td {
|
||||
border: 1px solid #f5f5f5;
|
||||
padding: 6px;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
|
||||
input {
|
||||
outline: 0;
|
||||
border: 0;
|
||||
|
@ -127,18 +160,22 @@ body {
|
|||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
&.sort {
|
||||
cursor: move;
|
||||
color: #ccc;
|
||||
|
||||
&::before {
|
||||
content: '\f333';
|
||||
font-family: 'dashicons';
|
||||
content: "\f333";
|
||||
font-family: "dashicons";
|
||||
}
|
||||
}
|
||||
|
||||
&.readonly {
|
||||
background: #f5f5f5;
|
||||
}
|
||||
}
|
||||
|
||||
.add {
|
||||
padding: 1em 0 0 1em;
|
||||
line-height: 1em;
|
||||
|
@ -149,14 +186,16 @@ body {
|
|||
overflow: hidden;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&::before {
|
||||
content: '\f502';
|
||||
font-family: 'dashicons';
|
||||
content: "\f502";
|
||||
font-family: "dashicons";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.remove {
|
||||
padding: 1em 0 0 1em;
|
||||
line-height: 1em;
|
||||
|
@ -167,40 +206,51 @@ body {
|
|||
overflow: hidden;
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
|
||||
&::before {
|
||||
content: '\f182';
|
||||
font-family: 'dashicons';
|
||||
content: "\f182";
|
||||
font-family: "dashicons";
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-pages {
|
||||
width: 100%;
|
||||
border-top: 1px solid #eee;
|
||||
|
||||
thead th {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.page-name {
|
||||
width: 30%;
|
||||
font-weight: bold;
|
||||
}
|
||||
th, td {
|
||||
|
||||
th,
|
||||
td {
|
||||
padding: 14px 0;
|
||||
border-bottom: 1px solid #eee;
|
||||
|
||||
&:first-child {
|
||||
padding-right: 9px;
|
||||
}
|
||||
}
|
||||
|
||||
th {
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
.page-options {
|
||||
|
||||
p {
|
||||
color: #777;
|
||||
margin: 6px 0 0 24px;
|
||||
line-height: 1.75em;
|
||||
|
||||
input {
|
||||
vertical-align: middle;
|
||||
margin: 1px 0 0;
|
||||
|
@ -208,50 +258,64 @@ body {
|
|||
width: 1.75em;
|
||||
line-height: 1.75em;
|
||||
}
|
||||
|
||||
label {
|
||||
line-height: 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 782px) {
|
||||
|
||||
.form-table {
|
||||
|
||||
tbody {
|
||||
|
||||
th {
|
||||
width: auto;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.twitter-share-button {
|
||||
float: right;
|
||||
}
|
||||
|
||||
.wc-setup-next-steps {
|
||||
overflow: hidden;
|
||||
margin: 0 0 24px;
|
||||
padding-bottom: 2px;
|
||||
|
||||
h2 {
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
|
||||
.wc-setup-next-steps-first {
|
||||
float: left;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.wc-setup-next-steps-last {
|
||||
float: right;
|
||||
width: 50%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0 2em 0 0;
|
||||
list-style: none outside;
|
||||
margin: 0;
|
||||
|
||||
li a {
|
||||
display: block;
|
||||
padding: 0 0 0.75em;
|
||||
}
|
||||
|
||||
.setup-product {
|
||||
|
||||
a.button {
|
||||
background-color: #f7f7f7;
|
||||
border-color: #ccc;
|
||||
|
@ -266,11 +330,14 @@ body {
|
|||
padding: 1em;
|
||||
text-align: center;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: #f5f5f5;
|
||||
border-color: #aaa;
|
||||
}
|
||||
}
|
||||
|
||||
a.button-primary {
|
||||
color: #fff;
|
||||
background-color: #bb77ae;
|
||||
|
@ -278,7 +345,9 @@ body {
|
|||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
|
||||
text-shadow: 0 -1px 1px #a36597, 1px 0 1px #a36597, 0 1px 1px #a36597, -1px 0 1px #a36597;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
color: #fff;
|
||||
background: #a36597;
|
||||
border-color: #a36597;
|
||||
|
@ -286,9 +355,10 @@ body {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
li a::before {
|
||||
color: #82878c;
|
||||
font: normal 20px/1 'dashicons';
|
||||
font: normal 20px/1 "dashicons";
|
||||
speak: none;
|
||||
display: inline-block;
|
||||
padding: 0 10px 0 0;
|
||||
|
@ -297,32 +367,39 @@ body {
|
|||
text-decoration: none !important;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.learn-more a::before {
|
||||
content: '\f105';
|
||||
content: "\f105";
|
||||
}
|
||||
|
||||
.video-walkthrough a::before {
|
||||
content: '\f126';
|
||||
content: "\f126";
|
||||
}
|
||||
|
||||
.newsletter a::before {
|
||||
content: '\f465';
|
||||
content: "\f465";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-newsletter,
|
||||
.updated {
|
||||
padding: 24px 24px 0;
|
||||
margin: 0 0 24px;
|
||||
overflow: hidden;
|
||||
background: #f5f5f5;
|
||||
|
||||
p {
|
||||
padding: 0;
|
||||
margin: 0 0 12px;
|
||||
}
|
||||
|
||||
form,
|
||||
p:last-child {
|
||||
margin: 0 0 24px;
|
||||
}
|
||||
}
|
||||
|
||||
.woocommerce-tracker {
|
||||
margin: 24px 0;
|
||||
border: 1px solid #eee;
|
||||
|
@ -334,6 +411,7 @@ body {
|
|||
font-size: 14px;
|
||||
line-height: 1.5em;
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
line-height: 24px;
|
||||
font-weight: 500;
|
||||
|
@ -342,32 +420,38 @@ body {
|
|||
margin-bottom: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
.checkbox {
|
||||
|
||||
input[type="checkbox"] {
|
||||
opacity: 0;
|
||||
position: absolute;
|
||||
left: -9999px;
|
||||
}
|
||||
|
||||
label {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding-left: 28px;
|
||||
&:before,
|
||||
&:after {
|
||||
|
||||
&::before,
|
||||
&::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
display: inline-block;
|
||||
}
|
||||
&:before {
|
||||
|
||||
&::before {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
left: 0px;
|
||||
left: 0;
|
||||
top: 3px;
|
||||
border: 1px solid #aaa;
|
||||
background-color: #fff;
|
||||
border-radius: 3px;
|
||||
}
|
||||
&:after {
|
||||
|
||||
&::after {
|
||||
height: 5px;
|
||||
width: 9px;
|
||||
border-left: 2px solid;
|
||||
|
@ -378,21 +462,26 @@ body {
|
|||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
input[type="checkbox"] + label::after {
|
||||
content: none;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + label::after {
|
||||
content: "";
|
||||
}
|
||||
|
||||
input[type="checkbox"]:focus + label::before {
|
||||
outline: rgb(59, 153, 252) auto 5px;
|
||||
}
|
||||
|
||||
input[type="checkbox"]:checked + label::before {
|
||||
background: #935687;
|
||||
border-color: #935687;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-steps {
|
||||
padding: 0 0 24px;
|
||||
margin: 0;
|
||||
|
@ -401,6 +490,7 @@ body {
|
|||
color: #ccc;
|
||||
width: 100%;
|
||||
display: inline-flex;
|
||||
|
||||
li {
|
||||
width: 100%;
|
||||
float: left;
|
||||
|
@ -410,6 +500,7 @@ body {
|
|||
position: relative;
|
||||
border-bottom: 4px solid #ccc;
|
||||
line-height: 1.4em;
|
||||
|
||||
a {
|
||||
color: #a16696;
|
||||
text-decoration: none;
|
||||
|
@ -417,14 +508,17 @@ body {
|
|||
margin: -1.5em;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
&:hover, &:focus {
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
color: #111;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
li::before {
|
||||
content: '';
|
||||
content: "";
|
||||
border: 4px solid #ccc;
|
||||
border-radius: 100%;
|
||||
width: 4px;
|
||||
|
@ -436,27 +530,33 @@ body {
|
|||
margin-bottom: -8px;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
li.active {
|
||||
border-color: #a16696;
|
||||
color: #a16696;
|
||||
font-weight: bold;
|
||||
|
||||
&::before {
|
||||
border-color: #a16696;
|
||||
}
|
||||
}
|
||||
|
||||
li.done {
|
||||
border-color: #a16696;
|
||||
color: #a16696;
|
||||
|
||||
&::before {
|
||||
border-color: #a16696;
|
||||
background: #a16696;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup .wc-setup-actions {
|
||||
overflow: hidden;
|
||||
margin: 20px 0 0;
|
||||
position: relative;
|
||||
|
||||
.button {
|
||||
font-size: 1.25em;
|
||||
padding: 0.5em 1em;
|
||||
|
@ -466,6 +566,7 @@ body {
|
|||
height: auto;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.button-primary {
|
||||
background-color: #bb77ae;
|
||||
border-color: #a36597;
|
||||
|
@ -474,7 +575,9 @@ body {
|
|||
margin: 0;
|
||||
opacity: 1;
|
||||
|
||||
&:hover, &:focus, &:active {
|
||||
&:hover,
|
||||
&:focus,
|
||||
&:active {
|
||||
background: #a36597;
|
||||
border-color: #a36597;
|
||||
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
|
||||
|
@ -499,9 +602,10 @@ body {
|
|||
}
|
||||
|
||||
.wc-wizard-storefront {
|
||||
|
||||
.wc-wizard-storefront-intro {
|
||||
padding: 40px 40px 0;
|
||||
background: #F5F5F5;
|
||||
background: #f5f5f5;
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
|
@ -510,12 +614,14 @@ body {
|
|||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-features {
|
||||
list-style: none outside;
|
||||
margin: 0 0 20px;
|
||||
padding: 0 0 0 30px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature {
|
||||
margin: 0;
|
||||
padding: 20px 30px 20px 2em;
|
||||
|
@ -526,31 +632,39 @@ body {
|
|||
margin-left: -2em;
|
||||
position: absolute;
|
||||
}
|
||||
|
||||
&.first {
|
||||
clear: both;
|
||||
float: left;
|
||||
}
|
||||
|
||||
&.last {
|
||||
float: right;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__bulletproof::before {
|
||||
content: '🔒';
|
||||
content: "🔒";
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__mobile::before {
|
||||
content: '📱';
|
||||
content: "📱";
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__accessibility::before {
|
||||
content: '👓';
|
||||
content: "👓";
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__search::before {
|
||||
content: '🔍';
|
||||
content: "🔍";
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__compatibility::before {
|
||||
content: '🔧';
|
||||
content: "🔧";
|
||||
}
|
||||
|
||||
.wc-wizard-storefront-feature__extendable::before {
|
||||
content: '🎨';
|
||||
content: "🎨";
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -617,23 +731,15 @@ body {
|
|||
padding: 2px 0;
|
||||
}
|
||||
|
||||
&.klarna-logo .wc-wizard-service-name {
|
||||
background: #000000;
|
||||
|
||||
img {
|
||||
&.klarna-logo .wc-wizard-service-name img {
|
||||
max-width: 87px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.square-logo .wc-wizard-service-name {
|
||||
background: #000000;
|
||||
|
||||
img {
|
||||
&.square-logo .wc-wizard-service-name img {
|
||||
max-width: 95px;
|
||||
padding: 12px 0;
|
||||
}
|
||||
}
|
||||
|
||||
&.eway-logo .wc-wizard-service-name img {
|
||||
max-width: 87px;
|
||||
|
@ -688,7 +794,7 @@ body {
|
|||
display: none;
|
||||
}
|
||||
|
||||
&:before {
|
||||
&::before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 16px;
|
||||
|
@ -704,7 +810,7 @@ body {
|
|||
border-color: #999;
|
||||
background-color: #999;
|
||||
|
||||
&:before {
|
||||
&::before {
|
||||
right: auto;
|
||||
left: 0;
|
||||
}
|
||||
|
@ -723,6 +829,7 @@ body {
|
|||
}
|
||||
|
||||
&.checked {
|
||||
|
||||
.wc-wizard-service-settings {
|
||||
display: inline-block;
|
||||
|
||||
|
@ -752,11 +859,14 @@ body {
|
|||
position: absolute;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
&.closed {
|
||||
|
||||
.wc-wizard-service-enable::before {
|
||||
content: "\f347"; // down chevron
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-enable input {
|
||||
visibility: hidden;
|
||||
position: relative;
|
||||
|
@ -819,12 +929,14 @@ body {
|
|||
flex-direction: column;
|
||||
color: #a6a6a6;
|
||||
}
|
||||
|
||||
.wc-wizard-service-item:not(:first-child) .wc-wizard-service-description {
|
||||
font-size: 0.92em;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.shipping-method-setting {
|
||||
|
||||
input {
|
||||
width: 95px; // match dropdown height
|
||||
border: 1px solid #aaa;
|
||||
|
@ -843,14 +955,16 @@ body {
|
|||
.shipping-method-description,
|
||||
.shipping-method-setting .description {
|
||||
color: #7e7e7e;
|
||||
font-size: .9em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.shipping-method-setting input::placeholder {
|
||||
color: #e1e1e1;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-setup-shipping-units {
|
||||
|
||||
p {
|
||||
line-height: 1.5em;
|
||||
font-size: 13px;
|
||||
|
@ -917,16 +1031,20 @@ h3.jetpack-reasons {
|
|||
font-size: 14px;
|
||||
}
|
||||
|
||||
.jetpack-logo, .wcs-notice {
|
||||
.jetpack-logo,
|
||||
.wcs-notice {
|
||||
display: block;
|
||||
margin: 1.75em auto 2em auto;
|
||||
max-height: 175px;
|
||||
}
|
||||
|
||||
.activate-splash {
|
||||
|
||||
.jetpack-logo {
|
||||
width: 170px;
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wcs-notice {
|
||||
margin-top: 1em;
|
||||
padding-left: 57px;
|
||||
|
@ -966,11 +1084,11 @@ h3.jetpack-reasons {
|
|||
}
|
||||
|
||||
.plugin-install-info-list-item::after {
|
||||
content: ', ';
|
||||
content: ", ";
|
||||
}
|
||||
|
||||
.plugin-install-info-list-item:last-of-type::after {
|
||||
content: '. ';
|
||||
content: ". ";
|
||||
}
|
||||
|
||||
a {
|
||||
|
@ -1019,12 +1137,14 @@ h3.jetpack-reasons {
|
|||
}
|
||||
|
||||
.address-step {
|
||||
|
||||
.select2 {
|
||||
min-width: 100%; // widen currency, product type dropdowns
|
||||
}
|
||||
}
|
||||
|
||||
.store-address-container {
|
||||
|
||||
.city-and-postcode {
|
||||
display: flex;
|
||||
|
||||
|
@ -1037,21 +1157,25 @@ h3.jetpack-reasons {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
input[type="text"],
|
||||
select,
|
||||
.select2-container {
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
}
|
||||
|
||||
.product-type-container {
|
||||
margin-top: 14px;
|
||||
margin-bottom: 1px;
|
||||
}
|
||||
|
||||
#woocommerce_sell_in_person {
|
||||
margin-left: 0;
|
||||
}
|
||||
|
||||
.wc-wizard-service-settings {
|
||||
|
||||
.payment-email-input {
|
||||
border: 1px solid #aaa;
|
||||
border-color: #ddd;
|
||||
|
@ -1132,6 +1256,7 @@ h3.jetpack-reasons {
|
|||
}
|
||||
|
||||
p {
|
||||
|
||||
&.next-step-heading {
|
||||
margin: 0;
|
||||
font-size: 0.95em;
|
||||
|
@ -1145,6 +1270,7 @@ h3.jetpack-reasons {
|
|||
}
|
||||
|
||||
h3 {
|
||||
|
||||
&.next-step-description {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
|
@ -1166,6 +1292,7 @@ h3.jetpack-reasons {
|
|||
font-size: 15px;
|
||||
margin: 1em 0 1em 1.5em;
|
||||
}
|
||||
|
||||
.button::last-child {
|
||||
margin-right: 1.5em;
|
||||
}
|
||||
|
@ -1177,11 +1304,11 @@ p.next-steps-help-text {
|
|||
color: #9f9f9f;
|
||||
padding: 0 2em;
|
||||
text-align: center;
|
||||
font-size: .9em;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
p.jetpack-terms {
|
||||
font-size: .8em;
|
||||
font-size: 0.8em;
|
||||
text-align: center;
|
||||
max-width: 480px;
|
||||
margin: 0 auto;
|
||||
|
@ -1213,7 +1340,8 @@ p.jetpack-terms {
|
|||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-setting-stripe_create_account, .wc-wizard-service-setting-ppec_paypal_reroute_requests {
|
||||
.wc-wizard-service-setting-stripe_create_account,
|
||||
.wc-wizard-service-setting-ppec_paypal_reroute_requests {
|
||||
display: flex;
|
||||
align-items: flex-start;
|
||||
|
||||
|
@ -1225,17 +1353,20 @@ p.jetpack-terms {
|
|||
width: 1.5em;
|
||||
}
|
||||
|
||||
.stripe_create_account, .ppec_paypal_reroute_requests {
|
||||
.stripe_create_account,
|
||||
.ppec_paypal_reroute_requests {
|
||||
order: 2;
|
||||
margin-left: 0.3em;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-setting-stripe_email, .wc-wizard-service-setting-ppec_paypal_email {
|
||||
.wc-wizard-service-setting-stripe_email,
|
||||
.wc-wizard-service-setting-ppec_paypal_email {
|
||||
margin-top: 0.75em;
|
||||
margin-left: 1.5em;
|
||||
|
||||
label.stripe_email, label.ppec_paypal_email {
|
||||
label.stripe_email,
|
||||
label.ppec_paypal_email {
|
||||
position: absolute;
|
||||
margin: -1px;
|
||||
padding: 0;
|
||||
|
@ -1248,7 +1379,7 @@ p.jetpack-terms {
|
|||
|
||||
input.payment-email-input {
|
||||
box-sizing: border-box;
|
||||
margin-bottom: .5em;
|
||||
margin-bottom: 0.5em;
|
||||
width: 100%;
|
||||
height: 32px;
|
||||
}
|
||||
|
@ -1262,20 +1393,22 @@ p.jetpack-terms {
|
|||
|
||||
.wc-setup-content .recommended-item {
|
||||
list-style: none;
|
||||
margin-bottom: 1.5em;
|
||||
|
||||
&:last-child label {
|
||||
&:last-child {
|
||||
margin-bottom: 0; // Avoid extra space at the end of the list.
|
||||
}
|
||||
|
||||
label {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
margin-bottom: 1.5em;
|
||||
|
||||
&:before, &:after {
|
||||
&::before,
|
||||
&::after {
|
||||
top: auto;
|
||||
}
|
||||
&:after {
|
||||
|
||||
&::after {
|
||||
margin-top: -1.5px;
|
||||
}
|
||||
}
|
||||
|
@ -1287,6 +1420,12 @@ p.jetpack-terms {
|
|||
margin-right: 1em;
|
||||
margin-left: 4px;
|
||||
|
||||
&.recommended-item-icon-wc_admin {
|
||||
background-color: #96588a;
|
||||
padding: 0.5em;
|
||||
height: 2em;
|
||||
}
|
||||
|
||||
&.recommended-item-icon-storefront_theme {
|
||||
background-color: #f4a224;
|
||||
max-height: 3em;
|
||||
|
@ -1309,16 +1448,17 @@ p.jetpack-terms {
|
|||
&.recommended-item-icon-woocommerce_services {
|
||||
background-color: #f0f0f0;
|
||||
max-height: 1.5em;
|
||||
padding: 1.3em .7em;
|
||||
padding: 1.3em 0.7em;
|
||||
}
|
||||
|
||||
&.recommended-item-icon-shipstation {
|
||||
background-color: #f0f0f0;
|
||||
padding: .3em;
|
||||
padding: 0.3em;
|
||||
}
|
||||
}
|
||||
|
||||
.recommended-item-description-container {
|
||||
|
||||
h3 {
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
|
@ -1343,6 +1483,7 @@ p.jetpack-terms {
|
|||
}
|
||||
|
||||
.wc-setup {
|
||||
|
||||
#tiptip_content {
|
||||
background: #5f6973;
|
||||
}
|
||||
|
@ -1359,13 +1500,17 @@ p.jetpack-terms {
|
|||
}
|
||||
|
||||
@media only screen and (max-width: 400px) {
|
||||
|
||||
#wc-logo img {
|
||||
max-width: 80%;
|
||||
}
|
||||
|
||||
.wc-setup-steps {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.store-address-container {
|
||||
|
||||
.city-and-postcode {
|
||||
display: block;
|
||||
|
||||
|
@ -1374,43 +1519,55 @@ p.jetpack-terms {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-service-item,
|
||||
.wc-wizard-services-list-toggle {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.wc-wizard-service-enable {
|
||||
order: 2;
|
||||
padding: 20px 0 0;
|
||||
}
|
||||
|
||||
.wc-wizard-service-description {
|
||||
order: 3;
|
||||
}
|
||||
|
||||
.wc-wizard-service-name {
|
||||
padding: 20px 20px 0;
|
||||
text-align: left;
|
||||
justify-content: space-between !important;
|
||||
|
||||
img {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.newsletter-form-container {
|
||||
display: block;
|
||||
|
||||
.newsletter-form-email {
|
||||
display: block;
|
||||
box-sizing: border-box;
|
||||
width: 100%;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.button.newsletter-form-button {
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
.wc-wizard-next-steps .wc-wizard-next-step-item {
|
||||
flex-wrap: wrap;
|
||||
|
||||
.wc-wizard-next-step-description {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.wc-wizard-next-step-action {
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
|
|
@ -733,7 +733,7 @@ p.demo_store,
|
|||
}
|
||||
|
||||
&:hover {
|
||||
background-color: $secondary - #111;
|
||||
background-color: darken($secondary, 5%);
|
||||
text-decoration: none;
|
||||
background-image: none;
|
||||
color: $secondarytext;
|
||||
|
@ -745,7 +745,7 @@ p.demo_store,
|
|||
-webkit-font-smoothing: antialiased;
|
||||
|
||||
&:hover {
|
||||
background-color: $primary - #111;
|
||||
background-color: darken($primary, 5%);
|
||||
color: $primarytext;
|
||||
}
|
||||
|
||||
|
@ -1101,6 +1101,10 @@ p.demo_store,
|
|||
small {
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
del {
|
||||
font-weight: normal;
|
||||
}
|
||||
}
|
||||
|
||||
tbody:first-child tr:first-child {
|
||||
|
@ -1420,7 +1424,7 @@ p.demo_store,
|
|||
.select2-container,
|
||||
input.input-text,
|
||||
select {
|
||||
border-color: $green - #111;
|
||||
border-color: darken($green, 5%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1674,7 +1678,7 @@ p.demo_store,
|
|||
|
||||
.price_slider_wrapper .ui-widget-content {
|
||||
border-radius: 1em;
|
||||
background-color: $primary - #444;
|
||||
background-color: darken($primary, 30%);
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
|
After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 9.0 KiB |
|
@ -0,0 +1 @@
|
|||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 31.5 27.78"><defs><style>.cls-1,.cls-2{fill:#fff;}.cls-2{stroke:#fff;stroke-linecap:round;stroke-miterlimit:10;stroke-width:1.5px;}</style></defs><title>Asset 5</title><g id="Layer_2" data-name="Layer 2"><g id="Layer_1-2" data-name="Layer 1"><path class="cls-1" d="M4.8,16.57H6.61a2,2,0,0,1,2,2v8.55a0,0,0,0,1,0,0H2.8a0,0,0,0,1,0,0V18.57A2,2,0,0,1,4.8,16.57Z"/><path class="cls-1" d="M14.85,7.53h1.81a2,2,0,0,1,2,2V27.12a0,0,0,0,1,0,0H12.85a0,0,0,0,1,0,0V9.53A2,2,0,0,1,14.85,7.53Z"/><path class="cls-1" d="M24.89,0H26.7a2,2,0,0,1,2,2V27.12a0,0,0,0,1,0,0H22.89a0,0,0,0,1,0,0V2A2,2,0,0,1,24.89,0Z"/><line class="cls-2" x1="0.75" y1="27.03" x2="30.75" y2="27.03"/></g></g></svg>
|
After Width: | Height: | Size: 729 B |
After Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 9.0 KiB |
|
@ -17,7 +17,7 @@
|
|||
// All have one property for `suggestionSlug`, to identify the specific suggestion message.
|
||||
|
||||
// Dismiss the specified suggestion from the UI, and save the dismissal in settings.
|
||||
function dismissSuggestion( context, suggestionSlug ) {
|
||||
function dismissSuggestion( context, product, promoted, url, suggestionSlug ) {
|
||||
// hide the suggestion in the UI
|
||||
var selector = '[data-suggestion-slug=' + suggestionSlug + ']';
|
||||
$( selector ).fadeOut( function() {
|
||||
|
@ -49,12 +49,16 @@
|
|||
}
|
||||
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_dismissed', {
|
||||
suggestion_slug: suggestionSlug
|
||||
suggestion_slug: suggestionSlug,
|
||||
context: context,
|
||||
product: product || '',
|
||||
promoted: promoted || '',
|
||||
target: url || ''
|
||||
} );
|
||||
}
|
||||
|
||||
// Render DOM element for suggestion dismiss button.
|
||||
function renderDismissButton( context, suggestionSlug ) {
|
||||
function renderDismissButton( context, product, promoted, url, suggestionSlug ) {
|
||||
var dismissButton = document.createElement( 'a' );
|
||||
|
||||
dismissButton.classList.add( 'suggestion-dismiss' );
|
||||
|
@ -62,7 +66,7 @@
|
|||
dismissButton.setAttribute( 'href', '#' );
|
||||
dismissButton.onclick = function( event ) {
|
||||
event.preventDefault();
|
||||
dismissSuggestion( context, suggestionSlug );
|
||||
dismissSuggestion( context, product, promoted, url, suggestionSlug );
|
||||
};
|
||||
|
||||
return dismissButton;
|
||||
|
@ -105,7 +109,7 @@
|
|||
}
|
||||
|
||||
// Render DOM element for suggestion linkout, optionally with button style.
|
||||
function renderLinkout( context, slug, url, text, isButton ) {
|
||||
function renderLinkout( context, product, promoted, slug, url, text, isButton ) {
|
||||
var linkoutButton = document.createElement( 'a' );
|
||||
|
||||
var utmUrl = addUTMParameters( context, url );
|
||||
|
@ -115,7 +119,11 @@
|
|||
|
||||
linkoutButton.onclick = function() {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_clicked', {
|
||||
suggestion_slug: slug
|
||||
suggestion_slug: slug,
|
||||
context: context,
|
||||
product: product || '',
|
||||
promoted: promoted || '',
|
||||
target: url || ''
|
||||
} );
|
||||
};
|
||||
|
||||
|
@ -145,7 +153,7 @@
|
|||
}
|
||||
|
||||
// Render DOM elements for suggestion content.
|
||||
function renderSuggestionContent( title, copy ) {
|
||||
function renderSuggestionContent( slug, title, copy ) {
|
||||
var container = document.createElement( 'div' );
|
||||
|
||||
container.classList.add( 'marketplace-suggestion-container-content' );
|
||||
|
@ -162,11 +170,31 @@
|
|||
container.appendChild( body );
|
||||
}
|
||||
|
||||
// Conditionally add in a Manage suggestions link to product edit
|
||||
// metabox footer (based on suggestion slug).
|
||||
var slugsWithManage = [
|
||||
'product-edit-empty-footer-browse-all',
|
||||
'product-edit-meta-tab-footer-browse-all'
|
||||
];
|
||||
if ( -1 !== slugsWithManage.indexOf( slug ) ) {
|
||||
container.classList.add( 'has-manage-link' );
|
||||
|
||||
var manageSuggestionsLink = document.createElement( 'a' );
|
||||
manageSuggestionsLink.classList.add( 'marketplace-suggestion-manage-link', 'linkout' );
|
||||
manageSuggestionsLink.setAttribute(
|
||||
'href',
|
||||
marketplace_suggestions.manage_suggestions_url
|
||||
);
|
||||
manageSuggestionsLink.textContent = marketplace_suggestions.i18n_marketplace_suggestions_manage_suggestions;
|
||||
|
||||
container.appendChild( manageSuggestionsLink );
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
// Render DOM elements for suggestion call-to-action – button or link with dismiss 'x'.
|
||||
function renderSuggestionCTA( context, slug, url, linkText, linkIsButton, allowDismiss ) {
|
||||
function renderSuggestionCTA( context, product, promoted, slug, url, linkText, linkIsButton, allowDismiss ) {
|
||||
var container = document.createElement( 'div' );
|
||||
|
||||
if ( ! linkText ) {
|
||||
|
@ -175,63 +203,20 @@
|
|||
|
||||
container.classList.add( 'marketplace-suggestion-container-cta' );
|
||||
if ( url && linkText ) {
|
||||
var linkoutElement = renderLinkout( context, slug, url, linkText, linkIsButton );
|
||||
var linkoutElement = renderLinkout( context, product, promoted, slug, url, linkText, linkIsButton );
|
||||
container.appendChild( linkoutElement );
|
||||
}
|
||||
|
||||
if ( allowDismiss ) {
|
||||
container.appendChild( renderDismissButton( context, slug ) );
|
||||
container.appendChild( renderDismissButton( context, product, promoted, url, slug ) );
|
||||
}
|
||||
|
||||
return container;
|
||||
}
|
||||
|
||||
function getTableBannerColspan() {
|
||||
return $( 'table.wp-list-table.posts thead th:not(.hidden)' ).length + 1;
|
||||
}
|
||||
|
||||
// Render a "table banner" style suggestion.
|
||||
// These are used in admin lists, e.g. products list.
|
||||
function renderTableBanner( context, slug, iconUrl, title, copy, url, buttonText, allowDismiss ) {
|
||||
if ( ! title || ! url ) {
|
||||
return;
|
||||
}
|
||||
|
||||
var row = document.createElement( 'tr' );
|
||||
row.classList.add( 'marketplace-table-banner' );
|
||||
row.classList.add( 'marketplace-suggestions-container' );
|
||||
row.classList.add( 'showing-suggestion' );
|
||||
row.dataset.marketplaceSuggestionsContext = 'products-list-inline';
|
||||
row.dataset.suggestionSlug = slug;
|
||||
|
||||
var cell = document.createElement( 'td' );
|
||||
cell.classList.add( 'marketplace-table-banner-td' );
|
||||
cell.setAttribute( 'colspan', getTableBannerColspan() );
|
||||
|
||||
var container = document.createElement( 'div' );
|
||||
container.classList.add( 'marketplace-suggestion-container' );
|
||||
container.dataset.suggestionSlug = slug;
|
||||
|
||||
var icon = renderSuggestionIcon( iconUrl );
|
||||
if ( icon ) {
|
||||
container.appendChild( icon );
|
||||
}
|
||||
container.appendChild(
|
||||
renderSuggestionContent( title, copy )
|
||||
);
|
||||
container.appendChild(
|
||||
renderSuggestionCTA( context, slug, url, buttonText, true, allowDismiss )
|
||||
);
|
||||
|
||||
cell.appendChild( container );
|
||||
row.appendChild( cell );
|
||||
|
||||
return row;
|
||||
}
|
||||
|
||||
// Render a "list item" style suggestion.
|
||||
// These are used in onboarding style contexts, e.g. products list empty state.
|
||||
function renderListItem( context, slug, iconUrl, title, copy, url, linkText, linkIsButton, allowDismiss ) {
|
||||
function renderListItem( context, product, promoted, slug, iconUrl, title, copy, url, linkText, linkIsButton, allowDismiss ) {
|
||||
var container = document.createElement( 'div' );
|
||||
container.classList.add( 'marketplace-suggestion-container' );
|
||||
container.dataset.suggestionSlug = slug;
|
||||
|
@ -241,10 +226,10 @@
|
|||
container.appendChild( icon );
|
||||
}
|
||||
container.appendChild(
|
||||
renderSuggestionContent( title, copy )
|
||||
renderSuggestionContent( slug, title, copy )
|
||||
);
|
||||
container.appendChild(
|
||||
renderSuggestionCTA( context, slug, url, linkText, linkIsButton, allowDismiss )
|
||||
renderSuggestionCTA( context, product, promoted, slug, url, linkText, linkIsButton, allowDismiss )
|
||||
);
|
||||
|
||||
return container;
|
||||
|
@ -267,7 +252,7 @@
|
|||
|
||||
// hide promos for things the user already has installed
|
||||
promos = _.filter( promos, function( promo ) {
|
||||
return ! _.contains( marketplace_suggestions.active_plugins, promo['hide-if-active'] );
|
||||
return ! _.contains( marketplace_suggestions.active_plugins, promo.product );
|
||||
} );
|
||||
|
||||
// hide promos that are not applicable based on user's installed extensions
|
||||
|
@ -327,12 +312,26 @@
|
|||
}
|
||||
}
|
||||
|
||||
function refreshBannerColspanForScreenOptions() {
|
||||
$( '#show-settings-link' ).on( 'focus.scroll-into-view', function() {
|
||||
$( '.marketplace-table-banner-td' ).attr( 'colspan', getTableBannerColspan() );
|
||||
function addManageSuggestionsTracksHandler() {
|
||||
$( 'a.marketplace-suggestion-manage-link' ).on( 'click', function() {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestions_manage_clicked' );
|
||||
} );
|
||||
}
|
||||
|
||||
function isContextHiddenOnPageLoad( context ) {
|
||||
// Some suggestions are not visible on page load;
|
||||
// e.g. the user reveals them by selecting a tab.
|
||||
var revealableSuggestionsContexts = [
|
||||
'product-edit-meta-tab-header',
|
||||
'product-edit-meta-tab-body',
|
||||
'product-edit-meta-tab-footer'
|
||||
];
|
||||
return _.includes( revealableSuggestionsContexts, context );
|
||||
}
|
||||
|
||||
// track the current product data tab to avoid over-tracking suggestions
|
||||
var currentTab = false;
|
||||
|
||||
// Render suggestion data in appropriate places in UI.
|
||||
function displaySuggestions( marketplaceSuggestionsApiData ) {
|
||||
var usedSuggestionsContexts = [];
|
||||
|
@ -366,6 +365,8 @@
|
|||
|
||||
var content = renderListItem(
|
||||
context,
|
||||
suggestionsToDisplay[ i ].product,
|
||||
suggestionsToDisplay[ i ].promoted,
|
||||
suggestionsToDisplay[ i ].slug,
|
||||
suggestionsToDisplay[ i ].icon,
|
||||
suggestionsToDisplay[ i ].title,
|
||||
|
@ -379,86 +380,42 @@
|
|||
$( this ).addClass( 'showing-suggestion' );
|
||||
usedSuggestionsContexts.push( context );
|
||||
|
||||
if ( ! isContextHiddenOnPageLoad( context ) ) {
|
||||
// Fire 'displayed' tracks events for immediately visible suggestions.
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
||||
suggestion_slug: suggestionsToDisplay[ i ].slug
|
||||
suggestion_slug: suggestionsToDisplay[ i ].slug,
|
||||
context: context,
|
||||
product: suggestionsToDisplay[ i ].product || '',
|
||||
promoted: suggestionsToDisplay[ i ].promoted || '',
|
||||
target: suggestionsToDisplay[ i ].url || ''
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}
|
||||
|
||||
// render inline promos in products list
|
||||
if ( 0 === usedSuggestionsContexts.length ) {
|
||||
$( '.wp-admin.admin-bar.edit-php.post-type-product table.wp-list-table.posts tbody').first().each( function() {
|
||||
var context = 'products-list-inline';
|
||||
// Track when suggestions are displayed (and not already visible).
|
||||
$( 'ul.product_data_tabs li.marketplace-suggestions_options a' ).click( function( e ) {
|
||||
e.preventDefault();
|
||||
|
||||
// product list banner suggestion is temporarily suppressed after a recent dismissal
|
||||
var contextSnoozeCookie = 'woocommerce_snooze_suggestions__' + context;
|
||||
if ( Cookies.get( contextSnoozeCookie ) ) {
|
||||
if ( '#marketplace_suggestions' === currentTab ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// product list banner suggestion has been dismissed repeatedly – give user a break
|
||||
// note that this is longer term but still temporary, based on the expiry of the cookie
|
||||
var hideSuggestionsDismissalThreshold = 5;
|
||||
if ( parseInt( Cookies.get( 'contextDismissalCountCookie' ), 10 ) > hideSuggestionsDismissalThreshold ) {
|
||||
if ( ! isContextHiddenOnPageLoad( context ) ) {
|
||||
// We've already fired 'displayed' event above.
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// find promotions that target this context
|
||||
var promos = getRelevantPromotions( marketplaceSuggestionsApiData, context );
|
||||
if ( ! promos || ! promos.length ) {
|
||||
return;
|
||||
}
|
||||
|
||||
// shuffle/randomly select the suggestion to display
|
||||
var suggestionToDisplay = _.sample( promos );
|
||||
|
||||
// dismiss is allowed by default
|
||||
var allowDismiss = true;
|
||||
if ( false === suggestionToDisplay['allow-dismiss'] ) {
|
||||
allowDismiss = false;
|
||||
}
|
||||
|
||||
// render first promo
|
||||
var content = renderTableBanner(
|
||||
context,
|
||||
suggestionToDisplay.slug,
|
||||
suggestionToDisplay.icon,
|
||||
suggestionToDisplay.title,
|
||||
suggestionToDisplay.copy,
|
||||
suggestionToDisplay.url,
|
||||
suggestionToDisplay['button-text'],
|
||||
allowDismiss
|
||||
);
|
||||
|
||||
if ( content ) {
|
||||
// where should we put it in the list?
|
||||
var rows = $( this ).children();
|
||||
var minRow = 3;
|
||||
|
||||
$( content ).hide();
|
||||
|
||||
if ( rows.length <= minRow ) {
|
||||
// if small number of rows, append at end
|
||||
$( this ).append( content );
|
||||
}
|
||||
else {
|
||||
// for more rows, insert
|
||||
$( rows[ minRow - 1 ] ).after( content );
|
||||
}
|
||||
|
||||
$( content ).fadeIn();
|
||||
|
||||
usedSuggestionsContexts.push( context );
|
||||
|
||||
refreshBannerColspanForScreenOptions( content );
|
||||
|
||||
for ( var i in suggestionsToDisplay ) {
|
||||
window.wcTracks.recordEvent( 'marketplace_suggestion_displayed', {
|
||||
suggestion_slug: suggestionToDisplay.slug
|
||||
suggestion_slug: suggestionsToDisplay[ i ].slug,
|
||||
context: context,
|
||||
product: suggestionsToDisplay[ i ].product || '',
|
||||
promoted: suggestionsToDisplay[ i ].promoted || '',
|
||||
target: suggestionsToDisplay[ i ].url || ''
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
|
||||
hidePageElementsForSuggestionState( usedSuggestionsContexts );
|
||||
tidyProductEditMetabox();
|
||||
|
@ -466,7 +423,15 @@
|
|||
|
||||
if ( marketplace_suggestions.suggestions_data ) {
|
||||
displaySuggestions( marketplace_suggestions.suggestions_data );
|
||||
|
||||
// track the current product data tab to avoid over-reporting suggestion views
|
||||
$( 'ul.product_data_tabs' ).on( 'click', 'li a', function( e ) {
|
||||
e.preventDefault();
|
||||
currentTab = $( this ).attr( 'href' );
|
||||
} );
|
||||
}
|
||||
|
||||
addManageSuggestionsTracksHandler();
|
||||
});
|
||||
|
||||
})( jQuery, marketplace_suggestions, ajaxurl );
|
||||
|
|
|
@ -21,6 +21,12 @@ jQuery(function( $ ) {
|
|||
// Get value
|
||||
var select_val = $( this ).val();
|
||||
|
||||
if ( 'percent' === select_val ) {
|
||||
$( '#coupon_amount' ).removeClass( 'wc_input_price' ).addClass( 'wc_input_decimal' );
|
||||
} else {
|
||||
$( '#coupon_amount' ).removeClass( 'wc_input_decimal' ).addClass( 'wc_input_price' );
|
||||
}
|
||||
|
||||
if ( select_val !== 'fixed_cart' ) {
|
||||
$( '.limit_usage_to_x_items_field' ).show();
|
||||
} else {
|
||||
|
|
|
@ -43,7 +43,8 @@ jQuery( function ( $ ) {
|
|||
input_name = $state.attr( 'name' ),
|
||||
input_id = $state.attr( 'id' ),
|
||||
value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val(),
|
||||
placeholder = $state.attr( 'placeholder' );
|
||||
placeholder = $state.attr( 'placeholder' ),
|
||||
$newstate;
|
||||
|
||||
if ( stickValue ){
|
||||
$this.data( 'woocommerce.stickState-' + country, value );
|
||||
|
@ -55,7 +56,8 @@ jQuery( function ( $ ) {
|
|||
if ( ! $.isEmptyObject( wc_meta_boxes_order.states[ country ] ) ) {
|
||||
var state = wc_meta_boxes_order.states[ country ],
|
||||
$defaultOption = $( '<option value=""></option>' )
|
||||
.text( woocommerce_admin_meta_boxes_order.i18n_select_state_text ),
|
||||
.text( woocommerce_admin_meta_boxes_order.i18n_select_state_text );
|
||||
|
||||
$newstate = $( '<select></select>' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
|
@ -76,12 +78,12 @@ jQuery( function ( $ ) {
|
|||
|
||||
$newstate.show().selectWoo().hide().change();
|
||||
} else {
|
||||
var $newstate = $( '<input type="text" />' )
|
||||
$newstate = $( '<input type="text" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state' )
|
||||
.val( value );
|
||||
.val( '' );
|
||||
$state.replaceWith( $newstate );
|
||||
}
|
||||
|
||||
|
@ -399,6 +401,7 @@ jQuery( function ( $ ) {
|
|||
wc_meta_boxes_order_items.block();
|
||||
|
||||
var user_id = $( '#customer_user' ).val();
|
||||
var user_email = $( '#_billing_email' ).val();
|
||||
|
||||
var data = $.extend( {}, wc_meta_boxes_order_items.get_taxable_address(), {
|
||||
action : 'woocommerce_add_coupon_discount',
|
||||
|
@ -406,7 +409,8 @@ jQuery( function ( $ ) {
|
|||
order_id : woocommerce_admin_meta_boxes.post_id,
|
||||
security : woocommerce_admin_meta_boxes.order_item_nonce,
|
||||
coupon : value,
|
||||
user_id : user_id
|
||||
user_id : user_id,
|
||||
user_email : user_email
|
||||
} );
|
||||
|
||||
$.post( woocommerce_admin_meta_boxes.ajax_url, data, function( response ) {
|
||||
|
|
|
@ -62,11 +62,16 @@ jQuery( function( $ ) {
|
|||
*/
|
||||
variable_manage_stock: function() {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.show_if_variation_manage_stock' ).hide();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.hide_if_variation_manage_stock' ).show();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).show();
|
||||
|
||||
if ( $( this ).is( ':checked' ) ) {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.show_if_variation_manage_stock' ).show();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.hide_if_variation_manage_stock' ).hide();
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).hide();
|
||||
}
|
||||
|
||||
// Parent level.
|
||||
if ( $( 'input#_manage_stock:checked' ).length ) {
|
||||
$( this ).closest( '.woocommerce_variation' ).find( '.variable_stock_status' ).hide();
|
||||
}
|
||||
},
|
||||
|
||||
|
@ -113,7 +118,8 @@ jQuery( function( $ ) {
|
|||
// Init TipTip
|
||||
$( '#tiptip_holder' ).removeAttr( 'style' );
|
||||
$( '#tiptip_arrow' ).removeAttr( 'style' );
|
||||
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper ).tipTip({
|
||||
$( '.woocommerce_variations .tips, .woocommerce_variations .help_tip, .woocommerce_variations .woocommerce-help-tip', wrapper )
|
||||
.tipTip({
|
||||
'attribute': 'data-tip',
|
||||
'fadeIn': 50,
|
||||
'fadeOut': 50,
|
||||
|
@ -190,7 +196,10 @@ jQuery( function( $ ) {
|
|||
offset = parseInt( ( current_page - 1 ) * woocommerce_admin_meta_boxes_variations.variations_per_page, 10 );
|
||||
|
||||
$( '.woocommerce_variations .woocommerce_variation' ).each( function ( index, el ) {
|
||||
$( '.variation_menu_order', el ).val( parseInt( $( el ).index( '.woocommerce_variations .woocommerce_variation' ), 10 ) + 1 + offset ).change();
|
||||
$( '.variation_menu_order', el )
|
||||
.val( parseInt( $( el )
|
||||
.index( '.woocommerce_variations .woocommerce_variation' ), 10 ) + 1 + offset )
|
||||
.change();
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -254,14 +263,16 @@ jQuery( function( $ ) {
|
|||
if ( $button.is( '.remove' ) ) {
|
||||
|
||||
$( '.upload_image_id', wc_meta_boxes_product_variations_media.setting_variation_image ).val( '' ).change();
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( 'img' ).eq( 0 ).attr( 'src', woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src );
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( 'img' ).eq( 0 )
|
||||
.attr( 'src', woocommerce_admin_meta_boxes_variations.woocommerce_placeholder_img_src );
|
||||
wc_meta_boxes_product_variations_media.setting_variation_image.find( '.upload_image_button' ).removeClass( 'remove' );
|
||||
|
||||
} else {
|
||||
|
||||
// If the media frame already exists, reopen it.
|
||||
if ( wc_meta_boxes_product_variations_media.variable_image_frame ) {
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.uploader.uploader.param( 'post_id', wc_meta_boxes_product_variations_media.setting_variation_image_id );
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.uploader.uploader
|
||||
.param( 'post_id', wc_meta_boxes_product_variations_media.setting_variation_image_id );
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.open();
|
||||
return;
|
||||
} else {
|
||||
|
@ -286,7 +297,8 @@ jQuery( function( $ ) {
|
|||
// When an image is selected, run a callback.
|
||||
wc_meta_boxes_product_variations_media.variable_image_frame.on( 'select', function () {
|
||||
|
||||
var attachment = wc_meta_boxes_product_variations_media.variable_image_frame.state().get( 'selection' ).first().toJSON(),
|
||||
var attachment = wc_meta_boxes_product_variations_media.variable_image_frame.state()
|
||||
.get( 'selection' ).first().toJSON(),
|
||||
url = attachment.sizes && attachment.sizes.thumbnail ? attachment.sizes.thumbnail.url : attachment.url;
|
||||
|
||||
$( '.upload_image_id', wc_meta_boxes_product_variations_media.setting_variation_image ).val( attachment.id ).change();
|
||||
|
@ -323,7 +335,8 @@ jQuery( function( $ ) {
|
|||
$( '#variable_product_options' )
|
||||
.on( 'click', 'button.save-variation-changes', this.save_variations )
|
||||
.on( 'click', 'button.cancel-variation-changes', this.cancel_variations )
|
||||
.on( 'click', '.remove_variation', this.remove_variation );
|
||||
.on( 'click', '.remove_variation', this.remove_variation )
|
||||
.on( 'click','.downloadable_files a.delete', this.input_changed );
|
||||
|
||||
$( document.body )
|
||||
.on( 'change', '#variable_product_options .woocommerce_variations :input', this.input_changed )
|
||||
|
@ -548,7 +561,8 @@ jQuery( function( $ ) {
|
|||
cancel_variations: function() {
|
||||
var current = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-page' ), 10 );
|
||||
|
||||
$( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' ).removeClass( 'variation-needs-update' );
|
||||
$( '#variable_product_options' ).find( '.woocommerce_variations .variation-needs-update' )
|
||||
.removeClass( 'variation-needs-update' );
|
||||
$( '.variations-defaults select' ).each( function() {
|
||||
$( this ).val( $( this ).attr( 'data-current' ) );
|
||||
});
|
||||
|
@ -577,6 +591,7 @@ jQuery( function( $ ) {
|
|||
var variation = $( response );
|
||||
variation.addClass( 'variation-needs-update' );
|
||||
|
||||
$( '.woocommerce-notice-invalid-variation' ).remove();
|
||||
$( '#variable_product_options' ).find( '.woocommerce_variations' ).prepend( variation );
|
||||
$( 'button.cancel-variation-changes, button.save-variation-changes' ).removeAttr( 'disabled' );
|
||||
$( '#variable_product_options' ).trigger( 'woocommerce_variations_added', 1 );
|
||||
|
@ -612,7 +627,9 @@ jQuery( function( $ ) {
|
|||
$.post( woocommerce_admin_meta_boxes_variations.ajax_url, data, function() {
|
||||
var wrapper = $( '#variable_product_options' ).find( '.woocommerce_variations' ),
|
||||
current_page = parseInt( wrapper.attr( 'data-page' ), 10 ),
|
||||
total_pages = Math.ceil( ( parseInt( wrapper.attr( 'data-total' ), 10 ) - 1 ) / woocommerce_admin_meta_boxes_variations.variations_per_page ),
|
||||
total_pages = Math.ceil( (
|
||||
parseInt( wrapper.attr( 'data-total' ), 10 ) - 1
|
||||
) / woocommerce_admin_meta_boxes_variations.variations_per_page ),
|
||||
page = 1;
|
||||
|
||||
$( '#woocommerce-product-data' ).trigger( 'woocommerce_variations_removed' );
|
||||
|
@ -721,7 +738,8 @@ jQuery( function( $ ) {
|
|||
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_delete_all_variations ) ) {
|
||||
if ( window.confirm( woocommerce_admin_meta_boxes_variations.i18n_last_warning ) ) {
|
||||
data.allowed = true;
|
||||
changes = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' ).attr( 'data-total' ), 10 ) * -1;
|
||||
changes = parseInt( $( '#variable_product_options' ).find( '.woocommerce_variations' )
|
||||
.attr( 'data-total' ), 10 ) * -1;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -240,6 +240,8 @@ jQuery( function( $ ) {
|
|||
$( 'div.stock_fields' ).hide();
|
||||
$( 'p.stock_status_field:not( .hide_if_' + product_type + ' )' ).show();
|
||||
}
|
||||
|
||||
$( 'input.variable_manage_stock' ).change();
|
||||
}).change();
|
||||
|
||||
// Date picker fields.
|
||||
|
|
|
@ -138,7 +138,7 @@ jQuery(function( $ ) {
|
|||
var groupby = $( this ) .data( 'groupby' );
|
||||
var index_type = $( this ).data( 'index_type' );
|
||||
var export_format = $( this ).data( 'export' );
|
||||
var csv_data = 'data:text/csv;charset=utf-8,\uFEFF';
|
||||
var csv_data = '';
|
||||
var s, series_data, d;
|
||||
|
||||
if ( 'table' === export_format ) {
|
||||
|
@ -243,8 +243,9 @@ jQuery(function( $ ) {
|
|||
} );
|
||||
}
|
||||
|
||||
csv_data = 'data:text/csv;charset=utf-8,\uFEFF' + encodeURIComponent( csv_data );
|
||||
// Set data as href and return
|
||||
$( this ).attr( 'href', encodeURI( csv_data ) );
|
||||
$( this ).attr( 'href', csv_data );
|
||||
return true;
|
||||
});
|
||||
});
|
||||
|
|
|
@ -161,12 +161,28 @@
|
|||
lastRow = $( this ).find( 'tbody tr:last' ),
|
||||
firstRow = $( this ).find( 'tbody tr:first' );
|
||||
|
||||
table.find( '.wc-item-reorder-nav .wc-move-disabled' ).removeClass( 'wc-move-disabled' ).attr( { 'tabindex': '0', 'aria-hidden': 'false' } );
|
||||
firstRow.find( '.wc-item-reorder-nav .wc-move-up' ).addClass( 'wc-move-disabled' ).attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
lastRow.find( '.wc-item-reorder-nav .wc-move-down' ).addClass( 'wc-move-disabled' ).attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
table.find( '.wc-item-reorder-nav .wc-move-disabled' ).removeClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '0', 'aria-hidden': 'false' } );
|
||||
firstRow.find( '.wc-item-reorder-nav .wc-move-up' ).addClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
lastRow.find( '.wc-item-reorder-nav .wc-move-down' ).addClass( 'wc-move-disabled' )
|
||||
.attr( { 'tabindex': '-1', 'aria-hidden': 'true' } );
|
||||
} );
|
||||
|
||||
$( '.wc-item-reorder-nav').closest( 'table' ).trigger( 'updateMoveButtons' );
|
||||
|
||||
|
||||
$( '.submit button' ).on( 'click', function() {
|
||||
if (
|
||||
$( 'select#woocommerce_allowed_countries' ).val() === 'specific' &&
|
||||
! $( '[name="woocommerce_specific_allowed_countries[]"]' ).val()
|
||||
) {
|
||||
if ( window.confirm( woocommerce_settings_params.i18n_no_specific_countries_selected ) ) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
} );
|
||||
|
||||
});
|
||||
})( jQuery, woocommerce_settings_params, wp );
|
||||
|
|
|
@ -36,7 +36,10 @@ jQuery( function ( $ ) {
|
|||
$parent = $state.parent(),
|
||||
input_name = $state.attr( 'name' ),
|
||||
input_id = $state.attr( 'id' ),
|
||||
value = $this.data( 'woocommerce.stickState-' + country ) ? $this.data( 'woocommerce.stickState-' + country ) : $state.val();
|
||||
stickstatefield = 'woocommerce.stickState-' + country,
|
||||
value = $this.data( stickstatefield ) ? $this.data( stickstatefield ) : $state.val(),
|
||||
placeholder = $state.attr( 'placeholder' ),
|
||||
$newstate;
|
||||
|
||||
if ( stickValue ){
|
||||
$this.data( 'woocommerce.stickState-' + country, value );
|
||||
|
@ -46,22 +49,37 @@ jQuery( function ( $ ) {
|
|||
$parent.show().find( '.select2-container' ).remove();
|
||||
|
||||
if ( ! $.isEmptyObject( wc_users_fields.states[ country ] ) ) {
|
||||
var $states_select = $( '<select name="' + input_name + '" id="' + input_id + '" class="js_field-state" style="width: 25em;"></select>' ),
|
||||
state = wc_users_fields.states[ country ];
|
||||
var state = wc_users_fields.states[ country ],
|
||||
$defaultOption = $( '<option value=""></option>' )
|
||||
.text( wc_users_fields.i18n_select_state_text );
|
||||
|
||||
$states_select.append( $( '<option value="">' + wc_users_params.i18n_select_state_text + '</option>' ) );
|
||||
$newstate = $( '<select style="width: 25em;"></select>' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state' )
|
||||
.append( $defaultOption );
|
||||
|
||||
$.each( state, function( index ) {
|
||||
$states_select.append( $( '<option value="' + index + '">' + state[ index ] + '</option>' ) );
|
||||
var $option = $( '<option></option>' )
|
||||
.prop( 'value', index )
|
||||
.text( state[ index ] );
|
||||
$newstate.append( $option );
|
||||
} );
|
||||
|
||||
$states_select.val( value );
|
||||
$newstate.val( value );
|
||||
|
||||
$state.replaceWith( $states_select );
|
||||
$state.replaceWith( $newstate );
|
||||
|
||||
$states_select.show().selectWoo().hide().change();
|
||||
$newstate.show().selectWoo().hide().change();
|
||||
} else {
|
||||
$state.replaceWith( '<input type="text" class="js_field-state" name="' + input_name + '" id="' + input_id + '" value="' + value + '" />' );
|
||||
$newstate = $( '<input type="text" />' )
|
||||
.prop( 'id', input_id )
|
||||
.prop( 'name', input_name )
|
||||
.prop( 'placeholder', placeholder )
|
||||
.addClass( 'js_field-state regular-text' )
|
||||
.val( value );
|
||||
$state.replaceWith( $newstate );
|
||||
}
|
||||
|
||||
// This event has a typo - deprecated in 2.5.0
|
||||
|
|
|
@ -1 +1 @@
|
|||
jQuery(function(d){var p={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=d.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),d(".js_field-country").selectWoo().change(this.change_country),d(".js_field-country").trigger("change",[!0]),d(document.body).on("change","select.js_field-state",this.change_state),d(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(e,t){if(void 0===t&&(t=!1),null!==p.states){var a=d(this),n=a.val(),i=a.parents(".form-table").find(":input.js_field-state"),c=i.parent(),s=i.attr("name"),o=i.attr("id"),l=a.data("woocommerce.stickState-"+n)?a.data("woocommerce.stickState-"+n):i.val();if(t&&a.data("woocommerce.stickState-"+n,l),c.show().find(".select2-container").remove(),d.isEmptyObject(p.states[n]))i.replaceWith('<input type="text" class="js_field-state" name="'+s+'" id="'+o+'" value="'+l+'" />');else{var r=d('<select name="'+s+'" id="'+o+'" class="js_field-state" style="width: 25em;"></select>'),u=p.states[n];r.append(d('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),d.each(u,function(e){r.append(d('<option value="'+e+'">'+u[e]+"</option>"))}),r.val(l),i.replaceWith(r),r.show().selectWoo().hide().change()}d(document.body).trigger("contry-change.woocommerce",[n,d(this).closest("div")]),d(document.body).trigger("country-change.woocommerce",[n,d(this).closest("div")])}},change_state:function(){var e=d(this),t=e.val(),a=e.parents(".form-table").find(":input.js_field-country"),n=a.val();a.data("woocommerce.stickState-"+n,t)},copy_billing:function(e){e.preventDefault(),d("#fieldset-billing").find("input, select").each(function(e,t){var a=t.name.replace(/^billing_/,"shipping_"),n=d('[name="'+a+'"]');n.length&&n.val(t.value).trigger("change")})}};p.init()});
|
||||
jQuery(function(g){var f={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=g.parseJSON(wc_users_params.countries.replace(/"/g,'"'))),g(".js_field-country").selectWoo().change(this.change_country),g(".js_field-country").trigger("change",[!0]),g(document.body).on("change","select.js_field-state",this.change_state),g(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(e,t){if(void 0===t&&(t=!1),null!==f.states){var a,n=g(this),o=n.val(),i=n.parents(".form-table").find(":input.js_field-state"),c=i.parent(),s=i.attr("name"),l=i.attr("id"),r="woocommerce.stickState-"+o,p=n.data(r)?n.data(r):i.val(),d=i.attr("placeholder");if(t&&n.data("woocommerce.stickState-"+o,p),c.show().find(".select2-container").remove(),g.isEmptyObject(f.states[o]))a=g('<input type="text" />').prop("id",l).prop("name",s).prop("placeholder",d).addClass("js_field-state regular-text").val(p),i.replaceWith(a);else{var u=f.states[o],h=g('<option value=""></option>').text(f.i18n_select_state_text);a=g('<select style="width: 25em;"></select>').prop("id",l).prop("name",s).prop("placeholder",d).addClass("js_field-state").append(h),g.each(u,function(e){var t=g("<option></option>").prop("value",e).text(u[e]);a.append(t)}),a.val(p),i.replaceWith(a),a.show().selectWoo().hide().change()}g(document.body).trigger("contry-change.woocommerce",[o,g(this).closest("div")]),g(document.body).trigger("country-change.woocommerce",[o,g(this).closest("div")])}},change_state:function(){var e=g(this),t=e.val(),a=e.parents(".form-table").find(":input.js_field-country"),n=a.val();a.data("woocommerce.stickState-"+n,t)},copy_billing:function(e){e.preventDefault(),g("#fieldset-billing").find("input, select").each(function(e,t){var a=t.name.replace(/^billing_/,"shipping_"),n=g('[name="'+a+'"]');n.length&&n.val(t.value).trigger("change")})}};f.init()});
|