`;
@@ -91,8 +89,7 @@ export default {
}
// create header elements
- for (var i in options.columns) {
- var column = options.columns[i];
+ for (let column of options.columns) {
if (column.visible) {
tmpl += `
`;
if (column.href) {
@@ -115,23 +112,16 @@ export default {
body: function(options) {
// initialize
var tmpl = "";
- var num_rows_rendered = 0;
var items_length = options.items.length;
// empty grid?
- if (items_length == 0) {
+ if (items_length === 0) {
// No results.
tmpl += '
No Items
';
- num_rows_rendered = 1;
}
// create rows
- for (var i in options.items) {
- // encode ids
- var item = options.items[i];
- var encoded_id = item.encode_id;
- var popupmenu_id = `grid-${i}-popup`;
-
+ for (let item of options.items) {
// Tag current
tmpl += "
`;
}
// Data columns
- for (var j in options.columns) {
- var column = options.columns[j];
+ for (let column of options.columns) {
if (column.visible) {
// Nowrap
var nowrap = "";
@@ -173,9 +162,9 @@ export default {
var id = "";
var cls = "";
if (column.attach_popup) {
- id = `grid-${i}-popup`;
+ id = `grid-${item.encode_id}-popup`;
cls = "menubutton";
- if (link != "") {
+ if (link !== "") {
cls += " split";
}
cls += " popup";
@@ -186,25 +175,22 @@ export default {
// Link
if (link) {
- if (options.operations.length != 0) {
+ if (options.operations.length !== 0) {
tmpl += `
";
- num_rows_rendered++;
}
return tmpl;
},
@@ -247,7 +233,7 @@ export default {
// Second and final pass on min page to add any unused
// offset from max to min.
- if (max_offset != 0) {
+ if (max_offset !== 0) {
min_page -= max_offset;
if (min_page < 1) {
min_page = 1;
@@ -271,44 +257,36 @@ export default {
if (page_index == options.cur_page_num) {
tmpl += `${page_index}`;
} else {
- tmpl += `${
- page_index
- }`;
+ tmpl += `${page_index}`;
}
}
// show last page
if (max_page < num_pages) {
- tmpl += `...${
- num_pages
- }`;
+ tmpl += `...${num_pages}`;
}
tmpl += "";
// Show all link
- tmpl +=
- ' | Show All' +
- "" +
- "";
+ tmpl += `
+ | Show All
+
+ `;
}
// Grid operations for multiple items.
if (options.show_item_checkboxes) {
// start template
- tmpl +=
- "
" +
- '' +
- "
" +
- '
' +
- 'For selected items: ';
+ tmpl += `
+
+
+
+
+ For selected items:
+ `;
// configure buttons for operations
- for (var i in options.operations) {
- var operation = options.operations[i];
+ for (let operation of options.operations) {
if (operation.allow_multiple) {
tmpl += `" + '
';
- for (i in options.operations) {
- var operation = options.operations[i];
+ for (let operation of options.operations) {
if (operation.global_operation) {
tmpl += `${operation.label}`;
}
@@ -375,8 +352,7 @@ export default {
// identify columns with advanced filtering
var show_advanced_search_link = false;
- for (var i in options.columns) {
- var column = options.columns[i];
+ for (let column of options.columns) {
if (column.filterable == "advanced") {
var column_key = column.key;
var f_key = filters[column_key];
@@ -397,13 +373,10 @@ export default {
//
// standard search
//
- var tmpl = `
`;
+ var tmpl = `
`;
// add standard filters
- for (var i in options.columns) {
- var column = options.columns[i];
+ for (let column of options.columns) {
if (column.filterable == "standard") {
tmpl += this.grid_column_filter(options, column);
}
@@ -423,13 +396,10 @@ export default {
//
// advanced search
//
- tmpl += `
`;
}
});
this.$(".select2-container .select2-search input").off("blur");
} else {
this.$select.find("option").remove();
_.each(this.data, option => {
- self.$select.append(
+ this.$select.append(
$("")
.attr("value", option.value)
.html(_.escape(option.label))
);
});
}
- this.model.set("disabled", this.model.get("readonly") || this.length() == 0);
+ this.model.set("disabled", this.model.get("readonly") || this.length() === 0);
this._changeValue();
},
@@ -252,7 +266,9 @@ var View = Backbone.View.extend({
/** Return/Set current selection */
value: function(new_value) {
- new_value !== undefined && this.model.set("value", new_value);
+ if (new_value !== undefined) {
+ this.model.set("value", new_value);
+ }
return this._getValue();
},
@@ -311,9 +327,13 @@ var View = Backbone.View.extend({
/** Update all available options at once */
add: function(options, sorter) {
_.each(this.model.get("data"), v => {
- v.keep && !_.findWhere(options, { value: v.value }) && options.push(v);
+ if (v.keep && !_.findWhere(options, { value: v.value })) {
+ options.push(v);
+ }
});
- sorter && options && options.sort(sorter);
+ if (sorter && options) {
+ options.sort(sorter);
+ }
this.model.set("data", options);
},
@@ -334,7 +354,6 @@ var View = Backbone.View.extend({
/** Set value to dom */
_setValue: function(new_value) {
- var self = this;
if (new_value === null || new_value === undefined) {
new_value = "__null__";
}
@@ -351,8 +370,10 @@ var View = Backbone.View.extend({
if ($.isArray(new_value)) {
var val = [];
_.each(new_value, v => {
- var d = _.findWhere(self.data2, { id: v });
- d && val.push(d);
+ var d = _.findWhere(this.data2, { id: v });
+ if (d) {
+ val.push(d);
+ }
});
new_value = val;
} else {
diff --git a/client/galaxy/scripts/mvc/ui/ui-select-library.js b/client/galaxy/scripts/mvc/ui/ui-select-library.js
index f84c84434db..908fa910dce 100644
--- a/client/galaxy/scripts/mvc/ui/ui-select-library.js
+++ b/client/galaxy/scripts/mvc/ui/ui-select-library.js
@@ -1,8 +1,7 @@
// dependencies
-import Utils from "utils/utils";
import Ui from "mvc/ui/ui-misc";
-import Table from "mvc/ui/ui-table";
import List from "mvc/ui/ui-list";
+
// collection of libraries
var Libraries = Backbone.Collection.extend({
url: `${Galaxy.root}api/libraries?deleted=false`
@@ -85,7 +84,9 @@ var View = Backbone.View.extend({
// add change event. fires on trigger
this.on("change", () => {
- options.onchange && options.onchange(self.value());
+ if (options.onchange) {
+ options.onchange(self.value());
+ }
});
// create elements
diff --git a/client/galaxy/scripts/mvc/user/user-preferences.js b/client/galaxy/scripts/mvc/user/user-preferences.js
index 277b9618515..ea92b5dfb50 100644
--- a/client/galaxy/scripts/mvc/user/user-preferences.js
+++ b/client/galaxy/scripts/mvc/user/user-preferences.js
@@ -62,7 +62,7 @@ var Model = Backbone.Model.extend({
description: _l("Associate OpenIDs with your account."),
icon: "fa-openid",
onclick: function() {
- window.location.href = `${Galaxy.root}user/openid_manage?cntrller=user&use_panels=True`;
+ window.location.href = `${Galaxy.root}openids/list`;
}
},
custom_builds: {
diff --git a/client/galaxy/scripts/mvc/workflow/workflow-canvas.js b/client/galaxy/scripts/mvc/workflow/workflow-canvas.js
index fe3eed53995..33e64640541 100644
--- a/client/galaxy/scripts/mvc/workflow/workflow-canvas.js
+++ b/client/galaxy/scripts/mvc/workflow/workflow-canvas.js
@@ -106,7 +106,7 @@ $.extend(CanvasManager.prototype, {
// If it appears that the user is trying to copy/paste text, we
// pass that through.
if (window.getSelection().toString() === "") {
- if (this.app.workflow.active_node) {
+ if (this.app.workflow.active_node && this.app.workflow.active_node.type !== "subworkflow") {
e.clipboardData.setData(
"application/json",
JSON.stringify({
diff --git a/client/galaxy/scripts/mvc/workflow/workflow-manager.js b/client/galaxy/scripts/mvc/workflow/workflow-manager.js
index 35b8d79890d..8ea13a65345 100644
--- a/client/galaxy/scripts/mvc/workflow/workflow-manager.js
+++ b/client/galaxy/scripts/mvc/workflow/workflow-manager.js
@@ -35,9 +35,7 @@ $.extend(Workflow.prototype, {
}
if (!this.canLabelOutputWith(toLabel)) {
Toastr.warning(
- `Workflow contains duplicate workflow output labels ${
- toLabel
- }. This must be fixed before it can be saved.`
+ `Workflow contains duplicate workflow output labels ${toLabel}. This must be fixed before it can be saved.`
);
}
if (toLabel) {
diff --git a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js
index dc1a6604303..aa6ef7451ed 100644
--- a/client/galaxy/scripts/mvc/workflow/workflow-terminals.js
+++ b/client/galaxy/scripts/mvc/workflow/workflow-terminals.js
@@ -8,10 +8,10 @@ function CollectionTypeDescription(collectionType) {
var NULL_COLLECTION_TYPE_DESCRIPTION = {
isCollection: false,
- canMatch: function(other) {
+ canMatch: function() {
return false;
},
- canMapOver: function(other) {
+ canMapOver: function() {
return false;
},
toString: function() {
@@ -30,13 +30,13 @@ var ANY_COLLECTION_TYPE_DESCRIPTION = {
canMatch: function(other) {
return NULL_COLLECTION_TYPE_DESCRIPTION !== other;
},
- canMapOver: function(other) {
+ canMapOver: function() {
return false;
},
toString: function() {
return "AnyCollectionType[]";
},
- append: function(otherCollectionType) {
+ append: function() {
throw "Cannot append to ANY_COLLECTION_TYPE_DESCRIPTION";
},
equal: function(other) {
@@ -50,7 +50,7 @@ $.extend(CollectionTypeDescription.prototype, {
return this;
}
if (otherCollectionTypeDescription === ANY_COLLECTION_TYPE_DESCRIPTION) {
- return otherCollectionType;
+ return otherCollectionTypeDescription;
}
return new CollectionTypeDescription(`${this.collectionType}:${otherCollectionTypeDescription.collectionType}`);
},
@@ -143,7 +143,9 @@ var Terminal = Backbone.Model.extend({
},
destroyInvalidConnections: function() {
_.each(this.connectors, connector => {
- connector && connector.destroyIfInvalid();
+ if (connector) {
+ connector.destroyIfInvalid();
+ }
});
},
setMapOver: function(val) {
@@ -258,7 +260,7 @@ var BaseInputTerminal = Terminal.extend({
if (this._collectionAttached()) {
// Can only attach one collection to multiple input
// data parameter.
- inputsFilled = true;
+ inputFilled = true;
} else {
inputFilled = false;
}
@@ -317,17 +319,17 @@ var BaseInputTerminal = Terminal.extend({
if (thisDatatype == "input") {
return true;
}
- var cat_outputs = new Array();
+ var cat_outputs = [];
cat_outputs = cat_outputs.concat(other.datatypes);
if (other.node.post_job_actions) {
for (var pja_i in other.node.post_job_actions) {
var pja = other.node.post_job_actions[pja_i];
if (
pja.action_type == "ChangeDatatypeAction" &&
- (pja.output_name == "" || pja.output_name == other.name) &&
+ (pja.output_name === "" || pja.output_name == other.name) &&
pja.action_arguments
) {
- cat_outputs.push(pja.action_arguments["newtype"]);
+ cat_outputs.push(pja.action_arguments.newtype);
}
}
}
diff --git a/client/galaxy/scripts/mvc/workflow/workflow-view.js b/client/galaxy/scripts/mvc/workflow/workflow-view.js
index 14fcfb836cc..d352f0f31c2 100644
--- a/client/galaxy/scripts/mvc/workflow/workflow-view.js
+++ b/client/galaxy/scripts/mvc/workflow/workflow-view.js
@@ -277,9 +277,7 @@ export default Backbone.View.extend({
if (upgrade_message) {
window.show_modal(
"Issues loading this workflow",
- `Please review the following issues, possibly resulting from tool upgrades or changes.
${
- upgrade_message
- }
`,
+ `Please review the following issues, possibly resulting from tool upgrades or changes.
${upgrade_message}
`,
{ Continue: hide_modal }
);
} else {
@@ -560,9 +558,7 @@ export default Backbone.View.extend({
if (upgrade_message) {
window.show_modal(
"Subworkflow embedded with changes",
- `Problems were encountered loading this workflow (possibly a result of tool upgrades). Please review the following parameters and then save.
${
- upgrade_message
- }
`,
+ `Problems were encountered loading this workflow (possibly a result of tool upgrades). Please review the following parameters and then save.
${upgrade_message}
`,
{ Continue: hide_modal }
);
} else {
@@ -764,13 +760,15 @@ export default Backbone.View.extend({
// Fix width to computed width
// Now add floats
var buttons = $("");
- buttons.append(
- $("")
- .addClass("fa-icon-button fa fa-files-o")
- .click(e => {
- node.clone();
- })
- );
+ if (type !== "subworkflow") {
+ buttons.append(
+ $("")
+ .addClass("fa-icon-button fa fa-files-o")
+ .click(e => {
+ node.clone();
+ })
+ );
+ }
buttons.append(
$("")
.addClass("fa-icon-button fa fa-times")
diff --git a/client/galaxy/scripts/mvc/workflow/workflow.js b/client/galaxy/scripts/mvc/workflow/workflow.js
index 22e82bdcf86..0fed312b841 100644
--- a/client/galaxy/scripts/mvc/workflow/workflow.js
+++ b/client/galaxy/scripts/mvc/workflow/workflow.js
@@ -5,7 +5,7 @@ import WORKFLOWS from "mvc/workflow/workflow-model";
import QueryStringParsing from "utils/query-string-parsing";
import _l from "utils/localization";
/** View of the individual workflows */
-var WorkflowItemView = Backbone.View.extend({
+const WorkflowItemView = Backbone.View.extend({
tagName: "tr", // name of (orphan) root tag in this.el
initialize: function() {
_.bindAll(
@@ -33,15 +33,20 @@ var WorkflowItemView = Backbone.View.extend({
},
showInToolPanel: function() {
- this.model.set("show_in_tool_panel", !this.model.get("show_in_tool_panel"));
- this.model.save();
// This reloads the whole page, so that the workflow appears in the tool panel.
// Ideally we would notify only the tool panel of a change
- window.location = `${Galaxy.root}workflows/list`;
+ this.model.save(
+ { show_in_tool_panel: !this.model.get("show_in_tool_panel") },
+ {
+ success: function() {
+ window.location = `${Galaxy.root}workflows/list`;
+ }
+ }
+ );
},
removeWorkflow: function() {
- var wfName = this.model.get("name");
+ const wfName = this.model.get("name");
if (window.confirm(`Are you sure you want to delete workflow '${wfName}'?`)) {
this.model.destroy({
success: function() {
@@ -53,8 +58,8 @@ var WorkflowItemView = Backbone.View.extend({
},
renameWorkflow: function() {
- var oldName = this.model.get("name");
- var newName = window.prompt(`Enter a new Name for workflow '${oldName}'`, oldName);
+ const oldName = this.model.get("name");
+ const newName = window.prompt(`Enter a new Name for workflow '${oldName}'`, oldName);
if (newName) {
this.model.save(
{ name: newName },
@@ -69,16 +74,15 @@ var WorkflowItemView = Backbone.View.extend({
},
copyWorkflow: function() {
- var self = this;
- var oldName = this.model.get("name");
+ const oldName = this.model.get("name");
$.getJSON(`${this.model.urlRoot}/${this.model.id}/download`, wfJson => {
- var newName = `Copy of ${oldName}`;
- var currentOwner = self.model.get("owner");
+ let newName = `Copy of ${oldName}`;
+ const currentOwner = this.model.get("owner");
if (currentOwner != Galaxy.user.attributes.username) {
newName += ` shared by user ${currentOwner}`;
}
wfJson.name = newName;
- self.collection.create(wfJson, {
+ this.collection.create(wfJson, {
at: 0,
wait: true,
success: function() {
@@ -96,16 +100,14 @@ var WorkflowItemView = Backbone.View.extend({
},
_rowTemplate: function() {
- var show = this.model.get("show_in_tool_panel");
- var wfId = this.model.id;
- var checkboxHtml = ``;
- var trHtml = `
`;
},
/** Main template */
@@ -343,7 +340,7 @@ var WorkflowListView = Backbone.View.extend({
}
});
-var ImportWorkflowView = Backbone.View.extend({
+const ImportWorkflowView = Backbone.View.extend({
initialize: function() {
this.setElement("");
this.render();
@@ -351,9 +348,8 @@ var ImportWorkflowView = Backbone.View.extend({
/** Open page to import workflow */
render: function() {
- var self = this;
$.getJSON(`${Galaxy.root}workflow/upload_import_workflow`, options => {
- self.$el.empty().append(self._mainTemplate(options));
+ this.$el.empty().append(this._mainTemplate(options));
});
},
diff --git a/client/galaxy/scripts/nls/zh/locale.js b/client/galaxy/scripts/nls/zh/locale.js
index 840922b1e7e..fdc298ea70d 100644
--- a/client/galaxy/scripts/nls/zh/locale.js
+++ b/client/galaxy/scripts/nls/zh/locale.js
@@ -1,169 +1,244 @@
/** zh localization */
+/* by steven shen */
define({
+ // ----------------------------------------------------------------------------- masthead
+ "Analyze Data": "数据分析",
+ Workflow: "流程",
+ "Shared Data": "共享的数据",
+ "Data Libraries": "数据库",
+ Histories: "已发布的历史",
+ Workflows: "已发布的流程",
+ Visualizations: "已发布的可视化",
+ Pages: "已发布的页面",
+ Visualization: "可视化",
+ "New Track Browser": "创建 Track Browser",
+ "Saved Visualizations": "已保存的保存",
+ "Interactive Environments": "交互式环境",
+ Admin: "管理员",
+ Help: "帮助",
+ Support: "支持",
+ Search: "搜索",
+ "Mailing Lists": "邮件列表",
+ Videos: "视频",
+ Wiki: false,
+ "How to Cite Galaxy": "引用",
+ "Interactive Tours": "使用引导",
+ User: "用户",
+ Login: "登陆",
+ Register: "注册",
+ "Login or Register": "登陆或注册",
+ "Logged in as": "您已登陆为",
+ Preferences: "用户偏好性",
+ "Custom Builds": "自定义构建集",
+ Logout: "退出",
+ "Saved Histories": "保存历史",
+ "Saved Datasets": "保存数据集",
+ "Saved Pages": "保存页面",
+
+ //Tooltip
+ "Account and saved data": "账号及数据保存",
+ "Account registration or login": "注册与登录",
+ "Support, contact, and community": "支持,联系,社区",
+ "Administer this Galaxy": "管理您的Galaxy",
+ "Visualize datasets": "数据集可视化",
+ "Access published resources": "访问发布的资源",
+ "Chain tools into workflows": "将工具链接到工作流程中",
+ "Analysis home view": "数据分析主页",
+
// ---------------------------------------------------------------------------- histories
+ // ---- history/options-menu
+ "History Lists": "历史列表",
+ // Saved histories is defined above.
+ "Saved Histories": "保存历史",
+ "Histories Shared with Me": "分享给您历史",
+ "Current History": "当前历史",
+ "Create New": "创建新的历史",
+ "Copy History": "复制历史",
+ "Share or Publish": "分享或发布历史",
+ "Show Structure": "展示结构",
+ "Extract Workflow": "提取为工作流",
+ // Delete is defined elsewhere, but is also in this menu.
+ Delete: "删除",
+ "Delete Permanently": "永久删除",
+ "Dataset Actions": "数据操作",
+ "Copy Datasets": "复制数据集",
+ "Dataset Security": "数据安全",
+ "Resume Paused Jobs": "恢复已暂停的任务",
+ "Collapse Expanded Datasets": false,
+ "Unhide Hidden Datasets": "取消隐藏的数据集",
+ "Delete Hidden Datasets": "删除隐藏的数据集",
+ "Purge Deleted Datasets": "清空已删除的数据集",
+ Downloads: "下载",
+ "Export Tool Citations": "导出工具文献引用",
+ "Export History to File": "导出历史到文件",
+ "Other Actions": "其他操作",
+ "Import from File": "从文件导入",
+ Webhooks: false,
+
// ---- history-model
// ---- history-view
"This history is empty": "历史已空",
"No matching datasets found": "未找到匹配的数据集",
- //"An error occurred while getting updates from the server" :
- //false,
- //"Please contact a Galaxy administrator if the problem persists" :
- //false,
+ "An error occurred while getting updates from the server": "从服务器更新出现错误",
+ "Please contact a Galaxy administrator if the problem persists": "如果问题仍然存在,请联系Galaxy管理员",
//TODO:
- //"An error was encountered while <% where %>" :
- //false,
- "Search datasets": "搜索数据集",
- "You are currently viewing a deleted history!": "正在查看已删除的历史",
- "You are over your disk quota": "您已超过磁盘配额",
- //"Tool execution is on hold until your disk usage drops below your allocated quota" :
- //false,
- All: "皆",
+ "An error was encountered while <% where %>": "出现错误,当执行以下操作时: <% where %>",
+ "search datasets": "搜索数据集",
+ "You are currently viewing a deleted history!": "您正在查看已删除的历史记录",
+ "You are over your disk quota": "您超出了您的磁盘配额",
+ "Tool execution is on hold until your disk usage drops below your allocated quota":
+ "工具执行处于暂停状态,直到您的磁盘使用量低于您分配的配额",
+ All: "所有的",
None: "一个也没有",
"For all selected": "为每个选定",
// ---- history-view-edit
- //"Edit history tags" :
- //false,
- //"Edit history Annotation" :
- //false,
+ "Edit history tags": "编辑历史标签",
+ "Edit history Annotation": "编辑历史备注",
"Click to rename history": "单击要重命名的历史",
// multi operations
"Operations on multiple datasets": "编辑多个数据集",
- //"Hide datasets" :
- //false,
- //"Unhide datasets" :
- //false,
- //"Delete datasets" :
- //false,
- //"Undelete datasets" :
- //false,
+ "Hide datasets": "隐藏数据集",
+ "Unhide datasets": "显示数据集",
+ "Delete datasets": "删除数据集",
+ "Undelete datasets": "取消删除数据集",
"Permanently delete datasets": "永久删除数据集",
- "This will permanently remove the data in your datasets. Are you sure?": "这将永久在你的数据集删除数据。你确定?",
+ "This will permanently remove the data in your datasets. Are you sure?": "这将永久在您的数据集删除数据。你确定?",
// ---- history-view-annotated
- Dataset: "数据集",
- //"Annotation" :
- //false,
+ Dataset: "数据",
+ Annotation: "备注",
// ---- history-view-edit-current
"This history is empty. Click 'Get Data' on the left tool menu to start": "历史已空,请单击左边窗格中‘获取数据’",
"You must be logged in to create histories": "你必须登录后才能创建历史",
//TODO:
- //"You can <% loadYourOwn %> or <% externalSource %>" :
+ "You can ": "您可以 ",
+ " or ": " 或者 ",
+ "load your own data": "上传您的个人数据",
+ "get data from an external source": "从外部来源获取数据",
+
+ // these aren't in zh/ginga.po and the template doesn't localize
+ //"Include Deleted Datasets" :
//false,
- //"load your own data" :
- //false,
- //"get data from an external source" :
+ //"Include Hidden Datasets" :
//false,
// ---------------------------------------------------------------------------- datasets
// ---- hda-model
- //"Unable to purge dataset" :
- //false,
+ "Unable to purge dataset": "无法清除数据集",
// ---- hda-base
// display button
- //"Cannot display datasets removed from disk" :
- //false,
- //"This dataset must finish uploading before it can be viewed" :
- //false,
- //"This dataset is not yet viewable" :
- //false,
- "View data": "数据",
+ "Cannot display datasets removed from disk": "无法显示已从磁盘中删除的数据集",
+ "This dataset must finish uploading before it can be viewed": "此数据集必须先完成上传, 然后才能查看",
+ "This dataset is not yet viewable": "此数据集是不可见的",
+ "View data": "查看数据",
// download button
Download: "下载",
"Download dataset": "下载数据集",
- //"Additional files" :
- //false,
+ "Additional files": "其他文件",
// info/show_params
"View details": "查看详情",
// dataset states
// state: new
- //"This is a new dataset and not all of its data are available yet" :
- //false,
+ "This is a new dataset and not all of its data are available yet": "这是一个新的数据集,并不是所有的数据都可用",
// state: noPermission
- //"You do not have permission to view this dataset" :
- //false,
+ "You do not have permission to view this dataset": "您无权查看此数据集",
// state: discarded
- //"The job creating this dataset was cancelled before completion" :
- //false,
+ "The job creating this dataset was cancelled before completion": "创建此数据集的任务在完成之前已被取消",
// state: queued
- "This job is waiting to run": "等待运行的进程",
+ "This job is waiting to run": "任务正在等待运行",
// state: upload
- //"This dataset is currently uploading" :
- //false,
+ "This dataset is currently uploading": "此数据集正在上传中",
// state: setting_metadata
- //"Metadata is being auto-detected" :
- //false,
+ "Metadata is being auto-detected": "元数据正在被自动检测中",
// state: running
- "This job is currently running": "正在运行的进程",
+ "This job is currently running": "任务正在运行中",
// state: paused
- //"This job is paused. Use the \"Resume Paused Jobs\" in the history menu to resume" :
- //false,
+ 'This job is paused. Use the "Resume Paused Jobs" in the history menu to resume':
+ '此任务已暂停。使用历史菜单中的 "恢复已暂停的工作" 来恢复',
// state: error
- "An error occurred with this dataset": "进程运行时出错",
+ "An error occurred with this dataset": "此数据集发生错误",
// state: empty
"No data": "没有数据",
// state: failed_metadata
- //"An error occurred setting the metadata for this dataset" :
- //false,
+ "An error occurred setting the metadata for this dataset": "设置此数据集的元数据时发生错误",
// ajax error prefix
- //"There was an error getting the data for this dataset" :
- //false,
+ "There was an error getting the data for this dataset": "获取此数据集的数据时出错",
// purged'd/del'd msg
- //"This dataset has been deleted and removed from disk" :
- //false,
+ "This dataset has been deleted and removed from disk": "此数据集已被删除并从磁盘中删除",
"This dataset has been deleted": "此数据集已被删除",
- "This dataset has been hidden": "此数据集已隐藏",
+ "This dataset has been hidden": "此数据集已被隐藏",
format: "格式",
database: "数据库",
// ---- hda-edit
"Edit attributes": "编辑属性",
- //"Cannot edit attributes of datasets removed from disk" :
- //false,
- //"Undelete dataset to edit attributes" :
- //false,
- //"This dataset must finish uploading before it can be edited" :
- //false,
- //"This dataset is not yet editable" :
- //false,
+ "Cannot edit attributes of datasets removed from disk": "无法编辑已从磁盘中删除的数据集的属性",
+ "Undelete dataset to edit attributes": "取消删除数据集以编辑属性",
+ "This dataset must finish uploading before it can be edited": "该数据集必须先上传完成, 然后才能编辑",
+ "This dataset is not yet editable": "该数据集不可编辑",
Delete: "删除",
- //"Dataset is already deleted" :
- //false,
+ "Dataset is already deleted": "数据集已被删除",
- "View or report this error": "报告错误",
+ "View or report this error": "查看或报告此错误",
- "Run this job again": "重新运行",
+ "Run this job again": "重新运行此任务",
- Visualize: "图形",
- //"Visualize in" :
- //false,
+ Visualize: "可视化",
+ "Visualize in": "的可视化",
- "Undelete it": "反删除",
+ "Undelete it": "取消删除",
"Permanently remove it from disk": "从磁盘中永久删除",
- "Unhide it": "取消隐藏"
+ "Unhide it": "取消隐藏",
- //"You may be able to" :
- //false,
- //"set it manually or retry auto-detection" :
- //false,
+ "You may be able to": "您可能可以",
+ "set it manually or retry auto-detection": "手动设置或重试自动检测",
- //"Edit dataset tags" :
- //false,
- //"Edit dataset annotation" :
- //false,
+ "Edit dataset tags": "编辑数据集标签",
+ "Edit dataset annotation": "编辑数据集备注",
+
+ "Tool Help": "工具帮助",
+
+ // ---------------------------------------------------------------------------- admin
+ "Search Tool Shed": "搜索 Tool Shed",
+ "Monitor installing repositories": "",
+ "Manage installed tools": "管理已安装的工具",
+ "Reset metadata": "重置元数据",
+ "Download local tool": "下载本地工具",
+ "Tool lineage": false,
+ "Reload a tool's configuration": "重新加载工具的配置",
+ "Review tool migration stages": "查看工具迁移状态",
+ "View Tool Error Logs": "查看工具错误日志",
+ "Manage Display Whitelist": "管理显示白名单",
+ "Manage Tool Dependencies": "管理工具依赖",
+ Users: "用户",
+ Groups: "组别",
+ "API keys": false,
+ "Impersonate a user": "模拟用户",
+ Data: "数据",
+ Quotas: "配额",
+ Roles: "角色",
+ "Local data": "本地数据",
+ "Form Definitions": "定义表单",
+
+ // ---------------------------------------------------------------------------- Scratchbook
+ "Enable/Disable Scratchbook": "启用/禁用 Scratchbook",
+ "Show/Hide Scratchbook": "显示/隐藏 Scratchbook",
// ---------------------------------------------------------------------------- misc. MVC
- //"Tags" :
- //false,
- //"Annotation" :
- //false,
- //"Edit annotation" :
- //false,
+ Tags: "标签",
+ "Edit annotation": "编辑备注",
+
+ // ----------------------------------------------------------------------------
+
+ ja: true,
+ fr: true,
+ zh: true
});
diff --git a/client/galaxy/scripts/onload.js b/client/galaxy/scripts/onload.js
index 7ab257568f8..7af85c6fe35 100644
--- a/client/galaxy/scripts/onload.js
+++ b/client/galaxy/scripts/onload.js
@@ -19,13 +19,12 @@ import layout_modal from "layout/modal";
_.extend(window, layout_modal);
import async_save_text from "utils/async-save-text";
window.async_save_text = async_save_text;
-import POPUPMENU from "ui/popupmenu";
-window.make_popupmenu = POPUPMENU.make_popupmenu;
-window.make_popup_menus = POPUPMENU.make_popup_menus;
+import Popupmenu from "ui/popupmenu";
+window.make_popupmenu = Popupmenu.make_popupmenu;
+window.make_popup_menus = Popupmenu.make_popup_menus;
import init_tag_click_function from "ui/autocom_tagging";
window.init_tag_click_function = init_tag_click_function;
-import TOURS from "mvc/tours";
-import QUERY_STRING from "utils/query-string-parsing";
+import Tours from "mvc/tours";
// console.debug( 'galaxy globals loaded' );
// ============================================================================
@@ -89,10 +88,7 @@ function init_refresh_on_change() {
.change(function() {
var select_field = $(this);
var select_val = select_field.val();
- var refresh = false;
-
var ref_on_change_vals = select_field.attr("refresh_on_change_values");
-
if (ref_on_change_vals) {
ref_on_change_vals = ref_on_change_vals.split(",");
var last_selected_value = select_field.attr("last_selected_value");
@@ -114,10 +110,7 @@ function init_refresh_on_change() {
.click(function() {
var select_field = $(this);
var select_val = select_field.val();
- var refresh = false;
-
var ref_on_change_vals = select_field.attr("refresh_on_change_values");
-
if (ref_on_change_vals) {
ref_on_change_vals = ref_on_change_vals.split(",");
var last_selected_value = select_field.attr("last_selected_value");
@@ -156,7 +149,7 @@ $(document).ready(() => {
$("[title]").tooltip();
}
// Make popup menus.
- make_popup_menus();
+ Popupmenu.make_popup_menus();
// Replace big selects.
replace_big_select_inputs(20, 1500);
@@ -165,7 +158,7 @@ $(document).ready(() => {
// add use_panels=True and set target to self.
$("a").click(function() {
var anchor = $(this);
- var galaxy_main_exists = parent.frames && parent.frames.galaxy_main;
+ var galaxy_main_exists = window.parent.frames && window.parent.frames.galaxy_main;
if (anchor.attr("target") == "galaxy_main" && !galaxy_main_exists) {
var href = anchor.attr("href");
if (href.indexOf("?") == -1) {
@@ -180,44 +173,26 @@ $(document).ready(() => {
return anchor;
});
- var et = JSON.parse(sessionStorage.getItem("activeGalaxyTour"));
- if (et) {
- et = TOURS.hooked_tour_from_data(et);
- if (et && et.steps) {
- if (window && window.self === window.top) {
- // Only kick off a new tour if this is the toplevel window (non-iframe). This
- // functionality actually *could* be useful, but we'd need to handle it better and
- // come up with some design guidelines for tours jumping between windows.
- // Disabling for now.
- var tour = new Tour(
- _.extend(
- {
- steps: et.steps
- },
- TOURS.tour_opts
- )
- );
- tour.init();
- tour.restart();
- }
- }
- }
+ Tours.activeGalaxyTourRunner();
function onloadWebhooks() {
- if (Galaxy.root !== undefined) {
- // Load all webhooks with the type 'onload'
- $.getJSON(`${Galaxy.root}api/webhooks/onload/all`, webhooks => {
- _.each(webhooks, webhook => {
- if (webhook.activate && webhook.script) {
- $("", { type: "text/javascript" })
- .text(webhook.script)
- .appendTo("head");
- $("", { type: "text/css" })
- .text(webhook.styles)
- .appendTo("head");
- }
+ // Wait until Galaxy.config is loaded.
+ if (Galaxy.config) {
+ if (Galaxy.config.enable_webhooks) {
+ // Load all webhooks with the type 'onload'
+ $.getJSON(`${Galaxy.root}api/webhooks/onload/all`, webhooks => {
+ _.each(webhooks, webhook => {
+ if (webhook.activate && webhook.script) {
+ $("", { type: "text/javascript" })
+ .text(webhook.script)
+ .appendTo("head");
+ $("", { type: "text/css" })
+ .text(webhook.styles)
+ .appendTo("head");
+ }
+ });
});
- });
+ }
} else {
setTimeout(onloadWebhooks, 100);
}
diff --git a/client/galaxy/scripts/reports_webapp/run_stats.js b/client/galaxy/scripts/reports/run_stats.js
similarity index 100%
rename from client/galaxy/scripts/reports_webapp/run_stats.js
rename to client/galaxy/scripts/reports/run_stats.js
diff --git a/client/galaxy/scripts/toolshed/groups/group-detail-view.js b/client/galaxy/scripts/toolshed/groups/group-detail-view.js
new file mode 100644
index 00000000000..6b215bb8518
--- /dev/null
+++ b/client/galaxy/scripts/toolshed/groups/group-detail-view.js
@@ -0,0 +1,138 @@
+import * as mod_toastr from "libs/toastr";
+import mod_group_model from "toolshed/groups/group-model";
+
+// toolshed group detail view
+const GroupDetailView = Backbone.View.extend({
+ el: "#groups_element",
+ options: {},
+ app: null,
+
+ initialize: function(options) {
+ this.options = _.extend(this.options, options);
+ this.app = window.globalTS.groups;
+
+ if (this.app.collection !== null) {
+ this.model = this.app.collection.get(this.options.group_id);
+ this.render();
+ } else {
+ this.fetchGroup();
+ }
+ },
+
+ fetchGroup: function(options) {
+ const that = this;
+ this.options = _.extend(this.options, options);
+ this.model = new mod_group_model.Group({ id: this.options.group_id });
+ this.model.fetch({
+ success: function(model) {
+ console.log("received data: ");
+ console.log(model);
+ that.render();
+ },
+ error: function(model, response) {
+ if (typeof response.responseJSON !== "undefined") {
+ mod_toastr.error(response.responseJSON.err_msg);
+ } else {
+ mod_toastr.error("An error occurred.");
+ }
+ }
+ });
+ },
+
+ render: function() {
+ const template = this.templateRow();
+ this.$el.html(template({ group: this.model }));
+ $("#center [data-toggle]").tooltip();
+ $("#center").css("overflow", "auto");
+ },
+
+ templateRow: function() {
+ return _.template(
+ [
+ "
",
+ '
<%= _.escape(group.get("name")) %>
',
+ '
',
+ 'A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined repository clones.
'
- ].join(''));
- }
-
+ ""
+ ].join("")
+ );
+ }
});
-return {
+export default {
GroupListRowView: GroupListRowView
};
-
-});
diff --git a/client/galaxy/scripts/toolshed/groups/group-model.js b/client/galaxy/scripts/toolshed/groups/group-model.js
new file mode 100644
index 00000000000..82185ba106f
--- /dev/null
+++ b/client/galaxy/scripts/toolshed/groups/group-model.js
@@ -0,0 +1,17 @@
+// ============================================================================
+// TS GROUP RELATED MODELS
+
+const Group = Backbone.Model.extend({
+ urlRoot: `${Galaxy.root}api/groups`
+});
+
+const Groups = Backbone.Collection.extend({
+ url: `${Galaxy.root}api/groups`,
+
+ model: Group
+});
+
+export default {
+ Group: Group,
+ Groups: Groups
+};
diff --git a/client/galaxy/scripts/toolshed/toolshed.groups.js b/client/galaxy/scripts/toolshed/toolshed.groups.js
new file mode 100644
index 00000000000..90c5e52fa22
--- /dev/null
+++ b/client/galaxy/scripts/toolshed/toolshed.groups.js
@@ -0,0 +1,42 @@
+// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
+// === MAIN TOOLSHED GROUP MODULE ====
+// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
+
+import mod_group_list from "toolshed/groups/group-list-view";
+import mod_group_detail from "toolshed/groups/group-detail-view";
+
+// ============================================================================
+// ROUTER
+const ToolshedRouter = Backbone.Router.extend({
+ routes: {
+ "": "groups",
+ ":group_id": "group_page"
+ }
+});
+
+const ToolshedGroups = Backbone.View.extend({
+ groupListView: null,
+ groupDetailView: null,
+ collection: null,
+
+ initialize: function() {
+ window.globalTS.groups = this;
+
+ this.ts_router = new ToolshedRouter();
+ this.ts_router.on("route:groups", () => {
+ window.globalTS.groups.groupListView = new mod_group_list.GroupListView();
+ });
+
+ this.ts_router.on("route:group_page", group_id => {
+ window.globalTS.groups.groupDetailView = new mod_group_detail.GroupDetailView({
+ group_id: group_id
+ });
+ });
+
+ Backbone.history.start({ pushState: false });
+ }
+});
+
+export default {
+ ToolshedGroups: ToolshedGroups
+};
diff --git a/client/galaxy/scripts/viz/circster.js b/client/galaxy/scripts/viz/circster.js
index c067896c55d..a246f2cf577 100644
--- a/client/galaxy/scripts/viz/circster.js
+++ b/client/galaxy/scripts/viz/circster.js
@@ -1,6 +1,7 @@
import _l from "utils/localization";
import * as _ from "libs/underscore";
-import * as d3 from "libs/d3";
+import * as d3 from "d3";
+import { event as currentEvent } from "d3";
import visualization from "viz/visualization";
import mod_utils from "utils/utils";
import config from "utils/config";
@@ -193,7 +194,6 @@ var CircsterView = Backbone.View.extend({
tracks_start_radii = d3.range(radius_start, min_dimension / 2, dataset_arc_height + track_gap);
// Map from track start to bounds.
- var self = this;
return _.map(tracks_start_radii, radius => [radius, radius + dataset_arc_height]);
},
@@ -221,8 +221,8 @@ var CircsterView = Backbone.View.extend({
.call(
d3.behavior.zoom().on("zoom", () => {
// Do zoom, drag.
- var scale = d3.event.scale;
- svg.attr("transform", `translate(${d3.event.translate}) scale(${scale})`);
+ var scale = currentEvent.scale;
+ svg.attr("transform", `translate(${currentEvent.translate}) scale(${scale})`);
// Propagate scale changes to views.
if (self.scale !== scale) {
@@ -628,7 +628,6 @@ var CircsterTrackView = Backbone.View.extend({
* default data bounds.
*/
_update_data_bounds: function(new_bounds) {
- var old_bounds = this.data_bounds;
this.data_bounds =
new_bounds || this.get_data_bounds(this.track.get("data_manager").get_genome_wide_data(this.genome));
this._transition_chrom_data();
@@ -962,7 +961,6 @@ var CircsterQuantitativeTrackView = CircsterTrackView.extend({
_data_bounds_ticks_fn: function() {
// Closure vars.
var self = this;
- visibleChroms = 0;
// Return function for locating ticks based on chrom arc data.
return (
@@ -1101,9 +1099,9 @@ var Circster = Backbone.View.extend({
// load css
mod_utils.cssLoadFile("static/style/circster.css");
// -- Configure visualization --
- var genome = new visualization.Genome(galaxy_config.app.genome);
+ var genome = new visualization.Genome(window.galaxy_config.app.genome);
- var vis = new visualization.GenomeVisualization(galaxy_config.app.viz_config);
+ var vis = new visualization.GenomeVisualization(window.galaxy_config.app.viz_config);
// Add Circster-specific config options.
vis.get("config").add([
@@ -1143,7 +1141,7 @@ var Circster = Backbone.View.extend({
// setup title
$("#center .unified-panel-header-inner").append(
- `${galaxy_config.app.viz_config.title} ${galaxy_config.app.viz_config.dbkey}`
+ `${window.galaxy_config.app.viz_config.title} ${window.galaxy_config.app.viz_config.dbkey}`
);
// setup menu
diff --git a/client/galaxy/scripts/viz/trackster.js b/client/galaxy/scripts/viz/trackster.js
index c8fe566fef7..2e800c2c6e9 100644
--- a/client/galaxy/scripts/viz/trackster.js
+++ b/client/galaxy/scripts/viz/trackster.js
@@ -2,13 +2,7 @@ import _l from "utils/localization";
/**
* Top-level trackster code, used for creating/loading visualizations and user interface elements.
*/
-
-// global variables
-var ui = null;
-var view = null;
-var browser_router = null;
-
-// trackster viewer
+//import * as $ from 'jquery';
import * as _ from "libs/underscore";
import tracks from "viz/trackster/tracks";
import visualization from "viz/visualization";
@@ -25,6 +19,12 @@ import "libs/farbtastic";
import "libs/jquery/jquery.form";
import "libs/jquery/jquery.rating";
import "ui/editable-text";
+
+// trackster global variables
+var ui = null;
+var view = null;
+var browser_router = null;
+
/**
* Base Object/Model for inhertiance.
*/
@@ -152,7 +152,7 @@ var TracksterUI = Base.extend({
title: _l("Bookmarks"),
on_click: function() {
// HACK -- use style to determine if panel is hidden and hide/show accordingly.
- force_right_panel($("div#right").css("right") == "0px" ? "hide" : "show");
+ window.force_right_panel($("div#right").css("right") == "0px" ? "hide" : "show");
}
},
{
@@ -250,7 +250,7 @@ var TracksterUI = Base.extend({
// Create view.
var self = this;
- var view = new tracks.TracksterView(_.extend(view_config, { header: false }));
+ view = new tracks.TracksterView(_.extend(view_config, { header: false }));
view.editor = true;
$.when(view.load_chroms_deferred).then(chrom_info => {
@@ -408,10 +408,10 @@ var TracksterView = Backbone.View.extend({
});
// hide right panel
- force_right_panel("hide");
+ window.force_right_panel("hide");
// check if id is available
- if (galaxy_config.app.id) {
+ if (window.galaxy_config.app.id) {
this.view_existing();
} else if (query_string.get("dataset_id")) {
this.choose_existing_or_new();
@@ -459,7 +459,6 @@ var TracksterView = Backbone.View.extend({
view_in_saved: function(dataset_params) {
var tracks_grid = new GridView({
url_base: `${Galaxy.root}visualization/list_tracks`,
- dict_format: true,
embedded: true
});
Galaxy.modal.show({
@@ -484,7 +483,7 @@ var TracksterView = Backbone.View.extend({
// view
view_existing: function() {
// get config
- var viz_config = galaxy_config.app.viz_config;
+ var viz_config = window.galaxy_config.app.viz_config;
// view
view = ui.create_visualization(
@@ -534,8 +533,11 @@ var TracksterView = Backbone.View.extend({
// select default
var dbkeys_in_genomes = response.map(r => r[1]);
- if (galaxy_config.app.default_dbkey && _.contains(dbkeys_in_genomes, galaxy_config.app.default_dbkey)) {
- $("#new-dbkey").val(galaxy_config.app.default_dbkey);
+ if (
+ window.galaxy_config.app.default_dbkey &&
+ _.contains(dbkeys_in_genomes, window.galaxy_config.app.default_dbkey)
+ ) {
+ $("#new-dbkey").val(window.galaxy_config.app.default_dbkey);
}
// change focus
@@ -589,7 +591,7 @@ var TracksterView = Backbone.View.extend({
name: name,
dbkey: dbkey
},
- galaxy_config.app.gene_region
+ window.galaxy_config.app.gene_region
);
// initialize editor
@@ -605,9 +607,9 @@ var TracksterView = Backbone.View.extend({
$("#center .unified-panel-title").text(`${view.config.get_value("name")} (${view.dbkey})`);
// add dataset
- if (galaxy_config.app.add_dataset)
+ if (window.galaxy_config.app.add_dataset)
$.ajax({
- url: `${Galaxy.root}api/datasets/${galaxy_config.app.add_dataset}`,
+ url: `${Galaxy.root}api/datasets/${window.galaxy_config.app.add_dataset}`,
data: { hda_ldda: "hda", data_type: "track_config" },
dataType: "json",
success: function(track_data) {
diff --git a/client/galaxy/scripts/viz/visualization.js b/client/galaxy/scripts/viz/visualization.js
index 0b25339cf82..7ba8c775ad3 100644
--- a/client/galaxy/scripts/viz/visualization.js
+++ b/client/galaxy/scripts/viz/visualization.js
@@ -46,14 +46,12 @@ var select_datasets = (filters, success_fn) => {
var history_grid = new GridView({
url_base: `${Galaxy.root}visualization/list_history_datasets`,
filters: filters,
- dict_format: true,
embedded: true
});
// library dataset selection tab
var library_grid = new GridView({
url_base: `${Galaxy.root}visualization/list_library_datasets`,
- dict_format: true,
embedded: true
});
diff --git a/client/galaxy/style/less/history.less b/client/galaxy/style/less/history.less
index 7735a2a8e9b..7673caed008 100644
--- a/client/galaxy/style/less/history.less
+++ b/client/galaxy/style/less/history.less
@@ -221,7 +221,9 @@
}
}
}
- span.nametags {
+ div.nametags {
+ max-height:26px;
+ overflow-y: auto;
span.label {
display: inline-block;
margin-right: 2px;
@@ -698,4 +700,4 @@
margin-right: 8px;
}
}
-}
\ No newline at end of file
+}
diff --git a/client/galaxy/style/less/library.less b/client/galaxy/style/less/library.less
index ccebc0e528c..d5fb0c09562 100644
--- a/client/galaxy/style/less/library.less
+++ b/client/galaxy/style/less/library.less
@@ -104,7 +104,7 @@ th.button_heading{
margin-right: 0.2em;
}
.toolbar-item{
- margin-left: 1em;
+ margin-left: 0.5em;
}
}
#libraries_element, #folder_items_element{
@@ -112,7 +112,7 @@ th.button_heading{
margin-left: 0.5em;
}
}
-.help-button{
+.right-float{
float: right;
}
.pagination-sm{
@@ -128,11 +128,6 @@ th.button_heading{
.libimport-select-all{
margin-left: 0.5em;
}
-.library-modal-item{
- width:90%;
- margin-left: 1em;
- margin-right: 1em;
-}
.paginator-bottom{
width: 27em;
margin-left: auto;
@@ -143,60 +138,26 @@ th.button_heading{
}
// Extra style for Galaxy modal
-.modal-content #selected_history_content{
- ul{
- list-style-type: none;
+.modal-content{
+ .library_selected_history_content{
+ ul{
+ list-style-type: none;
+ }
+ }
+ .library-collection-type-select, .library-collection-history-select{
+ margin-left:auto;
+ margin-right:auto;
+ width:200px;
+ min-width:200px;
+ }
+ .library-modal-item{
+ width:90%;
+ margin-left: auto;
+ margin-right: auto;
+ margin-top: 1.5em;
}
}
-// Follows the style for the deprecated admin libraries interface
-#library-grid{
- ul{
- list-style: none;
- }
- span.expandLink{
- padding-left: 12px;
- display: inline-block;
- vertical-align: middle;
- background: url(../images/silk/resultset_next.png) no-repeat;
- }
- .folderRow.expanded span.expandLink{
- background: url(../images/silk/resultset_bottom.png) no-repeat;
- }
- .folderRow span.rowIcon{
- float: left;
- margin-right: 5px;
- width: 16px;
- height: 16px;
- display: inline-block;
- vertical-align: middle;
- background: url(../images/silk/folder.png);
- }
- .libraryItem-error{
- margin-right: 2px;
- padding: 0 2px 0 2px;
- border: 1px solid @state-danger-border;
- background: @state-danger-bg;
- }
- .libraryItem-queued{
- margin-right: 2px;
- padding: 0 2px 0 2px;
- border: 1px solid @state-default-border;
- background: @state-default-bg;
- }
- .libraryItem-running{
- margin-right: 2px;
- padding: 0 2px 0 2px;
- border: 1px solid @state-running-border;
- background: @state-running-bg;
- }
- .libraryItem-upload{
- margin-right: 2px;
- padding: 0 2px 0 2px;
- border: 1px solid @state-upload-border;
- background: @state-upload-bg;
- }
-}
.libraryTitle{
th{
text-align: left;
diff --git a/client/grunt-tasks/install-libs.js b/client/grunt-tasks/install-libs.js
deleted file mode 100644
index 6069cfa4cf9..00000000000
--- a/client/grunt-tasks/install-libs.js
+++ /dev/null
@@ -1,80 +0,0 @@
-/**
- * Grunt task to fetch third-party libraries using bower and copy them to the proper location in client/.
- * @param {Object} grunt main grunt file
- * @return {Function} callback to build this task
- */
-module.exports = function( grunt ){
- "use strict";
-
- var dev_path = './galaxy/scripts',
-
- // where to move fetched bower components into the build structure (libName: [ bower-location, libs-location ])
- libraryLocations = {
- 'farbtastic': [ 'src/farbtastic.js', 'farbtastic.js' ],
- 'bootstrap-tour': [ 'build/js/bootstrap-tour.js', 'bootstrap-tour.js' ],
-
- // these need to be updated and tested
- //'jquery-form': [ 'jquery.form.js', 'jquery/jquery.form.js' ],
- //'jquery-autocomplete': [ 'src/jquery.autocomplete.js', 'jquery/jquery.autocomplete.js' ],
- //'select2': [ 'select2.js', 'jquery/select2.js' ],
- //'jStorage': [ 'jstorage.js', 'jquery/jstorage.js' ],
- //'dynatree': [ 'dist/jquery.dynatree.js', 'jquery/jquery.dynatree.js' ],
- //'jquery.event.drag-drop': [
- // [ 'event.drag/jquery.event.drag.js', 'jquery/jquery.event.drag.js' ],
- // [ 'event.drag/jquery.event.drop.js', 'jquery/jquery.event.drop.js' ]
- //],
-
- // these are complicated by additional css/less
- //'toastr': [ 'toastr.js', 'toastr.js' ],
- //'wymeditor': [ 'dist/wymeditor/jquery.wymeditor.js', 'jquery/jquery.wymeditor.js' ],
- //'jstree': [ 'jstree.js', 'jquery/jstree.js' ],
-
- // these have been customized by Galaxy
- //'bootstrap': [ 'dist/js/bootstrap.js', 'bootstrap.js' ],
- //'jquery-ui': [
- // // multiple components now
- // [ '', 'jquery/jquery-ui.js' ]
- //],
-
- };
-
- // call bower to install libraries and other external resources
- grunt.config( 'bower-install-simple', {
- options: {
- color: true
- },
- "prod": {
- options: {
- production: true
- }
- },
- "dev": {
- options: {
- production: false
- }
- }
- });
-
- /** copy external libraries from bower components to scripts/libs */
- function copyLibs(){
- var lib_path = dev_path + '/libs/';
- for( var libName in libraryLocations ){
- if( libraryLocations.hasOwnProperty( libName ) ){
-
- var bower_dir = 'bower_components',
- location = libraryLocations[ libName ],
- source = [ bower_dir, libName, location[0] ].join( '/' ),
- destination = lib_path + location[1];
-
- grunt.log.writeln( source + ' -> ' + destination );
- grunt.file.copy( source, destination );
- }
- }
- }
-
- grunt.loadNpmTasks( 'grunt-bower-install-simple' );
-
- grunt.registerTask( 'copy-libs', 'copy external libraries to src', copyLibs );
- grunt.registerTask( 'install-libs', 'fetch external libraries and copy to src',
- [ 'bower-install-simple:prod', 'copy-libs' ] );
-};
diff --git a/client/grunt-tasks/scripts.js b/client/grunt-tasks/scripts.js
deleted file mode 100644
index 6bfdd71f005..00000000000
--- a/client/grunt-tasks/scripts.js
+++ /dev/null
@@ -1,123 +0,0 @@
-/**
- * Grunt task to compress/bundle static/scripts.
- * @param {Object} grunt main grunt file
- * @return {Function} callback to build this task
- */
-module.exports = function( grunt ){
- "use strict";
-
- var app = grunt.config.get( 'app' ),
- paths = grunt.config.get( 'paths' ),
- // uglify settings used when scripts are decompressed/not-minified
- decompressedSettings = {
- mangle : false,
- beautify : true,
- compress : {
- drop_debugger : false
- }
- },
- // uglify settings used when scripts are compressed/minified
- compressedSettings = {
- mangle : {
- screw_ie8 : true
- },
- compress : {
- // high compression options
- screw_ie8 : true,
- sequences: true,
- dead_code : true,
- drop_debugger : true,
- comparisons : true,
- conditionals : true,
- evaluate : true,
- booleans : true,
- loops : true,
- unused : true,
- hoist_funs : true,
- if_return : true,
- join_vars : true,
- cascade : true,
- }
- };
-
- grunt.config( 'uglify', {
- target : {
- files: [{
- expand : true,
- cwd : paths.srcSymlink,
- // NOTE: do not use uglify in the apps dir (webpack will do that section)
- src : [ '**/*.js', '!apps/**/*.js' ],
- // src : '**/*.js',
- dest : paths.dist
- }],
- }
- });
-
-
- if (grunt.option( 'develop' )){
- grunt.config( 'uglify.options', decompressedSettings );
- } else {
- grunt.config( 'uglify.target.options', {
- sourceMap : true,
- sourceMapName : function( path ){
- // rewrite name to have all source maps in 'static/maps'
- return path.replace( paths.dist, paths.maps ) + '.map';
- }
- });
- grunt.config( 'uglify.options', compressedSettings );
- }
-
- // -------------------------------------------------------------------------- decompress for easier debugging
- grunt.registerTask( 'decompress', function(){
- grunt.log.writeln( "decompressing... (don't forget to call 'grunt' again before committing)" );
- grunt.config( 'uglify.options', decompressedSettings );
- grunt.config( 'uglify.target.options', {});
- grunt.task.run( 'uglify' );
- });
- // alias for symmetry
- grunt.registerTask( 'compress', [ 'uglify' ] );
-
- // -------------------------------------------------------------------------- watch & copy,pack only those changed
- // use 'grunt watch' (from a new tab in your terminal) to have grunt re-copy changed files automatically
- grunt.config( 'watch', {
- watch: {
- // watch for changes in the src dir
- // NOTE: but not in the apps dir (which is only used by webpack)
- files: [ paths.srcSymlink + '/**', '!' + paths.srcSymlink + '/apps/**' ],
- tasks: [ 'uglify' ],
- options: {
- spawn: false
- }
- }
- });
-
-
- // outer scope variable for the event handler and onChange fn - begin with empty hash
- var changedFiles = Object.create(null);
-
- // when files are changed, set the copy src and packScripts target to the filenames of the updated files
- var onChange = grunt.util._.debounce(function() {
- grunt.log.writeln( 'onChange, changedFiles:', Object.keys( changedFiles ) );
- grunt.config( 'uglify.target.files', [{
- expand : true,
- cwd : paths.srcSymlink,
- src : Object.keys( changedFiles ),
- dest : paths.dist
- }]);
- changedFiles = Object.create(null);
- }, 200);
-
- var addChangedFile = function( action, filepath ) {
- // store each filepath in a Files obj, the debounced fn above will use it as an aggregate list for copying
- // we need to take galaxy/scripts out of the filepath or it will be copied to the wrong loc
- filepath = filepath.replace( paths.srcSymlink + '/', '' );
- // grunt.log.writeln( 'on.watch, filepath:', filepath );
- changedFiles[ filepath ] = action;
- onChange();
- };
- grunt.event.on( 'watch', addChangedFile );
-
- // --------------------------------------------------------------------------
- grunt.loadNpmTasks( 'grunt-contrib-watch' );
- grunt.loadNpmTasks( 'grunt-contrib-uglify' );
-};
diff --git a/client/gulpfile.js b/client/gulpfile.js
index 06eebf5605a..6dc0d36af96 100644
--- a/client/gulpfile.js
+++ b/client/gulpfile.js
@@ -34,8 +34,7 @@ var paths = {
'jquery-mousewheel': [ 'jquery.mousewheel.js', 'jquery/jquery.mousewheel.js' ],
'raven-js': ['dist/raven.js', 'raven.js'],
'requirejs': [ 'require.js', 'require.js' ],
- 'underscore': [ 'underscore.js', 'underscore.js' ],
- 'vue': [ 'dist/vue.js', 'vue.js' ]
+ 'underscore': [ 'underscore.js', 'underscore.js' ]
},
libs: ['galaxy/scripts/libs/**/*.js']
};
diff --git a/client/package.json b/client/package.json
index efac95cbb96..6c175c0423f 100644
--- a/client/package.json
+++ b/client/package.json
@@ -28,7 +28,7 @@
"raven-js": "^3.17.0",
"requirejs": "2",
"underscore": "^1.8.3",
- "vue": "^2.5.3"
+ "vue": "^2.5.9"
},
"scripts": {
"watch": "gulp stage-libs && concurrently \"yarn run webpack-watch\" \"yarn run gulp watch\" \"yarn run style-watch\"",
@@ -55,11 +55,11 @@
"devDependencies": {
"babel-core": "^6.24.0",
"babel-loader": "^7.1.1",
- "babel-preset-env": "^1.3.2",
- "concurrently": "^3.4.0",
+ "babel-preset-env": "^1.6.1",
+ "concurrently": "^3.5.1",
"css-loader": "^0.28.7",
"del": "^3.0.0",
- "expose-loader": "^0.7.3",
+ "expose-loader": "^0.7.4",
"grunt": "^0.4.5",
"grunt-bower-install-simple": "^1.1.0",
"grunt-cli": "^0.1.13",
@@ -87,11 +87,11 @@
"karma-webpack": "^2.0.6",
"phantomjs-polyfill": "0.0.2",
"phantomjs-prebuilt": "^2.1.7",
- "prettier": "^1.7.4",
+ "prettier": "^1.9.1",
"qunitjs": "^2.4.1",
"sinon": "^4.1.2",
"vue-loader": "^13.5.0",
- "vue-template-compiler": "^2.5.3",
- "webpack": "^3.6.0"
+ "vue-template-compiler": "^2.5.9",
+ "webpack": "^3.10.0"
}
}
diff --git a/client/toolshed/scripts/mvc/groups/group-detail-view.js b/client/toolshed/scripts/mvc/groups/group-detail-view.js
deleted file mode 100644
index 12da886b178..00000000000
--- a/client/toolshed/scripts/mvc/groups/group-detail-view.js
+++ /dev/null
@@ -1,146 +0,0 @@
-define([
- "libs/toastr",
- "toolshed/scripts/mvc/groups/group-model"
- ],
-function(
- mod_toastr,
- mod_group_model
- ) {
-
-// toolshed group detail view
-var GroupDetailView = Backbone.View.extend({
- el: "#groups_element",
- options: {},
- app: null,
-
- initialize : function( options ){
- this.options = _.extend( this.options, options );
- this.app = window.globalTS.groups;
-
- if ( this.app.collection !== null ){
- this.model = this.app.collection.get( this.options.group_id );
- this.render();
- } else {
- this.fetchGroup();
- }
-
- },
-
- fetchGroup: function( options ){
- var that = this;
- this.options = _.extend( this.options, options );
- this.model = new mod_group_model.Group( { id: this.options.group_id } );
- this.model.fetch({
- success: function( model ){
- console.log( 'received data: ' );
- console.log( model );
- that.render();
- },
- error: function( model, response ){
- if ( typeof response.responseJSON !== "undefined" ){
- mod_toastr.error( response.responseJSON.err_msg );
- } else {
- mod_toastr.error( 'An error occurred.' );
- }
- }
- });
- },
-
- render: function(){
- var template = this.templateRow();
- this.$el.html( template( { group: this.model } ) );
- $( "#center [data-toggle]" ).tooltip();
- $( "#center" ).css( 'overflow','auto' );
- },
-
- templateRow: function() {
- return _.template([
- '
',
- '
<%= _.escape(group.get("name")) %>
',
- '
',
- 'A group of <%= group.get("members").length %> members with <%= group.get("repositories").length %> repositories and a total of <%= group.get("total_downloads") %> combined repository clones.