FixBug.bjs
authorAlan Knowles <alan@akbkhome.com>
Wed, 30 Mar 2011 08:41:00 +0000 (16:41 +0800)
committerAlan Knowles <alan@akbkhome.com>
Wed, 30 Mar 2011 08:41:00 +0000 (16:41 +0800)
FixBug.bjs

index ea6a83c..9ec347d 100644 (file)
@@ -8,7 +8,7 @@
         {
             "listeners": {
                 "destroy_event": "function (self, event) {\n     this.el.hide();\n                return false;\n}",
-                "response": "function (self, id) {\n if (id < 1) {\n            this.el.hide();\n            return;\n        }\n        if (!this.get('xtype').getValue().length) {\n            this.get('/StandardErrorDialog').show(\"You have to set Project type\");             \n            return;\n        }\n        if (!this.get('dir').el.get_filename().length) {\n            this.get('/StandardErrorDialog').show(\"You have to select a folder\");             \n            return;\n        }\n\n        this.el.hide();\n        \n        \n        var fn = this.get('dir').el.get_filename();\n        \n        this.project.name  = GLib.basename(fn);\n        this.project.xtype  = this.get('xtype').getValue();\n        this.project.paths = {};\n        this.project.paths[fn] =  'dir' ;\n        \n        var pr = imports.Builder.Provider.ProjectManager.ProjectManager.update(this.project);\n        \n        this.success(pr);\n        Seed.print(id);\n}"
+                "response": "function (self, id) {\n  // hide\n if (id < 1) {\n        this.el.hide();\n        return;\n    }\n    if (!this.get('bug').getValue().length) {\n        print(\"ERROR\");\n            return;\n        }\n \n        this.el.hide();\n        \n        var val = this.get('bug').getValue();\n        Seed.print(val);\n}"
             },
             "border_width": 3,
             "default_height": 150,