{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments/54566527","id":54566527,"diff_hunk":"@@ -0,0 +1,182 @@\n+/*\n+ *  Copyright (c) 2015, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.\n+ *\n+ *  Licensed under the Apache License, Version 2.0 (the \"License\");\n+ *  you may not use this file except in compliance with the License.\n+ *  You may obtain a copy of the License at\n+ *\n+ *  http://www.apache.org/licenses/LICENSE-2.0\n+ *\n+ *  Unless required by applicable law or agreed to in writing, software\n+ *  distributed under the License is distributed on an \"AS IS\" BASIS,\n+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n+ *  See the License for the specific language governing permissions and\n+ *  limitations under the License.\n+ *\n+ *\n+ */\n+\n+var modalPopup = \".wr-modalpopup\";\n+var modalPopupContainer = modalPopup + \" .modalpopup-container\";\n+var modalPopupContent = modalPopup + \" .modalpopup-content\";\n+var body = \"body\";\n+\n+/*\n+ * set popup maximum height function.\n+ */\n+function setPopupMaxHeight() {\n+    $(modalPopupContent).css('max-height', ($(body).height() - ($(body).height() / 100 * 30)));\n+    $(modalPopupContainer).css('margin-top', (-($(modalPopupContainer).height() / 2)));\n+}\n+\n+/*\n+ * show popup function.\n+ */\n+function showPopup() {\n+    $(modalPopup).show();\n+    setPopupMaxHeight();\n+    $('#downloadForm').validate({\n+        rules: {\n+            deviceName: {\n+                minlength: 4,\n+                required: true\n+            }\n+        },\n+        highlight: function (element) {\n+            $(element).closest('.control-group').removeClass('success').addClass('error');\n+        },\n+        success: function (element) {\n+            $(element).closest('.control-group').removeClass('error').addClass('success');\n+            $('label[for=deviceName]').remove();\n+        }\n+    });\n+    var deviceType = \"\";\n+    $('.deviceType').each(function () {\n+        if (this.value != \"\") {\n+            deviceType = this.value;\n+        }\n+    });\n+    if (deviceType == 'virtual_firealarm'){\n+        $('.sketchType').remove();\n+        $('input[name=\"sketchType\"][value=\"virtual_firealarm\"]').prop('checked', true);\n+        $(\"label[for='virtual_firealarm']\").text(\"Simple Agent\");\n+        $(\"label[for='virtual_firealarm_advanced']\").text(\"Advanced Agent\");\n+    }else{\n+        $('.sketchTypes').remove();\n+    }\n+}\n+\n+/*\n+ * hide popup function.","path":"features/device-mgt-iot-virtualfirealarm-feature/org.wso2.carbon.device.mgt.iot.virtualfirealarm.feature/src/main/resources/jaggeryapps/devicemgt/app/units/cdmf.unit.device.type.virtual_firealarm.type-view/public/js/download.js","position":70,"original_position":70,"commit_id":"c1a64238889aa52b87683ee3edf54b70eaeee39e","original_commit_id":"c1a64238889aa52b87683ee3edf54b70eaeee39e","user":{"login":"prabathabey","id":6664125,"avatar_url":"https://avatars.githubusercontent.com/u/6664125?v=3","gravatar_id":"","url":"https://api.github.com/users/prabathabey","html_url":"https://github.com/prabathabey","followers_url":"https://api.github.com/users/prabathabey/followers","following_url":"https://api.github.com/users/prabathabey/following{/other_user}","gists_url":"https://api.github.com/users/prabathabey/gists{/gist_id}","starred_url":"https://api.github.com/users/prabathabey/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prabathabey/subscriptions","organizations_url":"https://api.github.com/users/prabathabey/orgs","repos_url":"https://api.github.com/users/prabathabey/repos","events_url":"https://api.github.com/users/prabathabey/events{/privacy}","received_events_url":"https://api.github.com/users/prabathabey/received_events","type":"User","site_admin":false},"body":"Use proper linguistics. Start the first letter with a capital","created_at":"2016-03-01T13:36:16Z","updated_at":"2016-03-01T13:36:16Z","html_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29#discussion_r54566527","pull_request_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29","_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments/54566527"},"html":{"href":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29#discussion_r54566527"},"pull_request":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29","id":53254742,"html_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29","diff_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29.diff","patch_url":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29.patch","issue_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/29","number":29,"state":"closed","locked":false,"title":"adding device type specific units","user":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"body":"","created_at":"2015-12-10T12:55:14Z","updated_at":"2016-03-01T13:36:16Z","closed_at":"2015-12-10T12:57:00Z","merged_at":"2015-12-10T12:57:00Z","merge_commit_sha":"2bf24c4363dbc4dad41de4706694e19b1e0750ed","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29/commits","review_comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29/comments","review_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/29/comments","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/c1a64238889aa52b87683ee3edf54b70eaeee39e","head":{"label":"rasika90:IoTS-1.0.0-M1","ref":"IoTS-1.0.0-M1","sha":"c1a64238889aa52b87683ee3edf54b70eaeee39e","user":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"repo":{"id":47752213,"name":"carbon-device-mgt-plugins","full_name":"rasika90/carbon-device-mgt-plugins","owner":{"login":"rasika90","id":1448489,"avatar_url":"https://avatars.githubusercontent.com/u/1448489?v=3","gravatar_id":"","url":"https://api.github.com/users/rasika90","html_url":"https://github.com/rasika90","followers_url":"https://api.github.com/users/rasika90/followers","following_url":"https://api.github.com/users/rasika90/following{/other_user}","gists_url":"https://api.github.com/users/rasika90/gists{/gist_id}","starred_url":"https://api.github.com/users/rasika90/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rasika90/subscriptions","organizations_url":"https://api.github.com/users/rasika90/orgs","repos_url":"https://api.github.com/users/rasika90/repos","events_url":"https://api.github.com/users/rasika90/events{/privacy}","received_events_url":"https://api.github.com/users/rasika90/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/rasika90/carbon-device-mgt-plugins","description":"","fork":true,"url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins","forks_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/forks","keys_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/teams","hooks_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/hooks","issue_events_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/events","assignees_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/tags","blobs_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/languages","stargazers_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/stargazers","contributors_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/contributors","subscribers_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/subscribers","subscription_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/subscription","commits_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/merges","archive_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/downloads","issues_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/labels{/name}","releases_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/rasika90/carbon-device-mgt-plugins/deployments","created_at":"2015-12-10T09:40:40Z","updated_at":"2015-12-10T09:40:41Z","pushed_at":"2016-02-19T07:14:12Z","git_url":"git://github.com/rasika90/carbon-device-mgt-plugins.git","ssh_url":"git@github.com:rasika90/carbon-device-mgt-plugins.git","clone_url":"https://github.com/rasika90/carbon-device-mgt-plugins.git","svn_url":"https://github.com/rasika90/carbon-device-mgt-plugins","homepage":null,"size":67114,"stargazers_count":0,"watchers_count":0,"language":"Java","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":"master"}},"base":{"label":"wso2:IoTS-1.0.0-M1","ref":"IoTS-1.0.0-M1","sha":"e4296b301be6decfeb0553a44267ae236818d3d1","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":30521516,"name":"carbon-device-mgt-plugins","full_name":"wso2/carbon-device-mgt-plugins","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/carbon-device-mgt-plugins","description":"","fork":false,"url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins","forks_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/forks","keys_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/teams","hooks_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/hooks","issue_events_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/events","assignees_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/tags","blobs_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/languages","stargazers_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/stargazers","contributors_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/contributors","subscribers_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/subscribers","subscription_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/subscription","commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/merges","archive_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/downloads","issues_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/labels{/name}","releases_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/releases{/id}","deployments_url":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/deployments","created_at":"2015-02-09T06:12:40Z","updated_at":"2016-01-28T13:45:00Z","pushed_at":"2016-03-01T13:23:07Z","git_url":"git://github.com/wso2/carbon-device-mgt-plugins.git","ssh_url":"git@github.com:wso2/carbon-device-mgt-plugins.git","clone_url":"https://github.com/wso2/carbon-device-mgt-plugins.git","svn_url":"https://github.com/wso2/carbon-device-mgt-plugins","homepage":null,"size":67553,"stargazers_count":1,"watchers_count":1,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":23,"mirror_url":null,"open_issues_count":2,"forks":23,"open_issues":2,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29"},"html":{"href":"https://github.com/wso2/carbon-device-mgt-plugins/pull/29"},"issue":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/29"},"comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/issues/29/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/pulls/29/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/carbon-device-mgt-plugins/statuses/c1a64238889aa52b87683ee3edf54b70eaeee39e"}}}}