Created
February 16, 2015 16:01
-
-
Save mrdoornbos/be36c7a358656bc7bfc1 to your computer and use it in GitHub Desktop.
Appery Helper
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Helper = { | |
getDeviceImageByStatus: function(status) { | |
switch (status) { | |
case "open": | |
// door_open | |
return Appery.getImagePath("door_open") + ".png"; | |
case "closed": | |
//door_closed | |
return Appery.getImagePath("door_closed") + ".png"; | |
case "no-motion": | |
return Appery.getImagePath("no-motion") + ".png"; | |
case "no-motion": | |
return Appery.getImagePath("recent-motion") + ".png"; | |
case "motion": | |
return Appery.getImagePath("motion") + ".png"; | |
case "Door": | |
return Appery.getImagePath("door_real") + ".png"; | |
case "Motion": | |
return Appery.getImagePath("motion_real") + ".png"; | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment