Skip to content
This repository has been archived by the owner on Feb 4, 2021. It is now read-only.

Commit

Permalink
#319 Styling backend further
Browse files Browse the repository at this point in the history
  • Loading branch information
robinpoort committed May 18, 2017
1 parent 0cf72d1 commit 80be76d
Show file tree
Hide file tree
Showing 26 changed files with 280 additions and 1,466 deletions.
5 changes: 5 additions & 0 deletions app/administrator/language/en-GB/en-GB.tpl_elysio.ini
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
; Filters
COM_MENUS_FILTER_PUBLISHED="Published";
JOPTION_FILTER_ACCESS="Access";
JOPTION_FILTER_LANGUAGE="Language";
JOPTION_FILTER_LEVEL="Filter";
6 changes: 6 additions & 0 deletions web/administrator/log/jcontroller.log.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,9 @@
2017-05-15T13:39:22+00:00 INFO 127.0.0.1 controller Holding edit ID com_templates.edit.style.9 Array ( [0] => 9 )
2017-05-15T13:39:22+00:00 INFO 127.0.0.1 controller Checking edit ID com_templates.edit.style.9: 1 Array ( [0] => 9 )
2017-05-15T13:39:26+00:00 INFO 127.0.0.1 controller Releasing edit ID com_templates.edit.style.9 Array ( )
2017-05-18T11:33:33+00:00 INFO 127.0.0.1 controller Holding edit ID com_templates.edit.style.7 Array ( [0] => 7 )
2017-05-18T11:33:33+00:00 INFO 127.0.0.1 controller Checking edit ID com_templates.edit.style.7: 1 Array ( [0] => 7 )
2017-05-18T11:33:34+00:00 INFO 127.0.0.1 controller Releasing edit ID com_templates.edit.style.7 Array ( )
2017-05-18T11:33:45+00:00 INFO 127.0.0.1 controller Holding edit ID com_templates.edit.style.8 Array ( [0] => 8 )
2017-05-18T11:33:45+00:00 INFO 127.0.0.1 controller Checking edit ID com_templates.edit.style.8: 1 Array ( [0] => 8 )
2017-05-18T11:33:47+00:00 INFO 127.0.0.1 controller Releasing edit ID com_templates.edit.style.8 Array ( )
28 changes: 26 additions & 2 deletions web/administrator/templates/elysio/css/admin.css
Original file line number Diff line number Diff line change
Expand Up @@ -4579,7 +4579,7 @@ markup:

