sql/cms_page.sql
[Pman.Cms] / Pman.Dialog.CmsTranslateTemplates.js
index b3763a8..7bdd170 100644 (file)
@@ -33,11 +33,11 @@ Pman.Dialog.CmsTranslateTemplates = {
             background : true,
             closable : false,
             collapsible : false,
-            height : 300,
+            height : 450,
             modal : true,
             resizable : true,
-            title : "WARNING",
-            width : 400,
+            title : "Edit Translation",
+            width : 800,
             items : [
                 {
                     xtype: 'ContentPanel',
@@ -60,9 +60,8 @@ Pman.Dialog.CmsTranslateTemplates = {
                                       
                                     if (action.type == 'setdata') {
                                        //_this.dialog.el.mask("Loading");
-                                       if (_this.data.id) {
-                                           this.load({ method: 'GET', params: { '_id' : _this.data.id }});
-                                       }
+                                       
+                                       Roo.log(_this.data);
                                        return;
                                     }
                                     if (action.type == 'load') {
@@ -84,26 +83,7 @@ Pman.Dialog.CmsTranslateTemplates = {
                             },
                             method : 'POST',
                             style : 'margin: 5px',
-                            url : baseURL + '/Roo/Ris_location.php',
                             items : [
-                                {
-                                    xtype: 'Row',
-                                    xns: Roo.form,
-                                    height : 30,
-                                    hideLabels : true,
-                                    labelWidth : 100,
-                                    items : [
-                                        {
-                                            xtype: 'DisplayField',
-                                            xns: Roo.form,
-                                            vtype : 'url',
-                                            fieldLabel : 'test',
-                                            name : 'wrin_text',
-                                            value : "",
-                                            width : 200
-                                        }
-                                    ]
-                                },
                                 {
                                     xtype: 'Row',
                                     xns: Roo.form,
@@ -112,10 +92,12 @@ Pman.Dialog.CmsTranslateTemplates = {
                                         {
                                             xtype: 'TextArea',
                                             xns: Roo.form,
-                                            disabled : true,
+                                            readOnly : true,
                                             fieldLabel : 'Original',
+                                            height : 150,
                                             name : 'src_id_txt',
-                                            value : "teststsetetsetsete"
+                                            value : "",
+                                            width : 750
                                         }
                                     ]
                                 },
@@ -128,7 +110,9 @@ Pman.Dialog.CmsTranslateTemplates = {
                                             xtype: 'TextArea',
                                             xns: Roo.form,
                                             fieldLabel : 'Translation',
-                                            name : 'txt'
+                                            height : 150,
+                                            name : 'txt',
+                                            width : 750
                                         }
                                     ]
                                 }
@@ -140,8 +124,8 @@ Pman.Dialog.CmsTranslateTemplates = {
             center : {
                 xtype: 'LayoutRegion',
                 xns: Roo,
-                title : "This text is with {TEMPLATE VARIABLE} <br />PLEASE BE CAREFUL EDITING. What's change?",
-                titlebar : true
+                titlebar : true,
+                title : "Note: If the original text contains template variables like  {TEMPLATE_VARIABLE} <br/>Be careful to retain them otherwise the translation may not work"
             },
             buttons : [
                 {
@@ -161,8 +145,13 @@ Pman.Dialog.CmsTranslateTemplates = {
                     listeners : {
                         click : function() {
                             _this.dialog.el.mask("Saving");
-                            _this.form.doAction('submit');
-                            
+                            //_this.form.doAction('submit');
+                            _this.dialog.hide();
+                            if (_this.callback) {
+                                _this.callback.call(_this, _this.form.getValues());
+                            }
+                            _this.dialog.el.unmask();
+                            _this.form.reset();
                         }
                     },
                     text : "OK"