Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Moving core.js loading into separate method #981

Closed
wants to merge 4 commits into from

4 participants

@danyaPostfactum

It is bad idea to merge core.js and motools loading.
I sure it is nesessary to separate this actions into different methods.

Im working at my plugin, wich re-registers such methods as behavior.keepalive, behavior.formvalidation etc,
This plugin allows to avoid mootools requirement, all my scripts uses jQuery.
Its ok, but I can't replace core.js. Moreover, merging mootools requirement with core.js creates big problems for me.

I don't like jQuery, MooTools is more beauty for me, BUT I'm using extensions, wich works on jQuery, and I'm forcet to use this js library and refuse from MooTools die to site weight optimisation.

This plugin works great in joomla 1.7, but in joomla 2.5 I cannot get rid of mootools due to core.js and framework merging.

Please separete this methods, I thing it is a good idea.

@realityking
Collaborator

Could you explAin your reasoning? We just removed the JHtml::core() method.

Also this is not backwards compatible, there's a ton of code relying on core.js being loaded when MooTools is.

@realityking
Collaborator

I just saw you send me an earlier, I'll respond in the morning ;)

@danyaPostfactum

Ok, so I offer to call JHtml::_('behavior.core') from framework() method.
This way doesnt break the compatibility and allows to override core.js in plugins

But, JHtml::core usage must be replaced with JHtml::('behavior.core'), not with JHtml::('behavior.framework') ( to prevent mootools loading when we only need to core.js.

So, core.js will be loaded in any way, wether we call JHtml::('behavior.core'), JHtml::('behavior.framework') or JHtml::script()

But if extension needs only core.js, it calls JHtml::('behavior.core'), if needs mootools , it calls JHtml::('behavior.framework')

Is it possible to make these changes ?

@realityking
Collaborator

First of all I'd be very interested in your jQuery plug-in. Do you host it somewhere?

Now back to topic.

The code in core.js has depended on MooTools at least since Joomla 1.6, also at least since 1.6 JHtmlBehavior::framework() has loaded core.js, this used to be done by calling JHtml::core(). I just simplified the code since calling either one used to load both files.

I don't quite get what your concern is? That some extension the uses parts of core.js will call JHtml::_('behavior.framework')? How is it going to help you if we accept this pull request, JHtmlBeavhior::core() would still include MooTools.

I'm not saying I'm opposed to it, I'd just like to understand the problem first.

@danyaPostfactum

Ok, I have learned this problem deeper. I think it is possible to change a little bit of code without any combatibiltity problem, and with satisfaction of my interests.

First, what I think about usage of core.js and mootools framework:
If extension needs Joomla js object, it says behavior.core , If extension needs mootools framework (because of it uses $ function or addEvent for example) it says behavior.framework. If extension needs both of these things it calls both of behaviors. Extension shouldnt care how some of behaviors impements - may be it uses dojo or jquery, it doesnt matter.
Extension just calls behavior.core and gets Joomla object.
That is my point of view of how it should be ideally.
Due to backwards compatibility behavior.framework should call core.js anyway.

Second, to avoid recursion in calls of framework and core each other (framework calls core, and core calls framework and so on) we need to break this dependence. Because of we cannot remove the call of core in framework method (due to b.comp.) we need to rewrite core.js in pure js. Its very easy, there are two only methods which uses mootools, and I have rewritten it (with help of js master) already.

In future, when we get rid of the core.js call from behavior.framework, we will be able to use mootools in core.js (because of there will not be double-dependence of methods)

Finally, what we get:
1) Logically correct way to load mootools.js and core.js
2) Possibility of overriding core.js call. So, in most cases, core extensions such as com_content, com_contact, com_users will not call mootools directly, they will only call keepalive, tooltip etc behaviors, and this gives us possibility to implement this behaviors with usage of any js library/framework you wish, just using joomla plugin.

But, I don't how did you replace JHtml::core in CMS. I guess JHtml::('behavior.framework') ? But frontend parts of com_content, com_contact etc havent need to mootools, they dont use $, addEvent etc, only they need is core.js and other behaviors (tooltip, keepalive and so on)
Is it possible to change code in at least frontend part ? For now, in the last release of CMS, there over 10 calls of JHtml::core() - it so easy to change it to JHtml::
('behavior.core').
Without this change, my plugin will not give a full effect - mootools will be loading but will not be in use.
Or where can I try to discuss this problem ?

