Remove ;
parent
fd6c50f7e2
commit
825ced482d
|
@ -157,7 +157,7 @@ ProjectValuesDirective = ($log, $repo, $confirm, $location, animationFrame, $tra
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
|
|
|
@ -129,7 +129,7 @@ BacklogSortableDirective = ($repo, $rs, $rootscope, $tgConfirm) ->
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
|
|
|
@ -30,7 +30,7 @@ class HttpService extends taiga.Service
|
|||
constructor: (@http, @q, @storage, @rootScope, @cacheFactory, @translate) ->
|
||||
super()
|
||||
|
||||
@.cache = @cacheFactory("httpget");
|
||||
@.cache = @cacheFactory("httpget")
|
||||
headers: ->
|
||||
headers = {}
|
||||
|
||||
|
|
|
@ -278,7 +278,7 @@ class UsFiltersMixin
|
|||
dataType: "owner",
|
||||
content: owner
|
||||
}
|
||||
];
|
||||
]
|
||||
|
||||
@.customFilters = []
|
||||
_.forOwn customFiltersRaw, (value, key) =>
|
||||
|
|
|
@ -271,7 +271,7 @@ class IssuesController extends mixOf(taiga.Controller, taiga.PageMixin, taiga.Fi
|
|||
dataType: "owner",
|
||||
content: owner
|
||||
}
|
||||
];
|
||||
]
|
||||
|
||||
@.customFilters = []
|
||||
_.forOwn customFiltersRaw, (value, key) =>
|
||||
|
@ -472,7 +472,7 @@ IssuesDirective = ($log, $location, $template, $compile) ->
|
|||
svg = $("<tg-svg>").attr("svg-icon", icon)
|
||||
|
||||
colHeadElement.append(svg)
|
||||
$compile(colHeadElement.contents())($scope);
|
||||
$compile(colHeadElement.contents())($scope)
|
||||
|
||||
$el.on "click", ".row.title > div", (event) ->
|
||||
target = angular.element(event.currentTarget)
|
||||
|
@ -495,7 +495,7 @@ IssuesDirective = ($log, $location, $template, $compile) ->
|
|||
.attr("svg-icon", icon)
|
||||
|
||||
target.append(svg)
|
||||
$compile(target.contents())($scope);
|
||||
$compile(target.contents())($scope)
|
||||
|
||||
## Issues Link
|
||||
link = ($scope, $el, $attrs) ->
|
||||
|
|
|
@ -94,7 +94,7 @@ KanbanSortableDirective = ($repo, $rs, $rootscope) ->
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
|
|
|
@ -217,7 +217,7 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin, taiga
|
|||
dataType: "owner",
|
||||
content: owner
|
||||
}
|
||||
];
|
||||
]
|
||||
|
||||
@.customFilters = []
|
||||
_.forOwn customFiltersRaw, (value, key) =>
|
||||
|
|
|
@ -110,7 +110,7 @@ TaskboardSortableDirective = ($repo, $rs, $rootscope, $translate) ->
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
$scope.$on "$destroy", ->
|
||||
|
|
|
@ -90,7 +90,7 @@ WikiNavDirective = ($tgrepo, $log, $location, $confirm, $analytics, $loading, $t
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
$el.on "click", ".add-button", (event) ->
|
||||
|
|
|
@ -29,7 +29,7 @@ AttachmentsDropDirective = ($parse) ->
|
|||
e.stopPropagation()
|
||||
e.preventDefault()
|
||||
|
||||
dataTransfer = e.dataTransfer || (e.originalEvent && e.originalEvent.dataTransfer);
|
||||
dataTransfer = e.dataTransfer || (e.originalEvent && e.originalEvent.dataTransfer)
|
||||
|
||||
scope.$apply () -> eventAttr(scope, {files: dataTransfer.files})
|
||||
|
||||
|
|
|
@ -81,7 +81,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 2;
|
||||
mocks.attachmentsPreviewService.fileId = 2
|
||||
|
||||
current = ctrl.getCurrent()
|
||||
|
||||
|
@ -125,7 +125,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 1;
|
||||
mocks.attachmentsPreviewService.fileId = 1
|
||||
|
||||
pagination = ctrl.hasPagination()
|
||||
|
||||
|
@ -173,7 +173,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 2;
|
||||
mocks.attachmentsPreviewService.fileId = 2
|
||||
|
||||
currentIndex = ctrl.getIndex()
|
||||
|
||||
|
@ -215,7 +215,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 1;
|
||||
mocks.attachmentsPreviewService.fileId = 1
|
||||
|
||||
currentIndex = ctrl.next()
|
||||
|
||||
|
@ -256,7 +256,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 3;
|
||||
mocks.attachmentsPreviewService.fileId = 3
|
||||
|
||||
currentIndex = ctrl.next()
|
||||
|
||||
|
@ -298,7 +298,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 3;
|
||||
mocks.attachmentsPreviewService.fileId = 3
|
||||
|
||||
currentIndex = ctrl.previous()
|
||||
|
||||
|
@ -339,7 +339,7 @@ describe "AttachmentsPreviewController", ->
|
|||
}
|
||||
])
|
||||
|
||||
mocks.attachmentsPreviewService.fileId = 1;
|
||||
mocks.attachmentsPreviewService.fileId = 1
|
||||
|
||||
currentIndex = ctrl.previous()
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ AttachmentSortableDirective = ($parse) ->
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ class CardController
|
|||
@.onToggleFold({id: @.item.get('id')})
|
||||
|
||||
getClosedTasks: () ->
|
||||
return @.item.getIn(['model', 'tasks']).filter (task) -> return task.get('is_closed');
|
||||
return @.item.getIn(['model', 'tasks']).filter (task) -> return task.get('is_closed')
|
||||
|
||||
closedTasksPercent: () ->
|
||||
return @.getClosedTasks().size * 100 / @.item.getIn(['model', 'tasks']).size
|
||||
|
|
|
@ -51,7 +51,7 @@ describe "Filter", ->
|
|||
|
||||
isOpen = ctrl.isOpen('filter1')
|
||||
|
||||
expect(isOpen).to.be.true;
|
||||
expect(isOpen).to.be.true
|
||||
|
||||
it "save custom filter", () ->
|
||||
ctrl = $controller("Filter")
|
||||
|
|
|
@ -67,13 +67,13 @@ describe "VoteButton", ->
|
|||
|
||||
promise = ctrl.toggleVote()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.onUpvote.resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.onUpvote).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
||||
|
@ -90,12 +90,12 @@ describe "VoteButton", ->
|
|||
|
||||
promise = ctrl.toggleVote()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.onDownvote.resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.onDownvote).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
|
|
@ -68,13 +68,13 @@ describe "WatchButton", ->
|
|||
|
||||
promise = ctrl.toggleWatch()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.onWatch.resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.onWatch).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
||||
|
@ -91,13 +91,13 @@ describe "WatchButton", ->
|
|||
|
||||
promise = ctrl.toggleWatch()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.onUnwatch.resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.onUnwatch).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ describe "DiscoverSearchBarController", ->
|
|||
|
||||
ctrl.selectFilter('text')
|
||||
|
||||
expect(mocks.discoverProjectsService.fetchStats).to.have.been.called;
|
||||
expect(ctrl.onChange).to.have.been.calledWith(sinon.match({filter: 'text', q: 'query'}));
|
||||
expect(mocks.discoverProjectsService.fetchStats).to.have.been.called
|
||||
expect(ctrl.onChange).to.have.been.calledWith(sinon.match({filter: 'text', q: 'query'}))
|
||||
|
||||
it "submit filter", () ->
|
||||
ctrl = $controller("DiscoverSearchBar")
|
||||
|
@ -68,5 +68,5 @@ describe "DiscoverSearchBarController", ->
|
|||
|
||||
ctrl.submitFilter()
|
||||
|
||||
expect(mocks.discoverProjectsService.fetchStats).to.have.been.called;
|
||||
expect(ctrl.onChange).to.have.been.calledWith(sinon.match({filter: 'all', q: 'query'}));
|
||||
expect(mocks.discoverProjectsService.fetchStats).to.have.been.called
|
||||
expect(ctrl.onChange).to.have.been.calledWith(sinon.match({filter: 'all', q: 'query'}))
|
||||
|
|
|
@ -174,6 +174,6 @@ describe "tgDiscoverProjectsService", ->
|
|||
|
||||
expect(result).to.have.length(5)
|
||||
|
||||
expect(result[4].decorate).to.be.ok;
|
||||
expect(result[4].decorate).to.be.ok
|
||||
|
||||
done()
|
||||
|
|
|
@ -72,13 +72,13 @@ describe "LikeProjectButton", ->
|
|||
|
||||
promise = ctrl.toggleLike()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.tgLikeProjectButton.like.withArgs(project.get('id')).resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.tgLikeProjectButton.like).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
||||
|
@ -109,13 +109,13 @@ describe "LikeProjectButton", ->
|
|||
|
||||
promise = ctrl.toggleLike()
|
||||
|
||||
expect(ctrl.loading).to.be.true;
|
||||
expect(ctrl.loading).to.be.true
|
||||
|
||||
mocks.tgLikeProjectButton.unlike.withArgs(project.get('id')).resolve()
|
||||
|
||||
promise.finally () ->
|
||||
expect(mocks.tgLikeProjectButton.unlike).to.be.calledOnce
|
||||
expect(ctrl.loading).to.be.false;
|
||||
expect(ctrl.loading).to.be.false
|
||||
|
||||
done()
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ SortProjectsDirective = (currentUserService) ->
|
|||
pixels: 30,
|
||||
scrollWhenOutside: true,
|
||||
autoScroll: () ->
|
||||
return this.down && drake.dragging;
|
||||
return this.down && drake.dragging
|
||||
})
|
||||
|
||||
scope.$on "$destroy", ->
|
||||
|
|
|
@ -77,4 +77,4 @@ describe "ProjectsListingController", ->
|
|||
|
||||
pageCtrl.newProject()
|
||||
|
||||
expect(mocks.projectsService.newProject).to.be.calledOnce;
|
||||
expect(mocks.projectsService.newProject).to.be.calledOnce
|
||||
|
|
|
@ -127,7 +127,7 @@ describe "TransferProject", ->
|
|||
ctrl = $controller("TransferProjectController")
|
||||
ctrl.project = project
|
||||
ctrl.initialize().then () ->
|
||||
expect(mocks.errorHandlingService.notfound).have.been.called;
|
||||
expect(mocks.errorHandlingService.notfound).have.been.called
|
||||
done()
|
||||
|
||||
it "valid token private project with max projects for user", (done) ->
|
||||
|
|
|
@ -179,7 +179,7 @@ describe "tgCurrentUserService", ->
|
|||
backlog: false,
|
||||
kanban: false,
|
||||
dashboard: false
|
||||
});
|
||||
})
|
||||
|
||||
it "load joyride config", (done) ->
|
||||
mocks.resources.user.getUserStorage.withArgs('joyride').promise().resolve(true)
|
||||
|
|
|
@ -27,7 +27,7 @@ class ErrorHandlingService
|
|||
constructor: (@rootScope) ->
|
||||
|
||||
init: () ->
|
||||
@rootScope.errorHandling = {};
|
||||
@rootScope.errorHandling = {}
|
||||
|
||||
notfound: ->
|
||||
@rootScope.errorHandling.showingError = true
|
||||
|
|
|
@ -38,5 +38,5 @@ describe "tgProjectLogoService", ->
|
|||
|
||||
logo = projectLogoService.getDefaultProjectLogo('slug/slug', 2)
|
||||
|
||||
expect(logo.src).to.be.equal('/123/images/project-logos/project-logo-04.png');
|
||||
expect(logo.color).to.be.equal('rgba( 152, 224, 168, 1 )');
|
||||
expect(logo.src).to.be.equal('/123/images/project-logos/project-logo-04.png')
|
||||
expect(logo.color).to.be.equal('rgba( 152, 224, 168, 1 )')
|
||||
|
|
|
@ -89,7 +89,7 @@ describe "tgProjectService", ->
|
|||
.then () -> projectService.setProjectBySlug('slug-1')
|
||||
.then () -> projectService.setProjectBySlug('slug-2')
|
||||
.finally () ->
|
||||
expect(projectService.setProject).to.be.called.twice;
|
||||
expect(projectService.setProject).to.be.called.twice
|
||||
done()
|
||||
|
||||
it "set project and set active members", () ->
|
||||
|
@ -136,10 +136,10 @@ describe "tgProjectService", ->
|
|||
|
||||
projectService.cleanProject()
|
||||
|
||||
expect(projectService.project).to.be.null;
|
||||
expect(projectService.activeMembers.size).to.be.equal(0);
|
||||
expect(projectService.section).to.be.null;
|
||||
expect(projectService.sectionsBreadcrumb.size).to.be.equal(0);
|
||||
expect(projectService.project).to.be.null
|
||||
expect(projectService.activeMembers.size).to.be.equal(0)
|
||||
expect(projectService.section).to.be.null
|
||||
expect(projectService.sectionsBreadcrumb.size).to.be.equal(0)
|
||||
|
||||
it "has permissions", () ->
|
||||
project = Immutable.Map({
|
||||
|
|
|
@ -144,7 +144,7 @@ describe "tgUserTimelinePaginationSequenceService", ->
|
|||
|
||||
config.minItems = 1
|
||||
|
||||
config.map = (item) => item + 1;
|
||||
config.map = (item) => item + 1
|
||||
|
||||
seq = userTimelinePaginationSequenceService.generate(config)
|
||||
|
||||
|
|
|
@ -49,7 +49,7 @@ describe "UserTimelineController", ->
|
|||
$rootScope = _$rootScope_
|
||||
|
||||
it "timelineList should be an array", () ->
|
||||
$scope = $rootScope.$new();
|
||||
$scope = $rootScope.$new()
|
||||
|
||||
mocks.userTimelineService.getUserTimeline = sinon.stub().returns(true)
|
||||
|
||||
|
@ -63,7 +63,7 @@ describe "UserTimelineController", ->
|
|||
it "project timeline sequence", () ->
|
||||
mocks.userTimelineService.getProjectTimeline = sinon.stub().withArgs(4).returns(true)
|
||||
|
||||
$scope = $rootScope.$new();
|
||||
$scope = $rootScope.$new()
|
||||
|
||||
myCtrl = controller("UserTimeline", $scope, {
|
||||
projectId: 4
|
||||
|
@ -74,7 +74,7 @@ describe "UserTimelineController", ->
|
|||
it "currentUser timeline sequence", () ->
|
||||
mocks.userTimelineService.getProfileTimeline = sinon.stub().withArgs(2).returns(true)
|
||||
|
||||
$scope = $rootScope.$new();
|
||||
$scope = $rootScope.$new()
|
||||
|
||||
myCtrl = controller("UserTimeline", $scope, {
|
||||
currentUser: true,
|
||||
|
@ -86,7 +86,7 @@ describe "UserTimelineController", ->
|
|||
it "currentUser timeline sequence", () ->
|
||||
mocks.userTimelineService.getUserTimeline = sinon.stub().withArgs(2).returns(true)
|
||||
|
||||
$scope = $rootScope.$new();
|
||||
$scope = $rootScope.$new()
|
||||
|
||||
myCtrl = controller("UserTimeline", $scope, {
|
||||
user: Immutable.Map({id: 2})
|
||||
|
@ -99,7 +99,7 @@ describe "UserTimelineController", ->
|
|||
|
||||
beforeEach () ->
|
||||
mocks.userTimelineService.getUserTimeline = sinon.stub().returns({})
|
||||
$scope = $rootScope.$new();
|
||||
$scope = $rootScope.$new()
|
||||
myCtrl = controller("UserTimeline", $scope, {
|
||||
user: Immutable.Map({id: 2})
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue