Skip to content

Commit 532e212

Browse files
authored
Merge pull request #5609 from Countly/subdir-adjustments
More adjustments for countly servers using subdirectory
2 parents c76e938 + 179a062 commit 532e212

File tree

7 files changed

+34
-10
lines changed

7 files changed

+34
-10
lines changed

Gruntfile.js

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ module.exports = function(grunt) {
241241
'frontend/express/public/javascripts/dom/drop/drop-theme-countly.min.css',
242242
'frontend/express/public/javascripts/utils/tooltipster/tooltipster.bundle.min.css',
243243
'frontend/express/public/stylesheets/bulma/bulma-custom.css',
244-
'frontend/express/public/stylesheets/styles/manifest.css',
244+
'frontend/express/public/stylesheets/styles/manifest2.css',
245245
'frontend/express/public/stylesheets/vue/element-tiptap.css',
246246
]
247247
}
@@ -324,7 +324,25 @@ module.exports = function(grunt) {
324324

325325
grunt.registerTask('default', ['mochaTest']);
326326

327-
grunt.registerTask('dist', ['sass', 'concat', 'uglify', 'cssmin']);
327+
grunt.registerTask('replace-paths', 'Replace image paths in prod CSS files', function() {
328+
var cssFiles = [
329+
{
330+
filepath: 'frontend/express/public/stylesheets/styles/manifest.css',
331+
lookup: '../../images',
332+
replacement: '../images',
333+
newPath: 'frontend/express/public/stylesheets/styles/manifest2.css'
334+
}
335+
];
336+
337+
cssFiles.forEach(function(file) {
338+
var content = grunt.file.read(file.filepath);
339+
var newContent = content.replace(/\.\.\/\.\.\/images/g, file.replacement);
340+
grunt.file.write(file.newPath, newContent);
341+
grunt.log.writeln('Processed file: ' + file.filepath);
342+
});
343+
});
344+
345+
grunt.registerTask('dist', ['sass', 'concat', 'uglify', 'replace-paths', 'cssmin']);
328346

329347
grunt.registerTask('plugins', 'Minify plugin JS / CSS files and copy images', function() {
330348
var js = [], css = [], img = [], fs = require('fs'), path = require('path');

api/parts/mgmt/mail.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,9 @@ mail.sendToNewMember = function(member, memberPassword) {
186186
mail.sendToNewMemberLink = function(member, prid) {
187187
member.lang = member.lang || "en";
188188
mail.lookup(function(err, host) {
189+
if (config.path) {
190+
host = host + config.path;
191+
}
189192
localize.getProperties(member.lang, function(err2, properties) {
190193
var message = localize.format(properties["mail.new-member-prid"], mail.escapedHTMLString(mail.getUserFirstName(member)), host, mail.escapedHTMLString(member.username), prid);
191194
mail.sendMessage(member.email, properties["mail.new-member-subject"], message);
@@ -217,6 +220,9 @@ mail.sendToUpdatedMember = function(member, memberPassword) {
217220
mail.sendPasswordResetInfo = function(member, prid) {
218221
member.lang = member.lang || "en";
219222
mail.lookup(function(err, host) {
223+
if (config.path) {
224+
host = host + config.path;
225+
}
220226
localize.getProperties(member.lang, function(err2, properties) {
221227
var message = localize.format(properties["mail.password-reset"], mail.escapedHTMLString(mail.getUserFirstName(member)), host, prid);
222228
mail.sendMessage(member.email, properties["mail.password-reset-subject"], message);

frontend/express/public/core/events/stylesheets/_main.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
&--image {
9090
width: 242px;
9191
height: 242px;
92-
background-image: url('../../../images/dashboard/events-overview-noevents.svg');
92+
background-image: url('../../images/dashboard/events-overview-noevents.svg');
9393
}
9494
}
9595
&--text{

frontend/express/public/core/onboarding/stylesheets/_main.scss

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,23 +63,23 @@
6363
}
6464

6565
.setup-radio-icon {
66-
background-image: url('../../../images/dashboard/onboarding/box.svg');
66+
background-image: url('../../images/dashboard/onboarding/box.svg');
6767
background-position: center;
6868
background-repeat: no-repeat;
6969
width: 100%;
7070
height: 100%;
7171
}
7272

7373
.setup-radio-icon--app-type-mobile {
74-
background-image: url('../../../images/dashboard/onboarding/app-type-mobile.svg');
74+
background-image: url('../../images/dashboard/onboarding/app-type-mobile.svg');
7575
}
7676

7777
.setup-radio-icon--app-type-web {
78-
background-image: url('../../../images/dashboard/onboarding/app-type-web.svg');
78+
background-image: url('../../images/dashboard/onboarding/app-type-web.svg');
7979
}
8080

8181
.setup-radio-icon--app-type-desktop {
82-
background-image: url('../../../images/dashboard/onboarding/app-type-desktop.svg');
82+
background-image: url('../../images/dashboard/onboarding/app-type-desktop.svg');
8383
}
8484

8585
.is-checked .setup-radio-icon {

frontend/express/public/javascripts/countly/vue/components/sidebar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@
569569
versionInfo: countlyGlobal.countlyTypeName,
570570
countlySidebarVersionPath: '/dashboard#/' + countlyCommon.ACTIVE_APP_ID + '/versions',
571571
showMainMenu: true,
572-
redirectHomePage: '/dashboard#/' + countlyCommon.ACTIVE_APP_ID,
572+
redirectHomePage: 'dashboard#/' + countlyCommon.ACTIVE_APP_ID,
573573
onOptionsMenu: false,
574574
onMainMenu: false,
575575
enableGuides: CountlyHelpers.isPluginEnabled('guides'),

frontend/express/public/stylesheets/styles/blocks/_helpers.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@
123123
border: 1px solid #E2E4E8;
124124
background-color: #F8FAFD;
125125
border-radius:8px;
126-
background-image: url('/images/icons/empty-background.svg');
126+
background-image: url('../../images/icons/empty-background.svg');
127127
background-position: 100% 100%;
128128
background-repeat: no-repeat;
129129
}

frontend/express/public/stylesheets/vue/clyvue.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@
367367
display: inline-block;
368368
width: 60px;
369369
height: 60px;
370-
background-image: url("../images/dashboard/graph-no-data.svg");
370+
background-image: url("../../images/dashboard/graph-no-data.svg");
371371
background-size: contain;
372372
margin-right: 20px;
373373
background-repeat: no-repeat;

0 commit comments

Comments
 (0)