{"action":"created","issue":{"url":"https://api.github.com/repos/enonic/lib-util/issues/7","repository_url":"https://api.github.com/repos/enonic/lib-util","labels_url":"https://api.github.com/repos/enonic/lib-util/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/enonic/lib-util/issues/7/comments","events_url":"https://api.github.com/repos/enonic/lib-util/issues/7/events","html_url":"https://github.com/enonic/lib-util/pull/7","id":157301805,"number":7,"title":"Add content.getInOrder(contentIDs)","user":{"login":"Michael-Lazell","id":703266,"avatar_url":"https://avatars.githubusercontent.com/u/703266?v=3","gravatar_id":"","url":"https://api.github.com/users/Michael-Lazell","html_url":"https://github.com/Michael-Lazell","followers_url":"https://api.github.com/users/Michael-Lazell/followers","following_url":"https://api.github.com/users/Michael-Lazell/following{/other_user}","gists_url":"https://api.github.com/users/Michael-Lazell/gists{/gist_id}","starred_url":"https://api.github.com/users/Michael-Lazell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Michael-Lazell/subscriptions","organizations_url":"https://api.github.com/users/Michael-Lazell/orgs","repos_url":"https://api.github.com/users/Michael-Lazell/repos","events_url":"https://api.github.com/users/Michael-Lazell/events{/privacy}","received_events_url":"https://api.github.com/users/Michael-Lazell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2016-05-27T22:32:30Z","updated_at":"2016-08-12T07:58:16Z","closed_at":"2016-08-10T07:38:42Z","pull_request":{"url":"https://api.github.com/repos/enonic/lib-util/pulls/7","html_url":"https://github.com/enonic/lib-util/pull/7","diff_url":"https://github.com/enonic/lib-util/pull/7.diff","patch_url":"https://github.com/enonic/lib-util/pull/7.patch"},"body":"Many times I find myself getting content from a ContentSelector or ImageSelector in a part config with multiple contents. The config drag and drop order does not work unless you get each content in order. So I keep using this same bit of code all over the place. It would only take one line with this util function. \r\nWith this function you can do this:\r\nvar images = libs.util.content.getInOrder(config.images);\r\nAnd now you have an array of the config content in the same order that exists in the part config."},"comment":{"url":"https://api.github.com/repos/enonic/lib-util/issues/comments/239384595","html_url":"https://github.com/enonic/lib-util/pull/7#issuecomment-239384595","issue_url":"https://api.github.com/repos/enonic/lib-util/issues/7","id":239384595,"user":{"login":"sigdestad","id":482228,"avatar_url":"https://avatars.githubusercontent.com/u/482228?v=3","gravatar_id":"","url":"https://api.github.com/users/sigdestad","html_url":"https://github.com/sigdestad","followers_url":"https://api.github.com/users/sigdestad/followers","following_url":"https://api.github.com/users/sigdestad/following{/other_user}","gists_url":"https://api.github.com/users/sigdestad/gists{/gist_id}","starred_url":"https://api.github.com/users/sigdestad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sigdestad/subscriptions","organizations_url":"https://api.github.com/users/sigdestad/orgs","repos_url":"https://api.github.com/users/sigdestad/repos","events_url":"https://api.github.com/users/sigdestad/events{/privacy}","received_events_url":"https://api.github.com/users/sigdestad/received_events","type":"User","site_admin":false},"created_at":"2016-08-12T07:58:15Z","updated_at":"2016-08-12T07:58:15Z","body":"Using query will basically slow down things - and as you see - heavily complicate stuff. So if we at all need this function you should go back to the first version.\n‌‌\nVennlig hilsen/Best regards\nEnonic AS\n\nThomas Sigdestad\nCTO\n+47 98236011\n\nhttps://enonic.com <https://enonic.com/> - A web operating system for your sites and applications\n\n> On 12 Aug 2016, at 09:44, Michael Lazell <notifications@github.com> wrote:\n> \n> That is exactly how my original getInOrder() function works but it seemed like you were questioning that method so I came up with another, more complicated way of doing it that used content.query() instead of looping through the content id array. Anyway, I closed this pull request because it was made from my local master branch and that was causing problems with making other unrelated pull requests. The new pull request for this function is here #11 <https://github.com/enonic/lib-util/pull/11>\n> —\n> You are receiving this because you commented.\n> Reply to this email directly, view it on GitHub <https://github.com/enonic/lib-util/pull/7#issuecomment-239382234>, or mute the thread <https://github.com/notifications/unsubscribe-auth/AAdbtPr5_M4XMaxjzU4Z_6OTeUi_0--Sks5qfCR3gaJpZM4Io6Yu>.\n> \n\n"}}
{"actor":{"display_login":"sigdestad"}}