Created
April 16, 2010 10:58
-
-
Save mramsden/368292 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="manageable_id_102" class="ep_manageable"> | |
<div class="ep_manageable_data"> | |
<input type="checkbox" name="bulkaction_eprintids" value="102" id="select-102" class="ep_resource_manager_select_check"> | |
<a href="http://resourcemanager.quango-vm.local/102/"><span class="ep_manageable_data_title">My New EdShare Resource</span></a> | |
<span class="ep_manageable_data_viewperms">Just me</span> | |
</div> | |
<div class="ep_manageable_controls"> | |
<ul> | |
<li><a href="http://resourcemanager.quango-vm.local/102/">View</a></li> | |
<li><a href="http://resourcemanager.quango-vm.local/cgi/users/home?screen=EPrint::Edit&eprintid=102">Edit</a></li> | |
<li><a href="http://resourcemanager.quango-vm.local/cgi/users/home?screen=EPrint::Remove&eprintid=102">Remove</a></li> | |
</ul> | |
</div> | |
<div style="clear:both;"></div> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.observe( 'dom:loaded', function() { | |
document.observe('click', updateResourceSelection); | |
}); | |
window.updateResourceSelection = function(event) { | |
if (!Prototype.Browser.IE && !event.isLeftClick()) return; | |
var element = event.element(); | |
if (ignoreElement(element)) { | |
return; | |
} else if (!Object.isUndefined(element = event.findElement('.ep_manageable'))) { | |
checkbox = $$('#'+element.readAttribute('id')+' .ep_resource_manager_select_check')[0]; | |
if (inBulkSelection(element)) { | |
element.removeClassName('ep_manageable_selected'); | |
if (Object.isUndefined(event.findElement('.ep_resource_manager_select_check'))) | |
checkbox.writeAttribute('checked', false); | |
} else { | |
element.addClassName('ep_manageable_selected'); | |
if (Object.isUndefined(event.findElement('.ep_resource_manager_select_check'))) | |
checkbox.writeAttribute('checked', true); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment