Skip to content

Commit

Permalink
Fix image chooser pagination bug (#1670)
Browse files Browse the repository at this point in the history
  • Loading branch information
istride authored Mar 5, 2024
1 parent 6fd7d28 commit 6c5b3f1
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 744 deletions.
36 changes: 23 additions & 13 deletions iogt/static/js/admin.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,36 @@
function customizeUI() {
$('#id_handle').parent().siblings('p[class=help]').text(
'The handle must be written in the format "[language_code]_menu_live", e.g. "en_menu_live", for the menu to ' +
'be live on the website. You can use other handles, e.g. "en_oldmenu", to store other draft menus without ' +
'them getting displayed.'
).css({'color': 'red'});
$('#id_handle')
.parent()
.siblings('p[class=help]')
.text(
'The handle must be written in the format "[language_code]_menu_live", e.g. "en_menu_live", for the menu to ' +
'be live on the website. You can use other handles, e.g. "en_oldmenu", to store other draft menus without ' +
'them getting displayed.'
)
.css({'color': 'red'});

$('#tab-content:contains("Download PO file and input translations offline")')
.find('>:first-child')
.prepend('<p style="margin-left: 50px; color: red; font-weight: bold;">' +
.prepend(
'<p style="margin-left: 50px; color: red; font-weight: bold;">' +
'Use the "STOP TRANSLATION" option if you want to translate additional fields ' +
'such as: survey/poll/quiz answers, index page description, recommended content, ' +
'search engine friendly title, search description, lead image, icon.' +
'</p>')
'</p>'
);

$('.transfer.list-container:last + div')
.prepend('<h4 style="color: #FF0000; font-weight: bold; margin: 5px;">We strongly recommend choosing a ' +
.prepend(
'<h4 style="color: #FF0000; font-weight: bold; margin: 5px;">We strongly recommend choosing a ' +
'destination within the sandbox, to allow checking the transferred content for errors before going ' +
'live. You can then move the content to the desired final destination.</h4>')
'live. You can then move the content to the desired final destination.</h4>'
);

$('#id_page_permissions-ADD').parent().prepend('<h4 style="color: #FF0000; font-weight: bold; margin: 5px;">' +
$('#id_page_permissions-ADD').parent().prepend(
'<h4 style="color: #FF0000; font-weight: bold; margin: 5px;">' +
'Giving a Group the EDIT permission will also allow them to download data for Polls, Surveys, and Quizzes ' +
'for the Pages they can access.</h4>')
'for the Pages they can access.</h4>'
);

$('#id_seo_title').parent().siblings('p[class=help]').text(
'The name of the page displayed on search engine results as the clickable headline, and automatically loaded ' +
Expand Down Expand Up @@ -54,10 +64,10 @@ function validateFreeBasicsFileUpload(fileInput, file_size_threshold) {
else {
var file = fileInput.files[0];
if (file.size >= file_size_threshold)
alert(`File size exceeds facebook free basics limit (${file_size_threshold / 1024}KB).`);
alert(`File size exceeds Meta Free Basics limit (${file_size_threshold / 1024}KB).`);
}

return true;
}

$(document).ready(customizeUI);
$(document).ready(customizeUI);
147 changes: 0 additions & 147 deletions iogt/static/wagtaildocs/js/add-multiple.js

This file was deleted.

114 changes: 0 additions & 114 deletions iogt/static/wagtaildocs/js/document-chooser-modal.js

This file was deleted.

Loading

0 comments on commit 6c5b3f1

Please sign in to comment.