Commit Graph

55 Commits

Author SHA1 Message Date
Mike Jolley 5a48c41209 Loop panels to disable options rather than look at values 2019-02-27 14:38:11 +00:00
Rodrigo Primo d08745e041 'Used for variations' checkbox should only appear for variable products
When editing product attributes, the checkbox 'Used for variations' should only be displayed when editing a variable product. The code has checks in place to control the display of this checkbox when adding an attribute or when loading the product attributes, but it was missing a check when saving product attributes which is added in this commit.
2019-01-22 15:13:02 -02:00
Rodrigo Primo a713e63502 Fix eslint errors 2019-01-22 15:04:43 -02:00
Gerhard Potgieter ee1c667645 jshint fixes 2018-09-27 08:07:42 +02:00
Gerhard Potgieter 711c9bdcd4 Update JS to conform to WP coding standards 2018-09-27 08:05:44 +02:00
Gerhard Potgieter f637cf3005 After saving attributes check that empty attributes are not disabled in the dropdown. 2018-09-26 12:25:34 +02:00
Mike Jolley 7f593835a4 Reveal row when adding 2018-06-29 12:11:33 +01:00
Mike Jolley 4ba14da963 Fix reload issue 2018-06-27 16:34:28 +01:00
Mike Jolley 672a31e7c6 Merge branch 'master' into feature/product-custom-tables-supporting-changes 2018-01-16 10:40:19 +00:00
Caleb Burks c7f5ee97db Hide variation stock status setting conditionally 2017-12-13 22:38:03 -06:00
claudiulodro 99aefc91f3 Changes from feedback 2017-11-21 14:08:17 -08:00
claudiulodro 7a43b5a187 Fix bug in show/hide js 2017-11-20 10:44:50 -08:00
Mike Jolley f207fdcde9 Reload attributes html on save 2017-11-17 15:43:14 +00:00
claudiulodro 4ef2152881 Hide/set fields depending on whether managing stock 2017-11-15 14:10:06 -08:00
Mike Jolley 87858d1407 recalc on remove/add 2017-08-10 16:32:24 +01:00
Mike Jolley 735a277e52 initial state 2017-08-08 12:44:36 +01:00
Ninos Ego bf9a7381dc Coding improvements for datepicker range 2017-07-13 13:15:58 +02:00
Mike Jolley 771a4cab45 Minify meta boxes 2017-07-13 11:02:00 +01:00
Guido Scialfa cce7e8a0e3 Allow other product types to use the sale schedule inputs.
Problem:

Simple product allow to schedule a product sale, but the datepicker
works only if there is one group of sale inputs.

This is because only the simple&external product type is allowed to show the general data tab.

As referenced within the includes/admin/meta-boxes/views/html-product-data-general.php
the div container has the class attribute values "show_if_simple show_if_external".

This make impossible to use the price fields for custom product types.

Workaround:

When I register a new product type and I want to use the general data tab, simply, I cannot.
But, I can create an additional data tab and put my custom code there but if I want to use the price and sale input what I need to do
is to get a copy of the code from html-product-data-general.php and put it on my own view.

Surprise, is not possible to send the data from the datepicker to the input field, also, the recalculate value for the minDate and maxDate
doesn't work as expected.

Solution:

Instead of use the .sale_price_dates_from (that is removed when the datePicker is initialized, and instead of using the id attribute
that must be unique and may create issues, using a combination of .next() and .is() function allow us to determine if the options must be the min or max value.

The code is a copy of the same closure found within the meta-boxes-variation.js.
2017-05-11 18:38:48 +02:00
Mike Jolley ece81deb8e Use term ID, not slug
Fixes #13731
2017-03-23 11:13:32 +00:00
Mike Jolley 777f09db32 remove notice - no longer needed 2017-01-11 11:48:05 +00:00
Mike Jolley f7d72afcf9 Detect classname when saving attributes 2017-01-05 16:54:47 +00:00
Claudio Sanches 8c4d406866 Fixed coding standards 2016-06-28 14:38:19 -03:00
Mike Jolley 0a8e219c9d Hide empty panels 2016-06-28 11:56:45 +01:00
Mike Jolley 6f04ff1fa0 Replace size with length
Fixes #10444
2016-03-01 13:08:25 +00:00
Mike Jolley cc68fdc89a [2.5] Correctly block UI to prevent attribute issues
Fixes #10115
2016-01-20 11:01:18 +00:00
Shiva Poudel 64161b9d63 No need of external product type to index 2016-01-07 12:43:08 +05:45
Mike Jolley 6e7d8e98b2 Trigger change event when inserting media
Fixes #9793
2015-12-14 12:27:03 +00:00
Claudio Sanches d66427bd8a [2.4] Fixed product type select in wp 4.4 2015-11-06 13:51:17 -02:00
Florian Ludwig 35655f8544 Fixed all inefficient selector usages
Use find for more efficient selectors - more information on e.g.
https://24ways.org/2011/your-jquery-now-with-less-suck/
2015-09-07 19:51:10 +02:00
Mike Jolley 4bda0f2387 check for sizes 2015-09-07 11:38:24 +01:00
Mike Jolley 32a2bbfbd1 Sort out variation loading after attribute save 2015-09-04 14:00:42 +01:00
Mike Jolley 32b220d8b6 Improve variation reload after save attributes
@claudiosmweb
2015-09-03 16:17:08 +01:00
roykho 4a8712053f gallery images where not saving 2015-07-27 09:57:21 -07:00
Mike Jolley 8161cbd095 Change remove buttons into links 2015-07-08 23:08:07 +01:00
Claudio Sanches 4aae7b99be Fixed tooltips load for variations 2015-07-08 15:05:52 -03:00
Claudio Sanches c0ca144d57 Fixed js warnings on js/admin/meta-boxes-product.js 2015-07-08 14:48:06 -03:00
Mike Jolley 358da00b15 Treat each picker independently
Closes #8515
2015-07-07 11:49:12 +01:00
Shiva Poudel 27186d235c Tweaks - JSHint fix for product meta-box 2015-06-03 21:38:34 +05:45
Shiva Poudel 051964adc5 Remove undefined variable 2015-06-03 21:18:01 +05:45
Shiva Poudel 0e01ff90f3 Tweaks - Conding standard and JSHint fix 2015-06-03 21:17:40 +05:45
Claudio Sanches 1dadbb2842 Fixed coding standards for #7879 2015-04-13 12:37:22 -03:00
Danny van Kooten 88f2e690bb Changing all inefficient selectors of $('body') to $(document.body), which is about 80% faster (and even more on mobile, see https://jsperf.com/jquery-body-vs-document-body-selector/2 ). 2015-04-03 14:21:47 +02:00
Mike Jolley cbfc2717db Use URL if no sizes exist Closes #7491 2015-02-19 14:15:28 +00:00
Mike Jolley 9f8a7d1199 Remove datepicker icon's and use focus event 2015-01-30 12:54:33 +00:00
splashingpixels a216d28a0b remove runtiptip when deleting gallery images closes #7192 2015-01-23 07:45:57 -08:00
Brent Shepherd f1c46decb7 Trigger a JS event after an attribute is added 2015-01-20 14:12:55 -08:00
Mike Jolley 4b7f97c1de Attributes 2015-01-09 16:53:47 +00:00
Mike Jolley 22cc1fb0c7 Add attributes with ajax and don't load all attributes at once.
Significantly improves performance with many attributes in admin.
Closes #6852 cc @claudiosmweb
2014-12-22 14:16:15 +00:00
Mike Jolley 3904035003 Disable already added attributes #6189 2014-11-26 11:35:07 +00:00