"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "phprojekt/application/Timecard/Views/dojo/scripts/Main.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.

Main.js  (PHProjekt-6.2.0):Main.js  (PHProjekt-6.2.1)
skipping to change at line 109 skipping to change at line 109
/* /*
* This function merges the project list with the favorites. * This function merges the project list with the favorites.
* the resulting list will be the same as the project list, but the favorite s will be placed at the top of the list * the resulting list will be the same as the project list, but the favorite s will be placed at the top of the list
*/ */
_computeMergedFavorites: function() { _computeMergedFavorites: function() {
if (this._metaData && this._metaData[3].range && this._favoritesData) { if (this._metaData && this._metaData[3].range && this._favoritesData) {
// projectId // projectId
var favorites = this._favoritesData; var favorites = this._favoritesData;
var range = dojo.clone(this._projectRange); var range = dojo.clone(this._projectRange);
for (var i in favorites) { for (var i in favorites) {
var id = parseInt(favorites[i].id); var id = parseInt(favorites[i].id, 10);
if (id > 0) { if (id > 0) {
for (var j in range) { for (var j in range) {
if (range[j].id == id) { if (range[j].id == id) {
range.slice(j, 1); range.slice(j, 1);
break; break;
} }
} }
range.unshift({'id': parseInt(favorites[i].id), 'name': favo rites[i].name}); range.unshift({'id': parseInt(favorites[i].id, 10), 'name': favorites[i].name});
} }
} }
this._mergedFavorites = range; this._mergedFavorites = range;
return range; return range;
} else { } else {
return null; return null;
} }
}, },
_updateData: function() { _updateData: function() {
skipping to change at line 271 skipping to change at line 271
new phpr.handleResponse('serverFeedback', data); new phpr.handleResponse('serverFeedback', data);
if (data.type == 'success') { if (data.type == 'success') {
this._updateFavoritesData(); this._updateFavoritesData();
} }
} }
})); }));
}, },
getLastProjectId: function() { getLastProjectId: function() {
if (this.hasRunningBooking()) { if (this.hasRunningBooking()) {
return parseInt(this._runningBooking.projectId); return parseInt(this._runningBooking.projectId, 10);
} else { } else {
return this._unassignedProjectId; return this._unassignedProjectId;
} }
}, },
getMergedFavoriteProjects: function() { getMergedFavoriteProjects: function() {
var cb = new dojo.Deferred(); var cb = new dojo.Deferred();
if (this._hasData === true) { if (this._hasData === true) {
cb.callback(this._mergedFavorites); cb.callback(this._mergedFavorites);
skipping to change at line 373 skipping to change at line 373
this.garbageCollector.addNode('manageFavorites'); this.garbageCollector.addNode('manageFavorites');
}, },
setWidgets: function() { setWidgets: function() {
// Summary: // Summary:
// Custom setWidgets for timecard // Custom setWidgets for timecard
this._store.dataChanged(); this._store.dataChanged();
this.grid = new this.gridWidget(this, this._date); this.grid = new this.gridWidget(this, this._date);
this.form = new this.formWidget(this, this._date); this.form = new this.formWidget(this, this._date);
this.setTimecardCaldavClientButton();
}, },
_dataChanged: function() { _dataChanged: function() {
if (this.form) { if (this.form) {
this.form.updateData(); this.form.updateData();
} }
if (this.grid) { if (this.grid) {
this.grid.reload(this._date, true); this.grid.reload(this._date, true);
} }
skipping to change at line 488 skipping to change at line 489
// Update the date and reload the views // Update the date and reload the views
// description: // description:
// Update the date and reload the views // Update the date and reload the views
this._date = date; this._date = date;
this.form.setDate(date); this.form.setDate(date);
this.form.updateData(); this.form.updateData();
this.form.drawDayView(); this.form.drawDayView();
this.grid.reload(date); this.grid.reload(date);
},
setTimecardCaldavClientButton: function() {
// Summary:
// Set the timecardCaldavClient button
// Description:
// Set the timecardCaldavClient button
this.garbageCollector.collect('timecardCaldavClient');
var prefix = phpr.getAbsoluteUrl('index.php/Timecard/caldav/index/'),
url = prefix + 'calendars/' + phpr.config.currentUserName + '/defaul
t/',
iosUrl = prefix + 'principals/' + phpr.config.currentUserName + '/',
params = {
label: 'Timecard Caldav Client',
showLabel: true,
baseClass: 'positive',
disabled: false
},
timecardCaldavClientButton = new dijit.form.Button(params);
phpr.viewManager.getView().buttonRow.domNode.appendChild(timecardCaldavC
lientButton.domNode);
this.garbageCollector.addNode(timecardCaldavClientButton, 'timecardCalda
vClient');
this.garbageCollector.addEvent(
dojo.connect(
timecardCaldavClientButton,
'onClick',
dojo.hitch(this, 'showTimecardCaldavClientData', url, iosUrl)
),
'timecardCaldavClient'
);
},
showTimecardCaldavClientData: function(url, iosUrl) {
var content = phpr.fillTemplate(
'phpr.Calendar2.template.caldavView.html',
{
headline: 'Timecard Caldav Client',
normalLabel: phpr.nls.get('CalDav url', 'Calendar2'),
iosLabel: phpr.nls.get('CalDav url for Apple software', 'Calenda
r2'),
noticeLabel: phpr.nls.get('Notice', 'Calendar2'),
notice: phpr.nls.get('Please pay attention to the trailing slash
, it is important', 'Calendar2'),
normalUrl: url,
iosUrl: iosUrl
}
);
//draggable = false must be set because otherwise the dialog can not be
closed on the ipad
//bug: http://bugs.dojotoolkit.org/ticket/13488
var dialog = new dijit.Dialog({
content: content,
draggable: false
});
dialog.show();
this.garbageCollector.addNode(dialog, 'timecardCaldavClient');
} }
}); });
 End of changes. 5 change blocks. 
3 lines changed or deleted 66 lines changed or added

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