{"action":"opened","issue":{"url":"https://api.github.com/repos/4thPlanet/WebBureau/issues/3","labels_url":"https://api.github.com/repos/4thPlanet/WebBureau/issues/3/labels{/name}","comments_url":"https://api.github.com/repos/4thPlanet/WebBureau/issues/3/comments","events_url":"https://api.github.com/repos/4thPlanet/WebBureau/issues/3/events","html_url":"https://github.com/4thPlanet/WebBureau/issues/3","id":55252178,"number":3,"title":"Add Paging for Tables","user":{"login":"4thPlanet","id":10490315,"avatar_url":"https://avatars.githubusercontent.com/u/10490315?v=3","gravatar_id":"","url":"https://api.github.com/users/4thPlanet","html_url":"https://github.com/4thPlanet","followers_url":"https://api.github.com/users/4thPlanet/followers","following_url":"https://api.github.com/users/4thPlanet/following{/other_user}","gists_url":"https://api.github.com/users/4thPlanet/gists{/gist_id}","starred_url":"https://api.github.com/users/4thPlanet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4thPlanet/subscriptions","organizations_url":"https://api.github.com/users/4thPlanet/orgs","repos_url":"https://api.github.com/users/4thPlanet/repos","events_url":"https://api.github.com/users/4thPlanet/events{/privacy}","received_events_url":"https://api.github.com/users/4thPlanet/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/4thPlanet/WebBureau/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-01-23T07:15:05Z","updated_at":"2015-01-23T07:15:05Z","closed_at":null,"body":"Create a new module which will be used to create easy paging for table viewing.  A paging table will be set up with three parameters:\r\n\r\n1 The query used to pull the data,\r\n2 A multidimensional associative array to describe how the data should be output.  Each row in this array would state the data type (string, numeric, datetime, etc.), column from the query used, and how the column should be labeled.\r\n3 An array of options, including: default ordering, # records per page, and an ID, unique to the current session.\r\n\r\nThe returned object will need to be stored in the SESSION for proper paging, under $_SESSIONS[<MODULE>][<UNIQUE ID>].  If that key is already in use, no new object will be created, the module will just use what is currently stored in memory.\r\n\r\nObject methods should include \r\n* display(), which will return the full HTML, CSS, and JS setup; \r\n* first(), which will return the table's first page of data in HTML format;\r\n* next(), which will return the table's next page of data in HTML format;\r\n* prev(), which will return the table's previous page of data in HTML format;\r\n* last(), which will return the table's last page of data in HTML format;\r\n* reorder($col), which will re-order the query based on $col and return the first page of that data in HTML format;\r\n* move($col,$dir), which will move $col's position left or right depending on $dir for future queries. As the first move will take place on the client side, nothing will be returned.\r\n* remove($col), which will remove $col from the table for all future queries.  As the initial removal will take place on the client side, nothing will be returned.\r\n* default(), which will return the first page of the table's data using the default options.\r\n\r\nAfter this functionality is added, filtering can be added.\r\n"}}