Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var current = Titanium.UI.currentWindow;
  2.  
  3. // create our buttons var assistedLivingBTN = Titanium.UI.createButton({ title: 'Assisted Living', height: 40, width: 200, top: 100, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
  4.  
  5. var skilledNursingBTN = Titanium.UI.createButton({ title: 'Skilled Nursing', height: 40, width: 200, top: 150, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1}
  6. });
  7.  
  8. // create our information labels var FP1Text = Titanium.UI.createLabel({ text:'The Studio at The Ruston Residence is ideal for the person who desires the ultimate in privacy and convenience. Includes bright and airy bedroom/sitting area, large closet with built-in shelving, full private bath and kitchenette.', width: 200, font:{fontSize:10}, bottom: 5 });
  9.  
  10. var FP2Text = Titanium.UI.createLabel({ text:'The Studio at The Ruston Residence is ideal for the person who desires the ultimate in privacy and convenience. Includes bright and airy bedroom/sitting area, large closet with built-in shelving, full private bath and kitchenette.', width: 200, font:{fontSize:10}, bottom: 5 });
  11.  
  12. // create our close buttons var closeLBL = Titanium.UI.createButton({ height: 40, width: 200, top: 400, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', title: 'Close', textAlign: 'center', color: '#fff', zIndex: 900, shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
  13.  
  14. var closeLBL2 = Titanium.UI.createButton({ height: 40, width: 200, top: 400, backgroundColor: '#f1e3bf', borderRadius: 10, backgroundImage: 'images/buttons/button-bg.png', backgroundSelectedImage: 'images/buttons/button-selected-bg.png', title: 'Close', textAlign: 'center', color: '#fff', zIndex: 900, shadowColor:'#b9ac8c', shadowOffset:{x:1,y:1} });
  15.  
  16. // add buttons to our current window current.add(assistedLivingBTN); current.add(skilledNursingBTN);
  17.  
  18. // create our floorplan windows, necessary elements and tie them all together var assistedLivingWIN = Titanium.UI.createWindow({ backgroundColor: '#fff', orientationModes : [ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ] }); var skilledNursingWIN = Titanium.UI.createWindow({ backgroundColor: '#fff', orientationModes : [ Titanium.UI.PORTRAIT, Titanium.UI.UPSIDE_PORTRAIT, Titanium.UI.LANDSCAPE_LEFT, Titanium.UI.LANDSCAPE_RIGHT ] });
  19.  
  20. var FP1 = Titanium.UI.createImageView({ image: 'images/floorplans/1.gif', top: 5, width: 120, height: 240 }); var FP2 = Titanium.UI.createImageView({ image: 'images/floorplans/2.gif', top: 5, width: 277, height: 172 });
  21.  
  22. assistedLivingWIN.add(closeLBL); assistedLivingWIN.add(FP1Text); skilledNursingWIN.add(closeLBL2);
  23.  
  24. // open buttons assistedLivingBTN.addEventListener('click', function(e) { assistedLivingWIN.open(); }); skilledNursingBTN.addEventListener('click', function(e) { skilledNursingWIN.open(); });
  25.  
  26. // close buttons closeLBL.addEventListener('click', function(e) { assistedLivingWIN.close({opacity:0}); }); closeLBL2.addEventListener('click', function(e) { skilledNursingWIN.close({opacity:0}); });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement