Test.GtkWriter.vala.c
[app.Builder.js] / Builder4 / DialogSaveTemplate.bjs
index d4a4882..3e73f5f 100644 (file)
@@ -1 +1,59 @@
-{"id":"file-gtk-8","name":"DialogSaveTemplate","parent":"","title":false,"path":"/home/alan/gitlive/app.Builder.js/Sample/DialogSaveTemplate.bjs","items":[{"listeners":{"delete_event":"function (self, event) {\n    this.el.hide();\n    return true;\n}","response":"function (self, response_id) {\n\n    if (!response_id) {\n        this.el.hide();\n         return;\n    }\n    var name = this.get('name').el.get_text();\n    if (!name.length) {\n        this.get('/StandardErrorDialog').show(\n            \"You must give the template a name. \"\n        );\n        return;\n    }\n    \n   if (!name.match(/^[A-Z ]+$/i) || !name.match(/[A-Z]/i)) {\n        this.get('/StandardErrorDialog').show(\n            \"Template Nane must contain only letters and spaces. \"\n        );\n         return;\n    }\n    this.get('/Window.LeftTree').getPaleteProvider().saveTemplate(name, this.data);\n    // now we save it..\n        this.el.hide();\n    \n}"},"default_height":200,"default_width":400,"xtype":"Dialog","|modal":true,"|show":"function(data) {\n    this.data = data;\n    this.get('name').el.set_text('');\n    this.el.show_all();\n}\n","|xns":"Gtk","items":[{"xtype":"HBox","|pack":"function(p,e) {\n                    p.el.get_content_area().add(e.el)\n                }\n","|xns":"Gtk","items":[{"label":"Name","pack":"add","xtype":"Label","|xns":"Gtk","listeners":{}},{"id":"name","pack":"add","xtype":"Entry","|xns":"Gtk"}]},{"label":"Cancel","pack":"add_action_widget,0","xtype":"Button","|xns":"Gtk"},{"label":"OK","pack":"add_action_widget,1","xtype":"Button","|xns":"Gtk"}]}],"project":"{\"name\":\"Sample\",\"xtype\":\"Gtk\",\"paths\":{\"/home/alan/gitlive/app.Builder.js/Sample\":\"dir\"},\"id\":\"project-gtk-1\",\"fn\":\"329624934046af6e88a65a3f36971958\",\"file\":false,\"runhtml\":\"\"}"}
\ No newline at end of file
+{
+    "id": "file-gtk-4",
+    "name": "DialogSaveTemplate",
+    "parent": "",
+    "title": false,
+    "path": "/home/alan/gitlive/app.Builder.js/Builder4/DialogSaveTemplate.bjs",
+    "items": [
+        {
+            "listeners": {
+                "delete_event": " (self, event) => {\n    this.el.hide();\n    return true;\n}",
+                "response": "(self, response_id) => {\n\n    if (response_id < 1) {\n        this.el.hide();\n         return;\n    }\n    var name = _this.name.el.get_text();\n    if (name.length < 1) {\n        StandardErrorDialog.show(\n            \"You must give the template a name. \"\n        );\n        return;\n    }\n    if (!Regex.match_simple (\"^[A-Za-z]+$\", name) || \n        !Regex.match_simple (\"^[A-Za-z ]+$\", name) )\n    {\n        StandardErrorDialog.show(\n            \"Template Nane must contain only letters and spaces. \"\n        );\n         return;\n    }\n    _this.palete.saveTemplate(name, _this.data);\n    // now we save it..\n    this.el.hide();\n    \n}"
+            },
+            ".JsRender.Node:data": "",
+            ".Palete.Palete:palete": "",
+            "default_height": 200,
+            "default_width": 400,
+            "xtype": "Dialog",
+            "|modal": "true",
+            "|void:show": " (Palete.Palete palete, JsRender.Node data) {\n    _this.data = data;\n    _this.palete = palete;\n    _this.name.el.set_text(\"\");\n    this.el.show_all();\n}\n",
+            "|xns": "Gtk",
+            "items": [
+                {
+                    "xtype": "HBox",
+                    "|pack": "function(p,e) {\n                    p.el.get_content_area().add(e.el)\n                }\n",
+                    "|xns": "Gtk",
+                    "items": [
+                        {
+                            "label": "Name",
+                            "pack": "add",
+                            "xtype": "Label",
+                            "|xns": "Gtk",
+                            "listeners": {}
+                        },
+                        {
+                            "id": "name",
+                            "pack": "add",
+                            "xtype": "Entry",
+                            "|xns": "Gtk"
+                        }
+                    ]
+                },
+                {
+                    "label": "Cancel",
+                    "pack": "add_action_widget,0",
+                    "xtype": "Button",
+                    "|xns": "Gtk"
+                },
+                {
+                    "label": "OK",
+                    "pack": "add_action_widget,1",
+                    "xtype": "Button",
+                    "|xns": "Gtk"
+                }
+            ]
+        }
+    ],
+    "permname": "",
+    "modOrder": ""
+}
\ No newline at end of file