George Stephanis
9c5a35762b
Change the structure to Backbone models/views.
2015-08-08 14:46:21 -04:00
George Stephanis
9c0af3c7ff
Whoops! Comma, not semicolon.
2015-08-08 14:45:37 -04:00
George Stephanis
e0d9ff8891
Set backbone and underscore as script dependencies.
2015-08-08 14:45:21 -04:00
George Stephanis
f9331ab5c4
Should be comparing to `'1'` not `1`.
2015-08-08 11:03:46 -04:00
George Stephanis
d2e4f31042
Optimization, save the $table selector to avoid some dom lookups.
2015-08-08 10:57:46 -04:00
George Stephanis
7c5d05d29d
Whitespace tweaks.
2015-08-08 10:57:22 -04:00
George Stephanis
9946bd1c5c
Retool the export to use the global object, not parsing out of the dom.
2015-08-08 10:57:03 -04:00
George Stephanis
521d8f4861
Migrate the logic and queries out of the template file.
...
Move them where they belong, in the class that calls it.
2015-08-07 17:28:44 -04:00
George Stephanis
d854e8dc2a
Remove the legacy pagination.
2015-08-07 17:22:07 -04:00
George Stephanis
c2d5e3c5a0
Update the current page when the number is changed.
2015-08-07 17:21:44 -04:00
George Stephanis
bba6f80d9d
Don't set them for unexistent rates.
2015-08-07 17:06:50 -04:00
George Stephanis
5736d66a92
Pagination now works by first, prev, next, last.
...
Still need to get number based pagination working.
2015-08-07 16:58:42 -04:00
George Stephanis
ba1d2d7bde
Add in and populate pagination template.
...
The buttons don’t actually do anything yet, but it outputs accurately
and inherits core styles.
2015-08-07 16:36:50 -04:00
George Stephanis
f541093dce
Begin to handle pagination.
...
This lets the initial view display only a single page, future commits
will add in the paginater.
2015-08-07 16:02:45 -04:00
George Stephanis
2b2a54c5dc
Pass rates in as an array, not an associative array, so it's an Array in js.
2015-08-07 16:01:57 -04:00
George Stephanis
d5dd12a8f7
The name resetter should also be run after each render.
2015-08-07 15:47:26 -04:00
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
Claudio Sanches
528d6575ed
Merge pull request #8748 from thenbrent/reinstate_default_items
...
Reinstate default value for $items
2015-08-07 16:20:38 -03:00
Brent Shepherd
a826330ad0
Reinstate default value for $items
...
That was (accidentally?) removed with SHA: 877e39064
Fixes "PHP Notice: Undefined variable: items" when attempting to get
line items of a type that does not exist on the order, like coupons.
2015-08-07 12:12:08 -07:00
Claudio Sanches
8bc5e9e284
Merge pull request #8747 from thenbrent/add_api_permissions_filter
...
Add permissions in scope filter
2015-08-07 15:25:00 -03:00
Brent Shepherd
1681b0f9d5
Add permissions in scope filter
...
To allow extensions to display the permissions API keys will provide
for their objects, in addition to the permissions for core WC objects.
2015-08-07 11:19:21 -07:00
Claudio Sanches
e9acb4f7cf
Fixed api keys migration for 2.4, closes #8746
2015-08-07 15:15:34 -03:00
Mike Jolley
6bf6a5df3f
Merge pull request #8745 from douglsmith/patch-1
...
Minor grammar fixes to the 2.4 update welcome message
2015-08-07 17:30:16 +01:00
Doug Smith
46536b6374
Minor grammar fixes to the update welcome message
2015-08-07 11:21:49 -05: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
James Koster
b6c7f14a7b
fixes broken extension links
2015-08-07 16:03:45 +01:00
Claudio Sanches
9bc3937689
Updated POT
2015-08-07 10:37:55 -03:00
Claudio Sanches
0a657fdd96
Added missing dot
2015-08-07 10:37:45 -03:00
Claudio Sanches
38aa17b67b
Fixed hardcoded string
2015-08-07 10:27:40 -03:00
Claudio Sanches
e901114c23
Updated POT
2015-08-07 10:19:08 -03:00