Merge branch 'hotfix/4.5.1'

This commit is contained in:
yuri
2017-03-23 11:49:50 +02:00
5 changed files with 67 additions and 15 deletions
@@ -25,7 +25,8 @@
"targetLists": "Target Lists",
"targetList": "Target List",
"industry": "Industry",
"acceptanceStatus": "Acceptance Status"
"acceptanceStatus": "Acceptance Status",
"opportunityAmountCurrency": "Opportunity Amount Currency"
},
"links": {
"targetLists": "Target Lists",
@@ -13,7 +13,8 @@
"amountConverted": "Amount (converted)",
"amountWeightedConverted": "Amount Weighted",
"campaign": "Campaign",
"originalLead": "Original Lead"
"originalLead": "Original Lead",
"amountCurrency": "Amount Currency"
},
"links": {
"contacts": "Contacts",
@@ -10,6 +10,9 @@
}
]
},
"recordViews": {
"detail": "crm:views/target-list/record/detail"
},
"relationshipPanels": {
"contacts": {
"actionList": [
@@ -0,0 +1,46 @@
/************************************************************************
* This file is part of EspoCRM.
*
* EspoCRM - Open Source CRM application.
* Copyright (C) 2014-2017 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
* Website: http://www.espocrm.com
*
* EspoCRM is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* EspoCRM is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
*
* The interactive user interfaces in modified source and object code versions
* of this program must display Appropriate Legal Notices, as required under
* Section 5 of the GNU General Public License version 3.
*
* In accordance with Section 7(b) of the GNU General Public License version 3,
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/
Espo.define('crm:views/target-list/record/detail', 'views/record/detail', function (Dep) {
return Dep.extend({
setup: function () {
Dep.prototype.setup.call(this);
this.listenTo(this.model, 'after:relate', function () {
this.model.fetch();
}, this);
this.listenTo(this.model, 'after:unrelate', function () {
this.model.fetch();
}, this);
}
});
});
+14 -13
View File
@@ -286,27 +286,27 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
actionUnlinkRelated: function (data) {
var id = data.id;
var self = this;
this.confirm({
message: this.translate('unlinkRecordConfirmation', 'messages'),
confirmText: this.translate('Unlink')
}, function () {
var model = this.collection.get(id);
self.notify('Unlinking...');
this.notify('Unlinking...');
$.ajax({
url: self.collection.url,
url: this.collection.url,
type: 'DELETE',
data: JSON.stringify({
id: id
}),
contentType: 'application/json',
success: function () {
self.notify('Unlinked', 'success');
self.collection.fetch();
},
this.notify('Unlinked', 'success');
this.collection.fetch();
this.model.trigger('after:unrelate');
}.bind(this),
error: function () {
self.notify('Error occurred', 'error');
},
this.notify('Error occurred', 'error');
}.bind(this),
});
}, this);
},
@@ -314,18 +314,18 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
actionRemoveRelated: function (data) {
var id = data.id;
var self = this;
this.confirm({
message: this.translate('removeRecordConfirmation', 'messages'),
confirmText: this.translate('Remove')
}, function () {
var model = this.collection.get(id);
self.notify('Removing...');
this.notify('Removing...');
model.destroy({
success: function () {
self.notify('Removed', 'success');
self.collection.fetch();
},
this.notify('Removed', 'success');
this.collection.fetch();
this.model.trigger('after:unrelate');
}.bind(this),
});
}, this);
},
@@ -344,6 +344,7 @@ Espo.define('views/record/panels/relationship', ['views/record/panels/bottom', '
this.notify(false);
this.notify('Unlinked', 'success');
this.collection.fetch();
this.model.trigger('after:unrelate');
}.bind(this));
}, this);
},