projects
/
gitlive
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c148b94
)
Ticket.bjs
author
Alan Knowles
<alan@roojs.com>
Mon, 17 Dec 2018 06:43:35 +0000
(14:43 +0800)
committer
Alan Knowles
<alan@roojs.com>
Mon, 17 Dec 2018 06:43:35 +0000
(14:43 +0800)
Ticket.vala
Ticket.bjs
patch
|
blob
|
history
Ticket.vala
patch
|
blob
|
history
diff --git
a/Ticket.bjs
b/Ticket.bjs
index
c2b7c41
..
283f899
100644
(file)
--- a/
Ticket.bjs
+++ b/
Ticket.bjs
@@
-259,7
+259,7
@@
},
{
"listeners" : {
},
{
"listeners" : {
- "clicked" : "() => {\n\tGLib.debug(\"fire response = 1\");\n\t\n\t\n\tvar invalid =
true;\n\t\n\t// validate first...\n\tthis.el.get_style_context().add_class(\"suggested-action\");\n\t\n\t\n\t\n\t
\n\t\n\t_this.el.response(1);\n}"
+ "clicked" : "() => {\n\tGLib.debug(\"fire response = 1\");\n\t\n\t\n\tvar invalid =
false;\n\t\n\t// validate first...\n\tthis.project_id.el.get_style_context().remove_class(\"warning\");\t\n\tthis.project_id.getProjectId() == \"\") {\n\t\tthis.project_id.el.get_style_context().add_class(\"warning\");\n\t\tinvalid = true;\n\t}\n\t\n\t\n\t\n\tif (invalid) {\n\t\treturn;\n\t}
\n\t\n\t_this.el.response(1);\n}"
},
"label" : "Create Ticket",
"* init" : "{\n this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
},
"label" : "Create Ticket",
"* init" : "{\n this.el.get_style_context().add_class(\"suggested-action\");\n}\n",
diff --git
a/Ticket.vala
b/Ticket.vala
index
a3f337f
..
bc6818d
100644
(file)
--- a/
Ticket.vala
+++ b/
Ticket.vala
@@
-1163,14
+1163,20
@@
public class Ticket : Object
GLib.debug("fire response = 1");
GLib.debug("fire response = 1");
- var invalid =
tru
e;
+ var invalid =
fals
e;
// validate first...
// validate first...
- this.el.get_style_context().add_class("suggested-action");
-
+ this.project_id.el.get_style_context().remove_class("warning");
+ this.project_id.getProjectId() == "") {
+ this.project_id.el.get_style_context().add_class("warning");
+ invalid = true;
+ }
+ if (invalid) {
+ return;
+ }
_this.el.response(1);
});
_this.el.response(1);
});