mirror of
https://github.com/espocrm/espocrm.git
synced 2026-03-06 07:27:01 +00:00
Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
beb4435ee0 | ||
|
|
6a4c78c1cb | ||
|
|
dc7f5d8e66 | ||
|
|
872a4c2f2c | ||
|
|
8a5204bc4c | ||
|
|
acbf6a1742 | ||
|
|
b2d3d56a85 | ||
|
|
8b83fa640f |
@@ -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', () => {
|
||||
|
||||
@@ -235,7 +235,6 @@
|
||||
},
|
||||
"language": {
|
||||
"type": "enum",
|
||||
"options": ["en_US"],
|
||||
"default": "en_US",
|
||||
"view": "views/settings/fields/language",
|
||||
"isSorted": true
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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
30
diff.js
@@ -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);
|
||||
}
|
||||
})();
|
||||
|
||||
@@ -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 {
|
||||
|
||||
20
js/diff.js
20
js/diff.js
@@ -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
2
package-lock.json
generated
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "7.2.1",
|
||||
"version": "7.2.2",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "espocrm",
|
||||
"version": "7.2.1",
|
||||
"version": "7.2.2",
|
||||
"description": "Open-source CRM.",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
||||
Reference in New Issue
Block a user