diff 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
line wrap: on
line diff
--- a/src/editor.tp	Mon Aug 05 23:37:17 2013 -0700
+++ b/src/editor.tp	Tue Aug 06 00:06:41 2013 -0700
@@ -7,9 +7,12 @@
 removeClass <- foreign: :node className {}
 hasClass <- foreign: :node className {}
 get <- foreign: :url onSuccess onFail onOther {}
+newEl <- foreign: :tagname props {}
+
+//editor.js functions
 getEl <- foreign: :from idx {}
 setEl <- foreign: :to idx val {}
-newEl <- foreign: :tagname props {}
+goFullScreen <- foreign: {}
 
 //TP Parser
 parser <- foreign: #{
@@ -26,9 +29,6 @@
 	keys <- foreign: :object {}
 }
 
-//kernel definitions
-//import: kernel
-
 filter <- :arr pred {
 	output <- arr slice: 0 0
 	each: arr :idx el {
@@ -325,6 +325,9 @@
 	if: (path indexOf: "/edit/") = 0 {
 		editFile: (path substr: 5)
 	}
+	(q: "#fullscreen") onclick!: :event {
+		goFullScreen:
+	}
 }
 
 }