Skip to content

Commit

Permalink
Merge branch '2.0.2'
Browse files Browse the repository at this point in the history
  • Loading branch information
ahamed committed Aug 28, 2021
2 parents d8f514c + 8cfb2ba commit 09e98c4
Show file tree
Hide file tree
Showing 446 changed files with 12,976 additions and 10,473 deletions.
10 changes: 9 additions & 1 deletion administrator/language/en-GB/en-GB.plg_system_helixultimate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ HELIX_ULTIMATE_ENABLE_SEARCH="Enable Search"
HELIX_ULTIMATE_ENABLE_SEARCH_DESC="Enable search and show it to the header."
HELIX_ULTIMATE_ENABLE_LOGIN="Enable Login"
HELIX_ULTIMATE_ENABLE_LOGIN_DESC="Enable login and show it to the header."

HELIX_ULTIMATE_HEADER_STYLE_1="Top Bar"
HELIX_ULTIMATE_HEADER_STYLE_2="Classic Layout"
HELIX_ULTIMATE_HEADER_STYLE_FULL_MODAL="Full Modal"
HELIX_ULTIMATE_HEADER_STYLE_CENTER_MODAL="Center Modal"
HELIX_ULTIMATE_HEADER_STYLE_LEFT_MODAL="Left Modal"
HELIX_ULTIMATE_HEADER_STYLE_MULTI_ROWS="Multi Rows"
HELIX_ULTIMATE_HEADER_STYLE_FULLWIDTH_CENTER="Fullwidth Center"
HELIX_ULTIMATE_HEADER_STYLE_FULLWIDTH_LEFT="Fullwidth Left"
HELIX_ULTIMATE_HEADER_STYLE_MINIMAL_LAYOUT="Minimal Layout"

HELIX_ULTIMATE_TOPBAR_MSG_DRAFTING="Drafting..."
HELIX_ULTIMATE_TOPBAR_MSG_RESET_DRAFT="Reset"
Expand Down Expand Up @@ -287,7 +295,7 @@ HELIX_ULTIMATE_LOGO_SLOGAN="logo Slogan"
HELIX_ULTIMATE_STICKY_HEADER_MD="Sticky Header"
HELIX_ULTIMATE_STICKY_HEADER_SM="Sticky Header (Tablet)"
HELIX_ULTIMATE_STICKY_HEADER_XS="Sticky Header (Mobile)"
HELIX_ULTIMATE_PREDEFINED_PRESETS="Pre-defined Presets"
HELIX_ULTIMATE_PREDEFINED_PRESETS="Pre Defined Presets"
HELIX_ULTIMATE_GROUP_MENUBUILDER="Menu Builder"
HELIX_ULTIMATE_FONT_COLOR="Color"
HELIX_ULTIMATE_FONT_LETTER_SPACING="Spacing"
Expand Down
29 changes: 27 additions & 2 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ const zip = require('gulp-zip');
const config = {
srcPath: path.resolve(__dirname),
buildPath: path.resolve(__dirname, './package/'),
packageName: 'Helix_Ultimate_2.0.1.zip',
packageName: 'helix_ultimate_pkg_2.0.2.zip',
pluginPackageName: 'helix_ultimate_plugin_pkg_2.0.2.zip',
templatePackageName: 'helix_ultimate_template_pkg_2.0.2.zip',
templateFileExtensions: 'xml, json, php, png, scss, js, ico, svg, jpg, eot, ttf, woff, woff2, otf, css',
pluginFileExtensions: function () {
return this.templateFileExtensions + ', ini';
Expand Down Expand Up @@ -81,12 +83,35 @@ function buildPackage() {
.pipe(dest(config.buildPath));
}

function buildPkgForPlugin() {
return src(`${config.buildPath}/plugins/system/**`)
.pipe(zip(config.pluginPackageName))
.pipe(dest(config.buildPath));
}

function buildPkgForTemplate() {
return src(`${config.buildPath}/template/**`).pipe(zip(config.templatePackageName)).pipe(dest(config.buildPath));
}

function clear() {
return del(
[
`${config.buildPath}/plugins`,
`${config.buildPath}/template`,
`${config.buildPath}/installer.script.php`,
`${config.buildPath}/installer.xml`,
],
{ force: true }
);
}

exports.default = series(
clean,
parallel(
manifestStreamTask,
series(templateLanguageStreamTask, templateStreamTask),
series(pluginStreamTask, templatePluginLanguageStreamTask)
),
buildPackage
parallel(buildPackage, buildPkgForPlugin, buildPkgForTemplate),
clear
);
6 changes: 4 additions & 2 deletions language/en-GB/en-GB.tpl_shaper_helixultimate.ini
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ HELIX_ULTIMATE_BLOG_OPEN_GRAPH_TWITTER_SITE="Twitter Username"

;Preset
HELIX_ULTIMATE_PRESETS="Presets"
HELIX_ULTIMATE_PREDEFINED_PRESETS="Pre-defined Presets"
HELIX_ULTIMATE_PREDEFINED_PRESETS="Pre Defined Presets"
HELIX_ULTIMATE_CUSTOM_STYLE="Custom Style"
HELIX_ULTIMATE_CUSTOM_STYLE_DESC="Enable this option to use custom styles. Built-in presets will not work if this option is enabled."
HELIX_ULTIMATE_GROUP_PRESET_BODY="Body"
Expand Down Expand Up @@ -293,6 +293,8 @@ HELIX_ULTIMATE_GROUP_MENUBUILDER="Menu Builder"
HELIX_ULTIMATE_OFFCANVAS="Off-canvas"
HELIX_ULTIMATE_MEGAMENU_SELECT="Select Menu Type"
HELIX_ULTIMATE_OFFCANVAS_MENU="Select Offcanvas Menu"
HELIX_ULTIMATE_OFFCANVAS_MAX_LEVEL="Maximum Level"
HELIX_ULTIMATE_OFFCANVAS_MAX_LEVEL_DESC="Set the maximum level of menu items."
HELIX_ULTIMATE_MENU_TYPE="Menu Type"
HELIX_ULTIMATE_MENU_TYPE_DESC="Select a suitable menu type from the list. You need to add a module to the off-canvas position from the Module Manager."
HELIX_ULTIMATE_MENU_BUILDER="Menu Builder"
Expand Down Expand Up @@ -327,7 +329,7 @@ HELIX_ULTIMATE_COMMENTS="Comments"
HELIX_ULTIMATE_ARTICLE_RATINGS="Ratings"
HELIX_ULTIMATE_RATINGS_COUNT="Ratings"
HELIX_ULTIMATE_RATING_COUNT="Rating"
HELIX_ALREADY_RATED="You are already rated."
HELIX_ALREADY_RATED="You've already rated this article."
HELIX_THANK_YOU="Thanks for your rating."
HELIX_ULTIMATE_SHARE_FACEBOOK="Facebook"
HELIX_ULTIMATE_SHARE_TWITTER="Twitter"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3664,3 +3664,10 @@ input[type='color'] {
background-size: 8px 12px !important;
background-position: right 3px center !important;
}

.field-hidden {
display: none !important;
}
.hu-no-gutter-bottom .hu-inline-group {
margin-bottom: 0px !important;
}
148 changes: 56 additions & 92 deletions plugins/system/helixultimate/assets/js/admin/fields.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ jQuery(function ($) {
control: 'hue',
position: 'bottom',
theme: 'bootstrap',
keywords: 'transparent, initial, inherit',
letterCase: 'uppercase',
opacity: true,
});
});