.k-ui-namespace .k-scopebar-dropdown.k-is-active .k-scopebar-dropdown__button { background: #e9e9e9; }

.k-ui-namespace .k-scopebar-dropdown__button { position: relative; border: none; background: transparent; margin: 0; padding: 0 6px; line-height: 39px; height: 39px; font-size: 13px; }
.k-ui-namespace .k-scopebar-dropdown__button { position: relative; border: none; background: transparent; margin: 0; padding: 0 6px; line-height: 39px; height: 39px; font-size: 13px; cursor: pointer; }

.k-ui-namespace .k-scopebar-dropdown__button:hover, .k-ui-namespace .k-scopebar-dropdown__button:focus { background: #e9e9e9; }

Expand Down Expand Up @@ -5293,7 +5293,7 @@ markup:

.k-ui-namespace .k-dynamic-content-holder.k-dynamic-content-holder.k-dynamic-content-holder { display: none; }

.k-ui-namespace .k-is-hidden.k-is-hidden.k-is-hidden { display: none; }
.k-ui-namespace .k-hidden.k-hidden.k-hidden { display: none; }

.k-cssanimations.k-boxshadow .k-ui-namespace .k-loader { display: inline-block; color: #3071a9; font-size: 5px; margin: 0 auto 2em; position: relative; text-indent: -9999em; vertical-align: middle; /* Sizes */ }

Expand Down Expand Up @@ -8218,3 +8218,27 @@ body.koowa > .koowa { min-height: 100%; overflow: hidden; }
.k-ui-namespace .k-login__brand { display: block; height: auto; /* 1 */ width: auto; /* 1 */ max-width: 100%; text-align: center; /* 2 */ margin-left: auto; margin-right: auto; margin-bottom: 20px; /* 5 */ }

.k-ui-namespace .k-login__brand img { max-height: 100%; vertical-align: middle; }

.k-ui-namespace .chzn-container { min-width: 100%; max-width: 100%; }

.k-ui-namespace .chzn-container-single .chzn-single { height: 32px; line-height: 30px; }

.k-ui-namespace .chzn-container-single .chzn-single div b { background-position: 0 6px; }

.k-ui-namespace .k-scopebar .chzn-container { min-width: 0; max-width: none; }

.k-ui-namespace .k-container .k-container__main:last-child { margin-bottom: 0; }

.k-ui-namespace .k-container .nav-tabs { margin-left: 10px; margin-right: 10px; }

.k-ui-namespace .k-container .tab-content { padding-top: 20px; }

.k-ui-namespace .k-container .tab-content:before, .k-ui-namespace .k-container .tab-content:after { content: " "; display: table; }

.k-ui-namespace .k-container .tab-content:after { clear: both; }

.k-ui-namespace .k-container__content:before, .k-ui-namespace .k-container__content:after { content: " "; display: table; }

.k-ui-namespace .k-container__content:after { clear: both; }

.k-ui-namespace .readonly { display: block; }
3 changes: 1 addition & 2 deletions web/administrator/templates/elysio/gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,8 +140,7 @@ module.exports = function(grunt) {
},
javascript: {
files: [
'scripts/*.js',
'js/*.js'
'scripts/*.js'
],
tasks: ['uglify'],
options: {
Expand Down
33 changes: 23 additions & 10 deletions web/administrator/templates/elysio/html/com_menus/item/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,23 +87,27 @@
</script>

<!-- Form -->
<form class="k-form-layout form-validate" action="<?php echo JRoute::_('index.php?option=com_menus&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form">
<form class="k-component k-js-component k-js-form-controller form-validate" action="<?php echo JRoute::_('index.php?option=com_menus&layout=edit&id=' . (int) $this->item->id); ?>" method="post" name="adminForm" id="item-form">

<!-- Container -->
<div class="k-container">

<?php
if ($this->item->type == 'url')
{
$this->form->setFieldAttribute('alias', 'type', 'hidden');
}
?>
<div class="k-container__main">
<?php
if ($this->item->type == 'url')
{
$this->form->setFieldAttribute('alias', 'type', 'hidden');
}
echo JLayoutHelper::render('joomla.edit.title_alias', $this);
?>
</div>
</div>

<?php echo JLayoutHelper::render('joomla.edit.title_alias', $this); ?>
<div class="k-container">

<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'details')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'details', JText::_('COM_MENUS_ITEM_DETAILS', true)); ?>

<div class="k-container__content">
<!-- Main information -->
<div class="k-container__main">
Expand All @@ -122,6 +126,8 @@

echo $this->form->getControlGroups('request');

echo $this->form->renderField('alias');

if ($this->item->type == 'url')
{
$this->form->setFieldAttribute('link', 'readonly', 'false');
Expand All @@ -131,6 +137,13 @@
echo $this->form->getControlGroup('browserNav');
echo $this->form->getControlGroup('template_style_id');
?>

<script>
kQuery(function($) {
$('#jform_type').addClass('k-form-control').parent().addClass('k-input-group').removeClass('input-append').children('.btn').addClass('k-button k-button--primary').removeClass('btn btn-primary').wrap('<span class="k-input-group__button">');
});
</script>

</div><!-- .k-container__main -->

<!-- Sub information -->
Expand All @@ -146,7 +159,6 @@
'access',
'language',
'note'

);
if ($this->item->type != 'component')
{
Expand All @@ -156,6 +168,7 @@
<?php echo JLayoutHelper::render('joomla.edit.global', $this); ?>
</div><!-- .k-container__sub -->
</div><!-- .k-container__content -->

<?php echo JHtml::_('bootstrap.endTab'); ?>

<?php
Expand Down
43 changes: 24 additions & 19 deletions web/administrator/templates/elysio/html/com_menus/items/default.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,24 +60,27 @@
<!-- Scopebar -->
<div class="k-scopebar k-js-scopebar">
<?php echo JLayoutHelper::render('joomla.searchtools.default', array('view' => $this), null, array('debug' => false)); ?>

<!-- Filters -->
<div class="k-scopebar__item k-scopebar__item--filters">

<div class="k-scopebar__filters-content">

<!-- Filter -->
<div class="k-filter-container__item" data-filter="tools">
<?php echo JLayoutHelper::render('joomla.searchtools.default.filters', array('view' => $this), null, array('debug' => false)); ?>
</div><!-- k-filter-container__item -->
</div>

</div><!-- .k-scopebar -->

</div><!-- .k-scopebar -->

<?php if (!$this->items): ?>
<div class="k-empty-state">
<p>It seems like you don't have any menu items yet.</p>
<p>
<button id="onboardaction" class="k-button k-button--success k-button--large">
Add your first menu item
</button>
</p>
<script>
kQuery(function($) {
$('#onboardaction').on('click', function() {
$('.k-button--new').trigger('click');
})
});
</script>
</div>
<?php endif; ?>
<!-- Table -->
<div class="k-table-container">
<div class="k-table-container<?php echo (!$this->items) ? ' k-hidden' : ''; ?>">
<div class="k-table">
<table class="k-js-fixed-table-header k-js-responsive-table">
<thead>
Expand Down Expand Up @@ -247,8 +250,10 @@

</div><!-- .k-table-container -->

</form><!-- .k-list-layout -->
</form><!-- .k-component -->

<?php if ($user->authorise('core.create', 'com_menus') || $user->authorise('core.edit', 'com_menus')) : ?>
<?php echo $this->loadTemplate('batch'); ?>
<?php endif;?>
<div class="k-dynamic-content-holder">
<?php if ($user->authorise('core.create', 'com_menus') || $user->authorise('core.edit', 'com_menus')) : ?>
<?php echo $this->loadTemplate('batch'); ?>
<?php endif;?>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,4 @@

<?php
echo $title ? $form->renderField($title) : '';
echo $form->renderField('alias');
?>
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
<?php
/**
* @package Joomla.Site
* @subpackage Layout
*
* @copyright Copyright (C) 2005 - 2016 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/

defined('JPATH_BASE') or die;

extract($displayData);

/**
* Layout variables
* -----------------
* @var string $autocomplete Autocomplete attribute for the field.
* @var boolean $autofocus Is autofocus enabled?
* @var string $class Classes for the input.
* @var string $description Description of the field.
* @var boolean $disabled Is this field disabled?
* @var string $group Group the field belongs to. <fields> section in form XML.
* @var boolean $hidden Is this field hidden in the form?
* @var string $hint Placeholder for the field.
* @var string $id DOM id of the field.
* @var string $label Label of the field.
* @var string $labelclass Classes to apply to the label.
* @var boolean $multiple Does this field support multiple values?
* @var string $name Name of the input field.
* @var string $onchange Onchange attribute for the field.
* @var string $onclick Onclick attribute for the field.
* @var string $pattern Pattern (Reg Ex) of value of the form field.
* @var boolean $readonly Is this field read only?
* @var boolean $repeat Allows extensions to duplicate elements.
* @var boolean $required Is this field required?
* @var integer $size Size attribute of the input.
* @var boolean $spellcheck Spellcheck state for the form field.
* @var string $validate Validation rules to apply.
* @var string $value Value attribute of the field.
* @var array $options Options available for this field.
*/

// Including fallback code for HTML5 non supported browsers.
JHtml::_('jquery.framework');
JHtml::_('script', 'system/html5fallback.js', false, true);

/**
* The format of the input tag to be filled in using sprintf.
* %1 - id
* %2 - name
* %3 - value
* %4 = any other attributes
*/
$format = '<input type="radio" id="%1$s" name="%2$s" value="%3$s" %4$s />';
$alt = preg_replace('/[^a-zA-Z0-9_\-]/', '_', $name);
?>


<fieldset id="<?php echo $id; ?>" class="<?php echo trim($class . ' k-optionlist k-optionlist--boolean'); ?>"
<?php echo $disabled ? 'disabled' : ''; ?>
<?php echo $required ? 'required aria-required="true"' : ''; ?>
<?php echo $autofocus ? 'autofocus' : ''; ?>>

<?php if (!empty($options)) : ?>
<div class="k-optionlist__content">
<?php foreach ($options as $i => $option) : ?>
<?php
// Initialize some option attributes.
$checked = ((string) $option->value == $value) ? 'checked="checked"' : '';
$optionClass = !empty($option->class) ? 'class="' . $option->class . '"' : '';
$disabled = !empty($option->disable) || ($disabled && !$checked) ? 'disabled' : '';

// Initialize some JavaScript option attributes.
$onclick = !empty($option->onclick) ? 'onclick="' . $option->onclick . '"' : '';
$onchange = !empty($option->onchange) ? 'onchange="' . $option->onchange . '"' : '';
$oid = $id . $i;
$ovalue = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
$attributes = array_filter(array($checked, $optionClass, $disabled, $onchange, $onclick));
?>

<?php if ($required) : ?>
<?php $attributes[] = 'required aria-required="true"'; ?>
<?php endif; ?>
<?php echo sprintf($format, $oid, $name, $ovalue, implode(' ', $attributes)); ?>
<label for="<?php echo $oid; ?>" <?php echo $optionClass; ?>>
<span><?php echo $option->text; ?></span>
</label>
<?php endforeach; ?>
<div class="k-optionlist__focus"></div>
</div>
<?php endif; ?>
</fieldset>
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
*/

defined('_JEXEC') or die;
include_once(JPATH_WEB.'/administrator/templates/elysio/html/overrides.php');

/**
* Layout variables
Expand All @@ -27,26 +28,15 @@
}
?>

<?php if($displayData['name'] == 'alias') : ?>
<div class="form-group <?php echo $displayData['options']['class']; ?>" <?php echo $displayData['options']['rel']; ?>>
<div class="input-group input-group-md input-group--alias">
<div class="input-group-addon">
<?php echo $displayData['label']; ?>
</div>
<?php echo $displayData['input']; ?>
</div>
</div>
<?php elseif($displayData['name'] == 'title') : ?>
<div class="form-group <?php echo $displayData['options']['class']; ?>" <?php echo $displayData['options']['rel']; ?>>
<?php echo $displayData['input']; ?>
</div>
<?php if(isset($displayData['name']) && $displayData['name'] == 'title') : ?>
<div class="k-form-group k-form-group--large">
<?php echo setFormInputAttributes($displayData['input'], array('class' => 'k-form-control', 'placeholder' => 'Title')); ?>
</div>
<?php else : ?>
<div class="form-group <?php echo $displayData['options']['class']; ?>" <?php echo $displayData['options']['rel']; ?>>
<div class="k-form-group">
<?php if (empty($displayData['options']['hiddenLabel'])) : ?>
<label><?php echo $displayData['label']; ?></label>
<?php endif; ?>
<?php echo $displayData['input']; ?>
<?php echo addFormControlClass($displayData['input']); ?>
</div>
<?php endif; ?>


Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,11 @@
<div class="k-dynamic-content-holder">
<div class="k-js-filters">
<?php if ($filters) : ?>
<?php $counter = 0; ?>
<?php foreach ($filters as $fieldName => $field) : ?>
<?php if ($fieldName != 'filter_search') : ?>
<div data-filter data-title="Filter name" data-count="<?php echo $counter; ?>">
<div data-filter data-title="<?php echo (string) $field->title; ?>">
<?php echo $field->input; ?>
</div>
<?php $counter++; ?>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
Expand All @@ -68,31 +66,5 @@
</div>
</div>
</div><!-- .k-scopebar__filters -->

<?php if ($filters) : ?>
<?php foreach ($filters as $fieldName => $field) : ?>
<?php if ($fieldName != 'filter_search') : ?>
<?php
$showOn = '';
if ($showOnData = $field->getAttribute('dataShowOn'))
{
JHtml::_('jquery.framework');
JHtml::_('script', 'jui/cms.js', false, true);
$showOn = " data-showon='" . $showOnData . "'";
}
?>
<div class="js-stools-field-filter"<?php echo $showOn; ?>>
<?php echo $field->input; ?>
</div>
<?php endif; ?>
<?php endforeach; ?>
<?php endif; ?>
</div>
</div>

<!-- Temporary -->
<style type="text/css">
.js-stools-field-filter {
display: inline-block;
}
</style>
Loading

0 comments on commit 80be76d

Please sign in to comment.