save statics inside a non-cacheable folder
parent
f34d01f249
commit
d0d25dfd4c
|
@ -1,5 +1,7 @@
|
|||
# Changelog #
|
||||
|
||||
## 1.10.0 ??? (unreleased)
|
||||
- Statics folder hash
|
||||
|
||||
## 1.9.0 Abies Siberica (2015-11-XX)
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
version = ___VERSION___
|
||||
window._version = "___VERSION___"
|
||||
window.taigaConfig = {
|
||||
"api": "http://localhost:8000/api/v1/",
|
||||
"eventsUrl": null,
|
||||
|
@ -16,16 +16,16 @@ window.taigaConfig = {
|
|||
"contribPlugins": []
|
||||
}
|
||||
|
||||
promise = $.getJSON "/js/conf.json"
|
||||
promise = $.getJSON "/conf.json"
|
||||
promise.done (data) ->
|
||||
window.taigaConfig = _.extend({}, window.taigaConfig, data)
|
||||
|
||||
promise.always ->
|
||||
if window.taigaConfig.contribPlugins.length > 0
|
||||
plugins = _.map(window.taigaConfig.contribPlugins, (plugin) -> "#{plugin}?v=#{version}")
|
||||
plugins = _.map(window.taigaConfig.contribPlugins, (plugin) -> "#{plugin}")
|
||||
ljs.load plugins, ->
|
||||
ljs.load "/js/app.js?v=#{version}", ->
|
||||
ljs.load "/#{window._version}/js/app.js", ->
|
||||
angular.bootstrap(document, ['taiga'])
|
||||
else
|
||||
ljs.load "/js/app.js?v=#{version}", ->
|
||||
ljs.load "/#{window._version}/js/app.js", ->
|
||||
angular.bootstrap(document, ['taiga'])
|
||||
|
|
|
@ -508,7 +508,7 @@ configure = ($routeProvider, $locationProvider, $httpProvider, $provide, $tgEven
|
|||
$translatePartialLoaderProvider.addPart('taiga')
|
||||
$translateProvider
|
||||
.useLoader('$translatePartialLoader', {
|
||||
urlTemplate: '/locales/{part}/locale-{lang}.json'
|
||||
urlTemplate: '/' + window._version + '/locales/{part}/locale-{lang}.json'
|
||||
})
|
||||
.useSanitizeValueStrategy('escapeParameters')
|
||||
.addInterpolation('$translateMessageFormatInterpolation')
|
||||
|
|
|
@ -219,7 +219,7 @@ MembershipsRowAvatarDirective = ($log, $template, $translate) ->
|
|||
ctx = {
|
||||
full_name: if member.full_name then member.full_name else ""
|
||||
email: if member.user_email then member.user_email else member.email
|
||||
imgurl: if member.photo then member.photo else "/images/unnamed.png"
|
||||
imgurl: if member.photo then member.photo else "/" + window._version + "/images/unnamed.png"
|
||||
pending: if !member.is_user_active then pending else ""
|
||||
}
|
||||
|
||||
|
|
|
@ -140,7 +140,7 @@ CreatedByDisplayDirective = ($template, $compile, $translate, $navUrls)->
|
|||
if model?
|
||||
$scope.owner = model.owner_extra_info or {
|
||||
full_name_display: $translate.instant("COMMON.EXTERNAL_USER")
|
||||
photo: "/images/user-noimage.png"
|
||||
photo: "/" + window._version + "/images/user-noimage.png"
|
||||
}
|
||||
|
||||
$scope.url = if $scope.owner?.is_active then $navUrls.resolve("user-profile", {username: $scope.owner.username}) else ""
|
||||
|
@ -643,7 +643,7 @@ ListItemAssignedtoDirective = ($template) ->
|
|||
link = ($scope, $el, $attrs) ->
|
||||
bindOnce $scope, "usersById", (usersById) ->
|
||||
item = $scope.$eval($attrs.tgListitemAssignedto)
|
||||
ctx = {name: "Unassigned", imgurl: "/images/unnamed.png"}
|
||||
ctx = {name: "Unassigned", imgurl: "/" + window._version + "/images/unnamed.png"}
|
||||
|
||||
member = usersById[item.assigned_to]
|
||||
if member
|
||||
|
|
|
@ -22,7 +22,7 @@
|
|||
module = angular.module("taigaCommon")
|
||||
|
||||
TgLoadingService = ($compile) ->
|
||||
spinner = "<img class='loading-spinner' src='/svg/spinner-circle.svg' alt='loading...' />"
|
||||
spinner = "<img class='loading-spinner' src='/" + window._version + "/svg/spinner-circle.svg' alt='loading...' />"
|
||||
|
||||
return () ->
|
||||
service = {
|
||||
|
|
|
@ -780,7 +780,7 @@ IssueAssignedToInlineEditionDirective = ($repo, $rootscope, popoverService) ->
|
|||
|
||||
link = ($scope, $el, $attrs) ->
|
||||
updateIssue = (issue) ->
|
||||
ctx = {name: "Unassigned", imgurl: "/images/unnamed.png"}
|
||||
ctx = {name: "Unassigned", imgurl: "/" + window._version + "/images/unnamed.png"}
|
||||
member = $scope.usersById[issue.assigned_to]
|
||||
if member
|
||||
ctx.imgurl = member.photo
|
||||
|
|
|
@ -547,7 +547,7 @@ KanbanUserDirective = ($log, $compile) ->
|
|||
|
||||
render = (user) ->
|
||||
if user is undefined
|
||||
ctx = {name: "Unassigned", imgurl: "/images/unnamed.png", clickable: clickable}
|
||||
ctx = {name: "Unassigned", imgurl: "/" + window._version + "/images/unnamed.png", clickable: clickable}
|
||||
else
|
||||
ctx = {name: user.full_name_display, imgurl: user.photo, clickable: clickable}
|
||||
|
||||
|
|
|
@ -248,7 +248,7 @@ RelatedTaskAssignedToInlineEditionDirective = ($repo, $rootscope, popoverService
|
|||
|
||||
link = ($scope, $el, $attrs) ->
|
||||
updateRelatedTask = (task) ->
|
||||
ctx = {name: "Unassigned", imgurl: "/images/unnamed.png"}
|
||||
ctx = {name: "Unassigned", imgurl: "/" + window._version + "/images/unnamed.png"}
|
||||
member = $scope.usersById[task.assigned_to]
|
||||
if member
|
||||
ctx.imgurl = member.photo
|
||||
|
|
|
@ -185,7 +185,7 @@ class TaskboardController extends mixOf(taiga.Controller, taiga.PageMixin)
|
|||
@scope.usTasks[task.user_story][task.status].push(task)
|
||||
|
||||
if tasks.length == 0
|
||||
|
||||
|
||||
if @scope.userstories.length > 0
|
||||
usId = @scope.userstories[0].id
|
||||
else
|
||||
|
@ -442,7 +442,7 @@ TaskboardUserDirective = ($log) ->
|
|||
user = $scope.usersById[assigned_to]
|
||||
|
||||
if user is undefined
|
||||
_.assign($scope, {name: "Unassigned", imgurl: "/images/unnamed.png", clickable: clickable})
|
||||
_.assign($scope, {name: "Unassigned", imgurl: "/" + window._version + "/images/unnamed.png", clickable: clickable})
|
||||
else
|
||||
_.assign($scope, {name: user.full_name_display, imgurl: user.photo, clickable: clickable})
|
||||
|
||||
|
|
|
@ -157,7 +157,7 @@ WikiSummaryDirective = ($log, $template, $compile, $translate) ->
|
|||
user = $scope.usersById[wiki.last_modifier]
|
||||
|
||||
if user is undefined
|
||||
user = {name: "unknown", imgUrl: "/images/user-noimage.png"}
|
||||
user = {name: "unknown", imgUrl: "/" + window._version + "/images/user-noimage.png"}
|
||||
else
|
||||
user = {name: user.full_name_display, imgUrl: user.photo}
|
||||
|
||||
|
|
|
@ -10,8 +10,8 @@ html(lang="en")
|
|||
meta(name="description", content="Taiga is a project management platform for startups and agile developers & designers who want a simple, beautiful tool that makes work truly enjoyable.")
|
||||
meta(name="keywords", content="agile, scrum, taiga, management, project, developer, designer, user experience")
|
||||
//-meta(name="viewport", content="width=device-width, user-scalable=no")
|
||||
link(rel="stylesheet", href="/styles/theme-taiga.css")
|
||||
link(rel="icon", type="image/png", href="/images/favicon.png")
|
||||
link(rel="stylesheet", href="/#{v}/styles/theme-taiga.css")
|
||||
link(rel="icon", type="image/png", href="/#{v}/images/favicon.png")
|
||||
|
||||
//- PRERENDER SERVICE: This is to know when the page is completely loaded.
|
||||
script(type='text/javascript').
|
||||
|
@ -39,6 +39,6 @@ html(lang="en")
|
|||
|
||||
div(tg-joy-ride)
|
||||
|
||||
script(src="/js/libs.js?v=#{v}")
|
||||
script(src="/js/templates.js?v=#{v}")
|
||||
script(src="/js/app-loader.js?v=#{v}")
|
||||
script(src="/#{v}/js/libs.js")
|
||||
script(src="/#{v}/js/templates.js")
|
||||
script(src="/#{v}/js/app-loader.js")
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
a.list-itemtype-ticket(
|
||||
href="{{ ::vm.duty.get('url') }}"
|
||||
title="{{ ::duty.get('subject') }}"
|
||||
)
|
||||
)
|
||||
div.list-itemtype-avatar(ng-if="::vm.duty.get('assigned_to_extra_info')")
|
||||
img(
|
||||
ng-src="{{ ::vm.duty.get('assigned_to_extra_info').get('photo') }}"
|
||||
|
@ -9,7 +9,7 @@ a.list-itemtype-ticket(
|
|||
)
|
||||
div.list-itemtype-avatar(ng-if="::!vm.duty.get('assigned_to_extra_info')")
|
||||
img(
|
||||
src="/images/unnamed.png"
|
||||
src="/#{v}/images/unnamed.png"
|
||||
title="{{'ACTIVITY.VALUES.UNASSIGNED' | translate}}"
|
||||
)
|
||||
div.list-itemtype-ticket-data
|
||||
|
@ -17,7 +17,7 @@ a.list-itemtype-ticket(
|
|||
span.ticket-project {{ ::vm.duty.get('projectName')}}
|
||||
span.ticket-type {{ ::vm.getDutyType() }}
|
||||
span.ticket-status(ng-style="{'color': vm.duty.get('status_extra_info').get('color')}") {{ ::vm.duty.get('status_extra_info').get('name') }}
|
||||
|
||||
|
||||
h2
|
||||
span.ticket-id(tg-bo-ref="duty.get('ref')")
|
||||
span.ticket-title {{ ::duty.get('subject') }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
section.profile-contacts
|
||||
div(ng-if="vm.contacts === undefined")
|
||||
div.spin
|
||||
img(src="/svg/spinner-circle.svg", alt="Loading...")
|
||||
img(src="/#{v}/svg/spinner-circle.svg", alt="Loading...")
|
||||
|
||||
div.empty-tab(ng-if="vm.contacts && !vm.contacts.size")
|
||||
include ../../../svg/hide.svg
|
||||
|
|
|
@ -16,7 +16,7 @@ div.list-itemtype-ticket
|
|||
title="{{ 'COMMON.ASSIGNED_TO.NOT_ASSIGNED'|translate }}"
|
||||
)
|
||||
img(
|
||||
src="/images/unnamed.png",
|
||||
src="/#{v}/images/unnamed.png",
|
||||
alt="{{ 'COMMON.ASSIGNED_TO.NOT_ASSIGNED'|translate }}"
|
||||
)
|
||||
|
||||
|
|
|
@ -68,13 +68,13 @@ section.profile-favs
|
|||
div(ng-if="vm.isLoading")
|
||||
div.spin
|
||||
img(
|
||||
src="/svg/spinner-circle.svg"
|
||||
src="/#{v}/svg/spinner-circle.svg"
|
||||
alt="{{ 'COMMON.LOADING'|translate }}"
|
||||
)
|
||||
|
||||
.empty-search-results(ng-if="vm.hasNoResults && !vm.isLoading")
|
||||
img(
|
||||
src="../../images/search-empty.png"
|
||||
src="/#{v}/images/search-empty.png"
|
||||
alt="{{ 'USER.PROFILE_FAVS.EMPTY_TITLE' | translate }}"
|
||||
)
|
||||
p.title {{ 'USER.PROFILE_FAVS.EMPTY_TITLE' | translate }}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
section.profile-projects
|
||||
div(ng-if="vm.projects === undefined")
|
||||
div.spin
|
||||
img(src="/svg/spinner-circle.svg", alt="Loading...")
|
||||
img(src="/#{v}/svg/spinner-circle.svg", alt="Loading...")
|
||||
|
||||
.empty-tab(ng-if="vm.projects && !vm.projects.size")
|
||||
include ../../../svg/hide.svg
|
||||
|
|
|
@ -149,7 +149,7 @@
|
|||
.profile-quote {
|
||||
@extend %light;
|
||||
@extend %large;
|
||||
background: url('/images/quote.png') no-repeat top left;
|
||||
background: url('../images/quote.png') no-repeat top left;
|
||||
line-height: 1.4;
|
||||
padding: .5rem;
|
||||
}
|
||||
|
|
|
@ -68,14 +68,14 @@ class AppMetaService
|
|||
@._set("twitter:site", "@taigaio")
|
||||
@._set("twitter:title", title)
|
||||
@._set("twitter:description", truncate(description, 300))
|
||||
@._set("twitter:image", "#{window.location.origin}/images/logo-color.png")
|
||||
@._set("twitter:image", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
|
||||
setOpenGraphMetas: (title, description) ->
|
||||
@._set("og:type", "object")
|
||||
@._set("og:site_name", "Taiga - Love your projects")
|
||||
@._set("og:title", title)
|
||||
@._set("og:description", truncate(description, 300))
|
||||
@._set("og:image", "#{window.location.origin}/images/logo-color.png")
|
||||
@._set("og:image", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
@._set("og:url", window.location.href)
|
||||
|
||||
setAll: (title, description) ->
|
||||
|
|
|
@ -30,6 +30,9 @@ describe "AppMetaService", ->
|
|||
appMetaService = _tgAppMetaService_
|
||||
$rootScope = _$rootScope_
|
||||
|
||||
before ->
|
||||
window._version = 1
|
||||
|
||||
beforeEach ->
|
||||
module "taigaCommon"
|
||||
_inject()
|
||||
|
@ -48,7 +51,7 @@ describe "AppMetaService", ->
|
|||
expect($("meta[name='twitter:site']")).to.have.attr("content", "@taigaio")
|
||||
expect($("meta[name='twitter:title']")).to.have.attr("content", data.title)
|
||||
expect($("meta[name='twitter:description']")).to.have.attr("content", data.description)
|
||||
expect($("meta[name='twitter:image']")).to.have.attr("content", "#{window.location.origin}/images/logo-color.png")
|
||||
expect($("meta[name='twitter:image']")).to.have.attr("content", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
|
||||
it "set meta for open graph", () ->
|
||||
appMetaService.setOpenGraphMetas(data.title, data.description)
|
||||
|
@ -56,7 +59,7 @@ describe "AppMetaService", ->
|
|||
expect($("meta[property='og:site_name']")).to.have.attr("content", "Taiga - Love your projects")
|
||||
expect($("meta[property='og:title']")).to.have.attr("content", data.title)
|
||||
expect($("meta[property='og:description']")).to.have.attr("content", data.description)
|
||||
expect($("meta[property='og:image']")).to.have.attr("content", "#{window.location.origin}/images/logo-color.png")
|
||||
expect($("meta[property='og:image']")).to.have.attr("content", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
expect($("meta[property='og:url']")).to.have.attr("content", window.location.href)
|
||||
|
||||
it "set all meta", () ->
|
||||
|
@ -67,12 +70,12 @@ describe "AppMetaService", ->
|
|||
expect($("meta[name='twitter:site']")).to.have.attr("content", "@taigaio")
|
||||
expect($("meta[name='twitter:title']")).to.have.attr("content", data.title)
|
||||
expect($("meta[name='twitter:description']")).to.have.attr("content", data.description)
|
||||
expect($("meta[name='twitter:image']")).to.have.attr("content", "#{window.location.origin}/images/logo-color.png")
|
||||
expect($("meta[name='twitter:image']")).to.have.attr("content", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
expect($("meta[property='og:type']")).to.have.attr("content", "object")
|
||||
expect($("meta[property='og:site_name']")).to.have.attr("content", "Taiga - Love your projects")
|
||||
expect($("meta[property='og:title']")).to.have.attr("content", data.title)
|
||||
expect($("meta[property='og:description']")).to.have.attr("content", data.description)
|
||||
expect($("meta[property='og:image']")).to.have.attr("content", "#{window.location.origin}/images/logo-color.png")
|
||||
expect($("meta[property='og:image']")).to.have.attr("content", "#{window.location.origin}/#{window._version}/images/logo-color.png")
|
||||
expect($("meta[property='og:url']")).to.have.attr("content", window.location.href)
|
||||
|
||||
it "set function to set the metas", () ->
|
||||
|
|
|
@ -7,10 +7,10 @@ div.activity-item
|
|||
// profile image with url
|
||||
div.profile-contact-picture(ng-if="timeline.getIn(['data', 'user', 'is_profile_visible'])")
|
||||
a(tg-nav="user-profile:username=timeline.getIn(['data', 'user', 'username'])", title="{{::timeline.getIn(['data', 'user', 'name']) }}")
|
||||
img(ng-src="{{::timeline.getIn(['data', 'user', 'photo']) || '/images/user-noimage.png'}}", alt="{{::timeline.getIn(['data', 'user', 'name'])}}")
|
||||
img(ng-src="{{::timeline.getIn(['data', 'user', 'photo']) || '/#{v}/images/user-noimage.png'}}", alt="{{::timeline.getIn(['data', 'user', 'name'])}}")
|
||||
// profile image without url
|
||||
div.profile-contact-picture(ng-if="!timeline.getIn(['data', 'user', 'is_profile_visible'])")
|
||||
img(ng-src="{{::timeline.getIn(['data', 'user', 'photo']) || '/images/user-noimage.png'}}", alt="{{::timeline.getIn(['data', 'user', 'name'])}}")
|
||||
img(ng-src="{{::timeline.getIn(['data', 'user', 'photo']) || '/#{v}/images/user-noimage.png'}}", alt="{{::timeline.getIn(['data', 'user', 'name'])}}")
|
||||
|
||||
p(tg-compile-html="timeline.get('title_html')")
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
section.profile-timeline
|
||||
div(ng-if="!vm.timelineList.size")
|
||||
div.spin
|
||||
img(src="/svg/spinner-circle.svg", alt="Loading...")
|
||||
img(src="/#{v}/svg/spinner-circle.svg", alt="Loading...")
|
||||
|
||||
div(infinite-scroll="vm.loadTimeline()", infinite-scroll-distance="3", infinite-scroll-disabled="vm.scrollDisabled")
|
||||
div(tg-repeat="timeline in vm.timelineList", tg-user-timeline-item="timeline")
|
||||
|
|
|
@ -21,7 +21,7 @@ div.wrapper(ng-controller="ProjectProfileController as ctrl",
|
|||
|
||||
div.admin-project-export-result.hidden
|
||||
div.spin.hidden
|
||||
img(src="/svg/spinner-circle.svg", alt="{{ 'COMMON.LOADING' | translate }}")
|
||||
img(src="/#{v}/svg/spinner-circle.svg", alt="{{ 'COMMON.LOADING' | translate }}")
|
||||
h3.result-title
|
||||
p.result-message
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ div.wrapper(tg-backlog, ng-controller="BacklogController as ctrl",
|
|||
tg-backlog-empty-sortable
|
||||
)
|
||||
img(
|
||||
src="/images/backlog-empty.png"
|
||||
src="/#{v}/images/backlog-empty.png"
|
||||
alt="{{'BACKLOG.EMPTY' | translate}}"
|
||||
)
|
||||
p.title(translate="BACKLOG.EMPTY")
|
||||
|
|
|
@ -3,7 +3,7 @@ doctype html
|
|||
div.error-main
|
||||
div.error-container
|
||||
object.logo-svg(type="image/svg+xml", data="/svg/logo.svg")
|
||||
img(src="/images/logo.png", alt="TAIGA")
|
||||
img(src="/#{v}/images/logo.png", alt="TAIGA")
|
||||
h1.logo Taiga
|
||||
p.error-text(translate="ERROR.TEXT1")
|
||||
a(href="/", title="", translate="COMMON.GO_HOME")
|
||||
|
|
|
@ -2,8 +2,8 @@ doctype html
|
|||
|
||||
div.error-main
|
||||
div.error-container
|
||||
object.logo-svg(type="image/svg+xml", data="/svg/logo.svg")
|
||||
img(src="/images/logo.png", alt="TAIGA")
|
||||
object.logo-svg(type="image/svg+xml", data="/#{v}/svg/logo.svg")
|
||||
img(src="/#{v}/images/logo.png", alt="TAIGA")
|
||||
h1.logo(translate="ERROR.NOT_FOUND")
|
||||
p.error-text(translate="ERROR.NOT_FOUND_TEXT")
|
||||
a(href="/", title="", translate="COMMON.GO_HOME")
|
||||
|
|
|
@ -3,7 +3,7 @@ doctype html
|
|||
div.error-main
|
||||
div.error-container
|
||||
object.logo-svg(type="image/svg+xml", data="/svg/logo.svg")
|
||||
img(src="/images/logo.png", alt="TAIGA")
|
||||
img(src="/#{v}/images/logo.png", alt="TAIGA")
|
||||
h1.logo(translate="ERROR.PERMISSION_DENIED")
|
||||
p.error-text(translate="ERROR.PERMISSION_DENIED_TEXT")
|
||||
a(href="/", title="", translate="COMMON.GO_HOME")
|
||||
|
|
|
@ -1 +1 @@
|
|||
img.beta(src="/images/beta.png", title="{{'COMMON.BETA' | translate}}")
|
||||
img.beta(src="/#{v}/images/beta.png", title="{{'COMMON.BETA' | translate}}")
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
img(
|
||||
src="../../images/search-empty.png"
|
||||
src="/#{v}/images/search-empty.png"
|
||||
alt="{{ 'SEARCH.EMPTY_TITLE' | translate }}"
|
||||
)
|
||||
p.title {{ 'SEARCH.EMPTY_TITLE' | translate }}
|
||||
|
|
|
@ -53,7 +53,7 @@ section.issues-table.basic-table(ng-class="{empty: !issues.length}")
|
|||
|
||||
section.empty-issues(ng-if="issues != undefined && issues.length == 0")
|
||||
img(
|
||||
src="../../images/issues-empty.png",
|
||||
src="/#{v}/images/issues-empty.png",
|
||||
alt="{{ISSUES.TABLE.EMPTY.TITLE | translate }}"
|
||||
)
|
||||
p.title(translate="ISSUES.TABLE.EMPTY.TITLE")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
section
|
||||
div.spin.hidden
|
||||
img(src="/svg/spinner-circle.svg", alt="{{'COMMON.LOADING' | translate}}")
|
||||
img(src="/#{v}/svg/spinner-circle.svg", alt="{{'COMMON.LOADING' | translate}}")
|
||||
|
||||
div.progress-bar-wrapper.hidden
|
||||
div.bar
|
||||
|
|
|
@ -17,7 +17,7 @@ section.sprints
|
|||
|
||||
div.sprints-empty(ng-if="totalMilestones === 0")
|
||||
img(
|
||||
src="/images/sprint-empty.png"
|
||||
src="/#{v}/images/sprint-empty.png"
|
||||
alt="{{'BACKLOG.SPRINTS.EMPTY' | translate}}"
|
||||
)
|
||||
p.title(translate="BACKLOG.SPRINTS.EMPTY")
|
||||
|
|
|
@ -19,7 +19,7 @@ div.wrapper(tg-user-profile, ng-controller="UserSettingsController as ctrl",
|
|||
img.avatar(ng-src="{{user.big_photo}}" alt="avatar")
|
||||
.overlay.hidden
|
||||
img.loading-spinner(
|
||||
src="/svg/spinner-circle.svg",
|
||||
src="/#{v}/svg/spinner-circle.svg",
|
||||
alt="{{'COMMON.LOADING' | translate}}"
|
||||
)
|
||||
|
||||
|
|
|
@ -63,11 +63,11 @@ $dropdown-color: rgba(darken($grayer, 20%), 1);
|
|||
|
||||
// Background images
|
||||
%triangled-bg {
|
||||
background: url('/images/bg.png') no-repeat center center;
|
||||
background: url('../images/bg.png') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
%background-taiga {
|
||||
background: url('/images/invitation_bg.jpg') no-repeat center center;
|
||||
background: url('../images/invitation_bg.jpg') no-repeat center center;
|
||||
background-size: cover;
|
||||
}
|
||||
|
|
74
gulpfile.js
74
gulpfile.js
|
@ -37,9 +37,12 @@ if (argv.theme) {
|
|||
themes.set(argv.theme);
|
||||
}
|
||||
|
||||
var version = "v-" + Date.now();
|
||||
|
||||
var paths = {};
|
||||
paths.app = "app/";
|
||||
paths.dist = "dist/";
|
||||
paths.distVersion = paths.dist + version + "/";
|
||||
paths.tmp = "tmp/";
|
||||
paths.extras = "extras/";
|
||||
paths.vendor = "vendor/";
|
||||
|
@ -190,7 +193,7 @@ gulp.task("jade", function() {
|
|||
return gulp.src(paths.jade)
|
||||
.pipe(plumber())
|
||||
.pipe(cached("jade"))
|
||||
.pipe(jade({pretty: true, locals:{v:(new Date()).getTime()}}))
|
||||
.pipe(jade({pretty: true, locals:{v:version}}))
|
||||
.pipe(gulp.dest(paths.tmp));
|
||||
});
|
||||
|
||||
|
@ -199,7 +202,7 @@ gulp.task("jade-inheritance", function() {
|
|||
.pipe(plumber())
|
||||
.pipe(cached("jade"))
|
||||
.pipe(jadeInheritance({basedir: "./app/"}))
|
||||
.pipe(jade({pretty: true, locals:{v:(new Date()).getTime()}}))
|
||||
.pipe(jade({pretty: true, locals:{v: version}}))
|
||||
.pipe(gulp.dest(paths.tmp));
|
||||
});
|
||||
|
||||
|
@ -211,7 +214,7 @@ gulp.task("copy-index", function() {
|
|||
gulp.task("template-cache", function() {
|
||||
return gulp.src(paths.htmlPartials)
|
||||
.pipe(templateCache({standalone: true}))
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
gulp.task("jade-deploy", function(cb) {
|
||||
|
@ -316,7 +319,7 @@ gulp.task("main-css", function() {
|
|||
return gulp.src(_paths)
|
||||
.pipe(concat("theme-" + themes.current.name + ".css"))
|
||||
.pipe(gulpif(isDeploy, minifyCSS({noAdvanced: true})))
|
||||
.pipe(gulp.dest(paths.dist + "styles/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "styles/"));
|
||||
});
|
||||
|
||||
var compileThemes = function (cb) {
|
||||
|
@ -365,19 +368,19 @@ gulp.task("styles-dependencies", function(cb) {
|
|||
*/
|
||||
gulp.task("conf", function() {
|
||||
return gulp.src(["conf/conf.example.json"])
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.dist));
|
||||
});
|
||||
|
||||
gulp.task("app-loader", function() {
|
||||
return gulp.src("app-loader/app-loader.coffee")
|
||||
.pipe(replace("___VERSION___", (new Date()).getTime()))
|
||||
.pipe(replace("___VERSION___", version))
|
||||
.pipe(coffee())
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
gulp.task("locales", function() {
|
||||
return gulp.src(paths.locales)
|
||||
.pipe(gulp.dest(paths.dist + "locales"));
|
||||
.pipe(gulp.dest(paths.distVersion + "locales"));
|
||||
});
|
||||
|
||||
gulp.task("coffee-lint", function () {
|
||||
|
@ -412,14 +415,14 @@ gulp.task("coffee", function() {
|
|||
})
|
||||
.pipe(concat("app.js"))
|
||||
.pipe(sourcemaps.write('./maps'))
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
gulp.task("jslibs-watch", function() {
|
||||
return gulp.src(paths.libs)
|
||||
.pipe(plumber())
|
||||
.pipe(concat("libs.js"))
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
gulp.task("jslibs-deploy", function() {
|
||||
|
@ -429,19 +432,17 @@ gulp.task("jslibs-deploy", function() {
|
|||
.pipe(concat("libs.js"))
|
||||
.pipe(uglify({mangle:false, preserveComments: false}))
|
||||
.pipe(sourcemaps.write("./maps"))
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
gulp.task("app-watch", ["coffee-lint", "coffee", "conf", "locales", "app-loader"]);
|
||||
|
||||
gulp.task("app-deploy", ["coffee", "conf", "locales", "app-loader"], function() {
|
||||
return gulp.src(paths.dist)
|
||||
.pipe(order(paths.coffee_order, {base: '.'}))
|
||||
return gulp.src(paths.distVersion + "js/app.js")
|
||||
.pipe(sourcemaps.init())
|
||||
.pipe(concat("app.js"))
|
||||
.pipe(uglify({mangle:false, preserveComments: false}))
|
||||
.pipe(sourcemaps.write("./maps"))
|
||||
.pipe(gulp.dest(paths.dist + "js/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "js/"));
|
||||
});
|
||||
|
||||
/*
|
||||
|
@ -456,45 +457,45 @@ gulp.task("clear", ["clear-sass-cache"], function(done) {
|
|||
//SVG
|
||||
gulp.task("copy-svg", function() {
|
||||
return gulp.src(paths.app + "/svg/**/*")
|
||||
.pipe(gulp.dest(paths.dist + "/svg/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "/svg/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-theme-svg", function() {
|
||||
return gulp.src(themes.current.path + "/svg/**/*")
|
||||
.pipe(gulp.dest(paths.dist + "/svg/" + themes.current.name));
|
||||
.pipe(gulp.dest(paths.distVersion + "/svg/" + themes.current.name));
|
||||
});
|
||||
|
||||
gulp.task("copy-fonts", function() {
|
||||
return gulp.src(paths.app + "/fonts/*")
|
||||
.pipe(gulp.dest(paths.dist + "/fonts/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "/fonts/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-theme-fonts", function() {
|
||||
return gulp.src(themes.current.path + "/fonts/*")
|
||||
.pipe(gulp.dest(paths.dist + "/fonts/" + themes.current.name));
|
||||
.pipe(gulp.dest(paths.distVersion + "/fonts/" + themes.current.name));
|
||||
});
|
||||
|
||||
gulp.task("copy-images", function() {
|
||||
return gulp.src(paths.app + "/images/**/*")
|
||||
.pipe(gulpif(isDeploy, imagemin({progressive: true})))
|
||||
.pipe(gulp.dest(paths.dist + "/images/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "/images/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-theme-images", function() {
|
||||
return gulp.src(themes.current.path + "/images/**/*")
|
||||
.pipe(gulpif(isDeploy, imagemin({progressive: true})))
|
||||
.pipe(gulp.dest(paths.dist + "/images/" + themes.current.name));
|
||||
.pipe(gulp.dest(paths.distVersion + "/images/" + themes.current.name));
|
||||
});
|
||||
|
||||
gulp.task("copy-images-plugins", function() {
|
||||
return gulp.src(paths.app + "/plugins/**/images/*")
|
||||
.pipe(flatten())
|
||||
.pipe(gulp.dest(paths.dist + "/images/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "/images/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-plugin-templates", function() {
|
||||
return gulp.src(paths.app + "/plugins/**/templates/**/*.html")
|
||||
.pipe(gulp.dest(paths.dist + "/plugins/"));
|
||||
.pipe(gulp.dest(paths.distVersion + "/plugins/"));
|
||||
});
|
||||
|
||||
gulp.task("copy-extras", function() {
|
||||
|
@ -514,6 +515,10 @@ gulp.task("copy", [
|
|||
"copy-extras"
|
||||
]);
|
||||
|
||||
gulp.task("delete-old-version", function() {
|
||||
del.sync(paths.dist + "v-*");
|
||||
});
|
||||
|
||||
gulp.task("delete-tmp", function() {
|
||||
del.sync(paths.tmp);
|
||||
});
|
||||
|
@ -522,15 +527,16 @@ gulp.task("express", function() {
|
|||
var express = require("express");
|
||||
var app = express();
|
||||
|
||||
app.use("/js", express.static(__dirname + "/dist/js"));
|
||||
app.use("/styles", express.static(__dirname + "/dist/styles"));
|
||||
app.use("/images", express.static(__dirname + "/dist/images"));
|
||||
app.use("/svg", express.static(__dirname + "/dist/svg"));
|
||||
app.use("/partials", express.static(__dirname + "/dist/partials"));
|
||||
app.use("/fonts", express.static(__dirname + "/dist/fonts"));
|
||||
app.use("/plugins", express.static(__dirname + "/dist/plugins"));
|
||||
app.use("/locales", express.static(__dirname + "/dist/locales"));
|
||||
app.use("/maps", express.static(__dirname + "/dist/maps"));
|
||||
app.use("/" + version + "/js", express.static(__dirname + "/dist/" + version + "/js"));
|
||||
app.use("/" + version + "/styles", express.static(__dirname + "/dist/" + version + "/styles"));
|
||||
app.use("/" + version + "/images", express.static(__dirname + "/dist/" + version + "/images"));
|
||||
app.use("/" + version + "/svg", express.static(__dirname + "/dist/" + version + "/svg"));
|
||||
app.use("/" + version + "/partials", express.static(__dirname + "/dist/" + version + "/partials"));
|
||||
app.use("/" + version + "/fonts", express.static(__dirname + "/dist/" + version + "/fonts"));
|
||||
app.use("/" + version + "/plugins", express.static(__dirname + "/dist/" + version + "/plugins"));
|
||||
app.use("/" + version + "/locales", express.static(__dirname + "/dist/" + version + "/locales"));
|
||||
app.use("/" + version + "/maps", express.static(__dirname + "/dist/" + version + "/maps"));
|
||||
app.use("/conf.json", express.static(__dirname + "/dist/conf.json"));
|
||||
|
||||
app.all("/*", function(req, res, next) {
|
||||
//Just send the index.html for other files to support HTML5Mode
|
||||
|
@ -554,7 +560,7 @@ gulp.task("watch", function() {
|
|||
});
|
||||
|
||||
gulp.task("deploy", function(cb) {
|
||||
runSequence("clear", "delete-tmp", [
|
||||
runSequence("clear", "delete-old-version", "delete-tmp", [
|
||||
"copy",
|
||||
"jade-deploy",
|
||||
"app-deploy",
|
||||
|
@ -564,7 +570,7 @@ gulp.task("deploy", function(cb) {
|
|||
});
|
||||
//The default task (called when you run gulp from cli)
|
||||
gulp.task("default", function(cb) {
|
||||
runSequence("delete-tmp", [
|
||||
runSequence("delete-old-version", "delete-tmp", [
|
||||
"copy",
|
||||
"styles",
|
||||
"app-watch",
|
||||
|
|
|
@ -2,9 +2,6 @@
|
|||
// Generated on Wed Apr 15 2015 09:44:14 GMT+0200 (CEST)
|
||||
|
||||
// this is needed by theme.service.spec
|
||||
var fs = require('fs');
|
||||
fs.writeFileSync('dist/styles/empty.css', '');
|
||||
|
||||
module.exports = function(config) {
|
||||
var configuration = {
|
||||
|
||||
|
@ -20,7 +17,7 @@ module.exports = function(config) {
|
|||
// list of files / patterns to load in the browser
|
||||
files: [
|
||||
'karma.app.conf.js',
|
||||
'dist/js/libs.js',
|
||||
'dist/**/js/libs.js',
|
||||
'node_modules/angular-mocks/angular-mocks.js',
|
||||
'vendor/bluebird/js/browser/bluebird.js',
|
||||
'node_modules/chai-jquery/chai-jquery.js',
|
||||
|
@ -28,8 +25,8 @@ module.exports = function(config) {
|
|||
'vendor/lodash/dist/lodash.js',
|
||||
'vendor/underscore.string/lib/underscore.string.js',
|
||||
'test-utils.js',
|
||||
'dist/js/app.js',
|
||||
'dist/js/templates.js',
|
||||
'dist/**/js/app.js',
|
||||
'dist/**/js/templates.js',
|
||||
'app/**/*spec.coffee'
|
||||
],
|
||||
|
||||
|
@ -96,8 +93,7 @@ module.exports = function(config) {
|
|||
proxies: {
|
||||
'/images/': 'http://localhost:9001/images/',
|
||||
'/base/dist/js/maps/': 'http://localhost:9001/js/maps/',
|
||||
'/base/dist/js/maps/': 'http://localhost:9001/js/maps/',
|
||||
'/styles/theme-testTheme.css': 'http://localhost:9001/styles/empty.css'
|
||||
'/base/dist/js/maps/': 'http://localhost:9001/js/maps/'
|
||||
},
|
||||
|
||||
// Continuous Integration mode
|
||||
|
|
Loading…
Reference in New Issue