Guest User

Untitled

a guest
May 23rd, 2018
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.29 KB | None | 0 0
  1. // ==========================================================================
  2. // Project: Tabs - mainPage
  3. // Copyright: ©2010 My Company, Inc.
  4. // ==========================================================================
  5. /*globals Tabs */
  6.  
  7. // This page describes the main user interface for your application.
  8. Tabs.mainPage = SC.Page.design({
  9.  
  10. // The main pane is made visible on screen as soon as your app is loaded.
  11. // Add childViews to this pane for views to display immediately on page
  12. // load.
  13. mainPane: SC.MainPane.design({
  14. childViews: [
  15. SC.ContainerView.design({
  16. nowShowingBinding: 'Tabs.containerController.nowShowing',
  17. layout: { left: 200, top: 20, bottom: 20, right: 20 }
  18. }),
  19. SC.ToolbarView.design({
  20.  
  21. }),
  22.  
  23. SC.ButtonView.design({
  24. layout: { left: 20, width: 140, top: 20, height: 24 },
  25. title: "Show Split View",
  26. action: "showContainer1",
  27. target: "Tabs.containerController"
  28. }),
  29.  
  30. SC.ButtonView.design({
  31. layout: { left: 160, width: 140, top: 20, height: 24 },
  32. title: "Show Container2",
  33. action: "showContainer2",
  34. target: "Tabs.containerController"
  35. }),
  36. SC.ButtonView.design({
  37. layout: { left: 300, width: 140, top: 20, height: 24 },
  38. title: "Show Container3",
  39. action: "showContainer3",
  40. target: "Tabs.containerController"
  41. })
  42. ]
  43. }),
  44. container1:
  45. SC.View.extend({
  46. childViews:[
  47.  
  48. SC.ImageView.design({
  49. // You don't need to have both a 'right' and a 'width', just one or the other
  50. layout: { top: 100, left: 840, rotate: 90, height: 150, width: 130 },
  51. value: static_url('resources/aly.JPG'),
  52. localize: NO,
  53. mouseDown: function(evt) {
  54. // This will hide the current image when clicked
  55. this.set('isVisible', NO) ;
  56. },
  57. useImageCache: NO // this loads the image with out clicking the mouse.
  58. }),
  59.  
  60.  
  61. SC.LabelView.design({
  62. value: "Aly Picture!",
  63. layout: { top: 100, left: 840, rotate: 90, right: 8, height: 150, width: 130 },
  64. tagName: 'h1'
  65. }),
  66.  
  67. SC.ImageView.design({
  68. layout: { top: 100, left: 700, rotate: 90, right: 16, height: 150, width: 130 },
  69. value: static_url('resources/aly.JPG'),
  70. localize: NO,
  71. mouseDown: function(evt) {
  72. // This will hide the current image when clicked
  73. this.set('isVisible', NO) ;
  74. var x = Tabs.getPath("Tabs.mainview.largeImage");
  75. },
  76. useImageCache: NO // this loads the image with out clicking the mouse.
  77.  
  78. }),
  79.  
  80.  
  81. SC.LabelView.design({
  82. value: "Aly Picture!",
  83. layout: { top: 100, left: 700, right: 16, height: 150, width: 130 },
  84. tagName: 'h1'
  85. }),
  86. SC.ImageView.design({
  87. layout: { top: 100, left: 540, rotate: 90, right: 16, height: 150, width: 130 },
  88. value: static_url('resources/aly.JPG'),
  89. localize: NO,
  90. useImageCache: NO // this loads the image with out clicking the mouse.
  91. }),
  92.  
  93. SC.LabelView.design({
  94. value: "Aly Picture!",
  95. layout: { top: 100, left: 540, right: 16, height: 150, width: 130 },
  96. tagName: 'h1'
  97. }),
  98. SC.ImageView.design({
  99. layout: { top: 100, left: 400, rotate: 90, right: 16, height: 150, width: 130 },
  100. value: static_url('resources/aly.JPG'),
  101. localize: NO,
  102. useImageCache: NO // this loads the image with out clicking the mouse.
  103. }),
  104.  
  105. SC.LabelView.design({
  106. value: "Aly Picture!",
  107. layout: { top: 100, left: 400, right: 16, height: 150, width: 130 },
  108. tagName: 'h1'
  109. })
  110. ]
  111. }),
  112.  
  113. container2:
  114. SC.LabelView.design({
  115. value: "Container2",
  116. layout: { left: 40, centerY: 0, right: 40, height: 40 },
  117. tagName: 'h1'
  118. }),
  119.  
  120. container3:
  121. SC.LabelView.design({
  122. value: "Container3",
  123. layout: { left: 40, centerY: 0, right: 40, height: 40 },
  124. tagName: 'h1'
  125. })
  126. });
  127.  
  128.  
  129.  
  130.  
  131.  
  132. //Here is the Page File
  133.  
  134. Tabs.mainView = SC.Page.create({
  135.  
  136. //This is a large View
  137. largeImage: SC.ImageView.design({
  138. layout: { top: 100, left: 100, rotate: 90, height: 650, width: 530 },
  139. value: static_url('resources/aly.JPG'),
  140. localize: NO,
  141. mouseDown: function(evt) {
  142. // This will hide the current image when clicked
  143. this.set('isVisible', NO) ;
  144. },
  145. useImageCache: NO // this loads the image with out clicking the mouse.
  146. })
  147.  
  148.  
  149. });
Add Comment
Please, Sign In to add comment