Skip to content

Commit

Permalink
Merge remote-tracking branch 'refs/remotes/joomla/4.0-dev' into mvc-m…
Browse files Browse the repository at this point in the history
…odel-retry
  • Loading branch information
joomdonation committed Apr 2, 2017
2 parents 42fe3ee + 0da24fb commit 8c3fdc0
Show file tree
Hide file tree
Showing 480 changed files with 15,622 additions and 11,760 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
source 'http://rubygems.org'

gem 'scss_lint', '~> 0.50.3'
gem 'scss_lint', '~> 0.52.0'
47 changes: 39 additions & 8 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = function(grunt) {
puny : 'media/vendor/punycode/js',
codemirror : 'media/vendor/codemirror',
adminTemplate : 'administrator/templates/atum',
siteTemplate : 'templates/aurora',
node_module : 'build/assets_tmp/node_modules/',
editors : 'media/editors',
media : 'media'
Expand Down Expand Up @@ -193,7 +194,8 @@ module.exports = function(grunt) {
sourceMap: true // SHOULD BE FALSE FOR DIST
},
files: {
'<%= folder.adminTemplate %>/css/template.css': '<%= folder.adminTemplate %>/scss/template.scss'
'<%= folder.adminTemplate %>/css/template.css': '<%= folder.adminTemplate %>/scss/template.scss',
'<%= folder.siteTemplate %>/css/template.css' : '<%= folder.siteTemplate %>/scss/template.scss',
}
}
},
Expand All @@ -202,10 +204,11 @@ module.exports = function(grunt) {
scsslint: {
allFiles: [
'<%= folder.adminTemplate %>/scss',
'<%= folder.siteTemplate %>/scss',
],
options: {
config: 'scss-lint.yml',
reporterOutput: '<%= folder.adminTemplate %>/scss/scss-lint-report.xml'
reporterOutput: 'scss-lint-report.xml'
}
},

Expand Down Expand Up @@ -290,6 +293,7 @@ module.exports = function(grunt) {
{
src: [
'<%= folder.adminTemplate %>/*.js',
'<%= folder.siteTemplate %>/*.js',
],
dest: '',
expand: true,
Expand All @@ -308,7 +312,10 @@ module.exports = function(grunt) {
],
},
dist: {
src: '<%= folder.adminTemplate %>/css/template.css'
src: [
'<%= folder.adminTemplate %>/css/template.css',
'<%= folder.siteTemplate %>/css/template.css'
]
}
},

Expand All @@ -320,19 +327,41 @@ module.exports = function(grunt) {
matchBase: true,
ext: '.min.css',
cwd: 'media/vendor/codemirror',
src: ['*.css', '!*.min.css', '!theme/*.css'],
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
],
dest: 'media/vendor/codemirror',
}]
},
templates: {
adminTemplate: {
files: [{
expand: true,
matchBase: true,
ext: '.min.css',
cwd: '<%= folder.adminTemplate %>/css',
src: ['*.css', '!*.min.css', '!theme/*.css'],
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
],
dest: '<%= folder.adminTemplate %>/css',
}]
},
siteTemplate: {
files: [{
expand: true,
matchBase: true,
ext: '.min.css',
cwd: '<%= folder.siteTemplate %>/css',
src: [
'*.css',
'!*.min.css',
'!theme/*.css'
],
dest: '<%= folder.siteTemplate %>/css',
}]
}
},
});
Expand All @@ -358,7 +387,8 @@ module.exports = function(grunt) {
'uglify:allJs',
'cssmin:allCss',
'postcss',
'cssmin:templates',
'cssmin:adminTemplate',
'cssmin:siteTemplate',
'updateXML',
'clean:temp'
]
Expand Down Expand Up @@ -396,7 +426,8 @@ module.exports = function(grunt) {
'scsslint',
'sass:dist',
'postcss',
'cssmin:templates'
'cssmin:adminTemplate',
'cssmin:siteTemplate'
]);
});

