diff --git a/e107_admin/newspost.php b/e107_admin/newspost.php index f00c3a5de..981ec401d 100644 --- a/e107_admin/newspost.php +++ b/e107_admin/newspost.php @@ -69,30 +69,30 @@ function headerjs() 'Helper': true, 'AdminMenu': false } - + //custom expand Element.addMethods( { newsDescToggle: function(element) { element = \$(element); if(!element.visible()) element.fxToggle(); - + return element; }, - + newsScrollToMe: function(element) { element = \$(element); new Effect.ScrollTo(element); return element; }, - + newsUpdateButtonSpan: function(element, str, swapClass) { element = \$(element); if(swapClass) { var swapO = swapClass.split('::'); element.removeClassName(swapO[0]).addClassName(swapO[1]); } - + if(element.down('span')) { element.down('span').update(str); } @@ -124,7 +124,7 @@ function headerjs() var id = element.name.gsub(/[^\d]/, ''), cl = element.value, url = '#{e_ADMIN}newspost.php?' + action + '.' + id + '.' + cl; - + element.startLoading(); new e107Ajax.Request(url.parsePath(), { onComplete: function(transport) { @@ -134,38 +134,38 @@ function headerjs() } }); } - + //e107 onload custom event e107.runOnLoad( function(event) { var celement = event.memo['element'] ? \$(event.memo.element) : \$\$('body')[0]; - + //Unobtrusive AJAX category list reload if(\$('trigger-list-refresh')) { \$('trigger-list-refresh').observe('click', function(event) { event.stop(); \$('core-newspost-cat-list-form').submitForm( - 'core-newspost-cat-list-cont', - { overlayPage: \$\$('body')[0] }, + 'core-newspost-cat-list-cont', + { overlayPage: \$\$('body')[0] }, \$('core-newspost-cat-list-form').action + '_list_refresh' ); }); } - + //Unobtrusive AJAX save category manage permissions celement.select('select[name^=multi_category_manager]').invoke('observe', 'change', function(event) { e_npadmin_ajaxsave('catmanager', event.element()); }); - + //Category order fields - user convenience celement.select('input[name^=multi_category_order]').invoke('observe', 'focus', function(event) { event.element().select(); }); - + //Unobtrusive AJAX save category order celement.select('input[name^=multi_category_order]').invoke('observe', 'blur', function(event) { e_npadmin_ajaxsave('catorder', event.element()); }); - + //Fill form - click observer (Unobtrusive AJAX edit category) \$\$('a.action[id^=core-news-catedit-]').each(function(element) { element.observe('click', function(event) { @@ -174,7 +174,7 @@ function headerjs() $('core-newspost-cat-create-form').fillForm(\$\$('body')[0], { handler: el.readAttribute('href') }); }); }); - + }, null, true); "; @@ -184,7 +184,7 @@ function headerjs() $ret .= "