{"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":1,"created_at":"2016-05-27T22:32:30Z","updated_at":"2016-08-10T07:58:06Z","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/238793231","html_url":"https://github.com/enonic/lib-util/pull/7#issuecomment-238793231","issue_url":"https://api.github.com/repos/enonic/lib-util/issues/7","id":238793231,"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-10T07:58:05Z","updated_at":"2016-08-10T07:58:05Z","body":"Hmm. Are you saying the standard content JSON does not return property values in the same order as it was stored?\n‌‌\nThomas Sigdestad\n\n\n\n> On 28 May 2016, at 00:32, Michael Lazell <notifications@github.com> wrote:\n> \n> 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. \n> With this function you can do this:\n> var images = libs.util.content.getInOrder(config.images);\n> And now you have an array of the config content in the same order that exists in the part config.\n> \n> You can view, comment on, or merge this pull request online at:\n> \n>   https://github.com/enonic/lib-util/pull/7 <https://github.com/enonic/lib-util/pull/7>\n> Commit Summary\n> \n> Add content.getInOrder(contentIDs)\n> File Changes\n> \n> M src/main/resources/site/lib/enonic/util/content.js <https://github.com/enonic/lib-util/pull/7/files#diff-0> (19)\n> Patch Links:\n> \n> https://github.com/enonic/lib-util/pull/7.patch <https://github.com/enonic/lib-util/pull/7.patch>\n> https://github.com/enonic/lib-util/pull/7.diff <https://github.com/enonic/lib-util/pull/7.diff>\n> —\n> You are receiving this because you are subscribed to this thread.\n> Reply to this email directly, view it on GitHub <https://github.com/enonic/lib-util/pull/7>, or mute the thread <https://github.com/notifications/unsubscribe/AAdbtDpNoEjlzdfkXCT3YyfsWuQ2shgfks5qF3D_gaJpZM4Io6Yu>.\n> \n\n"}}
{"actor":{"display_login":"sigdestad"}}