Merge remote-tracking branch 'woocommerce/master'

This commit is contained in:
Job 2017-06-15 11:31:08 +02:00
commit 655579602e
574 changed files with 28514 additions and 10213 deletions

9
.babelrc Normal file
View File

@ -0,0 +1,9 @@
{
"presets": [
"es2015",
"stage-2"
],
"plugins": [
"add-module-exports"
]
}

View File

@ -11,7 +11,7 @@ GitHub is for _bug reports and contributions only_ - if you have a support quest
- [WooExperts](https://woocommerce.com/experts/)
- [Codeable](https://codeable.io/)
## Contributing To The Core
## Contributing to Core
### Reporting Issues
@ -78,7 +78,7 @@ We dont have a Style Guide template available, so feel free to create your ow
If you created a style guide for your language, please let us know so we can add it in the list above. You can also add it by yourself by submitting a PR for this file.
### Translating The Core
### Translating Core
We have a [project on translate.wordpress.org](https://translate.wordpress.org/projects/wp-plugins/woocommerce). You can join the localization team of your language and help by translating WooCommerce. [Find more about using joining a language team and using GlotPress](https://make.wordpress.org/polyglots/handbook/tools/glotpress-translate-wordpress-org/).
@ -93,7 +93,7 @@ By translating video tutorials you'll be helping non-English speaking users and
# Additional Resources
* [General GitHub documentation](https://help.github.com/)
* [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
* [GitHub pull request documentation](https://help.github.com/articles/about-pull-requests/)
* [Translator Handbook](https://make.wordpress.org/polyglots/handbook/)
* [WooCommerce Docs](https://docs.woocommerce.com/)
* [WooCommerce Support](https://support.woocommerce.com)

View File

@ -1,16 +1,18 @@
## EXPLANATION OF THE ISSUE
### EXPLANATION OF THE ISSUE
<!-- What happens, under which versions, under what conditions, when, and what were you expecting instead. -->
## STEPS TO REPRODUCE THE ISSUE
### STEPS TO REPRODUCE THE ISSUE
<!-- 1. List steps to reproduce your issue so we can replicate. -->
## SYSTEM STATUS REPORT
### SYSTEM STATUS
<details>
```
Grab the system status report from WooCommerce > System Status and paste it here.
Grab the system status report from WooCommerce > System Status and paste it here between the `details` tags.
```
</details>
<!--
BEFORE POSTING YOUR ISSUE

1
.gitignore vendored
View File

@ -32,6 +32,7 @@ tests/cli/vendor
# Unit tests
/tmp
/tests/bin/tmp
/tests/e2e-tests/config/local-*.json
# Logs
/logs

View File

@ -9,7 +9,6 @@ php:
- 5.6
- 7.0
- 7.1
- hhvm
env:
- WP_VERSION=latest WP_MULTISITE=0 PHP_LATEST_STABLE=7.1

Binary file not shown.

After

Width:  |  Height:  |  Size: 120 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 53 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 86 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 50 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 152 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 148 KiB

View File

@ -1,5 +1,299 @@
== Changelog ==
= 3.0.8 - 2017-06-06 =
* Fix - Include multi-dimensional array support in oAuth1.0.
* Fix - Stock/backorder notice when stock management is disabled.
* Fix - Handle shipping item taxes if set to avoid the legacy fallback.
* Fix - Variations should inherit purchase_note from parent.
* Fix - Check if subtotal is blank, not empty, before setting for order items.
* Fix - Cancelled email should be send for processing orders, not pending.
* Fix - Missing variable in legacy API.
* Fix - Correct price query when on a post type archive.
* Fix - Missing $ip Variable in geolocation class.
* Fix - A single multi-word attribute is fine for variation titles.
* Fix - Gallery should be updated even if empty in REST API.
* Fix - Fix saving of text attributes with special chars.
* Fix - Undefined index warning when saving variations with stock management disabled.
* Fix - Use meta id instead of key in WC_Order_Item::offsetGet.
* Fix - Format parent stock qty on read.
* Fix - Hide replies from recent reviews widgets.
* Fix - Use formatted weight and dimensions for variations.
* Fix - Ensure we have child before getting price to fix a notice in grouped products.
* Fix - Fixed unicode characters when saving webhook delivery logs.
* Fix - Avoid deprecated ID in legacy API.
* Fix - Add correct args to woocommerce_shipping_zone_method_deleted and woocommerce_shortcode_products_query hooks.
* Fix - Correctly append cache in product widget.
* Fix - Add ability to invalidate cache by object ID.
* Fix - Notice in structured data class.
* Fix - Only delete if an object has an ID in CRUD to avoid wp_delete_post using global ID.
* Fix - Avoid notices on checkout by ensuring all legacy data is correctly set.
* Fix - Add failed to processing event for the processing email.
* Fix - Store user ID and use that to determine if the session should be loaded or not. Ensures user data is correct and shipping calculator data is stored.
= 3.0.7 - 2017-05-16 =
* Fix - Display of grouped product permalinks + names.
* Fix - Ensure `wc_get_payment_gateway_by_order` has a valid order ID to avoid errors.
* Fix - Ensure `get_plugin_updates` exists in API.
* Fix - Correctly set rating term after updating product visibility.
* Fix - `is_ip_address` should be static.
* Fix - Handle clearing for 3, 4, and 5 columns in the product gallery.
* Fix - Some added protection against notices/errors in the assets and variation data-store files.
* Fix - If backorders are enabled, do not make variable products out of stock.
* Fix - Undefined function in `class-wc-embed.php`.
* Fix - Fix 'base location' not being returned via the settings API.
* Fix - When re-filling fields on checkout, only change the empty ones to avoid conflicts with gateway plugins and hidden fields.
* Fix - Make calculate tax function clear taxes if taxes are disabled on recalculation.
* Fix - Update all customer session address fields when updating via checkout.
* Fix - Support customer searches < 3 characters long, but with result limiting.
= 3.0.6 - 2017-05-09 =
* Fix - Fixed conflict between global attributes and custom attributes with the same names.
* Fix - Added missing "id" to API for shipping zone methods to support the CLI.
* Fix - Incorrect use of `wc_format_price_range` in `get_price_html_from_to`.
* Fix - Clone each meta object when cloning WC_Data object to avoid modifying original meta stdClass objects.
* Fix - Fix non numeric warning for some order data.
* Fix - Fixed a warning when no customer country is defined for state input.
* Fix - Use term name when reordering so correct data is passed to the new order.
* Fix - Formatting issues in wc_display_item_meta.
* Fix - Check if IP address is valid in IP address detection code.
* Fix - wc_attribute_taxonomy_id_by_name should use wc_sanitize_taxonomy_name to prevent breaking special chars.
* Fix - Correct variable name in order structured data.
* Fix - Prepend new item keys with `$items_key` to make them unique.
* Fix - Hide offers from structured markup when blank.
* Fix - Fixed "Process to checkout" button color in Twenty seventeen dark theme.
* Fix - Only set reply-to if the email + name is set.
* Fix - Correctly exclude terms in wc_get_related_products.
* Fix - Reset post data prevents grouped products working in shortcodes.
* Fix - Fix min price range comparisons.
* Fix - Properly save order items in legacy REST API.
* Fix - Use correct full size for variation images.
* Fix - Add noscript style for gallery.
* Fix - Fix/duplicate potential stock reduction with paypal.
* Tweak - Improve _wc_term_recount performance.
* Tweak - Improve plugin update detection in system status report to reduce timeouts.
* Tweak - Improve "Save Order" button to reproduce WordPress post/page behavior.
* Tweak - Added zipcode validation for France.
* Dev - Added woocommerce_shop_order_search_results filter.
= 3.0.5 - 2017-04-28 =
* Fix - Tooltip display within shipping zone modals.
* Fix - Fix missing title for actions column on mobile.
* Fix - Allow forward slash in telephone field.
* Fix - Sort grouped products by menu order when displaying.
* Fix - Fix term exclusion in term count queries.
* Fix - Filter invalid products before returning them for wc_get_products.
* Fix - Prevent orders being their own parent (causes errors).
* Fix - Correctly migrate legacy shipping taxes data.
* Fix - Make sure the meta data cache is not shared among instances.
* Fix - Correct the stock display notice when a variable product manages stock for it's children.
* Fix - On multisite, add user to blog during checkout if not a user to prevent errors.
* Fix - Correct sale price date handling with some timezone setups.
* Fix - wc_attribute_taxonomy_id_by_name needs to use lowercase attribute slug to work.
* Fix - Make changes to the buyer's company name in the shipping section of checkout persist.
* Tweak - Add required placeholder for meta fields in backend.
* Tweak - Don't strtolower address strings on checkout validation messages.
* REST API - Prevent password change notification when creating a customer.
* REST API - Removed duplicated items returned in shipping and checkout endpoints.
* CLI - Fixed missing shipping zones route.
* Dev - Make get_price_html handling match 2.6 and pass all values through woocommerce_get_price_html filter.
* Dev - Legacy customer class missing get_address / get_address_2 functions.
* Dev - Restored filter `woocommerce_checkout_customer_id` during checkout validation.
* Dev - Adds missing `$this` argument for all `woocommerce_payment_complete_order_status` filters.
= 3.0.4 - 2017-04-20 =
* Fix - Variations were not inheriting the product image and shipping class ID.
* Fix - Prevent rating/review counts being duplicated when duplicating products.
* Fix - Fixed gallery navigation between images with long captions.
* Fix - Support transparent PNG in the gallery by setting a background color.
* Fix - Removed name/company from the shipping address Google map links.
* Fix - Fixed the address field sorting script on the checkout.
* Fix - Fixed the upgrade routine for grouped products so that parents are unset.
* Fix - Fixed support for WordPress 4.7 user locale settings.
* Fix - Fixed default option filter for product types in the product meta box.
* Fix - Improved the css in Twenty Seventeen for dark color schemes.
* Fix - Fixed display of refunds in sales report.
* Fix - Updated `single-product/add-to-cart/variable.php` template version to 3.0.0 since it had changes since 2.6.
* Fix - Fixed warnings when product attribute do not exists.
* Fix - Used a div for comment-form-rating to prevent invalid nested markup.
* Fix - Fixed some logic that checks if order taxes are compound.
* Fix - Fixed SKU checks to only exclude products that are trashed.
* Fix - Fixed display of download permissions in first email sent after checkout.
* Fix - Hidden the backorder notification stock text when notification is disabled.
* Fix - Fixed incorrect stock numbers in low stock emails.
* Tweak - Removed the non-functional order total input box, and combined the recalculation buttons into one working button.
* Tweak - Updated Guided Tour videos.
* Tweak - Updated js-cookie.js to 2.1.4.
* Tweak - Updated schema.org URLs to use HTTPS.
* Tweak - Status report request timeouts.
* REST API - Fixed an issue that prevented deleting a term if errors were thrown during creation.
* REST API - Fixed reports endpoint when querying by date.
* REST API - Fixed ignored order parameters when changing order status.
* Dev - Support guest orders in `wc_get_orders` function.
* Dev - Fixed downloadable variation filters for download URLs.
* Dev - Added safeguards to prevent infinite loops while saving coupons, products and orders in admin.
* Dev - Added a fallback for `queue_transactional_email` if background sending is disabled.
* Dev - Added `has_shipping_address` helper method.
* Dev - Introduced `woocommerce_order_item_get_formatted_meta_data` filter.
* Dev - Made wc_add_order_item pass correct values to woocommerce_new_order_item.
* Dev - Fixed `legacy_posted_data` access in checkout class.
* Dev - Fixed undefined property notice in `WC_Order_Item::offsetGet`.
* Dev - Fixed PHP 7.1 warnings when using non-float values to `wc_get_weight()`.
* Dev - Fixed incorrect variable name in `wc_add_order_item()`.
= 3.0.3 - 2017-04-13 =
* Fix - Fixed an issue with variation tax-classes when set to 'parent'. This made taxes apply on top of the tax inclusive price in certain setups.
* Fix - Escaped attribute translations in the `cart.php` template and bumped the template version to match.
* Fix - Corrected the display of refund dates on the order screen.
* Fix - Fixed the grouped product visibility check in the grouped.php template and bumped the template version to match.
* Fix - Fixed the sale badge display for grouped products.
* Fix - Added the `itemReviewed` structured data for product reviews to make it validate.
* Fix - Made the `get_attribute` method work on variation objects.
* Tweak - Turned off the deferred email sending by default which was added in 3.0. Whilst it does improve performance, there were compatibility problems on some servers. It can be enabled with a filter if desired.
* Dev - Added backtrace information to the deprecation messages to help find problem plugins.
= 3.0.2 - 2017-04-12 =
* Fix - Removed required states for GP, GF, KW, LB, MQ, RE and YT countries.
* Fix - Made cache in the [products] shortcode respect filters from plugins.
* Fix - Added missing `woocommerce_cross_sells_columns` filter.
* Fix - Fixed shortcode rendering on the shop page.
* Fix - Fixed incorrect sale dates when bulk editing variations.
* Fix - Fixed calls to wc_reduce_stock_levels in PayPal and Simplify gateways.
* Fix - Exclude "location" meta when reading customer meta data.
* Fix - Updated `emails/email-addresses.php`, `emails/email-order-details.php`, `content-single-product.php`, `checkout/form-shipping.php`, `myaccount/form-add-payment-method.php`, `myaccount/form-edit-address.php`, `myaccount/form-lost-password.php`, `myaccount/form-reset-password.php`, `myaccount/orders.php` and `myaccount/view-order.php` template version to 3.0.0 since they had changes since 2.6.
* Fix - Fixed default behavior of variation tax classes when originally set to "parent".
* Fix - When duplicating products, do not copy slug, append "(Copy)" to the product name, correctly copy all meta data, and prevent children of grouped products being duplicated too.
* Fix - Removed duplicated items when outputting cross sells on the cart page.
* Fix - Fixed output of default "add to cart" text of external products in loops.
* Fix - Fixed backwards compatibility of guest checkout rules when being altered by plugins directly.
* Fix - Use correct thumbnail sizes for variation images in the new gallery.
* Fix - Fixed captions on thumbnails and main image in the new gallery.
* Fix - Trigger wc_fragments_loaded after add to cart fragment refresh.
* Fix - Download permissions; Convert dates to timestamp on read so UTC is preserved.
* Fix - Fixed notices under PHP 7.1 when sorting products by name (numeric).
* Fix - Added additional checks to ensure objects are read before using class methods to avoid errors.
* Fix - Removed legacy suggest.js code which was causing JS error on bulk edit.
* Fix - Fixed warnings on the "Lost password" page and when loading a product with invalid attributes.
* Fix - Made background emailer update the queue after a successful send so duplicate mails are less likely.
* Fix - Typo in flexslider_enabled option in new gallery script.
* Fix - woocommerce_notify_low_stock and woocommerce_notify_no_stock options had no effect.
* Tweak - For downloadable files, only validate file type when dealing with relative paths.
* Tweak - Improved automatic variation name generation.
* Dev - Added product visibility terms to system status report to help debug.
* Dev - Introduced `woocommerce_admin_order_date_format` filter to replace missing `post_date_column_time`.
* Dev - Introduced `woocommerce_update_customer_args` filter to prevent updates to user objects if needed.
* REST API - Fixed saving of variations in legacy REST API v3.
* REST API - Fixed backwards compatibility of line_items meta in legacy REST API.
= 3.0.1 - 2017-04-06 =
* Fix - Show catalog hidden products within grouped products.
* Fix - Fade in the gallery in if no images are set or it's custom.
* Fix - Use wc_deprecated_function in WC_Deprecated_Hooks so notices aren't output in ajax requests.
* Fix - Added back the ability to include extra items to the System Status using the `woocommerce_system_status_environment_rows` filter.
* Fix - Coupon category restrictions and limits for variations.
* Fix - Allow shortcodes and HTML in variation descriptions like in 2.6.
* Fix - Unset post date when duplicating products.
* Fix - Show a sale price on variable products if on sale and all prices are the same.
* Fix - Corrected download links when a product has multiple downloads.
* Fix - Prevented potential errors if the product type was not posted for any reason on save.
* Fix - Updated `single-product/up-sells.php`, `loop/add-to-cart.php`, `loop/rating.php`, `checkout/form-billing.php`, and `content-product.php` template version to 3.0.0.
* Fix - Included clearfixes on billing and shipping field wrappers,
* Fix - Fixed styling of logs table in some languages.
* Fix - Fixed display of variation attributes on old orders.
* Fix - Use placeholder text for external products add to cart button text if left blank.
* Fix - Fallback to home URL if no shop page is set for system status security check for HTTPS.
* Fix - For variations, pull tax status and sold individually from the parent since there is no UI to set this at variation level.
* Fix - Moved cron emails to background processing to avoid multiple sends.
* Fix - Wrapped structured data in a hidden element when added to emails.
* Fix - Missing gateway information in queued emails.
* Fix - Fixed a bug that caused pages to permanently reload if "Default customer location" was set to "Geolocate (with page caching support)".
* Fix - When forcing shipping to billing, set the shipping fields in the order itself.
* Fix - Check for invalid objects in WC_Register_WP_Admin_Settings.
* Fix - Check for error object in wc_get_object_terms.
* Fix - Removed slashes in shipping meta data on the order edit screen.
* Fix - Prevented permalink rewrites for attributes with missing names.
* Fix - Fixed saving of meta data when multiple extensions use the `save_post` action.
* Fix - Allow search customers by ID in edit order screen.
* Fix - Prevents session data overwriting customer data on login.
* Fix - Fixed cross-sell column display and variation support.
* Fix - Fixed variable product stock syncing on save.
* Fix - Included try/catch wrapper to prevent issues with Select2.
* Fix - Prevented a bug that deleted all variations when the product type was change from variable to simple.
* Fix - Switched to WPDB to quicker update when syncing titles for variations.
* Fix - Exclude deprecated properties when loading a customer object.
* Fix - Fixed notices while trying to order again.
* Fix - Fixed notices when `$wpdb->prefix` is empty.
* Fix - Prevent errors when loading a product with an invalid download file types.
* REST API - Fixed missing array declaration in CRUD controller.
* REST API - Removed extra `exclude`, `include` and `search` parameters from taxes endpoint.
* REST API - Fixed variation description formatting.
* REST API - Fixed incorrect attribute check in products endpoint in Legacy REST API.
* REST API - Allow variation image to be unset.
= 3.0.0 - 2017-04-04 =
* New gallery on single product pages with better mobile support, using PhotoSwipe and Zoom. Declare support with add_theme_support() - wc-product-gallery-zoom, wc-product-gallery-lightbox, wc-product-gallery-slider
* Made the store notice dismissible on the frontend.
* Variable products no longer show striked out prices in combination with ranges for clarity when on sale.
* Prices no longer display as 'free' instead of 0, to fix issues with ranges and localization and for consistency.
* Improved structured product data by using JSON-LD instead of inline Microdata.
* Improved downloads list layout (template file).
* Respect stock status and prevent the "out of stock threshold" setting affecting existing in-stock products.
* Improved handling of shop page rewrite rules to allow subpages.
* Redirect to login after password reset.
* When using authorizations in PayPal Standard, automatically capture funds when the order goes processing/completed.
* On multisite, when a user logs into a store with an account on a site, but not the current site, rather than error, add the user to the current site as a customer.
* Show variable weights/dimensions even when parent values are not set.
* Automatically sort tax rates rather than allow clunky manual sorting.
* When deleting a tax rate class, remove it's tax rates.
* Made WC_Logger pluggable via wc_get_logger function.
* Use 'average rating' post meta for 'rating' product sorting option.
* Show better labels in nav menus metabox.
* Sort “Recently Viewed” products by the view order.
* Removed internal scroll from log viewer.
* Add reply-to to admin emails.
* Improved the zone setup flow.
* Made wc_get_wildcard_postcodes return the orignal postcode plus * since wildcards should match empty strings too.
* Use all paid statuses in $customer->get_total_spent().
* Move location of billing email field to work with password managers.
* Option to restrict selling locations by country.
* Added tool to clear orphaned variations in system status.
* Remove checkbox options in system status tools and replace with constants.
* Added security section in system status report.
* Add image_url setting to PayPal Standard.
* Fixed attribute registration. Attributes are non-hierarchical by default (parent is not supported).
* Add sort parameter to checkout fields to aid with sorting per locale.
* Merged percent and percent product coupon types (they provide the same discount).
* Prevent payment details being cleared after update_checkout events.
* Performance - Converted _featured and _visibility meta data to terms for faster catalog queries. Upgrade routine handles migration. Developers may need to update queries to reflect this change.
* Includes product attributes archives links in "Additional Information" tab.
* Select2 has been upgraded to v4.
* Improved logging system for extensions.
* Tax suffix is now hidden on non-taxable products.
* Grouped products are linked from the parent rather than the children. Children can be in more than one group.
* Removed coupon usage link in coupons admin screen.
* Performance - Converted rating filters to visibility terms.
* Performance - Added visibility term for outofstock products to speed those queries up also.
* Performance - Introduced a new CRUD (create, read, update, delete) system for Products, Orders, Customers and Shipping Zones.
* Performance - Optimised variable product sync. Upper/lower price meta is no longer stored, just the main prices, if a child has weight, and if a child has dimensions.
* Performance - Removed WP_Query from up-sells.php and related.php and replaced with PHP foreach loop (since we already have the product IDs).
* Performance - Removed the feature where old orders get access to new downloads on product edit. Looping potentially thousands of orders to do this is too much of a performance burden for stores and this can sometimes be unexpected behavior too. This does however updates *edited* downloads.
* Performance - Removed 'items' column on orders screen due to loading excessive data.
* Performance - Deferred email sending for faster checkouts. Now uses CRON.
* API - New Rest API v2 with support for meta_data amongst other things.
* API - Removed last order from customers part of the API due to performance concerns - use orders endpoint instead. Other order data on the endpoint is now transient cached.
* API - Allow oAuth1.0a authentication using headers.
* API - New Shipping Zones endpoints.
* API - New variations endpoints.
* API - New settings endpoints.
* API - Payment gateways and shipping methods endpoints.
* API - Prevented the (broken) ability to manipulate variations directly on the products endpoints.
* CLI - New CLI which uses the REST API endpoints rather than it's own functions.
* Localization - Improved RTL support.
* Localization - Added a language independent permalink setting function.
* Localization - Added inline comments for placeholder strings.
* Localization - Added Nigerian and Pakistan Provinces to i18n/state.
* Localization - US and Poland postcode validation.
* To read more about this release, see our dev blog announcement here: http://wp.me/p6wtcw-Uo
= 2.6.14 - 2017-02-02 =
* Fix - Ensure product exists in wc_update_product_stock.
* Fix - Send emails using the site language.

View File

@ -115,8 +115,7 @@ module.exports = function( grunt ) {
sass: {
compile: {
options: {
sourcemap: 'none',
loadPath: require( 'node-bourbon' ).includePaths
sourcemap: 'none'
},
files: [{
expand: true,
@ -249,6 +248,12 @@ module.exports = function( grunt ) {
'cd apigen',
'php hook-docs.php'
].join( '&&' )
},
e2e_test: {
command: 'npm run --silent test:single tests/e2e-tests/' + grunt.option( 'file' )
},
e2e_tests: {
command: 'npm run --silent test'
}
},
@ -278,6 +283,26 @@ module.exports = function( grunt ) {
'!vendor/**' // Exclude vendor/
]
}
},
// Autoprefixer.
postcss: {
options: {
processors: [
require( 'autoprefixer' )({
browsers: [
'> 0.1%',
'ie 8',
'ie 9'
]
})
]
},
dist: {
src: [
'<%= dirs.css %>/*.css'
]
}
}
});
@ -295,6 +320,7 @@ module.exports = function( grunt ) {
grunt.loadNpmTasks( 'grunt-contrib-clean' );
grunt.loadNpmTasks( 'grunt-stylelint' );
grunt.loadNpmTasks( 'grunt-phpcs' );
grunt.loadNpmTasks( 'grunt-postcss' );
// Register tasks
grunt.registerTask( 'default', [
@ -312,6 +338,7 @@ module.exports = function( grunt ) {
grunt.registerTask( 'css', [
'sass',
'rtlcss',
'postcss',
'cssmin',
'concat'
]);
@ -325,4 +352,12 @@ module.exports = function( grunt ) {
'default',
'makepot'
]);
grunt.registerTask( 'e2e-tests', [
'shell:e2e_tests'
]);
grunt.registerTask( 'e2e-test', [
'shell:e2e_test'
]);
};

View File

@ -9,11 +9,11 @@ If you are not a developer, please use the [WooCommerce plugin page](https://wor
* [WooCommerce Code Reference](https://docs.woocommerce.com/wc-apidocs/)
* [WooCommerce REST API Docs](https://woocommerce.github.io/woocommerce-rest-api-docs/)
## Reporting Security issues
## Reporting Security Issues
To disclose a security issue to our team, [please submit a report via HackerOne here](https://hackerone.com/automattic/).
## Support
This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core WooCommerce issues only. Support can take place in the appropriate channels:
This repository is not suitable for support. Please don't use our issue tracker for support requests, but for core, WooCommerce issues only. Support can take place through the appropriate channels:
* The [WooCommerce premium support portal](https://woocommerce.com/my-account/create-a-ticket/) for customers who have purchased themes or extensions.
* [Our community forum on wp.org](https://wordpress.org/support/plugin/woocommerce) which is available for all WooCommerce users.
@ -21,4 +21,7 @@ This repository is not suitable for support. Please don't use our issue tracker
Support requests in issues on this repository will be closed on sight.
## Contributing to WooCommerce
If you have a patch, or stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our [contributor guidelines](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md) for more information how you can do this.
If you have a patch or have stumbled upon an issue with WooCommerce core, you can contribute this back to the code. Please read our [contributor guidelines](https://github.com/woocommerce/woocommerce/blob/master/.github/CONTRIBUTING.md) for more information how you can do this.
## Contributing new features to the WooCommerce REST API
If you're like to add a feature to the next version of the REST API, contribute here: https://github.com/woocommerce/wc-api-dev

View File

@ -26,7 +26,7 @@ charset: [UTF-8]
main: WC
# title of generated documentation
title: WooCommerce 2.6.x Code Reference
title: WooCommerce 3.0.x Code Reference
# base url used for sitemap (useful for public doc)
baseUrl: https://docs.woocommerce.com/wc-apidocs/

View File

@ -18,31 +18,32 @@ class WC_HookFinder {
$dir = '';
}
return self::get_files( basename( $pattern ), $flags, $dir . '/' );
return self::get_files( basename( $pattern ), $flags, $dir . '/' );
} // End IF Statement
} // End IF Statement
$paths = glob( $path . '*', GLOB_ONLYDIR | GLOB_NOSORT );
$files = glob( $path . $pattern, $flags );
$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;
}
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 );
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;
}
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'] ) ) {
@ -166,7 +167,7 @@ class WC_HookFinder {
if ( isset( self::$custom_hooks_found[ $hook ] ) ) {
self::$custom_hooks_found[ $hook ]['file'][] = self::$current_file;
} else {
self::$custom_hooks_found[ $hook ] = array(
self::$custom_hooks_found[ $hook ] = array(
'line' => $token[2],
'class' => $current_class,
'function' => $current_function,

View File

@ -83,7 +83,7 @@
</li>
<li class="api">
<a href="https://woothemes.github.io/woocommerce-rest-api-docs/"><span>REST API Docs</span></a>
<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>

View File

@ -2,8 +2,8 @@
* _animation.scss
* Custom WooCommerce Animations.
*/
@include keyframes( spin ) {
@keyframes spin {
100% {
@include transform( rotate( 360deg ) );
transform: rotate( 360deg );
}
}

View File

@ -259,7 +259,7 @@
margin-left: -0.5em;
margin-top: -0.5em;
content: '';
@include animation( spin 1s ease-in-out infinite );
animation: spin 1s ease-in-out infinite;
background: url('../images/icons/loader.svg') center center;
background-size: cover;
line-height: 1;

View File

@ -1 +1 @@
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}
div.woocommerce-message{overflow:hidden;position:relative;border-right-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,-1px 0 1px #a36597,0 1px 1px #a36597,1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;left:0;padding:10px 21px 10px 15px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;right:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-right:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::before{content:'\e01b';font-family:WooCommerce;text-align:center;line-height:1;color:#f7f1f6;display:block;width:1em;font-size:20em;top:36px;left:12px;position:absolute}

View File

@ -1 +1 @@
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::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}
div.woocommerce-message{overflow:hidden;position:relative;border-left-color:#cc99c2!important}div.woocommerce-message p{max-width:700px}.woocommerce-message a.button-primary,p.woocommerce-actions a.button-primary{background:#bb77ae;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597;color:#fff;text-shadow:0 -1px 1px #a36597,1px 0 1px #a36597,0 1px 1px #a36597,-1px 0 1px #a36597}.woocommerce-message a.button-primary:active,.woocommerce-message a.button-primary:focus,.woocommerce-message a.button-primary:hover,p.woocommerce-actions a.button-primary:active,p.woocommerce-actions a.button-primary:focus,p.woocommerce-actions a.button-primary:hover{background:#a36597;border-color:#a36597;box-shadow:inset 0 1px 0 rgba(255,255,255,.25),0 1px 0 #a36597}.woocommerce-message a.woocommerce-message-close,p.woocommerce-actions a.woocommerce-message-close{position:absolute;top:0;right:0;padding:10px 15px 10px 21px;font-size:13px;line-height:1.23076923;text-decoration:none}.woocommerce-message a.woocommerce-message-close::before,p.woocommerce-actions a.woocommerce-message-close::before{position:absolute;top:8px;left:0;-webkit-transition:all .1s ease-in-out;transition:all .1s ease-in-out}.woocommerce-message a.button-primary,.woocommerce-message a.button-secondary,p.woocommerce-actions a.button-primary,p.woocommerce-actions a.button-secondary{text-decoration:none!important}.woocommerce-message .twitter-share-button,p.woocommerce-actions .twitter-share-button{margin-top:-3px;margin-left:3px;vertical-align:middle}.woocommerce-about-text,p.woocommerce-actions{margin-bottom:1em!important}div.woocommerce-legacy-shipping-notice,div.woocommerce-no-shipping-methods-notice{overflow:hidden;padding:1px 12px}div.woocommerce-legacy-shipping-notice p,div.woocommerce-no-shipping-methods-notice p{position:relative;z-index:1;max-width:700px;line-height:1.5em;margin:12px 0}div.woocommerce-legacy-shipping-notice p.main,div.woocommerce-no-shipping-methods-notice p.main{font-size:1.1em}div.woocommerce-legacy-shipping-notice::before,div.woocommerce-no-shipping-methods-notice::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}

View File

@ -3,11 +3,6 @@
* Styles applied to elements displayed on activation
*/
/**
* Imports
*/
@import 'bourbon';
/**
* Styling begins
*/
@ -25,7 +20,6 @@ p.woocommerce-actions,
a.button-primary {
background: #bb77ae;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
color: #fff;
text-shadow: 0 -1px 1px #a36597, 1px 0 1px #a36597, 0 1px 1px #a36597, -1px 0 1px #a36597;
@ -33,7 +27,6 @@ p.woocommerce-actions,
&:hover, &:focus, &:active {
background: #a36597;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
}
}
@ -50,7 +43,6 @@ p.woocommerce-actions,
position: absolute;
top: 8px;
left: 0;
-webkit-transition: all 0.1s ease-in-out;
transition: all 0.1s ease-in-out;
}
}

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 0 0 1em}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:right;height:70px;margin:0 0 0 1em}.wc-auth-logged-in-as .wc-auth-logout{float:left}.wc-auth .wc-auth-actions{overflow:hidden;padding-right:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:left;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:left;opacity:1;text-shadow:0 -1px 1px #8a4f7f,-1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:left}.wc-auth .wc-auth-actions .wc-auth-deny{float:right;margin-right:-24px}
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 0 0 1em}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:right;height:70px;margin:0 0 0 1em}.wc-auth-logged-in-as .wc-auth-logout{float:left}.wc-auth .wc-auth-actions{overflow:hidden;padding-right:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:left;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:left;opacity:1;text-shadow:0 -1px 1px #8a4f7f,-1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:left}.wc-auth .wc-auth-actions .wc-auth-deny{float:right;margin-right:-24px}

View File

@ -1 +1 @@
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 1em 0 0}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:left;height:70px;margin:0 1em 0 0}.wc-auth-logged-in-as .wc-auth-logout{float:right}.wc-auth .wc-auth-actions{overflow:hidden;padding-left:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:right;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;-webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:right;opacity:1;text-shadow:0 -1px 1px #8a4f7f,1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,-1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:right}.wc-auth .wc-auth-actions .wc-auth-deny{float:left;margin-left:-24px}
body{background:#f1f1f1;box-shadow:none;margin:100px auto 24px;padding:0}#wc-logo{border:0;margin:0 0 24px;padding:0;text-align:center}#wc-logo img{max-width:50%}.wc-auth-content{background:#fff;box-shadow:0 1px 3px rgba(0,0,0,.13);overflow:hidden;padding:24px 24px 0;zoom:1}.wc-auth-content h1,.wc-auth-content h2,.wc-auth-content h3,.wc-auth-content table{border:0;clear:none;color:#666;margin:0 0 24px;padding:0}.wc-auth-content p,.wc-auth-content ul{color:#666;font-size:1em;line-height:1.75em;margin:0 0 24px}.wc-auth-content p{padding:0}.wc-auth-content a{color:#a16696}.wc-auth-content a:focus,.wc-auth-content a:hover{color:#111}.wc-auth-content .wc-auth-login label{color:#999;display:block;margin-bottom:.5em}.wc-auth-content .wc-auth-login input{box-sizing:border-box;font-size:1.3em;padding:.5em;width:100%}.wc-auth-content .wc-auth-login .wc-auth-actions{padding:0}.wc-auth-content .wc-auth-login .wc-auth-actions .wc-auth-login-button{float:none;width:100%}.wc-auth-permissions{list-style:disc inside;padding:0}.wc-auth-permissions li{font-size:1em}.wc-auth-logged-in-as{background:#f5f5f5;border-bottom:2px solid #eee;line-height:70px;margin:0 0 24px;padding:0 1em 0 0}.wc-auth-logged-in-as p{margin:0;line-height:70px}.wc-auth-logged-in-as img{float:left;height:70px;margin:0 1em 0 0}.wc-auth-logged-in-as .wc-auth-logout{float:right}.wc-auth .wc-auth-actions{overflow:hidden;padding-left:24px}.wc-auth .wc-auth-actions .button{background:#f7f7f7;border:1px solid #d7d7d7;box-sizing:border-box;color:#777;float:right;font-size:1.25em;height:auto;line-height:1em;padding:1em 2em;text-align:center;width:50%}.wc-auth .wc-auth-actions .button:focus,.wc-auth .wc-auth-actions .button:hover{background:#fcfcfc}.wc-auth .wc-auth-actions .button-primary{background:#ad6ea1;border-color:#a16696;box-shadow:inset 0 1px 0 rgba(255,255,255,.2),0 1px 0 rgba(0,0,0,.15);color:#fff;float:right;opacity:1;text-shadow:0 -1px 1px #8a4f7f,1px 0 1px #8a4f7f,0 1px 1px #8a4f7f,-1px 0 1px #8a4f7f}.wc-auth .wc-auth-actions .button-primary:focus,.wc-auth .wc-auth-actions .button-primary:hover{background:#b472a8;color:#fff}.wc-auth .wc-auth-actions .wc-auth-approve{float:right}.wc-auth .wc-auth-actions .wc-auth-deny{float:left;margin-left:-24px}

View File

@ -128,7 +128,6 @@ body {
.button-primary {
background: #ad6ea1;
border-color: #a16696;
-webkit-box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
box-shadow: inset 0 1px 0 rgba( 255, 255, 255, 0.2 ), 0 1px 0 rgba( 0, 0, 0, 0.15 );
color: #fff;
float: right;

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}#woocommerce_dashboard_status .wc_status_list li.low-in-stock,#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 0 12px 12px;text-indent:0;top:0;right:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month,#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b3b3;float:right;top:0;right:0;position:absolute;letter-spacing:.1em;letter-spacing:0\9}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;letter-spacing:0\9;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:right;font-size:.8em;border-right:1px solid #fff;border-left:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-right:0}ul.woocommerce_stats li:last-child{border-left:0}#woocommerce_dashboard_status .wc_status_list li.low-in-stock,#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-left:1px solid #ececec}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:right;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:left;position:absolute;left:0;top:50%;margin-left:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 0 12px 12px;text-indent:0;top:0;right:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:right}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month,#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:right;margin:0 0 5px 10px}#woocommerce_dashboard_recent_reviews .star-rating{float:left;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-right:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b3b3;float:right;top:0;right:0;position:absolute;letter-spacing:.1em;letter-spacing:0\9}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:right;top:0;right:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;right:0;letter-spacing:.1em;letter-spacing:0\9;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}#woocommerce_dashboard_status .wc_status_list li.low-in-stock,#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 12px 12px 0;text-indent:0;top:0;left:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month,#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b3b3;float:left;top:0;left:0;position:absolute;letter-spacing:.1em;letter-spacing:0\9}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;letter-spacing:0\9;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}ul.woocommerce_stats{overflow:hidden;zoom:1}ul.woocommerce_stats li{width:25%;padding:0 1em;text-align:center;float:left;font-size:.8em;border-left:1px solid #fff;border-right:1px solid #ececec;box-sizing:border-box}ul.woocommerce_stats li:first-child{border-left:0}ul.woocommerce_stats li:last-child{border-right:0}#woocommerce_dashboard_status .wc_status_list li.low-in-stock,#woocommerce_dashboard_status .wc_status_list li.processing-orders{border-right:1px solid #ececec}ul.woocommerce_stats strong{font-family:Georgia,'Times New Roman','Bitstream Charter',Times,serif;font-size:4em;line-height:1.2em;font-weight:400;text-align:center;display:block}#woocommerce_dashboard_status .inside{padding:0;margin:0}#woocommerce_dashboard_status .wc_status_list{overflow:hidden;margin:0}#woocommerce_dashboard_status .wc_status_list li{width:50%;float:left;padding:0;box-sizing:border-box;margin:0;border-top:1px solid #ececec;color:#aaa}#woocommerce_dashboard_status .wc_status_list li a{display:block;color:#aaa;padding:9px 12px;-webkit-transition:all ease .5s;transition:all ease .5s;position:relative;font-size:12px}#woocommerce_dashboard_status .wc_status_list li a .wc_sparkline{width:4em;height:2em;display:block;float:right;position:absolute;right:0;top:50%;margin-right:12px;margin-top:-1.25em}#woocommerce_dashboard_status .wc_status_list li a strong{font-size:18px;line-height:1.2em;font-weight:400;display:block;color:#21759b}#woocommerce_dashboard_status .wc_status_list li a:hover{color:#2ea2cc}#woocommerce_dashboard_status .wc_status_list li a:hover strong,#woocommerce_dashboard_status .wc_status_list li a:hover::before{color:#2ea2cc!important}#woocommerce_dashboard_status .wc_status_list li a::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0 12px 12px 0;text-indent:0;top:0;left:0;height:100%;text-align:center;content:"";font-size:2em;position:relative;width:auto;line-height:1.2em;color:#464646;float:left}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month,#woocommerce_dashboard_status .wc_status_list li.sales-this-month{width:100%}#woocommerce_dashboard_status .wc_status_list li:first-child{border-top:0}#woocommerce_dashboard_status .wc_status_list li.sales-this-month a::before{font-family:Dashicons;content:'\f185'}#woocommerce_dashboard_status .wc_status_list li.best-seller-this-month a::before{content:'\e006'}#woocommerce_dashboard_status .wc_status_list li.processing-orders a::before{content:'\e011';color:#7ad03a}#woocommerce_dashboard_status .wc_status_list li.on-hold-orders a::before{content:'\e033';color:#999}#woocommerce_dashboard_status .wc_status_list li.low-in-stock a::before{content:'\e016';color:#ffba00}#woocommerce_dashboard_status .wc_status_list li.out-of-stock a::before{content:'\e013';color:#a00}#woocommerce_dashboard_recent_reviews li{line-height:1.5em;margin-bottom:12px}#woocommerce_dashboard_recent_reviews h4.meta{line-height:1.4;margin:-.2em 0 0;font-weight:400;color:#999}#woocommerce_dashboard_recent_reviews blockquote{padding:0;margin:0}#woocommerce_dashboard_recent_reviews .avatar{float:left;margin:0 10px 5px 0}#woocommerce_dashboard_recent_reviews .star-rating{float:right;overflow:hidden;position:relative;height:1.5em;line-height:1.5;margin-left:.5em;width:5.4em;font-family:WooCommerce!important}#woocommerce_dashboard_recent_reviews .star-rating::before{content:'\e021\e021\e021\e021\e021';color:#b3b3b3;float:left;top:0;left:0;position:absolute;letter-spacing:.1em;letter-spacing:0\9}#woocommerce_dashboard_recent_reviews .star-rating span{overflow:hidden;float:left;top:0;left:0;position:absolute;padding-top:1.5em}#woocommerce_dashboard_recent_reviews .star-rating span::before{content:'\e020\e020\e020\e020\e020';top:0;position:absolute;left:0;letter-spacing:.1em;letter-spacing:0\9;color:#9c5d90}#dash-right-now li.product-count a::before{font-family:WooCommerce;content:'\e01d'}

View File

@ -6,7 +6,6 @@
/**
* Imports
*/
@import 'bourbon';
@import 'mixins';
@import 'variables';
@import 'fonts';
@ -70,7 +69,7 @@ ul.woocommerce_stats {
display: block;
color: #aaa;
padding: 9px 12px;
-webkit-transition: all ease 0.5s;
transition: all ease 0.5s;
position: relative;
font-size: 12px;

File diff suppressed because one or more lines are too long

1
assets/css/helper.css Normal file

File diff suppressed because one or more lines are too long

1038
assets/css/helper.scss Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice::before{content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 -2px 0 8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;right:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}#woocommerce-update .updating-message .wc_plugin_upgrade_notice{display:none}#woocommerce-update .wc_plugin_upgrade_notice{font-weight:400;color:#fff!important;background:#d54d21!important;padding:1em!important;margin:9px 0!important}#woocommerce-update .wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}#woocommerce-update .wc_plugin_upgrade_notice::before{color:#fff!important;content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 -2px 0 8px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}

View File

@ -1 +1 @@
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}.wc_plugin_upgrade_notice{font-weight:400;color:#fff;background:#d54d21;padding:1em;margin:9px 0}.wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}.wc_plugin_upgrade_notice::before{content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}
@charset "UTF-8";@font-face{font-family:star;src:url(../fonts/star.eot);src:url(../fonts/star.eot?#iefix) format("embedded-opentype"),url(../fonts/star.woff) format("woff"),url(../fonts/star.ttf) format("truetype"),url(../fonts/star.svg#star) format("svg");font-weight:400;font-style:normal}@font-face{font-family:WooCommerce;src:url(../fonts/WooCommerce.eot);src:url(../fonts/WooCommerce.eot?#iefix) format("embedded-opentype"),url(../fonts/WooCommerce.woff) format("woff"),url(../fonts/WooCommerce.ttf) format("truetype"),url(../fonts/WooCommerce.svg#WooCommerce) format("svg");font-weight:400;font-style:normal}#adminmenu #toplevel_page_woocommerce .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e03d'}#adminmenu #menu-posts-product .menu-icon-post div.wp-menu-image::before,#adminmenu #menu-posts-product .menu-icon-product div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e006'}#adminmenu #toplevel_page_wc-reports .menu-icon-generic div.wp-menu-image::before{font-family:WooCommerce!important;content:'\e023';font-size:1.3em!important}span.mce_woocommerce_shortcodes_button{background-image:none!important;display:block;text-indent:-9999px;position:relative;height:1em;width:1em}span.mce_woocommerce_shortcodes_button::before{font-family:WooCommerce;speak:none;font-weight:400;font-variant:normal;text-transform:none;-webkit-font-smoothing:antialiased;margin:0;text-indent:0;position:absolute;top:0;left:0;width:100%;height:100%;text-align:center;content:"";font-size:.9em;line-height:1.2}#woocommerce-update .updating-message .wc_plugin_upgrade_notice{display:none}#woocommerce-update .wc_plugin_upgrade_notice{font-weight:400;color:#fff!important;background:#d54d21!important;padding:1em!important;margin:9px 0!important}#woocommerce-update .wc_plugin_upgrade_notice a{color:#fff;text-decoration:underline}#woocommerce-update .wc_plugin_upgrade_notice::before{color:#fff!important;content:'\f348';display:inline-block;font:400 18px/1 dashicons;speak:none;margin:0 8px 0 -2px;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;vertical-align:top}

View File

@ -7,7 +7,6 @@
/**
* Imports
*/
@import 'bourbon';
@import 'mixins';
@import 'variables';
@import 'fonts';
@ -43,26 +42,34 @@ span.mce_woocommerce_shortcodes_button {
}
}
.wc_plugin_upgrade_notice {
font-weight: normal;
color: #fff;
background: #d54d21;
padding: 1em;
margin: 9px 0;
a {
color: #fff;
text-decoration: underline;
#woocommerce-update {
.updating-message {
.wc_plugin_upgrade_notice {
display: none;
}
}
.wc_plugin_upgrade_notice {
font-weight: normal;
color: #fff !important;
background: #d54d21 !important;
padding: 1em !important;
margin: 9px 0 !important;
&::before {
content: '\f348';
display: inline-block;
font: 400 18px/1 dashicons;
speak: none;
margin: 0 8px 0 -2px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
vertical-align: top;
a {
color: #fff;
text-decoration: underline;
}
&::before {
color: #fff !important;
content: '\f348';
display: inline-block;
font: 400 18px/1 dashicons;
speak: none;
margin: 0 8px 0 -2px;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
vertical-align: top;
}
}
}

View File

@ -31,6 +31,7 @@
margin: 0;
float: right;
opacity: 0.75;
z-index: 1600;
-webkit-transition: opacity 0.2s;
transition: opacity 0.2s;
-webkit-box-shadow: none;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -7,7 +7,6 @@
/**
* Imports
*/
@import 'bourbon';
@import 'mixins';
@import 'variables';
@import 'fonts';

View File

@ -1 +1 @@
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-right:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-right:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-right:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}

View File

@ -1 +1 @@
*{background:0 0!important;color:#000!important;text-shadow:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}
*{background:0 0!important;color:#000!important;text-shadow:none!important;-webkit-filter:none!important;filter:none!important;-ms-filter:none!important;font-size:9pt!important;opacity:1;-webkit-transition:none!important;transition:none!important}@page{margin:.5cm}#adminmenuback,#adminmenuwrap,#screen-meta-links,#wpadminbar,#wpfooter,.update-nag,.updated,.woo-nav-tab-wrapper,.woocommerce-reports-wide .button,.woocommerce-reports-wide .postbox h3.stats_range .export_csv,.woocommerce-reports-wrap .postbox h3.stats_range .export_csv{display:none}h2 .nav-tab{line-height:14px}.woocommerce-reports-wide .postbox h3.stats_range ul li a,.woocommerce-reports-wide .postbox h3.stats_range ul li.custom,.woocommerce-reports-wrap .postbox h3.stats_range ul li a,.woocommerce-reports-wrap .postbox h3.stats_range ul li.custom{padding:5px;line-height:14px}#wpcontent{margin-left:0}.woocommerce-reports-wide .postbox .chart-with-sidebar .chart-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar .chart-sidebar{margin-left:-130px;width:130px;display:block}.woocommerce-reports-wide .postbox .chart-with-sidebar,.woocommerce-reports-wrap .postbox .chart-with-sidebar{padding-left:130px}.chart-legend{overflow:hidden;zoom:1}.chart-legend li{padding:.25em .5em!important;box-shadow:none!important;border-bottom:1px solid gray!important}

View File

@ -11,7 +11,7 @@
-ms-filter: none !important;
font-size: 9pt !important;
opacity: 1;
-webkit-transition: none !important;
transition: none !important;
}
@page {

File diff suppressed because one or more lines are too long

View File

@ -301,8 +301,6 @@
border: 1px solid #aaa;
border-radius: 4px;
outline: 0;
background-image: -webkit-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: -o-linear-gradient(top, white 50%, #eeeeee 100%);
background-image: linear-gradient(to bottom, white 50%, #eeeeee 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
@ -329,8 +327,6 @@
top: 1px;
right: 1px;
width: 20px;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, #cccccc 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, #cccccc 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFCCCCCC', GradientType=0); }
@ -371,8 +367,6 @@
border-top: none;
border-top-left-radius: 0;
border-top-right-radius: 0;
background-image: -webkit-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: -o-linear-gradient(top, white 0%, #eeeeee 50%);
background-image: linear-gradient(to bottom, white 0%, #eeeeee 50%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFFFFFFF', endColorstr='#FFEEEEEE', GradientType=0); }
@ -381,8 +375,6 @@
border-bottom: none;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
background-image: -webkit-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: -o-linear-gradient(top, #eeeeee 50%, white 100%);
background-image: linear-gradient(to bottom, #eeeeee 50%, white 100%);
background-repeat: repeat-x;
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#FFEEEEEE', endColorstr='#FFFFFFFF', GradientType=0); }

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -2,8 +2,6 @@
* Twenty Seventeen integration styles
*/
@import 'bourbon';
/**
* Fonts
*/
@ -34,7 +32,7 @@
*/
@mixin link() {
box-shadow: 0 1px 0 rgba(15, 15, 15, 1);
@include transition( box-shadow ease-in-out 130ms );
transition: box-shadow ease-in-out 130ms;
&:hover {
box-shadow: 0 3px 0 rgba(15, 15, 15, 1);
@ -44,7 +42,7 @@
@mixin link_white() {
color: #fff;
box-shadow: 0 1px 0 rgba(#fff, 1) !important;
@include transition( box-shadow ease-in-out 130ms );
transition: box-shadow ease-in-out 130ms;
&:hover {
color: #fff !important;
@ -90,7 +88,7 @@
float: none;
line-height: 1.5;
border-radius: 2px;
@include transition( background-color ease-in-out .3s );
transition: background-color ease-in-out .3s;
}
span.page-numbers {
@ -272,7 +270,6 @@ a.remove {
text-align: center;
border-radius: 100%;
box-shadow: none !important;
-webkit-box-shadow: none !important;
border: 1px solid #000;
&:hover {
@ -372,6 +369,10 @@ table.variations {
margin: 0;
}
.zoomImg {
background-color: #fff;
}
.woocommerce-product-gallery__image:nth-child(n+2) {
width: 25%;
display: inline-block;
@ -403,18 +404,27 @@ table.variations {
.flex-control-thumbs li {
width: 33.3333%;
}
.flex-control-thumbs li:nth-child(3n+1) {
clear: left;
}
}
.woocommerce-product-gallery--columns-4 {
.flex-control-thumbs li {
width: 25%;
}
.flex-control-thumbs li:nth-child(4n+1) {
clear: left;
}
}
.woocommerce-product-gallery--columns-5 {
.flex-control-thumbs li {
width: 20%;
}
.flex-control-thumbs li:nth-child(5n+1) {
clear: left;
}
}
.woocommerce-product-gallery__trigger {
@ -814,11 +824,9 @@ button.pswp__button--zoom:hover {
text-align: center;
font-weight: 800;
box-shadow: none !important;
-webkit-box-shadow: none !important;
&:hover {
box-shadow: none !important;
-webkit-box-shadow: none !important;
border-color: #999;
}
@ -848,7 +856,7 @@ button.pswp__button--zoom:hover {
background: #bbb;
border-radius: 13em;
box-sizing: content-box;
@include transition(all,ease-in-out,.3s);
transition: all ease-in-out .3s;
position: absolute;
top: 4px;
right: 0;
@ -864,7 +872,7 @@ button.pswp__button--zoom:hover {
top: 7px;
right: 17px;
border-radius: 13em;
@include transition(all,ease-in-out,.3s);
transition: all ease-in-out .3s;
}
}
@ -883,11 +891,16 @@ button.pswp__button--zoom:hover {
}
}
.woocommerce-terms-and-conditions {
border: 1px solid rgba(0,0,0,.2);
box-shadow: inset 0 1px 2px rgba(0,0,0,.1);
background: rgba(0,0,0,.05);
}
.woocommerce-checkout {
.select2-choice,
.select2-choice:hover {
box-shadow: none !important;
-webkit-box-shadow: none !important;
}
.select2-choice {
@ -954,7 +967,7 @@ button.pswp__button--zoom:hover {
cursor: pointer;
}
input[type=radio] {
input.input-radio[name=payment_method] {
display: none;
& + label {
@ -969,7 +982,7 @@ button.pswp__button--zoom:hover {
margin-left: 4px;
margin-right: .5em;
border-radius: 100%;
@include transform(translateY(2px));
transform: translateY(2px);
}
}
@ -981,6 +994,42 @@ button.pswp__button--zoom:hover {
}
}
.colors-dark {
.checkout-button {
border: 2px solid #555;
&:hover {
border-color: #fff;
}
}
.wc_payment_method {
.payment_box {
background: #333;
}
}
.select2-container--default {
.select2-results {
.select2-results__options {
background:#333;
}
.select2-results__option[aria-selected="true"]{
color: #333;
}
}
.select2-selection--single {
background-color: #333;
border: 1px solid #555;
.select2-selection__rendered {
color: #ccc;
}
}
}
}
/**
* Layout stuff
*/

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -16,6 +16,7 @@ body {
.wc-setup-content {
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.13);
padding: 24px 24px 0;
margin: 0 0 20px;
background: #fff;
overflow: hidden;
zoom: 1;
@ -215,6 +216,7 @@ body {
.wc-setup-next-steps {
overflow: hidden;
margin: 0 0 24px;
padding-bottom: 2px;
h2 {
margin-bottom: 12px;
}
@ -237,12 +239,12 @@ body {
padding: 0 0 0.75em;
}
.setup-product {
a {
background-color: #bb77ae;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
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;
a.button {
background-color: #f7f7f7;
border-color: #ccc;
color: #23282d;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #ccc;
text-shadow: 1px 0 1px #eee, 0 1px 1px #eee;
font-size: 1em;
height: auto;
line-height: 1.75em;
@ -252,9 +254,21 @@ body {
text-align: center;
&:hover, &:focus, &:active {
background: #f5f5f5;
border-color: #aaa;
}
}
a.button-primary {
color: #fff;
background-color: #bb77ae;
border-color: #a36597;
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 {
color: #fff;
background: #a36597;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
}
}
@ -304,8 +318,6 @@ body {
overflow: hidden;
color: #ccc;
width:100%;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
li {
width: 20%;
@ -361,7 +373,6 @@ body {
.button-primary {
background-color: #bb77ae;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
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;
float: right;
@ -371,7 +382,6 @@ body {
&:hover, &:focus, &:active {
background: #a36597;
border-color: #a36597;
-webkit-box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25), 0 1px 0 #a36597;
}
}
@ -384,6 +394,63 @@ body {
text-align: center;
}
.wc-wizard-storefront {
.wc-wizard-storefront-intro {
padding: 40px 40px 0;
background: #F5F5F5;
text-align: center;
img {
margin: 40px 0 0 0;
width: 100%;
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;
width: 50%;
box-sizing: border-box;
&::before {
margin-left: -2em;
position: absolute;
}
&.first {
clear: both;
float: left;
}
&.last {
float: right;
}
}
.wc-wizard-storefront-feature__bulletproof::before {
content: '🔒';
}
.wc-wizard-storefront-feature__mobile::before {
content: '📱';
}
.wc-wizard-storefront-feature__accessibility::before {
content: '👓';
}
.wc-wizard-storefront-feature__search::before {
content: '🔍';
}
.wc-wizard-storefront-feature__compatibility::before {
content: '🔧';
}
.wc-wizard-storefront-feature__extendable::before {
content: '🎨';
}
}
ul.wc-wizard-shipping-methods,
ul.wc-wizard-payment-gateways {
border: 1px solid #eee;
border-bottom-width: 2px;
@ -392,6 +459,7 @@ ul.wc-wizard-payment-gateways {
list-style: none outside;
border-radius: 4px;
li.wc-wizard-shipping,
li.wc-wizard-gateway {
padding: 1.5em 1em 1em 4em;
border-top: 1px solid #eee;
@ -417,6 +485,7 @@ ul.wc-wizard-payment-gateways {
border-right: 0;
}
.wc-wizard-shipping-settings,
.wc-wizard-gateway-settings {
display: none;
margin-bottom: 0;
@ -426,19 +495,26 @@ ul.wc-wizard-payment-gateways {
&.checked {
background: #f7f1f6;
.wc-wizard-shipping-settings,
.wc-wizard-gateway-settings {
display: table;
}
}
.wc-wizard-shipping-description,
.wc-wizard-gateway-description {
font-style: italic;
p {
margin: 0 0 0.5em;
}
p:last-child {
margin-bottom: 0;
}
}
.wc-wizard-shipping-enable,
.wc-wizard-gateway-enable {
margin: 0 0 0.5em;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@
/**
* Imports
*/
@import 'bourbon';
@import 'mixins';
@import 'variables';
@ -342,6 +341,23 @@
float: right;
}
}
.woocommerce-billing-fields,
.woocommerce-shipping-fields {
@include clearfix();
}
.woocommerce-terms-and-conditions {
margin-bottom: 1.618em;
padding: 1.618em;
}
/**
* oEmbeds
*/
.woocommerce-oembed {
position: relative;
}
}
.woocommerce-account {

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,6 @@
/**
* Imports
*/
@import 'bourbon';
@import 'mixins';
@import 'variables';

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 374 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 135 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -240,10 +240,9 @@ jQuery( function ( $ ) {
.on( 'click', 'button.add-order-fee', this.add_fee )
.on( 'click', 'button.add-order-shipping', this.add_shipping )
.on( 'click', 'button.add-order-tax', this.add_tax )
.on( 'click', 'button.calculate-action', this.calculate_totals )
.on( 'click', 'button.save-action', this.save_line_items )
.on( 'click', 'a.delete-order-tax', this.delete_tax )
.on( 'click', 'button.calculate-tax-action', this.calculate_tax )
.on( 'click', 'button.calculate-action', this.recalculate )
.on( 'click', 'a.edit-order-item', this.edit_item )
.on( 'click', 'a.delete-order-item', this.delete_item )
.on( 'click', 'tr.item, tr.fee, tr.shipping, tr.refund', this.select_row )
@ -524,8 +523,8 @@ jQuery( function ( $ ) {
return false;
},
calculate_tax: function() {
if ( window.confirm( woocommerce_admin_meta_boxes.calc_line_taxes ) ) {
recalculate: function() {
if ( window.confirm( woocommerce_admin_meta_boxes.calc_totals ) ) {
wc_meta_boxes_order_items.block();
var country = '';
@ -575,49 +574,6 @@ jQuery( function ( $ ) {
return false;
},
calculate_totals: function() {
if ( window.confirm( woocommerce_admin_meta_boxes.calc_totals ) ) {
wc_meta_boxes_order_items.block();
// Get row totals
var line_totals = 0;
var tax = 0;
var shipping = 0;
$( '.woocommerce_order_items tr.shipping input.line_total' ).each(function() {
var cost = $( this ).val() || '0';
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
shipping = shipping + parseFloat( cost );
});
$( '.woocommerce_order_items input.line_tax' ).each(function() {
var cost = $( this ).val() || '0';
cost = accounting.unformat( cost, woocommerce_admin.mon_decimal_point );
tax = tax + parseFloat( cost );
});
$( '.woocommerce_order_items tr.item, .woocommerce_order_items tr.fee' ).each(function() {
var line_total = $( this ).find( 'input.line_total' ).val() || '0';
line_totals = line_totals + accounting.unformat( line_total.replace( ',', '.' ) );
});
// Tax
if ( 'yes' === woocommerce_admin_meta_boxes.round_at_subtotal ) {
tax = parseFloat( accounting.toFixed( tax, woocommerce_admin_meta_boxes.rounding_precision ) );
}
// Set Total
$( '#_order_total' )
.val( accounting.formatNumber( line_totals + tax + shipping, woocommerce_admin_meta_boxes.currency_format_num_decimals, '', woocommerce_admin.mon_decimal_point ) )
.change();
$( 'button.save-action' ).click();
}
return false;
},
save_line_items: function() {
var data = {
order_id: woocommerce_admin_meta_boxes.post_id,
@ -837,8 +793,8 @@ jQuery( function ( $ ) {
var index = $items.find('tr').length + 1;
var $row = '<tr data-meta_id="0">' +
'<td>' +
'<input type="text" name="meta_key[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']" />' +
'<textarea name="meta_value[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']"></textarea>' +
'<input type="text" placeholder="' + woocommerce_admin_meta_boxes_order.placeholder_name + '" name="meta_key[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']" />' +
'<textarea placeholder="' + woocommerce_admin_meta_boxes_order.placeholder_value + '" name="meta_value[' + $item.attr( 'data-order_item_id' ) + '][new-' + index + ']"></textarea>' +
'</td>' +
'<td width="1%"><button class="remove_order_item_meta button">&times;</button></td>' +
'</tr>';

File diff suppressed because one or more lines are too long

View File

@ -1,4 +1,4 @@
/*global ajaxurl, inlineEditPost, inlineEditL10n, woocommerce_admin */
/*global inlineEditPost, woocommerce_admin, woocommerce_quick_edit */
jQuery(function( $ ) {
$( '#the-list' ).on( 'click', '.editinline', function() {
@ -88,6 +88,9 @@ jQuery(function( $ ) {
} else {
$( '.stock_fields', '.inline-edit-row' ).show().removeAttr( 'style' );
}
// Rename core strings
$( 'input[name="comment_status"]' ).parent().find( '.checkbox-title' ).text( woocommerce_quick_edit.strings.allow_reviews );
});
$( '#the-list' ).on( 'change', '.inline-edit-row input[name="_manage_stock"]', function() {
@ -104,10 +107,6 @@ jQuery(function( $ ) {
$( 'input.text', '.inline-edit-row' ).val( '' );
$( '#woocommerce-fields' ).find( 'select' ).prop( 'selectedIndex', 0 );
$( '#woocommerce-fields-bulk' ).find( '.inline-edit-group .change-input' ).hide();
// Autosuggest product tags on bulk edit
var tax = 'product_tag';
$( 'tr.inline-editor textarea[name="tax_input[' + tax + ']"]' ).suggest( ajaxurl + ( ajaxurl.indexOf( '?' ) > 0 ? '&' : '?' ) + 'action=ajax-tag-search&tax=' + tax, { delay: 500, minchars: 2, multiple: true, multipleSep: inlineEditL10n.comma } );
});
$( '#wpbody' ).on( 'change', '#woocommerce-fields-bulk .inline-edit-group .change_to', function() {

View File

@ -1 +1 @@
jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text(),u=e.replace(".",woocommerce_admin.mon_decimal_point),v=f.replace(".",woocommerce_admin.mon_decimal_point);a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(u),a('input[name="_sale_price"]',".inline-edit-row").val(v),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var w=c.find(".product_type").text(),x=c.find(".product_is_virtual").text();"simple"===w||"external"===w?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===x?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===w?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style")}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields").find("select").prop("selectedIndex",0),a("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide();var b="product_tag";a('tr.inline-editor textarea[name="tax_input['+b+']"]').suggest(ajaxurl+(ajaxurl.indexOf("?")>0?"&":"?")+"action=ajax-tag-search&tax="+b,{delay:500,minchars:2,multiple:!0,multipleSep:inlineEditL10n.comma})}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})});
jQuery(function(a){a("#the-list").on("click",".editinline",function(){inlineEditPost.revert();var b=a(this).closest("tr").attr("id");b=b.replace("post-","");var c=a("#woocommerce_inline_"+b),d=c.find(".sku").text(),e=c.find(".regular_price").text(),f=c.find(".sale_price ").text(),g=c.find(".weight").text(),h=c.find(".length").text(),i=c.find(".width").text(),j=c.find(".height").text(),k=c.find(".shipping_class").text(),l=c.find(".visibility").text(),m=c.find(".stock_status").text(),n=c.find(".stock").text(),o=c.find(".featured").text(),p=c.find(".manage_stock").text(),q=c.find(".menu_order").text(),r=c.find(".tax_status").text(),s=c.find(".tax_class").text(),t=c.find(".backorders").text(),u=e.replace(".",woocommerce_admin.mon_decimal_point),v=f.replace(".",woocommerce_admin.mon_decimal_point);a('input[name="_sku"]',".inline-edit-row").val(d),a('input[name="_regular_price"]',".inline-edit-row").val(u),a('input[name="_sale_price"]',".inline-edit-row").val(v),a('input[name="_weight"]',".inline-edit-row").val(g),a('input[name="_length"]',".inline-edit-row").val(h),a('input[name="_width"]',".inline-edit-row").val(i),a('input[name="_height"]',".inline-edit-row").val(j),a('select[name="_shipping_class"] option:selected',".inline-edit-row").attr("selected",!1).change(),a('select[name="_shipping_class"] option[value="'+k+'"]').attr("selected","selected").change(),a('input[name="_stock"]',".inline-edit-row").val(n),a('input[name="menu_order"]',".inline-edit-row").val(q),a('select[name="_tax_status"] option, select[name="_tax_class"] option, select[name="_visibility"] option, select[name="_stock_status"] option, select[name="_backorders"] option').removeAttr("selected"),a('select[name="_tax_status"] option[value="'+r+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_tax_class"] option[value="'+s+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_visibility"] option[value="'+l+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_stock_status"] option[value="'+m+'"]',".inline-edit-row").attr("selected","selected"),a('select[name="_backorders"] option[value="'+t+'"]',".inline-edit-row").attr("selected","selected"),"yes"===o?a('input[name="_featured"]',".inline-edit-row").attr("checked","checked"):a('input[name="_featured"]',".inline-edit-row").removeAttr("checked"),"yes"===p?(a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"),a('input[name="_manage_stock"]',".inline-edit-row").attr("checked","checked")):(a(".stock_qty_field",".inline-edit-row").hide(),a('input[name="_manage_stock"]',".inline-edit-row").removeAttr("checked"));var w=c.find(".product_type").text(),x=c.find(".product_is_virtual").text();"simple"===w||"external"===w?a(".price_fields",".inline-edit-row").show().removeAttr("style"):a(".price_fields",".inline-edit-row").hide(),"yes"===x?a(".dimension_fields",".inline-edit-row").hide():a(".dimension_fields",".inline-edit-row").show().removeAttr("style"),"grouped"===w?a(".stock_fields",".inline-edit-row").hide():a(".stock_fields",".inline-edit-row").show().removeAttr("style"),a('input[name="comment_status"]').parent().find(".checkbox-title").text(woocommerce_quick_edit.strings.allow_reviews)}),a("#the-list").on("change",'.inline-edit-row input[name="_manage_stock"]',function(){a(this).is(":checked")?a(".stock_qty_field",".inline-edit-row").show().removeAttr("style"):a(".stock_qty_field",".inline-edit-row").hide()}),a("#wpbody").on("click","#doaction, #doaction2",function(){a("input.text",".inline-edit-row").val(""),a("#woocommerce-fields").find("select").prop("selectedIndex",0),a("#woocommerce-fields-bulk").find(".inline-edit-group .change-input").hide()}),a("#wpbody").on("change","#woocommerce-fields-bulk .inline-edit-group .change_to",function(){0<a(this).val()?a(this).closest("div").find(".change-input").show():a(this).closest("div").find(".change-input").hide()})});

View File

@ -110,6 +110,7 @@ jQuery(function( $ ) {
defaultDate: '',
dateFormat: 'yy-mm-dd',
numberOfMonths: 1,
minDate: '-20Y',
maxDate: '+0D',
showButtonPanel: true,
showOn: 'focus',

View File

@ -1 +1 @@
jQuery(function(a){function b(b,c,d){a('<div class="chart-tooltip">'+d+"</div>").css({top:c-16,left:b+20}).appendTo("body").fadeIn(200)}var c=null,d=null;a(".chart-placeholder").bind("plothover",function(e,f,g){if(g){if((c!==g.dataIndex||d!==g.seriesIndex)&&(c=g.dataIndex,d=g.seriesIndex,a(".chart-tooltip").remove(),g.series.points.show||g.series.enable_tooltip)){var h=g.series.data[g.dataIndex][1],i="";g.series.prepend_label&&(i=i+g.series.label+": "),g.series.prepend_tooltip&&(i+=g.series.prepend_tooltip),i+=h,g.series.append_tooltip&&(i+=g.series.append_tooltip),g.series.pie.show?b(f.pageX,f.pageY,i):b(g.pageX,g.pageY,i)}}else a(".chart-tooltip").remove(),c=null}),a(".wc_sparkline.bars").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),bars:{fillColor:a(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:a(this).data("barwidth"),align:"center"},shadowSize:0}];a.plot(a(this),d,c)}),a(".wc_sparkline.lines").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];a.plot(a(this),d,c)});var e=a(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,maxDate:"+0D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(b){var c=a(this).is(".from")?"minDate":"maxDate",d=a(this).data("datepicker"),f=a.datepicker.parseDate(d.settings.dateFormat||a.datepicker._defaults.dateFormat,b,d.settings);e.not(this).datepicker("option",c,f)}}),f=document.createElement("a");"undefined"==typeof f.download&&a(".export_csv").hide(),a(".export_csv").click(function(){var b=a(this).data("exclude_series")||"";b=b.toString(),b=b.split(",");var c,d,e,f=a(this).data("xaxes"),g=a(this).data("groupby"),h=a(this).data("index_type"),i=a(this).data("export"),j="data:application/csv;charset=utf-8,";if("table"===i)a(this).offsetParent().find("thead tr,tbody tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();b=b.replace("[?]","").replace("#",""),j+='"'+b+'",'}),j=j.substring(0,j.length-1),j+="\n"}),a(this).offsetParent().find("tfoot tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();if(b=b.replace("[?]","").replace("#",""),j+='"'+b+'",',a(this).attr("colspan")>0)for(n=1;n<a(this).attr("colspan");n++)j+='"",'}),j=j.substring(0,j.length-1),j+="\n"});else{if(!window.main_chart)return!1;var k=window.main_chart.getData(),l=[];for(j+='"'+f+'",',a.each(k,function(c,d){b&&a.inArray(c.toString(),b)!==-1||l.push(d)}),c=0;c<l.length;++c)j+='"'+l[c].label+'",';j=j.substring(0,j.length-1),j+="\n";var m={};for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e){m[d[e][0]]=[];for(var n=0;n<l.length;++n)m[d[e][0]].push(0)}for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e)m[d[e][0]][c]=d[e][1];a.each(m,function(a,b){var c=new Date(parseInt(a,10));j+="none"===h?'"'+a+'",':"day"===g?'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+"-"+c.getUTCDate()+'",':'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+'",';for(var d=0;d<b.length;++d){var e=b[d];Math.round(e)!==e&&(e=parseFloat(e),e=e.toFixed(2)),j+='"'+e+'",'}j=j.substring(0,j.length-1),j+="\n"})}return a(this).attr("href",encodeURI(j)),!0})});
jQuery(function(a){function b(b,c,d){a('<div class="chart-tooltip">'+d+"</div>").css({top:c-16,left:b+20}).appendTo("body").fadeIn(200)}var c=null,d=null;a(".chart-placeholder").bind("plothover",function(e,f,g){if(g){if((c!==g.dataIndex||d!==g.seriesIndex)&&(c=g.dataIndex,d=g.seriesIndex,a(".chart-tooltip").remove(),g.series.points.show||g.series.enable_tooltip)){var h=g.series.data[g.dataIndex][1],i="";g.series.prepend_label&&(i=i+g.series.label+": "),g.series.prepend_tooltip&&(i+=g.series.prepend_tooltip),i+=h,g.series.append_tooltip&&(i+=g.series.append_tooltip),g.series.pie.show?b(f.pageX,f.pageY,i):b(g.pageX,g.pageY,i)}}else a(".chart-tooltip").remove(),c=null}),a(".wc_sparkline.bars").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),bars:{fillColor:a(this).data("color"),fill:!0,show:!0,lineWidth:1,barWidth:a(this).data("barwidth"),align:"center"},shadowSize:0}];a.plot(a(this),d,c)}),a(".wc_sparkline.lines").each(function(){var b=a(this).data("sparkline"),c={grid:{show:!1}},d=[{data:b,color:a(this).data("color"),lines:{fill:!1,show:!0,lineWidth:1,align:"center"},shadowSize:0}];a.plot(a(this),d,c)});var e=a(".range_datepicker").datepicker({changeMonth:!0,changeYear:!0,defaultDate:"",dateFormat:"yy-mm-dd",numberOfMonths:1,minDate:"-20Y",maxDate:"+0D",showButtonPanel:!0,showOn:"focus",buttonImageOnly:!0,onSelect:function(b){var c=a(this).is(".from")?"minDate":"maxDate",d=a(this).data("datepicker"),f=a.datepicker.parseDate(d.settings.dateFormat||a.datepicker._defaults.dateFormat,b,d.settings);e.not(this).datepicker("option",c,f)}}),f=document.createElement("a");"undefined"==typeof f.download&&a(".export_csv").hide(),a(".export_csv").click(function(){var b=a(this).data("exclude_series")||"";b=b.toString(),b=b.split(",");var c,d,e,f=a(this).data("xaxes"),g=a(this).data("groupby"),h=a(this).data("index_type"),i=a(this).data("export"),j="data:application/csv;charset=utf-8,";if("table"===i)a(this).offsetParent().find("thead tr,tbody tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();b=b.replace("[?]","").replace("#",""),j+='"'+b+'",'}),j=j.substring(0,j.length-1),j+="\n"}),a(this).offsetParent().find("tfoot tr").each(function(){a(this).find("th, td").each(function(){var b=a(this).text();if(b=b.replace("[?]","").replace("#",""),j+='"'+b+'",',a(this).attr("colspan")>0)for(n=1;n<a(this).attr("colspan");n++)j+='"",'}),j=j.substring(0,j.length-1),j+="\n"});else{if(!window.main_chart)return!1;var k=window.main_chart.getData(),l=[];for(j+='"'+f+'",',a.each(k,function(c,d){b&&a.inArray(c.toString(),b)!==-1||l.push(d)}),c=0;c<l.length;++c)j+='"'+l[c].label+'",';j=j.substring(0,j.length-1),j+="\n";var m={};for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e){m[d[e][0]]=[];for(var n=0;n<l.length;++n)m[d[e][0]].push(0)}for(c=0;c<l.length;++c)for(d=l[c].data,e=0;e<d.length;++e)m[d[e][0]][c]=d[e][1];a.each(m,function(a,b){var c=new Date(parseInt(a,10));j+="none"===h?'"'+a+'",':"day"===g?'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+"-"+c.getUTCDate()+'",':'"'+c.getUTCFullYear()+"-"+parseInt(c.getUTCMonth()+1,10)+'",';for(var d=0;d<b.length;++d){var e=b[d];Math.round(e)!==e&&(e=parseFloat(e),e=e.toFixed(2)),j+='"'+e+'",'}j=j.substring(0,j.length-1),j+="\n"})}return a(this).attr("href",encodeURI(j)),!0})});

View File

@ -1,3 +1,4 @@
/* global jQuery, woocommerce_admin_system_status */
jQuery( function ( $ ) {
/**
@ -112,4 +113,9 @@ jQuery( function ( $ ) {
};
wcSystemStatus.init();
$( '#log-viewer-select' ).on( 'click', 'h2 a.page-title-action', function( evt ) {
evt.stopImmediatePropagation();
return window.confirm( woocommerce_admin_system_status.delete_log_confirmation );
});
});

View File

@ -1 +1 @@
jQuery(function(a){var b={init:function(){a(document.body).on("click","a.help_tip, a.woocommerce-help-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("copy","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.afterCopyReport)},preventTipTipClick:function(){return!1},generateReport:function(){var b="";a(".wc_status_table thead, .wc_status_table tbody").each(function(){if(a(this).is("thead")){var c=a(this).find("th:eq(0)").data("export-label")||a(this).text();b=b+"\n### "+a.trim(c)+" ###\n\n"}else a("tr",a(this)).each(function(){var c=a(this).find("td:eq(0)").data("export-label")||a(this).find("td:eq(0)").text(),d=a.trim(c).replace(/(<([^>]+)>)/gi,""),e=a(this).find("td:eq(2)").clone();e.find(".private").remove(),e.find(".dashicons-yes").replaceWith("&#10004;"),e.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;");var f=a.trim(e.text()),g=f.split(", ");if(g.length>1){var h="";a.each(g,function(a,b){h=h+b+"\n"}),f=h}b=b+""+d+": "+f+"\n"})});try{return a("#debug-report").slideDown(),a("#debug-report").find("textarea").val("`"+b+"`").focus().select(),a(this).fadeOut(),!1}catch(a){console.log(a)}return!1},copyReport:function(b){b.clipboardData.clearData(),b.clipboardData.setData("text/plain",a("#debug-report").find("textarea").val()),b.preventDefault()},afterCopyReport:function(b){!0===b.success["text/plain"]?a("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus():(a(".copy-error").removeClass("hidden"),a("#debug-report").find("textarea").focus().select())}};b.init()});
jQuery(function(a){var b={init:function(){a(document.body).on("click","a.help_tip, a.woocommerce-help-tip",this.preventTipTipClick).on("click","a.debug-report",this.generateReport).on("copy","#copy-for-support",this.copyReport).on("aftercopy","#copy-for-support",this.afterCopyReport)},preventTipTipClick:function(){return!1},generateReport:function(){var b="";a(".wc_status_table thead, .wc_status_table tbody").each(function(){if(a(this).is("thead")){var c=a(this).find("th:eq(0)").data("export-label")||a(this).text();b=b+"\n### "+a.trim(c)+" ###\n\n"}else a("tr",a(this)).each(function(){var c=a(this).find("td:eq(0)").data("export-label")||a(this).find("td:eq(0)").text(),d=a.trim(c).replace(/(<([^>]+)>)/gi,""),e=a(this).find("td:eq(2)").clone();e.find(".private").remove(),e.find(".dashicons-yes").replaceWith("&#10004;"),e.find(".dashicons-no-alt, .dashicons-warning").replaceWith("&#10060;");var f=a.trim(e.text()),g=f.split(", ");if(g.length>1){var h="";a.each(g,function(a,b){h=h+b+"\n"}),f=h}b=b+""+d+": "+f+"\n"})});try{return a("#debug-report").slideDown(),a("#debug-report").find("textarea").val("`"+b+"`").focus().select(),a(this).fadeOut(),!1}catch(a){console.log(a)}return!1},copyReport:function(b){b.clipboardData.clearData(),b.clipboardData.setData("text/plain",a("#debug-report").find("textarea").val()),b.preventDefault()},afterCopyReport:function(b){!0===b.success["text/plain"]?a("#copy-for-support").tipTip({attribute:"data-tip",activation:"focus",fadeIn:50,fadeOut:50,delay:0}).focus():(a(".copy-error").removeClass("hidden"),a("#debug-report").find("textarea").focus().select())}};b.init(),a("#log-viewer-select").on("click","h2 a.page-title-action",function(a){return a.stopImmediatePropagation(),window.confirm(woocommerce_admin_system_status.delete_log_confirmation)})});

View File

@ -3,11 +3,14 @@
/* Modifided script from the simple-page-ordering plugin */
jQuery( function( $ ) {
$( 'table.widefat.wp-list-table tbody th, table.widefat tbody td' ).css( 'cursor', 'move' );
$( 'table.widefat.wp-list-table tr' ).append(
'<td class="column-handle"></td>'
);
$( 'table.widefat.wp-list-table' ).sortable({
items: 'tbody tr:not(.inline-edit-row)',
cursor: 'move',
handle: '.column-handle',
axis: 'y',
forcePlaceholderSize: true,
helper: 'clone',

View File

@ -1 +1 @@
jQuery(function(a){a("table.widefat.wp-list-table tbody th, table.widefat tbody td").css("cursor","move"),a("table.widefat.wp-list-table").sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(a,b){b.item.hasClass("alternate")||b.item.css("background-color","#ffffff"),b.item.children("td, th").css("border-bottom-width","0"),b.item.css("outline","1px solid #aaa")},stop:function(a,b){b.item.removeAttr("style"),b.item.children("td, th").css("border-bottom-width","1px")},update:function(b,c){var d,e,f=c.item.find(".check-column input").val(),g=c.item.find(".parent").html(),h=c.item.prev().find(".check-column input").val(),i=c.item.next().find(".check-column input").val();return void 0!==h&&(d=c.item.prev().find(".parent").html(),d!==g&&(h=void 0)),void 0!==i&&(e=c.item.next().find(".parent").html(),e!==g&&(i=void 0)),void 0===h&&void 0===i||void 0===i&&e===h||void 0!==i&&d===f?void a("table.widefat.wp-list-table").sortable("cancel"):(c.item.find(".check-column input").hide().after('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),a.post(ajaxurl,{action:"woocommerce_term_ordering",id:f,nextid:i,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(a){"children"===a?window.location.reload():c.item.find(".check-column input").show().siblings("img").remove()}),void a("table.widefat tbody tr").each(function(){var a=jQuery("table.widefat tbody tr").index(this);a%2===0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});
jQuery(function(a){a("table.widefat.wp-list-table tr").append('<td class="column-handle"></td>'),a("table.widefat.wp-list-table").sortable({items:"tbody tr:not(.inline-edit-row)",cursor:"move",handle:".column-handle",axis:"y",forcePlaceholderSize:!0,helper:"clone",opacity:.65,placeholder:"product-cat-placeholder",scrollSensitivity:40,start:function(a,b){b.item.hasClass("alternate")||b.item.css("background-color","#ffffff"),b.item.children("td, th").css("border-bottom-width","0"),b.item.css("outline","1px solid #aaa")},stop:function(a,b){b.item.removeAttr("style"),b.item.children("td, th").css("border-bottom-width","1px")},update:function(b,c){var d,e,f=c.item.find(".check-column input").val(),g=c.item.find(".parent").html(),h=c.item.prev().find(".check-column input").val(),i=c.item.next().find(".check-column input").val();return void 0!==h&&(d=c.item.prev().find(".parent").html(),d!==g&&(h=void 0)),void 0!==i&&(e=c.item.next().find(".parent").html(),e!==g&&(i=void 0)),void 0===h&&void 0===i||void 0===i&&e===h||void 0!==i&&d===f?void a("table.widefat.wp-list-table").sortable("cancel"):(c.item.find(".check-column input").hide().after('<img alt="processing" src="images/wpspin_light.gif" class="waiting" style="margin-left: 6px;" />'),a.post(ajaxurl,{action:"woocommerce_term_ordering",id:f,nextid:i,thetaxonomy:woocommerce_term_ordering_params.taxonomy},function(a){"children"===a?window.location.reload():c.item.find(".check-column input").show().siblings("img").remove()}),void a("table.widefat tbody tr").each(function(){var a=jQuery("table.widefat tbody tr").index(this);a%2===0?jQuery(this).addClass("alternate"):jQuery(this).removeClass("alternate")}))}})});

View File

@ -15,6 +15,8 @@ jQuery( function ( $ ) {
$( '.js_field-country' ).select2().change( this.change_country );
$( '.js_field-country' ).trigger( 'change', [ true ] );
$( document.body ).on( 'change', 'select.js_field-state', this.change_state );
$( document.body ).on( 'click', 'button.js_copy-billing', this.copy_billing );
},
change_country: function( e, stickValue ) {
@ -75,6 +77,23 @@ jQuery( function ( $ ) {
country = $country.val();
$country.data( 'woocommerce.stickState-' + country, state );
},
copy_billing: function( event ) {
event.preventDefault();
$( '#fieldset-billing' ).find( 'input, select' ).each( function( i, el ) {
// The address keys match up, except for the prefix
var shipName = el.name.replace( /^billing_/, 'shipping_' );
// Swap prefix, then check if there are any elements
var shipEl = $( '[name="' + shipName + '"]' );
// No corresponding shipping field, skip this item
if ( ! shipEl.length ) {
return;
}
// Found a matching shipping element, update the value
shipEl.val( el.value ).trigger( 'change' );
} );
}
};

View File

@ -1 +1 @@
jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/&quot;/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val();if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('<input type="text" class="js_field-state" name="'+i+'" id="'+j+'" value="'+k+'" />');else{var l=a('<select name="'+i+'" id="'+j+'" class="js_field-state" style="width: 25em;"></select>'),m=b.states[f];l.append(a('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),a.each(m,function(b){l.append(a('<option value="'+b+'">'+m[b]+"</option>"))}),l.val(k),g.replaceWith(l),l.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")]),a(document.body).trigger("country-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)}};b.init()});
jQuery(function(a){var b={states:null,init:function(){"undefined"!=typeof wc_users_params.countries&&(this.states=a.parseJSON(wc_users_params.countries.replace(/&quot;/g,'"'))),a(".js_field-country").select2().change(this.change_country),a(".js_field-country").trigger("change",[!0]),a(document.body).on("change","select.js_field-state",this.change_state),a(document.body).on("click","button.js_copy-billing",this.copy_billing)},change_country:function(c,d){if("undefined"==typeof d&&(d=!1),null!==b.states){var e=a(this),f=e.val(),g=e.parents(".form-table").find(":input.js_field-state"),h=g.parent(),i=g.attr("name"),j=g.attr("id"),k=e.data("woocommerce.stickState-"+f)?e.data("woocommerce.stickState-"+f):g.val();if(d&&e.data("woocommerce.stickState-"+f,k),h.show().find(".select2-container").remove(),a.isEmptyObject(b.states[f]))g.replaceWith('<input type="text" class="js_field-state" name="'+i+'" id="'+j+'" value="'+k+'" />');else{var l=a('<select name="'+i+'" id="'+j+'" class="js_field-state" style="width: 25em;"></select>'),m=b.states[f];l.append(a('<option value="">'+wc_users_params.i18n_select_state_text+"</option>")),a.each(m,function(b){l.append(a('<option value="'+b+'">'+m[b]+"</option>"))}),l.val(k),g.replaceWith(l),l.show().select2().hide().change()}a(document.body).trigger("contry-change.woocommerce",[f,a(this).closest("div")]),a(document.body).trigger("country-change.woocommerce",[f,a(this).closest("div")])}},change_state:function(){var b=a(this),c=b.val(),d=b.parents(".form-table").find(":input.js_field-country"),e=d.val();d.data("woocommerce.stickState-"+e,c)},copy_billing:function(b){b.preventDefault(),a("#fieldset-billing").find("input, select").each(function(b,c){var d=c.name.replace(/^billing_/,"shipping_"),e=a('[name="'+d+'"]');e.length&&e.val(c.value).trigger("change")})}};b.init()});

View File

@ -5,7 +5,8 @@ jQuery( function( $ ) {
return {
'language': {
errorLoading: function() {
return wc_enhanced_select_params.i18n_ajax_error;
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
return wc_enhanced_select_params.i18n_searching;
},
inputTooLong: function( args ) {
var overChars = args.input.length - args.maximum;
@ -45,168 +46,172 @@ jQuery( function( $ ) {
};
}
$( document.body )
try {
$( document.body )
.on( 'wc-enhanced-select-init', function() {
.on( 'wc-enhanced-select-init', function() {
// Regular select boxes
$( ':input.wc-enhanced-select, :input.chosen_select' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = $.extend({
minimumResultsForSearch: 10,
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' )
}, getEnhancedSelectFormatString() );
// Regular select boxes
$( ':input.wc-enhanced-select, :input.chosen_select' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = $.extend({
minimumResultsForSearch: 10,
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' )
}, getEnhancedSelectFormatString() );
$( this ).select2( select2_args ).addClass( 'enhanced' );
});
$( this ).select2( select2_args ).addClass( 'enhanced' );
});
$( ':input.wc-enhanced-select-nostd, :input.chosen_select_nostd' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = $.extend({
minimumResultsForSearch: 10,
allowClear: true,
placeholder: $( this ).data( 'placeholder' )
}, getEnhancedSelectFormatString() );
$( ':input.wc-enhanced-select-nostd, :input.chosen_select_nostd' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = $.extend({
minimumResultsForSearch: 10,
allowClear: true,
placeholder: $( this ).data( 'placeholder' )
}, getEnhancedSelectFormatString() );
$( this ).select2( select2_args ).addClass( 'enhanced' );
});
$( this ).select2( select2_args ).addClass( 'enhanced' );
});
// Ajax product search box
$( ':input.wc-product-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup: function( m ) {
return m;
},
ajax: {
url: wc_enhanced_select_params.ajax_url,
dataType: 'json',
quietMillis: 250,
data: function( params ) {
return {
term: params.term,
action: $( this ).data( 'action' ) || 'woocommerce_json_search_products_and_variations',
security: wc_enhanced_select_params.search_products_nonce,
exclude: $( this ).data( 'exclude' ),
include: $( this ).data( 'include' ),
limit: $( this ).data( 'limit' )
};
// Ajax product search box
$( ':input.wc-product-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup: function( m ) {
return m;
},
processResults: function( data ) {
var terms = [];
if ( data ) {
$.each( data, function( id, text ) {
terms.push( { id: id, text: text } );
});
}
return {
results: terms
};
},
cache: true
}
};
select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
$( this ).select2( select2_args ).addClass( 'enhanced' );
if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
});
}
});
// Ajax customer search boxes
$( ':input.wc-customer-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '3',
escapeMarkup: function( m ) {
return m;
},
ajax: {
url: wc_enhanced_select_params.ajax_url,
dataType: 'json',
quietMillis: 250,
data: function( params ) {
return {
term: params.term,
action: 'woocommerce_json_search_customers',
security: wc_enhanced_select_params.search_customers_nonce,
exclude: $( this ).data( 'exclude' )
};
},
processResults: function( data ) {
var terms = [];
if ( data ) {
$.each( data, function( id, text ) {
terms.push({
id: id,
text: text
ajax: {
url: wc_enhanced_select_params.ajax_url,
dataType: 'json',
delay: 250,
data: function( params ) {
return {
term: params.term,
action: $( this ).data( 'action' ) || 'woocommerce_json_search_products_and_variations',
security: wc_enhanced_select_params.search_products_nonce,
exclude: $( this ).data( 'exclude' ),
include: $( this ).data( 'include' ),
limit: $( this ).data( 'limit' )
};
},
processResults: function( data ) {
var terms = [];
if ( data ) {
$.each( data, function( id, text ) {
terms.push( { id: id, text: text } );
});
});
}
return {
results: terms
};
},
cache: true
}
};
select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
$( this ).select2( select2_args ).addClass( 'enhanced' );
if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
return {
results: terms
};
},
cache: true
}
});
}
});
})
};
// WooCommerce Backbone Modal
.on( 'wc_backbone_modal_before_remove', function() {
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
})
select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
.trigger( 'wc-enhanced-select-init' );
$( this ).select2( select2_args ).addClass( 'enhanced' );
$( 'html' ).on( 'click', function( event ) {
if ( this === event.target ) {
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
}
} );
if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
});
}
});
// Ajax customer search boxes
$( ':input.wc-customer-search' ).filter( ':not(.enhanced)' ).each( function() {
var select2_args = {
allowClear: $( this ).data( 'allow_clear' ) ? true : false,
placeholder: $( this ).data( 'placeholder' ),
minimumInputLength: $( this ).data( 'minimum_input_length' ) ? $( this ).data( 'minimum_input_length' ) : '1',
escapeMarkup: function( m ) {
return m;
},
ajax: {
url: wc_enhanced_select_params.ajax_url,
dataType: 'json',
delay: 250,
data: function( params ) {
return {
term: params.term,
action: 'woocommerce_json_search_customers',
security: wc_enhanced_select_params.search_customers_nonce,
exclude: $( this ).data( 'exclude' )
};
},
processResults: function( data ) {
var terms = [];
if ( data ) {
$.each( data, function( id, text ) {
terms.push({
id: id,
text: text
});
});
}
return {
results: terms
};
},
cache: true
}
};
select2_args = $.extend( select2_args, getEnhancedSelectFormatString() );
$( this ).select2( select2_args ).addClass( 'enhanced' );
if ( $( this ).data( 'sortable' ) ) {
var $select = $(this);
var $list = $( this ).next( '.select2-container' ).find( 'ul.select2-selection__rendered' );
$list.sortable({
placeholder : 'ui-state-highlight select2-selection__choice',
forcePlaceholderSize: true,
items : 'li:not(.select2-search__field)',
tolerance : 'pointer',
stop: function() {
$( $list.find( '.select2-selection__choice' ).get().reverse() ).each( function() {
var id = $( this ).data( 'data' ).id;
var option = $select.find( 'option[value="' + id + '"]' )[0];
$select.prepend( option );
} );
}
});
}
});
})
// WooCommerce Backbone Modal
.on( 'wc_backbone_modal_before_remove', function() {
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
})
.trigger( 'wc-enhanced-select-init' );
$( 'html' ).on( 'click', function( event ) {
if ( this === event.target ) {
$( '.wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search' ).filter( '.select2-hidden-accessible' ).select2( 'close' );
}
} );
} catch( err ) {
// If select2 failed (conflict?) log the error but don't stop other scripts breaking.
window.console.log( err );
}
});

View File

@ -1 +1 @@
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_ajax_error},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}a(document.body).on("wc-enhanced-select-init",function(){a(":input.wc-enhanced-select, :input.chosen_select").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-enhanced-select-nostd, :input.chosen_select_nostd").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!0,placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-product-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){return{term:b.term,action:a(this).data("action")||"woocommerce_json_search_products_and_variations",security:wc_enhanced_select_params.search_products_nonce,exclude:a(this).data("exclude"),include:a(this).data("include"),limit:a(this).data("limit")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}}),a(":input.wc-customer-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",quietMillis:250,data:function(b){return{term:b.term,action:"woocommerce_json_search_customers",security:wc_enhanced_select_params.search_customers_nonce,exclude:a(this).data("exclude")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}})}).on("wc_backbone_modal_before_remove",function(){a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")}).trigger("wc-enhanced-select-init"),a("html").on("click",function(b){this===b.target&&a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")})});
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_enhanced_select_params.i18n_searching},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_enhanced_select_params.i18n_input_too_long_1:wc_enhanced_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_enhanced_select_params.i18n_input_too_short_1:wc_enhanced_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_enhanced_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_enhanced_select_params.i18n_selection_too_long_1:wc_enhanced_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_enhanced_select_params.i18n_no_matches},searching:function(){return wc_enhanced_select_params.i18n_searching}}}}try{a(document.body).on("wc-enhanced-select-init",function(){a(":input.wc-enhanced-select, :input.chosen_select").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-enhanced-select-nostd, :input.chosen_select_nostd").filter(":not(.enhanced)").each(function(){var c=a.extend({minimumResultsForSearch:10,allowClear:!0,placeholder:a(this).data("placeholder")},b());a(this).select2(c).addClass("enhanced")}),a(":input.wc-product-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"3",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(b){return{term:b.term,action:a(this).data("action")||"woocommerce_json_search_products_and_variations",security:wc_enhanced_select_params.search_products_nonce,exclude:a(this).data("exclude"),include:a(this).data("include"),limit:a(this).data("limit")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}}),a(":input.wc-customer-search").filter(":not(.enhanced)").each(function(){var c={allowClear:!!a(this).data("allow_clear"),placeholder:a(this).data("placeholder"),minimumInputLength:a(this).data("minimum_input_length")?a(this).data("minimum_input_length"):"1",escapeMarkup:function(a){return a},ajax:{url:wc_enhanced_select_params.ajax_url,dataType:"json",delay:250,data:function(b){return{term:b.term,action:"woocommerce_json_search_customers",security:wc_enhanced_select_params.search_customers_nonce,exclude:a(this).data("exclude")}},processResults:function(b){var c=[];return b&&a.each(b,function(a,b){c.push({id:a,text:b})}),{results:c}},cache:!0}};if(c=a.extend(c,b()),a(this).select2(c).addClass("enhanced"),a(this).data("sortable")){var d=a(this),e=a(this).next(".select2-container").find("ul.select2-selection__rendered");e.sortable({placeholder:"ui-state-highlight select2-selection__choice",forcePlaceholderSize:!0,items:"li:not(.select2-search__field)",tolerance:"pointer",stop:function(){a(e.find(".select2-selection__choice").get().reverse()).each(function(){var b=a(this).data("data").id,c=d.find('option[value="'+b+'"]')[0];d.prepend(c)})}})}})}).on("wc_backbone_modal_before_remove",function(){a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")}).trigger("wc-enhanced-select-init"),a("html").on("click",function(b){this===b.target&&a(".wc-enhanced-select, :input.wc-product-search, :input.wc-customer-search").filter(".select2-hidden-accessible").select2("close")})}catch(a){window.console.log(a)}});

View File

@ -0,0 +1,86 @@
/*global ajaxurl, wc_product_export_params */
;(function ( $, window ) {
/**
* productExportForm handles the export process.
*/
var productExportForm = function( $form ) {
this.$form = $form;
this.xhr = false;
// Initial state.
this.$form.find('.woocommerce-exporter-progress').val( 0 );
// Methods.
this.processStep = this.processStep.bind( this );
// Events.
$form.on( 'submit', { productExportForm: this }, this.onSubmit );
};
/**
* Handle export form submission.
*/
productExportForm.prototype.onSubmit = function( event ) {
event.preventDefault();
event.data.productExportForm.$form.addClass( 'woocommerce-exporter__exporting' );
event.data.productExportForm.$form.find('.woocommerce-exporter-progress').val( 0 );
event.data.productExportForm.$form.find('.woocommerce-exporter-button').prop( 'disabled', true );
event.data.productExportForm.processStep( 1, $( this ).serialize(), '' );
};
/**
* Process the current export step.
*/
productExportForm.prototype.processStep = function( step, data, columns ) {
var $this = this,
selected_columns = $( '.woocommerce-exporter-columns' ).val(),
export_meta = $( '#woocommerce-exporter-meta:checked' ).length ? 1 : 0,
export_types = $( '.woocommerce-exporter-types' ).val();
$.ajax( {
type: 'POST',
url: ajaxurl,
data: {
form : data,
action : 'woocommerce_do_ajax_product_export',
step : step,
columns : columns,
selected_columns : selected_columns,
export_meta : export_meta,
export_types : export_types,
security : wc_product_export_params.export_nonce
},
dataType: 'json',
success: function( response ) {
if ( response.success ) {
if ( 'done' === response.data.step ) {
$this.$form.find('.woocommerce-exporter-progress').val( response.data.percentage );
window.location = response.data.url;
setTimeout( function() {
$this.$form.removeClass( 'woocommerce-exporter__exporting' );
$this.$form.find('.woocommerce-exporter-button').prop( 'disabled', false );
}, 2000 );
} else {
$this.$form.find('.woocommerce-exporter-progress').val( response.data.percentage );
$this.processStep( parseInt( response.data.step, 10 ), data, response.data.columns );
}
}
}
} ).fail( function( response ) {
window.console.log( response );
} );
};
/**
* Function to call productExportForm on jquery selector.
*/
$.fn.wc_product_export_form = function() {
new productExportForm( this );
return this;
};
$( '.woocommerce-exporter' ).wc_product_export_form();
})( jQuery, window );

View File

@ -0,0 +1 @@
!function(a,b){var c=function(a){this.$form=a,this.xhr=!1,this.$form.find(".woocommerce-exporter-progress").val(0),this.processStep=this.processStep.bind(this),a.on("submit",{productExportForm:this},this.onSubmit)};c.prototype.onSubmit=function(b){b.preventDefault(),b.data.productExportForm.$form.addClass("woocommerce-exporter__exporting"),b.data.productExportForm.$form.find(".woocommerce-exporter-progress").val(0),b.data.productExportForm.$form.find(".woocommerce-exporter-button").prop("disabled",!0),b.data.productExportForm.processStep(1,a(this).serialize(),"")},c.prototype.processStep=function(c,d,e){var f=this,g=a(".woocommerce-exporter-columns").val(),h=a("#woocommerce-exporter-meta:checked").length?1:0,i=a(".woocommerce-exporter-types").val();a.ajax({type:"POST",url:ajaxurl,data:{form:d,action:"woocommerce_do_ajax_product_export",step:c,columns:e,selected_columns:g,export_meta:h,export_types:i,security:wc_product_export_params.export_nonce},dataType:"json",success:function(a){a.success&&("done"===a.data.step?(f.$form.find(".woocommerce-exporter-progress").val(a.data.percentage),b.location=a.data.url,setTimeout(function(){f.$form.removeClass("woocommerce-exporter__exporting"),f.$form.find(".woocommerce-exporter-button").prop("disabled",!1)},2e3)):(f.$form.find(".woocommerce-exporter-progress").val(a.data.percentage),f.processStep(parseInt(a.data.step,10),d,a.data.columns)))}}).fail(function(a){b.console.log(a)})},a.fn.wc_product_export_form=function(){return new c(this),this},a(".woocommerce-exporter").wc_product_export_form()}(jQuery,window);

View File

@ -0,0 +1,82 @@
/*global ajaxurl, wc_product_import_params */
;(function ( $, window ) {
/**
* productImportForm handles the import process.
*/
var productImportForm = function( $form ) {
this.$form = $form;
this.xhr = false;
this.mapping = wc_product_import_params.mapping;
this.position = 0;
this.file = wc_product_import_params.file;
this.update_existing = wc_product_import_params.update_existing;
this.delimiter = wc_product_import_params.delimiter;
this.security = wc_product_import_params.import_nonce;
// Number of import successes/failures.
this.imported = 0;
this.failed = 0;
this.updated = 0;
this.skipped = 0;
// Initial state.
this.$form.find('.woocommerce-importer-progress').val( 0 );
this.run_import = this.run_import.bind( this );
// Start importing.
this.run_import();
};
/**
* Run the import in batches until finished.
*/
productImportForm.prototype.run_import = function() {
var $this = this;
$.ajax( {
type: 'POST',
url: ajaxurl,
data: {
action : 'woocommerce_do_ajax_product_import',
position : $this.position,
mapping : $this.mapping,
file : $this.file,
update_existing : $this.update_existing,
delimiter : $this.delimiter,
security : $this.security
},
dataType: 'json',
success: function( response ) {
if ( response.success ) {
$this.position = response.data.position;
$this.imported += response.data.imported;
$this.failed += response.data.failed;
$this.updated += response.data.updated;
$this.skipped += response.data.skipped;
$this.$form.find('.woocommerce-importer-progress').val( response.data.percentage );
if ( 'done' === response.data.position ) {
window.location = response.data.url + '&products-imported=' + parseInt( $this.imported, 10 ) + '&products-failed=' + parseInt( $this.failed, 10 ) + '&products-updated=' + parseInt( $this.updated, 10 ) + '&products-skipped=' + parseInt( $this.skipped, 10 );
} else {
$this.run_import();
}
}
}
} ).fail( function( response ) {
window.console.log( response );
} );
};
/**
* Function to call productImportForm on jQuery selector.
*/
$.fn.wc_product_importer = function() {
new productImportForm( this );
return this;
};
$( '.woocommerce-importer' ).wc_product_importer();
})( jQuery, window );

View File

@ -0,0 +1 @@
!function(a,b){var c=function(a){this.$form=a,this.xhr=!1,this.mapping=wc_product_import_params.mapping,this.position=0,this.file=wc_product_import_params.file,this.update_existing=wc_product_import_params.update_existing,this.delimiter=wc_product_import_params.delimiter,this.security=wc_product_import_params.import_nonce,this.imported=0,this.failed=0,this.updated=0,this.skipped=0,this.$form.find(".woocommerce-importer-progress").val(0),this.run_import=this.run_import.bind(this),this.run_import()};c.prototype.run_import=function(){var c=this;a.ajax({type:"POST",url:ajaxurl,data:{action:"woocommerce_do_ajax_product_import",position:c.position,mapping:c.mapping,file:c.file,update_existing:c.update_existing,delimiter:c.delimiter,security:c.security},dataType:"json",success:function(a){a.success&&(c.position=a.data.position,c.imported+=a.data.imported,c.failed+=a.data.failed,c.updated+=a.data.updated,c.skipped+=a.data.skipped,c.$form.find(".woocommerce-importer-progress").val(a.data.percentage),"done"===a.data.position?b.location=a.data.url+"&products-imported="+parseInt(c.imported,10)+"&products-failed="+parseInt(c.failed,10)+"&products-updated="+parseInt(c.updated,10)+"&products-skipped="+parseInt(c.skipped,10):c.run_import())}}).fail(function(a){b.console.log(a)})},a.fn.wc_product_importer=function(){return new c(this),this},a(".woocommerce-importer").wc_product_importer()}(jQuery,window);

View File

@ -4,24 +4,57 @@ jQuery( function( $ ) {
var locale_info = $.parseJSON( wc_setup_params.locale_info );
$( 'select[name="store_location"]' ).change( function() {
var country_option = $(this).val();
var country = country_option.split( ':' )[0];
var country_option = $(this).val().split( ':' );
var country = country_option[0];
var state = country_option[1] || false;
var country_locale_info = locale_info[ country ];
var hide_if_set = [ 'thousand_sep', 'decimal_sep', 'num_decimals', 'currency_pos' ];
if ( country_locale_info ) {
$.each( country_locale_info, function( index, value) {
$.each( country_locale_info, function( index, value ) {
$(':input[name="' + index + '"]').val( value ).change();
if ( -1 !== $.inArray( index, hide_if_set ) ) {
$(':input[name="' + index + '"]').closest('tr').hide();
}
} );
if ( ! $.isArray( country_locale_info.tax_rates ) ) {
var tax_rates = [];
if ( state && country_locale_info.tax_rates[ state ] ) {
tax_rates = tax_rates.concat( country_locale_info.tax_rates[ state ] );
} else if ( country_locale_info.tax_rates[ '' ] ) {
tax_rates = tax_rates.concat( country_locale_info.tax_rates[ '' ] );
}
tax_rates = tax_rates.concat( country_locale_info.tax_rates[ '*' ] || [] );
if ( tax_rates.length ) {
var $rate_table = $( 'table.tax-rates tbody' ).empty();
$.each( tax_rates, function( index, rate ) {
$( '<tr>', {
html: [
$( '<td>', { 'class': 'readonly', text: rate.country || '' } ),
$( '<td>', { 'class': 'readonly', text: rate.state || '*' } ),
$( '<td>', { 'class': 'readonly', text: rate.rate || '' } ),
$( '<td>', { 'class': 'readonly', text: rate.name || '' } )
]
} ).appendTo( $rate_table );
} );
$( '.tax-rates' ).show();
} else {
$( '.tax-rates' ).hide();
}
}
} else {
$(':input[name="currency_pos"]').closest('tr').show();
$(':input[name="thousand_sep"]').closest('tr').show();
$(':input[name="decimal_sep"]').closest('tr').show();
$(':input[name="num_decimals"]').closest('tr').show();
$( '.tax-rates' ).hide();
}
} ).change();
@ -46,7 +79,7 @@ jQuery( function( $ ) {
return true;
} );
$( '.wc-wizard-payment-gateways' ).on( 'change', '.wc-wizard-gateway-enable input', function() {
$( '.wc-wizard-payment-gateways, .wc-wizard-shipping-methods' ).on( 'change', '.wc-wizard-gateway-enable input, .wc-wizard-shipping-enable input', function() {
if ( $( this ).is( ':checked' ) ) {
$( this ).closest( 'li' ).addClass( 'checked' );
} else {
@ -54,13 +87,13 @@ jQuery( function( $ ) {
}
} );
$( '.wc-wizard-payment-gateways' ).on( 'click', 'li.wc-wizard-gateway', function() {
var $enabled = $( this ).find( '.wc-wizard-gateway-enable input' );
$( '.wc-wizard-payment-gateways, .wc-wizard-shipping-methods' ).on( 'click', 'li.wc-wizard-gateway, li.wc-wizard-shipping', function() {
var $enabled = $( this ).find( '.wc-wizard-gateway-enable input, .wc-wizard-shipping-enable input' );
$enabled.prop( 'checked', ! $enabled.prop( 'checked' ) ).change();
} );
$( '.wc-wizard-payment-gateways' ).on( 'click', 'li.wc-wizard-gateway table, li.wc-wizard-gateway a', function( e ) {
$( '.wc-wizard-payment-gateways li, .wc-wizard-shipping-methods li' ).on( 'click', 'table, a', function( e ) {
e.stopPropagation();
} );
} );

View File

@ -1 +1 @@
jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val(),d=c.split(":")[0],e=b[d],f=["thousand_sep","decimal_sep","num_decimals","currency_pos"];e?a.each(e,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,f)&&a(':input[name="'+b+'"]').closest("tr").hide()}):(a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show())}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a(".button-next").on("click",function(){return a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),!0}),a(".wc-wizard-payment-gateways").on("change",".wc-wizard-gateway-enable input",function(){a(this).is(":checked")?a(this).closest("li").addClass("checked"):a(this).closest("li").removeClass("checked")}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway",function(){var b=a(this).find(".wc-wizard-gateway-enable input");b.prop("checked",!b.prop("checked")).change()}),a(".wc-wizard-payment-gateways").on("click","li.wc-wizard-gateway table, li.wc-wizard-gateway a",function(a){a.stopPropagation()})});
jQuery(function(a){var b=a.parseJSON(wc_setup_params.locale_info);a('select[name="store_location"]').change(function(){var c=a(this).val().split(":"),d=c[0],e=c[1]||!1,f=b[d],g=["thousand_sep","decimal_sep","num_decimals","currency_pos"];if(f){if(a.each(f,function(b,c){a(':input[name="'+b+'"]').val(c).change(),-1!==a.inArray(b,g)&&a(':input[name="'+b+'"]').closest("tr").hide()}),!a.isArray(f.tax_rates)){var h=[];if(e&&f.tax_rates[e]?h=h.concat(f.tax_rates[e]):f.tax_rates[""]&&(h=h.concat(f.tax_rates[""])),h=h.concat(f.tax_rates["*"]||[]),h.length){var i=a("table.tax-rates tbody").empty();a.each(h,function(b,c){a("<tr>",{html:[a("<td>",{class:"readonly",text:c.country||""}),a("<td>",{class:"readonly",text:c.state||"*"}),a("<td>",{class:"readonly",text:c.rate||""}),a("<td>",{class:"readonly",text:c.name||""})]}).appendTo(i)}),a(".tax-rates").show()}else a(".tax-rates").hide()}}else a(':input[name="currency_pos"]').closest("tr").show(),a(':input[name="thousand_sep"]').closest("tr").show(),a(':input[name="decimal_sep"]').closest("tr").show(),a(':input[name="num_decimals"]').closest("tr").show(),a(".tax-rates").hide()}).change(),a('input[name="woocommerce_calc_taxes"]').change(function(){a(this).is(":checked")?(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").show(),a("tr.tax-rates").show()):(a(':input[name="woocommerce_prices_include_tax"], :input[name="woocommerce_import_tax_rates"]').closest("tr").hide(),a("tr.tax-rates").hide())}).change(),a(".button-next").on("click",function(){return a(".wc-setup-content").block({message:null,overlayCSS:{background:"#fff",opacity:.6}}),!0}),a(".wc-wizard-payment-gateways, .wc-wizard-shipping-methods").on("change",".wc-wizard-gateway-enable input, .wc-wizard-shipping-enable input",function(){a(this).is(":checked")?a(this).closest("li").addClass("checked"):a(this).closest("li").removeClass("checked")}),a(".wc-wizard-payment-gateways, .wc-wizard-shipping-methods").on("click","li.wc-wizard-gateway, li.wc-wizard-shipping",function(){var b=a(this).find(".wc-wizard-gateway-enable input, .wc-wizard-shipping-enable input");b.prop("checked",!b.prop("checked")).change()}),a(".wc-wizard-payment-gateways li, .wc-wizard-shipping-methods li").on("click","table, a",function(a){a.stopPropagation()})});

View File

@ -1,10 +1,30 @@
/* global woocommerce_admin */
/**
* WooCommerce Admin JS
*/
jQuery( function ( $ ) {
// Add buttons to product screen.
var $product_screen = $( '.edit-php.post-type-product' ),
$title_action = $product_screen.find( '.page-title-action:first' ),
$blankslate = $product_screen.find( '.woocommerce-BlankState' );
if ( 0 === $blankslate.length ) {
$title_action.after( '<a href="' + woocommerce_admin.urls.export_products + '" class="page-title-action">' + woocommerce_admin.strings.export_products + '</a>' );
$title_action.after( '<a href="' + woocommerce_admin.urls.import_products + '" class="page-title-action">' + woocommerce_admin.strings.import_products + '</a>' );
} else {
$title_action.hide();
}
// Progress indicators when showing steps.
$( '.woocommerce-progress-form-wrapper .button-next' ).on( 'click', function() {
$('.wc-progress-form-content').block({
message: null,
overlayCSS: {
background: '#fff',
opacity: 0.6
}
});
return true;
} );
// Field validation error tips
$( document.body )
@ -253,6 +273,15 @@ jQuery( function ( $ ) {
}
}).change();
// Reviews.
$( 'input#woocommerce_enable_reviews' ).change(function() {
if ( $( this ).is( ':checked' ) ) {
$( '#woocommerce_enable_review_rating' ).closest( 'tr' ).show();
} else {
$( '#woocommerce_enable_review_rating' ).closest( 'tr' ).hide();
}
}).change();
// Attribute term table
$( 'table.attributes-table tbody tr:nth-child(odd)' ).addClass( 'alternate' );

File diff suppressed because one or more lines are too long

View File

@ -16,9 +16,7 @@
// Initial state.
this.$singleVariationWrap.show();
this.$form.unbind( 'check_variations update_variation_values found_variation' );
this.$resetVariations.unbind( 'click' );
this.$attributeFields.unbind( 'change ' );
this.$form.off( '.wc-variation-form' );
// Methods.
this.getChosenAttributes = this.getChosenAttributes.bind( this );
@ -27,17 +25,17 @@
this.toggleResetLink = this.toggleResetLink.bind( this );
// Events.
$form.on( 'click', '.reset_variations', { variationForm: this }, this.onReset );
$form.on( 'click.wc-variation-form', '.reset_variations', { variationForm: this }, this.onReset );
$form.on( 'reload_product_variations', { variationForm: this }, this.onReload );
$form.on( 'hide_variation', { variationForm: this }, this.onHide );
$form.on( 'show_variation', { variationForm: this }, this.onShow );
$form.on( 'click', '.single_add_to_cart_button', { variationForm: this }, this.onAddToCart );
$form.on( 'reset_data', { variationForm: this }, this.onResetDisplayedVariation );
$form.on( 'reset_image', { variationForm: this }, this.onResetImage );
$form.on( 'change', '.variations select', { variationForm: this }, this.onChange );
$form.on( 'found_variation', { variationForm: this }, this.onFoundVariation );
$form.on( 'check_variations', { variationForm: this }, this.onFindVariation );
$form.on( 'update_variation_values', { variationForm: this }, this.onUpdateAttributes );
$form.on( 'change.wc-variation-form', '.variations select', { variationForm: this }, this.onChange );
$form.on( 'found_variation.wc-variation-form', { variationForm: this }, this.onFoundVariation );
$form.on( 'check_variations.wc-variation-form', { variationForm: this }, this.onFindVariation );
$form.on( 'update_variation_values.wc-variation-form', { variationForm: this }, this.onUpdateAttributes );
// Check variations once init.
$form.trigger( 'check_variations' );
@ -174,9 +172,6 @@
// Show reset link.
form.toggleResetLink( attributes.chosenCount > 0 );
// added to get around variation image flicker issue
$( '.product.has-default-attributes > .images' ).fadeTo( 200, 1 );
};
/**
@ -200,13 +195,13 @@
}
if ( variation.weight ) {
$weight.wc_set_content( variation.weight );
$weight.wc_set_content( variation.weight_html );
} else {
$weight.wc_reset_content();
}
if ( variation.dimensions ) {
$dimensions.wc_set_content( variation.dimensions );
$dimensions.wc_set_content( variation.dimensions_html );
} else {
$dimensions.wc_reset_content();
}
@ -557,20 +552,27 @@
$product_link = $product_img_wrap.find( 'a' ).eq( 0 );
if ( variation && variation.image && variation.image.src && variation.image.src.length > 1 ) {
$product_img.wc_set_variation_attr( 'src', variation.image.src );
$product_img.wc_set_variation_attr( 'height', variation.image.src_h );
$product_img.wc_set_variation_attr( 'width', variation.image.src_w );
$product_img.wc_set_variation_attr( 'srcset', variation.image.srcset );
$product_img.wc_set_variation_attr( 'sizes', variation.image.sizes );
$product_img.wc_set_variation_attr( 'title', variation.image.title );
$product_img.wc_set_variation_attr( 'alt', variation.image.alt );
$product_img.wc_set_variation_attr( 'data-src', variation.image.full_src );
$product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src );
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
$gallery_img.wc_set_variation_attr( 'src', variation.image.src );
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
if ( $( '.flex-control-nav li img[src="' + variation.image.thumb_src + '"]' ).length > 0 ) {
$gallery_img = $( '.flex-control-nav li img[src="' + variation.image.thumb_src + '"]' );
$gallery_img.trigger( 'click' );
$form.attr( 'current-image', variation.image_id );
return;
} else {
$product_img.wc_set_variation_attr( 'src', variation.image.src );
$product_img.wc_set_variation_attr( 'height', variation.image.src_h );
$product_img.wc_set_variation_attr( 'width', variation.image.src_w );
$product_img.wc_set_variation_attr( 'srcset', variation.image.srcset );
$product_img.wc_set_variation_attr( 'sizes', variation.image.sizes );
$product_img.wc_set_variation_attr( 'title', variation.image.title );
$product_img.wc_set_variation_attr( 'alt', variation.image.alt );
$product_img.wc_set_variation_attr( 'data-src', variation.image.full_src );
$product_img.wc_set_variation_attr( 'data-large_image', variation.image.full_src );
$product_img.wc_set_variation_attr( 'data-large_image_width', variation.image.full_src_w );
$product_img.wc_set_variation_attr( 'data-large_image_height', variation.image.full_src_h );
$product_img_wrap.wc_set_variation_attr( 'data-thumb', variation.image.src );
$gallery_img.wc_set_variation_attr( 'src', variation.image.thumb_src );
$product_link.wc_set_variation_attr( 'href', variation.image.full_src );
}
} else {
$product_img.wc_reset_variation_attr( 'src' );
$product_img.wc_reset_variation_attr( 'width' );
@ -589,10 +591,10 @@
}
window.setTimeout( function() {
$product_gallery.trigger( 'woocommerce_gallery_init_zoom' );
$form.wc_maybe_trigger_slide_position_reset( variation );
$( window ).trigger( 'resize' );
}, 10 );
$form.wc_maybe_trigger_slide_position_reset( variation );
$product_gallery.trigger( 'woocommerce_gallery_init_zoom' );
}, 20 );
};
$(function() {

File diff suppressed because one or more lines are too long

View File

@ -1,25 +1,34 @@
/* global wc_add_to_cart_params */
/*!
* WooCommerce Add to Cart JS
*/
jQuery( function( $ ) {
if ( typeof wc_add_to_cart_params === 'undefined' ) {
return false;
}
// Ajax add to cart.
$( document ).on( 'click', '.add_to_cart_button', function() {
/**
* AddToCartHandler class.
*/
var AddToCartHandler = function() {
$( document )
.on( 'click', '.add_to_cart_button', this.onAddToCart )
.on( 'added_to_cart', this.updateButton )
.on( 'added_to_cart', this.updateCartPage )
.on( 'added_to_cart', this.updateFragments );
};
// AJAX add to cart request.
/**
* Handle the add to cart event.
*/
AddToCartHandler.prototype.onAddToCart = function( e ) {
var $thisbutton = $( this );
if ( $thisbutton.is( '.ajax_add_to_cart' ) ) {
if ( ! $thisbutton.attr( 'data-product_id' ) ) {
return true;
}
e.preventDefault();
$thisbutton.removeClass( 'added' );
$thisbutton.addClass( 'loading' );
@ -34,7 +43,6 @@ jQuery( function( $ ) {
// Ajax action.
$.post( wc_add_to_cart_params.wc_ajax_url.toString().replace( '%%endpoint%%', 'add_to_cart' ), data, function( response ) {
if ( ! response ) {
return;
}
@ -46,53 +54,24 @@ jQuery( function( $ ) {
// Redirect to cart option
if ( wc_add_to_cart_params.cart_redirect_after_add === 'yes' ) {
window.location = wc_add_to_cart_params.cart_url;
return;
} else {
// Trigger event so themes can refresh other areas
$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $thisbutton ] );
}
// Trigger event so themes can refresh other areas.
$( document.body ).trigger( 'added_to_cart', [ response.fragments, response.cart_hash, $thisbutton ] );
});
return false;
}
};
return true;
});
// On "added_to_cart"
$( document.body ).on( 'added_to_cart', function( event, fragments, cart_hash, $button ) {
var page = window.location.toString().replace( 'add-to-cart', 'added-to-cart' );
/**
* Update cart page elements after add to cart events.
*/
AddToCartHandler.prototype.updateButton = function( e, fragments, cart_hash, $button ) {
$button = typeof $button === 'undefined' ? false : $button;
if ( $button ) {
$button.removeClass( 'loading' );
}
// Block fragments class.
if ( fragments ) {
$.each( fragments, function( key ) {
$( key ).addClass( 'updating' );
});
}
// Block widgets and fragments.
$( '.shop_table.cart, .updating, .cart_totals' )
.fadeTo( '400', '0.6' )
.block({
message: null,
overlayCSS: {
opacity: 0.6
}
});
if ( $button ) {
// Changes button classes.
$button.addClass( 'added' );
// View cart text.
@ -100,29 +79,56 @@ jQuery( function( $ ) {
$button.after( ' <a href="' + wc_add_to_cart_params.cart_url + '" class="added_to_cart wc-forward" title="' +
wc_add_to_cart_params.i18n_view_cart + '">' + wc_add_to_cart_params.i18n_view_cart + '</a>' );
}
$( document.body ).trigger( 'wc_cart_button_updated', [ $button ] );
}
};
// Replace fragments.
if ( fragments ) {
$.each( fragments, function( key, value ) {
$( key ).replaceWith( value );
});
}
/**
* Update cart page elements after add to cart events.
*/
AddToCartHandler.prototype.updateCartPage = function() {
var page = window.location.toString().replace( 'add-to-cart', 'added-to-cart' );
// Unblock.
$( '.widget_shopping_cart, .updating' ).stop( true ).css( 'opacity', '1' ).unblock();
// Cart page elements.
$( '.shop_table.cart' ).load( page + ' .shop_table.cart:eq(0) > *', function() {
$( '.shop_table.cart' ).stop( true ).css( 'opacity', '1' ).unblock();
$( document.body ).trigger( 'cart_page_refreshed' );
});
$( '.cart_totals' ).load( page + ' .cart_totals:eq(0) > *', function() {
$( '.cart_totals' ).stop( true ).css( 'opacity', '1' ).unblock();
$( document.body ).trigger( 'cart_totals_refreshed' );
});
};
});
/**
* Update fragments after add to cart events.
*/
AddToCartHandler.prototype.updateFragments = function( e, fragments ) {
if ( fragments ) {
$.each( fragments, function( key ) {
$( key )
.addClass( 'updating' )
.fadeTo( '400', '0.6' )
.block({
message: null,
overlayCSS: {
opacity: 0.6
}
});
});
$.each( fragments, function( key, value ) {
$( key ).replaceWith( value );
$( key ).stop( true ).css( 'opacity', '1' ).unblock();
});
$( document.body ).trigger( 'wc_fragments_loaded' );
}
};
/**
* Init AddToCartHandler.
*/
new AddToCartHandler();
});

View File

@ -1,4 +1 @@
/*!
* WooCommerce Add to Cart JS
*/
jQuery(function(a){return"undefined"!=typeof wc_add_to_cart_params&&(a(document).on("click",".add_to_cart_button",function(){var b=a(this);if(b.is(".ajax_add_to_cart")){if(!b.attr("data-product_id"))return!0;b.removeClass("added"),b.addClass("loading");var c={};return a.each(b.data(),function(a,b){c[a]=b}),a(document.body).trigger("adding_to_cart",[b,c]),a.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),c,function(c){if(c)return c.error&&c.product_url?void(window.location=c.product_url):"yes"===wc_add_to_cart_params.cart_redirect_after_add?void(window.location=wc_add_to_cart_params.cart_url):void a(document.body).trigger("added_to_cart",[c.fragments,c.cart_hash,b])}),!1}return!0}),void a(document.body).on("added_to_cart",function(b,c,d,e){var f=window.location.toString().replace("add-to-cart","added-to-cart");e="undefined"!=typeof e&&e,e&&e.removeClass("loading"),c&&a.each(c,function(b){a(b).addClass("updating")}),a(".shop_table.cart, .updating, .cart_totals").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}}),e&&(e.addClass("added"),wc_add_to_cart_params.is_cart||0!==e.parent().find(".added_to_cart").length||e.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>")),c&&a.each(c,function(b,c){a(b).replaceWith(c)}),a(".widget_shopping_cart, .updating").stop(!0).css("opacity","1").unblock(),a(".shop_table.cart").load(f+" .shop_table.cart:eq(0) > *",function(){a(".shop_table.cart").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_page_refreshed")}),a(".cart_totals").load(f+" .cart_totals:eq(0) > *",function(){a(".cart_totals").stop(!0).css("opacity","1").unblock()})}))});
jQuery(function(a){if("undefined"==typeof wc_add_to_cart_params)return!1;var b=function(){a(document).on("click",".add_to_cart_button",this.onAddToCart).on("added_to_cart",this.updateButton).on("added_to_cart",this.updateCartPage).on("added_to_cart",this.updateFragments)};b.prototype.onAddToCart=function(b){var c=a(this);if(c.is(".ajax_add_to_cart")){if(!c.attr("data-product_id"))return!0;b.preventDefault(),c.removeClass("added"),c.addClass("loading");var d={};a.each(c.data(),function(a,b){d[a]=b}),a(document.body).trigger("adding_to_cart",[c,d]),a.post(wc_add_to_cart_params.wc_ajax_url.toString().replace("%%endpoint%%","add_to_cart"),d,function(b){if(b)return b.error&&b.product_url?void(window.location=b.product_url):"yes"===wc_add_to_cart_params.cart_redirect_after_add?void(window.location=wc_add_to_cart_params.cart_url):void a(document.body).trigger("added_to_cart",[b.fragments,b.cart_hash,c])})}},b.prototype.updateButton=function(b,c,d,e){e="undefined"!=typeof e&&e,e&&(e.removeClass("loading"),e.addClass("added"),wc_add_to_cart_params.is_cart||0!==e.parent().find(".added_to_cart").length||e.after(' <a href="'+wc_add_to_cart_params.cart_url+'" class="added_to_cart wc-forward" title="'+wc_add_to_cart_params.i18n_view_cart+'">'+wc_add_to_cart_params.i18n_view_cart+"</a>"),a(document.body).trigger("wc_cart_button_updated",[e]))},b.prototype.updateCartPage=function(){var b=window.location.toString().replace("add-to-cart","added-to-cart");a(".shop_table.cart").load(b+" .shop_table.cart:eq(0) > *",function(){a(".shop_table.cart").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_page_refreshed")}),a(".cart_totals").load(b+" .cart_totals:eq(0) > *",function(){a(".cart_totals").stop(!0).css("opacity","1").unblock(),a(document.body).trigger("cart_totals_refreshed")})},b.prototype.updateFragments=function(b,c){c&&(a.each(c,function(b){a(b).addClass("updating").fadeTo("400","0.6").block({message:null,overlayCSS:{opacity:.6}})}),a.each(c,function(b,c){a(b).replaceWith(c),a(b).stop(!0).css("opacity","1").unblock()}),a(document.body).trigger("wc_fragments_loaded"))},new b});

View File

@ -74,10 +74,10 @@ jQuery( function( $ ) {
}
}
if ( thislocale[ key ].sort ) {
field.data( 'priority', thislocale[ key ].sort );
} else if ( locale['default'][ key ].sort ) {
field.data( 'priority', locale['default'][ key ].sort );
if ( thislocale[ key ].priority ) {
field.data( 'priority', thislocale[ key ].priority );
} else if ( locale['default'][ key ].priority ) {
field.data( 'priority', locale['default'][ key ].priority );
}
} else if ( locale['default'][ key ] ) {
@ -106,8 +106,8 @@ jQuery( function( $ ) {
}
}
if ( locale['default'][ key ].sort ) {
field.data( 'priority', locale['default'][ key ].sort );
if ( locale['default'][ key ].priority ) {
field.data( 'priority', locale['default'][ key ].priority );
}
}

View File

@ -1 +1 @@
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d.default;var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class")));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d.default[a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show()),g[a].sort?e.data("priority",g[a].sort):d.default[a].sort&&e.data("priority",d.default[a].sort)):d.default[a]&&("state"!==a&&("undefined"==typeof d.default[a].hidden||d.default[a].hidden===!1?e.show():d.default[a].hidden===!0&&e.hide().find("input").val("")),"postcode"!==a&&"city"!==a&&"state"!==a||(d.default[a].label&&e.find("label").html(d.default[a].label),d.default[a].placeholder&&e.find("input").attr("placeholder",d.default[a].placeholder)),d.default[a].required===!0&&0===e.find("label abbr").length&&b(e,!0),d.default[a].sort&&e.data("priority",d.default[a].sort))});var m=a(".woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper .woocommerce-account-fields");m.each(function(b,c){var d=a(c).find(".form-row"),e=d.first().parent(),f=0;d.each(function(){a(this).data("priority")||a(this).data("priority",f+1),f=a(this).data("priority")}),d.sort(function(b,c){var d=a(b).data("priority"),e=a(c).data("priority");return d>e?1:d<e?-1:0}),d.detach().appendTo(e)})})});
jQuery(function(a){function b(a,b){b?(a.find("label").append(' <abbr class="required" title="'+wc_address_i18n_params.i18n_required_text+'">*</abbr>'),a.addClass("validate-required")):(a.find("label abbr").remove(),a.removeClass("validate-required"))}if("undefined"==typeof wc_address_i18n_params)return!1;var c=wc_address_i18n_params.locale.replace(/&quot;/g,'"'),d=a.parseJSON(c);a(document.body).bind("country_to_state_changing",function(c,e,f){var g,h=f;g="undefined"!=typeof d[e]?d[e]:d.default;var i=h.find("#billing_postcode_field, #shipping_postcode_field"),j=h.find("#billing_city_field, #shipping_city_field"),k=h.find("#billing_state_field, #shipping_state_field");i.attr("data-o_class")||(i.attr("data-o_class",i.attr("class")),j.attr("data-o_class",j.attr("class")),k.attr("data-o_class",k.attr("class")));var l=a.parseJSON(wc_address_i18n_params.locale_fields);a.each(l,function(a,c){var e=h.find(c);g[a]?(g[a].label&&e.find("label").html(g[a].label),g[a].placeholder&&e.find("input").attr("placeholder",g[a].placeholder),b(e,!1),"undefined"==typeof g[a].required&&d.default[a].required===!0?b(e,!0):g[a].required===!0&&b(e,!0),"state"!==a&&(g[a].hidden===!0?e.hide().find("input").val(""):e.show()),g[a].priority?e.data("priority",g[a].priority):d.default[a].priority&&e.data("priority",d.default[a].priority)):d.default[a]&&("state"!==a&&("undefined"==typeof d.default[a].hidden||d.default[a].hidden===!1?e.show():d.default[a].hidden===!0&&e.hide().find("input").val("")),"postcode"!==a&&"city"!==a&&"state"!==a||(d.default[a].label&&e.find("label").html(d.default[a].label),d.default[a].placeholder&&e.find("input").attr("placeholder",d.default[a].placeholder)),d.default[a].required===!0&&0===e.find("label abbr").length&&b(e,!0),d.default[a].priority&&e.data("priority",d.default[a].priority))});var m=a(".woocommerce-billing-fields__field-wrapper, .woocommerce-shipping-fields__field-wrapper, .woocommerce-address-fields__field-wrapper, .woocommerce-additional-fields__field-wrapper .woocommerce-account-fields");m.each(function(b,c){var d=a(c).find(".form-row"),e=d.first().parent(),f=0;d.each(function(){a(this).data("priority")||a(this).data("priority",f+1),f=a(this).data("priority")}),d.sort(function(b,c){var d=a(b).data("priority"),e=a(c).data("priority");return d>e?1:d<e?-1:0}),d.detach().appendTo(e)})})});

View File

@ -168,6 +168,15 @@ jQuery( function( $ ) {
reset_update_checkout_timer: function() {
clearTimeout( wc_checkout_form.updateTimer );
},
is_valid_json: function( raw_json ) {
try {
var json = $.parseJSON( raw_json );
return ( json && 'object' === typeof json );
} catch ( e ) {
return false;
}
},
validate_field: function( e ) {
var $this = $( this ),
$parent = $this.closest( '.form-row' ),
@ -331,7 +340,7 @@ jQuery( function( $ ) {
$( '#terms' ).prop( 'checked', true );
}
// Fill in the payment details if possible
// Fill in the payment details if possible without overwriting data if set.
if ( ! $.isEmptyObject( paymentDetails ) ) {
$( '.payment_box input' ).each( function() {
var ID = $( this ).attr( 'id' );
@ -339,7 +348,7 @@ jQuery( function( $ ) {
if ( ID ) {
if ( $.inArray( $( this ).attr( 'type' ), [ 'checkbox', 'radio' ] ) !== -1 ) {
$( this ).prop( 'checked', paymentDetails[ ID ] ).change();
} else {
} else if ( 0 === $( this ).val().length ) {
$( this ).val( paymentDetails[ ID ] ).change();
}
}
@ -413,27 +422,20 @@ jQuery( function( $ ) {
return raw_response;
}
try {
// Check for valid JSON
var data = $.parseJSON( raw_response );
if ( data && 'object' === typeof data ) {
// Valid - return it so it can be parsed by Ajax handler
return raw_response;
}
} catch ( e ) {
if ( wc_checkout_form.is_valid_json( raw_response ) ) {
return raw_response;
} else {
// Attempt to fix the malformed JSON
var valid_json = raw_response.match( /{"result.*"}/ );
var maybe_valid_json = raw_response.match( /{"result.*}/ );
if ( null === valid_json ) {
if ( null === maybe_valid_json ) {
console.log( 'Unable to fix malformed JSON' );
} else {
} else if ( wc_checkout_form.is_valid_json( maybe_valid_json[0] ) ) {
console.log( 'Fixed malformed JSON. Original:' );
console.log( raw_response );
raw_response = valid_json[0];
raw_response = maybe_valid_json[0];
} else {
console.log( 'Unable to fix malformed JSON' );
}
}
@ -608,7 +610,19 @@ jQuery( function( $ ) {
}
};
var wc_terms_toggle = {
init: function() {
$( document.body ).on( 'click', 'a.woocommerce-terms-and-conditions-link', this.toggle_terms );
},
toggle_terms: function() {
$( '.woocommerce-terms-and-conditions' ).slideToggle();
return false;
}
};
wc_checkout_form.init();
wc_checkout_coupons.init();
wc_checkout_login_form.init();
wc_terms_toggle.init();
});

File diff suppressed because one or more lines are too long

View File

@ -10,7 +10,8 @@ jQuery( function( $ ) {
return {
'language': {
errorLoading: function() {
return wc_country_select_params.i18n_ajax_error;
// Workaround for https://github.com/select2/select2/issues/4355 instead of i18n_ajax_error.
return wc_country_select_params.i18n_searching;
},
inputTooLong: function( args ) {
var overChars = args.input.length - args.maximum;

View File

@ -1 +1 @@
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_ajax_error},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}}if("undefined"==typeof wc_country_select_params)return!1;if(a().select2){var c=function(){a("select.country_select:visible, select.state_select:visible").each(function(){var c=a.extend({placeholderOption:"first",width:"100%"},b());a(this).select2(c),a(this).on("select2:select",function(){a(this).focus()})})};c(),a(document.body).bind("country_to_state_changed",function(){c()})}var d=wc_country_select_params.countries.replace(/&quot;/g,'"'),e=a.parseJSON(d);a(document.body).on("change","select.country_to_state, input.country_to_state",function(){var b=a(this).closest(".woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator");b.length||(b=a(this).closest(".form-row").parent());var c=a(this).val(),d=b.find("#billing_state, #shipping_state, #calc_shipping_state"),f=d.parent(),g=d.attr("name"),h=d.attr("id"),i=d.val(),j=d.attr("placeholder")||d.attr("data-placeholder")||"";if(e[c])if(a.isEmptyObject(e[c]))d.parent().hide().find(".select2-container").remove(),d.replaceWith('<input type="hidden" class="hidden" name="'+g+'" id="'+h+'" value="" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]);else{var k="",l=e[c];for(var m in l)l.hasOwnProperty(m)&&(k=k+'<option value="'+m+'">'+l[m]+"</option>");d.parent().show(),d.is("input")&&(d.replaceWith('<select name="'+g+'" id="'+h+'" class="state_select" data-placeholder="'+j+'"></select>'),d=b.find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('<option value="">'+wc_country_select_params.i18n_select_state_text+"</option>"+k),d.val(i).change(),a(document.body).trigger("country_to_state_changed",[c,b])}else d.is("select")?(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b])):d.is('input[type="hidden"]')&&(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]));a(document.body).trigger("country_to_state_changing",[c,b])}),a(function(){a(":input.country_to_state").change()})});
jQuery(function(a){function b(){return{language:{errorLoading:function(){return wc_country_select_params.i18n_searching},inputTooLong:function(a){var b=a.input.length-a.maximum;return 1===b?wc_country_select_params.i18n_input_too_long_1:wc_country_select_params.i18n_input_too_long_n.replace("%qty%",b)},inputTooShort:function(a){var b=a.minimum-a.input.length;return 1===b?wc_country_select_params.i18n_input_too_short_1:wc_country_select_params.i18n_input_too_short_n.replace("%qty%",b)},loadingMore:function(){return wc_country_select_params.i18n_load_more},maximumSelected:function(a){return 1===a.maximum?wc_country_select_params.i18n_selection_too_long_1:wc_country_select_params.i18n_selection_too_long_n.replace("%qty%",a.maximum)},noResults:function(){return wc_country_select_params.i18n_no_matches},searching:function(){return wc_country_select_params.i18n_searching}}}}if("undefined"==typeof wc_country_select_params)return!1;if(a().select2){var c=function(){a("select.country_select:visible, select.state_select:visible").each(function(){var c=a.extend({placeholderOption:"first",width:"100%"},b());a(this).select2(c),a(this).on("select2:select",function(){a(this).focus()})})};c(),a(document.body).bind("country_to_state_changed",function(){c()})}var d=wc_country_select_params.countries.replace(/&quot;/g,'"'),e=a.parseJSON(d);a(document.body).on("change","select.country_to_state, input.country_to_state",function(){var b=a(this).closest(".woocommerce-billing-fields, .woocommerce-shipping-fields, .woocommerce-shipping-calculator");b.length||(b=a(this).closest(".form-row").parent());var c=a(this).val(),d=b.find("#billing_state, #shipping_state, #calc_shipping_state"),f=d.parent(),g=d.attr("name"),h=d.attr("id"),i=d.val(),j=d.attr("placeholder")||d.attr("data-placeholder")||"";if(e[c])if(a.isEmptyObject(e[c]))d.parent().hide().find(".select2-container").remove(),d.replaceWith('<input type="hidden" class="hidden" name="'+g+'" id="'+h+'" value="" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]);else{var k="",l=e[c];for(var m in l)l.hasOwnProperty(m)&&(k=k+'<option value="'+m+'">'+l[m]+"</option>");d.parent().show(),d.is("input")&&(d.replaceWith('<select name="'+g+'" id="'+h+'" class="state_select" data-placeholder="'+j+'"></select>'),d=b.find("#billing_state, #shipping_state, #calc_shipping_state")),d.html('<option value="">'+wc_country_select_params.i18n_select_state_text+"</option>"+k),d.val(i).change(),a(document.body).trigger("country_to_state_changed",[c,b])}else d.is("select")?(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b])):d.is('input[type="hidden"]')&&(f.show().find(".select2-container").remove(),d.replaceWith('<input type="text" class="input-text" name="'+g+'" id="'+h+'" placeholder="'+j+'" />'),a(document.body).trigger("country_to_state_changed",[c,b]));a(document.body).trigger("country_to_state_changing",[c,b])}),a(function(){a(":input.country_to_state").change()})});

Some files were not shown because too many files have changed in this diff Show More