{"action":"created","comment":{"url":"https://api.github.com/repos/vitmalina/w2ui/pulls/comments/52045006","id":52045006,"diff_hunk":"@@ -989,3 +989,95 @@ var w2confirm = function (msg, title, callBack) {\n         }\n     };\n };\n+\n+var w2prompt = function (options, callBack) {\n+    var $ = jQuery;\n+    \n+    options = {\n+        label       : options.label ? options.label : '',\n+        value       : options.value ? options.value : '',\n+        title       : options.title ? options.title : w2utils.lang('Notification'),\n+        ok_text     : options.ok_text ? options.ok_text : w2utils.lang('Ok'),\n+        cancel_text : options.cancel_text ? options.cancel_text : 'Cancel',\n+        width       : ($('#w2ui-popup').length > 0 ? 400 : 450),\n+        height      : ($('#w2ui-popup').length > 0 ? 170 : 220),\n+        callBack    : callBack ? callBack : null\n+    }\n+    \n+    if ($('#w2ui-popup').length > 0 && w2popup.status != 'closing' && w2popup.get()) {\n+        if (options.width > w2popup.get().width) options.width = w2popup.get().width;\n+        if (options.height > (w2popup.get().height - 50)) options.height = w2popup.get().height - 50;\n+          w2popup.message({\n+            width   : options.width,\n+            height  : options.height,\n+            body    : '<div class=\"w2ui-centered\" style=\"font-size: 13px;\"><label style=\"margin-right: 10px;\">' + options.label + ':</label><input id=\"w2promt\"></div>',\n+            buttons : '<button id=\"Ok\" class=\"w2ui-popup-btn w2ui-btn\">' + options.ok_text + '</button><button id=\"Cancel\" class=\"w2ui-popup-btn w2ui-btn\">' + options.cancel_text + '</button>',\n+            onOpen: function () {\n+                $('#w2promt').val(options.value);\n+                $('#w2promt').w2field('text');\n+                $('#w2ui-popup .w2ui-message .w2ui-btn#Ok').on('click.w2confirm', function (event) {","path":"src/w2popup.js","position":30,"original_position":30,"commit_id":"c811be1a574c3693040b1aa874b33cee3eed955b","original_commit_id":"c811be1a574c3693040b1aa874b33cee3eed955b","user":{"login":"vitmalina","id":561995,"avatar_url":"https://avatars.githubusercontent.com/u/561995?v=3","gravatar_id":"","url":"https://api.github.com/users/vitmalina","html_url":"https://github.com/vitmalina","followers_url":"https://api.github.com/users/vitmalina/followers","following_url":"https://api.github.com/users/vitmalina/following{/other_user}","gists_url":"https://api.github.com/users/vitmalina/gists{/gist_id}","starred_url":"https://api.github.com/users/vitmalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitmalina/subscriptions","organizations_url":"https://api.github.com/users/vitmalina/orgs","repos_url":"https://api.github.com/users/vitmalina/repos","events_url":"https://api.github.com/users/vitmalina/events{/privacy}","received_events_url":"https://api.github.com/users/vitmalina/received_events","type":"User","site_admin":false},"body":"since it is not confirm, should it be \"click.w2prompt\", I know it does not technically matter, but it will not confuse other people thinking that it somehow related to w2cofirm","created_at":"2016-02-05T17:19:49Z","updated_at":"2016-02-05T17:19:49Z","html_url":"https://github.com/vitmalina/w2ui/pull/1152#discussion_r52045006","pull_request_url":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152","_links":{"self":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/comments/52045006"},"html":{"href":"https://github.com/vitmalina/w2ui/pull/1152#discussion_r52045006"},"pull_request":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152"}}},"pull_request":{"url":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152","id":58105629,"html_url":"https://github.com/vitmalina/w2ui/pull/1152","diff_url":"https://github.com/vitmalina/w2ui/pull/1152.diff","patch_url":"https://github.com/vitmalina/w2ui/pull/1152.patch","issue_url":"https://api.github.com/repos/vitmalina/w2ui/issues/1152","number":1152,"state":"open","locked":false,"title":"add w2prompt","user":{"login":"antitim","id":1854050,"avatar_url":"https://avatars.githubusercontent.com/u/1854050?v=3","gravatar_id":"","url":"https://api.github.com/users/antitim","html_url":"https://github.com/antitim","followers_url":"https://api.github.com/users/antitim/followers","following_url":"https://api.github.com/users/antitim/following{/other_user}","gists_url":"https://api.github.com/users/antitim/gists{/gist_id}","starred_url":"https://api.github.com/users/antitim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antitim/subscriptions","organizations_url":"https://api.github.com/users/antitim/orgs","repos_url":"https://api.github.com/users/antitim/repos","events_url":"https://api.github.com/users/antitim/events{/privacy}","received_events_url":"https://api.github.com/users/antitim/received_events","type":"User","site_admin":false},"body":"Hi. I added w2prompt() by analogy with prompt(). The Foundation took w2confirm().\r\n\r\n```javascript\r\nw2prompt({\r\n  label: 'label',\r\n  value: 'Default value',\r\n  title: 'Title of popup'\r\n  ok_text: 'Add',\r\n  cancel_text: 'No'\r\n}, function(value) {\r\n  w2alert(value);\r\n});\r\n```","created_at":"2016-02-03T08:32:59Z","updated_at":"2016-02-05T17:19:49Z","closed_at":null,"merged_at":null,"merge_commit_sha":"99ef22f675d7cd7493d1f131d894bfff26d5b2fb","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152/commits","review_comments_url":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152/comments","review_comment_url":"https://api.github.com/repos/vitmalina/w2ui/pulls/comments{/number}","comments_url":"https://api.github.com/repos/vitmalina/w2ui/issues/1152/comments","statuses_url":"https://api.github.com/repos/vitmalina/w2ui/statuses/c811be1a574c3693040b1aa874b33cee3eed955b","head":{"label":"antitim:master","ref":"master","sha":"c811be1a574c3693040b1aa874b33cee3eed955b","user":{"login":"antitim","id":1854050,"avatar_url":"https://avatars.githubusercontent.com/u/1854050?v=3","gravatar_id":"","url":"https://api.github.com/users/antitim","html_url":"https://github.com/antitim","followers_url":"https://api.github.com/users/antitim/followers","following_url":"https://api.github.com/users/antitim/following{/other_user}","gists_url":"https://api.github.com/users/antitim/gists{/gist_id}","starred_url":"https://api.github.com/users/antitim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antitim/subscriptions","organizations_url":"https://api.github.com/users/antitim/orgs","repos_url":"https://api.github.com/users/antitim/repos","events_url":"https://api.github.com/users/antitim/events{/privacy}","received_events_url":"https://api.github.com/users/antitim/received_events","type":"User","site_admin":false},"repo":{"id":50984589,"name":"w2ui","full_name":"antitim/w2ui","owner":{"login":"antitim","id":1854050,"avatar_url":"https://avatars.githubusercontent.com/u/1854050?v=3","gravatar_id":"","url":"https://api.github.com/users/antitim","html_url":"https://github.com/antitim","followers_url":"https://api.github.com/users/antitim/followers","following_url":"https://api.github.com/users/antitim/following{/other_user}","gists_url":"https://api.github.com/users/antitim/gists{/gist_id}","starred_url":"https://api.github.com/users/antitim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/antitim/subscriptions","organizations_url":"https://api.github.com/users/antitim/orgs","repos_url":"https://api.github.com/users/antitim/repos","events_url":"https://api.github.com/users/antitim/events{/privacy}","received_events_url":"https://api.github.com/users/antitim/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/antitim/w2ui","description":"JavaScript UI library for data-driven web applications","fork":true,"url":"https://api.github.com/repos/antitim/w2ui","forks_url":"https://api.github.com/repos/antitim/w2ui/forks","keys_url":"https://api.github.com/repos/antitim/w2ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/antitim/w2ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/antitim/w2ui/teams","hooks_url":"https://api.github.com/repos/antitim/w2ui/hooks","issue_events_url":"https://api.github.com/repos/antitim/w2ui/issues/events{/number}","events_url":"https://api.github.com/repos/antitim/w2ui/events","assignees_url":"https://api.github.com/repos/antitim/w2ui/assignees{/user}","branches_url":"https://api.github.com/repos/antitim/w2ui/branches{/branch}","tags_url":"https://api.github.com/repos/antitim/w2ui/tags","blobs_url":"https://api.github.com/repos/antitim/w2ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/antitim/w2ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/antitim/w2ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/antitim/w2ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/antitim/w2ui/statuses/{sha}","languages_url":"https://api.github.com/repos/antitim/w2ui/languages","stargazers_url":"https://api.github.com/repos/antitim/w2ui/stargazers","contributors_url":"https://api.github.com/repos/antitim/w2ui/contributors","subscribers_url":"https://api.github.com/repos/antitim/w2ui/subscribers","subscription_url":"https://api.github.com/repos/antitim/w2ui/subscription","commits_url":"https://api.github.com/repos/antitim/w2ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/antitim/w2ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/antitim/w2ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/antitim/w2ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/antitim/w2ui/contents/{+path}","compare_url":"https://api.github.com/repos/antitim/w2ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/antitim/w2ui/merges","archive_url":"https://api.github.com/repos/antitim/w2ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/antitim/w2ui/downloads","issues_url":"https://api.github.com/repos/antitim/w2ui/issues{/number}","pulls_url":"https://api.github.com/repos/antitim/w2ui/pulls{/number}","milestones_url":"https://api.github.com/repos/antitim/w2ui/milestones{/number}","notifications_url":"https://api.github.com/repos/antitim/w2ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/antitim/w2ui/labels{/name}","releases_url":"https://api.github.com/repos/antitim/w2ui/releases{/id}","deployments_url":"https://api.github.com/repos/antitim/w2ui/deployments","created_at":"2016-02-03T08:12:33Z","updated_at":"2016-02-03T08:12:34Z","pushed_at":"2016-02-04T15:34:35Z","git_url":"git://github.com/antitim/w2ui.git","ssh_url":"git@github.com:antitim/w2ui.git","clone_url":"https://github.com/antitim/w2ui.git","svn_url":"https://github.com/antitim/w2ui","homepage":"http://w2ui.com","size":23838,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","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":"vitmalina:master","ref":"master","sha":"f804b0d0b08b30952755ec69812330cccbb74b32","user":{"login":"vitmalina","id":561995,"avatar_url":"https://avatars.githubusercontent.com/u/561995?v=3","gravatar_id":"","url":"https://api.github.com/users/vitmalina","html_url":"https://github.com/vitmalina","followers_url":"https://api.github.com/users/vitmalina/followers","following_url":"https://api.github.com/users/vitmalina/following{/other_user}","gists_url":"https://api.github.com/users/vitmalina/gists{/gist_id}","starred_url":"https://api.github.com/users/vitmalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitmalina/subscriptions","organizations_url":"https://api.github.com/users/vitmalina/orgs","repos_url":"https://api.github.com/users/vitmalina/repos","events_url":"https://api.github.com/users/vitmalina/events{/privacy}","received_events_url":"https://api.github.com/users/vitmalina/received_events","type":"User","site_admin":false},"repo":{"id":1604375,"name":"w2ui","full_name":"vitmalina/w2ui","owner":{"login":"vitmalina","id":561995,"avatar_url":"https://avatars.githubusercontent.com/u/561995?v=3","gravatar_id":"","url":"https://api.github.com/users/vitmalina","html_url":"https://github.com/vitmalina","followers_url":"https://api.github.com/users/vitmalina/followers","following_url":"https://api.github.com/users/vitmalina/following{/other_user}","gists_url":"https://api.github.com/users/vitmalina/gists{/gist_id}","starred_url":"https://api.github.com/users/vitmalina/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vitmalina/subscriptions","organizations_url":"https://api.github.com/users/vitmalina/orgs","repos_url":"https://api.github.com/users/vitmalina/repos","events_url":"https://api.github.com/users/vitmalina/events{/privacy}","received_events_url":"https://api.github.com/users/vitmalina/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vitmalina/w2ui","description":"JavaScript UI library for data-driven web applications","fork":false,"url":"https://api.github.com/repos/vitmalina/w2ui","forks_url":"https://api.github.com/repos/vitmalina/w2ui/forks","keys_url":"https://api.github.com/repos/vitmalina/w2ui/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vitmalina/w2ui/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vitmalina/w2ui/teams","hooks_url":"https://api.github.com/repos/vitmalina/w2ui/hooks","issue_events_url":"https://api.github.com/repos/vitmalina/w2ui/issues/events{/number}","events_url":"https://api.github.com/repos/vitmalina/w2ui/events","assignees_url":"https://api.github.com/repos/vitmalina/w2ui/assignees{/user}","branches_url":"https://api.github.com/repos/vitmalina/w2ui/branches{/branch}","tags_url":"https://api.github.com/repos/vitmalina/w2ui/tags","blobs_url":"https://api.github.com/repos/vitmalina/w2ui/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vitmalina/w2ui/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vitmalina/w2ui/git/refs{/sha}","trees_url":"https://api.github.com/repos/vitmalina/w2ui/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vitmalina/w2ui/statuses/{sha}","languages_url":"https://api.github.com/repos/vitmalina/w2ui/languages","stargazers_url":"https://api.github.com/repos/vitmalina/w2ui/stargazers","contributors_url":"https://api.github.com/repos/vitmalina/w2ui/contributors","subscribers_url":"https://api.github.com/repos/vitmalina/w2ui/subscribers","subscription_url":"https://api.github.com/repos/vitmalina/w2ui/subscription","commits_url":"https://api.github.com/repos/vitmalina/w2ui/commits{/sha}","git_commits_url":"https://api.github.com/repos/vitmalina/w2ui/git/commits{/sha}","comments_url":"https://api.github.com/repos/vitmalina/w2ui/comments{/number}","issue_comment_url":"https://api.github.com/repos/vitmalina/w2ui/issues/comments{/number}","contents_url":"https://api.github.com/repos/vitmalina/w2ui/contents/{+path}","compare_url":"https://api.github.com/repos/vitmalina/w2ui/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vitmalina/w2ui/merges","archive_url":"https://api.github.com/repos/vitmalina/w2ui/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vitmalina/w2ui/downloads","issues_url":"https://api.github.com/repos/vitmalina/w2ui/issues{/number}","pulls_url":"https://api.github.com/repos/vitmalina/w2ui/pulls{/number}","milestones_url":"https://api.github.com/repos/vitmalina/w2ui/milestones{/number}","notifications_url":"https://api.github.com/repos/vitmalina/w2ui/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vitmalina/w2ui/labels{/name}","releases_url":"https://api.github.com/repos/vitmalina/w2ui/releases{/id}","deployments_url":"https://api.github.com/repos/vitmalina/w2ui/deployments","created_at":"2011-04-12T14:26:20Z","updated_at":"2016-02-05T04:44:15Z","pushed_at":"2016-02-04T15:34:36Z","git_url":"git://github.com/vitmalina/w2ui.git","ssh_url":"git@github.com:vitmalina/w2ui.git","clone_url":"https://github.com/vitmalina/w2ui.git","svn_url":"https://github.com/vitmalina/w2ui","homepage":"http://w2ui.com","size":25583,"stargazers_count":1102,"watchers_count":1102,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":378,"mirror_url":null,"open_issues_count":124,"forks":378,"open_issues":124,"watchers":1102,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152"},"html":{"href":"https://github.com/vitmalina/w2ui/pull/1152"},"issue":{"href":"https://api.github.com/repos/vitmalina/w2ui/issues/1152"},"comments":{"href":"https://api.github.com/repos/vitmalina/w2ui/issues/1152/comments"},"review_comments":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152/comments"},"review_comment":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/vitmalina/w2ui/pulls/1152/commits"},"statuses":{"href":"https://api.github.com/repos/vitmalina/w2ui/statuses/c811be1a574c3693040b1aa874b33cee3eed955b"}}}}