Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LIMS-1422: Reprocessing dialog edits the end value unpredictably #819

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions client/src/js/modules/dc/views/distl.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ define(['marionette', 'modules/dc/models/distl', 'utils',
},

plotSelected: function(e, ranges) {
this.trigger('plot:select', Math.floor(ranges.xaxis.from), Math.ceil(ranges.xaxis.to))
this.trigger('plot:select', Math.round(ranges.xaxis.from), Math.round(ranges.xaxis.to))
},

plotUnselected: function(e) {
Expand Down Expand Up @@ -112,4 +112,4 @@ define(['marionette', 'modules/dc/models/distl', 'utils',
}
})

})
})
20 changes: 13 additions & 7 deletions client/src/js/modules/dc/views/reprocess2.js
Original file line number Diff line number Diff line change
Expand Up @@ -110,13 +110,19 @@ define(['backbone', 'marionette', 'views/dialog',
var si = parseInt(this.model.get('SI'))
var ni = parseInt(this.model.get('NUMIMG'))

if (this.ui.st.val() > (si+ni-1)) this.ui.st.val(si+ni-1)
if (this.ui.st.val() < si) this.ui.st.val(si)
if (this.ui.st.val()) {
if (this.ui.st.val() > (si+ni-1)) this.ui.st.val(si+ni-1)
if (this.ui.st.val() < si) this.ui.st.val(si)
}

if (this.ui.en.val() > (si+ni-1)) this.ui.en.val(si+ni-1)
if (this.ui.en.val() < si) this.ui.en.val(si)
if (this.ui.en.val()) {
if (this.ui.en.val() > (si+ni-1)) this.ui.en.val(si+ni-1)
if (this.ui.en.val() < si) this.ui.en.val(si)
}

this.plotview.setSelection(parseInt(this.ui.st.val()), parseInt(this.ui.en.val()))
if (this.ui.st.val() && this.ui.en.val()) {
this.plotview.setSelection(parseInt(this.ui.st.val()), parseInt(this.ui.en.val()))
}
},

initialize: function(options) {
Expand Down Expand Up @@ -348,7 +354,7 @@ define(['backbone', 'marionette', 'views/dialog',
}, this)

$.when.apply($, reqs).done(function() {
app.alert({ message: jobs+' reprocessing job(s) successfully submitted'})
app.message({ message: jobs+' reprocessing job(s) successfully submitted'})
_.each(rps, function(rp) {
self._enqueue({ PROCESSINGJOBID: rp.get('PROCESSINGJOBID') })
})
Expand Down Expand Up @@ -426,7 +432,7 @@ define(['backbone', 'marionette', 'views/dialog',
reqs.push(reprocessingsweeps.save())

$.when.apply($, reqs).done(function() {
app.alert({ message: '1 reprocessing job successfully submitted'})
app.message({ message: '1 reprocessing job successfully submitted'})
self._enqueue({ PROCESSINGJOBID: reprocessing.get('PROCESSINGJOBID') })
})
},
Expand Down
Loading