Expand All @@ -20,9 +23,7 @@ jQuery(function ($) {
}

$(this).addClass('active');
const $inputField = $(this)
.closest('.hu-field-alignment')
.find('input[type=hidden]');
const $inputField = $(this).closest('.hu-field-alignment').find('input[type=hidden]');
$inputField.val($(this).data('value')).trigger('change');
});

Expand All @@ -32,70 +33,54 @@ jQuery(function ($) {
*/

// Select all
$(document).on(
'change',
'.hu-menu-hierarchy-container .hu-menu-item-selector.select-all',
function (e) {
e.preventDefault();
const $parent = $(this).closest('.hu-menu-hierarchy-list');
const $siblings = $parent.find(
'.hu-menu-hierarchy-item:not(.level-0)'
);
const $inputField = $(this)
.closest('.hu-menu-hierarchy-container')
.find('input[type=hidden]');

let checked = $(this).prop('checked');
let value = [];

if (!checked) if (value.length > 0) value = [];

$siblings.each(function () {
const $input = $(this).find('input[type=checkbox]');
$input.prop('checked', checked);
const v = $input.val();
if (checked) if (value.indexOf(v) === -1) value.push(v);
});
$(document).on('change', '.hu-menu-hierarchy-container .hu-menu-item-selector.select-all', function (e) {
e.preventDefault();
const $parent = $(this).closest('.hu-menu-hierarchy-list');
const $siblings = $parent.find('.hu-menu-hierarchy-item:not(.level-0)');
const $inputField = $(this).closest('.hu-menu-hierarchy-container').find('input[type=hidden]');

$inputField.val(JSON.stringify(value)).trigger('change');
}
);

$(document).on(
'change',
'.hu-menu-hierarchy-container .hu-menu-item-selector:not(.level-0)',
function (e) {
e.preventDefault();
const $inputField = $(this)
.closest('.hu-menu-hierarchy-container')
.find('input[type=hidden]');
const $selectAllInputField = $(this)
.closest('.hu-menu-hierarchy-list')
.find('input[type=checkbox].select-all');
const elements = $selectAllInputField.data('elements');

let value = $inputField.val();
value = (value.length && JSON.parse(value)) || [];

const val = $(this).val();

if ($(this).prop('checked')) {
if (value.indexOf(val) === -1) value.push(val);
} else {
let index = value.indexOf(val);
if (index > -1) {
value.splice(index, 1);
}
}
let checked = $(this).prop('checked');
let value = [];

if (value.length === elements.length) {
$selectAllInputField.prop('checked', true);
} else {
$selectAllInputField.prop('checked', false);
if (!checked) if (value.length > 0) value = [];

$siblings.each(function () {
const $input = $(this).find('input[type=checkbox]');
$input.prop('checked', checked);
const v = $input.val();
if (checked) if (value.indexOf(v) === -1) value.push(v);
});

$inputField.val(JSON.stringify(value)).trigger('change');
});

$(document).on('change', '.hu-menu-hierarchy-container .hu-menu-item-selector:not(.level-0)', function (e) {
e.preventDefault();
const $inputField = $(this).closest('.hu-menu-hierarchy-container').find('input[type=hidden]');
const $selectAllInputField = $(this).closest('.hu-menu-hierarchy-list').find('input[type=checkbox].select-all');
const elements = $selectAllInputField.data('elements');

let value = $inputField.val();
value = (value.length && JSON.parse(value)) || [];

const val = $(this).val();

if ($(this).prop('checked')) {
if (value.indexOf(val) === -1) value.push(val);
} else {
let index = value.indexOf(val);
if (index > -1) {
value.splice(index, 1);
}
$inputField.val(JSON.stringify(value)).trigger('change');
}
);

if (value.length === elements.length) {
$selectAllInputField.prop('checked', true);
} else {
$selectAllInputField.prop('checked', false);
}
$inputField.val(JSON.stringify(value)).trigger('change');
});

/**
* Method to check condition and change the target visibility
Expand All @@ -114,9 +99,7 @@ jQuery(function ($) {
for (var j = 0, lj = jsondata.length; j < lj; j++) {
condition = jsondata[j] || {};
fieldName = condition.field;
$fields = $context.find(
'[name="' + fieldName + '"], [name="' + fieldName + '[]"]'
);
$fields = $context.find('[name="' + fieldName + '"], [name="' + fieldName + '[]"]');

condition['valid'] = 0;

Expand All @@ -132,10 +115,7 @@ jQuery(function ($) {
// se we can always tream 'itemval' as an array
itemval = $field.val();
// a multi-select <select> $field will return null when no elements are selected so we need to define itemval accordingly
if (
itemval == null &&
$field.prop('tagName').toLowerCase() == 'select'
) {
if (itemval == null && $field.prop('tagName').toLowerCase() == 'select') {
itemval = [];
}
}
Expand All @@ -151,17 +131,11 @@ jQuery(function ($) {
continue;
}

if (
jsondata[j]['sign'] == '=' &&
jsondata[j]['values'].indexOf(itemval[i]) !== -1
) {
if (jsondata[j]['sign'] == '=' && jsondata[j]['values'].indexOf(itemval[i]) !== -1) {
jsondata[j]['valid'] = 1;
}

if (
jsondata[j]['sign'] == '!=' &&
jsondata[j]['values'].indexOf(itemval[i]) === -1
) {
if (jsondata[j]['sign'] == '!=' && jsondata[j]['values'].indexOf(itemval[i]) === -1) {
jsondata[j]['valid'] = 1;
}
}
Expand All @@ -172,18 +146,12 @@ jQuery(function ($) {
showfield = false;
}
} else {
if (
condition['op'] === 'AND' &&
condition['valid'] + jsondata[j - 1]['valid'] < 2
) {
if (condition['op'] === 'AND' && condition['valid'] + jsondata[j - 1]['valid'] < 2) {
showfield = false;
condition['valid'] = 0;
}

if (
condition['op'] === 'OR' &&
condition['valid'] + jsondata[j - 1]['valid'] > 0
) {
if (condition['op'] === 'OR' && condition['valid'] + jsondata[j - 1]['valid'] > 0) {
showfield = true;
condition['valid'] = 1;
}
Expand Down Expand Up @@ -233,9 +201,7 @@ jQuery(function ($) {
// Collect an all referenced elements
for (var ij = 0, lj = jsondata.length; ij < lj; ij++) {
field = jsondata[ij]['field'];
$fields = $fields.add(
$('[name="' + field + '"], [name="' + field + '[]"]')
);
$fields = $fields.add($('[name="' + field + '"], [name="' + field + '[]"]'));
}

// Check current condition for element
Expand Down Expand Up @@ -279,9 +245,7 @@ jQuery(function ($) {
if (match && match.length > 0) {
[_, value, unit] = match;
if (unit === undefined) {
unit =
$(this).parent().find('select.hu-unit-select').val() ||
'px';
unit = $(this).parent().find('select.hu-unit-select').val() || 'px';
}
} else {
value = parseFloat(value) || '';
Expand Down
Loading

0 comments on commit 09e98c4

Please sign in to comment.