mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-08 06:59:46 +01:00
Add some comments
This commit is contained in:
parent
1630d99bac
commit
bd3c1ae405
@ -158,6 +158,9 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
this._super.apply(this, arguments);
|
this._super.apply(this, arguments);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Create all needed widgets for new / old values
|
||||||
|
*/
|
||||||
createWidgets: function() {
|
createWidgets: function() {
|
||||||
|
|
||||||
// Constant widgets - first 3 columns
|
// Constant widgets - first 3 columns
|
||||||
@ -209,6 +212,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
if(nodes[i] == null) nodes.splice(i,1);
|
if(nodes[i] == null) nodes.splice(i,1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Save to use for each row
|
||||||
this.fields[cf_widget.prefix + key] = {
|
this.fields[cf_widget.prefix + key] = {
|
||||||
attrs: cf_widget.widgets[key].options,
|
attrs: cf_widget.widgets[key].options,
|
||||||
widget: cf_widget.widgets[key],
|
widget: cf_widget.widgets[key],
|
||||||
@ -229,7 +233,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
{
|
{
|
||||||
attrs['select-options'] = field;
|
attrs['select-options'] = field;
|
||||||
}
|
}
|
||||||
// Check for options after the type
|
// Check for options after the type, ex: link-entry:infolog
|
||||||
else if (field.indexOf(':') > 0)
|
else if (field.indexOf(':') > 0)
|
||||||
{
|
{
|
||||||
var options = field.split(':');
|
var options = field.split(':');
|
||||||
@ -237,6 +241,8 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
}
|
}
|
||||||
|
|
||||||
var widget = et2_createWidget(typeof field == 'string' ? field : 'select', attrs, this);
|
var widget = et2_createWidget(typeof field == 'string' ? field : 'select', attrs, this);
|
||||||
|
|
||||||
|
// Parse / set legacy options
|
||||||
if(options)
|
if(options)
|
||||||
{
|
{
|
||||||
var mgr = this.getArrayMgr("content");
|
var mgr = this.getArrayMgr("content");
|
||||||
@ -244,6 +250,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
{
|
{
|
||||||
// Not set
|
// Not set
|
||||||
if(options[i] == "") continue;
|
if(options[i] == "") continue;
|
||||||
|
|
||||||
var attr = widget.attributes[widget.legacyOptions[i]];
|
var attr = widget.attributes[widget.legacyOptions[i]];
|
||||||
var attrValue = options[i];
|
var attrValue = options[i];
|
||||||
|
|
||||||
@ -272,6 +279,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
if(widget.instanceOf(et2_selectbox)) widget.options.multiple = true;
|
if(widget.instanceOf(et2_selectbox)) widget.options.multiple = true;
|
||||||
widget.transformAttributes(attrs);
|
widget.transformAttributes(attrs);
|
||||||
|
|
||||||
|
// Save to use for each row
|
||||||
this.fields[key] = {
|
this.fields[key] = {
|
||||||
attrs: attrs,
|
attrs: attrs,
|
||||||
widget: widget,
|
widget: widget,
|
||||||
@ -354,7 +362,7 @@ var et2_historylog = et2_valueWidget.extend([et2_IDataProvider],{
|
|||||||
{
|
{
|
||||||
// Large text value - span both columns, and show a nice diff
|
// Large text value - span both columns, and show a nice diff
|
||||||
var jthis = jQuery(this);
|
var jthis = jQuery(this);
|
||||||
if(i == 3)
|
if(i == self.NEW_VALUE)
|
||||||
{
|
{
|
||||||
// Diff widget
|
// Diff widget
|
||||||
widget = self.diff.widget;
|
widget = self.diff.widget;
|
||||||
|
Loading…
Reference in New Issue
Block a user