timeout: 300000,
extraParams: {
format: 'json', // Tell the ]po[ REST to return JSON data.
deref_p: '1',
columns: 'note,note_type_id'
},
reader: {
type: 'json', // Tell the Proxy Reader to parse JSON
root: 'data', // Where do the data start in the JSON file?
totalProperty: 'total' // Total number of tickets for pagination
},
writer: {
type: 'json' // Allow Sencha to write ticket changes
}
}
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/store/ 0000775 0000000 0000000 00000000000 12133042240 0024610 5 ustar 00root root 0000000 0000000 senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/store/NoteStore.js 0000664 0000000 0000000 00000001316 12133042240 0027071 0 ustar 00root root 0000000 0000000 Ext.define('PO.store.NoteStore', {
extend: 'Ext.data.Store',
storeId: 'noteStore',
config: {
model: 'PO.model.Note',
autoLoad: true,
sorters: 'last_name',
grouper: {
groupFn: function(record) {
var fn = record.get('note');
if (fn == null) { fn = 'a'; }
return fn.toLowerCase()[0];
}
},
sorters: [{
property: 'note',
direction: 'ASC'
}],
proxy: {
type: 'rest',
url: '/intranet-rest/im_note',
appendId: true,
extraParams: {
format: 'json'
},
reader: {
type: 'json',
rootProperty: 'data'
}
}
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/view/ 0000775 0000000 0000000 00000000000 12133042240 0024426 5 ustar 00root root 0000000 0000000 senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/view/NoteDetail.js 0000664 0000000 0000000 00000005166 12133042240 0027024 0 ustar 00root root 0000000 0000000 Ext.define('PO.view.NoteDetail', {
extend: 'Ext.form.Panel',
xtype: 'noteDetail',
config: {
title: 'Note Detail',
layout: 'vbox',
items: [{
xtype: 'fieldset',
title: 'Note Fields',
instructions: '(email address is optional)',
items: [{
xtype: 'selectfield',
name: 'note_type_id',
label: 'Type',
options: [
{text: 'Address', value: '11500'},
{text: 'Email', value: '11502'},
{text: 'Http', value: '11504'},
{text: 'Ftp', value: '11506'},
{text: 'Phone', value: '11508'},
{text: 'Fax', value: '11510'},
{text: 'Mobile', value: '11512'},
{text: 'Other', value: '11514'}
]
}, {
xtype: 'textareafield',
name: 'note',
label: 'Note'
}, {
xtype: 'hiddenfield',
name: 'id'
}, {
xtype: 'hiddenfield',
name: 'note_status_id',
value: 11400
}, {
xtype: 'hiddenfield',
name: 'object_id',
label: 'Object ID',
value: 0 // Magic value: 0 is the ID of the "guest" object
}
]
}, {
xtype: 'button',
text: 'Save',
ui: 'confirm',
handler: function() {
console.log('NoteDetail: Button "Save" pressed:');
// Save the form values to the record.
// The record was set by the NoteNavigationController
var form = this.up('formpanel');
var values = form.getValues();
var rec = form.getRecord();
// Did we create a completely new note?
if (typeof rec === "undefined" || rec == null) {
rec = Ext.ModelManager.create(values, 'PO.model.Note');
}
// Save the model - generates PUT or POST to REST backend
rec.set(values);
rec.save();
// reload the store
var noteStore = Ext.data.StoreManager.lookup('NoteStore');
noteStore.load();
// Return to the list of notes page
var navView = this.up('noteNavigationView');
navView.pop();
}
}
]
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/view/NoteList.js 0000664 0000000 0000000 00000000500 12133042240 0026520 0 ustar 00root root 0000000 0000000 Ext.define('PO.view.NoteList', {
extend: 'Ext.List',
xtype: 'noteList',
requires: ['PO.store.NoteStore'],
config: {
title: 'NoteList',
iconCls: 'star',
itemTpl: '{note}
',
disclosure: true,
grouped: true,
indexBar: true,
store: 'NoteStore',
onItemDisclosure: true
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/view/NoteNavigationView.js 0000664 0000000 0000000 00000000431 12133042240 0030542 0 ustar 00root root 0000000 0000000 Ext.define('PO.view.NoteNavigationView', {
extend: 'Ext.navigation.View',
xtype: 'noteNavigationView',
requires: [
'PO.view.NoteList',
'PO.view.NoteDetail'
],
config: {
title: 'Notes',
iconCls: 'star',
items: [{
xtype: 'noteList'
}]
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/app/view/SplashPage.js 0000664 0000000 0000000 00000000655 12133042240 0027021 0 ustar 00root root 0000000 0000000 Ext.define('PO.view.SplashPage', {
extend: 'Ext.Panel',
xtype: 'splashPage',
config: {
title: 'Home',
iconCls: 'home',
scrollable: 'vertical',
// styleHtmlContent: true,
html: [
'',
']project-open[ Sencha Touch Notes
',
"This demo shows how to build Sencha Touch applications using ]po[."
].join("")
}
});
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/index.adp 0000664 0000000 0000000 00000000422 12133042240 0024467 0 ustar 00root root 0000000 0000000
]po[ Sencha Touch Notes Demo
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/index.tcl 0000664 0000000 0000000 00000000607 12133042240 0024512 0 ustar 00root root 0000000 0000000 # /packages/senchatouch-notes/www/index.tcl
#
# Copyright (c) 2003-2013 ]project-open[
# All rights reserved
ad_page_contract {
@author frank.bergmann@ticket-open.com
} {
}
# ---------------------------------------------------------------
# Defaults & Security
# ---------------------------------------------------------------
set current_user_id [ad_maybe_redirect_for_registration]
senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/resources/ 0000775 0000000 0000000 00000000000 12133042240 0024706 5 ustar 00root root 0000000 0000000 senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/resources/startup/ 0000775 0000000 0000000 00000000000 12133042240 0026410 5 ustar 00root root 0000000 0000000 senchatouch-notes-f451650c76aa2f1930fac9e439cf1cd7160d3813/www/resources/startup/1496x2048.png 0000664 0000000 0000000 00000303140 12133042240 0030230 0 ustar 00root root 0000000 0000000 PNG
IHDR + tEXtSoftware Adobe ImageReadyqe<