edit project restrictions (max public/private projects)
parent
d4fdc2631d
commit
21d22a7dfb
|
@ -51,11 +51,13 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
"$tgLocation",
|
"$tgLocation",
|
||||||
"$tgNavUrls",
|
"$tgNavUrls",
|
||||||
"tgAppMetaService",
|
"tgAppMetaService",
|
||||||
"$translate"
|
"$translate",
|
||||||
|
"$tgAuth",
|
||||||
|
"tgCurrentUserService"
|
||||||
]
|
]
|
||||||
|
|
||||||
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @navUrls,
|
constructor: (@scope, @rootscope, @repo, @confirm, @rs, @params, @q, @location, @navUrls,
|
||||||
@appMetaService, @translate) ->
|
@appMetaService, @translate, @tgAuth, @currentUserService) ->
|
||||||
@scope.project = {}
|
@scope.project = {}
|
||||||
|
|
||||||
promise = @.loadInitialData()
|
promise = @.loadInitialData()
|
||||||
|
@ -67,6 +69,11 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
description = @scope.project.description
|
description = @scope.project.description
|
||||||
@appMetaService.setAll(title, description)
|
@appMetaService.setAll(title, description)
|
||||||
|
|
||||||
|
@scope.canBePrivateProject = @.currentUserService.canBePrivateProject(@scope.project.id)
|
||||||
|
@scope.canBePublicProject = @.currentUserService.canBePublicProject(@scope.project.id)
|
||||||
|
|
||||||
|
@scope.isPrivateProject = @scope.project.is_private
|
||||||
|
|
||||||
promise.then null, @.onInitialDataError.bind(@)
|
promise.then null, @.onInitialDataError.bind(@)
|
||||||
|
|
||||||
@scope.$on "project:loaded", =>
|
@scope.$on "project:loaded", =>
|
||||||
|
@ -94,8 +101,10 @@ class ProjectProfileController extends mixOf(taiga.Controller, taiga.PageMixin)
|
||||||
return project
|
return project
|
||||||
|
|
||||||
loadInitialData: ->
|
loadInitialData: ->
|
||||||
promise = @.loadProject()
|
return @q.all([
|
||||||
return promise
|
@.loadProject(),
|
||||||
|
@tgAuth.refresh()
|
||||||
|
])
|
||||||
|
|
||||||
openDeleteLightbox: ->
|
openDeleteLightbox: ->
|
||||||
@rootscope.$broadcast("deletelightbox:new", @scope.project)
|
@rootscope.$broadcast("deletelightbox:new", @scope.project)
|
||||||
|
@ -510,3 +519,15 @@ ProjectLogoModelDirective = ($parse) ->
|
||||||
return {link:link}
|
return {link:link}
|
||||||
|
|
||||||
module.directive('tgProjectLogoModel', ['$parse', ProjectLogoModelDirective])
|
module.directive('tgProjectLogoModel', ['$parse', ProjectLogoModelDirective])
|
||||||
|
|
||||||
|
|
||||||
|
AdminProjectRestrictionsDirective = () ->
|
||||||
|
return {
|
||||||
|
scope: {
|
||||||
|
"canBePrivateProject": "=",
|
||||||
|
"canBePublicProject": "="
|
||||||
|
},
|
||||||
|
templateUrl: "admin/admin-project-restrictions.html"
|
||||||
|
}
|
||||||
|
|
||||||
|
module.directive('tgAdminProjectRestrictions', [AdminProjectRestrictionsDirective])
|
||||||
|
|
|
@ -135,6 +135,17 @@ class AuthService extends taiga.Service
|
||||||
return false
|
return false
|
||||||
|
|
||||||
## Http interface
|
## Http interface
|
||||||
|
refresh: () ->
|
||||||
|
url = @urls.resolve("user-me")
|
||||||
|
|
||||||
|
return @http.get(url).then (data, status) =>
|
||||||
|
user = data.data
|
||||||
|
user.token = @.getUser().auth_token
|
||||||
|
|
||||||
|
user = @model.make_model("users", user)
|
||||||
|
|
||||||
|
@.setUser(user)
|
||||||
|
return user
|
||||||
|
|
||||||
login: (data, type) ->
|
login: (data, type) ->
|
||||||
url = @urls.resolve("auth")
|
url = @urls.resolve("auth")
|
||||||
|
|
|
@ -45,6 +45,7 @@ urls = {
|
||||||
"user-voted": "/users/%s/voted"
|
"user-voted": "/users/%s/voted"
|
||||||
"user-watched": "/users/%s/watched"
|
"user-watched": "/users/%s/watched"
|
||||||
"user-contacts": "/users/%s/contacts"
|
"user-contacts": "/users/%s/contacts"
|
||||||
|
"user-me": "/users/me"
|
||||||
|
|
||||||
# User - Notification
|
# User - Notification
|
||||||
"permissions": "/permissions"
|
"permissions": "/permissions"
|
||||||
|
|
|
@ -463,7 +463,11 @@
|
||||||
"DELETE": "Delete this project",
|
"DELETE": "Delete this project",
|
||||||
"LOGO_HELP": "The image will be scaled to 80x80px.",
|
"LOGO_HELP": "The image will be scaled to 80x80px.",
|
||||||
"CHANGE_LOGO": "Change logo",
|
"CHANGE_LOGO": "Change logo",
|
||||||
"ACTION_USE_DEFAULT_LOGO": "Use default image"
|
"ACTION_USE_DEFAULT_LOGO": "Use default image",
|
||||||
|
"MAX_PRIVATE_PROJECTS": "You've reached the maximum number of private projects",
|
||||||
|
"MAX_PRIVATE_PROJECTS_MEMBERS": "The project exceeds the maximun members number in private projects",
|
||||||
|
"MAX_PUBLIC_PROJECTS": "You've reached the maximum number of public projects",
|
||||||
|
"MAX_PUBLIC_PROJECTS_MEMBERS": "The project exceeds the maximun members number in public projects"
|
||||||
},
|
},
|
||||||
"REPORTS": {
|
"REPORTS": {
|
||||||
"TITLE": "Reports",
|
"TITLE": "Reports",
|
||||||
|
|
|
@ -118,4 +118,52 @@ class CurrentUserService
|
||||||
|
|
||||||
return @.projects
|
return @.projects
|
||||||
|
|
||||||
|
canBePrivateProject: (projectId) ->
|
||||||
|
project = @.projects.get('all').find (project) -> project.get('id') == projectId
|
||||||
|
|
||||||
|
return {valid: true} if project.get('is_private')
|
||||||
|
|
||||||
|
result = @.canCreatePrivateProjects()
|
||||||
|
|
||||||
|
return result if !result.valid
|
||||||
|
|
||||||
|
user = @.getUser()
|
||||||
|
|
||||||
|
if user.get('max_members_private_projects') != null && project.get('members').size >= user.get('max_members_private_projects')
|
||||||
|
return {valid: false, reason: 'max_members_private_projects', type: 'private_project'}
|
||||||
|
|
||||||
|
return {valid: true}
|
||||||
|
|
||||||
|
canBePublicProject: (projectId) ->
|
||||||
|
project = @.projects.get('all').find (project) -> project.get('id') == projectId
|
||||||
|
|
||||||
|
return {valid: true} if !project.get('is_private')
|
||||||
|
|
||||||
|
result = @.canCreatePublicProjects()
|
||||||
|
|
||||||
|
return result if !result.valid
|
||||||
|
|
||||||
|
user = @.getUser()
|
||||||
|
|
||||||
|
if user.get('max_members_public_projects') != null && project.get('members').size >= user.get('max_members_public_projects')
|
||||||
|
return {valid: false, reason: 'max_members_public_projects', type: 'public_project'}
|
||||||
|
|
||||||
|
return {valid: true}
|
||||||
|
|
||||||
|
canCreatePrivateProjects: () ->
|
||||||
|
user = @.getUser()
|
||||||
|
|
||||||
|
if user.get('max_private_projects') != null && user.get('max_private_projects') <= user.get('total_private_projects')
|
||||||
|
return {valid: false, reason: 'max_private_projects', type: 'private_project'}
|
||||||
|
|
||||||
|
return {valid: true}
|
||||||
|
|
||||||
|
canCreatePublicProjects: () ->
|
||||||
|
user = @.getUser()
|
||||||
|
|
||||||
|
if user.get('max_public_projects') != null && user.get('max_public_projects') <= user.get('total_public_projects')
|
||||||
|
return {valid: false, reason: 'max_public_projects', type: 'public_project'}
|
||||||
|
|
||||||
|
return {valid: true}
|
||||||
|
|
||||||
angular.module("taigaCommon").service("tgCurrentUserService", CurrentUserService)
|
angular.module("taigaCommon").service("tgCurrentUserService", CurrentUserService)
|
||||||
|
|
|
@ -203,3 +203,245 @@ describe "tgCurrentUserService", ->
|
||||||
expect(config).to.be.eql(joyride)
|
expect(config).to.be.eql(joyride)
|
||||||
|
|
||||||
done()
|
done()
|
||||||
|
|
||||||
|
it "the user can't create private projects if they reach the maximum number of private projects", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_private_projects: 1,
|
||||||
|
total_private_projects: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
result = currentUserService.canCreatePrivateProjects(0)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: false,
|
||||||
|
reason: 'max_private_projects',
|
||||||
|
type: 'private_project'
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can create private projects", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_private_projects: 10,
|
||||||
|
total_private_projects: 1,
|
||||||
|
max_members_private_projects: 20
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
result = currentUserService.canCreatePrivateProjects(10)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can't convert a private project to a public project if they reach the maximum number of members", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_private_projects: 10,
|
||||||
|
total_private_projects: 1,
|
||||||
|
max_members_public_projects: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5], is_private: true},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePublicProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: false,
|
||||||
|
reason: 'max_members_public_projects',
|
||||||
|
type: 'public_project'
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can convert private projects to a public project", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_private_projects: 10,
|
||||||
|
total_private_projects: 1,
|
||||||
|
max_members_public_projects: 20
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5]},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePublicProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can convert public projects to a public project if it is already public", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_private_projects: 10,
|
||||||
|
total_private_projects: 100,
|
||||||
|
max_members_public_projects: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5], is_private: false},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePublicProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can't create public projects if they reach the maximum number of private projects", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_public_projects: 1,
|
||||||
|
total_public_projects: 1
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
result = currentUserService.canCreatePublicProjects(0)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: false,
|
||||||
|
reason: 'max_public_projects',
|
||||||
|
type: 'public_project'
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can create public projects", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_public_projects: 10,
|
||||||
|
total_public_projects: 1,
|
||||||
|
max_members_public_projects: 20
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
result = currentUserService.canCreatePublicProjects(10)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can't convert a public projects to a private project if they reach the maximum number of members", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_public_projects: 10,
|
||||||
|
total_public_projects: 1,
|
||||||
|
max_members_private_projects: 2
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5]},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePrivateProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: false,
|
||||||
|
reason: 'max_members_private_projects',
|
||||||
|
type: 'private_project'
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can convert public projects to a private project", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_public_projects: 10,
|
||||||
|
total_public_projects: 1,
|
||||||
|
max_members_private_projects: 20
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5]},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePrivateProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
||||||
|
it "the user can convert private project to a private project if it is already private", () ->
|
||||||
|
user = Immutable.fromJS({
|
||||||
|
id: 1,
|
||||||
|
name: "fake1",
|
||||||
|
max_public_projects: 10,
|
||||||
|
total_public_projects: 1,
|
||||||
|
max_members_private_projects: 20
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._user = user
|
||||||
|
|
||||||
|
projects = Immutable.fromJS({
|
||||||
|
all: [
|
||||||
|
{id: 1, name: "fake1"},
|
||||||
|
{id: 2, name: "fake2", members: [1, 2, 3, 4, 5]},
|
||||||
|
{id: 3, name: "fake3"},
|
||||||
|
{id: 4, name: "fake4"}
|
||||||
|
]
|
||||||
|
})
|
||||||
|
|
||||||
|
currentUserService._projects = projects
|
||||||
|
|
||||||
|
result = currentUserService.canBePrivateProject(2)
|
||||||
|
|
||||||
|
expect(result).to.be.eql({
|
||||||
|
valid: true
|
||||||
|
})
|
||||||
|
|
|
@ -126,10 +126,16 @@ div.wrapper(
|
||||||
placeholder="{{ 'ADMIN.PROJECT_PROFILE.RECRUITING_PLACEHOLDER' | translate }}"
|
placeholder="{{ 'ADMIN.PROJECT_PROFILE.RECRUITING_PLACEHOLDER' | translate }}"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
tg-admin-project-restrictions(
|
||||||
|
can-be-private-project="canBePrivateProject"
|
||||||
|
can-be-public-project="canBePublicProject"
|
||||||
|
)
|
||||||
|
|
||||||
fieldset
|
fieldset
|
||||||
.project-privacy-settings
|
.project-privacy-settings
|
||||||
div.privacy-option
|
div.privacy-option
|
||||||
input.privacy-project(
|
input.privacy-project(
|
||||||
|
ng-disabled="!canBePublicProject.valid"
|
||||||
type="radio"
|
type="radio"
|
||||||
id="private-project"
|
id="private-project"
|
||||||
name="privacy-project"
|
name="privacy-project"
|
||||||
|
@ -140,6 +146,7 @@ div.wrapper(
|
||||||
|
|
||||||
div.privacy-option
|
div.privacy-option
|
||||||
input.privacy-project(
|
input.privacy-project(
|
||||||
|
ng-disabled="!canBePrivateProject.valid"
|
||||||
type="radio"
|
type="radio"
|
||||||
id="public-project"
|
id="public-project"
|
||||||
name="privacy-project"
|
name="privacy-project"
|
||||||
|
|
|
@ -0,0 +1,11 @@
|
||||||
|
fieldset(ng-if="!canBePrivateProject.valid")
|
||||||
|
p
|
||||||
|
span(ng-if="canBePrivateProject.reason == 'max_private_projects'") {{ 'ADMIN.PROJECT_PROFILE.MAX_PRIVATE_PROJECTS' | translate }}
|
||||||
|
|
||||||
|
span(ng-if="canBePrivateProject.reason == 'max_members_private_projects'") {{ 'ADMIN.PROJECT_PROFILE.MAX_PRIVATE_PROJECTS_MEMBERS' | translate }}
|
||||||
|
|
||||||
|
fieldset(ng-if="!canBePublicProject.valid")
|
||||||
|
p
|
||||||
|
span(ng-if="canBePublicProject.reason == 'max_public_projects'") {{ 'ADMIN.PROJECT_PROFILE.MAX_PUBLIC_PROJECTS' | translate }}
|
||||||
|
|
||||||
|
span(ng-if="canBePublicProject.reason == 'max_members_public_projects'") {{ 'ADMIN.PROJECT_PROFILE.MAX_PUBLIC_PROJECTS_MEMBERS' | translate }}
|
|
@ -31,6 +31,18 @@
|
||||||
.icon {
|
.icon {
|
||||||
color: $white;
|
color: $white;
|
||||||
}
|
}
|
||||||
|
&.disabled,
|
||||||
|
&[disabled] {
|
||||||
|
background: lighten($whitish, 10%);
|
||||||
|
box-shadow: none;
|
||||||
|
color: $gray-light;
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: .65;
|
||||||
|
&:hover {
|
||||||
|
background: lighten($whitish, 10%);
|
||||||
|
color: $gray-light;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.trans-button {
|
.trans-button {
|
||||||
|
|
|
@ -103,4 +103,47 @@
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.privacy-project[disabled] {
|
||||||
|
+ label {
|
||||||
|
background: $whitish;
|
||||||
|
box-shadow: none;
|
||||||
|
color: $gray-light;
|
||||||
|
cursor: not-allowed;
|
||||||
|
opacity: .65;
|
||||||
|
&:hover {
|
||||||
|
background: $whitish;
|
||||||
|
color: $gray-light;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
tg-admin-project-restrictions {
|
||||||
|
p {
|
||||||
|
@extend %xsmall;
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
a {
|
||||||
|
color: $primary;
|
||||||
|
}
|
||||||
|
fieldset {
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
span:first-child {
|
||||||
|
&::before {
|
||||||
|
border: 1px solid $red-light;
|
||||||
|
border-radius: 6px;
|
||||||
|
color: $red-light;
|
||||||
|
content: '!';
|
||||||
|
display: inline-block;
|
||||||
|
height: 12px;
|
||||||
|
line-height: 12px;
|
||||||
|
margin-right: .5rem;
|
||||||
|
text-align: center;
|
||||||
|
width: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,6 +70,7 @@ paths.css_vendor = [
|
||||||
paths.vendor + "intro.js/introjs.css"
|
paths.vendor + "intro.js/introjs.css"
|
||||||
];
|
];
|
||||||
paths.locales = paths.app + "locales/**/*.json";
|
paths.locales = paths.app + "locales/**/*.json";
|
||||||
|
paths.modulesLocales = paths.app + "modules/**/locales/*.json";
|
||||||
|
|
||||||
paths.sass = [
|
paths.sass = [
|
||||||
paths.app + "**/*.scss",
|
paths.app + "**/*.scss",
|
||||||
|
@ -566,7 +567,7 @@ gulp.task("watch", function() {
|
||||||
gulp.watch(paths.svg, ["copy-svg"]);
|
gulp.watch(paths.svg, ["copy-svg"]);
|
||||||
gulp.watch(paths.coffee, ["app-watch"]);
|
gulp.watch(paths.coffee, ["app-watch"]);
|
||||||
gulp.watch(paths.libs, ["jslibs-watch"]);
|
gulp.watch(paths.libs, ["jslibs-watch"]);
|
||||||
gulp.watch(paths.locales, ["locales"]);
|
gulp.watch([paths.locales, paths.modulesLocales], ["locales"]);
|
||||||
gulp.watch(paths.images, ["copy-images"]);
|
gulp.watch(paths.images, ["copy-images"]);
|
||||||
gulp.watch(paths.fonts, ["copy-fonts"]);
|
gulp.watch(paths.fonts, ["copy-fonts"]);
|
||||||
});
|
});
|
||||||
|
|
|
@ -30,4 +30,6 @@
|
||||||
var original = searchOriginal(this);
|
var original = searchOriginal(this);
|
||||||
original._rejectfn.apply(this, arguments);
|
original._rejectfn.apply(this, arguments);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
window.addDecorator = function() {};
|
||||||
}());
|
}());
|
||||||
|
|
Loading…
Reference in New Issue