{"action":"created","issue":{"url":"https://api.github.com/repos/diogosmendonca/webdep/issues/12","repository_url":"https://api.github.com/repos/diogosmendonca/webdep","labels_url":"https://api.github.com/repos/diogosmendonca/webdep/issues/12/labels{/name}","comments_url":"https://api.github.com/repos/diogosmendonca/webdep/issues/12/comments","events_url":"https://api.github.com/repos/diogosmendonca/webdep/issues/12/events","html_url":"https://github.com/diogosmendonca/webdep/issues/12","id":191601845,"number":12,"title":"Escolha do sistema na tag do navbar","user":{"login":"drinith","id":4684228,"avatar_url":"https://avatars.githubusercontent.com/u/4684228?v=3","gravatar_id":"","url":"https://api.github.com/users/drinith","html_url":"https://github.com/drinith","followers_url":"https://api.github.com/users/drinith/followers","following_url":"https://api.github.com/users/drinith/following{/other_user}","gists_url":"https://api.github.com/users/drinith/gists{/gist_id}","starred_url":"https://api.github.com/users/drinith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/drinith/subscriptions","organizations_url":"https://api.github.com/users/drinith/orgs","repos_url":"https://api.github.com/users/drinith/repos","events_url":"https://api.github.com/users/drinith/events{/privacy}","received_events_url":"https://api.github.com/users/drinith/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2016-11-24T23:26:01Z","updated_at":"2016-11-25T16:03:20Z","closed_at":null,"body":"Olá pessoal, \r\nno navbar existe uma tag customizada que está já funcionando, ela lista os sistemas vinculados aos usuários, pelo que eu reparei além de uma tela que ficamos acho que outros também vão usá-la para um preenchimento automático dos campos, eu estou tentando uma solução aqui onde eu pegaria através de uma javascript e faria um post . Vocês veem outra abordagem ?\r\n\r\n<!DOCTYPE html PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\r\n<html>\r\n<head>\r\n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=ISO-8859-1\">\r\n\r\n<title>Insert title here</title>\r\n</head>\r\n<body>\r\n\t\r\n\t<script type=\"text/javascript\">\r\n\t\r\n\t\tfunction post(path, params, method) {\r\n    method = method || \"post\"; // Set method to post by default if not specified.\r\n\r\n    // The rest of this code assumes you are not using a library.\r\n    // It can be made less wordy if you use one.\r\n    var form = document.createElement(\"form\");\r\n    form.setAttribute(\"method\", method);\r\n    form.setAttribute(\"action\", path);\r\n\r\n    for(var key in params) {\r\n        if(params.hasOwnProperty(key)) {\r\n            var hiddenField = document.createElement(\"input\");\r\n            hiddenField.setAttribute(\"type\", \"hidden\");\r\n            hiddenField.setAttribute(\"name\", key);\r\n            hiddenField.setAttribute(\"value\", params[key]);\r\n\r\n            form.appendChild(hiddenField);\r\n         }\r\n    }\r\n\r\n    document.body.appendChild(form);\r\n    form.submit();\r\n}\r\n\r\n\r\n\t\tfunction pegarID(){\r\n\t\t//post('/contact/', {name: 'Johnny Bravo'});\r\n\r\n\t\tpost('#',{idsistema:document.getElementById(\"mySelect\").selectedIndex},'get');\r\n\t\r\n\r\n\t\t\r\n\t\t}\r\n\t\r\n\t</script>\r\n\t<select id=\"mySelect\" >\r\n\t\t<option value=\"void\" id=\"1\" onclick=\"pegarID();\">Choose your answer</option>\r\n\t\t<option value=\"To measure time\" id=\"2\" onclick=\"pegarID();\">To measure time</option>\r\n\t\r\n\t</select>\r\n\r\n</body>\r\n</html>"},"comment":{"url":"https://api.github.com/repos/diogosmendonca/webdep/issues/comments/262987129","html_url":"https://github.com/diogosmendonca/webdep/issues/12#issuecomment-262987129","issue_url":"https://api.github.com/repos/diogosmendonca/webdep/issues/12","id":262987129,"user":{"login":"lawrencestfs","id":13123535,"avatar_url":"https://avatars.githubusercontent.com/u/13123535?v=3","gravatar_id":"","url":"https://api.github.com/users/lawrencestfs","html_url":"https://github.com/lawrencestfs","followers_url":"https://api.github.com/users/lawrencestfs/followers","following_url":"https://api.github.com/users/lawrencestfs/following{/other_user}","gists_url":"https://api.github.com/users/lawrencestfs/gists{/gist_id}","starred_url":"https://api.github.com/users/lawrencestfs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawrencestfs/subscriptions","organizations_url":"https://api.github.com/users/lawrencestfs/orgs","repos_url":"https://api.github.com/users/lawrencestfs/repos","events_url":"https://api.github.com/users/lawrencestfs/events{/privacy}","received_events_url":"https://api.github.com/users/lawrencestfs/received_events","type":"User","site_admin":false},"created_at":"2016-11-25T16:03:20Z","updated_at":"2016-11-25T16:03:20Z","body":"@drinith  \r\nFelipe,\r\n\r\nPercebi agora que as verificações na sua navbar estavam utilizando uma Command chamada ObterUsuario, que me parece extremamente incompleta/incorreta. Só para ter uma ideia, tem uma pergunta nela!\r\n\r\nAcredito que todo o processamento para autenticação e concessão de permissão ao usuário deve passar pela AutenticaUsuarioCommand, visto que essa etapa de login ficou a cargo do meu grupo. Eu não tinha me atendado com relação às permissões do usuário, vou precisar editar isso. Se você souber e tiver condições, pode fazer as correções direto nela. Precisando de ajuda, só falar comigo. Vou ver o que posso fazer aqui.\r\n\r\n[]s"}}
{"actor":{"display_login":"lawrencestfs"}}