Skip to content

Commit

Permalink
Merge branch '4.0-dev' into 4.0_untranslated_stage_string
Browse files Browse the repository at this point in the history
  • Loading branch information
infograf768 authored Nov 30, 2019
2 parents af816de + b7048c7 commit b264d75
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ protected function getInput()
// The active item id field.
$value = (int) $this->value > 0 ? (int) $this->value : '';

Factory::getDocument()->addScriptOptions('modal-associations', ['itemId' => $value]);
HTMLHelper::_('script', 'com_associations/modal-associations.min.js', ['version' => 'auto', 'relative' => true]);
Factory::getDocument()->addScriptOptions('admin_associations_modal', ['itemId' => $value]);
HTMLHelper::_('script', 'com_associations/admin_associations_modal.min.js', ['version' => 'auto', 'relative' => true]);

// Setup variables for display.
$html = array();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@
<div class="outer-panel" id="right-panel">
<div class="inner-panel">
<div class="language-selector">
<h3 class="target-text"><?php echo Text::_('COM_ASSOCIATIONS_ASSOCIATED_ITEM'); ?></h3>
<?php echo $this->form->getInput('modalassociation'); ?>
<?php echo $this->form->getInput('itemlanguage'); ?>
<div class="clearfix">
<h3 class="target-text"><?php echo Text::_('COM_ASSOCIATIONS_ASSOCIATED_ITEM'); ?></h3>
</div>
<div class="langtarget"><?php echo $this->form->getInput('itemlanguage'); ?></div>
<div class="modaltarget"><?php echo $this->form->getInput('modalassociation'); ?></div>
</div>
<iframe id="target-association" name="target-association" title="target-association"
src="<?php echo $this->defaultTargetSrc; ?>"
Expand All @@ -72,7 +74,6 @@
</iframe>
</div>
</div>

</div>

<input type="hidden" name="task" value="">
Expand Down
60 changes: 58 additions & 2 deletions build/media_source/com_associations/css/sidebyside.css
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,26 @@
border: 0 !important;
}

.sidebyside .langtarget {
float: left;
}

.sidebyside .modaltarget {
float: left;
margin-left: .5rem;
}

.sidebyside #target-association {
margin-top: .5rem;
}

.sidebyside #reference-association {
margin-top: 3.35rem;
}

.target-text {
float: left;
width: 30%;
width: auto;
}

/* RTL overrides */
Expand All @@ -54,17 +71,56 @@ html[dir=rtl] .sidebyside .full-width .inner-panel {
padding: 0 !important;
}

html[dir=rtl] .sidebyside .langtarget {
float: right;
}

html[dir=rtl] .sidebyside .modaltarget {
float: right;
margin-left: 0;
margin-right: .5rem;
}

html[dir=rtl] .target-text {
float: right;
}

/* Responsive layout */
@media (max-width: 767px) {
@media (max-width: 1140px) {
.sidebyside #reference-association {
margin-top: 6.2rem;
}

.sidebyside .langtarget {
float: none;
}

.sidebyside .modaltarget {
float: left;
margin-left: 0;
}

html[dir=rtl] .sidebyside .langtarget {
float: none;
}

html[dir=rtl] .sidebyside .modaltarget {
float: right;
margin-left: 0;
margin-right: 0;
}
}

@media (max-width: 767.98px) {
.sidebyside .outer-panel {
float: none;
width: 100%;
}

.sidebyside #reference-association {
margin-top: 0;
}

.sidebyside #left-panel .inner-panel {
padding: 0;
}
Expand Down
2 changes: 1 addition & 1 deletion layouts/joomla/form/field/radio/switcher.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@
$active = ((string) $option->value == $value) ? 'class="active"' : '';
$oid = $id . $i;
$ovalue = htmlspecialchars($option->value, ENT_COMPAT, 'UTF-8');
$attributes = array_filter(array($checked, $active, null));
$attributes = array_filter([$checked, $active]);
$text = $options[$i]->text;
?>
<?php echo sprintf($input, $oid, $name, $ovalue, implode(' ', $attributes)); ?>
Expand Down
8 changes: 7 additions & 1 deletion plugins/sampledata/multilang/multilang.php
Original file line number Diff line number Diff line change
Expand Up @@ -1249,7 +1249,13 @@ protected function getInstalledlangs($cms_client = 'administrator')

foreach ($langlist as $lang)
{
$file = $path . '/' . $lang . '/' . $lang . '.xml';
$file = $path . '/' . $lang . '/' . $lang . '.xml';

if (!is_file($file))
{
$file = $path . '/' . $lang . '/langmetadata.xml';
}

$info = Installer::parseXMLInstallFile($file);
$row = new stdClass;
$row->language = $lang;
Expand Down

0 comments on commit b264d75

Please sign in to comment.