"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "tine20/Tinebase/js/widgets/relation/Manager.js" between
tine20-2020.08.3.tar.gz and tine20-2020.08.4.tar.gz

About: Tine 2.0 is a platform independent business software system which combines groupware and customer relationship management (CRM). Commercial support is available. Source code.

Manager.js  (tine20-2020.08.3):Manager.js  (tine20-2020.08.4)
skipping to change at line 84 skipping to change at line 84
* @param Tine.Tinebase.data.Record recordClass * @param Tine.Tinebase.data.Record recordClass
* @param {String} key * @param {String} key
* @return {Boolean} * @return {Boolean}
*/ */
create: function(recordClass, key) { create: function(recordClass, key) {
var registered = []; var registered = [];
if(!items[key]) items[key] = []; if(!items[key]) items[key] = [];
// add generic relations when no config exists // add generic relations when no config exists
Tine.Tinebase.data.RecordMgr.each(function(rec) { Tine.Tinebase.data.RecordMgr.each(function(rec) {
if (Tine.Tinebase.common.hasRight('run', rec.getMeta('appName')) if (Tine.Tinebase.common.hasRight('run', rec.getMeta('appName'))
&& (ignoreApplications.indexOf(rec.getMeta('appName')) == -1) && (rec.getFieldN && (ignoreApplications.indexOf(rec.getMeta('appName')) == -1
ames().indexOf('relations') > -1)) { )
&& (rec.getFieldNames().indexOf('relations') > -1)
&& rec.getRecordName()
) {
items[key].push({ items[key].push({
ownModel: recordClass.getMeta('recordName'), ownModel: recordClass.getMeta('recordName'),
relatedApp: rec.getMeta('appName'), relatedApp: rec.getMeta('appName'),
relatedModel: rec.getMeta('modelName'), relatedModel: rec.getMeta('modelName'),
text: rec.getMeta('modelName') === 'Node' ? rec.getAppNa me() : rec.getRecordName() + ' (' + rec.getAppName() + ')' text: rec.getMeta('modelName') === 'Node' ? rec.getAppNa me() : rec.getRecordName() + ' (' + rec.getAppName() + ')'
}); });
} }
}); });
// set to false, so not try again // set to false, so not try again
if(items[key].length == 0) items[key] = false; if(items[key].length == 0) items[key] = false;
}, },
/** /**
* returns the key (appName + modelName) * returns the key (appName + modelName)
* @param {String/Tine.Tinebase.Application} appName * @param {String/Tine.Tinebase.Application} appName
* @param {String/Tine.Tinebase.data.Record} modelName * @param {String/Tine.Tinebase.data.Record} modelName
* @return {String} * @return {String}
*/ */
getKey: function(appName, modelName) { getKey: function(appName, modelName) {
var appName = Tine.Tinebase.common.resolveApp(appName); const recordClass = Tine.Tinebase.data.RecordMgr.get(appName, modelN
var modelName = Tine.Tinebase.common.resolveModel(modelName); ame);
return appName + modelName; return recordClass ? recordClass.getMeta('appName') + recordClass.ge
tMeta('modelName') : '';
} }
}; };
}(); }();
 End of changes. 2 change blocks. 
6 lines changed or deleted 10 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)