|
Date: 12/11/2007 3:36 pm · Subject: 'Select all' checkbox in Manage Trash not working properly · Rating: 3
I've noticed the following problems:
- When there is only one item in the trash, the 'select all' checkbox won't select/unselect that item. - When there are multiple items, the checkbox is working fine in Firefox, but in IE 6 (and probably 7 too) the items won't get selected directly. A second click on some other part of the screen will trigger the items to get selected though. - When there are no items, clicking on the check box will generate a javascript error. This is my suggested fix. Edit WebGUI::Asset::www_manageTrash (WebGUI/lib/WebGUI/AssetTrash.pm) to: 1) monitor the removed event instead of onchange <script type=\"text/javascript\"> //<![CDATA[ var assetManager = new AssetManager(); assetManager.AddColumn('".WebGUI::Form::checkbox($self->session,{name=>"checkAllAssetIds", extras=>'removed="toggleAssetListSelectAll(this.form);"'})."','','center','form'); assetManager.AddColumn('".$i18n->get("99")."','','left',''); 2) replace the definition of the javascript function toggleAssetListSelectAll with: function toggleAssetListSelectAll(form) { assetListSelectAllToggle = assetListSelectAllToggle ? false : true; if (form.assetId) { if (typeof form.assetId.length == "number") { for(var i = 0; i < form.assetId.length; i++) { form.assetId.checked = assetListSelectAllToggle; } } else { form.assetId.checked = assetListSelectAllToggle; } } }
|