Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2-weekly
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-weekly
Commits
afcfbb58
Commit
afcfbb58
authored
Mar 30, 2021
by
Project Open
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- WIP
parent
46ba8480
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
74 deletions
+8
-74
index.adp
www/index.adp
+8
-74
No files found.
www/index.adp
View file @
afcfbb58
...
...
@@ -67,7 +67,6 @@ function launchTimesheetWeeklyLogging(){
}
});
// !!!
var hourGrid = Ext.create('Ext.grid.Panel', {
store: hourStore,
layout: 'fit',
...
...
@@ -280,7 +279,9 @@ function launchTimesheetWeeklyLogging(){
console.log('GanttButtonController.onWindowKeyDown: code='+keyCode+', ctrl='+keyCtrl);
// cancel hour logging with Esc key
if (27 == keyCode) { this.onButtonCancelLogging(); }
if (27 == keyCode) {
// Cancel Edit
}
if (46 == keyCode) { this.onButtonDeleteEntry(); }
},
...
...
@@ -312,11 +313,10 @@ function launchTimesheetWeeklyLogging(){
var buttonAddEntry = Ext.getCmp('buttonAddEntry');
var buttonDeleteEntry = Ext.getCmp('buttonDeleteEntry');
buttonAddEntry.disable();
buttonDeleteEntry.enable();
//
buttonAddEntry.disable();
//
buttonDeleteEntry.enable();
rowEditing.cancelEdit();
// !!!
var day = PO.Utilities.dateToPg(new Date());
var hour = new Ext.create('PO.model.timesheet.Hour', {
user_id: @current_user_id@,
...
...
@@ -328,59 +328,6 @@ function launchTimesheetWeeklyLogging(){
rowEditing.startEdit(hour, 0);
},
onButtonStopLogging: function() {
console.log('GanttButtonController.ButtonStopLogging');
var buttonStartLogging = Ext.getCmp('buttonStartLogging');
var buttonStopLogging = Ext.getCmp('buttonStopLogging');
var buttonCancelLogging = Ext.getCmp('buttonCancelLogging');
var buttonAddEntry = Ext.getCmp('buttonAddEntry');
buttonStartLogging.enable();
buttonStopLogging.disable();
buttonCancelLogging.disable();
buttonAddEntry.enable();
// Complete the hour created when starting to log
this.loggingInterval.set('interval_end_time', /\d\d:\d\d/.exec(""+new Date())[0]);
// Not necesary anymore because the store is set to autosync?
this.loggingInterval.save();
rowEditing.cancelEdit();
// Stop logging
this.loggingTask = null;
this.loggingStartDate = null;
// Continue editing the task
var rowIndex = hourStore.count() -1;
rowEditing.startEdit(rowIndex, 3);
},
onButtonCancelLogging: function() {
console.log('GanttButtonController.ButtonCancelLogging');
var buttonStartLogging = Ext.getCmp('buttonStartLogging');
var buttonStopLogging = Ext.getCmp('buttonStopLogging');
var buttonCancelLogging = Ext.getCmp('buttonCancelLogging');
var buttonAddEntry = Ext.getCmp('buttonAddEntry');
buttonStartLogging.enable();
buttonStopLogging.disable();
buttonCancelLogging.disable();
buttonAddEntry.enable();
// Check if a leaf is selected in order to determine if StartLogging can be enabled
var isLeaf = this.ganttTreePanelLeafSelected();
buttonStartLogging.setDisabled(!isLeaf);
buttonAddEntry.setDisabled(!isLeaf);
// Delete the started line
rowEditing.cancelEdit();
hourStore.remove(this.loggingInterval);
// Stop logging
this.loggingTask = null;
this.loggingStartDate = null;
},
onButtonDeleteEntry: function() {
var me = this;
console.log('GanttButtonController.ButtonDeleteLogging');
...
...
@@ -406,12 +353,7 @@ function launchTimesheetWeeklyLogging(){
*/
onTreePanelSelectionChange: function(view, records) {
if (this.debug) { console.log('GanttButtonController.onTreePanelSelectionChange'); }
// Skip changes on the selection model while logging hours
if (this.loggingTask) {
console.log('GanttButtonController.onTreePanelSelectionChange: While logging hours - skip logging');
this.onButtonCancelLogging();
return;
}
var buttonStartLogging = Ext.getCmp('buttonStartLogging');
var buttonAddEntry = Ext.getCmp('buttonAddEntry');
// Not logging already - enable the "start" button
...
...
@@ -519,13 +461,10 @@ function launchTimesheetWeeklyLogging(){
// Testing events
hourButtonPanel.fireEvent('keypress');
// -----------------------------------------------------------------------
// Handle collapsable side menu
sideBarTab.on('click', hourController.onSideBarResize, hourController);
Ext.EventManager.onWindowResize(hourController.onWindowsResize, hourController); // Deal with resizing the main window
};
...
...
@@ -576,12 +515,10 @@ Ext.onReady(function() {
callback: function(records, operation, success) {
var me = this;
if (debug) console.log('PO.store.timesheet.TaskTreeStore: loaded');
if (!success) {
PO.Utilities.reportStoreError("TaskTreeStore", operation);
return;
}
var mainProjectNode = records[0];
mainProjectNode.set('sort_order','0');
me.setRootNode(mainProjectNode);
...
...
@@ -597,16 +534,13 @@ Ext.onReady(function() {
});
// Load stores that need parameters
projectStore.getProxy().extraParams = { query: 'parent_id is NULL and project_status_id = 76', format: 'json' };
// projectStore.getProxy().extraParams = { query: 'parent_id is NULL and project_status_id = 76', format: 'json' };
projectStore.getProxy().extraParams = { query: 'parent_id is NULL and project_status_id in (select * from im_sub_categories(76))', format: 'json' };
projectStore.load({
callback: function() {
console.log('PO.store.project.ProjectMainStore: loaded');
}
});
});
</script>
</div>
...
...
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