"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "phprojekt/application/Default/Views/dojo/scripts/Field.js" between
PHProjekt-6.2.0.tar.gz and PHProjekt-6.2.1.tar.gz

About: PHProjekt is an application suite that supports communication and management of teams and companies. It includes a group calendar, project management, a request tracker and 12 other modules.

Field.js  (PHProjekt-6.2.0):Field.js  (PHProjekt-6.2.1)
skipping to change at line 26 skipping to change at line 26
* @link http://www.phprojekt.com * @link http://www.phprojekt.com
* @since File available since Release 6.0 * @since File available since Release 6.0
* @author Gustavo Solt <solt@mayflower.de> * @author Gustavo Solt <solt@mayflower.de>
*/ */
dojo.provide("phpr.Default.Field"); dojo.provide("phpr.Default.Field");
dojo.require("dijit._editor.plugins.LinkDialog"); dojo.require("dijit._editor.plugins.LinkDialog");
dojo.require("dijit._editor.plugins.TextColor"); dojo.require("dijit._editor.plugins.TextColor");
dojo.require("dijit._editor.plugins.FontChoice"); dojo.require("dijit._editor.plugins.FontChoice");
dojo.require("dojo.date.locale");
dojo.require("dojo.i18n");
dojo.declare("phpr.Default.Field", phpr.Default.System.Component, { dojo.declare("phpr.Default.Field", phpr.Default.System.Component, {
// summary: // summary:
// class for rendering form fields // class for rendering form fields
// description: // description:
// this class renders the different form types which are available in a P HProjekt Detail View // this class renders the different form types which are available in a P HProjekt Detail View
checkRender: function(itemlabel, itemid, itemvalue, itemdisabled, itemhint) { checkRender: function(itemlabel, itemid, itemvalue, itemdisabled, itemhint) {
phpr.destroyWidget(itemid); phpr.destroyWidget(itemid);
var itemchecked = false, var itemchecked = false,
skipping to change at line 329 skipping to change at line 331
phpr.destroyWidget(itemid + "_disabled"); phpr.destroyWidget(itemid + "_disabled");
var widget = new phpr.Default.System.TemplateWrapper({ var widget = new phpr.Default.System.TemplateWrapper({
templateName: "phpr.Default.template.form.date.html", templateName: "phpr.Default.template.form.date.html",
templateData: { templateData: {
label: itemlabel, label: itemlabel,
labelfor: (itemdisabled) ? itemid + "_disabled" : itemid, labelfor: (itemdisabled) ? itemid + "_disabled" : itemid,
id: (itemdisabled) ? itemid + "_disabled" : itemid, id: (itemdisabled) ? itemid + "_disabled" : itemid,
value: itemvalue || phpr.date.getIsoDate(new Date()), value: itemvalue || phpr.date.getIsoDate(new Date()),
required: itemrequired, required: itemrequired,
disabled: (itemdisabled) ? "disabled" : '', disabled: (itemdisabled) ? "disabled" : '',
tooltip: this.getTooltip(itemhint) tooltip: this.getTooltip(itemhint),
invalidDateMessage: this.getInvalidDateMessage()
} }
}); });
return widget; return widget;
}, },
timeRender: function(itemlabel, itemid, itemvalue, itemrequired, itemdisable d, itemhint) { timeRender: function(itemlabel, itemid, itemvalue, itemrequired, itemdisable d, itemhint) {
phpr.destroyWidget(itemid); phpr.destroyWidget(itemid);
phpr.destroyWidget(itemid + "_disabled"); phpr.destroyWidget(itemid + "_disabled");
var widget = new phpr.Default.System.TemplateWrapper({ var widget = new phpr.Default.System.TemplateWrapper({
skipping to change at line 374 skipping to change at line 377
label: itemlabel, label: itemlabel,
labelfor: (itemdisabled) ? itemid + "_disabled" : itemid, labelfor: (itemdisabled) ? itemid + "_disabled" : itemid,
id: (itemdisabled) ? itemid + "_disabled" : itemid, id: (itemdisabled) ? itemid + "_disabled" : itemid,
idForDate: (itemdisabled) ? itemid + "_disabled_forDate" : it emid + '_forDate', idForDate: (itemdisabled) ? itemid + "_disabled_forDate" : it emid + '_forDate',
idForTime: (itemdisabled) ? itemid + "_disabled_forTime" : it emid + '_forTime', idForTime: (itemdisabled) ? itemid + "_disabled_forTime" : it emid + '_forTime',
value: itemvalue || valueForDate + ' ' + valueForTime, value: itemvalue || valueForDate + ' ' + valueForTime,
valueForDate: valueForDate, valueForDate: valueForDate,
valueForTime: valueForTime, valueForTime: valueForTime,
required: itemrequired, required: itemrequired,
disabled: (itemdisabled) ? "disabled" : '', disabled: (itemdisabled) ? "disabled" : '',
tooltip: this.getTooltip(itemhint) tooltip: this.getTooltip(itemhint),
invalidDateMessage: this.getInvalidDateMessage()
} }
}); });
return widget; return widget;
}, },
selectRender: function(range, itemlabel, itemid, itemvalue, itemrequired, it emdisabled, itemhint) { selectRender: function(range, itemlabel, itemid, itemvalue, itemrequired, it emdisabled, itemhint) {
phpr.destroyWidget(itemid); phpr.destroyWidget(itemid);
phpr.destroyWidget(itemid + "_disabled"); phpr.destroyWidget(itemid + "_disabled");
var options = []; var options = [];
skipping to change at line 459 skipping to change at line 463
multipleFilteringSelectRender: function(range, itemlabel, itemid, itemvalue, itemrequired, itemdisabled, itemhint) { multipleFilteringSelectRender: function(range, itemlabel, itemid, itemvalue, itemrequired, itemdisabled, itemhint) {
phpr.destroyWidget(itemid); phpr.destroyWidget(itemid);
phpr.destroyWidget(itemid + "_disabled"); phpr.destroyWidget(itemid + "_disabled");
var options = []; var options = [];
var tmp = itemvalue; var tmp = itemvalue;
for (var j in range) { for (var j in range) {
range[j].selected = ''; range[j].selected = '';
for (var k in tmp) { for (var k in tmp) {
if (parseInt(tmp[k]) === range[j].id) { if (parseInt(tmp[k], 10) === range[j].id) {
range[j].selected = 'selected="selected"'; range[j].selected = 'selected="selected"';
break; break;
} }
} }
options.push(range[j]); options.push(range[j]);
} }
var widget = new phpr.Default.System.TemplateWrapper({ var widget = new phpr.Default.System.TemplateWrapper({
templateName: "phpr.Default.template.form.multipleFilteringSelect.ht ml", templateName: "phpr.Default.template.form.multipleFilteringSelect.ht ml",
templateData: { templateData: {
skipping to change at line 506 skipping to change at line 510
} }
}); });
return widget; return widget;
}, },
displayFieldRender: function(itemlabel, itemid, itemvalue, itemhint, range) { displayFieldRender: function(itemlabel, itemid, itemvalue, itemhint, range) {
if (null !== range.id) { if (null !== range.id) {
// The Id must be translated into a descriptive String // The Id must be translated into a descriptive String
for (var j in range) { for (var j in range) {
if (range[j]) { if (range[j]) {
if (parseInt(range[j].id) == itemvalue) { if (parseInt(range[j].id, 10) == itemvalue) {
itemvalue = range[j].name; itemvalue = range[j].name;
break; break;
} }
} }
} }
} }
phpr.destroyWidget(itemid + "_disabled"); phpr.destroyWidget(itemid + "_disabled");
var widget = new phpr.Default.System.TemplateWrapper({ var widget = new phpr.Default.System.TemplateWrapper({
templateName: "phpr.Default.template.form.display.html", templateName: "phpr.Default.template.form.display.html",
templateData: { templateData: {
skipping to change at line 557 skipping to change at line 561
return this.hiddenFieldRender(itemlabel, itemid, itemvalue, itemrequ ired, false); return this.hiddenFieldRender(itemlabel, itemid, itemvalue, itemrequ ired, false);
} else { } else {
return ''; return '';
} }
}, },
getTooltip: function(itemhint) { getTooltip: function(itemhint) {
return this.render(["phpr.Default.template.form", "tooltip.html"], null, { return this.render(["phpr.Default.template.form", "tooltip.html"], null, {
hint: itemhint hint: itemhint
}); });
},
getInvalidDateMessage: function() {
var bundle = dojo.date.locale._getGregorianBundle(dojo.i18n.normalizeLoc
ale());
return phpr.nls.get('Invalid date format. Use:') + ' ' + bundle['dateFor
mat-short'];
} }
}); });
 End of changes. 6 change blocks. 
4 lines changed or deleted 15 lines changed or added

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