1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f3bdde9002de/ Changeset: f3bdde9002de User: greg Date: 2013-10-07 22:35:38 Summary: Fix javascript function to check all check boxes for select lists in the tool shed and Galaxy that handle resetting metadata on selected repositories and installing and uninstalling selected tool dependencies. Affected #: 4 files diff -r 09a383314143244d37b5d40a565e75b131dff2b5 -r f3bdde9002def4b09eae778dbd250d40512a30ac templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako --- a/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako +++ b/templates/admin/tool_shed_repository/manage_repository_tool_dependencies.mako @@ -39,7 +39,8 @@ trans.model.ToolDependency.installation_status.UNINSTALLED ]: can_install = True if not can_uninstall: - if tool_dependency.status not in [ trans.model.ToolDependency.installation_status.UNINSTALLED ]: + if tool_dependency.status not in [ trans.model.ToolDependency.installation_status.NEVER_INSTALLED, + trans.model.ToolDependency.installation_status.UNINSTALLED ]: can_uninstall = True %><tr> @@ -67,7 +68,7 @@ </div><div style="clear: both"></div><div class="form-row"> - <input type="checkbox" id="checkAllUninstalled" name="select_all_uninstalled_tool_dependencies_checkbox" value="true" onclick="checkAllFields( 'uninstalled_tool_dependency_ids', 'checkAllUninstalled' );"/><input type="hidden" name="select_all_uninstalled_tool_dependencies_checkbox" value="true"/><b>Select/unselect all tool dependencies</b> + <input type="checkbox" id="checkAllUninstalled" name="select_all_uninstalled_tool_dependencies_checkbox" value="true" onclick="checkAllUninstalledToolDependencyIdFields(1);"/><input type="hidden" name="select_all_uninstalled_tool_dependencies_checkbox" value="true"/><b>Select/unselect all tool dependencies</b></div><div style="clear: both"></div><div class="form-row"> @@ -88,7 +89,7 @@ </div><div style="clear: both"></div><div class="form-row"> - <input type="checkbox" id="checkAllInstalled" name="select_all_installed_tool_dependencies_checkbox" value="true" onclick="checkAllFields( 'inst_td_ids', 'checkAllInstalled' );"/><input type="hidden" name="select_all_installed_tool_dependencies_checkbox" value="true"/><b>Select/unselect all tool dependencies</b> + <input type="checkbox" id="checkAllInstalled" name="select_all_installed_tool_dependencies_checkbox" value="true" onclick="checkAllInstalledToolDependencyIdFields(1);"/><input type="hidden" name="select_all_installed_tool_dependencies_checkbox" value="true"/><b>Select/unselect all tool dependencies</b></div><div style="clear: both"></div><div class="form-row"> diff -r 09a383314143244d37b5d40a565e75b131dff2b5 -r f3bdde9002def4b09eae778dbd250d40512a30ac templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako --- a/templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako +++ b/templates/admin/tool_shed_repository/reset_metadata_on_selected_repositories.mako @@ -24,7 +24,7 @@ </div><div style="clear: both"></div><div class="form-row"> - <input type="checkbox" id="checkAll" name="select_all_repositories_checkbox" value="true" onclick="checkAllFields('repository_ids');"/><input type="hidden" name="select_all_repositories_checkbox" value="true"/><b>Select/unselect all repositories</b> + <input type="checkbox" id="checkAll" name="select_all_repositories_checkbox" value="true" onclick="checkAllRepositoryIdFields(1);"/><input type="hidden" name="select_all_repositories_checkbox" value="true"/><b>Select/unselect all repositories</b></div><div style="clear: both"></div><div class="form-row"> diff -r 09a383314143244d37b5d40a565e75b131dff2b5 -r f3bdde9002def4b09eae778dbd250d40512a30ac templates/webapps/tool_shed/common/common.mako --- a/templates/webapps/tool_shed/common/common.mako +++ b/templates/webapps/tool_shed/common/common.mako @@ -1,15 +1,7 @@ -<%def name="common_misc_javascripts( element_id=None )"> +<%def name="common_misc_javascripts()"><script type="text/javascript"> - function checkAllFields( name, element_id=element_id ) + function checkAllFields( chkAll, name ) { - if ( element_id ) - { - chkAll = document.getElementById( element_id ); - } - else - { - var chkAll = document.getElementById( 'checkAll' ); - } var checks = document.getElementsByTagName( 'input' ); var boxLength = checks.length; var allChecked = false; @@ -18,9 +10,9 @@ { for ( i=0; i < boxLength; i++ ) { - if ( checks[i].name.indexOf( name ) != -1 ) + if ( checks[ i ].name.indexOf( name ) != -1 ) { - checks[i].checked = true; + checks[ i ].checked = true; } } } @@ -28,13 +20,34 @@ { for ( i=0; i < boxLength; i++ ) { - if ( checks[i].name.indexOf( name ) != -1 ) + if ( checks[ i ].name.indexOf( name ) != -1 ) { - checks[i].checked = false + checks[ i ].checked = false; } } } } + + function checkAllRepositoryIdFields() + { + var chkAll = document.getElementById( 'checkAll' ); + var name = 'repository_ids'; + checkAllFields( chkAll, name ); + } + + function checkAllInstalledToolDependencyIdFields() + { + var chkAll = document.getElementById( 'checkAllInstalled' ); + var name = 'inst_td_ids'; + checkAllFields( chkAll, name ); + } + + function checkAllUninstalledToolDependencyIdFields() + { + var chkAll = document.getElementById( 'checkAllUninstalled' ); + var name = 'uninstalled_tool_dependency_ids'; + checkAllFields( chkAll, name ); + } </script></%def> diff -r 09a383314143244d37b5d40a565e75b131dff2b5 -r f3bdde9002def4b09eae778dbd250d40512a30ac templates/webapps/tool_shed/common/reset_metadata_on_selected_repositories.mako --- a/templates/webapps/tool_shed/common/reset_metadata_on_selected_repositories.mako +++ b/templates/webapps/tool_shed/common/reset_metadata_on_selected_repositories.mako @@ -33,7 +33,7 @@ </div><div style="clear: both"></div><div class="form-row"> - <input type="checkbox" id="checkAll" name="select_all_repositories_checkbox" value="true" onclick="checkAllFields('repository_ids');"/><input type="hidden" name="select_all_repositories_checkbox" value="true"/><b>Select/unselect all repositories</b> + <input type="checkbox" id="checkAll" name="select_all_repositories_checkbox" value="true" onclick="checkAllRepositoryIdFields(1);"/><input type="hidden" name="select_all_repositories_checkbox" value="true"/><b>Select/unselect all repositories</b></div><div style="clear: both"></div><div class="form-row"> Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.