4 new commits in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/44d9d215b9c3/ changeset: 44d9d215b9c3 user: epaniagu date: 2011-11-22 21:42:18 summary: fix add/remove buttons in Repeat elements affected #: 1 file diff -r 9d6a9963b0da21fe3139fcefbd11c1ec6290a529 -r 44d9d215b9c337cf9b988976bf93f429dbd84ccb templates/tool_form.mako --- a/templates/tool_form.mako +++ b/templates/tool_form.mako @@ -139,13 +139,17 @@ %><div class="form-title-row"><strong>${input.title} ${i + 1}</strong></div> ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} - <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> + %if input.min < len( repeat_state ): + <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> + %endif </div> %if rep_errors.has_key( '__index__' ): <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${rep_errors['__index__']}</span></div> %endif %endfor - <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> + %if input.max > len( repeat_state ): + <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> + %endif </div> %elif input.type == "conditional": <% https://bitbucket.org/galaxy/galaxy-central/commits/b6ff1a695e07/ changeset: b6ff1a695e07 user: epaniagu date: 2011-11-22 21:53:56 summary: replace len( repeat_state ) with a variable so there's only one call affected #: 1 file diff -r 44d9d215b9c337cf9b988976bf93f429dbd84ccb -r b6ff1a695e07e6a2443a3d6d0aa9a9066a155dbc templates/tool_form.mako --- a/templates/tool_form.mako +++ b/templates/tool_form.mako @@ -127,8 +127,11 @@ </div> %endif </div> - <% repeat_state = tool_state[input.name] %> - %for i in range( len( repeat_state ) ): + <% + repeat_state = tool_state[input.name] + num_repeats = len( repeat_state ) + %> + %for i in range( num_repeats ): <div class="repeat-group-item"><% if input.name in errors: @@ -139,7 +142,7 @@ %><div class="form-title-row"><strong>${input.title} ${i + 1}</strong></div> ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} - %if input.min < len( repeat_state ): + %if input.min < num_repeats: <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> %endif </div> @@ -147,7 +150,7 @@ <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${rep_errors['__index__']}</span></div> %endif %endfor - %if input.max > len( repeat_state ): + %if input.max > num_repeats: <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> %endif </div> https://bitbucket.org/galaxy/galaxy-central/commits/8d068273cf5b/ changeset: 8d068273cf5b user: jgoecks date: 2013-01-17 21:32:34 summary: Merged in epaniagu/galaxy-central (pull request #24: Fix Add/Remove buttons for Repeat groups) affected #: 1 file diff -r 7848d6fd1b7a3ef8330ad1b31f5a3521094ad706 -r 8d068273cf5b1160a27977727a7ab6f2237d4bb7 templates/tool_form.mako --- a/templates/tool_form.mako +++ b/templates/tool_form.mako @@ -135,8 +135,11 @@ </div> %endif </div> - <% repeat_state = tool_state[input.name] %> - %for i in range( len( repeat_state ) ): + <% + repeat_state = tool_state[input.name] + num_repeats = len( repeat_state ) + %> + %for i in range( num_repeats ): <div class="repeat-group-item"><% if input.name in errors: @@ -147,13 +150,25 @@ %><div class="form-title-row"><strong>${input.title} ${i + 1}</strong></div> ${do_inputs( input.inputs, repeat_state[i], rep_errors, prefix + input.name + "_" + str(index) + "|", other_values )} +<<<<<<< local <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> +======= + %if input.min < num_repeats: + <div class="form-row"><input type="submit" name="${prefix}${input.name}_${index}_remove" value="Remove ${input.title} ${i+1}"></div> + %endif +>>>>>>> other </div> %if rep_errors.has_key( '__index__' ): <div><img style="vertical-align: middle;" src="${h.url_for('/static/style/error_small.png')}"> <span style="vertical-align: middle;">${rep_errors['__index__']}</span></div> %endif %endfor +<<<<<<< local <div class="form-row"><input type="submit" class="btn" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> +======= + %if input.max > num_repeats: + <div class="form-row"><input type="submit" name="${prefix}${input.name}_add" value="Add new ${input.title}"></div> + %endif +>>>>>>> other </div> %elif input.type == "conditional": <% https://bitbucket.org/galaxy/galaxy-central/commits/d4a613896681/ changeset: d4a613896681 user: jgoecks date: 2013-01-17 21:34:04 summary: Automated merge. affected #: 1 file diff -r 8d068273cf5b1160a27977727a7ab6f2237d4bb7 -r d4a61389668164e833eef418ab03c1467ba64d13 scripts/functional_tests.py --- a/scripts/functional_tests.py +++ b/scripts/functional_tests.py @@ -50,6 +50,41 @@ migrated_tool_panel_config = 'migrated_tools_conf.xml' installed_tool_panel_configs = [ 'shed_tool_conf.xml' ] +# should this serve static resources (scripts, images, styles, etc.) +STATIC_ENABLED = True + +def get_static_settings(): + """Returns dictionary of the settings necessary for a galaxy App + to be wrapped in the static middleware. + + This mainly consists of the filesystem locations of url-mapped + static resources. + """ + cwd = os.getcwd() + static_dir = os.path.join( cwd, 'static' ) + #TODO: these should be copied from universe_wsgi.ini + return dict( + #TODO: static_enabled needed here? + static_enabled = True, + static_cache_time = 360, + static_dir = static_dir, + static_images_dir = os.path.join( static_dir, 'images', '' ), + static_favicon_dir = os.path.join( static_dir, 'favicon.ico' ), + static_scripts_dir = os.path.join( static_dir, 'scripts', '' ), + static_style_dir = os.path.join( static_dir, 'june_2007_style', 'blue' ), + static_robots_txt = os.path.join( static_dir, 'robots.txt' ), + ) + +def get_webapp_global_conf(): + """Get the global_conf dictionary sent as the first argument to app_factory. + """ + # (was originally sent 'dict()') - nothing here for now except static settings + global_conf = dict() + if STATIC_ENABLED: + global_conf.update( get_static_settings() ) + return global_conf + + def parse_tool_panel_config( config, shed_tools_dict ): """ Parse a shed-related tool panel config to generate the shed_tools_dict. This only happens when testing tools installed from the tool shed. @@ -289,7 +324,8 @@ server = None if start_server: - webapp = buildapp.app_factory( dict(), use_translogger=False, static_enabled=False, app=app ) + webapp = buildapp.app_factory( get_webapp_global_conf(), app=app, + use_translogger=False, static_enabled=STATIC_ENABLED ) if galaxy_test_port is not None: server = httpserver.serve( webapp, host=galaxy_test_host, port=galaxy_test_port, start_loop=False ) else: 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.