mirror of
https://github.com/joomla-extensions/weblinks.git
synced 2025-01-27 14:28:30 +00:00
CS Fix
This commit is contained in:
parent
966e62786a
commit
a80e3d4dab
@ -211,6 +211,10 @@ class WeblinkField extends FormField
|
||||
);
|
||||
}
|
||||
|
||||
$closeButtonClick = "window.processModalEdit(this, '$this->id', 'add', 'weblink', 'cancel', 'weblink-form'); return false;";
|
||||
$saveButtonClick = "window.processModalEdit(this, '$this->id', 'add', 'weblink', 'save', 'weblink-form'); return false;";
|
||||
$applyButtonClick = "window.processModalEdit(this, '$this->id', 'add', 'weblink', 'apply', 'weblink-form'); return false;";
|
||||
|
||||
// New weblink modal
|
||||
if ($allowNew)
|
||||
{
|
||||
@ -228,13 +232,13 @@ class WeblinkField extends FormField
|
||||
'bodyHeight' => '70',
|
||||
'modalWidth' => '80',
|
||||
'footer' => '<a role="button" class="btn" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'weblink\', \'cancel\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $closeButtonClick . '">'
|
||||
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
|
||||
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'weblink\', \'save\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $saveButtonClick . '">'
|
||||
. Text::_('JSAVE') . '</a>'
|
||||
. '<a role="button" class="btn btn-success" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'add\', \'weblink\', \'apply\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $applyButtonClick . '">'
|
||||
. Text::_('JAPPLY') . '</a>',
|
||||
)
|
||||
);
|
||||
@ -257,13 +261,13 @@ class WeblinkField extends FormField
|
||||
'bodyHeight' => '70',
|
||||
'modalWidth' => '80',
|
||||
'footer' => '<a role="button" class="btn" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'weblink\', \'cancel\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $closeButtonClick . '">'
|
||||
. Text::_('JLIB_HTML_BEHAVIOR_CLOSE') . '</a>'
|
||||
. '<a role="button" class="btn btn-primary" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'weblink\', \'save\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $saveButtonClick . '">'
|
||||
. Text::_('JSAVE') . '</a>'
|
||||
. '<a role="button" class="btn btn-success" aria-hidden="true"'
|
||||
. ' onclick="window.processModalEdit(this, \'' . $this->id . '\', \'edit\', \'weblink\', \'apply\', \'weblink-form\'); return false;">'
|
||||
. ' onclick="' . $applyButtonClick . '">'
|
||||
. Text::_('JAPPLY') . '</a>',
|
||||
)
|
||||
);
|
||||
|
@ -81,6 +81,7 @@ class AdministratorService
|
||||
|
||||
if ($items)
|
||||
{
|
||||
$app = Factory::getApplication();
|
||||
$languages = LanguageHelper::getContentLanguages(array(0, 1));
|
||||
$content_languages = array_column($languages, 'lang_code');
|
||||
|
||||
@ -91,7 +92,8 @@ class AdministratorService
|
||||
$text = $item->lang_code;
|
||||
$url = Route::_('index.php?option=com_weblinks&task=weblink.edit&id=' . (int) $item->id);
|
||||
$tooltip = '<strong>' . htmlspecialchars($item->language_title, ENT_QUOTES, 'UTF-8') . '</strong><br>'
|
||||
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8') . '<br>' . Text::sprintf('JCATEGORY_SPRINTF', $item->category_title);
|
||||
. htmlspecialchars($item->title, ENT_QUOTES, 'UTF-8')
|
||||
. '<br>' . Text::sprintf('JCATEGORY_SPRINTF', $item->category_title);
|
||||
$classes = 'badge bg-secondary';
|
||||
|
||||
$item->link = '<a href="' . $url . '" class="' . $classes . '">' . $text . '</a>'
|
||||
@ -100,7 +102,7 @@ class AdministratorService
|
||||
else
|
||||
{
|
||||
// Display warning if Content Language is trashed or deleted
|
||||
Factory::getApplication()->enqueueMessage(Text::sprintf('JGLOBAL_ASSOCIATIONS_CONTENTLANGUAGE_WARNING', $item->lang_code), 'warning');
|
||||
$app->enqueueMessage(Text::sprintf('JGLOBAL_ASSOCIATIONS_CONTENTLANGUAGE_WARNING', $item->lang_code), 'warning');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -193,7 +193,6 @@ class WeblinkModel extends ItemModel
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return $this->_item[$pk];
|
||||
}
|
||||
|
||||
|
@ -156,7 +156,7 @@ $listDirn = $this->escape($this->state->get('list.direction'));
|
||||
<div class="mt-2 mb-2">
|
||||
<?php $images = json_decode($item->images); ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgFloat = '' ;?>
|
||||
<?php $imgFloat = '';?>
|
||||
<?php if (!empty($images->float_first)) : ?>
|
||||
<?php $imgFloat = $images->float_first == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
|
@ -64,7 +64,7 @@ if (!$canEdit)
|
||||
<div class="p-3">
|
||||
<?php $images = json_decode($this->item->images); ?>
|
||||
<?php if (!empty($images->image_first)) : ?>
|
||||
<?php $imgFloat = '' ;?>
|
||||
<?php $imgFloat = '';?>
|
||||
<?php if (!empty($images->float_first)) : ?>
|
||||
<?php $imgFloat = $images->float_first == 'right' ? 'float-end' : 'float-start'; ?>
|
||||
<?php endif; ?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user