GitHub PullRequestReviewCommentEvent at 2014-11-17 07:45:50
Repository: gaia
Actor: EragonJ
Payload: {"action":"created","comment":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/20421237","id":20421237,"diff_hunk":"@@ -0,0 +1,113 @@\n+/**\n+ * Handle HardwareInfo related functionality\n+ *\n+ * @module about/HardwareInfo\n+ */\n+define(function(require) {\n+  'use strict';\n+\n+  /**\n+   * @alias module:about/HardwareInfo\n+   * @class HardwareInfo\n+   * @returns {HardwareInfo}\n+   */\n+  var HardwareInfo = function() {\n+    this._elements = null;\n+  };\n+\n+  HardwareInfo.prototype = {\n+    /**\n+     * initialization.\n+     *\n+     * @access public\n+     * @memberOf HardwareInfo.prototype\n+     * @param {HTMLElement} elements\n+     */\n+    init: function hi_init(elements) {\n+      this._elements = elements;\n+\n+      this._loadHardwareInfo();\n+    },\n+\n+    /**\n+     * Load hardware related informations.\n+     *\n+     * @access private\n+     * @memberOf HardwareInfo.prototype\n+     */\n+    _loadHardwareInfo: function hi__loadHardwareInfo() {\n+      var _conns = navigator.mozMobileConnections;\n+      if (!_conns) {\n+        this._elements.deviceInfoPhoneNum.hidden = true;\n+        return;\n+      }\n+\n+      var _isMultiSim = _conns.length > 1;\n+      // Only show the list item when there are valid iccinfos.\n+      var _showListItem = false;\n+\n+      // update msisdns\n+      while (this._elements.deviceInfoMsisdns.hasChildNodes()) {\n+        this._elements.deviceInfoMsisdns.removeChild(\n+          this._elements.deviceInfoMsisdns.lastChild);\n+      }\n+\n+      Array.prototype.forEach.call(_conns, function(conn, index) {\n+        var iccId = conn.iccId;\n+        if (!iccId) {\n+          return;\n+        }\n+\n+        var iccObj = navigator.mozIccManager.getIccById(iccId);\n+        if (!iccObj) {\n+          return;\n+        }\n+\n+        var iccInfo = iccObj.iccInfo;\n+        if (!iccInfo) {\n+          return;\n+        }\n+\n+        _showListItem = true;\n+        var span = this._renderPhoneNumberElement(iccInfo, index, _isMultiSim);\n+        this._elements.deviceInfoMsisdns.appendChild(span);\n+      }.bind(this));\n+\n+      this._elements.deviceInfoPhoneNum.hidden = !_showListItem;\n+    },\n+\n+    /**\n+     * render phone number element based on SIM card info.\n+     *\n+     * If the icc card is gsm card, the phone number is in msisdn.\n+     * Otherwise, the phone number is in mdn.\n+     *\n+     * @access private\n+     * @memberOf HardwareInfo.prototype\n+     * @param {Object} iccInfo iccInfo data\n+     * @param {Number} index index number\n+     * @param {Boolean} isMultiSim has multiple SIM","path":"apps/settings/js/panels/about/hardware_info.js","position":89,"original_position":89,"commit_id":"4743c8a84ae99baecb809e6c9e09e8162ea4c9d5","original_commit_id":"4743c8a84ae99baecb809e6c9e09e8162ea4c9d5","user":{"login":"EragonJ","id":68322,"avatar_url":"https://avatars.githubusercontent.com/u/68322?v=3","gravatar_id":"","url":"https://api.github.com/users/EragonJ","html_url":"https://github.com/EragonJ","followers_url":"https://api.github.com/users/EragonJ/followers","following_url":"https://api.github.com/users/EragonJ/following{/other_user}","gists_url":"https://api.github.com/users/EragonJ/gists{/gist_id}","starred_url":"https://api.github.com/users/EragonJ/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/EragonJ/subscriptions","organizations_url":"https://api.github.com/users/EragonJ/orgs","repos_url":"https://api.github.com/users/EragonJ/repos","events_url":"https://api.github.com/users/EragonJ/events{/privacy}","received_events_url":"https://api.github.com/users/EragonJ/received_events","type":"User","site_admin":false},"body":"missing `@return` ","created_at":"2014-11-17T07:45:50Z","updated_at":"2014-11-17T07:45:50Z","html_url":"https://github.com/mozilla-b2g/gaia/pull/26170#discussion_r20421237","pull_request_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170","_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/20421237"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/26170#discussion_r20421237"},"pull_request":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170"}}},"pull_request":{"url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170","id":24512238,"html_url":"https://github.com/mozilla-b2g/gaia/pull/26170","diff_url":"https://github.com/mozilla-b2g/gaia/pull/26170.diff","patch_url":"https://github.com/mozilla-b2g/gaia/pull/26170.patch","issue_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26170","number":26170,"state":"open","locked":false,"title":"Bug 973450 - [settings] refactor Device information panel with AMD patte...","user":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"body":"...rn","created_at":"2014-11-17T02:44:49Z","updated_at":"2014-11-17T07:45:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c15b037954401d2644dbcf0915ed14b922da8963","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170/commits","review_comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170/comments","review_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26170/comments","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/4743c8a84ae99baecb809e6c9e09e8162ea4c9d5","head":{"label":"gasolin:issue-973450-2","ref":"issue-973450-2","sha":"4743c8a84ae99baecb809e6c9e09e8162ea4c9d5","user":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"repo":{"id":8349595,"name":"gaia","full_name":"gasolin/gaia","owner":{"login":"gasolin","id":748808,"avatar_url":"https://avatars.githubusercontent.com/u/748808?v=3","gravatar_id":"","url":"https://api.github.com/users/gasolin","html_url":"https://github.com/gasolin","followers_url":"https://api.github.com/users/gasolin/followers","following_url":"https://api.github.com/users/gasolin/following{/other_user}","gists_url":"https://api.github.com/users/gasolin/gists{/gist_id}","starred_url":"https://api.github.com/users/gasolin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gasolin/subscriptions","organizations_url":"https://api.github.com/users/gasolin/orgs","repos_url":"https://api.github.com/users/gasolin/repos","events_url":"https://api.github.com/users/gasolin/events{/privacy}","received_events_url":"https://api.github.com/users/gasolin/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gasolin/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see https://wiki.mozilla.org/Release_Management/B2G_Landing","fork":true,"url":"https://api.github.com/repos/gasolin/gaia","forks_url":"https://api.github.com/repos/gasolin/gaia/forks","keys_url":"https://api.github.com/repos/gasolin/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gasolin/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gasolin/gaia/teams","hooks_url":"https://api.github.com/repos/gasolin/gaia/hooks","issue_events_url":"https://api.github.com/repos/gasolin/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/gasolin/gaia/events","assignees_url":"https://api.github.com/repos/gasolin/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/gasolin/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/gasolin/gaia/tags","blobs_url":"https://api.github.com/repos/gasolin/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gasolin/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gasolin/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/gasolin/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gasolin/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/gasolin/gaia/languages","stargazers_url":"https://api.github.com/repos/gasolin/gaia/stargazers","contributors_url":"https://api.github.com/repos/gasolin/gaia/contributors","subscribers_url":"https://api.github.com/repos/gasolin/gaia/subscribers","subscription_url":"https://api.github.com/repos/gasolin/gaia/subscription","commits_url":"https://api.github.com/repos/gasolin/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/gasolin/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/gasolin/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/gasolin/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/gasolin/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/gasolin/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gasolin/gaia/merges","archive_url":"https://api.github.com/repos/gasolin/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gasolin/gaia/downloads","issues_url":"https://api.github.com/repos/gasolin/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/gasolin/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/gasolin/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/gasolin/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gasolin/gaia/labels{/name}","releases_url":"https://api.github.com/repos/gasolin/gaia/releases{/id}","created_at":"2013-02-22T03:20:25Z","updated_at":"2014-09-11T05:53:12Z","pushed_at":"2014-11-17T03:21:04Z","git_url":"git://github.com/gasolin/gaia.git","ssh_url":"git@github.com:gasolin/gaia.git","clone_url":"https://github.com/gasolin/gaia.git","svn_url":"https://github.com/gasolin/gaia","homepage":"https://wiki.mozilla.org/B2G","size":873213,"stargazers_count":1,"watchers_count":1,"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":1,"default_branch":"master"}},"base":{"label":"mozilla-b2g:master","ref":"master","sha":"1e835d372c7f2e8cb8f29c21895802f449a97634","user":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"repo":{"id":2317369,"name":"gaia","full_name":"mozilla-b2g/gaia","owner":{"login":"mozilla-b2g","id":1261292,"avatar_url":"https://avatars.githubusercontent.com/u/1261292?v=3","gravatar_id":"","url":"https://api.github.com/users/mozilla-b2g","html_url":"https://github.com/mozilla-b2g","followers_url":"https://api.github.com/users/mozilla-b2g/followers","following_url":"https://api.github.com/users/mozilla-b2g/following{/other_user}","gists_url":"https://api.github.com/users/mozilla-b2g/gists{/gist_id}","starred_url":"https://api.github.com/users/mozilla-b2g/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mozilla-b2g/subscriptions","organizations_url":"https://api.github.com/users/mozilla-b2g/orgs","repos_url":"https://api.github.com/users/mozilla-b2g/repos","events_url":"https://api.github.com/users/mozilla-b2g/events{/privacy}","received_events_url":"https://api.github.com/users/mozilla-b2g/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/mozilla-b2g/gaia","description":"Gaia is a HTML5-based Phone UI for the Boot 2 Gecko Project. NOTE: For details of what branches are used for what releases, see","fork":false,"url":"https://api.github.com/repos/mozilla-b2g/gaia","forks_url":"https://api.github.com/repos/mozilla-b2g/gaia/forks","keys_url":"https://api.github.com/repos/mozilla-b2g/gaia/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mozilla-b2g/gaia/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mozilla-b2g/gaia/teams","hooks_url":"https://api.github.com/repos/mozilla-b2g/gaia/hooks","issue_events_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/events{/number}","events_url":"https://api.github.com/repos/mozilla-b2g/gaia/events","assignees_url":"https://api.github.com/repos/mozilla-b2g/gaia/assignees{/user}","branches_url":"https://api.github.com/repos/mozilla-b2g/gaia/branches{/branch}","tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/tags","blobs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/refs{/sha}","trees_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/{sha}","languages_url":"https://api.github.com/repos/mozilla-b2g/gaia/languages","stargazers_url":"https://api.github.com/repos/mozilla-b2g/gaia/stargazers","contributors_url":"https://api.github.com/repos/mozilla-b2g/gaia/contributors","subscribers_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscribers","subscription_url":"https://api.github.com/repos/mozilla-b2g/gaia/subscription","commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/commits{/sha}","git_commits_url":"https://api.github.com/repos/mozilla-b2g/gaia/git/commits{/sha}","comments_url":"https://api.github.com/repos/mozilla-b2g/gaia/comments{/number}","issue_comment_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues/comments/{number}","contents_url":"https://api.github.com/repos/mozilla-b2g/gaia/contents/{+path}","compare_url":"https://api.github.com/repos/mozilla-b2g/gaia/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mozilla-b2g/gaia/merges","archive_url":"https://api.github.com/repos/mozilla-b2g/gaia/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mozilla-b2g/gaia/downloads","issues_url":"https://api.github.com/repos/mozilla-b2g/gaia/issues{/number}","pulls_url":"https://api.github.com/repos/mozilla-b2g/gaia/pulls{/number}","milestones_url":"https://api.github.com/repos/mozilla-b2g/gaia/milestones{/number}","notifications_url":"https://api.github.com/repos/mozilla-b2g/gaia/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mozilla-b2g/gaia/labels{/name}","releases_url":"https://api.github.com/repos/mozilla-b2g/gaia/releases{/id}","created_at":"2011-09-03T01:38:46Z","updated_at":"2014-11-17T06:04:31Z","pushed_at":"2014-11-17T07:29:41Z","git_url":"git://github.com/mozilla-b2g/gaia.git","ssh_url":"git@github.com:mozilla-b2g/gaia.git","clone_url":"https://github.com/mozilla-b2g/gaia.git","svn_url":"https://github.com/mozilla-b2g/gaia","homepage":"https://wiki.mozilla.org/B2G","size":1552329,"stargazers_count":1799,"watchers_count":1799,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2051,"mirror_url":null,"open_issues_count":661,"forks":2051,"open_issues":661,"watchers":1799,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170"},"html":{"href":"https://github.com/mozilla-b2g/gaia/pull/26170"},"issue":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26170"},"comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/issues/26170/comments"},"review_comments":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170/comments"},"review_comment":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/comments/{number}"},"commits":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/pulls/26170/commits"},"statuses":{"href":"https://api.github.com/repos/mozilla-b2g/gaia/statuses/4743c8a84ae99baecb809e6c9e09e8162ea4c9d5"}}}}