George Stephanis
81804d8d3b
Don't show the `pre` displaying the changes by default.
2015-08-14 11:07:35 -04:00
George Stephanis
2aa1650f54
Rearrange things to get ajax working.
...
Spread them out throughout WooCommerce.
2015-08-13 17:49:59 -04:00
George Stephanis
c6d7e6ba26
Make this public so it can be used to sanitize.
2015-08-13 17:34:00 -04:00
George Stephanis
ec287f116f
Add ajax submission processing.
...
Not quite finished yet, as the add_action isn’t catching.
2015-08-13 16:57:54 -04:00
George Stephanis
d4ab9e6feb
Add in a bit of extra sanitizing for tax rate classes.
2015-08-13 16:56:50 -04:00
George Stephanis
2d097a8f4c
Minified version of new js file.
2015-08-13 14:29:01 -04:00
George Stephanis
3a87b98ba6
Rewrite onAddNewRow for Backbone models.
2015-08-13 14:10:47 -04:00
George Stephanis
b4bd433342
Update the unsaved message to give better data.
2015-08-13 11:58:09 -04:00
George Stephanis
e10064d0fe
Revert back to passing in array values. We can indexBy in JS
2015-08-12 17:17:39 -04:00
George Stephanis
f77b77e335
New template for empty set.
2015-08-12 15:29:17 -04:00
George Stephanis
4e2229a6bf
Merge branch 'master' into issue/8587
2015-08-12 15:07:44 -04:00
George Stephanis
220550621a
Populate the search field value attribute
2015-08-12 14:38:25 -04:00
George Stephanis
3ee43646ae
Pass in the current page's base url to js for appending.
2015-08-12 14:18:49 -04:00
Mike Jolley
f8b539eb5e
Improved refund email events and woocommerce_order_fully_refunded hook.
...
Closes #8793
2015-08-12 19:01:05 +01:00
George Stephanis
4aedda5eb8
Indent the template file properly.
2015-08-12 13:52:04 -04:00
Mike Jolley
cbb89fa4b9
wc_get_product_variation_attributes should only get parent attributes which are for variations.
...
Closes #8796
2015-08-12 18:02:13 +01:00
George Stephanis
56218b0824
Add in a notification for unsaved changes.
2015-08-12 12:59:13 -04:00
George Stephanis
8dc2126718
Update the tablenav so the gotos are never out of range.
2015-08-12 12:59:12 -04:00
George Stephanis
837931f99a
Check for truthiness.
...
This avoids silliness where `’0’` evaluates to true. Just parse it as
an int and evaluate that.
2015-08-12 12:59:11 -04:00
George Stephanis
2a0951e4e5
Add more data attributes to the rows and fields.
2015-08-12 12:59:11 -04:00
George Stephanis
1a066ebbe0
Swap to associative array for model.
2015-08-12 12:59:11 -04:00
George Stephanis
ce7cb1f65d
Add a `beforeunload` event to prompt before leaving with unsaved changes.
2015-08-12 12:59:10 -04:00
George Stephanis
c6e3a577c0
Set backbone and underscore as script dependencies.
2015-08-12 12:59:10 -04:00
George Stephanis
8a416f105b
Should be comparing to `'1'` not `1`.
2015-08-12 12:59:10 -04:00
George Stephanis
ddba588987
Migrate the logic and queries out of the template file.
...
Move them where they belong, in the class that calls it.
2015-08-12 12:59:09 -04:00
George Stephanis
5f4cbf78d0
Remove the legacy pagination.
2015-08-12 12:59:09 -04:00
George Stephanis
4df13e6ffb
Don't set them for unexistent rates.
2015-08-12 12:59:09 -04:00
George Stephanis
7bebbaff9e
Pagination now works by first, prev, next, last.
...
Still need to get number based pagination working.
2015-08-12 12:59:09 -04:00
George Stephanis
cf59aec17d
Add in and populate pagination template.
...
The buttons don’t actually do anything yet, but it outputs accurately
and inherits core styles.
2015-08-12 12:59:09 -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
c9a1ba2f39
A default placeholder to show until the rendering code replaces it.
2015-08-12 12:59:08 -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
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
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
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
457283bc3c
Ajax variations: stripslashes to fix attributes with quotes.
2015-08-12 17:08:21 +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