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" : "New Component",
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" : "Component Name",
42          "xalign" : 0.90000000000000002,
43          "* pack" : "attach_defaults,0,1,0,1",
44          "xtype" : "Label",
45          "$ justify" : "Gtk.Justification.RIGHT",
46          "x_options" : 4,
47          "$ xns" : "Gtk"
48         },
49         {
50          "id" : "name",
51          "$ visible" : true,
52          "xtype" : "Entry",
53          "* pack" : "attach_defaults,1,2,0,1",
54          "$ xns" : "Gtk"
55         },
56         {
57          "label" : "Title",
58          "$ visible" : true,
59          "xalign" : 0.90000000000000002,
60          "* pack" : "attach_defaults,0,1,1,2",
61          "xtype" : "Label",
62          "$ justify" : "Gtk.Justification.RIGHT",
63          "x_options" : 4,
64          "$ xns" : "Gtk"
65         },
66         {
67          "id" : "title",
68          "$ visible" : true,
69          "xtype" : "Entry",
70          "* pack" : "attach_defaults,1,2,1,2",
71          "$ xns" : "Gtk"
72         },
73         {
74          "label" : "Region",
75          "tooltip_text" : "center, north, south, east, west",
76          "$ visible" : true,
77          "xalign" : 0.90000000000000002,
78          "* pack" : "attach_defaults,0,1,2,3",
79          "xtype" : "Label",
80          "$ justify" : "Gtk.Justification.RIGHT",
81          "x_options" : 4,
82          "$ xns" : "Gtk"
83         },
84         {
85          "id" : "region",
86          "$ visible" : true,
87          "xtype" : "Entry",
88          "* pack" : "attach_defaults,1,2,2,3",
89          "$ xns" : "Gtk"
90         },
91         {
92          "label" : "Parent Name",
93          "$ visible" : true,
94          "xalign" : 0.90000000000000002,
95          "* pack" : "attach_defaults,0,1,3,4",
96          "xtype" : "Label",
97          "$ justify" : "Gtk.Justification.RIGHT",
98          "x_options" : 4,
99          "$ xns" : "Gtk"
100         },
101         {
102          "id" : "parent",
103          "$ visible" : true,
104          "xtype" : "Entry",
105          "* pack" : "attach_defaults,1,2,3,4",
106          "$ xns" : "Gtk"
107         },
108         {
109          "label" : "Permission Name",
110          "$ visible" : true,
111          "xalign" : 0.90000000000000002,
112          "* pack" : "attach_defaults,0,1,4,5",
113          "xtype" : "Label",
114          "$ justify" : "Gtk.Justification.RIGHT",
115          "x_options" : 4,
116          "$ xns" : "Gtk"
117         },
118         {
119          "id" : "permname",
120          "$ visible" : true,
121          "xtype" : "Entry",
122          "* pack" : "attach_defaults,1,2,4,5",
123          "$ xns" : "Gtk"
124         },
125         {
126          "label" : "Order (for tabs)",
127          "$ visible" : true,
128          "xalign" : 0.90000000000000002,
129          "* pack" : "attach_defaults,0,1,5,6",
130          "xtype" : "Label",
131          "$ justify" : "Gtk.Justification.RIGHT",
132          "x_options" : 4,
133          "$ xns" : "Gtk"
134         },
135         {
136          "id" : "modOrder",
137          "$ visible" : true,
138          "xtype" : "Entry",
139          "* pack" : "attach_defaults,1,2,5,6",
140          "$ xns" : "Gtk"
141         },
142         {
143          "label" : "Module to build (Vala only)",
144          "$ visible" : true,
145          "xalign" : 0.90000000000000002,
146          "* pack" : "attach_defaults,0,1,6,7",
147          "xtype" : "Label",
148          "$ justify" : "Gtk.Justification.RIGHT",
149          "x_options" : 4,
150          "$ xns" : "Gtk"
151         },
152         {
153          "id" : "build_module",
154          "* init" : "this.el.add_attribute(_this.dbcellrenderer.el , \"markup\", 1 );",
155          "* pack" : "attach_defaults,1,2,6,7",
156          "xtype" : "ComboBox",
157          "$ xns" : "Gtk",
158          "items" : [
159           {
160            "id" : "dbcellrenderer",
161            "* pack" : "pack_start,true",
162            "xtype" : "CellRendererText",
163            "$ xns" : "Gtk"
164           },
165           {
166            "id" : "dbmodel",
167            "* pack" : "set_model",
168            "xtype" : "ListStore",
169            "$ columns" : "typeof(string),typeof(string)",
170            "n_columns" : 2,
171            "$ xns" : "Gtk",
172            "| 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"
173           }
174          ]
175         }
176        ]
177       }
178      ]
179     },
180     {
181      "label" : "Cancel",
182      "* pack" : "add_action_widget,0",
183      "xtype" : "Button",
184      "$ xns" : "Gtk"
185     },
186     {
187      "label" : "OK",
188      "* pack" : "add_action_widget,1",
189      "xtype" : "Button",
190      "$ xns" : "Gtk"
191     }
192    ]
193   }
194  ]
195 }