closable : false,
collapsible : false,
height : 230,
+ modal : true,
resizable : false,
title : "Edit / Create core_watch",
width : 500,
{
if (action.type == 'setdata') {
//_this.dialog.el.mask("Loading");
- //this.load({ method: 'GET', params: { '_id' : _this.data.id }});
+ if (_this.data.id) {
+ this.load({ method: 'GET', params: { '_id' : _this.data.id }});
+ }
return;
}
if (action.type == 'load') {
- _this.dialog.el.unmask();
- return;
+ return;
}
if (action.type =='submit') {
- _this.dialog.el.unmask();
- _this.dialog.hide();
+ _this.dialog.hide();
if (_this.callback) {
_this.callback.call(_this, _this.form.getValues());
{
o.params = o.params || {};
// staff can see all logs, other companies can only see their own.
- if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
+ if ((typeof(Pman.Login) != 'undefined') && Pman.Login.authUser.company_id_comptype != 'OWNER') {
o.params.company_id = Pman.Login.authUser.company_id;
}
o.params._distinct = 'on_table';
fieldLabel : 'Notify Who',
forceSelection : true,
hiddenName : 'person_id',
- listWidth : 400,
+ listWidth : 500,
loadingText : "Searching...",
minChars : 2,
name : 'person_id_name',
qtip : "Select Person",
queryParam : 'query[name]',
selectOnFocus : true,
- tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> </div>',
+ tpl : '<div class="x-grid-cell-text x-btn button"><b>{name}</b> ({company_id_name}) <{email}></div>',
triggerAction : 'all',
typeAhead : true,
valueField : 'id',
store : {
xtype: 'Store',
xns: Roo.data,
- remoteSort : true,
- sortInfo : { direction : 'ASC', field: 'id' },
listeners : {
beforeload : function (_self, o){
o.params = o.params || {};
// set more here
}
},
+ remoteSort : true,
+ sortInfo : { direction : 'ASC', field: 'name' },
proxy : {
xtype: 'HttpProxy',
xns: Roo.data,
method : 'GET',
- url : baseURL + '/Roo/Person.php'
+ url : baseURL + '/Roo/core_person'
},
reader : {
xtype: 'JsonReader',
allowBlank : true,
displayField : 'action',
editable : true,
- emptyText : "Select Action",
fieldLabel : 'Match Event',
forceSelection : false,
listWidth : 300,
{
o.params = o.params || {};
// staff can see all logs, other companies can only see their own.
- if (Pman.Login.authUser.company_id_comptype != 'OWNER') {
+ if (typeof(Pman.Login) !='undefined' && Pman.Login.authUser.company_id_comptype != 'OWNER') {
o.params.company_id = Pman.Login.authUser.company_id;
}
o.params._distinct = 'action';
}
},
{
- xtype: 'TextField',
+ xtype: 'ComboBox',
xns: Roo.form,
+ allowBlank : true,
+ displayField : 'val',
+ editable : true,
fieldLabel : 'Action',
+ forceSelection : false,
+ listWidth : 200,
name : 'medium',
- width : 200
+ triggerAction : 'all',
+ valueField : 'val',
+ width : 200,
+ store : {
+ xtype: 'SimpleStore',
+ xns: Roo.data,
+ data : [ [ 'email' ], [ 'APPROVAL' ], ['ENDOFDAYMAIL'] ],
+ fields : [ 'val' ]
+ }
},
{
xtype: 'Checkbox',
// do some checks?
- _this.dialog.el.mask("Saving");
+
_this.form.doAction("submit");
}