Mercurial > p > roundup > code
comparison roundup/cgi/KeywordsExpr.py @ 7228:07ce4e4110f5
flake8 fixes: whitespace, remove unused imports
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 18 Mar 2023 14:16:31 -0400 |
| parents | 99d344aa825d |
| children |
comparison
equal
deleted
inserted
replaced
| 7227:1e004afe87bb | 7228:07ce4e4110f5 |
|---|---|
| 45 function Not(x) { | 45 function Not(x) { |
| 46 this.x = x; | 46 this.x = x; |
| 47 this.brackets = false; | 47 this.brackets = false; |
| 48 | 48 |
| 49 this.infix = function() { | 49 this.infix = function() { |
| 50 return this.x.brackets | 50 return this.x.brackets |
| 51 ? "NOT(" + this.x.infix() + ")" | 51 ? "NOT(" + this.x.infix() + ")" |
| 52 : "NOT " + this.x.infix(); | 52 : "NOT " + this.x.infix(); |
| 53 } | 53 } |
| 54 | 54 |
| 55 this.postfix = function() { | 55 this.postfix = function() { |
| 124 out += ' onchange="' + handler + '"'; | 124 out += ' onchange="' + handler + '"'; |
| 125 } | 125 } |
| 126 out += '>'; | 126 out += '>'; |
| 127 out += '<option value="-1"><\/option>'; | 127 out += '<option value="-1"><\/option>'; |
| 128 for (var i = 0; i < KEYWORDS.length; ++i) { | 128 for (var i = 0; i < KEYWORDS.length; ++i) { |
| 129 out += '<option value="' + KEYWORDS[i][0] + | 129 out += '<option value="' + KEYWORDS[i][0] + |
| 130 '">' + KEYWORDS[i][1] + "<\/option>"; | 130 '">' + KEYWORDS[i][1] + "<\/option>"; |
| 131 } | 131 } |
| 132 out += '<\/select>'; | 132 out += '<\/select>'; |
| 133 return out; | 133 return out; |
| 134 } | 134 } |
| 173 current = new Or(expr, not_b_wrap(new Equals(value))).postfix(); | 173 current = new Or(expr, not_b_wrap(new Equals(value))).postfix(); |
| 174 set_content(); | 174 set_content(); |
| 175 } | 175 } |
| 176 | 176 |
| 177 function undo_clicked() { | 177 function undo_clicked() { |
| 178 current = undo.length > 0 | 178 current = undo.length > 0 |
| 179 ? undo.pop() | 179 ? undo.pop() |
| 180 : original; | 180 : original; |
| 181 set_content(); | 181 set_content(); |
| 182 } | 182 } |
| 183 | 183 |
