Commit a4df74f8 authored by Frank Bergmann's avatar Frank Bergmann

- Sencha Touch Timesheet:

  Updated to work with Sencha Touch 2.4.2
parent d1d89a21
......@@ -10,15 +10,15 @@
<inherit-templates-p>f</inherit-templates-p>
<auto-mount>senchatouch-timesheet</auto-mount>
<version name="4.1.0.0.0" url="http://openacs.org/repository/download/apm/senchatouch-timesheet-4.1.0.0.0.apm">
<version name="5.0.0.0.0" url="http://openacs.org/repository/download/apm/senchatouch-timesheet-5.0.0.0.0.apm">
<owner url="mailto:frank.bergmann@project-open.com">Frank Bergmann</owner>
<summary>Log hours using your mobile device</summary>
<vendor url="http://www.project-open.com/">]project-open[</vendor>
<description format="text/plain">Allows to log hours on a list of frequently used projects.</description>
<maturity>0</maturity>
<provides url="senchatouch-timesheet" version="4.1.0.0.0"/>
<requires url="senchatouch-v211" version="4.1.0.0.0"/>
<provides url="senchatouch-timesheet" version="5.0.0.0.0"/>
<requires url="senchatouch-v242" version="1.0.0.0.0"/>
<requires url="intranet-timesheet2" version="4.1.0.0.0"/>
<requires url="intranet-timesheet2-tasks" version="4.1.0.0.0"/>
<requires url="intranet-reporting" version="4.1.0.0.0"/>
......
......@@ -49,11 +49,12 @@ Ext.application({
Ext.create("Ext.tab.Panel", {
fullscreen: true,
tabBarPosition: 'bottom',
xtype: 'tabPanel',
items: [
// The application consists of two three only:
{xtype: 'splashPage'},
{xtype: 'timesheetMainProjectListNavigationView'}
// {xtype: 'noteNavigationView'}
{xtype: 'timesheetMainProjectListNavigationView'},
{xtype: 'noteNavigationView'}
]
});
}
......
......@@ -10,7 +10,7 @@
"name": "List",
"js": [
{
"path": "/senchatouch-v211/sencha-touch-all-debug.js"
"path": "/senchatouch-v242/sencha-touch-all-debug.js"
},
{
"path": "app.js",
......@@ -19,7 +19,7 @@
],
"css": [
{
"path": "/senchatouch-v211/resources/css/sencha-touch.css",
"path": "/senchatouch-v242/resources/css/sencha-touch.css",
"update": "delta"
},
{
......
......@@ -16,28 +16,30 @@ Ext.define('PO.controller.TimesheetMainProjectListController', {
extend: 'Ext.app.Controller',
xtype: 'timesheetMainProjectListController',
config: {
profile: Ext.os.deviceType.toLowerCase(),
refs: {
timesheetMainProjectListNavigationView: 'timesheetMainProjectListNavigationView',
timesheetMainProjectList: 'timesheetMainProjectList',
timesheetDatePicker: '#timesheetDatePicker'
},
control: {
'timesheetMainProjectList': {
activate: 'onActivate',
itemtap: 'onItemTap',
disclose: 'onDisclose',
}
}
profile: Ext.os.deviceType.toLowerCase(),
refs: {
timesheetMainProjectListNavigationView: 'timesheetMainProjectListNavigationView',
timesheetMainProjectList: 'timesheetMainProjectList',
timesheetDatePicker: '#timesheetDatePicker',
tabPanel: 'tabPanel'
},
control: {
'timesheetMainProjectList': {
activate: 'onActivate',
itemtap: 'onItemTap',
disclose: 'onDisclose'
}
}
},
onActivate: function() {
console.log('TimesheetMainProjectList container is active');
console.log('TimesheetMainProjectListController.onActivate');
},
// Tap on MainList - same as Disclose at the moment
onItemTap: function(view, index, target, record, event) {
this.onDisclose(null, record);
console.log('TimesheetMainProjectListController.onItemTap');
this.onDisclose(null, record);
},
/**
......@@ -45,26 +47,27 @@ Ext.define('PO.controller.TimesheetMainProjectListController', {
* Show the TimesheetTaskList with the specified project.
*/
onDisclose: function(list, record) {
var navView = this.getTimesheetMainProjectListNavigationView();
var project_name = record.get('project_name');
var taskList = Ext.create("PO.view.TimesheetTaskList", {
title: project_name + ' Tasks and Hours'
});
// Load the right data into the store
var store = Ext.data.StoreManager.lookup('TimesheetTaskStore');
var today = this.getTimesheetDatePicker().getValue();
store.load({
params : {
'main_project_id': record.get('project_id'),
'date': Ext.Date.format(today, 'Y-m-d')
}
});
// Push the task list
taskList.setStore(store);
var list = navView.push(taskList);
console.log('TimesheetMainProjectListController.onDisclose');
var navView = this.getTimesheetMainProjectListNavigationView();
var project_name = record.get('project_name');
var taskList = Ext.create("PO.view.TimesheetTaskList", {
title: project_name + ' Tasks and Hours'
});
// Load the right data into the store
var store = Ext.data.StoreManager.lookup('TimesheetTaskStore');
var today = this.getTimesheetDatePicker().getValue();
store.load({
params : {
'main_project_id': record.get('project_id'),
'date': Ext.Date.format(today, 'Y-m-d')
}
});
// Push the task list
taskList.setStore(store);
var list = navView.push(taskList);
}
});
......@@ -55,7 +55,7 @@ Ext.define('PO.view.TimesheetMainProjectList', {
label: 'Date',
value: new Date(),
dateFormat: 'Y-m-d',
picker: { yearFrom: 2014 }
picker: { yearFrom: 2015 }
}
]
}
......
......@@ -11,7 +11,7 @@
<head>
<meta charset="UTF-8">
<title>]po[ Timesheet</title>
<script id="microloader" type="text/javascript" src="/senchatouch-v211/microloader/development.js"></script>
<script id="microloader" type="text/javascript" src="/senchatouch-v242/microloader/development.js"></script>
</head>
<body>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment