├── .DS_Store ├── .bowerrc ├── .gitignore ├── .idea ├── .name ├── encodings.xml ├── image-share.iml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── jsLinters │ └── jshint.xml ├── misc.xml ├── modules.xml ├── scopes │ └── scope_settings.xml ├── vcs.xml └── workspace.xml ├── README.md ├── bower.json ├── config.xml ├── gulpfile.js ├── hooks ├── .gitignore └── README.md ├── ionic.project ├── package.json ├── platforms └── .gitignore ├── plugins ├── .gitignore ├── com.ionic.keyboard │ ├── .fetch.json │ ├── LICENSE │ ├── README.md │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── android │ │ │ └── IonicKeyboard.java │ │ └── ios │ │ │ ├── IonicKeyboard.h │ │ │ ├── IonicKeyboard.m │ │ │ ├── UIWebViewExtension.h │ │ │ └── UIWebViewExtension.m │ └── www │ │ └── keyboard.js ├── org.apache.cordova.console │ ├── .fetch.json │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── doc │ │ ├── de │ │ │ └── index.md │ │ ├── es │ │ │ └── index.md │ │ ├── fr │ │ │ └── index.md │ │ ├── index.md │ │ ├── it │ │ │ └── index.md │ │ ├── ja │ │ │ └── index.md │ │ ├── ko │ │ │ └── index.md │ │ ├── pl │ │ │ └── index.md │ │ ├── ru │ │ │ └── index.md │ │ └── zh │ │ │ └── index.md │ ├── package.json │ ├── plugin.xml │ ├── src │ │ ├── ios │ │ │ ├── CDVLogger.h │ │ │ └── CDVLogger.m │ │ ├── ubuntu │ │ │ ├── console.cpp │ │ │ └── console.h │ │ └── wp │ │ │ └── DebugConsole.cs │ └── www │ │ ├── console-via-logger.js │ │ └── logger.js └── org.apache.cordova.device │ ├── .fetch.json │ ├── CONTRIBUTING.md │ ├── LICENSE │ ├── NOTICE │ ├── README.md │ ├── RELEASENOTES.md │ ├── doc │ ├── de │ │ └── index.md │ ├── es │ │ └── index.md │ ├── fr │ │ └── index.md │ ├── index.md │ ├── it │ │ └── index.md │ ├── ja │ │ └── index.md │ ├── ko │ │ └── index.md │ ├── pl │ │ └── index.md │ ├── ru │ │ └── index.md │ └── zh │ │ └── index.md │ ├── package.json │ ├── plugin.xml │ ├── src │ ├── android │ │ └── Device.java │ ├── blackberry10 │ │ └── index.js │ ├── firefoxos │ │ └── DeviceProxy.js │ ├── ios │ │ ├── CDVDevice.h │ │ └── CDVDevice.m │ ├── tizen │ │ └── DeviceProxy.js │ ├── ubuntu │ │ ├── device.cpp │ │ ├── device.h │ │ └── device.js │ ├── windows8 │ │ └── DeviceProxy.js │ └── wp │ │ └── Device.cs │ ├── tests │ ├── plugin.xml │ └── tests.js │ └── www │ └── device.js ├── scss └── ionic.app.scss └── www ├── .gitignore ├── README.md ├── css └── style.css ├── img └── ionic.png ├── index.html ├── js ├── app.js ├── controllers.js ├── directives.js └── services.js ├── lib ├── ionic │ ├── css │ │ ├── ionic.css │ │ └── ionic.min.css │ ├── fonts │ │ ├── ionicons.eot │ │ ├── ionicons.svg │ │ ├── ionicons.ttf │ │ └── ionicons.woff │ ├── js │ │ ├── angular-ui │ │ │ ├── angular-ui-router.js │ │ │ └── angular-ui-router.min.js │ │ ├── angular │ │ │ ├── angular-animate.js │ │ │ ├── angular-animate.min.js │ │ │ ├── angular-resource.js │ │ │ ├── angular-resource.min.js │ │ │ ├── angular-sanitize.js │ │ │ ├── angular-sanitize.min.js │ │ │ ├── angular.js │ │ │ └── angular.min.js │ │ ├── ionic-angular.js │ │ ├── ionic-angular.min.js │ │ ├── ionic.bundle.js │ │ ├── ionic.bundle.min.js │ │ ├── ionic.js │ │ └── ionic.min.js │ ├── scss │ │ ├── _action-sheet.scss │ │ ├── _animations.scss │ │ ├── _backdrop.scss │ │ ├── _badge.scss │ │ ├── _bar.scss │ │ ├── _button-bar.scss │ │ ├── _button.scss │ │ ├── _checkbox.scss │ │ ├── _form.scss │ │ ├── _grid.scss │ │ ├── _items.scss │ │ ├── _list.scss │ │ ├── _loading.scss │ │ ├── _menu.scss │ │ ├── _mixins.scss │ │ ├── _modal.scss │ │ ├── _platform.scss │ │ ├── _popover.scss │ │ ├── _popup.scss │ │ ├── _progress.scss │ │ ├── _radio.scss │ │ ├── _range.scss │ │ ├── _reset.scss │ │ ├── _scaffolding.scss │ │ ├── _select.scss │ │ ├── _slide-box.scss │ │ ├── _split-pane.scss │ │ ├── _tabs.scss │ │ ├── _toggle.scss │ │ ├── _type.scss │ │ ├── _util.scss │ │ ├── _variables.scss │ │ ├── ionic.scss │ │ └── ionicons │ │ │ ├── _ionicons-animation.scss │ │ │ ├── _ionicons-font.scss │ │ │ ├── _ionicons-icons.scss │ │ │ ├── _ionicons-variables.scss │ │ │ └── ionicons.scss │ └── version.json └── socket.io-1.0.6.js └── views ├── browse-file.html ├── chat-list.html ├── chat.html └── home.html /.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/.DS_Store -------------------------------------------------------------------------------- /.bowerrc: -------------------------------------------------------------------------------- 1 | { 2 | "directory": "www/lib" 3 | } 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules/ 2 | -------------------------------------------------------------------------------- /.idea/.name: -------------------------------------------------------------------------------- 1 | image-share -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/image-share.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/jsLinters/jshint.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 70 | 71 | 72 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /.idea/scopes/scope_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ### Ionic Realtime Image Share 2 | ============================================= 3 | 4 | This is a demo app developed as a part of a tutorial published on http://www.htmlxprs.com. 5 | 6 | It uses Ionic framework + Socket.io to create a realtime image share app. -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "HelloIonic", 3 | "private": "true", 4 | "devDependencies": { 5 | "ionic": "driftyco/ionic-bower#1.0.0-beta.11" 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /config.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | image-share 4 | 5 | An Ionic Framework and Cordova project. 6 | 7 | 8 | Ionic Framework Team 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | var gulp = require('gulp'); 2 | var gutil = require('gulp-util'); 3 | var bower = require('bower'); 4 | var concat = require('gulp-concat'); 5 | var sass = require('gulp-sass'); 6 | var minifyCss = require('gulp-minify-css'); 7 | var rename = require('gulp-rename'); 8 | var sh = require('shelljs'); 9 | 10 | var paths = { 11 | sass: ['./scss/**/*.scss'] 12 | }; 13 | 14 | gulp.task('default', ['sass']); 15 | 16 | gulp.task('sass', function(done) { 17 | gulp.src('./scss/ionic.app.scss') 18 | .pipe(sass()) 19 | .pipe(gulp.dest('./www/css/')) 20 | .pipe(minifyCss({ 21 | keepSpecialComments: 0 22 | })) 23 | .pipe(rename({ extname: '.min.css' })) 24 | .pipe(gulp.dest('./www/css/')) 25 | .on('end', done); 26 | }); 27 | 28 | gulp.task('watch', function() { 29 | gulp.watch(paths.sass, ['sass']); 30 | }); 31 | 32 | gulp.task('install', ['git-check'], function() { 33 | return bower.commands.install() 34 | .on('log', function(data) { 35 | gutil.log('bower', gutil.colors.cyan(data.id), data.message); 36 | }); 37 | }); 38 | 39 | gulp.task('git-check', function(done) { 40 | if (!sh.which('git')) { 41 | console.log( 42 | ' ' + gutil.colors.red('Git is not installed.'), 43 | '\n Git, the version control system, is required to download Ionic.', 44 | '\n Download git here:', gutil.colors.cyan('http://git-scm.com/downloads') + '.', 45 | '\n Once git is installed, run \'' + gutil.colors.cyan('gulp install') + '\' again.' 46 | ); 47 | process.exit(1); 48 | } 49 | done(); 50 | }); 51 | -------------------------------------------------------------------------------- /hooks/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/hooks/.gitignore -------------------------------------------------------------------------------- /hooks/README.md: -------------------------------------------------------------------------------- 1 | 21 | # Cordova Hooks 22 | 23 | This directory may contain scripts used to customize cordova commands. This 24 | directory used to exist at `.cordova/hooks`, but has now been moved to the 25 | project root. Any scripts you add to these directories will be executed before 26 | and after the commands corresponding to the directory name. Useful for 27 | integrating your own build systems or integrating with version control systems. 28 | 29 | __Remember__: Make your scripts executable. 30 | 31 | ## Hook Directories 32 | The following subdirectories will be used for hooks: 33 | 34 | after_build/ 35 | after_compile/ 36 | after_docs/ 37 | after_emulate/ 38 | after_platform_add/ 39 | after_platform_rm/ 40 | after_platform_ls/ 41 | after_plugin_add/ 42 | after_plugin_ls/ 43 | after_plugin_rm/ 44 | after_plugin_search/ 45 | after_prepare/ 46 | after_run/ 47 | after_serve/ 48 | before_build/ 49 | before_compile/ 50 | before_docs/ 51 | before_emulate/ 52 | before_platform_add/ 53 | before_platform_rm/ 54 | before_platform_ls/ 55 | before_plugin_add/ 56 | before_plugin_ls/ 57 | before_plugin_rm/ 58 | before_plugin_search/ 59 | before_prepare/ 60 | before_run/ 61 | before_serve/ 62 | pre_package/ <-- Windows 8 and Windows Phone only. 63 | 64 | ## Script Interface 65 | 66 | All scripts are run from the project's root directory and have the root directory passes as the first argument. All other options are passed to the script using environment variables: 67 | 68 | * CORDOVA_VERSION - The version of the Cordova-CLI. 69 | * CORDOVA_PLATFORMS - Comma separated list of platforms that the command applies to (e.g.: android, ios). 70 | * CORDOVA_PLUGINS - Comma separated list of plugin IDs that the command applies to (e.g.: org.apache.cordova.file, org.apache.cordova.file-transfer) 71 | * CORDOVA_HOOK - Path to the hook that is being executed. 72 | * CORDOVA_CMDLINE - The exact command-line arguments passed to cordova (e.g.: cordova run ios --emulate) 73 | 74 | If a script returns a non-zero exit code, then the parent cordova command will be aborted. 75 | 76 | 77 | ## Writing hooks 78 | 79 | We highly recommend writting your hooks using Node.js so that they are 80 | cross-platform. Some good examples are shown here: 81 | 82 | [http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/](http://devgirl.org/2013/11/12/three-hooks-your-cordovaphonegap-project-needs/) 83 | 84 | -------------------------------------------------------------------------------- /ionic.project: -------------------------------------------------------------------------------- 1 | { 2 | "name": "image-share", 3 | "app_id": "" 4 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "ionic-project", 3 | "version": "1.0.0", 4 | "description": "An Ionic project", 5 | "dependencies": { 6 | "gulp": "^3.5.6", 7 | "gulp-sass": "^0.7.1", 8 | "gulp-concat": "^2.2.0", 9 | "gulp-minify-css": "^0.3.0", 10 | "gulp-rename": "^1.2.0" 11 | }, 12 | "devDependencies": { 13 | "bower": "^1.3.3", 14 | "gulp-util": "^2.2.14", 15 | "shelljs": "^0.3.0" 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /platforms/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/platforms/.gitignore -------------------------------------------------------------------------------- /plugins/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/plugins/.gitignore -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"git","url":"https://github.com/driftyco/ionic-plugins-keyboard","subdir":"."}} -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/README.md: -------------------------------------------------------------------------------- 1 | Keyboard 2 | ====== 3 | 4 | The `cordova.plugins.Keyboard` object provides functions to make interacting with the keyboard easier, and fires events to indicate that the keyboard will hide/show. 5 | 6 | cordova plugin add https://github.com/driftyco/ionic-plugins-keyboard.git 7 | 8 | Methods 9 | ------- 10 | 11 | - cordova.plugins.Keyboard.hideKeyboardAccessoryBar 12 | - cordova.plugins.Keyboard.close 13 | - cordova.plugins.Keyboard.disableScroll 14 | - cordova.plugins.Keyboard.show 15 | 16 | Properties 17 | -------- 18 | 19 | - cordova.plugins.Keyboard.isVisible 20 | 21 | Events 22 | -------- 23 | 24 | These events are fired on the window. 25 | 26 | - native.keyboardshow 27 | * A number `keyboardHeight` is given on the event object, which is the pixel height of the keyboard. 28 | - native.keyboardhide 29 | 30 | Permissions 31 | ----------- 32 | 33 | #### config.xml 34 | 35 | 36 | 37 | 38 | 39 | 40 | Keyboard.hideKeyboardAccessoryBar 41 | ================= 42 | 43 | Hide the keyboard accessory bar with the next, previous and done buttons. 44 | 45 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 46 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(false); 47 | 48 | Supported Platforms 49 | ------------------- 50 | 51 | - iOS 52 | 53 | 54 | Keyboard.close 55 | ================= 56 | 57 | Close the keyboard if it is open. 58 | 59 | cordova.plugins.Keyboard.close(); 60 | 61 | Supported Platforms 62 | ------------------- 63 | 64 | - iOS, Android 65 | 66 | 67 | Keyboard.disableScroll 68 | ================= 69 | 70 | Disable native scrolling, useful if you are using JavaScript to scroll 71 | 72 | cordova.plugins.Keyboard.disableScroll(true); 73 | cordova.plugins.Keyboard.disableScroll(false); 74 | 75 | Supported Platforms 76 | ------------------- 77 | 78 | - iOS 79 | 80 | Keyboard.show 81 | ================= 82 | 83 | Force keyboard to be shown on Android. This typically helps if autofocus on a text element does not pop up the keyboard automatically 84 | 85 | cordova.plugins.Keyboard.show(); 86 | 87 | Supported Platforms 88 | 89 | - Android 90 | 91 | native.keyboardshow 92 | ================= 93 | 94 | This event fires when the keyboard will be shown 95 | 96 | window.addEventListener('native.keyboardshow', keyboardShowHandler); 97 | 98 | function keyboardShowHandler(e){ 99 | alert('Keyboard height is: ' + e.keyboardHeight); 100 | } 101 | 102 | Properties 103 | ----------- 104 | 105 | keyboardHeight: the height of the keyboard in pixels 106 | 107 | 108 | Supported Platforms 109 | ------------------- 110 | 111 | - iOS, Android 112 | 113 | 114 | native.keyboardhide 115 | ================= 116 | 117 | This event fires when the keyboard will hide 118 | 119 | window.addEventListener('native.keyboardhide', keyboardHideHandler); 120 | 121 | function keyboardHideHandler(e){ 122 | alert('Goodnight, sweet prince'); 123 | } 124 | 125 | Properties 126 | ----------- 127 | 128 | None 129 | 130 | Supported Platforms 131 | ------------------- 132 | 133 | - iOS, Android 134 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.3", 3 | "name": "com.ionic.keyboard", 4 | "cordova_name": "Keyboard", 5 | "description": "Ionic Keyboard Plugin", 6 | "repo": "https://github.com/driftyco/ionic-plugins-keyboard.git", 7 | "issue": "https://github.com/driftyco/ionic-plugins-keyboard/issues", 8 | "license": "MIT", 9 | "keywords": [ 10 | "ionic", 11 | "keyboard" 12 | ] 13 | } 14 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | Keyboard 7 | Ionic Keyboard Plugin 8 | Apache 2.0 9 | Ionic,keyboard 10 | https://github.com/driftyco/ionic-plugins-keyboard.git 11 | https://github.com/driftyco/ionic-plugins-keyboard/issues 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/src/android/IonicKeyboard.java: -------------------------------------------------------------------------------- 1 | package com.ionic.keyboard; 2 | 3 | import org.apache.cordova.CallbackContext; 4 | import org.apache.cordova.CordovaInterface; 5 | import org.apache.cordova.CordovaPlugin; 6 | import org.apache.cordova.CordovaWebView; 7 | import org.apache.cordova.PluginResult.Status; 8 | import org.json.JSONArray; 9 | import org.json.JSONException; 10 | 11 | import android.content.Context; 12 | import android.graphics.Rect; 13 | import android.util.DisplayMetrics; 14 | import android.view.View; 15 | import android.view.ViewTreeObserver.OnGlobalLayoutListener; 16 | import android.view.inputmethod.InputMethodManager; 17 | 18 | public class IonicKeyboard extends CordovaPlugin{ 19 | 20 | public void initialize(CordovaInterface cordova, CordovaWebView webView) { 21 | super.initialize(cordova, webView); 22 | 23 | //calculate density-independent pixels (dp) 24 | //http://developer.android.com/guide/practices/screens_support.html 25 | DisplayMetrics dm = new DisplayMetrics(); 26 | cordova.getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm); 27 | final float density = dm.density; 28 | 29 | final CordovaWebView appView = webView; 30 | 31 | //http://stackoverflow.com/a/4737265/1091751 detect if keyboard is showing 32 | final View rootView = cordova.getActivity().getWindow().getDecorView().findViewById(android.R.id.content).getRootView(); 33 | OnGlobalLayoutListener list = new OnGlobalLayoutListener() { 34 | int previousHeightDiff = 0; 35 | @Override 36 | public void onGlobalLayout() { 37 | Rect r = new Rect(); 38 | //r will be populated with the coordinates of your view that area still visible. 39 | rootView.getWindowVisibleDisplayFrame(r); 40 | 41 | int heightDiff = rootView.getRootView().getHeight() - (r.bottom - r.top); 42 | int pixelHeightDiff = (int)(heightDiff / density); 43 | if (pixelHeightDiff > 100 && pixelHeightDiff != previousHeightDiff) { // if more than 100 pixels, its probably a keyboard... 44 | appView.sendJavascript("cordova.plugins.Keyboard.isVisible = true"); 45 | appView.sendJavascript("cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight':" + Integer.toString(pixelHeightDiff)+"});"); 46 | 47 | //deprecated 48 | appView.sendJavascript("cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight':" + Integer.toString(pixelHeightDiff)+"});"); 49 | } 50 | else if ( pixelHeightDiff != previousHeightDiff && ( previousHeightDiff - pixelHeightDiff ) > 100 ){ 51 | appView.sendJavascript("cordova.plugins.Keyboard.isVisible = false"); 52 | appView.sendJavascript("cordova.fireWindowEvent('native.keyboardhide')"); 53 | 54 | //deprecated 55 | appView.sendJavascript("cordova.fireWindowEvent('native.hidekeyboard')"); 56 | } 57 | previousHeightDiff = pixelHeightDiff; 58 | } 59 | }; 60 | 61 | rootView.getViewTreeObserver().addOnGlobalLayoutListener(list); 62 | } 63 | 64 | public boolean execute(String action, JSONArray args, final CallbackContext callbackContext) throws JSONException { 65 | if ("close".equals(action)) { 66 | cordova.getThreadPool().execute(new Runnable() { 67 | public void run() { 68 | //http://stackoverflow.com/a/7696791/1091751 69 | InputMethodManager inputManager = (InputMethodManager) cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE); 70 | View v = cordova.getActivity().getCurrentFocus(); 71 | 72 | if (v == null) { 73 | callbackContext.error("No current focus"); 74 | } 75 | inputManager.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS); 76 | callbackContext.success(); // Thread-safe. 77 | } 78 | }); 79 | return true; 80 | } 81 | if ("show".equals(action)) { 82 | cordova.getThreadPool().execute(new Runnable() { 83 | public void run() { 84 | ((InputMethodManager) cordova.getActivity().getSystemService(Context.INPUT_METHOD_SERVICE)).toggleSoftInput(0, InputMethodManager.HIDE_IMPLICIT_ONLY); 85 | callbackContext.success(); // Thread-safe. 86 | } 87 | }); 88 | return true; 89 | } 90 | return false; // Returning false results in a "MethodNotFound" error. 91 | } 92 | 93 | 94 | } 95 | 96 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/src/ios/IonicKeyboard.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @interface IonicKeyboard : CDVPlugin { 4 | @protected 5 | id _keyboardShowObserver, _keyboardHideObserver; 6 | } 7 | 8 | @property (readwrite, assign) BOOL hideKeyboardAccessoryBar; 9 | @property (readwrite, assign) BOOL disableScroll; 10 | //@property (readwrite, assign) BOOL styleDark; 11 | 12 | @end 13 | 14 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/src/ios/IonicKeyboard.m: -------------------------------------------------------------------------------- 1 | #import "IonicKeyboard.h" 2 | #import "UIWebViewExtension.h" 3 | #import 4 | 5 | @implementation IonicKeyboard 6 | 7 | @synthesize hideKeyboardAccessoryBar = _hideKeyboardAccessoryBar; 8 | @synthesize disableScroll = _disableScroll; 9 | //@synthesize styleDark = _styleDark; 10 | 11 | - (void)pluginInitialize { 12 | 13 | NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; 14 | __weak IonicKeyboard* weakSelf = self; 15 | 16 | //set defaults 17 | self.hideKeyboardAccessoryBar = NO; 18 | self.disableScroll = NO; 19 | //self.styleDark = NO; 20 | 21 | _keyboardShowObserver = [nc addObserverForName:UIKeyboardWillShowNotification 22 | object:nil 23 | queue:[NSOperationQueue mainQueue] 24 | usingBlock:^(NSNotification* notification) { 25 | 26 | CGRect keyboardFrame = [notification.userInfo[UIKeyboardFrameEndUserInfoKey] CGRectValue]; 27 | keyboardFrame = [self.viewController.view convertRect:keyboardFrame fromView:nil]; 28 | 29 | [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.plugins.Keyboard.isVisible = true; cordova.fireWindowEvent('native.keyboardshow', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; 30 | 31 | //deprecated 32 | [weakSelf.commandDelegate evalJs:[NSString stringWithFormat:@"cordova.fireWindowEvent('native.showkeyboard', { 'keyboardHeight': %@ }); ", [@(keyboardFrame.size.height) stringValue]]]; 33 | }]; 34 | 35 | _keyboardHideObserver = [nc addObserverForName:UIKeyboardWillHideNotification 36 | object:nil 37 | queue:[NSOperationQueue mainQueue] 38 | usingBlock:^(NSNotification* notification) { 39 | [weakSelf.commandDelegate evalJs:@"cordova.plugins.Keyboard.isVisible = false; cordova.fireWindowEvent('native.keyboardhide'); "]; 40 | 41 | //deprecated 42 | [weakSelf.commandDelegate evalJs:@"cordova.fireWindowEvent('native.hidekeyboard'); "]; 43 | }]; 44 | } 45 | - (BOOL)disableScroll { 46 | return _disableScroll; 47 | } 48 | 49 | - (void)setDisableScroll:(BOOL)disableScroll { 50 | if (disableScroll == _disableScroll) { 51 | return; 52 | } 53 | if (disableScroll) { 54 | self.webView.scrollView.scrollEnabled = NO; 55 | self.webView.scrollView.delegate = self; 56 | } 57 | else { 58 | self.webView.scrollView.scrollEnabled = YES; 59 | self.webView.scrollView.delegate = nil; 60 | } 61 | 62 | _disableScroll = disableScroll; 63 | } 64 | 65 | 66 | - (BOOL)hideKeyboardAccessoryBar { 67 | return _hideKeyboardAccessoryBar; 68 | } 69 | 70 | - (void)setHideKeyboardAccessoryBar:(BOOL)hideKeyboardAccessoryBar { 71 | if (hideKeyboardAccessoryBar == _hideKeyboardAccessoryBar) { 72 | return; 73 | } 74 | if (hideKeyboardAccessoryBar) { 75 | self.webView.hackishlyHidesInputAccessoryView = YES; 76 | } 77 | else { 78 | self.webView.hackishlyHidesInputAccessoryView = NO; 79 | } 80 | 81 | _hideKeyboardAccessoryBar = hideKeyboardAccessoryBar; 82 | } 83 | 84 | /* 85 | - (BOOL)styleDark { 86 | return _styleDark; 87 | } 88 | 89 | - (void)setStyleDark:(BOOL)styleDark { 90 | if (styleDark == _styleDark) { 91 | return; 92 | } 93 | if (styleDark) { 94 | self.webView.styleDark = YES; 95 | } 96 | else { 97 | self.webView.styleDark = NO; 98 | } 99 | 100 | _styleDark = styleDark; 101 | } 102 | */ 103 | 104 | 105 | /* ------------------------------------------------------------- */ 106 | 107 | - (void)scrollViewDidScroll:(UIScrollView *)scrollView { 108 | [scrollView setContentOffset: CGPointZero]; 109 | } 110 | 111 | /* ------------------------------------------------------------- */ 112 | 113 | - (void)dealloc { 114 | NSNotificationCenter* nc = [NSNotificationCenter defaultCenter]; 115 | 116 | [nc removeObserver:self name:UIKeyboardWillShowNotification object:nil]; 117 | [nc removeObserver:self name:UIKeyboardWillHideNotification object:nil]; 118 | } 119 | 120 | /* ------------------------------------------------------------- */ 121 | 122 | - (void) disableScroll:(CDVInvokedUrlCommand*)command { 123 | if (!command.arguments || ![command.arguments count]){ 124 | return; 125 | } 126 | id value = [command.arguments objectAtIndex:0]; 127 | 128 | self.disableScroll = [value boolValue]; 129 | } 130 | 131 | - (void) hideKeyboardAccessoryBar:(CDVInvokedUrlCommand*)command { 132 | if (!command.arguments || ![command.arguments count]){ 133 | return; 134 | } 135 | id value = [command.arguments objectAtIndex:0]; 136 | 137 | self.hideKeyboardAccessoryBar = [value boolValue]; 138 | } 139 | 140 | - (void) close:(CDVInvokedUrlCommand*)command { 141 | [self.webView endEditing:YES]; 142 | } 143 | 144 | /* 145 | - (void) styleDark:(CDVInvokedUrlCommand*)command { 146 | if (!command.arguments || ![command.arguments count]){ 147 | return; 148 | } 149 | id value = [command.arguments objectAtIndex:0]; 150 | 151 | self.styleDark = [value boolValue]; 152 | } 153 | */ 154 | 155 | @end 156 | 157 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/src/ios/UIWebViewExtension.h: -------------------------------------------------------------------------------- 1 | @interface UIWebView (HackishAccessoryHiding) 2 | @property (nonatomic, assign) BOOL hackishlyHidesInputAccessoryView; 3 | //@property (nonatomic, assign) BOOL styleDark; 4 | @end 5 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/src/ios/UIWebViewExtension.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "UIWebViewExtension.h" 4 | 5 | //Credit: https://gist.github.com/bjhomer/2048571 6 | //Also: http://stackoverflow.com/a/23398487/1091751 7 | @implementation UIWebView (HackishAccessoryHiding) 8 | 9 | static const char * const hackishFixClassName = "UIWebBrowserViewMinusAccessoryView"; 10 | static Class hackishFixClass = Nil; 11 | 12 | - (UIView *)hackishlyFoundBrowserView { 13 | UIScrollView *scrollView = self.scrollView; 14 | 15 | UIView *browserView = nil; 16 | for (UIView *subview in scrollView.subviews) { 17 | if ([NSStringFromClass([subview class]) hasPrefix:@"UIWebBrowserView"]) { 18 | browserView = subview; 19 | break; 20 | } 21 | } 22 | return browserView; 23 | } 24 | 25 | - (id)methodReturningNil { 26 | return nil; 27 | } 28 | 29 | - (void)ensureHackishSubclassExistsOfBrowserViewClass:(Class)browserViewClass { 30 | if (!hackishFixClass) { 31 | Class newClass = objc_allocateClassPair(browserViewClass, hackishFixClassName, 0); 32 | IMP nilImp = [self methodForSelector:@selector(methodReturningNil)]; 33 | class_addMethod(newClass, @selector(inputAccessoryView), nilImp, "@@:"); 34 | objc_registerClassPair(newClass); 35 | 36 | hackishFixClass = newClass; 37 | } 38 | } 39 | 40 | - (BOOL) hackishlyHidesInputAccessoryView { 41 | UIView *browserView = [self hackishlyFoundBrowserView]; 42 | return [browserView class] == hackishFixClass; 43 | } 44 | 45 | - (void) setHackishlyHidesInputAccessoryView:(BOOL)value { 46 | UIView *browserView = [self hackishlyFoundBrowserView]; 47 | if (browserView == nil) { 48 | return; 49 | } 50 | [self ensureHackishSubclassExistsOfBrowserViewClass:[browserView class]]; 51 | 52 | if (value) { 53 | object_setClass(browserView, hackishFixClass); 54 | } 55 | else { 56 | Class normalClass = objc_getClass("UIWebBrowserView"); 57 | object_setClass(browserView, normalClass); 58 | } 59 | [browserView reloadInputViews]; 60 | } 61 | /* ---------------------------------------------------------------- */ 62 | 63 | /* 64 | - (UIKeyboardAppearance) darkKeyboardAppearanceTemplateMethod { 65 | return UIKeyboardAppearanceDark; 66 | } 67 | 68 | - (UIKeyboardAppearance) lightKeyboardAppearanceTemplateMethod { 69 | return UIKeyboardAppearanceLight; 70 | } 71 | 72 | - (BOOL) styleDark { 73 | UIView *browserView = [self hackishlyFoundBrowserView]; 74 | if (browserView == nil) { 75 | return false; 76 | } 77 | 78 | Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); 79 | IMP imp = method_getImplementation( m ); 80 | 81 | Method m2 = class_getInstanceMethod( [browserView class], @selector(keyboardAppearance) ); 82 | IMP imp2 = method_getImplementation( m2 ); 83 | 84 | return imp == imp2; 85 | } 86 | 87 | - (void) setStyleDark:(BOOL)styleDark { 88 | UIView *browserView = [self hackishlyFoundBrowserView]; 89 | if (browserView == nil) { 90 | return; 91 | } 92 | 93 | if ( styleDark ) { 94 | Method m = class_getInstanceMethod( [self class], @selector( darkKeyboardAppearanceTemplateMethod ) ); 95 | IMP imp = method_getImplementation( m ); 96 | const char* typeEncoding = method_getTypeEncoding( m ); 97 | class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); 98 | } 99 | else { 100 | Method m = class_getInstanceMethod( [self class], @selector( lightKeyboardAppearanceTemplateMethod ) ); 101 | IMP imp = method_getImplementation( m ); 102 | const char* typeEncoding = method_getTypeEncoding( m ); 103 | class_replaceMethod( [browserView class], @selector(keyboardAppearance), imp, typeEncoding ); 104 | } 105 | } 106 | */ 107 | 108 | @end 109 | 110 | -------------------------------------------------------------------------------- /plugins/com.ionic.keyboard/www/keyboard.js: -------------------------------------------------------------------------------- 1 | 2 | var argscheck = require('cordova/argscheck'), 3 | utils = require('cordova/utils'), 4 | exec = require('cordova/exec'); 5 | 6 | var Keyboard = function() { 7 | }; 8 | 9 | Keyboard.hideKeyboardAccessoryBar = function(hide) { 10 | exec(null, null, "Keyboard", "hideKeyboardAccessoryBar", [hide]); 11 | }; 12 | 13 | Keyboard.close = function() { 14 | exec(null, null, "Keyboard", "close", []); 15 | }; 16 | 17 | Keyboard.show = function() { 18 | exec(null, null, "Keyboard", "show", []); 19 | }; 20 | 21 | Keyboard.disableScroll = function(disable) { 22 | exec(null, null, "Keyboard", "disableScroll", [disable]); 23 | }; 24 | 25 | /* 26 | Keyboard.styleDark = function(dark) { 27 | exec(null, null, "Keyboard", "styleDark", [dark]); 28 | }; 29 | */ 30 | 31 | Keyboard.isVisible = false; 32 | 33 | module.exports = Keyboard; 34 | 35 | 36 | 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"local","path":"/Users/Sandeep/.plugman/cache/org.apache.cordova.console/0.2.10/package"}} -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/#contribute). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) 23 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/RELEASENOTES.md: -------------------------------------------------------------------------------- 1 | 21 | # Release Notes 22 | 23 | ### 0.2.3 (Sept 25, 2013) 24 | * CB-4889 bumping&resetting version 25 | * CB-4889 renaming org.apache.cordova.core.console to org.apache.cordova.console 26 | * Rename CHANGELOG.md -> RELEASENOTES.md 27 | * [CB-4752] Incremented plugin version on dev branch. 28 | 29 | ### 0.2.4 (Oct 28, 2013) 30 | * CB-5154 log formatting incorrectly to native 31 | * CB-5128: added repo + issue tag to plugin.xml for console plugin 32 | * [CB-4915] Incremented plugin version on dev branch. 33 | 34 | ### 0.2.5 (Dec 4, 2013) 35 | * add ubuntu platform 36 | 37 | ### 0.2.6 (Jan 02, 2014) 38 | * CB-5658 Add doc/index.md for Console plugin 39 | 40 | ### 0.2.7 (Feb 05, 2014) 41 | * Native console needs to be called DebugConsole to avoid ambiguous reference. This commit requires the 3.4.0 version of the native class factory 42 | * CB-4718 fixed Console plugin not working on wp 43 | 44 | ### 0.2.8 (Apr 17, 2014) 45 | * CB-6460: Update license headers 46 | * Add NOTICE file 47 | 48 | ### 0.2.9 (Jun 05, 2014) 49 | * CB-6848 Add Android quirk, list applicable platforms 50 | * CB-6796 Add license 51 | * CB-6491 add CONTRIBUTING.md 52 | 53 | ### 0.2.10 (Aug 06, 2014) 54 | * CB-6127 Updated translations for docs 55 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/de/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Dieses Plugin ist gedacht, um sicherzustellen, dass diese console.log() eignet sich wie es sein kann. Es fügt zusätzliche Funktion für iOS, Ubuntu, Windows Phone 8 und Windows 8 hinzu. Wenn Sie zufrieden sind mit der Funktionsweise von console.log() für Sie, brauchen dann Sie vermutlich dieses Plugin nicht. 23 | 24 | ## Installation 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android Macken 30 | 31 | Auf einigen Plattformen als Android fungieren console.log() auf mehrere Argumente wie console.log ("1", "2", "3"). Android wird jedoch nur auf das erste Argument fungieren. Nachfolgende Argumente zu console.log() werden ignoriert. Dieses Plugin ist nicht die Verantwortung dafür, es ist eine Einschränkung von Android selbst. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/es/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Este plugin es para asegurarse de que console.log() es tan útil como puede ser. Añade función adicional para iOS, Windows Phone 8, Ubuntu y Windows 8. Si estás contento con cómo funciona console.log() para ti, entonces probablemente no necesitas este plugin. 23 | 24 | ## Instalación 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Rarezas Android 30 | 31 | En algunas plataformas que no sean Android, console.log() actuará en varios argumentos, como console.log ("1", "2", "3"). Sin embargo, Android actuará sólo en el primer argumento. Se omitirá posteriores argumentos para console.log(). Este plugin no es la causa de eso, es una limitación propia de Android. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/fr/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Ce plugin est destiné à faire en sorte que console.log() est aussi utile que possible. Il ajoute une fonction supplémentaire pour iOS, Ubuntu, Windows Phone 8 et Windows 8. Si vous êtes satisfait du fonctionnement de console.log() pour vous, alors vous avez probablement pas besoin ce plugin. 23 | 24 | ## Installation 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Quirks Android 30 | 31 | Sur certaines plateformes autres que Android, console.log() va agir sur plusieurs arguments, tels que console.log ("1", "2", "3"). Toutefois, Android doit agir uniquement sur le premier argument. Les arguments suivants à console.log() seront ignorées. Ce plugin n'est pas la cause de cela, il s'agit d'une limitation d'Android lui-même. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | This plugin is meant to ensure that console.log() is as useful as it can be. 23 | It adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows 8. If 24 | you are happy with how console.log() works for you, then you probably 25 | don't need this plugin. 26 | 27 | ## Installation 28 | 29 | cordova plugin add org.apache.cordova.console 30 | 31 | ### Android Quirks 32 | 33 | On some platforms other than Android, console.log() will act on multiple 34 | arguments, such as console.log("1", "2", "3"). However, Android will act only 35 | on the first argument. Subsequent arguments to console.log() will be ignored. 36 | This plugin is not the cause of that, it is a limitation of Android itself. 37 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/it/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Questo plugin è intesa a garantire che console.log() è tanto utile quanto può essere. Aggiunge una funzione aggiuntiva per iOS, Ubuntu, Windows 8 e Windows Phone 8. Se sei soddisfatto di come console.log() funziona per voi, quindi probabilmente non è necessario questo plugin. 23 | 24 | ## Installazione 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Stranezze Android 30 | 31 | Su alcune piattaforme diverse da Android, console.log() agirà su più argomenti, come ad esempio console ("1", "2", "3"). Tuttavia, Android agirà solo sul primo argomento. Argomenti successivi a console.log() verranno ignorati. Questo plugin non è la causa di ciò, è una limitazione di Android stesso. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ja/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | このプラグインは、その console.log() がすることができます便利なことを確認するものです。 それは、iOS、Ubuntu、Windows Phone 8 および Windows 8 の追加関数を追加します。 場合はあなたのための console.log() の作品に満足しているし、おそらく必要はありませんこのプラグイン。 23 | 24 | ## インストール 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android の癖 30 | 31 | アンドロイド以外のいくつかのプラットフォームで console.log() は console.log (「1」、「2」、「3」) など、複数の引数に動作します。 しかし、アンドロイドは、最初の引数でのみ動作します。 Console.log() に後続の引数は無視されます。 このプラグインが原因ではない、それは Android の自体の制限です。 -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ko/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | 이 플러그인을 console.log()로 수 유용 되도록 의미입니다. IOS, 우분투, Windows Phone 8 및 윈도우 8에 대 한 추가 기능을 추가 하 고 합니다. Console.log() 당신을 위해 작동 하는 어떻게 행복 한 경우에, 그때 당신은 아마 필요 하지 않습니다이 플러그인. 23 | 24 | ## 설치 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### 안 드 로이드 단점 30 | 31 | 안 드 로이드 이외의 일부 플랫폼에서 console.log() console.log ("1", "2", "3")와 같이 여러 인수에 작동할 것 이다. 그러나, 안 드 로이드는 첫 번째 인수에만 작동할 것 이다. Console.log() 후속 인수는 무시 됩니다. 이 플러그인의 원인이 되지 않습니다, 그리고 그것은 안 드 로이드 자체의 한계입니다. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/pl/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Ten plugin jest przeznaczona do zapewnienia, że console.log() jest tak przydatne, jak to może być. To dodaje dodatkową funkcję dla iOS, Ubuntu, Windows Phone 8 i Windows 8. Jeśli jesteś zadowolony z jak console.log() pracuje dla Ciebie, wtedy prawdopodobnie nie potrzebują tej wtyczki. 23 | 24 | ## Instalacji 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android dziwactwa 30 | 31 | Na niektórych platformach innych niż Android console.log() będzie działać na wielu argumentów, takich jak console.log ("1", "2", "3"). Jednak Android będzie działać tylko na pierwszy argument. Kolejne argumenty do console.log() będą ignorowane. Ten plugin nie jest przyczyną, że, jest to ograniczenie Androida, sam. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/ru/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | Этот плагин предназначен для обеспечения как полезным, поскольку это может быть что console.log(). Он добавляет дополнительные функции для iOS, Ubuntu, Windows Phone 8 и Windows 8. Если вы не довольны как console.log() работает для вас, то вы вероятно не нужен этот плагин. 23 | 24 | ## Установка 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android причуды 30 | 31 | На некоторых платформах, отличных от Android console.log() будет действовать на нескольких аргументов, например console.log («1», «2», «3»). Тем не менее Android будет действовать только на первого аргумента. Последующие аргументы для console.log() будет игнорироваться. Этот плагин не является причиной этого, это ограничение Android сам. -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/doc/zh/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.console 21 | 22 | 這個外掛程式是為了確保該 console.log() 是一樣有用,它可以是。 它將添加附加功能的 iOS、 Ubuntu,Windows Phone 8 和 Windows 8。 如果你是快樂與 console.log() 是如何為你工作,那麼可能不需要這個外掛程式。 23 | 24 | ## 安裝 25 | 26 | cordova plugin add org.apache.cordova.console 27 | 28 | 29 | ### Android 的怪癖 30 | 31 | 在一些非 Android 平臺上,console.log() 將作用於多個參數,如 console.log ("1"、"2"、"3")。 然而,Android 將僅在第一個參數上採取行動。 對 console.log() 的後續參數將被忽略。 這個外掛程式不是的原因,,它是安卓系統本身的限制。 -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.10", 3 | "name": "org.apache.cordova.console", 4 | "cordova_name": "Console", 5 | "description": "Cordova Console Plugin", 6 | "license": "Apache 2.0", 7 | "repo": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git", 8 | "issue": "https://issues.apache.org/jira/browse/CB/component/12320644", 9 | "keywords": [ 10 | "cordova", 11 | "console" 12 | ], 13 | "platforms": [ 14 | "ios", 15 | "ubuntu", 16 | "wp7", 17 | "wp8", 18 | "windows8" 19 | ], 20 | "engines": [], 21 | "englishdoc": "\n\n# org.apache.cordova.console\n\nThis plugin is meant to ensure that console.log() is as useful as it can be.\nIt adds additional function for iOS, Ubuntu, Windows Phone 8, and Windows 8. If\nyou are happy with how console.log() works for you, then you probably\ndon't need this plugin.\n\n## Installation\n\n cordova plugin add org.apache.cordova.console\n\n### Android Quirks\n\nOn some platforms other than Android, console.log() will act on multiple\narguments, such as console.log(\"1\", \"2\", \"3\"). However, Android will act only\non the first argument. Subsequent arguments to console.log() will be ignored.\nThis plugin is not the cause of that, it is a limitation of Android itself.\n" 22 | } -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 24 | 25 | Console 26 | Cordova Console Plugin 27 | Apache 2.0 28 | cordova,console 29 | https://git-wip-us.apache.org/repos/asf/cordova-plugin-console.git 30 | https://issues.apache.org/jira/browse/CB/component/12320644 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ios/CDVLogger.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | 22 | @interface CDVLogger : CDVPlugin 23 | 24 | - (void)logLevel:(CDVInvokedUrlCommand*)command; 25 | 26 | @end 27 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ios/CDVLogger.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import "CDVLogger.h" 21 | #import 22 | 23 | @implementation CDVLogger 24 | 25 | /* log a message */ 26 | - (void)logLevel:(CDVInvokedUrlCommand*)command 27 | { 28 | id level = [command.arguments objectAtIndex:0]; 29 | id message = [command.arguments objectAtIndex:1]; 30 | 31 | if ([level isEqualToString:@"LOG"]) { 32 | NSLog(@"%@", message); 33 | } else { 34 | NSLog(@"%@: %@", level, message); 35 | } 36 | } 37 | 38 | @end 39 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ubuntu/console.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | #include "console.h" 16 | 17 | #include 18 | 19 | Console::Console(Cordova *cordova) : CPlugin(cordova) { 20 | } 21 | 22 | void Console::logLevel(int scId, int ecId, QString level, QString message) { 23 | Q_UNUSED(scId) 24 | Q_UNUSED(ecId) 25 | 26 | if (level != "LOG") 27 | std::cout << "[" << level.toStdString() << "] "; 28 | std::cout << message.toStdString() << std::endl; 29 | } 30 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/ubuntu/console.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Licensed under the Apache License, Version 2.0 (the "License"); 3 | * you may not use this file except in compliance with the License. 4 | * You may obtain a copy of the License at 5 | * 6 | * http://www.apache.org/licenses/LICENSE-2.0 7 | * 8 | * Unless required by applicable law or agreed to in writing, software 9 | * distributed under the License is distributed on an "AS IS" BASIS, 10 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | * See the License for the specific language governing permissions and 12 | * limitations under the License. 13 | */ 14 | 15 | #ifndef CONSOLE_H_FDSVCXGFRS 16 | #define CONSOLE_H_FDSVCXGFRS 17 | 18 | #include 19 | 20 | #include 21 | 22 | class Console : public CPlugin { 23 | Q_OBJECT 24 | public: 25 | explicit Console(Cordova *cordova); 26 | 27 | virtual const QString fullName() override { 28 | return Console::fullID(); 29 | } 30 | 31 | virtual const QString shortName() override { 32 | return "Console"; 33 | } 34 | 35 | static const QString fullID() { 36 | return "Console"; 37 | } 38 | 39 | public slots: 40 | void logLevel(int scId, int ecId, QString level, QString message); 41 | }; 42 | 43 | #endif 44 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.console/src/wp/DebugConsole.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed under the Apache License, Version 2.0 (the "License"); 3 | you may not use this file except in compliance with the License. 4 | You may obtain a copy of the License at 5 | 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Unless required by applicable law or agreed to in writing, software 9 | distributed under the License is distributed on an "AS IS" BASIS, 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | See the License for the specific language governing permissions and 12 | limitations under the License. 13 | */ 14 | 15 | using System; 16 | using System.Net; 17 | using System.Windows; 18 | using System.Windows.Controls; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Media; 23 | using System.Windows.Media.Animation; 24 | using System.Windows.Shapes; 25 | using System.Diagnostics; 26 | 27 | namespace WPCordovaClassLib.Cordova.Commands 28 | { 29 | public class DebugConsole : BaseCommand 30 | { 31 | public void logLevel(string options) 32 | { 33 | string[] args = JSON.JsonHelper.Deserialize(options); 34 | string level = args[0]; 35 | string msg = args[1]; 36 | 37 | if (level.Equals("LOG")) 38 | { 39 | Debug.WriteLine(msg); 40 | } 41 | else 42 | { 43 | Debug.WriteLine(level + ": " + msg); 44 | } 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/.fetch.json: -------------------------------------------------------------------------------- 1 | {"source":{"type":"local","path":"/Users/Sandeep/.plugman/cache/org.apache.cordova.device/0.2.11/package"}} -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | 21 | 22 | # Contributing to Apache Cordova 23 | 24 | Anyone can contribute to Cordova. And we need your contributions. 25 | 26 | There are multiple ways to contribute: report bugs, improve the docs, and 27 | contribute code. 28 | 29 | For instructions on this, start with the 30 | [contribution overview](http://cordova.apache.org/#contribute). 31 | 32 | The details are explained there, but the important items are: 33 | - Sign and submit an Apache ICLA (Contributor License Agreement). 34 | - Have a Jira issue open that corresponds to your contribution. 35 | - Run the tests so your patch doesn't break existing functionality. 36 | 37 | We look forward to your contributions! 38 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/NOTICE: -------------------------------------------------------------------------------- 1 | Apache Cordova 2 | Copyright 2012 The Apache Software Foundation 3 | 4 | This product includes software developed at 5 | The Apache Software Foundation (http://www.apache.org/). 6 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/README.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.device 21 | 22 | Plugin documentation: [doc/index.md](doc/index.md) 23 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/RELEASENOTES.md: -------------------------------------------------------------------------------- 1 | 21 | # Release Notes 22 | 23 | ### 0.2.1 (Sept 5, 2013) 24 | * removed extraneous print statement 25 | * [CB-4432] copyright notice change 26 | 27 | ### 0.2.3 (Sept 25, 2013) 28 | * CB-4889 bumping&resetting version 29 | * [windows8] commandProxy has moved 30 | * [BlackBerry10] removed uneeded permission tags in plugin.xml 31 | * CB-4889 renaming org.apache.cordova.core.device to org.apache.cordova.device 32 | * Rename CHANGELOG.md -> RELEASENOTES.md 33 | * updated to use commandProxy for ffos 34 | * add firefoxos support 35 | * [CB-4752] Incremented plugin version on dev branch. 36 | 37 | ### 0.2.4 (Oct 28, 2013) 38 | * CB-5128: added repo + issue tag in plugin.xml for device plugin 39 | * CB-5085 device.cordova returning wrong value 40 | * [CB-4915] Incremented plugin version on dev branch. 41 | 42 | ### 0.2.5 (Dec 4, 2013) 43 | * CB-5316 Spell Cordova as a brand unless it's a command or script 44 | * [ubuntu] use cordova/exec/proxy 45 | * add ubuntu platform 46 | * Modify Device.platform logic to use amazon-fireos as the platform for Amazon Devices 47 | * 1. Added amazon-fireos platform. 2. Change to use cordova-amazon-fireos as the platform if user agent contains 'cordova-amazon-fireos' 48 | 49 | ### 0.2.6 (Jan 02, 2014) 50 | * CB-5658 Add doc/index.md for Device plugin 51 | * CB-5504 Moving Telephony Logic out of Device 52 | 53 | ### 0.2.7 (Jan 07, 2014) 54 | * CB-5737 Fix exception on close caused by left over telephony code from CB-5504 55 | 56 | ### 0.2.8 (Feb 05, 2014) 57 | * Tizen support added 58 | 59 | ### 0.2.9 (Apr 17, 2014) 60 | * CB-5105: [Android, windows8, WP, BlackBerry10] Removed dead code for device.version 61 | * CB-6422: [windows8] use cordova/exec/proxy 62 | * CB-6460: Update license headers 63 | * Add NOTICE file 64 | 65 | ### 0.2.10 (Jun 05, 2014) 66 | * CB-6127 Spanish and French Translations added. Github close #12 67 | * Changing 1.5 to 2.0 68 | * added firefoxos version - conversion 69 | * added firefoxos version 70 | * CB-6800 Add license 71 | * CB-6491 add CONTRIBUTING.md 72 | 73 | ### 0.2.11 (Aug 06, 2014) 74 | * [FFOS] update DeviceProxy.js 75 | * CB-6127 Updated translations for docs 76 | * Use Windows system calls to get better info 77 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/doc/ja/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.device 21 | 22 | このプラグインをグローバル定義します `device` オブジェクトは、デバイスのハードウェアとソフトウェアについて説明します。 それは後まで利用可能なオブジェクトがグローバル スコープでは、 `deviceready` イベント。 23 | 24 | document.addEventListener("deviceready", onDeviceReady, false); 25 | function onDeviceReady() { 26 | console.log(device.cordova); 27 | } 28 | 29 | 30 | ## インストール 31 | 32 | cordova plugin add org.apache.cordova.device 33 | 34 | 35 | ## プロパティ 36 | 37 | * device.cordova 38 | * device.model 39 | * device.name 40 | * device.platform 41 | * device.uuid 42 | * device.version 43 | 44 | ## device.cordova 45 | 46 | デバイスで実行されているコルドバのバージョンを取得します。 47 | 48 | ### サポートされているプラットフォーム 49 | 50 | * アマゾン火 OS 51 | * アンドロイド 52 | * ブラックベリー 10 53 | * Firefox の OS 54 | * iOS 55 | * Tizen 56 | * Windows Phone 7 と 8 57 | * Windows 8 58 | 59 | ## device.model 60 | 61 | `device.model`、デバイスのモデルまたは製品の名前を返します。値は、デバイスの製造元によって設定され、同じ製品のバージョン間で異なる可能性があります。 62 | 63 | ### サポートされているプラットフォーム 64 | 65 | * アンドロイド 66 | * ブラックベリー 10 67 | * iOS 68 | * Tizen 69 | * Windows Phone 7 と 8 70 | * Windows 8 71 | 72 | ### 簡単な例 73 | 74 | //アンドロイド: ネクサス 1 つは「情熱」(ネクサス 1 つはコード名) を返します//モトローラドロイド「ハタネズミ」を返します。//ブラックベリー: トーチ 9800 を返します「9800」//iOS: iPad のミニ 5; iPad2 を返します。iPhone 5 は iPhone 5, 1 です。 Http://theiphonewiki.com/wiki/index.php?title=Models を参照してください//var モデル = device.model; 75 | 76 | 77 | ### Android の癖 78 | 79 | * 生産コード名は[モデル名][1]の代わりに[製品名][2]を取得します。 たとえば、ネクサス 1 つを返します `Passion` 、Motorola のドロイドを返します`voles`. 80 | 81 | [1]: http://developer.android.com/reference/android/os/Build.html#MODEL 82 | [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT 83 | 84 | ### Tizen の癖 85 | 86 | * たとえば、ベンダーによって割り当てられているデバイスのモデルを返します`TIZEN` 87 | 88 | ### Windows Phone 7 と 8 癖 89 | 90 | * 製造元によって指定されたデバイスのモデルを返します。たとえば、三星フォーカスを返します`SGH-i917`. 91 | 92 | ## device.name 93 | 94 | **警告**: `device.name` バージョン 2.3.0 は推奨されません。使用 `device.model` 代わりに。 95 | 96 | ## device.platform 97 | 98 | デバイスのオペレーティング システム名を取得します。 99 | 100 | var string = device.platform; 101 | 102 | 103 | ### サポートされているプラットフォーム 104 | 105 | * アンドロイド 106 | * ブラックベリー 10 107 | * Firefox の OS 108 | * iOS 109 | * Tizen 110 | * Windows Phone 7 と 8 111 | * Windows 8 112 | 113 | ### 簡単な例 114 | 115 | // Depending on the device, a few examples are: 116 | // - "Android" 117 | // - "BlackBerry 10" 118 | // - "iOS" 119 | // - "WinCE" 120 | // - "Tizen" 121 | var devicePlatform = device.platform; 122 | 123 | 124 | ### Windows Phone 7 の癖 125 | 126 | Windows Phone 7 デバイスとプラットフォームを報告します。`WinCE`. 127 | 128 | ### Windows Phone 8 癖 129 | 130 | Windows Phone 8 デバイスとプラットフォームを報告します。`Win32NT`. 131 | 132 | ## device.uuid 133 | 134 | デバイスのユニバーサル ・ ユニーク識別子 ([UUID][3]を取得します。). 135 | 136 | [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier 137 | 138 | var string = device.uuid; 139 | 140 | 141 | ### 説明 142 | 143 | UUID を生成する方法の詳細は、デバイスの製造元によって決定され、デバイスのプラットフォームやモデルに固有です。 144 | 145 | ### サポートされているプラットフォーム 146 | 147 | * アンドロイド 148 | * ブラックベリー 10 149 | * iOS 150 | * Tizen 151 | * Windows Phone 7 と 8 152 | * Windows 8 153 | 154 | ### 簡単な例 155 | 156 | //アンドロイド: ランダムな 64 ビットの整数 (を文字列として返します、再び !)/デバイスの最初の起動時に生成される整数/////ブラックベリー: デバイスのピン番号を返します//これは 9 桁の一意な整数 (を文字列としても !)////iPhone: (UIDevice クラスのドキュメントから言い換え)//識別複数のハードウェアから作成されたハッシュ値の文字列を返します。。 157 | //それはすべてのデバイスに対して一意であることが保証され、接続することはできません//ユーザー アカウント。 158 | //Windows Phone 7: デバイス + 現在のユーザーのハッシュを返します//ユーザーが定義されていない場合 guid が生成され、アプリがアンインストールされるまで保持されます//Tizen: デバイスの IMEI を返します (国際モバイル機器アイデンティティまたは IMEI は番号です//すべての GSM および UMTS の携帯電話に固有です。 159 | var deviceID = device.uuid; 160 | 161 | 162 | ### iOS の気まぐれ 163 | 164 | `uuid`IOS で、デバイスに固有はありませんインストールごと、アプリケーションごとに異なります。 削除、アプリを再インストールした場合に変更と多分またときアップグレード iOS の, またはもアップグレードするアプリ (iOS の 5.1 で明らかに) バージョンごと。 `uuid`は信頼性の高い値ではありません。 165 | 166 | ### Windows Phone 7 と 8 癖 167 | 168 | `uuid`のために Windows Phone 7 には、権限が必要です `ID_CAP_IDENTITY_DEVICE` 。 Microsoft はすぐにこのプロパティを廃止して可能性があります。 機能が利用できない場合、アプリケーションはデバイスへのアプリケーションのインストールの持続期間のために保持されている永続的な guid を生成します。 169 | 170 | ## device.version 171 | 172 | オペレーティング システムのバージョンを取得します。 173 | 174 | var string = device.version; 175 | 176 | 177 | ### サポートされているプラットフォーム 178 | 179 | * アンドロイド 2.1 + 180 | * ブラックベリー 10 181 | * iOS 182 | * Tizen 183 | * Windows Phone 7 と 8 184 | * Windows 8 185 | 186 | ### 簡単な例 187 | 188 | //アンドロイド: フローズン ヨーグルト OS は「2.2」を返します/エクレア OS は「2.1」、「2.0.1」、または「2.0」を返します//バージョンも返すことができます/レベル"2.1 update1"を更新////ブラックベリー: トーチ 9800 OS 6.0 を使用しては「6.0.0.600」を返します////iPhone: iOS 3.2 返します「3.2」////Windows Phone 7: ex 現在の OS のバージョン番号を返します。 on Mango returns 7.10.7720 189 | // Tizen: returns "TIZEN_20120425_2" 190 | var deviceVersion = device.version; -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/doc/ko/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.device 21 | 22 | 이 플러그인 정의 전역 `device` 개체, 디바이스의 하드웨어 및 소프트웨어에 설명 합니다. 개체는 전역 범위에서 비록 그것은 후까지 사용할 수 있는 `deviceready` 이벤트. 23 | 24 | document.addEventListener("deviceready", onDeviceReady, false); 25 | function onDeviceReady() { 26 | console.log(device.cordova); 27 | } 28 | 29 | 30 | ## 설치 31 | 32 | cordova plugin add org.apache.cordova.device 33 | 34 | 35 | ## 속성 36 | 37 | * device.cordova 38 | * device.model 39 | * device.name 40 | * device.platform 41 | * device.uuid 42 | * device.version 43 | 44 | ## device.cordova 45 | 46 | 코르도바는 장치에서 실행 중인 버전을 얻을. 47 | 48 | ### 지원 되는 플랫폼 49 | 50 | * 아마존 화재 운영 체제 51 | * 안 드 로이드 52 | * 블랙베리 10 53 | * Firefox 운영 체제 54 | * iOS 55 | * Tizen 56 | * Windows Phone 7과 8 57 | * 윈도우 8 58 | 59 | ## device.model 60 | 61 | `device.model`소자의 모델 또는 제품의 이름을 반환 합니다. 값 장치 제조업체에서 설정 되 고 동일 제품의 버전 간에 다를 수 있습니다. 62 | 63 | ### 지원 되는 플랫폼 64 | 65 | * 안 드 로이드 66 | * 블랙베리 10 67 | * iOS 68 | * Tizen 69 | * Windows Phone 7과 8 70 | * 윈도우 8 71 | 72 | ### 빠른 예제 73 | 74 | / / 안 드 로이드: 넥서스 하나는 "열정" (넥서스 하나의 코드 이름)를 반환 합니다 / 모토로라 Droid 반환 "밭" / / / 블랙베리: 토치 9800 반환 "9800" / / iOS: iPad 미니, 반환 iPad2, 5; 아이폰 5 아이폰 5, 1 이다입니다. Http://theiphonewiki.com/wiki/index.php?title=Models 참조 / / var 모델 = device.model; 75 | 76 | 77 | ### 안 드 로이드 단점 78 | 79 | * 어떤은 종종 프로덕션 코드 이름 대신 [제품 모델 이름][1], [제품 이름][2] 을 가져옵니다. 예를 들어 넥서스 하나 반환 합니다 `Passion` , 모토로라 Droid를 반환 합니다`voles`. 80 | 81 | [1]: http://developer.android.com/reference/android/os/Build.html#MODEL 82 | [2]: http://developer.android.com/reference/android/os/Build.html#PRODUCT 83 | 84 | ### Tizen 특수 85 | 86 | * 예를 들어, 공급 업체에 의해 할당 된 디바이스 모델을 반환 합니다.`TIZEN` 87 | 88 | ### Windows Phone 7, 8 특수 89 | 90 | * 제조업체에서 지정 하는 장치 모델을 반환 합니다. 예를 들어 삼성 포커스를 반환 합니다.`SGH-i917`. 91 | 92 | ## device.name 93 | 94 | **경고**: `device.name` 버전 2.3.0는 사용 되지 않습니다. 사용 `device.model` 대신. 95 | 96 | ## device.platform 97 | 98 | 장치의 운영 체제 이름을 얻을. 99 | 100 | var string = device.platform; 101 | 102 | 103 | ### 지원 되는 플랫폼 104 | 105 | * 안 드 로이드 106 | * 블랙베리 10 107 | * Firefox 운영 체제 108 | * iOS 109 | * Tizen 110 | * Windows Phone 7과 8 111 | * 윈도우 8 112 | 113 | ### 빠른 예제 114 | 115 | // Depending on the device, a few examples are: 116 | // - "Android" 117 | // - "BlackBerry 10" 118 | // - "iOS" 119 | // - "WinCE" 120 | // - "Tizen" 121 | var devicePlatform = device.platform; 122 | 123 | 124 | ### Windows Phone 7 단점 125 | 126 | Windows Phone 7 장치 보고 플랫폼으로`WinCE`. 127 | 128 | ### Windows Phone 8 단점 129 | 130 | Windows Phone 8 장치 보고 플랫폼으로`Win32NT`. 131 | 132 | ## device.uuid 133 | 134 | 소자의 보편적으로 고유 식별자 ([UUID][3] 를 얻을합니다). 135 | 136 | [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier 137 | 138 | var string = device.uuid; 139 | 140 | 141 | ### 설명 142 | 143 | UUID 생성 방법의 자세한 내용은 장치 제조업체에 의해 결정 됩니다 및 소자의 플랫폼 이나 모델. 144 | 145 | ### 지원 되는 플랫폼 146 | 147 | * 안 드 로이드 148 | * 블랙베리 10 149 | * iOS 150 | * Tizen 151 | * Windows Phone 7과 8 152 | * 윈도우 8 153 | 154 | ### 빠른 예제 155 | 156 | / / 안 드 로이드: (문자열로 다시!) 임의의 64 비트 정수를 반환 합니다 / / 정수 장치의 첫 번째 부팅에서 생성 / / / / 블랙베리: 디바이스의 핀 번호를 반환 합니다 / / 이것은 9 자리 고유 정수 (문자열로 비록!) / / / / 아이폰: (UIDevice 클래스 설명서에서 읊 었) / / 문자열 여러 하드웨어에서 생성 하는 해시 값을 식별 하는 반환 합니다. 157 | / 그것은 모든 장치에 대 한 고유 해야 보장 되 고 묶일 수 없습니다 / / / 사용자 계정에. 158 | / / Windows Phone 7: 장치 + 현재 사용자의 해시를 반환 합니다 / / 사용자 정의 되지 않은 경우 guid 생성 되 고 응용 프로그램을 제거할 때까지 유지 됩니다 / / Tizen: 반환 장치 IMEI (국제 모바일 기기 식별 또는 IMEI 숫자입니다 / / 모든 GSM와 UMTS 휴대 전화 고유. 159 | var deviceID = device.uuid; 160 | 161 | 162 | ### iOS 특질 163 | 164 | `uuid`ios 장치에 고유 하지 않습니다 하지만 각 설치에 대 한 응용 프로그램 마다 다릅니다. 삭제 하 고 다시 애플 리 케이 션을 설치 하는 경우 변경 가능 하 게 또한 iOS를 업그레이드 하거나 때 버전 (iOS 5.1에에서 명백한) 당 응용 프로그램 업그레이드도 하 고. `uuid`은 신뢰할 수 있는 값이 아닙니다. 165 | 166 | ### Windows Phone 7, 8 특수 167 | 168 | `uuid`Windows Phone 7 필요 허가 `ID_CAP_IDENTITY_DEVICE` . Microsoft는 곧이 속성을 세웁니다 가능성이 것입니다. 기능을 사용할 수 없는 경우 응용 프로그램 장치에 응용 프로그램의 설치 하는 동안 유지 하는 영구 guid를 생성 합니다. 169 | 170 | ## device.version 171 | 172 | 운영 체제 버전을 얻을. 173 | 174 | var string = device.version; 175 | 176 | 177 | ### 지원 되는 플랫폼 178 | 179 | * 안 드 로이드 2.1 + 180 | * 블랙베리 10 181 | * iOS 182 | * Tizen 183 | * Windows Phone 7과 8 184 | * 윈도우 8 185 | 186 | ### 빠른 예제 187 | 188 | / / 안 드 로이드: Froyo OS "2.2" 반환 / Eclair OS "2.1", "2.0.1", 또는 "2.0" 돌려보낼 것입니다 / / 버전 반환할 수 있습니다 / 업데이트 수준 "2.1 update1" / / / / 블랙베리: 토치 9800 OS 6.0을 사용 하 여 "6.0.0.600"를 반환 / / / / 아이폰: iOS 3.2 반환 "3.2" / / / / Windows Phone 7: 전 현재 운영 체제 버전 번호를 반환 합니다. on Mango returns 7.10.7720 189 | // Tizen: returns "TIZEN_20120425_2" 190 | var deviceVersion = device.version; -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/doc/zh/index.md: -------------------------------------------------------------------------------- 1 | 19 | 20 | # org.apache.cordova.device 21 | 22 | 這個外掛程式定義全球 `device` 物件,描述該設備的硬體和軟體。 雖然物件是在全球範圍內,但不是可用,直到後 `deviceready` 事件。 23 | 24 | document.addEventListener("deviceready", onDeviceReady, false); 25 | function onDeviceReady() { 26 | console.log(device.cordova); 27 | } 28 | 29 | 30 | ## 安裝 31 | 32 | cordova plugin add org.apache.cordova.device 33 | 34 | 35 | ## 屬性 36 | 37 | * device.cordova 38 | * device.model 39 | * device.name 40 | * device.platform 41 | * device.uuid 42 | * device.version 43 | 44 | ## device.cordova 45 | 46 | 獲取科爾多瓦在設備上運行的版本。 47 | 48 | ### 支援的平臺 49 | 50 | * 亞馬遜火 OS 51 | * Android 系統 52 | * 黑莓 10 53 | * 火狐瀏覽器作業系統 54 | * iOS 55 | * Tizen 56 | * Windows Phone 7 和 8 57 | * Windows 8 58 | 59 | ## device.model 60 | 61 | `device.model`返回設備的模型或產品的名稱。值由設備製造商設置和同一產品的不同版本可能不同。 62 | 63 | ### 支援的平臺 64 | 65 | * Android 系統 66 | * 黑莓 10 67 | * iOS 68 | * Tizen 69 | * Windows Phone 7 和 8 70 | * Windows 8 71 | 72 | ### 快速的示例 73 | 74 | / / Android: Nexus 返回"激情"(Nexus One 代碼名稱) / / 摩托羅拉 Droid 返回"田鼠"/ / 黑莓手機: 火炬 9800 返回"9800"/ / iOS: 迷你 ipad,返回與 iPad2,5 ;iPhone 5 是 iPhone 5,1。 請參閱 HTTP://theiphonewiki.com/wiki/index.php?title=Models / / var 模型 = device.model ; 75 | 76 | 77 | ### Android 的怪癖 78 | 79 | * 獲取[產品名稱][1]而不是[產品型號名稱][2],這往往是生產代碼名稱。 例如,Nexus One 返回 `Passion` ,和摩托羅拉 Droid 返回`voles`. 80 | 81 | [1]: http://developer.android.com/reference/android/os/Build.html#PRODUCT 82 | [2]: http://developer.android.com/reference/android/os/Build.html#MODEL 83 | 84 | ### Tizen 怪癖 85 | 86 | * 例如,返回與供應商指派的設備模型`TIZEN` 87 | 88 | ### Windows Phone 7 和 8 怪癖 89 | 90 | * 返回由製造商指定的設備模型。例如,三星焦點返回`SGH-i917`. 91 | 92 | ## device.name 93 | 94 | **警告**: `device.name` 從版 2.3.0 已被否決。使用 `device.model` 相反。 95 | 96 | ## device.platform 97 | 98 | 獲取該設備的作業系統名稱。 99 | 100 | var string = device.platform; 101 | 102 | 103 | ### 支援的平臺 104 | 105 | * Android 系統 106 | * 黑莓 10 107 | * 火狐瀏覽器作業系統 108 | * iOS 109 | * Tizen 110 | * Windows Phone 7 和 8 111 | * Windows 8 112 | 113 | ### 快速的示例 114 | 115 | // Depending on the device, a few examples are: 116 | // - "Android" 117 | // - "BlackBerry 10" 118 | // - "iOS" 119 | // - "WinCE" 120 | // - "Tizen" 121 | var devicePlatform = device.platform; 122 | 123 | 124 | ### Windows Phone 7 的怪癖 125 | 126 | Windows Phone 7 設備報告作為平臺`WinCE`. 127 | 128 | ### Windows Phone 8 怪癖 129 | 130 | Windows Phone 8 設備報告作為平臺`Win32NT`. 131 | 132 | ## device.uuid 133 | 134 | 獲取設備的通用唯一識別碼 ([UUID][3]). 135 | 136 | [3]: http://en.wikipedia.org/wiki/Universally_Unique_Identifier 137 | 138 | var string = device.uuid; 139 | 140 | 141 | ### 說明 142 | 143 | UUID 如何生成的詳細資訊由設備製造商和特定于設備的平臺或模型。 144 | 145 | ### 支援的平臺 146 | 147 | * Android 系統 148 | * 黑莓 10 149 | * iOS 150 | * Tizen 151 | * Windows Phone 7 和 8 152 | * Windows 8 153 | 154 | ### 快速的示例 155 | 156 | / / Android: 一個隨機的 64 位整數 (作為字串返回,再次!) / / 上設備的第一次啟動生成的整數 / / / / 黑莓手機: 返回設備的 PIN 號碼 / / 這是九個數字的唯一整數 (作為字串,雖然!) / / / / iPhone: (從 UIDevice 類文檔解釋) / / 返回一個字串的雜湊值創建的多個硬體標識。 157 | / / 它保證是唯一的每個設備並不能綁 / / 到使用者帳戶。 158 | / / Windows Phone 7: 返回的雜湊代碼的設備 + 當前使用者,/ / 如果未定義使用者,則一個 guid 生成的並且將會保留直到卸載該應用程式 / / Tizen: 返回設備 IMEI (國際行動裝置身份或 IMEI 是一個數位 / / 獨有的每一個 UMTS 和 GSM 行動電話。 159 | var deviceID = device.uuid; 160 | 161 | 162 | ### iOS 怪癖 163 | 164 | `uuid`在 iOS 上不是獨有的一種設備,但對於每個應用程式,為每個安裝各不相同。 如果您刪除並重新安裝應用程式,它會更改和可能還當你升級 iOS,或甚至升級每個版本 (明顯在 iOS 5.1 中) 的應用程式。 `uuid`不是一個可靠的值。 165 | 166 | ### Windows Phone 7 和 8 怪癖 167 | 168 | `uuid`為 Windows Phone 7 需要許可權 `ID_CAP_IDENTITY_DEVICE` 。 Microsoft 可能會很快就棄用此屬性。 如果能力不是可用的應用程式將生成一個持久性的 guid 並保持應用程式的安裝在設備上的持續時間。 169 | 170 | ## device.version 171 | 172 | 獲取作業系統版本。 173 | 174 | var string = device.version; 175 | 176 | 177 | ### 支援的平臺 178 | 179 | * Android 2.1 + 180 | * 黑莓 10 181 | * iOS 182 | * Tizen 183 | * Windows Phone 7 和 8 184 | * Windows 8 185 | 186 | ### 快速的示例 187 | 188 | / / Android: Froyo OS 將返回"2.2"/ / Eclair OS 將返回"2.1"、"2.0.1"2.0"/ / 版本,也可以返回更新級別"2.1 update1"/ / / / 黑莓手機: 火炬 9800 使用 OS 6.0 將返回"6.0.0.600"/ / / / iPhone: iOS 3.2 返回"3.2"/ / / / Windows Phone 7: 返回當前 OS 版本數,。 on Mango returns 7.10.7720 189 | // Tizen: returns "TIZEN_20120425_2" 190 | var deviceVersion = device.version; -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "0.2.11", 3 | "name": "org.apache.cordova.device", 4 | "cordova_name": "Device", 5 | "description": "Cordova Device Plugin", 6 | "license": "Apache 2.0", 7 | "repo": "https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git", 8 | "issue": "https://issues.apache.org/jira/browse/CB/component/12320648", 9 | "keywords": [ 10 | "cordova", 11 | "device" 12 | ], 13 | "platforms": [ 14 | "firefoxos", 15 | "tizen", 16 | "android", 17 | "amazon-fireos", 18 | "ubuntu", 19 | "ios", 20 | "blackberry10", 21 | "wp7", 22 | "wp8", 23 | "windows8" 24 | ], 25 | "engines": [], 26 | "englishdoc": "\n\n# org.apache.cordova.device\n\nThis plugin defines a global `device` object, which describes the device's hardware and software.\nAlthough the object is in the global scope, it is not available until after the `deviceready` event.\n\n document.addEventListener(\"deviceready\", onDeviceReady, false);\n function onDeviceReady() {\n console.log(device.cordova);\n }\n\n## Installation\n\n cordova plugin add org.apache.cordova.device\n\n## Properties\n\n- device.cordova\n- device.model\n- device.name\n- device.platform\n- device.uuid\n- device.version\n\n## device.cordova\n\nGet the version of Cordova running on the device.\n\n### Supported Platforms\n\n- Amazon Fire OS\n- Android\n- BlackBerry 10\n- Firefox OS\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n## device.model\n\nThe `device.model` returns the name of the device's model or\nproduct. The value is set by the device manufacturer and may be\ndifferent across versions of the same product.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Nexus One returns \"Passion\" (Nexus One code name)\n // Motorola Droid returns \"voles\"\n // BlackBerry: Torch 9800 returns \"9800\"\n // iOS: for the iPad Mini, returns iPad2,5; iPhone 5 is iPhone 5,1. See http://theiphonewiki.com/wiki/index.php?title=Models\n //\n var model = device.model;\n\n### Android Quirks\n\n- Gets the [product name](http://developer.android.com/reference/android/os/Build.html#PRODUCT) instead of the [model name](http://developer.android.com/reference/android/os/Build.html#MODEL), which is often the production code name. For example, the Nexus One returns `Passion`, and Motorola Droid returns `voles`.\n\n### Tizen Quirks\n\n- Returns the device model assigned by the vendor, for example, `TIZEN`\n\n### Windows Phone 7 and 8 Quirks\n\n- Returns the device model specified by the manufacturer. For example, the Samsung Focus returns `SGH-i917`.\n\n## device.name\n\n__WARNING__: `device.name` is deprecated as of version 2.3.0. Use `device.model` instead.\n\n## device.platform\n\nGet the device's operating system name.\n\n var string = device.platform;\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- Firefox OS\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Depending on the device, a few examples are:\n // - \"Android\"\n // - \"BlackBerry 10\"\n // - \"iOS\"\n // - \"WinCE\"\n // - \"Tizen\"\n var devicePlatform = device.platform;\n\n### Windows Phone 7 Quirks\n\nWindows Phone 7 devices report the platform as `WinCE`.\n\n### Windows Phone 8 Quirks\n\nWindows Phone 8 devices report the platform as `Win32NT`.\n\n## device.uuid\n\nGet the device's Universally Unique Identifier ([UUID](http://en.wikipedia.org/wiki/Universally_Unique_Identifier)).\n\n var string = device.uuid;\n\n### Description\n\nThe details of how a UUID is generated are determined by the device manufacturer and are specific to the device's platform or model.\n\n### Supported Platforms\n\n- Android\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Returns a random 64-bit integer (as a string, again!)\n // The integer is generated on the device's first boot\n //\n // BlackBerry: Returns the PIN number of the device\n // This is a nine-digit unique integer (as a string, though!)\n //\n // iPhone: (Paraphrased from the UIDevice Class documentation)\n // Returns a string of hash values created from multiple hardware identifies.\n // It is guaranteed to be unique for every device and can't be tied\n // to the user account.\n // Windows Phone 7 : Returns a hash of device+current user,\n // if the user is not defined, a guid is generated and will persist until the app is uninstalled\n // Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number\n // unique to every GSM and UMTS mobile phone.\n var deviceID = device.uuid;\n\n### iOS Quirk\n\nThe `uuid` on iOS is not unique to a device, but varies for each\napplication, for each installation. It changes if you delete and\nre-install the app, and possibly also when you upgrade iOS, or even\nupgrade the app per version (apparent in iOS 5.1). The `uuid` is not\na reliable value.\n\n### Windows Phone 7 and 8 Quirks\n\nThe `uuid` for Windows Phone 7 requires the permission\n`ID_CAP_IDENTITY_DEVICE`. Microsoft will likely deprecate this\nproperty soon. If the capability is not available, the application\ngenerates a persistent guid that is maintained for the duration of the\napplication's installation on the device.\n\n## device.version\n\nGet the operating system version.\n\n var string = device.version;\n\n### Supported Platforms\n\n- Android 2.1+\n- BlackBerry 10\n- iOS\n- Tizen\n- Windows Phone 7 and 8\n- Windows 8\n\n### Quick Example\n\n // Android: Froyo OS would return \"2.2\"\n // Eclair OS would return \"2.1\", \"2.0.1\", or \"2.0\"\n // Version can also return update level \"2.1-update1\"\n //\n // BlackBerry: Torch 9800 using OS 6.0 would return \"6.0.0.600\"\n //\n // iPhone: iOS 3.2 returns \"3.2\"\n //\n // Windows Phone 7: returns current OS version number, ex. on Mango returns 7.10.7720\n // Tizen: returns \"TIZEN_20120425_2\"\n var deviceVersion = device.version;\n\n" 27 | } -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 26 | Device 27 | Cordova Device Plugin 28 | Apache 2.0 29 | cordova,device 30 | https://git-wip-us.apache.org/repos/asf/cordova-plugin-device.git 31 | https://issues.apache.org/jira/browse/CB/component/12320648 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | read_device_identifying_information 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/android/Device.java: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | package org.apache.cordova.device; 20 | 21 | import java.util.TimeZone; 22 | 23 | import org.apache.cordova.CordovaWebView; 24 | import org.apache.cordova.CallbackContext; 25 | import org.apache.cordova.CordovaPlugin; 26 | import org.apache.cordova.CordovaInterface; 27 | import org.json.JSONArray; 28 | import org.json.JSONException; 29 | import org.json.JSONObject; 30 | 31 | import android.provider.Settings; 32 | 33 | public class Device extends CordovaPlugin { 34 | public static final String TAG = "Device"; 35 | 36 | public static String platform; // Device OS 37 | public static String uuid; // Device UUID 38 | 39 | private static final String ANDROID_PLATFORM = "Android"; 40 | private static final String AMAZON_PLATFORM = "amazon-fireos"; 41 | private static final String AMAZON_DEVICE = "Amazon"; 42 | 43 | /** 44 | * Constructor. 45 | */ 46 | public Device() { 47 | } 48 | 49 | /** 50 | * Sets the context of the Command. This can then be used to do things like 51 | * get file paths associated with the Activity. 52 | * 53 | * @param cordova The context of the main Activity. 54 | * @param webView The CordovaWebView Cordova is running in. 55 | */ 56 | public void initialize(CordovaInterface cordova, CordovaWebView webView) { 57 | super.initialize(cordova, webView); 58 | Device.uuid = getUuid(); 59 | } 60 | 61 | /** 62 | * Executes the request and returns PluginResult. 63 | * 64 | * @param action The action to execute. 65 | * @param args JSONArry of arguments for the plugin. 66 | * @param callbackContext The callback id used when calling back into JavaScript. 67 | * @return True if the action was valid, false if not. 68 | */ 69 | public boolean execute(String action, JSONArray args, CallbackContext callbackContext) throws JSONException { 70 | if (action.equals("getDeviceInfo")) { 71 | JSONObject r = new JSONObject(); 72 | r.put("uuid", Device.uuid); 73 | r.put("version", this.getOSVersion()); 74 | r.put("platform", this.getPlatform()); 75 | r.put("model", this.getModel()); 76 | callbackContext.success(r); 77 | } 78 | else { 79 | return false; 80 | } 81 | return true; 82 | } 83 | 84 | //-------------------------------------------------------------------------- 85 | // LOCAL METHODS 86 | //-------------------------------------------------------------------------- 87 | 88 | /** 89 | * Get the OS name. 90 | * 91 | * @return 92 | */ 93 | public String getPlatform() { 94 | String platform; 95 | if (isAmazonDevice()) { 96 | platform = AMAZON_PLATFORM; 97 | } else { 98 | platform = ANDROID_PLATFORM; 99 | } 100 | return platform; 101 | } 102 | 103 | /** 104 | * Get the device's Universally Unique Identifier (UUID). 105 | * 106 | * @return 107 | */ 108 | public String getUuid() { 109 | String uuid = Settings.Secure.getString(this.cordova.getActivity().getContentResolver(), android.provider.Settings.Secure.ANDROID_ID); 110 | return uuid; 111 | } 112 | 113 | public String getModel() { 114 | String model = android.os.Build.MODEL; 115 | return model; 116 | } 117 | 118 | public String getProductName() { 119 | String productname = android.os.Build.PRODUCT; 120 | return productname; 121 | } 122 | 123 | /** 124 | * Get the OS version. 125 | * 126 | * @return 127 | */ 128 | public String getOSVersion() { 129 | String osversion = android.os.Build.VERSION.RELEASE; 130 | return osversion; 131 | } 132 | 133 | public String getSDKVersion() { 134 | @SuppressWarnings("deprecation") 135 | String sdkversion = android.os.Build.VERSION.SDK; 136 | return sdkversion; 137 | } 138 | 139 | public String getTimeZoneID() { 140 | TimeZone tz = TimeZone.getDefault(); 141 | return (tz.getID()); 142 | } 143 | 144 | /** 145 | * Function to check if the device is manufactured by Amazon 146 | * 147 | * @return 148 | */ 149 | public boolean isAmazonDevice() { 150 | if (android.os.Build.MANUFACTURER.equals(AMAZON_DEVICE)) { 151 | return true; 152 | } 153 | return false; 154 | } 155 | 156 | } 157 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/blackberry10/index.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | function getModelName () { 23 | var modelName = window.qnx.webplatform.device.modelName; 24 | //Pre 10.2 (meaning Z10 or Q10) 25 | if (typeof modelName === "undefined") { 26 | if (window.screen.height === 720 && window.screen.width === 720) { 27 | if ( window.matchMedia("(-blackberry-display-technology: -blackberry-display-oled)").matches) { 28 | modelName = "Q10"; 29 | } else { 30 | modelName = "Q5"; 31 | } 32 | } else if ((window.screen.height === 1280 && window.screen.width === 768) || 33 | (window.screen.height === 768 && window.screen.width === 1280)) { 34 | modelName = "Z10"; 35 | } else { 36 | modelName = window.qnx.webplatform.deviceName; 37 | } 38 | } 39 | 40 | return modelName; 41 | } 42 | 43 | function getUUID () { 44 | var uuid = ""; 45 | try { 46 | //Must surround by try catch because this will throw if the app is missing permissions 47 | uuid = window.qnx.webplatform.device.devicePin; 48 | } catch (e) { 49 | //DO Nothing 50 | } 51 | return uuid; 52 | } 53 | 54 | module.exports = { 55 | getDeviceInfo: function (success, fail, args, env) { 56 | var result = new PluginResult(args, env), 57 | modelName = getModelName(), 58 | uuid = getUUID(), 59 | info = { 60 | platform: "blackberry10", 61 | version: window.qnx.webplatform.device.scmBundle, 62 | model: modelName, 63 | uuid: uuid 64 | }; 65 | 66 | result.ok(info); 67 | } 68 | }; 69 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/firefoxos/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | //example UA String for Firefox OS 22 | //Mozilla/5.0 (Mobile; rv:26.0) Gecko/26.0 Firefox/26.0 23 | var firefoxos = require('cordova/platform'); 24 | var cordova = require('cordova'); 25 | 26 | //UA parsing not recommended but currently this is the only way to get the Firefox OS version 27 | //https://developer.mozilla.org/en-US/docs/Gecko_user_agent_string_reference 28 | 29 | //Should be replaced when better conversion to Firefox OS Version is available 30 | function convertVersionNumber(ver) { 31 | var hashVersion = { 32 | '18.0': '1.0.1', 33 | '18.1': '1.1', 34 | '26.0': '1.2', 35 | '28.0': '1.3', 36 | '30.0': '1.4', 37 | '32.0': '2.0' 38 | }; 39 | var rver = ver; 40 | var sStr = ver.substring(0, 4); 41 | if (hashVersion[sStr]) { 42 | rver = hashVersion[sStr]; 43 | } 44 | return (rver); 45 | 46 | } 47 | function getVersion() { 48 | if (navigator.userAgent.match(/(mobile|tablet)/i)) { 49 | var ffVersionArray = (navigator.userAgent.match(/Firefox\/([\d]+\.[\w]?\.?[\w]+)/)); 50 | if (ffVersionArray.length === 2) { 51 | return (convertVersionNumber(ffVersionArray[1])); 52 | } 53 | } 54 | return (null); 55 | } 56 | 57 | function getModel() { 58 | var uaArray = navigator.userAgent.split(/\s*[;)(]\s*/); 59 | if (navigator.userAgent.match(/(mobile|tablet)/i)) { 60 | if (uaArray.length === 5) { 61 | return (uaArray[2]); 62 | } 63 | } 64 | return (null); 65 | } 66 | module.exports = { 67 | getDeviceInfo: function (success, error) { 68 | setTimeout(function () { 69 | success({ 70 | cordova: firefoxos.cordovaVersion, 71 | platform: 'firefoxos', 72 | model: getModel(), 73 | version: getVersion(), 74 | uuid: null 75 | }); 76 | }, 0); 77 | } 78 | }; 79 | 80 | require("cordova/exec/proxy").add("Device", module.exports); -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ios/CDVDevice.h: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #import 21 | #import 22 | 23 | @interface CDVDevice : CDVPlugin 24 | {} 25 | 26 | + (NSString*)cordovaVersion; 27 | 28 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ios/CDVDevice.m: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed to the Apache Software Foundation (ASF) under one 3 | or more contributor license agreements. See the NOTICE file 4 | distributed with this work for additional information 5 | regarding copyright ownership. The ASF licenses this file 6 | to you under the Apache License, Version 2.0 (the 7 | "License"); you may not use this file except in compliance 8 | with the License. You may obtain a copy of the License at 9 | 10 | http://www.apache.org/licenses/LICENSE-2.0 11 | 12 | Unless required by applicable law or agreed to in writing, 13 | software distributed under the License is distributed on an 14 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 | KIND, either express or implied. See the License for the 16 | specific language governing permissions and limitations 17 | under the License. 18 | */ 19 | 20 | #include 21 | #include 22 | 23 | #import 24 | #import "CDVDevice.h" 25 | 26 | @implementation UIDevice (ModelVersion) 27 | 28 | - (NSString*)modelVersion 29 | { 30 | size_t size; 31 | 32 | sysctlbyname("hw.machine", NULL, &size, NULL, 0); 33 | char* machine = malloc(size); 34 | sysctlbyname("hw.machine", machine, &size, NULL, 0); 35 | NSString* platform = [NSString stringWithUTF8String:machine]; 36 | free(machine); 37 | 38 | return platform; 39 | } 40 | 41 | @end 42 | 43 | @interface CDVDevice () {} 44 | @end 45 | 46 | @implementation CDVDevice 47 | 48 | - (void)getDeviceInfo:(CDVInvokedUrlCommand*)command 49 | { 50 | NSDictionary* deviceProperties = [self deviceProperties]; 51 | CDVPluginResult* pluginResult = [CDVPluginResult resultWithStatus:CDVCommandStatus_OK messageAsDictionary:deviceProperties]; 52 | 53 | /* Settings.plist 54 | * Read the optional Settings.plist file and push these user-defined settings down into the web application. 55 | * This can be useful for supplying build-time configuration variables down to the app to change its behavior, 56 | * such as specifying Full / Lite version, or localization (English vs German, for instance). 57 | */ 58 | // TODO: turn this into an iOS only plugin 59 | NSDictionary* temp = [CDVViewController getBundlePlist:@"Settings"]; 60 | 61 | if ([temp respondsToSelector:@selector(JSONString)]) { 62 | NSLog(@"Deprecation warning: window.Setting will be removed Aug 2013. Refer to https://issues.apache.org/jira/browse/CB-2433"); 63 | NSString* js = [NSString stringWithFormat:@"window.Settings = %@;", [temp JSONString]]; 64 | [self.commandDelegate evalJs:js]; 65 | } 66 | 67 | [self.commandDelegate sendPluginResult:pluginResult callbackId:command.callbackId]; 68 | } 69 | 70 | - (NSDictionary*)deviceProperties 71 | { 72 | UIDevice* device = [UIDevice currentDevice]; 73 | NSMutableDictionary* devProps = [NSMutableDictionary dictionaryWithCapacity:4]; 74 | 75 | [devProps setObject:[device modelVersion] forKey:@"model"]; 76 | [devProps setObject:@"iOS" forKey:@"platform"]; 77 | [devProps setObject:[device systemVersion] forKey:@"version"]; 78 | [devProps setObject:[device uniqueAppInstanceIdentifier] forKey:@"uuid"]; 79 | [devProps setObject:[[self class] cordovaVersion] forKey:@"cordova"]; 80 | 81 | NSDictionary* devReturn = [NSDictionary dictionaryWithDictionary:devProps]; 82 | return devReturn; 83 | } 84 | 85 | + (NSString*)cordovaVersion 86 | { 87 | return CDV_VERSION; 88 | } 89 | 90 | @end 91 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/tizen/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var tizen = require('cordova/platform'); 23 | var cordova = require('cordova'); 24 | 25 | module.exports = { 26 | getDeviceInfo: function(success, error) { 27 | setTimeout(function () { 28 | success({ 29 | cordova: tizen.cordovaVersion, 30 | platform: 'tizen', 31 | model: null, 32 | version: null, 33 | uuid: null 34 | }); 35 | }, 0); 36 | } 37 | }; 38 | 39 | require("cordova/tizen/commandProxy").add("Device", module.exports); 40 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.cpp: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #include 18 | #include 19 | 20 | #include"device.h" 21 | 22 | #define CORDOVA "3.0.0" 23 | 24 | Device::Device(Cordova *cordova) : CPlugin(cordova) { 25 | } 26 | 27 | static QString getOSName() { 28 | #ifdef Q_OS_SYMBIAN 29 | QString platform = "Symbian"; 30 | #endif 31 | #ifdef Q_OS_WIN 32 | QString platform = "Windows"; 33 | #endif 34 | #ifdef Q_OS_WINCE 35 | QString platform = "Windows CE"; 36 | #endif 37 | #ifdef Q_OS_LINUX 38 | QString platform = "Linux"; 39 | #endif 40 | return platform; 41 | } 42 | 43 | void Device::getInfo(int scId, int ecId) { 44 | Q_UNUSED(ecId) 45 | 46 | QDeviceInfo systemDeviceInfo; 47 | QDeviceInfo systemInfo; 48 | 49 | QString platform = getOSName(); 50 | 51 | QString uuid = systemDeviceInfo.uniqueDeviceID(); 52 | if (uuid.isEmpty()) { 53 | QString deviceDescription = systemInfo.imei(0) + ";" + systemInfo.manufacturer() + ";" + systemInfo.model() + ";" + systemInfo.productName() + ";" + platform; 54 | QString user = qgetenv("USER"); 55 | if (user.isEmpty()) { 56 | user = qgetenv("USERNAME"); 57 | if (user.isEmpty()) 58 | user = QDir::homePath(); 59 | } 60 | uuid = QString(QCryptographicHash::hash((deviceDescription + ";" + user).toUtf8(), QCryptographicHash::Md5).toHex()); 61 | } 62 | 63 | this->cb(scId, systemDeviceInfo.model(), CORDOVA, platform, uuid, systemInfo.version(QDeviceInfo::Os)); 64 | } 65 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.h: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 Wolfgang Koller - http://www.gofg.at/ 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | #ifndef DEVICE_H_FDSAFAS 18 | #define DEVICE_H_FDSAFAS 19 | 20 | #include 21 | 22 | #include 23 | 24 | class Device: public CPlugin { 25 | Q_OBJECT 26 | public: 27 | explicit Device(Cordova *cordova); 28 | 29 | virtual const QString fullName() override { 30 | return Device::fullID(); 31 | } 32 | 33 | virtual const QString shortName() override { 34 | return "Device"; 35 | } 36 | 37 | static const QString fullID() { 38 | return "com.cordova.Device"; 39 | } 40 | 41 | signals: 42 | 43 | public slots: 44 | void getInfo(int scId, int ecId); 45 | }; 46 | 47 | #endif 48 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/ubuntu/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var cordova = require('cordova'); 23 | var exec = require('cordova/exec'); 24 | 25 | module.exports = { 26 | getInfo:function(win,fail,args) { 27 | Cordova.exec(function (model, cordova, platform, uuid, version) { 28 | win({name: name, model: model, cordova: cordova, 29 | platform: platform, uuid: uuid, version: version}); 30 | }, null, "com.cordova.Device", "getInfo", []); 31 | } 32 | }; 33 | 34 | require("cordova/exec/proxy").add("Device", module.exports); 35 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/windows8/DeviceProxy.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | 23 | var cordova = require('cordova'); 24 | var utils = require('cordova/utils'); 25 | 26 | module.exports = { 27 | 28 | getDeviceInfo:function(win,fail,args) { 29 | 30 | // deviceId aka uuid, stored in Windows.Storage.ApplicationData.current.localSettings.values.deviceId 31 | var deviceId; 32 | 33 | var localSettings = Windows.Storage.ApplicationData.current.localSettings; 34 | 35 | if (localSettings.values.deviceId) { 36 | deviceId = localSettings.values.deviceId; 37 | } 38 | else { 39 | // App-specific hardware id could be used as uuid, but it changes if the hardware changes... 40 | try { 41 | var ASHWID = Windows.System.Profile.HardwareIdentification.getPackageSpecificToken(null).id; 42 | deviceId = Windows.Storage.Streams.DataReader.fromBuffer(ASHWID).readGuid(); 43 | } catch (e) { 44 | // Couldn't get the hardware UUID 45 | deviceId = createUUID(); 46 | } 47 | //...so cache it per-install 48 | localSettings.values.deviceId = deviceId; 49 | } 50 | 51 | var versionString = window.clientInformation.userAgent.match(/Windows NT ([0-9.]+)/)[1]; 52 | 53 | (function(self){ 54 | var ROOT_CONTAINER = "{00000000-0000-0000-FFFF-FFFFFFFFFFFF}"; 55 | var DEVICE_CLASS_KEY = "{A45C254E-DF1C-4EFD-8020-67D146A850E0},10"; 56 | var DEVICE_CLASS_KEY_NO_SEMICOLON = '{A45C254E-DF1C-4EFD-8020-67D146A850E0}10'; 57 | var ROOT_CONTAINER_QUERY = "System.Devices.ContainerId:=\"" + ROOT_CONTAINER + "\""; 58 | var HAL_DEVICE_CLASS = "4d36e966-e325-11ce-bfc1-08002be10318"; 59 | var DEVICE_DRIVER_VERSION_KEY = "{A8B865DD-2E3D-4094-AD97-E593A70C75D6},3"; 60 | var pnpObject = Windows.Devices.Enumeration.Pnp.PnpObject; 61 | pnpObject.findAllAsync(Windows.Devices.Enumeration.Pnp.PnpObjectType.device, [DEVICE_DRIVER_VERSION_KEY, DEVICE_CLASS_KEY], ROOT_CONTAINER_QUERY).then(function(rootDevices) { 62 | 63 | for (var i = 0; i < rootDevices.length; i++) { 64 | var rootDevice = rootDevices[i]; 65 | if (!rootDevice.properties) continue; 66 | if (rootDevice.properties[DEVICE_CLASS_KEY_NO_SEMICOLON] == HAL_DEVICE_CLASS) { 67 | versionString = rootDevice.properties[DEVICE_DRIVER_VERSION_KEY]; 68 | break; 69 | } 70 | } 71 | 72 | setTimeout(function () { 73 | win({ platform: "windows8", version: versionString, uuid: deviceId, model: window.clientInformation.platform }); 74 | }, 0); 75 | }); 76 | })(this); 77 | } 78 | 79 | }; 80 | 81 | require("cordova/exec/proxy").add("Device", module.exports); 82 | 83 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/src/wp/Device.cs: -------------------------------------------------------------------------------- 1 | /* 2 | Licensed under the Apache License, Version 2.0 (the "License"); 3 | you may not use this file except in compliance with the License. 4 | You may obtain a copy of the License at 5 | 6 | http://www.apache.org/licenses/LICENSE-2.0 7 | 8 | Unless required by applicable law or agreed to in writing, software 9 | distributed under the License is distributed on an "AS IS" BASIS, 10 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 11 | See the License for the specific language governing permissions and 12 | limitations under the License. 13 | */ 14 | 15 | using System; 16 | using System.Net; 17 | using System.Windows; 18 | using System.Windows.Controls; 19 | using System.Windows.Documents; 20 | using System.Windows.Ink; 21 | using System.Windows.Input; 22 | using System.Windows.Media; 23 | using System.Windows.Media.Animation; 24 | using System.Windows.Shapes; 25 | using Microsoft.Phone.Info; 26 | using System.IO.IsolatedStorage; 27 | using System.Windows.Resources; 28 | using System.IO; 29 | using System.Diagnostics; 30 | 31 | namespace WPCordovaClassLib.Cordova.Commands 32 | { 33 | public class Device : BaseCommand 34 | { 35 | public void getDeviceInfo(string notused) 36 | { 37 | 38 | string res = String.Format("\"name\":\"{0}\",\"platform\":\"{1}\",\"uuid\":\"{2}\",\"version\":\"{3}\",\"model\":\"{4}\"", 39 | this.name, 40 | this.platform, 41 | this.uuid, 42 | this.version, 43 | this.model); 44 | 45 | res = "{" + res + "}"; 46 | //Debug.WriteLine("Result::" + res); 47 | DispatchCommandResult(new PluginResult(PluginResult.Status.OK, res)); 48 | } 49 | 50 | public string model 51 | { 52 | get 53 | { 54 | return DeviceStatus.DeviceName; 55 | //return String.Format("{0},{1},{2}", DeviceStatus.DeviceManufacturer, DeviceStatus.DeviceHardwareVersion, DeviceStatus.DeviceFirmwareVersion); 56 | } 57 | } 58 | 59 | public string name 60 | { 61 | get 62 | { 63 | return DeviceStatus.DeviceName; 64 | 65 | } 66 | } 67 | 68 | public string platform 69 | { 70 | get 71 | { 72 | return Environment.OSVersion.Platform.ToString(); 73 | } 74 | } 75 | 76 | public string uuid 77 | { 78 | get 79 | { 80 | string returnVal = ""; 81 | object id; 82 | UserExtendedProperties.TryGetValue("ANID", out id); 83 | 84 | if (id != null) 85 | { 86 | returnVal = id.ToString().Substring(2, 32); 87 | } 88 | else 89 | { 90 | returnVal = "???unknown???"; 91 | 92 | using (IsolatedStorageFile appStorage = IsolatedStorageFile.GetUserStoreForApplication()) 93 | { 94 | try 95 | { 96 | IsolatedStorageFileStream fileStream = new IsolatedStorageFileStream("DeviceID.txt", FileMode.Open, FileAccess.Read, appStorage); 97 | 98 | using (StreamReader reader = new StreamReader(fileStream)) 99 | { 100 | returnVal = reader.ReadLine(); 101 | } 102 | } 103 | catch (Exception /*ex*/) 104 | { 105 | 106 | } 107 | } 108 | } 109 | 110 | return returnVal; 111 | } 112 | } 113 | 114 | public string version 115 | { 116 | get 117 | { 118 | return Environment.OSVersion.Version.ToString(); 119 | } 120 | } 121 | 122 | } 123 | } 124 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/tests/plugin.xml: -------------------------------------------------------------------------------- 1 | 2 | 20 | 21 | 26 | Cordova Device Plugin Tests 27 | Apache 2.0 28 | 29 | 30 | 31 | 32 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/tests/tests.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | exports.defineAutoTests = function() { 23 | describe('Device Information (window.device)', function () { 24 | it("should exist", function() { 25 | expect(window.device).toBeDefined(); 26 | }); 27 | 28 | it("should contain a platform specification that is a string", function() { 29 | expect(window.device.platform).toBeDefined(); 30 | expect((new String(window.device.platform)).length > 0).toBe(true); 31 | }); 32 | 33 | it("should contain a version specification that is a string", function() { 34 | expect(window.device.version).toBeDefined(); 35 | expect((new String(window.device.version)).length > 0).toBe(true); 36 | }); 37 | 38 | it("should contain a UUID specification that is a string or a number", function() { 39 | expect(window.device.uuid).toBeDefined(); 40 | if (typeof window.device.uuid == 'string' || typeof window.device.uuid == 'object') { 41 | expect((new String(window.device.uuid)).length > 0).toBe(true); 42 | } else { 43 | expect(window.device.uuid > 0).toBe(true); 44 | } 45 | }); 46 | 47 | it("should contain a cordova specification that is a string", function() { 48 | expect(window.device.cordova).toBeDefined(); 49 | expect((new String(window.device.cordova)).length > 0).toBe(true); 50 | }); 51 | 52 | it("should depend on the precense of cordova.version string", function() { 53 | expect(window.cordova.version).toBeDefined(); 54 | expect((new String(window.cordova.version)).length > 0).toBe(true); 55 | }); 56 | 57 | it("should contain device.cordova equal to cordova.version", function() { 58 | expect(window.device.cordova).toBe(window.cordova.version); 59 | }); 60 | 61 | it("should contain a model specification that is a string", function() { 62 | expect(window.device.model).toBeDefined(); 63 | expect((new String(window.device.model)).length > 0).toBe(true); 64 | }); 65 | }); 66 | }; 67 | 68 | exports.defineManualTests = function(contentEl, createActionButton) { 69 | createActionButton('Dump device', function() { 70 | console.log(JSON.stringify(window.device, null, '\t')); 71 | }); 72 | }; 73 | -------------------------------------------------------------------------------- /plugins/org.apache.cordova.device/www/device.js: -------------------------------------------------------------------------------- 1 | /* 2 | * 3 | * Licensed to the Apache Software Foundation (ASF) under one 4 | * or more contributor license agreements. See the NOTICE file 5 | * distributed with this work for additional information 6 | * regarding copyright ownership. The ASF licenses this file 7 | * to you under the Apache License, Version 2.0 (the 8 | * "License"); you may not use this file except in compliance 9 | * with the License. You may obtain a copy of the License at 10 | * 11 | * http://www.apache.org/licenses/LICENSE-2.0 12 | * 13 | * Unless required by applicable law or agreed to in writing, 14 | * software distributed under the License is distributed on an 15 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 | * KIND, either express or implied. See the License for the 17 | * specific language governing permissions and limitations 18 | * under the License. 19 | * 20 | */ 21 | 22 | var argscheck = require('cordova/argscheck'), 23 | channel = require('cordova/channel'), 24 | utils = require('cordova/utils'), 25 | exec = require('cordova/exec'), 26 | cordova = require('cordova'); 27 | 28 | channel.createSticky('onCordovaInfoReady'); 29 | // Tell cordova channel to wait on the CordovaInfoReady event 30 | channel.waitForInitialization('onCordovaInfoReady'); 31 | 32 | /** 33 | * This represents the mobile device, and provides properties for inspecting the model, version, UUID of the 34 | * phone, etc. 35 | * @constructor 36 | */ 37 | function Device() { 38 | this.available = false; 39 | this.platform = null; 40 | this.version = null; 41 | this.uuid = null; 42 | this.cordova = null; 43 | this.model = null; 44 | 45 | var me = this; 46 | 47 | channel.onCordovaReady.subscribe(function() { 48 | me.getInfo(function(info) { 49 | //ignoring info.cordova returning from native, we should use value from cordova.version defined in cordova.js 50 | //TODO: CB-5105 native implementations should not return info.cordova 51 | var buildLabel = cordova.version; 52 | me.available = true; 53 | me.platform = info.platform; 54 | me.version = info.version; 55 | me.uuid = info.uuid; 56 | me.cordova = buildLabel; 57 | me.model = info.model; 58 | channel.onCordovaInfoReady.fire(); 59 | },function(e) { 60 | me.available = false; 61 | utils.alert("[ERROR] Error initializing Cordova: " + e); 62 | }); 63 | }); 64 | } 65 | 66 | /** 67 | * Get device info 68 | * 69 | * @param {Function} successCallback The function to call when the heading data is available 70 | * @param {Function} errorCallback The function to call when there is an error getting the heading data. (OPTIONAL) 71 | */ 72 | Device.prototype.getInfo = function(successCallback, errorCallback) { 73 | argscheck.checkArgs('fF', 'Device.getInfo', arguments); 74 | exec(successCallback, errorCallback, "Device", "getDeviceInfo", []); 75 | }; 76 | 77 | module.exports = new Device(); 78 | -------------------------------------------------------------------------------- /scss/ionic.app.scss: -------------------------------------------------------------------------------- 1 | /* 2 | To customize the look and feel of Ionic, you can override the variables 3 | in ionic's _variables.scss file. 4 | 5 | For example, you might change some of the default colors: 6 | 7 | $light: #fff !default; 8 | $stable: #f8f8f8 !default; 9 | $positive: #4a87ee !default; 10 | $calm: #43cee6 !default; 11 | $balanced: #66cc33 !default; 12 | $energized: #f0b840 !default; 13 | $assertive: #ef4e3a !default; 14 | $royal: #8a6de9 !default; 15 | $dark: #444 !default; 16 | */ 17 | 18 | // The path for our ionicons font files, relative to the built CSS in www/css 19 | $ionicons-font-path: "../lib/ionic/fonts" !default; 20 | 21 | // Include all of Ionic 22 | @import "www/lib/ionic/scss/ionic"; 23 | 24 | -------------------------------------------------------------------------------- /www/.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/www/.gitignore -------------------------------------------------------------------------------- /www/README.md: -------------------------------------------------------------------------------- 1 | This is an addon starter template for the [Ionic Framework](http://ionicframework.com/). 2 | 3 | ## How to use this template 4 | 5 | *This template does not work on its own*. It is missing the Ionic library, and AngularJS. 6 | 7 | To use this, either create a new ionic project using the ionic node.js utility, or copy and paste this into an existing Cordova project and download a release of Ionic separately. 8 | 9 | ### With the Ionic tool: 10 | 11 | Take the name after `ionic-starter-`, and that is the name of the template to be used when using the `ionic start` command below: 12 | 13 | ```bash 14 | $ sudo npm install -g ionic cordova 15 | $ ionic start myApp blank 16 | ``` 17 | 18 | Then, to run it, cd into `myApp` and run: 19 | 20 | ```bash 21 | $ ionic platform add ios 22 | $ ionic build ios 23 | $ ionic emulate ios 24 | ``` 25 | 26 | Substitute ios for android if not on a Mac, but if you can, the ios development toolchain is a lot easier to work with until you need to do anything custom to Android. 27 | 28 | ## Demo 29 | http://plnkr.co/edit/tpl:IUU30p?p=preview 30 | 31 | ## Issues 32 | Issues have been disabled on this repo, if you do find an issue or have a question consider posting it on the [Ionic Forum](http://forum.ionicframework.com/). Or else if there is truly an error, follow our guidelines for [submitting an issue](http://ionicframework.com/contribute/#issues) to the main Ionic repository. On the other hand, pull requests are welcome here! 33 | -------------------------------------------------------------------------------- /www/css/style.css: -------------------------------------------------------------------------------- 1 | /* Empty. Add your own CSS if you like */ 2 | .item img{ 3 | max-width: 100%; 4 | max-height: 200px; 5 | } 6 | input[type=file]{ 7 | height:0; 8 | overflow:auto; 9 | } 10 | .uploadButton{ 11 | margin-top: -40px; 12 | } -------------------------------------------------------------------------------- /www/img/ionic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/www/img/ionic.png -------------------------------------------------------------------------------- /www/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | Realtime Image Sharing With Ionic+Socket.io 7 | 8 | 9 | 10 | 11 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | Back 35 | 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /www/js/app.js: -------------------------------------------------------------------------------- 1 | // Ionic Starter App 2 | 3 | // angular.module is a global place for creating, registering and retrieving Angular modules 4 | // 'starter' is the name of this angular module example (also set in a attribute in index.html) 5 | // the 2nd parameter is an array of 'requires' 6 | angular.module('imageShare', ['ionic','com.htmlxprs.imageShare.controllers','com.htmlxprs.imageShare.services','com.htmlxprs.imageShare.directives']) 7 | 8 | .run(function($ionicPlatform,$state) { 9 | $ionicPlatform.ready(function() { 10 | // Hide the accessory bar by default (remove this to show the accessory bar above the keyboard 11 | // for form inputs) 12 | if(window.cordova && window.cordova.plugins.Keyboard) { 13 | cordova.plugins.Keyboard.hideKeyboardAccessoryBar(true); 14 | } 15 | if(window.StatusBar) { 16 | StatusBar.styleDefault(); 17 | } 18 | $state.go('home'); 19 | }); 20 | }).config(['$stateProvider',function($stateProvider){ 21 | $stateProvider.state('home',{ 22 | url:'/home', 23 | controller:'HomeController', 24 | templateUrl:'views/home.html' 25 | }).state('chat',{ 26 | url:'/chat', 27 | controller:'ChatController', 28 | templateUrl:'views/chat.html' 29 | }); 30 | }]); 31 | -------------------------------------------------------------------------------- /www/js/controllers.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Sandeep on 29/08/14. 3 | */ 4 | angular.module('com.htmlxprs.imageShare.controllers',[]).controller('HomeController',['$scope','USER','$state',function($scope,USER,$state){ 5 | $scope.user={}; 6 | $scope.next=function(){ 7 | USER.name=$scope.user.name; 8 | $state.go('chat'); 9 | } 10 | }]).controller('ChatController',['$scope','$rootScope',function($scope,$rootScope){ 11 | 12 | $rootScope.$on('event:file:selected',function(event,data){ 13 | //console.log(data.image) 14 | }); 15 | 16 | }]); -------------------------------------------------------------------------------- /www/js/directives.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Sandeep on 29/08/14. 3 | */ 4 | angular.module('com.htmlxprs.imageShare.directives',[]).directive('browseFile',['$rootScope','USER',function($rootScope,USER){ 5 | return { 6 | scope:{ 7 | 8 | }, 9 | replace:true, 10 | restrict:'AE', 11 | link:function(scope,elem,attrs){ 12 | 13 | scope.browseFile=function(){ 14 | document.getElementById('browseBtn').click(); 15 | } 16 | 17 | angular.element(document.getElementById('browseBtn')).on('change',function(e){ 18 | 19 | var file=e.target.files[0]; 20 | 21 | angular.element(document.getElementById('browseBtn')).val(''); 22 | 23 | var fileReader=new FileReader(); 24 | 25 | fileReader.onload=function(event){ 26 | $rootScope.$broadcast('event:file:selected',{image:event.target.result,sender:USER.name}); 27 | } 28 | 29 | fileReader.readAsDataURL(file); 30 | }); 31 | 32 | }, 33 | templateUrl:'views/browse-file.html' 34 | } 35 | }]).directive('chatList',['$rootScope','SOCKET_URL',function($rootScope,SOCKET_URL){ 36 | return{ 37 | replace:true, 38 | restrict:'AE', 39 | scope:{ 40 | 41 | }, 42 | link:function(scope,elem,attrs){ 43 | 44 | var socket=io(SOCKET_URL); 45 | 46 | scope.messages=[]; 47 | 48 | $rootScope.$on('event:file:selected',function(event,data){ 49 | 50 | socket.emit('event:new:image',data); 51 | 52 | scope.$apply(function(){ 53 | scope.messages.unshift(data); 54 | }); 55 | 56 | }); 57 | 58 | socket.on('event:incoming:image',function(data){ 59 | 60 | scope.$apply(function(){ 61 | scope.messages.unshift(data); 62 | }); 63 | 64 | }); 65 | 66 | }, 67 | templateUrl:'views/chat-list.html' 68 | } 69 | }]); -------------------------------------------------------------------------------- /www/js/services.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Created by Sandeep on 29/08/14. 3 | */ 4 | angular.module('com.htmlxprs.imageShare.services',[]).value('USER',{}).value('SOCKET_URL','localhost:8000'); -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/www/lib/ionic/fonts/ionicons.eot -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/www/lib/ionic/fonts/ionicons.ttf -------------------------------------------------------------------------------- /www/lib/ionic/fonts/ionicons.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/htmlxprs/ionic-realtime-image-share/740ec4022e583ac793dc9c8aa78cb01a836e50fc/www/lib/ionic/fonts/ionicons.woff -------------------------------------------------------------------------------- /www/lib/ionic/js/angular/angular-resource.min.js: -------------------------------------------------------------------------------- 1 | /* 2 | AngularJS v1.2.17 3 | (c) 2010-2014 Google, Inc. http://angularjs.org 4 | License: MIT 5 | */ 6 | (function(H,a,A){'use strict';function D(p,g){g=g||{};a.forEach(g,function(a,c){delete g[c]});for(var c in p)!p.hasOwnProperty(c)||"$"===c.charAt(0)&&"$"===c.charAt(1)||(g[c]=p[c]);return g}var v=a.$$minErr("$resource"),C=/^(\.[a-zA-Z_$][0-9a-zA-Z_$]*)+$/;a.module("ngResource",["ng"]).factory("$resource",["$http","$q",function(p,g){function c(a,c){this.template=a;this.defaults=c||{};this.urlParams={}}function t(n,w,l){function r(h,d){var e={};d=x({},w,d);s(d,function(b,d){u(b)&&(b=b());var k;if(b&& 7 | b.charAt&&"@"==b.charAt(0)){k=h;var a=b.substr(1);if(null==a||""===a||"hasOwnProperty"===a||!C.test("."+a))throw v("badmember",a);for(var a=a.split("."),f=0,c=a.length;f=b;e--)d.end&&d.end(f[e]);f.length=b}}var c,g,f=[],l=a;for(f.last=function(){return f[f.length-1]};a;){g=!0;if(f.last()&&x[f.last()])a=a.replace(RegExp("(.*)<\\s*\\/\\s*"+f.last()+"[^>]*>","i"),function(c,a){a=a.replace(H,"$1").replace(I,"$1");d.chars&&d.chars(r(a));return""}),e("",f.last());else{if(0===a.indexOf("\x3c!--"))c=a.indexOf("--",4),0<=c&&a.lastIndexOf("--\x3e",c)===c&&(d.comment&&d.comment(a.substring(4,c)),a=a.substring(c+3),g=!1);else if(y.test(a)){if(c=a.match(y))a= 8 | a.replace(c[0],""),g=!1}else if(J.test(a)){if(c=a.match(z))a=a.substring(c[0].length),c[0].replace(z,e),g=!1}else K.test(a)&&(c=a.match(A))&&(a=a.substring(c[0].length),c[0].replace(A,b),g=!1);g&&(c=a.indexOf("<"),g=0>c?a:a.substring(0,c),a=0>c?"":a.substring(c),d.chars&&d.chars(r(g)))}if(a==l)throw L("badparse",a);l=a}e()}function r(a){if(!a)return"";var d=M.exec(a);a=d[1];var b=d[3];if(d=d[2])n.innerHTML=d.replace(//g,">")}function s(a,d){var b=!1,e=h.bind(a,a.push);return{start:function(a,g,f){a=h.lowercase(a);!b&&x[a]&&(b=a);b||!0!==C[a]||(e("<"),e(a),h.forEach(g,function(b,f){var g=h.lowercase(f),k="img"===a&&"src"===g||"background"===g;!0!==P[g]||!0===D[g]&&!d(b,k)||(e(" "),e(f),e('="'),e(B(b)),e('"'))}), 10 | e(f?"/>":">"))},end:function(a){a=h.lowercase(a);b||!0!==C[a]||(e(""));a==b&&(b=!1)},chars:function(a){b||e(B(a))}}}var L=h.$$minErr("$sanitize"),A=/^<\s*([\w:-]+)((?:\s+[\w:-]+(?:\s*=\s*(?:(?:"[^"]*")|(?:'[^']*')|[^>\s]+))?)*)\s*(\/?)\s*>/,z=/^<\s*\/\s*([\w:-]+)[^>]*>/,G=/([\w:-]+)(?:\s*=\s*(?:(?:"((?:[^"])*)")|(?:'((?:[^'])*)')|([^>\s]+)))?/g,K=/^]*?)>/i,I=/]/,b=/^mailto:/;return function(e,c){function g(a){a&&m.push(E(a))}function f(a,b){m.push("');g(b);m.push("")}if(!e)return e; 14 | for(var l,k=e,m=[],n,p;l=k.match(d);)n=l[0],l[2]==l[3]&&(n="mailto:"+n),p=l.index,g(k.substr(0,p)),f(n,l[0].replace(b,"")),k=k.substring(p+l[0].length);g(k);return a(m.join(""))}}])})(window,window.angular); 15 | //# sourceMappingURL=angular-sanitize.min.js.map 16 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_action-sheet.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Action Sheets 3 | * -------------------------------------------------- 4 | */ 5 | 6 | .action-sheet-backdrop { 7 | @include transition(background-color 300ms ease-in-out); 8 | position: fixed; 9 | top: 0; 10 | left: 0; 11 | z-index: $z-index-action-sheet; 12 | width: 100%; 13 | height: 100%; 14 | background-color: rgba(0,0,0,0); 15 | 16 | &.active { 17 | background-color: rgba(0,0,0,0.5); 18 | } 19 | } 20 | 21 | .action-sheet-wrapper { 22 | @include translate3d(0, 100%, 0); 23 | @include transition(all ease-in-out 300ms); 24 | position: absolute; 25 | bottom: 0; 26 | width: 100%; 27 | } 28 | 29 | .action-sheet-up { 30 | @include translate3d(0, 0, 0); 31 | } 32 | 33 | .action-sheet { 34 | margin-left: 15px; 35 | margin-right: 15px; 36 | width: auto; 37 | z-index: $z-index-action-sheet; 38 | overflow: hidden; 39 | 40 | .button { 41 | display: block; 42 | padding: 1px; 43 | width: 100%; 44 | border-radius: 0; 45 | 46 | background-color: transparent; 47 | 48 | color: $positive; 49 | font-size: 18px; 50 | 51 | &.destructive { 52 | color: $assertive; 53 | } 54 | } 55 | } 56 | 57 | .action-sheet-title { 58 | padding: 10px; 59 | color: lighten($base-color, 40%); 60 | text-align: center; 61 | font-size: 12px; 62 | } 63 | 64 | .action-sheet-group { 65 | margin-bottom: 5px; 66 | border-radius: $sheet-border-radius; 67 | background-color: #fff; 68 | .button { 69 | border-width: 1px 0px 0px 0px; 70 | border-radius: 0; 71 | 72 | &.active { 73 | background-color: transparent; 74 | color: inherit; 75 | } 76 | } 77 | .button:first-child:last-child { 78 | border-width: 0; 79 | } 80 | } 81 | 82 | .action-sheet-open { 83 | pointer-events: none; 84 | 85 | &.modal-open .modal { 86 | pointer-events: none; 87 | } 88 | 89 | .action-sheet-backdrop { 90 | pointer-events: auto; 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_backdrop.scss: -------------------------------------------------------------------------------- 1 | 2 | .backdrop { 3 | position: fixed; 4 | top: 0; 5 | left: 0; 6 | z-index: $z-index-backdrop; 7 | 8 | width: 100%; 9 | height: 100%; 10 | 11 | background-color: rgba(0,0,0,0.4); 12 | 13 | visibility: hidden; 14 | opacity: 0; 15 | 16 | &.visible { 17 | visibility: visible; 18 | } 19 | &.active { 20 | opacity: 1; 21 | } 22 | 23 | @include transition(0.1s opacity linear); 24 | } 25 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_badge.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Badges 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .badge { 8 | @include badge-style($badge-default-bg, $badge-default-text); 9 | z-index: $z-index-badge; 10 | display: inline-block; 11 | padding: 3px 8px; 12 | min-width: 10px; 13 | border-radius: $badge-border-radius; 14 | vertical-align: baseline; 15 | text-align: center; 16 | white-space: nowrap; 17 | font-weight: $badge-font-weight; 18 | font-size: $badge-font-size; 19 | line-height: $badge-line-height; 20 | 21 | &:empty { 22 | display: none; 23 | } 24 | } 25 | 26 | //Be sure to override specificity of rule that 'badge color matches tab color by default' 27 | .tabs .tab-item .badge, 28 | .badge { 29 | &.badge-light { 30 | @include badge-style($badge-light-bg, $badge-light-text); 31 | } 32 | &.badge-stable { 33 | @include badge-style($badge-stable-bg, $badge-stable-text); 34 | } 35 | &.badge-positive { 36 | @include badge-style($badge-positive-bg, $badge-positive-text); 37 | } 38 | &.badge-calm { 39 | @include badge-style($badge-calm-bg, $badge-calm-text); 40 | } 41 | &.badge-assertive { 42 | @include badge-style($badge-assertive-bg, $badge-assertive-text); 43 | } 44 | &.badge-balanced { 45 | @include badge-style($badge-balanced-bg, $badge-balanced-text); 46 | } 47 | &.badge-energized { 48 | @include badge-style($badge-energized-bg, $badge-energized-text); 49 | } 50 | &.badge-royal { 51 | @include badge-style($badge-royal-bg, $badge-royal-text); 52 | } 53 | &.badge-dark { 54 | @include badge-style($badge-dark-bg, $badge-dark-text); 55 | } 56 | } 57 | 58 | // Quick fix for labels/badges in buttons 59 | .button .badge { 60 | position: relative; 61 | top: -1px; 62 | } 63 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_button-bar.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Button Bar 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .button-bar { 8 | @include display-flex(); 9 | @include flex(1); 10 | width: 100%; 11 | 12 | &.button-bar-inline { 13 | display: block; 14 | width: auto; 15 | 16 | @include clearfix(); 17 | 18 | > .button { 19 | width: auto; 20 | display: inline-block; 21 | float: left; 22 | } 23 | } 24 | } 25 | 26 | .button-bar > .button { 27 | @include flex(1); 28 | display: block; 29 | 30 | overflow: hidden; 31 | 32 | padding: 0 16px; 33 | 34 | width: 0; 35 | 36 | border-width: 1px 0px 1px 1px; 37 | border-radius: 0; 38 | text-align: center; 39 | text-overflow: ellipsis; 40 | white-space: nowrap; 41 | 42 | &:before, 43 | .icon:before { 44 | line-height: 44px; 45 | } 46 | 47 | &:first-child { 48 | border-radius: 2px 0px 0px 2px; 49 | } 50 | &:last-child { 51 | border-right-width: 1px; 52 | border-radius: 0px 2px 2px 0px; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_checkbox.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Checkbox 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .checkbox { 8 | // set the color defaults 9 | @include checkbox-style($checkbox-off-border-default, $checkbox-on-bg-default); 10 | 11 | position: relative; 12 | display: inline-block; 13 | padding: ($checkbox-height / 4) ($checkbox-width / 4); 14 | cursor: pointer; 15 | } 16 | .checkbox-light { 17 | @include checkbox-style($checkbox-off-border-light, $checkbox-on-bg-light); 18 | } 19 | .checkbox-stable { 20 | @include checkbox-style($checkbox-off-border-stable, $checkbox-on-bg-stable); 21 | } 22 | .checkbox-positive { 23 | @include checkbox-style($checkbox-off-border-positive, $checkbox-on-bg-positive); 24 | } 25 | .checkbox-calm { 26 | @include checkbox-style($checkbox-off-border-calm, $checkbox-on-bg-calm); 27 | } 28 | .checkbox-assertive { 29 | @include checkbox-style($checkbox-off-border-assertive, $checkbox-on-bg-assertive); 30 | } 31 | .checkbox-balanced { 32 | @include checkbox-style($checkbox-off-border-balanced, $checkbox-on-bg-balanced); 33 | } 34 | .checkbox-energized{ 35 | @include checkbox-style($checkbox-off-border-energized, $checkbox-on-bg-energized); 36 | } 37 | .checkbox-royal { 38 | @include checkbox-style($checkbox-off-border-royal, $checkbox-on-bg-royal); 39 | } 40 | .checkbox-dark { 41 | @include checkbox-style($checkbox-off-border-dark, $checkbox-on-bg-dark); 42 | } 43 | 44 | .checkbox input:disabled:before, 45 | .checkbox input:disabled + .checkbox-icon:before { 46 | border-color: $checkbox-off-border-light; 47 | } 48 | 49 | .checkbox input:disabled:checked:before, 50 | .checkbox input:disabled:checked + .checkbox-icon:before { 51 | background: $checkbox-on-bg-light; 52 | } 53 | 54 | 55 | .checkbox.checkbox-input-hidden input { 56 | display: none !important; 57 | } 58 | 59 | .checkbox input, 60 | .checkbox-icon { 61 | position: relative; 62 | width: $checkbox-width; 63 | height: $checkbox-height; 64 | display: block; 65 | border: 0; 66 | background: transparent; 67 | cursor: pointer; 68 | -webkit-appearance: none; 69 | 70 | &:before { 71 | // what the checkbox looks like when its not checked 72 | display: table; 73 | width: 100%; 74 | height: 100%; 75 | border-width: $checkbox-border-width; 76 | border-style: solid; 77 | border-radius: $checkbox-border-radius; 78 | background: $checkbox-off-bg-color; 79 | content: ' '; 80 | transition: background-color 20ms ease-in-out; 81 | } 82 | } 83 | 84 | .checkbox input:checked:before, 85 | input:checked + .checkbox-icon:before { 86 | border-width: $checkbox-border-width + 1; 87 | } 88 | 89 | // the checkmark within the box 90 | .checkbox input:after, 91 | .checkbox-icon:after { 92 | @include transition(opacity .05s ease-in-out); 93 | @include rotate(-45deg); 94 | position: absolute; 95 | top: 30%; 96 | left: 26%; 97 | display: table; 98 | width: ($checkbox-width / 2) + 1; 99 | height: ($checkbox-width / 3) + 1; 100 | border: $checkbox-check-width solid $checkbox-check-color; 101 | border-top: 0; 102 | border-right: 0; 103 | content: ' '; 104 | opacity: 0; 105 | } 106 | 107 | .grade-c .checkbox input:after, 108 | .grade-c .checkbox-icon:after { 109 | @include rotate(0); 110 | top: 3px; 111 | left: 4px; 112 | border: none; 113 | color: $checkbox-check-color; 114 | content: '\2713'; 115 | font-weight: bold; 116 | font-size: 20px; 117 | } 118 | 119 | // what the checkmark looks like when its checked 120 | .checkbox input:checked:after, 121 | input:checked + .checkbox-icon:after { 122 | opacity: 1; 123 | } 124 | 125 | // make sure item content have enough padding on left to fit the checkbox 126 | .item-checkbox { 127 | padding-left: ($item-padding * 2) + $checkbox-width; 128 | 129 | &.active { 130 | box-shadow: none; 131 | } 132 | } 133 | 134 | // position the checkbox to the left within an item 135 | .item-checkbox .checkbox { 136 | position: absolute; 137 | top: 50%; 138 | right: $item-padding / 2; 139 | left: $item-padding / 2; 140 | z-index: $z-index-item-checkbox; 141 | margin-top: (($checkbox-height + ($checkbox-height / 2)) / 2) * -1; 142 | } 143 | 144 | 145 | .item-checkbox.item-checkbox-right { 146 | padding-right: ($item-padding * 2) + $checkbox-width; 147 | padding-left: $item-padding; 148 | } 149 | 150 | .item-checkbox-right .checkbox input, 151 | .item-checkbox-right .checkbox-icon { 152 | float: right; 153 | } -------------------------------------------------------------------------------- /www/lib/ionic/scss/_grid.scss: -------------------------------------------------------------------------------- 1 | /** 2 | * Grid 3 | * -------------------------------------------------- 4 | * Using flexbox for the grid, inspired by Philip Walton: 5 | * http://philipwalton.github.io/solved-by-flexbox/demos/grids/ 6 | * By default each .col within a .row will evenly take up 7 | * available width, and the height of each .col with take 8 | * up the height of the tallest .col in the same .row. 9 | */ 10 | 11 | .row { 12 | @include display-flex(); 13 | padding: ($grid-padding-width / 2); 14 | width: 100%; 15 | } 16 | 17 | .row + .row { 18 | margin-top: ($grid-padding-width / 2) * -1; 19 | padding-top: 0; 20 | } 21 | 22 | .col { 23 | @include flex(1); 24 | display: block; 25 | padding: ($grid-padding-width / 2); 26 | width: 100%; 27 | } 28 | 29 | 30 | /* Vertically Align Columns */ 31 | /* .row-* vertically aligns every .col in the .row */ 32 | .row-top { 33 | @include align-items(flex-start); 34 | } 35 | .row-bottom { 36 | @include align-items(flex-end); 37 | } 38 | .row-center { 39 | @include align-items(center); 40 | } 41 | .row-stretch { 42 | @include align-items(stretch); 43 | } 44 | .row-baseline { 45 | @include align-items(baseline); 46 | } 47 | 48 | /* .col-* vertically aligns an individual .col */ 49 | .col-top { 50 | @include align-self(flex-start); 51 | } 52 | .col-bottom { 53 | @include align-self(flex-end); 54 | } 55 | .col-center { 56 | @include align-self(center); 57 | } 58 | 59 | /* Column Offsets */ 60 | .col-offset-10 { 61 | margin-left: 10%; 62 | } 63 | .col-offset-20 { 64 | margin-left: 20%; 65 | } 66 | .col-offset-25 { 67 | margin-left: 25%; 68 | } 69 | .col-offset-33, .col-offset-34 { 70 | margin-left: 33.3333%; 71 | } 72 | .col-offset-50 { 73 | margin-left: 50%; 74 | } 75 | .col-offset-66, .col-offset-67 { 76 | margin-left: 66.6666%; 77 | } 78 | .col-offset-75 { 79 | margin-left: 75%; 80 | } 81 | .col-offset-80 { 82 | margin-left: 80%; 83 | } 84 | .col-offset-90 { 85 | margin-left: 90%; 86 | } 87 | 88 | 89 | /* Explicit Column Percent Sizes */ 90 | /* By default each grid column will evenly distribute */ 91 | /* across the grid. However, you can specify individual */ 92 | /* columns to take up a certain size of the available area */ 93 | .col-10 { 94 | @include flex(0, 0, 10%); 95 | max-width: 10%; 96 | } 97 | .col-20 { 98 | @include flex(0, 0, 20%); 99 | max-width: 20%; 100 | } 101 | .col-25 { 102 | @include flex(0, 0, 25%); 103 | max-width: 25%; 104 | } 105 | .col-33, .col-34 { 106 | @include flex(0, 0, 33.3333%); 107 | max-width: 33.3333%; 108 | } 109 | .col-50 { 110 | @include flex(0, 0, 50%); 111 | max-width: 50%; 112 | } 113 | .col-66, .col-67 { 114 | @include flex(0, 0, 66.6666%); 115 | max-width: 66.6666%; 116 | } 117 | .col-75 { 118 | @include flex(0, 0, 75%); 119 | max-width: 75%; 120 | } 121 | .col-80 { 122 | @include flex(0, 0, 80%); 123 | max-width: 80%; 124 | } 125 | .col-90 { 126 | @include flex(0, 0, 90%); 127 | max-width: 90%; 128 | } 129 | 130 | 131 | /* Responsive Grid Classes */ 132 | /* Adding a class of responsive-X to a row */ 133 | /* will trigger the flex-direction to */ 134 | /* change to column and add some margin */ 135 | /* to any columns in the row for clearity */ 136 | 137 | @include responsive-grid-break('.responsive-sm', $grid-responsive-sm-break); 138 | @include responsive-grid-break('.responsive-md', $grid-responsive-md-break); 139 | @include responsive-grid-break('.responsive-lg', $grid-responsive-lg-break); 140 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_list.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Lists 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .list { 8 | position: relative; 9 | padding-top: $item-border-width; 10 | padding-bottom: $item-border-width; 11 | padding-left: 0; // reset padding because ul and ol 12 | margin-bottom: 20px; 13 | } 14 | .list:last-child { 15 | margin-bottom: 0px; 16 | &.card{ 17 | margin-bottom:40px; 18 | } 19 | } 20 | 21 | 22 | /** 23 | * List Header 24 | * -------------------------------------------------- 25 | */ 26 | 27 | .list-header { 28 | margin-top: $list-header-margin-top; 29 | padding: $list-header-padding; 30 | background-color: $list-header-bg; 31 | color: $list-header-color; 32 | font-weight: bold; 33 | } 34 | 35 | // when its a card make sure it doesn't duplicate top and bottom borders 36 | .card.list .list-item { 37 | padding-right: 1px; 38 | padding-left: 1px; 39 | } 40 | 41 | 42 | /** 43 | * Cards and Inset Lists 44 | * -------------------------------------------------- 45 | * A card and list-inset are close to the same thing, except a card as a box shadow. 46 | */ 47 | 48 | .card, 49 | .list-inset { 50 | overflow: hidden; 51 | margin: ($content-padding * 2) $content-padding; 52 | border-radius: $card-border-radius; 53 | background-color: $card-body-bg; 54 | } 55 | 56 | .card { 57 | padding-top: $item-border-width; 58 | padding-bottom: $item-border-width; 59 | box-shadow: 0 1px 4px rgba(0, 0, 0, .25); 60 | } 61 | 62 | .padding { 63 | .card, .list-inset { 64 | margin-left: 0; 65 | margin-right: 0; 66 | } 67 | } 68 | 69 | .card .item, 70 | .list-inset .item, 71 | .padding > .list .item 72 | { 73 | &:first-child { 74 | border-top-left-radius: $card-border-radius; 75 | border-top-right-radius: $card-border-radius; 76 | 77 | .item-content { 78 | border-top-left-radius: $card-border-radius; 79 | border-top-right-radius: $card-border-radius; 80 | } 81 | } 82 | &:last-child { 83 | border-bottom-right-radius: $card-border-radius; 84 | border-bottom-left-radius: $card-border-radius; 85 | 86 | .item-content { 87 | border-bottom-right-radius: $card-border-radius; 88 | border-bottom-left-radius: $card-border-radius; 89 | } 90 | } 91 | } 92 | 93 | .card .item:last-child, 94 | .list-inset .item:last-child { 95 | margin-bottom: $item-border-width * -1; 96 | } 97 | 98 | .card .item, 99 | .list-inset .item, 100 | .padding > .list .item, 101 | .padding-horizontal > .list .item { 102 | margin-right: 0; 103 | margin-left: 0; 104 | 105 | &.item-input input { 106 | padding-right: 44px; 107 | } 108 | } 109 | .padding-left > .list .item { 110 | margin-left: 0; 111 | } 112 | .padding-right > .list .item { 113 | margin-right: 0; 114 | } 115 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_loading.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Loading 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .loading-container { 8 | position: absolute; 9 | left: 0; 10 | top: 0; 11 | right: 0; 12 | bottom: 0; 13 | 14 | z-index: $z-index-loading; 15 | 16 | @include display-flex(); 17 | @include justify-content(center); 18 | @include align-items(center); 19 | 20 | @include transition(0.2s opacity linear); 21 | visibility: hidden; 22 | opacity: 0; 23 | 24 | &.visible { 25 | visibility: visible; 26 | } 27 | &.active { 28 | opacity: 1; 29 | } 30 | 31 | .loading { 32 | padding: $loading-padding; 33 | 34 | border-radius: $loading-border-radius; 35 | background-color: $loading-bg-color; 36 | 37 | color: $loading-text-color; 38 | 39 | text-align: center; 40 | text-overflow: ellipsis; 41 | font-size: $loading-font-size; 42 | 43 | h1, h2, h3, h4, h5, h6 { 44 | color: $loading-text-color; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_menu.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Menus 4 | * -------------------------------------------------- 5 | * Side panel structure 6 | */ 7 | 8 | .menu { 9 | position: absolute; 10 | top: 0; 11 | bottom: 0; 12 | z-index: $z-index-menu; 13 | overflow: hidden; 14 | 15 | min-height: 100%; 16 | max-height: 100%; 17 | width: $menu-width; 18 | 19 | background-color: $menu-bg; 20 | 21 | .scroll-content { 22 | z-index: $z-index-menu-scroll-content; 23 | } 24 | 25 | .bar-header { 26 | z-index: $z-index-menu-bar-header; 27 | } 28 | } 29 | 30 | .menu-content { 31 | @include transform(none); 32 | box-shadow: $menu-side-shadow; 33 | } 34 | 35 | .menu-open .menu-content .pane, 36 | .menu-open .menu-content .scroll-content { 37 | pointer-events: none; 38 | } 39 | 40 | .grade-b .menu-content, 41 | .grade-c .menu-content { 42 | @include box-sizing(content-box); 43 | right: -1px; 44 | left: -1px; 45 | border-right: 1px solid #ccc; 46 | border-left: 1px solid #ccc; 47 | box-shadow: none; 48 | } 49 | 50 | .menu-left { 51 | left: 0; 52 | } 53 | 54 | .menu-right { 55 | right: 0; 56 | } 57 | 58 | .menu-animated { 59 | @include transition-transform($menu-animation-speed ease); 60 | } 61 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_modal.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Modals 4 | * -------------------------------------------------- 5 | * Modals are independent windows that slide in from off-screen. 6 | */ 7 | 8 | .modal-backdrop { 9 | @include transition(background-color 300ms ease-in-out); 10 | position: fixed; 11 | top: 0; 12 | left: 0; 13 | z-index: $z-index-modal; 14 | width: 100%; 15 | height: 100%; 16 | background-color: $modal-backdrop-bg-inactive; 17 | 18 | &.active { 19 | background-color: $modal-backdrop-bg-active; 20 | } 21 | } 22 | 23 | .modal { 24 | display: block; 25 | position: absolute; 26 | top: 0; 27 | z-index: $z-index-modal; 28 | overflow: hidden; 29 | min-height: 100%; 30 | width: 100%; 31 | background-color: $modal-bg-color; 32 | } 33 | 34 | @media (min-width: $modal-inset-mode-break-point) { 35 | // inset mode is when the modal doesn't fill the entire 36 | // display but instead is centered within a large display 37 | .modal { 38 | top: $modal-inset-mode-top; 39 | right: $modal-inset-mode-right; 40 | bottom: $modal-inset-mode-bottom; 41 | left: $modal-inset-mode-left; 42 | overflow: visible; 43 | min-height: $modal-inset-mode-min-height; 44 | width: (100% - $modal-inset-mode-left - $modal-inset-mode-right); 45 | } 46 | 47 | .modal.ng-leave-active { 48 | bottom: 0; 49 | } 50 | 51 | // remove ios header padding from inset header 52 | .platform-ios.platform-cordova .modal-wrapper .modal{ 53 | .bar-header:not(.bar-subheader) { 54 | height: $bar-height; 55 | > * { 56 | margin-top: 0; 57 | } 58 | } 59 | .tabs-top > .tabs, 60 | .tabs.tabs-top { 61 | top: $bar-height; 62 | } 63 | .has-header, 64 | .bar-subheader { 65 | top: $bar-height; 66 | } 67 | .has-subheader { 68 | top: (2 * $bar-height); 69 | } 70 | .has-tabs-top { 71 | top: $bar-height + $tabs-height; 72 | } 73 | .has-header.has-subheader.has-tabs-top { 74 | top: 2 * $bar-height + $tabs-height; 75 | } 76 | } 77 | } 78 | 79 | // disable clicks on all but the modal 80 | .modal-open { 81 | pointer-events: none; 82 | 83 | .modal, 84 | .modal-backdrop { 85 | pointer-events: auto; 86 | } 87 | // prevent clicks on modal when loading overlay is active though 88 | &.loading-active { 89 | .modal, 90 | .modal-backdrop { 91 | pointer-events: none; 92 | } 93 | } 94 | } 95 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_platform.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Platform 4 | * -------------------------------------------------- 5 | * Platform specific tweaks 6 | */ 7 | 8 | 9 | /** 10 | * Apply roboto font 11 | */ 12 | 13 | .roboto { 14 | font-family: "Roboto", $font-family-base; 15 | 16 | input { 17 | font-family: "Roboto", $font-family-base; 18 | } 19 | } 20 | /* 21 | .platform-android { 22 | 23 | 24 | .bar { 25 | padding: 0; 26 | 27 | line-height: 40px; 28 | 29 | .button { 30 | line-height: 40px; 31 | } 32 | 33 | .button-icon:before { 34 | font-size: 24px; 35 | } 36 | } 37 | 38 | .back-button { 39 | &.button-icon:before { 40 | line-height: 40px; 41 | } 42 | margin-left: -3px; 43 | padding: 0px 2px !important; 44 | &.ion-android-arrow-back:before { 45 | font-size: 12px; 46 | } 47 | 48 | &.back-button.active, 49 | &.back-button.activated { 50 | background-color: rgba(0,0,0,0.1); 51 | } 52 | } 53 | 54 | .item-divider { 55 | background: none; 56 | border-top-width: 0; 57 | border-bottom-width: 2px; 58 | text-transform: uppercase; 59 | margin-top: 10px; 60 | font-size: 14px; 61 | } 62 | .item { 63 | border-left-width: 0; 64 | border-right-width: 0; 65 | } 66 | 67 | .item-divider ~ .item:not(.item-divider) { 68 | border-bottom-width: 0; 69 | } 70 | 71 | .back-button:not(.ng-hide) + .left-buttons + .title { 72 | // Don't allow normal titles in this mode 73 | display: none; 74 | } 75 | 76 | .bar .title { 77 | text-align: left; 78 | font-weight: normal; 79 | } 80 | 81 | font-family: 'Roboto'; 82 | 83 | h1, h2, h3, h4, h5 { 84 | font-family: 'Roboto', $font-family-base; 85 | } 86 | 87 | .tab-item { 88 | font-family: 'Roboto', $font-family-base; 89 | } 90 | 91 | 92 | input, button, select, textarea { 93 | font-family: 'Roboto', $font-family-base; 94 | } 95 | */ 96 | //} 97 | 98 | .platform-ios.platform-cordova { 99 | // iOS7/8 has a status bar which sits on top of the header. 100 | // Bump down everything to make room for it. However, if 101 | // if its in Cordova, and set to fullscreen, then disregard the bump. 102 | &:not(.fullscreen) { 103 | .bar-header:not(.bar-subheader) { 104 | height: $bar-height + $ios-statusbar-height; 105 | 106 | &.item-input-inset .item-input-wrapper { 107 | margin-top: 19px !important; 108 | } 109 | 110 | > * { 111 | margin-top: $ios-statusbar-height; 112 | } 113 | } 114 | .tabs-top > .tabs, 115 | .tabs.tabs-top { 116 | top: $bar-height + $ios-statusbar-height; 117 | } 118 | 119 | .has-header, 120 | .bar-subheader { 121 | top: $bar-height + $ios-statusbar-height; 122 | } 123 | .has-subheader { 124 | top: (2 * $bar-height) + $ios-statusbar-height; 125 | } 126 | .has-tabs-top { 127 | top: $bar-height + $tabs-height + $ios-statusbar-height; 128 | } 129 | .has-header.has-subheader.has-tabs-top { 130 | top: 2 * $bar-height + $tabs-height + $ios-statusbar-height; 131 | } 132 | } 133 | &.status-bar-hide { 134 | // Cordova doesn't adjust the body height correctly, this makes up for it 135 | margin-bottom: 20px; 136 | } 137 | } 138 | 139 | @media (orientation:landscape) { 140 | .platform-ios.platform-browser.platform-ipad { 141 | position: fixed; // required for iPad 7 Safari 142 | } 143 | } 144 | 145 | .platform-c:not(.enable-transitions) * { 146 | // disable transitions on grade-c devices (Android 2) 147 | -webkit-transition: none !important; 148 | transition: none !important; 149 | } 150 | 151 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_popover.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Popovers 4 | * -------------------------------------------------- 5 | * Popovers are independent views which float over content 6 | */ 7 | 8 | .popover-backdrop { 9 | position: fixed; 10 | top: 0; 11 | left: 0; 12 | z-index: $z-index-popover; 13 | width: 100%; 14 | height: 100%; 15 | background-color: $popover-backdrop-bg-inactive; 16 | 17 | &.active { 18 | background-color: $popover-backdrop-bg-active; 19 | } 20 | } 21 | 22 | .popover { 23 | position: absolute; 24 | top: 25%; 25 | left: 50%; 26 | z-index: $z-index-popover; 27 | display: block; 28 | margin-left: -$popover-width / 2; 29 | margin-top: 12px; 30 | height: $popover-height; 31 | width: $popover-width; 32 | background-color: $popover-bg-color; 33 | box-shadow: $popover-box-shadow; 34 | opacity: 0; 35 | 36 | .item:first-child { 37 | border-top: 0; 38 | } 39 | 40 | .item:last-child { 41 | border-bottom: 0; 42 | } 43 | } 44 | 45 | 46 | // Set popover border-radius 47 | .popover, 48 | .popover .bar-header { 49 | border-radius: $popover-border-radius; 50 | } 51 | .popover .scroll-content { 52 | z-index: 1; 53 | margin: 2px 0; 54 | } 55 | .popover .bar-header { 56 | border-bottom-right-radius: 0; 57 | border-bottom-left-radius: 0; 58 | } 59 | .popover .has-header { 60 | border-top-right-radius: 0; 61 | border-top-left-radius: 0; 62 | } 63 | .popover-arrow { 64 | display: none; 65 | } 66 | 67 | 68 | // iOS Popover 69 | .platform-ios { 70 | 71 | .popover { 72 | box-shadow: $popover-box-shadow-ios; 73 | } 74 | .popover, 75 | .popover .bar-header { 76 | border-radius: $popover-border-radius-ios; 77 | } 78 | .popover .scroll-content { 79 | margin: 8px 0; 80 | border-radius: $popover-border-radius-ios; 81 | } 82 | .popover .scroll-content.has-header { 83 | margin-top: 0; 84 | } 85 | .popover-arrow { 86 | position: absolute; 87 | top: -17px; 88 | left: 43%; 89 | display: block; 90 | width: 30px; 91 | height: 19px; 92 | overflow: hidden; 93 | 94 | &:after { 95 | position: absolute; 96 | top: 12px; 97 | left: 5px; 98 | width: 20px; 99 | height: 20px; 100 | background-color: $popover-bg-color; 101 | border-radius: 3px; 102 | content: ''; 103 | @include rotate(-45deg); 104 | } 105 | } 106 | } 107 | 108 | 109 | // Android Popover 110 | .platform-android { 111 | 112 | .popover { 113 | background-color: $popover-bg-color-android; 114 | box-shadow: $popover-box-shadow-android; 115 | margin-top: -32px; 116 | 117 | .item { 118 | border-color: $popover-bg-color-android; 119 | background-color: $popover-bg-color-android; 120 | color: #4d4d4d; 121 | } 122 | } 123 | 124 | .popover-backdrop, 125 | .popover-backdrop.active { 126 | background-color: transparent; 127 | } 128 | } 129 | 130 | 131 | // disable clicks on all but the popover 132 | .popover-open { 133 | pointer-events: none; 134 | 135 | .popover, 136 | .popover-backdrop { 137 | pointer-events: auto; 138 | } 139 | // prevent clicks on popover when loading overlay is active though 140 | &.loading-active { 141 | .popover, 142 | .popover-backdrop { 143 | pointer-events: none; 144 | } 145 | } 146 | } 147 | 148 | 149 | // wider popover on larger viewports 150 | @media (min-width: $popover-large-break-point) { 151 | .popover { 152 | width: $popover-large-width; 153 | } 154 | } 155 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_popup.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Popups 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .popup { 8 | position: fixed; 9 | top: 50%; 10 | left: 50%; 11 | z-index: $z-index-popup; 12 | 13 | // Start hidden 14 | visibility: hidden; 15 | 16 | width: $popup-width; 17 | max-width: 100%; 18 | 19 | border-radius: $popup-border-radius; 20 | background-color: $popup-background-color; 21 | 22 | &.popup-hidden { 23 | @include animation-name(scaleOut); 24 | @include animation-duration($popup-leave-animation-duration); 25 | @include animation-timing-function(ease-in-out); 26 | @include animation-fill-mode(both); 27 | } 28 | 29 | &.popup-showing { 30 | visibility: visible; 31 | } 32 | 33 | &.active { 34 | @include animation-name(superScaleIn); 35 | @include animation-duration($popup-enter-animation-duration); 36 | @include animation-timing-function(ease-in-out); 37 | @include animation-fill-mode(both); 38 | } 39 | &.popup-tall{ 40 | overflow:hidden; 41 | .popup-body{ 42 | overflow:auto; 43 | } 44 | } 45 | } 46 | 47 | .popup-head { 48 | padding: 15px 0px; 49 | border-bottom: 1px solid #eee; 50 | text-align: center; 51 | } 52 | .popup-title { 53 | margin: 0; 54 | padding: 0; 55 | font-size: 15px; 56 | } 57 | .popup-sub-title { 58 | margin: 5px 0 0 0; 59 | padding: 0; 60 | font-weight: normal; 61 | font-size: 11px; 62 | } 63 | .popup-body { 64 | padding: 10px; 65 | } 66 | 67 | .popup-buttons { 68 | &.row { 69 | padding: 10px 10px; 70 | } 71 | 72 | .button { 73 | margin: 0px 5px; 74 | min-height: $popup-button-min-height; 75 | border-radius: $popup-button-border-radius; 76 | line-height: $popup-button-line-height; 77 | 78 | &:first-child { 79 | margin-left: 0px; 80 | } 81 | &:last-child { 82 | margin-right: 0px; 83 | } 84 | } 85 | } 86 | 87 | .popup-open { 88 | pointer-events: none; 89 | 90 | &.modal-open .modal { 91 | pointer-events: none; 92 | } 93 | 94 | .popup-backdrop, .popup { 95 | pointer-events: auto; 96 | } 97 | } 98 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_progress.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Progress 4 | * -------------------------------------------------- 5 | */ 6 | 7 | progress { 8 | display: block; 9 | margin: $progress-margin; 10 | width: $progress-width; 11 | } 12 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_radio.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Radio Button Inputs 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-radio { 8 | padding: 0; 9 | 10 | &:hover { 11 | cursor: pointer; 12 | } 13 | } 14 | 15 | .item-radio .item-content { 16 | /* give some room to the right for the checkmark icon */ 17 | padding-right: $item-padding * 4; 18 | } 19 | 20 | .item-radio .radio-icon { 21 | /* checkmark icon will be hidden by default */ 22 | position: absolute; 23 | top: 0; 24 | right: 0; 25 | z-index: $z-index-item-radio; 26 | visibility: hidden; 27 | padding: $item-padding - 2; 28 | height: 100%; 29 | font-size: 24px; 30 | } 31 | 32 | .item-radio input { 33 | /* hide any radio button inputs elements (the ugly circles) */ 34 | position: absolute; 35 | left: -9999px; 36 | 37 | &:checked ~ .item-content { 38 | /* style the item content when its checked */ 39 | background: #f7f7f7; 40 | } 41 | 42 | &:checked ~ .radio-icon { 43 | /* show the checkmark icon when its checked */ 44 | visibility: visible; 45 | } 46 | } 47 | 48 | // Hack for Android to correctly display the checked item 49 | // http://timpietrusky.com/advanced-checkbox-hack 50 | .platform-android.grade-b .item-radio, 51 | .platform-android.grade-c .item-radio { 52 | -webkit-animation: androidCheckedbugfix infinite 1s; 53 | } 54 | @-webkit-keyframes androidCheckedbugfix { 55 | from { padding: 0; } 56 | to { padding: 0; } 57 | } 58 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_range.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Range 4 | * -------------------------------------------------- 5 | */ 6 | 7 | input[type="range"] { 8 | display: inline-block; 9 | overflow: hidden; 10 | margin-top: 5px; 11 | margin-bottom: 5px; 12 | padding-right: 2px; 13 | padding-left: 1px; 14 | width: auto; 15 | height: $range-slider-height + 15; 16 | outline: none; 17 | background: -webkit-gradient(linear, 50% 0%, 50% 100%, color-stop(0%, $range-default-track-bg), color-stop(100%, $range-default-track-bg)); 18 | background: linear-gradient(to right, $range-default-track-bg 0%, $range-default-track-bg 100%); 19 | background-position: center; 20 | background-size: 99% $range-track-height; 21 | background-repeat: no-repeat; 22 | -webkit-appearance: none; 23 | 24 | &::-webkit-slider-thumb { 25 | position: relative; 26 | width: $range-slider-width; 27 | height: $range-slider-height; 28 | border-radius: $range-slider-border-radius; 29 | background-color: $toggle-handle-off-bg-color; 30 | box-shadow: 0 0 2px rgba(0,0,0,.5), 1px 3px 5px rgba(0,0,0,0.25); 31 | cursor: pointer; 32 | -webkit-appearance: none; 33 | } 34 | 35 | &::-webkit-slider-thumb:before { 36 | /* what creates the colorful line on the left side of the slider */ 37 | position: absolute; 38 | top: ($range-slider-height / 2) - ($range-track-height / 2); 39 | left: -2001px; 40 | width: 2000px; 41 | height: $range-track-height; 42 | background: $dark; 43 | content: ' '; 44 | } 45 | 46 | &::-webkit-slider-thumb:after { 47 | /* create a larger (but hidden) hit area */ 48 | position: absolute; 49 | top: -20px; 50 | left: -20px; 51 | padding: 30px; 52 | content: ' '; 53 | //background: red; 54 | //opacity: .5; 55 | } 56 | 57 | } 58 | 59 | .range { 60 | @include display-flex(); 61 | @include align-items(center); 62 | padding: 2px 11px; 63 | 64 | &.range-light { 65 | input { @include range-style($range-light-track-bg); } 66 | } 67 | &.range-stable { 68 | input { @include range-style($range-stable-track-bg); } 69 | } 70 | &.range-positive { 71 | input { @include range-style($range-positive-track-bg); } 72 | } 73 | &.range-calm { 74 | input { @include range-style($range-calm-track-bg); } 75 | } 76 | &.range-balanced { 77 | input { @include range-style($range-balanced-track-bg); } 78 | } 79 | &.range-assertive { 80 | input { @include range-style($range-assertive-track-bg); } 81 | } 82 | &.range-energized { 83 | input { @include range-style($range-energized-track-bg); } 84 | } 85 | &.range-royal { 86 | input { @include range-style($range-royal-track-bg); } 87 | } 88 | &.range-dark { 89 | input { @include range-style($range-dark-track-bg); } 90 | } 91 | } 92 | 93 | .range .icon { 94 | @include flex(0); 95 | display: block; 96 | min-width: $range-icon-size; 97 | text-align: center; 98 | font-size: $range-icon-size; 99 | } 100 | 101 | .range input { 102 | @include flex(1); 103 | display: block; 104 | margin-right: 10px; 105 | margin-left: 10px; 106 | } 107 | 108 | .range-label { 109 | @include flex(0, 0, auto); 110 | display: block; 111 | white-space: nowrap; 112 | } 113 | 114 | .range-label:first-child { 115 | padding-left: 5px; 116 | } 117 | .range input + .range-label { 118 | padding-right: 5px; 119 | padding-left: 0; 120 | } 121 | 122 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_select.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Select 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-select { 8 | position: relative; 9 | 10 | select { 11 | @include appearance(none); 12 | position: absolute; 13 | top: 0; 14 | right: 0; 15 | padding: ($item-padding - 2) ($item-padding * 3) ($item-padding) $item-padding; 16 | max-width: 65%; 17 | 18 | border: none; 19 | background: $item-default-bg; 20 | color: #333; 21 | 22 | // hack to hide default dropdown arrow in FF 23 | text-indent: .01px; 24 | text-overflow: ''; 25 | 26 | white-space: nowrap; 27 | font-size: $font-size-base; 28 | 29 | cursor: pointer; 30 | direction: rtl; // right align the select text 31 | } 32 | 33 | select::-ms-expand { 34 | // hide default dropdown arrow in IE 35 | display: none; 36 | } 37 | 38 | option { 39 | direction: ltr; 40 | } 41 | 42 | &:after { 43 | position: absolute; 44 | top: 50%; 45 | right: $item-padding; 46 | margin-top: -3px; 47 | width: 0; 48 | height: 0; 49 | border-top: 5px solid; 50 | border-right: 5px solid rgba(0, 0, 0, 0); 51 | border-left: 5px solid rgba(0, 0, 0, 0); 52 | color: #999; 53 | content: ""; 54 | pointer-events: none; 55 | } 56 | &.item-light { 57 | select{ 58 | background:$item-light-bg; 59 | color:$item-light-text; 60 | } 61 | } 62 | &.item-stable { 63 | select{ 64 | background:$item-stable-bg; 65 | color:$item-stable-text; 66 | } 67 | &:after, .input-label{ 68 | color:darken($item-stable-border,30%); 69 | } 70 | } 71 | &.item-positive { 72 | select{ 73 | background:$item-positive-bg; 74 | color:$item-positive-text; 75 | } 76 | &:after, .input-label{ 77 | color:$item-positive-text; 78 | } 79 | } 80 | &.item-calm { 81 | select{ 82 | background:$item-calm-bg; 83 | color:$item-calm-text; 84 | } 85 | &:after, .input-label{ 86 | color:$item-calm-text; 87 | } 88 | } 89 | &.item-assertive { 90 | select{ 91 | background:$item-assertive-bg; 92 | color:$item-assertive-text; 93 | } 94 | &:after, .input-label{ 95 | color:$item-assertive-text; 96 | } 97 | } 98 | &.item-balanced { 99 | select{ 100 | background:$item-balanced-bg; 101 | color:$item-balanced-text; 102 | } 103 | &:after, .input-label{ 104 | color:$item-balanced-text; 105 | } 106 | } 107 | &.item-energized { 108 | select{ 109 | background:$item-energized-bg; 110 | color:$item-energized-text; 111 | } 112 | &:after, .input-label{ 113 | color:$item-energized-text; 114 | } 115 | } 116 | &.item-royal { 117 | select{ 118 | background:$item-royal-bg; 119 | color:$item-royal-text; 120 | } 121 | &:after, .input-label{ 122 | color:$item-royal-text; 123 | } 124 | } 125 | &.item-dark { 126 | select{ 127 | background:$item-dark-bg; 128 | color:$item-dark-text; 129 | } 130 | &:after, .input-label{ 131 | color:$item-dark-text; 132 | } 133 | } 134 | } 135 | 136 | select { 137 | &[multiple], 138 | &[size] { 139 | height: auto; 140 | } 141 | } 142 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_slide-box.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Slide Box 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .slider { 8 | position: relative; 9 | visibility: hidden; 10 | // Make sure items don't scroll over ever 11 | overflow: hidden; 12 | } 13 | 14 | .slider-slides { 15 | position: relative; 16 | height: 100%; 17 | } 18 | 19 | .slider-slide { 20 | position: relative; 21 | display: block; 22 | float: left; 23 | width: 100%; 24 | height: 100%; 25 | vertical-align: top; 26 | } 27 | 28 | .slider-slide-image { 29 | > img { 30 | width: 100%; 31 | } 32 | } 33 | 34 | .slider-pager { 35 | position: absolute; 36 | bottom: 20px; 37 | z-index: $z-index-slider-pager; 38 | width: 100%; 39 | height: 15px; 40 | text-align: center; 41 | 42 | .slider-pager-page { 43 | display: inline-block; 44 | margin: 0px 3px; 45 | width: 15px; 46 | color: #000; 47 | text-decoration: none; 48 | 49 | opacity: 0.3; 50 | 51 | &.active { 52 | @include transition(opacity 0.4s ease-in); 53 | opacity: 1; 54 | } 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_split-pane.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Split Pane 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .split-pane { 8 | @include display-flex(); 9 | @include align-items(stretch); 10 | width: 100%; 11 | height: 100%; 12 | } 13 | 14 | .split-pane-menu { 15 | @include flex(0, 0, $split-pane-menu-width); 16 | 17 | overflow-y: auto; 18 | width: $split-pane-menu-width; 19 | height: 100%; 20 | border-right: 1px solid $split-pane-menu-border-color; 21 | 22 | @media all and (max-width: 568px) { 23 | border-right: none; 24 | } 25 | } 26 | 27 | .split-pane-content { 28 | @include flex(1, 0, auto); 29 | } 30 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_toggle.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Toggle 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .item-toggle { 8 | pointer-events: none; 9 | } 10 | 11 | .toggle { 12 | // set the color defaults 13 | @include toggle-style($toggle-on-default-border, $toggle-on-default-bg); 14 | 15 | position: relative; 16 | display: inline-block; 17 | pointer-events: auto; 18 | margin: -$toggle-hit-area-expansion; 19 | padding: $toggle-hit-area-expansion; 20 | 21 | &.dragging { 22 | .handle { 23 | background-color: $toggle-handle-dragging-bg-color !important; 24 | } 25 | } 26 | 27 | &.toggle-light { 28 | @include toggle-style($toggle-on-light-border, $toggle-on-light-bg); 29 | } 30 | &.toggle-stable { 31 | @include toggle-style($toggle-on-stable-border, $toggle-on-stable-bg); 32 | } 33 | &.toggle-positive { 34 | @include toggle-style($toggle-on-positive-border, $toggle-on-positive-bg); 35 | } 36 | &.toggle-calm { 37 | @include toggle-style($toggle-on-calm-border, $toggle-on-calm-bg); 38 | } 39 | &.toggle-assertive { 40 | @include toggle-style($toggle-on-assertive-border, $toggle-on-assertive-bg); 41 | } 42 | &.toggle-balanced { 43 | @include toggle-style($toggle-on-balanced-border, $toggle-on-balanced-bg); 44 | } 45 | &.toggle-energized { 46 | @include toggle-style($toggle-on-energized-border, $toggle-on-energized-bg); 47 | } 48 | &.toggle-royal { 49 | @include toggle-style($toggle-on-royal-border, $toggle-on-royal-bg); 50 | } 51 | &.toggle-dark { 52 | @include toggle-style($toggle-on-dark-border, $toggle-on-dark-bg); 53 | } 54 | } 55 | 56 | .toggle input { 57 | // hide the actual input checkbox 58 | display: none; 59 | } 60 | 61 | /* the track appearance when the toggle is "off" */ 62 | .toggle .track { 63 | @include transition-timing-function(ease-in-out); 64 | @include transition-duration($toggle-transition-duration); 65 | @include transition-property((background-color, border)); 66 | 67 | display: inline-block; 68 | box-sizing: border-box; 69 | width: $toggle-width; 70 | height: $toggle-height; 71 | border: solid $toggle-border-width $toggle-off-border-color; 72 | border-radius: $toggle-border-radius; 73 | background-color: $toggle-off-bg-color; 74 | content: ' '; 75 | cursor: pointer; 76 | pointer-events: none; 77 | } 78 | 79 | /* Fix to avoid background color bleeding */ 80 | /* (occured on (at least) Android 4.2, Asus MeMO Pad HD7 ME173X) */ 81 | .platform-android4_2 .toggle .track { 82 | -webkit-background-clip: padding-box; 83 | } 84 | 85 | /* the handle (circle) thats inside the toggle's track area */ 86 | /* also the handle's appearance when it is "off" */ 87 | .toggle .handle { 88 | @include transition($toggle-transition-duration ease-in-out); 89 | position: absolute; 90 | display: block; 91 | width: $toggle-handle-width; 92 | height: $toggle-handle-height; 93 | border-radius: $toggle-handle-radius; 94 | background-color: $toggle-handle-off-bg-color; 95 | top: $toggle-border-width + $toggle-hit-area-expansion; 96 | left: $toggle-border-width + $toggle-hit-area-expansion; 97 | 98 | &:before { 99 | // used to create a larger (but hidden) hit area to slide the handle 100 | position: absolute; 101 | top: -4px; 102 | left: ( ($toggle-handle-width / 2) * -1) - 8; 103 | padding: ($toggle-handle-height / 2) + 5 ($toggle-handle-width + 7); 104 | content: " "; 105 | } 106 | } 107 | 108 | .toggle input:checked + .track .handle { 109 | // the handle when the toggle is "on" 110 | @include translate3d($toggle-width - $toggle-handle-width - ($toggle-border-width * 2), 0, 0); 111 | background-color: $toggle-handle-on-bg-color; 112 | } 113 | 114 | .item-toggle.active { 115 | box-shadow: none; 116 | } 117 | 118 | .item-toggle, 119 | .item-toggle.item-complex .item-content { 120 | // make sure list item content have enough padding on right to fit the toggle 121 | padding-right: ($item-padding * 3) + $toggle-width; 122 | } 123 | 124 | .item-toggle.item-complex { 125 | padding-right: 0; 126 | } 127 | 128 | .item-toggle .toggle { 129 | // position the toggle to the right within a list item 130 | position: absolute; 131 | top: $item-padding / 2; 132 | right: $item-padding; 133 | z-index: $z-index-item-toggle; 134 | } 135 | 136 | .toggle input:disabled + .track { 137 | opacity: .6; 138 | } 139 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_type.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Typography 4 | * -------------------------------------------------- 5 | */ 6 | 7 | 8 | // Body text 9 | // ------------------------- 10 | 11 | p { 12 | margin: 0 0 ($line-height-computed / 2); 13 | } 14 | 15 | 16 | // Emphasis & misc 17 | // ------------------------- 18 | 19 | small { font-size: 85%; } 20 | cite { font-style: normal; } 21 | 22 | 23 | // Alignment 24 | // ------------------------- 25 | 26 | .text-left { text-align: left; } 27 | .text-right { text-align: right; } 28 | .text-center { text-align: center; } 29 | 30 | 31 | // Headings 32 | // ------------------------- 33 | 34 | h1, h2, h3, h4, h5, h6, 35 | .h1, .h2, .h3, .h4, .h5, .h6 { 36 | color: $base-color; 37 | font-weight: $headings-font-weight; 38 | font-family: $headings-font-family; 39 | line-height: $headings-line-height; 40 | 41 | small { 42 | font-weight: normal; 43 | line-height: 1; 44 | } 45 | } 46 | 47 | h1, .h1, 48 | h2, .h2, 49 | h3, .h3 { 50 | margin-top: $line-height-computed; 51 | margin-bottom: ($line-height-computed / 2); 52 | 53 | &:first-child { 54 | margin-top: 0; 55 | } 56 | 57 | + h1, + .h1, 58 | + h2, + .h2, 59 | + h3, + .h3 { 60 | margin-top: ($line-height-computed / 2); 61 | } 62 | } 63 | 64 | h4, .h4, 65 | h5, .h5, 66 | h6, .h6 { 67 | margin-top: ($line-height-computed / 2); 68 | margin-bottom: ($line-height-computed / 2); 69 | } 70 | 71 | h1, .h1 { font-size: floor($font-size-base * 2.60); } // ~36px 72 | h2, .h2 { font-size: floor($font-size-base * 2.15); } // ~30px 73 | h3, .h3 { font-size: ceil($font-size-base * 1.70); } // ~24px 74 | h4, .h4 { font-size: ceil($font-size-base * 1.25); } // ~18px 75 | h5, .h5 { font-size: $font-size-base; } 76 | h6, .h6 { font-size: ceil($font-size-base * 0.85); } // ~12px 77 | 78 | h1 small, .h1 small { font-size: ceil($font-size-base * 1.70); } // ~24px 79 | h2 small, .h2 small { font-size: ceil($font-size-base * 1.25); } // ~18px 80 | h3 small, .h3 small, 81 | h4 small, .h4 small { font-size: $font-size-base; } 82 | 83 | 84 | // Description Lists 85 | // ------------------------- 86 | 87 | dl { 88 | margin-bottom: $line-height-computed; 89 | } 90 | dt, 91 | dd { 92 | line-height: $line-height-base; 93 | } 94 | dt { 95 | font-weight: bold; 96 | } 97 | 98 | 99 | // Blockquotes 100 | // ------------------------- 101 | 102 | blockquote { 103 | margin: 0 0 $line-height-computed; 104 | padding: ($line-height-computed / 2) $line-height-computed; 105 | border-left: 5px solid gray; 106 | 107 | p { 108 | font-weight: 300; 109 | font-size: ($font-size-base * 1.25); 110 | line-height: 1.25; 111 | } 112 | 113 | p:last-child { 114 | margin-bottom: 0; 115 | } 116 | 117 | small { 118 | display: block; 119 | line-height: $line-height-base; 120 | &:before { 121 | content: '\2014 \00A0';// EM DASH, NBSP; 122 | } 123 | } 124 | } 125 | 126 | 127 | // Quotes 128 | // ------------------------- 129 | 130 | q:before, 131 | q:after, 132 | blockquote:before, 133 | blockquote:after { 134 | content: ""; 135 | } 136 | 137 | 138 | // Addresses 139 | // ------------------------- 140 | 141 | address { 142 | display: block; 143 | margin-bottom: $line-height-computed; 144 | font-style: normal; 145 | line-height: $line-height-base; 146 | } 147 | 148 | 149 | // Links 150 | // ------------------------- 151 | 152 | a.subdued { 153 | padding-right: 10px; 154 | color: #888; 155 | text-decoration: none; 156 | 157 | &:hover { 158 | text-decoration: none; 159 | } 160 | &:last-child { 161 | padding-right: 0; 162 | } 163 | } 164 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/_util.scss: -------------------------------------------------------------------------------- 1 | 2 | /** 3 | * Utility Classes 4 | * -------------------------------------------------- 5 | */ 6 | 7 | .hide { 8 | display: none; 9 | } 10 | .opacity-hide { 11 | opacity: 0; 12 | } 13 | .grade-b .opacity-hide, 14 | .grade-c .opacity-hide { 15 | opacity: 1; 16 | display: none; 17 | } 18 | .show { 19 | display: block; 20 | } 21 | .opacity-show { 22 | opacity: 1; 23 | } 24 | .invisible { 25 | visibility: hidden; 26 | } 27 | 28 | .keyboard-open .hide-on-keyboard-open { 29 | display: none; 30 | } 31 | 32 | .keyboard-open .tabs.hide-on-keyboard-open + .pane .has-tabs, 33 | .keyboard-open .bar-footer.hide-on-keyboard-open + .pane .has-footer { 34 | bottom: 0; 35 | } 36 | 37 | .inline { 38 | display: inline-block; 39 | } 40 | 41 | .disable-pointer-events { 42 | pointer-events: none; 43 | } 44 | 45 | .enable-pointer-events { 46 | pointer-events: auto; 47 | } 48 | 49 | .disable-user-behavior { 50 | // used to prevent the browser from doing its native behavior. this doesnt 51 | // prevent the scrolling, but cancels the contextmenu, tap highlighting, etc 52 | 53 | @include user-select(none); 54 | @include touch-callout(none); 55 | @include tap-highlight-transparent(); 56 | 57 | -webkit-user-drag: none; 58 | 59 | -ms-touch-action: none; 60 | -ms-content-zooming: none; 61 | } 62 | 63 | .no-resize { 64 | resize: none; 65 | } 66 | 67 | .block { 68 | display: block; 69 | clear: both; 70 | &:after { 71 | display: block; 72 | visibility: hidden; 73 | clear: both; 74 | height: 0; 75 | content: "."; 76 | } 77 | } 78 | 79 | .full-image { 80 | width: 100%; 81 | } 82 | 83 | .clearfix { 84 | *zoom: 1; 85 | &:before, 86 | &:after { 87 | display: table; 88 | content: ""; 89 | // Fixes Opera/contenteditable bug: 90 | // http://nicolasgallagher.com/micro-clearfix-hack/#comment-36952 91 | line-height: 0; 92 | } 93 | &:after { 94 | clear: both; 95 | } 96 | } 97 | 98 | /** 99 | * Content Padding 100 | * -------------------------------------------------- 101 | */ 102 | 103 | .padding { 104 | padding: $content-padding; 105 | } 106 | 107 | .padding-top, 108 | .padding-vertical { 109 | padding-top: $content-padding; 110 | } 111 | 112 | .padding-right, 113 | .padding-horizontal { 114 | padding-right: $content-padding; 115 | } 116 | 117 | .padding-bottom, 118 | .padding-vertical { 119 | padding-bottom: $content-padding; 120 | } 121 | 122 | .padding-left, 123 | .padding-horizontal { 124 | padding-left: $content-padding; 125 | } 126 | 127 | 128 | /** 129 | * Rounded 130 | * -------------------------------------------------- 131 | */ 132 | 133 | .rounded { 134 | border-radius: $border-radius-base; 135 | } 136 | 137 | 138 | /** 139 | * Utility Colors 140 | * -------------------------------------------------- 141 | * Utility colors are added to help set a naming convention. You'll 142 | * notice we purposely do not use words like "red" or "blue", but 143 | * instead have colors which represent an emotion or generic theme. 144 | */ 145 | 146 | .light, a.light { 147 | color: $light; 148 | } 149 | .light-bg { 150 | background-color: $light; 151 | } 152 | .light-border { 153 | border-color: $button-light-border; 154 | } 155 | 156 | .stable, a.stable { 157 | color: $stable; 158 | } 159 | .stable-bg { 160 | background-color: $stable; 161 | } 162 | .stable-border { 163 | border-color: $button-stable-border; 164 | } 165 | 166 | .positive, a.positive { 167 | color: $positive; 168 | } 169 | .positive-bg { 170 | background-color: $positive; 171 | } 172 | .positive-border { 173 | border-color: $button-positive-border; 174 | } 175 | 176 | .calm, a.calm { 177 | color: $calm; 178 | } 179 | .calm-bg { 180 | background-color: $calm; 181 | } 182 | .calm-border { 183 | border-color: $button-calm-border; 184 | } 185 | 186 | .assertive, a.assertive { 187 | color: $assertive; 188 | } 189 | .assertive-bg { 190 | background-color: $assertive; 191 | } 192 | .assertive-border { 193 | border-color: $button-assertive-border; 194 | } 195 | 196 | .balanced, a.balanced { 197 | color: $balanced; 198 | } 199 | .balanced-bg { 200 | background-color: $balanced; 201 | } 202 | .balanced-border { 203 | border-color: $button-balanced-border; 204 | } 205 | 206 | .energized, a.energized { 207 | color: $energized; 208 | } 209 | .energized-bg { 210 | background-color: $energized; 211 | } 212 | .energized-border { 213 | border-color: $button-energized-border; 214 | } 215 | 216 | .royal, a.royal { 217 | color: $royal; 218 | } 219 | .royal-bg { 220 | background-color: $royal; 221 | } 222 | .royal-border { 223 | border-color: $button-royal-border; 224 | } 225 | 226 | .dark, a.dark { 227 | color: $dark; 228 | } 229 | .dark-bg { 230 | background-color: $dark; 231 | } 232 | .dark-border { 233 | border-color: $button-dark-border; 234 | } 235 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/ionic.scss: -------------------------------------------------------------------------------- 1 | @charset "UTF-8"; 2 | 3 | @import 4 | // Ionicons 5 | "ionicons/ionicons.scss", 6 | 7 | // Variables 8 | "mixins", 9 | "variables", 10 | 11 | // Base 12 | "reset", 13 | "scaffolding", 14 | "type", 15 | 16 | // Components 17 | "action-sheet", 18 | "backdrop", 19 | "bar", 20 | "tabs", 21 | "menu", 22 | "modal", 23 | "popover", 24 | "popup", 25 | "loading", 26 | "items", 27 | "list", 28 | "badge", 29 | "slide-box", 30 | "split-pane", 31 | 32 | // Forms 33 | "form", 34 | "checkbox", 35 | "toggle", 36 | "radio", 37 | "range", 38 | "select", 39 | "progress", 40 | 41 | // Buttons 42 | "button", 43 | "button-bar", 44 | 45 | // Util 46 | "animations", 47 | "grid", 48 | "util", 49 | "platform"; 50 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/ionicons/_ionicons-animation.scss: -------------------------------------------------------------------------------- 1 | // Animation Icons 2 | // -------------------------- 3 | 4 | .#{$ionicons-prefix}spin { 5 | -webkit-animation: spin 1s infinite linear; 6 | -moz-animation: spin 1s infinite linear; 7 | -o-animation: spin 1s infinite linear; 8 | animation: spin 1s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @-ms-keyframes spin { 24 | 0% { -ms-transform: rotate(0deg); } 25 | 100% { -ms-transform: rotate(359deg); } 26 | } 27 | @keyframes spin { 28 | 0% { transform: rotate(0deg); } 29 | 100% { transform: rotate(359deg); } 30 | } 31 | 32 | 33 | .#{$ionicons-prefix}loading-a, 34 | .#{$ionicons-prefix}loading-b, 35 | .#{$ionicons-prefix}loading-c, 36 | .#{$ionicons-prefix}loading-d, 37 | .#{$ionicons-prefix}looping, 38 | .#{$ionicons-prefix}refreshing, 39 | .#{$ionicons-prefix}ios7-reloading { 40 | @extend .ion; 41 | @extend .#{$ionicons-prefix}spin; 42 | } 43 | 44 | .#{$ionicons-prefix}loading-a { 45 | -webkit-animation-timing-function: steps(8, start); 46 | -moz-animation-timing-function: steps(8, start); 47 | animation-timing-function: steps(8, start); 48 | } 49 | 50 | .#{$ionicons-prefix}loading-a:before { 51 | @extend .#{$ionicons-prefix}load-a:before; 52 | } 53 | 54 | .#{$ionicons-prefix}loading-b:before { 55 | @extend .#{$ionicons-prefix}load-b:before; 56 | } 57 | 58 | .#{$ionicons-prefix}loading-c:before { 59 | @extend .#{$ionicons-prefix}load-c:before; 60 | } 61 | 62 | .#{$ionicons-prefix}loading-d:before { 63 | @extend .#{$ionicons-prefix}load-d:before; 64 | } 65 | 66 | .#{$ionicons-prefix}looping:before { 67 | @extend .#{$ionicons-prefix}loop:before; 68 | } 69 | 70 | .#{$ionicons-prefix}refreshing:before { 71 | @extend .#{$ionicons-prefix}refresh:before; 72 | } 73 | 74 | .#{$ionicons-prefix}ios7-reloading:before { 75 | @extend .#{$ionicons-prefix}ios7-reload:before; 76 | } 77 | -------------------------------------------------------------------------------- /www/lib/ionic/scss/ionicons/_ionicons-font.scss: -------------------------------------------------------------------------------- 1 | // Ionicons Font Path 2 | // -------------------------- 3 | 4 | @font-face { 5 | font-family: $ionicons-font-family; 6 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}"); 7 | src:url("#{$ionicons-font-path}/ionicons.eot?v=#{$ionicons-version}#iefix") format("embedded-opentype"), 8 | url("#{$ionicons-font-path}/ionicons.ttf?v=#{$ionicons-version}") format("truetype"), 9 | url("#{$ionicons-font-path}/ionicons.woff?v=#{$ionicons-version}") format("woff"), 10 | url("#{$ionicons-font-path}/ionicons.svg?v=#{$ionicons-version}#Ionicons") format("svg"); 11 | font-weight: normal; 12 | font-style: normal; 13 | } 14 | 15 | .ion { 16 | display: inline-block; 17 | font-family: $ionicons-font-family; 18 | speak: none; 19 | font-style: normal; 20 | font-weight: normal; 21 | font-variant: normal; 22 | text-transform: none; 23 | text-rendering: auto; 24 | line-height: 1; 25 | -webkit-font-smoothing: antialiased; 26 | -moz-osx-font-smoothing: grayscale; 27 | } -------------------------------------------------------------------------------- /www/lib/ionic/scss/ionicons/ionicons.scss: -------------------------------------------------------------------------------- 1 | @import "ionicons-variables"; 2 | /*! 3 | Ionicons, v1.5.2 4 | Created by Ben Sperry for the Ionic Framework, http://ionicons.com/ 5 | https://twitter.com/benjsperry https://twitter.com/ionicframework 6 | MIT License: https://github.com/driftyco/ionicons 7 | */ 8 | 9 | @import "ionicons-font"; 10 | @import "ionicons-animation"; 11 | @import "ionicons-icons"; 12 | -------------------------------------------------------------------------------- /www/lib/ionic/version.json: -------------------------------------------------------------------------------- 1 | { 2 | "version": "1.0.0-beta.11", 3 | "codename": "indium-iguana", 4 | "date": "2014-08-06", 5 | "time": "21:49:18" 6 | } 7 | -------------------------------------------------------------------------------- /www/views/browse-file.html: -------------------------------------------------------------------------------- 1 |
2 | 3 | 6 |
-------------------------------------------------------------------------------- /www/views/chat-list.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /www/views/chat.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /www/views/home.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
5 | Enter a nickname 6 |
7 |
8 | 9 |
10 |
11 |
12 | 15 |
16 |
17 |
--------------------------------------------------------------------------------