Skip to content

Commit

Permalink
database-changes (joomla#19)
Browse files Browse the repository at this point in the history
  • Loading branch information
obuisard authored Jan 26, 2023
1 parent 9c54246 commit e422470
Show file tree
Hide file tree
Showing 7 changed files with 560 additions and 524 deletions.
262 changes: 135 additions & 127 deletions administrator/components/com_admin/sql/updates/mysql/4.3.0-2022-07-30.sql

Large diffs are not rendered by default.

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions administrator/components/com_guidedtours/forms/step.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
label="JGLOBAL_FIELD_ID_LABEL"
default="0"
/>

<field
name="step-no"
name="step_no"
type="hidden"
default="1"
/>
Expand All @@ -34,7 +34,7 @@
label="COM_GUIDEDTOURS_TARGET_LABEL"
description="COM_GUIDEDTOURS_TARGET_DESC"
/>

<field
name="tour_id"
type="hidden"
Expand Down Expand Up @@ -83,7 +83,7 @@
type="list"
label="COM_GUIDEDTOURS_TYPE_LABEL"
default="0"
description="COM_GUIDEDTOURS_TYPE_DESC"
description="COM_GUIDEDTOURS_TYPE_DESC"
validate="options"
>
<option value="0">COM_GUIDEDTOURS_FIELD_VALUE_NEXT_STEP</option>
Expand All @@ -101,7 +101,7 @@
/>

<field
name="interactivetour"
name="interactive_type"
type="list"
label="COM_GUIDEDTOURS_TYPE_INTERACTIVE_TOUR_LABEL"
description="COM_GUIDEDTOURS_INTERACTIVE_TOUR_DESC"
Expand Down Expand Up @@ -148,7 +148,7 @@
label="JGLOBAL_FIELD_MODIFIED_BY_LABEL"
validate="UserId"
/>

<field
name="modified_time"
type="calendar"
Expand Down Expand Up @@ -181,7 +181,7 @@
name="asset_id"
type="hidden"
filter="unset"
/>
/>
</fieldset>

</form>
4 changes: 2 additions & 2 deletions administrator/components/com_guidedtours/tmpl/step/edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,12 @@
<div class="col-md-9">

<?php echo $this->form->renderField('description'); ?>
<?php echo $this->form->renderField('step-no'); ?>
<?php echo $this->form->renderField('step_no'); ?>
<?php echo $this->form->renderField('position'); ?>
<?php echo $this->form->renderField('target'); ?>
<?php echo $this->form->renderField('type'); ?>
<?php echo $this->form->renderField('url'); ?>
<?php echo $this->form->renderField('interactivetour'); ?>
<?php echo $this->form->renderField('interactive_type'); ?>
<?php $this->form->setValue('tour_id', null, $tour_id); ?>
<?php echo $this->form->renderField('tour_id'); ?>

Expand Down
22 changes: 11 additions & 11 deletions build/media_source/plg_system_tour/js/guide.es5.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function addStepToTourButton(tour, obj, tourId, index, buttons, uri) {
on: obj[tourId].steps[index].position,
url: obj[tourId].steps[index].url,
type: obj[tourId].steps[index].type,
interactivetour: obj[tourId].steps[index].interactivetour,
interactive_type: obj[tourId].steps[index].interactive_type,
},

buttons: buttons,
Expand Down Expand Up @@ -157,14 +157,14 @@ Joomla = window.Joomla || {};
if (ele) {
if (
obj[tourId] &&
obj[tourId].steps[index].interactivetour === 2
obj[tourId].steps[index].interactive_type === 2
) {
ele.step_id = index;
ele.addEventListener("input", enableButton, enableButton);
}
if (
obj[tourId] &&
obj[tourId].steps[index].interactivetour === 1
obj[tourId].steps[index].interactive_type === 1
)
ele.addEventListener("click", tour.next, tour.next);
}
Expand All @@ -173,13 +173,13 @@ Joomla = window.Joomla || {};
pushBackButton(buttons, tour, prev_step);
if (index != len - 1) {
let disabled = false;
if (obj[tourId] && obj[tourId].steps[index].interactivetour == 2)
if (obj[tourId] && obj[tourId].steps[index].interactive_type == 2)
disabled = true;
if (
(obj[tourId] && obj[tourId].steps[index].type !== 2) ||
(obj[tourId] &&
obj[tourId].steps[index].interactivetour == 2) ||
(obj[tourId] && obj[tourId].steps[index].interactivetour == 3)
obj[tourId].steps[index].interactive_type == 2) ||
(obj[tourId] && obj[tourId].steps[index].interactive_type == 3)
)
pushNextButton(buttons, tour, index, disabled);
} else {
Expand Down Expand Up @@ -223,23 +223,23 @@ Joomla = window.Joomla || {};
) {
const ele = document.querySelector(obj[tourId].steps[index].target);
if (ele) {
if (obj[tourId] && obj[tourId].steps[index].interactivetour === 2) {
if (obj[tourId] && obj[tourId].steps[index].interactive_type === 2) {
ele.step_id = index;
ele.addEventListener("input", enableButton, enableButton);
}
if (obj[tourId] && obj[tourId].steps[index].interactivetour === 1)
if (obj[tourId] && obj[tourId].steps[index].interactive_type === 1)
ele.addEventListener("click", tour.next, tour.next);
}
}

if (index != len - 1) {
let disabled = false;
if (obj[tourId] && obj[tourId].steps[index].interactivetour == 2)
if (obj[tourId] && obj[tourId].steps[index].interactive_type == 2)
disabled = true;
if (
(obj[tourId] && obj[tourId].steps[index].type !== 2) ||
(obj[tourId] && obj[tourId].steps[index].interactivetour == 2) ||
(obj[tourId] && obj[tourId].steps[index].interactivetour == 3)
(obj[tourId] && obj[tourId].steps[index].interactive_type == 2) ||
(obj[tourId] && obj[tourId].steps[index].interactive_type == 3)
)
pushNextButton(buttons, tour, index, disabled);
} else {
Expand Down
Loading

0 comments on commit e422470

Please sign in to comment.