Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.11.3 #1145

Merged
merged 13 commits into from
Nov 27, 2024
2 changes: 1 addition & 1 deletion assets/js/admin/modula-gallery-upload.min.js

Large diffs are not rendered by default.

38 changes: 8 additions & 30 deletions assets/js/admin/wp-modula-gutenberg.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ var ModulaGalleryImage = function ModulaGalleryImage(props) {
};
return /*#__PURE__*/React.createElement("div", {
className: itemClassNames,
"data-width": settings.type !== 'slider' ? img['data-width'] ? img['data-width'] : '2' : undefined,
"data-height": settings.type !== 'slider' ? img['data-height'] ? img['data-height'] : '2' : undefined
"data-width": img['data-width'] ? img['data-width'] : '2',
"data-height": img['data-height'] ? img['data-height'] : '2'
}, /*#__PURE__*/React.createElement("div", {
className: "modula-item-overlay"
}), /*#__PURE__*/React.createElement("div", {
Expand Down Expand Up @@ -670,40 +670,18 @@ var ModulaEdit = function ModulaEdit(props) {
label: '' === res.title.rendered ? "Unnamed" : escapeHtml(res.title.rendered)
}]
});
jQuery.ajax({
type: 'POST',
data: {
action: 'modula_get_gallery_meta',
id: id,
nonce: modulaVars.nonce
},
url: modulaVars.ajaxURL,
success: function success(result) {
return onGalleryLoaded(id, result);
}
setAttributes({
id: id,
images: res.modulaImages
});
if (idCheck != id || undefined == settings) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

!== , ===

getSettings(id);
}
});
};
function escapeHtml(text) {
return text.replace('’', "'").replace('“', '"').replace('‘', "'");
}
var onGalleryLoaded = function onGalleryLoaded(id, result) {
if (result.success === false) {
setAttributes({
id: id,
status: 'ready'
});
return;
}
if (idCheck != id || undefined == settings) {
getSettings(id);
}
setAttributes({
id: id,
images: result,
status: 'ready'
});
};
var getSettings = function getSettings(id) {
fetch("".concat(modulaVars.restURL, "wp/v2/modula-gallery/").concat(id)).then(function (res) {
return res.json();
Expand Down
2 changes: 1 addition & 1 deletion assets/js/admin/wp-modula-gutenberg.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/admin/wp-modula-upload.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading