{"action":"created","issue":{"url":"https://api.github.com/repos/bummzack/sortablefile/issues/28","labels_url":"https://api.github.com/repos/bummzack/sortablefile/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/bummzack/sortablefile/issues/28/comments","events_url":"https://api.github.com/repos/bummzack/sortablefile/issues/28/events","html_url":"https://github.com/bummzack/sortablefile/pull/28","id":69714763,"number":28,"title":"Setup more stable method for retrieving back-end \"sort\" action","user":{"login":"patricknelson","id":4269377,"avatar_url":"https://avatars.githubusercontent.com/u/4269377?v=3","gravatar_id":"","url":"https://api.github.com/users/patricknelson","html_url":"https://github.com/patricknelson","followers_url":"https://api.github.com/users/patricknelson/followers","following_url":"https://api.github.com/users/patricknelson/following{/other_user}","gists_url":"https://api.github.com/users/patricknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/patricknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricknelson/subscriptions","organizations_url":"https://api.github.com/users/patricknelson/orgs","repos_url":"https://api.github.com/users/patricknelson/repos","events_url":"https://api.github.com/users/patricknelson/events{/privacy}","received_events_url":"https://api.github.com/users/patricknelson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":11,"created_at":"2015-04-21T01:03:39Z","updated_at":"2015-04-21T15:23:11Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/bummzack/sortablefile/pulls/28","html_url":"https://github.com/bummzack/sortablefile/pull/28","diff_url":"https://github.com/bummzack/sortablefile/pull/28.diff","patch_url":"https://github.com/bummzack/sortablefile/pull/28.patch"},"body":"I had another issue today where, when sorting files, the module wasn't always able to get the correct URL to post back and update the sort order asynchronously via AJAX. I realized that the method by which the module was doing this was by looking at the `data-href` attribute on the delete button. However, since we've had to add features to this area of the CMS (i.e. hiding the delete button to prevent the customer from accidentally deleting images which may be in use elsewhere within the system), this became quite problematic. Also this would happen if the current user didn't have permission to remove the button. \r\n\r\nHere's a fix!\r\n\r\n**Primary benefits:**\r\n\r\n* Fixes bugs that will arise when the current user doesn't have permissions to delete an image in the sorted list.\r\n* Moving forward: Better separation of concerns (shouldn't contaminate other functionality and shouldn't be affected by customization of HTML contents outside of `SortableFileUpload`)."},"comment":{"url":"https://api.github.com/repos/bummzack/sortablefile/issues/comments/94837803","html_url":"https://github.com/bummzack/sortablefile/pull/28#issuecomment-94837803","issue_url":"https://api.github.com/repos/bummzack/sortablefile/issues/28","id":94837803,"user":{"login":"patricknelson","id":4269377,"avatar_url":"https://avatars.githubusercontent.com/u/4269377?v=3","gravatar_id":"","url":"https://api.github.com/users/patricknelson","html_url":"https://github.com/patricknelson","followers_url":"https://api.github.com/users/patricknelson/followers","following_url":"https://api.github.com/users/patricknelson/following{/other_user}","gists_url":"https://api.github.com/users/patricknelson/gists{/gist_id}","starred_url":"https://api.github.com/users/patricknelson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patricknelson/subscriptions","organizations_url":"https://api.github.com/users/patricknelson/orgs","repos_url":"https://api.github.com/users/patricknelson/repos","events_url":"https://api.github.com/users/patricknelson/events{/privacy}","received_events_url":"https://api.github.com/users/patricknelson/received_events","type":"User","site_admin":false},"created_at":"2015-04-21T15:23:11Z","updated_at":"2015-04-21T15:23:11Z","body":"Ok -- I've only made some very minor modifications to this -- check it out... I've got about one or two more unrelated issues en queue so I'll leave those out of this pull request!"}}