projects
/
Pman.Core
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix #8131 - chinese translations
[Pman.Core]
/
Pman.Dialog.PersonEditor.js
diff --git
a/Pman.Dialog.PersonEditor.js
b/Pman.Dialog.PersonEditor.js
index
2b020a1
..
8349841
100644
(file)
--- a/
Pman.Dialog.PersonEditor.js
+++ b/
Pman.Dialog.PersonEditor.js
@@
-31,7
+31,7
@@
Pman.Dialog.PersonEditor.prototype = {
return;
}
var _this = this;
return;
}
var _this = this;
- this.dialog = new
Ext.LayoutDialog(Ext
.get(document.body).createChild({tag:'div'}),
+ this.dialog = new
Roo.LayoutDialog(Roo
.get(document.body).createChild({tag:'div'}),
Roo.apply({
autoCreated: true,
title: 'Edit Contact Details',
Roo.apply({
autoCreated: true,
title: 'Edit Contact Details',
@@
-69,7
+69,7
@@
Pman.Dialog.PersonEditor.prototype = {
this.layout.beginUpdate();
this.layout.beginUpdate();
- this.form = new
Ext
.form.Form({
+ this.form = new
Roo
.form.Form({
labelWidth: 120,
listeners : {
actionfailed : function(f, act) {
labelWidth: 120,
listeners : {
actionfailed : function(f, act) {
@@
-189,7
+189,7
@@
Pman.Dialog.PersonEditor.prototype = {
this.form.render(ef.dom);
this.form.render(ef.dom);
- var vp = this.dialog.getLayout().add('center', new
Ext
.ContentPanel(ef, {
+ var vp = this.dialog.getLayout().add('center', new
Roo
.ContentPanel(ef, {
autoCreate : true,
//title: 'Org Details',
//toolbar: this.tb,
autoCreate : true,
//title: 'Org Details',
//toolbar: this.tb,
@@
-235,10
+235,10
@@
Pman.Dialog.PersonEditor.prototype = {
// load using HTTP
proxy:{
xtype: 'HttpProxy',
// load using HTTP
proxy:{
xtype: 'HttpProxy',
- url: baseURL + '/Roo/
Companies.html
',
+ url: baseURL + '/Roo/
core_company
',
method: 'GET'
},
method: 'GET'
},
- reader: Pman.Readers.Companies,
+ reader:
new Roo.data.JsonReader({}, []), //
Pman.Readers.Companies,
listeners : {
beforeload : function(st,o)
{
listeners : {
beforeload : function(st,o)
{
@@
-259,12
+259,12
@@
Pman.Dialog.PersonEditor.prototype = {
forceSelection: true,
//mode: 'local',
triggerAction: 'all',
forceSelection: true,
//mode: 'local',
triggerAction: 'all',
- tpl: new
Ext
.Template(
+ tpl: new
Roo
.Template(
'<div class="x-grid-cell-text x-btn button">',
'<b>{name}</b> {address}',
'</div>'
),
'<div class="x-grid-cell-text x-btn button">',
'<b>{name}</b> {address}',
'</div>'
),
- queryParam: '
query[name
]',
+ queryParam: '
search[name_starts
]',
loadingText: "Searching...",
listWidth: 400,
loadingText: "Searching...",
listWidth: 400,
@@
-308,10
+308,10
@@
Pman.Dialog.PersonEditor.prototype = {
// load using HTTP
proxy: {
xtype : 'HttpProxy',
// load using HTTP
proxy: {
xtype : 'HttpProxy',
- url: baseURL + '/Roo/
O
ffice.html',
+ url: baseURL + '/Roo/
Core_o
ffice.html',
method: 'GET'
},
method: 'GET'
},
- reader: Pman.Readers.Office,
+ reader:
new Roo.data.JsonReader({}, []), //
Pman.Readers.Office,
listeners : {
beforeload : function(st,o)
{
listeners : {
beforeload : function(st,o)
{
@@
-337,7
+337,7
@@
Pman.Dialog.PersonEditor.prototype = {
if (_this.type == 'new') {
data = _this.form.findField('company_id').lastData;
if (!data.id ) {
if (_this.type == 'new') {
data = _this.form.findField('company_id').lastData;
if (!data.id ) {
-
Ext
.MessageBox.alert("Error", "Select An Company First");
+
Roo
.MessageBox.alert("Error", "Select An Company First");
return false
}
return false
}
@@
-372,7
+372,7
@@
Pman.Dialog.PersonEditor.prototype = {
beforequery : function (qe) {
var coid = _this.form.findField('company_id').getValue();
if (coid < 1 ) {
beforequery : function (qe) {
var coid = _this.form.findField('company_id').getValue();
if (coid < 1 ) {
-
Ext
.MessageBox.alert("Error", "Select An Company First");
+
Roo
.MessageBox.alert("Error", "Select An Company First");
return false;
}
}
return false;
}
}
@@
-384,7
+384,7
@@
Pman.Dialog.PersonEditor.prototype = {
forceSelection: true,
//mode: 'local',
triggerAction: 'all',
forceSelection: true,
//mode: 'local',
triggerAction: 'all',
- tpl: new
Ext
.Template(
+ tpl: new
Roo
.Template(
'<div class="x-grid-cell-text x-btn button">',
'<b>{name}</b> {address}',
'</div>'
'<div class="x-grid-cell-text x-btn button">',
'<b>{name}</b> {address}',
'</div>'
@@
-517,8
+517,8
@@
Pman.Dialog.PersonEditor.prototype = {
xtype : 'TextField',
width : 220
},
xtype : 'TextField',
width : 220
},
- secure_pass
ow
rd : {
- name : 'secure_pass
ow
rd',
+ secure_pass
wo
rd : {
+ name : 'secure_pass
wo
rd',
fieldLabel : "Secure passwords",
inputValue : 1,
valueOff : 0,
fieldLabel : "Secure passwords",
inputValue : 1,
valueOff : 0,
@@
-528,9
+528,10
@@
Pman.Dialog.PersonEditor.prototype = {
width : 220,
listeners : {
check : function (_self, checked) {
width : 220,
listeners : {
check : function (_self, checked) {
- Roo.log(this.form);
- if(checked){
-
+ this.form.findField('passwd1').insecure = false;
+
+ if(!checked){
+ this.form.findField('passwd1').insecure = true;
}
}
}
}
}
}
@@
-560,7
+561,7
@@
Pman.Dialog.PersonEditor.prototype = {
width: 50,
width: 50,
- store: new
Ext
.data.SimpleStore({
+ store: new
Roo
.data.SimpleStore({
// load using HTTP
fields: [ 'code', 'desc' ],
data: [[ 'ACTION_REQUIRED', "Yes"] , [ 'NOTIFY', "No"] ]
// load using HTTP
fields: [ 'code', 'desc' ],
data: [[ 'ACTION_REQUIRED', "Yes"] , [ 'NOTIFY', "No"] ]
@@
-612,7
+613,7
@@
Pman.Dialog.PersonEditor.prototype = {
}
if (this.form.findField('company_id') && !this.form.findField('company_id').getValue()) {
}
if (this.form.findField('company_id') && !this.form.findField('company_id').getValue()) {
-
Ext
.MessageBox.alert("Error", "Select a Company");
+
Roo
.MessageBox.alert("Error", "Select a Company");
return;
}
return;
}
@@
-622,19
+623,19
@@
Pman.Dialog.PersonEditor.prototype = {
var p2 = this.form.findField('passwd2').getValue();
if (this.sendAfterSave && !p1.length) {
var p2 = this.form.findField('passwd2').getValue();
if (this.sendAfterSave && !p1.length) {
-
Ext
.MessageBox.alert("Error", "You must create a password to send introduction mail");
+
Roo
.MessageBox.alert("Error", "You must create a password to send introduction mail");
return;
}
if (Pman.Login.authUser.id < 0 && !p1.length) {
return;
}
if (Pman.Login.authUser.id < 0 && !p1.length) {
-
Ext
.MessageBox.alert("Error", "You must create a password for the admin account");
+
Roo
.MessageBox.alert("Error", "You must create a password for the admin account");
return;
}
if (p1.length || p2.length) {
if (p1 != p2) {
return;
}
if (p1.length || p2.length) {
if (p1 != p2) {
-
Ext
.MessageBox.alert("Error", "Passwords do not match");
+
Roo
.MessageBox.alert("Error", "Passwords do not match");
return;
}
}
return;
}
}
@@
-652,7
+653,7
@@
Pman.Dialog.PersonEditor.prototype = {
}
this.dialog.el.mask("Sending");
this.form.doAction('submit', {
}
this.dialog.el.mask("Sending");
this.form.doAction('submit', {
- url: baseURL + '/Roo/
Person.html
',
+ url: baseURL + '/Roo/
core_person
',
method: 'POST',
params: {
_id: this._id ,
method: 'POST',
params: {
_id: this._id ,
@@
-675,7
+676,7
@@
Pman.Dialog.PersonEditor.prototype = {
this.dialog.show();
this.dialog.el.mask("Loading");
this.form.doAction('load', {
this.dialog.show();
this.dialog.el.mask("Loading");
this.form.doAction('load', {
- url: baseURL + '/Roo/
Person.html
',
+ url: baseURL + '/Roo/
core_person
',
method: 'GET',
params: {
_id: this._id ,
method: 'GET',
params: {
_id: this._id ,