I will place my plugin here. on github, but i havent yet have deal with it, so it takes a time :)
Уфф...

@danyaPostfactum danyaPostfactum commented on the diff
libraries/joomla/html/html/behavior.php
@@ -58,13 +58,33 @@ public static function framework($extras = false, $debug = null)
}
JHtml::_('script', 'system/mootools-' . $type . '.js', false, true, false, false, $debug);
- JHtml::_('script', 'system/core.js', false, true);

Remove direct loading of core.js, let ::core() method do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@danyaPostfactum danyaPostfactum commented on the diff
libraries/joomla/html/html/behavior.php
@@ -82,7 +102,7 @@ public static function caption($selector = 'img.caption')
}
// Include MooTools framework
- self::framework();

May be somebody wants to re-register behavior.framework (for loading from CDN for examle) , so, let it use his overriding method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@danyaPostfactum danyaPostfactum commented on the diff
libraries/joomla/html/html/behavior.php
((7 lines not shown))
self::$loaded[__METHOD__][$type] = true;
return;
}
/**
+ * Method to load the Joomla core behavior

core.js should not use MooTools (at this moment) to prevent recursive calls of framework and core each other. In future, extensions should call directly ::core() method when they needs Joomla object, so we will remove ::core() call from framework method, and we will get possibility to use mootools in core.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@danyaPostfactum danyaPostfactum commented on the diff
media/system/js/core-uncompressed.js
@@ -124,35 +124,41 @@ Joomla.checkAll = function(checkbox, stub) {
* @return void
*/
Joomla.renderMessages = function(messages) {

Just pure javascript, it so easy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@danyaPostfactum

So, what do you think about it?
I want to create fast and lightweight sites, wich dont load tons of javascript. I want to give the availability to web-developers to use jquery correctly without loading mootools if they dont wont to use it.

All changes i offered will not affect outside Htmlbehavior file

@realityking
Collaborator

I'll respond in a bit, between JSST and our state parliament disbanding itself today I'm kept pretty busy ;)

@realityking
Collaborator

Haven't completely thought this trough but two three that came to my mind reading trough it:

  1. We'll have to add the JHtmlBeavhior::core() method, no doubt about it. We'll just have to add another file when we start extending MT objects (I have a rough cut of Request.Joomla laying around that was supposed to go into core.js)

  2. Can you really override JHtmlBehavior partly? So far I've alway overridden the complete JHtmlBehavior class - but then I've never tried it differently. I kinda like the self::framework() calls. That whole JHtml::_() method hides valuable information from IDEs so it should be avoided where possible.

  3. I'm very much against removing the MooTools code from core.js. I'd actually prefer if we could move some of the smaller files (e.g. multiselect) into core.js so we don't have to load that many files. But even if we can't do that, we got a framework in the core, why don't use it?

We should probably deprecate that JHtmlBehavior::framework() loads the core.js file. That will mean we'll have to add quite a bit of code but I really don't wanna be stuck in no framework mode in core.js.

@danyaPostfactum

I'm glad to see you agree with some of my thoughts :)

You asked: 'Can you really override JHtmlBehavior partly?'
Yes, there is the way: JHtml::register('behavior.jquery', array('myClass', 'jquery')). It works.
And JHtml::register('behavior.framework', array('myClass', 'framework')) - it works too.
For now, if I need to override behavior.framework ( I want to load it from Google CDN, and I want to select wich parts of more.js I want to load, because I dont want to load this monsterous file), I have to override the whole behavior.php, due to self::framework() calls.
But if you don't want to change this, ok, it is not a big problem :)

I'm not against using MooTools code in core.js, but we cant use it, until we remove core.js loading in framework method.

If we will call core.js in framework method, and will call framework in core method, we will get recursion.

So we have to remove core.js loading in framework method, or we have to remove framework call in core method.

Due to backward compatibilty we are not allowed to do first thing, so lets do second one.
As you see, using pure js is not more complex then using MooTools in our case. Function renderMessages is still clear and simple.

After removing core.js loading in framework method, we will get availability to use MT in core.js again.

So, I must get back self:framework() lines in my patch, do I ?

