{"action":"created","comment":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/55232773","id":55232773,"diff_hunk":"@@ -0,0 +1,216 @@\n+var _ = require('lodash');\n+var moment = require('moment');\n+\n+/**\n+ * @class\n+ * @param {ElementFinder} rxTimePickerElement\n+ * ElementFinder to be transformed into an rxTimePicker page object\n+ *\n+ * @returns {rxTimePicker}\n+ *\n+ * @property {String[]} errors - (get) Array of error messages\n+ * @property {String} hour - (get/set) Hour value of picker\n+ * @property {String} minutes - (get/set) Minutes value of picker\n+ * @property {String} period - (get/set) Period value of picker (AM/PM)\n+ * @property {String} time (get/set)\n+ * Time value in `HH:mmZ` format, where `Z` must match `[-+]\\d{2}:\\d{2}`.\n+ * This returns the data value of the picker, not the display value.\n+ *\n+ * When set, it will automatically commit changes to the model.\n+ *\n+ * @property {String} utcOffset (get/set)\n+ * UTC Offset value of picker (-05:00, +00:00, +10:00)\n+ *\n+ * @example\n+ * var picker = new encore.rxTimePicker($('#myTimePicker'));\n+ *\n+ * // ===== Modifying Time =====\n+ * picker.time = '18:45+04:00'; // automatically commits change\n+ * picker.time; // '18:45+04:00'\n+ * picker.hour; // '6'\n+ * picker.minutes; // '45'\n+ * picker.period; // 'PM'\n+ * picker.offset; // '+04:00'\n+ *\n+ * // ===== Modifying Time Parts =====\n+ *\n+ * // cannot modify without opening picker\n+ * picker.open();\n+ *\n+ * picker.hour = 12;\n+ * picker.minutes = 15;\n+ * picker.period = 'PM';\n+ * picker.offset = '-05:00';\n+ * picker.time; // '18:45+04:00' (currently unchanged)\n+ *\n+ * // makes changes to `time` and automatically closes picker\n+ * picker.submit();\n+ *\n+ * picker.time; // '12:15-05:00' (value updated)\n+ * picker.hour; // '12'\n+ * picker.minutes; // '15'\n+ * picker.period; // 'PM'\n+ * picker.offset; // '-05:00'\n+ */\n+function rxTimePicker (rxTimePickerElement) {\n+    this.rootElement = rxTimePickerElement || $$('rx-time-picker').first();\n+\n+    // Private selectors\n+    this.eleControl = this.rootElement.$('.control');\n+    this.txtHour = this.rootElement.$('.hour');\n+    this.txtMinutes = this.rootElement.$('.minutes');\n+    this.btnSubmit = this.rootElement.$('button.done');\n+    this.btnCancel = this.rootElement.$('button.cancel');\n+    this.selPeriod = this.rootElement.$('.period');\n+    this.selUtcOffset = this.rootElement.$('.utcOffset');\n+    this.txtDisplayValue = this.rootElement.$('.displayValue');\n+\n+    // Private Page Objects\n+    this.pagePeriod = exports.rxSelect.initialize(this.selPeriod);\n+    this.pageUtcOffset = exports.rxSelect.initialize(this.selUtcOffset);\n+\n+    // Properties\n+    Object.defineProperties(this, {\n+        errors: {\n+            get: function () {\n+                return this.rootElement.$$('rx-inline-error').getText();\n+            }\n+        },//errors\n+\n+        hour: {\n+            get: function () {\n+                return this.txtHour.getAttribute('value');\n+            },\n+            set: function (val) {\n+                this.txtHour.clear();\n+                this.txtHour.sendKeys(val);\n+            }\n+        },//hour\n+\n+        minutes: {\n+            get: function () {\n+                return this.txtMinutes.getAttribute('value');\n+            },\n+            set: function (val) {\n+                this.txtMinutes.clear();\n+                this.txtMinutes.sendKeys(val);\n+            }\n+        },//minutes\n+\n+        period: exports.rxSelect.generateAccessor(this.selPeriod),\n+\n+        utcOffset: exports.rxSelect.generateAccessor(this.selUtcOffset),\n+\n+        time: {\n+            get: function () {\n+                return this.txtDisplayValue.getAttribute('data-time');\n+            },\n+            set: function (val) {\n+                // Accept ISO 8601 Standard Time Format OR custom display format\n+                var date = moment(val, 'HH:mmZ');\n+\n+                // `date` is currently in local TZ (not expected TZ)\n+                // extract the expected TZ to update `date`\n+                var offset = encore.rxTimePickerUtil.parseUtcOffset(val);\n+                // force to time zone from input\n+                date.utcOffset(offset);\n+\n+                // set via picker\n+                this.open();\n+                exports.rxForm.fill(this, {\n+                    hour: date.format('hh'), // 12-hour format (no padding)\n+                    minutes: date.format('mm'), // padded minutes\n+                    period: date.format('A'), // AM/PM\n+                    utcOffset: date.format('Z')\n+                });\n+                this.submit();\n+            }\n+        }//time\n+    });//properties\n+}//rxTimePicker\n+\n+/**\n+ * @description Whether the picker can be submitted\n+ * @returns {Boolean}\n+ */\n+rxTimePicker.prototype.canSubmit = function () {","path":"src/molecules/rxTimePicker/scripts/rxTimePicker.page.js","position":136,"original_position":136,"commit_id":"9153fb5fd53588457f27d6c9a8d416dc220916a9","original_commit_id":"9153fb5fd53588457f27d6c9a8d416dc220916a9","user":{"login":"100stacks","id":10120600,"avatar_url":"https://avatars.githubusercontent.com/u/10120600?v=3","gravatar_id":"","url":"https://api.github.com/users/100stacks","html_url":"https://github.com/100stacks","followers_url":"https://api.github.com/users/100stacks/followers","following_url":"https://api.github.com/users/100stacks/following{/other_user}","gists_url":"https://api.github.com/users/100stacks/gists{/gist_id}","starred_url":"https://api.github.com/users/100stacks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/100stacks/subscriptions","organizations_url":"https://api.github.com/users/100stacks/orgs","repos_url":"https://api.github.com/users/100stacks/repos","events_url":"https://api.github.com/users/100stacks/events{/privacy}","received_events_url":"https://api.github.com/users/100stacks/received_events","type":"User","site_admin":false},"body":"@CITguy, just curious why you are manipulating the `rxTimePicker.prototype` object here and the advantages/gains from it?","created_at":"2016-03-07T16:51:03Z","updated_at":"2016-03-07T16:51:03Z","html_url":"https://github.com/rackerlabs/encore-ui/pull/1502#discussion_r55232773","pull_request_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502","_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments/55232773"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/1502#discussion_r55232773"},"pull_request":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502"}}},"pull_request":{"url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502","id":56394432,"html_url":"https://github.com/rackerlabs/encore-ui/pull/1502","diff_url":"https://github.com/rackerlabs/encore-ui/pull/1502.diff","patch_url":"https://github.com/rackerlabs/encore-ui/pull/1502.patch","issue_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/1502","number":1502,"state":"open","locked":false,"title":"feat(rxTimePicker): add rxTimePicker molecule","user":{"login":"CITguy","id":545605,"avatar_url":"https://avatars.githubusercontent.com/u/545605?v=3","gravatar_id":"","url":"https://api.github.com/users/CITguy","html_url":"https://github.com/CITguy","followers_url":"https://api.github.com/users/CITguy/followers","following_url":"https://api.github.com/users/CITguy/following{/other_user}","gists_url":"https://api.github.com/users/CITguy/gists{/gist_id}","starred_url":"https://api.github.com/users/CITguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CITguy/subscriptions","organizations_url":"https://api.github.com/users/CITguy/orgs","repos_url":"https://api.github.com/users/CITguy/repos","events_url":"https://api.github.com/users/CITguy/events{/privacy}","received_events_url":"https://api.github.com/users/CITguy/received_events","type":"User","site_admin":false},"body":"JIRA: https://jira.rax.io/browse/FRMW-540\r\n\r\n### LGTMs\r\n- [ ] Dev LGTM\r\n- [ ] Dev LGTM\r\n- [x] QE LGTM\r\n- [ ] Design LGTM","created_at":"2016-01-18T21:39:24Z","updated_at":"2016-03-07T16:51:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9a58544e62f193eee59387d7753328ccc30e8023","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502/commits","review_comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502/comments","review_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/1502/comments","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/9153fb5fd53588457f27d6c9a8d416dc220916a9","head":{"label":"CITguy:M-rxTimePicker","ref":"M-rxTimePicker","sha":"9153fb5fd53588457f27d6c9a8d416dc220916a9","user":{"login":"CITguy","id":545605,"avatar_url":"https://avatars.githubusercontent.com/u/545605?v=3","gravatar_id":"","url":"https://api.github.com/users/CITguy","html_url":"https://github.com/CITguy","followers_url":"https://api.github.com/users/CITguy/followers","following_url":"https://api.github.com/users/CITguy/following{/other_user}","gists_url":"https://api.github.com/users/CITguy/gists{/gist_id}","starred_url":"https://api.github.com/users/CITguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CITguy/subscriptions","organizations_url":"https://api.github.com/users/CITguy/orgs","repos_url":"https://api.github.com/users/CITguy/repos","events_url":"https://api.github.com/users/CITguy/events{/privacy}","received_events_url":"https://api.github.com/users/CITguy/received_events","type":"User","site_admin":false},"repo":{"id":25267205,"name":"encore-ui","full_name":"CITguy/encore-ui","owner":{"login":"CITguy","id":545605,"avatar_url":"https://avatars.githubusercontent.com/u/545605?v=3","gravatar_id":"","url":"https://api.github.com/users/CITguy","html_url":"https://github.com/CITguy","followers_url":"https://api.github.com/users/CITguy/followers","following_url":"https://api.github.com/users/CITguy/following{/other_user}","gists_url":"https://api.github.com/users/CITguy/gists{/gist_id}","starred_url":"https://api.github.com/users/CITguy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CITguy/subscriptions","organizations_url":"https://api.github.com/users/CITguy/orgs","repos_url":"https://api.github.com/users/CITguy/repos","events_url":"https://api.github.com/users/CITguy/events{/privacy}","received_events_url":"https://api.github.com/users/CITguy/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/CITguy/encore-ui","description":"UI Framework for Encore","fork":true,"url":"https://api.github.com/repos/CITguy/encore-ui","forks_url":"https://api.github.com/repos/CITguy/encore-ui/forks","keys_url":"https://api.github.com/repos/CITguy/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/CITguy/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/CITguy/encore-ui/teams","hooks_url":"https://api.github.com/repos/CITguy/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/CITguy/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/CITguy/encore-ui/events","assignees_url":"https://api.github.com/repos/CITguy/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/CITguy/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/CITguy/encore-ui/tags","blobs_url":"https://api.github.com/repos/CITguy/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/CITguy/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/CITguy/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/CITguy/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/CITguy/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/CITguy/encore-ui/languages","stargazers_url":"https://api.github.com/repos/CITguy/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/CITguy/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/CITguy/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/CITguy/encore-ui/subscription","commits_url":"https://api.github.com/repos/CITguy/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/CITguy/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/CITguy/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/CITguy/encore-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/CITguy/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/CITguy/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/CITguy/encore-ui/merges","archive_url":"https://api.github.com/repos/CITguy/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/CITguy/encore-ui/downloads","issues_url":"https://api.github.com/repos/CITguy/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/CITguy/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/CITguy/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/CITguy/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/CITguy/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/CITguy/encore-ui/releases{/id}","deployments_url":"https://api.github.com/repos/CITguy/encore-ui/deployments","created_at":"2014-10-15T18:14:05Z","updated_at":"2016-01-11T23:27:22Z","pushed_at":"2016-03-04T22:49:36Z","git_url":"git://github.com/CITguy/encore-ui.git","ssh_url":"git@github.com:CITguy/encore-ui.git","clone_url":"https://github.com/CITguy/encore-ui.git","svn_url":"https://github.com/CITguy/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":14431,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"rackerlabs:master","ref":"master","sha":"779c41830f9b8c08fa8fda088d42e4685ab554d4","user":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"repo":{"id":11432401,"name":"encore-ui","full_name":"rackerlabs/encore-ui","owner":{"login":"rackerlabs","id":84293,"avatar_url":"https://avatars.githubusercontent.com/u/84293?v=3","gravatar_id":"","url":"https://api.github.com/users/rackerlabs","html_url":"https://github.com/rackerlabs","followers_url":"https://api.github.com/users/rackerlabs/followers","following_url":"https://api.github.com/users/rackerlabs/following{/other_user}","gists_url":"https://api.github.com/users/rackerlabs/gists{/gist_id}","starred_url":"https://api.github.com/users/rackerlabs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rackerlabs/subscriptions","organizations_url":"https://api.github.com/users/rackerlabs/orgs","repos_url":"https://api.github.com/users/rackerlabs/repos","events_url":"https://api.github.com/users/rackerlabs/events{/privacy}","received_events_url":"https://api.github.com/users/rackerlabs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/rackerlabs/encore-ui","description":"UI Framework for Encore","fork":false,"url":"https://api.github.com/repos/rackerlabs/encore-ui","forks_url":"https://api.github.com/repos/rackerlabs/encore-ui/forks","keys_url":"https://api.github.com/repos/rackerlabs/encore-ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rackerlabs/encore-ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rackerlabs/encore-ui/teams","hooks_url":"https://api.github.com/repos/rackerlabs/encore-ui/hooks","issue_events_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/events{/number}","events_url":"https://api.github.com/repos/rackerlabs/encore-ui/events","assignees_url":"https://api.github.com/repos/rackerlabs/encore-ui/assignees{/user}","branches_url":"https://api.github.com/repos/rackerlabs/encore-ui/branches{/branch}","tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/tags","blobs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/{sha}","languages_url":"https://api.github.com/repos/rackerlabs/encore-ui/languages","stargazers_url":"https://api.github.com/repos/rackerlabs/encore-ui/stargazers","contributors_url":"https://api.github.com/repos/rackerlabs/encore-ui/contributors","subscribers_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscribers","subscription_url":"https://api.github.com/repos/rackerlabs/encore-ui/subscription","commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/rackerlabs/encore-ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/rackerlabs/encore-ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/rackerlabs/encore-ui/contents/{+path}","compare_url":"https://api.github.com/repos/rackerlabs/encore-ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rackerlabs/encore-ui/merges","archive_url":"https://api.github.com/repos/rackerlabs/encore-ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rackerlabs/encore-ui/downloads","issues_url":"https://api.github.com/repos/rackerlabs/encore-ui/issues{/number}","pulls_url":"https://api.github.com/repos/rackerlabs/encore-ui/pulls{/number}","milestones_url":"https://api.github.com/repos/rackerlabs/encore-ui/milestones{/number}","notifications_url":"https://api.github.com/repos/rackerlabs/encore-ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rackerlabs/encore-ui/labels{/name}","releases_url":"https://api.github.com/repos/rackerlabs/encore-ui/releases{/id}","deployments_url":"https://api.github.com/repos/rackerlabs/encore-ui/deployments","created_at":"2013-07-15T20:06:52Z","updated_at":"2016-03-03T10:23:39Z","pushed_at":"2016-03-04T23:46:23Z","git_url":"git://github.com/rackerlabs/encore-ui.git","ssh_url":"git@github.com:rackerlabs/encore-ui.git","clone_url":"https://github.com/rackerlabs/encore-ui.git","svn_url":"https://github.com/rackerlabs/encore-ui","homepage":"http://rackerlabs.github.io/encore-ui/","size":37007,"stargazers_count":38,"watchers_count":38,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":46,"mirror_url":null,"open_issues_count":10,"forks":46,"open_issues":10,"watchers":38,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502"},"html":{"href":"https://github.com/rackerlabs/encore-ui/pull/1502"},"issue":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/1502"},"comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/issues/1502/comments"},"review_comments":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502/comments"},"review_comment":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/pulls/1502/commits"},"statuses":{"href":"https://api.github.com/repos/rackerlabs/encore-ui/statuses/9153fb5fd53588457f27d6c9a8d416dc220916a9"}}}}