Skip to content

Commit 4c71310

Browse files
committed
- fixed bug with changing field/table properties via image
1 parent 22e48ac commit 4c71310

2 files changed

Lines changed: 21 additions & 0 deletions

File tree

assets/js/functions.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,26 @@ $(document).ready(function () {
7676
});
7777
});
7878

79+
function modulebuilder_setStatus(data, img, file) {
80+
// Post request
81+
$.post(file, data, function (reponse, textStatus) {
82+
if (textStatus == 'success') {
83+
$('img#' + img).hide();
84+
$('#loading_' + img).show();
85+
setTimeout(function () {
86+
$('#loading_' + img).hide();
87+
$('img#' + img).fadeIn('fast');
88+
}, 500);
89+
// Change image src
90+
if ($('img#' + img).attr("src") == IMG_ON) {
91+
$('img#' + img).attr("src", IMG_OFF);
92+
} else {
93+
$('img#' + img).attr("src", IMG_ON);
94+
}
95+
}
96+
});
97+
}
98+
7999
function presetField(typeId) {
80100

81101
eleSelected = xoopsGetElementById('field_element[' + typeId + ']');

docs/changelog.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
- transfered class::getInstance() to class _construct (mamba/goffy)
2828
- code documentation cleaning (goffy)
2929
- fixed bug with ENUM (mamba/goffy)
30+
- fixed bug with changing field/table properties via image (mamba/goffy)
3031

3132
<h5>3.03 Alpha 3 [WORK IN PROGRESS - NOT RELEASED]</h5> Dev: XOOPS 2.5.11, PHP 7.4.5
3233
<hr>

0 commit comments

Comments
 (0)