Renaming services

stable
Alejandro Alonso 2015-04-28 11:30:00 +02:00 committed by Juanfran
parent 1107355414
commit 7ac6e64c8b
18 changed files with 35 additions and 34 deletions

View File

@ -137,7 +137,7 @@ ProjectProfileDirective = ($repo, $confirm, $loading, $navurls, $location, proje
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

View File

@ -75,4 +75,4 @@ FeedbackDirective = ($lightboxService, $repo, $confirm, $loading, feedbackServic
return directive
module.directive("tgLbFeedback", ["lightboxService", "$tgRepo", "$tgConfirm",
"$tgLoading", "tgFeedback", FeedbackDirective])
"$tgLoading", "tgFeedbackService", FeedbackDirective])

View File

@ -26,7 +26,7 @@ debounce = @.taiga.debounce
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) ->
$scope.data = {}
$scope.templates = []
@ -46,7 +46,7 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
$location.url($projectUrl.get(response))
lightboxService.close($el)
projects.fetchProjects()
projectsService.fetchProjects()
onErrorSubmit = (response) ->
$loading.finish(submitButton)
@ -142,7 +142,7 @@ CreateProject = ($rootscope, $repo, $confirm, $location, $navurls, $rs, $project
module.directive("tgLbCreateProject", ["$rootScope", "$tgRepo", "$tgConfirm",
"$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}
module.directive("tgLbDeleteProject", ["$tgRepo", "$rootScope", "$tgAuth", "$tgLocation", "$tgNavUrls",
"$tgConfirm", "lightboxService", "tgLoader", "tgProjects", DeleteProjectDirective])
"$tgConfirm", "lightboxService", "tgLoader", "tgProjectsService", DeleteProjectDirective])

View File

@ -245,7 +245,9 @@
"CREATE_ACCOUNT": "create your free account here"
},
"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": {
"SECTION_NAME": "attachments",

View File

@ -9,4 +9,4 @@ class FeedbackService extends taiga.Service
"class": "lightbox lightbox-feedback lightbox-generic-form"
})
angular.module("taigaFeedback").service("tgFeedback", FeedbackService)
angular.module("taigaFeedback").service("tgFeedbackService", FeedbackService)

View File

@ -34,4 +34,4 @@ DutyDirective = (navurls, projectsService, $translate) ->
return directive
angular.module("taigaHome").directive("tgDuty", ["$tgNavUrls", "tgProjects", "$translate", DutyDirective])
angular.module("taigaHome").directive("tgDuty", ["$tgNavUrls", "tgProjectsService", "$translate", DutyDirective])

View File

@ -1,12 +1,12 @@
img.avatar(
src="https://s3.amazonaws.com/uifaces/faces/twitter/rem/128.jpg"
title="{{ user.fullname }}")
src="{{ ::vm.duty.assigned_to_extra_info.photo }}"
title="{{ ::vm.duty.assigned_to_extra_info.full_name_display }}")
div.duty-data
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 }}
a.duty-title(href="{{ vm.getUrl() }}")
a.duty-title(href="{{ ::vm.getUrl() }}")
span.duty-id(tg-bo-ref="duty.ref")
span.duty-name {{ ::duty.subject }}
div.duty-project {{ ::vm.getProjectName()}}

View File

@ -11,7 +11,7 @@ class ProjectsPageController extends taiga.Controller
"$projectUrl",
"$tgConfig",
"tgLoader",
"tgProjects",
"tgProjectsService",
"tgHomeService",
"$translate"

View File

@ -3,17 +3,14 @@ doctype html
include ../../partials/includes/components/beta
div.home-wrapper.centered
div.duty-summary
// TODO: if not assigned to items?
// TODO: i18n
div.title-bar.working-on-title(ng-show="vm.assignedTo") Working on
div.title-bar.working-on-title(ng-show="vm.assignedTo", translate="HOME.WORKING_ON_SECTION")
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.title-bar.watching-title Watching
div.title-bar.watching-title(translate="HOME.WATCHING_SECTION")
section.watching-empty(ng-show="!vm.watching.size")
include ../../svg/hide.svg
// TODO: i18n
p(translate="HOME.EMPTY_WATCHING")
section.watching(ng-show="vm.watching")

View File

@ -15,4 +15,4 @@ HomeProjectListDirective = (projectsService) ->
return directive
angular.module("taigaHome").directive("tgHomeProjectList", ["tgProjects", HomeProjectListDirective])
angular.module("taigaHome").directive("tgHomeProjectList", ["tgProjectsService", HomeProjectListDirective])

View File

@ -17,4 +17,4 @@ DropdownProjectListDirective = (projectsService) ->
angular.module("taigaNavigationBar").directive("tgDropdownProjectList",
["tgProjects", DropdownProjectListDirective])
["tgProjectsService", DropdownProjectListDirective])

View File

@ -21,6 +21,7 @@ div.navbar-dropdown.dropdown-project-list
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)
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}")
span.icon.icon-upload
input.import-file.hidden(type="file")

View File

@ -22,5 +22,5 @@ DropdownUserDirective = (authService, configService, locationService,
return directive
angular.module("taigaNavigationBar").directive("tgDropdownUser",
["$tgAuth", "$tgConfig", "$tgLocation", "$tgNavUrls", "tgFeedback",
["$tgAuth", "$tgConfig", "$tgLocation", "$tgNavUrls", "tgFeedbackService",
DropdownUserDirective])

View File

@ -14,4 +14,4 @@ NavigationBarDirective = (projectsService) ->
angular.module("taigaNavigationBar").directive("tgNavigationBar",
["tgProjects", NavigationBarDirective])
["tgProjectsService", NavigationBarDirective])

View File

@ -39,4 +39,4 @@ ProjectsListingDirective = (projectsService) ->
return directive
angular.module("taigaProjects").directive("tgProjectsListing", ["tgProjects", ProjectsListingDirective])
angular.module("taigaProjects").directive("tgProjectsListing", ["tgProjectsService", ProjectsListingDirective])

View File

@ -3,7 +3,8 @@ div.project-list-wrapper.centered
h1 My projects
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.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}", tg-import-project-button)
span(tg-import-project-button)
a.button-blackish.import-project-button(href="", title="{{'PROJECT.NAVIGATION.TITLE_ACTION_IMPORT' | translate}}")
span.icon.icon-upload
input.import-file.hidden(type="file")

View File

@ -11,19 +11,19 @@ class ProjectsPageController extends taiga.Controller
"$projectUrl",
"$tgConfig",
"tgLoader",
"tgProjects",
"tgProjectsService",
"$translate"
]
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"))
if !@auth.isAuthenticated()
@location.path(@navUrls.resolve("login"))
#Projects
promise = @projects.fetchProjects()
promise = @projectsService.fetchProjects()
# Finally
promise.finally tgLoader.pageLoaded

View File

@ -41,4 +41,4 @@ class ProjectsService extends taiga.Service
@rs.projects.bulkUpdateOrder(sortData).then =>
@.fetchProjects()
angular.module("taigaProjects").service("tgProjects", ProjectsService)
angular.module("taigaProjects").service("tgProjectsService", ProjectsService)