Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Hughes <me@iamphill.com>2017-11-28 17:43:47 +0300
committerPhil Hughes <me@iamphill.com>2017-11-28 17:43:47 +0300
commit061be86e052d42a66fa82dd09eab990cf5cf0986 (patch)
treef310ff3bcb63ea9f1ee58537d7f87a39edb18a36 /app/assets
parentfd818194f157b4facd88ec829d5b43929c465de5 (diff)
added specs
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/repo/lib/common/model.js23
1 files changed, 1 insertions, 22 deletions
diff --git a/app/assets/javascripts/repo/lib/common/model.js b/app/assets/javascripts/repo/lib/common/model.js
index fd6f41f87b1..23c4811e6c0 100644
--- a/app/assets/javascripts/repo/lib/common/model.js
+++ b/app/assets/javascripts/repo/lib/common/model.js
@@ -28,31 +28,10 @@ export default class Model {
return this.model.uri.toString();
}
- get originalUrl() {
- return this.originalModel.uri.toString();
- }
-
get path() {
return this.file.path;
}
- get diffModel() {
- return Model.getDiffModel(this.model);
- }
-
- get originalDiffModel() {
- return Model.getDiffModel(this.originalModel);
- }
-
- static getDiffModel(model) {
- return {
- url: model.uri.toString(),
- versionId: model.getVersionId(),
- lines: model.getLinesContent(),
- EOL: '\n',
- };
- }
-
getModel() {
return this.model;
}
@@ -63,7 +42,7 @@ export default class Model {
onChange(cb) {
this.events.set(
- this.file.path,
+ this.path,
this.disposable.add(
this.model.onDidChangeContent(e => cb(this.model, e)),
),