Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion public/js/lib/ext-plugins/portlet/Portlet.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ Ext.define('Portal.view.Portlet', {
this.closing = false;
this.fireEvent('close', this);
this[closeAction]();
if (closeAction == 'hide') {
if (closeAction === 'hide') {
this.el.setOpacity(1);
}
},
Expand Down
4 changes: 2 additions & 2 deletions public/js/opendxp/asset/listfolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,8 +278,8 @@ opendxp.asset.listfolder = Class.create(opendxp.asset.helpers.gridTabAbstract, {
}.bind(this),
celldblclick: function(grid, td, cellIndex, record, tr, rowIndex, e, eOpts) {
var columns = grid.grid.getColumnManager().getColumns();
if(columns[cellIndex].dataIndex == 'id~system' || columns[cellIndex].dataIndex == 'fullpath~system'
|| columns[cellIndex].dataIndex == 'preview~system') {
if(columns[cellIndex].dataIndex === 'id~system' || columns[cellIndex].dataIndex === 'fullpath~system'
|| columns[cellIndex].dataIndex === 'preview~system') {
var data = this.store.getAt(rowIndex);
opendxp.helpers.openAsset(data.id, data.get("type~system"));
}
Expand Down
2 changes: 1 addition & 1 deletion public/js/opendxp/asset/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ opendxp.asset.versions = Class.create({

if (elememntId > 0) {
Ext.Msg.confirm(t('clear_all'), t('clear_version_message'), function(btn){
if (btn == 'yes'){
if (btn === 'yes'){
var modificationDate = this.asset.data.modificationDate;

Ext.Ajax.request({
Expand Down
34 changes: 17 additions & 17 deletions public/js/opendxp/functions.js
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ function uniqid(prefix, more_entropy) {
// * returns 2: 'fooa30285b1cd361'
// * example 3: uniqid('bar', true);
// * returns 3: 'bara20285b23dfd1.31879087'
if (typeof prefix == 'undefined') {
if (typeof prefix === 'undefined') {
prefix = "";
}

Expand Down Expand Up @@ -379,7 +379,7 @@ function empty (mixed_var) {
return true;
}

if (typeof mixed_var == 'object') {
if (typeof mixed_var === 'object') {
for (key in mixed_var) {
return false;
}
Expand Down Expand Up @@ -507,7 +507,7 @@ function base64_encode(data) {

// mozilla has this native
// - but breaks in 2.0.0.12!
//if (typeof this.window['atob'] == 'function') {
//if (typeof this.window['atob'] === 'function') {
// return atob(data);
//}

Expand Down Expand Up @@ -569,7 +569,7 @@ function base64_decode(data) {
// * returns 1: 'Kevin van Zonneveld'
// mozilla has this native
// - but breaks in 2.0.0.12!
//if (typeof this.window['btoa'] == 'function') {
//if (typeof this.window['btoa'] === 'function') {
// return btoa(data);
//}

Expand Down Expand Up @@ -1500,7 +1500,7 @@ function implode (glue, pieces) {
function insertTextToFormElementAtCursor(txtarea, text) {
var scrollPos = txtarea.scrollTop;
var strPos = 0;
var br = ((txtarea.selectionStart || txtarea.selectionStart == '0') ?
var br = ((txtarea.selectionStart || txtarea.selectionStart === '0') ?
"ff" : (document.selection ? "ie" : false ) );
if (br == "ie") {
txtarea.focus();
Expand Down Expand Up @@ -1592,7 +1592,7 @@ sprintf = function ()
var pPrecision = a[5], pType = a[6], rightPart = a[7];

numMatches++;
if (pType == '%')
if (pType === '%')
{
subst = '%';
}
Expand All @@ -1612,17 +1612,17 @@ sprintf = function ()
var minLength = -1;
if (pMinLength) minLength = parseInt(pMinLength);
var precision = -1;
if (pPrecision && pType == 'f') precision = parseInt(pPrecision.substring(1));
if (pPrecision && pType === 'f') precision = parseInt(pPrecision.substring(1));
var subst = param;
if (pType == 'b') subst = parseInt(param).toString(2);
else if (pType == 'c') subst = String.fromCharCode(parseInt(param));
else if (pType == 'd') subst = parseInt(param) ? parseInt(param) : 0;
else if (pType == 'u') subst = Math.abs(param);
else if (pType == 'f') subst = (precision > -1) ? Math.round(parseFloat(param) * Math.pow(10, precision)) / Math.pow(10, precision): parseFloat(param);
else if (pType == 'o') subst = parseInt(param).toString(8);
else if (pType == 's') subst = param;
else if (pType == 'x') subst = ('' + parseInt(param).toString(16)).toLowerCase();
else if (pType == 'X') subst = ('' + parseInt(param).toString(16)).toUpperCase();
if (pType === 'b') subst = parseInt(param).toString(2);
else if (pType === 'c') subst = String.fromCharCode(parseInt(param));
else if (pType === 'd') subst = parseInt(param) ? parseInt(param) : 0;
else if (pType === 'u') subst = Math.abs(param);
else if (pType === 'f') subst = (precision > -1) ? Math.round(parseFloat(param) * Math.pow(10, precision)) / Math.pow(10, precision): parseFloat(param);
else if (pType === 'o') subst = parseInt(param).toString(8);
else if (pType === 's') subst = param;
else if (pType === 'x') subst = ('' + parseInt(param).toString(16)).toLowerCase();
else if (pType === 'X') subst = ('' + parseInt(param).toString(16)).toUpperCase();
}
arguments[numSubstitutions] = subst;
str = leftpart + '${'+numSubstitutions+'}' + rightPart;
Expand Down Expand Up @@ -1706,7 +1706,7 @@ function array_merge_recursive (arr1, arr2){
} else if ((arr1 && (arr1 instanceof Object)) && (arr2 && (arr2 instanceof Object))) {
for (idx in arr2) {
if (idx in arr1) {
if (typeof arr1[idx] == 'object' && typeof arr2 == 'object') {
if (typeof arr1[idx] === 'object' && typeof arr2 === 'object') {
arr1[idx] = this.array_merge(arr1[idx], arr2[idx]);
} else {
arr1[idx] = arr2[idx];
Expand Down
14 changes: 7 additions & 7 deletions public/js/opendxp/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -1683,13 +1683,13 @@ opendxp.helpers.sendTestEmail = function (from, to, subject, emailType, document
fieldLabel: t('type'),
listeners: {
select: function(t) {
if(t.value == 'text' || t.value == 'html') {
if(t.value === 'text' || t.value === 'html') {
emailContentTextField.show();
} else {
emailContentTextField.hide();
}

if(t.value == 'document') {
if(t.value === 'document') {
documentComponent.show();
paramGrid.show();
} else {
Expand Down Expand Up @@ -1843,11 +1843,11 @@ opendxp.helpers.sendTestEmail = function (from, to, subject, emailType, document

if(emailType) {
emailTypeDropdown.setValue(emailType);
if(emailType == 'document') {
if(emailType === 'document') {
documentComponent.show();
paramGrid.show();
}
if(emailType == 'html' || emailType == 'text') {
if(emailType === 'html' || emailType === 'text') {
emailContentTextField.show();
}
}
Expand Down Expand Up @@ -3213,15 +3213,15 @@ opendxp.helpers.treeToolTipShow = function (el, record, item) {
var offsetTreeNode = Ext.get(item).getXY();
var parentTree = el.ownerCt.ownerCt;

if(parentTree.region == 'west') {
if(parentTree.region === 'west') {
opendxp_tooltip.applyStyles({
top: (offsetTreeNode[1] + 8) + "px",
left: offsetTabPanel[0] + "px",
right: 'auto'
});
}

if(parentTree.region == 'east') {
if(parentTree.region === 'east') {
opendxp_tooltip.addCls('right');
opendxp_tooltip.applyStyles({
top: (offsetTreeNode[1] + 8) + "px",
Expand Down Expand Up @@ -3324,7 +3324,7 @@ opendxp.helpers.deleteConfirm = function (title, name, deleteCallback) {
Ext.Msg.confirm(t('delete'), sprintf(t('delete_message_advanced'),
title, name),
function (btn) {
if (btn == 'yes') {
if (btn === 'yes') {
if (typeof deleteCallback == "function") {
deleteCallback();
}
Expand Down
2 changes: 1 addition & 1 deletion public/js/opendxp/object/versions.js
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ opendxp.object.versions = Class.create({

if (elememntId > 0) {
Ext.Msg.confirm(t('clear_all'), t('clear_version_message'), function (btn) {
if (btn == 'yes') {
if (btn === 'yes') {
var modificationDate = this.object.data.general.modificationDate;

Ext.Ajax.request({
Expand Down
2 changes: 1 addition & 1 deletion public/js/opendxp/overrides.js
Original file line number Diff line number Diff line change
Expand Up @@ -1190,7 +1190,7 @@ Ext.define('Ext.local.grid.filters.filter.TriFilter', {
}
if ('in' in value) {
v = value.in;
if (typeof v === "object" && v[0][0] == '') {
if (typeof v === "object" && v[0][0] === '') {
remove.push(filters.in);
} else if (v || v === 0) {
add.push(filters.in);
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/Asset/AssetController.php
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public function getDataByIdAction(Request $request, EventDispatcherInterface $ev
if (\OpenDxp\Video::isAvailable()) {
$config = Asset\Video\Thumbnail\Config::getPreviewConfig();
$thumbnail = $asset->getThumbnail($config, ['mp4']);
if ($thumbnail && $thumbnail['status'] == 'finished') {
if ($thumbnail && $thumbnail['status'] === 'finished') {
$videoInfo['previewUrl'] = $thumbnail['formats']['mp4'];
$videoInfo['width'] = $asset->getWidth();
$videoInfo['height'] = $asset->getHeight();
Expand Down
8 changes: 4 additions & 4 deletions src/Controller/Admin/ElementController.php
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ protected function getNicePathFormatterFieldDefinition(DataObject\Concrete $sour
$fieldname = $context['fieldname'];
$fd = null;

if ($ownerType == 'object') {
if ($ownerType === 'object') {
$subContainerType = $context['subContainerType'] ?? null;
if ($subContainerType) {
$subContainerKey = $context['subContainerKey'];
Expand All @@ -819,15 +819,15 @@ protected function getNicePathFormatterFieldDefinition(DataObject\Concrete $sour
} else {
$fd = $source->getClass()->getFieldDefinition($fieldname);
}
} elseif ($ownerType == 'localizedfield') {
} elseif ($ownerType === 'localizedfield') {
$localizedfields = $source->getClass()->getFieldDefinition('localizedfields');
if ($localizedfields instanceof DataObject\ClassDefinition\Data\Localizedfields) {
$fd = $localizedfields->getFieldDefinition($fieldname);
}
} elseif ($ownerType == 'objectbrick') {
} elseif ($ownerType === 'objectbrick') {
$fdBrick = DataObject\Objectbrick\Definition::getByKey($context['containerKey']);
$fd = $fdBrick->getFieldDefinition($fieldname);
} elseif ($ownerType == 'fieldcollection') {
} elseif ($ownerType === 'fieldcollection') {
$containerKey = $context['containerKey'];
$fdCollection = DataObject\Fieldcollection\Definition::getByKey($containerKey);
if (($context['subContainerType'] ?? null) === 'localizedfield') {
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/MiscController.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public function scriptProxyAction(Request $request): Response

if (!empty($scriptsContent)) {
$contentType = 'text/javascript';
if ($fileExtension == 'css') {
if ($fileExtension === 'css') {
$contentType = 'text/css';
}

Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Admin/NotificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function recipientsAction(UserService $service, TranslatorInterface $tran

foreach ($service->findAll($this->getAdminUser()) as $recipient) {
$group = $translator->trans('group', [], 'admin');
$prefix = $recipient->getType() == 'role' ? $group . ' - ' : '';
$prefix = $recipient->getType() === 'role' ? $group . ' - ' : '';

$data[] = [
'id' => $recipient->getId(),
Expand Down
Loading