George Stephanis
c627d49460
A default placeholder to show until the rendering code replaces it.
2015-08-07 15:44:23 -04:00
George Stephanis
6cd4ddb71b
Wrap the rendering code inside a function that the data can be passed to.
2015-08-07 15:44:10 -04:00
George Stephanis
d297a1ac62
Ernest the JS so none of it evaluates before dom ready.
2015-08-07 15:36:12 -04:00
George Stephanis
846dcb95c6
Inline documentation explaining some functionality.
2015-08-07 15:34:45 -04:00
George Stephanis
55e0bb6302
Add some code comments.
2015-08-07 15:30:12 -04:00
George Stephanis
bad9e9d3bd
Reposition when autocomplete is triggered.
...
Also, instead of searching through the whole dom, only search in the
tbody.
2015-08-07 15:29:56 -04:00
George Stephanis
4874408a98
Insert placeholder divs for search and pagination.
2015-08-07 15:25:09 -04:00
George Stephanis
56dc05d80e
Whitespace tweaks
2015-08-07 15:24:49 -04:00
George Stephanis
94618db86a
Optimization: Don't use $.size(), use native Object.length instead.
2015-08-07 15:24:35 -04:00
George Stephanis
516977bd01
JSHint fixes.
...
The other advantage of splitting js out of php files — jshint can run
on it! :) :) :)
2015-08-07 12:10:01 -04:00
George Stephanis
69b6936d4d
Don't constantly rescan the dom for tbody
...
We have a cached version of $tbody a level up.
2015-08-07 12:01:40 -04:00
George Stephanis
9ae32254f2
Swap `jQuery` to `$`
...
It’s more readable, and safe to do as we’ve aliased it back in the
enclosure.
2015-08-07 12:00:22 -04:00
George Stephanis
c4768e5274
Migrate current_class from php to js
2015-08-07 11:58:16 -04:00
George Stephanis
b030927590
Extract 'No Rows Selected' string
2015-08-07 11:58:02 -04:00
George Stephanis
bd30def6a1
Whitespace tidy!
2015-08-07 11:57:48 -04:00
George Stephanis
4221c7be24
Extract the autocomplete for states and countries data.
...
Localize it!
2015-08-07 11:57:38 -04:00
George Stephanis
65eb16fe8a
Migrate csv columns to localize script.
2015-08-07 11:47:39 -04:00
George Stephanis
974b337fbb
Move js in from php template file.
2015-08-07 11:42:49 -04:00
George Stephanis
b0a485a5e6
Change variable name to consistent `$tbody`
2015-08-07 11:41:59 -04:00
George Stephanis
64f48f8706
Rename and tweak how js is registered.
...
Thanks @claudiosmweb for the suggestion to match existing conventions.
2015-08-07 11:36:38 -04:00
George Stephanis
cca93cd09e
Prefix template name with `wc-`
...
Good call, @mikejolley
2015-08-07 11:14:55 -04:00
George Stephanis
729e6c924c
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-07 11:04:55 -04:00
George Stephanis
f0656e7e38
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-06 17:41:12 -04:00
Nicola Mustone
372d1da118
added new issue link
2015-08-06 18:15:55 +02:00
Nicola Mustone
9d32709f0a
typo
2015-08-06 18:09:02 +02:00
Claudio Sanches
c6444c1214
Merge pull request #8737 from SiR-DanieL/master
...
Contribute to WooCommerce page improvement
2015-08-06 09:25:48 -03:00
Nicola Mustone
3ae67c9cd9
Merge pull request #1 from MarinaWoo/patch-1
...
Typos, phrasing and grammar edits
2015-08-06 14:12:43 +02:00
Marina Pape
d031e97e23
Typos, phrasing and grammar edits
...
As requested by Nicola, went through and made some edits so standardise grammar / flow etc.
2015-08-06 13:06:00 +01:00
Mike Jolley
ddd97b64c3
Remove white space to fix appearance of new rows
...
Fixes #8730
2015-08-06 11:38:46 +01:00
Mike Jolley
b91ccd32b9
Tweak wildcard tax handling to deal with 9 digit zip codes
...
Fixes #8736
2015-08-06 11:36:02 +01:00
Claudio Sanches
2462fc95d4
Merge pull request #8733 from shivapoudel/escape
...
Fix - calls for esc_*
2015-08-05 17:31:53 -03:00
Shiva Poudel
0d1c2dc4dc
Fix - calls for esc_*
2015-08-06 02:04:21 +05:45
Claudio Sanches
cd306393b3
Merge pull request #8732 from woothemes/add/more_esc_attrs
...
More esc_attrs -- continuation of #8731
2015-08-05 16:54:34 -03:00
Claudio Sanches
5e91d27b66
Minify
2015-08-05 16:52:54 -03:00
Claudio Sanches
6726fd642c
Updated grunt dependencies
2015-08-05 16:52:03 -03:00
George Stephanis
9269fd7432
Retooling how this is escaped.
...
Sanitize early, escape late. Rather than double escaping, I figured
it’d be better to sprintf it in, and then escape that string — closer
to the output.
Also, I’m not sure why `urlencode` was used to escape a name?
2015-08-05 15:18:47 -04:00
George Stephanis
c938fa24da
More missing esc_attr calls, :(
2015-08-05 15:17:52 -04:00
Claudio Sanches
b091f12393
Fixed some js conding standards
2015-08-05 15:57:15 -03:00
Claudio Sanches
1a2ccd741b
Merge pull request #8731 from woothemes/add/esc_attr_e
...
When echoing translations in an attribute, escape them properly.
2015-08-05 15:55:28 -03:00
George Stephanis
83058779b3
Merge remote-tracking branch 'origin/add/esc_attr_e' into add/esc_attr_e
...
Conflicts:
includes/admin/settings/views/html-keys-edit.php
2015-08-05 14:17:18 -04:00
George Stephanis
95e6b84fbb
Make sure we esc_attr translation results
...
Part 2 of … 2, I think.
2015-08-05 14:15:00 -04:00
George Stephanis
29d9a7da8c
Found two missing `esc_js()` calls as well.
2015-08-05 14:10:10 -04:00
George Stephanis
c7ee929325
Partial _e() => esc_attr_e() changeover.
...
There’s a lot of them, so I’m breaking them into multiple commits.
This is safeguarding stuff in case some translation uses a double
quote, it will no longer risk breaking out of the attribute.
2015-08-05 14:10:09 -04:00
George Stephanis
883ad9003a
Make sure we esc_attr translation results
...
Part 2 of … 2, I think.
2015-08-05 14:08:15 -04:00
Claudio Sanches
47492fb273
Merge branch 'master' of github.com:woothemes/woocommerce
2015-08-05 15:03:05 -03:00
Claudio Sanches
054dfe0c7b
Changed default Underscore's template for wp.template in API Keys
2015-08-05 15:02:55 -03:00
George Stephanis
aed0b0e891
Found two missing `esc_js()` calls as well.
2015-08-05 12:52:11 -04:00
George Stephanis
ecd503ec2c
Partial _e() => esc_attr_e() changeover.
...
There’s a lot of them, so I’m breaking them into multiple commits.
This is safeguarding stuff in case some translation uses a double
quote, it will no longer risk breaking out of the attribute.
2015-08-05 12:51:44 -04:00
Mike Jolley
7f3c2a78c5
Get total functions should respect rounding settings.
...
Closes #8707
2015-08-05 14:33:53 +01:00
Mike Jolley
737769174e
Customer class using wrong meta keys for address_1/shipping_address_1
...
Fixes #8717
2015-08-05 14:05:03 +01:00