{"action":"created","issue":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/5815","labels_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5815/labels{/name}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5815/comments","events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5815/events","html_url":"https://github.com/joomla/joomla-cms/pull/5815","id":54715357,"number":5815,"title":"Introduce jailed behavior for admin area","user":{"login":"dgt41","id":3889375,"avatar_url":"https://avatars.githubusercontent.com/u/3889375?v=3","gravatar_id":"","url":"https://api.github.com/users/dgt41","html_url":"https://github.com/dgt41","followers_url":"https://api.github.com/users/dgt41/followers","following_url":"https://api.github.com/users/dgt41/following{/other_user}","gists_url":"https://api.github.com/users/dgt41/gists{/gist_id}","starred_url":"https://api.github.com/users/dgt41/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dgt41/subscriptions","organizations_url":"https://api.github.com/users/dgt41/orgs","repos_url":"https://api.github.com/users/dgt41/repos","events_url":"https://api.github.com/users/dgt41/events{/privacy}","received_events_url":"https://api.github.com/users/dgt41/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/joomla/joomla-cms/labels/PR-staging","name":"PR-staging","color":"c7def8"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":8,"created_at":"2015-01-18T23:52:26Z","updated_at":"2015-01-19T13:38:22Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/5815","html_url":"https://github.com/joomla/joomla-cms/pull/5815","diff_url":"https://github.com/joomla/joomla-cms/pull/5815.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/5815.patch"},"body":"#### This is a redo of #4773\r\n\r\n##### Why?\r\nWhen editing an article, menu, category (anything singular), and press the back button, the refresh or the close button on the browser, user most probably will loose any data without warning. This PR throws a standard browser window with custom message to inform him/her. Of course we are not forcing anything, so he/she can go ahead and close the window, but at least we did informed them!\r\nThere is a check for debug and language debug, so this functionality is enabled only when none of these is enabled!\r\n\r\n##### Preview:\r\nSafari\r\n![screen shot 2015-01-19 at 1 37 39](https://cloud.githubusercontent.com/assets/3889375/5794584/f18a829a-9f7c-11e4-8a43-5331fec2f3f8.png)\r\n\r\nChrome\r\n![screen shot 2015-01-19 at 1 37 16](https://cloud.githubusercontent.com/assets/3889375/5794585/fbb88a8c-9f7c-11e4-8764-4bde3ad534e8.png)\r\n\r\nFirefox (NOTE: FF doesn’t support custom messages in the alert called onbeforeunload!)\r\n![screen shot 2015-01-19 at 1 38 23](https://cloud.githubusercontent.com/assets/3889375/5794586/04383a54-9f7d-11e4-8bc5-c1d174065374.png)\r\n\r\nOpera\r\n![screen shot 2015-01-19 at 1 37 59](https://cloud.githubusercontent.com/assets/3889375/5794588/2a33af54-9f7d-11e4-9ceb-153f0a7fc6c6.png)\r\n\r\nAnd IE 8 (YES it even works on IE 😃)\r\n![screen shot 2015-01-19 at 1 40 02](https://cloud.githubusercontent.com/assets/3889375/5794590/44c669e2-9f7d-11e4-97ce-fc4a7c04e4b0.png)\r\n\r\n##### Testing\r\nThis PR touches a lot of views, so here is list with possible urls that implement this functionality:\r\n\r\nhttp://localhost/administrator/index.php?option=com_config\r\nhttp://localhost/administrator/index.php?option=com_config&view=component&component=com_banners\r\nhttp://localhost/administrator/index.php?option=com_users&view=user&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_users&view=group&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_users&view=level&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_users&view=note&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_users\r\nhttp://localhost/administrator/index.php?option=com_users&view=mail\r\nhttp://localhost/administrator/index.php?option=com_menus&view=menu&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_menus&view=item&layout=edit&menutype=mainmenu\r\nhttp://localhost/administrator/index.php?option=com_content&view=article&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_content\r\nhttp://localhost/administrator/index.php?option=com_banners&view=banner&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_banners\r\nhttp://localhost/administrator/index.php?option=com_banners&view=client&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_contact&view=contact&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_contact\r\nhttp://localhost/administrator/index.php?option=com_messages&view=message&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_modules&view=module&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_plugins&view=plugin&layout=edit&extension_id=401\r\nhttp://localhost/administrator/index.php?option=com_newsfeeds&view=newsfeed&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_categories&view=category&layout=edit&extension=com_newsfeeds\r\nhttp://localhost/administrator/index.php?option=com_redirect&view=link&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_finder&view=filter&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_tags&view=tag&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_languages&view=language&layout=edit\r\nhttp://localhost/administrator/index.php?option=com_languages&view=override&layout=edit\r\n\r\nHave fun testing..."},"comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments/70493115","html_url":"https://github.com/joomla/joomla-cms/pull/5815#issuecomment-70493115","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/5815","id":70493115,"user":{"login":"Fedik","id":1568198,"avatar_url":"https://avatars.githubusercontent.com/u/1568198?v=3","gravatar_id":"","url":"https://api.github.com/users/Fedik","html_url":"https://github.com/Fedik","followers_url":"https://api.github.com/users/Fedik/followers","following_url":"https://api.github.com/users/Fedik/following{/other_user}","gists_url":"https://api.github.com/users/Fedik/gists{/gist_id}","starred_url":"https://api.github.com/users/Fedik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fedik/subscriptions","organizations_url":"https://api.github.com/users/Fedik/orgs","repos_url":"https://api.github.com/users/Fedik/repos","events_url":"https://api.github.com/users/Fedik/events{/privacy}","received_events_url":"https://api.github.com/users/Fedik/received_events","type":"User","site_admin":false},"created_at":"2015-01-19T13:38:22Z","updated_at":"2015-01-19T13:38:22Z","body":"**test**\r\nworks good for me, now\r\n\r\nbut question about whether we need it, \r\nmaybe need some vote? :smile:  \r\n"}}