{"action":"created","comment":{"url":"https://api.github.com/repos/OCA/e-commerce/pulls/comments/81889981","pull_request_review_id":2836749,"id":81889981,"diff_hunk":"@@ -0,0 +1,47 @@\n+/**\n+*    Copyright 2016 LasLabs Inc.\n+*    License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html).\n+**/\n+\n+odoo.define('website_sale_qty', function(require) {\n+    'use strict';\n+\n+    var base = require('web_editor.base');\n+    base.ready().done(function() {\n+        var radios = $('.js-pqt-input');\n+\n+        if (radios.length > 0) {\n+            var radio_map = {};\n+            radios.each(function(index, element) {\n+                var $element = $(element);\n+                radio_map[$element.val()] = $element;\n+            });\n+            var quantity_input = $('.css_quantity input');\n+            var quantity_toggles = $('.css_quantity a');\n+\n+            // If present, this input should be selected by default\n+            if (1 in radio_map) {\n+                radio_map[1].prop('checked', true);\n+            }\n+\n+            radios.click(function(event) {\n+                quantity_input.val($(event.target).val());","path":"website_sale_qty/static/src/js/website_sale_qty.js","position":28,"original_position":28,"commit_id":"5a2b046c22250838248f39cd742cf33d4a235e91","original_commit_id":"5a2b046c22250838248f39cd742cf33d4a235e91","user":{"login":"lasley","id":7397578,"avatar_url":"https://avatars.githubusercontent.com/u/7397578?v=3","gravatar_id":"","url":"https://api.github.com/users/lasley","html_url":"https://github.com/lasley","followers_url":"https://api.github.com/users/lasley/followers","following_url":"https://api.github.com/users/lasley/following{/other_user}","gists_url":"https://api.github.com/users/lasley/gists{/gist_id}","starred_url":"https://api.github.com/users/lasley/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lasley/subscriptions","organizations_url":"https://api.github.com/users/lasley/orgs","repos_url":"https://api.github.com/users/lasley/repos","events_url":"https://api.github.com/users/lasley/events{/privacy}","received_events_url":"https://api.github.com/users/lasley/received_events","type":"User","site_admin":false},"body":"Chrome will also show issues with target vs curentTarget, but the issues are few and far between. Just a best practice thing really ","created_at":"2016-10-05T02:05:53Z","updated_at":"2016-10-05T02:05:53Z","html_url":"https://github.com/OCA/e-commerce/pull/131#discussion_r81889981","pull_request_url":"https://api.github.com/repos/OCA/e-commerce/pulls/131","_links":{"self":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/comments/81889981"},"html":{"href":"https://github.com/OCA/e-commerce/pull/131#discussion_r81889981"},"pull_request":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/131"}}},"pull_request":{"url":"https://api.github.com/repos/OCA/e-commerce/pulls/131","id":87432409,"html_url":"https://github.com/OCA/e-commerce/pull/131","diff_url":"https://github.com/OCA/e-commerce/pull/131.diff","patch_url":"https://github.com/OCA/e-commerce/pull/131.patch","issue_url":"https://api.github.com/repos/OCA/e-commerce/issues/131","number":131,"state":"open","locked":false,"title":"[ADD] website_sale_qty: Website sale price tiers","user":{"login":"obulkin","id":16826367,"avatar_url":"https://avatars.githubusercontent.com/u/16826367?v=3","gravatar_id":"","url":"https://api.github.com/users/obulkin","html_url":"https://github.com/obulkin","followers_url":"https://api.github.com/users/obulkin/followers","following_url":"https://api.github.com/users/obulkin/following{/other_user}","gists_url":"https://api.github.com/users/obulkin/gists{/gist_id}","starred_url":"https://api.github.com/users/obulkin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/obulkin/subscriptions","organizations_url":"https://api.github.com/users/obulkin/orgs","repos_url":"https://api.github.com/users/obulkin/repos","events_url":"https://api.github.com/users/obulkin/events{/privacy}","received_events_url":"https://api.github.com/users/obulkin/received_events","type":"User","site_admin":false},"body":"* Add the calculated field price_quantity_tiers to product.template. It stores\r\na dictionary with price tiers (quantity ranges with different unit pricing) by\r\nproduct.pricelist\r\n* Update the website_sale.product template to show radio buttons corresponding\r\nto the price tiers for each product.template/product.pricelist combo\r\n* Add JS that links the new price tier radio buttons to the existing quantity\r\nselection elements","created_at":"2016-09-30T04:21:16Z","updated_at":"2016-10-05T02:05:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c20d75028ed4219829217260d1dee94959aa930","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/OCA/e-commerce/pulls/131/commits","review_comments_url":"https://api.github.com/repos/OCA/e-commerce/pulls/131/comments","review_comment_url":"https://api.github.com/repos/OCA/e-commerce/pulls/comments{/number}","comments_url":"https://api.github.com/repos/OCA/e-commerce/issues/131/comments","statuses_url":"https://api.github.com/repos/OCA/e-commerce/statuses/5a2b046c22250838248f39cd742cf33d4a235e91","head":{"label":"laslabs:feature/9.0/LABS-282-create-website_sale_qty","ref":"feature/9.0/LABS-282-create-website_sale_qty","sha":"5a2b046c22250838248f39cd742cf33d4a235e91","user":{"login":"laslabs","id":13024740,"avatar_url":"https://avatars.githubusercontent.com/u/13024740?v=3","gravatar_id":"","url":"https://api.github.com/users/laslabs","html_url":"https://github.com/laslabs","followers_url":"https://api.github.com/users/laslabs/followers","following_url":"https://api.github.com/users/laslabs/following{/other_user}","gists_url":"https://api.github.com/users/laslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/laslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laslabs/subscriptions","organizations_url":"https://api.github.com/users/laslabs/orgs","repos_url":"https://api.github.com/users/laslabs/repos","events_url":"https://api.github.com/users/laslabs/events{/privacy}","received_events_url":"https://api.github.com/users/laslabs/received_events","type":"Organization","site_admin":false},"repo":{"id":61062176,"name":"e-commerce","full_name":"laslabs/e-commerce","owner":{"login":"laslabs","id":13024740,"avatar_url":"https://avatars.githubusercontent.com/u/13024740?v=3","gravatar_id":"","url":"https://api.github.com/users/laslabs","html_url":"https://github.com/laslabs","followers_url":"https://api.github.com/users/laslabs/followers","following_url":"https://api.github.com/users/laslabs/following{/other_user}","gists_url":"https://api.github.com/users/laslabs/gists{/gist_id}","starred_url":"https://api.github.com/users/laslabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/laslabs/subscriptions","organizations_url":"https://api.github.com/users/laslabs/orgs","repos_url":"https://api.github.com/users/laslabs/repos","events_url":"https://api.github.com/users/laslabs/events{/privacy}","received_events_url":"https://api.github.com/users/laslabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/laslabs/e-commerce","description":"Odoo E-Commerce server automation addons","fork":true,"url":"https://api.github.com/repos/laslabs/e-commerce","forks_url":"https://api.github.com/repos/laslabs/e-commerce/forks","keys_url":"https://api.github.com/repos/laslabs/e-commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/laslabs/e-commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/laslabs/e-commerce/teams","hooks_url":"https://api.github.com/repos/laslabs/e-commerce/hooks","issue_events_url":"https://api.github.com/repos/laslabs/e-commerce/issues/events{/number}","events_url":"https://api.github.com/repos/laslabs/e-commerce/events","assignees_url":"https://api.github.com/repos/laslabs/e-commerce/assignees{/user}","branches_url":"https://api.github.com/repos/laslabs/e-commerce/branches{/branch}","tags_url":"https://api.github.com/repos/laslabs/e-commerce/tags","blobs_url":"https://api.github.com/repos/laslabs/e-commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/laslabs/e-commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/laslabs/e-commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/laslabs/e-commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/laslabs/e-commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/laslabs/e-commerce/languages","stargazers_url":"https://api.github.com/repos/laslabs/e-commerce/stargazers","contributors_url":"https://api.github.com/repos/laslabs/e-commerce/contributors","subscribers_url":"https://api.github.com/repos/laslabs/e-commerce/subscribers","subscription_url":"https://api.github.com/repos/laslabs/e-commerce/subscription","commits_url":"https://api.github.com/repos/laslabs/e-commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/laslabs/e-commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/laslabs/e-commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/laslabs/e-commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/laslabs/e-commerce/contents/{+path}","compare_url":"https://api.github.com/repos/laslabs/e-commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/laslabs/e-commerce/merges","archive_url":"https://api.github.com/repos/laslabs/e-commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/laslabs/e-commerce/downloads","issues_url":"https://api.github.com/repos/laslabs/e-commerce/issues{/number}","pulls_url":"https://api.github.com/repos/laslabs/e-commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/laslabs/e-commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/laslabs/e-commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/laslabs/e-commerce/labels{/name}","releases_url":"https://api.github.com/repos/laslabs/e-commerce/releases{/id}","deployments_url":"https://api.github.com/repos/laslabs/e-commerce/deployments","created_at":"2016-06-13T19:02:08Z","updated_at":"2016-06-13T19:02:09Z","pushed_at":"2016-09-30T04:19:31Z","git_url":"git://github.com/laslabs/e-commerce.git","ssh_url":"git@github.com:laslabs/e-commerce.git","clone_url":"https://github.com/laslabs/e-commerce.git","svn_url":"https://github.com/laslabs/e-commerce","homepage":"","size":966,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"9.0"}},"base":{"label":"OCA:9.0","ref":"9.0","sha":"f015cb3742fed712a868cef1c57950475eb10be8","user":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"repo":{"id":20893062,"name":"e-commerce","full_name":"OCA/e-commerce","owner":{"login":"OCA","id":7600578,"avatar_url":"https://avatars.githubusercontent.com/u/7600578?v=3","gravatar_id":"","url":"https://api.github.com/users/OCA","html_url":"https://github.com/OCA","followers_url":"https://api.github.com/users/OCA/followers","following_url":"https://api.github.com/users/OCA/following{/other_user}","gists_url":"https://api.github.com/users/OCA/gists{/gist_id}","starred_url":"https://api.github.com/users/OCA/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/OCA/subscriptions","organizations_url":"https://api.github.com/users/OCA/orgs","repos_url":"https://api.github.com/users/OCA/repos","events_url":"https://api.github.com/users/OCA/events{/privacy}","received_events_url":"https://api.github.com/users/OCA/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/OCA/e-commerce","description":"Odoo E-Commerce server automation addons","fork":false,"url":"https://api.github.com/repos/OCA/e-commerce","forks_url":"https://api.github.com/repos/OCA/e-commerce/forks","keys_url":"https://api.github.com/repos/OCA/e-commerce/keys{/key_id}","collaborators_url":"https://api.github.com/repos/OCA/e-commerce/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/OCA/e-commerce/teams","hooks_url":"https://api.github.com/repos/OCA/e-commerce/hooks","issue_events_url":"https://api.github.com/repos/OCA/e-commerce/issues/events{/number}","events_url":"https://api.github.com/repos/OCA/e-commerce/events","assignees_url":"https://api.github.com/repos/OCA/e-commerce/assignees{/user}","branches_url":"https://api.github.com/repos/OCA/e-commerce/branches{/branch}","tags_url":"https://api.github.com/repos/OCA/e-commerce/tags","blobs_url":"https://api.github.com/repos/OCA/e-commerce/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/OCA/e-commerce/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/OCA/e-commerce/git/refs{/sha}","trees_url":"https://api.github.com/repos/OCA/e-commerce/git/trees{/sha}","statuses_url":"https://api.github.com/repos/OCA/e-commerce/statuses/{sha}","languages_url":"https://api.github.com/repos/OCA/e-commerce/languages","stargazers_url":"https://api.github.com/repos/OCA/e-commerce/stargazers","contributors_url":"https://api.github.com/repos/OCA/e-commerce/contributors","subscribers_url":"https://api.github.com/repos/OCA/e-commerce/subscribers","subscription_url":"https://api.github.com/repos/OCA/e-commerce/subscription","commits_url":"https://api.github.com/repos/OCA/e-commerce/commits{/sha}","git_commits_url":"https://api.github.com/repos/OCA/e-commerce/git/commits{/sha}","comments_url":"https://api.github.com/repos/OCA/e-commerce/comments{/number}","issue_comment_url":"https://api.github.com/repos/OCA/e-commerce/issues/comments{/number}","contents_url":"https://api.github.com/repos/OCA/e-commerce/contents/{+path}","compare_url":"https://api.github.com/repos/OCA/e-commerce/compare/{base}...{head}","merges_url":"https://api.github.com/repos/OCA/e-commerce/merges","archive_url":"https://api.github.com/repos/OCA/e-commerce/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/OCA/e-commerce/downloads","issues_url":"https://api.github.com/repos/OCA/e-commerce/issues{/number}","pulls_url":"https://api.github.com/repos/OCA/e-commerce/pulls{/number}","milestones_url":"https://api.github.com/repos/OCA/e-commerce/milestones{/number}","notifications_url":"https://api.github.com/repos/OCA/e-commerce/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/OCA/e-commerce/labels{/name}","releases_url":"https://api.github.com/repos/OCA/e-commerce/releases{/id}","deployments_url":"https://api.github.com/repos/OCA/e-commerce/deployments","created_at":"2014-06-16T17:06:27Z","updated_at":"2016-09-27T01:09:46Z","pushed_at":"2016-10-03T08:38:18Z","git_url":"git://github.com/OCA/e-commerce.git","ssh_url":"git@github.com:OCA/e-commerce.git","clone_url":"https://github.com/OCA/e-commerce.git","svn_url":"https://github.com/OCA/e-commerce","homepage":"","size":4179,"stargazers_count":30,"watchers_count":30,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":123,"mirror_url":null,"open_issues_count":28,"forks":123,"open_issues":28,"watchers":30,"default_branch":"9.0"}},"_links":{"self":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/131"},"html":{"href":"https://github.com/OCA/e-commerce/pull/131"},"issue":{"href":"https://api.github.com/repos/OCA/e-commerce/issues/131"},"comments":{"href":"https://api.github.com/repos/OCA/e-commerce/issues/131/comments"},"review_comments":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/131/comments"},"review_comment":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/OCA/e-commerce/pulls/131/commits"},"statuses":{"href":"https://api.github.com/repos/OCA/e-commerce/statuses/5a2b046c22250838248f39cd742cf33d4a235e91"}}}}
{"actor":{"display_login":"lasley"}}