Compare commits

...

8 Commits
7.2.1 ... 7.2.2

Author SHA1 Message Date
Yuri Kuznetsov
beb4435ee0 diff closest 2022-09-12 15:07:32 +03:00
Yuri Kuznetsov
6a4c78c1cb fix language settings 2022-09-12 14:51:05 +03:00
Yuri Kuznetsov
dc7f5d8e66 fix grunt zip 2022-09-12 14:06:54 +03:00
Yuri Kuznetsov
872a4c2f2c fix typo 2022-09-12 12:35:27 +03:00
Yuri Kuznetsov
8a5204bc4c css fix 2022-09-12 12:03:26 +03:00
Yuri Kuznetsov
acbf6a1742 v 2022-09-12 11:22:07 +03:00
Yuri Kuznetsov
b2d3d56a85 attachment-multiple link 2022-09-12 11:20:48 +03:00
Yuri Kuznetsov
8b83fa640f note relate icon 2022-09-12 10:45:16 +03:00
11 changed files with 55 additions and 30 deletions

View File

@@ -381,7 +381,7 @@ module.exports = grunt => {
});
grunt.registerTask('upgrade', () => {
cp.execSync("node diff --all --vendor", {stdio: 'inherit'});
cp.execSync("node diff --closest", {stdio: 'inherit'});
});
grunt.registerTask('unit-tests-run', () => {
@@ -396,7 +396,7 @@ module.exports = grunt => {
cp.execSync("composer run-script setConfigParams", {stdio: 'ignore'});
});
grunt.registerTask('zip', () => {
grunt.registerTask('zip', function () { // Don't change to arrow-function.
const archiver = require('archiver');
let resolve = this.async();
@@ -425,8 +425,9 @@ module.exports = grunt => {
archive
.directory(currentPath + '/build/' + folder, folder)
.pipe(zipOutput)
.finalize();
.pipe(zipOutput);
archive.finalize();
});
grunt.registerTask('npm-install', () => {

View File

@@ -235,7 +235,6 @@
},
"language": {
"type": "enum",
"options": ["en_US"],
"default": "en_US",
"view": "views/settings/fields/language",
"isSorted": true

View File

@@ -739,7 +739,7 @@ define('views/admin/entity-manager/edit', ['view', 'model'], function (Dep, Mode
if (
this.getMetadata()
.get(['entityDefs', foreignEntityType, 'fields', item, 'foreingAccessDisabled'])
.get(['entityDefs', foreignEntityType, 'fields', item, 'foreignAccessDisabled'])
) {
return false;
}

View File

@@ -343,7 +343,7 @@ function (Dep, FileUpload) {
getEditPreview: function (name, type, id) {
if (!~this.previewTypeList.indexOf(type)) {
return name;
return null;
}
return $('<img>')
@@ -368,11 +368,9 @@ function (Dep, FileUpload) {
if (this.showPreviews) {
let html = this.getEditPreview(name, type, id);
if (!html) {
return $text.get(0).outerHTML;
if (html) {
return html;
}
return html;
}
let url = this.getBasePath() + '?entryPoint=download&id=' + id;

View File

@@ -627,11 +627,9 @@ define('views/fields/file', ['views/fields/link', 'helpers/file-upload'], functi
if (this.showPreview) {
let html = this.getEditPreview(name, type, id);
if (!html) {
return $text.get(0).outerHTML;
if (html) {
return html;
}
return html;
}
let url = this.getBasePath() + '?entryPoint=download&id=' + id;

View File

@@ -37,6 +37,7 @@ define('views/stream/notes/relate', ['views/stream/note'], function (Dep) {
data: function () {
return _.extend({
relatedTypeString: this.translateEntityType(this.entityType),
iconHtml: this.getIconHtml(this.entityType, this.entityId),
}, Dep.prototype.data.call(this));
},

30
diff.js
View File

@@ -47,6 +47,7 @@ let isDev = false;
let isAll = false;
let withVendor = true;
let forceScripts = false;
let isClosest = false;
if (process.argv.length > 1) {
for (let i in process.argv) {
@@ -67,6 +68,10 @@ if (process.argv.length > 1) {
forceScripts = true;
}
if (process.argv[i] === '--closest') {
isClosest = true;
}
if (~process.argv[i].indexOf('--acceptedVersion=')) {
acceptedVersionName = process.argv[i].substr(('--acceptedVersion=').length);
}
@@ -75,22 +80,33 @@ if (process.argv.length > 1) {
let espoPath = path.dirname(fs.realpathSync(__filename));
if (isAll || isClosest) {
acceptedVersionName = null;
}
let diff = new Diff(espoPath, {
isAll: isAll,
isDev: isDev,
withVendor: withVendor,
forceScripts: forceScripts,
acceptedVersionName: !isAll ? acceptedVersionName : null,
acceptedVersionName: acceptedVersionName,
});
if (isAll) {
diff.buildAllUpgradePackages();
}
(() => {
if (isAll) {
diff.buildAllUpgradePackages();
return;
}
if (isClosest) {
diff.buildClosestUpgradePackages();
return;
}
if (!isAll) {
if (!versionFrom) {
throw new Error("No 'version' specified.");
}
diff.buildUpgradePackage(versionFrom);
}
})();

View File

@@ -1045,6 +1045,10 @@ input.global-search-input {
&:last-child {
margin-bottom: 0;
}
> input[type=checkbox] {
margin: 3px 3px 0 0;
}
}
.multi-enum-item-label-container {

View File

@@ -27,14 +27,12 @@
************************************************************************/
const fs = require('fs');
const sys = require('util');
const cp = require('child_process');
const archiver = require('archiver');
const process = require('process');
const buildUtils = require('./build-utils');
const exec = cp.exec;
const execSync = cp.execSync;
/**
* Builds upgrade packages.
@@ -59,13 +57,19 @@ class Diff
return tagList;
}
buildClosestUpgradePackages() {
let versionFromList = this._getPreviousVersionList(true);
this.buildMultipleUpgradePackages(versionFromList);
}
buildAllUpgradePackages() {
let versionFromList = this._getPreviousVersionList();
this.buildMultipleUpgradePackages(versionFromList);
}
_getPreviousVersionList() {
_getPreviousVersionList(closest) {
let dirInitial = process.cwd();
let version = (require(this.espoPath + '/package.json') || {}).version;
@@ -105,6 +109,12 @@ class Diff
for (let i = 0; i < tagList.length; i++) {
let tag = tagList[i];
let patchVersionNumberI = tag.split('.')[2];
if (closest && parseInt(patchVersionNumberI) !== parseInt(hotfixVersionNumber) - 1) {
break;
}
if (tag === version) {
continue;
}
@@ -112,8 +122,6 @@ class Diff
if (!~tag.indexOf('beta') && !~tag.indexOf('alpha')) {
versionFromList.push(tag);
let patchVersionNumberI = tag.split('.')[2];
if (patchVersionNumberI === '0') {
break;
}
@@ -156,7 +164,7 @@ class Diff
return new Promise(resolve => {
let acceptedVersionName = params.acceptedVersionName || versionFrom;
let isDev = params.isDev;
let withVendor = params.withVendor;
let withVendor = params.withVendor ?? true;
let forceScripts = params.forceScripts;
let version = (require(espoPath + '/package.json') || {}).version;

2
package-lock.json generated
View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.2.1",
"version": "7.2.2",
"lockfileVersion": 2,
"requires": true,
"packages": {

View File

@@ -1,6 +1,6 @@
{
"name": "espocrm",
"version": "7.2.1",
"version": "7.2.2",
"description": "Open-source CRM.",
"repository": {
"type": "git",