@WebMechanic WebMechanic commented on the diff
media/system/js/core-uncompressed.js
@@ -162,8 +168,8 @@ Joomla.renderMessages = function(messages) {
* @return void
*/
Joomla.removeMessages = function() {
- var children = $$('#system-message-container > *');
- children.destroy();
+ var container = document.getElementById('system-message-container'), child;

why travel the DOM?
document.getElementById('system-message-container').innerHTML='';

I don't know. I asked on javascript.ru to help me to "decode" mootools code into pure js , and professional js-coder helped me.
I also offered innerHTML = '', but he sayd "removeChild() would be better" ....

and did that professional js-coder also explain to you why it is suposed to be "better"?
It's DOM Level1, granted, but that's about it :)
Not only will this save a variable, a loop, and memory, innerHTML is also much faster which is why virtually any JS lib is using it internally to speed up these kind of "mass" DOM manipulation.
+1 that you ripped off the dependency on MooTools from renderMessage!

edit: this was my personal take on ripping it off: https://gist.github.com/2199473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@danyaPostfactum

So, what about merging my patches?

@LouisLandry

@danyaPostfactum This is no longer mergeable. Can you rebase this so we can take another look? @realityking would you have another look at this and talk it through with the CMS folks as well so we can make a call?

I'm going to close this for now. @danyaPostfactum once you have rebased this so that it will cleanly merge again please re-open it so we can finish the discussion. My apologies for the delay in getting a decision made on it.

@LouisLandry LouisLandry closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 12, 2012
  1. @danyaPostfactum
Commits on Mar 14, 2012
  1. @danyaPostfactum

    Added core() call into framework method. Removed framework dependence…

    danyaPostfactum authored
    … for ::core(), replaced self::framework with JHtml::_('behavior.framework')
  2. @danyaPostfactum
  3. @danyaPostfactum
This page is out of date. Refresh to see the latest.
View
49 libraries/joomla/html/html/behavior.php
@@ -58,13 +58,33 @@ public static function framework($extras = false, $debug = null)
}
JHtml::_('script', 'system/mootools-' . $type . '.js', false, true, false, false, $debug);
- JHtml::_('script', 'system/core.js', false, true);

