1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
define.class('$ui/view', function(require, $$, dialog, $ui$, textbox,view, icon, treeview, cadgrid, label, button, $$, ballbutton){
this.bgcolor = NaN
this.attributes = {
oldname:""
}
this. flexdirection = "column";
this.justifycontent = "flex-start";
this.alignitems = "flex-start";
this.render =function(){
return [
view({bgcolor:NaN}, view({
flexdirection:"column",
padding:20,
bgcolor: vec4("#505050"),
borderradius:20,
dropshadowopacity:0.4,
dropshadowhardness:0,
dropshadowradius:20,
dropshadowoffset:vec2(9,9)
},
view({margin:10, flexdirection:"row",bgcolor:NaN},
label({text:"new name:",bgcolor:NaN}),
textbox({value:this.oldname, name:"newnamebox", marginleft: 20, bgcolor:"#202020", multiline:false})
),
view({flexdirection:"row",bgcolor:NaN, alignitems: "flex-end", justifycontent:"flex-end", alignself:"flex-end" },
button({padding:10, text:"OK", icon:"check", click: function(){this.screen.closeModal(this.find("newnamebox").value);} }),
button({padding: 10, marginleft:10, icon:"close", text:"Cancel", click: function(){this.screen.closeModal(false);} })
)
)
)
]
}
})
|