{"action":"created","comment":{"url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/comments/64409125","id":64409125,"diff_hunk":"@@ -108,6 +122,186 @@ to enable source maps in Google Chrome, if you haven't already done so.\n Tests\n -----\n \n+Run all tests\n+\n+.. code:: bash\n+\n+  grunt test\n+\n+Run a specific test\n+\n .. code:: bash\n \n-  npm test\n+  grunt test --grep=\"Name of your test\"\n+\n+Initialization\n+--------------\n+\n+Creates an empty showroom instance with default options\n+\n+.. code:: javascript\n+\n+  let showroom = Showroom();\n+\n+The showroom constructor accepts a `NodeList <https://developer.mozilla.org/en/docs/Web/API/NodeList>`_ or a `jQuery <http://api.jquery.com/jquery/>`_.\n+The items can provide a target as a HTML data attribute (**data-showroom-target**) to define the endpoint where the item will fetch its content from.\n+To make a title visible in the overlay provide a title as a HTML data attribute  (**data-showroom-title**).\n+\n+.. code:: HTML\n+\n+  <ul>\n+    <li class=\"item\"\n+        data-showroom-target=\"http://target.com/1\"\n+        data-showroom-title=\"title-1\">\n+      <a>Item 1</a>\n+    </li>\n+    <li class=\"item\"\n+        data-showroom-target=\"http://target.com/2\"\n+        data-showroom-title=\"title-2\">\n+      <a>Item 2</a>\n+    </li>\n+  </ul>\n+\n+.. code:: javascript\n+\n+  let items = document.querySelectorAll(\".item\");\n+  let showroom = Showroom(items);\n+\n+or\n+\n+.. code:: javascript\n+\n+  let items = $(\".item\");\n+  let showroom = Showroom(items);\n+\n+Configuration\n+-------------\n+\n+The showrooms provides the following options.\n+\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| Option   | Default                  | Description                                                              |\n++==========+==========================+==========================================================================+\n+| cssClass | \"ftw-showroom\"           | Class attribute on the root element of the gallery                       |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| render   | See rendering_. section  | Override the default render behavior                                     |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| tail     | Empty function           | Is getting called when the user reaches the last element of the gallery  |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| head     | Empty function           | Is getting called when the user reaches the first element of the gallery |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| fetch    | See fetching_. section   | Override the default fetch behavior                                      |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| template | See template section     | Override the default gallery template                                    |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+| target   | body Element             | Define a selector where the gallery is getting to be attached            |\n++----------+--------------------------+--------------------------------------------------------------------------+\n+\n+.. _fetching:\n+\n+Fetching\n+--------\n+\n+The default fetching function makes an AJAX call with the provided target on the item\n+to retrieve its content.\n+\n+.. code:: javascript\n+\n+  function fetch(item) { return $.get(item.target); };\n+\n+This function can be overridden in the options to change the default behavior.\n+\n+.. code:: javascript\n+\n+  let showroom = Showroom(items,\n+    {\n+      fetch: () => { return \"<p>Some other content</p>\"; }\n+    }\n+  );\n+\n+\n+.. _rendering:\n+\n+Rendering\n+---------\n+\n+The default rendering function returns a HTML string using the default `Handlebars <http://handlebarsjs.com/>`_ template","path":"README.rst","position":165,"original_position":165,"commit_id":"e96dc9ba15662e51d5171472d47c3ae6d60cdcbe","original_commit_id":"e96dc9ba15662e51d5171472d47c3ae6d60cdcbe","user":{"login":"deiferni","id":736583,"avatar_url":"https://avatars.githubusercontent.com/u/736583?v=3","gravatar_id":"","url":"https://api.github.com/users/deiferni","html_url":"https://github.com/deiferni","followers_url":"https://api.github.com/users/deiferni/followers","following_url":"https://api.github.com/users/deiferni/following{/other_user}","gists_url":"https://api.github.com/users/deiferni/gists{/gist_id}","starred_url":"https://api.github.com/users/deiferni/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/deiferni/subscriptions","organizations_url":"https://api.github.com/users/deiferni/orgs","repos_url":"https://api.github.com/users/deiferni/repos","events_url":"https://api.github.com/users/deiferni/events{/privacy}","received_events_url":"https://api.github.com/users/deiferni/received_events","type":"User","site_admin":false},"body":"a**n** HTML","created_at":"2016-05-24T15:04:27Z","updated_at":"2016-05-24T15:04:27Z","html_url":"https://github.com/4teamwork/ftw.showroom/pull/21#discussion_r64409125","pull_request_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21","_links":{"self":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/comments/64409125"},"html":{"href":"https://github.com/4teamwork/ftw.showroom/pull/21#discussion_r64409125"},"pull_request":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21"}}},"pull_request":{"url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21","id":71230904,"html_url":"https://github.com/4teamwork/ftw.showroom/pull/21","diff_url":"https://github.com/4teamwork/ftw.showroom/pull/21.diff","patch_url":"https://github.com/4teamwork/ftw.showroom/pull/21.patch","issue_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/21","number":21,"state":"open","locked":false,"title":"Update documentation.","user":{"login":"bierik","id":1637820,"avatar_url":"https://avatars.githubusercontent.com/u/1637820?v=3","gravatar_id":"","url":"https://api.github.com/users/bierik","html_url":"https://github.com/bierik","followers_url":"https://api.github.com/users/bierik/followers","following_url":"https://api.github.com/users/bierik/following{/other_user}","gists_url":"https://api.github.com/users/bierik/gists{/gist_id}","starred_url":"https://api.github.com/users/bierik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bierik/subscriptions","organizations_url":"https://api.github.com/users/bierik/orgs","repos_url":"https://api.github.com/users/bierik/repos","events_url":"https://api.github.com/users/bierik/events{/privacy}","received_events_url":"https://api.github.com/users/bierik/received_events","type":"User","site_admin":false},"body":"Add documentation for showroom client API.\r\n\r\n/cc @deiferni ","created_at":"2016-05-24T14:31:49Z","updated_at":"2016-05-24T15:04:27Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d0471098d7167aae8aa53c99c545e01c60b1829f","assignee":{"login":"elioschmutz","id":557005,"avatar_url":"https://avatars.githubusercontent.com/u/557005?v=3","gravatar_id":"","url":"https://api.github.com/users/elioschmutz","html_url":"https://github.com/elioschmutz","followers_url":"https://api.github.com/users/elioschmutz/followers","following_url":"https://api.github.com/users/elioschmutz/following{/other_user}","gists_url":"https://api.github.com/users/elioschmutz/gists{/gist_id}","starred_url":"https://api.github.com/users/elioschmutz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elioschmutz/subscriptions","organizations_url":"https://api.github.com/users/elioschmutz/orgs","repos_url":"https://api.github.com/users/elioschmutz/repos","events_url":"https://api.github.com/users/elioschmutz/events{/privacy}","received_events_url":"https://api.github.com/users/elioschmutz/received_events","type":"User","site_admin":false},"milestone":null,"commits_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21/commits","review_comments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21/comments","review_comment_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/comments{/number}","comments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/21/comments","statuses_url":"https://api.github.com/repos/4teamwork/ftw.showroom/statuses/e96dc9ba15662e51d5171472d47c3ae6d60cdcbe","head":{"label":"4teamwork:kb_documentation","ref":"kb_documentation","sha":"e96dc9ba15662e51d5171472d47c3ae6d60cdcbe","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":57362123,"name":"ftw.showroom","full_name":"4teamwork/ftw.showroom","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.showroom","description":"","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.showroom","forks_url":"https://api.github.com/repos/4teamwork/ftw.showroom/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.showroom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.showroom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.showroom/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.showroom/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.showroom/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.showroom/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.showroom/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.showroom/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.showroom/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.showroom/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.showroom/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.showroom/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.showroom/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.showroom/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.showroom/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.showroom/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.showroom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.showroom/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.showroom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.showroom/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.showroom/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.showroom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.showroom/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.showroom/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/deployments","created_at":"2016-04-29T06:55:49Z","updated_at":"2016-05-04T14:16:48Z","pushed_at":"2016-05-24T14:32:58Z","git_url":"git://github.com/4teamwork/ftw.showroom.git","ssh_url":"git@github.com:4teamwork/ftw.showroom.git","clone_url":"https://github.com/4teamwork/ftw.showroom.git","svn_url":"https://github.com/4teamwork/ftw.showroom","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"base":{"label":"4teamwork:master","ref":"master","sha":"c5ac13a9fff2dcb057beeb2bc1aa3cfdd3ac9d0a","user":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"repo":{"id":57362123,"name":"ftw.showroom","full_name":"4teamwork/ftw.showroom","owner":{"login":"4teamwork","id":681821,"avatar_url":"https://avatars.githubusercontent.com/u/681821?v=3","gravatar_id":"","url":"https://api.github.com/users/4teamwork","html_url":"https://github.com/4teamwork","followers_url":"https://api.github.com/users/4teamwork/followers","following_url":"https://api.github.com/users/4teamwork/following{/other_user}","gists_url":"https://api.github.com/users/4teamwork/gists{/gist_id}","starred_url":"https://api.github.com/users/4teamwork/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/4teamwork/subscriptions","organizations_url":"https://api.github.com/users/4teamwork/orgs","repos_url":"https://api.github.com/users/4teamwork/repos","events_url":"https://api.github.com/users/4teamwork/events{/privacy}","received_events_url":"https://api.github.com/users/4teamwork/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/4teamwork/ftw.showroom","description":"","fork":false,"url":"https://api.github.com/repos/4teamwork/ftw.showroom","forks_url":"https://api.github.com/repos/4teamwork/ftw.showroom/forks","keys_url":"https://api.github.com/repos/4teamwork/ftw.showroom/keys{/key_id}","collaborators_url":"https://api.github.com/repos/4teamwork/ftw.showroom/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/4teamwork/ftw.showroom/teams","hooks_url":"https://api.github.com/repos/4teamwork/ftw.showroom/hooks","issue_events_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/events{/number}","events_url":"https://api.github.com/repos/4teamwork/ftw.showroom/events","assignees_url":"https://api.github.com/repos/4teamwork/ftw.showroom/assignees{/user}","branches_url":"https://api.github.com/repos/4teamwork/ftw.showroom/branches{/branch}","tags_url":"https://api.github.com/repos/4teamwork/ftw.showroom/tags","blobs_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/refs{/sha}","trees_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/trees{/sha}","statuses_url":"https://api.github.com/repos/4teamwork/ftw.showroom/statuses/{sha}","languages_url":"https://api.github.com/repos/4teamwork/ftw.showroom/languages","stargazers_url":"https://api.github.com/repos/4teamwork/ftw.showroom/stargazers","contributors_url":"https://api.github.com/repos/4teamwork/ftw.showroom/contributors","subscribers_url":"https://api.github.com/repos/4teamwork/ftw.showroom/subscribers","subscription_url":"https://api.github.com/repos/4teamwork/ftw.showroom/subscription","commits_url":"https://api.github.com/repos/4teamwork/ftw.showroom/commits{/sha}","git_commits_url":"https://api.github.com/repos/4teamwork/ftw.showroom/git/commits{/sha}","comments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/comments{/number}","issue_comment_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/comments{/number}","contents_url":"https://api.github.com/repos/4teamwork/ftw.showroom/contents/{+path}","compare_url":"https://api.github.com/repos/4teamwork/ftw.showroom/compare/{base}...{head}","merges_url":"https://api.github.com/repos/4teamwork/ftw.showroom/merges","archive_url":"https://api.github.com/repos/4teamwork/ftw.showroom/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/4teamwork/ftw.showroom/downloads","issues_url":"https://api.github.com/repos/4teamwork/ftw.showroom/issues{/number}","pulls_url":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls{/number}","milestones_url":"https://api.github.com/repos/4teamwork/ftw.showroom/milestones{/number}","notifications_url":"https://api.github.com/repos/4teamwork/ftw.showroom/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/4teamwork/ftw.showroom/labels{/name}","releases_url":"https://api.github.com/repos/4teamwork/ftw.showroom/releases{/id}","deployments_url":"https://api.github.com/repos/4teamwork/ftw.showroom/deployments","created_at":"2016-04-29T06:55:49Z","updated_at":"2016-05-04T14:16:48Z","pushed_at":"2016-05-24T14:32:58Z","git_url":"git://github.com/4teamwork/ftw.showroom.git","ssh_url":"git@github.com:4teamwork/ftw.showroom.git","clone_url":"https://github.com/4teamwork/ftw.showroom.git","svn_url":"https://github.com/4teamwork/ftw.showroom","homepage":null,"size":120,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":7,"forks":0,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21"},"html":{"href":"https://github.com/4teamwork/ftw.showroom/pull/21"},"issue":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/21"},"comments":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/issues/21/comments"},"review_comments":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21/comments"},"review_comment":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/pulls/21/commits"},"statuses":{"href":"https://api.github.com/repos/4teamwork/ftw.showroom/statuses/e96dc9ba15662e51d5171472d47c3ae6d60cdcbe"}}}}
{"actor":{"display_login":"deiferni"}}