Remove direct loading of core.js, let ::core() method do it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ // Backward compatibility: please call JHtml::_('behavior.core') directly when you need Joomla object
+ JHtml::_('behavior.core');
self::$loaded[__METHOD__][$type] = true;
return;
}
/**
+ * Method to load the Joomla core behavior

core.js should not use MooTools (at this moment) to prevent recursive calls of framework and core each other. In future, extensions should call directly ::core() method when they needs Joomla object, so we will remove ::core() call from framework method, and we will get possibility to use mootools in core.js

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ *
+ * @return void
+ *
+ * @since 11.4
+ */
+ public static function core()
+ {
+ // Only load once
+ if (isset(self::$loaded[__METHOD__]))
+ {
+ return;
+ }
+
+ JHtml::_('script', 'system/core.js', false, true);
+ self::$loaded[__METHOD__] = true;
+ }
+
+ /**
* Add unobtrusive javascript support for image captions.
*
* @param string $selector The selector for which a caption behaviour is to be applied.
@@ -82,7 +102,7 @@ public static function caption($selector = 'img.caption')
}
// Include MooTools framework
- self::framework();

May be somebody wants to re-register behavior.framework (for loading from CDN for examle) , so, let it use his overriding method

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/caption.js', true, true);
@@ -118,7 +138,7 @@ public static function formvalidation()
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/validate.js', true, true);
self::$loaded[__METHOD__] = true;
@@ -141,7 +161,7 @@ public static function switcher()
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/switcher.js', true, true);
@@ -176,7 +196,7 @@ public static function combobox()
return;
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/combobox.js', true, true);
self::$loaded[__METHOD__] = true;
@@ -218,7 +238,7 @@ public static function tooltip($selector = '.hasTip', $params = array())
}
// Include MooTools framework
- self::framework(true);
+ JHtml::_('behavior.framework', true);
// Setup options object
$opt['maxTitleChars'] = (isset($params['maxTitleChars']) && ($params['maxTitleChars'])) ? (int) $params['maxTitleChars'] : 50;
@@ -284,7 +304,7 @@ public static function modal($selector = 'a.modal', $params = array())
if (!isset(self::$loaded[__METHOD__]))
{
// Include MooTools framework
- self::framework(true);
+ JHtml::_('behavior.framework', true);
// Load the javascript and css
JHtml::_('script', 'system/modal.js', true, true);
@@ -356,7 +376,7 @@ public static function multiselect($id = 'adminForm')
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/multiselect.js', true, true);
@@ -386,7 +406,7 @@ public static function multiselect($id = 'adminForm')
public static function uploader($id = 'file-upload', $params = array(), $upload_queue = 'upload-queue')
{
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/swf.js', true, true);
JHtml::_('script', 'system/progressbar.js', true, true);
@@ -552,7 +572,7 @@ public static function uploader($id = 'file-upload', $params = array(), $upload_
public static function tree($id, $params = array(), $root = array())
{
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
JHtml::_('script', 'system/mootree.js', true, true, false, false);
JHtml::_('stylesheet', 'system/mootree.css', array(), true);
@@ -648,7 +668,7 @@ public static function colorpicker()
}
// Include MooTools framework
- self::framework(true);
+ JHtml::_('behavior.framework', true);
JHtml::_('stylesheet', 'system/mooRainbow.css', array('media' => 'all'), true);
JHtml::_('script', 'system/mooRainbow.js', false, true);
@@ -699,7 +719,7 @@ public static function keepalive()
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
$config = JFactory::getConfig();
$lifetime = ($config->get('lifetime') * 60000);
@@ -751,6 +771,9 @@ public static function highlighter(array $terms, $start = 'highlighter-start', $
return;
}
+ // Include MooTools framework
+ JHtml::_('behavior.framework');
+
JHtml::_('script', 'system/highlighter.js', true, true);
$terms = str_replace('"', '\"', $terms);
@@ -796,7 +819,7 @@ public static function noframes()
}
// Include MooTools framework
- self::framework();
+ JHtml::_('behavior.framework');
$js = "window.addEvent('domready', function () {if (top == self) {document.documentElement.style.display = 'block'; }" .
" else {top.location = self.location; }});";
View
68 media/system/js/core-uncompressed.js
@@ -124,35 +124,41 @@ Joomla.checkAll = function(checkbox, stub) {
* @return void
*/
Joomla.renderMessages = function(messages) {

Just pure javascript, it so easy :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
- Joomla.removeMessages();
- var container = document.id('system-message-container');
-
- var dl = new Element('dl', {
- id: 'system-message',
- role: 'alert'
- });
- Object.each(messages, function (item, type) {
- var dt = new Element('dt', {
- 'class': type,
- html: type
- });
- dt.inject(dl);
- var dd = new Element('dd', {
- 'class': type
- });
- dd.addClass('message');
- var list = new Element('ul');
-
- Array.each(item, function (item, index, object) {
- var li = new Element('li', {
- html: item
- });
- li.inject(list);
- }, this);
- list.inject(dd);
- dd.inject(dl);
- }, this);
- dl.inject(container);
+ Joomla.removeMessages();
+ var container = document.getElementById('system-message-container');
+
+ var dl = document.createElement('dl');
+ dl.id = 'system-message';
+ dl.role = 'alert';
+
+ var type, item, dt, dd, list, li;
+ for ( type in messages ) {
+ if ( Object.prototype.hasOwnProperty.call ( messages, type ) ) {
+ item = messages[ type ];
+ dt = document.createElement('dt');
+ dt.className = type;
+ dt.innerHTML = type;
+ dl.appendChild( dt );
+
+ dd = document.createElement('dd');
+ dd.className = type + ' message';
+
+ list = document.createElement('ul');
+
+ for ( var i = 0, len = item.length; i < len; i++ ) {
+ li = document.createElement('li');
+ li.innerHTML = item[ i ];
+ list.appendChild( li );
+ }
+
+ dd.appendChild( list );
+ dl.appendChild( dd );
+
+ }
+ }
+ dt = dd = list = li = null;
+
+ container.appendChild(dl);
};
@@ -162,8 +168,8 @@ Joomla.renderMessages = function(messages) {
* @return void
*/
Joomla.removeMessages = function() {
- var children = $$('#system-message-container > *');
- children.destroy();
+ var container = document.getElementById('system-message-container'), child;

why travel the DOM?
document.getElementById('system-message-container').innerHTML='';

I don't know. I asked on javascript.ru to help me to "decode" mootools code into pure js , and professional js-coder helped me.
I also offered innerHTML = '', but he sayd "removeChild() would be better" ....

and did that professional js-coder also explain to you why it is suposed to be "better"?
It's DOM Level1, granted, but that's about it :)
Not only will this save a variable, a loop, and memory, innerHTML is also much faster which is why virtually any JS lib is using it internally to speed up these kind of "mass" DOM manipulation.
+1 that you ripped off the dependency on MooTools from renderMessage!

edit: this was my personal take on ripping it off: https://gist.github.com/2199473

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
+ while ( (child = container.firstChild) ) container.removeChild( child );
}
/**
View
14 media/system/js/core.js
@@ -1,13 +1,13 @@
/*
GNU General Public License version 2 or later; see LICENSE.txt
*/
-if("undefined"===typeof Joomla)var Joomla={};Joomla.editors={};Joomla.editors.instances={};Joomla.submitform=function(a,b){"undefined"===typeof b&&(b=document.getElementById("adminForm"));"undefined"!==typeof a&&(b.task.value=a);if("function"==typeof b.onsubmit)b.onsubmit();"function"==typeof b.fireEvent&&b.fireEvent("submit");b.submit()};Joomla.submitbutton=function(a){Joomla.submitform(a)};
-Joomla.JText={strings:{},_:function(a,b){return"undefined"!==typeof this.strings[a.toUpperCase()]?this.strings[a.toUpperCase()]:b},load:function(a){for(var b in a)this.strings[b.toUpperCase()]=a[b];return this}};Joomla.replaceTokens=function(a){for(var b=document.getElementsByTagName("input"),c=0;c<b.length;c++)"hidden"==b[c].type&&32==b[c].name.length&&"1"==b[c].value&&(b[c].name=a)};Joomla.isEmail=function(a){return/^[\w-_.]*[\w-_.]@[\w].+[\w]+[\w]$/.test(a)};
-Joomla.checkAll=function(a,b){b||(b="cb");if(a.form){for(var c=0,d=0,f=a.form.elements.length;d<f;d++){var e=a.form.elements[d];if(e.type==a.type&&(b&&0==e.id.indexOf(b)||!b))e.checked=a.checked,c+=!0==e.checked?1:0}a.form.boxchecked&&(a.form.boxchecked.value=c);return!0}return!1};
-Joomla.renderMessages=function(a){Joomla.removeMessages();var b=document.id("system-message-container"),c=new Element("dl",{id:"system-message",role:"alert"});Object.each(a,function(a,b){(new Element("dt",{"class":b,html:b})).inject(c);var e=new Element("dd",{"class":b});e.addClass("message");var g=new Element("ul");Array.each(a,function(a){(new Element("li",{html:a})).inject(g)},this);g.inject(e);e.inject(c)},this);c.inject(b)};Joomla.removeMessages=function(){$$("#system-message-container > *").destroy()};
-Joomla.isChecked=function(a,b){"undefined"===typeof b&&(b=document.getElementById("adminForm"));!0==a?b.boxchecked.value++:b.boxchecked.value--};Joomla.popupWindow=function(a,b,c,d,f){window.open(a,b,"height="+d+",width="+c+",top="+(screen.height-d)/2+",left="+(screen.width-c)/2+",scrollbars="+f+",resizable").window.focus()};
+if("undefined"===typeof Joomla)var Joomla={};Joomla.editors={};Joomla.editors.instances={};Joomla.submitform=function(a,b){"undefined"===typeof b&&(b=document.getElementById("adminForm"));if("undefined"!==typeof a)b.task.value=a;if("function"==typeof b.onsubmit)b.onsubmit();"function"==typeof b.fireEvent&&b.fireEvent("submit");b.submit()};Joomla.submitbutton=function(a){Joomla.submitform(a)};
+Joomla.JText={strings:{},_:function(a,b){return"undefined"!==typeof this.strings[a.toUpperCase()]?this.strings[a.toUpperCase()]:b},load:function(a){for(var b in a)this.strings[b.toUpperCase()]=a[b];return this}};Joomla.replaceTokens=function(a){for(var b=document.getElementsByTagName("input"),c=0;c<b.length;c++)if("hidden"==b[c].type&&32==b[c].name.length&&"1"==b[c].value)b[c].name=a};Joomla.isEmail=function(a){return/^[\w-_.]*[\w-_.]@[\w].+[\w]+[\w]$/.test(a)};
+Joomla.checkAll=function(a,b){b||(b="cb");if(a.form){for(var c=0,d=0,f=a.form.elements.length;d<f;d++){var e=a.form.elements[d];if(e.type==a.type&&(b&&0==e.id.indexOf(b)||!b))e.checked=a.checked,c+=!0==e.checked?1:0}if(a.form.boxchecked)a.form.boxchecked.value=c;return!0}return!1};
+Joomla.renderMessages=function(a){Joomla.removeMessages();var b=document.getElementById("system-message-container"),c=document.createElement("dl");c.id="system-message";c.role="alert";var d,f,e,g,h;for(d in a)if(Object.prototype.hasOwnProperty.call(a,d)){f=a[d];e=document.createElement("dt");e.className=d;e.innerHTML=d;c.appendChild(e);e=document.createElement("dd");e.className=d+" message";g=document.createElement("ul");for(var j=0,k=f.length;j<k;j++)h=document.createElement("li"),h.innerHTML=f[j],
+g.appendChild(h);e.appendChild(g);c.appendChild(e)}b.appendChild(c)};Joomla.removeMessages=function(){for(var a=document.getElementById("system-message-container"),b;b=a.firstChild;)a.removeChild(b)};Joomla.isChecked=function(a,b){"undefined"===typeof b&&(b=document.getElementById("adminForm"));!0==a?b.boxchecked.value++:b.boxchecked.value--};Joomla.popupWindow=function(a,b,c,d,f){window.open(a,b,"height="+d+",width="+c+",top="+(screen.height-d)/2+",left="+(screen.width-c)/2+",scrollbars="+f+",resizable").window.focus()};
Joomla.tableOrdering=function(a,b,c,d){"undefined"===typeof d&&(d=document.getElementById("adminForm"));d.filter_order.value=a;d.filter_order_Dir.value=b;Joomla.submitform(c,d)};function writeDynaList(a,b,c,d,f){var a="\n\t<select "+a+">",e=0;for(x in b){if(b[x][0]==c){var g="";if(d==c&&f==b[x][1]||0==e&&d!=c)g='selected="selected"';a+='\n\t\t<option value="'+b[x][1]+'" '+g+">"+b[x][2]+"</option>"}e++}document.writeln(a+"\n\t</select>")}
function changeDynaList(a,b,c,d,f){a=document.adminForm[a];for(i in a.options.length)a.options[i]=null;i=0;for(x in b)if(b[x][0]==c){opt=new Option;opt.value=b[x][1];opt.text=b[x][2];if(d==c&&f==opt.value||0==i)opt.selected=!0;a.options[i++]=opt}a.length=i}function radioGetCheckedValue(a){if(!a)return"";var b=a.length;if(void 0==b)return a.checked?a.value:"";for(var c=0;c<b;c++)if(a[c].checked)return a[c].value;return""}
function getSelectedValue(a,b){var c=document[a][b];i=c.selectedIndex;return null!=i&&-1<i?c.options[i].value:null}function listItemTask(a,b){var c=document.adminForm,d=c[a];if(d){for(var f=0;;f++){var e=c["cb"+f];if(!e)break;e.checked=!1}d.checked=!0;c.boxchecked.value=1;submitbutton(b)}return!1}function submitbutton(a){submitform(a)}
-function submitform(a){a&&(document.adminForm.task.value=a);if("function"==typeof document.adminForm.onsubmit)document.adminForm.onsubmit();"function"==typeof document.adminForm.fireEvent&&document.adminForm.fireEvent("submit");document.adminForm.submit()}function saveorder(a,b){checkAll_button(a,b)}
-function checkAll_button(a,b){b||(b="saveorder");for(var c=0;c<=a;c++){var d=document.adminForm["cb"+c];if(d)!1==d.checked&&(d.checked=!0);else{alert("You cannot change the order of items, as an item in the list is `Checked Out`");return}}submitform(b)};
+function submitform(a){if(a)document.adminForm.task.value=a;if("function"==typeof document.adminForm.onsubmit)document.adminForm.onsubmit();"function"==typeof document.adminForm.fireEvent&&document.adminForm.fireEvent("submit");document.adminForm.submit()}function saveorder(a,b){checkAll_button(a,b)}
+function checkAll_button(a,b){b||(b="saveorder");for(var c=0;c<=a;c++){var d=document.adminForm["cb"+c];if(d){if(!1==d.checked)d.checked=!0}else{alert("You cannot change the order of items, as an item in the list is `Checked Out`");return}}submitform(b)};
Something went wrong with that request. Please try again.