Magento_Mobile - Version 1.4.2.0.22.1

Version Notes

1.4.2.0.22.1 version of package
internal svn revision #121425

Download this release

Release Info

Developer Magento Core Team
Extension Magento_Mobile
Version 1.4.2.0.22.1
Comparing to
See all releases


Version 1.4.2.0.22.1

Files changed (204) hide show
  1. app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php +48 -0
  2. app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php +116 -0
  3. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php +53 -0
  4. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php +136 -0
  5. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php +55 -0
  6. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php +49 -0
  7. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php +106 -0
  8. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php +146 -0
  9. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php +98 -0
  10. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php +57 -0
  11. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php +157 -0
  12. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php +79 -0
  13. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php +77 -0
  14. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php +75 -0
  15. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Themes.php +199 -0
  16. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Flurryanalytics.php +161 -0
  17. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/General.php +168 -0
  18. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Notification.php +216 -0
  19. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Payment.php +288 -0
  20. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Settings.php +120 -0
  21. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Social.php +330 -0
  22. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Submission/History.php +163 -0
  23. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tabs.php +67 -0
  24. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Addrow.php +101 -0
  25. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Color.php +47 -0
  26. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Country.php +172 -0
  27. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Datetime.php +205 -0
  28. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Font.php +105 -0
  29. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Image.php +99 -0
  30. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Page.php +107 -0
  31. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Tabs.php +65 -0
  32. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Form/Element/Theme.php +52 -0
  33. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid.php +123 -0
  34. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Bool.php +61 -0
  35. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Grid/Renderer/Type.php +53 -0
  36. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Content.php +55 -0
  37. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Preview/Tabitems.php +63 -0
  38. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission.php +121 -0
  39. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Form.php +54 -0
  40. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Androidmarket.php +47 -0
  41. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Renderer/Country/Istore.php +47 -0
  42. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container.php +99 -0
  43. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tab/Container/Submission.php +389 -0
  44. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Submission/Tabs.php +49 -0
  45. app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Widget/Form.php +112 -0
  46. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue.php +48 -0
  47. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit.php +88 -0
  48. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Edit/Form.php +166 -0
  49. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid.php +184 -0
  50. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Action.php +74 -0
  51. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Application.php +51 -0
  52. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Id.php +47 -0
  53. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Msgtitle.php +51 -0
  54. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Pushtitle.php +47 -0
  55. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Status.php +69 -0
  56. app/code/core/Mage/XmlConnect/Block/Adminhtml/Queue/Grid/Renderer/Template.php +51 -0
  57. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template.php +65 -0
  58. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit.php +87 -0
  59. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Edit/Form.php +160 -0
  60. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid.php +159 -0
  61. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Grid/Renderer/Application.php +51 -0
  62. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview.php +69 -0
  63. app/code/core/Mage/XmlConnect/Block/Adminhtml/Template/Preview/Form.php +69 -0
  64. app/code/core/Mage/XmlConnect/Block/Cart.php +245 -0
  65. app/code/core/Mage/XmlConnect/Block/Cart/Crosssell.php +100 -0
  66. app/code/core/Mage/XmlConnect/Block/Cart/Info.php +75 -0
  67. app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer.php +261 -0
  68. app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Configurable.php +86 -0
  69. app/code/core/Mage/XmlConnect/Block/Cart/Item/Renderer/Grouped.php +51 -0
  70. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Details.php +91 -0
  71. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Review.php +128 -0
  72. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mecl/Shippingmethods.php +118 -0
  73. app/code/core/Mage/XmlConnect/Block/Cart/Paypal/Mep/Totals.php +86 -0
  74. app/code/core/Mage/XmlConnect/Block/Cart/Totals.php +165 -0
  75. app/code/core/Mage/XmlConnect/Block/Catalog.php +75 -0
  76. app/code/core/Mage/XmlConnect/Block/Catalog/Category.php +122 -0
  77. app/code/core/Mage/XmlConnect/Block/Catalog/Category/Info.php +76 -0
  78. app/code/core/Mage/XmlConnect/Block/Catalog/Filters.php +68 -0
  79. app/code/core/Mage/XmlConnect/Block/Catalog/Product.php +165 -0
  80. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Attributes.php +64 -0
  81. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Gallery.php +89 -0
  82. app/code/core/Mage/XmlConnect/Block/Catalog/Product/List.php +202 -0
  83. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options.php +227 -0
  84. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Bundle.php +123 -0
  85. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Configurable.php +236 -0
  86. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Giftcard.php +316 -0
  87. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Grouped.php +102 -0
  88. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Simple.php +49 -0
  89. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Options/Virtual.php +49 -0
  90. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price.php +98 -0
  91. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Bundle.php +425 -0
  92. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Default.php +828 -0
  93. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Price/Giftcard.php +96 -0
  94. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Related.php +132 -0
  95. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review.php +90 -0
  96. app/code/core/Mage/XmlConnect/Block/Catalog/Product/Review/List.php +115 -0
  97. app/code/core/Mage/XmlConnect/Block/Catalog/Search.php +144 -0
  98. app/code/core/Mage/XmlConnect/Block/Catalog/Search/Suggest.php +69 -0
  99. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Billing.php +62 -0
  100. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Form.php +234 -0
  101. app/code/core/Mage/XmlConnect/Block/Checkout/Address/Shipping.php +62 -0
  102. app/code/core/Mage/XmlConnect/Block/Checkout/Agreements.php +63 -0
  103. app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review.php +74 -0
  104. app/code/core/Mage/XmlConnect/Block/Checkout/Order/Review/Info.php +191 -0
  105. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Authorizenet.php +128 -0
  106. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Ccsave.php +142 -0
  107. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Checkmo.php +73 -0
  108. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Authorizenet.php +37 -0
  109. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Ccsave.php +62 -0
  110. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Checkmo.php +71 -0
  111. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Free.php +50 -0
  112. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Abstract.php +63 -0
  113. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Express.php +37 -0
  114. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Paypal/Mecl.php +37 -0
  115. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Authorizenet.php +37 -0
  116. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypal/Direct.php +37 -0
  117. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Paypaluk/Direct.php +37 -0
  118. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Pbridge/Verisign.php +63 -0
  119. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Info/Purchaseorder.php +59 -0
  120. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/List.php +366 -0
  121. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Direct.php +62 -0
  122. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Paypal/Payflow.php +160 -0
  123. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Abstract.php +90 -0
  124. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Authorizenet.php +43 -0
  125. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypal.php +43 -0
  126. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Paypaluk.php +43 -0
  127. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Pbridge/Verisign.php +43 -0
  128. app/code/core/Mage/XmlConnect/Block/Checkout/Payment/Method/Purchaseorder.php +91 -0
  129. app/code/core/Mage/XmlConnect/Block/Checkout/Pbridge/Result.php +50 -0
  130. app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Available.php +81 -0
  131. app/code/core/Mage/XmlConnect/Block/Checkout/Shipping/Method/Avaliable.php +39 -0
  132. app/code/core/Mage/XmlConnect/Block/Cms/Page.php +45 -0
  133. app/code/core/Mage/XmlConnect/Block/Configuration.php +125 -0
  134. app/code/core/Mage/XmlConnect/Block/Customer/Address/Form.php +466 -0
  135. app/code/core/Mage/XmlConnect/Block/Customer/Address/List.php +128 -0
  136. app/code/core/Mage/XmlConnect/Block/Customer/Form.php +96 -0
  137. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Boolean.php +59 -0
  138. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Date.php +110 -0
  139. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/File.php +119 -0
  140. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Image.php +88 -0
  141. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiline.php +99 -0
  142. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Multiselect.php +66 -0
  143. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Select.php +66 -0
  144. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Text.php +99 -0
  145. app/code/core/Mage/XmlConnect/Block/Customer/Form/Renderer/Textarea.php +43 -0
  146. app/code/core/Mage/XmlConnect/Block/Customer/GiftcardCheck.php +79 -0
  147. app/code/core/Mage/XmlConnect/Block/Customer/Order/Details.php +199 -0
  148. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Bundle.php +226 -0
  149. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Default.php +133 -0
  150. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Downloadable.php +148 -0
  151. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Giftcard.php +79 -0
  152. app/code/core/Mage/XmlConnect/Block/Customer/Order/Item/Renderer/Grouped.php +62 -0
  153. app/code/core/Mage/XmlConnect/Block/Customer/Order/Items.php +94 -0
  154. app/code/core/Mage/XmlConnect/Block/Customer/Order/List.php +76 -0
  155. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals.php +147 -0
  156. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance.php +66 -0
  157. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Customerbalance/Refunded.php +66 -0
  158. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Giftcards.php +78 -0
  159. app/code/core/Mage/XmlConnect/Block/Customer/Order/Totals/Tax.php +93 -0
  160. app/code/core/Mage/XmlConnect/Block/Customer/Storecredit.php +121 -0
  161. app/code/core/Mage/XmlConnect/Block/Home.php +88 -0
  162. app/code/core/Mage/XmlConnect/Block/Review/Form.php +113 -0
  163. app/code/core/Mage/XmlConnect/Block/Wishlist.php +115 -0
  164. app/code/core/Mage/XmlConnect/Controller/Action.php +157 -0
  165. app/code/core/Mage/XmlConnect/Helper/Android.php +725 -0
  166. app/code/core/Mage/XmlConnect/Helper/Catalog/Category/Image.php +103 -0
  167. app/code/core/Mage/XmlConnect/Helper/Customer/Form/Renderer.php +59 -0
  168. app/code/core/Mage/XmlConnect/Helper/Customer/Order.php +304 -0
  169. app/code/core/Mage/XmlConnect/Helper/Data.php +865 -0
  170. app/code/core/Mage/XmlConnect/Helper/Image.php +788 -0
  171. app/code/core/Mage/XmlConnect/Helper/Ipad.php +750 -0
  172. app/code/core/Mage/XmlConnect/Helper/Iphone.php +797 -0
  173. app/code/core/Mage/XmlConnect/Helper/Payment.php +42 -0
  174. app/code/core/Mage/XmlConnect/Helper/Theme.php +395 -0
  175. app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Baseurl.php +50 -0
  176. app/code/core/Mage/XmlConnect/Model/Adminhtml/System/Config/Backend/Currency/Default.php +50 -0
  177. app/code/core/Mage/XmlConnect/Model/Application.php +1219 -0
  178. app/code/core/Mage/XmlConnect/Model/Catalog/Category/Image.php +206 -0
  179. app/code/core/Mage/XmlConnect/Model/Catalog/Category/Media/Config.php +75 -0
  180. app/code/core/Mage/XmlConnect/Model/ConfigData.php +221 -0
  181. app/code/core/Mage/XmlConnect/Model/Corefix/Checkout/Session.php +137 -0
  182. app/code/core/Mage/XmlConnect/Model/Corefix/Checkout/Type/Onepage.php +465 -0
  183. app/code/core/Mage/XmlConnect/Model/Corefix/Sales/Quote.php +427 -0
  184. app/code/core/Mage/XmlConnect/Model/History.php +73 -0
  185. app/code/core/Mage/XmlConnect/Model/Input/Filter/MaliciousCode.php +100 -0
  186. app/code/core/Mage/XmlConnect/Model/Mysql4/Application.php +128 -0
  187. app/code/core/Mage/XmlConnect/Model/Mysql4/Application/Collection.php +37 -0
  188. app/code/core/Mage/XmlConnect/Model/Mysql4/Cms/Page/Collection.php +63 -0
  189. app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData.php +107 -0
  190. app/code/core/Mage/XmlConnect/Model/Mysql4/ConfigData/Collection.php +177 -0
  191. app/code/core/Mage/XmlConnect/Model/Mysql4/Filter/Collection.php +101 -0
  192. app/code/core/Mage/XmlConnect/Model/Mysql4/History.php +84 -0
  193. app/code/core/Mage/XmlConnect/Model/Mysql4/History/Collection.php +69 -0
  194. app/code/core/Mage/XmlConnect/Model/Mysql4/Queue.php +37 -0
  195. app/code/core/Mage/XmlConnect/Model/Mysql4/Queue/Collection.php +103 -0
  196. app/code/core/Mage/XmlConnect/Model/Mysql4/Setup.php +29 -0
  197. app/code/core/Mage/XmlConnect/Model/Mysql4/Template.php +37 -0
  198. app/code/core/Mage/XmlConnect/Model/Mysql4/Template/Collection.php +72 -0
  199. app/code/core/Mage/XmlConnect/Model/Observer.php +121 -0
  200. app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Config.php +55 -0
  201. app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mecl.php +82 -0
  202. app/code/core/Mage/XmlConnect/Model/Payment/Method/Paypal/Mep.php +114 -0
  203. app/code/core/Mage/XmlConnect/Model/Paypal/Mecl/Checkout.php +43 -0
  204. app/code/core/Mage/XmlConnect/Model/Paypal/Mep/Checkout.php +83 -0
