{"action":"opened","issue":{"url":"https://api.github.com/repos/maks1mp/chat/issues/1","labels_url":"https://api.github.com/repos/maks1mp/chat/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/maks1mp/chat/issues/1/comments","events_url":"https://api.github.com/repos/maks1mp/chat/issues/1/events","html_url":"https://github.com/maks1mp/chat/issues/1","id":89675089,"number":1,"title":"chat","user":{"login":"maks1mp","id":12972440,"avatar_url":"https://avatars.githubusercontent.com/u/12972440?v=3","gravatar_id":"","url":"https://api.github.com/users/maks1mp","html_url":"https://github.com/maks1mp","followers_url":"https://api.github.com/users/maks1mp/followers","following_url":"https://api.github.com/users/maks1mp/following{/other_user}","gists_url":"https://api.github.com/users/maks1mp/gists{/gist_id}","starred_url":"https://api.github.com/users/maks1mp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/maks1mp/subscriptions","organizations_url":"https://api.github.com/users/maks1mp/orgs","repos_url":"https://api.github.com/users/maks1mp/repos","events_url":"https://api.github.com/users/maks1mp/events{/privacy}","received_events_url":"https://api.github.com/users/maks1mp/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-19T22:36:59Z","updated_at":"2015-06-19T22:36:59Z","closed_at":null,"body":"<!DOCTYPE html>\r\n<html lang=\"ru\">\r\n<head>\r\n    <meta charset=\"UTF-8\">\r\n    <title>Document</title>\r\n\t<link rel=\"stylesheet\" href=\"https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css\">\r\n    <script src=\"http://code.jquery.com/jquery-2.1.4.min.js\"></script>\r\n    <script>\r\n        $(document).ready(function() {\r\n            var userslist = $(\".js-list\");\r\n            var users=[\r\n                {\r\n                    \"id\": 1,\r\n                    \"online\": 1,\r\n                    \"name\": 'Alex'\r\n                },\r\n                {   \r\n                    \"id\": 2,\r\n                    \"online\": 1,\r\n                    \"name\": 'Ivan'\r\n                },\r\n                {   \r\n                    \"id\": 3,\r\n                    \"online\": 1,\r\n                    \"name\": 'Los'\r\n                }\r\n            ];\r\n            \r\n            var usList=\"\";\r\n\r\n            for (var i in users) {\r\n                var online=users[i].online ? \"users-is-active\" : \"users\";\r\n\r\n                usList+='<li data-id=\"'+users[i].id+'\" class=\"list-group-item ' + online + '\">'+ users[i].name+ '</li>';\r\n            }\r\n\r\n            userslist.append(usList);\r\n            \r\n            $(\".but2\").on('click', function() {\r\n                var txt = $(\".write-message-box\").val();\r\n                $(\".messages\").append('<li class=\"my-message\">'+txt+'</li>');\r\n\t\t\t\t$(\".write-message-box\").val('');\r\n            });\r\n            \r\n            $(\".users-is-active\").on('click', function() {\r\n                var nameModal=$(this).text();\r\n                $(\".message-box\").append(\"<div class=USname>\"+ nameModal +\" \"+\"</div>\");\r\n            });\r\n        });\r\n    </script>\r\n</head>\r\n<style>\r\n\t.USname {\r\n\t\t\r\n\t\twidth: 100px;\r\n\t\tfont-size: 20px;\r\n\t\tmargin: 5px;\r\n\t\tfloat: left;\r\n\t\tborder: 1px solid yellow;\r\n\t\tborder-radius: 10px;\r\n\t}\r\n    .list-group-item {\r\n        height: 50px;\r\n    }\r\n    body {\r\n        padding-top:10px;\r\n        padding-bottom:40px;\r\n        background-color:#fff;  \r\n    }\r\n    .named {\r\n        font-size: 40px;\r\n        font-style: italic;\r\n        font-family: sans-serif;\r\n    }\r\n    .chat-box {\r\n        margin: auto;\r\n        border:1px solid  #3a5fcd;\r\n        border-radius: 6px;\r\n        border-style:groove;\r\n        width: 900px;\r\n        height: 550px;\r\n    }\r\n    .users {\r\n        float: left;\r\n        margin-top: 0px;\r\n        margin-left: 10px;\r\n        width: 300px;\r\n        height: 480px;\r\n        font-size: 20px;\r\n        color: white;\r\n    }\r\n    .users-is-active {\r\n        float: left;\r\n        margin-top: 15px;\r\n        margin-left: 10px;\r\n        width: 250px;\r\n        height: 40px;\r\n        border:1px solid #a4d3ee;\r\n        border-radius:6px;\r\n        font-size: 20px;\r\n        color: black;\r\n    }\r\n    .users-names {\r\n        white-space: pre;\r\n        margin: 20px 0px 0px 20px;\r\n        font-size: 30px;\r\n    \r\n    }\r\n\r\n    .message-box{\r\n        position: relative;\r\n        overflow: hidden;\r\n        float: right;\r\n        margin: 12px 20px 20px 20px;\r\n        width: 540px;\r\n        height: 350px;\r\n        border:1px solid #a4d3ee;\r\n        border-radius:6px;\r\n    }\r\n    .write-message-box{\r\n        float: right;\r\n        margin: 0px 20px 5px 20px;\r\n        width: 400px;\r\n        height: 60px;\r\n        border:1px solid #a4d3ee;\r\n        border-radius:6px;\r\n    }\r\n    .but1 {\r\n        margin: 10px 250px 0px 20px;\r\n        padding: 5px;\r\n        float: right;\r\n    }\r\n    .but2 {\r\n        margin: 0px 30px 0px 0px;\r\n        float: right;\r\n        height: 40px;\r\n    }\r\n    .messages {\r\n\t\tlist-style-type: none;\r\n        position: absolute;\r\n        width: auto;\r\n        height: auto;\r\n        margin: 0;\r\n        padding: 0;\r\n        border: 1px solid red;\r\n\t\tbottom: 0;\r\n    }\r\n\t.my-message {\r\n\t\tmargin: 5px;\r\n\t\tborder: 1px solid black;\r\n\t}\r\n</style>\r\n<body>\r\n    \r\n    <div class=\"lead text-center named\"> Добро пожаловать в чат</div> \r\n    <button class=\"but1 btn btn-large btn-primary\" type=\"submit\">Выход</button> \r\n    <div class=\"chat-box\">\r\n        <div class=\"users-names\"> Пользователи:             Диалоги:</div>\r\n        <div class=\"users text-center\"> \r\n            <ul class=\"list-group js-list\">\r\n                \r\n            </ul>\r\n        </div>\r\n        <div class=\"message-box\">\r\n\t\t\t<ul class=\"messages\">\r\n\t\t\t</ul>\r\n        </div>\r\n        <form action=\"\">\r\n            <textarea class=\"write-message-box\" placeholder=\"Введите Ваше сообщение..\"></textarea>\r\n            <input type=\"button\" class=\"but2 btn btn-small btn-primary\" value=\"Отправить\">\r\n        </form>\r\n    </div>\r\n    \r\n</body>\r\n</html>"}}