Skip to content
This repository has been archived by the owner on Sep 7, 2022. It is now read-only.

Update jquery mobile #312

Merged
merged 8 commits into from
Apr 28, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified assets/frameworks/jquerymobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/frameworks/titanium.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 11 additions & 15 deletions build/generate-assets.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ async.series([
["assets/frameworks/rhomobile.png", "rhomobile/icon/icon57.png", 57],
["assets/frameworks/rhomobile.png", "rhomobile/icon/icon72.png", 72],
["assets/frameworks/rhomobile.png", "rhomobile/icon/icon114.png", 114],
["assets/frameworks/titanium.png", "titanium/Resources/android/appicon.png", 128],
["assets/frameworks/titanium.png", "titanium/Resources/iphone/appicon.png", 57],
["assets/frameworks/titanium.png", "titanium/Resources/iphone/[email protected]", 114],
["assets/frameworks/titanium.png", "titanium/app/assets/android/appicon.png", 128],
["assets/frameworks/titanium.png", "titanium/app/assets/iphone/appicon.png", 57],
["assets/frameworks/titanium.png", "titanium/app/assets/iphone/[email protected]", 114],
["assets/frameworks/xamarin.png", "xamarin/android/PropertyCross/Resources/drawable-hdpi/ic_launcher.png", 72],
["assets/frameworks/xamarin.png", "xamarin/android/PropertyCross/Resources/drawable-ldpi/ic_launcher.png", 36],
["assets/frameworks/xamarin.png", "xamarin/android/PropertyCross/Resources/drawable-mdpi/ic_launcher.png", 48],
Expand Down Expand Up @@ -214,8 +214,8 @@ async.series([
["rhomobile/app/[email protected]", 640, 960],
["rhomobile/app/[email protected]", 640, 1136],
["rhomobile/app/loading.png",640, 960],
["titanium/Resources/iphone/Default.png", 320, 480],
["titanium/Resources/iphone/[email protected]", 640, 960],
["titanium/app/assets/iphone/Default.png", 320, 480],
["titanium/app/assets/iphone/[email protected]", 640, 960],
["kendoui/www/assets/splashscreens/200x320.png", 200, 320],
["kendoui/www/assets/splashscreens/320x480.png", 320, 480],
["kendoui/www/assets/splashscreens/480x800.png", 480, 800],
Expand Down Expand Up @@ -282,11 +282,9 @@ async.series([
["xamarin/android/PropertyCross/Resources/drawable-mdpi/star.png", 32],
["xamarin/iphone/PropertyCross/star.png", 25],
["xamarin/iphone/PropertyCross/[email protected]", 50],
["titanium/Resources/android/images/res-hdpi/star.png", 48],
["titanium/Resources/android/images/res-mdpi/star.png", 32],
["titanium/Resources/android/images/res-xhdpi/star.png", 64],
["titanium/Resources/iphone/star.png", 32],
["titanium/Resources/iphone/[email protected]", 64],
["titanium/app/assets/android/images/res-hdpi/star.png", 48],
["titanium/app/assets/android/images/res-xhdpi/star.png", 64],
["titanium/app/assets/iphone/images/[email protected]", 64],
["native/android/PropertyCross/res/drawable-hdpi/star.png", 48],
["native/android/PropertyCross/res/drawable-mdpi/star.png", 32],
["native/android/PropertyCross/res/drawable-xhdpi/star.png", 64],
Expand All @@ -299,11 +297,9 @@ async.series([
["xamarin/android/PropertyCross/Resources/drawable-mdpi/nostar.png", 32],
["xamarin/iphone/PropertyCross/nostar.png", 25],
["xamarin/iphone/PropertyCross/[email protected]", 50],
["titanium/Resources/android/images/res-hdpi/nostar.png", 48],
["titanium/Resources/android/images/res-mdpi/nostar.png", 32],
["titanium/Resources/android/images/res-xhdpi/nostar.png", 64],
["titanium/Resources/iphone/nostar.png", 32],
["titanium/Resources/iphone/[email protected]", 64],
["titanium/app/assets/android/images/res-hdpi/nostar.png", 48],
["titanium/app/assets/android/images/res-xhdpi/nostar.png", 64],
["titanium/app/assets/iphone/images/[email protected]", 64],
["native/android/PropertyCross/res/drawable-hdpi/nostar.png", 48],
["native/android/PropertyCross/res/drawable-mdpi/nostar.png", 32],
["native/android/PropertyCross/res/drawable-xhdpi/nostar.png", 64]
Expand Down
33 changes: 2 additions & 31 deletions jquerymobile/Gruntfile.js
Original file line number Diff line number Diff line change
@@ -1,37 +1,8 @@
module.exports = function(grunt) {
'use strict';

var config, renamer;

renamer = function(dest, name) {
var out,
slash = name.indexOf("/"),
platform = name.substring(0, slash),
tail = name.substring(slash + 1),
end = tail.indexOf("/");
if (end === -1) {
end = tail.lastIndexOf(".")
}
if (tail.indexOf(platform) !== -1) {
out = "build/" + tail;
} else {
out = "build/" + tail.substring(0, end) + "-" + platform + tail.substring(end);
}
return out;
};

config = {
pkg: grunt.file.readJSON("package.json"),
copy: {
merges: {
expand: true,
src: ["**/*"],
cwd: "merges",
dest: "build",
rename: renamer,
filter: "isFile"
}
}
var config = {
pkg: grunt.file.readJSON("package.json")
};

require("../phonegap/common-with-winphone").build(grunt, config);
Expand Down
27 changes: 9 additions & 18 deletions jquerymobile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,7 @@ Visit the [jQuery Mobile page](http://propertycross.com/jquerymobile/) on the Pr

##Introduction

[jQuery Mobile](http://jquerymobile.com) is a HTML5 framework which makes it easy to create websites that mimic the iOS look and feel. This is achieved by providing HTML that is marked up with various jQuery Mobile specific attributes, which is then processed to generate the final markup. Within PropertyCross jQuery Mobile is combined with [KnockoutJS](http://knockoutjs.com/), which provides a presentation model (MVVM), [RequireJS](http://requirejs.org/), for dependency management, and [Cordova / PhoneGap](http://phonegap.com/), which packages the HTML / JavaScript within a native wrapper for app-store deployment. Cordova also provides a set of APIs for accessing native phone functionalities which are not available via HTML specifications.

The JavaScript Model and ViewModel code is shared across all mobile platforms, whereas the HTML files, which make up the View, are specific for each platform. This allows the UI for each platform to be tailored to the requirements of each platform. The iOS version uses the out-of-the-box jQuery Mobile styles, whereas Windows Phone uses the [jquery-metro-theme](http://sgrebnov.github.com/jqmobile-metro-theme/) extensions to support the Metro UI style together with Windows Phone specific features such as the app-bar, and the Android version uses the [nativeDroid](http://flypixel.com/nativedroid-a-theme-for-jquery-mobile/7892175001166318) theme.

jQuery Mobile does not provide an easy way to include multiple themes in a common codebase. However, Cordova (and therefore PhoneGap) provides a means to overcome this through the use of [merges](http://cordova.apache.org/docs/en/3.0.0/guide_cli_index.md.html#The%20Command-line%20Interface_customize_each_platform). Unfortuntely we're using PhoneGap Build, which doesn't support merges, so we've had to include an extra `index.html` to redirect for different platforms. We've included the `merges` structure for reference.
[jQuery Mobile](http://jquerymobile.com) is a HTML5 framework which makes it easy to create mobile applications, by using its set of UI widgets. This is achieved by providing HTML that is marked up with various jQuery Mobile specific attributes, which is then processed to generate the final markup. Within PropertyCross jQuery Mobile is combined with [KnockoutJS](http://knockoutjs.com/), which provides a presentation model (MVVM), [RequireJS](http://requirejs.org/), for dependency management, and [Cordova / PhoneGap](http://phonegap.com/), which packages the HTML / JavaScript within a native wrapper for app-store deployment. Cordova also provides a set of APIs for accessing native phone functionalities which are not available via HTML specifications.

##Building the Application

Expand All @@ -18,21 +14,16 @@ The jQuery Mobile application is packaged using [PhoneGap Build](https://build.p

##Application Structure

+ `\assets` - icons and splashscreens used by PhoneGap, these are generated via the [PropertyCross build system](https://github.com/ColinEberhardt/PropertyCross/tree/master/build).
+ `\bin` - contains the compiler which is used to remove the RequireJS dependency and package the two different versions of this app.
+ `\lib` - the various JavaScript frameworks used by this implementation. This includes jQuery Mobile, the jQM iScroll plugin, Knockout and Require. This folder also contains the jQM CSS files.
+ `\model` - the model layer of the application, includes the code that communicates to the Nestoria APIs.
+ `\style` - the application specific styles.
+ `\style-windowsphone` - the application specific styles for Windows Phone
+ `\viewModel` - The view models that implement the PropertyCross logic.
+ `app.js` - The application boot strap, includes code for managing the back stack
+ `app.js` - The Windows Phone application boot strap, includes code for managing the back stack
+ `build.sh` - A build file which packages up the iOS/Android and Windows Phone version of the code ready for PhoneGap Build.
+ `config.xml` - The XML file that is used by PhoneGap Build in order to package the app
+ `config-windowsphone.xml` - The Windows Phone version
+ `index.html` - Defines the various view for the application.
+ `index-windowsphone.html` - The Windows Phone version
+ `stats-config.json` - Used by the PropertyCross build in order to compute code sharing metrics.
+ `\www` - Contains the assets, Javascript code, css and html files that will be included in the application
+ `\assets` - icons and splashscreens used by PhoneGap, these are generated via the [PropertyCross build system](https://github.com/ColinEberhardt/PropertyCross/tree/master/build).
+ `\lib` - the various JavaScript frameworks used by this implementation. This includes jQuery Mobile, the jQM iScroll plugin, Knockout and Require. This folder also contains the jQM CSS files.
+ `\model` - the model layer of the application, includes the code that communicates to the Nestoria APIs.
+ `\style` - the application specific styles.
+ `\viewModel` - The view models that implement the PropertyCross logic.
+ `app.js` - The application boot strap, includes code for managing the back stack
+ `index.html` - Defines the various view for the application.

##Further Reading

Expand Down
175 changes: 0 additions & 175 deletions jquerymobile/merges/android/index.html

This file was deleted.

38 changes: 0 additions & 38 deletions jquerymobile/merges/android/style/style-android.css

This file was deleted.

Loading