Guest User

Untitled

a guest
Jul 6th, 2018
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.85 KB | None | 0 0
  1. <?xml version='1.0' encoding='utf-8'?>
  2. <widget id="*bundle id*" version="1.0.0" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
  3. <name>*appname*</name>
  4. <description>
  5. Hello World sample application that responds to the deviceready event.
  6. </description>
  7. <author email="support@phonegap.com" href="http://phonegap.com">
  8. PhoneGap Team
  9. </author>
  10. <content src="index.html" />
  11. <preference name="DisallowOverscroll" value="true" />
  12. <preference name="android-minSdkVersion" value="14" />
  13. <platform name="android">
  14. <icon density="ldpi" src="www/res/icon/android/drawable-ldpi-icon.png" />
  15. <icon density="mdpi" src="www/res/icon/android/drawable-mdpi-icon.png" />
  16. <icon density="hdpi" src="www/res/icon/android/drawable-hdpi-icon.png" />
  17. <icon density="xhdpi" src="www/res/icon/android/drawable-xhdpi-icon.png" />
  18. <icon density="xxhdpi" src="www/res/icon/android/drawable-xxhdpi-icon.png" />
  19. <icon density="xxxhdpi" src="www/res/icon/android/drawable-xxxhdpi-icon.png" />
  20. <splash density="land-ldpi" src="www/res/screen/android/drawable-land-ldpi-screen.png" />
  21. <splash density="land-mdpi" src="www/res/screen/android/drawable-land-mdpi-screen.png" />
  22. <splash density="land-hdpi" src="www/res/screen/android/drawable-land-hdpi-screen.png" />
  23. <splash density="land-xhdpi" src="www/res/screen/android/drawable-land-xhdpi-screen.png" />
  24. <splash density="land-xxhdpi" src="www/res/screen/android/drawable-land-xxhdpi-screen.png" />
  25. <splash density="land-xxxhdpi" src="www/res/screen/android/drawable-land-xxxhdpi-screen.png" />
  26. <splash density="port-ldpi" src="www/res/screen/android/drawable-port-ldpi-screen.png" />
  27. <splash density="port-mdpi" src="www/res/screen/android/drawable-port-mdpi-screen.png" />
  28. <splash density="port-hdpi" src="www/res/screen/android/drawable-port-hdpi-screen.png" />
  29. <splash density="port-xhdpi" src="www/res/screen/android/drawable-port-xhdpi-screen.png" />
  30. <splash density="port-xxhdpi" src="www/res/screen/android/drawable-port-xxhdpi-screen.png" />
  31. <splash density="port-xxxhdpi" src="www/res/screen/android/drawable-port-xxxhdpi-screen.png" />
  32. </platform>
  33. <platform name="ios">
  34. <splash height="480" src="www/res/screen/ios/Default~iphone.png" width="320" />
  35. <splash height="960" src="www/res/screen/ios/Default@2x~iphone.png" width="640" />
  36. <splash height="1024" src="www/res/screen/ios/Default-Portrait~ipad.png" width="768" />
  37. <splash height="2048" src="www/res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" />
  38. <splash height="768" src="www/res/screen/ios/Default-Landscape~ipad.png" width="1024" />
  39. <splash height="1536" src="www/res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" />
  40. <splash height="1136" src="www/res/screen/ios/Default-568h@2x~iphone.png" width="640" />
  41. <splash height="1334" src="www/res/screen/ios/Default-667h.png" width="750" />
  42. <splash height="2208" src="www/res/screen/ios/Default-736h.png" width="1242" />
  43. <splash height="1242" src="www/res/screen/ios/Default-Landscape-736h.png" width="2208" />
  44. <icon height="57" platform="ios" src="www/res/icon/ios/icon.png" width="57" />
  45. <icon height="114" platform="ios" src="www/res/icon/ios/icon@2x.png" width="114" />
  46. <icon height="40" platform="ios" src="www/res/icon/ios/icon-40.png" width="40" />
  47. <icon height="80" platform="ios" src="www/res/icon/ios/icon-40@2x.png" width="80" />
  48. <icon height="50" platform="ios" src="www/res/icon/ios/icon-50.png" width="50" />
  49. <icon height="100" platform="ios" src="www/res/icon/ios/icon-50@2x.png" width="100" />
  50. <icon height="60" platform="ios" src="www/res/icon/ios/icon-60.png" width="60" />
  51. <icon height="120" platform="ios" src="www/res/icon/ios/icon-60@2x.png" width="120" />
  52. <icon height="180" platform="ios" src="www/res/icon/ios/icon-60@3x.png" width="180" />
  53. <icon height="72" platform="ios" src="www/res/icon/ios/icon-72.png" width="72" />
  54. <icon height="144" platform="ios" src="www/res/icon/ios/icon-72@2x.png" width="144" />
  55. <icon height="76" platform="ios" src="www/res/icon/ios/icon-76.png" width="76" />
  56. <icon height="152" platform="ios" src="www/res/icon/ios/icon-76@2x.png" width="152" />
  57. <icon height="29" platform="ios" src="www/res/icon/ios/icon-small.png" width="29" />
  58. <icon height="58" platform="ios" src="www/res/icon/ios/icon-small@2x.png" width="58" />
  59. <icon height="87" platform="ios" src="www/res/icon/ios/icon-small@3x.png" width="87" />
  60. <splash height="1136" platform="ios" src="www/res/screen/ios/Default-568h@2x~iphone.png" width="640" />
  61. <splash height="1334" platform="ios" src="www/res/screen/ios/Default-667h.png" width="750" />
  62. <splash height="2208" platform="ios" src="www/res/screen/ios/Default-736h.png" width="1242" />
  63. <splash height="1242" platform="ios" src="www/res/screen/ios/Default-Landscape-736h.png" width="2208" />
  64. <splash height="1536" platform="ios" src="www/res/screen/ios/Default-Landscape@2x~ipad.png" width="2048" />
  65. <splash height="768" platform="ios" src="www/res/screen/ios/Default-Landscape~ipad.png" width="1024" />
  66. <splash height="2048" platform="ios" src="www/res/screen/ios/Default-Portrait@2x~ipad.png" width="1536" />
  67. <splash height="1024" platform="ios" src="www/res/screen/ios/Default-Portrait~ipad.png" width="768" />
  68. <splash height="960" platform="ios" src="www/res/screen/ios/Default@2x~iphone.png" width="640" />
  69. <splash height="480" platform="ios" src="www/res/screen/ios/Default~iphone.png" width="320" />
  70. </platform>
  71. <platform name="wp8">
  72. <icon height="99" platform="wp8" src="www/res/icon/wp8/ApplicationIcon.png" width="99" />
  73. <icon height="159" platform="wp8" src="www/res/icon/wp8/Background.png" width="159" />
  74. <splash height="1280" platform="wp8" src="www/res/screen/wp8/screen-portrait.jpg" width="768" />
  75. </platform>
  76. <platform name="windows">
  77. <splash src="res/screen/windows/splashscreen.png" target="SplashScreen" />
  78. <splash src="res/screen/windows/splashscreenphone.png" target="SplashScreenPhone" />
  79. <icon height="150" platform="windows" src="www/res/icon/windows/Square150x150Logo.scale-100.png" width="150" />
  80. <icon height="30" platform="windows" src="www/res/icon/windows/Square30x30Logo.scale-100.png" width="30" />
  81. <icon height="50" platform="windows" src="www/res/icon/windows/StoreLogo.scale-100.png" width="50" />
  82. <splash height="300" platform="windows" src="www/res/screen/windows/SplashScreen.scale-100.png" width="620" />
  83. <icon height="120" platform="windows" src="www/res/icon/windows/StoreLogo.scale-240.png" width="120" />
  84. <icon height="44" platform="windows" src="www/res/icon/windows/Square44x44Logo.scale-100.png" width="44" />
  85. <icon height="106" platform="windows" src="www/res/icon/windows/Square44x44Logo.scale-240.png" width="106" />
  86. <icon height="70" platform="windows" src="www/res/icon/windows/Square70x70Logo.scale-100.png" width="70" />
  87. <icon height="71" platform="windows" src="www/res/icon/windows/Square71x71Logo.scale-100.png" width="71" />
  88. <icon height="170" platform="windows" src="www/res/icon/windows/Square71x71Logo.scale-240.png" width="170" />
  89. <icon height="360" platform="windows" src="www/res/icon/windows/Square150x150Logo.scale-240.png" width="360" />
  90. <icon height="310" platform="windows" src="www/res/icon/windows/Square310x310Logo.scale-100.png" width="310" />
  91. <icon height="150" platform="windows" src="www/res/icon/windows/Wide310x150Logo.scale-100.png" width="310" />
  92. <icon height="360" platform="windows" src="www/res/icon/windows/Wide310x150Logo.scale-240.png" width="744" />
  93. <splash height="1920" platform="windows" src="www/res/screen/windows/SplashScreenPhone.scale-240.png" width="1152" />
  94. </platform>
  95. <access origin="*" />
  96. <allow-intent href="http://*/*" />
  97. <allow-intent href="https://*/*" />
  98. <allow-intent href="tel:*" />
  99. <allow-intent href="sms:*" />
  100. <allow-intent href="mailto:*" />
  101. <allow-intent href="geo:*" />
  102. <preference name="SplashScreenDelay" value="10000" />
  103. <platform name="android">
  104. <allow-intent href="market:*" />
  105. </platform>
  106. <platform name="ios">
  107. <preference name="SplashScreenDelay" value="10000" />
  108. <allow-intent href="itms:*" />
  109. <allow-intent href="itms-apps:*" />
  110. </platform>
  111. <plugin name="cordova-plugin-battery-status" spec="~1.2.4" />
  112. <plugin name="cordova-plugin-camera" spec="~2.4.1" />
  113. <plugin name="cordova-plugin-media-capture" spec="~1.4.3" />
  114. <plugin name="cordova-plugin-device" spec="~1.1.6" />
  115. <plugin name="cordova-plugin-dialogs" spec="~1.3.3" />
  116. <plugin name="cordova-plugin-file" spec="~4.3.3" />
  117. <plugin name="cordova-plugin-geolocation" spec="~2.4.3" />
  118. <plugin name="cordova-plugin-globalization" spec="~1.0.7" />
  119. <plugin name="cordova-plugin-inappbrowser" spec="~1.7.1" />
  120. <plugin name="cordova-plugin-network-information" spec="~1.3.3" />
  121. <plugin name="cordova-plugin-vibration" spec="~2.1.5" />
  122. <plugin name="cordova-plugin-splashscreen" spec="https://github.com/apache/cordova-plugin-splashscreen.git" />
  123. <gap:plugin name="cc.fovea.cordova.purchase" source="npm" />
  124. <engine name="ios" spec="^4.5.4" />
  125. </widget>
  126.  
  127. document.addEventListener('deviceready', initializeStore, false);
  128.  
  129. function initializeStore() {
  130.  
  131. // Let's set a pretty high verbosity level, so that we see a lot of stuff
  132. // in the console (reassuring us that something is happening).
  133. store.verbosity = store.INFO;
  134.  
  135. // We register a dummy product. It's ok, it shouldn't
  136. // prevent the store "ready" event from firing.
  137. store.register({
  138. id: "*myproductid*",
  139. alias: "100 coins",
  140. type: store.CONSUMABLE
  141. });
  142.  
  143. // When every goes as expected, it's time to celebrate!
  144. // The "ready" event should be welcomed with music and fireworks,
  145. // go ask your boss about it! (just in case)
  146. store.ready(function () {
  147. console.log("\o/ STORE READY \o/");
  148. });
  149.  
  150. // After we've done our setup, we tell the store to do
  151. // it's first refresh. Nothing will happen if we do not call store.refresh()
  152. store.refresh();
  153. }
  154.  
  155. var $$ = Dom7;
  156.  
  157. function somethingelse() {
  158. console.log('another test');
  159. }
  160.  
  161. // Theme
  162. var theme = 'auto';
  163. if (document.location.search.indexOf('theme=') >= 0) {
  164. theme = document.location.search.split('theme=')[1].split('&')[0];
  165. }
  166.  
  167. var app = new Framework7({
  168. id: '*mybundleid*',
  169. root: '#app',
  170. theme: theme,
  171. photoBrowser: {
  172. type: 'standalone',
  173. theme: 'light',
  174. navbar: true,
  175. swiper: {
  176. initialSlide: 0,
  177. spaceBetween: 20,
  178. speed: 300,
  179. loop: false,
  180. preloadImages: true,
  181. navigation: {
  182. nextEl: '.photo-browser-next',
  183. prevEl: '.photo-browser-prev',
  184. },
  185. zoom: {
  186. enabled: true,
  187. maxRatio: 3,
  188. minRatio: 1,
  189. },
  190. lazy: {
  191. enabled: true,
  192. },
  193. },
  194. },
  195. data: function () {
  196. return {
  197. user: {
  198. firstName: 'John',
  199. lastName: 'Doe',
  200. },
  201. };
  202. },
  203. methods: {
  204. helloWorld: function () {
  205. app.dialog.alert('Hello World!');
  206. }
  207. },
  208. routes: routes,
  209. vi: {
  210. placementId: 'pltd4o7ibb9rc653x14',
  211. },
  212. });
  213.  
  214. var toastBottomError = app.toast.create({
  215. text: 'There was an error-please check your connection and try again',
  216. closeTimeout: 2000,
  217. cssClass: 'toastError'
  218. });
  219.  
  220. var toastBottomSuccess = app.toast.create({
  221. text: 'Success!',
  222. closeTimeout: 2000,
  223. cssClass: 'toastSuccess'
  224. });
  225.  
  226. var items = [];
  227. for (var i = 1; i <= 10000; i++) {
  228. items.push({
  229. title: 'Item ' + i,
  230. subtitle: 'Subtitle ' + i
  231. });
  232. }
  233.  
  234. var dynamicPopup = app.popup.create({
  235. content: `<div class="popup">
  236. <div class="navbar">
  237. <div class="navbar-inner sliding">
  238. <div class="left">
  239. <a href="#" class="link popup-close">
  240. <i class="icon icon-back"></i>
  241. <span class="ios-only">Back</span>
  242. </a><!--link back-->
  243. </div><!--left-->
  244. <div class="title">Preview</div>
  245. </div><!--navbar-inner sliding-->
  246. </div><!--navbar-->
  247. <div class="block">
  248. <p>Popup created dynamically.</p>
  249. <p><a href="#" class="link popup-close">Close me</a></p>
  250. <img id='preview-image' src=''/>
  251. </div>
  252. </div>`,
  253. on: {
  254. open: function(popup){
  255. console.log('Popup open');
  256. console.log(popup);
  257. },
  258. opened: function(popup) {
  259. console.log('Popup opened');
  260. console.log(popup);
  261. },
  262. }
  263. });
  264.  
  265. var sheet = app.sheet.create({
  266. content: `
  267. <div id='forced-sign-up-sheet-modal' class="sheet-modal">
  268. <!-- Sheet Modal Toolbar, optional -->
  269. <div class="toolbar">
  270. <div class="toolbar-inner">
  271. <div class="left"></div>
  272. <div class="right">
  273. <a href="#" class="link sheet-close">Done</a>
  274. </div>
  275. </div>
  276. </div>
  277. <!-- Sheet Modal Inner -->
  278. <div class="sheet-modal-inner">
  279. <!-- Sheet Modal content -->
  280. <div class="block">
  281. <p>Integer mollis nulla id nibh elementum finibus...</p>
  282. <button id='clickMe' class='button button-fill color-red'>Click me</button>
  283. </div>
  284. </div>
  285. </div>`,
  286. on: {
  287. open:function(){
  288. console.log('open running...');
  289.  
  290. },
  291. opened: function(){
  292. console.log(app);
  293. console.log('sup cuh');
  294. app.dialog.confirm('text','title');
  295. }
  296. }
  297. });
Add Comment
Please, Sign In to add comment