You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
578 B
JavaScript
28 lines
578 B
JavaScript
define(['underscore', 'core/model'], function CodeResultsDefine(_, Model) {
|
|
'use strict';
|
|
|
|
function ResultsModel() {
|
|
Model.apply(this, arguments);
|
|
}
|
|
|
|
ResultsModel.prototype = new Model();
|
|
|
|
_.extend(ResultsModel.prototype, {
|
|
defaults: function defaults() {
|
|
return {id: 0, env: ''};
|
|
},
|
|
|
|
url: function url() {
|
|
var id = this.get('id');
|
|
var env = this.get('env');
|
|
if (id < 10) {
|
|
return '/results/' + env + '/0' + id;
|
|
} else {
|
|
return '/results/' + env + '/' + id;
|
|
}
|
|
}
|
|
});
|
|
|
|
return ResultsModel;
|
|
});
|