From f469db3d7e26ad2aeb7ee2d8fab7e094f4a339bd Mon Sep 17 00:00:00 2001 From: John Chilton Date: Tue, 19 May 2015 12:35:14 -0400 Subject: [PATCH 01/14] Fixes for boolean & select handling in test data elements. - Allow boolean "truevalue"/"falsevalue" to be used in plain (non-conditional test element) parameters (see https://trello.com/c/iGk3f1pE). - Fix conditionals to use processed values - so this fix and 5b6c092aa0a85455b4daacd318541e92bd08b876 are applid to these elements as well. (http://osdir.com/ml/general/2015-05/msg24402.html). This also adds tests to verify these behaviors. Run most relevant tests with commands: ./run_tests.sh -framework -id simple_constructs ./run_tests.sh -framework -id multi_select ./run_tests.sh -framework -id boolean_conditional --- lib/galaxy/tools/test.py | 83 ++++++++++++------- test/functional/tools/boolean_conditional.xml | 53 ++++++++++++ test/functional/tools/samples_tool_conf.xml | 1 + test/functional/tools/simple_constructs.xml | 12 +++ 4 files changed, 119 insertions(+), 30 deletions(-) create mode 100644 test/functional/tools/boolean_conditional.xml diff --git a/lib/galaxy/tools/test.py b/lib/galaxy/tools/test.py index babdcb84fe2..07837255dc2 100644 --- a/lib/galaxy/tools/test.py +++ b/lib/galaxy/tools/test.py @@ -71,9 +71,8 @@ class ToolTestBuilder( object ): # No explicit value for param in test case, determine from default query_value = test_param.checked else: - # Test case supplied value, check cases against this. - query_value = string_as_bool( declared_value ) - matches_declared_value = lambda case_value: string_as_bool(case_value) == query_value + query_value = _process_bool_param_value( test_param, declared_value ) + matches_declared_value = lambda case_value: _process_bool_param_value( test_param, case_value ) == query_value elif isinstance(test_param, galaxy.tools.parameters.basic.SelectToolParameter): if declared_value is not None: # Test case supplied explicit value to check against. @@ -166,7 +165,8 @@ class ToolTestBuilder( object ): # as a new instance with value defined and hence enter # an infinite loop - hence the "case_value is not None" # check. - expanded_inputs[ case_context.for_state() ] = expanded_case_value + processed_value = _process_simple_value( value.test_param, expanded_case_value ) + expanded_inputs[ case_context.for_state() ] = processed_value elif isinstance( value, galaxy.tools.parameters.grouping.Section ): context = ParamContext( name=value.name, parent_context=parent_context ) for r_name, r_value in value.inputs.iteritems(): @@ -203,33 +203,8 @@ class ToolTestBuilder( object ): for ( name, value, extra ) in collection_def.collect_inputs(): require_file( name, value, extra, self.required_files ) processed_value = collection_def - elif isinstance( value, galaxy.tools.parameters.basic.SelectToolParameter ) and hasattr( value, 'static_options' ): - # Tests may specify values as either raw value or the value - # as they appear in the list - the API doesn't and shouldn't - # accept the text value - so we need to convert the text - # into the form value. - def process_param_value( param_value ): - found_value = False - value_for_text = None - if value.static_options: - for (text, opt_value, selected) in value.static_options: - if param_value == opt_value: - found_value = True - if value_for_text is None and param_value == text: - value_for_text = opt_value - if not found_value and value_for_text is not None: - processed_value = value_for_text - else: - processed_value = param_value - return processed_value - # Do replacement described above for lists or singleton - # values. - if isinstance( param_value, list ): - processed_value = map( process_param_value, param_value ) - else: - processed_value = process_param_value( param_value ) else: - processed_value = param_value + processed_value = _process_simple_value( value, param_value ) expanded_inputs[ context.for_state() ] = processed_value return expanded_inputs @@ -240,6 +215,54 @@ class ToolTestBuilder( object ): return require_file( name, value, extra, self.required_files ) +def _process_simple_value( param, param_value ): + if isinstance( param, galaxy.tools.parameters.basic.SelectToolParameter ) and hasattr( param, 'static_options' ): + # Tests may specify values as either raw value or the value + # as they appear in the list - the API doesn't and shouldn't + # accept the text value - so we need to convert the text + # into the form value. + def process_param_value( param_value ): + found_value = False + value_for_text = None + if param.static_options: + for (text, opt_value, selected) in param.static_options: + if param_value == opt_value: + found_value = True + if value_for_text is None and param_value == text: + value_for_text = opt_value + if not found_value and value_for_text is not None: + processed_value = value_for_text + else: + processed_value = param_value + return processed_value + # Do replacement described above for lists or singleton + # values. + if isinstance( param_value, list ): + processed_value = map( process_param_value, param_value ) + else: + processed_value = process_param_value( param_value ) + elif isinstance( param, galaxy.tools.parameters.basic.BooleanToolParameter ): + # Like above, tests may use the tool define values of simply + # true/false. + processed_value = _process_bool_param_value( param, param_value ) + else: + processed_value = param_value + return processed_value + + +def _process_bool_param_value( param, param_value ): + assert isinstance( param, galaxy.tools.parameters.basic.BooleanToolParameter ) + if isinstance( param_value, list ): + param_value = param_value[0] + if param.truevalue == param_value: + processed_value = True + elif param.falsevalue == param_value: + processed_value = False + else: + processed_value = string_as_bool( param_value ) + return processed_value + + @nottest def test_data_iter( required_files ): for fname, extra in required_files: diff --git a/test/functional/tools/boolean_conditional.xml b/test/functional/tools/boolean_conditional.xml new file mode 100644 index 00000000000..df699e267a8 --- /dev/null +++ b/test/functional/tools/boolean_conditional.xml @@ -0,0 +1,53 @@ + + + echo "$p1.p1val" >> $out_file1; + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/test/functional/tools/samples_tool_conf.xml b/test/functional/tools/samples_tool_conf.xml index c4c86f5272f..948793afa9b 100644 --- a/test/functional/tools/samples_tool_conf.xml +++ b/test/functional/tools/samples_tool_conf.xml @@ -3,6 +3,7 @@ + diff --git a/test/functional/tools/simple_constructs.xml b/test/functional/tools/simple_constructs.xml index d67c0c282ee..6fdde0ff154 100644 --- a/test/functional/tools/simple_constructs.xml +++ b/test/functional/tools/simple_constructs.xml @@ -61,5 +61,17 @@ + + + + + + + + + + + + From 182fbd1bc61f8ff8bd2cf29c23fca47c8eac7002 Mon Sep 17 00:00:00 2001 From: Martin Cech Date: Tue, 19 May 2015 16:53:25 -0400 Subject: [PATCH 02/14] fix the data source tools for modendcode with proper URLs --- tools/data_source/fly_modencode.xml | 2 +- tools/data_source/worm_modencode.xml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/data_source/fly_modencode.xml b/tools/data_source/fly_modencode.xml index 7b14302ebec..70e080eec48 100644 --- a/tools/data_source/fly_modencode.xml +++ b/tools/data_source/fly_modencode.xml @@ -2,7 +2,7 @@ server data_source.py $output $__app__.config.output_size_limit - + go to modENCODE fly server $GALAXY_URL diff --git a/tools/data_source/worm_modencode.xml b/tools/data_source/worm_modencode.xml index 074792cccf7..b2ade3a0e51 100644 --- a/tools/data_source/worm_modencode.xml +++ b/tools/data_source/worm_modencode.xml @@ -2,7 +2,7 @@ server data_source.py $output $__app__.config.output_size_limit - + go to modENCODE worm server $GALAXY_URL From 09b900d87371b84a788fa9af7ca0627db5b0b280 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 20 May 2015 10:49:35 +0100 Subject: [PATCH 03/14] Fix typos in comment. --- lib/galaxy/managers/workflows.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/galaxy/managers/workflows.py b/lib/galaxy/managers/workflows.py index d4cd0ebdc9c..7f4ef608f19 100644 --- a/lib/galaxy/managers/workflows.py +++ b/lib/galaxy/managers/workflows.py @@ -585,8 +585,8 @@ class WorkflowContentsManager(UsesAnnotations): yield step_dict def __module_from_dict( self, trans, step_dict, secure ): - """ Create a WorkflowStep model object and corrsponding module representing - type-specific functionality from the incoming dicitionary. + """ Create a WorkflowStep model object and corresponding module + representing type-specific functionality from the incoming dictionary. """ step = model.WorkflowStep() # TODO: Consider handling position inside module. From feae4e08a42f6cdc20df48003dce0e2492e1070d Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 20 May 2015 10:50:10 +0100 Subject: [PATCH 04/14] Add to make page XHTML conformant. --- static/welcome.html.sample | 1 + 1 file changed, 1 insertion(+) diff --git a/static/welcome.html.sample b/static/welcome.html.sample index 2d4eb5fceea..53adc1abfa1 100644 --- a/static/welcome.html.sample +++ b/static/welcome.html.sample @@ -2,6 +2,7 @@ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> + <title>Homepage From 4bf447702f771de390bc995d18c2e464e749ac68 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 20 May 2015 11:01:34 +0100 Subject: [PATCH 05/14] Substitute "Galaxy Team" with "local Galaxy administrators" in dataset error report form. --- templates/webapps/galaxy/dataset/errors.mako | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/webapps/galaxy/dataset/errors.mako b/templates/webapps/galaxy/dataset/errors.mako index bd914f135a3..7e7f989c7cf 100644 --- a/templates/webapps/galaxy/dataset/errors.mako +++ b/templates/webapps/galaxy/dataset/errors.mako @@ -80,9 +80,9 @@ else: user_email = '' %> -

Report this error to the Galaxy Team

+

Report this error to the local Galaxy administrators

- The Galaxy team regularly reviews errors that occur in the application. + Usually the local Galaxy administrators regularly review errors that occur on the server. However, if you would like to provide additional information (such as what you were trying to do when the error occurred) and a contact e-mail address, we will be better able to investigate your problem and get back From 2d03d7d530e8a4969203c2c02a81aa30eee1ce94 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 20 May 2015 11:15:42 +0100 Subject: [PATCH 06/14] Do not try to send subscription email if mailing_join_addr is empty. Prevent "subscribing to the mailing list has failed." error. --- templates/user/register.mako | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/user/register.mako b/templates/user/register.mako index 0c7f85cc207..81cbd535d5d 100644 --- a/templates/user/register.mako +++ b/templates/user/register.mako @@ -152,7 +152,7 @@ def inherit(context): %endif - %if trans.app.config.smtp_server: + %if trans.app.config.smtp_server and trans.app.config.mailing_join_addr:

%if subscribe_checked: From 6b2f01a5cad91697683210ee82fa06277595fb73 Mon Sep 17 00:00:00 2001 From: Nicola Soranzo Date: Wed, 20 May 2015 11:20:25 +0100 Subject: [PATCH 07/14] Explain how to remove the mailing list subscription option from the user registration form. --- config/galaxy.ini.sample | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/config/galaxy.ini.sample b/config/galaxy.ini.sample index 10c3f633a7e..895c89767ec 100644 --- a/config/galaxy.ini.sample +++ b/config/galaxy.ini.sample @@ -350,8 +350,9 @@ paste.app_factory = galaxy.web.buildapp:app_factory # If your SMTP server requires SSL from the beginning of the connection # smtp_ssl = False -# On the user registration form, users may choose to join the mailing list. -# This is the address of the list they'll be subscribed to. +# On the user registration form, users may choose to join a mailing list. This +# is the address used to subscribe to the list. Uncomment and leave empty if you +# want to remove this option from the user registration form. #mailing_join_addr = galaxy-announce-join@bx.psu.edu # Datasets in an error state include a link to report the error. Those reports From 0d3c849d4f90e30c793f1ae61203daf7842a0989 Mon Sep 17 00:00:00 2001 From: abretaud Date: Fri, 24 Apr 2015 14:37:43 +0200 Subject: [PATCH 08/14] perf optimization: store tools' section in a dict instead of looping through the whole list of sections/tools for each tool (cherry picked from commit b8261db255759a4725fd30de280fae19ee1a375b) --- lib/galaxy/tools/toolbox/base.py | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index 9656dd147ed..3b441704af8 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -53,6 +53,7 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): # shed_tool_conf.xml file. self._dynamic_tool_confs = [] self._tools_by_id = {} + self._integrated_section_by_tool = {} # Tool lineages can contain chains of related tools with different ids # so each will be present once in the above dictionary. The following # dictionary can instead hold multiple tools with different versions. @@ -217,19 +218,10 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): def get_integrated_section_for_tool( self, tool ): tool_id = tool.id - for key, item_type, item in self._integrated_tool_panel.panel_items_iter(): - if item: - if item_type == panel_item_types.TOOL: - if item.id == tool_id: - return '', '' - if item_type == panel_item_types.SECTION: - section_id = item.id or '' - section_name = item.name or '' - for section_key, section_item_type, section_item in item.panel_items_iter(): - if section_item_type == panel_item_types.TOOL: - if section_item: - if section_item.id == tool_id: - return section_id, section_name + + if tool_id in self._integrated_section_by_tool: + return self._integrated_section_by_tool[tool_id] + return None, None def __resolve_tool_path(self, tool_path, config_filename): @@ -310,6 +302,7 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): tool_id = key.replace( 'tool_', '', 1 ) if tool_id in self._tools_by_id: self.__add_tool_to_tool_panel( val, self._tool_panel, section=False ) + self._integrated_section_by_tool[tool_id] = '', '' elif item_type == panel_item_types.WORKFLOW: workflow_id = key.replace( 'workflow_', '', 1 ) if workflow_id in self._workflows_by_id: @@ -331,6 +324,7 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): tool_id = section_key.replace( 'tool_', '', 1 ) if tool_id in self._tools_by_id: self.__add_tool_to_tool_panel( section_val, section, section=True ) + self._integrated_section_by_tool[tool_id] = key, val.name elif section_item_type == panel_item_types.WORKFLOW: workflow_id = section_key.replace( 'workflow_', '', 1 ) if workflow_id in self._workflows_by_id: @@ -561,6 +555,9 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): if tool_key in itegrated_items: del itegrated_items[ tool_key ] + if tool_id in self._integrated_section_by_tool: + del self._integrated_section_by_tool[ tool_id ] + if section_key: _, tool_section = self.get_section( section_key ) if tool_section: @@ -934,6 +931,10 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): break if tool_id in self.data_manager_tools: del self.data_manager_tools[ tool_id ] + + if tool_id in self._integrated_section_by_tool: + del self._integrated_section_by_tool[ tool_id ] + # TODO: do we need to manually remove from the integrated panel here? message = "Removed the tool:
" message += "name: %s
" % tool.name From c5675307231b1e15d95e2ca35b00f9be5d7ff3f6 Mon Sep 17 00:00:00 2001 From: abretaud Date: Mon, 27 Apr 2015 11:44:30 +0200 Subject: [PATCH 09/14] handle adding/removing tools from toolshed (cherry picked from commit 911acd7a6ed364f2124e8673a02849f7922a0325) --- lib/galaxy/tools/toolbox/base.py | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/lib/galaxy/tools/toolbox/base.py b/lib/galaxy/tools/toolbox/base.py index 3b441704af8..1a04fdf4b74 100644 --- a/lib/galaxy/tools/toolbox/base.py +++ b/lib/galaxy/tools/toolbox/base.py @@ -546,18 +546,22 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): has_elems.insert( tool_panel_index, replacement_tool_key, replacement_tool_version ) + self._integrated_section_by_tool[ tool_id ] = available_tool_section_id, available_tool_section_name else: del has_elems[ tool_key ] + + if tool_id in self._integrated_section_by_tool: + del self._integrated_section_by_tool[ tool_id ] else: del has_elems[ tool_key ] + + if tool_id in self._integrated_section_by_tool: + del self._integrated_section_by_tool[ tool_id ] if remove_from_config: itegrated_items = integrated_has_elems.panel_items() if tool_key in itegrated_items: del itegrated_items[ tool_key ] - if tool_id in self._integrated_section_by_tool: - del self._integrated_section_by_tool[ tool_id ] - if section_key: _, tool_section = self.get_section( section_key ) if tool_section: @@ -678,6 +682,14 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): index=sub_index, internal=True, ) + + # Ensure each tool's section is stored + for section_key, section_item_type, section_item in integrated_elems.panel_items_iter(): + if section_item_type == panel_item_types.TOOL: + if section_item: + tool_id = section_key.replace( 'tool_', '', 1 ) + self._integrated_section_by_tool[tool_id] = integrated_section.id, integrated_section.name + if load_panel_dict: self._tool_panel[ key ] = section # Always load sections into the integrated_tool_panel. @@ -931,10 +943,6 @@ class AbstractToolBox( object, Dictifiable, ManagesIntegratedToolPanelMixin ): break if tool_id in self.data_manager_tools: del self.data_manager_tools[ tool_id ] - - if tool_id in self._integrated_section_by_tool: - del self._integrated_section_by_tool[ tool_id ] - # TODO: do we need to manually remove from the integrated panel here? message = "Removed the tool:
" message += "name: %s
" % tool.name From 93c51fa25986d0cc2c0939879fc9e29e5e82568a Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 20 May 2015 12:39:59 -0400 Subject: [PATCH 10/14] Update default dbkey for fly_modencode.xml and bump version. dm3 is UCSC for release 5 --- tools/data_source/fly_modencode.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/data_source/fly_modencode.xml b/tools/data_source/fly_modencode.xml index 70e080eec48..3d3f5b8e533 100644 --- a/tools/data_source/fly_modencode.xml +++ b/tools/data_source/fly_modencode.xml @@ -1,5 +1,5 @@ - + server data_source.py $output $__app__.config.output_size_limit @@ -7,15 +7,15 @@ - + - + - + From af6172d14d343e2e53fb757c93bbbab03edbfc6b Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 20 May 2015 12:42:05 -0400 Subject: [PATCH 11/14] Update default dbkey for worm_modencode.xml and bump version. ce10 is UCSC for WS220 --- tools/data_source/worm_modencode.xml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/data_source/worm_modencode.xml b/tools/data_source/worm_modencode.xml index b2ade3a0e51..b021f4a0ddf 100644 --- a/tools/data_source/worm_modencode.xml +++ b/tools/data_source/worm_modencode.xml @@ -1,5 +1,5 @@ - + server data_source.py $output $__app__.config.output_size_limit @@ -7,15 +7,15 @@ - + - + - + From 8d2f9f77ebbdd4d2134fcd55304bb4aa1313f10b Mon Sep 17 00:00:00 2001 From: Daniel Blankenberg Date: Wed, 20 May 2015 12:47:01 -0400 Subject: [PATCH 12/14] Update modencode dbkeys in gbrowse_build_sites.txt --- tool-data/shared/gbrowse/gbrowse_build_sites.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tool-data/shared/gbrowse/gbrowse_build_sites.txt b/tool-data/shared/gbrowse/gbrowse_build_sites.txt index 289af693b69..df21421f090 100644 --- a/tool-data/shared/gbrowse/gbrowse_build_sites.txt +++ b/tool-data/shared/gbrowse/gbrowse_build_sites.txt @@ -18,7 +18,7 @@ wormbase_ws225 WormBase WS225 http://ws225.wormbase.org/db/gb2/gbrowse/ caeAng1, tair tair http://arabidopsis.org/cgi-bin/gbrowse/ arabidopsis_tair8,arabidopsis,Arabidopsis_thaliana_TAIR10 arabidopsis_tair8,arabidopsis_tair9,arabidopsis #modENCODE -modencode modENCODE http://modencode.oicr.on.ca/fgb2/gbrowse/ ce6,dm2 worm,fly +modencode modENCODE http://gbrowse.modencode.org/fgb2/gbrowse/ ce10,dm3 worm,fly #Saccharomyces Genome Database (SGD) sgd_yeast Saccharomyces Genome Database http://browse.yeastgenome.org/fgb2/gbrowse/ Saccharomyces_cerevisiae_S288C_SGD2010 scgenome From 2cc5ea12255b3f2e30b4b4fe4afd07f649b0931b Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Wed, 20 May 2015 15:47:32 -0400 Subject: [PATCH 13/14] Client style: fix sprite paths by using hardcoded path in task --- client/grunt-tasks/style.js | 3 ++ static/style/blue/base.css | 76 ++++++++++++++++++------------------- 2 files changed, 41 insertions(+), 38 deletions(-) diff --git a/client/grunt-tasks/style.js b/client/grunt-tasks/style.js index 02d1f5fed19..47be772bf8d 100644 --- a/client/grunt-tasks/style.js +++ b/client/grunt-tasks/style.js @@ -32,16 +32,19 @@ module.exports = function( grunt ){ 'history-buttons': { src: fmt( '%s/history-buttons/*.png', imagesPath ), destImg: fmt( '%s/sprite-history-buttons.png', styleDistPath ), + imgPath: fmt( 'sprite-history-buttons.png' ), destCSS: fmt( '%s/sprite-history-buttons.less', lessPath ) }, 'history-states': { src: fmt( '%s/history-states/*.png', imagesPath ), destImg: fmt( '%s/sprite-history-states.png', styleDistPath ), + imgPath: fmt( 'sprite-history-states.png' ), destCSS: fmt( '%s/sprite-history-states.less', lessPath ) }, 'fugue': { src: fmt( '%s/fugue/*.png', imagesPath ), destImg: fmt( '%s/sprite-fugue.png', styleDistPath ), + imgPath: fmt( 'sprite-fugue.png' ), destCSS: fmt( '%s/sprite-fugue.less', lessPath ) } }); diff --git a/static/style/blue/base.css b/static/style/blue/base.css index 6aab8aef859..215bd179b41 100644 --- a/static/style/blue/base.css +++ b/static/style/blue/base.css @@ -2159,25 +2159,25 @@ div.historyItem .historyItemTitle{font-weight:bold;line-height:16px} .historyItemContainer:last-child div.historyItem{border-bottom:solid #bfbfbf 1px} div.historyItem div.historyItem{margin-right:-11px} div.historyItem-ok,div.historyItem-failed_metadata{background:#aff1af}div.historyItem-ok .state-icon,div.historyItem-failed_metadata .state-icon{display:none} -div.historyItem-error{background:#f9c7c5}div.historyItem-error .state-icon{background-image:url(../../../../../static/style/blue/sprite-history-states.png);background-position:0px -15px;width:15px;height:15px;height:15px} -div.historyItem-empty{background:#f9c7c5}div.historyItem-empty .state-icon{background-image:url(../../../../../static/style/blue/sprite-history-states.png);background-position:0px 0px;width:15px;height:15px;height:15px} +div.historyItem-error{background:#f9c7c5}div.historyItem-error .state-icon{background-image:url(sprite-history-states.png);background-position:0px -15px;width:15px;height:15px;height:15px} +div.historyItem-empty{background:#f9c7c5}div.historyItem-empty .state-icon{background-image:url(sprite-history-states.png);background-position:0px 0px;width:15px;height:15px;height:15px} div.historyItem-running{background:#ffc}div.historyItem-running .state-icon{background-image:url(data_running.gif)} div.historyItem-setting_metadata{background:#ffc}div.historyItem-setting_metadata .state-icon{background-image:url(data_running.gif)} div.historyItem-upload{background:#a6e4f7}div.historyItem-upload .state-icon{background-image:url(data_upload.gif)} -div.historyItem-queued{background:#eee}div.historyItem-queued .state-icon{background-image:url(../../../../../static/style/blue/sprite-history-states.png);background-position:0px -45px;width:15px;height:15px;height:15px} +div.historyItem-queued{background:#eee}div.historyItem-queued .state-icon{background-image:url(sprite-history-states.png);background-position:0px -45px;width:15px;height:15px;height:15px} div.historyItem-noPermission{filter:alpha(opacity=60);-moz-opacity:.60;opacity:.60}div.historyItem-noPermission .state-icon{line-height:16px;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-moz-osx-font-smoothing:grayscale;font-family:FontAwesome;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.historyItem-noPermission .state-icon:before{content:"\f05e"} div.historyItem-paused{background:#d9edf7}div.historyItem-paused .state-icon{line-height:16px;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-moz-osx-font-smoothing:grayscale;font-family:FontAwesome;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.historyItem-paused .state-icon:before{content:"\f04c"} div.historyItem-new .state-icon{line-height:16px;display:inline-block;font:normal normal normal 14px/1 FontAwesome;font-size:inherit;text-rendering:auto;-moz-osx-font-smoothing:grayscale;font-family:FontAwesome;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}div.historyItem-new .state-icon:before{content:"\f071"} div.historyItemTitleBar.spinner .state-icon{background:url(data_running.gif) 0 1px no-repeat !important} -div.historyItemButtons{float:right}div.historyItemButtons .icon-button.display{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -48px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.display:hover{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -64px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.display_disabled{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -80px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.delete{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px 0px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.delete:hover{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -16px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.delete_disabled{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -32px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.edit{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -96px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.edit:hover{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -112px;width:16px;height:16px;height:16px} -div.historyItemButtons .icon-button.edit_disabled{background-image:url(../../../../../static/style/blue/sprite-history-buttons.png);background-position:0px -128px;width:16px;height:16px;height:16px} +div.historyItemButtons{float:right}div.historyItemButtons .icon-button.display{background-image:url(sprite-history-buttons.png);background-position:0px -48px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.display:hover{background-image:url(sprite-history-buttons.png);background-position:0px -64px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.display_disabled{background-image:url(sprite-history-buttons.png);background-position:0px -80px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.delete{background-image:url(sprite-history-buttons.png);background-position:0px 0px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.delete:hover{background-image:url(sprite-history-buttons.png);background-position:0px -16px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.delete_disabled{background-image:url(sprite-history-buttons.png);background-position:0px -32px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.edit{background-image:url(sprite-history-buttons.png);background-position:0px -96px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.edit:hover{background-image:url(sprite-history-buttons.png);background-position:0px -112px;width:16px;height:16px;height:16px} +div.historyItemButtons .icon-button.edit_disabled{background-image:url(sprite-history-buttons.png);background-position:0px -128px;width:16px;height:16px;height:16px} div.historyItemBody div{padding-top:2px} pre.peek{background:white;color:black;width:100%;font-size:10px;overflow:auto}pre.peek th{color:white;background:#5f6990} pre.peek table,pre.peek th,pre.peek tr,pre.peek td{font-family:Monaco,Menlo,Consolas,"Courier New",monospace;font-size:10px} @@ -2349,30 +2349,30 @@ div.toolTitleNoSection{padding-bottom:5px;font-weight:bold} .btn-primary .text-and-autocomplete-select:after,.btn-success .text-and-autocomplete-select:after,.btn-warning .text-and-autocomplete-select:after,.btn-danger .text-and-autocomplete-select:after,.btn-info .text-and-autocomplete-select:after{border-top-color:#fff} .icon-button.general-question{background:url(question-octagon-frame.png) no-repeat;float:right;margin-top:3px;margin-right:4px} .icon-button.tag-question{background:url(question-balloon.png) no-repeat;float:right;margin-top:3px;margin-right:4px} -.icon-button.tag{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -912px;width:16px;height:16px;height:16px} -.icon-button.tags{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -928px;width:16px;height:16px;height:16px} -.icon-button.tag--plus{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -896px;width:16px;height:16px;height:16px} -.icon-button.toggle-expand{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -976px;width:16px;height:16px;height:16px} -.icon-button.toggle{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -944px;width:16px;height:16px;height:16px} -.icon-button.toggle:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -992px;width:16px;height:16px;height:16px} -.icon-button.arrow-circle{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -64px;width:16px;height:16px;height:16px} -.icon-button.chevron{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -352px;width:16px;height:16px;height:16px} -.icon-button.bug{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -288px;width:16px;height:16px;height:16px} -.icon-button.disk{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -496px;width:16px;height:16px;height:16px} -.icon-button.information{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -656px;width:16px;height:16px;height:16px} -.icon-button.annotate{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -880px;width:16px;height:16px;height:16px} -.icon-button.go-to-full-screen{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px 0px;width:16px;height:16px;height:16px} -.icon-button.import{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -864px;width:16px;height:16px;height:16px} -.icon-button.plus-button{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -832px;width:16px;height:16px;height:16px} -.icon-button.plus-button:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -848px;width:16px;height:16px;height:16px} -.icon-button.gear{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -576px;width:16px;height:16px;height:16px} -.icon-button.chart_curve{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -304px;width:16px;height:16px;height:16px} -.icon-button.disk--arrow{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -464px;width:16px;height:16px;height:16px} -.icon-button.disk--arrow:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -480px;width:16px;height:16px;height:16px} -.icon-button.cross-circle{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -400px;width:16px;height:16px;height:16px} -.icon-button.cross-circle:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -416px;width:16px;height:16px;height:16px} -.icon-button.arrow-split{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -112px;width:16px;height:16px;height:16px} -.icon-button.arrow-split:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -128px;width:16px;height:16px;height:16px} -.icon-button.chevron-expand:hover{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -336px;width:16px;height:16px;height:16px} -.icon-button.chevron-expand{background-image:url(../../../../../static/style/blue/sprite-fugue.png);background-position:0px -320px;width:16px;height:16px;height:16px} +.icon-button.tag{background-image:url(sprite-fugue.png);background-position:0px -912px;width:16px;height:16px;height:16px} +.icon-button.tags{background-image:url(sprite-fugue.png);background-position:0px -928px;width:16px;height:16px;height:16px} +.icon-button.tag--plus{background-image:url(sprite-fugue.png);background-position:0px -896px;width:16px;height:16px;height:16px} +.icon-button.toggle-expand{background-image:url(sprite-fugue.png);background-position:0px -976px;width:16px;height:16px;height:16px} +.icon-button.toggle{background-image:url(sprite-fugue.png);background-position:0px -944px;width:16px;height:16px;height:16px} +.icon-button.toggle:hover{background-image:url(sprite-fugue.png);background-position:0px -992px;width:16px;height:16px;height:16px} +.icon-button.arrow-circle{background-image:url(sprite-fugue.png);background-position:0px -64px;width:16px;height:16px;height:16px} +.icon-button.chevron{background-image:url(sprite-fugue.png);background-position:0px -352px;width:16px;height:16px;height:16px} +.icon-button.bug{background-image:url(sprite-fugue.png);background-position:0px -288px;width:16px;height:16px;height:16px} +.icon-button.disk{background-image:url(sprite-fugue.png);background-position:0px -496px;width:16px;height:16px;height:16px} +.icon-button.information{background-image:url(sprite-fugue.png);background-position:0px -656px;width:16px;height:16px;height:16px} +.icon-button.annotate{background-image:url(sprite-fugue.png);background-position:0px -880px;width:16px;height:16px;height:16px} +.icon-button.go-to-full-screen{background-image:url(sprite-fugue.png);background-position:0px 0px;width:16px;height:16px;height:16px} +.icon-button.import{background-image:url(sprite-fugue.png);background-position:0px -864px;width:16px;height:16px;height:16px} +.icon-button.plus-button{background-image:url(sprite-fugue.png);background-position:0px -832px;width:16px;height:16px;height:16px} +.icon-button.plus-button:hover{background-image:url(sprite-fugue.png);background-position:0px -848px;width:16px;height:16px;height:16px} +.icon-button.gear{background-image:url(sprite-fugue.png);background-position:0px -576px;width:16px;height:16px;height:16px} +.icon-button.chart_curve{background-image:url(sprite-fugue.png);background-position:0px -304px;width:16px;height:16px;height:16px} +.icon-button.disk--arrow{background-image:url(sprite-fugue.png);background-position:0px -464px;width:16px;height:16px;height:16px} +.icon-button.disk--arrow:hover{background-image:url(sprite-fugue.png);background-position:0px -480px;width:16px;height:16px;height:16px} +.icon-button.cross-circle{background-image:url(sprite-fugue.png);background-position:0px -400px;width:16px;height:16px;height:16px} +.icon-button.cross-circle:hover{background-image:url(sprite-fugue.png);background-position:0px -416px;width:16px;height:16px;height:16px} +.icon-button.arrow-split{background-image:url(sprite-fugue.png);background-position:0px -112px;width:16px;height:16px;height:16px} +.icon-button.arrow-split:hover{background-image:url(sprite-fugue.png);background-position:0px -128px;width:16px;height:16px;height:16px} +.icon-button.chevron-expand:hover{background-image:url(sprite-fugue.png);background-position:0px -336px;width:16px;height:16px;height:16px} +.icon-button.chevron-expand{background-image:url(sprite-fugue.png);background-position:0px -320px;width:16px;height:16px;height:16px} #for_bears{display:none} From 2257bdc6651d9bd48b8b8658e695acc77edc64e8 Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Wed, 20 May 2015 18:10:26 -0400 Subject: [PATCH 14/14] UI, Tool form: remove select2 search.blur handler that re-focuses its search and prevents focusing on other elements --- client/galaxy/scripts/mvc/ui/ui-select-default.js | 1 + static/maps/mvc/ui/ui-select-default.js.map | 2 +- static/scripts/mvc/ui/ui-select-default.js | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/client/galaxy/scripts/mvc/ui/ui-select-default.js b/client/galaxy/scripts/mvc/ui/ui-select-default.js index fda11eed1a8..61bc233be07 100644 --- a/client/galaxy/scripts/mvc/ui/ui-select-default.js +++ b/client/galaxy/scripts/mvc/ui/ui-select-default.js @@ -208,6 +208,7 @@ var View = Backbone.View.extend({ if (this.options.searchable) { this.$select.select2('destroy'); this.$select.select2(); + this.$( '.select2-container .select2-search input' ).off( 'blur' ); } // set previous value diff --git a/static/maps/mvc/ui/ui-select-default.js.map b/static/maps/mvc/ui/ui-select-default.js.map index dd589a69328..9d1e91c997a 100644 --- a/static/maps/mvc/ui/ui-select-default.js.map +++ b/static/maps/mvc/ui/ui-select-default.js.map @@ -1 +1 @@ -{"version":3,"file":"ui-select-default.js","sources":["../../../src/mvc/ui/ui-select-default.js"],"names":["define","Utils","ButtonCheck","View","Backbone","extend","optionsDefault","id","uid","cls","error_text","empty_text","visible","wait","multiple","searchable","optional","initialize","options","self","this","merge","setElement","_template","$select","$el","find","$icon","$button","all_button","onclick","new_value","value","_availableOptions","trigger","prepend","addClass","prop","remove","update","data","undefined","hide","show","on","onchange","exists","val","select2","current","_getValue","$","isArray","length","_size","first","text","unwait","removeClass","disabled","is","enable","disable","append","_templateOption","label","key","setOnChange","callback","validate","available","each","i","e","push","attr"],"mappings":"AACAA,QAAQ,cAAe,0BAA2B,SAASC,EAAOC,GAKlE,GAAIC,GAAOC,SAASD,KAAKE,QAErBC,gBACIC,GAAcN,EAAMO,MACpBC,IAAc,YACdC,WAAc,oBACdC,WAAc,eACdC,SAAc,EACdC,MAAc,EACdC,UAAc,EACdC,YAAc,E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AA0B9B,KAAKF,QAAQJ,UAAYM,KAAKF,QAAQF,UACrEI,KAAKY,MAAMZ,KAAKmC,UAMxBY,YAAa,SAASC,GAClBhD,KAAKF,QAAQ2B,SAAWuB,GAK5BtB,OAAQ,SAASd,GACb,MAAOZ,MAAKI,QAAQE,KAAK,iBAAmBM,EAAQ,MAAMqB,OAAS,GAKvEH,UAAW,WACP,GAAIH,GAAM3B,KAAKI,QAAQuB,KACvB,OAAK9C,GAAMoE,SAAStB,GAGbA,EAFI,MAOfd,kBAAmB,WACf,GAAIqC,KAIJ,OAHAlD,MAAKI,QAAQE,KAAK,UAAU6C,KAAK,SAASC,EAAGC,GACzCH,EAAUI,KAAKvB,EAAEsB,GAAGE,KAAK,YAEtBL,GAKXhB,MAAO,WACH,MAAOlC,MAAKI,QAAQE,KAAK,UAAU2B,QAKvCW,gBAAiB,SAAS9C,GACtB,MAAO,kBAAoBA,EAAQc,MAAQ,KAAOd,EAAQ+C,MAAQ,aAKtE1C,UAAW,SAASL,GAChB,MAAQ,YAAcA,EAAQX,GAAK,YAAcW,EAAQT,IAAM,iBAClCS,EAAQX,GAAK,+EAQlD,QACIJ,KAAMA"} \ No newline at end of file +{"version":3,"file":"ui-select-default.js","sources":["../../../src/mvc/ui/ui-select-default.js"],"names":["define","Utils","ButtonCheck","View","Backbone","extend","optionsDefault","id","uid","cls","error_text","empty_text","visible","wait","multiple","searchable","optional","initialize","options","self","this","merge","setElement","_template","$select","$el","find","$icon","$button","all_button","onclick","new_value","value","_availableOptions","trigger","prepend","addClass","prop","remove","update","data","undefined","hide","show","on","onchange","exists","val","select2","current","_getValue","$","isArray","length","_size","first","text","unwait","removeClass","disabled","is","enable","disable","append","_templateOption","label","key","off","setOnChange","callback","validate","available","each","i","e","push","attr"],"mappings":"AACAA,QAAQ,cAAe,0BAA2B,SAASC,EAAOC,GAKlE,GAAIC,GAAOC,SAASD,KAAKE,QAErBC,gBACIC,GAAcN,EAAMO,MACpBC,IAAc,YACdC,WAAc,oB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I,QAAQwB,UACb5B,KAAK+B,EAAG,4CAA6CgB,IAAK,SAI9D/C,KAAKY,MAAMiB,GAGc,OAArB7B,KAAK8B,aAA0B9B,KAAKF,QAAQJ,UAAYM,KAAKF,QAAQF,UACrEI,KAAKY,MAAMZ,KAAKmC,UAMxBa,YAAa,SAASC,GAClBjD,KAAKF,QAAQ2B,SAAWwB,GAK5BvB,OAAQ,SAASd,GACb,MAAOZ,MAAKI,QAAQE,KAAK,iBAAmBM,EAAQ,MAAMqB,OAAS,GAKvEH,UAAW,WACP,GAAIH,GAAM3B,KAAKI,QAAQuB,KACvB,OAAK9C,GAAMqE,SAASvB,GAGbA,EAFI,MAOfd,kBAAmB,WACf,GAAIsC,KAIJ,OAHAnD,MAAKI,QAAQE,KAAK,UAAU8C,KAAK,SAASC,EAAGC,GACzCH,EAAUI,KAAKxB,EAAEuB,GAAGE,KAAK,YAEtBL,GAKXjB,MAAO,WACH,MAAOlC,MAAKI,QAAQE,KAAK,UAAU2B,QAKvCW,gBAAiB,SAAS9C,GACtB,MAAO,kBAAoBA,EAAQc,MAAQ,KAAOd,EAAQ+C,MAAQ,aAKtE1C,UAAW,SAASL,GAChB,MAAQ,YAAcA,EAAQX,GAAK,YAAcW,EAAQT,IAAM,iBAClCS,EAAQX,GAAK,+EAQlD,QACIJ,KAAMA"} \ No newline at end of file diff --git a/static/scripts/mvc/ui/ui-select-default.js b/static/scripts/mvc/ui/ui-select-default.js index 06f3126396d..5b63052ee10 100644 --- a/static/scripts/mvc/ui/ui-select-default.js +++ b/static/scripts/mvc/ui/ui-select-default.js @@ -1,2 +1,2 @@ -define(["utils/utils","mvc/ui/ui-button-check"],function(a,b){var c=Backbone.View.extend({optionsDefault:{id:a.uid(),cls:"ui-select",error_text:"No data available",empty_text:"No selection",visible:!0,wait:!1,multiple:!1,searchable:!0,optional:!1},initialize:function(c){var d=this;this.options=a.merge(c,this.optionsDefault),this.setElement(this._template(this.options)),this.$select=this.$el.find(".select"),this.$icon=this.$el.find(".icon"),this.$button=this.$el.find(".button"),this.options.multiple&&(this.options.searchable&&(this.all_button=new b({onclick:function(){var a=[];0!==d.all_button.value()&&(a=d._availableOptions()),d.value(a),d.trigger("change")}}),this.$el.prepend(this.all_button.$el)),this.$el.addClass("ui-select-multiple"),this.$select.prop("multiple",!0),this.$button.remove()),this.update(this.options.data),void 0!==this.options.value&&this.value(this.options.value),this.options.visible||this.hide(),this.options.wait?this.wait():this.show(),this.$select.on("change",function(){d.trigger("change")}),this.on("change",function(){d.options.onchange&&d.options.onchange(this.value())})},value:function(a){void 0!==a&&(null===a&&(a="__null__"),(this.exists(a)||this.options.multiple)&&(this.$select.val(a),this.$select.select2&&this.$select.select2("val",a)));var b=this._getValue();return this.all_button&&this.all_button.value($.isArray(b)&&b.length||0,this._size()),b},first:function(){var a=this.$select.find("option").first();return a.length>0?a.val():null},text:function(){return this.$select.find("option:selected").text()},show:function(){this.unwait(),this.$select.show(),this.$el.show()},hide:function(){this.$el.hide()},wait:function(){this.$icon.removeClass(),this.$icon.addClass("fa fa-spinner fa-spin")},unwait:function(){this.$icon.removeClass(),this.$icon.addClass("fa fa-caret-down")},disabled:function(){return this.$select.is(":disabled")},enable:function(){this.$select.prop("disabled",!1)},disable:function(){this.$select.prop("disabled",!0)},update:function(a){var b=this._getValue();this.$select.find("option").remove(),!this.options.multiple&&this.options.optional&&this.$select.append(this._templateOption({value:"__null__",label:this.options.empty_text}));for(var c in a)this.$select.append(this._templateOption(a[c]));0==this._size()?(this.disable(),this.$select.append(this._templateOption({value:"__null__",label:this.options.error_text}))):this.enable(),this.options.searchable&&(this.$select.select2("destroy"),this.$select.select2()),this.value(b),null!==this._getValue()||this.options.multiple&&this.options.optional||this.value(this.first())},setOnChange:function(a){this.options.onchange=a},exists:function(a){return this.$select.find('option[value="'+a+'"]').length>0},_getValue:function(){var b=this.$select.val();return a.validate(b)?b:null},_availableOptions:function(){var a=[];return this.$select.find("option").each(function(b,c){a.push($(c).attr("value"))}),a},_size:function(){return this.$select.find("option").length},_templateOption:function(a){return'"},_template:function(a){return'
'}});return{View:c}}); //# sourceMappingURL=../../../maps/mvc/ui/ui-select-default.js.map \ No newline at end of file