Commit Graph

12862 Commits

Author SHA1 Message Date
George Stephanis d9b2907ae2 Begin to handle pagination.
This lets the initial view display only a single page, future commits
will add in the paginater.
2015-08-12 12:59:08 -04:00
George Stephanis be4c7db8bd Pass rates in as an array, not an associative array, so it's an Array in js. 2015-08-12 12:59:08 -04:00
George Stephanis 0608bcce19 The name resetter should also be run after each render. 2015-08-12 12:59:08 -04:00
George Stephanis c9a1ba2f39 A default placeholder to show until the rendering code replaces it. 2015-08-12 12:59:08 -04:00
George Stephanis f9fd4ada58 Wrap the rendering code inside a function that the data can be passed to. 2015-08-12 12:59:08 -04:00
George Stephanis 7985aec296 Ernest the JS so none of it evaluates before dom ready. 2015-08-12 12:59:08 -04:00
George Stephanis 26b95a4d80 Inline documentation explaining some functionality. 2015-08-12 12:59:08 -04:00
George Stephanis 7c60e48b0c Add some code comments. 2015-08-12 12:59:08 -04:00
George Stephanis 37f10c18cd Reposition when autocomplete is triggered.
Also, instead of searching through the whole dom, only search in the
tbody.
2015-08-12 12:59:07 -04:00
George Stephanis 536402c183 Insert placeholder divs for search and pagination. 2015-08-12 12:59:07 -04:00
George Stephanis 308c7f8676 Whitespace tweaks 2015-08-12 12:59:07 -04:00
George Stephanis ea0b9b96b9 Optimization: Don't use $.size(), use native Object.length instead. 2015-08-12 12:59:07 -04:00
George Stephanis 676af1f308 JSHint fixes.
The other advantage of splitting js out of php files — jshint can run
on it! :) :) :)
2015-08-12 12:59:07 -04:00
George Stephanis d3922a96cd Don't constantly rescan the dom for tbody
We have a cached version of $tbody a level up.
2015-08-12 12:59:07 -04:00
George Stephanis 1b035b43a3 Swap `jQuery` to `$`
It’s more readable, and safe to do as we’ve aliased it back in the
enclosure.
2015-08-12 12:59:07 -04:00
George Stephanis 8c47c0df1d Migrate current_class from php to js 2015-08-12 12:59:07 -04:00
George Stephanis 52d4ea822c Extract 'No Rows Selected' string 2015-08-12 12:59:07 -04:00
George Stephanis 973348d6ad Whitespace tidy! 2015-08-12 12:59:06 -04:00
George Stephanis 18293cf365 Extract the autocomplete for states and countries data.
Localize it!
2015-08-12 12:59:06 -04:00
George Stephanis 5d5a64753d Migrate csv columns to localize script. 2015-08-12 12:59:06 -04:00
George Stephanis 39749c4563 Move js in from php template file. 2015-08-12 12:59:06 -04:00
George Stephanis c128e4f826 Change variable name to consistent `$tbody` 2015-08-12 12:59:06 -04:00
George Stephanis a63ef876d7 Rename and tweak how js is registered.
Thanks @claudiosmweb for the suggestion to match existing conventions.
2015-08-12 12:59:06 -04:00
George Stephanis 0ed5f40fa2 Prefix template name with `wc-`
Good call, @mikejolley
2015-08-12 12:59:06 -04:00
George Stephanis a59ed70774 Big changeover to JS templating for the table.
Switching over to building the table with JS — wp.template.

We are now using the same JS template for existing rows and newly
generated rows on the fly — this should simplify things moving forward.

I’ve also started building stuff in an external JS file rather than
straight on the page.  Will continue migrating things to it and
localizing as needed.

Saved ( 2 * displayed tax rates - 1 ) db queries per page load by doing
the locations all in one query and then parceling them out in php.

More coming.
2015-08-12 12:59:06 -04:00
George Stephanis cb4e3cb774 Tax Rate Search: First whack.
This is by no means complete.  A number of things need to be relocated
and optimized still, but it does a rough search, purely in JS, and
highlights the results in yellow.
2015-08-12 12:59:05 -04:00
Mike Jolley 817f8476ac Refund subjects when order contains downloadable product. 2015-08-12 17:50:57 +01:00
Mike Jolley 19e8cc4634 display_errors > error_reporting 2015-08-12 17:45:49 +01:00
Mike Jolley 7a58c5417c Only process downloads if valid order is found
Closes #8798
2015-08-12 17:21:07 +01:00
Mike Jolley c1c8a103af Merge remote-tracking branch 'origin/master'
Conflicts:
	readme.txt
2015-08-12 17:08:40 +01:00
Mike Jolley 457283bc3c Ajax variations: stripslashes to fix attributes with quotes. 2015-08-12 17:08:21 +01:00
Claudio Sanches 5aa919d822 Updated changelog 2015-08-12 12:00:28 -03:00
Claudio Sanches ac1986412c Stay on the same page when delete a variation 2015-08-12 11:39:55 -03:00
Mike Jolley a3d376b5c3 Tab hiding with some theme markup.
Closes #8791
2015-08-12 12:05:31 +01:00
Mike Jolley 9986240793 min 2015-08-12 11:51:10 +01:00
Mike Jolley 6a3f4ee969 Disable error_reporting during ajax requests to prevent malformed JSON. 2015-08-12 11:51:05 +01:00
Mike Jolley 2f79ab5e3a When merging shipping taxes with a shipping rate taxes, ensure shipping rate taxes is not malformed.
Closes #8790
2015-08-12 11:28:24 +01:00
Mike Jolley 0da69f2bef Query within wc_customer_bought_product(). 2015-08-12 10:44:44 +01:00
Claudio Sanches f16468c33c Version 2.4.2 2015-08-11 14:23:50 -03:00
Claudio Sanches aae3581a28 Minify files for 2.4.2 2015-08-11 14:22:54 -03:00
Mike Jolley f6f2d7f9df Ensure array is returned from wc_get_attribute_taxonomies 2015-08-11 17:10:34 +01:00
Mike Jolley 3bd52a78a5 Use wc_get_attribute_taxonomies instead of global 2015-08-11 17:10:34 +01:00
Claudio Sanches 23f6544ffc Stop jetpack markdown of add slashs in HTML, closes #8782 2015-08-11 12:06:59 -03:00
Mike Jolley 4dd19c3839 Stripslashes on text attributes
Fixes #8778 Closes #8771
2015-08-11 14:55:35 +01:00
Mike Jolley 7d27707043 Tax inclusive prices rounding issue
Remove rounding on cart_contents_total so total is calculated correctly.

Prevents issues with half rounded taxes and half rounded items.

Fixes #8776
2015-08-11 14:17:52 +01:00
Mike Jolley fafb6d5dca Tweak cart fix to avoid munging %%endpoint%% 2015-08-11 14:04:42 +01:00
Mike Jolley 3eedab457d return; don't break 2015-08-11 13:47:12 +01:00
Mike Jolley 61f7dd428e use shop_single instead of full image size for variations.
Closes #8764
2015-08-11 12:54:26 +01:00
Mike Jolley fd22334fe6 Merge pull request #8774 from Ninos/dropdown
Add class arg to dropdown function
2015-08-11 12:32:32 +01:00
Ninos Ego 98a1ae4b25 Add class arg to dropdown function 2015-08-11 13:17:52 +02:00