Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-interval
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-timesheet2-interval
Commits
767883f4
Commit
767883f4
authored
Jul 30, 2014
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- WIP
parent
40709ffe
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
40 additions
and
2 deletions
+40
-2
timesheet-interval.adp
lib/timesheet-interval.adp
+40
-2
No files found.
lib/timesheet-interval.adp
View file @
767883f4
...
@@ -127,6 +127,32 @@ function launchTreePanel(){
...
@@ -127,6 +127,32 @@ function launchTreePanel(){
tooltip: '<%= [lang::message::lookup "" intranet-timesheet2-interval.Delete_logging "Delete entry"] %>',
tooltip: '<%= [lang::message::lookup "" intranet-timesheet2-interval.Delete_logging "Delete entry"] %>',
id: 'buttonDeleteLogging',
id: 'buttonDeleteLogging',
disabled: true
disabled: true
}, '-', {
icon: '/intranet/images/navbar_default/arrow_left.png',
id: 'buttonCalendarArrowLeft',
handler: function() {
// move one day backward
var dateField = Ext.getCmp('datePicker');
var d = dateField.getValue();
d.setDate(d.getDate() - 1);
dateField.setValue(d);
}
}, {
xtype: 'datefield',
id: 'datePicker',
name: 'from_date',
value: new Date(),
maxValue: new Date() // limited to the current date or prior
}, '', {
icon: '/intranet/images/navbar_default/arrow_right.png',
id: 'buttonCalendarArrowRight',
handler: function() {
// move one day forward
var dateField = Ext.getCmp('datePicker');
var d = dateField.getValue();
d.setDate(d.getDate() + 1);
dateField.setValue(d);
}
}]
}]
});
});
...
@@ -174,6 +200,7 @@ function launchTreePanel(){
...
@@ -174,6 +200,7 @@ function launchTreePanel(){
'#buttonStopLogging': { click: this.onButtonStopLogging },
'#buttonStopLogging': { click: this.onButtonStopLogging },
'#buttonCancelLogging': { click: this.onButtonCancelLogging },
'#buttonCancelLogging': { click: this.onButtonCancelLogging },
'#buttonDeleteLogging': { click: this.onButtonDeleteLogging },
'#buttonDeleteLogging': { click: this.onButtonDeleteLogging },
'#datePicker': { change: this.onDatePickerChange },
scope: me.ganttTreePanel
scope: me.ganttTreePanel
});
});
...
@@ -186,7 +213,6 @@ function launchTreePanel(){
...
@@ -186,7 +213,6 @@ function launchTreePanel(){
// Listen to changes in the selction model in order to enable/disable the start/stop buttons
// Listen to changes in the selction model in order to enable/disable the start/stop buttons
me.hourIntervalGrid.on('selectionchange', this.onGridSelectionChange, me);
me.hourIntervalGrid.on('selectionchange', this.onGridSelectionChange, me);
// Catch a global key strokes. This is used to abort entry with Esc.
// Catch a global key strokes. This is used to abort entry with Esc.
// For some reaons this doesn't work on the level of the HourButtonPanel, so we go for the global "window"
// For some reaons this doesn't work on the level of the HourButtonPanel, so we go for the global "window"
Ext.EventManager.on(window, 'keydown', this.onWindowKeyDown, me);
Ext.EventManager.on(window, 'keydown', this.onWindowKeyDown, me);
...
@@ -194,6 +220,12 @@ function launchTreePanel(){
...
@@ -194,6 +220,12 @@ function launchTreePanel(){
return this;
return this;
},
},
// The user chose a different date
onDatePickerChange: function() {
console.log('GanttButtonController.onDatePickerChange');
},
// Esc (Escape) button pressed somewhere in the application window
// Esc (Escape) button pressed somewhere in the application window
onWindowKeyDown: function(e) {
onWindowKeyDown: function(e) {
var keyCode = e.getKey();
var keyCode = e.getKey();
...
@@ -327,7 +359,13 @@ function launchTreePanel(){
...
@@ -327,7 +359,13 @@ function launchTreePanel(){
// load the list of hourIntervals into the hourIntervalGrid
// load the list of hourIntervals into the hourIntervalGrid
var projectId = record.get('id');
var projectId = record.get('id');
hourIntervalStore.getProxy().extraParams = { project_id: projectId, user_id: @current_user_id@, format: 'json' };
var date = Ext.getCmp('datePicker').getValue();
hourIntervalStore.getProxy().extraParams = {
project_id: projectId,
user_id: @current_user_id@,
format: 'json'
};
hourIntervalStore.load({
hourIntervalStore.load({
callback: function() {
callback: function() {
console.log('PO.store.timesheet.HourIntervalStore: loaded');
console.log('PO.store.timesheet.HourIntervalStore: loaded');
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment