{"action":"created","issue":{"url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1978","repository_url":"https://api.github.com/repos/openSUSE/open-build-service","labels_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1978/labels{/name}","comments_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1978/comments","events_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1978/events","html_url":"https://github.com/openSUSE/open-build-service/issues/1978","id":168850513,"number":1978,"title":"Compatibility with DataTables. (using deprecated function)","user":{"login":"myungjoo","id":1109011,"avatar_url":"https://avatars.githubusercontent.com/u/1109011?v=3","gravatar_id":"","url":"https://api.github.com/users/myungjoo","html_url":"https://github.com/myungjoo","followers_url":"https://api.github.com/users/myungjoo/followers","following_url":"https://api.github.com/users/myungjoo/following{/other_user}","gists_url":"https://api.github.com/users/myungjoo/gists{/gist_id}","starred_url":"https://api.github.com/users/myungjoo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/myungjoo/subscriptions","organizations_url":"https://api.github.com/users/myungjoo/orgs","repos_url":"https://api.github.com/users/myungjoo/repos","events_url":"https://api.github.com/users/myungjoo/events{/privacy}","received_events_url":"https://api.github.com/users/myungjoo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-02T10:22:40Z","updated_at":"2016-08-08T05:41:02Z","closed_at":null,"body":"It appears that the current OBS code using DataTables (e.g., `src/api/app/assets/javascripts/webui/application/project.js`) is not compatible with the current DataTables.\r\n\r\nSo, I'd like to suggest to update Gemfile to specify the version of (a bit old) DataTables\r\n\r\nOR\r\n\r\nLet the DataTables using code to add a function supporting the recent DataTables. For example, in `project.js':\r\n```\r\nfunction renderProjectsTable(length) {\r\n    length = (typeof length === \"undefined\") ? 25 : length;\r\n    var projects = main_projects;\r\n    if (!$('#excludefilter').is(\":checked\"))\r\n        projects = projects.concat(excl_projects);\r\n    var projecturl = $(\"#projects_table_wrapper\").data(\"url\");\r\n    $(\"#projects_table_wrapper\").html('<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"display\" id=\"projects_table\"></table>');\r\n    $(\"#projects_table\").dataTable({\"aaData\": projects,\r\n        \"bPaginate\": true,\r\n        \"aoColumns\": [\r\n            {\r\n                \"sTitle\": \"Name\",\r\n                \"mData\": function (obj) {\r\n                    // Supports recent DataTables\r\n                    var url = projecturl.replace(/REPLACEIT/, obj[0]);\r\n                    return '<a href=\"' + url + '\">' + obj[0] + '</a>';\r\n                },\r\n                \"fnRender\": function (obj) {\r\n                    // Deprecated in recent DataTables\r\n                    var url = packageurl.replace(/REPLACEIT/, obj.aData);\r\n                    return '<a href=\"' + url + '\">' + obj.aData + '</a>';\r\n                }\r\n            },\r\n            { \"sTitle\": \"Title\" },\r\n        ],\r\n        \"iDisplayLength\": length,\r\n        \"bStateSave\": true\r\n    });\r\n}\r\n```\r\n\r\nIf the latter is appropriate, please review the related pull request.\r\n\r\n\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/openSUSE/open-build-service/issues/comments/238146184","html_url":"https://github.com/openSUSE/open-build-service/issues/1978#issuecomment-238146184","issue_url":"https://api.github.com/repos/openSUSE/open-build-service/issues/1978","id":238146184,"user":{"login":"bgeuken","id":968949,"avatar_url":"https://avatars.githubusercontent.com/u/968949?v=3","gravatar_id":"","url":"https://api.github.com/users/bgeuken","html_url":"https://github.com/bgeuken","followers_url":"https://api.github.com/users/bgeuken/followers","following_url":"https://api.github.com/users/bgeuken/following{/other_user}","gists_url":"https://api.github.com/users/bgeuken/gists{/gist_id}","starred_url":"https://api.github.com/users/bgeuken/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bgeuken/subscriptions","organizations_url":"https://api.github.com/users/bgeuken/orgs","repos_url":"https://api.github.com/users/bgeuken/repos","events_url":"https://api.github.com/users/bgeuken/events{/privacy}","received_events_url":"https://api.github.com/users/bgeuken/received_events","type":"User","site_admin":false},"created_at":"2016-08-08T05:41:02Z","updated_at":"2016-08-08T05:41:02Z","body":"Going to be solved once we've upgraded to rails 5, which includes us useing dataTables 3.4 https://github.com/openSUSE/open-build-service/pull/1979#issuecomment-238145939."}}
{"actor":{"display_login":"bgeuken"}}