Skip to content

Commit

Permalink
Merge pull request #7958 from dannon/backport_revise_data_dialog
Browse files Browse the repository at this point in the history
[19.05] Backport of revise data dialog #7935
  • Loading branch information
martenson authored May 14, 2019
2 parents 852b82e + 04f2028 commit 6ca0370
Show file tree
Hide file tree
Showing 11 changed files with 32 additions and 38 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -153,11 +153,9 @@ describe("DataDialog.vue", () => {
emitted = wrapper.emitted();
expect(wrapper.classes()).contain("data-dialog-modal");
expect(wrapper.find(".fa-spinner").text()).to.equals("");
expect(wrapper.find(".btn-secondary").text()).to.equals("Clear");
expect(wrapper.find(".btn-primary").text()).to.equals("Ok");
expect(wrapper.contains(".fa-spinner")).to.equals(true);
return Vue.nextTick().then(() => {
expect(wrapper.findAll(".fa-copy").length).to.equals(2);
expect(wrapper.findAll(".fa-folder").length).to.equals(2);
expect(wrapper.findAll(".fa-file-o").length).to.equals(2);
});
});
Expand All @@ -169,11 +167,9 @@ describe("DataDialog.vue", () => {
emitted = wrapper.emitted();
expect(wrapper.classes()).contain("data-dialog-modal");
expect(wrapper.find(".fa-spinner").text()).to.equals("");
expect(wrapper.find(".btn-secondary").text()).to.equals("Clear");
expect(wrapper.find(".btn-primary").text()).to.equals("Ok");
expect(wrapper.contains(".fa-spinner")).to.equals(true);
return Vue.nextTick().then(() => {
expect(wrapper.findAll(".fa-copy").length).to.equals(2);
expect(wrapper.findAll(".fa-folder").length).to.equals(2);
expect(wrapper.findAll(".fa-file-o").length).to.equals(2);
});
});
Expand Down
11 changes: 10 additions & 1 deletion client/galaxy/scripts/components/DataDialog/DataDialog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,14 @@
<div class="fa fa-caret-left mr-1" />
Back
</b-btn>
<b-btn size="sm" class="float-right ml-1" variant="primary" @click="finalize" :disabled="!hasValue">
<b-btn
v-if="multiple"
size="sm"
class="float-right ml-1"
variant="primary"
@click="finalize"
:disabled="!hasValue"
>
Ok
</b-btn>
<b-btn size="sm" class="float-right" @click="modalShow = false"> Cancel </b-btn>
Expand Down Expand Up @@ -117,6 +124,8 @@ export default {
} else {
this.finalize();
}
} else {
this.load(record.url);
}
},
/** Called when selection is complete, values are formatted and parsed to external callback **/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<b-input-group>
<b-input v-model="filter" placeholder="Type to Search" />
<b-input-group-append>
<b-btn :disabled="!filter" @click="filter = ''">Clear</b-btn>
<b-btn :disabled="!filter" @click="filter = ''"><i class="fa fa-times"/></b-btn>
</b-input-group-append>
</b-input-group>
</template>
Expand Down
22 changes: 1 addition & 21 deletions client/galaxy/scripts/components/DataDialog/DataDialogTable.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
@filtered="filtered"
>
<template slot="label" slot-scope="data">
<i v-if="data.item.isDataset" class="fa fa-file-o" /> <i v-else class="fa fa-copy" />
<i v-if="data.item.isDataset" class="fa fa-file-o" /> <i v-else class="fa fa-folder" />
{{ data.value ? data.value : "-" }}
</template>
<template slot="details" slot-scope="data">
Expand All @@ -21,17 +21,6 @@
<template slot="time" slot-scope="data">
{{ data.value ? data.value : "-" }}
</template>
<template slot="arrow" slot-scope="data">
<b-button
variant="link"
size="sm"
class="py-0"
v-if="!data.item.isDataset"
@click.stop="load(data.item.url)"
>
View
</b-button>
</template>
</b-table>
<div v-if="nItems === 0">
<div v-if="filter">
Expand Down Expand Up @@ -77,11 +66,6 @@ export default {
},
time: {
sortable: true
},
arrow: {
label: "",
sortable: false,
class: "text-right"
}
},
nItems: 0,
Expand All @@ -105,10 +89,6 @@ export default {
/** Collects selected datasets in value array **/
clicked: function(record) {
this.$emit("clicked", record);
},
/** Performs server request to retrieve data records **/
load: function(url) {
this.$emit("load", url);
}
}
};
Expand Down
4 changes: 3 additions & 1 deletion client/galaxy/scripts/components/Tags/tagService.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export class TagService {
async delete(rawTag) {
const { id, itemClass, context } = this;
const tag = createTag(rawTag);
const url = `/tag/remove_tag_async?item_id=${id}&item_class=${itemClass}&context=${context}&tag_name=${tag.text}`;
const url = `/tag/remove_tag_async?item_id=${id}&item_class=${itemClass}&context=${context}&tag_name=${
tag.text
}`;
const response = await axios.get(url);
if (response.status !== 200) {
throw new Error(`Unable to delete tag: ${tag}`);
Expand Down
3 changes: 2 additions & 1 deletion client/galaxy/scripts/components/login/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
<a id="register-toggle" href="#" @click.prevent="toggleLogin">Register here.</a>
</span>
<span v-else>
Registration for this Galaxy instance is disabled. Please contact an administrator for assistance.
Registration for this Galaxy instance is disabled. Please contact an administrator for
assistance.
</span>
</b-card-footer>
</b-card>
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/entry/panels/tool-panel.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var ToolPanel = Backbone.View.extend({
const panel_buttons = [this.upload_button];

// add favorite filter button
if (Galaxy.user && Galaxy.user.id){
if (Galaxy.user && Galaxy.user.id) {
this.favorite_button = new Buttons.ButtonLink({
cls: "panel-header-button",
title: _l("Show favorites"),
Expand Down
2 changes: 1 addition & 1 deletion client/galaxy/scripts/galaxy.interactive_environments.js
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,4 @@ export default {
test_ie_availability,
load_when_ready,
keepAlive
};
};
2 changes: 1 addition & 1 deletion client/galaxy/scripts/mvc/ui/ui-select-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ const View = Backbone.View.extend({
},
{
multiple: cnf.multiple,
library: cnf.library,
library: !!cnf.library,
format: null
}
);
Expand Down
10 changes: 7 additions & 3 deletions client/galaxy/scripts/mvc/upload/composite/composite-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ export default Backbone.View.extend({
onclick: function() {
self._eventReset();
}
})
});
this.btnStart = new Ui.Button({
title: _l("Start"),
onclick: function() {
Expand Down Expand Up @@ -63,7 +63,7 @@ export default Backbone.View.extend({
self.collection.add({
id: self.collection.size(),
file_desc: item.description || item.name,
optional: item.optional,
optional: item.optional
});
});
}
Expand Down Expand Up @@ -113,7 +113,11 @@ export default Backbone.View.extend({
this.select_genome.enable();
this.select_extension.enable();
}
if (this.collection.where({ status: "ready" }).length + this.collection.where({ optional: true }).length == this.collection.length && this.collection.length > 0) {
if (
this.collection.where({ status: "ready" }).length + this.collection.where({ optional: true }).length ==
this.collection.length &&
this.collection.length > 0
) {
this.btnStart.enable();
this.btnStart.$el.addClass("btn-primary");
} else {
Expand Down
4 changes: 3 additions & 1 deletion client/galaxy/scripts/mvc/workflow/workflow-view.js
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ export default Backbone.View.extend({
$("#workflow-version-switch").unbind("change");
if (this.value != self.workflow.workflow_version) {
if (self.workflow && self.workflow.has_changes) {
const r = window.confirm("There are unsaved changes to your workflow which will be lost. Continue ?");
const r = window.confirm(
"There are unsaved changes to your workflow which will be lost. Continue ?"
);
if (r == false) {
// We rebuild the version select list, to reset the selected version
self.build_version_select();
Expand Down

0 comments on commit 6ca0370

Please sign in to comment.