Renaming services
parent
1107355414
commit
7ac6e64c8b
|
@ -137,7 +137,7 @@ ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location, proje
|
||||||
|
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation", "tgProjects", ProjectProfileDirective])
|
module.directive("tgProjectProfile", ["$tgRepo", "$tgConfirm", "$tgLoading", "$tgNavUrls", "$tgLocation", "tgProjectsService", ProjectProfileDirective])
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
## Project Default Values Directive
|
## Project Default Values Directive
|
||||||
|
|
|
@ -75,4 +75,4 @@ FeedbackDirective = ($lightboxService, $repo, $confirm, $loading, feedbackServic
|
||||||
return directive
|
return directive
|
||||||
|
|
||||||
module.directive("tgLbFeedback", ["lightboxService", "$tgRepo", "$tgConfirm",
|
module.directive("tgLbFeedback", ["lightboxService", "$tgRepo", "$tgConfirm",
|
||||||
"$tgLoading", "tgFeedback", FeedbackDirective])
|
"$tgLoading", "tgFeedbackService", FeedbackDirective])
|
||||||
|
|
|
@ -26,7 +26,7 @@ debounce = @.taiga.debounce
|
||||||
|
|
||||||
module = angular.module("taigaProject")
|
module = angular.module("taigaProject")
|
||||||
|
|
||||||
CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, $loading, lightboxService, $cacheFactory, $translate, projects) ->
|
CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $projectUrl, $loading, lightboxService, $cacheFactory, $translate, projectsService) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.data = {}
|
$scope.data = {}
|
||||||
$scope.templates = []
|
$scope.templates = []
|
||||||
|
@ -46,7 +46,7 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
|
|
||||||
$location.url($projectUrl.get(response))
|
$location.url($projectUrl.get(response))
|
||||||
lightboxService.close($el)
|
lightboxService.close($el)
|
||||||
projects.fetchProjects()
|
projectsService.fetchProjects()
|
||||||
|
|
||||||
onErrorSubmit = (response) ->
|
onErrorSubmit = (response) ->
|
||||||
$loading.finish(submitButton)
|
$loading.finish(submitButton)
|
||||||
|
@ -142,7 +142,7 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
|
||||||
|
|
||||||
module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm",
|
module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm",
|
||||||
"$location", "$tgNavUrls", "$tgResources", "$projectUrl", "$tgLoading",
|
"$location", "$tgNavUrls", "$tgResources", "$projectUrl", "$tgLoading",
|
||||||
"lightboxService", "$cacheFactory", "$translate", "tgProjects", CreateProject])
|
"lightboxService", "$cacheFactory", "$translate", "tgProjectsService", CreateProject])
|
||||||
|
|
||||||
|
|
||||||
#############################################################################
|
#############################################################################
|
||||||
|
@ -188,4 +188,4 @@ DeleteProjectDirective = ($repo, $rootscope, $auth, $location, $navUrls, $confir
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive("tgLbDeleteProject", ["$tgRepo", "$rootScope", "$tgAuth", "$tgLocation", "$tgNavUrls",
|
module.directive("tgLbDeleteProject", ["$tgRepo", "$rootScope", "$tgAuth", "$tgLocation", "$tgNavUrls",
|
||||||
"$tgConfirm", "lightboxService", "tgLoader", "tgProjects", DeleteProjectDirective])
|
"$tgConfirm", "lightboxService", "tgLoader", "tgProjectsService", DeleteProjectDirective])
|
||||||
|
|
|
@ -245,7 +245,9 @@
|
||||||
"CREATE_ACCOUNT": "create your free account here"
|
"CREATE_ACCOUNT": "create your free account here"
|
||||||
},
|
},
|
||||||
"HOME": {
|
"HOME": {
|
||||||
"EMPTY_WATCHING": "<strong>Follow</strong> the projects, User Stories, Tasks, Issues... that you want to know about :)"
|
"EMPTY_WATCHING": "<strong>Follow</strong> the projects, User Stories, Tasks, Issues... that you want to know about :)",
|
||||||
|
"WORKING_ON_SECTION": "Working on",
|
||||||
|
"WATCHING_SECTION": "Watching"
|
||||||
},
|
},
|
||||||
"ATTACHMENT": {
|
"ATTACHMENT": {
|
||||||
"SECTION_NAME": "attachments",
|
"SECTION_NAME": "attachments",
|
||||||
|
|
|
@ -9,4 +9,4 @@ class FeedbackService extends taiga.Service
|
||||||
"class": "lightbox lightbox-feedback lightbox-generic-form"
|
"class": "lightbox lightbox-feedback lightbox-generic-form"
|
||||||
})
|
})
|
||||||
|
|
||||||
angular.module("taigaFeedback").service("tgFeedback", FeedbackService)
|
angular.module("taigaFeedback").service("tgFeedbackService", FeedbackService)
|
||||||
|
|
|
@ -34,4 +34,4 @@ DutyDirective = (navurls, projectsService, $translate) ->
|
||||||
|
|
||||||
return directive
|
return directive
|
||||||
|
|
||||||
angular.module("taigaHome").directive("tgDuty", ["$tgNavUrls", "tgProjects", "$translate", DutyDirective])
|
angular.module("taigaHome").directive("tgDuty", ["$tgNavUrls", "tgProjectsService", "$translate", DutyDirective])
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
img.avatar(
|
img.avatar(
|
||||||
src="https://s3.amazonaws.com/uifaces/faces/twitter/rem/128.jpg"
|
src="{{ ::vm.duty.assigned_to_extra_info.photo }}"
|
||||||
title="{{ user.fullname }}")
|
title="{{ ::vm.duty.assigned_to_extra_info.full_name_display }}")
|
||||||
|
|
||||||
div.duty-data
|
div.duty-data
|
||||||
div
|
div
|
||||||
span.duty-type {{ vm.getDutyType() }}
|
span.duty-type {{ ::vm.getDutyType() }}
|
||||||
span.duty-status(ng-style="{'color': vm.duty.status_color}") {{ ::vm.duty.status_name }}
|
span.duty-status(ng-style="{'color': vm.duty.status_color}") {{ ::vm.duty.status_name }}
|
||||||
a.duty-title(href="{{ vm.getUrl() }}")
|
a.duty-title(href="{{ ::vm.getUrl() }}")
|
||||||
span.duty-id(tg-bo-ref="duty.ref")
|
span.duty-id(tg-bo-ref="duty.ref")
|
||||||
span.duty-name {{ ::duty.subject }}
|
span.duty-name {{ ::duty.subject }}
|
||||||
div.duty-project {{ ::vm.getProjectName()}}
|
div.duty-project {{ ::vm.getProjectName()}}
|
||||||
|
|
|
@ -11,7 +11,7 @@ class ProjectsPageController extends taiga.Controller
|
||||||
"$projectUrl",
|
"$projectUrl",
|
||||||
"$tgConfig",
|
"$tgConfig",
|
||||||
"tgLoader",
|
"tgLoader",
|
||||||
"tgProjects",
|
"tgProjectsService",
|
||||||
"tgHomeService",
|
"tgHomeService",
|
||||||
"$translate"
|
"$translate"
|
||||||
|
|
||||||
|
|
|
@ -3,17 +3,14 @@ doctype html
|
||||||
include ../../partials/includes/components/beta
|
include ../../partials/includes/components/beta
|
||||||
div.home-wrapper.centered
|
div.home-wrapper.centered
|
||||||
div.duty-summary
|
div.duty-summary
|
||||||
// TODO: if not assigned to items?
|
div.title-bar.working-on-title(ng-show="vm.assignedTo", translate="HOME.WORKING_ON_SECTION")
|
||||||
// TODO: i18n
|
|
||||||
div.title-bar.working-on-title(ng-show="vm.assignedTo") Working on
|
|
||||||
section.working-on(ng-show="vm.assignedTo")
|
section.working-on(ng-show="vm.assignedTo")
|
||||||
div.duty-single(tg-duty="duty", tg-repeat="duty in vm.assignedTo", ng-class="{blocked: duty.is_blocked}")
|
div.duty-single(tg-duty="duty", tg-repeat="duty in vm.assignedTo", ng-class="{blocked: duty.is_blocked}")
|
||||||
|
|
||||||
div.title-bar.watching-title Watching
|
div.title-bar.watching-title(translate="HOME.WATCHING_SECTION")
|
||||||
|
|
||||||
section.watching-empty(ng-show="!vm.watching.size")
|
section.watching-empty(ng-show="!vm.watching.size")
|
||||||
include ../../svg/hide.svg
|
include ../../svg/hide.svg
|
||||||
// TODO: i18n
|
|
||||||
p(translate="HOME.EMPTY_WATCHING")
|
p(translate="HOME.EMPTY_WATCHING")
|
||||||
|
|
||||||
section.watching(ng-show="vm.watching")
|
section.watching(ng-show="vm.watching")
|
||||||
|
|
|
@ -15,4 +15,4 @@ HomeProjectListDirective = (projectsService) ->
|
||||||
|
|
||||||
return directive
|
return directive
|
||||||
|
|
||||||
angular.module("taigaHome").directive("tgHomeProjectList", ["tgProjects", HomeProjectListDirective])
|
angular.module("taigaHome").directive("tgHomeProjectList", ["tgProjectsService", HomeProjectListDirective])
|
||||||
|
|
|
@ -17,4 +17,4 @@ DropdownProjectListDirective = (projectsService) ->
|
||||||
|
|
||||||
|
|
||||||
angular.module("taigaNavigationBar").directive("tgDropdownProjectList",
|
angular.module("taigaNavigationBar").directive("tgDropdownProjectList",
|
||||||
["tgProjects", DropdownProjectListDirective])
|
["tgProjectsService", DropdownProjectListDirective])
|
||||||
|
|
|
@ -21,6 +21,7 @@ div.navbar-dropdown.dropdown-project-list
|
||||||
title="{{'PROJECT.NAVIGATION.ACTION_CREATE_PROJECT' | translate}}",
|
title="{{'PROJECT.NAVIGATION.ACTION_CREATE_PROJECT' | translate}}",
|
||||||
translate="PROJECT.NAVIGATION.ACTION_CREATE_PROJECT")
|
translate="PROJECT.NAVIGATION.ACTION_CREATE_PROJECT")
|
||||||
|
|
||||||
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}", tg-import-project-button)
|
span(tg-import-project-button)
|
||||||
span.icon.icon-upload
|
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}")
|
||||||
input.import-file.hidden(type="file")
|
span.icon.icon-upload
|
||||||
|
input.import-file.hidden(type="file")
|
||||||
|
|
|
@ -22,5 +22,5 @@ DropdownUserDirective = (authService, configService, locationService,
|
||||||
return directive
|
return directive
|
||||||
|
|
||||||
angular.module("taigaNavigationBar").directive("tgDropdownUser",
|
angular.module("taigaNavigationBar").directive("tgDropdownUser",
|
||||||
["$tgAuth", "$tgConfig", "$tgLocation", "$tgNavUrls", "tgFeedback",
|
["$tgAuth", "$tgConfig", "$tgLocation", "$tgNavUrls", "tgFeedbackService",
|
||||||
DropdownUserDirective])
|
DropdownUserDirective])
|
||||||
|
|
|
@ -14,4 +14,4 @@ NavigationBarDirective = (projectsService) ->
|
||||||
|
|
||||||
|
|
||||||
angular.module("taigaNavigationBar").directive("tgNavigationBar",
|
angular.module("taigaNavigationBar").directive("tgNavigationBar",
|
||||||
["tgProjects", NavigationBarDirective])
|
["tgProjectsService", NavigationBarDirective])
|
||||||
|
|
|
@ -39,4 +39,4 @@ ProjectsListingDirective = (projectsService) ->
|
||||||
|
|
||||||
return directive
|
return directive
|
||||||
|
|
||||||
angular.module("taigaProjects").directive("tgProjectsListing", ["tgProjects", ProjectsListingDirective])
|
angular.module("taigaProjects").directive("tgProjectsListing", ["tgProjectsService", ProjectsListingDirective])
|
||||||
|
|
|
@ -3,9 +3,10 @@ div.project-list-wrapper.centered
|
||||||
h1 My projects
|
h1 My projects
|
||||||
div.create-options
|
div.create-options
|
||||||
a.create-project-btn.button-green(href="#", ng-click="vm.newProject()", title="{{'PROJECT.NAVIGATION.ACTION_CREATE_PROJECT' | translate}}", translate="PROJECT.NAVIGATION.ACTION_CREATE_PROJECT")
|
a.create-project-btn.button-green(href="#", ng-click="vm.newProject()", title="{{'PROJECT.NAVIGATION.ACTION_CREATE_PROJECT' | translate}}", translate="PROJECT.NAVIGATION.ACTION_CREATE_PROJECT")
|
||||||
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}", tg-import-project-button)
|
span(tg-import-project-button)
|
||||||
span.icon.icon-upload
|
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}")
|
||||||
input.import-file.hidden(type="file")
|
span.icon.icon-upload
|
||||||
|
input.import-file.hidden(type="file")
|
||||||
|
|
||||||
section.project-list-section
|
section.project-list-section
|
||||||
div.project-list
|
div.project-list
|
||||||
|
|
|
@ -11,19 +11,19 @@ class ProjectsPageController extends taiga.Controller
|
||||||
"$projectUrl",
|
"$projectUrl",
|
||||||
"$tgConfig",
|
"$tgConfig",
|
||||||
"tgLoader",
|
"tgLoader",
|
||||||
"tgProjects",
|
"tgProjectsService",
|
||||||
"$translate"
|
"$translate"
|
||||||
]
|
]
|
||||||
|
|
||||||
constructor: (@scope, @q, @rs, @rootscope, @navUrls, @auth, @location,
|
constructor: (@scope, @q, @rs, @rootscope, @navUrls, @auth, @location,
|
||||||
@appTitle, @projectUrl, @config, tgLoader, @projects, @translate) ->
|
@appTitle, @projectUrl, @config, tgLoader, @projectsService, @translate) ->
|
||||||
@appTitle.set(@translate.instant("PROJECT.SECTION_PROJECTS"))
|
@appTitle.set(@translate.instant("PROJECT.SECTION_PROJECTS"))
|
||||||
|
|
||||||
if !@auth.isAuthenticated()
|
if !@auth.isAuthenticated()
|
||||||
@location.path(@navUrls.resolve("login"))
|
@location.path(@navUrls.resolve("login"))
|
||||||
|
|
||||||
#Projects
|
#Projects
|
||||||
promise = @projects.fetchProjects()
|
promise = @projectsService.fetchProjects()
|
||||||
|
|
||||||
# Finally
|
# Finally
|
||||||
promise.finally tgLoader.pageLoaded
|
promise.finally tgLoader.pageLoaded
|
||||||
|
|
|
@ -41,4 +41,4 @@ class ProjectsService extends taiga.Service
|
||||||
@rs.projects.bulkUpdateOrder(sortData).then =>
|
@rs.projects.bulkUpdateOrder(sortData).then =>
|
||||||
@.fetchProjects()
|
@.fetchProjects()
|
||||||
|
|
||||||
angular.module("taigaProjects").service("tgProjects", ProjectsService)
|
angular.module("taigaProjects").service("tgProjectsService", ProjectsService)
|
||||||
|
|
Loading…
Reference in New Issue