Expand Down
16 changes: 5 additions & 11 deletions administrator/components/com_admin/script.php
Original file line number Diff line number Diff line change
Expand Up @@ -1728,13 +1728,6 @@ public function deleteUnexistingFiles()
'/components/com_users/views/remind/metadata.xml',
'/components/com_users/views/reset/metadata.xml',
'/components/com_wrapper/metadata.xml',
'/media/jui/js/bootstrap-tooltip-extended.js',
'/media/jui/js/bootstrap-tooltip-extended.min.js',
'/media/jui/js/icomoon-lte-ie7.js',
'/media/jui/css/bootstrap-extended.css',
'/media/jui/css/bootstrap-tooltip-extended.css',
'/media/jui/css/bootstrap-responsive.css',
'/media/jui/css/bootstrap-responsive.min.css',
'/administrator/components/com_cache/layouts/joomla/searchtools/default/bar.php',
'/administrator/components/com_cache/layouts/joomla/searchtools/default.php',
'/administrator/components/com_languages/layouts/joomla/searchtools/default/bar.php',
Expand Down Expand Up @@ -1856,10 +1849,6 @@ public function deleteUnexistingFiles()
'/media/editors/codemirror/mode/jade',
// Joomla! 3.7.0
'/libraries/joomla/data',
'/templates/beez3',
'/administrator/templates/isis',
'/administrator/templates/hathor',
'/media/jui/less',
'/administrator/components/com_cache/layouts/joomla/searchtools/default',
'/administrator/components/com_cache/layouts/joomla/searchtools',
'/administrator/components/com_cache/layouts/joomla',
Expand All @@ -1876,6 +1865,11 @@ public function deleteUnexistingFiles()
'/administrator/components/com_templates/layouts/joomla',
'/administrator/components/com_templates/layouts',
'/administrator/templates/hathor/html/mod_menu',
// Joomla! 4.0
'/templates/beez3',
'/administrator/templates/isis',
'/administrator/templates/hathor',
'/media/jui/less',
);

