1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

Quickfix for Media Manager filtering.

This commit is contained in:
lonalore
2017-07-21 09:13:54 +02:00
parent 843bbf5fc3
commit 5b87c9f9e2

View File

@@ -6731,13 +6731,12 @@ class e_admin_form_ui extends e_form
",'prototype'); ",'prototype');
// TODO implement ajax queue // TODO implement ajax queue
// FIXME - dirty way to register events after ajax update - DO IT RIGHT - see all.jquery, create object // FIXME
// and use handler, re-register them global after ajax update (context) // dirty way to register events after ajax update - DO IT RIGHT - see all.jquery, create object and use handler,
// re-register them global after ajax update (context)... use behaviors and call e107.attachBehaviors();
e107::js('footer-inline'," e107::js('footer-inline',"
var filterRunning = false, request; var filterRunning = false, request;
var applyAfterAjax = function(context) { var applyAfterAjax = function(context) {
\$('.e-hideme', context).hide();
\$('.e-expandit', context).show();
\$('.e-expandit', context).click(function () { \$('.e-expandit', context).click(function () {
var href = (\$(this).is('a')) ? \$(this).attr('href') : ''; var href = (\$(this).is('a')) ? \$(this).attr('href') : '';
if(href == '' && \$(this).attr('data-target')) if(href == '' && \$(this).attr('data-target'))
@@ -6786,7 +6785,10 @@ class e_admin_form_ui extends e_form
return; return;
} }
cont.html(data).css({ opacity: 1 }); cont.html(data).css({ opacity: 1 });
// TODO remove applyAfterAjax() and use behaviors!
applyAfterAjax(cont); applyAfterAjax(cont);
// Attach behaviors to the newly loaded contents.
e107.attachBehaviors();
}, 700); }, 700);
}, 'html') }, 'html')
.error(function() { .error(function() {