[ARVADOS] updated: 1.3.0-203-gcf71576a6
Git user
git at public.curoverse.com
Tue Jan 29 16:37:30 EST 2019
Summary of changes:
.../app/assets/javascripts/components/edit_tags.js | 50 +++++++++++-----------
1 file changed, 25 insertions(+), 25 deletions(-)
via cf71576a635bccf06291550489cdeed8f11b4d0e (commit)
from 608588c422589ae885a90294b233e02ce94f5bed (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
commit cf71576a635bccf06291550489cdeed8f11b4d0e
Author: Lucas Di Pentima <ldipentima at veritasgenetics.com>
Date: Tue Jan 29 18:36:30 2019 -0300
14738: Uses templates on conditional string builds.
Also, replaces double with single quotes.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <ldipentima at veritasgenetics.com>
diff --git a/apps/workbench/app/assets/javascripts/components/edit_tags.js b/apps/workbench/app/assets/javascripts/components/edit_tags.js
index 912a14a73..28935214e 100644
--- a/apps/workbench/app/assets/javascripts/components/edit_tags.js
+++ b/apps/workbench/app/assets/javascripts/components/edit_tags.js
@@ -4,7 +4,7 @@
window.SimpleInput = {
view: function(vnode) {
- return m("input.form-control", {
+ return m('input.form-control', {
style: {
width: '100%',
},
@@ -22,13 +22,13 @@ window.SimpleInput = {
window.SelectOrAutocomplete = {
view: function(vnode) {
- return m("input.form-control", {
+ return m('input.form-control', {
style: {
width: '100%'
},
type: 'text',
value: vnode.attrs.value,
- placeholder: (vnode.attrs.create ? 'Add or select ': 'Select ') + vnode.attrs.placeholder,
+ placeholder: `${vnode.attrs.create ? 'Add or select' : 'Select'} ${vnode.attrs.placeholder}`,
}, vnode.attrs.value)
},
oncreate: function(vnode) {
@@ -87,9 +87,9 @@ window.TagEditorRow = {
valueOpts = vnode.attrs.vocabulary().tags[vnode.attrs.name()].values
}
}
- return m("tr", [
+ return m('tr', [
// Erase tag
- m("td", [
+ m('td', [
vnode.attrs.editMode &&
m('div.text-center', m('a.btn.btn-default.btn-sm', {
style: {
@@ -99,9 +99,9 @@ window.TagEditorRow = {
}, m('i.fa.fa-fw.fa-trash-o')))
]),
// Tag key
- m("td", [
+ m('td', [
vnode.attrs.editMode ?
- m("div", {key: 'key'}, [
+ m('div', {key: 'key'}, [
m(inputComponent, {
options: nameOpts,
value: vnode.attrs.name,
@@ -113,9 +113,9 @@ window.TagEditorRow = {
: vnode.attrs.name
]),
// Tag value
- m("td", [
+ m('td', [
vnode.attrs.editMode ?
- m("div", {key: 'value'}, [
+ m('div', {key: 'value'}, [
m(inputComponent, {
options: valueOpts,
value: vnode.attrs.value,
@@ -137,20 +137,20 @@ window.TagEditorRow = {
window.TagEditorTable = {
view: function(vnode) {
- return m("table.table.table-condensed.table-justforlayout", [
- m("colgroup", [
- m("col", {width:"5%"}),
- m("col", {width:"25%"}),
- m("col", {width:"70%"}),
+ return m('table.table.table-condensed.table-justforlayout', [
+ m('colgroup', [
+ m('col', {width:'5%'}),
+ m('col', {width:'25%'}),
+ m('col', {width:'70%'}),
]),
- m("thead", [
- m("tr", [
- m("th"),
- m("th", "Key"),
- m("th", "Value"),
+ m('thead', [
+ m('tr', [
+ m('th'),
+ m('th', 'Key'),
+ m('th', 'Value'),
])
]),
- m("tbody", [
+ m('tbody', [
vnode.attrs.tags.length > 0
? vnode.attrs.tags.map(function(tag, idx) {
return m(TagEditorRow, {
@@ -165,7 +165,7 @@ window.TagEditorTable = {
vocabulary: vnode.attrs.vocabulary
})
})
- : m("tr", m("td[colspan=3]", m("center", "Loading tags...")))
+ : m('tr', m('td[colspan=3]', m('center', 'Loading tags...')))
]),
])
}
@@ -185,7 +185,7 @@ window.TagEditorApp = {
oninit: function(vnode) {
vnode.state.sessionDB = new SessionDB()
// Get vocabulary
- vnode.state.vocabulary = m.stream({"strict":false, "tags":{}})
+ vnode.state.vocabulary = m.stream({'strict':false, 'tags':{}})
var vocabularyTimestamp = parseInt(Date.now() / 300000) // Bust cache every 5 minutes
m.request(`/vocabulary.json?v=${vocabularyTimestamp}`).then(vnode.state.vocabulary)
vnode.state.editMode = vnode.attrs.targetEditable
@@ -228,8 +228,8 @@ window.TagEditorApp = {
view: function(vnode) {
return [
vnode.state.editMode &&
- m("div.pull-left", [
- m("a.btn.btn-primary.btn-sm" + (vnode.state.dirty() ? '' : '.disabled'), {
+ m('div.pull-left', [
+ m(`a.btn.btn-primary.btn-sm${vnode.state.dirty() ? '' : '.disabled'}`, {
style: {
margin: '10px 0px'
},
@@ -244,7 +244,7 @@ window.TagEditorApp = {
vnode.state.sessionDB.request(
vnode.state.sessionDB.loadLocal(),
vnode.state.objPath, {
- method: "PUT",
+ method: 'PUT',
data: {properties: JSON.stringify(tags)}
}
).then(function(v) {
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list