jimport('joomla.filesystem.file');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
-- Enlarge some database columns to avoid data losses, then convert all tables
-- to utf8mb4 or utf8, then set default character sets and collations for all
-- tables, then add back indexes previosly dropped with step 1,
-- utf8mb4-conversion-01.sql, but addd them back with limited lenghts of
-- utf8mb4-conversion-01.sql, but add them back with limited lenghts of
-- columns.
--
-- Do not rename this file or any other of the utf8mb4-conversion-*.sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,9 @@ CREATE TABLE IF NOT EXISTS `#__fields_groups` (

CREATE TABLE IF NOT EXISTS `#__fields_values` (
`field_id` int(10) unsigned NOT NULL,
`context` varchar(255) NOT NULL,
`item_id` varchar(255) NOT NULL COMMENT 'Allow references to items which have strings as ids, eg. none db systems.',
`value` text NOT NULL DEFAULT '',
KEY (`field_id`),
KEY (`context`),
KEY (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 DEFAULT COLLATE=utf8mb4_unicode_ci;

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
UPDATE `#__categories` AS `c` INNER JOIN (
SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished
FROM `#__categories` AS `c2`
INNER JOIN `#__categories` AS `p` ON p.lft <= c2.lft AND c2.rgt <= p.rgt
GROUP BY c2.id) c2
ON c.id = c2.id
SET published = c2.newPublished;

UPDATE `#__menu` AS `c` INNER JOIN (
SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished
FROM `#__menu` AS `c2`
INNER JOIN `#__menu` AS `p` ON p.lft <= c2.lft AND c2.rgt <= p.rgt
GROUP BY c2.id) c2
ON c.id = c2.id
SET published = c2.newPublished;
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,9 @@ CREATE INDEX "#__fields_idx_language" ON "#__fields_groups" ("language");
CREATE TABLE "#__fields_values" (
"field_id" bigint DEFAULT 0 NOT NULL,
"item_id" varchar(255) DEFAULT '' NOT NULL,
"context" varchar(255) DEFAULT '' NOT NULL,
"value" text DEFAULT '' NOT NULL
);
CREATE INDEX "#__fields_values_idx_field_id" ON "#__fields_values" ("field_id");
CREATE INDEX "#__fields_values_idx_context" ON "#__fields_values" ("context");
CREATE INDEX "#__fields_values_idx_item_id" ON "#__fields_values" ("item_id");

INSERT INTO "#__extensions" ("extension_id", "name", "type", "element", "folder", "client_id", "enabled", "access", "protected", "manifest_cache", "params", "custom_data", "system_data", "checked_out", "checked_out_time", "ordering", "state") VALUES
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
UPDATE "#__categories" AS "c"
SET published = c2.newPublished
FROM (
SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished
FROM "#__categories" AS "c2"
INNER JOIN "#__categories" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt
GROUP BY c2.id) AS c2
WHERE c2.id = c.id;

UPDATE "#__menu" AS "c"
SET published = c2.newPublished
FROM (
SELECT c2.id, CASE WHEN MIN(p.published) > 0 THEN MAX(p.published) ELSE MIN(p.published) END AS newPublished
FROM "#__menu" AS "c2"
INNER JOIN "#__menu" AS "p" ON p.lft <= c2.lft AND c2.rgt <= p.rgt
GROUP BY c2.id) AS c2
WHERE c2.id = c.id;

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
$fieldsets = $this->form->getFieldsets();
?>

<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" enctype="multipart/form-data">
<form action="<?php echo JRoute::_('index.php?option=com_admin&view=profile&layout=edit&id=' . $this->item->id); ?>" method="post" name="adminForm" id="profile-form" enctype="multipart/form-data" class="form-validate">
<?php echo JHtml::_('bootstrap.startTabSet', 'myTab', array('active' => 'account')); ?>

<?php echo JHtml::_('bootstrap.addTab', 'myTab', 'account', JText::_('COM_ADMIN_USER_ACCOUNT_DETAILS')); ?>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ protected function getStoreId($id = '')
*/
protected function getListQuery()
{
$type = null;
$type = null;
$listOrdering = $this->getState('list.fullordering');

list($extensionName, $typeName) = explode('.', $this->state->get('itemtype'));

Expand Down Expand Up @@ -403,7 +404,10 @@ protected function getListQuery()
$query->group($db->qn($groupby));

// Add the list ordering clause.
$query->order($db->escape($this->getState('list.ordering') . ' ' . $this->getState('list.direction')));
if (!empty($listOrdering))
{
$query->order($db->escape($listOrdering));
}

return $query;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
JFormHelper::loadFieldClass('list');

/**
* Form Field class for the Joomla Framework.
* Field listing item languages
*
* @since 3.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ protected function getInput()
. ' data-change="' . JText::_('COM_ASSOCIATIONS_CHANGE_TARGET') . '"'
. ' role="button"'
. ' href="#associationSelect' . $this->id . 'Modal">'
. '<span class="icon-file"></span>'
. '<span class="icon-file" aria-hidden="true"></span>'
. '<span id="select-change-text"></span>'
. '</a>';

Expand All @@ -78,7 +78,7 @@ protected function getInput()
. ' class="btn' . ($value ? '' : ' hidden') . '"'
. ' onclick="return Joomla.submitbutton(\'undo-association\');"'
. ' id="remove-assoc">'
. '<span class="icon-remove"></span>' . JText::_('JCLEAR')
. '<span class="icon-remove" aria-hidden="true"></span>' . JText::_('JCLEAR')
. '</button>';

$html[] = '<input type="hidden" id="' . $this->id . '_id" name="' . $this->name . '" value="' . $value . '">';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
<field
name="fullordering"
type="list"
default="ordering ASC"
default="id ASC"
onchange="this.form.submit();"
>
<option value="">JGLOBAL_SORT_BY</option>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,11 +76,32 @@ public function display($tpl = null)
$this->app = JFactory::getApplication();
$this->form = $this->get('Form');
$input = $this->app->input;

$this->referenceId = $input->get('id', 0, 'int');

list($extensionName, $typeName) = explode('.', $input->get('itemtype'));

$extension = AssociationsHelper::getSupportedExtension($extensionName);
$types = $extension->get('types');

if (array_key_exists($typeName, $types))
{
$this->type = $types[$typeName];
$this->typeSupports = array();
$details = $this->type->get('details');
$this->save2copy = false;

if (array_key_exists('support', $details))
{
$support = $details['support'];
$this->typeSupports = $support;
}

if (!empty($this->typeSupports['save2copy']))
{
$this->save2copy = true;
}
}

$this->extensionName = $extensionName;
$this->typeName = $typeName;
$this->itemtype = $extensionName . '.' . $typeName;
Expand Down Expand Up @@ -187,10 +208,13 @@ protected function addToolbar()
. JText::_('COM_ASSOCIATIONS_SAVE_TARGET') . '</button>', 'target'
);

JToolBarHelper::custom('copy', 'copy.png', '', 'COM_ASSOCIATIONS_COPY_REFERENCE', false);
if ($this->typeName === 'category' || $this->extensionName === 'com_menus' || $this->save2copy === true)
{
JToolBarHelper::custom('copy', 'copy.png', '', 'COM_ASSOCIATIONS_COPY_REFERENCE', false);
}

JToolbarHelper::cancel('association.cancel', 'JTOOLBAR_CLOSE');
JToolbarHelper::help('JGLOBAL_HELP');
JToolbarHelper::help('JHELP_COMPONENTS_ASSOCIATIONS_EDIT');

JHtmlSidebar::setAction('index.php?option=com_associations');
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');

$listOrder = $this->escape($this->state->get('list.ordering'));
$listOrder = $this->escape($this->state->get('list.fullordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
$canManageCheckin = JFactory::getUser()->authorise('core.manage', 'com_checkin');
$colSpan = 5;
Expand Down Expand Up @@ -81,10 +81,10 @@
<?php echo JText::_('JGRID_HEADING_LANGUAGE'); ?>
</th>
<th width="5%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ASSOCIATIONS_HEADING_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
<?php echo JText::_('COM_ASSOCIATIONS_HEADING_ASSOCIATION'); ?>
</th>
<th width="15%" class="nowrap">
<?php echo JHtml::_('searchtools.sort', 'COM_ASSOCIATIONS_HEADING_NO_ASSOCIATION', 'association', $listDirn, $listOrder); ?>
<?php echo JText::_('COM_ASSOCIATIONS_HEADING_NO_ASSOCIATION'); ?>
</th>
<?php if (!empty($this->typeFields['menutype'])) : ?>
<th width="10%" class="nowrap">
Expand Down

0 comments on commit 8c3fdc0

Please sign in to comment.