Permalink
Browse files

Merge aerogear/as-quickstar '1.0.0.M6' from kborchers/master

  • Loading branch information...
2 parents 70df6f9 + 4679111 commit 7e263fae4d603eafbeffbf92e86ff0dcb8bd4cb1 @rafabene rafabene committed Sep 24, 2012
Showing with 19,056 additions and 59 deletions.
  1. +1 −1 helloworld-html5/README.md
  2. +19 −0 helloworld-html5/src/main/webapp/css/styles.css
  3. +28 −20 helloworld-html5/src/main/webapp/index.html
  4. +3 −0 kitchensink-cordova/.gitignore
  5. +24 −0 kitchensink-cordova/README.md
  6. BIN kitchensink-cordova/android/.cordova/android/cordova-1.6.1.jar
  7. +4,987 −0 kitchensink-cordova/android/.cordova/android/cordova-1.6.1.js
  8. +37 −0 kitchensink-cordova/android/.cordova/android/cordova.xml
  9. +37 −0 kitchensink-cordova/android/.cordova/android/plugins.xml
  10. +1 −0 kitchensink-cordova/android/.cordova/android/readme.md
  11. +52 −0 kitchensink-cordova/android/AndroidManifest.xml
  12. +71 −0 kitchensink-cordova/android/README.md
  13. +1 −0 kitchensink-cordova/android/assets/www
  14. +83 −0 kitchensink-cordova/android/build.xml
  15. BIN kitchensink-cordova/android/libs/cordova-2.0.0.jar
  16. +20 −0 kitchensink-cordova/android/proguard-project.txt
  17. +14 −0 kitchensink-cordova/android/project.properties
  18. BIN kitchensink-cordova/android/res/drawable-hdpi/ic_launcher.png
  19. BIN kitchensink-cordova/android/res/drawable-ldpi/ic_launcher.png
  20. BIN kitchensink-cordova/android/res/drawable-mdpi/ic_launcher.png
  21. BIN kitchensink-cordova/android/res/drawable/icon.png
  22. +13 −0 kitchensink-cordova/android/res/layout/main.xml
  23. +4 −0 kitchensink-cordova/android/res/values/strings.xml
  24. +42 −0 kitchensink-cordova/android/res/xml/cordova.xml
  25. +37 −0 kitchensink-cordova/android/res/xml/plugins.xml
  26. +25 −0 kitchensink-cordova/android/src/org/jboss/as/quickstarts/kitchensinkcordova/KitchensinkCordova.java
  27. BIN kitchensink-cordova/ios/KitchensinkCordova.xcodeproj/TemplateIcon.icns
  28. +28 −0 kitchensink-cordova/ios/KitchensinkCordova.xcodeproj/TemplateInfo.plist
  29. +622 −0 kitchensink-cordova/ios/KitchensinkCordova.xcodeproj/project.pbxproj
  30. +7 −0 kitchensink-cordova/ios/KitchensinkCordova.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  31. +45 −0 kitchensink-cordova/ios/KitchensinkCordova/Classes/AppDelegate.h
  32. +142 −0 kitchensink-cordova/ios/KitchensinkCordova/Classes/AppDelegate.m
  33. +32 −0 kitchensink-cordova/ios/KitchensinkCordova/Classes/MainViewController.h
  34. +141 −0 kitchensink-cordova/ios/KitchensinkCordova/Classes/MainViewController.m
  35. +138 −0 kitchensink-cordova/ios/KitchensinkCordova/Classes/MainViewController.xib
  36. +65 −0 kitchensink-cordova/ios/KitchensinkCordova/Cordova.plist
  37. +26 −0 kitchensink-cordova/ios/KitchensinkCordova/CordovaBuildSettings.xcconfig
  38. +78 −0 kitchensink-cordova/ios/KitchensinkCordova/KitchensinkCordova-Info.plist
  39. +26 −0 kitchensink-cordova/ios/KitchensinkCordova/KitchensinkCordova-Prefix.pch
  40. +20 −0 kitchensink-cordova/ios/KitchensinkCordova/Plugins/README
  41. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/controls_bg.png
  42. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/controls_bg@2x.png
  43. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/controls_bg@2x~ipad.png
  44. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/controls_bg~ipad.png
  45. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/microphone.png
  46. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/microphone@2x.png
  47. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/microphone@2x~ipad.png
  48. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/microphone~ipad.png
  49. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/record_button.png
  50. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/record_button@2x.png
  51. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/record_button@2x~ipad.png
  52. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/record_button~ipad.png
  53. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/recording_bg.png
  54. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/recording_bg@2x.png
  55. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/recording_bg@2x~ipad.png
  56. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/recording_bg~ipad.png
  57. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/stop_button.png
  58. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/stop_button@2x.png
  59. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/stop_button@2x~ipad.png
  60. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/Capture.bundle/stop_button~ipad.png
  61. +26 −0 kitchensink-cordova/ios/KitchensinkCordova/Resources/de.lproj/Localizable.strings
  62. +25 −0 kitchensink-cordova/ios/KitchensinkCordova/Resources/en.lproj/Localizable.strings
  63. +25 −0 kitchensink-cordova/ios/KitchensinkCordova/Resources/es.lproj/Localizable.strings
  64. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/icons/ios-114.png
  65. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/icons/ios-144.png
  66. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/icons/ios-57.png
  67. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/icons/ios-72.png
  68. +26 −0 kitchensink-cordova/ios/KitchensinkCordova/Resources/se.lproj/Localizable.strings
  69. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/splash/Default-Landscape~ipad.png
  70. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/splash/Default-Portrait@2x~ipad.png
  71. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/splash/Default-Portrait~ipad.png
  72. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/splash/Default.png
  73. BIN kitchensink-cordova/ios/KitchensinkCordova/Resources/splash/Default@2x.png
  74. +35 −0 kitchensink-cordova/ios/KitchensinkCordova/main.m
  75. +47 −0 kitchensink-cordova/ios/README.md
  76. +47 −0 kitchensink-cordova/ios/cordova/debug
  77. +58 −0 kitchensink-cordova/ios/cordova/emulate
  78. +26 −0 kitchensink-cordova/ios/cordova/log
  79. +1 −0 kitchensink-cordova/ios/www
  80. BIN kitchensink-cordova/shared/www/css/images/ajax-loader.gif
  81. BIN kitchensink-cordova/shared/www/css/images/ajax-loader.png
  82. BIN kitchensink-cordova/shared/www/css/images/icons-18-black.png
  83. BIN kitchensink-cordova/shared/www/css/images/icons-18-white.png
  84. BIN kitchensink-cordova/shared/www/css/images/icons-36-black.png
  85. BIN kitchensink-cordova/shared/www/css/images/icons-36-white.png
  86. +2 −0 kitchensink-cordova/shared/www/css/jquery.mobile-1.1.0.min.css
  87. +185 −0 kitchensink-cordova/shared/www/css/m.screen.css
  88. +81 −0 kitchensink-cordova/shared/www/css/screen.css
  89. BIN kitchensink-cordova/shared/www/img/aerogear_avatar_48px.png
  90. BIN kitchensink-cordova/shared/www/img/aerogear_icon_16x.png
  91. BIN kitchensink-cordova/shared/www/img/aerogear_icon_64px.png
  92. BIN kitchensink-cordova/shared/www/img/aerogear_logo_150px.png
  93. BIN kitchensink-cordova/shared/www/img/asidebkg.png
  94. BIN kitchensink-cordova/shared/www/img/banner.png
  95. BIN kitchensink-cordova/shared/www/img/bkg-blkheader.png
  96. BIN kitchensink-cordova/shared/www/img/dualbrand_as7eap.png
  97. BIN kitchensink-cordova/shared/www/img/dualbrand_catapillarbutterfly.png
  98. BIN kitchensink-cordova/shared/www/img/dualbrand_logo.png
  99. BIN kitchensink-cordova/shared/www/img/headerbkg.png
  100. BIN kitchensink-cordova/shared/www/img/icon_large.png
  101. BIN kitchensink-cordova/shared/www/img/icon_medium.png
  102. BIN kitchensink-cordova/shared/www/img/icon_small.png
  103. BIN kitchensink-cordova/shared/www/img/logo.png
  104. +288 −0 kitchensink-cordova/shared/www/index.html
  105. +95 −0 kitchensink-cordova/shared/www/js/app.js
  106. +5,724 −0 kitchensink-cordova/shared/www/js/libs/cordova-android-2.0.0.js
  107. +5,240 −0 kitchensink-cordova/shared/www/js/libs/cordova-ios-2.0.0.js
  108. +4 −0 kitchensink-cordova/shared/www/js/libs/jquery-1.7.1.min.js
  109. +177 −0 kitchensink-cordova/shared/www/js/libs/jquery.mobile-1.1.0.min.js
  110. +30 −0 kitchensink-cordova/shared/www/js/libs/underscore-min.js
  111. BIN kitchensink-cordova/shared/www/res/icon/aerogear-114.png
  112. BIN kitchensink-cordova/shared/www/res/icon/aerogear-144.png
  113. BIN kitchensink-cordova/shared/www/res/icon/aerogear-29.png
  114. BIN kitchensink-cordova/shared/www/res/icon/aerogear-50.png
  115. BIN kitchensink-cordova/shared/www/res/icon/aerogear-57.png
  116. BIN kitchensink-cordova/shared/www/res/icon/aerogear-58.png
  117. BIN kitchensink-cordova/shared/www/res/icon/aerogear-72.png
  118. BIN kitchensink-cordova/shared/www/res/icon/cordova_128.png
  119. BIN kitchensink-cordova/shared/www/res/icon/cordova_16.png
  120. BIN kitchensink-cordova/shared/www/res/icon/cordova_24.png
  121. BIN kitchensink-cordova/shared/www/res/icon/cordova_256.png
  122. BIN kitchensink-cordova/shared/www/res/icon/cordova_32.png
  123. BIN kitchensink-cordova/shared/www/res/icon/cordova_48.png
  124. BIN kitchensink-cordova/shared/www/res/icon/cordova_512.png
  125. BIN kitchensink-cordova/shared/www/res/icon/cordova_64.png
  126. BIN kitchensink-cordova/shared/www/res/icon/cordova_android_36.png
  127. BIN kitchensink-cordova/shared/www/res/icon/cordova_android_48.png
  128. BIN kitchensink-cordova/shared/www/res/icon/cordova_android_72.png
  129. BIN kitchensink-cordova/shared/www/res/icon/cordova_android_96.png
  130. BIN kitchensink-cordova/shared/www/res/icon/cordova_bb_80.png
  131. BIN kitchensink-cordova/shared/www/res/screen/aerogear-320x480.png
  132. BIN kitchensink-cordova/shared/www/res/screen/aerogear-640x960.png
  133. BIN kitchensink-cordova/shared/www/res/screen/android_hdpi_landscape.png
  134. BIN kitchensink-cordova/shared/www/res/screen/android_hdpi_portrait.png
  135. BIN kitchensink-cordova/shared/www/res/screen/android_ldpi_landscape.png
  136. BIN kitchensink-cordova/shared/www/res/screen/android_ldpi_portrait.png
  137. BIN kitchensink-cordova/shared/www/res/screen/android_mdpi_landscape.png
  138. BIN kitchensink-cordova/shared/www/res/screen/android_mdpi_portrait.png
  139. BIN kitchensink-cordova/shared/www/res/screen/android_xhdpi_landscape.png
  140. BIN kitchensink-cordova/shared/www/res/screen/android_xhdpi_portrait.png
  141. BIN kitchensink-cordova/shared/www/res/screen/blackberry_transparent_300.png
  142. BIN kitchensink-cordova/shared/www/res/screen/blackberry_transparent_400.png
  143. BIN kitchensink-cordova/shared/www/res/screen/ipad_landscape.png
  144. BIN kitchensink-cordova/shared/www/res/screen/ipad_portrait.png
  145. BIN kitchensink-cordova/shared/www/res/screen/ipad_retina_landscape.png
  146. BIN kitchensink-cordova/shared/www/res/screen/ipad_retina_portrait.png
  147. BIN kitchensink-cordova/shared/www/res/screen/iphone_landscape.png
  148. BIN kitchensink-cordova/shared/www/res/screen/iphone_portrait.png
  149. BIN kitchensink-cordova/shared/www/res/screen/iphone_retina_landscape.png
  150. BIN kitchensink-cordova/shared/www/res/screen/iphone_retina_portrait.png
  151. BIN kitchensink-cordova/shared/www/res/screen/windows_phone_portrait.jpg
  152. +11 −0 kitchensink-cordova/shared/www/tmpl/member.tmpl
  153. +2 −3 ...nsink-html5-mobile/src/main/java/org/jboss/as/quickstarts/html5_mobile/data/MemberRepository.java
  154. +16 −0 ...-html5-mobile/src/main/java/org/jboss/as/quickstarts/html5_mobile/service/MemberRegistration.java
  155. +14 −35 kitchensink-html5-mobile/src/main/webapp/index.html
  156. +2 −0 kitchensink-html5-mobile/src/main/webapp/js/libs/yepnope.1.5.4-min.js
