comparison src/editor.tp @ 127:2b25d0ce2946

Add fullscreen support and improve experience on tablet browsers by tweaking button text size and disabling zooming.
author Mike Pavone <pavone@retrodev.com>
date Tue, 06 Aug 2013 00:06:41 -0700
parents 1157639353e7
children 8285784f5ff5
comparison
equal deleted inserted replaced
126:a2d2d8e09291 127:2b25d0ce2946
5 each <- foreign: :iterable fun {} 5 each <- foreign: :iterable fun {}
6 addClass <- foreign: :node className {} 6 addClass <- foreign: :node className {}
7 removeClass <- foreign: :node className {} 7 removeClass <- foreign: :node className {}
8 hasClass <- foreign: :node className {} 8 hasClass <- foreign: :node className {}
9 get <- foreign: :url onSuccess onFail onOther {} 9 get <- foreign: :url onSuccess onFail onOther {}
10 newEl <- foreign: :tagname props {}
11
12 //editor.js functions
10 getEl <- foreign: :from idx {} 13 getEl <- foreign: :from idx {}
11 setEl <- foreign: :to idx val {} 14 setEl <- foreign: :to idx val {}
12 newEl <- foreign: :tagname props {} 15 goFullScreen <- foreign: {}
13 16
14 //TP Parser 17 //TP Parser
15 parser <- foreign: #{ 18 parser <- foreign: #{
16 parse <- foreign: :str {} 19 parse <- foreign: :str {}
17 } 20 }
23 } 26 }
24 window <- foreign: #{} 27 window <- foreign: #{}
25 Object <- foreign: #{ 28 Object <- foreign: #{
26 keys <- foreign: :object {} 29 keys <- foreign: :object {}
27 } 30 }
28
29 //kernel definitions
30 //import: kernel
31 31
32 filter <- :arr pred { 32 filter <- :arr pred {
33 output <- arr slice: 0 0 33 output <- arr slice: 0 0
34 each: arr :idx el { 34 each: arr :idx el {
35 if: (pred: el) { 35 if: (pred: el) {
323 323
324 path <- (window location) pathname 324 path <- (window location) pathname
325 if: (path indexOf: "/edit/") = 0 { 325 if: (path indexOf: "/edit/") = 0 {
326 editFile: (path substr: 5) 326 editFile: (path substr: 5)
327 } 327 }
328 } 328 (q: "#fullscreen") onclick!: :event {
329 329 goFullScreen:
330 } 330 }
331 }
332
333 }