From 5ea1baccbab9472657add0a113b6ccd2e9ed5459 Mon Sep 17 00:00:00 2001 From: dgt41 Date: Thu, 7 May 2015 00:44:44 +0300 Subject: [PATCH] . --- .../html/com_patchtester/pulls/default.php | 89 ++++++++++++++----- .../com_patchtester/pulls/default_items.php | 21 +++-- 2 files changed, 81 insertions(+), 29 deletions(-) diff --git a/administrator/templates/hathor/html/com_patchtester/pulls/default.php b/administrator/templates/hathor/html/com_patchtester/pulls/default.php index 7996530..f58954c 100644 --- a/administrator/templates/hathor/html/com_patchtester/pulls/default.php +++ b/administrator/templates/hathor/html/com_patchtester/pulls/default.php @@ -13,16 +13,38 @@ JHtml::_('bootstrap.tooltip'); $listOrder = $this->escape($this->state->get('list.ordering')); $listDirn = $this->escape($this->state->get('list.direction')); +$filterApplied = $this->escape($this->state->get('filter.applied')); +$sortFields = $this->getSortFields(); JFactory::getDocument()->addScriptDeclaration( " var submitpatch = function (task, id) { - document.getElementById('pull_id').set('value', id); + jQuery('#pull_id').val(id); + console.log(id); + task = task.substr(5); return Joomla.submitbutton(task); } + + Joomla.orderTable = function() { + table = document.getElementById('sortTable'); + direction = document.getElementById('directionTable'); + order = table.options[table.selectedIndex].value; + if (order != '" . $listOrder . "') { + dirn = 'asc'; + } else { + dirn = direction.options[direction.selectedIndex].value; + } + + Joomla.tableOrdering(order, dirn, ''); + } " ); +JFactory::getDocument()->addStyleDeclaration( + ' + .icon-48-patchtester { background-image:url("/media/com_patchtester/images/icon-48-patchtester.png"); } + ' +); echo JHtmlBootstrap::renderModal( 'modal-refresh', array( 'url' => JUri::root() . 'administrator/index.php?option=com_patchtester&view=fetch&tmpl=component', @@ -34,34 +56,61 @@ echo JHtmlBootstrap::renderModal( ?>
-
- - -
+
+ +
+ + +
+
+ + +
+
+ + +
+
+ + +
+
- - - - - + + @@ -79,7 +128,7 @@ echo JHtmlBootstrap::renderModal( - + diff --git a/administrator/templates/hathor/html/com_patchtester/pulls/default_items.php b/administrator/templates/hathor/html/com_patchtester/pulls/default_items.php index 88d6d29..7fb077b 100644 --- a/administrator/templates/hathor/html/com_patchtester/pulls/default_items.php +++ b/administrator/templates/hathor/html/com_patchtester/pulls/default_items.php @@ -8,6 +8,7 @@ defined('_JEXEC') or die; +JHtml::stylesheet("com_patchtester/octicons.css", false, true, false); foreach ($this->items as $i => $item) : $status = ''; @@ -21,17 +22,19 @@ foreach ($this->items as $i => $item) : pull_id; ?> +
+ -
-
+ -
-
I - + + - + + + + + +
- +

escape($item->title); ?> +

+
+ + - title) : - echo JHtml::_('tooltip', htmlspecialchars($item->title), 'Info'); - else : - echo ' '; - endif; - ?> + + + applied) : ?> @@ -46,9 +49,9 @@ foreach ($this->items as $i => $item) : applied) : - echo '' . JText::_('COM_PATCHTESTER_REVERT_PATCH') . ''; + echo '' . JText::_('COM_PATCHTESTER_REVERT_PATCH') . ''; else : - echo '' . JText::_('COM_PATCHTESTER_APPLY_PATCH') . ''; + echo '' . JText::_('COM_PATCHTESTER_APPLY_PATCH') . ''; endif; ?>