{"action":"created","comment":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/40545675","id":40545675,"diff_hunk":"@@ -0,0 +1,105 @@\n+<?php\n+/**\n+ * @package     Joomla.Libraries\n+ * @subpackage  HTML\n+ *\n+ * @copyright   Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.\n+ * @license     GNU General Public License version 2 or later; see LICENSE\n+ */\n+\n+defined('JPATH_PLATFORM') or die;\n+\n+/**\n+ * Utility class for Tabs elements.\n+ *\n+ * @since  1.6\n+ */\n+abstract class JHtmlBootstraptabs\n+{\n+\t/**\n+\t * Loads the Javascript behavior and returns a JHtmlElement wrapper for the tabs\n+\t * This wrapper should be sent to the panel function.\n+\t *\n+\t * @param   string  $group   The pane identifier.\n+\t * @param   array   $params  An array of option.\n+\t *\n+\t * @return  JHtmlElement\n+\t *\n+\t * @since   3.5\n+\t */\n+\tpublic static function getWrapper($group = 'tabs', $params = array())\n+\t{\n+\t\tstatic::loadBehavior($group, $params);\n+\n+\t\t$wrapper = new JHtmlElement('dl', array('class', 'tabs', 'id' => $group));\n+\n+\t\t// Not sure why we are adding an empty dt/dd container, but whatever we'll keep it for now.\n+\t\t$wrapper->addChild('dt', array('style', 'display:none;'))->addChild('dd', array('style', 'display:none'));\n+\t\treturn $wrapper;\n+\t}\n+\n+\t/**\n+\t * Adds a new tab control and panel to the tab wrapper\n+\t * You can then use the returned object reference to populate\n+\t * the panel content using JHtmlElement::addInnerHtml or JHtmlElement::setInnerHtml\n+\t *\n+\t * @param   JHtmlElement  $wrapper  Wrapper element for the tab set\n+\t * @param   string        $text     Text to display.\n+\t * @param   string        $id       Identifier of the panel.\n+\t *\n+\t * @return  JHtmlElement  reference to a new panel object to put content into\n+\t *\n+\t * @since   1.6\n+\t */\n+\tpublic static function panel(JHtmlElement $wrapper, $text, $id)\n+\t{\n+\t\t$wrapper->addChild('dt', array('class' => 'tabs' . $id))\n+\t\t\t\t->addChild('span')\n+\t\t\t\t->addChild('h3')\n+\t\t\t\t->addChild('a', array('href' => 'javascript:void(0);'), $text);\n+\n+\t\treturn $wrapper->addChild('dd', array('class' => 'tabs'));\n+\t}\n+\n+\t/**\n+\t * Load the JavaScript behavior.\n+\t *\n+\t * @param   string  $group   The pane identifier.\n+\t * @param   array   $params  Array of options.\n+\t *\n+\t * @return  void\n+\t *\n+\t * @since   1.6\n+\t */\n+\tprotected static function loadBehavior($group, $params = array())\n+\t{\n+\t\tstatic $loaded = array();\n+\n+\t\tif (!array_key_exists((string) $group, $loaded))\n+\t\t{\n+\t\t\t// Include MooTools framework\n+\t\t\tJHtml::_('behavior.framework', true);","path":"libraries/cms/html/bootstraptabs.php","position":81,"original_position":81,"commit_id":"96c7787fe56c354e08846111a6b2e17dc1cbf508","original_commit_id":"96c7787fe56c354e08846111a6b2e17dc1cbf508","user":{"login":"Mathewlenning","id":3743651,"avatar_url":"https://avatars.githubusercontent.com/u/3743651?v=3","gravatar_id":"","url":"https://api.github.com/users/Mathewlenning","html_url":"https://github.com/Mathewlenning","followers_url":"https://api.github.com/users/Mathewlenning/followers","following_url":"https://api.github.com/users/Mathewlenning/following{/other_user}","gists_url":"https://api.github.com/users/Mathewlenning/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathewlenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathewlenning/subscriptions","organizations_url":"https://api.github.com/users/Mathewlenning/orgs","repos_url":"https://api.github.com/users/Mathewlenning/repos","events_url":"https://api.github.com/users/Mathewlenning/events{/privacy}","received_events_url":"https://api.github.com/users/Mathewlenning/received_events","type":"User","site_admin":false},"body":"I didn't change the JavaScript portion, just the rendering of the actual HTML","created_at":"2015-09-28T12:27:31Z","updated_at":"2015-09-28T12:27:31Z","html_url":"https://github.com/joomla/joomla-cms/pull/7967#discussion_r40545675","pull_request_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967","_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments/40545675"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/7967#discussion_r40545675"},"pull_request":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967"}}},"pull_request":{"url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967","id":46148500,"html_url":"https://github.com/joomla/joomla-cms/pull/7967","diff_url":"https://github.com/joomla/joomla-cms/pull/7967.diff","patch_url":"https://github.com/joomla/joomla-cms/pull/7967.patch","issue_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7967","number":7967,"state":"open","locked":false,"title":"Example revision of the JHtmlTabs using JHtmlElement","user":{"login":"Mathewlenning","id":3743651,"avatar_url":"https://avatars.githubusercontent.com/u/3743651?v=3","gravatar_id":"","url":"https://api.github.com/users/Mathewlenning","html_url":"https://github.com/Mathewlenning","followers_url":"https://api.github.com/users/Mathewlenning/followers","following_url":"https://api.github.com/users/Mathewlenning/following{/other_user}","gists_url":"https://api.github.com/users/Mathewlenning/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathewlenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathewlenning/subscriptions","organizations_url":"https://api.github.com/users/Mathewlenning/orgs","repos_url":"https://api.github.com/users/Mathewlenning/repos","events_url":"https://api.github.com/users/Mathewlenning/events{/privacy}","received_events_url":"https://api.github.com/users/Mathewlenning/received_events","type":"User","site_admin":false},"body":"Example of how pull request #7948 can simplify our lives. \r\n\r\nThis is less than ideal. I'd actually prefer to just send the wrapper and let the developer add the tab panes using the JHtmlElement interface.\r\n\r\nBut even in its current form it is way better than the current JHtmlTabs implementation. \r\n\r\nBTW does anyone know why we are adding the empty dt/dd set? or can I remove it?","created_at":"2015-09-28T12:00:56Z","updated_at":"2015-09-28T12:27:31Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd6c92d31411ed73113eac2ab0bbd859bc11735c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967/commits","review_comments_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967/comments","review_comment_url":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/issues/7967/comments","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/96c7787fe56c354e08846111a6b2e17dc1cbf508","head":{"label":"Mathewlenning:JHtmlElement---tabs-revision-example","ref":"JHtmlElement---tabs-revision-example","sha":"96c7787fe56c354e08846111a6b2e17dc1cbf508","user":{"login":"Mathewlenning","id":3743651,"avatar_url":"https://avatars.githubusercontent.com/u/3743651?v=3","gravatar_id":"","url":"https://api.github.com/users/Mathewlenning","html_url":"https://github.com/Mathewlenning","followers_url":"https://api.github.com/users/Mathewlenning/followers","following_url":"https://api.github.com/users/Mathewlenning/following{/other_user}","gists_url":"https://api.github.com/users/Mathewlenning/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathewlenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathewlenning/subscriptions","organizations_url":"https://api.github.com/users/Mathewlenning/orgs","repos_url":"https://api.github.com/users/Mathewlenning/repos","events_url":"https://api.github.com/users/Mathewlenning/events{/privacy}","received_events_url":"https://api.github.com/users/Mathewlenning/received_events","type":"User","site_admin":false},"repo":{"id":30701297,"name":"joomla-cms","full_name":"Mathewlenning/joomla-cms","owner":{"login":"Mathewlenning","id":3743651,"avatar_url":"https://avatars.githubusercontent.com/u/3743651?v=3","gravatar_id":"","url":"https://api.github.com/users/Mathewlenning","html_url":"https://github.com/Mathewlenning","followers_url":"https://api.github.com/users/Mathewlenning/followers","following_url":"https://api.github.com/users/Mathewlenning/following{/other_user}","gists_url":"https://api.github.com/users/Mathewlenning/gists{/gist_id}","starred_url":"https://api.github.com/users/Mathewlenning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mathewlenning/subscriptions","organizations_url":"https://api.github.com/users/Mathewlenning/orgs","repos_url":"https://api.github.com/users/Mathewlenning/repos","events_url":"https://api.github.com/users/Mathewlenning/events{/privacy}","received_events_url":"https://api.github.com/users/Mathewlenning/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Mathewlenning/joomla-cms","description":"Home of the Joomla! Content Management System","fork":true,"url":"https://api.github.com/repos/Mathewlenning/joomla-cms","forks_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/forks","keys_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/teams","hooks_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/events","assignees_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/tags","blobs_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/subscription","commits_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/merges","archive_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/downloads","issues_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/Mathewlenning/joomla-cms/releases{/id}","created_at":"2015-02-12T12:25:22Z","updated_at":"2015-02-12T12:25:36Z","pushed_at":"2015-09-28T12:14:46Z","git_url":"git://github.com/Mathewlenning/joomla-cms.git","ssh_url":"git@github.com:Mathewlenning/joomla-cms.git","clone_url":"https://github.com/Mathewlenning/joomla-cms.git","svn_url":"https://github.com/Mathewlenning/joomla-cms","homepage":"http://joomla.org","size":126622,"stargazers_count":0,"watchers_count":0,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"staging"}},"base":{"label":"joomla:staging","ref":"staging","sha":"66e968a3b8dd9ec1d8ba1e6635ddb571d8cf85fb","user":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"repo":{"id":2464908,"name":"joomla-cms","full_name":"joomla/joomla-cms","owner":{"login":"joomla","id":751633,"avatar_url":"https://avatars.githubusercontent.com/u/751633?v=3","gravatar_id":"","url":"https://api.github.com/users/joomla","html_url":"https://github.com/joomla","followers_url":"https://api.github.com/users/joomla/followers","following_url":"https://api.github.com/users/joomla/following{/other_user}","gists_url":"https://api.github.com/users/joomla/gists{/gist_id}","starred_url":"https://api.github.com/users/joomla/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/joomla/subscriptions","organizations_url":"https://api.github.com/users/joomla/orgs","repos_url":"https://api.github.com/users/joomla/repos","events_url":"https://api.github.com/users/joomla/events{/privacy}","received_events_url":"https://api.github.com/users/joomla/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/joomla/joomla-cms","description":"Home of the Joomla! Content Management System","fork":false,"url":"https://api.github.com/repos/joomla/joomla-cms","forks_url":"https://api.github.com/repos/joomla/joomla-cms/forks","keys_url":"https://api.github.com/repos/joomla/joomla-cms/keys{/key_id}","collaborators_url":"https://api.github.com/repos/joomla/joomla-cms/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/joomla/joomla-cms/teams","hooks_url":"https://api.github.com/repos/joomla/joomla-cms/hooks","issue_events_url":"https://api.github.com/repos/joomla/joomla-cms/issues/events{/number}","events_url":"https://api.github.com/repos/joomla/joomla-cms/events","assignees_url":"https://api.github.com/repos/joomla/joomla-cms/assignees{/user}","branches_url":"https://api.github.com/repos/joomla/joomla-cms/branches{/branch}","tags_url":"https://api.github.com/repos/joomla/joomla-cms/tags","blobs_url":"https://api.github.com/repos/joomla/joomla-cms/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/joomla/joomla-cms/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/joomla/joomla-cms/git/refs{/sha}","trees_url":"https://api.github.com/repos/joomla/joomla-cms/git/trees{/sha}","statuses_url":"https://api.github.com/repos/joomla/joomla-cms/statuses/{sha}","languages_url":"https://api.github.com/repos/joomla/joomla-cms/languages","stargazers_url":"https://api.github.com/repos/joomla/joomla-cms/stargazers","contributors_url":"https://api.github.com/repos/joomla/joomla-cms/contributors","subscribers_url":"https://api.github.com/repos/joomla/joomla-cms/subscribers","subscription_url":"https://api.github.com/repos/joomla/joomla-cms/subscription","commits_url":"https://api.github.com/repos/joomla/joomla-cms/commits{/sha}","git_commits_url":"https://api.github.com/repos/joomla/joomla-cms/git/commits{/sha}","comments_url":"https://api.github.com/repos/joomla/joomla-cms/comments{/number}","issue_comment_url":"https://api.github.com/repos/joomla/joomla-cms/issues/comments{/number}","contents_url":"https://api.github.com/repos/joomla/joomla-cms/contents/{+path}","compare_url":"https://api.github.com/repos/joomla/joomla-cms/compare/{base}...{head}","merges_url":"https://api.github.com/repos/joomla/joomla-cms/merges","archive_url":"https://api.github.com/repos/joomla/joomla-cms/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/joomla/joomla-cms/downloads","issues_url":"https://api.github.com/repos/joomla/joomla-cms/issues{/number}","pulls_url":"https://api.github.com/repos/joomla/joomla-cms/pulls{/number}","milestones_url":"https://api.github.com/repos/joomla/joomla-cms/milestones{/number}","notifications_url":"https://api.github.com/repos/joomla/joomla-cms/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/joomla/joomla-cms/labels{/name}","releases_url":"https://api.github.com/repos/joomla/joomla-cms/releases{/id}","created_at":"2011-09-27T02:07:38Z","updated_at":"2015-09-25T16:10:14Z","pushed_at":"2015-09-28T12:14:47Z","git_url":"git://github.com/joomla/joomla-cms.git","ssh_url":"git@github.com:joomla/joomla-cms.git","clone_url":"https://github.com/joomla/joomla-cms.git","svn_url":"https://github.com/joomla/joomla-cms","homepage":"https://www.joomla.org","size":343487,"stargazers_count":1662,"watchers_count":1662,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1893,"mirror_url":null,"open_issues_count":597,"forks":1893,"open_issues":597,"watchers":1662,"default_branch":"staging"}},"_links":{"self":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967"},"html":{"href":"https://github.com/joomla/joomla-cms/pull/7967"},"issue":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/7967"},"comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/issues/7967/comments"},"review_comments":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967/comments"},"review_comment":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/joomla/joomla-cms/pulls/7967/commits"},"statuses":{"href":"https://api.github.com/repos/joomla/joomla-cms/statuses/96c7787fe56c354e08846111a6b2e17dc1cbf508"}}}}