1 //<script type="text/javascript">
3 Pman.Dialog.Document_Types = {
12 this.dialog = new Ext.LayoutDialog(Ext.get(document.body).createChild({tag:'div'}), {
14 title: "Edit Document Type",
27 // tabPosition: 'top',
33 this.dialog.addKeyListener(27, this.dialog.hide, this.dialog);
34 this.dialog.addButton("Cancel", this.dialog.hide, this.dialog);
36 this.dialog.addButton("Save", this.save, this);
37 this.layout = this.dialog.getLayout();
38 this.layout.beginUpdate();
40 var dg = Pman.Dialog.Document_Types;
42 this.form = new Ext.form.Form({
45 actionfailed : function(f, act) {
46 dg.dialog.el.unmask();
49 Pman.standardActionFailed(f,act);
52 actioncomplete: function(f, act) {
53 dg.dialog.el.unmask();
54 //console.log('load completed');
55 // error messages?????
58 if (act.type == 'load') {
60 dg.data = act.result.data;
66 if (act.type == 'submit') { // only submitted here if we are
69 dg.callback.call(this, act.result.data);
81 //?? will this work...
82 this.form.addxtype.apply(this.form,[{
92 fieldLabel : "Document Type",
95 qtip : "Enter Document Type",
100 fieldLabel : "Remarks",
103 qtip : "Enter remarks",
115 var ef = this.dialog.getLayout().getEl().createChild({tag: 'div'});
116 ef.dom.style.margin = 10;
118 this.form.render(ef.dom);
120 var vp = this.dialog.getLayout().add('center', new Ext.ContentPanel(ef, {
122 //title: 'Org Details',
132 this.layout.endUpdate();
135 show: function (data, callback)
138 this.callback = callback;
139 this._id = data.id ? data.id : 0; // modify if you do not use ID !!!!
143 this.form.setValues(data);
152 this.form.doAction('submit', {
153 url: baseURL + '/Roo/Document_Types.html',