@@ -91,7 +91,7 @@ Development notes
=================
You can test the REST endpoint using the following URL
-http://localhost:8080/jboss-as-helloworld-html5/hello/json/David
+[http://localhost:8080/\<artifactId>/hello/json/David/]("http://localhost:8080/<artifactId>/hello/json/David/").
HelloWorld.java - establishes the RESTful endpoints using JAX-RS
@@ -0,0 +1,19 @@
+/*
+ JBoss, Home of Professional Open Source
+ Copyright 2012, Red Hat, Inc., and individual contributors
+ by the @authors tag. See the copyright.txt in the distribution for a
+ full listing of individual contributors.
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+ http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.
+ */
+.invalid {
+ color: red;
+}
@@ -20,39 +20,47 @@
<html>
<head>
<title>HTML5 + REST Hello World</title>
+<link rel="stylesheet" href="css/styles.css"/>
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
+<script type="text/javascript">
+$( document ).ready( function() {
+ $( '#sayHello' ).click( function( event ) {
+ event.preventDefault();
-<script type="text/javascript">
-$(document).ready(function() {
- $('#sayHello').click(function() {
- var name = $('#name').val();
- //console.log("clicked: " + name);
- var jqxhr = $.ajax('hello/json/' + name, {
+ var result = $( '#result' ),
+ name = $.trim( $( '#name' ).val() );
+
+ result.removeClass( 'invalid' );
+
+ if( !name || !name.length ) {
+ result.addClass( 'invalid' ).text( 'A name is required!' );
+ return;
+ }
+ //console.log("clicked: " + name);
+ $.ajax( 'hello/json/' + name, {
dataType:'json',
data:{},
type:'POST',
- success:function (data) {
+ success:function ( data ) {
//console.log("success: " + data.result);
- $('#result').text(data.result);
+ $( '#result' ).text( data.result );
}
})
- .error(function() {
- //console.log("error");
- }
- );
- return false; // prevents submit of the form
- });
-}); // (document).read
+ .error( function() {
+ //console.log("error");
+ });
+ });
+}); // (document).ready
</script>
</head>
<body>
HTML5 + REST Hello World<br>
<form name="theForm">
- <fieldset>
- <label for="name" id="name_label">Name</label>
- <input name="name" id="name" type="text" required placeholder="Your Name"/>
- <input type="submit" id="sayHello" value="Say Hello"/><span id="result"></span>
- </fieldset>
+ <fieldset>
+ <label for="name" id="name_label">Name</label>
+ <input name="name" id="name" type="text" required placeholder="Your Name"/>
+ <input type="submit" id="sayHello" value="Say Hello"/><span id="result"></span>
+ </fieldset>
</form>
</body>
@@ -0,0 +1,3 @@
+ios/KitchensinkCordova.xcodeproj/xcuserdata/
+ios/KitchensinkCordova.xcodeproj/project.xcworkspace/xcuserdata/
+android/gen/
@@ -0,0 +1,24 @@
+kitchensink-cordova: Example AeroGear Application Using Hybrid HTML5 + REST with Apache Cordova
+===============================================================================================
+Author: Kris Borchers
+Level: Intermediate
+Technologies: HTML5, REST, Apache Cordova
+Summary: Based on kitchensink, but uses hybrid HTML5 running as a native application on mobiles
+
+What is it?
+-----------
+
+This project serves as an example of AeroGear's [kitchensink quickstart](http://www.github.com/aerogear/as-quickstarts/tree/master/kitchensink-html5-mobile), converted to an [Apache Cordova](http://incubator.apache.org/cordova/) based, hybrid application.
+
+What does all of that mean? Basically, this takes our https://community.jboss.org/docs/DOC-17326[HTML5 + REST] / http://www.jquerymobile.com"[jQuery Mobile] based web app and converts it to a native app for both iOS and Android. Currently, these apps will need to be built separately but in the future, we hope to provide a single build step for all supported mobile OS types. These concepts can be applied to the conversion of most HTML5/JS based web apps by just replacing the specific paths described in this article with paths that match your environment.
+
+Available Hybrid Applications
+-----------------------------
+
+The following is a list of the currently available hybrid applications.
+For more detailed information about a quickstart, click on the quickstart name.
+
+This quickstart contains the following mobile OS types:
+
+1. [ios](kitchensink-cordova/ios/README.md)
+2. [android](kitchensink-cordova/android/README.md)
Binary file not shown.
Oops, something went wrong.

0 comments on commit 7e263fa

Please sign in to comment.