app/code/core/Mage/XmlConnect/Block/Adminhtml/History.php ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * XmlConnect application submission history grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_History extends Mage_Adminhtml_Block_Widget_Grid_Container
35
+ {
36
+ /**
37
+ * Class constructor
38
+ */
39
+ public function __construct()
40
+ {
41
+ $this->_blockGroup = 'xmlconnect';
42
+ $this->_controller = 'adminhtml_history';
43
+ $this->_headerText = $this->__('App Submission History');
44
+
45
+ parent::__construct();
46
+ $this->removeButton('add');
47
+ }
48
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/History/Grid.php ADDED
@@ -0,0 +1,116 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * XmlConnect application history grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_History_Grid extends Mage_Adminhtml_Block_Widget_Grid
35
+ {
36
+ /**
37
+ * Constructor
38
+ *
39
+ * Setting grid_id, sort order and sort direction
40
+ */
41
+ public function __construct()
42
+ {
43
+ parent::__construct();
44
+ $this->setId('app_history_grid');
45
+ $this->setDefaultSort('created_at');
46
+ $this->setDefaultDir('ASC');
47
+ }
48
+
49
+ /**
50
+ * Setting collection to show
51
+ *
52
+ * @return Mage_Adminhtml_Block_Widget_Grid
53
+ */
54
+ protected function _prepareCollection()
55
+ {
56
+ $collection = Mage::getModel('xmlconnect/history')->getCollection();
57
+ $this->setCollection($collection);
58
+ return parent::_prepareCollection();
59
+ }
60
+
61
+ /**
62
+ * Configuration of grid
63
+ *
64
+ * @return Mage_Adminhtml_Block_Widget_Grid
65
+ */
66
+ protected function _prepareColumns()
67
+ {
68
+ $this->addColumn('title', array(
69
+ 'header' => $this->__('App Title'),
70
+ 'align' => 'left',
71
+ 'index' => 'title',
72
+ 'type' => 'text',
73
+ 'escape' => true
74
+ ));
75
+
76
+ $this->addColumn('name', array(
77
+ 'header' => $this->__('App Name'),
78
+ 'align' => 'left',
79
+ 'index' => 'name',
80
+ 'escape' => true
81
+ ));
82
+
83
+ $this->addColumn('code', array(
84
+ 'header' => $this->__('App Code'),
85
+ 'align' => 'left',
86
+ 'index' => 'code',
87
+ 'escape' => true
88
+ ));
89
+
90
+ $this->addColumn('created_at', array(
91
+ 'header' => $this->__('Date Submitted'),
92
+ 'align' => 'left',
93
+ 'index' => 'created_at',
94
+ 'type' => 'datetime'
95
+ ));
96
+
97
+ $this->addColumn('activation_key', array(
98
+ 'header' => $this->__('Activation Key'),
99
+ 'align' => 'left',
100
+ 'index' => 'activation_key',
101
+ 'escape' => true
102
+ ));
103
+ return parent::_prepareColumns();
104
+ }
105
+
106
+ /**
107
+ * Remove row click url
108
+ *
109
+ * @param Mage_Catalog_Model_Product|Varien_Object $row
110
+ * @return string
111
+ */
112
+ public function getRowUrl($row)
113
+ {
114
+ return '';
115
+ }
116
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile.php ADDED
@@ -0,0 +1,53 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * XmlConnect application grid
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile extends Mage_Adminhtml_Block_Widget_Grid_Container
35
+ {
36
+ /**
37
+ * Class constructor
38
+ */
39
+ public function __construct()
40
+ {
41
+ $this->_controller = 'adminhtml_mobile';
42
+ $this->_blockGroup = 'xmlconnect';
43
+ $xmlconnectVersion = Mage::getConfig()->getNode(
44
+ Mage_XmlConnect_Model_Application::XML_PATH_MODULE_VERSION
45
+ );
46
+ $this->_headerText = $this->__('Manage Apps')
47
+ . ' '
48
+ . $this->__('ver. %s', $xmlconnectVersion);
49
+ $this->_addButtonLabel = $this->__('Add App');
50
+
51
+ parent::__construct();
52
+ }
53
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit.php ADDED
@@ -0,0 +1,136 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Application edit block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit
35
+ extends Mage_Adminhtml_Block_Widget_Form_Container
36
+ {
37
+ /**
38
+ * Setting app action buttons for application
39
+ */
40
+ public function __construct()
41
+ {
42
+ $this->_objectId = 'application_id';
43
+ $this->_controller = 'adminhtml_mobile';
44
+ $this->_blockGroup = 'xmlconnect';
45
+ parent::__construct();
46
+ if ((bool)!Mage::getSingleton('adminhtml/session')->getNewApplication()) {
47
+ $app = Mage::helper('xmlconnect')->getApplication();
48
+ $this->_updateButton('save', 'label', $this->__('Save'));
49
+ $this->_updateButton('save', 'onclick', 'if (editForm.submit()) {disableElements(\'save\')}');
50
+
51
+ $this->_addButton('save_and_continue', array(
52
+ 'label' => $this->__('Save and Continue Edit'),
53
+ 'onclick' => 'saveAndContinueEdit()',
54
+ 'class' => 'save',
55
+ ), -5);
56
+
57
+ if ($app->getId()) {
58
+ $this->_addButton('submit_application_button', array(
59
+ 'label' => $this->__('Save and Submit App'),
60
+ 'onclick' => 'saveAndSubmitApp()',
61
+ 'class' => 'save'
62
+ ), -10);
63
+ }
64
+
65
+ $this->_formScripts[] = 'function saveAndContinueEdit() {'
66
+ .'if (editForm.submit($(\'edit_form\').action + \'back/edit/\')) {disableElements(\'save\')};}';
67
+ if ($app->getId()) {
68
+ $this->_formScripts[] = 'function saveAndSubmitApp() {'
69
+ .'if (editForm.submit($(\'edit_form\').action + \'submitapp/' . $app->getId() . '\')) {'
70
+ .'disableElements(\'save\')};}';
71
+ }
72
+ } else {
73
+ $this->removeButton('save');
74
+ $this->removeButton('delete');
75
+ }
76
+
77
+ if (isset($app) && $app->getIsSubmitted()) {
78
+ $this->removeButton('delete');
79
+ }
80
+ $this->removeButton('reset');
81
+ }
82
+
83
+ /**
84
+ * Adding JS scripts and styles to block
85
+ *
86
+ * @throws Mage_Core_Exception
87
+ * @return Mage_Adminhtml_Block_Widget_Form_Container
88
+ */
89
+ protected function _prepareLayout()
90
+ {
91
+ $this->getLayout()->getBlock('head')->addJs('jscolor/jscolor.js');
92
+ $this->getLayout()->getBlock('head')->addJs('scriptaculous/scriptaculous.js');
93
+
94
+ if ((bool)!Mage::getSingleton('adminhtml/session')->getNewApplication()) {
95
+ $deviceType = Mage::helper('xmlconnect')->getDeviceType();
96
+ switch ($deviceType) {
97
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPHONE:
98
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'xmlconnect/mobile-home.css');
99
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'xmlconnect/mobile-catalog.css');
100
+ break;
101
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPAD:
102
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'xmlconnect/mobile-ipad-home.css');
103
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'xmlconnect/mobile-ipad-catalog.css');
104
+ break;
105
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_ANDROID:
106
+ $this->getLayout()->getBlock('head')->addItem('skin_css', 'xmlconnect/mobile-android.css');
107
+ break;
108
+ default:
109
+ Mage::throwException(
110
+ $this->__('Device doesn\'t recognized: "%s". Unable to load preview model.', $deviceType)
111
+ );
112
+ break;
113
+ }
114
+ }
115
+
116
+ return parent::_prepareLayout();
117
+ }
118
+
119
+ /**
120
+ * Get form header title
121
+ *
122
+ * @return string
123
+ */
124
+ public function getHeaderText()
125
+ {
126
+ if ((bool)!Mage::getSingleton('adminhtml/session')->getNewApplication()) {
127
+ $app = Mage::helper('xmlconnect')->getApplication();
128
+ }
129
+
130
+ if (isset($app) && $app->getId()) {
131
+ return $this->__('Edit App "%s"', $this->htmlEscape($app->getName()));
132
+ } else {
133
+ return $this->__('New App');
134
+ }
135
+ }
136
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Form.php ADDED
@@ -0,0 +1,55 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Application Form block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Form extends Mage_Adminhtml_Block_Widget_Form
35
+ {
36
+ /**
37
+ * Prepare form before rendering HTML
38
+ * Setting Form Fieldsets and fields
39
+ *
40
+ * @return Mage_Adminhtml_Block_Widget_Form
41
+ */
42
+ protected function _prepareForm()
43
+ {
44
+ $form = new Varien_Data_Form(array('id' => 'edit_form',
45
+ 'action' => Mage::getSingleton('adminhtml/session')->getNewApplication()
46
+ ? $this->getUrl('*/mobile/edit', array('_current' => true))
47
+ : $this->getUrl('*/mobile/save'),
48
+ 'method' => 'post',
49
+ 'enctype' => 'multipart/form-data'
50
+ ));
51
+ $form->setUseContainer(true);
52
+ $this->setForm($form);
53
+ return parent::_prepareForm();
54
+ }
55
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Submission.php ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Application Submission block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Submission
35
+ extends Mage_Adminhtml_Block_Widget_Tabs
36
+ {
37
+ /**
38
+ * Constructor
39
+ *
40
+ * Setting grid_id, DOM destination element id
41
+ *
42
+ */
43
+ public function __construct()
44
+ {
45
+ parent::__construct();
46
+ $this->setId('mobile_app_submit');
47
+ $this->setDestElementId('content');
48
+ }
49
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Cache.php ADDED
@@ -0,0 +1,106 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tab for Cache Management
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Cache
35
+ extends Mage_Adminhtml_Block_Widget_Form
36
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
37
+ {
38
+ /**
39
+ * Prepare form before rendering HTML
40
+ * Setting Form Fieldsets and fields
41
+ *
42
+ * @return Mage_Adminhtml_Block_Widget_Form
43
+ */
44
+ protected function _prepareForm()
45
+ {
46
+ $form = new Varien_Data_Form();
47
+ $this->setForm($form);
48
+
49
+ $data = Mage::helper('xmlconnect')->getApplication()->getFormData();
50
+
51
+ $fieldset = $form->addFieldset('cache_management', array('legend' => $this->__('Cache Management')));
52
+ if (isset($data['conf[native][cacheLifetime]'])) {
53
+ $lifetime = $data['conf[native][cacheLifetime]'];
54
+ } else {
55
+ $lifetime = Mage::helper('xmlconnect')->getDefaultCacheLifetime();
56
+ }
57
+ $fieldset->addField('conf/native/cacheLifetime', 'text', array(
58
+ 'label' => $this->__('Cache Lifetime (seconds)'),
59
+ 'name' => 'conf[native][cacheLifetime]',
60
+ 'value' => $lifetime,
61
+ 'note' => $this->__('If you want to disable the cache on the application side, leave the field empty. Warning! When disabling cache, the application will take time to load each page.'),
62
+ ));
63
+
64
+ return parent::_prepareForm();
65
+ }
66
+
67
+ /**
68
+ * Tab label getter
69
+ *
70
+ * @return string
71
+ */
72
+ public function getTabLabel()
73
+ {
74
+ return $this->__('Cache Management');
75
+ }
76
+
77
+ /**
78
+ * Tab title getter
79
+ *
80
+ * @return string
81
+ */
82
+ public function getTabTitle()
83
+ {
84
+ return $this->__('Cache Management');
85
+ }
86
+
87
+ /**
88
+ * Check if tab can be shown
89
+ *
90
+ * @return bool
91
+ */
92
+ public function canShowTab()
93
+ {
94
+ return (bool) !Mage::getSingleton('adminhtml/session')->getNewApplication();
95
+ }
96
+
97
+ /**
98
+ * Check if tab hidden
99
+ *
100
+ * @return bool
101
+ */
102
+ public function isHidden()
103
+ {
104
+ return false;
105
+ }
106
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Content.php ADDED
@@ -0,0 +1,146 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tab for Content Management
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Content
35
+ extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
36
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
37
+ {
38
+ protected $_pages;
39
+
40
+ /**
41
+ * Class constructor
42
+ * Setting view option
43
+ */
44
+ public function __construct()
45
+ {
46
+ parent::__construct();
47
+ $this->setShowGlobalIcon(true);
48
+ }
49
+
50
+ /**
51
+ * Add page input to fieldset
52
+ *
53
+ * @param Varien_Data_Form_Element_Fieldset $fieldset
54
+ * @param string $fieldPrefix
55
+ */
56
+ protected function _addPage($fieldset, $fieldPrefix)
57
+ {
58
+ $element = $fieldset->addField($fieldPrefix, 'page', array(
59
+ 'name' => $fieldPrefix,
60
+ ));
61
+ $element->initFields(array(
62
+ 'name' => $fieldPrefix,
63
+ 'values' => $this->_pages,
64
+ ));
65
+ }
66
+
67
+ /**
68
+ * Prepare form before rendering HTML
69
+ * Setting Form Fieldsets and fields
70
+ *
71
+ * @return Mage_Adminhtml_Block_Widget_Form
72
+ */
73
+ protected function _prepareForm()
74
+ {
75
+ $model = Mage::helper('xmlconnect')->getApplication();
76
+ $conf = $model->getConf();
77
+ $form = new Varien_Data_Form();
78
+ $this->setForm($form);
79
+
80
+ $pages = Mage::getResourceModel('xmlconnect/cms_page_collection')->toOptionIdArray();
81
+ $dummy = array(array( 'value' => '', 'label' => '' ));
82
+ $this->_pages = array_merge($dummy, $pages);
83
+
84
+ $fieldset = $form->addFieldset('cms_pages', array('legend' => $this->__('Pages')));
85
+ $this->_addElementTypes($fieldset);
86
+
87
+ $fieldset->addField('page_row_add', 'addrow', array(
88
+ 'onclick' => 'insertNewTableRow(this)',
89
+ 'options' => $this->_pages,
90
+ 'class' => ' scalable save ',
91
+ 'label' => $this->__('Label'),
92
+ 'before_element_html' => $this->__('Get Content from CMS Page').'</td><td class="label">',
93
+ ));
94
+
95
+ if (!empty($conf['native']['pages'])) {
96
+ foreach ($conf['native']['pages'] as $key=>$dummy) {
97
+ $this->_addPage($fieldset, 'conf[native][pages]['.$key.']');
98
+ }
99
+ }
100
+
101
+ $data = $model->getFormData();
102
+ $data['page_row_add'] = $this->__('Add Page');
103
+ $form->setValues($data);
104
+ return parent::_prepareForm();
105
+ }
106
+
107
+ /**
108
+ * Prepare label for tab
109
+ *
110
+ * @return string
111
+ */
112
+ public function getTabLabel()
113
+ {
114
+ return $this->__('Content');
115
+ }
116
+
117
+ /**
118
+ * Prepare title for tab
119
+ *
120
+ * @return string
121
+ */
122
+ public function getTabTitle()
123
+ {
124
+ return $this->__('Content');
125
+ }
126
+
127
+ /**
128
+ * Returns status flag about this tab can be shown or not
129
+ *
130
+ * @return true
131
+ */
132
+ public function canShowTab()
133
+ {
134
+ return (bool) !Mage::getSingleton('adminhtml/session')->getNewApplication();
135
+ }
136
+
137
+ /**
138
+ * Returns status flag about this tab hidden or not
139
+ *
140
+ * @return false
141
+ */
142
+ public function isHidden()
143
+ {
144
+ return false;
145
+ }
146
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design.php ADDED
@@ -0,0 +1,98 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tab for Design Management
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design
35
+ extends Mage_Adminhtml_Block_Template
36
+ implements Mage_Adminhtml_Block_Widget_Tab_Interface
37
+ {
38
+ /**
39
+ * Set design tab template
40
+ * Set to show global icon
41
+ */
42
+ public function __construct()
43
+ {
44
+ parent::__construct();
45
+ $this->setShowGlobalIcon(true);
46
+ $this->setTemplate('xmlconnect/edit/tab/design.phtml');
47
+ }
48
+
49
+ /**
50
+ * Tab label getter
51
+ *
52
+ * @return string
53
+ */
54
+ public function getTabLabel()
55
+ {
56
+ return $this->__('Design');
57
+ }
58
+
59
+ /**
60
+ * Tab title getter
61
+ *
62
+ * @return string
63
+ */
64
+ public function getTabTitle()
65
+ {
66
+ return $this->__('Design');
67
+ }
68
+
69
+ /**
70
+ * Check if tab can be shown
71
+ *
72
+ * @return bool
73
+ */
74
+ public function canShowTab()
75
+ {
76
+ return (bool) !Mage::getSingleton('adminhtml/session')->getNewApplication();
77
+ }
78
+
79
+ /**
80
+ * Check if tab hidden
81
+ *
82
+ * @return bool
83
+ */
84
+ public function isHidden()
85
+ {
86
+ return false;
87
+ }
88
+
89
+ /**
90
+ * Check if we have to show Preview Block
91
+ *
92
+ * @return bool
93
+ */
94
+ public function canShowPreview()
95
+ {
96
+ return true;
97
+ }
98
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion.php ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tab design accordion xml renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Xmlconnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion
35
+ extends Mage_Adminhtml_Block_Widget_Accordion
36
+ {
37
+ /**
38
+ * Add accordion item by specified block
39
+ *
40
+ * @param string $itemId
41
+ * @param mixed $block
42
+ */
43
+ public function addAccordionItem($itemId, $block)
44
+ {
45
+ if (strpos($block, '/') !== false) {
46
+ $block = $this->getLayout()->createBlock($block);
47
+ } else {
48
+ $block = $this->getLayout()->getBlock($block);
49
+ }
50
+
51
+ $this->addItem($itemId, array(
52
+ 'title' => $block->getTitle(),
53
+ 'content' => $block->toHtml(),
54
+ 'open' => $block->getIsOpen(),
55
+ ));
56
+ }
57
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Images.php ADDED
@@ -0,0 +1,157 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Tab design Accordion Images xml renderer
29
+ *
30
+ * @category Mage
31
+ * @package Mage_Xmlconnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Images
35
+ extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
36
+ {
37
+ /**
38
+ * Getter for accordion item title
39
+ *
40
+ * @return string
41
+ */
42
+ public function getTitle()
43
+ {
44
+ return $this->__('Images');
45
+ }
46
+
47
+ /**
48
+ * Getter for accordion item is open flag
49
+ *
50
+ * @return bool
51
+ */
52
+ public function getIsOpen()
53
+ {
54
+ return true;
55
+ }
56
+
57
+ /**
58
+ * Prepare form
59
+ *
60
+ * @throws Mage_Core_Exception
61
+ * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
62
+ */
63
+ protected function _prepareForm()
64
+ {
65
+ $form = new Varien_Data_Form();
66
+
67
+ $fieldset = $form->addFieldset('field_logo', array());
68
+ $this->_addElementTypes($fieldset);
69
+ $this->addImage($fieldset,
70
+ 'conf[native][navigationBar][icon]',
71
+ $this->__('Logo in Header'),
72
+ $this->__('Recommended size 35px x 35px.'),
73
+ $this->_getDesignPreviewImageUrl('conf/native/navigationBar/icon'),
74
+ true
75
+ );
76
+
77
+ $deviceType = Mage::helper('xmlconnect')->getDeviceType();
78
+ switch ($deviceType) {
79
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPHONE:
80
+ $this->addImage($fieldset,
81
+ 'conf[native][body][bannerImage]',
82
+ $this->__('Banner on Home Screen'),
83
+ $this->__('Recommended size 320px x 230px. Note: Image size affects the performance of your app. Keep your image size below 50 KB for optimal performance.'),
84
+ $this->_getDesignPreviewImageUrl('conf/native/body/bannerImage'),
85
+ true
86
+ );
87
+ $this->addImage($fieldset,
88
+ 'conf[native][body][backgroundImage]',
89
+ $this->__('App Background'),
90
+ $this->__('Recommended size 320px x 367px. Note: Image size affects the performance of your app. Keep your image size below 75 KB for optimal performance.'),
91
+ $this->_getDesignPreviewImageUrl('conf/native/body/backgroundImage'),
92
+ true
93
+ );
94
+ break;
95
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPAD:
96
+ $this->addImage($fieldset,
97
+ 'conf[native][body][bannerIpadLandscapeImage]',
98
+ $this->__('Banner on Home Screen <br />(landscape mode)'),
99
+ $this->__('Recommended size 1024px x 344px. Note: Image size affects the performance of your app.'),
100
+ $this->_getDesignPreviewImageUrl('conf/native/body/bannerIpadLandscapeImage'),
101
+ true
102
+ );
103
+ $this->addImage($fieldset,
104
+ 'conf[native][body][bannerIpadImage]',
105
+ $this->__('Banner on Home Screen <br />(portrait mode)'),
106
+ $this->__('Recommended size 768px x 294px. Note: Image size affects the performance of your app.'),
107
+ $this->_getDesignPreviewImageUrl('conf/native/body/bannerIpadImage'),
108
+ true
109
+ );
110
+ $this->addImage($fieldset,
111
+ 'conf[native][body][backgroundIpadLandscapeImage]',
112
+ $this->__('App Background <br />(landscape mode)'),
113
+ $this->__('Recommended size 1024px x 704px. Note: Image size affects the performance of your app.'),
114
+ $this->_getDesignPreviewImageUrl('conf/native/body/backgroundIpadLandscapeImage'),
115
+ true
116
+ );
117
+ $this->addImage($fieldset,
118
+ 'conf[native][body][backgroundIpadPortraitImage]',
119
+ $this->__('App Background <br />(portrait mode)'),
120
+ $this->__('Recommended size 768px x 960px. Note: Image size affects the performance of your app.'),
121
+ $this->_getDesignPreviewImageUrl('conf/native/body/backgroundIpadPortraitImage'),
122
+ true
123
+ );
124
+ break;
125
+ case Mage_XmlConnect_Helper_Data::DEVICE_TYPE_ANDROID:
126
+ $this->addImage($fieldset,
127
+ 'conf[native][body][bannerAndroidImage]',
128
+ $this->__('Banner on Home Screen'),
129
+ $this->__('Recommended size 320px x 258px. Note: Image size affects the performance of your app. Keep your image size below 50 KB for optimal performance.'),
130
+ $this->_getDesignPreviewImageUrl('conf/native/body/bannerAndroidImage'),
131
+ true
132
+ );
133
+ break;
134
+ default:
135
+ Mage::throwException(
136
+ $this->__('Device doesn\'t recognized: "%s". Unable to load a helper.', $deviceType)
137
+ );
138
+ break;
139
+ }
140
+
141
+ $form->setValues(Mage::helper('xmlconnect')->getApplication()->getFormData());
142
+ $this->setForm($form);
143
+ return parent::_prepareForm();
144
+ }
145
+
146
+ /**
147
+ * Retrieve url for images in the skin folder
148
+ *
149
+ * @param string $name - path to file name relative to the skin dir
150
+ * @return string
151
+ */
152
+ protected function _getDesignPreviewImageUrl($name)
153
+ {
154
+ $name = Mage::helper('xmlconnect/image')->getInterfaceImagesPaths($name);
155
+ return Mage::helper('xmlconnect/image')->getDefaultDesignUrl($name);
156
+ }
157
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Tabs.php ADDED
@@ -0,0 +1,79 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Device tabs accordion block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Tabs
35
+ extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
36
+ {
37
+ /**
38
+ * Getter for accordion item title
39
+ *
40
+ * @return string
41
+ */
42
+ public function getTitle()
43
+ {
44
+ if (Mage::helper('xmlconnect')->getDeviceType() == Mage_XmlConnect_Helper_Data::DEVICE_TYPE_IPAD) {
45
+ $title = $this->__('Extensions');
46
+ } else {
47
+ $title = $this->__('Tabs');
48
+ }
49
+ return $title;
50
+ }
51
+
52
+ /**
53
+ * Getter for accordion item is open flag
54
+ *
55
+ * @return bool
56
+ */
57
+ public function getIsOpen()
58
+ {
59
+ return true;
60
+ }
61
+
62
+ /**
63
+ * Prepare form
64
+ *
65
+ * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
66
+ */
67
+ protected function _prepareForm()
68
+ {
69
+ $form = new Varien_Data_Form();
70
+
71
+ $fieldset = $form->addFieldset('field_tabs', array());
72
+ $this->_addElementTypes($fieldset);
73
+ $fieldset->addField('conf[extra][tabs]', 'tabs', array('name' => 'conf[extra][tabs]'));
74
+
75
+ $form->setValues(Mage::helper('xmlconnect')->getApplication()->getFormData());
76
+ $this->setForm($form);
77
+ return parent::_prepareForm();
78
+ }
79
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Accordion/Themes.php ADDED
@@ -0,0 +1,77 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Magento
4
+ *
5
+ * NOTICE OF LICENSE
6
+ *
7
+ * This source file is subject to the Open Software License (OSL 3.0)
8
+ * that is bundled with this package in the file LICENSE.txt.
9
+ * It is also available through the world-wide-web at this URL:
10
+ * http://opensource.org/licenses/osl-3.0.php
11
+ * If you did not receive a copy of the license and are unable to
12
+ * obtain it through the world-wide-web, please send an email
13
+ * to license@magentocommerce.com so we can send you a copy immediately.
14
+ *
15
+ * DISCLAIMER
16
+ *
17
+ * Do not edit or add to this file if you wish to upgrade Magento to newer
18
+ * versions in the future. If you wish to customize Magento for your
19
+ * needs please refer to http://www.magentocommerce.com for more information.
20
+ *
21
+ * @category Mage
22
+ * @package Mage_XmlConnect
23
+ * @copyright Copyright (c) 2010 Magento Inc. (http://www.magentocommerce.com)
24
+ * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0)
25
+ */
26
+
27
+ /**
28
+ * Device design themes accordion block
29
+ *
30
+ * @category Mage
31
+ * @package Mage_XmlConnect
32
+ * @author Magento Core Team <core@magentocommerce.com>
33
+ */
34
+ class Mage_XmlConnect_Block_Adminhtml_Mobile_Edit_Tab_Design_Accordion_Themes
35
+ extends Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
36
+ {
37
+ /**
38
+ * Getter for accordion item title
39
+ *
40
+ * @return string
41
+ */
42
+ public function getTitle()
43
+ {
44
+ return $this->__('Color Themes');
45
+ }
46
+
47
+ /**
48
+ * Getter for accordion item is open flag
49
+ *
50
+ * @return bool
51
+ */
52
+ public function getIsOpen()
53
+ {
54
+ return true;
55
+ }
56
+
57
+ /**
58
+ * Add theme field
59
+ *
60
+ * @return Mage_XmlConnect_Block_Adminhtml_Mobile_Widget_Form
61
+ */
62
+ protected function _prepareForm()
63
+ {
64
+ $form = new Varien_Data_Form();
65
+
66
+ $fieldset = $form->addFieldset('field_colors', array());
67
+ $this->_addElementTypes($fieldset);
68
+ $fieldset->addField('theme', 'theme', array(
69
+ 'name' => 'theme',
70
+ 'themes' => Mage::helper('xmlconnect/theme')->getAllThemes(),
71
+ ));
72
+ $form->setValues(Mage::helper('xmlconnect')->getApplication()->getFormData());
73
+ $this->setForm($form);
74
+
75
+ return parent::_prepareForm();
76
+ }
77
+ }
app/code/core/Mage/XmlConnect/Block/Adminhtml/Mobile/Edit/Tab/Design/Preview.php ADDED
@@ -0,0 +1,75 @@