NewBranch.bjs
[gitlive] / NewBranch.bjs
1 {
2  "name" : "NewBranch",
3  "parent" : "",
4  "title" : "",
5  "path" : "/home/alan/gitlive/gitlive/NewBranch.bjs",
6  "permname" : "",
7  "modOrder" : "",
8  "build_module" : "gitlive",
9  "items" : [
10   {
11    "listeners" : {
12     "delete_event" : "(self, event) => {\n    this.el.hide();\n    return true; \n    //test  \n}\n ",
13     "response" : " (self, response_id) =>  { \n  \n\t \n}",
14     "show" : "(self)  => {\n  this.el.show_all();\n  //test\n}"
15    },
16    "|   void updateFileFromEntry" : "() {\n\n        _this.file.title = _this.title.el.get_text();\n        _this.file.region = _this.region.el.get_text();            \n        _this.file.parent = _this.parent.el.get_text();                        \n        _this.file.permname = _this.permname.el.get_text();                                    \n        _this.file.modOrder = _this.modOrder.el.get_text();\n        \n        if (_this.file.name.length  > 0 && _this.file.name != _this.name.el.get_text()) {\n            _this.file.renameTo(_this.name.el.get_text());\n        }\n        // store the module...\n        _this.file.build_module = \"\";        \n         Gtk.TreeIter iter; \n        if (_this.build_module.el.get_active_iter (out iter)) {\n             Value vfname;\n             this.dbmodel.el.get_value (iter, 0, out vfname);\n             if (((string)vfname).length > 0) {\n                 _this.file.build_module = (string)vfname;\n             }\n    \n        }\n        \n        \n\n                                                    \n}    ",
17    "id" : "DialogNewComponent",
18    "default_width" : 500,
19    "$ deletable" : true,
20    "title" : "Create a working branch ",
21    "xtype" : "Dialog",
22    "|   void show" : "( ) \n{\n    \n    \n    //this.success = c.success;\n    \n    \n}",
23    "default_height" : 200,
24    "$ modal" : true,
25    "$ xns" : "Gtk",
26    "items" : [
27     {
28      "xtype" : "VBox",
29      "$ pack" : "get_content_area().add",
30      "$ xns" : "Gtk",
31      "items" : [
32       {
33        "* pack" : "pack_start,false,false,0",
34        "xtype" : "Table",
35        "n_columns" : 2,
36        "$ xns" : "Gtk",
37        "n_rows" : 3,
38        "$ homogeneous" : true,
39        "items" : [
40         {
41          "label" : "Select Ticket",
42          "$ visible" : true,
43          "xalign" : 0.90000000000000002,
44          "* pack" : "attach_defaults,0,1,0,1",
45          "xtype" : "Label",
46          "$ justify" : "Gtk.Justification.RIGHT",
47          "x_options" : 4,
48          "$ xns" : "Gtk"
49         },
50         {
51          "id" : "build_module",
52          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
53          "* pack" : "attach_defaults,1,2,0,1",
54          "xtype" : "ComboBox",
55          "$ xns" : "Gtk",
56          "items" : [
57           {
58            "id" : "dbcellrenderer",
59            "* pack" : "pack_start,true",
60            "xtype" : "CellRendererText",
61            "$ xns" : "Gtk"
62           },
63           {
64            "id" : "dbmodel",
65            "* pack" : "set_model",
66            "xtype" : "ListStore",
67            "$ columns" : "typeof(string),typeof(string)",
68            "n_columns" : 2,
69            "$ xns" : "Gtk",
70            "| void loadData" : "  (Gee.ArrayList<string> data, string cur) {\n    this.el.clear();                                    \n    Gtk.TreeIter iter;\n    var el = this.el;\n    \n   /// el.append(out iter);\n    \n     \n   // el.set_value(iter, 0, \"\");\n   // el.set_value(iter, 1, \"aaa  - Just add Element - aaa\");\n\n    el.append(out iter);\n\n    \n    el.set_value(iter, 0, \"\");\n    el.set_value(iter, 1, \"-- select a module --\");\n    _this.build_module.el.set_active_iter(iter);\n    \n    for (var i = 0; i < data.size;i++) {\n    \n\n        el.append(out iter);\n        \n        el.set_value(iter, 0, data.get(i));\n        el.set_value(iter, 1, data.get(i));\n        \n        if (data.get(i) == cur) {\n            _this.build_module.el.set_active_iter(iter);\n        }\n        \n    }\n     this.el.set_sort_column_id(0, Gtk.SortType.ASCENDING);          \n                                     \n}\n"
71           }
72          ]
73         },
74         {
75          "label" : "or use this as branch name",
76          "xalign" : 0.90000000000000002,
77          "* pack" : "attach_defaults,0,1,1,2",
78          "xtype" : "Label",
79          "$ justify" : "Gtk.Justification.RIGHT",
80          "x_options" : 4,
81          "$ xns" : "Gtk"
82         },
83         {
84          "id" : "name",
85          "$ visible" : true,
86          "xtype" : "Entry",
87          "* pack" : "attach_defaults,1,2,1,2",
88          "$ xns" : "Gtk"
89         }
90        ]
91       }
92      ]
93     },
94     {
95      "label" : "Do not create Branch",
96      "* pack" : "add_action_widget,0",
97      "xtype" : "Button",
98      "$ xns" : "Gtk"
99     },
100     {
101      "label" : "Create Branch",
102      "* pack" : "add_action_widget,1",
103      "xtype" : "Button",
104      "$ xns" : "Gtk"
105     }
106    ]
107   }
108  ]
109 }