Browse Source

Add data-os for body

Javi Jimenez Villar 13 years ago
parent
commit
65ab1eaed6
1 changed files with 5 additions and 1 deletions
  1. 5 1
      src/boot/Lungo.Boot.Device.coffee

+ 5 - 1
src/boot/Lungo.Boot.Device.coffee

@@ -17,7 +17,11 @@ Lungo.Boot.Device = do(lng = Lungo) ->
   init = ->
     env = lng.Core.environment()
     lng.DEVICE = (if env.screen.width < 768 then DEVICE.PHONE else DEVICE.TABLET)
-    lng.dom(document.body).data "device", lng.DEVICE
+
+    body = lng.dom document.body
+    body.data "device", lng.DEVICE
+    if env.os then body.data "os", env.os.name
+
     lng.Aside.draggable() if lng.DEVICE is lng.Constants.DEVICE.PHONE
 
   init: init