mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Match search word with description
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<div class="ui-thumbnails-grid">
|
||||
<input class="search-query parent-width" name="query" placeholder="search visualizations" autocomplete="off" type="text" v-model="search">
|
||||
<div v-for="plugin in plugins">
|
||||
<table v-if="!search || plugin.name.indexOf(search) != -1">
|
||||
<table v-if="match(plugin)">
|
||||
<tr class="ui-thumbnails-item" @click="select(plugin)">
|
||||
<td>
|
||||
<img v-if="plugin.logo" class="ui-thumbnails-image" :src="plugin.logo"/>
|
||||
@@ -92,6 +92,11 @@ export default {
|
||||
let href = `${Galaxy.root}plugins/visualizations/${plugin.name}/show?dataset_id=${this.selected}`;
|
||||
$("#galaxy_main").attr("src", href);
|
||||
},
|
||||
match: function(plugin) {
|
||||
return !this.search ||
|
||||
plugin.name.indexOf(this.search) != -1 ||
|
||||
(plugin.description && plugin.description.indexOf(this.search) != -1);
|
||||
},
|
||||
_errorMessage: function(e) {
|
||||
let message = e && e.response && e.response.data && e.response.data.err_msg;
|
||||
return message || "Request failed for unkown reason.";
|
||||
|
||||
Reference in New Issue
Block a user