projects
/
app.Builder.js
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tools
[app.Builder.js]
/
Sample
/
DialogSaveTemplate.js
diff --git
a/Sample/DialogSaveTemplate.js
b/Sample/DialogSaveTemplate.js
index
1f82908
..
c82c49d
100644
(file)
--- a/
Sample/DialogSaveTemplate.js
+++ b/
Sample/DialogSaveTemplate.js
@@
-17,6
+17,7
@@
DialogSaveTemplate=new XObject({
return true;
},
response : function (self, response_id) {
return true;
},
response : function (self, response_id) {
+
if (!response_id) {
this.el.hide();
return;
if (!response_id) {
this.el.hide();
return;
@@
-28,13
+29,14
@@
DialogSaveTemplate=new XObject({
);
return;
}
);
return;
}
- if (!name.match(/^[A-Z ]$/i) || name.match(/^[A-Z]/i)) {
+
+ if (!name.match(/^[A-Z ]+$/i) || !name.match(/[A-Z]/i)) {
this.get('/StandardErrorDialog').show(
"Template Nane must contain only letters and spaces. "
);
return;
}
this.get('/StandardErrorDialog').show(
"Template Nane must contain only letters and spaces. "
);
return;
}
- this.get('/
LeftTree').getPalet
teProvider().saveTemplate(name, this.data);
+ this.get('/
Window.LeftTree').getPale
teProvider().saveTemplate(name, this.data);
// now we save it..
this.el.hide();
// now we save it..
this.el.hide();
@@
-45,6
+47,8
@@
DialogSaveTemplate=new XObject({
modal : true,
show : function(data) {
this.data = data;
modal : true,
show : function(data) {
this.data = data;
+ this.get('name').el.set_text('');
+ this.el.show_all();
},
items : [
{
},
items : [
{
@@
-60,6
+64,7
@@
DialogSaveTemplate=new XObject({
},
{
xtype: Gtk.Entry,
},
{
xtype: Gtk.Entry,
+ id : "name",
pack : "add"
}
]
pack : "add"
}
]
@@
-72,7
+77,7
@@
DialogSaveTemplate=new XObject({
{
xtype: Gtk.Button,
label : "OK",
{
xtype: Gtk.Button,
label : "OK",
- pack : "add_action_widget,
0
"
+ pack : "add_action_widget,
1
"
}
]
});
}
]
});