-
+
diff --git a/client/galaxy/scripts/components/Tags/model.js b/client/galaxy/scripts/components/Tags/model.js
index a9dd7c68eae..821c1c0c009 100644
--- a/client/galaxy/scripts/components/Tags/model.js
+++ b/client/galaxy/scripts/components/Tags/model.js
@@ -50,8 +50,8 @@ function TagModel(props = {}) {
enumerable: false,
get: function() {
if (!this.text.length) return false;
- if (this.text == "name:") return false;
- return true;
+ return this.text != "name:";
+
}
});
}
diff --git a/client/galaxy/scripts/components/xrefs.vue b/client/galaxy/scripts/components/xrefs.vue
new file mode 100644
index 00000000000..13c005243ba
--- /dev/null
+++ b/client/galaxy/scripts/components/xrefs.vue
@@ -0,0 +1,53 @@
+
+
+
+ References
+
+
+
+ - {{xref.reftype}}:
+
+
+ {{xref.value}}
+
+
+ {{ xref.value }}
+
+
+
+
+
+
+
diff --git a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js
index ddc58f00e5a..570bd3dc0c4 100644
--- a/client/galaxy/scripts/entry/analysis/AnalysisRouter.js
+++ b/client/galaxy/scripts/entry/analysis/AnalysisRouter.js
@@ -88,8 +88,7 @@ export const getAnalysisRouter = Galaxy =>
const instance = Vue.extend(component);
const container = document.createElement("div");
this.page.display(container);
- const vm = new instance(props).$mount(container);
- return vm;
+ return new instance(props).$mount(container);
},
show_tours: function(tour_id) {
diff --git a/client/galaxy/scripts/layout/communication-server-view.js b/client/galaxy/scripts/layout/communication-server-view.js
index 1bd1f682300..d71930ebb79 100644
--- a/client/galaxy/scripts/layout/communication-server-view.js
+++ b/client/galaxy/scripts/layout/communication-server-view.js
@@ -92,13 +92,12 @@ export const CommunicationServerView = Backbone.View.extend({
/**renders the chat icon as a nav item*/
render: function() {
- const navItem = {
+ return {
id: "show-chat-online",
icon: "fa-comment-o",
tooltip: _l("Chat online"),
visible: false,
onclick: this.makeModalIframe
};
- return navItem;
}
});
diff --git a/client/galaxy/scripts/layout/masthead.js b/client/galaxy/scripts/layout/masthead.js
index 17413de98b4..dc41a0b738d 100644
--- a/client/galaxy/scripts/layout/masthead.js
+++ b/client/galaxy/scripts/layout/masthead.js
@@ -99,7 +99,7 @@ const View = Backbone.View.extend({
return `
-
+
diff --git a/client/galaxy/scripts/mvc/collection/collection-model.js b/client/galaxy/scripts/mvc/collection/collection-model.js
index 985407145d7..4f99ac3c0db 100644
--- a/client/galaxy/scripts/mvc/collection/collection-model.js
+++ b/client/galaxy/scripts/mvc/collection/collection-model.js
@@ -134,8 +134,7 @@ var DatasetDCE = DATASET_MODEL.DatasetAssociation.extend(
return `${getAppRoot()}api/datasets`;
}
const datasetId = this._getDatasetId();
- const url = `${getAppRoot()}api/histories/${this.get("history_id")}/contents/${datasetId}`;
- return url;
+ return `${getAppRoot()}api/histories/${this.get("history_id")}/contents/${datasetId}`;
},
_getDatasetId: function() {
diff --git a/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js b/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js
index df6cab76641..52d84691d82 100644
--- a/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js
+++ b/client/galaxy/scripts/mvc/collection/list-of-pairs-collection-creator.js
@@ -1491,8 +1491,7 @@ var PairedCollectionCreator = Backbone.View.extend(baseMVC.LoggableMixin)
//this.debug( '_pairDragstart', ev, pair )
// auto select the pair causing the event and move all selected
pair.$el.addClass("selected");
- var $selected = this.$(".paired-columns .dataset.selected");
- this.$dragging = $selected;
+ this.$dragging = this.$(".paired-columns .dataset.selected");
},
/** drag communication with pair sub-views: dragend - remove the placeholder */
_pairDragend: function(ev, pair) {
diff --git a/client/galaxy/scripts/mvc/history/history-contents.js b/client/galaxy/scripts/mvc/history/history-contents.js
index 54eb7757e80..bc362cc40ee 100644
--- a/client/galaxy/scripts/mvc/history/history-contents.js
+++ b/client/galaxy/scripts/mvc/history/history-contents.js
@@ -78,8 +78,7 @@ export var HistoryContents = _super.extend(BASE_MVC.LoggableMixin).extend({
history_id: this.history_id,
collection_id: historyContent.attributes.id
});
- var jobStatesSummary = this.jobStateSummariesCollection.get(jobSourceId);
- historyContent.jobStatesSummary = jobStatesSummary;
+ historyContent.jobStatesSummary = this.jobStateSummariesCollection.get(jobSourceId);
}
}
});
diff --git a/client/galaxy/scripts/mvc/history/history-list.js b/client/galaxy/scripts/mvc/history/history-list.js
index e1db8645d43..6941d0c4b74 100644
--- a/client/galaxy/scripts/mvc/history/history-list.js
+++ b/client/galaxy/scripts/mvc/history/history-list.js
@@ -50,8 +50,7 @@ var HistoryGridView = GridView.extend({
$(`.delayed-value-datasets_by_state[data-id='${historyId}']`).html(stateHtml);
$(`.delayed-value-disk_size[data-id='${historyId}']`).html(req.nice_size);
};
- var xhr = $.ajax(options);
- return xhr;
+ return $.ajax(options);
};
})
);
diff --git a/client/galaxy/scripts/mvc/history/history-view.js b/client/galaxy/scripts/mvc/history/history-view.js
index 4e96b1ff6f6..35c42388cf9 100644
--- a/client/galaxy/scripts/mvc/history/history-view.js
+++ b/client/galaxy/scripts/mvc/history/history-view.js
@@ -469,8 +469,7 @@ var HistoryView = _super.extend(
// if sent two strings (and possibly details as 'options'), use those as message and title
if (_.isString(model) && _.isString(xhr)) {
var message = model;
- var title = xhr;
- return ERROR_MODAL.errorModal(message, title, options);
+ return ERROR_MODAL.errorModal(message, xhr, options);
}
// bad gateway
// TODO: possibly to global handler
diff --git a/client/galaxy/scripts/mvc/history/multi-panel.js b/client/galaxy/scripts/mvc/history/multi-panel.js
index 104bcbab12e..276ec095870 100644
--- a/client/galaxy/scripts/mvc/history/multi-panel.js
+++ b/client/galaxy/scripts/mvc/history/multi-panel.js
@@ -94,10 +94,8 @@ var HistoryViewColumn = Backbone.View.extend(baseMVC.LoggableMixin).extend({
if (columnRight < viewLeft) {
return false;
}
- if (columnLeft > viewRight) {
- return false;
- }
- return true;
+ return columnLeft <= viewRight;
+
},
/** shortcut to the panel */
@@ -438,8 +436,7 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({
// if sent two strings (and possibly details as 'options'), use those as message and title
if (_.isString(model) && _.isString(xhr)) {
var message = model;
- var title = xhr;
- return ERROR_MODAL.errorModal(message, title, options);
+ return ERROR_MODAL.errorModal(message, xhr, options);
}
// bad gateway
// TODO: possibly to global handler
@@ -600,15 +597,13 @@ var MultiPanelColumns = Backbone.View.extend(baseMVC.LoggableMixin).extend({
return this.sortedColumns();
}
return this.sortedColumns().filter((column, index) => {
- var filtered = column.currentHistory || _.every(filters.map(filter => filter.call(column)));
- return filtered;
+ return column.currentHistory || _.every(filters.map(filter => filter.call(column)));
});
},
/** return array of Columns sorted to match the collection */
sortedColumns: function() {
- var sorted = this.collection.map((history, index) => this.columnMap[history.id]);
- return sorted;
+ return this.collection.map((history, index) => this.columnMap[history.id]);
},
// ------------------------------------------------------------------------ render
diff --git a/client/galaxy/scripts/mvc/job/job-li.js b/client/galaxy/scripts/mvc/job/job-li.js
index 731af00b3d0..b502226dadf 100644
--- a/client/galaxy/scripts/mvc/job/job-li.js
+++ b/client/galaxy/scripts/mvc/job/job-li.js
@@ -107,8 +107,7 @@ var JobListItemView = _super.extend(
return undefined;
}
- var subMatch = _.find(partialMatch.inputs, i => name.indexOf(i.name) !== -1);
- return subMatch;
+ return _.find(partialMatch.inputs, i => name.indexOf(i.name) !== -1);
},
// ........................................................................ misc
@@ -154,7 +153,7 @@ JobListItemView.prototype.templates = (() => {
'<%- view.tool.name %> ',
"",
'',
- '
<%- view.tool.description %> <%- view.tool.description %>',
'
',
" ",
_l("Created"),
@@ -169,7 +168,7 @@ JobListItemView.prototype.templates = (() => {
var subtitleTemplate = BASE_MVC.wrapTemplate(
[
'',
- '
<%- view.tool.description %> <%- view.tool.description %>',
//'
',
// ' ', _l( 'Created' ), ': <%= new Date( job.create_time ).toString() %>, ',
//'
<% if (item.get("message")) { %>
- Message
+ Description
<%= _.escape(item.get("message")) %>
<% } %>
diff --git a/client/galaxy/scripts/mvc/library/library-folderlist-view.js b/client/galaxy/scripts/mvc/library/library-folderlist-view.js
index 55d210fb633..1b6c271f99c 100644
--- a/client/galaxy/scripts/mvc/library/library-folderlist-view.js
+++ b/client/galaxy/scripts/mvc/library/library-folderlist-view.js
@@ -25,7 +25,9 @@ var FolderListView = Backbone.View.extend({
"click .folder_row": "selectClickedRow",
"click .sort-folder-name": "sortColumnClicked",
"click .sort-folder-file_ext": "sortColumnClicked",
- "click .sort-folder-description": "sortColumnClicked",
+ "click .sort-folder-message": "sortColumnClicked",
+ "click .sort-folder-update_time": "sortColumnClicked",
+ "click .sort-folder-raw_size": "sortColumnClicked",
"click .sort-folder-state": "sortColumnClicked"
},
@@ -275,6 +277,21 @@ var FolderListView = Backbone.View.extend({
this.renderSortIcon();
},
+ /**
+ * In case the search_term is not empty perform the search and render
+ * the result. Render all visible folder items otherwise.
+ * @param {string} search_term string to search for
+ */
+ searchFolder: function(search_term) {
+ const trimmed_term = $.trim(search_term);
+ if (trimmed_term !== "") {
+ const result_collection = this.folder_container.search(search_term);
+ this.collection.reset(result_collection);
+ } else {
+ this.paginate();
+ }
+ },
+
/**
* User clicked the checkbox in the table heading
* @param {context} event
@@ -337,10 +354,11 @@ var FolderListView = Backbone.View.extend({
},
renderSortIcon: function() {
+ $('[class*="sort-icon"]')
+ .removeClass("fa-sort-alpha-desc")
+ .removeClass("fa-sort-alpha-asc");
+
if (this.current_sort_order === "asc") {
- $('[class*="sort-icon"]')
- .removeClass("fa-sort-alpha-desc")
- .removeClass("fa-sort-alpha-asc");
$(`.sort-icon-${this.current_sort_key}`).addClass("fa-sort-alpha-asc");
} else {
$(`.sort-icon-${this.current_sort_key}`).addClass("fa-sort-alpha-desc");
@@ -463,7 +481,7 @@ var FolderListView = Backbone.View.extend({
<%- path_item[1] %>
-
+
<% } else { %>
@@ -484,24 +502,29 @@ var FolderListView = Backbone.View.extend({
Name
-
+
- Description
-
+ Description
+
Data Type
-
+
+
+
+ Size
+
+
+
+ Time Updated (UTC)
+
- Size
- Time Updated (UTC)
State
-
+
-
+
diff --git a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js
index b3d5ec39d6d..9be70b78858 100644
--- a/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js
+++ b/client/galaxy/scripts/mvc/library/library-foldertoolbar-view.js
@@ -25,7 +25,8 @@ var FolderToolbarView = Backbone.View.extend({
"click .toolbtn-show-locinfo": "showLocInfo",
"keydown .page_size": "changePageSize",
"blur .page_size": "changePageSize",
- "click .toolbtn-collection-import": "showCollectionSelect"
+ "click .toolbtn-collection-import": "showCollectionSelect",
+ "keyup .folder-search-input": "searchFolder"
},
defaults: {
@@ -210,10 +211,12 @@ var FolderToolbarView = Backbone.View.extend({
}
},
+ /**
+ * This function returns a promise
+ */
fetchUserHistories: function() {
this.histories = new mod_library_model.GalaxyHistories();
- var promise = this.histories.fetch();
- return promise;
+ return this.histories.fetch();
},
importAllIntoHistory: function() {
@@ -238,9 +241,11 @@ var FolderToolbarView = Backbone.View.extend({
}
},
+ /**
+ * This function returns a promise
+ */
createNewHistory: function(new_history_name) {
- var promise = $.post(`${getAppRoot()}api/histories`, { name: new_history_name });
- return promise;
+ return $.post(`${getAppRoot()}api/histories`, { name: new_history_name });
},
processImportToHistory: function(history_id, history_name) {
@@ -1416,6 +1421,17 @@ var FolderToolbarView = Backbone.View.extend({
return hdca.save(options);
},
+ /**
+ * Take the contents of the search field and send it to the list view
+ * to query the collection of folder items.
+ */
+ searchFolder: function(event) {
+ const Galaxy = getGalaxyInstance();
+ const search_term = $(".folder-search-input").val();
+ this.options.search_term = search_term;
+ Galaxy.libraries.folderListView.searchFolder(search_term);
+ },
+
templateToolBar: function() {
return _.template(
`
@@ -1425,6 +1441,7 @@ var FolderToolbarView = Backbone.View.extend({