Mercurial > repos > tabletprog
comparison src/editor.tp @ 111:b2a3f202d485
Fleshed out the UI a little. Added a "literal" button that replaces the operator panel with a literal panel. Added the navigation buttons, but they're not functional yet.
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 14 Apr 2013 17:24:53 -0700 |
parents | d715fb3c39ab |
children | c0bfff39abe3 |
comparison
equal
deleted
inserted
replaced
110:d715fb3c39ab | 111:b2a3f202d485 |
---|---|
186 el onclick!: :event { | 186 el onclick!: :event { |
187 srcel <- (q: "#src") | 187 srcel <- (q: "#src") |
188 srcel textContent!: (srcel textContent) + (el textContent) | 188 srcel textContent!: (srcel textContent) + (el textContent) |
189 } | 189 } |
190 } | 190 } |
191 visible <- "showops" | |
191 (q: "#ops_button") onclick!: :event { | 192 (q: "#ops_button") onclick!: :event { |
192 each: (qall: ".controls") :idx el { | 193 each: (qall: ".controls") :idx el { |
194 removeClass: el visible | |
193 addClass: el "showops" | 195 addClass: el "showops" |
194 } | 196 } |
197 visible <- "showops" | |
198 } | |
199 (q: "#lit_button") onclick!: :event { | |
200 each: (qall: ".controls") :idx el { | |
201 removeClass: el visible | |
202 addClass: el "showlit" | |
203 } | |
204 visible <- "showlit" | |
195 } | 205 } |
196 | 206 |
197 path <- (window location) pathname | 207 path <- (window location) pathname |
198 if: (path indexOf: "/edit/") = 0 { | 208 if: (path indexOf: "/edit/") = 0 { |
199 editFile: (path substr: 5) | 209 editFile: (path substr: 5) |